leaflet-freedraw
Version:
Zoopla inspired freehand polygon creation using Leaflet.js.
3 lines • 561 kB
JavaScript
"use strict";function _arrayLikeToArray(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function _arrayWithoutHoles(t){if(Array.isArray(t))return _arrayLikeToArray(t)}function _assertThisInitialized(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function _callSuper(t,e,n){return e=_getPrototypeOf(e),_possibleConstructorReturn(t,_isNativeReflectConstruct()?Reflect.construct(e,n||[],_getPrototypeOf(t).constructor):e.apply(t,n))}function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function _defineProperties(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,_toPropertyKey(r.key),r)}}function _createClass(t,e,n){return e&&_defineProperties(t.prototype,e),n&&_defineProperties(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function _createForOfIteratorHelper(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=_unsupportedIterableToArray(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,a=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return s=t.done,t},e:function(t){a=!0,o=t},f:function(){try{s||null==n.return||n.return()}finally{if(a)throw o}}}}function _defineProperty(t,e,n){return(e=_toPropertyKey(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function _get(){return(_get="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=_superPropBase(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}}).apply(null,arguments)}function _getPrototypeOf(t){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function _inherits(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&_setPrototypeOf(t,e)}function _isNativeReflectConstruct(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(_isNativeReflectConstruct=function(){return!!t})()}function _iterableToArray(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function ownKeys(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function _objectSpread2(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?ownKeys(Object(n),!0).forEach(function(e){_defineProperty(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ownKeys(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function _possibleConstructorReturn(t,e){if(e&&("object"==typeof e||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(t)}function _setPrototypeOf(t,e){return(_setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function _superPropBase(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=_getPrototypeOf(t)););return t}function _superPropGet(t,e,n,r){var i=_get(_getPrototypeOf(1&r?t.prototype:t),e,n);return 2&r&&"function"==typeof i?function(t){return i.apply(n,t)}:i}function _toConsumableArray(t){return _arrayWithoutHoles(t)||_iterableToArray(t)||_unsupportedIterableToArray(t)||_nonIterableSpread()}function _toPrimitive(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}function _toPropertyKey(t){var e=_toPrimitive(t,"string");return"symbol"==typeof e?e:e+""}function _unsupportedIterableToArray(t,e){if(t){if("string"==typeof t)return _arrayLikeToArray(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_arrayLikeToArray(t,e):void 0}}Object.defineProperty(exports,"__esModule",{value:!0});var global$1="object"==typeof window&&window&&window.Math==Math?window:"object"==typeof self&&self&&self.Math==Math?self:Function("return this")(),hasOwnProperty$1={}.hasOwnProperty,has=function(t,e){return hasOwnProperty$1.call(t,e)},fails=function(t){try{return!!t()}catch(t){return!0}},descriptors=!fails(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}),isPure=!1,nativePropertyIsEnumerable={}.propertyIsEnumerable,nativeGetOwnPropertyDescriptor=Object.getOwnPropertyDescriptor,NASHORN_BUG=nativeGetOwnPropertyDescriptor&&!nativePropertyIsEnumerable.call({1:2},1),f=NASHORN_BUG?function(t){var e=nativeGetOwnPropertyDescriptor(this,t);return!!e&&e.enumerable}:nativePropertyIsEnumerable,objectPropertyIsEnumerable={f:f},createPropertyDescriptor=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},toString={}.toString,classofRaw=function(t){return toString.call(t).slice(8,-1)},split="".split,indexedObject=fails(function(){return!Object("z").propertyIsEnumerable(0)})?function(t){return"String"==classofRaw(t)?split.call(t,""):Object(t)}:Object,requireObjectCoercible=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t},toIndexedObject=function(t){return indexedObject(requireObjectCoercible(t))},isObject=function(t){return"object"==typeof t?null!==t:"function"==typeof t},toPrimitive=function(t,e){if(!isObject(t))return t;var n,r;if(e&&"function"==typeof(n=t.toString)&&!isObject(r=n.call(t)))return r;if("function"==typeof(n=t.valueOf)&&!isObject(r=n.call(t)))return r;if(!e&&"function"==typeof(n=t.toString)&&!isObject(r=n.call(t)))return r;throw TypeError("Can't convert object to primitive value")},document$1=global$1.document,exist=isObject(document$1)&&isObject(document$1.createElement),documentCreateElement=function(t){return exist?document$1.createElement(t):{}},ie8DomDefine=!descriptors&&!fails(function(){return 7!=Object.defineProperty(documentCreateElement("div"),"a",{get:function(){return 7}}).a}),nativeGetOwnPropertyDescriptor$1=Object.getOwnPropertyDescriptor,f$1=descriptors?nativeGetOwnPropertyDescriptor$1:function(t,e){if(t=toIndexedObject(t),e=toPrimitive(e,!0),ie8DomDefine)try{return nativeGetOwnPropertyDescriptor$1(t,e)}catch(t){}if(has(t,e))return createPropertyDescriptor(!objectPropertyIsEnumerable.f.call(t,e),t[e])},objectGetOwnPropertyDescriptor={f:f$1},anObject=function(t){if(!isObject(t))throw TypeError(String(t)+" is not an object");return t},nativeDefineProperty=Object.defineProperty,f$2=descriptors?nativeDefineProperty:function(t,e,n){if(anObject(t),e=toPrimitive(e,!0),anObject(n),ie8DomDefine)try{return nativeDefineProperty(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(t[e]=n.value),t},objectDefineProperty={f:f$2},hide=descriptors?function(t,e,n){return objectDefineProperty.f(t,e,createPropertyDescriptor(1,n))}:function(t,e,n){return t[e]=n,t},commonjsGlobal="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function createCommonjsModule(t,e){return t(e={exports:{}},e.exports),e.exports}var set,get,has$1,setGlobal=function(t,e){try{hide(global$1,t,e)}catch(n){global$1[t]=e}return e},shared=createCommonjsModule(function(t){var e=global$1["__core-js_shared__"]||setGlobal("__core-js_shared__",{});(t.exports=function(t,n){return e[t]||(e[t]=void 0!==n?n:{})})("versions",[]).push({version:"3.0.1",mode:"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})}),functionToString=shared("native-function-to-string",Function.toString),WeakMap$1=global$1.WeakMap,nativeWeakMap="function"==typeof WeakMap$1&&/native code/.test(functionToString.call(WeakMap$1)),id=0,postfix=Math.random(),uid=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++id+postfix).toString(36))},shared$1=shared("keys"),sharedKey=function(t){return shared$1[t]||(shared$1[t]=uid(t))},hiddenKeys={},WeakMap$2=global$1.WeakMap,enforce=function(t){return has$1(t)?get(t):set(t,{})},getterFor=function(t){return function(e){var n;if(!isObject(e)||(n=get(e)).type!==t)throw TypeError("Incompatible receiver, "+t+" required");return n}};if(nativeWeakMap){var store=new WeakMap$2,wmget=store.get,wmhas=store.has,wmset=store.set;set=function(t,e){return wmset.call(store,t,e),e},get=function(t){return wmget.call(store,t)||{}},has$1=function(t){return wmhas.call(store,t)}}else{var STATE=sharedKey("state");hiddenKeys[STATE]=!0,set=function(t,e){return hide(t,STATE,e),e},get=function(t){return has(t,STATE)?t[STATE]:{}},has$1=function(t){return has(t,STATE)}}var internalState={set:set,get:get,has:has$1,enforce:enforce,getterFor:getterFor},redefine=createCommonjsModule(function(t){var e=internalState.get,n=internalState.enforce,r=String(functionToString).split("toString");shared("inspectSource",function(t){return functionToString.call(t)}),(t.exports=function(t,e,i,o){var s=!!o&&!!o.unsafe,a=!!o&&!!o.enumerable,l=!!o&&!!o.noTargetGet;"function"==typeof i&&("string"!=typeof e||has(i,"name")||hide(i,"name",e),n(i).source=r.join("string"==typeof e?e:"")),t!==global$1?(s?!l&&t[e]&&(a=!0):delete t[e],a?t[e]=i:hide(t,e,i)):a?t[e]=i:setGlobal(e,i)})(Function.prototype,"toString",function(){return"function"==typeof this&&e(this).source||functionToString.call(this)})}),ceil=Math.ceil,floor=Math.floor,toInteger=function(t){return isNaN(t=+t)?0:(t>0?floor:ceil)(t)},min=Math.min,toLength=function(t){return t>0?min(toInteger(t),9007199254740991):0},max=Math.max,min$1=Math.min,toAbsoluteIndex=function(t,e){var n=toInteger(t);return n<0?max(n+e,0):min$1(n,e)},arrayIncludes=function(t){return function(e,n,r){var i,o=toIndexedObject(e),s=toLength(o.length),a=toAbsoluteIndex(r,s);if(t&&n!=n){for(;s>a;)if((i=o[a++])!=i)return!0}else for(;s>a;a++)if((t||a in o)&&o[a]===n)return t||a||0;return!t&&-1}},arrayIndexOf=arrayIncludes(!1),objectKeysInternal=function(t,e){var n,r=toIndexedObject(t),i=0,o=[];for(n in r)!has(hiddenKeys,n)&&has(r,n)&&o.push(n);for(;e.length>i;)has(r,n=e[i++])&&(~arrayIndexOf(o,n)||o.push(n));return o},enumBugKeys=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],hiddenKeys$1=enumBugKeys.concat("length","prototype"),f$3=Object.getOwnPropertyNames||function(t){return objectKeysInternal(t,hiddenKeys$1)},objectGetOwnPropertyNames={f:f$3},f$4=Object.getOwnPropertySymbols,objectGetOwnPropertySymbols={f:f$4},Reflect$1=global$1.Reflect,ownKeys$1=Reflect$1&&Reflect$1.ownKeys||function(t){var e=objectGetOwnPropertyNames.f(anObject(t)),n=objectGetOwnPropertySymbols.f;return n?e.concat(n(t)):e},copyConstructorProperties=function(t,e){for(var n=ownKeys$1(e),r=objectDefineProperty.f,i=objectGetOwnPropertyDescriptor.f,o=0;o<n.length;o++){var s=n[o];has(t,s)||r(t,s,i(e,s))}},replacement=/#|\.prototype\./,isForced=function(t,e){var n=data[normalize(t)];return n==POLYFILL||n!=NATIVE&&("function"==typeof e?fails(e):!!e)},normalize=isForced.normalize=function(t){return String(t).replace(replacement,".").toLowerCase()},data=isForced.data={},NATIVE=isForced.NATIVE="N",POLYFILL=isForced.POLYFILL="P",isForced_1=isForced,getOwnPropertyDescriptor=objectGetOwnPropertyDescriptor.f,_export=function(t,e){var n,r,i,o,s,a=t.target,l=t.global,u=t.stat;if(n=l?global$1:u?global$1[a]||setGlobal(a,{}):(global$1[a]||{}).prototype)for(r in e){if(o=e[r],i=t.noTargetGet?(s=getOwnPropertyDescriptor(n,r))&&s.value:n[r],!isForced_1(l?r:a+(u?".":"#")+r,t.forced)&&void 0!==i){if(typeof o==typeof i)continue;copyConstructorProperties(o,i)}(t.sham||i&&i.sham)&&hide(o,"sham",!0),redefine(n,r,o,t)}},nativeSymbol=!fails(function(){return!String(Symbol())}),store$1=shared("wks"),Symbol$1=global$1.Symbol,wellKnownSymbol=function(t){return store$1[t]||(store$1[t]=nativeSymbol&&Symbol$1[t]||(nativeSymbol?Symbol$1:uid)("Symbol."+t))},defineProperty=objectDefineProperty.f,TO_STRING_TAG=wellKnownSymbol("toStringTag"),setToStringTag=function(t,e,n){t&&!has(t=n?t:t.prototype,TO_STRING_TAG)&&defineProperty(t,TO_STRING_TAG,{configurable:!0,value:e})},f$5=wellKnownSymbol,wrappedWellKnownSymbol={f:f$5},path=global$1,defineProperty$1=objectDefineProperty.f,defineWellKnownSymbol=function(t){var e=path.Symbol||(path.Symbol={});has(e,t)||defineProperty$1(e,t,{value:wrappedWellKnownSymbol.f(t)})},objectKeys=Object.keys||function(t){return objectKeysInternal(t,enumBugKeys)},enumKeys=function(t){var e=objectKeys(t),n=objectGetOwnPropertySymbols.f;if(n)for(var r,i=n(t),o=objectPropertyIsEnumerable.f,s=0;i.length>s;)o.call(t,r=i[s++])&&e.push(r);return e},isArray=Array.isArray||function(t){return"Array"==classofRaw(t)},objectDefineProperties=descriptors?Object.defineProperties:function(t,e){anObject(t);for(var n,r=objectKeys(e),i=r.length,o=0;i>o;)objectDefineProperty.f(t,n=r[o++],e[n]);return t},document$2=global$1.document,html=document$2&&document$2.documentElement,IE_PROTO=sharedKey("IE_PROTO"),PROTOTYPE="prototype",Empty=function(){},createDict=function(){var t,e=documentCreateElement("iframe"),n=enumBugKeys.length;for(e.style.display="none",html.appendChild(e),e.src=String("javascript:"),(t=e.contentWindow.document).open(),t.write("<script>document.F=Object<\/script>"),t.close(),createDict=t.F;n--;)delete createDict[PROTOTYPE][enumBugKeys[n]];return createDict()},objectCreate=Object.create||function(t,e){var n;return null!==t?(Empty[PROTOTYPE]=anObject(t),n=new Empty,Empty[PROTOTYPE]=null,n[IE_PROTO]=t):n=createDict(),void 0===e?n:objectDefineProperties(n,e)};hiddenKeys[IE_PROTO]=!0;var nativeGetOwnPropertyNames=objectGetOwnPropertyNames.f,toString$1={}.toString,windowNames="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],getWindowNames=function(t){try{return nativeGetOwnPropertyNames(t)}catch(t){return windowNames.slice()}},f$6=function(t){return windowNames&&"[object Window]"==toString$1.call(t)?getWindowNames(t):nativeGetOwnPropertyNames(toIndexedObject(t))},objectGetOwnPropertyNamesExternal={f:f$6},HIDDEN=sharedKey("hidden"),SYMBOL="Symbol",setInternalState=internalState.set,getInternalState=internalState.getterFor(SYMBOL),nativeGetOwnPropertyDescriptor$2=objectGetOwnPropertyDescriptor.f,nativeDefineProperty$1=objectDefineProperty.f,nativeGetOwnPropertyNames$1=objectGetOwnPropertyNamesExternal.f,$Symbol=global$1.Symbol,JSON=global$1.JSON,nativeJSONStringify=JSON&&JSON.stringify,PROTOTYPE$1="prototype",TO_PRIMITIVE=wellKnownSymbol("toPrimitive"),nativePropertyIsEnumerable$1=objectPropertyIsEnumerable.f,SymbolRegistry=shared("symbol-registry"),AllSymbols=shared("symbols"),ObjectPrototypeSymbols=shared("op-symbols"),WellKnownSymbolsStore=shared("wks"),ObjectPrototype=Object[PROTOTYPE$1],QObject=global$1.QObject,USE_SETTER=!QObject||!QObject[PROTOTYPE$1]||!QObject[PROTOTYPE$1].findChild,setSymbolDescriptor=descriptors&&fails(function(){return 7!=objectCreate(nativeDefineProperty$1({},"a",{get:function(){return nativeDefineProperty$1(this,"a",{value:7}).a}})).a})?function(t,e,n){var r=nativeGetOwnPropertyDescriptor$2(ObjectPrototype,e);r&&delete ObjectPrototype[e],nativeDefineProperty$1(t,e,n),r&&t!==ObjectPrototype&&nativeDefineProperty$1(ObjectPrototype,e,r)}:nativeDefineProperty$1,wrap=function(t,e){var n=AllSymbols[t]=objectCreate($Symbol[PROTOTYPE$1]);return setInternalState(n,{type:SYMBOL,tag:t,description:e}),descriptors||(n.description=e),n},isSymbol=nativeSymbol&&"symbol"==typeof $Symbol.iterator?function(t){return"symbol"==typeof t}:function(t){return Object(t)instanceof $Symbol},$defineProperty=function(t,e,n){return t===ObjectPrototype&&$defineProperty(ObjectPrototypeSymbols,e,n),anObject(t),e=toPrimitive(e,!0),anObject(n),has(AllSymbols,e)?(n.enumerable?(has(t,HIDDEN)&&t[HIDDEN][e]&&(t[HIDDEN][e]=!1),n=objectCreate(n,{enumerable:createPropertyDescriptor(0,!1)})):(has(t,HIDDEN)||nativeDefineProperty$1(t,HIDDEN,createPropertyDescriptor(1,{})),t[HIDDEN][e]=!0),setSymbolDescriptor(t,e,n)):nativeDefineProperty$1(t,e,n)},$defineProperties=function(t,e){anObject(t);for(var n,r=enumKeys(e=toIndexedObject(e)),i=0,o=r.length;o>i;)$defineProperty(t,n=r[i++],e[n]);return t},$create=function(t,e){return void 0===e?objectCreate(t):$defineProperties(objectCreate(t),e)},$propertyIsEnumerable=function(t){var e=nativePropertyIsEnumerable$1.call(this,t=toPrimitive(t,!0));return!(this===ObjectPrototype&&has(AllSymbols,t)&&!has(ObjectPrototypeSymbols,t))&&(!(e||!has(this,t)||!has(AllSymbols,t)||has(this,HIDDEN)&&this[HIDDEN][t])||e)},$getOwnPropertyDescriptor=function(t,e){if(t=toIndexedObject(t),e=toPrimitive(e,!0),t!==ObjectPrototype||!has(AllSymbols,e)||has(ObjectPrototypeSymbols,e)){var n=nativeGetOwnPropertyDescriptor$2(t,e);return!n||!has(AllSymbols,e)||has(t,HIDDEN)&&t[HIDDEN][e]||(n.enumerable=!0),n}},$getOwnPropertyNames=function(t){for(var e,n=nativeGetOwnPropertyNames$1(toIndexedObject(t)),r=[],i=0;n.length>i;)has(AllSymbols,e=n[i++])||has(hiddenKeys,e)||r.push(e);return r},$getOwnPropertySymbols=function(t){for(var e,n=t===ObjectPrototype,r=nativeGetOwnPropertyNames$1(n?ObjectPrototypeSymbols:toIndexedObject(t)),i=[],o=0;r.length>o;)!has(AllSymbols,e=r[o++])||n&&!has(ObjectPrototype,e)||i.push(AllSymbols[e]);return i};nativeSymbol||(redefine(($Symbol=function(){if(this instanceof $Symbol)throw TypeError("Symbol is not a constructor");var t=void 0===arguments[0]?void 0:String(arguments[0]),e=uid(t),n=function(t){this===ObjectPrototype&&n.call(ObjectPrototypeSymbols,t),has(this,HIDDEN)&&has(this[HIDDEN],e)&&(this[HIDDEN][e]=!1),setSymbolDescriptor(this,e,createPropertyDescriptor(1,t))};return descriptors&&USE_SETTER&&setSymbolDescriptor(ObjectPrototype,e,{configurable:!0,set:n}),wrap(e,t)})[PROTOTYPE$1],"toString",function(){return getInternalState(this).tag}),objectPropertyIsEnumerable.f=$propertyIsEnumerable,objectDefineProperty.f=$defineProperty,objectGetOwnPropertyDescriptor.f=$getOwnPropertyDescriptor,objectGetOwnPropertyNames.f=objectGetOwnPropertyNamesExternal.f=$getOwnPropertyNames,objectGetOwnPropertySymbols.f=$getOwnPropertySymbols,descriptors&&(nativeDefineProperty$1($Symbol[PROTOTYPE$1],"description",{configurable:!0,get:function(){return getInternalState(this).description}}),redefine(ObjectPrototype,"propertyIsEnumerable",$propertyIsEnumerable,{unsafe:!0})),wrappedWellKnownSymbol.f=function(t){return wrap(wellKnownSymbol(t),t)}),_export({global:!0,wrap:!0,forced:!nativeSymbol,sham:!nativeSymbol},{Symbol:$Symbol});for(var wellKnownSymbols=objectKeys(WellKnownSymbolsStore),k=0;wellKnownSymbols.length>k;)defineWellKnownSymbol(wellKnownSymbols[k++]);_export({target:SYMBOL,stat:!0,forced:!nativeSymbol},{for:function(t){return has(SymbolRegistry,t+="")?SymbolRegistry[t]:SymbolRegistry[t]=$Symbol(t)},keyFor:function(t){if(!isSymbol(t))throw TypeError(t+" is not a symbol");for(var e in SymbolRegistry)if(SymbolRegistry[e]===t)return e},useSetter:function(){USE_SETTER=!0},useSimple:function(){USE_SETTER=!1}}),_export({target:"Object",stat:!0,forced:!nativeSymbol,sham:!descriptors},{create:$create,defineProperty:$defineProperty,defineProperties:$defineProperties,getOwnPropertyDescriptor:$getOwnPropertyDescriptor}),_export({target:"Object",stat:!0,forced:!nativeSymbol},{getOwnPropertyNames:$getOwnPropertyNames,getOwnPropertySymbols:$getOwnPropertySymbols}),JSON&&_export({target:"JSON",stat:!0,forced:!nativeSymbol||fails(function(){var t=$Symbol();return"[null]"!=nativeJSONStringify([t])||"{}"!=nativeJSONStringify({a:t})||"{}"!=nativeJSONStringify(Object(t))})},{stringify:function(t){for(var e,n,r=[t],i=1;arguments.length>i;)r.push(arguments[i++]);if(n=e=r[1],(isObject(e)||void 0!==t)&&!isSymbol(t))return isArray(e)||(e=function(t,e){if("function"==typeof n&&(e=n.call(this,t,e)),!isSymbol(e))return e}),r[1]=e,nativeJSONStringify.apply(JSON,r)}}),$Symbol[PROTOTYPE$1][TO_PRIMITIVE]||hide($Symbol[PROTOTYPE$1],TO_PRIMITIVE,$Symbol[PROTOTYPE$1].valueOf),setToStringTag($Symbol,SYMBOL),hiddenKeys[HIDDEN]=!0,defineWellKnownSymbol("asyncIterator");var defineProperty$2=objectDefineProperty.f,NativeSymbol=global$1.Symbol;if(descriptors&&"function"==typeof NativeSymbol&&(!("description"in NativeSymbol.prototype)||void 0!==NativeSymbol().description)){var EmptyStringDescriptionStore={},SymbolWrapper=function(){var t=arguments.length<1||void 0===arguments[0]?void 0:String(arguments[0]),e=this instanceof SymbolWrapper?new NativeSymbol(t):void 0===t?NativeSymbol():NativeSymbol(t);return""===t&&(EmptyStringDescriptionStore[e]=!0),e};copyConstructorProperties(SymbolWrapper,NativeSymbol);var symbolPrototype=SymbolWrapper.prototype=NativeSymbol.prototype;symbolPrototype.constructor=SymbolWrapper;var symbolToString=symbolPrototype.toString,native="Symbol(test)"==String(NativeSymbol("test")),regexp=/^Symbol\((.*)\)[^)]+$/;defineProperty$2(symbolPrototype,"description",{configurable:!0,get:function(){var t=isObject(this)?this.valueOf():this,e=symbolToString.call(t);if(has(EmptyStringDescriptionStore,t))return"";var n=native?e.slice(7,-1):e.replace(regexp,"$1");return""===n?void 0:n}}),_export({global:!0,forced:!0},{Symbol:SymbolWrapper})}defineWellKnownSymbol("hasInstance"),defineWellKnownSymbol("isConcatSpreadable"),defineWellKnownSymbol("iterator"),defineWellKnownSymbol("match"),defineWellKnownSymbol("replace"),defineWellKnownSymbol("search"),defineWellKnownSymbol("species"),defineWellKnownSymbol("split"),defineWellKnownSymbol("toPrimitive"),defineWellKnownSymbol("toStringTag"),defineWellKnownSymbol("unscopables");var toObject=function(t){return Object(requireObjectCoercible(t))},nativeAssign=Object.assign,objectAssign=!nativeAssign||fails(function(){var t={},e={},n=Symbol();return t[n]=7,"abcdefghijklmnopqrst".split("").forEach(function(t){e[t]=t}),7!=nativeAssign({},t)[n]||"abcdefghijklmnopqrst"!=objectKeys(nativeAssign({},e)).join("")})?function(t,e){for(var n=toObject(t),r=arguments.length,i=1,o=objectGetOwnPropertySymbols.f,s=objectPropertyIsEnumerable.f;r>i;)for(var a,l=indexedObject(arguments[i++]),u=o?objectKeys(l).concat(o(l)):objectKeys(l),c=u.length,h=0;c>h;)s.call(l,a=u[h++])&&(n[a]=l[a]);return n}:nativeAssign;_export({target:"Object",stat:!0,forced:Object.assign!==objectAssign},{assign:objectAssign}),_export({target:"Object",stat:!0,sham:!descriptors},{create:objectCreate}),_export({target:"Object",stat:!0,forced:!descriptors,sham:!descriptors},{defineProperty:objectDefineProperty.f}),_export({target:"Object",stat:!0,forced:!descriptors,sham:!descriptors},{defineProperties:objectDefineProperties});var propertyIsEnumerable=objectPropertyIsEnumerable.f,objectToArray=function(t,e){for(var n,r=toIndexedObject(t),i=objectKeys(r),o=i.length,s=0,a=[];o>s;)propertyIsEnumerable.call(r,n=i[s++])&&a.push(e?[n,r[n]]:r[n]);return a};_export({target:"Object",stat:!0},{entries:function(t){return objectToArray(t,!0)}});var freezing=!fails(function(){return Object.isExtensible(Object.preventExtensions({}))}),internalMetadata=createCommonjsModule(function(t){var e=uid("meta"),n=objectDefineProperty.f,r=0,i=Object.isExtensible||function(){return!0},o=function(t){n(t,e,{value:{objectID:"O"+ ++r,weakData:{}}})},s=t.exports={REQUIRED:!1,fastKey:function(t,n){if(!isObject(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!has(t,e)){if(!i(t))return"F";if(!n)return"E";o(t)}return t[e].objectID},getWeakData:function(t,n){if(!has(t,e)){if(!i(t))return!0;if(!n)return!1;o(t)}return t[e].weakData},onFreeze:function(t){return freezing&&s.REQUIRED&&i(t)&&!has(t,e)&&o(t),t}};hiddenKeys[e]=!0}),internalMetadata_1=internalMetadata.REQUIRED,internalMetadata_2=internalMetadata.fastKey,internalMetadata_3=internalMetadata.getWeakData,internalMetadata_4=internalMetadata.onFreeze,onFreeze=internalMetadata.onFreeze,nativeFreeze=Object.freeze,FAILS_ON_PRIMITIVES=fails(function(){nativeFreeze(1)});_export({target:"Object",stat:!0,forced:FAILS_ON_PRIMITIVES,sham:!freezing},{freeze:function(t){return nativeFreeze&&isObject(t)?nativeFreeze(onFreeze(t)):t}});var iterators={},ITERATOR=wellKnownSymbol("iterator"),ArrayPrototype=Array.prototype,isArrayIteratorMethod=function(t){return void 0!==t&&(iterators.Array===t||ArrayPrototype[ITERATOR]===t)},aFunction=function(t){if("function"!=typeof t)throw TypeError(String(t)+" is not a function");return t},bindContext=function(t,e,n){if(aFunction(t),void 0===e)return t;switch(n){case 0:return function(){return t.call(e)};case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,i){return t.call(e,n,r,i)}}return function(){return t.apply(e,arguments)}},TO_STRING_TAG$1=wellKnownSymbol("toStringTag"),CORRECT_ARGUMENTS="Arguments"==classofRaw(function(){return arguments}()),tryGet=function(t,e){try{return t[e]}catch(t){}},classof=function(t){var e,n,r;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=tryGet(e=Object(t),TO_STRING_TAG$1))?n:CORRECT_ARGUMENTS?classofRaw(e):"Object"==(r=classofRaw(e))&&"function"==typeof e.callee?"Arguments":r},ITERATOR$1=wellKnownSymbol("iterator"),getIteratorMethod=function(t){if(null!=t)return t[ITERATOR$1]||t["@@iterator"]||iterators[classof(t)]},callWithSafeIterationClosing=function(t,e,n,r){try{return r?e(anObject(n)[0],n[1]):e(n)}catch(e){var i=t.return;throw void 0!==i&&anObject(i.call(t)),e}},iterate=createCommonjsModule(function(t){var e={};(t.exports=function(t,n,r,i,o){var s,a,l,u,c,h=bindContext(n,r,i?2:1);if(o)s=t;else{if("function"!=typeof(a=getIteratorMethod(t)))throw TypeError("Target is not iterable");if(isArrayIteratorMethod(a)){for(l=0,u=toLength(t.length);u>l;l++)if((i?h(anObject(c=t[l])[0],c[1]):h(t[l]))===e)return e;return}s=a.call(t)}for(;!(c=s.next()).done;)if(callWithSafeIterationClosing(s,h,c.value,i)===e)return e}).BREAK=e}),createProperty=function(t,e,n){var r=toPrimitive(e);r in t?objectDefineProperty.f(t,r,createPropertyDescriptor(0,n)):t[r]=n};_export({target:"Object",stat:!0},{fromEntries:function(t){var e={};return iterate(t,function(t,n){createProperty(e,t,n)},void 0,!0),e}});var nativeGetOwnPropertyDescriptor$3=objectGetOwnPropertyDescriptor.f,FAILS_ON_PRIMITIVES$1=fails(function(){nativeGetOwnPropertyDescriptor$3(1)}),FORCED=!descriptors||FAILS_ON_PRIMITIVES$1;_export({target:"Object",stat:!0,forced:FORCED,sham:!descriptors},{getOwnPropertyDescriptor:function(t,e){return nativeGetOwnPropertyDescriptor$3(toIndexedObject(t),e)}}),_export({target:"Object",stat:!0,sham:!descriptors},{getOwnPropertyDescriptors:function(t){for(var e,n,r=toIndexedObject(t),i=objectGetOwnPropertyDescriptor.f,o=ownKeys$1(r),s={},a=0;o.length>a;)void 0!==(n=i(r,e=o[a++]))&&createProperty(s,e,n);return s}});var nativeGetOwnPropertyNames$2=objectGetOwnPropertyNamesExternal.f,FAILS_ON_PRIMITIVES$2=fails(function(){Object.getOwnPropertyNames(1)});_export({target:"Object",stat:!0,forced:FAILS_ON_PRIMITIVES$2},{getOwnPropertyNames:nativeGetOwnPropertyNames$2});var correctPrototypeGetter=!fails(function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype}),IE_PROTO$1=sharedKey("IE_PROTO"),ObjectPrototype$1=Object.prototype,objectGetPrototypeOf=correctPrototypeGetter?Object.getPrototypeOf:function(t){return t=toObject(t),has(t,IE_PROTO$1)?t[IE_PROTO$1]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?ObjectPrototype$1:null},FAILS_ON_PRIMITIVES$3=fails(function(){objectGetPrototypeOf(1)});_export({target:"Object",stat:!0,forced:FAILS_ON_PRIMITIVES$3,sham:!correctPrototypeGetter},{getPrototypeOf:function(t){return objectGetPrototypeOf(toObject(t))}});var sameValue=Object.is||function(t,e){return t===e?0!==t||1/t==1/e:t!=t&&e!=e};_export({target:"Object",stat:!0},{is:sameValue});var nativeIsExtensible=Object.isExtensible,FAILS_ON_PRIMITIVES$4=fails(function(){nativeIsExtensible(1)});_export({target:"Object",stat:!0,forced:FAILS_ON_PRIMITIVES$4},{isExtensible:function(t){return!!isObject(t)&&(!nativeIsExtensible||nativeIsExtensible(t))}});var nativeIsFrozen=Object.isFrozen,FAILS_ON_PRIMITIVES$5=fails(function(){nativeIsFrozen(1)});_export({target:"Object",stat:!0,forced:FAILS_ON_PRIMITIVES$5},{isFrozen:function(t){return!isObject(t)||!!nativeIsFrozen&&nativeIsFrozen(t)}});var nativeIsSealed=Object.isSealed,FAILS_ON_PRIMITIVES$6=fails(function(){nativeIsSealed(1)});_export({target:"Object",stat:!0,forced:FAILS_ON_PRIMITIVES$6},{isSealed:function(t){return!isObject(t)||!!nativeIsSealed&&nativeIsSealed(t)}});var FAILS_ON_PRIMITIVES$7=fails(function(){objectKeys(1)});_export({target:"Object",stat:!0,forced:FAILS_ON_PRIMITIVES$7},{keys:function(t){return objectKeys(toObject(t))}});var onFreeze$1=internalMetadata.onFreeze,nativePreventExtensions=Object.preventExtensions,FAILS_ON_PRIMITIVES$8=fails(function(){nativePreventExtensions(1)});_export({target:"Object",stat:!0,forced:FAILS_ON_PRIMITIVES$8,sham:!freezing},{preventExtensions:function(t){return nativePreventExtensions&&isObject(t)?nativePreventExtensions(onFreeze$1(t)):t}});var onFreeze$2=internalMetadata.onFreeze,nativeSeal=Object.seal,FAILS_ON_PRIMITIVES$9=fails(function(){nativeSeal(1)});_export({target:"Object",stat:!0,forced:FAILS_ON_PRIMITIVES$9,sham:!freezing},{seal:function(t){return nativeSeal&&isObject(t)?nativeSeal(onFreeze$2(t)):t}});var validateSetPrototypeOfArguments=function(t,e){if(anObject(t),!isObject(e)&&null!==e)throw TypeError("Can't set "+String(e)+" as a prototype")},objectSetPrototypeOf=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,n={};try{(t=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(n,[]),e=n instanceof Array}catch(t){}return function(n,r){return validateSetPrototypeOfArguments(n,r),e?t.call(n,r):n.__proto__=r,n}}():void 0);_export({target:"Object",stat:!0},{setPrototypeOf:objectSetPrototypeOf}),_export({target:"Object",stat:!0},{values:function(t){return objectToArray(t)}});var TO_STRING_TAG$2=wellKnownSymbol("toStringTag"),test={};test[TO_STRING_TAG$2]="z";var objectToString="[object z]"!==String(test)?function(){return"[object "+classof(this)+"]"}:test.toString,ObjectPrototype$2=Object.prototype;objectToString!==ObjectPrototype$2.toString&&redefine(ObjectPrototype$2,"toString",objectToString,{unsafe:!0});var forcedObjectPrototypeAccessorsMethods=!fails(function(){var t=Math.random();__defineSetter__.call(null,t,function(){}),delete global$1[t]});descriptors&&_export({target:"Object",proto:!0,forced:forcedObjectPrototypeAccessorsMethods},{__defineGetter__:function(t,e){objectDefineProperty.f(toObject(this),t,{get:aFunction(e),enumerable:!0,configurable:!0})}}),descriptors&&_export({target:"Object",proto:!0,forced:forcedObjectPrototypeAccessorsMethods},{__defineSetter__:function(t,e){objectDefineProperty.f(toObject(this),t,{set:aFunction(e),enumerable:!0,configurable:!0})}});var getOwnPropertyDescriptor$1=objectGetOwnPropertyDescriptor.f;descriptors&&_export({target:"Object",proto:!0,forced:forcedObjectPrototypeAccessorsMethods},{__lookupGetter__:function(t){var e,n=toObject(this),r=toPrimitive(t,!0);do{if(e=getOwnPropertyDescriptor$1(n,r))return e.get}while(n=objectGetPrototypeOf(n))}});var getOwnPropertyDescriptor$2=objectGetOwnPropertyDescriptor.f;descriptors&&_export({target:"Object",proto:!0,forced:forcedObjectPrototypeAccessorsMethods},{__lookupSetter__:function(t){var e,n=toObject(this),r=toPrimitive(t,!0);do{if(e=getOwnPropertyDescriptor$2(n,r))return e.set}while(n=objectGetPrototypeOf(n))}});var arraySlice=[].slice,factories={},construct=function(t,e,n){if(!(e in factories)){for(var r=[],i=0;i<e;i++)r[i]="a["+i+"]";factories[e]=Function("C,a","return new C("+r.join(",")+")")}return factories[e](t,n)},functionBind=Function.bind||function(t){var e=aFunction(this),n=arraySlice.call(arguments,1),r=function(){var i=n.concat(arraySlice.call(arguments));return this instanceof r?construct(e,i.length,i):e.apply(t,i)};return isObject(e.prototype)&&(r.prototype=e.prototype),r};_export({target:"Function",proto:!0},{bind:functionBind});var defineProperty$3=objectDefineProperty.f,FunctionPrototype=Function.prototype,FunctionPrototypeToString=FunctionPrototype.toString,nameRE=/^\s*function ([^ (]*)/,NAME="name";!descriptors||NAME in FunctionPrototype||defineProperty$3(FunctionPrototype,NAME,{configurable:!0,get:function(){try{return FunctionPrototypeToString.call(this).match(nameRE)[1]}catch(t){return""}}});var HAS_INSTANCE=wellKnownSymbol("hasInstance"),FunctionPrototype$1=Function.prototype;HAS_INSTANCE in FunctionPrototype$1||objectDefineProperty.f(FunctionPrototype$1,HAS_INSTANCE,{value:function(t){if("function"!=typeof this||!isObject(t))return!1;if(!isObject(this.prototype))return t instanceof this;for(;t=objectGetPrototypeOf(t);)if(this.prototype===t)return!0;return!1}});var ITERATOR$2=wellKnownSymbol("iterator"),SAFE_CLOSING=!1;try{var called=0,iteratorWithReturn={next:function(){return{done:!!called++}},return:function(){SAFE_CLOSING=!0}};iteratorWithReturn[ITERATOR$2]=function(){return this},Array.from(iteratorWithReturn,function(){throw 2})}catch(t){}var checkCorrectnessOfIteration=function(t,e){if(!e&&!SAFE_CLOSING)return!1;var n=!1;try{var r={};r[ITERATOR$2]=function(){return{next:function(){return{done:n=!0}}}},t(r)}catch(t){}return n},arrayFrom=function(t){var e,n,r,i,o=toObject(t),s="function"==typeof this?this:Array,a=arguments.length,l=a>1?arguments[1]:void 0,u=void 0!==l,c=0,h=getIteratorMethod(o);if(u&&(l=bindContext(l,a>2?arguments[2]:void 0,2)),null==h||s==Array&&isArrayIteratorMethod(h))for(n=new s(e=toLength(o.length));e>c;c++)createProperty(n,c,u?l(o[c],c):o[c]);else for(i=h.call(o),n=new s;!(r=i.next()).done;c++)createProperty(n,c,u?callWithSafeIterationClosing(i,l,[r.value,c],!0):r.value);return n.length=c,n},INCORRECT_ITERATION=!checkCorrectnessOfIteration(function(t){Array.from(t)});_export({target:"Array",stat:!0,forced:INCORRECT_ITERATION},{from:arrayFrom}),_export({target:"Array",stat:!0},{isArray:isArray});var ISNT_GENERIC=fails(function(){function t(){}return!(Array.of.call(t)instanceof t)});_export({target:"Array",stat:!0,forced:ISNT_GENERIC},{of:function(){for(var t=0,e=arguments.length,n=new("function"==typeof this?this:Array)(e);e>t;)createProperty(n,t,arguments[t++]);return n.length=e,n}});var SPECIES=wellKnownSymbol("species"),arraySpeciesCreate=function(t,e){var n;return isArray(t)&&("function"!=typeof(n=t.constructor)||n!==Array&&!isArray(n.prototype)?isObject(n)&&null===(n=n[SPECIES])&&(n=void 0):n=void 0),new(void 0===n?Array:n)(0===e?0:e)},SPECIES$1=wellKnownSymbol("species"),arrayMethodHasSpeciesSupport=function(t){return!fails(function(){var e=[];return(e.constructor={})[SPECIES$1]=function(){return{foo:1}},1!==e[t](Boolean).foo})},IS_CONCAT_SPREADABLE=wellKnownSymbol("isConcatSpreadable"),MAX_SAFE_INTEGER=9007199254740991,MAXIMUM_ALLOWED_INDEX_EXCEEDED="Maximum allowed index exceeded",IS_CONCAT_SPREADABLE_SUPPORT=!fails(function(){var t=[];return t[IS_CONCAT_SPREADABLE]=!1,t.concat()[0]!==t}),SPECIES_SUPPORT=arrayMethodHasSpeciesSupport("concat"),isConcatSpreadable=function(t){if(!isObject(t))return!1;var e=t[IS_CONCAT_SPREADABLE];return void 0!==e?!!e:isArray(t)},FORCED$1=!IS_CONCAT_SPREADABLE_SUPPORT||!SPECIES_SUPPORT;_export({target:"Array",proto:!0,forced:FORCED$1},{concat:function(t){var e,n,r,i,o,s=toObject(this),a=arraySpeciesCreate(s,0),l=0;for(e=-1,r=arguments.length;e<r;e++)if(o=-1===e?s:arguments[e],isConcatSpreadable(o)){if(l+(i=toLength(o.length))>MAX_SAFE_INTEGER)throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED);for(n=0;n<i;n++,l++)n in o&&createProperty(a,l,o[n])}else{if(l>=MAX_SAFE_INTEGER)throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED);createProperty(a,l++,o)}return a.length=l,a}});var arrayCopyWithin=[].copyWithin||function(t,e){var n=toObject(this),r=toLength(n.length),i=toAbsoluteIndex(t,r),o=toAbsoluteIndex(e,r),s=arguments.length>2?arguments[2]:void 0,a=Math.min((void 0===s?r:toAbsoluteIndex(s,r))-o,r-i),l=1;for(o<i&&i<o+a&&(l=-1,o+=a-1,i+=a-1);a-- >0;)o in n?n[i]=n[o]:delete n[i],i+=l,o+=l;return n},UNSCOPABLES=wellKnownSymbol("unscopables"),ArrayPrototype$1=Array.prototype;null==ArrayPrototype$1[UNSCOPABLES]&&hide(ArrayPrototype$1,UNSCOPABLES,objectCreate(null));var addToUnscopables=function(t){ArrayPrototype$1[UNSCOPABLES][t]=!0};_export({target:"Array",proto:!0},{copyWithin:arrayCopyWithin}),addToUnscopables("copyWithin");var arrayMethods=function(t,e){var n=1==t,r=2==t,i=3==t,o=4==t,s=6==t,a=5==t||s,l=e||arraySpeciesCreate;return function(e,u,c){for(var h,f,p=toObject(e),d=indexedObject(p),y=bindContext(u,c,3),_=toLength(d.length),m=0,g=n?l(e,_):r?l(e,0):void 0;_>m;m++)if((a||m in d)&&(f=y(h=d[m],m,p),t))if(n)g[m]=f;else if(f)switch(t){case 3:return!0;case 5:return h;case 6:return m;case 2:g.push(h)}else if(o)return!1;return s?-1:i||o?o:g}},sloppyArrayMethod=function(t,e){var n=[][t];return!n||!fails(function(){n.call(null,e||function(){throw 1},1)})},internalEvery=arrayMethods(4),SLOPPY_METHOD=sloppyArrayMethod("every");_export({target:"Array",proto:!0,forced:SLOPPY_METHOD},{every:function(t){return internalEvery(this,t,arguments[1])}});var arrayFill=function(t){for(var e=toObject(this),n=toLength(e.length),r=arguments.length,i=toAbsoluteIndex(r>1?arguments[1]:void 0,n),o=r>2?arguments[2]:void 0,s=void 0===o?n:toAbsoluteIndex(o,n);s>i;)e[i++]=t;return e};_export({target:"Array",proto:!0},{fill:arrayFill}),addToUnscopables("fill");var internalFilter=arrayMethods(2),SPECIES_SUPPORT$1=arrayMethodHasSpeciesSupport("filter");_export({target:"Array",proto:!0,forced:!SPECIES_SUPPORT$1},{filter:function(t){return internalFilter(this,t,arguments[1])}});var internalFind=arrayMethods(5),FIND="find",SKIPS_HOLES=!0;FIND in[]&&Array(1)[FIND](function(){SKIPS_HOLES=!1}),_export({target:"Array",proto:!0,forced:SKIPS_HOLES},{find:function(t){return internalFind(this,t,arguments.length>1?arguments[1]:void 0)}}),addToUnscopables(FIND);var internalFindIndex=arrayMethods(6),FIND_INDEX="findIndex",SKIPS_HOLES$1=!0;FIND_INDEX in[]&&Array(1)[FIND_INDEX](function(){SKIPS_HOLES$1=!1}),_export({target:"Array",proto:!0,forced:SKIPS_HOLES$1},{findIndex:function(t){return internalFindIndex(this,t,arguments.length>1?arguments[1]:void 0)}}),addToUnscopables(FIND_INDEX);var flattenIntoArray=function(t,e,n,r,i,o,s,a){for(var l,u=i,c=0,h=!!s&&bindContext(s,a,3);c<r;){if(c in n){if(l=h?h(n[c],c,e):n[c],o>0&&isArray(l))u=flattenIntoArray(t,e,l,toLength(l.length),u,o-1)-1;else{if(u>=9007199254740991)throw TypeError("Exceed the acceptable array length");t[u]=l}u++}c++}return u},flattenIntoArray_1=flattenIntoArray;_export({target:"Array",proto:!0},{flat:function(){var t=arguments[0],e=toObject(this),n=toLength(e.length),r=arraySpeciesCreate(e,0);return r.length=flattenIntoArray_1(r,e,e,n,0,void 0===t?1:toInteger(t)),r}}),_export({target:"Array",proto:!0},{flatMap:function(t){var e,n=toObject(this),r=toLength(n.length);return aFunction(t),(e=arraySpeciesCreate(n,0)).length=flattenIntoArray_1(e,n,n,r,0,1,t,arguments[1]),e}});var nativeForEach=[].forEach,internalForEach=arrayMethods(0),SLOPPY_METHOD$1=sloppyArrayMethod("forEach"),arrayForEach=SLOPPY_METHOD$1?function(t){return internalForEach(this,t,arguments[1])}:nativeForEach;_export({target:"Array",proto:!0,forced:[].forEach!=arrayForEach},{forEach:arrayForEach});var internalIncludes=arrayIncludes(!0);_export({target:"Array",proto:!0},{includes:function(t){return internalIncludes(this,t,arguments.length>1?arguments[1]:void 0)}}),addToUnscopables("includes");var internalIndexOf=arrayIncludes(!1),nativeIndexOf=[].indexOf,NEGATIVE_ZERO=!!nativeIndexOf&&1/[1].indexOf(1,-0)<0,SLOPPY_METHOD$2=sloppyArrayMethod("indexOf");_export({target:"Array",proto:!0,forced:NEGATIVE_ZERO||SLOPPY_METHOD$2},{indexOf:function(t){return NEGATIVE_ZERO?nativeIndexOf.apply(this,arguments)||0:internalIndexOf(this,t,arguments[1])}});var nativeJoin=[].join,ES3_STRINGS=indexedObject!=Object,SLOPPY_METHOD$3=sloppyArrayMethod("join",",");_export({target:"Array",proto:!0,forced:ES3_STRINGS||SLOPPY_METHOD$3},{join:function(t){return nativeJoin.call(toIndexedObject(this),void 0===t?",":t)}});var nativeLastIndexOf=[].lastIndexOf,NEGATIVE_ZERO$1=!!nativeLastIndexOf&&1/[1].lastIndexOf(1,-0)<0,SLOPPY_METHOD$4=sloppyArrayMethod("lastIndexOf"),arrayLastIndexOf=NEGATIVE_ZERO$1||SLOPPY_METHOD$4?function(t){if(NEGATIVE_ZERO$1)return nativeLastIndexOf.apply(this,arguments)||0;var e=toIndexedObject(this),n=toLength(e.length),r=n-1;for(arguments.length>1&&(r=Math.min(r,toInteger(arguments[1]))),r<0&&(r=n+r);r>=0;r--)if(r in e&&e[r]===t)return r||0;return-1}:nativeLastIndexOf;_export({target:"Array",proto:!0,forced:arrayLastIndexOf!==[].lastIndexOf},{lastIndexOf:arrayLastIndexOf});var internalMap=arrayMethods(1),SPECIES_SUPPORT$2=arrayMethodHasSpeciesSupport("map");_export({target:"Array",proto:!0,forced:!SPECIES_SUPPORT$2},{map:function(t){return internalMap(this,t,arguments[1])}});var arrayReduce=function(t,e,n,r,i){aFunction(e);var o=toObject(t),s=indexedObject(o),a=toLength(o.length),l=i?a-1:0,u=i?-1:1;if(n<2)for(;;){if(l in s){r=s[l],l+=u;break}if(l+=u,i?l<0:a<=l)throw TypeError("Reduce of empty array with no initial value")}for(;i?l>=0:a>l;l+=u)l in s&&(r=e(r,s[l],l,o));return r},SLOPPY_METHOD$5=sloppyArrayMethod("reduce");_export({target:"Array",proto:!0,forced:SLOPPY_METHOD$5},{reduce:function(t){return arrayReduce(this,t,arguments.length,arguments[1],!1)}});var SLOPPY_METHOD$6=sloppyArrayMethod("reduceRight");_export({target:"Array",proto:!0,forced:SLOPPY_METHOD$6},{reduceRight:function(t){return arrayReduce(this,t,arguments.length,arguments[1],!0)}});var nativeReverse=[].reverse,test$1=[1,2];_export({target:"Array",proto:!0,forced:String(test$1)===String(test$1.reverse())},{reverse:function(){return isArray(this)&&(this.length=this.length),nativeReverse.call(this)}});var SPECIES$2=wellKnownSymbol("species"),nativeSlice=[].slice,max$1=Math.max,SPECIES_SUPPORT$3=arrayMethodHasSpeciesSupport("slice");_export({target:"Array",proto:!0,forced:!SPECIES_SUPPORT$3},{slice:function(t,e){var n,r,i,o=toIndexedObject(this),s=toLength(o.length),a=toAbsoluteIndex(t,s),l=toAbsoluteIndex(void 0===e?s:e,s);if(isArray(o)&&("function"!=typeof(n=o.constructor)||n!==Array&&!isArray(n.prototype)?isObject(n)&&null===(n=n[SPECIES$2])&&(n=void 0):n=void 0,n===Array||void 0===n))return nativeSlice.call(o,a,l);for(r=new(void 0===n?Array:n)(max$1(l-a,0)),i=0;a<l;a++,i++)a in o&&createProperty(r,i,o[a]);return r.length=i,r}});var internalSome=arrayMethods(3),SLOPPY_METHOD$7=sloppyArrayMethod("some");_export({target:"Array",proto:!0,forced:SLOPPY_METHOD$7},{some:function(t){return internalSome(this,t,arguments[1])}});var nativeSort=[].sort,test$2=[1,2,3],FAILS_ON_UNDEFINED=fails(function(){test$2.sort(void 0)}),FAILS_ON_NULL=fails(function(){test$2.sort(null)}),SLOPPY_METHOD$8=sloppyArrayMethod("sort"),FORCED$2=FAILS_ON_UNDEFINED||!FAILS_ON_NULL||SLOPPY_METHOD$8;_export({target:"Array",proto:!0,forced:FORCED$2},{sort:function(t){return void 0===t?nativeSort.call(toObject(this)):nativeSort.call(toObject(this),aFunction(t))}});var max$2=Math.max,min$2=Math.min,MAX_SAFE_INTEGER$1=9007199254740991,MAXIMUM_ALLOWED_LENGTH_EXCEEDED="Maximum allowed length exceeded",SPECIES_SUPPORT$4=arrayMethodHasSpeciesSupport("splice");_export({target:"Array",proto:!0,forced:!SPECIES_SUPPORT$4},{splice:function(t,e){var n,r,i,o,s,a,l=toObject(this),u=toLength(l.length),c=toAbsoluteIndex(t,u),h=arguments.length;if(0===h?n=r=0:1===h?(n=0,r=u-c):(n=h-2,r=min$2(max$2(toInteger(e),0),u-c)),u+n-r>MAX_SAFE_INTEGER$1)throw TypeError(MAXIMUM_ALLOWED_LENGTH_EXCEEDED);for(i=arraySpeciesCreate(l,r),o=0;o<r;o++)(s=c+o)in l&&createProperty(i,o,l[s]);if(i.length=r,n<r){for(o=c;o<u-r;o++)a=o+n,(s=o+r)in l?l[a]=l[s]:delete l[a];for(o=u;o>u-r+n;o--)delete l[o-1]}else if(n>r)for(o=u-r;o>c;o--)a=o+n-1,(s=o+r-1)in l?l[a]=l[s]:delete l[a];for(o=0;o<n;o++)l[o+c]=arguments[o+2];return l.length=u-r+n,i}});var aFunction$1=function(t){return"function"==typeof t?t:void 0},getBuiltIn=function(t,e){return arguments.length<2?aFunction$1(path[t])||aFunction$1(global$1[t]):path[t]&&path[t][e]||global$1[t]&&global$1[t][e]},SPECIES$3=wellKnownSymbol("species"),setSpecies=function(t){var e=getBuiltIn(t),n=objectDefineProperty.f;descriptors&&e&&!e[SPECIES$3]&&n(e,SPECIES$3,{configurable:!0,get:function(){return this}})};setSpecies("Array"),addToUnscopables("flat"),addToUnscopables("flatMap");var IteratorPrototype,PrototypeOfArrayIteratorPrototype,arrayIterator,ITERATOR$3=wellKnownSymbol("iterator"),BUGGY_SAFARI_ITERATORS=!1,returnThis=function(){return this};[].keys&&("next"in(arrayIterator=[].keys())?(PrototypeOfArrayIteratorPrototype=objectGetPrototypeOf(objectGetPrototypeOf(arrayIterator)))!==Object.prototype&&(IteratorPrototype=PrototypeOfArrayIteratorPrototype):BUGGY_SAFARI_ITERATORS=!0),null==IteratorPrototype&&(IteratorPrototype={}),has(IteratorPrototype,ITERATOR$3)||hide(IteratorPrototype,ITERATOR$3,returnThis);var iteratorsCore={IteratorPrototype:IteratorPrototype,BUGGY_SAFARI_ITERATORS:BUGGY_SAFARI_ITERATORS},IteratorPrototype$1=iteratorsCore.IteratorPrototype,returnThis$1=function(){return this},createIteratorConstructor=function(t,e,n){var r=e+" Iterator";return t.prototype=objectCreate(IteratorPrototype$1,{next:createPropertyDescriptor(1,n)}),setToStringTag(t,r,!1),iterators[r]=returnThis$1,t},ITERATOR$4=wellKnownSymbol("iterator"),IteratorPrototype$2=iteratorsCore.IteratorPrototype,BUGGY_SAFARI_ITERATORS$1=iteratorsCore.BUGGY_SAFARI_ITERATORS,KEYS="keys",VALUES="values",ENTRIES="entries",returnThis$2=function(){return this},defineIterator=function(t,e,n,r,i,o,s){createIteratorConstructor(n,e,r);var a,l,u,c=function(t){if(t===i&&y)return y;if(!BUGGY_SAFARI_ITERATORS$1&&t in p)return p[t];switch(t){case KEYS:case VALUES:case ENTRIES:return function(){return new n(this,t)}}return function(){return new n(this)}},h=e+" Iterator",f=!1,p=t.prototype,d=p[ITERATOR$4]||p["@@iterator"]||i&&p[i],y=!BUGGY_SAFARI_ITERATORS$1&&d||c(i),_="Array"==e&&p.entries||d;if(_&&(a=objectGetPrototypeOf(_.call(new t)),IteratorPrototype$2!==Object.prototype&&a.next&&(objectGetPrototypeOf(a)!==IteratorPrototype$2&&(objectSetPrototypeOf?objectSetPrototypeOf(a,IteratorPrototype$2):"function"!=typeof a[ITERATOR$4]&&hide(a,ITERATOR$4,returnThis$2)),setToStringTag(a,h,!0))),i==VALUES&&d&&d.name!==VALUES&&(f=!0,y=function(){return d.call(this)}),p[ITERATOR$4]!==y&&hide(p,ITERATOR$4,y),iterators[e]=y,i)if(l={values:c(VALUES),keys:o?y:c(KEYS),entries:c(ENTRIES)},s)for(u in l)!BUGGY_SAFARI_ITERATORS$1&&!f&&u in p||redefine(p,u,l[u]);else _export({target:e,proto:!0,forced:BUGGY_SAFARI_ITERATORS$1||f},l);return l},ARRAY_ITERATOR="Array Iterator",setInternalState$1=internalState.set,getInternalState$1=internalState.getterFor(ARRAY_ITERATOR),es_array_iterator=defineIterator(Array,"Array",function(t,e){setInternalState$1(this,{type:ARRAY_ITERATOR,target:toIndexedObject(t),index:0,kind:e})},function(){var t=getInternalState$1(this),e=t.target,n=t.kind,r=t.index++;return!e||r>=e.length?(t.target=void 0,{value:void 0,done:!0}):"keys"==n?{value:r,done:!1}:"values"==n?{value:e[r],done:!1}:{value:[r,e[r]],done:!1}},"values");iterators.Arguments=iterators.Array,addToUnscopables("keys"),addToUnscopables("values"),addToUnscopables("entries");var fromCharCode=String.fromCharCode,nativeFromCodePoint=String.fromCodePoint,INCORRECT_LENGTH=!!nativeFromCodePoint&&1!=nativeFromCodePoint.length;_export({target:"String",stat:!0,forced:INCORRECT_LENGTH},{fromCodePoint:function(t){for(var e,n=[],r=arguments.length,i=0;r>i;){if(e=+arguments[i++],toAbsoluteIndex(e,1114111)!==e)throw RangeError(e+" is not a valid code point");n.push(e<65536?fromCharCode(e):fromCharCode(55296+((e-=65536)>>10),e%1024+56320))}return n.join("")}}),_export({target:"String",stat:!0},{raw:function(t){for(var e=toIndexedObject(t.raw),n=toLength(e.length),r=arguments.length,i=[],o=0;n>o;)i.push(String(e[o++])),o<r&&i.push(String(arguments[o]));return i.join("")}});var stringAt=function(t,e,n){var r,i,o=String(requireObjectCoercible(t)),s=toInteger(e),a=o.length;return s<0||s>=a?n?"":void 0:(r=o.charCodeAt(s))<55296||r>56319||s+1===a||(i=o.charCodeAt(s+1))<56320||i>57343?n?o.charAt(s):r:n?o.slice(s,s+2):i-56320+(r-55296<<10)+65536};_export({target:"String",proto:!0},{codePointAt:function(t){return stringAt(this,t)}});var MATCH=wellKnownSymbol("match"),isRegexp=function(t){var e;return isObject(t)&&(void 0!==(e=t[MATCH])?!!e:"RegExp"==classofRaw(t))},validateStringMethodArguments=function(t,e,n){if(isRegexp(e))throw TypeError("String.prototype."+n+" doesn't accept regex");return String(requireObjectCoercible(t))},MATCH$1=wellKnownSymbol("match"),correctIsRegexpLogic=function(t){var e=/./;try{"/./"[t](e)}catch(n){try{return e[MATCH$1]=!1,"/./"[t](e)}catch(t){}}return!1},ENDS_WITH="endsWith",nativeEndsWith=""[ENDS_WITH],min$3=Math.min,CORRECT_IS_REGEXP_LOGIC=correctIsRegexpLogic(ENDS_WITH);_export({target:"String",proto:!0,forced:!CORRECT_IS_REGEXP_LOGIC},{endsWith:function(t){var e=validateStringMethodArguments(this,t,ENDS_WITH),n=arguments.length>1?arguments[1]:void 0,r=toLength(e.length),i=void 0===n?r:min$3(toLength(n),r),o=String(t);return nativeEndsWith?nativeEndsWith.call(e,o,i):e.slice(i-o.length,i)===o}});var INCLUDES="includes",CORRECT_IS_REGEXP_LOGIC$1=correctIsRegexpLogic(INCLUDES);_export({target:"String",proto:!0,forced:!CORRECT_IS_REGEXP_LOGIC$1},{includes:function(t){return!!~validateStringMethodArguments(this,t,INCLUDES).indexOf(t,arguments.length>1?arguments[1]:void 0)}});var advanceStringIndex=function(t,e,n){return e+(n?stringAt(t,e,!0).length:1)},regexpFlags=function(){var t=anObject(this),e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e},nativeExec=RegExp.prototype.exec,nativeReplace=String.prototype.replace,patchedExec=nativeExec,UPDATES_LAST_INDEX_WRONG=function(){var t=/a/,e=/b*/g;return nativeExec.call(t,"a"),nativeExec.call(e,"a"),0!==t.lastIndex||0!==e.lastIndex}(),NPCG_INCLUDED=void 0!==/()??/.exec("")[1],PATCH=UPDATES_LAST_INDEX_WRONG||NPCG_INCLUDED;PATCH&&(patchedExec=function(t){var e,n,r,i,o=this;return NPCG_INCLUDED&&(n=new RegExp("^"+o.source+"$(?!\\s)",regexpFlags.call(o))),UPDATES_LAST_INDEX_WRONG&&(e=o.lastIndex),r=nativeExec.call(o,t),UPDATES_LAST_INDEX_WRONG&&r&&(o.lastIndex=o.global?r.index+r[0].length:e),NPCG_INCLUDED&&r&&r.length>1&&nativeReplace.call(r[0],n,function(){for(i=1;i<arguments.length-2;i++)void 0===arguments[i]&&(r[i]=void 0)}),r});var regexpExec=patchedExec,regexpExecAbstract=function(t,e){var n=t.exec;if("function"==typeof n){var r=n.call(t,e);if("object"!=typeof r)throw TypeError("RegExp exec method returned something other than an Object or null");return r}if("RegExp"!==classofRaw(t))throw TypeError("RegExp#exec called on incompatible receiver");return regexpExec.call(t,e)},SPECIES$4=wellKnownSymbol("species"),REPLACE_SUPPORTS_NAMED_GROUPS=!fails(function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")}),SPLIT_WORKS_WITH_OVERWRITTEN_EXEC=!fails(function(){var t=/(?:)/,e=t.exec;t.exec=function(){return e.apply(this,arguments)};var n="ab".split(t);return 2!==n.length||"a"!==n[0]||"b"!==n[1]}),fixRegexpWellKnownSymbolLogic=function(t,e,n,r){var i=wellKnownSymbol(t),o=!fails(function(){var e={};return e[i]=function(){return 7},7!=""[t](e)}),s=o&&!fails(function(){var e=!1,n=/a/;return n.exec=function(){return e=!0,null},"split"===t&&(n.constructor={},n.constructor[SPECIES$4]=function(){return n}),n[i](""),!e});if(!o||!s||"replace"===t&&!REPLACE_SUPPORTS_NAMED_GROUPS||"split"===t&&!SPLIT_WORKS_WITH_OVERWRITTEN_EXEC){var a=/./[i],l=n(i,""[t],function(t,e,n,r,i){return e.exec===regexpExec?o&&!i?{done:!0,value:a.call(e,n,r)}:{done:!0,value:t.call(n,e,r)}:{done:!1}}),u=l[0],c=l[1];redefine(String.prototype,t,u),redefine(RegExp.prototype,i,2==e?function(t,e){return c.call(t,this,e)}:function(t){return c.call(t,this)}),r&&hide(RegExp.prototype[i],"sham",!0)}};fixRegexpWellKnownSymbolLogic("match",1,function(t,e,n){return[function(e){var n=requireObjectCoercible(this),r=null==e?void 0:e[t];return void 0!==r?r.call(e,n):new RegExp(e)[t](String(n))},function(t){var r=n(e,t,this);if(r.done)return r.value;var i=anObject(t),o=String(this);if(!i.global)return regexpExecAbstract(i,o);var s=i.unicode;i.lastIndex=0;for(var a,l=[],u=0;null!==(a=regexpExecAbstract(i,o));){var c=String(a[0]);l[u]=c,""===c&&(i.lastIndex=advanceStringIndex(o,toLength(i.lastIndex),s)),u++}return 0===u?null:l}]});var stringRepeat="".repeat||function(t){var e=String(requireObjectCoercible(this)),n="",r=toInteger(t);if(r<0||r==1/0)throw RangeError("Wrong number of repetitions");for(;r>0;(r>>>=1)&&(e+=e))1&r&&(n+=e);return n},stringPad=function(t,e,n,r){var i,o,s=String(requireObjectCoercible(t)),a=s.length,l=void 0===n?" ":String(n),u=toLength(e);return u<=a||""==l?s:(i=u-a,(o=stringRepeat.call(l,Math.ceil(i/l.length))).length>i&&(o=o.slice(0,i)),r?o+s:s+o)},navigator$1=global$1.navigator,userAgent=navigator$1&&navigator$1.userAgent||"",webkitStringPadBug=/Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(userAgent);_export({target:"String",proto:!0,forced:webkitStringPadBug},{padEnd:function(t){return stringPad(this,t,arguments.length>1?arguments[1]:void 0,!1)}}),_export({target:"String",proto:!0,forced:webkitStringPadBug},{padStart:function(t){return stringPad(this,t,arguments.length>1?arguments[1]:void 0,!0)}}),_export({target:"String",proto:!0},{repeat:stringRepeat});var max$3=Math.max,min$4=Math.min,floor$1=Math.floor,SUBSTITUTION_SYMBOLS=/\$([$&`']|\d\d?|<[^>]*>)/g,SUBSTITUTION_SYMBOLS_NO_NAMED=/\$([$&`']|\d\d?)/g,maybeToString=function(t){return void 0===t?t:String(t)};fixRegexpWellKnownSymbolLogic("replace",2,function(t,e,n){return[function(n,r){var i=requireObjectCoercible(this),o=null==n?void 0:n[t];return void 0!==o?o.call(n,i,r):e.call(String(i),n,r)},function(t,i){var o=n(e,t,this,i);if(o.done)return o.value;var s=anObject(t),a=String(this),l="function"==typeof i;l||(i=String(i));var u=s.global;if(u){var c=s.unicode;s.lastIndex=0}for(var h=[];;){var f=regexpExecAbstract(s,a);if(null===f)break;if(h.push(f),!u)break;""===String(f[0])&&(s.lastIndex=advanceStringIndex(a,toLength(s.lastIndex),c))}for(var p="",d=0,y=0;y<h.length;y++){f=h[y];for(var _=String(f[0]),m=max$3(min$4(toInteger(f.index),a.length),0),g=[],v=1;v<f.length;v++)g.push(maybeToString(f[v]));var P=f.groups;if(l){var b=[_].concat(g,m,a);void 0!==P&&b.push(P);var S=String(i.apply(void 0,b))}else S=r(_,a,m,g,P,i);m>=d&&(p+=a.slice(d,m)+S,d=m+_.length)}return p+a.slice(d)}];function r(t,n,r,i,o,s){var a=r+t.length,l=i.length,u=SUBSTITUTION_SYMBOLS_NO_NAMED;return void 0!==o&&(o=toObject(o),u=SUBSTITUTION_SYMBOLS),e.call(s,u,function(e,s){var u;switch(s.charAt(0)){case"$":return"$";case"&":return t;case"`":return n.slice(0,r);case"'":return n.slice(a);case"<":u=o[s.slice(1,-1)];break;default:var c=+s;if(0===c)return e;if(c>l){var h=floor$1(c/10);return 0===h?e:h<=l?void 0===i[h-1]?s.charAt(1):i[h-1]+s.charAt(1):e}u=i[c-1]}return void 0===u?"":u})}}),fixRegexpWellKnownSymbolLogic("search",1,function(t,e,n){return[function(e){var n=requireObjectCoercible(this),r=null==e?void 0:e[t];return void 0!==r?r.call(e,n):new RegExp(e)[t](String(n))},function(t){var r=n(e,t,this);if(r.done)return r.value;var i=anObject(t),o=String(this),s=i.lastIndex;sameValue(s,0)||(i.lastIndex=0);var a=regexpExecAbstract(i,o);return sameValue(i.lastIndex,s)||(i.lastIndex=s),null===a?-1:a.index}]});var SPECIES$5=wellKnownSymbol("species"),speciesConstructor=function(t,e){var n,r=anObject(t).constructor;return void 0===r||null==(n=anObject(r)[SPECIES$5])?e:aFunction(n)},arrayPush=[].push,min$5=Math.min,MAX_UINT32=4294967295,SUPPORTS_Y=!fails(function(){return!RegExp(MAX_UINT32,"y")});fixRegexpWellKnownSymbolLogic("split",2,function(t,e,n){var r;return r="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(t,n){var r=String(requireObjectCoercible(this)),i=void 0===n?MAX_UINT32:n>>>0;if(0===i)return[];if(void 0===t)return[r];if(!isRegexp(t))return e.call(r,t,i);for(var o,s,a,l=[],u=(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.unicode?"u":"")+(t.sticky?"y":""),c=0,h=new RegExp(t.source,u+"g");(o=regexpExec.call(h,r))&&!((s=h.lastIndex)>c&&(l.push(r.slice(c,o.index)),o.length>1&&o.index<r.length&&arrayPush.apply(l,o.slice(1)),a=o[0].length,c=s,l.length>=i));)h.lastIndex===o.index&&h.lastIndex++;return c===r.length?!a&&h.test("")||l.push(""):l.push(r.slice(c)),l.length>i?l.slice(0,i):l}:"0".split(void 0,0).length?function(t,n){return void 0===t&&0===n?[]:e.call(this,t,n)}:e,[function(e,n){var i=requireObjectCoercible(this),o=null==e?void 0:e[t];return void 0!==o?o.call(e,i,n):r.call(String(i),e,n)},function(t,i){var o=n(r,t,this,i,r!==e);if(o.done)return o.value;var s=anObject(t),a=String(this),l=speciesConstructor(s,RegExp),u=s.unicode,c=(s.ignoreCase?"i":"")+(s.multiline?"m":"")+(s.unicode?"u":"")+(SUPPORTS_Y?"y":"g"),h=new l(SUPPORTS_Y?s:"^(?:"+s.source+")",c),f=void 0===i?MAX_UINT32:i>>>0;if(0===f)return[];if(0===a.length)return null===regexpExecAbstract(h,a)?[a]:[];for(var p=0,d=0,y=[];d<a.length;){h.lastIndex=SUPPORTS_Y?d:0;var _,m=regexpExecAbstract(h,SUPPORTS_Y?a:a.slice(d));if(null===m||(_=min$5(toLength(h.lastIndex+(SUPPORTS_Y?0:d)),a.length))===p)d=advanceStringIndex(a,d,u);else{if(y.push(a.slice(p,d)),y.length===f)return y;for(var g=1;g<=m.length-1;g++)if(y.push(m[g]),y.length===f)return y;d=p=_}}return y.push(a.slice(p)),y}]},!SUPPORTS_Y);var STARTS_WITH="startsWith",CORRECT_IS_REGEXP_LOGIC$2=correctIsRegexpLogic(STARTS_WITH),nativeStartsWith=""[STARTS_WITH];_export({target:"String",proto:!0,forced:!CORRECT_IS_REGEXP_LOGIC$2},{startsWith:function(t){var e=validateStringMethodArguments(this,t,STARTS_WITH),n=toLength(Math.min(arguments.length>1?arguments[1]:void 0,e.length)),r=String(t);return nativeStartsWith?nativeStartsWith.call(e,r,n):e.slice(n,n+r.length)===r}});var whitespaces="\t\n\v\f\r \u2028\u2029\ufeff",whitespace="["+whitespaces+"]",ltrim=RegExp("^"+whitespace+whitespace+"*"),rtrim=RegExp(whitespace+whitespace+"*$"),stringTrim=function(t,e){return t=String(requireObjectCoercible(t)),1&e&&(t=t.replace(ltrim,"")),2&e&&(t=t.replace(rtrim,"")),t},non="
",forcedStringTrimMethod=function(t){return fails(function(){return!!whitespaces[t]()||non[t]()!=non||whitespaces[t].name!==t})},FORCED$3=forcedStringTrimMethod("trim");_export({target:"String",proto:!0,forced:FORCED$3},{trim:function(){return stringTrim(this,3)}});var FORCED$4=forcedStringTrimMethod("trimStart"),trimStart=FORCED$4?function(){return stringTrim(this,1)}:"".trimStart;_export({target:"String",proto:!0,forced:FORCED$4},{trimStart:trimStart,trimLeft:trimStart});var FORCED$5=forcedStringTrimMethod("trimEnd"),trimEnd=FORCED$5?function(){return stringTrim(this,2)}:"".trimEnd;_export({target:"String",proto:!0,forced:FORCED$5},{trimEnd:trimEnd,trimRight:trimEnd});var STRING_ITERATOR="String Iterator",setInternalState$2=internalState.set,getInternalState$2=internalState.getterFor(STRING_ITERATOR);defineIterator(String,"String",function(t){setInternalState$2(this,{type:STRING_ITERATOR,string:String(t),index:0})},function(){var t,e=getInternalState$2(this),n=e.string,r=e.index;return r>=n.length?{value:void 0,done:!0}:(t=stringAt(n,r,!0),e.index+=t.length,{value:t,done:!1})});var quot=/"/g,createHtml=function(t,e,n,r){var i=String(requireObjectCoercible(t)),o="<"+e;return""!==n&&(o+=" "+n+'="'+String(r).replace(quot,""")+'"'),o+">"+i+"</"+e+">"},forcedStringHtmlMethod=function(t){return fails(function(){var e=""[t]('"');return e!==e.toLowerCase()||e.split('"').length>3})},FORCED$6=forcedStringHtmlMethod("anchor");_export({target:"String",proto:!0,forced:FORCED$6},{anchor:function(t){return createHtml(this,"a","name",t)}});var FORCED$7=forcedStringHtmlMethod("big");_export({target:"String",proto:!0,forced:FORCED$7},{big:function(){return createHtml(this,"big","","")}});var FORCED$8=forcedStringHtmlMethod("blink");_export({target:"String",proto:!0,forced:FORCED$8},{blink:function(){return createHtml(this,"blink","","")}});var FORCED$9=forcedStringHtmlMethod("bold");_export({target:"String",proto:!0,forced:FORCED$9},{bold:function(){return createHtml(this,"b","","")}});var FORCED$a=forcedStringHtmlMethod("fixed");_export({target:"String",proto:!0,forced:FORCED$a},{fixed:function(){return createHtml(this,"tt","","")}});var FORCED$b=forcedStringHtmlMethod("fontcolor");_export({target:"String",proto:!0,forced:FORCED$b},{fontcolor:function(t){return createHtml(this,"font","color",t)}});var FORCED$c=forcedStringHtmlMethod("fontsize");_export({target:"String",proto:!0,forced:FORCED$c},{fontsize:function(t){return createHtml(this,"font","size",t)}});var FORCED$d=forcedStringHtmlMethod("italics");_export({target:"String",proto:!0,forced:FORCED$d},{italics:function(){return createHtml(this,"i","","")}});var FORCED$e=forcedStringHtmlMethod("link");_export({target:"String",proto:!0,forced:FORCED$e},{link:function(t){return createHtml(this,"a","href",t)}});var FORCED$f=forcedStringHtmlMethod("small");_export({target:"String",proto:!0,forced:FORCED$f},{small:function(){return createHtml(this,"small","","")}});var FORCED$g=forcedStringHtmlMethod("strike");_export({target:"String",proto:!0,forced:FORCED$g},{strike:function(){return createHtml(this,"strike","","")}});var FORCED$h=forcedStringHtmlMethod("sub");_export({target:"String",proto:!0,forced:FORCED$h},{sub:function(){return createHtml(this,"sub","","")}});var FORCED$i=forcedStringHtmlMethod("sup");_export({target:"String",proto:!0,forced:FORCED$i},{sup:function(){return createHtml(this,"sup","","")}});var inheritIfRequired=function(t,e,n){var r,i=e.constructor;return i!==n&&"function"==typeof i&&(r=i.prototype)!==n.prototype&&isObject(r)&&objectSetPrototypeOf&&objectSetPrototypeOf(t,r),t},MATCH$2=wellKnownSymbol("match"),defineProperty$4=objectDefineProperty.f,getOwnPropertyNames=objectGetOwnPropertyNames.f,NativeRegExp=global$1.RegExp,RegExpPrototype=NativeRegExp.prototype,re1=/a/g,re2=/a/g,CORRECT_NEW=new NativeRegExp(re1)!==re1,FORCED$j=isForced_1("RegExp",descriptors&&(!CORRECT_NEW||fails(function(){return re2[MATCH$2]=!1,NativeRegExp(re1)!=re1||NativeRegExp(re2)==re2||"/a/i"!=NativeRegExp(re1,"i")})));if(FORCED$j){for(var RegExpWrapper=function(t,e){var n=this instanceof RegExpWrapper,r=isRegexp(t),i=void 0===e;return!n&&r&&t.constructor===RegExpWrapper&&i?t:inheritIfRequired(CORRECT_NEW?new NativeRegExp(r&&!i?t.source:t,e):NativeRegExp((r=t instanceof RegExpWrapper)?t.source:t,r&&i?regexpFlags.call(t):e),n?this:RegExpPrototype,RegExpWrapper)},proxy=function(t){t in RegExpWrapper||defineProperty$4(RegExpWrapper,t,{configurable:!0,get:function(){return NativeRegExp[t]},set:function(e){NativeRegExp[t]=e}})},keys=getOwnPropertyNames(NativeRegExp),i=0;i<keys.length;)proxy(keys[i++]);RegExpPrototype.constructor=RegExpWrapper,RegExpWrapper.prototype=RegExpPrototype,redefine(global$1,"RegExp",RegExpWrapper)}setSpecies("RegExp"),_export({target:"RegExp",proto:!0,forced:/./.exec!==regexpExec},{exec:regexpExec}),descriptors&&"g"!=/./g.flags&&objectDefineProperty.f(RegExp.prototype,"flags",{configurable:!0,get:regexpFlags});var TO_STRING="toString",nativeToString=/./[TO_STRING],NOT_GENERIC=fails(function(){return"/a/b"!=nativeToString.call({source:"a",flags:"b"})}),INCORRECT_NAME=nativeToString.name!=TO_STRING;(NOT_GENERIC||INCORRECT_NAME)&&redefine(RegExp.prototype,TO_STRING,function(){var t=anObject(this);return"/".concat(t.source,"/","flags"in t?t.flags:!descriptors&&t instanceof RegExp?regexpFlags.call(t):void 0)},{unsafe:!0});var nativeParseInt=global$1.parseInt,hex=/^[-+]?0[xX]/,FORCED$k=8!==nativeParseInt(whitespaces+"08")||22!==nativeParseInt(whitespaces+"0x16"),_parseInt=FORCED$k?function(t,e){var n=stringTrim(String(t),3);return nativeParseInt(n,e>>>0||(hex.test(n)?16:10))}:nativeParseInt;_export({global:!0,forced:parseInt!=_parseInt},{parseInt:_parseInt});var nativeParseFloat=global$1.parseFloat,FORCED$l=1/nativeParseFloat(whitespaces+"-0")!=-1/0,_parseFloat=FORCED$l?function(t){var e=stringTrim(String(t),3),n=nativeParseFloat(e);return 0===n&&"-"==e.charAt(0)?-0:n}:nativeParseFloat;_export({global:!0,forced:parseFloat!=_parseFloat},{parseFloat:_parseFloat});var getOwnPropertyNames$1=objectGetOwnPropertyNames.f,getOwnPropertyDescriptor$3=objectGetOwnPropertyDescriptor.f,defineProperty$5=objectDefineProperty.f,NUMBER="Number",NativeNumber=global$1[NUMBER],NumberPrototype=NativeNumber.prototype,BROKEN_CLASSOF=classofRaw(objectCreate(NumberPrototype))==NUMBER,NATIVE_TRIM="trim"in String.prototype,toNumber=function(t){var e,n,r,i,o,s,a,l,u=toPrimitive(t,!1);if("string"==typeof u&&u.length>2)if(43===(e=(u=NATIVE_TRIM?u.trim():stringTrim(u,3)).charCodeAt(0))||45===e){if(88===(n=u.charCodeAt(2))||120===n)return NaN}else if(48===e){switch(u.charCodeAt(1)){case 66:case 98:r=2,i=49;break;case 79:case 111:r=8,i=55;break;default:return+u}for(s=(o=u.slice(2)).length,a=0;a<s;a++)if((l=o.charCodeAt(a))<48||l>i)return NaN;return parseInt(o,r)}return+u};if(isForced_1(NUMBER,!NativeNumber(" 0o1")||!NativeNumber("0b1")||NativeNumber("+0x1"))){for(var key,NumberWrapper=function(t){var e=arguments.length<1?0:t,n=this;return n instanceof NumberWrapper&&(BROKEN_CLASSOF?fails(function(){NumberPrototype.valueOf.call(n)}):classofRaw(n)!=NUMBER)?inheritIfRequired(new NativeNumber(toNumber(e)),n,NumberWrapper):toNumber(e)},keys$1=descriptors?getOwnPropertyNames$1(NativeNumber):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),j=0;keys$1.length>j;j++)has(NativeNumber,key=keys$1[j])&&!has(NumberWrapper,key)&&defineProperty$5(NumberWrapper,key,getOwnPropertyDescriptor$3(NativeNumber,key));NumberWrapper.prototype=NumberPrototype,NumberPrototype.constructor=NumberWrapper,redefine(global$1,NUMBER,NumberWrapper)}_export({target:"Number",stat:!0},{EPSILON:Math.pow(2,-52)});var globalIsFinite=global$1.isFinite,numberIsFinite=Number.isFinite||function(t){return"number"==typeof t&&globalIsFinite(t)};_export({target:"Number",stat:!0},{isFinite:numberIsFinite});var floor$2=Math.floor,isInteger=function(t){return!isObject(t)&&isFinite(t)&&floor$2(t)===t};_export({target:"Number",stat:!0},{isInteger:isInteger}),_export({target:"Number",stat:!0},{isNaN:function(t){return t!=t}});var abs=Math.abs;_export({target:"Number",stat:!0},{isSafeInteger:function(t){return isInteger(t)&&abs(t)<=9007199254740991}}),_export({target:"Number",stat:!0},{MAX_SAFE_INTEGER:9007199254740991}),_export({target:"Number",stat:!0},{MIN_SAFE_INTEGER:-9007199254740991}),_export({target:"Number",stat:!0,forced:Number.parseFloat!=_parseFloat},{parseFloat:_parseFloat}),_export({target:"Number",stat:!0,forced:Number.parseInt!=_parseInt},{parseInt:_parseInt});var thisNumberValue=function(t){if("number"!=typeof t&&"Number"!=classofRaw(t))throw TypeError("Incorrect invocation");return+t},nativeToFixed=1..toFixed,floor$3=Math.floor,data$1=[0,0,0,0,0,0],multiply=function(t,e){for(var n=-1,r=e;++n<6;)r+=t*data$1[n],data$1[n]=r%1e7,r=floor$3(r/1e7)},divide=function(t){for(var e=6,n=0;--e>=0;)n+=data$1[e],data$1[e]=floor$3(n/t),n=n%t*1e7},numToString=function(){for(var t=6,e="";--t>=0;)if(""!==e||0===t||0!==data$1[t]){var n=String(data$1[t]);e=""===e?n:e+stringRepeat.call("0",7-n.length)+n}return e},pow=function(t,e,n){return 0===e?n:e%2==1?pow(t,e-1,n*t):pow(t*t,e/2,n)},log=function(t){for(var e=0,n=t;n>=4096;)e+=12,n/=4096;for(;n>=2;)e+=1,n/=2;return e};_export({target:"Number",proto:!0,forced:nativeToFixed&&("0.000"!==8e-5.toFixed(3)||"1"!==.9.toFixed(0)||"1.25"!==1.255.toFixed(2)||"1000000000000000128"!==(0xde0b6b3a7640080).toFixed(0))||!fails(function(){nativeToFixed.call({})})},{toFixed:function(t){var e,n,r,i,o=thisNumberValue(this),s=toInteger(t),a="",l="0";if(s<0||s>20)throw RangeError("Incorrect fraction digits");if(o!=o)return"NaN";if(o<=-1e21||o>=1e21)return String(o);if(o<0&&(a="-",o=-o),o>1e-21)if(n=(e=log(o*pow(2,69,1))-69)<0?o*pow(2,-e,1):o/pow(2,e,1),n*=4503599627370496,(e=52-e)>0){for(multiply(0,n),r=s;r>=7;)multiply(1e7,0),r-=7;for(multiply(pow(10,r,1),0),r=e-1;r>=23;)divide(1<<23),r-=23;divide(1<<r),multiply(1,1),divide(2),l=numToString()}else multiply(0,n),multiply(1<<-e,0),l=numToString()+stringRepeat.call("0",s);return l=s>0?a+((i=l.length)<=s?"0."+stringRepeat.call("0",s-i)+l:l.slice(0,i-s)+"."+l.slice(i-s)):a+l}});var nativeToPrecision=1..toPrecision;_export({target:"Number",proto:!0,forced:fails(function(){return"1"!==nativeToPrecision.call(1,void 0)})||!fails(function(){nativeToPrecision.call({})})},{toPrecision:function(t){return void 0===t?nativeToPrecision.call(thisNumberValue(this)):nativeToPrecision.call(thisNumberValue(this),t)}});var mathLog1p=Math.log1p||function(t){return(t=+t)>-1e-8&&t<1e-8?t-t*t/2:Math.log(1+t)},nativeAcosh=Math.acosh,log$1=Math.log,sqrt=Math.sqrt,LN2=Math.LN2,FORCED$m=!nativeAcosh||710!=Math.floor(nativeAcosh(Number.MAX_VALUE))||nativeAcosh(1/0)!=1/0;_export({target:"Math",stat:!0,forced:FORCED$m},{acosh:function(t){return(t=+t)<1?NaN:t>94906265.62425156?log$1(t)+LN2:mathLog1p(t-1+sqrt(t-1)*sqrt(t+1))}});var nativeAsinh=Math.asinh,log$2=Math.log,sqrt$1=Math.sqrt;function asinh(t){return isFinite(t=+t)&&0!=t?t<0?-asinh(-t):log$2(t+sqrt$1(t*t+1)):t}_export({target:"Math",stat:!0,forced:!(nativeAsinh&&1/nativeAsinh(0)>0)},{asinh:asinh});var nativeAtanh=Math.atanh,log$3=Math.log;_export({target:"Math",stat:!0,forced:!(nativeAtanh&&1/nativeAtanh(-0)<0)},{atanh:function(t){return 0==(t=+t)?t:log$3((1+t)/(1-t))/2}});var mathSign=Math.sign||function(t){return 0==(t=+t)||t!=t?t:t<0?-1:1},abs$1=Math.abs,pow$1=Math.pow;_export({target:"Math",stat:!0},{cbrt:function(t){return mathSign(t=+t)*pow$1(abs$1(t),1/3)}});var floor$4=Math.floor,log$4=Math.log,LOG2E=Math.LOG2E;_export({target:"Math",stat:!0},{clz32:function(t){return(t>>>=0)?31-floor$4(log$4(t+.5)*LOG2E):32}});var nativeExpm1=Math.expm1,mathExpm1=!nativeExpm1||nativeExpm1(10)>22025.465794806718||nativeExpm1(10)<22025.465794806718||-2e-17!=nativeExpm1(-2e-17)?function(t){return 0==(t=+t)?t:t>-1e-6&&t<1e-6?t+t*t/2:Math.exp(t)-1}:nativeExpm1,nativeCosh=Math.cosh,abs$2=Math.abs,E=Math.E;_export({target:"Math",stat:!0,forced:!nativeCosh||nativeCosh(710)===1/0},{cosh:function(t){var e=mathExpm1(abs$2(t)-1)+1;return(e+1/(e*E*E))*(E/2)}}),_export({target:"Math",stat:!0,forced:mathExpm1!=Math.expm1},{expm1:mathExpm1});var pow$2=Math.pow,EPSILON=pow$2(2,-52),EPSILON32=pow$2(2,-23),MAX32=pow$2(2,127)*(2-EPSILON32),MIN32=pow$2(2,-126),roundTiesToEven=function(t){return t+1/EPSILON-1/EPSILON},mathFround=Math.fround||function(t){var e,n,r=Math.abs(t),i=mathSign(t);return r<MIN32?i*roundTiesToEven(r/MIN32/EPSILON32)*MIN32*EPSILON32:(n=(e=(1+EPSILON32/EPSILON)*r)-(e-r))>MAX32||n!=n?i*(1/0):i*n};_export({target:"Math",stat:!0},{fround:mathFround});var abs$3=Math.abs,sqrt$2=Math.sqrt;_export({target:"Math",stat:!0},{hypot:function(t,e){for(var n,r,i=0,o=0,s=arguments.length,a=0;o<s;)a<(n=abs$3(arguments[o++]))?(i=i*(r=a/n)*r+1,a=n):i+=n>0?(r=n/a)*r:n;return a===1/0?1/0:a*sqrt$2(i)}});var nativeImul=Math.imul,FORCED$n=fails(function(){return-5!=nativeImul(4294967295,5)||2!=nativeImul.length});_export({target:"Math",stat:!0,forced:FORCED$n},{imul:function(t,e){var n=+t,r=+e,i=65535&n,o=65535&r;return 0|i*o+((65535&n>>>16)*o+i*(65535&r>>>16)<<16>>>0)}});var log$5=Math.log,LOG10E=Math.LOG10E;_export({target:"Math",stat:!0},{log10:function(t){return log$5(t)*LOG10E}}),_export({target:"Math",stat:!0},{log1p:mathLog1p});var log$6=Math.log,LN2$1=Math.LN2;_export({target:"Math",stat:!0},{log2:function(t){return log$6(t)/LN2$1}}),_export({target:"Math",stat:!0},{sign:mathSign});var abs$4=Math.abs,exp=Math.exp,E$1=Math.E,FORCED$o=fails(function(){return-2e-17!=Math.sinh(-2e-17)});_export({target:"Math",stat:!0,forced:FORCED$o},{sinh:function(t){return abs$4(t=+t)<1?(mathExpm1(t)-mathExpm1(-t))/2:(exp(t-1)-exp(-t-1))*(E$1/2)}});var exp$1=Math.exp;_export({target:"Math",stat:!0},{tanh:function(t){var e=mathExpm1(t=+t),n=mathExpm1(-t);return e==1/0?1:n==1/0?-1:(e-n)/(exp$1(t)+exp$1(-t))}}),setToStringTag(Math,"Math",!0);var ceil$1=Math.ceil,floor$5=Math.floor;_export({target:"Math",stat:!0},{trunc:function(t){return(t>0?floor$5:ceil$1)(t)}}),_export({target:"Date",stat:!0},{now:function(){return(new Date).getTime()}});var FORCED$p=fails(function(){return null!==new Date(NaN).toJSON()||1!==Date.prototype.toJSON.call({toISOString:function(){return 1}})});_export({target:"Date",proto:!0,forced:FORCED$p},{toJSON:function(t){var e=toObject(this),n=toPrimitive(e);return"number"!=typeof n||isFinite(n)?e.toISOString():null}});var prototype=Date.prototype,getTime=prototype.getTime,nativeDateToISOString=prototype.toISOString,leadingZero=function(t){return t>9?t:"0"+t},dateToIsoString=fails(function(){return"0385-07-25T07:06:39.999Z"!=nativeDateToISOString.call(new Date(-5e13-1))})||!fails(function(){nativeDateToISOString.call(new Date(NaN))})?function(){if(!isFinite(getTime.call(this)))throw RangeError("Invalid time value");var t=this.getUTCFullYear(),e=this.getUTCMilliseconds(),n=t<0?"-":t>9999?"+":"";return n+("00000"+Math.abs(t)).slice(n?-6:-4)+"-"+leadingZero(this.getUTCMonth()+1)+"-"+leadingZero(this.getUTCDate())+"T"+leadingZero(this.getUTCHours())+":"+leadingZero(this.getUTCMinutes())+":"+leadingZero(this.getUTCSeconds())+"."+(e>99?e:"0"+leadingZero(e))+"Z"}:nativeDateToISOString;_export({target:"Date",proto:!0,forced:Date.prototype.toISOString!==dateToIsoString},{toISOString:dateToIsoString});var DatePrototype=Date.prototype,INVALID_DATE="Invalid Date",TO_STRING$1="toString",nativeDateToString=DatePrototype[TO_STRING$1],getTime$1=DatePrototype.getTime;new Date(NaN)+""!=INVALID_DATE&&redefine(DatePrototype,TO_STRING$1,function(){var t=getTime$1.call(this);return t==t?nativeDateToString.call(this):INVALID_DATE});var dateToPrimitive=function(t){if("string"!==t&&"number"!==t&&"default"!==t)throw TypeError("Incorrect hint");return toPrimitive(anObject(this),"number"!==t)},TO_PRIMITIVE$1=wellKnownSymbol("toPrimitive"),DatePrototype$1=Date.prototype;TO_PRIMITIVE$1 in DatePrototype$1||hide(DatePrototype$1,TO_PRIMITIVE$1,dateToPrimitive),setToStringTag(global$1.JSON,"JSON",!0);var defer,channel,port,anInstance=function(t,e,n){if(!(t instanceof e))throw TypeError("Incorrect "+(n?n+" ":"")+"invocation");return t},set$1=global$1.setImmediate,clear=global$1.clearImmediate,process=global$1.process,MessageChannel=global$1.MessageChannel,Dispatch=global$1.Dispatch,counter=0,queue={},ONREADYSTATECHANGE="onreadystatechange",run=function(){var t=+this;if(queue.hasOwnProperty(t)){var e=queue[t];delete queue[t],e()}},listener=function(t){run.call(t.data)};set$1&&clear||(set$1=function(t){for(var e=[],n=1;arguments.length>n;)e.push(arguments[n++]);return queue[++counter]=function(){("function"==typeof t?t:Function(t)).apply(void 0,e)},defer(counter),counter},clear=function(t){delete queue[t]},"process"==classofRaw(process)?defer=function(t){process.nextTick(bindContext(run,t,1))}:Dispatch&&Dispatch.now?defer=function(t){Dispatch.now(bindContext(run,t,1))}:MessageChannel?(port=(channel=new MessageChannel).port2,channel.port1.onmessage=listener,defer=bindContext(port.postMessage,port,1)):global$1.addEventListener&&"function"==typeof postMessage&&!global$1.importScripts?(defer=function(t){global$1.postMessage(t+"","*")},global$1.addEventListener("message",listener,!1)):defer=ONREADYSTATECHANGE in documentCreateElement("script")?function(t){html.appendChild(documentCreateElement("script"))[ONREADYSTATECHANGE]=function(){html.removeChild(this),run.call(t)}}:function(t){setTimeout(bindContext(run,t,1),0)});var flush,head,last,notify,toggle,node,promise,task={set:set$1,clear:clear},getOwnPropertyDescriptor$4=objectGetOwnPropertyDescriptor.f,macrotask=task.set,MutationObserver=global$1.MutationObserver||global$1.WebKitMutationObserver,process$1=global$1.process,Promise$1=global$1.Promise,IS_NODE="process"==classofRaw(process$1),queueMicrotaskDescriptor=getOwnPropertyDescriptor$4(global$1,"queueMicrotask"),queueMicrotask=queueMicrotaskDescriptor&&queueMicrotaskDescriptor.value;queueMicrotask||(flush=function(){var t,e;for(IS_NODE&&(t=process$1.domain)&&t.exit();head;){e=head.fn,head=head.next;try{e()}catch(t){throw head?notify():last=void 0,t}}last=void 0,t&&t.enter()},IS_NODE?notify=function(){process$1.nextTick(flush)}:MutationObserver&&!/(iPhone|iPod|iPad).*AppleWebKit/i.test(userAgent)?(toggle=!0,node=document.createTextNode(""),new MutationObserver(flush).observe(node,{characterData:!0}),notify=function(){node.data=toggle=!toggle}):Promise$1&&Promise$1.resolve?(promise=Promise$1.resolve(void 0),notify=function(){promise.then(flush)}):notify=function(){macrotask.call(global$1,flush)});var Internal,OwnPromiseCapability,PromiseWrapper,microtask=queueMicrotask||function(t){var e={fn:t,next:void 0};last&&(last.next=e),head||(head=e,notify()),last=e},PromiseCapability=function(t){var e,n;this.promise=new t(function(t,r){if(void 0!==e||void 0!==n)throw TypeError("Bad Promise constructor");e=t,n=r}),this.resolve=aFunction(e),this.reject=aFunction(n)},f$7=function(t){return new PromiseCapability(t)},newPromiseCapability={f:f$7},promiseResolve=function(t,e){if(anObject(t),isObject(e)&&e.constructor===t)return e;var n=newPromiseCapability.f(t);return(0,n.resolve)(e),n.promise},hostReportErrors=function(t,e){var n=global$1.console;n&&n.error&&(1===arguments.length?n.error(t):n.error(t,e))},perform=function(t){try{return{error:!1,value:t()}}catch(t){return{error:!0,value:t}}},redefineAll=function(t,e,n){for(var r in e)redefine(t,r,e[r],n);return t},PROMISE="Promise",task$1=task.set,SPECIES$6=wellKnownSymbol("species"),getInternalState$3=internalState.get,setInternalState$3=internalState.set,getInternalPromiseState=internalState.getterFor(PROMISE),PromiseConstructor=global$1[PROMISE],TypeError$1=global$1.TypeError,document$3=global$1.document,process$2=global$1.process,$fetch=global$1.fetch,versions=process$2&&process$2.versions,v8=versions&&versions.v8||"",newPromiseCapability$1=newPromiseCapability.f,newGenericPromiseCapability=newPromiseCapability$1,IS_NODE$1="process"==classofRaw(process$2),DISPATCH_EVENT=!!(document$3&&document$3.createEvent&&global$1.dispatchEvent),UNHANDLED_REJECTION="unhandledrejection",REJECTION_HANDLED="rejectionhandled",PENDING=0,FULFILLED=1,REJECTED=2,HANDLED=1,UNHANDLED=2,FORCED$q=isForced_1(PROMISE,function(){var t=PromiseConstructor.resolve(1),e=function(){},n=(t.constructor={})[SPECIES$6]=function(t){t(e,e)};return!((IS_NODE$1||"function"==typeof PromiseRejectionEvent)&&!isPure&&t.then(e)instanceof n&&0!==v8.indexOf("6.6")&&-1===userAgent.indexOf("Chrome/66"))}),INCORRECT_ITERATION$1=FORCED$q||!checkCorrectnessOfIteration(function(t){PromiseConstructor.all(t).catch(function(){})}),isThenable=function(t){var e;return!(!isObject(t)||"function"!=typeof(e=t.then))&&e},notify$1=function(t,e,n){if(!e.notified){e.notified=!0;var r=e.reactions;microtask(function(){for(var i=e.value,o=e.state==FULFILLED,s=0,a=function(n){var r,s,a,l=o?n.ok:n.fail,u=n.resolve,c=n.reject,h=n.domain;try{l?(o||(e.rejection===UNHANDLED&&onHandleUnhandled(t,e),e.rejection=HANDLED),!0===l?r=i:(h&&h.enter(),r=l(i),h&&(h.exit(),a=!0)),r===n.promise?c(TypeError$1("Promise-chain cycle")):(s=isThenable(r))?s.call(r,u,c):u(r)):c(i)}catch(t){h&&!a&&h.exit(),c(t)}};r.length>s;)a(r[s++]);e.reactions=[],e.notified=!1,n&&!e.rejection&&onUnhandled(t,e)})}},dispatchEvent=function(t,e,n){var r,i;DISPATCH_EVENT?((r=document$3.createEvent("Event")).promise=e,r.reason=n,r.initEvent(t,!1,!0),global$1.dispatchEvent(r)):r={promise:e,reason:n},(i=global$1["on"+t])?i(r):t===UNHANDLED_REJECTION&&hostReportErrors("Unhandled promise rejection",n)},onUnhandled=function(t,e){task$1.call(global$1,function(){var n,r=e.value;if(isUnhandled(e)&&(n=perform(function(){IS_NODE$1?process$2.emit("unhandledRejection",r,t):dispatchEvent(UNHANDLED_REJECTION,t,r)}),e.rejection=IS_NODE$1||isUnhandled(e)?UNHANDLED:HANDLED,n.error))throw n.value})},isUnhandled=function(t){return t.rejection!==HANDLED&&!t.parent},onHandleUnhandled=function(t,e){task$1.call(global$1,function(){IS_NODE$1?process$2.emit("rejectionHandled",t):dispatchEvent(REJECTION_HANDLED,t,e.value)})},bind=function(t,e,n,r){return function(i){t(e,n,i,r)}},internalReject=function(t,e,n,r){e.done||(e.done=!0,r&&(e=r),e.value=n,e.state=REJECTED,notify$1(t,e,!0))},internalResolve=function(t,e,n,r){if(!e.done){e.done=!0,r&&(e=r);try{if(t===n)throw TypeError$1("Promise can't be resolved itself");var i=isThenable(n);i?microtask(function(){var r={done:!1};try{i.call(n,bind(internalResolve,t,r,e),bind(internalReject,t,r,e))}catch(n){internalReject(t,r,n,e)}}):(e.value=n,e.state=FULFILLED,notify$1(t,e,!1))}catch(n){internalReject(t,{done:!1},n,e)}}};FORCED$q&&(PromiseConstructor=function(t){anInstance(this,PromiseConstructor,PROMISE),aFunction(t),Internal.call(this);var e=getInternalState$3(this);try{t(bind(internalResolve,this,e),bind(internalReject,this,e))}catch(t){internalReject(this,e,t)}},(Internal=function(t){setInternalState$3(this,{type:PROMISE,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:PENDING,value:void 0})}).prototype=redefineAll(PromiseConstructor.prototype,{then:function(t,e){var n=getInternalPromiseState(this),r=newPromiseCapability$1(speciesConstructor(this,PromiseConstructor));return r.ok="function"!=typeof t||t,r.fail="function"==typeof e&&e,r.domain=IS_NODE$1?process$2.domain:void 0,n.parent=!0,n.reactions.push(r),n.state!=PENDING&¬ify$1(this,n,!1),r.promise},catch:function(t){return this.then(void 0,t)}}),OwnPromiseCapability=function(){var t=new Internal,e=getInternalState$3(t);this.promise=t,this.resolve=bind(internalResolve,t,e),this.reject=bind(internalReject,t,e)},newPromiseCapability.f=newPromiseCapability$1=function(t){return t===PromiseConstructor||t===PromiseWrapper?new OwnPromiseCapability(t):newGenericPromiseCapability(t)},"function"==typeof $fetch&&_export({global:!0,enumerable:!0,forced:!0},{fetch:function(t){return promiseResolve(PromiseConstructor,$fetch.apply(global$1,arguments))}})),_export({global:!0,wrap:!0,forced:FORCED$q},{Promise:PromiseConstructor}),setToStringTag(PromiseConstructor,PROMISE,!1),setSpecies(PROMISE),PromiseWrapper=path[PROMISE],_export({target:PROMISE,stat:!0,forced:FORCED$q},{reject:function(t){var e=newPromiseCapability$1(this);return e.reject.call(void 0,t),e.promise}}),_export({target:PROMISE,stat:!0,forced:FORCED$q},{resolve:function(t){return promiseResolve(this,t)}}),_export({target:PROMISE,stat:!0,forced:INCORRECT_ITERATION$1},{all:function(t){var e=this,n=newPromiseCapability$1(e),r=n.resolve,i=n.reject,o=perform(function(){var n=[],o=0,s=1;iterate(t,function(t){var a=o++,l=!1;n.push(void 0),s++,e.resolve(t).then(function(t){l||(l=!0,n[a]=t,--s||r(n))},i)}),--s||r(n)});return o.error&&i(o.value),n.promise},race:function(t){var e=this,n=newPromiseCapability$1(e),r=n.reject,i=perform(function(){iterate(t,function(t){e.resolve(t).then(n.resolve,r)})});return i.error&&r(i.value),n.promise}}),_export({target:"Promise",proto:!0,real:!0},{finally:function(t){var e=speciesConstructor(this,getBuiltIn("Promise")),n="function"==typeof t;return this.then(n?function(n){return promiseResolve(e,t()).then(function(){return n})}:t,n?function(n){return promiseResolve(e,t()).then(function(){throw n})}:t)}});var collection=function(t,e,n,r,i){var o=global$1[t],s=o&&o.prototype,a=o,l=r?"set":"add",u={},c=function(t){var e=s[t];redefine(s,t,"add"==t?function(t){return e.call(this,0===t?0:t),this}:"delete"==t?function(t){return!(i&&!isObject(t))&&e.call(this,0===t?0:t)}:"get"==t?function(t){return i&&!isObject(t)?void 0:e.call(this,0===t?0:t)}:"has"==t?function(t){return!(i&&!isObject(t))&&e.call(this,0===t?0:t)}:function(t,n){return e.call(this,0===t?0:t,n),this})};if(isForced_1(t,"function"!=typeof o||!(i||s.forEach&&!fails(function(){(new o).entries().next()}))))a=n.getConstructor(e,t,r,l),internalMetadata.REQUIRED=!0;else if(isForced_1(t,!0)){var h=new a,f=h[l](i?{}:-0,1)!=h,p=fails(function(){h.has(1)}),d=checkCorrectnessOfIteration(function(t){new o(t)}),y=!i&&fails(function(){for(var t=new o,e=5;e--;)t[l](e,e);return!t.has(-0)});d||((a=e(function(e,n){anInstance(e,a,t);var i=inheritIfRequired(new o,e,a);return null!=n&&iterate(n,i[l],i,r),i})).prototype=s,s.constructor=a),(p||y)&&(c("delete"),c("has"),r&&c("get")),(y||f)&&c(l),i&&s.clear&&delete s.clear}return u[t]=a,_export({global:!0,forced:a!=o},u),setToStringTag(a,t),i||n.setStrong(a,t,r),a},defineProperty$6=objectDefineProperty.f,fastKey=internalMetadata.fastKey,setInternalState$4=internalState.set,internalStateGetterFor=internalState.getterFor,collectionStrong={getConstructor:function(t,e,n,r){var i=t(function(t,o){anInstance(t,i,e),setInternalState$4(t,{type:e,index:objectCreate(null),first:void 0,last:void 0,size:0}),descriptors||(t.size=0),null!=o&&iterate(o,t[r],t,n)}),o=internalStateGetterFor(e),s=function(t,e,n){var r,i,s=o(t),l=a(t,e);return l?l.value=n:(s.last=l={index:i=fastKey(e,!0),key:e,value:n,previous:r=s.last,next:void 0,removed:!1},s.first||(s.first=l),r&&(r.next=l),descriptors?s.size++:t.size++,"F"!==i&&(s.index[i]=l)),t},a=function(t,e){var n,r=o(t),i=fastKey(e);if("F"!==i)return r.index[i];for(n=r.first;n;n=n.next)if(n.key==e)return n};return redefineAll(i.prototype,{clear:function(){for(var t=o(this),e=t.index,n=t.first;n;)n.removed=!0,n.previous&&(n.previous=n.previous.next=void 0),delete e[n.index],n=n.next;t.first=t.last=void 0,descriptors?t.size=0:this.size=0},delete:function(t){var e=o(this),n=a(this,t);if(n){var r=n.next,i=n.previous;delete e.index[n.index],n.removed=!0,i&&(i.next=r),r&&(r.previous=i),e.first==n&&(e.first=r),e.last==n&&(e.last=i),descriptors?e.size--:this.size--}return!!n},forEach:function(t){for(var e,n=o(this),r=bindContext(t,arguments.length>1?arguments[1]:void 0,3);e=e?e.next:n.first;)for(r(e.value,e.key,this);e&&e.removed;)e=e.previous},has:function(t){return!!a(this,t)}}),redefineAll(i.prototype,n?{get:function(t){var e=a(this,t);return e&&e.value},set:function(t,e){return s(this,0===t?0:t,e)}}:{add:function(t){return s(this,t=0===t?0:t,t)}}),descriptors&&defineProperty$6(i.prototype,"size",{get:function(){return o(this).size}}),i},setStrong:function(t,e,n){var r=e+" Iterator",i=internalStateGetterFor(e),o=internalStateGetterFor(r);defineIterator(t,e,function(t,e){setInternalState$4(this,{type:r,target:t,state:i(t),kind:e,last:void 0})},function(){for(var t=o(this),e=t.kind,n=t.last;n&&n.removed;)n=n.previous;return t.target&&(t.last=n=n?n.next:t.state.first)?"keys"==e?{value:n.key,done:!1}:"values"==e?{value:n.value,done:!1}:{value:[n.key,n.value],done:!1}:(t.target=void 0,{value:void 0,done:!0})},n?"entries":"values",!n,!0),setSpecies(e)}},es_map=collection("Map",function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}},collectionStrong,!0),es_set=collection("Set",function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}},collectionStrong),getWeakData=internalMetadata.getWeakData,setInternalState$5=internalState.set,internalStateGetterFor$1=internalState.getterFor,arrayFind=arrayMethods(5),arrayFindIndex=arrayMethods(6),id$1=0,uncaughtFrozenStore=function(t){return t.frozen||(t.frozen=new UncaughtFrozenStore)},UncaughtFrozenStore=function(){this.entries=[]},findUncaughtFrozen=function(t,e){return arrayFind(t.entries,function(t){return t[0]===e})};UncaughtFrozenStore.prototype={get:function(t){var e=findUncaughtFrozen(this,t);if(e)return e[1]},has:function(t){return!!findUncaughtFrozen(this,t)},set:function(t,e){var n=findUncaughtFrozen(this,t);n?n[1]=e:this.entries.push([t,e])},delete:function(t){var e=arrayFindIndex(this.entries,function(e){return e[0]===t});return~e&&this.entries.splice(e,1),!!~e}};var collectionWeak={getConstructor:function(t,e,n,r){var i=t(function(t,o){anInstance(t,i,e),setInternalState$5(t,{type:e,id:id$1++,frozen:void 0}),null!=o&&iterate(o,t[r],t,n)}),o=internalStateGetterFor$1(e),s=function(t,e,n){var r=o(t),i=getWeakData(anObject(e),!0);return!0===i?uncaughtFrozenStore(r).set(e,n):i[r.id]=n,t};return redefineAll(i.prototype,{delete:function(t){var e=o(this);if(!isObject(t))return!1;var n=getWeakData(t);return!0===n?uncaughtFrozenStore(e).delete(t):n&&has(n,e.id)&&delete n[e.id]},has:function(t){var e=o(this);if(!isObject(t))return!1;var n=getWeakData(t);return!0===n?uncaughtFrozenStore(e).has(t):n&&has(n,e.id)}}),redefineAll(i.prototype,n?{get:function(t){var e=o(this);if(isObject(t)){var n=getWeakData(t);return!0===n?uncaughtFrozenStore(e).get(t):n?n[e.id]:void 0}},set:function(t,e){return s(this,t,e)}}:{add:function(t){return s(this,t,!0)}}),i}},es_weakMap=createCommonjsModule(function(t){var e,n=internalState.enforce,r=!global$1.ActiveXObject&&"ActiveXObject"in global$1,i=Object.isExtensible,o=function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}},s=t.exports=collection("WeakMap",o,collectionWeak,!0,!0);if(nativeWeakMap&&r){e=collectionWeak.getConstructor(o,"WeakMap",!0),internalMetadata.REQUIRED=!0;var a=s.prototype,l=a.delete,u=a.has,c=a.get,h=a.set;redefineAll(a,{delete:function(t){if(isObject(t)&&!i(t)){var r=n(this);return r.frozen||(r.frozen=new e),l.call(this,t)||r.frozen.delete(t)}return l.call(this,t)},has:function(t){if(isObject(t)&&!i(t)){var r=n(this);return r.frozen||(r.frozen=new e),u.call(this,t)||r.frozen.has(t)}return u.call(this,t)},get:function(t){if(isObject(t)&&!i(t)){var r=n(this);return r.frozen||(r.frozen=new e),u.call(this,t)?c.call(this,t):r.frozen.get(t)}return c.call(this,t)},set:function(t,r){if(isObject(t)&&!i(t)){var o=n(this);o.frozen||(o.frozen=new e),u.call(this,t)?h.call(this,t,r):o.frozen.set(t,r)}else h.call(this,t,r);return this}})}});collection("WeakSet",function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}},collectionWeak,!1,!0);var NAME$1,defineProperty$7=objectDefineProperty.f,TO_STRING_TAG$3=wellKnownSymbol("toStringTag"),TYPED_ARRAY_TAG=uid("TYPED_ARRAY_TAG"),DataView=global$1.DataView,DataViewPrototype=DataView&&DataView.prototype,Int8Array$1=global$1.Int8Array,Int8ArrayPrototype=Int8Array$1&&Int8Array$1.prototype,Uint8ClampedArray=global$1.Uint8ClampedArray,Uint8ClampedArrayPrototype=Uint8ClampedArray&&Uint8ClampedArray.prototype,TypedArray=Int8Array$1&&objectGetPrototypeOf(Int8Array$1),TypedArrayPrototype=Int8ArrayPrototype&&objectGetPrototypeOf(Int8ArrayPrototype),ObjectPrototype$3=Object.prototype,isPrototypeOf=ObjectPrototype$3.isPrototypeOf,NATIVE_ARRAY_BUFFER=!(!global$1.ArrayBuffer||!global$1.DataView),NATIVE_ARRAY_BUFFER_VIEWS=NATIVE_ARRAY_BUFFER&&!!objectSetPrototypeOf,TYPED_ARRAY_TAG_REQIRED=!1,TypedArrayConstructorsList={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},isView=function(t){var e=classof(t);return"DataView"===e||has(TypedArrayConstructorsList,e)},isTypedArray=function(t){return isObject(t)&&has(TypedArrayConstructorsList,classof(t))},aTypedArray=function(t){if(isTypedArray(t))return t;throw TypeError("Target is not a typed array")},aTypedArrayConstructor=function(t){if(objectSetPrototypeOf){if(isPrototypeOf.call(TypedArray,t))return t}else for(var e in TypedArrayConstructorsList)if(has(TypedArrayConstructorsList,NAME$1)){var n=global$1[e];if(n&&(t===n||isPrototypeOf.call(n,t)))return t}throw TypeError("Target is not a typed array constructor")},exportProto=function(t,e,n){if(descriptors){if(n)for(var r in TypedArrayConstructorsList){var i=global$1[r];i&&has(i.prototype,t)&&delete i.prototype[t]}TypedArrayPrototype[t]&&!n||redefine(TypedArrayPrototype,t,n?e:NATIVE_ARRAY_BUFFER_VIEWS&&Int8ArrayPrototype[t]||e)}},exportStatic=function(t,e,n){var r,i;if(descriptors){if(objectSetPrototypeOf){if(n)for(r in TypedArrayConstructorsList)(i=global$1[r])&&has(i,t)&&delete i[t];if(TypedArray[t]&&!n)return;try{return redefine(TypedArray,t,n?e:NATIVE_ARRAY_BUFFER_VIEWS&&Int8Array$1[t]||e)}catch(t){}}for(r in TypedArrayConstructorsList)!(i=global$1[r])||i[t]&&!n||redefine(i,t,e)}};for(NAME$1 in TypedArrayConstructorsList)global$1[NAME$1]||(NATIVE_ARRAY_BUFFER_VIEWS=!1);if((!NATIVE_ARRAY_BUFFER_VIEWS||"function"!=typeof TypedArray||TypedArray===Function.prototype)&&(TypedArray=function(){throw TypeError("Incorrect invocation")},NATIVE_ARRAY_BUFFER_VIEWS))for(NAME$1 in TypedArrayConstructorsList)global$1[NAME$1]&&objectSetPrototypeOf(global$1[NAME$1],TypedArray);if((!NATIVE_ARRAY_BUFFER_VIEWS||!TypedArrayPrototype||TypedArrayPrototype===ObjectPrototype$3)&&(TypedArrayPrototype=TypedArray.prototype,NATIVE_ARRAY_BUFFER_VIEWS))for(NAME$1 in TypedArrayConstructorsList)global$1[NAME$1]&&objectSetPrototypeOf(global$1[NAME$1].prototype,TypedArrayPrototype);if(NATIVE_ARRAY_BUFFER_VIEWS&&objectGetPrototypeOf(Uint8ClampedArrayPrototype)!==TypedArrayPrototype&&objectSetPrototypeOf(Uint8ClampedArrayPrototype,TypedArrayPrototype),descriptors&&!has(TypedArrayPrototype,TO_STRING_TAG$3))for(NAME$1 in TYPED_ARRAY_TAG_REQIRED=!0,defineProperty$7(TypedArrayPrototype,TO_STRING_TAG$3,{get:function(){return isObject(this)?this[TYPED_ARRAY_TAG]:void 0}}),TypedArrayConstructorsList)global$1[NAME$1]&&hide(global$1[NAME$1],TYPED_ARRAY_TAG,NAME$1);NATIVE_ARRAY_BUFFER&&objectSetPrototypeOf&&objectGetPrototypeOf(DataViewPrototype)!==ObjectPrototype$3&&objectSetPrototypeOf(DataViewPrototype,ObjectPrototype$3);var arrayBufferViewCore={NATIVE_ARRAY_BUFFER:NATIVE_ARRAY_BUFFER,NATIVE_ARRAY_BUFFER_VIEWS:NATIVE_ARRAY_BUFFER_VIEWS,TYPED_ARRAY_TAG:TYPED_ARRAY_TAG_REQIRED&&TYPED_ARRAY_TAG,aTypedArray:aTypedArray,aTypedArrayConstructor:aTypedArrayConstructor,exportProto:exportProto,exportStatic:exportStatic,isView:isView,isTypedArray:isTypedArray,TypedArray:TypedArray,TypedArrayPrototype:TypedArrayPrototype},toIndex=function(t){if(void 0===t)return 0;var e=toInteger(t),n=toLength(e);if(e!==n)throw RangeError("Wrong length or index");return n},arrayBuffer=createCommonjsModule(function(t,e){var n=arrayBufferViewCore.NATIVE_ARRAY_BUFFER,r=objectGetOwnPropertyNames.f,i=objectDefineProperty.f,o=internalState.get,s=internalState.set,a=global$1.ArrayBuffer,l=a,u=global$1.DataView,c=global$1.Math,h=global$1.RangeError,f=c.abs,p=c.pow,d=c.floor,y=c.log,_=c.LN2,m=function(t,e,n){var r,i,o,s=new Array(n),a=8*n-e-1,l=(1<<a)-1,u=l>>1,c=23===e?p(2,-24)-p(2,-77):0,h=t<0||0===t&&1/t<0?1:0,m=0;for((t=f(t))!=t||t===1/0?(i=t!=t?1:0,r=l):(r=d(y(t)/_),t*(o=p(2,-r))<1&&(r--,o*=2),(t+=r+u>=1?c/o:c*p(2,1-u))*o>=2&&(r++,o/=2),r+u>=l?(i=0,r=l):r+u>=1?(i=(t*o-1)*p(2,e),r+=u):(i=t*p(2,u-1)*p(2,e),r=0));e>=8;s[m++]=255&i,i/=256,e-=8);for(r=r<<e|i,a+=e;a>0;s[m++]=255&r,r/=256,a-=8);return s[--m]|=128*h,s},g=function(t,e){var n,r=t.length,i=8*r-e-1,o=(1<<i)-1,s=o>>1,a=i-7,l=r-1,u=t[l--],c=127&u;for(u>>=7;a>0;c=256*c+t[l],l--,a-=8);for(n=c&(1<<-a)-1,c>>=-a,a+=e;a>0;n=256*n+t[l],l--,a-=8);if(0===c)c=1-s;else{if(c===o)return n?NaN:u?-1/0:1/0;n+=p(2,e),c-=s}return(u?-1:1)*n*p(2,c-e)},v=function(t){return t[3]<<24|t[2]<<16|t[1]<<8|t[0]},P=function(t){return[255&t]},b=function(t){return[255&t,t>>8&255]},S=function(t){return[255&t,t>>8&255,t>>16&255,t>>24&255]},E=function(t){return m(t,23,4)},x=function(t){return m(t,52,8)},I=function(t,e){i(t.prototype,e,{get:function(){return o(this)[e]}})},T=function(t,e,n,r){var i=toIndex(+n),s=o(t);if(i+e>s.byteLength)throw h("Wrong index");var a=o(s.buffer).bytes,l=i+s.byteOffset,u=a.slice(l,l+e);return r?u:u.reverse()},O=function(t,e,n,r,i,s){var a=toIndex(+n),l=o(t);if(a+e>l.byteLength)throw h("Wrong index");for(var u=o(l.buffer).bytes,c=a+l.byteOffset,f=r(+i),p=0;p<e;p++)u[c+p]=f[s?p:e-p-1]};if(n){if(!fails(function(){a(1)})||!fails(function(){new a(-1)})||fails(function(){return new a,new a(1.5),new a(NaN),"ArrayBuffer"!=a.name})){for(var w,A=(l=function(t){return anInstance(this,l),new a(toIndex(t))}).prototype=a.prototype,C=r(a),L=0;C.length>L;)(w=C[L++])in l||hide(l,w,a[w]);A.constructor=l}var R=new u(new l(2)),N=u.prototype.setInt8;R.setInt8(0,2147483648),R.setInt8(1,2147483649),!R.getInt8(0)&&R.getInt8(1)||redefineAll(u.prototype,{setInt8:function(t,e){N.call(this,t,e<<24>>24)},setUint8:function(t,e){N.call(this,t,e<<24>>24)}},{unsafe:!0})}else l=function(t){anInstance(this,l,"ArrayBuffer");var e=toIndex(t);s(this,{bytes:arrayFill.call(new Array(e),0),byteLength:e}),descriptors||(this.byteLength=e)},u=function(t,e,n){anInstance(this,u,"DataView"),anInstance(t,l,"DataView");var r=o(t).byteLength,i=toInteger(e);if(i<0||i>r)throw h("Wrong offset");if(i+(n=void 0===n?r-i:toLength(n))>r)throw h("Wrong length");s(this,{buffer:t,byteLength:n,byteOffset:i}),descriptors||(this.buffer=t,this.byteLength=n,this.byteOffset=i)},descriptors&&(I(l,"byteLength"),I(u,"buffer"),I(u,"byteLength"),I(u,"byteOffset")),redefineAll(u.prototype,{getInt8:function(t){return T(this,1,t)[0]<<24>>24},getUint8:function(t){return T(this,1,t)[0]},getInt16:function(t){var e=T(this,2,t,arguments[1]);return(e[1]<<8|e[0])<<16>>16},getUint16:function(t){var e=T(this,2,t,arguments[1]);return e[1]<<8|e[0]},getInt32:function(t){return v(T(this,4,t,arguments[1]))},getUint32:function(t){return v(T(this,4,t,arguments[1]))>>>0},getFloat32:function(t){return g(T(this,4,t,arguments[1]),23)},getFloat64:function(t){return g(T(this,8,t,arguments[1]),52)},setInt8:function(t,e){O(this,1,t,P,e)},setUint8:function(t,e){O(this,1,t,P,e)},setInt16:function(t,e){O(this,2,t,b,e,arguments[2])},setUint16:function(t,e){O(this,2,t,b,e,arguments[2])},setInt32:function(t,e){O(this,4,t,S,e,arguments[2])},setUint32:function(t,e){O(this,4,t,S,e,arguments[2])},setFloat32:function(t,e){O(this,4,t,E,e,arguments[2])},setFloat64:function(t,e){O(this,8,t,x,e,arguments[2])}});setToStringTag(l,"ArrayBuffer"),setToStringTag(u,"DataView"),e.ArrayBuffer=l,e.DataView=u}),ARRAY_BUFFER="ArrayBuffer",ArrayBuffer=arrayBuffer[ARRAY_BUFFER],NativeArrayBuffer=global$1[ARRAY_BUFFER];_export({global:!0,forced:NativeArrayBuffer!==ArrayBuffer},{ArrayBuffer:ArrayBuffer}),setSpecies(ARRAY_BUFFER);var NATIVE_ARRAY_BUFFER_VIEWS$1=arrayBufferViewCore.NATIVE_ARRAY_BUFFER_VIEWS;_export({target:"ArrayBuffer",stat:!0,forced:!NATIVE_ARRAY_BUFFER_VIEWS$1},{isView:arrayBufferViewCore.isView});var ArrayBuffer$1=arrayBuffer.ArrayBuffer,DataView$1=arrayBuffer.DataView,nativeArrayBufferSlice=ArrayBuffer$1.prototype.slice,INCORRECT_SLICE=fails(function(){return!new ArrayBuffer$1(2).slice(1,void 0).byteLength});_export({target:"ArrayBuffer",proto:!0,unsafe:!0,forced:INCORRECT_SLICE},{slice:function(t,e){if(void 0!==nativeArrayBufferSlice&&void 0===e)return nativeArrayBufferSlice.call(anObject(this),t);for(var n=anObject(this).byteLength,r=toAbsoluteIndex(t,n),i=toAbsoluteIndex(void 0===e?n:e,n),o=new(speciesConstructor(this,ArrayBuffer$1))(toLength(i-r)),s=new DataView$1(this),a=new DataView$1(o),l=0;r<i;)a.setUint8(l++,s.getUint8(r++));return o}});var NATIVE_ARRAY_BUFFER$1=arrayBufferViewCore.NATIVE_ARRAY_BUFFER;_export({global:!0,forced:!NATIVE_ARRAY_BUFFER$1},{DataView:arrayBuffer.DataView});var NATIVE_ARRAY_BUFFER_VIEWS$2=arrayBufferViewCore.NATIVE_ARRAY_BUFFER_VIEWS,ArrayBuffer$2=global$1.ArrayBuffer,Int8Array$2=global$1.Int8Array,typedArraysConstructorsRequiresWrappers=!NATIVE_ARRAY_BUFFER_VIEWS$2||!fails(function(){Int8Array$2(1)})||!fails(function(){new Int8Array$2(-1)})||!checkCorrectnessOfIteration(function(t){new Int8Array$2,new Int8Array$2(null),new Int8Array$2(1.5),new Int8Array$2(t)},!0)||fails(function(){return 1!==new Int8Array$2(new ArrayBuffer$2(2),1,void 0).length}),toOffset=function(t,e){var n=toInteger(t);if(n<0||n%e)throw RangeError("Wrong offset");return n},aTypedArrayConstructor$1=arrayBufferViewCore.aTypedArrayConstructor,typedArrayFrom=function(t){var e,n,r,i,o,s=toObject(t),a=arguments.length,l=a>1?arguments[1]:void 0,u=void 0!==l,c=getIteratorMethod(s);if(null!=c&&!isArrayIteratorMethod(c))for(o=c.call(s),s=[];!(i=o.next()).done;)s.push(i.value);for(u&&a>2&&(l=bindContext(l,arguments[2],2)),n=toLength(s.length),r=new(aTypedArrayConstructor$1(this))(n),e=0;n>e;e++)r[e]=u?l(s[e],e):s[e];return r},typedArrayConstructor=createCommonjsModule(function(t){if(descriptors){var e=global$1,n=_export,r=typedArraysConstructorsRequiresWrappers,i=arrayBufferViewCore,o=arrayBuffer,s=anInstance,a=createPropertyDescriptor,l=hide,u=toLength,c=toIndex,h=toOffset,f=toPrimitive,p=has,d=classof,y=isObject,_=objectCreate,m=objectSetPrototypeOf,g=objectGetOwnPropertyNames.f,v=typedArrayFrom,P=arrayMethods(0),b=setSpecies,S=objectDefineProperty,E=objectGetOwnPropertyDescriptor,x=internalState,I=x.get,T=x.set,O=S.f,w=E.f,A=e.RangeError,C=o.ArrayBuffer,L=o.DataView,R=i.NATIVE_ARRAY_BUFFER_VIEWS,N=i.TYPED_ARRAY_TAG,M=i.TypedArray,D=i.TypedArrayPrototype,$=i.aTypedArrayConstructor,j=i.isTypedArray,B=function(t,e){for(var n=0,r=e.length,i=new($(t))(r);r>n;)i[n]=e[n++];return i},F=function(t,e){O(t,e,{get:function(){return I(this)[e]}})},k=function(t){var e;return t instanceof C||"ArrayBuffer"==(e=d(t))||"SharedArrayBuffer"==e},Y=function(t,e){return j(t)&&"symbol"!=typeof e&&e in t&&String(+e)==String(e)},z=function(t,e){return Y(t,e=f(e,!0))?a(2,t[e]):w(t,e)},X=function(t,e,n){return!(Y(t,e=f(e,!0))&&y(n)&&p(n,"value"))||p(n,"get")||p(n,"set")||n.configurable||p(n,"writable")&&!n.writable||p(n,"enumerable")&&!n.enumerable?O(t,e,n):(t[e]=n.value,t)};R||(E.f=z,S.f=X,F(D,"buffer"),F(D,"byteOffset"),F(D,"byteLength"),F(D,"length")),n({target:"Object",stat:!0,forced:!R},{getOwnPropertyDescriptor:z,defineProperty:X}),t.exports=function(t,i,o,a){var f=t+(a?"Clamped":"")+"Array",p="get"+t,d="set"+t,S=e[f],E=S,x=E&&E.prototype,w={},$=function(t,e){O(t,e,{get:function(){return function(t,e){var n=I(t);return n.view[p](e*i+n.byteOffset,!0)}(this,e)},set:function(t){return function(t,e,n){var r=I(t);a&&(n=(n=Math.round(n))<0?0:n>255?255:255&n),r.view[d](e*i+r.byteOffset,n,!0)}(this,e,t)},enumerable:!0})};R?r&&(E=o(function(t,e,n,r){return s(t,E,f),y(e)?k(e)?void 0!==r?new S(e,h(n,i),r):void 0!==n?new S(e,h(n,i)):new S(e):j(e)?B(E,e):v.call(E,e):new S(c(e))}),m&&m(E,M),P(g(S),function(t){t in E||l(E,t,S[t])}),E.prototype=x):(E=o(function(t,e,n,r){s(t,E,f);var o,a,l,p=0,d=0;if(y(e)){if(!k(e))return j(e)?B(E,e):v.call(E,e);o=e,d=h(n,i);var _=e.byteLength;if(void 0===r){if(_%i)throw A("Wrong length");if((a=_-d)<0)throw A("Wrong length")}else if((a=u(r)*i)+d>_)throw A("Wrong length");l=a/i}else l=c(e),o=new C(a=l*i);for(T(t,{buffer:o,byteOffset:d,byteLength:a,length:l,view:new L(o)});p<l;)$(t,p++)}),m&&m(E,M),x=E.prototype=_(D)),x.constructor!==E&&l(x,"constructor",E),N&&l(x,N,f),w[f]=E,n({global:!0,forced:E!=S,sham:!R},w),"BYTES_PER_ELEMENT"in E||l(E,"BYTES_PER_ELEMENT",i),"BYTES_PER_ELEMENT"in x||l(x,"BYTES_PER_ELEMENT",i),b(f)}}else t.exports=function(){}});typedArrayConstructor("Int8",1,function(t){return function(e,n,r){return t(this,e,n,r)}}),typedArrayConstructor("Uint8",1,function(t){return function(e,n,r){return t(this,e,n,r)}}),typedArrayConstructor("Uint8",1,function(t){return function(e,n,r){return t(this,e,n,r)}},!0),typedArrayConstructor("Int16",2,function(t){return function(e,n,r){return t(this,e,n,r)}}),typedArrayConstructor("Uint16",2,function(t){return function(e,n,r){return t(this,e,n,r)}}),typedArrayConstructor("Int32",4,function(t){return function(e,n,r){return t(this,e,n,r)}}),typedArrayConstructor("Uint32",4,function(t){return function(e,n,r){return t(this,e,n,r)}}),typedArrayConstructor("Float32",4,function(t){return function(e,n,r){return t(this,e,n,r)}}),typedArrayConstructor("Float64",8,function(t){return function(e,n,r){return t(this,e,n,r)}}),arrayBufferViewCore.exportStatic("from",typedArrayFrom,typedArraysConstructorsRequiresWrappers);var aTypedArrayConstructor$2=arrayBufferViewCore.aTypedArrayConstructor;arrayBufferViewCore.exportStatic("of",function(){for(var t=0,e=arguments.length,n=new(aTypedArrayConstructor$2(this))(e);e>t;)n[t]=arguments[t++];return n},typedArraysConstructorsRequiresWrappers);var aTypedArray$1=arrayBufferViewCore.aTypedArray;arrayBufferViewCore.exportProto("copyWithin",function(t,e){return arrayCopyWithin.call(aTypedArray$1(this),t,e,arguments.length>2?arguments[2]:void 0)});var arrayEvery=arrayMethods(4),aTypedArray$2=arrayBufferViewCore.aTypedArray;arrayBufferViewCore.exportProto("every",function(t){return arrayEvery(aTypedArray$2(this),t,arguments.length>1?arguments[1]:void 0)});var aTypedArray$3=arrayBufferViewCore.aTypedArray;arrayBufferViewCore.exportProto("fill",function(t){return arrayFill.apply(aTypedArray$3(this),arguments)});var arrayFilter=arrayMethods(2),aTypedArray$4=arrayBufferViewCore.aTypedArray,aTypedArrayConstructor$3=arrayBufferViewCore.aTypedArrayConstructor;arrayBufferViewCore.exportProto("filter",function(t){for(var e=arrayFilter(aTypedArray$4(this),t,arguments.length>1?arguments[1]:void 0),n=speciesConstructor(this,this.constructor),r=0,i=e.length,o=new(aTypedArrayConstructor$3(n))(i);i>r;)o[r]=e[r++];return o});var arrayFind$1=arrayMethods(5),aTypedArray$5=arrayBufferViewCore.aTypedArray;arrayBufferViewCore.exportProto("find",function(t){return arrayFind$1(aTypedArray$5(this),t,arguments.length>1?arguments[1]:void 0)});var arrayFindIndex$1=arrayMethods(6),aTypedArray$6=arrayBufferViewCore.aTypedArray;arrayBufferViewCore.exportProto("findIndex",function(t){return arrayFindIndex$1(aTypedArray$6(this),t,arguments.length>1?arguments[1]:void 0)});var arrayForEach$1=arrayMethods(0),aTypedArray$7=arrayBufferViewCore.aTypedArray;arrayBufferViewCore.exportProto("forEach",function(t){arrayForEach$1(aTypedArray$7(this),t,arguments.length>1?arguments[1]:void 0)});var arrayIncludes$1=arrayIncludes(!0),aTypedArray$8=arrayBufferViewCore.aTypedArray;arrayBufferViewCore.exportProto("includes",function(t){return arrayIncludes$1(aTypedArray$8(this),t,arguments.length>1?arguments[1]:void 0)});var arrayIndexOf$1=arrayIncludes(!1),aTypedArray$9=arrayBufferViewCore.aTypedArray;arrayBufferViewCore.exportProto("indexOf",function(t){return arrayIndexOf$1(aTypedArray$9(this),t,arguments.length>1?arguments[1]:void 0)});var Uint8Array$1=global$1.Uint8Array,ITERATOR$5=wellKnownSymbol("iterator"),arrayValues=es_array_iterator.values,arrayKeys=es_array_iterator.keys,arrayEntries=es_array_iterator.entries,aTypedArray$a=arrayBufferViewCore.aTypedArray,exportProto$1=arrayBufferViewCore.exportProto,nativeTypedArrayIterator=Uint8Array$1&&Uint8Array$1.prototype[ITERATOR$5],CORRECT_ITER_NAME=!!nativeTypedArrayIterator&&("values"==nativeTypedArrayIterator.name||null==nativeTypedArrayIterator.name),typedArrayValues=function(){return arrayValues.call(aTypedArray$a(this))};exportProto$1("entries",function(){return arrayEntries.call(aTypedArray$a(this))}),exportProto$1("keys",function(){return arrayKeys.call(aTypedArray$a(this))}),exportProto$1("values",typedArrayValues,!CORRECT_ITER_NAME),exportProto$1(ITERATOR$5,typedArrayValues,!CORRECT_ITER_NAME);var aTypedArray$b=arrayBufferViewCore.aTypedArray,arrayJoin=[].join;arrayBufferViewCore.exportProto("join",function(t){return arrayJoin.apply(aTypedArray$b(this),arguments)});var aTypedArray$c=arrayBufferViewCore.aTypedArray;arrayBufferViewCore.exportProto("lastIndexOf",function(t){return arrayLastIndexOf.apply(aTypedArray$c(this),arguments)});var aTypedArray$d=arrayBufferViewCore.aTypedArray,aTypedArrayConstructor$4=arrayBufferViewCore.aTypedArrayConstructor,internalTypedArrayMap=arrayMethods(1,function(t,e){return new(aTypedArrayConstructor$4(speciesConstructor(t,t.constructor)))(e)});arrayBufferViewCore.exportProto("map",function(t){return internalTypedArrayMap(aTypedArray$d(this),t,arguments.length>1?arguments[1]:void 0)});var aTypedArray$e=arrayBufferViewCore.aTypedArray,arrayReduce$1=[].reduce;arrayBufferViewCore.exportProto("reduce",function(t){return arrayReduce$1.apply(aTypedArray$e(this),arguments)});var aTypedArray$f=arrayBufferViewCore.aTypedArray,arrayReduceRight=[].reduceRight;arrayBufferViewCore.exportProto("reduceRight",function(t){return arrayReduceRight.apply(aTypedArray$f(this),arguments)});var aTypedArray$g=arrayBufferViewCore.aTypedArray;arrayBufferViewCore.exportProto("reverse",function(){for(var t,e=aTypedArray$g(this).length,n=Math.floor(e/2),r=0;r<n;)t=this[r],this[r++]=this[--e],this[e]=t;return this});var aTypedArray$h=arrayBufferViewCore.aTypedArray,FORCED$r=fails(function(){new Int8Array(1).set({})});arrayBufferViewCore.exportProto("set",function(t){aTypedArray$h(this);var e=toOffset(arguments[1],1),n=this.length,r=toObject(t),i=toLength(r.length),o=0;if(i+e>n)throw RangeError("Wrong length");for(;o<i;)this[e+o]=r[o++]},FORCED$r);var aTypedArray$i=arrayBufferViewCore.aTypedArray,aTypedArrayConstructor$5=arrayBufferViewCore.aTypedArrayConstructor,arraySlice$1=[].slice,FORCED$s=fails(function(){new Int8Array(1).slice()});arrayBufferViewCore.exportProto("slice",function(t,e){for(var n=arraySlice$1.call(aTypedArray$i(this),t,e),r=speciesConstructor(this,this.constructor),i=0,o=n.length,s=new(aTypedArrayConstructor$5(r))(o);o>i;)s[i]=n[i++];return s},FORCED$s);var arraySome=arrayMethods(3),aTypedArray$j=arrayBufferViewCore.aTypedArray;arrayBufferViewCore.exportProto("some",function(t){return arraySome(aTypedArray$j(this),t,arguments.length>1?arguments[1]:void 0)});var aTypedArray$k=arrayBufferViewCore.aTypedArray,arraySort=[].sort;arrayBufferViewCore.exportProto("sort",function(t){return arraySort.call(aTypedArray$k(this),t)});var aTypedArray$l=arrayBufferViewCore.aTypedArray;arrayBufferViewCore.exportProto("subarray",function(t,e){var n=aTypedArray$l(this),r=n.length,i=toAbsoluteIndex(t,r);return new(speciesConstructor(n,n.constructor))(n.buffer,n.byteOffset+i*n.BYTES_PER_ELEMENT,toLength((void 0===e?r:toAbsoluteIndex(e,r))-i))});var Int8Array$3=global$1.Int8Array,aTypedArray$m=arrayBufferViewCore.aTypedArray,arrayToLocaleString=[].toLocaleString,arraySlice$2=[].slice,TO_LOCALE_BUG=!!Int8Array$3&&fails(function(){arrayToLocaleString.call(new Int8Array$3(1))}),FORCED$t=fails(function(){return[1,2].toLocaleString()!=new Int8Array$3([1,2]).toLocaleString()})||!fails(function(){Int8Array$3.prototype.toLocaleString.call([1,2])});arrayBufferViewCore.exportProto("toLocaleString",function(){return arrayToLocaleString.apply(TO_LOCALE_BUG?arraySlice$2.call(aTypedArray$m(this)):aTypedArray$m(this),arguments)},FORCED$t);var Uint8Array$2=global$1.Uint8Array,Uint8ArrayPrototype=Uint8Array$2&&Uint8Array$2.prototype,arrayToString=[].toString,arrayJoin$1=[].join;fails(function(){arrayToString.call({})})&&(arrayToString=function(){return arrayJoin$1.call(this)}),arrayBufferViewCore.exportProto("toString",arrayToString,(Uint8ArrayPrototype||{}).toString!=arrayToString);var nativeApply=(global$1.Reflect||{}).apply,functionApply=Function.apply,OPTIONAL_ARGUMENTS_LIST=!fails(function(){nativeApply(function(){})});_export({target:"Reflect",stat:!0,forced:OPTIONAL_ARGUMENTS_LIST},{apply:function(t,e,n){return aFunction(t),anObject(n),nativeApply?nativeApply(t,e,n):functionApply.call(t,e,n)}});var nativeConstruct=(global$1.Reflect||{}).construct,NEW_TARGET_BUG=fails(function(){function t(){}return!(nativeConstruct(function(){},[],t)instanceof t)}),ARGS_BUG=!fails(function(){nativeConstruct(function(){})}),FORCED$u=NEW_TARGET_BUG||ARGS_BUG;_export({target:"Reflect",stat:!0,forced:FORCED$u,sham:FORCED$u},{construct:function(t,e){aFunction(t),anObject(e);var n=arguments.length<3?t:aFunction(arguments[2]);if(ARGS_BUG&&!NEW_TARGET_BUG)return nativeConstruct(t,e,n);if(t==n){switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3])}var r=[null];return r.push.apply(r,e),new(functionBind.apply(t,r))}var i=n.prototype,o=objectCreate(isObject(i)?i:Object.prototype),s=Function.apply.call(t,o,e);return isObject(s)?s:o}});var ERROR_INSTEAD_OF_FALSE=fails(function(){Reflect.defineProperty(objectDefineProperty.f({},1,{value:1}),1,{value:2})});_export({target:"Reflect",stat:!0,forced:ERROR_INSTEAD_OF_FALSE,sham:!descriptors},{defineProperty:function(t,e,n){anObject(t),e=toPrimitive(e,!0),anObject(n);try{return objectDefineProperty.f(t,e,n),!0}catch(t){return!1}}});var getOwnPropertyDescriptor$5=objectGetOwnPropertyDescriptor.f;function get$1(t,e){var n,r,i=arguments.length<3?t:arguments[2];return anObject(t)===i?t[e]:(n=objectGetOwnPropertyDescriptor.f(t,e))?has(n,"value")?n.value:void 0===n.get?void 0:n.get.call(i):isObject(r=objectGetPrototypeOf(t))?get$1(r,e,i):void 0}_export({target:"Reflect",stat:!0},{deleteProperty:function(t,e){var n=getOwnPropertyDescriptor$5(anObject(t),e);return!(n&&!n.configurable)&&delete t[e]}}),_export({target:"Reflect",stat:!0},{get:get$1}),_export({target:"Reflect",stat:!0,sham:!descriptors},{getOwnPropertyDescriptor:function(t,e){return objectGetOwnPropertyDescriptor.f(anObject(t),e)}}),_export({target:"Reflect",stat:!0,sham:!correctPrototypeGetter},{getPrototypeOf:function(t){return objectGetPrototypeOf(anObject(t))}}),_export({target:"Reflect",stat:!0},{has:function(t,e){return e in t}});var objectIsExtensible=Object.isExtensible;function set$2(t,e,n){var r,i,o=arguments.length<4?t:arguments[3],s=objectGetOwnPropertyDescriptor.f(anObject(t),e);if(!s){if(isObject(i=objectGetPrototypeOf(t)))return set$2(i,e,n,o);s=createPropertyDescriptor(0)}if(has(s,"value")){if(!1===s.writable||!isObject(o))return!1;if(r=objectGetOwnPropertyDescriptor.f(o,e)){if(r.get||r.set||!1===r.writable)return!1;r.value=n,objectDefineProperty.f(o,e,r)}else objectDefineProperty.f(o,e,createPropertyDescriptor(0,n));return!0}return void 0!==s.set&&(s.set.call(o,n),!0)}_export({target:"Reflect",stat:!0},{isExtensible:function(t){return anObject(t),!objectIsExtensible||objectIsExtensible(t)}}),_export({target:"Reflect",stat:!0},{ownKeys:ownKeys$1}),_export({target:"Reflect",stat:!0,sham:!freezing},{preventExtensions:function(t){anObject(t);try{var e=getBuiltIn("Object","preventExtensions");return e&&e(t),!0}catch(t){return!1}}}),_export({target:"Reflect",stat:!0},{set:set$2}),objectSetPrototypeOf&&_export({target:"Reflect",stat:!0},{setPrototypeOf:function(t,e){validateSetPrototypeOfArguments(t,e);try{return objectSetPrototypeOf(t,e),!0}catch(t){return!1}}});var shared$2=shared("metadata"),store$2=shared$2.store||(shared$2.store=new es_weakMap),getOrCreateMetadataMap=function(t,e,n){var r=store$2.get(t);if(!r){if(!n)return;store$2.set(t,r=new es_map)}var i=r.get(e);if(!i){if(!n)return;r.set(e,i=new es_map)}return i},ordinaryHasOwnMetadata=function(t,e,n){var r=getOrCreateMetadataMap(e,n,!1);return void 0!==r&&r.has(t)},ordinaryGetOwnMetadata=function(t,e,n){var r=getOrCreateMetadataMap(e,n,!1);return void 0===r?void 0:r.get(t)},ordinaryDefineOwnMetadata=function(t,e,n,r){getOrCreateMetadataMap(n,r,!0).set(t,e)},ordinaryOwnMetadataKeys=function(t,e){var n=getOrCreateMetadataMap(t,e,!1),r=[];return n&&n.forEach(function(t,e){r.push(e)}),r},toMetadataKey=function(t){return void 0===t||"symbol"==typeof t?t:String(t)},reflectMetadata={store:store$2,getMap:getOrCreateMetadataMap,has:ordinaryHasOwnMetadata,get:ordinaryGetOwnMetadata,set:ordinaryDefineOwnMetadata,keys:ordinaryOwnMetadataKeys,toKey:toMetadataKey},toMetadataKey$1=reflectMetadata.toKey,ordinaryDefineOwnMetadata$1=reflectMetadata.set;_export({target:"Reflect",stat:!0},{defineMetadata:function(t,e,n){var r=arguments.length<4?void 0:toMetadataKey$1(arguments[3]);ordinaryDefineOwnMetadata$1(t,e,anObject(n),r)}});var toMetadataKey$2=reflectMetadata.toKey,getOrCreateMetadataMap$1=reflectMetadata.getMap,store$3=reflectMetadata.store;_export({target:"Reflect",stat:!0},{deleteMetadata:function(t,e){var n=arguments.length<3?void 0:toMetadataKey$2(arguments[2]),r=getOrCreateMetadataMap$1(anObject(e),n,!1);if(void 0===r||!r.delete(t))return!1;if(r.size)return!0;var i=store$3.get(e);return i.delete(n),!!i.size||store$3.delete(e)}});var ordinaryHasOwnMetadata$1=reflectMetadata.has,ordinaryGetOwnMetadata$1=reflectMetadata.get,toMetadataKey$3=reflectMetadata.toKey,ordinaryGetMetadata=function(t,e,n){if(ordinaryHasOwnMetadata$1(t,e,n))return ordinaryGetOwnMetadata$1(t,e,n);var r=objectGetPrototypeOf(e);return null!==r?ordinaryGetMetadata(t,r,n):void 0};_export({target:"Reflect",stat:!0},{getMetadata:function(t,e){var n=arguments.length<3?void 0:toMetadataKey$3(arguments[2]);return ordinaryGetMetadata(t,anObject(e),n)}});var ordinaryOwnMetadataKeys$1=reflectMetadata.keys,toMetadataKey$4=reflectMetadata.toKey,from=function(t){var e=[];return iterate(t,e.push,e),e},ordinaryMetadataKeys=function(t,e){var n=ordinaryOwnMetadataKeys$1(t,e),r=objectGetPrototypeOf(t);if(null===r)return n;var i=ordinaryMetadataKeys(r,e);return i.length?n.length?from(new es_set(n.concat(i))):i:n};_export({target:"Reflect",stat:!0},{getMetadataKeys:function(t){var e=arguments.length<2?void 0:toMetadataKey$4(arguments[1]);return ordinaryMetadataKeys(anObject(t),e)}});var ordinaryGetOwnMetadata$2=reflectMetadata.get,toMetadataKey$5=reflectMetadata.toKey;_export({target:"Reflect",stat:!0},{getOwnMetadata:function(t,e){var n=arguments.length<3?void 0:toMetadataKey$5(arguments[2]);return ordinaryGetOwnMetadata$2(t,anObject(e),n)}});var ordinaryOwnMetadataKeys$2=reflectMetadata.keys,toMetadataKey$6=reflectMetadata.toKey;_export({target:"Reflect",stat:!0},{getOwnMetadataKeys:function(t){var e=arguments.length<2?void 0:toMetadataKey$6(arguments[1]);return ordinaryOwnMetadataKeys$2(anObject(t),e)}});var ordinaryHasOwnMetadata$2=reflectMetadata.has,toMetadataKey$7=reflectMetadata.toKey,ordinaryHasMetadata=function(t,e,n){if(ordinaryHasOwnMetadata$2(t,e,n))return!0;var r=objectGetPrototypeOf(e);return null!==r&&ordinaryHasMetadata(t,r,n)};_export({target:"Reflect",stat:!0},{hasMetadata:function(t,e){var n=arguments.length<3?void 0:toMetadataKey$7(arguments[2]);return ordinaryHasMetadata(t,anObject(e),n)}});var ordinaryHasOwnMetadata$3=reflectMetadata.has,toMetadataKey$8=reflectMetadata.toKey;_export({target:"Reflect",stat:!0},{hasOwnMetadata:function(t,e){var n=arguments.length<3?void 0:toMetadataKey$8(arguments[2]);return ordinaryHasOwnMetadata$3(t,anObject(e),n)}});var toMetadataKey$9=reflectMetadata.toKey,ordinaryDefineOwnMetadata$2=reflectMetadata.set;_export({target:"Reflect",stat:!0},{metadata:function(t,e){return function(n,r){ordinaryDefineOwnMetadata$2(t,e,anObject(n),toMetadataKey$9(r))}}});var $AggregateError=function(t,e){var n=this;if(!(n instanceof $AggregateError))return new $AggregateError(t,e);objectSetPrototypeOf&&(n=objectSetPrototypeOf(new Error(e),objectGetPrototypeOf(n)));var r=[];return iterate(t,r.push,r),n.errors=r,void 0!==e&&hide(n,"message",String(e)),n};$AggregateError.prototype=objectCreate(Error.prototype,{constructor:{value:$AggregateError,configurable:!0,writable:!0},name:{value:"AggregateError",configurable:!0,writable:!0}}),_export({global:!0},{AggregateError:$AggregateError});var PROMISE_ANY_ERROR="No one promise resolved";_export({target:"Promise",stat:!0},{any:function(t){var e=this,n=newPromiseCapability.f(e),r=n.resolve,i=n.reject,o=perform(function(){var n=[],o=0,s=1,a=!1;iterate(t,function(t){var l=o++,u=!1;n.push(void 0),s++,e.resolve(t).then(function(t){u||a||(a=!0,r(t))},function(t){u||a||(u=!0,n[l]=t,--s||i(new(getBuiltIn("AggregateError"))(n,PROMISE_ANY_ERROR)))})}),--s||i(new(getBuiltIn("AggregateError"))(n,PROMISE_ANY_ERROR))});return o.error&&i(o.value),n.promise}}),_export({target:"Math",stat:!0},{iaddh:function(t,e,n,r){var i=t>>>0,o=n>>>0;return(e>>>0)+(r>>>0)+((i&o|(i|o)&~(i+o>>>0))>>>31)|0}}),_export({target:"Math",stat:!0},{isubh:function(t,e,n,r){var i=t>>>0,o=n>>>0;return(e>>>0)-(r>>>0)-((~i&o|~(i^o)&i-o>>>0)>>>31)|0}}),_export({target:"Math",stat:!0},{imulh:function(t,e){var n=+t,r=+e,i=65535&n,o=65535&r,s=n>>16,a=r>>16,l=(s*o>>>0)+(i*o>>>16);return s*a+(l>>16)+((i*a>>>0)+(65535&l)>>16)}}),_export({target:"Math",stat:!0},{umulh:function(t,e){var n=+t,r=+e,i=65535&n,o=65535&r,s=n>>>16,a=r>>>16,l=(s*o>>>0)+(i*o>>>16);return s*a+(l>>>16)+((i*a>>>0)+(65535&l)>>>16)}}),_export({target:"String",proto:!0},{at:function(t){return stringAt(this,t,!0)}});var ITERATOR$6=wellKnownSymbol("iterator"),nativeUrl=!fails(function(){var t=new URL("b?e=1","http://a"),e=t.searchParams;return t.pathname="c%20d",isPure&&!t.toJSON||!e.sort||"http://a/c%20d?e=1"!==t.href||"1"!==e.get("e")||"a=1"!==String(new URLSearchParams("?a=1"))||!e[ITERATOR$6]||"a"!==new URL("https://a@b").username||"b"!==new URLSearchParams(new URLSearchParams("a=b")).get("a")||"xn--e1aybc"!==new URL("http://тест").host||"#%D0%B1"!==new URL("http://a#б").hash}),maxInt=2147483647,base=36,tMin=1,tMax=26,skew=38,damp=700,initialBias=72,initialN=128,delimiter="-",regexNonASCII=/[^\0-\u007E]/,regexSeparators=/[\u002E\u3002\uFF0E\uFF61]/g,OVERFLOW_ERROR="Overflow: input needs wider integers to process",baseMinusTMin=base-tMin,floor$6=Math.floor,stringFromCharCode=String.fromCharCode,ucs2decode=function(t){for(var e=[],n=0,r=t.length;n<r;){var i=t.charCodeAt(n++);if(i>=55296&&i<=56319&&n<r){var o=t.charCodeAt(n++);56320==(64512&o)?e.push(((1023&i)<<10)+(1023&o)+65536):(e.push(i),n--)}else e.push(i)}return e},digitToBasic=function(t){return t+22+75*(t<26)},adapt=function(t,e,n){var r=0;for(t=n?floor$6(t/damp):t>>1,t+=floor$6(t/e);t>baseMinusTMin*tMax>>1;r+=base)t=floor$6(t/baseMinusTMin);return floor$6(r+(baseMinusTMin+1)*t/(t+skew))},encode=function(t){var e,n,r=[],i=(t=ucs2decode(t)).length,o=initialN,s=0,a=initialBias;for(e=0;e<t.length;e++)(n=t[e])<128&&r.push(stringFromCharCode(n));var l=r.length,u=l;for(l&&r.push(delimiter);u<i;){var c=maxInt;for(e=0;e<t.length;e++)(n=t[e])>=o&&n<c&&(c=n);var h=u+1;if(c-o>floor$6((maxInt-s)/h))throw RangeError(OVERFLOW_ERROR);for(s+=(c-o)*h,o=c,e=0;e<t.length;e++){if((n=t[e])<o&&++s>maxInt)throw RangeError(OVERFLOW_ERROR);if(n==o){for(var f=s,p=base;;p+=base){var d=p<=a?tMin:p>=a+tMax?tMax:p-a;if(f<d)break;var y=f-d,_=base-d;r.push(stringFromCharCode(digitToBasic(d+y%_))),f=floor$6(y/_)}r.push(stringFromCharCode(digitToBasic(f))),a=adapt(s,h,u==l),s=0,++u}}++s,++o}return r.join("")},punycodeToAscii=function(t){var e,n,r=[],i=t.toLowerCase().replace(regexSeparators,".").split(".");for(e=0;e<i.length;e++)n=i[e],r.push(regexNonASCII.test(n)?"xn--"+encode(n):n);return r.join(".")},getIterator=function(t){var e=getIteratorMethod(t);if("function"!=typeof e)throw TypeError(String(t)+" is not iterable");return anObject(e.call(t))},ITERATOR$7=wellKnownSymbol("iterator"),URL_SEARCH_PARAMS="URLSearchParams",URL_SEARCH_PARAMS_ITERATOR=URL_SEARCH_PARAMS+"Iterator",setInternalState$6=internalState.set,getInternalParamsState=internalState.getterFor(URL_SEARCH_PARAMS),getInternalIteratorState=internalState.getterFor(URL_SEARCH_PARAMS_ITERATOR),plus=/\+/g,sequences=Array(4),percentSequence=function(t){return sequences[t-1]||(sequences[t-1]=RegExp("((?:%[\\da-f]{2}){"+t+"})","gi"))},percentDecode=function(t){try{return decodeURIComponent(t)}catch(e){return t}},deserialize=function(t){for(var e=t.replace(plus," "),n=4;n;)e=e.replace(percentSequence(n--),percentDecode);return e},find=/[!'()~]|%20/g,replace={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},replacer=function(t){return replace[t]},serialize=function(t){return encodeURIComponent(t).replace(find,replacer)},parseSearchParams=function(t,e){if(e)for(var n,r,i=e.split("&"),o=0;o<i.length;)(n=i[o++]).length&&(r=n.split("="),t.push({key:deserialize(r.shift()),value:deserialize(r.join("="))}));return t},updateSearchParams=function(t){this.entries.length=0,parseSearchParams(this.entries,t)},validateArgumentsLength=function(t,e){if(t<e)throw TypeError("Not enough arguments")},URLSearchParamsIterator=createIteratorConstructor(function(t,e){setInternalState$6(this,{type:URL_SEARCH_PARAMS_ITERATOR,iterator:getIterator(getInternalParamsState(t).entries),kind:e})},"Iterator",function(){var t=getInternalIteratorState(this),e=t.kind,n=t.iterator.next(),r=n.value;return n.done||(n.value="keys"===e?r.key:"values"===e?r.value:[r.key,r.value]),n}),URLSearchParamsConstructor=function(){anInstance(this,URLSearchParamsConstructor,URL_SEARCH_PARAMS);var t,e,n,r,i,o,s,a=arguments.length>0?arguments[0]:void 0,l=[];if(setInternalState$6(this,{type:URL_SEARCH_PARAMS,entries:l,updateURL:null,updateSearchParams:updateSearchParams}),void 0!==a)if(isObject(a))if("function"==typeof(t=getIteratorMethod(a)))for(e=t.call(a);!(n=e.next()).done;){if((i=(r=getIterator(anObject(n.value))).next()).done||(o=r.next()).done||!r.next().done)throw TypeError("Expected sequence with length 2");l.push({key:i.value+"",value:o.value+""})}else for(s in a)has(a,s)&&l.push({key:s,value:a[s]+""});else parseSearchParams(l,"string"==typeof a?"?"===a.charAt(0)?a.slice(1):a:a+"")},URLSearchParamsPrototype=URLSearchParamsConstructor.prototype;redefineAll(URLSearchParamsPrototype,{append:function(t,e){validateArgumentsLength(arguments.length,2);var n=getInternalParamsState(this);n.entries.push({key:t+"",value:e+""}),n.updateURL&&n.updateURL()},delete:function(t){validateArgumentsLength(arguments.length,1);for(var e=getInternalParamsState(this),n=e.entries,r=t+"",i=0;i<n.length;)n[i].key===r?n.splice(i,1):i++;e.updateURL&&e.updateURL()},get:function(t){validateArgumentsLength(arguments.length,1);for(var e=getInternalParamsState(this).entries,n=t+"",r=0;r<e.length;r++)if(e[r].key===n)return e[r].value;return null},getAll:function(t){validateArgumentsLength(arguments.length,1);for(var e=getInternalParamsState(this).entries,n=t+"",r=[],i=0;i<e.length;i++)e[i].key===n&&r.push(e[i].value);return r},has:function(t){validateArgumentsLength(arguments.length,1);for(var e=getInternalParamsState(this).entries,n=t+"",r=0;r<e.length;)if(e[r++].key===n)return!0;return!1},set:function(t,e){validateArgumentsLength(arguments.length,1);for(var n,r=getInternalParamsState(this),i=r.entries,o=!1,s=t+"",a=e+"",l=0;l<i.length;l++)(n=i[l]).key===s&&(o?i.splice(l--,1):(o=!0,n.value=a));o||i.push({key:s,value:a}),r.updateURL&&r.updateURL()},sort:function(){var t,e,n,r=getInternalParamsState(this),i=r.entries,o=i.slice();for(i.length=0,e=0;e<o.length;e++){for(t=o[e],n=0;n<e;n++)if(i[n].key>t.key){i.splice(n,0,t);break}n===e&&i.push(t)}r.updateURL&&r.updateURL()},forEach:function(t){for(var e,n=getInternalParamsState(this).entries,r=bindContext(t,arguments.length>1?arguments[1]:void 0,3),i=0;i<n.length;)r((e=n[i++]).value,e.key,this)},keys:function(){return new URLSearchParamsIterator(this,"keys")},values:function(){return new URLSearchParamsIterator(this,"values")},entries:function(){return new URLSearchParamsIterator(this,"entries")}},{enumerable:!0}),redefine(URLSearchParamsPrototype,ITERATOR$7,URLSearchParamsPrototype.entries),redefine(URLSearchParamsPrototype,"toString",function(){for(var t,e=getInternalParamsState(this).entries,n=[],r=0;r<e.length;)t=e[r++],n.push(serialize(t.key)+"="+serialize(t.value));return n.join("&")},{enumerable:!0}),setToStringTag(URLSearchParamsConstructor,URL_SEARCH_PARAMS),_export({global:!0,forced:!nativeUrl},{URLSearchParams:URLSearchParamsConstructor});var EOF,web_urlSearchParams={URLSearchParams:URLSearchParamsConstructor,getState:getInternalParamsState},NativeURL=global$1.URL,URLSearchParams$1=web_urlSearchParams.URLSearchParams,getInternalSearchParamsState=web_urlSearchParams.getState,setInternalState$7=internalState.set,getInternalURLState=internalState.getterFor("URL"),pow$3=Math.pow,INVALID_AUTHORITY="Invalid authority",INVALID_SCHEME="Invalid scheme",INVALID_HOST="Invalid host",INVALID_PORT="Invalid port",ALPHA=/[a-zA-Z]/,ALPHANUMERIC=/[a-zA-Z0-9+\-.]/,DIGIT=/\d/,HEX_START=/^(0x|0X)/,OCT=/^[0-7]+$/,DEC=/^\d+$/,HEX=/^[0-9A-Fa-f]+$/,FORBIDDEN_HOST_CODE_POINT=/\u0000|\u0009|\u000A|\u000D|\u0020|#|%|\/|:|\?|@|\[|\\|\]/,FORBIDDEN_HOST_CODE_POINT_EXCLUDING_PERCENT=/\u0000|\u0009|\u000A|\u000D|\u0020|#|\/|:|\?|@|\[|\\|\]/,LEADING_AND_TRAILING_C0_CONTROL_OR_SPACE=/^[\u0000-\u001F\u0020]+|[\u0000-\u001F\u0020]+$/g,TAB_AND_NEW_LINE=/\u0009|\u000A|\u000D/g,parseHost=function(t,e){var n,r,i;if("["==e.charAt(0)){if("]"!=e.charAt(e.length-1))return INVALID_HOST;if(!(n=parseIPv6(e.slice(1,-1))))return INVALID_HOST;t.host=n}else if(isSpecial(t)){if(e=punycodeToAscii(e),FORBIDDEN_HOST_CODE_POINT.test(e))return INVALID_HOST;if(null===(n=parseIPv4(e)))return INVALID_HOST;t.host=n}else{if(FORBIDDEN_HOST_CODE_POINT_EXCLUDING_PERCENT.test(e))return INVALID_HOST;for(n="",r=arrayFrom(e),i=0;i<r.length;i++)n+=percentEncode(r[i],C0ControlPercentEncodeSet);t.host=n}},parseIPv4=function(t){var e,n,r,i,o,s,a,l=t.split(".");if(""==l[l.length-1]&&l.length&&l.pop(),(e=l.length)>4)return t;for(n=[],r=0;r<e;r++){if(""==(i=l[r]))return t;if(o=10,i.length>1&&"0"==i.charAt(0)&&(o=HEX_START.test(i)?16:8,i=i.slice(8==o?1:2)),""===i)s=0;else{if(!(10==o?DEC:8==o?OCT:HEX).test(i))return t;s=parseInt(i,o)}n.push(s)}for(r=0;r<e;r++)if(s=n[r],r==e-1){if(s>=pow$3(256,5-e))return null}else if(s>255)return null;for(a=n.pop(),r=0;r<n.length;r++)a+=n[r]*pow$3(256,3-r);return a},parseIPv6=function(t){var e,n,r,i,o,s,a,l=[0,0,0,0,0,0,0,0],u=0,c=null,h=0,f=function(){return t.charAt(h)};if(":"==f()){if(":"!=t.charAt(1))return;h+=2,c=++u}for(;f();){if(8==u)return;if(":"!=f()){for(e=n=0;n<4&&HEX.test(f());)e=16*e+parseInt(f(),16),h++,n++;if("."==f()){if(0==n)return;if(h-=n,u>6)return;for(r=0;f();){if(i=null,r>0){if(!("."==f()&&r<4))return;h++}if(!DIGIT.test(f()))return;for(;DIGIT.test(f());){if(o=parseInt(f(),10),null===i)i=o;else{if(0==i)return;i=10*i+o}if(i>255)return;h++}l[u]=256*l[u]+i,2!=++r&&4!=r||u++}if(4!=r)return;break}if(":"==f()){if(h++,!f())return}else if(f())return;l[u++]=e}else{if(null!==c)return;h++,c=++u}}if(null!==c)for(s=u-c,u=7;0!=u&&s>0;)a=l[u],l[u--]=l[c+s-1],l[c+--s]=a;else if(8!=u)return;return l},findLongestZeroSequence=function(t){for(var e=null,n=1,r=null,i=0,o=0;o<8;o++)0!==t[o]?(i>n&&(e=r,n=i),r=null,i=0):(null===r&&(r=o),++i);return i>n&&(e=r,n=i),e},serializeHost=function(t){var e,n,r,i;if("number"==typeof t){for(e=[],n=0;n<4;n++)e.unshift(t%256),t=Math.floor(t/256);return e.join(".")}if("object"==typeof t){for(e="",r=findLongestZeroSequence(t),n=0;n<8;n++)i&&0===t[n]||(i&&(i=!1),r===n?(e+=n?":":"::",i=!0):(e+=t[n].toString(16),n<7&&(e+=":")));return"["+e+"]"}return t},C0ControlPercentEncodeSet={},fragmentPercentEncodeSet=objectAssign({},C0ControlPercentEncodeSet,{" ":1,'"':1,"<":1,">":1,"`":1}),pathPercentEncodeSet=objectAssign({},fragmentPercentEncodeSet,{"#":1,"?":1,"{":1,"}":1}),userinfoPercentEncodeSet=objectAssign({},pathPercentEncodeSet,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),percentEncode=function(t,e){var n=stringAt(t,0);return n>32&&n<127&&!has(e,t)?t:encodeURIComponent(t)},specialSchemes={ftp:21,file:null,gopher:70,http:80,https:443,ws:80,wss:443},isSpecial=function(t){return has(specialSchemes,t.scheme)},includesCredentials=function(t){return""!=t.username||""!=t.password},cannotHaveUsernamePasswordPort=function(t){return!t.host||t.cannotBeABaseURL||"file"==t.scheme},isWindowsDriveLetter=function(t,e){var n;return 2==t.length&&ALPHA.test(t.charAt(0))&&(":"==(n=t.charAt(1))||!e&&"|"==n)},startsWithWindowsDriveLetter=function(t){var e;return t.length>1&&isWindowsDriveLetter(t.slice(0,2))&&(2==t.length||"/"===(e=t.charAt(2))||"\\"===e||"?"===e||"#"===e)},shortenURLsPath=function(t){var e=t.path,n=e.length;!n||"file"==t.scheme&&1==n&&isWindowsDriveLetter(e[0],!0)||e.pop()},isSingleDot=function(t){return"."===t||"%2e"===t.toLowerCase()},isDoubleDot=function(t){return".."===(t=t.toLowerCase())||"%2e."===t||".%2e"===t||"%2e%2e"===t},SCHEME_START={},SCHEME={},NO_SCHEME={},SPECIAL_RELATIVE_OR_AUTHORITY={},PATH_OR_AUTHORITY={},RELATIVE={},RELATIVE_SLASH={},SPECIAL_AUTHORITY_SLASHES={},SPECIAL_AUTHORITY_IGNORE_SLASHES={},AUTHORITY={},HOST={},HOSTNAME={},PORT={},FILE={},FILE_SLASH={},FILE_HOST={},PATH_START={},PATH={},CANNOT_BE_A_BASE_URL_PATH={},QUERY={},FRAGMENT={},parseURL=function(t,e,n,r){var i,o,s,a,l=n||SCHEME_START,u=0,c="",h=!1,f=!1,p=!1;for(n||(t.scheme="",t.username="",t.password="",t.host=null,t.port=null,t.path=[],t.query=null,t.fragment=null,t.cannotBeABaseURL=!1,e=e.replace(LEADING_AND_TRAILING_C0_CONTROL_OR_SPACE,"")),e=e.replace(TAB_AND_NEW_LINE,""),i=arrayFrom(e);u<=i.length;){switch(o=i[u],l){case SCHEME_START:if(!o||!ALPHA.test(o)){if(n)return INVALID_SCHEME;l=NO_SCHEME;continue}c+=o.toLowerCase(),l=SCHEME;break;case SCHEME:if(o&&(ALPHANUMERIC.test(o)||"+"==o||"-"==o||"."==o))c+=o.toLowerCase();else{if(":"!=o){if(n)return INVALID_SCHEME;c="",l=NO_SCHEME,u=0;continue}if(n&&(isSpecial(t)!=has(specialSchemes,c)||"file"==c&&(includesCredentials(t)||null!==t.port)||"file"==t.scheme&&!t.host))return;if(t.scheme=c,n)return void(isSpecial(t)&&specialSchemes[t.scheme]==t.port&&(t.port=null));c="","file"==t.scheme?l=FILE:isSpecial(t)&&r&&r.scheme==t.scheme?l=SPECIAL_RELATIVE_OR_AUTHORITY:isSpecial(t)?l=SPECIAL_AUTHORITY_SLASHES:"/"==i[u+1]?(l=PATH_OR_AUTHORITY,u++):(t.cannotBeABaseURL=!0,t.path.push(""),l=CANNOT_BE_A_BASE_URL_PATH)}break;case NO_SCHEME:if(!r||r.cannotBeABaseURL&&"#"!=o)return INVALID_SCHEME;if(r.cannotBeABaseURL&&"#"==o){t.scheme=r.scheme,t.path=r.path.slice(),t.query=r.query,t.fragment="",t.cannotBeABaseURL=!0,l=FRAGMENT;break}l="file"==r.scheme?FILE:RELATIVE;continue;case SPECIAL_RELATIVE_OR_AUTHORITY:if("/"!=o||"/"!=i[u+1]){l=RELATIVE;continue}l=SPECIAL_AUTHORITY_IGNORE_SLASHES,u++;break;case PATH_OR_AUTHORITY:if("/"==o){l=AUTHORITY;break}l=PATH;continue;case RELATIVE:if(t.scheme=r.scheme,o==EOF)t.username=r.username,t.password=r.password,t.host=r.host,t.port=r.port,t.path=r.path.slice(),t.query=r.query;else if("/"==o||"\\"==o&&isSpecial(t))l=RELATIVE_SLASH;else if("?"==o)t.username=r.username,t.password=r.password,t.host=r.host,t.port=r.port,t.path=r.path.slice(),t.query="",l=QUERY;else{if("#"!=o){t.username=r.username,t.password=r.password,t.host=r.host,t.port=r.port,t.path=r.path.slice(),t.path.pop(),l=PATH;continue}t.username=r.username,t.password=r.password,t.host=r.host,t.port=r.port,t.path=r.path.slice(),t.query=r.query,t.fragment="",l=FRAGMENT}break;case RELATIVE_SLASH:if(!isSpecial(t)||"/"!=o&&"\\"!=o){if("/"!=o){t.username=r.username,t.password=r.password,t.host=r.host,t.port=r.port,l=PATH;continue}l=AUTHORITY}else l=SPECIAL_AUTHORITY_IGNORE_SLASHES;break;case SPECIAL_AUTHORITY_SLASHES:if(l=SPECIAL_AUTHORITY_IGNORE_SLASHES,"/"!=o||"/"!=c.charAt(u+1))continue;u++;break;case SPECIAL_AUTHORITY_IGNORE_SLASHES:if("/"!=o&&"\\"!=o){l=AUTHORITY;continue}break;case AUTHORITY:if("@"==o){h&&(c="%40"+c),h=!0,s=arrayFrom(c);for(var d=0;d<s.length;d++){var y=s[d];if(":"!=y||p){var _=percentEncode(y,userinfoPercentEncodeSet);p?t.password+=_:t.username+=_}else p=!0}c=""}else if(o==EOF||"/"==o||"?"==o||"#"==o||"\\"==o&&isSpecial(t)){if(h&&""==c)return INVALID_AUTHORITY;u-=arrayFrom(c).length+1,c="",l=HOST}else c+=o;break;case HOST:case HOSTNAME:if(n&&"file"==t.scheme){l=FILE_HOST;continue}if(":"!=o||f){if(o==EOF||"/"==o||"?"==o||"#"==o||"\\"==o&&isSpecial(t)){if(isSpecial(t)&&""==c)return INVALID_HOST;if(n&&""==c&&(includesCredentials(t)||null!==t.port))return;if(a=parseHost(t,c))return a;if(c="",l=PATH_START,n)return;continue}"["==o?f=!0:"]"==o&&(f=!1),c+=o}else{if(""==c)return INVALID_HOST;if(a=parseHost(t,c))return a;if(c="",l=PORT,n==HOSTNAME)return}break;case PORT:if(!DIGIT.test(o)){if(o==EOF||"/"==o||"?"==o||"#"==o||"\\"==o&&isSpecial(t)||n){if(""!=c){var m=parseInt(c,10);if(m>65535)return INVALID_PORT;t.port=isSpecial(t)&&m===specialSchemes[t.scheme]?null:m,c=""}if(n)return;l=PATH_START;continue}return INVALID_PORT}c+=o;break;case FILE:if(t.scheme="file","/"==o||"\\"==o)l=FILE_SLASH;else{if(!r||"file"!=r.scheme){l=PATH;continue}if(o==EOF)t.host=r.host,t.path=r.path.slice(),t.query=r.query;else if("?"==o)t.host=r.host,t.path=r.path.slice(),t.query="",l=QUERY;else{if("#"!=o){startsWithWindowsDriveLetter(i.slice(u).join(""))||(t.host=r.host,t.path=r.path.slice(),shortenURLsPath(t)),l=PATH;continue}t.host=r.host,t.path=r.path.slice(),t.query=r.query,t.fragment="",l=FRAGMENT}}break;case FILE_SLASH:if("/"==o||"\\"==o){l=FILE_HOST;break}r&&"file"==r.scheme&&!startsWithWindowsDriveLetter(i.slice(u).join(""))&&(isWindowsDriveLetter(r.path[0],!0)?t.path.push(r.path[0]):t.host=r.host),l=PATH;continue;case FILE_HOST:if(o==EOF||"/"==o||"\\"==o||"?"==o||"#"==o){if(!n&&isWindowsDriveLetter(c))l=PATH;else if(""==c){if(t.host="",n)return;l=PATH_START}else{if(a=parseHost(t,c))return a;if("localhost"==t.host&&(t.host=""),n)return;c="",l=PATH_START}continue}c+=o;break;case PATH_START:if(isSpecial(t)){if(l=PATH,"/"!=o&&"\\"!=o)continue}else if(n||"?"!=o)if(n||"#"!=o){if(o!=EOF&&(l=PATH,"/"!=o))continue}else t.fragment="",l=FRAGMENT;else t.query="",l=QUERY;break;case PATH:if(o==EOF||"/"==o||"\\"==o&&isSpecial(t)||!n&&("?"==o||"#"==o)){if(isDoubleDot(c)?(shortenURLsPath(t),"/"==o||"\\"==o&&isSpecial(t)||t.path.push("")):isSingleDot(c)?"/"==o||"\\"==o&&isSpecial(t)||t.path.push(""):("file"==t.scheme&&!t.path.length&&isWindowsDriveLetter(c)&&(t.host&&(t.host=""),c=c.charAt(0)+":"),t.path.push(c)),c="","file"==t.scheme&&(o==EOF||"?"==o||"#"==o))for(;t.path.length>1&&""===t.path[0];)t.path.shift();"?"==o?(t.query="",l=QUERY):"#"==o&&(t.fragment="",l=FRAGMENT)}else c+=percentEncode(o,pathPercentEncodeSet);break;case CANNOT_BE_A_BASE_URL_PATH:"?"==o?(t.query="",l=QUERY):"#"==o?(t.fragment="",l=FRAGMENT):o!=EOF&&(t.path[0]+=percentEncode(o,C0ControlPercentEncodeSet));break;case QUERY:n||"#"!=o?o!=EOF&&("'"==o&&isSpecial(t)?t.query+="%27":t.query+="#"==o?"%23":percentEncode(o,C0ControlPercentEncodeSet)):(t.fragment="",l=FRAGMENT);break;case FRAGMENT:o!=EOF&&(t.fragment+=percentEncode(o,fragmentPercentEncodeSet))}u++}},URLConstructor=function(t){var e,n,r=anInstance(this,URLConstructor,"URL"),i=arguments.length>1?arguments[1]:void 0,o=String(t),s=setInternalState$7(r,{type:"URL"});if(void 0!==i)if(i instanceof URLConstructor)e=getInternalURLState(i);else if(n=parseURL(e={},String(i)))throw TypeError(n);if(n=parseURL(s,o,null,e))throw TypeError(n);var a=s.searchParams=new URLSearchParams$1,l=getInternalSearchParamsState(a);l.updateSearchParams(s.query),l.updateURL=function(){s.query=String(a)||null},descriptors||(r.href=serializeURL.call(r),r.origin=getOrigin.call(r),r.protocol=getProtocol.call(r),r.username=getUsername.call(r),r.password=getPassword.call(r),r.host=getHost.call(r),r.hostname=getHostname.call(r),r.port=getPort.call(r),r.pathname=getPathname.call(r),r.search=getSearch.call(r),r.searchParams=getSearchParams.call(r),r.hash=getHash.call(r))},URLPrototype=URLConstructor.prototype,serializeURL=function(){var t=getInternalURLState(this),e=t.scheme,n=t.username,r=t.password,i=t.host,o=t.port,s=t.path,a=t.query,l=t.fragment,u=e+":";return null!==i?(u+="//",includesCredentials(t)&&(u+=n+(r?":"+r:"")+"@"),u+=serializeHost(i),null!==o&&(u+=":"+o)):"file"==e&&(u+="//"),u+=t.cannotBeABaseURL?s[0]:s.length?"/"+s.join("/"):"",null!==a&&(u+="?"+a),null!==l&&(u+="#"+l),u},getOrigin=function(){var t=getInternalURLState(this),e=t.scheme,n=t.port;if("blob"==e)try{return new URL(e.path[0]).origin}catch(t){return"null"}return"file"!=e&&isSpecial(t)?e+"://"+serializeHost(t.host)+(null!==n?":"+n:""):"null"},getProtocol=function(){return getInternalURLState(this).scheme+":"},getUsername=function(){return getInternalURLState(this).username},getPassword=function(){return getInternalURLState(this).password},getHost=function(){var t=getInternalURLState(this),e=t.host,n=t.port;return null===e?"":null===n?serializeHost(e):serializeHost(e)+":"+n},getHostname=function(){var t=getInternalURLState(this).host;return null===t?"":serializeHost(t)},getPort=function(){var t=getInternalURLState(this).port;return null===t?"":String(t)},getPathname=function(){var t=getInternalURLState(this),e=t.path;return t.cannotBeABaseURL?e[0]:e.length?"/"+e.join("/"):""},getSearch=function(){var t=getInternalURLState(this).query;return t?"?"+t:""},getSearchParams=function(){return getInternalURLState(this).searchParams},getHash=function(){var t=getInternalURLState(this).fragment;return t?"#"+t:""},accessorDescriptor=function(t,e){return{get:t,set:e,configurable:!0,enumerable:!0}};if(descriptors&&objectDefineProperties(URLPrototype,{href:accessorDescriptor(serializeURL,function(t){var e=getInternalURLState(this),n=String(t),r=parseURL(e,n);if(r)throw TypeError(r);getInternalSearchParamsState(e.searchParams).updateSearchParams(e.query)}),origin:accessorDescriptor(getOrigin),protocol:accessorDescriptor(getProtocol,function(t){var e=getInternalURLState(this);parseURL(e,String(t)+":",SCHEME_START)}),username:accessorDescriptor(getUsername,function(t){var e=getInternalURLState(this),n=arrayFrom(String(t));if(!cannotHaveUsernamePasswordPort(e)){e.username="";for(var r=0;r<n.length;r++)e.username+=percentEncode(n[r],userinfoPercentEncodeSet)}}),password:accessorDescriptor(getPassword,function(t){var e=getInternalURLState(this),n=arrayFrom(String(t));if(!cannotHaveUsernamePasswordPort(e)){e.password="";for(var r=0;r<n.length;r++)e.password+=percentEncode(n[r],userinfoPercentEncodeSet)}}),host:accessorDescriptor(getHost,function(t){var e=getInternalURLState(this);e.cannotBeABaseURL||parseURL(e,String(t),HOST)}),hostname:accessorDescriptor(getHostname,function(t){var e=getInternalURLState(this);e.cannotBeABaseURL||parseURL(e,String(t),HOSTNAME)}),port:accessorDescriptor(getPort,function(t){var e=getInternalURLState(this);cannotHaveUsernamePasswordPort(e)||(""==(t=String(t))?e.port=null:parseURL(e,t,PORT))}),pathname:accessorDescriptor(getPathname,function(t){var e=getInternalURLState(this);e.cannotBeABaseURL||(e.path=[],parseURL(e,t+"",PATH_START))}),search:accessorDescriptor(getSearch,function(t){var e=getInternalURLState(this);""==(t=String(t))?e.query=null:("?"==t.charAt(0)&&(t=t.slice(1)),e.query="",parseURL(e,t,QUERY)),getInternalSearchParamsState(e.searchParams).updateSearchParams(e.query)}),searchParams:accessorDescriptor(getSearchParams),hash:accessorDescriptor(getHash,function(t){var e=getInternalURLState(this);""!=(t=String(t))?("#"==t.charAt(0)&&(t=t.slice(1)),e.fragment="",parseURL(e,t,FRAGMENT)):e.fragment=null})}),redefine(URLPrototype,"toJSON",function(){return serializeURL.call(this)},{enumerable:!0}),redefine(URLPrototype,"toString",function(){return serializeURL.call(this)},{enumerable:!0}),NativeURL){var nativeCreateObjectURL=NativeURL.createObjectURL,nativeRevokeObjectURL=NativeURL.revokeObjectURL;nativeCreateObjectURL&&redefine(URLConstructor,"createObjectURL",function(t){return nativeCreateObjectURL.apply(NativeURL,arguments)}),nativeRevokeObjectURL&&redefine(URLConstructor,"revokeObjectURL",function(t){return nativeRevokeObjectURL.apply(NativeURL,arguments)})}setToStringTag(URLConstructor,"URL"),_export({global:!0,forced:!nativeUrl,sham:!descriptors},{URL:URLConstructor}),_export({target:"URL",proto:!0,enumerable:!0},{toJSON:function(){return URL.prototype.toString.call(this)}});var defineProperty$8=objectDefineProperty.f;!descriptors||"lastIndex"in[]||(defineProperty$8(Array.prototype,"lastIndex",{configurable:!0,get:function(){var t=toObject(this),e=toLength(t.length);return 0==e?0:e-1}}),addToUnscopables("lastIndex"));var defineProperty$9=objectDefineProperty.f;!descriptors||"lastItem"in[]||(defineProperty$9(Array.prototype,"lastItem",{configurable:!0,get:function(){var t=toObject(this),e=toLength(t.length);return 0==e?void 0:t[e-1]},set:function(t){var e=toObject(this),n=toLength(e.length);return e[0==n?0:n-1]=t}}),addToUnscopables("lastItem")),_export({target:"Map",stat:!0,forced:isPure},{groupBy:function(t,e){var n=new this;aFunction(e);var r=aFunction(n.has),i=aFunction(n.get),o=aFunction(n.set);return iterate(t,function(t){var s=e(t);r.call(n,s)?i.call(n,s).push(t):o.call(n,s,[t])}),n}}),_export({target:"Map",stat:!0,forced:isPure},{keyBy:function(t,e){var n=new this;aFunction(e);var r=aFunction(n.set);return iterate(t,function(t){r.call(n,e(t),t)}),n}});var collectionDeleteAll=function(){for(var t=anObject(this),e=aFunction(t.delete),n=!0,r=0,i=arguments.length;r<i;r++)n=n&&e.call(t,arguments[r]);return!!n};_export({target:"Map",proto:!0,real:!0,forced:isPure},{deleteAll:function(){return collectionDeleteAll.apply(this,arguments)}});var getMapIterator=function(t){return Map.prototype.entries.call(t)};_export({target:"Map",proto:!0,real:!0,forced:isPure},{every:function(t){for(var e,n,r=anObject(this),i=getMapIterator(r),o=bindContext(t,arguments.length>1?arguments[1]:void 0,3);!(e=i.next()).done;)if(!o((n=e.value)[1],n[0],r))return!1;return!0}}),_export({target:"Map",proto:!0,real:!0,forced:isPure},{filter:function(t){for(var e,n,r,i,o=anObject(this),s=getMapIterator(o),a=bindContext(t,arguments.length>1?arguments[1]:void 0,3),l=new(speciesConstructor(o,getBuiltIn("Map"))),u=aFunction(l.set);!(e=s.next()).done;)a(i=(n=e.value)[1],r=n[0],o)&&u.call(l,r,i);return l}}),_export({target:"Map",proto:!0,real:!0,forced:isPure},{find:function(t){for(var e,n,r,i=anObject(this),o=getMapIterator(i),s=bindContext(t,arguments.length>1?arguments[1]:void 0,3);!(e=o.next()).done;)if(s(r=(n=e.value)[1],n[0],i))return r}}),_export({target:"Map",proto:!0,real:!0,forced:isPure},{findKey:function(t){for(var e,n,r,i=anObject(this),o=getMapIterator(i),s=bindContext(t,arguments.length>1?arguments[1]:void 0,3);!(e=o.next()).done;)if(s((n=e.value)[1],r=n[0],i))return r}});var sameValueZero=function(t,e){return t===e||t!=t&&e!=e};_export({target:"Map",proto:!0,real:!0,forced:isPure},{includes:function(t){for(var e,n=anObject(this),r=getMapIterator(n);!(e=r.next()).done;)if(sameValueZero(e.value[1],t))return!0;return!1}}),_export({target:"Map",proto:!0,real:!0,forced:isPure},{keyOf:function(t){for(var e,n,r=anObject(this),i=getMapIterator(r);!(e=i.next()).done;)if((n=e.value)[1]===t)return n[0]}}),_export({target:"Map",proto:!0,real:!0,forced:isPure},{mapKeys:function(t){for(var e,n,r,i=anObject(this),o=getMapIterator(i),s=bindContext(t,arguments.length>1?arguments[1]:void 0,3),a=new(speciesConstructor(i,getBuiltIn("Map"))),l=aFunction(a.set);!(e=o.next()).done;)n=e.value,l.call(a,s(r=n[1],n[0],i),r);return a}}),_export({target:"Map",proto:!0,real:!0,forced:isPure},{mapValues:function(t){for(var e,n,r,i=anObject(this),o=getMapIterator(i),s=bindContext(t,arguments.length>1?arguments[1]:void 0,3),a=new(speciesConstructor(i,getBuiltIn("Map"))),l=aFunction(a.set);!(e=o.next()).done;)n=e.value,l.call(a,r=n[0],s(n[1],r,i));return a}}),_export({target:"Map",proto:!0,real:!0,forced:isPure},{merge:function(t){for(var e=anObject(this),n=aFunction(e.set),r=0;r<arguments.length;)iterate(arguments[r++],n,e,!0);return e}}),_export({target:"Map",proto:!0,real:!0,forced:isPure},{reduce:function(t){var e,n,r,i=anObject(this),o=getMapIterator(i);if(aFunction(t),arguments.length>1)e=arguments[1];else{if((n=o.next()).done)throw TypeError("Reduce of empty map with no initial value");e=n.value[1]}for(;!(n=o.next()).done;)e=t(e,(r=n.value)[1],r[0],i);return e}}),_export({target:"Map",proto:!0,real:!0,forced:isPure},{some:function(t){for(var e,n,r=anObject(this),i=getMapIterator(r),o=bindContext(t,arguments.length>1?arguments[1]:void 0,3);!(e=i.next()).done;)if(o((n=e.value)[1],n[0],r))return!0;return!1}}),_export({target:"Map",proto:!0,real:!0,forced:isPure},{update:function(t,e){var n=anObject(this);aFunction(e);var r=n.has(t);if(!r&&arguments.length<3)throw TypeError("Updating absent value");var i=r?n.get(t):aFunction(arguments[2])(t,n);return n.set(t,e(i,t,n)),n}});var collectionAddAll=function(){for(var t=anObject(this),e=aFunction(t.add),n=0,r=arguments.length;n<r;n++)e.call(t,arguments[n]);return t};_export({target:"Set",proto:!0,real:!0,forced:isPure},{addAll:function(){return collectionAddAll.apply(this,arguments)}}),_export({target:"Set",proto:!0,real:!0,forced:isPure},{deleteAll:function(){return collectionDeleteAll.apply(this,arguments)}});var getSetIterator=function(t){return Set.prototype.values.call(t)};_export({target:"Set",proto:!0,real:!0,forced:isPure},{every:function(t){for(var e,n,r=anObject(this),i=getSetIterator(r),o=bindContext(t,arguments.length>1?arguments[1]:void 0,3);!(e=i.next()).done;)if(!o(n=e.value,n,r))return!1;return!0}}),_export({target:"Set",proto:!0,real:!0,forced:isPure},{filter:function(t){for(var e,n,r=anObject(this),i=getSetIterator(r),o=bindContext(t,arguments.length>1?arguments[1]:void 0,3),s=new(speciesConstructor(r,getBuiltIn("Set"))),a=aFunction(s.add);!(e=i.next()).done;)o(n=e.value,n,r)&&a.call(s,n);return s}}),_export({target:"Set",proto:!0,real:!0,forced:isPure},{find:function(t){for(var e,n,r=anObject(this),i=getSetIterator(r),o=bindContext(t,arguments.length>1?arguments[1]:void 0,3);!(e=i.next()).done;)if(o(n=e.value,n,r))return n}}),_export({target:"Set",proto:!0,real:!0,forced:isPure},{join:function(t){for(var e,n=anObject(this),r=getSetIterator(n),i=void 0===t?",":String(t),o=[];!(e=r.next()).done;)o.push(e.value);return o.join(i)}}),_export({target:"Set",proto:!0,real:!0,forced:isPure},{map:function(t){for(var e,n,r=anObject(this),i=getSetIterator(r),o=bindContext(t,arguments.length>1?arguments[1]:void 0,3),s=new(speciesConstructor(r,getBuiltIn("Set"))),a=aFunction(s.add);!(e=i.next()).done;)a.call(s,o(n=e.value,n,r));return s}}),_export({target:"Set",proto:!0,real:!0,forced:isPure},{reduce:function(t){var e,n,r,i=anObject(this),o=getSetIterator(i);if(aFunction(t),arguments.length>1)e=arguments[1];else{if((n=o.next()).done)throw TypeError("Reduce of empty set with no initial value");e=n.value}for(;!(n=o.next()).done;)e=t(e,r=n.value,r,i);return e}}),_export({target:"Set",proto:!0,real:!0,forced:isPure},{some:function(t){for(var e,n,r=anObject(this),i=getSetIterator(r),o=bindContext(t,arguments.length>1?arguments[1]:void 0,3);!(e=i.next()).done;)if(o(n=e.value,n,r))return!0;return!1}}),_export({target:"WeakMap",proto:!0,real:!0,forced:isPure},{deleteAll:function(){return collectionDeleteAll.apply(this,arguments)}}),_export({target:"WeakSet",proto:!0,real:!0,forced:isPure},{addAll:function(){return collectionAddAll.apply(this,arguments)}}),_export({target:"WeakSet",proto:!0,real:!0,forced:isPure},{deleteAll:function(){return collectionDeleteAll.apply(this,arguments)}});var collectionFrom=function(t){var e,n,r,i,o=arguments[1];return aFunction(this),(e=void 0!==o)&&aFunction(o),null==t?new this:(n=[],e?(r=0,i=bindContext(o,arguments[2],2),iterate(t,function(t){n.push(i(t,r++))})):iterate(t,n.push,n),new this(n))};_export({target:"Map",stat:!0},{from:collectionFrom});var collectionOf=function(){for(var t=arguments.length,e=new Array(t);t--;)e[t]=arguments[t];return new this(e)};_export({target:"Map",stat:!0},{of:collectionOf}),_export({target:"Set",stat:!0},{from:collectionFrom}),_export({target:"Set",stat:!0},{of:collectionOf}),_export({target:"WeakMap",stat:!0},{from:collectionFrom}),_export({target:"WeakMap",stat:!0},{of:collectionOf}),_export({target:"WeakSet",stat:!0},{from:collectionFrom}),_export({target:"WeakSet",stat:!0},{of:collectionOf});var min$6=Math.min,max$4=Math.max;_export({target:"Math",stat:!0},{clamp:function(t,e,n){return min$6(n,max$4(e,t))}}),_export({target:"Math",stat:!0},{DEG_PER_RAD:Math.PI/180});var RAD_PER_DEG=180/Math.PI;_export({target:"Math",stat:!0},{degrees:function(t){return t*RAD_PER_DEG}});var mathScale=Math.scale||function(t,e,n,r,i){return 0===arguments.length||t!=t||e!=e||n!=n||r!=r||i!=i?NaN:t===1/0||t===-1/0?t:(t-e)*(i-r)/(n-e)+r};_export({target:"Math",stat:!0},{fscale:function(t,e,n,r,i){return mathFround(mathScale(t,e,n,r,i))}}),_export({target:"Math",stat:!0},{RAD_PER_DEG:180/Math.PI});var DEG_PER_RAD=Math.PI/180;_export({target:"Math",stat:!0},{radians:function(t){return t*DEG_PER_RAD}}),_export({target:"Math",stat:!0},{scale:mathScale}),_export({target:"Math",stat:!0},{signbit:function(t){return(t=+t)!=t?t:0==t?1/t==1/0:t>0}});var INVALID_NUMBER_REPRESENTATION="Invalid number representation",INVALID_RADIX="Invalid radix",valid=/^[0-9a-z]+$/;_export({target:"Number",stat:!0},{fromString:function(t,e){var n,r,i=1;if("string"!=typeof t)throw TypeError(INVALID_NUMBER_REPRESENTATION);if(!t.length)throw SyntaxError(INVALID_NUMBER_REPRESENTATION);if("-"==t.charAt(0)&&(i=-1,!(t=t.slice(1)).length))throw SyntaxError(INVALID_NUMBER_REPRESENTATION);if((n=void 0===e?10:toInteger(e))<2||n>36)throw RangeError(INVALID_RADIX);if(!valid.test(t)||(r=_parseInt(t,n)).toString(n)!==t)throw SyntaxError(INVALID_NUMBER_REPRESENTATION);return i*r}});var defineProperty$a=objectDefineProperty.f,getInternalState$4=internalState.get,setInternalState$8=internalState.set,OBSERVABLE=wellKnownSymbol("observable"),BREAK=iterate.BREAK,getMethod=function(t){return null==t?void 0:aFunction(t)},cleanupSubscription=function(t){var e=t.cleanup;if(e){t.cleanup=void 0;try{e()}catch(t){hostReportErrors(t)}}},subscriptionClosed=function(t){return void 0===t.observer},close=function(t,e){if(!descriptors){t.closed=!0;var n=e.subscriptionObserver;n&&(n.closed=!0)}e.observer=void 0},Subscription=function(t,e){var n,r=setInternalState$8(this,{cleanup:void 0,observer:anObject(t),subscriptionObserver:void 0});descriptors||(this.closed=!1);try{(n=getMethod(t.start))&&n.call(t,this)}catch(t){hostReportErrors(t)}if(!subscriptionClosed(r)){var i=r.subscriptionObserver=new SubscriptionObserver(this);try{var o=e(i),s=o;null!=o&&(r.cleanup="function"==typeof o.unsubscribe?function(){s.unsubscribe()}:aFunction(o))}catch(t){return void i.error(t)}subscriptionClosed(r)&&cleanupSubscription(r)}};Subscription.prototype=redefineAll({},{unsubscribe:function(){var t=getInternalState$4(this);subscriptionClosed(t)||(close(this,t),cleanupSubscription(t))}}),descriptors&&defineProperty$a(Subscription.prototype,"closed",{configurable:!0,get:function(){return subscriptionClosed(getInternalState$4(this))}});var SubscriptionObserver=function(t){setInternalState$8(this,{subscription:t}),descriptors||(this.closed=!1)};SubscriptionObserver.prototype=redefineAll({},{next:function(t){var e=getInternalState$4(getInternalState$4(this).subscription);if(!subscriptionClosed(e)){var n=e.observer;try{var r=getMethod(n.next);r&&r.call(n,t)}catch(t){hostReportErrors(t)}}},error:function(t){var e=getInternalState$4(this).subscription,n=getInternalState$4(e);if(!subscriptionClosed(n)){var r=n.observer;close(e,n);try{var i=getMethod(r.error);i?i.call(r,t):hostReportErrors(t)}catch(t){hostReportErrors(t)}cleanupSubscription(n)}},complete:function(){var t=getInternalState$4(this).subscription,e=getInternalState$4(t);if(!subscriptionClosed(e)){var n=e.observer;close(t,e);try{var r=getMethod(n.complete);r&&r.call(n)}catch(t){hostReportErrors(t)}cleanupSubscription(e)}}}),descriptors&&defineProperty$a(SubscriptionObserver.prototype,"closed",{configurable:!0,get:function(){return subscriptionClosed(getInternalState$4(getInternalState$4(this).subscription))}});var $Observable=function(t){anInstance(this,$Observable,"Observable"),setInternalState$8(this,{subscriber:aFunction(t)})};redefineAll($Observable.prototype,{subscribe:function(t){var e=arguments.length;return new Subscription("function"==typeof t?{next:t,error:e>1?arguments[1]:void 0,complete:e>2?arguments[2]:void 0}:isObject(t)?t:{},getInternalState$4(this).subscriber)}}),redefineAll($Observable,{from:function(t){var e="function"==typeof this?this:$Observable,n=getMethod(anObject(t)[OBSERVABLE]);if(n){var r=anObject(n.call(t));return r.constructor===e?r:new e(function(t){return r.subscribe(t)})}var i=getIterator(t);return new e(function(t){iterate(i,function(e){if(t.next(e),t.closed)return BREAK},void 0,!1,!0),t.complete()})},of:function(){for(var t=0,e=arguments.length,n=new Array(e);t<e;)n[t]=arguments[t++];return new("function"==typeof this?this:$Observable)(function(t){for(var e=0;e<n.length;++e)if(t.next(n[e]),t.closed)return;t.complete()})}}),hide($Observable.prototype,OBSERVABLE,function(){return this}),_export({global:!0},{Observable:$Observable}),setSpecies("Observable"),defineWellKnownSymbol("observable"),defineWellKnownSymbol("patternMatch"),_export({target:"Promise",stat:!0},{try:function(t){var e=newPromiseCapability.f(this),n=perform(t);return(n.error?e.reject:e.resolve)(n.value),e.promise}});var Node=function(){this.object=null,this.symbol=null,this.primitives=null,this.objectsByIndex=objectCreate(null)};Node.prototype.get=function(t,e){return this[t]||(this[t]=e())},Node.prototype.next=function(t,e,n){var r=n?this.objectsByIndex[t]||(this.objectsByIndex[t]=new es_weakMap):this.primitives||(this.primitives=new es_map),i=r.get(e);return i||r.set(e,i=new Node),i};var root=new Node,compositeKey=function(){var t,e,n=root,r=arguments.length;for(t=0;t<r;t++)isObject(e=arguments[t])&&(n=n.next(t,e,!0));if(this===Object&&n===root)throw TypeError("Composite keys must contain a non-primitive component");for(t=0;t<r;t++)isObject(e=arguments[t])||(n=n.next(t,e,!1));return n},initializer=function(){var t=getBuiltIn("Object","freeze");return t?t(objectCreate(null)):objectCreate(null)};_export({global:!0},{compositeKey:function(){return compositeKey.apply(Object,arguments).get("object",initializer)}}),_export({global:!0},{compositeSymbol:function(){return 1===arguments.length&&"string"==typeof arguments[0]?getBuiltIn("Symbol").for(arguments[0]):compositeKey.apply(null,arguments).get("symbol",getBuiltIn("Symbol"))}});var SEEDED_RANDOM="Seeded Random",SEEDED_RANDOM_GENERATOR=SEEDED_RANDOM+" Generator",setInternalState$9=internalState.set,getInternalState$5=internalState.getterFor(SEEDED_RANDOM_GENERATOR),SEED_TYPE_ERROR='Math.seededPRNG() argument should have a "seed" field with a finite value.',$SeededRandomGenerator=createIteratorConstructor(function(t){setInternalState$9(this,{type:SEEDED_RANDOM_GENERATOR,seed:t%2147483647})},SEEDED_RANDOM,function(){var t=getInternalState$5(this);return{value:(1073741823&(t.seed=(1103515245*t.seed+12345)%2147483647))/1073741823,done:!1}});_export({target:"Math",stat:!0,forced:!0},{seededPRNG:function(t){var e=anObject(t).seed;if(!numberIsFinite(e))throw TypeError(SEED_TYPE_ERROR);return new $SeededRandomGenerator(e)}});var STRING_ITERATOR$1="String Iterator",setInternalState$a=internalState.set,getInternalState$6=internalState.getterFor(STRING_ITERATOR$1),$StringIterator=createIteratorConstructor(function(t){setInternalState$a(this,{type:STRING_ITERATOR$1,string:t,index:0})},"String",function(){var t,e=getInternalState$6(this),n=e.string,r=e.index;return r>=n.length?{value:void 0,done:!0}:(t=stringAt(n,r,!0),e.index+=t.length,{value:{codePoint:stringAt(t,0),position:r},done:!1})});_export({target:"String",proto:!0},{codePoints:function(){return new $StringIterator(String(requireObjectCoercible(this)))}}),_export({target:"String",proto:!0},{replaceAll:function(t,e){var n,r,i=requireObjectCoercible(this);return isRegexp(t)?(n=~(r=regexpFlags.call(t)).indexOf("g")?t:new(speciesConstructor(t,RegExp))(t.source,r+"g"),String(i).replace(n,e)):String(i).split(t).join(e)}}),defineWellKnownSymbol("dispose"),_export({target:"Set",proto:!0,real:!0,forced:isPure},{difference:function(t){var e=anObject(this),n=new(speciesConstructor(e,getBuiltIn("Set")))(e),r=aFunction(n.delete);return iterate(t,function(t){r.call(n,t)}),n}}),_export({target:"Set",proto:!0,real:!0,forced:isPure},{intersection:function(t){var e=anObject(this),n=new(speciesConstructor(e,getBuiltIn("Set"))),r=aFunction(e.has),i=aFunction(n.add);return iterate(t,function(t){r.call(e,t)&&i.call(n,t)}),n}});var BREAK$1=iterate.BREAK;_export({target:"Set",proto:!0,real:!0,forced:isPure},{isDisjointFrom:function(t){var e=anObject(this),n=aFunction(e.has);return iterate(t,function(t){if(!0===n.call(e,t))return BREAK$1})!==BREAK$1}});var BREAK$2=iterate.BREAK;_export({target:"Set",proto:!0,real:!0,forced:isPure},{isSubsetOf:function(t){var e=getIterator(this),n=anObject(t),r=n.has;return"function"!=typeof r&&(n=new(getBuiltIn("Set"))(t),r=aFunction(n.has)),iterate(e,function(t){if(!1===r.call(n,t))return BREAK$2},void 0,!1,!0)!==BREAK$2}});var BREAK$3=iterate.BREAK;_export({target:"Set",proto:!0,real:!0,forced:isPure},{isSupersetOf:function(t){var e=anObject(this),n=aFunction(e.has);return iterate(t,function(t){if(!1===n.call(e,t))return BREAK$3})!==BREAK$3}}),_export({target:"Set",proto:!0,real:!0,forced:isPure},{union:function(t){var e=anObject(this),n=new(speciesConstructor(e,getBuiltIn("Set")))(e);return iterate(t,aFunction(n.add),n),n}}),_export({target:"Set",proto:!0,real:!0,forced:isPure},{symmetricDifference:function(t){var e=anObject(this),n=new(speciesConstructor(e,getBuiltIn("Set")))(e),r=aFunction(n.delete),i=aFunction(n.add);return iterate(t,function(t){r.call(n,t)||i.call(n,t)}),n}}),_export({target:"Promise",stat:!0},{allSettled:function(t){var e=this,n=newPromiseCapability.f(e),r=n.resolve,i=n.reject,o=perform(function(){var n=[],i=0,o=1;iterate(t,function(t){var s=i++,a=!1;n.push(void 0),o++,e.resolve(t).then(function(t){a||(a=!0,n[s]={status:"fulfilled",value:t},--o||r(n))},function(t){a||(a=!0,n[s]={status:"rejected",reason:t},--o||r(n))})}),--o||r(n)});return o.error&&i(o.value),n.promise}}),_export({global:!0},{globalThis:global$1});var MATCH_ALL=wellKnownSymbol("matchAll"),REGEXP_STRING="RegExp String",REGEXP_STRING_ITERATOR=REGEXP_STRING+" Iterator",setInternalState$b=internalState.set,getInternalState$7=internalState.getterFor(REGEXP_STRING_ITERATOR),RegExpPrototype$1=RegExp.prototype,regExpBuiltinExec=RegExpPrototype$1.exec,regExpExec=function(t,e){var n,r=t.exec;if("function"==typeof r){if("object"!=typeof(n=r.call(t,e)))throw TypeError("Incorrect exec result");return n}return regExpBuiltinExec.call(t,e)},$RegExpStringIterator=createIteratorConstructor(function(t,e,n,r){setInternalState$b(this,{type:REGEXP_STRING_ITERATOR,regexp:t,string:e,global:n,unicode:r,done:!1})},REGEXP_STRING,function(){var t=getInternalState$7(this);if(t.done)return{value:void 0,done:!0};var e=t.regexp,n=t.string,r=regExpExec(e,n);return null===r?{value:void 0,done:t.done=!0}:t.global?(""==String(r[0])&&(e.lastIndex=advanceStringIndex(n,toLength(e.lastIndex),t.unicode)),{value:r,done:!1}):(t.done=!0,{value:r,done:!1})}),$matchAll=function(t){var e,n,r,i,o,s=anObject(this),a=String(t);return e=speciesConstructor(s,RegExp),n="flags"in RegExpPrototype$1?String(s.flags):regexpFlags.call(s),r=new e(e===RegExp?s.source:s,n),i=!!~n.indexOf("g"),o=!!~n.indexOf("u"),r.lastIndex=toLength(s.lastIndex),new $RegExpStringIterator(r,a,i,o)};_export({target:"String",proto:!0},{matchAll:function(t){var e,n,r=requireObjectCoercible(this);return null!=t&&(void 0===(n=t[MATCH_ALL])&&isPure&&"RegExp"==classof(t)&&(n=$matchAll),null!=n)?aFunction(n).call(t,r):(e=String(r),new RegExp(t,"g")[MATCH_ALL](e))}}),MATCH_ALL in RegExpPrototype$1||hide(RegExpPrototype$1,MATCH_ALL,$matchAll);var domIterables={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0};for(var COLLECTION_NAME in domIterables){var Collection=global$1[COLLECTION_NAME],CollectionPrototype=Collection&&Collection.prototype;if(CollectionPrototype&&CollectionPrototype.forEach!==arrayForEach)try{hide(CollectionPrototype,"forEach",arrayForEach)}catch(t){CollectionPrototype.forEach=arrayForEach}}var ITERATOR$8=wellKnownSymbol("iterator"),TO_STRING_TAG$4=wellKnownSymbol("toStringTag"),ArrayValues=es_array_iterator.values;for(var COLLECTION_NAME$1 in domIterables){var Collection$1=global$1[COLLECTION_NAME$1],CollectionPrototype$1=Collection$1&&Collection$1.prototype;if(CollectionPrototype$1){if(CollectionPrototype$1[ITERATOR$8]!==ArrayValues)try{hide(CollectionPrototype$1,ITERATOR$8,ArrayValues)}catch(t){CollectionPrototype$1[ITERATOR$8]=ArrayValues}if(CollectionPrototype$1[TO_STRING_TAG$4]||hide(CollectionPrototype$1,TO_STRING_TAG$4,COLLECTION_NAME$1),domIterables[COLLECTION_NAME$1])for(var METHOD_NAME in es_array_iterator)if(CollectionPrototype$1[METHOD_NAME]!==es_array_iterator[METHOD_NAME])try{hide(CollectionPrototype$1,METHOD_NAME,es_array_iterator[METHOD_NAME])}catch(t){CollectionPrototype$1[METHOD_NAME]=es_array_iterator[METHOD_NAME]}}}var FORCED$v=!global$1.setImmediate||!global$1.clearImmediate;_export({global:!0,bind:!0,enumerable:!0,forced:FORCED$v},{setImmediate:task.set,clearImmediate:task.clear});var process$3=global$1.process,isNode="process"==classofRaw(process$3);_export({global:!0,enumerable:!0,noTargetGet:!0},{queueMicrotask:function(t){var e=isNode&&process$3.domain;microtask(e?e.bind(t):t)}});var slice=[].slice,MSIE=/MSIE .\./.test(userAgent),wrap$1=function(t){return function(e,n){var r=arguments.length>2,i=!!r&&slice.call(arguments,2);return t(r?function(){("function"==typeof e?e:Function(e)).apply(this,i)}:e,n)}};_export({global:!0,bind:!0,forced:MSIE},{setTimeout:wrap$1(global$1.setTimeout),setInterval:wrap$1(global$1.setInterval)});var runtime_1=createCommonjsModule(function(t){var e=function(t){var e,n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(t,e,n){t[e]=n.value},o="function"==typeof Symbol?Symbol:{},s=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function u(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,n){return t[e]=n}}function c(t,e,n,r){var o=e&&e.prototype instanceof m?e:m,s=Object.create(o.prototype),a=new C(r||[]);return i(s,"_invoke",{value:T(t,n,a)}),s}function h(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=c;var f="suspendedStart",p="suspendedYield",d="executing",y="completed",_={};function m(){}function g(){}function v(){}var P={};u(P,s,function(){return this});var b=Object.getPrototypeOf,S=b&&b(b(L([])));S&&S!==n&&r.call(S,s)&&(P=S);var E=v.prototype=m.prototype=Object.create(P);function x(t){["next","throw","return"].forEach(function(e){u(t,e,function(t){return this._invoke(e,t)})})}function I(t,e){var n;i(this,"_invoke",{value:function(i,o){function s(){return new e(function(n,s){!function n(i,o,s,a){var l=h(t[i],t,o);if("throw"!==l.type){var u=l.arg,c=u.value;return c&&"object"==typeof c&&r.call(c,"__await")?e.resolve(c.__await).then(function(t){n("next",t,s,a)},function(t){n("throw",t,s,a)}):e.resolve(c).then(function(t){u.value=t,s(u)},function(t){return n("throw",t,s,a)})}a(l.arg)}(i,o,n,s)})}return n=n?n.then(s,s):s()}})}function T(t,e,n){var r=f;return function(i,o){if(r===d)throw new Error("Generator is already running");if(r===y){if("throw"===i)throw o;return R()}for(n.method=i,n.arg=o;;){var s=n.delegate;if(s){var a=O(s,n);if(a){if(a===_)continue;return a}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===f)throw r=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=d;var l=h(t,e,n);if("normal"===l.type){if(r=n.done?y:p,l.arg===_)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(r=y,n.method="throw",n.arg=l.arg)}}}function O(t,n){var r=n.method,i=t.iterator[r];if(i===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,O(t,n),"throw"===n.method)?_:("return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),_);var o=h(i,t.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,_;var s=o.arg;return s?s.done?(n[t.resultName]=s.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,_):s:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,_)}function w(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function A(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(w,this),this.reset(!0)}function L(t){if(t){var n=t[s];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function n(){for(;++i<t.length;)if(r.call(t,i))return n.value=t[i],n.done=!1,n;return n.value=e,n.done=!0,n};return o.next=o}}return{next:R}}function R(){return{value:e,done:!0}}return g.prototype=v,i(E,"constructor",{value:v,configurable:!0}),i(v,"constructor",{value:g,configurable:!0}),g.displayName=u(v,l,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,u(t,l,"GeneratorFunction")),t.prototype=Object.create(E),t},t.awrap=function(t){return{__await:t}},x(I.prototype),u(I.prototype,a,function(){return this}),t.AsyncIterator=I,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var s=new I(c(e,n,r,i),o);return t.isGeneratorFunction(n)?s:s.next().then(function(t){return t.done?t.value:s.next()})},x(E),u(E,l,"Generator"),u(E,s,function(){return this}),u(E,"toString",function(){return"[object Generator]"}),t.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},t.values=L,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(A),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function i(r,i){return a.type="throw",a.arg=t,n.next=r,i&&(n.method="next",n.arg=e),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var s=this.tryEntries[o],a=s.completion;if("root"===s.tryLoc)return i("end");if(s.tryLoc<=this.prev){var l=r.call(s,"catchLoc"),u=r.call(s,"finallyLoc");if(l&&u){if(this.prev<s.catchLoc)return i(s.catchLoc,!0);if(this.prev<s.finallyLoc)return i(s.finallyLoc)}else if(l){if(this.prev<s.catchLoc)return i(s.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return i(s.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=t,s.arg=e,o?(this.method="next",this.next=o.finallyLoc,_):this.complete(s)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),_},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),A(n),_}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;A(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:L(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),_}},t}(t.exports);try{regeneratorRuntime=e}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=e:Function("r","regeneratorRuntime = r")(e)}}),leafletSrc=createCommonjsModule(function(t,e){!function(t){var e=Object.freeze;function n(t){var e,n,r,i;for(n=1,r=arguments.length;n<r;n++)for(e in i=arguments[n])t[e]=i[e];return t}Object.freeze=function(t){return t};var r=Object.create||function(){function t(){}return function(e){return t.prototype=e,new t}}();function i(t,e){var n=Array.prototype.slice;if(t.bind)return t.bind.apply(t,n.call(arguments,1));var r=n.call(arguments,2);return function(){return t.apply(e,r.length?r.concat(n.call(arguments)):arguments)}}var o=0;function s(t){return t._leaflet_id=t._leaflet_id||++o,t._leaflet_id}function a(t,e,n){var r,i,o,s;return s=function(){r=!1,i&&(o.apply(n,i),i=!1)},o=function(){r?i=arguments:(t.apply(n,arguments),setTimeout(s,e),r=!0)}}function l(t,e,n){var r=e[1],i=e[0],o=r-i;return t===r&&n?t:((t-i)%o+o)%o+i}function u(){return!1}function c(t,e){var n=Math.pow(10,void 0===e?6:e);return Math.round(t*n)/n}function h(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function f(t){return h(t).split(/\s+/)}function p(t,e){for(var n in t.hasOwnProperty("options")||(t.options=t.options?r(t.options):{}),e)t.options[n]=e[n];return t.options}function d(t,e,n){var r=[];for(var i in t)r.push(encodeURIComponent(n?i.toUpperCase():i)+"="+encodeURIComponent(t[i]));return(e&&-1!==e.indexOf("?")?"&":"?")+r.join("&")}var y=/\{ *([\w_-]+) *\}/g;function _(t,e){return t.replace(y,function(t,n){var r=e[n];if(void 0===r)throw new Error("No value provided for variable "+t);return"function"==typeof r&&(r=r(e)),r})}var m=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)};function g(t,e){for(var n=0;n<t.length;n++)if(t[n]===e)return n;return-1}var v="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=";function P(t){return window["webkit"+t]||window["moz"+t]||window["ms"+t]}var b=0;function S(t){var e=+new Date,n=Math.max(0,16-(e-b));return b=e+n,window.setTimeout(t,n)}var E=window.requestAnimationFrame||P("RequestAnimationFrame")||S,x=window.cancelAnimationFrame||P("CancelAnimationFrame")||P("CancelRequestAnimationFrame")||function(t){window.clearTimeout(t)};function I(t,e,n){if(!n||E!==S)return E.call(window,i(t,e));t.call(e)}function T(t){t&&x.call(window,t)}var O=(Object.freeze||Object)({freeze:e,extend:n,create:r,bind:i,lastId:o,stamp:s,throttle:a,wrapNum:l,falseFn:u,formatNum:c,trim:h,splitWords:f,setOptions:p,getParamString:d,template:_,isArray:m,indexOf:g,emptyImageUrl:v,requestFn:E,cancelFn:x,requestAnimFrame:I,cancelAnimFrame:T});function w(){}w.extend=function(t){var e=function(){this.initialize&&this.initialize.apply(this,arguments),this.callInitHooks()},i=e.__super__=this.prototype,o=r(i);for(var s in o.constructor=e,e.prototype=o,this)this.hasOwnProperty(s)&&"prototype"!==s&&"__super__"!==s&&(e[s]=this[s]);return t.statics&&(n(e,t.statics),delete t.statics),t.includes&&(function(t){if("undefined"!=typeof L&&L&&L.Mixin){t=m(t)?t:[t];for(var e=0;e<t.length;e++)t[e]===L.Mixin.Events&&console.warn("Deprecated include of L.Mixin.Events: this property will be removed in future releases, please inherit from L.Evented instead.",(new Error).stack)}}(t.includes),n.apply(null,[o].concat(t.includes)),delete t.includes),o.options&&(t.options=n(r(o.options),t.options)),n(o,t),o._initHooks=[],o.callInitHooks=function(){if(!this._initHooksCalled){i.callInitHooks&&i.callInitHooks.call(this),this._initHooksCalled=!0;for(var t=0,e=o._initHooks.length;t<e;t++)o._initHooks[t].call(this)}},e},w.include=function(t){return n(this.prototype,t),this},w.mergeOptions=function(t){return n(this.prototype.options,t),this},w.addInitHook=function(t){var e=Array.prototype.slice.call(arguments,1),n="function"==typeof t?t:function(){this[t].apply(this,e)};return this.prototype._initHooks=this.prototype._initHooks||[],this.prototype._initHooks.push(n),this};var A={on:function(t,e,n){if("object"==typeof t)for(var r in t)this._on(r,t[r],e);else{t=f(t);for(var i=0,o=t.length;i<o;i++)this._on(t[i],e,n)}return this},off:function(t,e,n){if(t)if("object"==typeof t)for(var r in t)this._off(r,t[r],e);else{t=f(t);for(var i=0,o=t.length;i<o;i++)this._off(t[i],e,n)}else delete this._events;return this},_on:function(t,e,n){this._events=this._events||{};var r=this._events[t];r||(r=[],this._events[t]=r),n===this&&(n=void 0);for(var i={fn:e,ctx:n},o=r,s=0,a=o.length;s<a;s++)if(o[s].fn===e&&o[s].ctx===n)return;o.push(i)},_off:function(t,e,n){var r,i,o;if(this._events&&(r=this._events[t]))if(e){if(n===this&&(n=void 0),r)for(i=0,o=r.length;i<o;i++){var s=r[i];if(s.ctx===n&&s.fn===e)return s.fn=u,this._firingCount&&(this._events[t]=r=r.slice()),void r.splice(i,1)}}else{for(i=0,o=r.length;i<o;i++)r[i].fn=u;delete this._events[t]}},fire:function(t,e,r){if(!this.listens(t,r))return this;var i=n({},e,{type:t,target:this,sourceTarget:e&&e.sourceTarget||this});if(this._events){var o=this._events[t];if(o){this._firingCount=this._firingCount+1||1;for(var s=0,a=o.length;s<a;s++){var l=o[s];l.fn.call(l.ctx||this,i)}this._firingCount--}}return r&&this._propagateEvent(i),this},listens:function(t,e){var n=this._events&&this._events[t];if(n&&n.length)return!0;if(e)for(var r in this._eventParents)if(this._eventParents[r].listens(t,e))return!0;return!1},once:function(t,e,n){if("object"==typeof t){for(var r in t)this.once(r,t[r],e);return this}var o=i(function(){this.off(t,e,n).off(t,o,n)},this);return this.on(t,e,n).on(t,o,n)},addEventParent:function(t){return this._eventParents=this._eventParents||{},this._eventParents[s(t)]=t,this},removeEventParent:function(t){return this._eventParents&&delete this._eventParents[s(t)],this},_propagateEvent:function(t){for(var e in this._eventParents)this._eventParents[e].fire(t.type,n({layer:t.target,propagatedFrom:t.target},t),!0)}};A.addEventListener=A.on,A.removeEventListener=A.clearAllEventListeners=A.off,A.addOneTimeEventListener=A.once,A.fireEvent=A.fire,A.hasEventListeners=A.listens;var C=w.extend(A);function R(t,e,n){this.x=n?Math.round(t):t,this.y=n?Math.round(e):e}var N=Math.trunc||function(t){return t>0?Math.floor(t):Math.ceil(t)};function M(t,e,n){return t instanceof R?t:m(t)?new R(t[0],t[1]):null==t?t:"object"==typeof t&&"x"in t&&"y"in t?new R(t.x,t.y):new R(t,e,n)}function D(t,e){if(t)for(var n=e?[t,e]:t,r=0,i=n.length;r<i;r++)this.extend(n[r])}function $(t,e){return!t||t instanceof D?t:new D(t,e)}function j(t,e){if(t)for(var n=e?[t,e]:t,r=0,i=n.length;r<i;r++)this.extend(n[r])}function B(t,e){return t instanceof j?t:new j(t,e)}function F(t,e,n){if(isNaN(t)||isNaN(e))throw new Error("Invalid LatLng object: ("+t+", "+e+")");this.lat=+t,this.lng=+e,void 0!==n&&(this.alt=+n)}function k(t,e,n){return t instanceof F?t:m(t)&&"object"!=typeof t[0]?3===t.length?new F(t[0],t[1],t[2]):2===t.length?new F(t[0],t[1]):null:null==t?t:"object"==typeof t&&"lat"in t?new F(t.lat,"lng"in t?t.lng:t.lon,t.alt):void 0===e?null:new F(t,e,n)}R.prototype={clone:function(){return new R(this.x,this.y)},add:function(t){return this.clone()._add(M(t))},_add:function(t){return this.x+=t.x,this.y+=t.y,this},subtract:function(t){return this.clone()._subtract(M(t))},_subtract:function(t){return this.x-=t.x,this.y-=t.y,this},divideBy:function(t){return this.clone()._divideBy(t)},_divideBy:function(t){return this.x/=t,this.y/=t,this},multiplyBy:function(t){return this.clone()._multiplyBy(t)},_multiplyBy:function(t){return this.x*=t,this.y*=t,this},scaleBy:function(t){return new R(this.x*t.x,this.y*t.y)},unscaleBy:function(t){return new R(this.x/t.x,this.y/t.y)},round:function(){return this.clone()._round()},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},floor:function(){return this.clone()._floor()},_floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},ceil:function(){return this.clone()._ceil()},_ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this},trunc:function(){return this.clone()._trunc()},_trunc:function(){return this.x=N(this.x),this.y=N(this.y),this},distanceTo:function(t){var e=(t=M(t)).x-this.x,n=t.y-this.y;return Math.sqrt(e*e+n*n)},equals:function(t){return(t=M(t)).x===this.x&&t.y===this.y},contains:function(t){return t=M(t),Math.abs(t.x)<=Math.abs(this.x)&&Math.abs(t.y)<=Math.abs(this.y)},toString:function(){return"Point("+c(this.x)+", "+c(this.y)+")"}},D.prototype={extend:function(t){return t=M(t),this.min||this.max?(this.min.x=Math.min(t.x,this.min.x),this.max.x=Math.max(t.x,this.max.x),this.min.y=Math.min(t.y,this.min.y),this.max.y=Math.max(t.y,this.max.y)):(this.min=t.clone(),this.max=t.clone()),this},getCenter:function(t){return new R((this.min.x+this.max.x)/2,(this.min.y+this.max.y)/2,t)},getBottomLeft:function(){return new R(this.min.x,this.max.y)},getTopRight:function(){return new R(this.max.x,this.min.y)},getTopLeft:function(){return this.min},getBottomRight:function(){return this.max},getSize:function(){return this.max.subtract(this.min)},contains:function(t){var e,n;return(t="number"==typeof t[0]||t instanceof R?M(t):$(t))instanceof D?(e=t.min,n=t.max):e=n=t,e.x>=this.min.x&&n.x<=this.max.x&&e.y>=this.min.y&&n.y<=this.max.y},intersects:function(t){t=$(t);var e=this.min,n=this.max,r=t.min,i=t.max,o=i.x>=e.x&&r.x<=n.x,s=i.y>=e.y&&r.y<=n.y;return o&&s},overlaps:function(t){t=$(t);var e=this.min,n=this.max,r=t.min,i=t.max,o=i.x>e.x&&r.x<n.x,s=i.y>e.y&&r.y<n.y;return o&&s},isValid:function(){return!(!this.min||!this.max)}},j.prototype={extend:function(t){var e,n,r=this._southWest,i=this._northEast;if(t instanceof F)e=t,n=t;else{if(!(t instanceof j))return t?this.extend(k(t)||B(t)):this;if(e=t._southWest,n=t._northEast,!e||!n)return this}return r||i?(r.lat=Math.min(e.lat,r.lat),r.lng=Math.min(e.lng,r.lng),i.lat=Math.max(n.lat,i.lat),i.lng=Math.max(n.lng,i.lng)):(this._southWest=new F(e.lat,e.lng),this._northEast=new F(n.lat,n.lng)),this},pad:function(t){var e=this._southWest,n=this._northEast,r=Math.abs(e.lat-n.lat)*t,i=Math.abs(e.lng-n.lng)*t;return new j(new F(e.lat-r,e.lng-i),new F(n.lat+r,n.lng+i))},getCenter:function(){return new F((this._southWest.lat+this._northEast.lat)/2,(this._southWest.lng+this._northEast.lng)/2)},getSouthWest:function(){return this._southWest},getNorthEast:function(){return this._northEast},getNorthWest:function(){return new F(this.getNorth(),this.getWest())},getSouthEast:function(){return new F(this.getSouth(),this.getEast())},getWest:function(){return this._southWest.lng},getSouth:function(){return this._southWest.lat},getEast:function(){return this._northEast.lng},getNorth:function(){return this._northEast.lat},contains:function(t){t="number"==typeof t[0]||t instanceof F||"lat"in t?k(t):B(t);var e,n,r=this._southWest,i=this._northEast;return t instanceof j?(e=t.getSouthWest(),n=t.getNorthEast()):e=n=t,e.lat>=r.lat&&n.lat<=i.lat&&e.lng>=r.lng&&n.lng<=i.lng},intersects:function(t){t=B(t);var e=this._southWest,n=this._northEast,r=t.getSouthWest(),i=t.getNorthEast(),o=i.lat>=e.lat&&r.lat<=n.lat,s=i.lng>=e.lng&&r.lng<=n.lng;return o&&s},overlaps:function(t){t=B(t);var e=this._southWest,n=this._northEast,r=t.getSouthWest(),i=t.getNorthEast(),o=i.lat>e.lat&&r.lat<n.lat,s=i.lng>e.lng&&r.lng<n.lng;return o&&s},toBBoxString:function(){return[this.getWest(),this.getSouth(),this.getEast(),this.getNorth()].join(",")},equals:function(t,e){return!!t&&(t=B(t),this._southWest.equals(t.getSouthWest(),e)&&this._northEast.equals(t.getNorthEast(),e))},isValid:function(){return!(!this._southWest||!this._northEast)}},F.prototype={equals:function(t,e){if(!t)return!1;t=k(t);var n=Math.max(Math.abs(this.lat-t.lat),Math.abs(this.lng-t.lng));return n<=(void 0===e?1e-9:e)},toString:function(t){return"LatLng("+c(this.lat,t)+", "+c(this.lng,t)+")"},distanceTo:function(t){return X.distance(this,k(t))},wrap:function(){return X.wrapLatLng(this)},toBounds:function(t){var e=180*t/40075017,n=e/Math.cos(Math.PI/180*this.lat);return B([this.lat-e,this.lng-n],[this.lat+e,this.lng+n])},clone:function(){return new F(this.lat,this.lng,this.alt)}};var Y,z={latLngToPoint:function(t,e){var n=this.projection.project(t),r=this.scale(e);return this.transformation._transform(n,r)},pointToLatLng:function(t,e){var n=this.scale(e),r=this.transformation.untransform(t,n);return this.projection.unproject(r)},project:function(t){return this.projection.project(t)},unproject:function(t){return this.projection.unproject(t)},scale:function(t){return 256*Math.pow(2,t)},zoom:function(t){return Math.log(t/256)/Math.LN2},getProjectedBounds:function(t){if(this.infinite)return null;var e=this.projection.bounds,n=this.scale(t),r=this.transformation.transform(e.min,n),i=this.transformation.transform(e.max,n);return new D(r,i)},infinite:!1,wrapLatLng:function(t){var e=this.wrapLng?l(t.lng,this.wrapLng,!0):t.lng,n=this.wrapLat?l(t.lat,this.wrapLat,!0):t.lat,r=t.alt;return new F(n,e,r)},wrapLatLngBounds:function(t){var e=t.getCenter(),n=this.wrapLatLng(e),r=e.lat-n.lat,i=e.lng-n.lng;if(0===r&&0===i)return t;var o=t.getSouthWest(),s=t.getNorthEast(),a=new F(o.lat-r,o.lng-i),l=new F(s.lat-r,s.lng-i);return new j(a,l)}},X=n({},z,{wrapLng:[-180,180],R:6371e3,distance:function(t,e){var n=Math.PI/180,r=t.lat*n,i=e.lat*n,o=Math.sin((e.lat-t.lat)*n/2),s=Math.sin((e.lng-t.lng)*n/2),a=o*o+Math.cos(r)*Math.cos(i)*s*s,l=2*Math.atan2(Math.sqrt(a),Math.sqrt(1-a));return this.R*l}}),U={R:6378137,MAX_LATITUDE:85.0511287798,project:function(t){var e=Math.PI/180,n=this.MAX_LATITUDE,r=Math.max(Math.min(n,t.lat),-n),i=Math.sin(r*e);return new R(this.R*t.lng*e,this.R*Math.log((1+i)/(1-i))/2)},unproject:function(t){var e=180/Math.PI;return new F((2*Math.atan(Math.exp(t.y/this.R))-Math.PI/2)*e,t.x*e/this.R)},bounds:(Y=6378137*Math.PI,new D([-Y,-Y],[Y,Y]))};function G(t,e,n,r){if(m(t))return this._a=t[0],this._b=t[1],this._c=t[2],void(this._d=t[3]);this._a=t,this._b=e,this._c=n,this._d=r}function W(t,e,n,r){return new G(t,e,n,r)}G.prototype={transform:function(t,e){return this._transform(t.clone(),e)},_transform:function(t,e){return e=e||1,t.x=e*(this._a*t.x+this._b),t.y=e*(this._c*t.y+this._d),t},untransform:function(t,e){return e=e||1,new R((t.x/e-this._b)/this._a,(t.y/e-this._d)/this._c)}};var H=n({},X,{code:"EPSG:3857",projection:U,transformation:function(){var t=.5/(Math.PI*U.R);return W(t,.5,-t,.5)}()}),V=n({},H,{code:"EPSG:900913"});function Z(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function q(t,e){var n,r,i,o,s,a,l="";for(n=0,i=t.length;n<i;n++){for(s=t[n],r=0,o=s.length;r<o;r++)a=s[r],l+=(r?"L":"M")+a.x+" "+a.y;l+=e?wt?"z":"x":""}return l||"M0 0"}var K=document.documentElement.style,J="ActiveXObject"in window,Q=J&&!document.addEventListener,tt="msLaunchUri"in navigator&&!("documentMode"in document),et=Ct("webkit"),nt=Ct("android"),rt=Ct("android 2")||Ct("android 3"),it=parseInt(/WebKit\/([0-9]+)|$/.exec(navigator.userAgent)[1],10),ot=nt&&Ct("Google")&&it<537&&!("AudioNode"in window),st=!!window.opera,at=Ct("chrome"),lt=Ct("gecko")&&!et&&!st&&!J,ut=!at&&Ct("safari"),ct=Ct("phantom"),ht="OTransition"in K,ft=0===navigator.platform.indexOf("Win"),pt=J&&"transition"in K,dt="WebKitCSSMatrix"in window&&"m11"in new window.WebKitCSSMatrix&&!rt,yt="MozPerspective"in K,_t=!window.L_DISABLE_3D&&(pt||dt||yt)&&!ht&&!ct,mt="undefined"!=typeof orientation||Ct("mobile"),gt=mt&&et,vt=mt&&dt,Pt=!window.PointerEvent&&window.MSPointerEvent,bt=!(et||!window.PointerEvent&&!Pt),St=!window.L_NO_TOUCH&&(bt||"ontouchstart"in window||window.DocumentTouch&&document instanceof window.DocumentTouch),Et=mt&&st,xt=mt&<,It=(window.devicePixelRatio||window.screen.deviceXDPI/window.screen.logicalXDPI)>1,Tt=function(){var t=!1;try{var e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("testPassiveEventSupport",u,e),window.removeEventListener("testPassiveEventSupport",u,e)}catch(t){}return t},Ot=!!document.createElement("canvas").getContext,wt=!(!document.createElementNS||!Z("svg").createSVGRect),At=!wt&&function(){try{var t=document.createElement("div");t.innerHTML='<v:shape adj="1"/>';var e=t.firstChild;return e.style.behavior="url(#default#VML)",e&&"object"==typeof e.adj}catch(t){return!1}}();function Ct(t){return navigator.userAgent.toLowerCase().indexOf(t)>=0}var Lt=(Object.freeze||Object)({ie:J,ielt9:Q,edge:tt,webkit:et,android:nt,android23:rt,androidStock:ot,opera:st,chrome:at,gecko:lt,safari:ut,phantom:ct,opera12:ht,win:ft,ie3d:pt,webkit3d:dt,gecko3d:yt,any3d:_t,mobile:mt,mobileWebkit:gt,mobileWebkit3d:vt,msPointer:Pt,pointer:bt,touch:St,mobileOpera:Et,mobileGecko:xt,retina:It,passiveEvents:Tt,canvas:Ot,svg:wt,vml:At}),Rt=Pt?"MSPointerDown":"pointerdown",Nt=Pt?"MSPointerMove":"pointermove",Mt=Pt?"MSPointerUp":"pointerup",Dt=Pt?"MSPointerCancel":"pointercancel",$t=["INPUT","SELECT","OPTION"],jt={},Bt=!1,Ft=0;function kt(t,e,n,r){return"touchstart"===e?function(t,e,n){var r=i(function(t){if("mouse"!==t.pointerType&&t.MSPOINTER_TYPE_MOUSE&&t.pointerType!==t.MSPOINTER_TYPE_MOUSE){if(!($t.indexOf(t.target.tagName)<0))return;je(t)}Ut(t,e)});t["_leaflet_touchstart"+n]=r,t.addEventListener(Rt,r,!1),Bt||(document.documentElement.addEventListener(Rt,Yt,!0),document.documentElement.addEventListener(Nt,zt,!0),document.documentElement.addEventListener(Mt,Xt,!0),document.documentElement.addEventListener(Dt,Xt,!0),Bt=!0)}(t,n,r):"touchmove"===e?function(t,e,n){var r=function(t){(t.pointerType!==t.MSPOINTER_TYPE_MOUSE&&"mouse"!==t.pointerType||0!==t.buttons)&&Ut(t,e)};t["_leaflet_touchmove"+n]=r,t.addEventListener(Nt,r,!1)}(t,n,r):"touchend"===e&&function(t,e,n){var r=function(t){Ut(t,e)};t["_leaflet_touchend"+n]=r,t.addEventListener(Mt,r,!1),t.addEventListener(Dt,r,!1)}(t,n,r),this}function Yt(t){jt[t.pointerId]=t,Ft++}function zt(t){jt[t.pointerId]&&(jt[t.pointerId]=t)}function Xt(t){delete jt[t.pointerId],Ft--}function Ut(t,e){for(var n in t.touches=[],jt)t.touches.push(jt[n]);t.changedTouches=[t],e(t)}var Gt=Pt?"MSPointerDown":bt?"pointerdown":"touchstart",Wt=Pt?"MSPointerUp":bt?"pointerup":"touchend",Ht="_leaflet_";function Vt(t,e,n){var r,i,o=!1,s=250;function a(t){var e;if(bt){if(!tt||"mouse"===t.pointerType)return;e=Ft}else e=t.touches.length;if(!(e>1)){var n=Date.now(),a=n-(r||n);i=t.touches?t.touches[0]:t,o=a>0&&a<=s,r=n}}function l(t){if(o&&!i.cancelBubble){if(bt){if(!tt||"mouse"===t.pointerType)return;var n,s,a={};for(s in i)n=i[s],a[s]=n&&n.bind?n.bind(i):n;i=a}i.type="dblclick",i.button=0,e(i),r=null}}return t[Ht+Gt+n]=a,t[Ht+Wt+n]=l,t[Ht+"dblclick"+n]=e,t.addEventListener(Gt,a,!!Tt&&{passive:!1}),t.addEventListener(Wt,l,!!Tt&&{passive:!1}),t.addEventListener("dblclick",e,!1),this}function Zt(t,e){var n=t[Ht+Gt+e],r=t[Ht+Wt+e],i=t[Ht+"dblclick"+e];return t.removeEventListener(Gt,n,!!Tt&&{passive:!1}),t.removeEventListener(Wt,r,!!Tt&&{passive:!1}),tt||t.removeEventListener("dblclick",i,!1),this}var qt,Kt,Jt,Qt,te,ee=me(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),ne=me(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),re="webkitTransition"===ne||"OTransition"===ne?ne+"End":"transitionend";function ie(t){return"string"==typeof t?document.getElementById(t):t}function oe(t,e){var n=t.style[e]||t.currentStyle&&t.currentStyle[e];if((!n||"auto"===n)&&document.defaultView){var r=document.defaultView.getComputedStyle(t,null);n=r?r[e]:null}return"auto"===n?null:n}function se(t,e,n){var r=document.createElement(t);return r.className=e||"",n&&n.appendChild(r),r}function ae(t){var e=t.parentNode;e&&e.removeChild(t)}function le(t){for(;t.firstChild;)t.removeChild(t.firstChild)}function ue(t){var e=t.parentNode;e&&e.lastChild!==t&&e.appendChild(t)}function ce(t){var e=t.parentNode;e&&e.firstChild!==t&&e.insertBefore(t,e.firstChild)}function he(t,e){if(void 0!==t.classList)return t.classList.contains(e);var n=ye(t);return n.length>0&&new RegExp("(^|\\s)"+e+"(\\s|$)").test(n)}function fe(t,e){if(void 0!==t.classList)for(var n=f(e),r=0,i=n.length;r<i;r++)t.classList.add(n[r]);else if(!he(t,e)){var o=ye(t);de(t,(o?o+" ":"")+e)}}function pe(t,e){void 0!==t.classList?t.classList.remove(e):de(t,h((" "+ye(t)+" ").replace(" "+e+" "," ")))}function de(t,e){void 0===t.className.baseVal?t.className=e:t.className.baseVal=e}function ye(t){return t.correspondingElement&&(t=t.correspondingElement),void 0===t.className.baseVal?t.className:t.className.baseVal}function _e(t,e){"opacity"in t.style?t.style.opacity=e:"filter"in t.style&&function(t,e){var n=!1,r="DXImageTransform.Microsoft.Alpha";try{n=t.filters.item(r)}catch(t){if(1===e)return}e=Math.round(100*e),n?(n.Enabled=100!==e,n.Opacity=e):t.style.filter+=" progid:"+r+"(opacity="+e+")"}(t,e)}function me(t){for(var e=document.documentElement.style,n=0;n<t.length;n++)if(t[n]in e)return t[n];return!1}function ge(t,e,n){var r=e||new R(0,0);t.style[ee]=(pt?"translate("+r.x+"px,"+r.y+"px)":"translate3d("+r.x+"px,"+r.y+"px,0)")+(n?" scale("+n+")":"")}function ve(t,e){t._leaflet_pos=e,_t?ge(t,e):(t.style.left=e.x+"px",t.style.top=e.y+"px")}function Pe(t){return t._leaflet_pos||new R(0,0)}if("onselectstart"in document)qt=function(){Ae(window,"selectstart",je)},Kt=function(){Le(window,"selectstart",je)};else{var be=me(["userSelect","WebkitUserSelect","OUserSelect","MozUserSelect","msUserSelect"]);qt=function(){if(be){var t=document.documentElement.style;Jt=t[be],t[be]="none"}},Kt=function(){be&&(document.documentElement.style[be]=Jt,Jt=void 0)}}function Se(){Ae(window,"dragstart",je)}function Ee(){Le(window,"dragstart",je)}function xe(t){for(;-1===t.tabIndex;)t=t.parentNode;t.style&&(Ie(),Qt=t,te=t.style.outline,t.style.outline="none",Ae(window,"keydown",Ie))}function Ie(){Qt&&(Qt.style.outline=te,Qt=void 0,te=void 0,Le(window,"keydown",Ie))}function Te(t){do{t=t.parentNode}while(!(t.offsetWidth&&t.offsetHeight||t===document.body));return t}function Oe(t){var e=t.getBoundingClientRect();return{x:e.width/t.offsetWidth||1,y:e.height/t.offsetHeight||1,boundingClientRect:e}}var we=(Object.freeze||Object)({TRANSFORM:ee,TRANSITION:ne,TRANSITION_END:re,get:ie,getStyle:oe,create:se,remove:ae,empty:le,toFront:ue,toBack:ce,hasClass:he,addClass:fe,removeClass:pe,setClass:de,getClass:ye,setOpacity:_e,testProp:me,setTransform:ge,setPosition:ve,getPosition:Pe,disableTextSelection:qt,enableTextSelection:Kt,disableImageDrag:Se,enableImageDrag:Ee,preventOutline:xe,restoreOutline:Ie,getSizedParentNode:Te,getScale:Oe});function Ae(t,e,n,r){if("object"==typeof e)for(var i in e)Re(t,i,e[i],n);else{e=f(e);for(var o=0,s=e.length;o<s;o++)Re(t,e[o],n,r)}return this}var Ce="_leaflet_events";function Le(t,e,n,r){if("object"==typeof e)for(var i in e)Ne(t,i,e[i],n);else if(e){e=f(e);for(var o=0,s=e.length;o<s;o++)Ne(t,e[o],n,r)}else{for(var a in t[Ce])Ne(t,a,t[Ce][a]);delete t[Ce]}return this}function Re(t,e,n,r){var i=e+s(n)+(r?"_"+s(r):"");if(t[Ce]&&t[Ce][i])return this;var o=function(e){return n.call(r||t,e||window.event)},a=o;bt&&0===e.indexOf("touch")?kt(t,e,o,i):!St||"dblclick"!==e||!Vt||bt&&at?"addEventListener"in t?"mousewheel"===e?t.addEventListener("onwheel"in t?"wheel":"mousewheel",o,!!Tt&&{passive:!1}):"mouseenter"===e||"mouseleave"===e?(o=function(e){e=e||window.event,We(t,e)&&a(e)},t.addEventListener("mouseenter"===e?"mouseover":"mouseout",o,!1)):("click"===e&&nt&&(o=function(t){!function(t,e){var n=t.timeStamp||t.originalEvent&&t.originalEvent.timeStamp,r=ze&&n-ze;r&&r>100&&r<500||t.target._simulatedClick&&!t._simulated?Be(t):(ze=n,e(t))}(t,a)}),t.addEventListener(e,o,!1)):"attachEvent"in t&&t.attachEvent("on"+e,o):Vt(t,o,i),t[Ce]=t[Ce]||{},t[Ce][i]=o}function Ne(t,e,n,r){var i=e+s(n)+(r?"_"+s(r):""),o=t[Ce]&&t[Ce][i];if(!o)return this;bt&&0===e.indexOf("touch")?function(t,e,n){var r=t["_leaflet_"+e+n];"touchstart"===e?t.removeEventListener(Rt,r,!1):"touchmove"===e?t.removeEventListener(Nt,r,!1):"touchend"===e&&(t.removeEventListener(Mt,r,!1),t.removeEventListener(Dt,r,!1))}(t,e,i):!St||"dblclick"!==e||!Zt||bt&&at?"removeEventListener"in t?"mousewheel"===e?t.removeEventListener("onwheel"in t?"wheel":"mousewheel",o,!!Tt&&{passive:!1}):t.removeEventListener("mouseenter"===e?"mouseover":"mouseleave"===e?"mouseout":e,o,!1):"detachEvent"in t&&t.detachEvent("on"+e,o):Zt(t,i),t[Ce][i]=null}function Me(t){return t.stopPropagation?t.stopPropagation():t.originalEvent?t.originalEvent._stopped=!0:t.cancelBubble=!0,Ge(t),this}function De(t){return Re(t,"mousewheel",Me),this}function $e(t){return Ae(t,"mousedown touchstart dblclick",Me),Re(t,"click",Ue),this}function je(t){return t.preventDefault?t.preventDefault():t.returnValue=!1,this}function Be(t){return je(t),Me(t),this}function Fe(t,e){if(!e)return new R(t.clientX,t.clientY);var n=Oe(e),r=n.boundingClientRect;return new R((t.clientX-r.left)/n.x-e.clientLeft,(t.clientY-r.top)/n.y-e.clientTop)}var ke=ft&&at?2*window.devicePixelRatio:lt?window.devicePixelRatio:1;function Ye(t){return tt?t.wheelDeltaY/2:t.deltaY&&0===t.deltaMode?-t.deltaY/ke:t.deltaY&&1===t.deltaMode?20*-t.deltaY:t.deltaY&&2===t.deltaMode?60*-t.deltaY:t.deltaX||t.deltaZ?0:t.wheelDelta?(t.wheelDeltaY||t.wheelDelta)/2:t.detail&&Math.abs(t.detail)<32765?20*-t.detail:t.detail?t.detail/-32765*60:0}var ze,Xe={};function Ue(t){Xe[t.type]=!0}function Ge(t){var e=Xe[t.type];return Xe[t.type]=!1,e}function We(t,e){var n=e.relatedTarget;if(!n)return!0;try{for(;n&&n!==t;)n=n.parentNode}catch(t){return!1}return n!==t}var He=(Object.freeze||Object)({on:Ae,off:Le,stopPropagation:Me,disableScrollPropagation:De,disableClickPropagation:$e,preventDefault:je,stop:Be,getMousePosition:Fe,getWheelDelta:Ye,fakeStop:Ue,skipped:Ge,isExternalTarget:We,addListener:Ae,removeListener:Le}),Ve=C.extend({run:function(t,e,n,r){this.stop(),this._el=t,this._inProgress=!0,this._duration=n||.25,this._easeOutPower=1/Math.max(r||.5,.2),this._startPos=Pe(t),this._offset=e.subtract(this._startPos),this._startTime=+new Date,this.fire("start"),this._animate()},stop:function(){this._inProgress&&(this._step(!0),this._complete())},_animate:function(){this._animId=I(this._animate,this),this._step()},_step:function(t){var e=+new Date-this._startTime,n=1e3*this._duration;e<n?this._runFrame(this._easeOut(e/n),t):(this._runFrame(1),this._complete())},_runFrame:function(t,e){var n=this._startPos.add(this._offset.multiplyBy(t));e&&n._round(),ve(this._el,n),this.fire("step")},_complete:function(){T(this._animId),this._inProgress=!1,this.fire("end")},_easeOut:function(t){return 1-Math.pow(1-t,this._easeOutPower)}}),Ze=C.extend({options:{crs:H,center:void 0,zoom:void 0,minZoom:void 0,maxZoom:void 0,layers:[],maxBounds:void 0,renderer:void 0,zoomAnimation:!0,zoomAnimationThreshold:4,fadeAnimation:!0,markerZoomAnimation:!0,transform3DLimit:8388608,zoomSnap:1,zoomDelta:1,trackResize:!0},initialize:function(t,e){e=p(this,e),this._handlers=[],this._layers={},this._zoomBoundLayers={},this._sizeChanged=!0,this._initContainer(t),this._initLayout(),this._onResize=i(this._onResize,this),this._initEvents(),e.maxBounds&&this.setMaxBounds(e.maxBounds),void 0!==e.zoom&&(this._zoom=this._limitZoom(e.zoom)),e.center&&void 0!==e.zoom&&this.setView(k(e.center),e.zoom,{reset:!0}),this.callInitHooks(),this._zoomAnimated=ne&&_t&&!Et&&this.options.zoomAnimation,this._zoomAnimated&&(this._createAnimProxy(),Ae(this._proxy,re,this._catchTransitionEnd,this)),this._addLayers(this.options.layers)},setView:function(t,e,r){if(e=void 0===e?this._zoom:this._limitZoom(e),t=this._limitCenter(k(t),e,this.options.maxBounds),r=r||{},this._stop(),this._loaded&&!r.reset&&!0!==r){void 0!==r.animate&&(r.zoom=n({animate:r.animate},r.zoom),r.pan=n({animate:r.animate,duration:r.duration},r.pan));var i=this._zoom!==e?this._tryAnimatedZoom&&this._tryAnimatedZoom(t,e,r.zoom):this._tryAnimatedPan(t,r.pan);if(i)return clearTimeout(this._sizeTimer),this}return this._resetView(t,e),this},setZoom:function(t,e){return this._loaded?this.setView(this.getCenter(),t,{zoom:e}):(this._zoom=t,this)},zoomIn:function(t,e){return t=t||(_t?this.options.zoomDelta:1),this.setZoom(this._zoom+t,e)},zoomOut:function(t,e){return t=t||(_t?this.options.zoomDelta:1),this.setZoom(this._zoom-t,e)},setZoomAround:function(t,e,n){var r=this.getZoomScale(e),i=this.getSize().divideBy(2),o=t instanceof R?t:this.latLngToContainerPoint(t),s=o.subtract(i).multiplyBy(1-1/r),a=this.containerPointToLatLng(i.add(s));return this.setView(a,e,{zoom:n})},_getBoundsCenterZoom:function(t,e){e=e||{},t=t.getBounds?t.getBounds():B(t);var n=M(e.paddingTopLeft||e.padding||[0,0]),r=M(e.paddingBottomRight||e.padding||[0,0]),i=this.getBoundsZoom(t,!1,n.add(r));if((i="number"==typeof e.maxZoom?Math.min(e.maxZoom,i):i)===1/0)return{center:t.getCenter(),zoom:i};var o=r.subtract(n).divideBy(2),s=this.project(t.getSouthWest(),i),a=this.project(t.getNorthEast(),i),l=this.unproject(s.add(a).divideBy(2).add(o),i);return{center:l,zoom:i}},fitBounds:function(t,e){if(!(t=B(t)).isValid())throw new Error("Bounds are not valid.");var n=this._getBoundsCenterZoom(t,e);return this.setView(n.center,n.zoom,e)},fitWorld:function(t){return this.fitBounds([[-90,-180],[90,180]],t)},panTo:function(t,e){return this.setView(t,this._zoom,{pan:e})},panBy:function(t,e){if(t=M(t).round(),e=e||{},!t.x&&!t.y)return this.fire("moveend");if(!0!==e.animate&&!this.getSize().contains(t))return this._resetView(this.unproject(this.project(this.getCenter()).add(t)),this.getZoom()),this;if(this._panAnim||(this._panAnim=new Ve,this._panAnim.on({step:this._onPanTransitionStep,end:this._onPanTransitionEnd},this)),e.noMoveStart||this.fire("movestart"),!1!==e.animate){fe(this._mapPane,"leaflet-pan-anim");var n=this._getMapPanePos().subtract(t).round();this._panAnim.run(this._mapPane,n,e.duration||.25,e.easeLinearity)}else this._rawPanBy(t),this.fire("move").fire("moveend");return this},flyTo:function(t,e,n){if(!1===(n=n||{}).animate||!_t)return this.setView(t,e,n);this._stop();var r=this.project(this.getCenter()),i=this.project(t),o=this.getSize(),s=this._zoom;t=k(t),e=void 0===e?s:e;var a=Math.max(o.x,o.y),l=a*this.getZoomScale(s,e),u=i.distanceTo(r)||1,c=1.42,h=c*c;function f(t){var e=t?-1:1,n=t?l:a,r=l*l-a*a+e*h*h*u*u,i=2*n*h*u,o=r/i,s=Math.sqrt(o*o+1)-o,c=s<1e-9?-18:Math.log(s);return c}function p(t){return(Math.exp(t)-Math.exp(-t))/2}function d(t){return(Math.exp(t)+Math.exp(-t))/2}var y=f(0);function _(t){return a*(d(y)*(p(e=y+c*t)/d(e))-p(y))/h;var e}var m=Date.now(),g=(f(1)-y)/c,v=n.duration?1e3*n.duration:1e3*g*.8;return this._moveStart(!0,n.noMoveStart),function n(){var o=(Date.now()-m)/v,l=function(t){return 1-Math.pow(1-t,1.5)}(o)*g;o<=1?(this._flyToFrame=I(n,this),this._move(this.unproject(r.add(i.subtract(r).multiplyBy(_(l)/u)),s),this.getScaleZoom(a/function(t){return a*(d(y)/d(y+c*t))}(l),s),{flyTo:!0})):this._move(t,e)._moveEnd(!0)}.call(this),this},flyToBounds:function(t,e){var n=this._getBoundsCenterZoom(t,e);return this.flyTo(n.center,n.zoom,e)},setMaxBounds:function(t){return(t=B(t)).isValid()?(this.options.maxBounds&&this.off("moveend",this._panInsideMaxBounds),this.options.maxBounds=t,this._loaded&&this._panInsideMaxBounds(),this.on("moveend",this._panInsideMaxBounds)):(this.options.maxBounds=null,this.off("moveend",this._panInsideMaxBounds))},setMinZoom:function(t){var e=this.options.minZoom;return this.options.minZoom=t,this._loaded&&e!==t&&(this.fire("zoomlevelschange"),this.getZoom()<this.options.minZoom)?this.setZoom(t):this},setMaxZoom:function(t){var e=this.options.maxZoom;return this.options.maxZoom=t,this._loaded&&e!==t&&(this.fire("zoomlevelschange"),this.getZoom()>this.options.maxZoom)?this.setZoom(t):this},panInsideBounds:function(t,e){this._enforcingBounds=!0;var n=this.getCenter(),r=this._limitCenter(n,this._zoom,B(t));return n.equals(r)||this.panTo(r,e),this._enforcingBounds=!1,this},panInside:function(t,e){var n=M((e=e||{}).paddingTopLeft||e.padding||[0,0]),r=M(e.paddingBottomRight||e.padding||[0,0]),i=this.getCenter(),o=this.project(i),s=this.project(t),a=this.getPixelBounds(),l=a.getSize().divideBy(2),u=$([a.min.add(n),a.max.subtract(r)]);if(!u.contains(s)){this._enforcingBounds=!0;var c=o.subtract(s),h=M(s.x+c.x,s.y+c.y);(s.x<u.min.x||s.x>u.max.x)&&(h.x=o.x-c.x,c.x>0?h.x+=l.x-n.x:h.x-=l.x-r.x),(s.y<u.min.y||s.y>u.max.y)&&(h.y=o.y-c.y,c.y>0?h.y+=l.y-n.y:h.y-=l.y-r.y),this.panTo(this.unproject(h),e),this._enforcingBounds=!1}return this},invalidateSize:function(t){if(!this._loaded)return this;t=n({animate:!1,pan:!0},!0===t?{animate:!0}:t);var e=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var r=this.getSize(),o=e.divideBy(2).round(),s=r.divideBy(2).round(),a=o.subtract(s);return a.x||a.y?(t.animate&&t.pan?this.panBy(a):(t.pan&&this._rawPanBy(a),this.fire("move"),t.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(i(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:e,newSize:r})):this},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(t){if(t=this._locateOptions=n({timeout:1e4,watch:!1},t),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var e=i(this._handleGeolocationResponse,this),r=i(this._handleGeolocationError,this);return t.watch?this._locationWatchId=navigator.geolocation.watchPosition(e,r,t):navigator.geolocation.getCurrentPosition(e,r,t),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(t){var e=t.code,n=t.message||(1===e?"permission denied":2===e?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:e,message:"Geolocation error: "+n+"."})},_handleGeolocationResponse:function(t){var e=t.coords.latitude,n=t.coords.longitude,r=new F(e,n),i=r.toBounds(2*t.coords.accuracy),o=this._locateOptions;if(o.setView){var s=this.getBoundsZoom(i);this.setView(r,o.maxZoom?Math.min(s,o.maxZoom):s)}var a={latlng:r,bounds:i,timestamp:t.timestamp};for(var l in t.coords)"number"==typeof t.coords[l]&&(a[l]=t.coords[l]);this.fire("locationfound",a)},addHandler:function(t,e){if(!e)return this;var n=this[t]=new e(this);return this._handlers.push(n),this.options[t]&&n.enable(),this},remove:function(){if(this._initEvents(!0),this._containerId!==this._container._leaflet_id)throw new Error("Map container is being reused by another instance");try{delete this._container._leaflet_id,delete this._containerId}catch(t){this._container._leaflet_id=void 0,this._containerId=void 0}var t;for(t in void 0!==this._locationWatchId&&this.stopLocate(),this._stop(),ae(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(T(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload"),this._layers)this._layers[t].remove();for(t in this._panes)ae(this._panes[t]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(t,e){var n="leaflet-pane"+(t?" leaflet-"+t.replace("Pane","")+"-pane":""),r=se("div",n,e||this._mapPane);return t&&(this._panes[t]=r),r},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter:this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var t=this.getPixelBounds(),e=this.unproject(t.getBottomLeft()),n=this.unproject(t.getTopRight());return new j(e,n)},getMinZoom:function(){return void 0===this.options.minZoom?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return void 0===this.options.maxZoom?void 0===this._layersMaxZoom?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(t,e,n){t=B(t),n=M(n||[0,0]);var r=this.getZoom()||0,i=this.getMinZoom(),o=this.getMaxZoom(),s=t.getNorthWest(),a=t.getSouthEast(),l=this.getSize().subtract(n),u=$(this.project(a,r),this.project(s,r)).getSize(),c=_t?this.options.zoomSnap:1,h=l.x/u.x,f=l.y/u.y,p=e?Math.max(h,f):Math.min(h,f);return r=this.getScaleZoom(p,r),c&&(r=Math.round(r/(c/100))*(c/100),r=e?Math.ceil(r/c)*c:Math.floor(r/c)*c),Math.max(i,Math.min(o,r))},getSize:function(){return this._size&&!this._sizeChanged||(this._size=new R(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(t,e){var n=this._getTopLeftPoint(t,e);return new D(n,n.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(t){return this.options.crs.getProjectedBounds(void 0===t?this.getZoom():t)},getPane:function(t){return"string"==typeof t?this._panes[t]:t},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(t,e){var n=this.options.crs;return e=void 0===e?this._zoom:e,n.scale(t)/n.scale(e)},getScaleZoom:function(t,e){var n=this.options.crs;e=void 0===e?this._zoom:e;var r=n.zoom(t*n.scale(e));return isNaN(r)?1/0:r},project:function(t,e){return e=void 0===e?this._zoom:e,this.options.crs.latLngToPoint(k(t),e)},unproject:function(t,e){return e=void 0===e?this._zoom:e,this.options.crs.pointToLatLng(M(t),e)},layerPointToLatLng:function(t){var e=M(t).add(this.getPixelOrigin());return this.unproject(e)},latLngToLayerPoint:function(t){var e=this.project(k(t))._round();return e._subtract(this.getPixelOrigin())},wrapLatLng:function(t){return this.options.crs.wrapLatLng(k(t))},wrapLatLngBounds:function(t){return this.options.crs.wrapLatLngBounds(B(t))},distance:function(t,e){return this.options.crs.distance(k(t),k(e))},containerPointToLayerPoint:function(t){return M(t).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(t){return M(t).add(this._getMapPanePos())},containerPointToLatLng:function(t){var e=this.containerPointToLayerPoint(M(t));return this.layerPointToLatLng(e)},latLngToContainerPoint:function(t){return this.layerPointToContainerPoint(this.latLngToLayerPoint(k(t)))},mouseEventToContainerPoint:function(t){return Fe(t,this._container)},mouseEventToLayerPoint:function(t){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(t))},mouseEventToLatLng:function(t){return this.layerPointToLatLng(this.mouseEventToLayerPoint(t))},_initContainer:function(t){var e=this._container=ie(t);if(!e)throw new Error("Map container not found.");if(e._leaflet_id)throw new Error("Map container is already initialized.");Ae(e,"scroll",this._onScroll,this),this._containerId=s(e)},_initLayout:function(){var t=this._container;this._fadeAnimated=this.options.fadeAnimation&&_t,fe(t,"leaflet-container"+(St?" leaflet-touch":"")+(It?" leaflet-retina":"")+(Q?" leaflet-oldie":"")+(ut?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var e=oe(t,"position");"absolute"!==e&&"relative"!==e&&"fixed"!==e&&(t.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var t=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),ve(this._mapPane,new R(0,0)),this.createPane("tilePane"),this.createPane("shadowPane"),this.createPane("overlayPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(fe(t.markerPane,"leaflet-zoom-hide"),fe(t.shadowPane,"leaflet-zoom-hide"))},_resetView:function(t,e){ve(this._mapPane,new R(0,0));var n=!this._loaded;this._loaded=!0,e=this._limitZoom(e),this.fire("viewprereset");var r=this._zoom!==e;this._moveStart(r,!1)._move(t,e)._moveEnd(r),this.fire("viewreset"),n&&this.fire("load")},_moveStart:function(t,e){return t&&this.fire("zoomstart"),e||this.fire("movestart"),this},_move:function(t,e,n){void 0===e&&(e=this._zoom);var r=this._zoom!==e;return this._zoom=e,this._lastCenter=t,this._pixelOrigin=this._getNewPixelOrigin(t),(r||n&&n.pinch)&&this.fire("zoom",n),this.fire("move",n)},_moveEnd:function(t){return t&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return T(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(t){ve(this._mapPane,this._getMapPanePos().subtract(t))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_panInsideMaxBounds:function(){this._enforcingBounds||this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw new Error("Set map center and zoom first.")},_initEvents:function(t){this._targets={},this._targets[s(this._container)]=this;var e=t?Le:Ae;e(this._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup",this._handleDOMEvent,this),this.options.trackResize&&e(window,"resize",this._onResize,this),_t&&this.options.transform3DLimit&&(t?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){T(this._resizeRequest),this._resizeRequest=I(function(){this.invalidateSize({debounceMoveend:!0})},this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var t=this._getMapPanePos();Math.max(Math.abs(t.x),Math.abs(t.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(t,e){for(var n,r=[],i="mouseout"===e||"mouseover"===e,o=t.target||t.srcElement,a=!1;o;){if((n=this._targets[s(o)])&&("click"===e||"preclick"===e)&&!t._simulated&&this._draggableMoved(n)){a=!0;break}if(n&&n.listens(e,!0)){if(i&&!We(o,t))break;if(r.push(n),i)break}if(o===this._container)break;o=o.parentNode}return r.length||a||i||!We(o,t)||(r=[this]),r},_handleDOMEvent:function(t){if(this._loaded&&!Ge(t)){var e=t.type;"mousedown"!==e&&"keypress"!==e&&"keyup"!==e&&"keydown"!==e||xe(t.target||t.srcElement),this._fireDOMEvent(t,e)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(t,e,r){if("click"===t.type){var i=n({},t);i.type="preclick",this._fireDOMEvent(i,i.type,r)}if(!t._stopped&&(r=(r||[]).concat(this._findEventTargets(t,e))).length){var o=r[0];"contextmenu"===e&&o.listens(e,!0)&&je(t);var s={originalEvent:t};if("keypress"!==t.type&&"keydown"!==t.type&&"keyup"!==t.type){var a=o.getLatLng&&(!o._radius||o._radius<=10);s.containerPoint=a?this.latLngToContainerPoint(o.getLatLng()):this.mouseEventToContainerPoint(t),s.layerPoint=this.containerPointToLayerPoint(s.containerPoint),s.latlng=a?o.getLatLng():this.layerPointToLatLng(s.layerPoint)}for(var l=0;l<r.length;l++)if(r[l].fire(e,s,!0),s.originalEvent._stopped||!1===r[l].options.bubblingMouseEvents&&-1!==g(this._mouseEvents,e))return}},_draggableMoved:function(t){return(t=t.dragging&&t.dragging.enabled()?t:this).dragging&&t.dragging.moved()||this.boxZoom&&this.boxZoom.moved()},_clearHandlers:function(){for(var t=0,e=this._handlers.length;t<e;t++)this._handlers[t].disable()},whenReady:function(t,e){return this._loaded?t.call(e||this,{target:this}):this.on("load",t,e),this},_getMapPanePos:function(){return Pe(this._mapPane)||new R(0,0)},_moved:function(){var t=this._getMapPanePos();return t&&!t.equals([0,0])},_getTopLeftPoint:function(t,e){var n=t&&void 0!==e?this._getNewPixelOrigin(t,e):this.getPixelOrigin();return n.subtract(this._getMapPanePos())},_getNewPixelOrigin:function(t,e){var n=this.getSize()._divideBy(2);return this.project(t,e)._subtract(n)._add(this._getMapPanePos())._round()},_latLngToNewLayerPoint:function(t,e,n){var r=this._getNewPixelOrigin(n,e);return this.project(t,e)._subtract(r)},_latLngBoundsToNewLayerBounds:function(t,e,n){var r=this._getNewPixelOrigin(n,e);return $([this.project(t.getSouthWest(),e)._subtract(r),this.project(t.getNorthWest(),e)._subtract(r),this.project(t.getSouthEast(),e)._subtract(r),this.project(t.getNorthEast(),e)._subtract(r)])},_getCenterLayerPoint:function(){return this.containerPointToLayerPoint(this.getSize()._divideBy(2))},_getCenterOffset:function(t){return this.latLngToLayerPoint(t).subtract(this._getCenterLayerPoint())},_limitCenter:function(t,e,n){if(!n)return t;var r=this.project(t,e),i=this.getSize().divideBy(2),o=new D(r.subtract(i),r.add(i)),s=this._getBoundsOffset(o,n,e);return s.round().equals([0,0])?t:this.unproject(r.add(s),e)},_limitOffset:function(t,e){if(!e)return t;var n=this.getPixelBounds(),r=new D(n.min.add(t),n.max.add(t));return t.add(this._getBoundsOffset(r,e))},_getBoundsOffset:function(t,e,n){var r=$(this.project(e.getNorthEast(),n),this.project(e.getSouthWest(),n)),i=r.min.subtract(t.min),o=r.max.subtract(t.max),s=this._rebound(i.x,-o.x),a=this._rebound(i.y,-o.y);return new R(s,a)},_rebound:function(t,e){return t+e>0?Math.round(t-e)/2:Math.max(0,Math.ceil(t))-Math.max(0,Math.floor(e))},_limitZoom:function(t){var e=this.getMinZoom(),n=this.getMaxZoom(),r=_t?this.options.zoomSnap:1;return r&&(t=Math.round(t/r)*r),Math.max(e,Math.min(n,t))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){pe(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(t,e){var n=this._getCenterOffset(t)._trunc();return!(!0!==(e&&e.animate)&&!this.getSize().contains(n)||(this.panBy(n,e),0))},_createAnimProxy:function(){var t=this._proxy=se("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(t),this.on("zoomanim",function(t){var e=ee,n=this._proxy.style[e];ge(this._proxy,this.project(t.center,t.zoom),this.getZoomScale(t.zoom,1)),n===this._proxy.style[e]&&this._animatingZoom&&this._onZoomTransitionEnd()},this),this.on("load moveend",this._animMoveEnd,this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){ae(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var t=this.getCenter(),e=this.getZoom();ge(this._proxy,this.project(t,e),this.getZoomScale(e,1))},_catchTransitionEnd:function(t){this._animatingZoom&&t.propertyName.indexOf("transform")>=0&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(t,e,n){if(this._animatingZoom)return!0;if(n=n||{},!this._zoomAnimated||!1===n.animate||this._nothingToAnimate()||Math.abs(e-this._zoom)>this.options.zoomAnimationThreshold)return!1;var r=this.getZoomScale(e),i=this._getCenterOffset(t)._divideBy(1-1/r);return!(!0!==n.animate&&!this.getSize().contains(i)||(I(function(){this._moveStart(!0,!1)._animateZoom(t,e,!0)},this),0))},_animateZoom:function(t,e,n,r){this._mapPane&&(n&&(this._animatingZoom=!0,this._animateToCenter=t,this._animateToZoom=e,fe(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:t,zoom:e,noUpdate:r}),setTimeout(i(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&pe(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom),I(function(){this._moveEnd(!0)},this))}}),qe=w.extend({options:{position:"topright"},initialize:function(t){p(this,t)},getPosition:function(){return this.options.position},setPosition:function(t){var e=this._map;return e&&e.removeControl(this),this.options.position=t,e&&e.addControl(this),this},getContainer:function(){return this._container},addTo:function(t){this.remove(),this._map=t;var e=this._container=this.onAdd(t),n=this.getPosition(),r=t._controlCorners[n];return fe(e,"leaflet-control"),-1!==n.indexOf("bottom")?r.insertBefore(e,r.firstChild):r.appendChild(e),this._map.on("unload",this.remove,this),this},remove:function(){return this._map?(ae(this._container),this.onRemove&&this.onRemove(this._map),this._map.off("unload",this.remove,this),this._map=null,this):this},_refocusOnMap:function(t){this._map&&t&&t.screenX>0&&t.screenY>0&&this._map.getContainer().focus()}}),Ke=function(t){return new qe(t)};Ze.include({addControl:function(t){return t.addTo(this),this},removeControl:function(t){return t.remove(),this},_initControlPos:function(){var t=this._controlCorners={},e="leaflet-",n=this._controlContainer=se("div",e+"control-container",this._container);function r(r,i){var o=e+r+" "+e+i;t[r+i]=se("div",o,n)}r("top","left"),r("top","right"),r("bottom","left"),r("bottom","right")},_clearControlPos:function(){for(var t in this._controlCorners)ae(this._controlCorners[t]);ae(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var Je=qe.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(t,e,n,r){return n<r?-1:r<n?1:0}},initialize:function(t,e,n){for(var r in p(this,n),this._layerControlInputs=[],this._layers=[],this._lastZIndex=0,this._handlingClick=!1,t)this._addLayer(t[r],r);for(r in e)this._addLayer(e[r],r,!0)},onAdd:function(t){this._initLayout(),this._update(),this._map=t,t.on("zoomend",this._checkDisabledLayers,this);for(var e=0;e<this._layers.length;e++)this._layers[e].layer.on("add remove",this._onLayerChange,this);return this._container},addTo:function(t){return qe.prototype.addTo.call(this,t),this._expandIfNotCollapsed()},onRemove:function(){this._map.off("zoomend",this._checkDisabledLayers,this);for(var t=0;t<this._layers.length;t++)this._layers[t].layer.off("add remove",this._onLayerChange,this)},addBaseLayer:function(t,e){return this._addLayer(t,e),this._map?this._update():this},addOverlay:function(t,e){return this._addLayer(t,e,!0),this._map?this._update():this},removeLayer:function(t){t.off("add remove",this._onLayerChange,this);var e=this._getLayer(s(t));return e&&this._layers.splice(this._layers.indexOf(e),1),this._map?this._update():this},expand:function(){fe(this._container,"leaflet-control-layers-expanded"),this._section.style.height=null;var t=this._map.getSize().y-(this._container.offsetTop+50);return t<this._section.clientHeight?(fe(this._section,"leaflet-control-layers-scrollbar"),this._section.style.height=t+"px"):pe(this._section,"leaflet-control-layers-scrollbar"),this._checkDisabledLayers(),this},collapse:function(){return pe(this._container,"leaflet-control-layers-expanded"),this},_initLayout:function(){var t="leaflet-control-layers",e=this._container=se("div",t),n=this.options.collapsed;e.setAttribute("aria-haspopup",!0),$e(e),De(e);var r=this._section=se("section",t+"-list");n&&(this._map.on("click",this.collapse,this),nt||Ae(e,{mouseenter:this.expand,mouseleave:this.collapse},this));var i=this._layersLink=se("a",t+"-toggle",e);i.href="#",i.title="Layers",St?(Ae(i,"click",Be),Ae(i,"click",this.expand,this)):Ae(i,"focus",this.expand,this),n||this.expand(),this._baseLayersList=se("div",t+"-base",r),this._separator=se("div",t+"-separator",r),this._overlaysList=se("div",t+"-overlays",r),e.appendChild(r)},_getLayer:function(t){for(var e=0;e<this._layers.length;e++)if(this._layers[e]&&s(this._layers[e].layer)===t)return this._layers[e]},_addLayer:function(t,e,n){this._map&&t.on("add remove",this._onLayerChange,this),this._layers.push({layer:t,name:e,overlay:n}),this.options.sortLayers&&this._layers.sort(i(function(t,e){return this.options.sortFunction(t.layer,e.layer,t.name,e.name)},this)),this.options.autoZIndex&&t.setZIndex&&(this._lastZIndex++,t.setZIndex(this._lastZIndex)),this._expandIfNotCollapsed()},_update:function(){if(!this._container)return this;le(this._baseLayersList),le(this._overlaysList),this._layerControlInputs=[];var t,e,n,r,i=0;for(n=0;n<this._layers.length;n++)r=this._layers[n],this._addItem(r),e=e||r.overlay,t=t||!r.overlay,i+=r.overlay?0:1;return this.options.hideSingleBase&&(t=t&&i>1,this._baseLayersList.style.display=t?"":"none"),this._separator.style.display=e&&t?"":"none",this},_onLayerChange:function(t){this._handlingClick||this._update();var e=this._getLayer(s(t.target)),n=e.overlay?"add"===t.type?"overlayadd":"overlayremove":"add"===t.type?"baselayerchange":null;n&&this._map.fire(n,e)},_createRadioElement:function(t,e){var n='<input type="radio" class="leaflet-control-layers-selector" name="'+t+'"'+(e?' checked="checked"':"")+"/>",r=document.createElement("div");return r.innerHTML=n,r.firstChild},_addItem:function(t){var e,n=document.createElement("label"),r=this._map.hasLayer(t.layer);t.overlay?((e=document.createElement("input")).type="checkbox",e.className="leaflet-control-layers-selector",e.defaultChecked=r):e=this._createRadioElement("leaflet-base-layers_"+s(this),r),this._layerControlInputs.push(e),e.layerId=s(t.layer),Ae(e,"click",this._onInputClick,this);var i=document.createElement("span");i.innerHTML=" "+t.name;var o=document.createElement("div");n.appendChild(o),o.appendChild(e),o.appendChild(i);var a=t.overlay?this._overlaysList:this._baseLayersList;return a.appendChild(n),this._checkDisabledLayers(),n},_onInputClick:function(){var t,e,n=this._layerControlInputs,r=[],i=[];this._handlingClick=!0;for(var o=n.length-1;o>=0;o--)t=n[o],e=this._getLayer(t.layerId).layer,t.checked?r.push(e):t.checked||i.push(e);for(o=0;o<i.length;o++)this._map.hasLayer(i[o])&&this._map.removeLayer(i[o]);for(o=0;o<r.length;o++)this._map.hasLayer(r[o])||this._map.addLayer(r[o]);this._handlingClick=!1,this._refocusOnMap()},_checkDisabledLayers:function(){for(var t,e,n=this._layerControlInputs,r=this._map.getZoom(),i=n.length-1;i>=0;i--)t=n[i],e=this._getLayer(t.layerId).layer,t.disabled=void 0!==e.options.minZoom&&r<e.options.minZoom||void 0!==e.options.maxZoom&&r>e.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expand:function(){return this.expand()},_collapse:function(){return this.collapse()}}),Qe=qe.extend({options:{position:"topleft",zoomInText:"+",zoomInTitle:"Zoom in",zoomOutText:"−",zoomOutTitle:"Zoom out"},onAdd:function(t){var e="leaflet-control-zoom",n=se("div",e+" leaflet-bar"),r=this.options;return this._zoomInButton=this._createButton(r.zoomInText,r.zoomInTitle,e+"-in",n,this._zoomIn),this._zoomOutButton=this._createButton(r.zoomOutText,r.zoomOutTitle,e+"-out",n,this._zoomOut),this._updateDisabled(),t.on("zoomend zoomlevelschange",this._updateDisabled,this),n},onRemove:function(t){t.off("zoomend zoomlevelschange",this._updateDisabled,this)},disable:function(){return this._disabled=!0,this._updateDisabled(),this},enable:function(){return this._disabled=!1,this._updateDisabled(),this},_zoomIn:function(t){!this._disabled&&this._map._zoom<this._map.getMaxZoom()&&this._map.zoomIn(this._map.options.zoomDelta*(t.shiftKey?3:1))},_zoomOut:function(t){!this._disabled&&this._map._zoom>this._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(t.shiftKey?3:1))},_createButton:function(t,e,n,r,i){var o=se("a",n,r);return o.innerHTML=t,o.href="#",o.title=e,o.setAttribute("role","button"),o.setAttribute("aria-label",e),$e(o),Ae(o,"click",Be),Ae(o,"click",i,this),Ae(o,"click",this._refocusOnMap,this),o},_updateDisabled:function(){var t=this._map,e="leaflet-disabled";pe(this._zoomInButton,e),pe(this._zoomOutButton,e),(this._disabled||t._zoom===t.getMinZoom())&&fe(this._zoomOutButton,e),(this._disabled||t._zoom===t.getMaxZoom())&&fe(this._zoomInButton,e)}});Ze.mergeOptions({zoomControl:!0}),Ze.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new Qe,this.addControl(this.zoomControl))});var tn=qe.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(t){var e=se("div","leaflet-control-scale"),n=this.options;return this._addScales(n,"leaflet-control-scale-line",e),t.on(n.updateWhenIdle?"moveend":"move",this._update,this),t.whenReady(this._update,this),e},onRemove:function(t){t.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(t,e,n){t.metric&&(this._mScale=se("div",e,n)),t.imperial&&(this._iScale=se("div",e,n))},_update:function(){var t=this._map,e=t.getSize().y/2,n=t.distance(t.containerPointToLatLng([0,e]),t.containerPointToLatLng([this.options.maxWidth,e]));this._updateScales(n)},_updateScales:function(t){this.options.metric&&t&&this._updateMetric(t),this.options.imperial&&t&&this._updateImperial(t)},_updateMetric:function(t){var e=this._getRoundNum(t),n=e<1e3?e+" m":e/1e3+" km";this._updateScale(this._mScale,n,e/t)},_updateImperial:function(t){var e,n,r,i=3.2808399*t;i>5280?(e=i/5280,n=this._getRoundNum(e),this._updateScale(this._iScale,n+" mi",n/e)):(r=this._getRoundNum(i),this._updateScale(this._iScale,r+" ft",r/i))},_updateScale:function(t,e,n){t.style.width=Math.round(this.options.maxWidth*n)+"px",t.innerHTML=e},_getRoundNum:function(t){var e=Math.pow(10,(Math.floor(t)+"").length-1),n=t/e;return e*(n=n>=10?10:n>=5?5:n>=3?3:n>=2?2:1)}}),en=qe.extend({options:{position:"bottomright",prefix:'<a href="https://leafletjs.com" title="A JS library for interactive maps">Leaflet</a>'},initialize:function(t){p(this,t),this._attributions={}},onAdd:function(t){for(var e in t.attributionControl=this,this._container=se("div","leaflet-control-attribution"),$e(this._container),t._layers)t._layers[e].getAttribution&&this.addAttribution(t._layers[e].getAttribution());return this._update(),this._container},setPrefix:function(t){return this.options.prefix=t,this._update(),this},addAttribution:function(t){return t?(this._attributions[t]||(this._attributions[t]=0),this._attributions[t]++,this._update(),this):this},removeAttribution:function(t){return t?(this._attributions[t]&&(this._attributions[t]--,this._update()),this):this},_update:function(){if(this._map){var t=[];for(var e in this._attributions)this._attributions[e]&&t.push(e);var n=[];this.options.prefix&&n.push(this.options.prefix),t.length&&n.push(t.join(", ")),this._container.innerHTML=n.join(" | ")}}});Ze.mergeOptions({attributionControl:!0}),Ze.addInitHook(function(){this.options.attributionControl&&(new en).addTo(this)}),qe.Layers=Je,qe.Zoom=Qe,qe.Scale=tn,qe.Attribution=en,Ke.layers=function(t,e,n){return new Je(t,e,n)},Ke.zoom=function(t){return new Qe(t)},Ke.scale=function(t){return new tn(t)},Ke.attribution=function(t){return new en(t)};var nn=w.extend({initialize:function(t){this._map=t},enable:function(){return this._enabled?this:(this._enabled=!0,this.addHooks(),this)},disable:function(){return this._enabled?(this._enabled=!1,this.removeHooks(),this):this},enabled:function(){return!!this._enabled}});nn.addTo=function(t,e){return t.addHandler(e,this),this};var rn,on={Events:A},sn=St?"touchstart mousedown":"mousedown",an={mousedown:"mouseup",touchstart:"touchend",pointerdown:"touchend",MSPointerDown:"touchend"},ln={mousedown:"mousemove",touchstart:"touchmove",pointerdown:"touchmove",MSPointerDown:"touchmove"},un=C.extend({options:{clickTolerance:3},initialize:function(t,e,n,r){p(this,r),this._element=t,this._dragStartTarget=e||t,this._preventOutline=n},enable:function(){this._enabled||(Ae(this._dragStartTarget,sn,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(un._dragging===this&&this.finishDrag(),Le(this._dragStartTarget,sn,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(t){if(!t._simulated&&this._enabled&&(this._moved=!1,!he(this._element,"leaflet-zoom-anim")&&!(un._dragging||t.shiftKey||1!==t.which&&1!==t.button&&!t.touches||(un._dragging=this,this._preventOutline&&xe(this._element),Se(),qt(),this._moving)))){this.fire("down");var e=t.touches?t.touches[0]:t,n=Te(this._element);this._startPoint=new R(e.clientX,e.clientY),this._parentScale=Oe(n),Ae(document,ln[t.type],this._onMove,this),Ae(document,an[t.type],this._onUp,this)}},_onMove:function(t){if(!t._simulated&&this._enabled)if(t.touches&&t.touches.length>1)this._moved=!0;else{var e=t.touches&&1===t.touches.length?t.touches[0]:t,n=new R(e.clientX,e.clientY)._subtract(this._startPoint);(n.x||n.y)&&(Math.abs(n.x)+Math.abs(n.y)<this.options.clickTolerance||(n.x/=this._parentScale.x,n.y/=this._parentScale.y,je(t),this._moved||(this.fire("dragstart"),this._moved=!0,this._startPos=Pe(this._element).subtract(n),fe(document.body,"leaflet-dragging"),this._lastTarget=t.target||t.srcElement,window.SVGElementInstance&&this._lastTarget instanceof SVGElementInstance&&(this._lastTarget=this._lastTarget.correspondingUseElement),fe(this._lastTarget,"leaflet-drag-target")),this._newPos=this._startPos.add(n),this._moving=!0,T(this._animRequest),this._lastEvent=t,this._animRequest=I(this._updatePosition,this,!0)))}},_updatePosition:function(){var t={originalEvent:this._lastEvent};this.fire("predrag",t),ve(this._element,this._newPos),this.fire("drag",t)},_onUp:function(t){!t._simulated&&this._enabled&&this.finishDrag()},finishDrag:function(){for(var t in pe(document.body,"leaflet-dragging"),this._lastTarget&&(pe(this._lastTarget,"leaflet-drag-target"),this._lastTarget=null),ln)Le(document,ln[t],this._onMove,this),Le(document,an[t],this._onUp,this);Ee(),Kt(),this._moved&&this._moving&&(T(this._animRequest),this.fire("dragend",{distance:this._newPos.distanceTo(this._startPos)})),this._moving=!1,un._dragging=!1}});function cn(t,e){if(!e||!t.length)return t.slice();var n=e*e;return t=function(t,e){var n=t.length,r=new(typeof Uint8Array!=void 0+""?Uint8Array:Array)(n);r[0]=r[n-1]=1,function t(e,n,r,i,o){var s,a,l,u=0;for(a=i+1;a<=o-1;a++)(l=yn(e[a],e[i],e[o],!0))>u&&(s=a,u=l);u>r&&(n[s]=1,t(e,n,r,i,s),t(e,n,r,s,o))}(t,r,e,0,n-1);var i,o=[];for(i=0;i<n;i++)r[i]&&o.push(t[i]);return o}(t=function(t,e){for(var n=[t[0]],r=1,i=0,o=t.length;r<o;r++)s=t[r],a=t[i],l=void 0,u=void 0,l=a.x-s.x,u=a.y-s.y,l*l+u*u>e&&(n.push(t[r]),i=r);var s,a,l,u;return i<o-1&&n.push(t[o-1]),n}(t,n),n)}function hn(t,e,n){return Math.sqrt(yn(t,e,n,!0))}function fn(t,e,n,r,i){var o,s,a,l=r?rn:dn(t,n),u=dn(e,n);for(rn=u;;){if(!(l|u))return[t,e];if(l&u)return!1;s=pn(t,e,o=l||u,n,i),a=dn(s,n),o===l?(t=s,l=a):(e=s,u=a)}}function pn(t,e,n,r,i){var o,s,a=e.x-t.x,l=e.y-t.y,u=r.min,c=r.max;return 8&n?(o=t.x+a*(c.y-t.y)/l,s=c.y):4&n?(o=t.x+a*(u.y-t.y)/l,s=u.y):2&n?(o=c.x,s=t.y+l*(c.x-t.x)/a):1&n&&(o=u.x,s=t.y+l*(u.x-t.x)/a),new R(o,s,i)}function dn(t,e){var n=0;return t.x<e.min.x?n|=1:t.x>e.max.x&&(n|=2),t.y<e.min.y?n|=4:t.y>e.max.y&&(n|=8),n}function yn(t,e,n,r){var i,o=e.x,s=e.y,a=n.x-o,l=n.y-s,u=a*a+l*l;return u>0&&((i=((t.x-o)*a+(t.y-s)*l)/u)>1?(o=n.x,s=n.y):i>0&&(o+=a*i,s+=l*i)),a=t.x-o,l=t.y-s,r?a*a+l*l:new R(o,s)}function _n(t){return!m(t[0])||"object"!=typeof t[0][0]&&void 0!==t[0][0]}function mn(t){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),_n(t)}var gn=(Object.freeze||Object)({simplify:cn,pointToSegmentDistance:hn,closestPointOnSegment:function(t,e,n){return yn(t,e,n)},clipSegment:fn,_getEdgeIntersection:pn,_getBitCode:dn,_sqClosestPointOnSegment:yn,isFlat:_n,_flat:mn});function vn(t,e,n){var r,i,o,s,a,l,u,c,h,f=[1,4,2,8];for(i=0,u=t.length;i<u;i++)t[i]._code=dn(t[i],e);for(s=0;s<4;s++){for(c=f[s],r=[],i=0,u=t.length,o=u-1;i<u;o=i++)a=t[i],l=t[o],a._code&c?l._code&c||((h=pn(l,a,c,e,n))._code=dn(h,e),r.push(h)):(l._code&c&&((h=pn(l,a,c,e,n))._code=dn(h,e),r.push(h)),r.push(a));t=r}return t}var Pn=(Object.freeze||Object)({clipPolygon:vn}),bn={project:function(t){return new R(t.lng,t.lat)},unproject:function(t){return new F(t.y,t.x)},bounds:new D([-180,-90],[180,90])},Sn={R:6378137,R_MINOR:6356752.314245179,bounds:new D([-20037508.34279,-15496570.73972],[20037508.34279,18764656.23138]),project:function(t){var e=Math.PI/180,n=this.R,r=t.lat*e,i=this.R_MINOR/n,o=Math.sqrt(1-i*i),s=o*Math.sin(r),a=Math.tan(Math.PI/4-r/2)/Math.pow((1-s)/(1+s),o/2);return r=-n*Math.log(Math.max(a,1e-10)),new R(t.lng*e*n,r)},unproject:function(t){for(var e,n=180/Math.PI,r=this.R,i=this.R_MINOR/r,o=Math.sqrt(1-i*i),s=Math.exp(-t.y/r),a=Math.PI/2-2*Math.atan(s),l=0,u=.1;l<15&&Math.abs(u)>1e-7;l++)e=o*Math.sin(a),e=Math.pow((1-e)/(1+e),o/2),u=Math.PI/2-2*Math.atan(s*e)-a,a+=u;return new F(a*n,t.x*n/r)}},En=(Object.freeze||Object)({LonLat:bn,Mercator:Sn,SphericalMercator:U}),xn=n({},X,{code:"EPSG:3395",projection:Sn,transformation:function(){var t=.5/(Math.PI*Sn.R);return W(t,.5,-t,.5)}()}),In=n({},X,{code:"EPSG:4326",projection:bn,transformation:W(1/180,1,-1/180,.5)}),Tn=n({},z,{projection:bn,transformation:W(1,0,-1,0),scale:function(t){return Math.pow(2,t)},zoom:function(t){return Math.log(t)/Math.LN2},distance:function(t,e){var n=e.lng-t.lng,r=e.lat-t.lat;return Math.sqrt(n*n+r*r)},infinite:!0});z.Earth=X,z.EPSG3395=xn,z.EPSG3857=H,z.EPSG900913=V,z.EPSG4326=In,z.Simple=Tn;var On=C.extend({options:{pane:"overlayPane",attribution:null,bubblingMouseEvents:!0},addTo:function(t){return t.addLayer(this),this},remove:function(){return this.removeFrom(this._map||this._mapToAdd)},removeFrom:function(t){return t&&t.removeLayer(this),this},getPane:function(t){return this._map.getPane(t?this.options[t]||t:this.options.pane)},addInteractiveTarget:function(t){return this._map._targets[s(t)]=this,this},removeInteractiveTarget:function(t){return delete this._map._targets[s(t)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(t){var e=t.target;if(e.hasLayer(this)){if(this._map=e,this._zoomAnimated=e._zoomAnimated,this.getEvents){var n=this.getEvents();e.on(n,this),this.once("remove",function(){e.off(n,this)},this)}this.onAdd(e),this.getAttribution&&e.attributionControl&&e.attributionControl.addAttribution(this.getAttribution()),this.fire("add"),e.fire("layeradd",{layer:this})}}});Ze.include({addLayer:function(t){if(!t._layerAdd)throw new Error("The provided object is not a Layer.");var e=s(t);return this._layers[e]?this:(this._layers[e]=t,t._mapToAdd=this,t.beforeAdd&&t.beforeAdd(this),this.whenReady(t._layerAdd,t),this)},removeLayer:function(t){var e=s(t);return this._layers[e]?(this._loaded&&t.onRemove(this),t.getAttribution&&this.attributionControl&&this.attributionControl.removeAttribution(t.getAttribution()),delete this._layers[e],this._loaded&&(this.fire("layerremove",{layer:t}),t.fire("remove")),t._map=t._mapToAdd=null,this):this},hasLayer:function(t){return!!t&&s(t)in this._layers},eachLayer:function(t,e){for(var n in this._layers)t.call(e,this._layers[n]);return this},_addLayers:function(t){t=t?m(t)?t:[t]:[];for(var e=0,n=t.length;e<n;e++)this.addLayer(t[e])},_addZoomLimit:function(t){!isNaN(t.options.maxZoom)&&isNaN(t.options.minZoom)||(this._zoomBoundLayers[s(t)]=t,this._updateZoomLevels())},_removeZoomLimit:function(t){var e=s(t);this._zoomBoundLayers[e]&&(delete this._zoomBoundLayers[e],this._updateZoomLevels())},_updateZoomLevels:function(){var t=1/0,e=-1/0,n=this._getZoomSpan();for(var r in this._zoomBoundLayers){var i=this._zoomBoundLayers[r].options;t=void 0===i.minZoom?t:Math.min(t,i.minZoom),e=void 0===i.maxZoom?e:Math.max(e,i.maxZoom)}this._layersMaxZoom=e===-1/0?void 0:e,this._layersMinZoom=t===1/0?void 0:t,n!==this._getZoomSpan()&&this.fire("zoomlevelschange"),void 0===this.options.maxZoom&&this._layersMaxZoom&&this.getZoom()>this._layersMaxZoom&&this.setZoom(this._layersMaxZoom),void 0===this.options.minZoom&&this._layersMinZoom&&this.getZoom()<this._layersMinZoom&&this.setZoom(this._layersMinZoom)}});var wn=On.extend({initialize:function(t,e){var n,r;if(p(this,e),this._layers={},t)for(n=0,r=t.length;n<r;n++)this.addLayer(t[n])},addLayer:function(t){var e=this.getLayerId(t);return this._layers[e]=t,this._map&&this._map.addLayer(t),this},removeLayer:function(t){var e=t in this._layers?t:this.getLayerId(t);return this._map&&this._layers[e]&&this._map.removeLayer(this._layers[e]),delete this._layers[e],this},hasLayer:function(t){return!!t&&(t in this._layers||this.getLayerId(t)in this._layers)},clearLayers:function(){return this.eachLayer(this.removeLayer,this)},invoke:function(t){var e,n,r=Array.prototype.slice.call(arguments,1);for(e in this._layers)(n=this._layers[e])[t]&&n[t].apply(n,r);return this},onAdd:function(t){this.eachLayer(t.addLayer,t)},onRemove:function(t){this.eachLayer(t.removeLayer,t)},eachLayer:function(t,e){for(var n in this._layers)t.call(e,this._layers[n]);return this},getLayer:function(t){return this._layers[t]},getLayers:function(){var t=[];return this.eachLayer(t.push,t),t},setZIndex:function(t){return this.invoke("setZIndex",t)},getLayerId:function(t){return s(t)}}),An=wn.extend({addLayer:function(t){return this.hasLayer(t)?this:(t.addEventParent(this),wn.prototype.addLayer.call(this,t),this.fire("layeradd",{layer:t}))},removeLayer:function(t){return this.hasLayer(t)?(t in this._layers&&(t=this._layers[t]),t.removeEventParent(this),wn.prototype.removeLayer.call(this,t),this.fire("layerremove",{layer:t})):this},setStyle:function(t){return this.invoke("setStyle",t)},bringToFront:function(){return this.invoke("bringToFront")},bringToBack:function(){return this.invoke("bringToBack")},getBounds:function(){var t=new j;for(var e in this._layers){var n=this._layers[e];t.extend(n.getBounds?n.getBounds():n.getLatLng())}return t}}),Cn=w.extend({options:{popupAnchor:[0,0],tooltipAnchor:[0,0]},initialize:function(t){p(this,t)},createIcon:function(t){return this._createIcon("icon",t)},createShadow:function(t){return this._createIcon("shadow",t)},_createIcon:function(t,e){var n=this._getIconUrl(t);if(!n){if("icon"===t)throw new Error("iconUrl not set in Icon options (see the docs).");return null}var r=this._createImg(n,e&&"IMG"===e.tagName?e:null);return this._setIconStyles(r,t),r},_setIconStyles:function(t,e){var n=this.options,r=n[e+"Size"];"number"==typeof r&&(r=[r,r]);var i=M(r),o=M("shadow"===e&&n.shadowAnchor||n.iconAnchor||i&&i.divideBy(2,!0));t.className="leaflet-marker-"+e+" "+(n.className||""),o&&(t.style.marginLeft=-o.x+"px",t.style.marginTop=-o.y+"px"),i&&(t.style.width=i.x+"px",t.style.height=i.y+"px")},_createImg:function(t,e){return(e=e||document.createElement("img")).src=t,e},_getIconUrl:function(t){return It&&this.options[t+"RetinaUrl"]||this.options[t+"Url"]}}),Ln=Cn.extend({options:{iconUrl:"marker-icon.png",iconRetinaUrl:"marker-icon-2x.png",shadowUrl:"marker-shadow.png",iconSize:[25,41],iconAnchor:[12,41],popupAnchor:[1,-34],tooltipAnchor:[16,-28],shadowSize:[41,41]},_getIconUrl:function(t){return Ln.imagePath||(Ln.imagePath=this._detectIconPath()),(this.options.imagePath||Ln.imagePath)+Cn.prototype._getIconUrl.call(this,t)},_detectIconPath:function(){var t=se("div","leaflet-default-icon-path",document.body),e=oe(t,"background-image")||oe(t,"backgroundImage");return document.body.removeChild(t),e=null===e||0!==e.indexOf("url")?"":e.replace(/^url\(["']?/,"").replace(/marker-icon\.png["']?\)$/,"")}}),Rn=nn.extend({initialize:function(t){this._marker=t},addHooks:function(){var t=this._marker._icon;this._draggable||(this._draggable=new un(t,t,!0)),this._draggable.on({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).enable(),fe(t,"leaflet-marker-draggable")},removeHooks:function(){this._draggable.off({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).disable(),this._marker._icon&&pe(this._marker._icon,"leaflet-marker-draggable")},moved:function(){return this._draggable&&this._draggable._moved},_adjustPan:function(t){var e=this._marker,n=e._map,r=this._marker.options.autoPanSpeed,i=this._marker.options.autoPanPadding,o=Pe(e._icon),s=n.getPixelBounds(),a=n.getPixelOrigin(),l=$(s.min._subtract(a).add(i),s.max._subtract(a).subtract(i));if(!l.contains(o)){var u=M((Math.max(l.max.x,o.x)-l.max.x)/(s.max.x-l.max.x)-(Math.min(l.min.x,o.x)-l.min.x)/(s.min.x-l.min.x),(Math.max(l.max.y,o.y)-l.max.y)/(s.max.y-l.max.y)-(Math.min(l.min.y,o.y)-l.min.y)/(s.min.y-l.min.y)).multiplyBy(r);n.panBy(u,{animate:!1}),this._draggable._newPos._add(u),this._draggable._startPos._add(u),ve(e._icon,this._draggable._newPos),this._onDrag(t),this._panRequest=I(this._adjustPan.bind(this,t))}},_onDragStart:function(){this._oldLatLng=this._marker.getLatLng(),this._marker.closePopup().fire("movestart").fire("dragstart")},_onPreDrag:function(t){this._marker.options.autoPan&&(T(this._panRequest),this._panRequest=I(this._adjustPan.bind(this,t)))},_onDrag:function(t){var e=this._marker,n=e._shadow,r=Pe(e._icon),i=e._map.layerPointToLatLng(r);n&&ve(n,r),e._latlng=i,t.latlng=i,t.oldLatLng=this._oldLatLng,e.fire("move",t).fire("drag",t)},_onDragEnd:function(t){T(this._panRequest),delete this._oldLatLng,this._marker.fire("moveend").fire("dragend",t)}}),Nn=On.extend({options:{icon:new Ln,interactive:!0,keyboard:!0,title:"",alt:"",zIndexOffset:0,opacity:1,riseOnHover:!1,riseOffset:250,pane:"markerPane",shadowPane:"shadowPane",bubblingMouseEvents:!1,draggable:!1,autoPan:!1,autoPanPadding:[50,50],autoPanSpeed:10},initialize:function(t,e){p(this,e),this._latlng=k(t)},onAdd:function(t){this._zoomAnimated=this._zoomAnimated&&t.options.markerZoomAnimation,this._zoomAnimated&&t.on("zoomanim",this._animateZoom,this),this._initIcon(),this.update()},onRemove:function(t){this.dragging&&this.dragging.enabled()&&(this.options.draggable=!0,this.dragging.removeHooks()),delete this.dragging,this._zoomAnimated&&t.off("zoomanim",this._animateZoom,this),this._removeIcon(),this._removeShadow()},getEvents:function(){return{zoom:this.update,viewreset:this.update}},getLatLng:function(){return this._latlng},setLatLng:function(t){var e=this._latlng;return this._latlng=k(t),this.update(),this.fire("move",{oldLatLng:e,latlng:this._latlng})},setZIndexOffset:function(t){return this.options.zIndexOffset=t,this.update()},getIcon:function(){return this.options.icon},setIcon:function(t){return this.options.icon=t,this._map&&(this._initIcon(),this.update()),this._popup&&this.bindPopup(this._popup,this._popup.options),this},getElement:function(){return this._icon},update:function(){if(this._icon&&this._map){var t=this._map.latLngToLayerPoint(this._latlng).round();this._setPos(t)}return this},_initIcon:function(){var t=this.options,e="leaflet-zoom-"+(this._zoomAnimated?"animated":"hide"),n=t.icon.createIcon(this._icon),r=!1;n!==this._icon&&(this._icon&&this._removeIcon(),r=!0,t.title&&(n.title=t.title),"IMG"===n.tagName&&(n.alt=t.alt||"")),fe(n,e),t.keyboard&&(n.tabIndex="0"),this._icon=n,t.riseOnHover&&this.on({mouseover:this._bringToFront,mouseout:this._resetZIndex});var i=t.icon.createShadow(this._shadow),o=!1;i!==this._shadow&&(this._removeShadow(),o=!0),i&&(fe(i,e),i.alt=""),this._shadow=i,t.opacity<1&&this._updateOpacity(),r&&this.getPane().appendChild(this._icon),this._initInteraction(),i&&o&&this.getPane(t.shadowPane).appendChild(this._shadow)},_removeIcon:function(){this.options.riseOnHover&&this.off({mouseover:this._bringToFront,mouseout:this._resetZIndex}),ae(this._icon),this.removeInteractiveTarget(this._icon),this._icon=null},_removeShadow:function(){this._shadow&&ae(this._shadow),this._shadow=null},_setPos:function(t){this._icon&&ve(this._icon,t),this._shadow&&ve(this._shadow,t),this._zIndex=t.y+this.options.zIndexOffset,this._resetZIndex()},_updateZIndex:function(t){this._icon&&(this._icon.style.zIndex=this._zIndex+t)},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center).round();this._setPos(e)},_initInteraction:function(){if(this.options.interactive&&(fe(this._icon,"leaflet-interactive"),this.addInteractiveTarget(this._icon),Rn)){var t=this.options.draggable;this.dragging&&(t=this.dragging.enabled(),this.dragging.disable()),this.dragging=new Rn(this),t&&this.dragging.enable()}},setOpacity:function(t){return this.options.opacity=t,this._map&&this._updateOpacity(),this},_updateOpacity:function(){var t=this.options.opacity;this._icon&&_e(this._icon,t),this._shadow&&_e(this._shadow,t)},_bringToFront:function(){this._updateZIndex(this.options.riseOffset)},_resetZIndex:function(){this._updateZIndex(0)},_getPopupAnchor:function(){return this.options.icon.options.popupAnchor},_getTooltipAnchor:function(){return this.options.icon.options.tooltipAnchor}}),Mn=On.extend({options:{stroke:!0,color:"#3388ff",weight:3,opacity:1,lineCap:"round",lineJoin:"round",dashArray:null,dashOffset:null,fill:!1,fillColor:null,fillOpacity:.2,fillRule:"evenodd",interactive:!0,bubblingMouseEvents:!0},beforeAdd:function(t){this._renderer=t.getRenderer(this)},onAdd:function(){this._renderer._initPath(this),this._reset(),this._renderer._addPath(this)},onRemove:function(){this._renderer._removePath(this)},redraw:function(){return this._map&&this._renderer._updatePath(this),this},setStyle:function(t){return p(this,t),this._renderer&&(this._renderer._updateStyle(this),this.options.stroke&&t&&t.hasOwnProperty("weight")&&this._updateBounds()),this},bringToFront:function(){return this._renderer&&this._renderer._bringToFront(this),this},bringToBack:function(){return this._renderer&&this._renderer._bringToBack(this),this},getElement:function(){return this._path},_reset:function(){this._project(),this._update()},_clickTolerance:function(){return(this.options.stroke?this.options.weight/2:0)+this._renderer.options.tolerance}}),Dn=Mn.extend({options:{fill:!0,radius:10},initialize:function(t,e){p(this,e),this._latlng=k(t),this._radius=this.options.radius},setLatLng:function(t){var e=this._latlng;return this._latlng=k(t),this.redraw(),this.fire("move",{oldLatLng:e,latlng:this._latlng})},getLatLng:function(){return this._latlng},setRadius:function(t){return this.options.radius=this._radius=t,this.redraw()},getRadius:function(){return this._radius},setStyle:function(t){var e=t&&t.radius||this._radius;return Mn.prototype.setStyle.call(this,t),this.setRadius(e),this},_project:function(){this._point=this._map.latLngToLayerPoint(this._latlng),this._updateBounds()},_updateBounds:function(){var t=this._radius,e=this._radiusY||t,n=this._clickTolerance(),r=[t+n,e+n];this._pxBounds=new D(this._point.subtract(r),this._point.add(r))},_update:function(){this._map&&this._updatePath()},_updatePath:function(){this._renderer._updateCircle(this)},_empty:function(){return this._radius&&!this._renderer._bounds.intersects(this._pxBounds)},_containsPoint:function(t){return t.distanceTo(this._point)<=this._radius+this._clickTolerance()}}),$n=Dn.extend({initialize:function(t,e,r){if("number"==typeof e&&(e=n({},r,{radius:e})),p(this,e),this._latlng=k(t),isNaN(this.options.radius))throw new Error("Circle radius cannot be NaN");this._mRadius=this.options.radius},setRadius:function(t){return this._mRadius=t,this.redraw()},getRadius:function(){return this._mRadius},getBounds:function(){var t=[this._radius,this._radiusY||this._radius];return new j(this._map.layerPointToLatLng(this._point.subtract(t)),this._map.layerPointToLatLng(this._point.add(t)))},setStyle:Mn.prototype.setStyle,_project:function(){var t=this._latlng.lng,e=this._latlng.lat,n=this._map,r=n.options.crs;if(r.distance===X.distance){var i=Math.PI/180,o=this._mRadius/X.R/i,s=n.project([e+o,t]),a=n.project([e-o,t]),l=s.add(a).divideBy(2),u=n.unproject(l).lat,c=Math.acos((Math.cos(o*i)-Math.sin(e*i)*Math.sin(u*i))/(Math.cos(e*i)*Math.cos(u*i)))/i;(isNaN(c)||0===c)&&(c=o/Math.cos(Math.PI/180*e)),this._point=l.subtract(n.getPixelOrigin()),this._radius=isNaN(c)?0:l.x-n.project([u,t-c]).x,this._radiusY=l.y-s.y}else{var h=r.unproject(r.project(this._latlng).subtract([this._mRadius,0]));this._point=n.latLngToLayerPoint(this._latlng),this._radius=this._point.x-n.latLngToLayerPoint(h).x}this._updateBounds()}}),jn=Mn.extend({options:{smoothFactor:1,noClip:!1},initialize:function(t,e){p(this,e),this._setLatLngs(t)},getLatLngs:function(){return this._latlngs},setLatLngs:function(t){return this._setLatLngs(t),this.redraw()},isEmpty:function(){return!this._latlngs.length},closestLayerPoint:function(t){for(var e,n,r=1/0,i=null,o=yn,s=0,a=this._parts.length;s<a;s++)for(var l=this._parts[s],u=1,c=l.length;u<c;u++){e=l[u-1],n=l[u];var h=o(t,e,n,!0);h<r&&(r=h,i=o(t,e,n))}return i&&(i.distance=Math.sqrt(r)),i},getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");var t,e,n,r,i,o,s,a=this._rings[0],l=a.length;if(!l)return null;for(t=0,e=0;t<l-1;t++)e+=a[t].distanceTo(a[t+1])/2;if(0===e)return this._map.layerPointToLatLng(a[0]);for(t=0,r=0;t<l-1;t++)if(i=a[t],o=a[t+1],n=i.distanceTo(o),(r+=n)>e)return s=(r-e)/n,this._map.layerPointToLatLng([o.x-s*(o.x-i.x),o.y-s*(o.y-i.y)])},getBounds:function(){return this._bounds},addLatLng:function(t,e){return e=e||this._defaultShape(),t=k(t),e.push(t),this._bounds.extend(t),this.redraw()},_setLatLngs:function(t){this._bounds=new j,this._latlngs=this._convertLatLngs(t)},_defaultShape:function(){return _n(this._latlngs)?this._latlngs:this._latlngs[0]},_convertLatLngs:function(t){for(var e=[],n=_n(t),r=0,i=t.length;r<i;r++)n?(e[r]=k(t[r]),this._bounds.extend(e[r])):e[r]=this._convertLatLngs(t[r]);return e},_project:function(){var t=new D;this._rings=[],this._projectLatlngs(this._latlngs,this._rings,t),this._bounds.isValid()&&t.isValid()&&(this._rawPxBounds=t,this._updateBounds())},_updateBounds:function(){var t=this._clickTolerance(),e=new R(t,t);this._pxBounds=new D([this._rawPxBounds.min.subtract(e),this._rawPxBounds.max.add(e)])},_projectLatlngs:function(t,e,n){var r,i,o=t[0]instanceof F,s=t.length;if(o){for(i=[],r=0;r<s;r++)i[r]=this._map.latLngToLayerPoint(t[r]),n.extend(i[r]);e.push(i)}else for(r=0;r<s;r++)this._projectLatlngs(t[r],e,n)},_clipPoints:function(){var t=this._renderer._bounds;if(this._parts=[],this._pxBounds&&this._pxBounds.intersects(t))if(this.options.noClip)this._parts=this._rings;else{var e,n,r,i,o,s,a,l=this._parts;for(e=0,r=0,i=this._rings.length;e<i;e++)for(a=this._rings[e],n=0,o=a.length;n<o-1;n++)(s=fn(a[n],a[n+1],t,n,!0))&&(l[r]=l[r]||[],l[r].push(s[0]),s[1]===a[n+1]&&n!==o-2||(l[r].push(s[1]),r++))}},_simplifyPoints:function(){for(var t=this._parts,e=this.options.smoothFactor,n=0,r=t.length;n<r;n++)t[n]=cn(t[n],e)},_update:function(){this._map&&(this._clipPoints(),this._simplifyPoints(),this._updatePath())},_updatePath:function(){this._renderer._updatePoly(this)},_containsPoint:function(t,e){var n,r,i,o,s,a,l=this._clickTolerance();if(!this._pxBounds||!this._pxBounds.contains(t))return!1;for(n=0,o=this._parts.length;n<o;n++)for(a=this._parts[n],r=0,s=a.length,i=s-1;r<s;i=r++)if((e||0!==r)&&hn(t,a[i],a[r])<=l)return!0;return!1}});jn._flat=mn;var Bn=jn.extend({options:{fill:!0},isEmpty:function(){return!this._latlngs.length||!this._latlngs[0].length},getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");var t,e,n,r,i,o,s,a,l,u=this._rings[0],c=u.length;if(!c)return null;for(o=s=a=0,t=0,e=c-1;t<c;e=t++)n=u[t],r=u[e],i=n.y*r.x-r.y*n.x,s+=(n.x+r.x)*i,a+=(n.y+r.y)*i,o+=3*i;return l=0===o?u[0]:[s/o,a/o],this._map.layerPointToLatLng(l)},_convertLatLngs:function(t){var e=jn.prototype._convertLatLngs.call(this,t),n=e.length;return n>=2&&e[0]instanceof F&&e[0].equals(e[n-1])&&e.pop(),e},_setLatLngs:function(t){jn.prototype._setLatLngs.call(this,t),_n(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return _n(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var t=this._renderer._bounds,e=this.options.weight,n=new R(e,e);if(t=new D(t.min.subtract(n),t.max.add(n)),this._parts=[],this._pxBounds&&this._pxBounds.intersects(t))if(this.options.noClip)this._parts=this._rings;else for(var r,i=0,o=this._rings.length;i<o;i++)(r=vn(this._rings[i],t,!0)).length&&this._parts.push(r)},_updatePath:function(){this._renderer._updatePoly(this,!0)},_containsPoint:function(t){var e,n,r,i,o,s,a,l,u=!1;if(!this._pxBounds||!this._pxBounds.contains(t))return!1;for(i=0,a=this._parts.length;i<a;i++)for(e=this._parts[i],o=0,l=e.length,s=l-1;o<l;s=o++)n=e[o],r=e[s],n.y>t.y!=r.y>t.y&&t.x<(r.x-n.x)*(t.y-n.y)/(r.y-n.y)+n.x&&(u=!u);return u||jn.prototype._containsPoint.call(this,t,!0)}}),Fn=An.extend({initialize:function(t,e){p(this,e),this._layers={},t&&this.addData(t)},addData:function(t){var e,n,r,i=m(t)?t:t.features;if(i){for(e=0,n=i.length;e<n;e++)((r=i[e]).geometries||r.geometry||r.features||r.coordinates)&&this.addData(r);return this}var o=this.options;if(o.filter&&!o.filter(t))return this;var s=kn(t,o);return s?(s.feature=Hn(t),s.defaultOptions=s.options,this.resetStyle(s),o.onEachFeature&&o.onEachFeature(t,s),this.addLayer(s)):this},resetStyle:function(t){return void 0===t?this.eachLayer(this.resetStyle,this):(t.options=n({},t.defaultOptions),this._setLayerStyle(t,this.options.style),this)},setStyle:function(t){return this.eachLayer(function(e){this._setLayerStyle(e,t)},this)},_setLayerStyle:function(t,e){t.setStyle&&("function"==typeof e&&(e=e(t.feature)),t.setStyle(e))}});function kn(t,e){var n,r,i,o,s="Feature"===t.type?t.geometry:t,a=s?s.coordinates:null,l=[],u=e&&e.pointToLayer,c=e&&e.coordsToLatLng||zn;if(!a&&!s)return null;switch(s.type){case"Point":return n=c(a),Yn(u,t,n,e);case"MultiPoint":for(i=0,o=a.length;i<o;i++)n=c(a[i]),l.push(Yn(u,t,n,e));return new An(l);case"LineString":case"MultiLineString":return r=Xn(a,"LineString"===s.type?0:1,c),new jn(r,e);case"Polygon":case"MultiPolygon":return r=Xn(a,"Polygon"===s.type?1:2,c),new Bn(r,e);case"GeometryCollection":for(i=0,o=s.geometries.length;i<o;i++){var h=kn({geometry:s.geometries[i],type:"Feature",properties:t.properties},e);h&&l.push(h)}return new An(l);default:throw new Error("Invalid GeoJSON object.")}}function Yn(t,e,n,r){return t?t(e,n):new Nn(n,r&&r.markersInheritOptions&&r)}function zn(t){return new F(t[1],t[0],t[2])}function Xn(t,e,n){for(var r,i=[],o=0,s=t.length;o<s;o++)r=e?Xn(t[o],e-1,n):(n||zn)(t[o]),i.push(r);return i}function Un(t,e){return e="number"==typeof e?e:6,void 0!==t.alt?[c(t.lng,e),c(t.lat,e),c(t.alt,e)]:[c(t.lng,e),c(t.lat,e)]}function Gn(t,e,n,r){for(var i=[],o=0,s=t.length;o<s;o++)i.push(e?Gn(t[o],e-1,n,r):Un(t[o],r));return!e&&n&&i.push(i[0]),i}function Wn(t,e){return t.feature?n({},t.feature,{geometry:e}):Hn(e)}function Hn(t){return"Feature"===t.type||"FeatureCollection"===t.type?t:{type:"Feature",properties:{},geometry:t}}var Vn={toGeoJSON:function(t){return Wn(this,{type:"Point",coordinates:Un(this.getLatLng(),t)})}};function Zn(t,e){return new Fn(t,e)}Nn.include(Vn),$n.include(Vn),Dn.include(Vn),jn.include({toGeoJSON:function(t){var e=!_n(this._latlngs),n=Gn(this._latlngs,e?1:0,!1,t);return Wn(this,{type:(e?"Multi":"")+"LineString",coordinates:n})}}),Bn.include({toGeoJSON:function(t){var e=!_n(this._latlngs),n=e&&!_n(this._latlngs[0]),r=Gn(this._latlngs,n?2:e?1:0,!0,t);return e||(r=[r]),Wn(this,{type:(n?"Multi":"")+"Polygon",coordinates:r})}}),wn.include({toMultiPoint:function(t){var e=[];return this.eachLayer(function(n){e.push(n.toGeoJSON(t).geometry.coordinates)}),Wn(this,{type:"MultiPoint",coordinates:e})},toGeoJSON:function(t){var e=this.feature&&this.feature.geometry&&this.feature.geometry.type;if("MultiPoint"===e)return this.toMultiPoint(t);var n="GeometryCollection"===e,r=[];return this.eachLayer(function(e){if(e.toGeoJSON){var i=e.toGeoJSON(t);if(n)r.push(i.geometry);else{var o=Hn(i);"FeatureCollection"===o.type?r.push.apply(r,o.features):r.push(o)}}}),n?Wn(this,{geometries:r,type:"GeometryCollection"}):{type:"FeatureCollection",features:r}}});var qn=Zn,Kn=On.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""},initialize:function(t,e,n){this._url=t,this._bounds=B(e),p(this,n)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(fe(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){ae(this._image),this.options.interactive&&this.removeInteractiveTarget(this._image)},setOpacity:function(t){return this.options.opacity=t,this._image&&this._updateOpacity(),this},setStyle:function(t){return t.opacity&&this.setOpacity(t.opacity),this},bringToFront:function(){return this._map&&ue(this._image),this},bringToBack:function(){return this._map&&ce(this._image),this},setUrl:function(t){return this._url=t,this._image&&(this._image.src=t),this},setBounds:function(t){return this._bounds=B(t),this._map&&this._reset(),this},getEvents:function(){var t={zoom:this._reset,viewreset:this._reset};return this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},setZIndex:function(t){return this.options.zIndex=t,this._updateZIndex(),this},getBounds:function(){return this._bounds},getElement:function(){return this._image},_initImage:function(){var t="IMG"===this._url.tagName,e=this._image=t?this._url:se("img");fe(e,"leaflet-image-layer"),this._zoomAnimated&&fe(e,"leaflet-zoom-animated"),this.options.className&&fe(e,this.options.className),e.onselectstart=u,e.onmousemove=u,e.onload=i(this.fire,this,"load"),e.onerror=i(this._overlayOnError,this,"error"),(this.options.crossOrigin||""===this.options.crossOrigin)&&(e.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),this.options.zIndex&&this._updateZIndex(),t?this._url=e.src:(e.src=this._url,e.alt=this.options.alt)},_animateZoom:function(t){var e=this._map.getZoomScale(t.zoom),n=this._map._latLngBoundsToNewLayerBounds(this._bounds,t.zoom,t.center).min;ge(this._image,n,e)},_reset:function(){var t=this._image,e=new D(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),n=e.getSize();ve(t,e.min),t.style.width=n.x+"px",t.style.height=n.y+"px"},_updateOpacity:function(){_e(this._image,this.options.opacity)},_updateZIndex:function(){this._image&&void 0!==this.options.zIndex&&null!==this.options.zIndex&&(this._image.style.zIndex=this.options.zIndex)},_overlayOnError:function(){this.fire("error");var t=this.options.errorOverlayUrl;t&&this._url!==t&&(this._url=t,this._image.src=t)}}),Jn=Kn.extend({options:{autoplay:!0,loop:!0,keepAspectRatio:!0},_initImage:function(){var t="VIDEO"===this._url.tagName,e=this._image=t?this._url:se("video");if(fe(e,"leaflet-image-layer"),this._zoomAnimated&&fe(e,"leaflet-zoom-animated"),this.options.className&&fe(e,this.options.className),e.onselectstart=u,e.onmousemove=u,e.onloadeddata=i(this.fire,this,"load"),t){for(var n=e.getElementsByTagName("source"),r=[],o=0;o<n.length;o++)r.push(n[o].src);this._url=n.length>0?r:[e.src]}else{m(this._url)||(this._url=[this._url]),!this.options.keepAspectRatio&&e.style.hasOwnProperty("objectFit")&&(e.style.objectFit="fill"),e.autoplay=!!this.options.autoplay,e.loop=!!this.options.loop;for(var s=0;s<this._url.length;s++){var a=se("source");a.src=this._url[s],e.appendChild(a)}}}}),Qn=Kn.extend({_initImage:function(){var t=this._image=this._url;fe(t,"leaflet-image-layer"),this._zoomAnimated&&fe(t,"leaflet-zoom-animated"),this.options.className&&fe(t,this.options.className),t.onselectstart=u,t.onmousemove=u}}),tr=On.extend({options:{offset:[0,7],className:"",pane:"popupPane"},initialize:function(t,e){p(this,t),this._source=e},onAdd:function(t){this._zoomAnimated=t._zoomAnimated,this._container||this._initLayout(),t._fadeAnimated&&_e(this._container,0),clearTimeout(this._removeTimeout),this.getPane().appendChild(this._container),this.update(),t._fadeAnimated&&_e(this._container,1),this.bringToFront()},onRemove:function(t){t._fadeAnimated?(_e(this._container,0),this._removeTimeout=setTimeout(i(ae,void 0,this._container),200)):ae(this._container)},getLatLng:function(){return this._latlng},setLatLng:function(t){return this._latlng=k(t),this._map&&(this._updatePosition(),this._adjustPan()),this},getContent:function(){return this._content},setContent:function(t){return this._content=t,this.update(),this},getElement:function(){return this._container},update:function(){this._map&&(this._container.style.visibility="hidden",this._updateContent(),this._updateLayout(),this._updatePosition(),this._container.style.visibility="",this._adjustPan())},getEvents:function(){var t={zoom:this._updatePosition,viewreset:this._updatePosition};return this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},isOpen:function(){return!!this._map&&this._map.hasLayer(this)},bringToFront:function(){return this._map&&ue(this._container),this},bringToBack:function(){return this._map&&ce(this._container),this},_prepareOpen:function(t,e,n){if(e instanceof On||(n=e,e=t),e instanceof An)for(var r in t._layers){e=t._layers[r];break}if(!n)if(e.getCenter)n=e.getCenter();else{if(!e.getLatLng)throw new Error("Unable to get source layer LatLng.");n=e.getLatLng()}return this._source=e,this.update(),n},_updateContent:function(){if(this._content){var t=this._contentNode,e="function"==typeof this._content?this._content(this._source||this):this._content;if("string"==typeof e)t.innerHTML=e;else{for(;t.hasChildNodes();)t.removeChild(t.firstChild);t.appendChild(e)}this.fire("contentupdate")}},_updatePosition:function(){if(this._map){var t=this._map.latLngToLayerPoint(this._latlng),e=M(this.options.offset),n=this._getAnchor();this._zoomAnimated?ve(this._container,t.add(n)):e=e.add(t).add(n);var r=this._containerBottom=-e.y,i=this._containerLeft=-Math.round(this._containerWidth/2)+e.x;this._container.style.bottom=r+"px",this._container.style.left=i+"px"}},_getAnchor:function(){return[0,0]}}),er=tr.extend({options:{maxWidth:300,minWidth:50,maxHeight:null,autoPan:!0,autoPanPaddingTopLeft:null,autoPanPaddingBottomRight:null,autoPanPadding:[5,5],keepInView:!1,closeButton:!0,autoClose:!0,closeOnEscapeKey:!0,className:""},openOn:function(t){return t.openPopup(this),this},onAdd:function(t){tr.prototype.onAdd.call(this,t),t.fire("popupopen",{popup:this}),this._source&&(this._source.fire("popupopen",{popup:this},!0),this._source instanceof Mn||this._source.on("preclick",Me))},onRemove:function(t){tr.prototype.onRemove.call(this,t),t.fire("popupclose",{popup:this}),this._source&&(this._source.fire("popupclose",{popup:this},!0),this._source instanceof Mn||this._source.off("preclick",Me))},getEvents:function(){var t=tr.prototype.getEvents.call(this);return(void 0!==this.options.closeOnClick?this.options.closeOnClick:this._map.options.closePopupOnClick)&&(t.preclick=this._close),this.options.keepInView&&(t.moveend=this._adjustPan),t},_close:function(){this._map&&this._map.closePopup(this)},_initLayout:function(){var t="leaflet-popup",e=this._container=se("div",t+" "+(this.options.className||"")+" leaflet-zoom-animated"),n=this._wrapper=se("div",t+"-content-wrapper",e);if(this._contentNode=se("div",t+"-content",n),$e(n),De(this._contentNode),Ae(n,"contextmenu",Me),this._tipContainer=se("div",t+"-tip-container",e),this._tip=se("div",t+"-tip",this._tipContainer),this.options.closeButton){var r=this._closeButton=se("a",t+"-close-button",e);r.href="#close",r.innerHTML="×",Ae(r,"click",this._onCloseButtonClick,this)}},_updateLayout:function(){var t=this._contentNode,e=t.style;e.width="",e.whiteSpace="nowrap";var n=t.offsetWidth;n=Math.min(n,this.options.maxWidth),n=Math.max(n,this.options.minWidth),e.width=n+1+"px",e.whiteSpace="",e.height="";var r=t.offsetHeight,i=this.options.maxHeight;i&&r>i?(e.height=i+"px",fe(t,"leaflet-popup-scrolled")):pe(t,"leaflet-popup-scrolled"),this._containerWidth=this._container.offsetWidth},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center),n=this._getAnchor();ve(this._container,e.add(n))},_adjustPan:function(){if(this.options.autoPan){this._map._panAnim&&this._map._panAnim.stop();var t=this._map,e=parseInt(oe(this._container,"marginBottom"),10)||0,n=this._container.offsetHeight+e,r=this._containerWidth,i=new R(this._containerLeft,-n-this._containerBottom);i._add(Pe(this._container));var o=t.layerPointToContainerPoint(i),s=M(this.options.autoPanPadding),a=M(this.options.autoPanPaddingTopLeft||s),l=M(this.options.autoPanPaddingBottomRight||s),u=t.getSize(),c=0,h=0;o.x+r+l.x>u.x&&(c=o.x+r-u.x+l.x),o.x-c-a.x<0&&(c=o.x-a.x),o.y+n+l.y>u.y&&(h=o.y+n-u.y+l.y),o.y-h-a.y<0&&(h=o.y-a.y),(c||h)&&t.fire("autopanstart").panBy([c,h])}},_onCloseButtonClick:function(t){this._close(),Be(t)},_getAnchor:function(){return M(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}});Ze.mergeOptions({closePopupOnClick:!0}),Ze.include({openPopup:function(t,e,n){return t instanceof er||(t=new er(n).setContent(t)),e&&t.setLatLng(e),this.hasLayer(t)?this:(this._popup&&this._popup.options.autoClose&&this.closePopup(),this._popup=t,this.addLayer(t))},closePopup:function(t){return t&&t!==this._popup||(t=this._popup,this._popup=null),t&&this.removeLayer(t),this}}),On.include({bindPopup:function(t,e){return t instanceof er?(p(t,e),this._popup=t,t._source=this):(this._popup&&!e||(this._popup=new er(e,this)),this._popup.setContent(t)),this._popupHandlersAdded||(this.on({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this.off({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!1,this._popup=null),this},openPopup:function(t,e){return this._popup&&this._map&&(e=this._popup._prepareOpen(this,t,e),this._map.openPopup(this._popup,e)),this},closePopup:function(){return this._popup&&this._popup._close(),this},togglePopup:function(t){return this._popup&&(this._popup._map?this.closePopup():this.openPopup(t)),this},isPopupOpen:function(){return!!this._popup&&this._popup.isOpen()},setPopupContent:function(t){return this._popup&&this._popup.setContent(t),this},getPopup:function(){return this._popup},_openPopup:function(t){var e=t.layer||t.target;this._popup&&this._map&&(Be(t),e instanceof Mn?this.openPopup(t.layer||t.target,t.latlng):this._map.hasLayer(this._popup)&&this._popup._source===e?this.closePopup():this.openPopup(e,t.latlng))},_movePopup:function(t){this._popup.setLatLng(t.latlng)},_onKeyPress:function(t){13===t.originalEvent.keyCode&&this._openPopup(t)}});var nr=tr.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,interactive:!1,opacity:.9},onAdd:function(t){tr.prototype.onAdd.call(this,t),this.setOpacity(this.options.opacity),t.fire("tooltipopen",{tooltip:this}),this._source&&this._source.fire("tooltipopen",{tooltip:this},!0)},onRemove:function(t){tr.prototype.onRemove.call(this,t),t.fire("tooltipclose",{tooltip:this}),this._source&&this._source.fire("tooltipclose",{tooltip:this},!0)},getEvents:function(){var t=tr.prototype.getEvents.call(this);return St&&!this.options.permanent&&(t.preclick=this._close),t},_close:function(){this._map&&this._map.closeTooltip(this)},_initLayout:function(){var t="leaflet-tooltip "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=se("div",t)},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(t){var e=this._map,n=this._container,r=e.latLngToContainerPoint(e.getCenter()),i=e.layerPointToContainerPoint(t),o=this.options.direction,s=n.offsetWidth,a=n.offsetHeight,l=M(this.options.offset),u=this._getAnchor();"top"===o?t=t.add(M(-s/2+l.x,-a+l.y+u.y,!0)):"bottom"===o?t=t.subtract(M(s/2-l.x,-l.y,!0)):"center"===o?t=t.subtract(M(s/2+l.x,a/2-u.y+l.y,!0)):"right"===o||"auto"===o&&i.x<r.x?(o="right",t=t.add(M(l.x+u.x,u.y-a/2+l.y,!0))):(o="left",t=t.subtract(M(s+u.x-l.x,a/2-u.y-l.y,!0))),pe(n,"leaflet-tooltip-right"),pe(n,"leaflet-tooltip-left"),pe(n,"leaflet-tooltip-top"),pe(n,"leaflet-tooltip-bottom"),fe(n,"leaflet-tooltip-"+o),ve(n,t)},_updatePosition:function(){var t=this._map.latLngToLayerPoint(this._latlng);this._setPosition(t)},setOpacity:function(t){this.options.opacity=t,this._container&&_e(this._container,t)},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center);this._setPosition(e)},_getAnchor:function(){return M(this._source&&this._source._getTooltipAnchor&&!this.options.sticky?this._source._getTooltipAnchor():[0,0])}});Ze.include({openTooltip:function(t,e,n){return t instanceof nr||(t=new nr(n).setContent(t)),e&&t.setLatLng(e),this.hasLayer(t)?this:this.addLayer(t)},closeTooltip:function(t){return t&&this.removeLayer(t),this}}),On.include({bindTooltip:function(t,e){return t instanceof nr?(p(t,e),this._tooltip=t,t._source=this):(this._tooltip&&!e||(this._tooltip=new nr(e,this)),this._tooltip.setContent(t)),this._initTooltipInteractions(),this._tooltip.options.permanent&&this._map&&this._map.hasLayer(this)&&this.openTooltip(),this},unbindTooltip:function(){return this._tooltip&&(this._initTooltipInteractions(!0),this.closeTooltip(),this._tooltip=null),this},_initTooltipInteractions:function(t){if(t||!this._tooltipHandlersAdded){var e=t?"off":"on",n={remove:this.closeTooltip,move:this._moveTooltip};this._tooltip.options.permanent?n.add=this._openTooltip:(n.mouseover=this._openTooltip,n.mouseout=this.closeTooltip,this._tooltip.options.sticky&&(n.mousemove=this._moveTooltip),St&&(n.click=this._openTooltip)),this[e](n),this._tooltipHandlersAdded=!t}},openTooltip:function(t,e){return this._tooltip&&this._map&&(e=this._tooltip._prepareOpen(this,t,e),this._map.openTooltip(this._tooltip,e),this._tooltip.options.interactive&&this._tooltip._container&&(fe(this._tooltip._container,"leaflet-clickable"),this.addInteractiveTarget(this._tooltip._container))),this},closeTooltip:function(){return this._tooltip&&(this._tooltip._close(),this._tooltip.options.interactive&&this._tooltip._container&&(pe(this._tooltip._container,"leaflet-clickable"),this.removeInteractiveTarget(this._tooltip._container))),this},toggleTooltip:function(t){return this._tooltip&&(this._tooltip._map?this.closeTooltip():this.openTooltip(t)),this},isTooltipOpen:function(){return this._tooltip.isOpen()},setTooltipContent:function(t){return this._tooltip&&this._tooltip.setContent(t),this},getTooltip:function(){return this._tooltip},_openTooltip:function(t){var e=t.layer||t.target;this._tooltip&&this._map&&this.openTooltip(e,this._tooltip.options.sticky?t.latlng:void 0)},_moveTooltip:function(t){var e,n,r=t.latlng;this._tooltip.options.sticky&&t.originalEvent&&(e=this._map.mouseEventToContainerPoint(t.originalEvent),n=this._map.containerPointToLayerPoint(e),r=this._map.layerPointToLatLng(n)),this._tooltip.setLatLng(r)}});var rr=Cn.extend({options:{iconSize:[12,12],html:!1,bgPos:null,className:"leaflet-div-icon"},createIcon:function(t){var e=t&&"DIV"===t.tagName?t:document.createElement("div"),n=this.options;if(n.html instanceof Element?(le(e),e.appendChild(n.html)):e.innerHTML=!1!==n.html?n.html:"",n.bgPos){var r=M(n.bgPos);e.style.backgroundPosition=-r.x+"px "+-r.y+"px"}return this._setIconStyles(e,"icon"),e},createShadow:function(){return null}});Cn.Default=Ln;var ir=On.extend({options:{tileSize:256,opacity:1,updateWhenIdle:mt,updateWhenZooming:!0,updateInterval:200,zIndex:1,bounds:null,minZoom:0,maxZoom:void 0,maxNativeZoom:void 0,minNativeZoom:void 0,noWrap:!1,pane:"tilePane",className:"",keepBuffer:2},initialize:function(t){p(this,t)},onAdd:function(){this._initContainer(),this._levels={},this._tiles={},this._resetView(),this._update()},beforeAdd:function(t){t._addZoomLimit(this)},onRemove:function(t){this._removeAllTiles(),ae(this._container),t._removeZoomLimit(this),this._container=null,this._tileZoom=void 0},bringToFront:function(){return this._map&&(ue(this._container),this._setAutoZIndex(Math.max)),this},bringToBack:function(){return this._map&&(ce(this._container),this._setAutoZIndex(Math.min)),this},getContainer:function(){return this._container},setOpacity:function(t){return this.options.opacity=t,this._updateOpacity(),this},setZIndex:function(t){return this.options.zIndex=t,this._updateZIndex(),this},isLoading:function(){return this._loading},redraw:function(){return this._map&&(this._removeAllTiles(),this._update()),this},getEvents:function(){var t={viewprereset:this._invalidateAll,viewreset:this._resetView,zoom:this._resetView,moveend:this._onMoveEnd};return this.options.updateWhenIdle||(this._onMove||(this._onMove=a(this._onMoveEnd,this.options.updateInterval,this)),t.move=this._onMove),this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},createTile:function(){return document.createElement("div")},getTileSize:function(){var t=this.options.tileSize;return t instanceof R?t:new R(t,t)},_updateZIndex:function(){this._container&&void 0!==this.options.zIndex&&null!==this.options.zIndex&&(this._container.style.zIndex=this.options.zIndex)},_setAutoZIndex:function(t){for(var e,n=this.getPane().children,r=-t(-1/0,1/0),i=0,o=n.length;i<o;i++)e=n[i].style.zIndex,n[i]!==this._container&&e&&(r=t(r,+e));isFinite(r)&&(this.options.zIndex=r+t(-1,1),this._updateZIndex())},_updateOpacity:function(){if(this._map&&!Q){_e(this._container,this.options.opacity);var t=+new Date,e=!1,n=!1;for(var r in this._tiles){var i=this._tiles[r];if(i.current&&i.loaded){var o=Math.min(1,(t-i.loaded)/200);_e(i.el,o),o<1?e=!0:(i.active?n=!0:this._onOpaqueTile(i),i.active=!0)}}n&&!this._noPrune&&this._pruneTiles(),e&&(T(this._fadeFrame),this._fadeFrame=I(this._updateOpacity,this))}},_onOpaqueTile:u,_initContainer:function(){this._container||(this._container=se("div","leaflet-layer "+(this.options.className||"")),this._updateZIndex(),this.options.opacity<1&&this._updateOpacity(),this.getPane().appendChild(this._container))},_updateLevels:function(){var t=this._tileZoom,e=this.options.maxZoom;if(void 0!==t){for(var n in this._levels)this._levels[n].el.children.length||n===t?(this._levels[n].el.style.zIndex=e-Math.abs(t-n),this._onUpdateLevel(n)):(ae(this._levels[n].el),this._removeTilesAtZoom(n),this._onRemoveLevel(n),delete this._levels[n]);var r=this._levels[t],i=this._map;return r||((r=this._levels[t]={}).el=se("div","leaflet-tile-container leaflet-zoom-animated",this._container),r.el.style.zIndex=e,r.origin=i.project(i.unproject(i.getPixelOrigin()),t).round(),r.zoom=t,this._setZoomTransform(r,i.getCenter(),i.getZoom()),r.el.offsetWidth,this._onCreateLevel(r)),this._level=r,r}},_onUpdateLevel:u,_onRemoveLevel:u,_onCreateLevel:u,_pruneTiles:function(){if(this._map){var t,e,n=this._map.getZoom();if(n>this.options.maxZoom||n<this.options.minZoom)this._removeAllTiles();else{for(t in this._tiles)(e=this._tiles[t]).retain=e.current;for(t in this._tiles)if((e=this._tiles[t]).current&&!e.active){var r=e.coords;this._retainParent(r.x,r.y,r.z,r.z-5)||this._retainChildren(r.x,r.y,r.z,r.z+2)}for(t in this._tiles)this._tiles[t].retain||this._removeTile(t)}}},_removeTilesAtZoom:function(t){for(var e in this._tiles)this._tiles[e].coords.z===t&&this._removeTile(e)},_removeAllTiles:function(){for(var t in this._tiles)this._removeTile(t)},_invalidateAll:function(){for(var t in this._levels)ae(this._levels[t].el),this._onRemoveLevel(t),delete this._levels[t];this._removeAllTiles(),this._tileZoom=void 0},_retainParent:function(t,e,n,r){var i=Math.floor(t/2),o=Math.floor(e/2),s=n-1,a=new R(+i,+o);a.z=+s;var l=this._tileCoordsToKey(a),u=this._tiles[l];return u&&u.active?(u.retain=!0,!0):(u&&u.loaded&&(u.retain=!0),s>r&&this._retainParent(i,o,s,r))},_retainChildren:function(t,e,n,r){for(var i=2*t;i<2*t+2;i++)for(var o=2*e;o<2*e+2;o++){var s=new R(i,o);s.z=n+1;var a=this._tileCoordsToKey(s),l=this._tiles[a];l&&l.active?l.retain=!0:(l&&l.loaded&&(l.retain=!0),n+1<r&&this._retainChildren(i,o,n+1,r))}},_resetView:function(t){var e=t&&(t.pinch||t.flyTo);this._setView(this._map.getCenter(),this._map.getZoom(),e,e)},_animateZoom:function(t){this._setView(t.center,t.zoom,!0,t.noUpdate)},_clampZoom:function(t){var e=this.options;return void 0!==e.minNativeZoom&&t<e.minNativeZoom?e.minNativeZoom:void 0!==e.maxNativeZoom&&e.maxNativeZoom<t?e.maxNativeZoom:t},_setView:function(t,e,n,r){var i=this._clampZoom(Math.round(e));(void 0!==this.options.maxZoom&&i>this.options.maxZoom||void 0!==this.options.minZoom&&i<this.options.minZoom)&&(i=void 0);var o=this.options.updateWhenZooming&&i!==this._tileZoom;r&&!o||(this._tileZoom=i,this._abortLoading&&this._abortLoading(),this._updateLevels(),this._resetGrid(),void 0!==i&&this._update(t),n||this._pruneTiles(),this._noPrune=!!n),this._setZoomTransforms(t,e)},_setZoomTransforms:function(t,e){for(var n in this._levels)this._setZoomTransform(this._levels[n],t,e)},_setZoomTransform:function(t,e,n){var r=this._map.getZoomScale(n,t.zoom),i=t.origin.multiplyBy(r).subtract(this._map._getNewPixelOrigin(e,n)).round();_t?ge(t.el,i,r):ve(t.el,i)},_resetGrid:function(){var t=this._map,e=t.options.crs,n=this._tileSize=this.getTileSize(),r=this._tileZoom,i=this._map.getPixelWorldBounds(this._tileZoom);i&&(this._globalTileRange=this._pxBoundsToTileRange(i)),this._wrapX=e.wrapLng&&!this.options.noWrap&&[Math.floor(t.project([0,e.wrapLng[0]],r).x/n.x),Math.ceil(t.project([0,e.wrapLng[1]],r).x/n.y)],this._wrapY=e.wrapLat&&!this.options.noWrap&&[Math.floor(t.project([e.wrapLat[0],0],r).y/n.x),Math.ceil(t.project([e.wrapLat[1],0],r).y/n.y)]},_onMoveEnd:function(){this._map&&!this._map._animatingZoom&&this._update()},_getTiledPixelBounds:function(t){var e=this._map,n=e._animatingZoom?Math.max(e._animateToZoom,e.getZoom()):e.getZoom(),r=e.getZoomScale(n,this._tileZoom),i=e.project(t,this._tileZoom).floor(),o=e.getSize().divideBy(2*r);return new D(i.subtract(o),i.add(o))},_update:function(t){var e=this._map;if(e){var n=this._clampZoom(e.getZoom());if(void 0===t&&(t=e.getCenter()),void 0!==this._tileZoom){var r=this._getTiledPixelBounds(t),i=this._pxBoundsToTileRange(r),o=i.getCenter(),s=[],a=this.options.keepBuffer,l=new D(i.getBottomLeft().subtract([a,-a]),i.getTopRight().add([a,-a]));if(!(isFinite(i.min.x)&&isFinite(i.min.y)&&isFinite(i.max.x)&&isFinite(i.max.y)))throw new Error("Attempted to load an infinite number of tiles");for(var u in this._tiles){var c=this._tiles[u].coords;c.z===this._tileZoom&&l.contains(new R(c.x,c.y))||(this._tiles[u].current=!1)}if(Math.abs(n-this._tileZoom)>1)this._setView(t,n);else{for(var h=i.min.y;h<=i.max.y;h++)for(var f=i.min.x;f<=i.max.x;f++){var p=new R(f,h);if(p.z=this._tileZoom,this._isValidTile(p)){var d=this._tiles[this._tileCoordsToKey(p)];d?d.current=!0:s.push(p)}}if(s.sort(function(t,e){return t.distanceTo(o)-e.distanceTo(o)}),0!==s.length){this._loading||(this._loading=!0,this.fire("loading"));var y=document.createDocumentFragment();for(f=0;f<s.length;f++)this._addTile(s[f],y);this._level.el.appendChild(y)}}}}},_isValidTile:function(t){var e=this._map.options.crs;if(!e.infinite){var n=this._globalTileRange;if(!e.wrapLng&&(t.x<n.min.x||t.x>n.max.x)||!e.wrapLat&&(t.y<n.min.y||t.y>n.max.y))return!1}if(!this.options.bounds)return!0;var r=this._tileCoordsToBounds(t);return B(this.options.bounds).overlaps(r)},_keyToBounds:function(t){return this._tileCoordsToBounds(this._keyToTileCoords(t))},_tileCoordsToNwSe:function(t){var e=this._map,n=this.getTileSize(),r=t.scaleBy(n),i=r.add(n),o=e.unproject(r,t.z),s=e.unproject(i,t.z);return[o,s]},_tileCoordsToBounds:function(t){var e=this._tileCoordsToNwSe(t),n=new j(e[0],e[1]);return this.options.noWrap||(n=this._map.wrapLatLngBounds(n)),n},_tileCoordsToKey:function(t){return t.x+":"+t.y+":"+t.z},_keyToTileCoords:function(t){var e=t.split(":"),n=new R(+e[0],+e[1]);return n.z=+e[2],n},_removeTile:function(t){var e=this._tiles[t];e&&(ae(e.el),delete this._tiles[t],this.fire("tileunload",{tile:e.el,coords:this._keyToTileCoords(t)}))},_initTile:function(t){fe(t,"leaflet-tile");var e=this.getTileSize();t.style.width=e.x+"px",t.style.height=e.y+"px",t.onselectstart=u,t.onmousemove=u,Q&&this.options.opacity<1&&_e(t,this.options.opacity),nt&&!rt&&(t.style.WebkitBackfaceVisibility="hidden")},_addTile:function(t,e){var n=this._getTilePos(t),r=this._tileCoordsToKey(t),o=this.createTile(this._wrapCoords(t),i(this._tileReady,this,t));this._initTile(o),this.createTile.length<2&&I(i(this._tileReady,this,t,null,o)),ve(o,n),this._tiles[r]={el:o,coords:t,current:!0},e.appendChild(o),this.fire("tileloadstart",{tile:o,coords:t})},_tileReady:function(t,e,n){e&&this.fire("tileerror",{error:e,tile:n,coords:t});var r=this._tileCoordsToKey(t);(n=this._tiles[r])&&(n.loaded=+new Date,this._map._fadeAnimated?(_e(n.el,0),T(this._fadeFrame),this._fadeFrame=I(this._updateOpacity,this)):(n.active=!0,this._pruneTiles()),e||(fe(n.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:n.el,coords:t})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),Q||!this._map._fadeAnimated?I(this._pruneTiles,this):setTimeout(i(this._pruneTiles,this),250)))},_getTilePos:function(t){return t.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(t){var e=new R(this._wrapX?l(t.x,this._wrapX):t.x,this._wrapY?l(t.y,this._wrapY):t.y);return e.z=t.z,e},_pxBoundsToTileRange:function(t){var e=this.getTileSize();return new D(t.min.unscaleBy(e).floor(),t.max.unscaleBy(e).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var t in this._tiles)if(!this._tiles[t].loaded)return!1;return!0}}),or=ir.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1},initialize:function(t,e){this._url=t,(e=p(this,e)).detectRetina&&It&&e.maxZoom>0&&(e.tileSize=Math.floor(e.tileSize/2),e.zoomReverse?(e.zoomOffset--,e.minZoom++):(e.zoomOffset++,e.maxZoom--),e.minZoom=Math.max(0,e.minZoom)),"string"==typeof e.subdomains&&(e.subdomains=e.subdomains.split("")),nt||this.on("tileunload",this._onTileRemove)},setUrl:function(t,e){return this._url===t&&void 0===e&&(e=!0),this._url=t,e||this.redraw(),this},createTile:function(t,e){var n=document.createElement("img");return Ae(n,"load",i(this._tileOnLoad,this,e,n)),Ae(n,"error",i(this._tileOnError,this,e,n)),(this.options.crossOrigin||""===this.options.crossOrigin)&&(n.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),n.alt="",n.setAttribute("role","presentation"),n.src=this.getTileUrl(t),n},getTileUrl:function(t){var e={r:It?"@2x":"",s:this._getSubdomain(t),x:t.x,y:t.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var r=this._globalTileRange.max.y-t.y;this.options.tms&&(e.y=r),e["-y"]=r}return _(this._url,n(e,this.options))},_tileOnLoad:function(t,e){Q?setTimeout(i(t,this,null,e),0):t(null,e)},_tileOnError:function(t,e,n){var r=this.options.errorTileUrl;r&&e.getAttribute("src")!==r&&(e.src=r),t(n,e)},_onTileRemove:function(t){t.tile.onload=null},_getZoomForUrl:function(){var t=this._tileZoom,e=this.options.maxZoom,n=this.options.zoomReverse,r=this.options.zoomOffset;return n&&(t=e-t),t+r},_getSubdomain:function(t){var e=Math.abs(t.x+t.y)%this.options.subdomains.length;return this.options.subdomains[e]},_abortLoading:function(){var t,e;for(t in this._tiles)this._tiles[t].coords.z!==this._tileZoom&&((e=this._tiles[t].el).onload=u,e.onerror=u,e.complete||(e.src=v,ae(e),delete this._tiles[t]))},_removeTile:function(t){var e=this._tiles[t];if(e)return ot||e.el.setAttribute("src",v),ir.prototype._removeTile.call(this,t)},_tileReady:function(t,e,n){if(this._map&&(!n||n.getAttribute("src")!==v))return ir.prototype._tileReady.call(this,t,e,n)}});function sr(t,e){return new or(t,e)}var ar=or.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:function(t,e){this._url=t;var r=n({},this.defaultWmsParams);for(var i in e)i in this.options||(r[i]=e[i]);var o=(e=p(this,e)).detectRetina&&It?2:1,s=this.getTileSize();r.width=s.x*o,r.height=s.y*o,this.wmsParams=r},onAdd:function(t){this._crs=this.options.crs||t.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var e=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[e]=this._crs.code,or.prototype.onAdd.call(this,t)},getTileUrl:function(t){var e=this._tileCoordsToNwSe(t),n=this._crs,r=$(n.project(e[0]),n.project(e[1])),i=r.min,o=r.max,s=(this._wmsVersion>=1.3&&this._crs===In?[i.y,i.x,o.y,o.x]:[i.x,i.y,o.x,o.y]).join(","),a=or.prototype.getTileUrl.call(this,t);return a+d(this.wmsParams,a,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+s},setParams:function(t,e){return n(this.wmsParams,t),e||this.redraw(),this}});or.WMS=ar,sr.wms=function(t,e){return new ar(t,e)};var lr=On.extend({options:{padding:.1,tolerance:0},initialize:function(t){p(this,t),s(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),this._zoomAnimated&&fe(this._container,"leaflet-zoom-animated")),this.getPane().appendChild(this._container),this._update(),this.on("update",this._updatePaths,this)},onRemove:function(){this.off("update",this._updatePaths,this),this._destroyContainer()},getEvents:function(){var t={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(t.zoomanim=this._onAnimZoom),t},_onAnimZoom:function(t){this._updateTransform(t.center,t.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_updateTransform:function(t,e){var n=this._map.getZoomScale(e,this._zoom),r=Pe(this._container),i=this._map.getSize().multiplyBy(.5+this.options.padding),o=this._map.project(this._center,e),s=this._map.project(t,e),a=s.subtract(o),l=i.multiplyBy(-n).add(r).add(i).subtract(a);_t?ge(this._container,l,n):ve(this._container,l)},_reset:function(){for(var t in this._update(),this._updateTransform(this._center,this._zoom),this._layers)this._layers[t]._reset()},_onZoomEnd:function(){for(var t in this._layers)this._layers[t]._project()},_updatePaths:function(){for(var t in this._layers)this._layers[t]._update()},_update:function(){var t=this.options.padding,e=this._map.getSize(),n=this._map.containerPointToLayerPoint(e.multiplyBy(-t)).round();this._bounds=new D(n,n.add(e.multiplyBy(1+2*t)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),ur=lr.extend({getEvents:function(){var t=lr.prototype.getEvents.call(this);return t.viewprereset=this._onViewPreReset,t},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){lr.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var t=this._container=document.createElement("canvas");Ae(t,"mousemove",this._onMouseMove,this),Ae(t,"click dblclick mousedown mouseup contextmenu",this._onClick,this),Ae(t,"mouseout",this._handleMouseOut,this),this._ctx=t.getContext("2d")},_destroyContainer:function(){T(this._redrawRequest),delete this._ctx,ae(this._container),Le(this._container),delete this._container},_updatePaths:function(){if(!this._postponeUpdatePaths){for(var t in this._redrawBounds=null,this._layers)this._layers[t]._update();this._redraw()}},_update:function(){if(!this._map._animatingZoom||!this._bounds){lr.prototype._update.call(this);var t=this._bounds,e=this._container,n=t.getSize(),r=It?2:1;ve(e,t.min),e.width=r*n.x,e.height=r*n.y,e.style.width=n.x+"px",e.style.height=n.y+"px",It&&this._ctx.scale(2,2),this._ctx.translate(-t.min.x,-t.min.y),this.fire("update")}},_reset:function(){lr.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(t){this._updateDashArray(t),this._layers[s(t)]=t;var e=t._order={layer:t,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=e),this._drawLast=e,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(t){this._requestRedraw(t)},_removePath:function(t){var e=t._order,n=e.next,r=e.prev;n?n.prev=r:this._drawLast=r,r?r.next=n:this._drawFirst=n,delete t._order,delete this._layers[s(t)],this._requestRedraw(t)},_updatePath:function(t){this._extendRedrawBounds(t),t._project(),t._update(),this._requestRedraw(t)},_updateStyle:function(t){this._updateDashArray(t),this._requestRedraw(t)},_updateDashArray:function(t){if("string"==typeof t.options.dashArray){var e,n,r=t.options.dashArray.split(/[, ]+/),i=[];for(n=0;n<r.length;n++){if(e=Number(r[n]),isNaN(e))return;i.push(e)}t.options._dashArray=i}else t.options._dashArray=t.options.dashArray},_requestRedraw:function(t){this._map&&(this._extendRedrawBounds(t),this._redrawRequest=this._redrawRequest||I(this._redraw,this))},_extendRedrawBounds:function(t){if(t._pxBounds){var e=(t.options.weight||0)+1;this._redrawBounds=this._redrawBounds||new D,this._redrawBounds.extend(t._pxBounds.min.subtract([e,e])),this._redrawBounds.extend(t._pxBounds.max.add([e,e]))}},_redraw:function(){this._redrawRequest=null,this._redrawBounds&&(this._redrawBounds.min._floor(),this._redrawBounds.max._ceil()),this._clear(),this._draw(),this._redrawBounds=null},_clear:function(){var t=this._redrawBounds;if(t){var e=t.getSize();this._ctx.clearRect(t.min.x,t.min.y,e.x,e.y)}else this._ctx.clearRect(0,0,this._container.width,this._container.height)},_draw:function(){var t,e=this._redrawBounds;if(this._ctx.save(),e){var n=e.getSize();this._ctx.beginPath(),this._ctx.rect(e.min.x,e.min.y,n.x,n.y),this._ctx.clip()}this._drawing=!0;for(var r=this._drawFirst;r;r=r.next)t=r.layer,(!e||t._pxBounds&&t._pxBounds.intersects(e))&&t._updatePath();this._drawing=!1,this._ctx.restore()},_updatePoly:function(t,e){if(this._drawing){var n,r,i,o,s=t._parts,a=s.length,l=this._ctx;if(a){for(l.beginPath(),n=0;n<a;n++){for(r=0,i=s[n].length;r<i;r++)o=s[n][r],l[r?"lineTo":"moveTo"](o.x,o.y);e&&l.closePath()}this._fillStroke(l,t)}}},_updateCircle:function(t){if(this._drawing&&!t._empty()){var e=t._point,n=this._ctx,r=Math.max(Math.round(t._radius),1),i=(Math.max(Math.round(t._radiusY),1)||r)/r;1!==i&&(n.save(),n.scale(1,i)),n.beginPath(),n.arc(e.x,e.y/i,r,0,2*Math.PI,!1),1!==i&&n.restore(),this._fillStroke(n,t)}},_fillStroke:function(t,e){var n=e.options;n.fill&&(t.globalAlpha=n.fillOpacity,t.fillStyle=n.fillColor||n.color,t.fill(n.fillRule||"evenodd")),n.stroke&&0!==n.weight&&(t.setLineDash&&t.setLineDash(e.options&&e.options._dashArray||[]),t.globalAlpha=n.opacity,t.lineWidth=n.weight,t.strokeStyle=n.color,t.lineCap=n.lineCap,t.lineJoin=n.lineJoin,t.stroke())},_onClick:function(t){for(var e,n,r=this._map.mouseEventToLayerPoint(t),i=this._drawFirst;i;i=i.next)(e=i.layer).options.interactive&&e._containsPoint(r)&&!this._map._draggableMoved(e)&&(n=e);n&&(Ue(t),this._fireEvent([n],t))},_onMouseMove:function(t){if(this._map&&!this._map.dragging.moving()&&!this._map._animatingZoom){var e=this._map.mouseEventToLayerPoint(t);this._handleMouseHover(t,e)}},_handleMouseOut:function(t){var e=this._hoveredLayer;e&&(pe(this._container,"leaflet-interactive"),this._fireEvent([e],t,"mouseout"),this._hoveredLayer=null,this._mouseHoverThrottled=!1)},_handleMouseHover:function(t,e){if(!this._mouseHoverThrottled){for(var n,r,i=this._drawFirst;i;i=i.next)(n=i.layer).options.interactive&&n._containsPoint(e)&&(r=n);r!==this._hoveredLayer&&(this._handleMouseOut(t),r&&(fe(this._container,"leaflet-interactive"),this._fireEvent([r],t,"mouseover"),this._hoveredLayer=r)),this._hoveredLayer&&this._fireEvent([this._hoveredLayer],t),this._mouseHoverThrottled=!0,setTimeout(L.bind(function(){this._mouseHoverThrottled=!1},this),32)}},_fireEvent:function(t,e,n){this._map._fireDOMEvent(e,n||e.type,t)},_bringToFront:function(t){var e=t._order;if(e){var n=e.next,r=e.prev;n&&(n.prev=r,r?r.next=n:n&&(this._drawFirst=n),e.prev=this._drawLast,this._drawLast.next=e,e.next=null,this._drawLast=e,this._requestRedraw(t))}},_bringToBack:function(t){var e=t._order;if(e){var n=e.next,r=e.prev;r&&(r.next=n,n?n.prev=r:r&&(this._drawLast=r),e.prev=null,e.next=this._drawFirst,this._drawFirst.prev=e,this._drawFirst=e,this._requestRedraw(t))}}});function cr(t){return Ot?new ur(t):null}var hr=function(){try{return document.namespaces.add("lvml","urn:schemas-microsoft-com:vml"),function(t){return document.createElement("<lvml:"+t+' class="lvml">')}}catch(t){return function(t){return document.createElement("<"+t+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}}(),fr={_initContainer:function(){this._container=se("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(lr.prototype._update.call(this),this.fire("update"))},_initPath:function(t){var e=t._container=hr("shape");fe(e,"leaflet-vml-shape "+(this.options.className||"")),e.coordsize="1 1",t._path=hr("path"),e.appendChild(t._path),this._updateStyle(t),this._layers[s(t)]=t},_addPath:function(t){var e=t._container;this._container.appendChild(e),t.options.interactive&&t.addInteractiveTarget(e)},_removePath:function(t){var e=t._container;ae(e),t.removeInteractiveTarget(e),delete this._layers[s(t)]},_updateStyle:function(t){var e=t._stroke,n=t._fill,r=t.options,i=t._container;i.stroked=!!r.stroke,i.filled=!!r.fill,r.stroke?(e||(e=t._stroke=hr("stroke")),i.appendChild(e),e.weight=r.weight+"px",e.color=r.color,e.opacity=r.opacity,r.dashArray?e.dashStyle=m(r.dashArray)?r.dashArray.join(" "):r.dashArray.replace(/( *, *)/g," "):e.dashStyle="",e.endcap=r.lineCap.replace("butt","flat"),e.joinstyle=r.lineJoin):e&&(i.removeChild(e),t._stroke=null),r.fill?(n||(n=t._fill=hr("fill")),i.appendChild(n),n.color=r.fillColor||r.color,n.opacity=r.fillOpacity):n&&(i.removeChild(n),t._fill=null)},_updateCircle:function(t){var e=t._point.round(),n=Math.round(t._radius),r=Math.round(t._radiusY||n);this._setPath(t,t._empty()?"M0 0":"AL "+e.x+","+e.y+" "+n+","+r+" 0,23592600")},_setPath:function(t,e){t._path.v=e},_bringToFront:function(t){ue(t._container)},_bringToBack:function(t){ce(t._container)}},pr=At?hr:Z,dr=lr.extend({getEvents:function(){var t=lr.prototype.getEvents.call(this);return t.zoomstart=this._onZoomStart,t},_initContainer:function(){this._container=pr("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=pr("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){ae(this._container),Le(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_onZoomStart:function(){this._update()},_update:function(){if(!this._map._animatingZoom||!this._bounds){lr.prototype._update.call(this);var t=this._bounds,e=t.getSize(),n=this._container;this._svgSize&&this._svgSize.equals(e)||(this._svgSize=e,n.setAttribute("width",e.x),n.setAttribute("height",e.y)),ve(n,t.min),n.setAttribute("viewBox",[t.min.x,t.min.y,e.x,e.y].join(" ")),this.fire("update")}},_initPath:function(t){var e=t._path=pr("path");t.options.className&&fe(e,t.options.className),t.options.interactive&&fe(e,"leaflet-interactive"),this._updateStyle(t),this._layers[s(t)]=t},_addPath:function(t){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(t._path),t.addInteractiveTarget(t._path)},_removePath:function(t){ae(t._path),t.removeInteractiveTarget(t._path),delete this._layers[s(t)]},_updatePath:function(t){t._project(),t._update()},_updateStyle:function(t){var e=t._path,n=t.options;e&&(n.stroke?(e.setAttribute("stroke",n.color),e.setAttribute("stroke-opacity",n.opacity),e.setAttribute("stroke-width",n.weight),e.setAttribute("stroke-linecap",n.lineCap),e.setAttribute("stroke-linejoin",n.lineJoin),n.dashArray?e.setAttribute("stroke-dasharray",n.dashArray):e.removeAttribute("stroke-dasharray"),n.dashOffset?e.setAttribute("stroke-dashoffset",n.dashOffset):e.removeAttribute("stroke-dashoffset")):e.setAttribute("stroke","none"),n.fill?(e.setAttribute("fill",n.fillColor||n.color),e.setAttribute("fill-opacity",n.fillOpacity),e.setAttribute("fill-rule",n.fillRule||"evenodd")):e.setAttribute("fill","none"))},_updatePoly:function(t,e){this._setPath(t,q(t._parts,e))},_updateCircle:function(t){var e=t._point,n=Math.max(Math.round(t._radius),1),r=Math.max(Math.round(t._radiusY),1)||n,i="a"+n+","+r+" 0 1,0 ",o=t._empty()?"M0 0":"M"+(e.x-n)+","+e.y+i+2*n+",0 "+i+2*-n+",0 ";this._setPath(t,o)},_setPath:function(t,e){t._path.setAttribute("d",e)},_bringToFront:function(t){ue(t._path)},_bringToBack:function(t){ce(t._path)}});function yr(t){return wt||At?new dr(t):null}At&&dr.include(fr),Ze.include({getRenderer:function(t){var e=t.options.renderer||this._getPaneRenderer(t.options.pane)||this.options.renderer||this._renderer;return e||(e=this._renderer=this._createRenderer()),this.hasLayer(e)||this.addLayer(e),e},_getPaneRenderer:function(t){if("overlayPane"===t||void 0===t)return!1;var e=this._paneRenderers[t];return void 0===e&&(e=this._createRenderer({pane:t}),this._paneRenderers[t]=e),e},_createRenderer:function(t){return this.options.preferCanvas&&cr(t)||yr(t)}});var _r=Bn.extend({initialize:function(t,e){Bn.prototype.initialize.call(this,this._boundsToLatLngs(t),e)},setBounds:function(t){return this.setLatLngs(this._boundsToLatLngs(t))},_boundsToLatLngs:function(t){return[(t=B(t)).getSouthWest(),t.getNorthWest(),t.getNorthEast(),t.getSouthEast()]}});dr.create=pr,dr.pointsToPath=q,Fn.geometryToLayer=kn,Fn.coordsToLatLng=zn,Fn.coordsToLatLngs=Xn,Fn.latLngToCoords=Un,Fn.latLngsToCoords=Gn,Fn.getFeature=Wn,Fn.asFeature=Hn,Ze.mergeOptions({boxZoom:!0});var mr=nn.extend({initialize:function(t){this._map=t,this._container=t._container,this._pane=t._panes.overlayPane,this._resetStateTimeout=0,t.on("unload",this._destroy,this)},addHooks:function(){Ae(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){Le(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){ae(this._pane),delete this._pane},_resetState:function(){this._resetStateTimeout=0,this._moved=!1},_clearDeferredResetState:function(){0!==this._resetStateTimeout&&(clearTimeout(this._resetStateTimeout),this._resetStateTimeout=0)},_onMouseDown:function(t){if(!t.shiftKey||1!==t.which&&1!==t.button)return!1;this._clearDeferredResetState(),this._resetState(),qt(),Se(),this._startPoint=this._map.mouseEventToContainerPoint(t),Ae(document,{contextmenu:Be,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(t){this._moved||(this._moved=!0,this._box=se("div","leaflet-zoom-box",this._container),fe(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(t);var e=new D(this._point,this._startPoint),n=e.getSize();ve(this._box,e.min),this._box.style.width=n.x+"px",this._box.style.height=n.y+"px"},_finish:function(){this._moved&&(ae(this._box),pe(this._container,"leaflet-crosshair")),Kt(),Ee(),Le(document,{contextmenu:Be,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(t){if((1===t.which||1===t.button)&&(this._finish(),this._moved)){this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(i(this._resetState,this),0);var e=new j(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(e).fire("boxzoomend",{boxZoomBounds:e})}},_onKeyDown:function(t){27===t.keyCode&&this._finish()}});Ze.addInitHook("addHandler","boxZoom",mr),Ze.mergeOptions({doubleClickZoom:!0});var gr=nn.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(t){var e=this._map,n=e.getZoom(),r=e.options.zoomDelta,i=t.originalEvent.shiftKey?n-r:n+r;"center"===e.options.doubleClickZoom?e.setZoom(i):e.setZoomAround(t.containerPoint,i)}});Ze.addInitHook("addHandler","doubleClickZoom",gr),Ze.mergeOptions({dragging:!0,inertia:!rt,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var vr=nn.extend({addHooks:function(){if(!this._draggable){var t=this._map;this._draggable=new un(t._mapPane,t._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),this._draggable.on("predrag",this._onPreDragLimit,this),t.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDragWrap,this),t.on("zoomend",this._onZoomEnd,this),t.whenReady(this._onZoomEnd,this))}fe(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){pe(this._map._container,"leaflet-grab"),pe(this._map._container,"leaflet-touch-drag"),this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},moving:function(){return this._draggable&&this._draggable._moving},_onDragStart:function(){var t=this._map;if(t._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity){var e=B(this._map.options.maxBounds);this._offsetLimit=$(this._map.latLngToContainerPoint(e.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(e.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))}else this._offsetLimit=null;t.fire("movestart").fire("dragstart"),t.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(t){if(this._map.options.inertia){var e=this._lastTime=+new Date,n=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(n),this._times.push(e),this._prunePositions(e)}this._map.fire("move",t).fire("drag",t)},_prunePositions:function(t){for(;this._positions.length>1&&t-this._times[0]>50;)this._positions.shift(),this._times.shift()},_onZoomEnd:function(){var t=this._map.getSize().divideBy(2),e=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=e.subtract(t).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(t,e){return t-(t-e)*this._viscosity},_onPreDragLimit:function(){if(this._viscosity&&this._offsetLimit){var t=this._draggable._newPos.subtract(this._draggable._startPos),e=this._offsetLimit;t.x<e.min.x&&(t.x=this._viscousLimit(t.x,e.min.x)),t.y<e.min.y&&(t.y=this._viscousLimit(t.y,e.min.y)),t.x>e.max.x&&(t.x=this._viscousLimit(t.x,e.max.x)),t.y>e.max.y&&(t.y=this._viscousLimit(t.y,e.max.y)),this._draggable._newPos=this._draggable._startPos.add(t)}},_onPreDragWrap:function(){var t=this._worldWidth,e=Math.round(t/2),n=this._initialWorldOffset,r=this._draggable._newPos.x,i=(r-e+n)%t+e-n,o=(r+e+n)%t-e-n,s=Math.abs(i+n)<Math.abs(o+n)?i:o;this._draggable._absPos=this._draggable._newPos.clone(),this._draggable._newPos.x=s},_onDragEnd:function(t){var e=this._map,n=e.options,r=!n.inertia||this._times.length<2;if(e.fire("dragend",t),r)e.fire("moveend");else{this._prunePositions(+new Date);var i=this._lastPos.subtract(this._positions[0]),o=(this._lastTime-this._times[0])/1e3,s=n.easeLinearity,a=i.multiplyBy(s/o),l=a.distanceTo([0,0]),u=Math.min(n.inertiaMaxSpeed,l),c=a.multiplyBy(u/l),h=u/(n.inertiaDeceleration*s),f=c.multiplyBy(-h/2).round();f.x||f.y?(f=e._limitOffset(f,e.options.maxBounds),I(function(){e.panBy(f,{duration:h,easeLinearity:s,noMoveStart:!0,animate:!0})})):e.fire("moveend")}}});Ze.addInitHook("addHandler","dragging",vr),Ze.mergeOptions({keyboard:!0,keyboardPanDelta:80});var Pr=nn.extend({keyCodes:{left:[37],right:[39],down:[40],up:[38],zoomIn:[187,107,61,171],zoomOut:[189,109,54,173]},initialize:function(t){this._map=t,this._setPanDelta(t.options.keyboardPanDelta),this._setZoomDelta(t.options.zoomDelta)},addHooks:function(){var t=this._map._container;t.tabIndex<=0&&(t.tabIndex="0"),Ae(t,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.on({focus:this._addHooks,blur:this._removeHooks},this)},removeHooks:function(){this._removeHooks(),Le(this._map._container,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.off({focus:this._addHooks,blur:this._removeHooks},this)},_onMouseDown:function(){if(!this._focused){var t=document.body,e=document.documentElement,n=t.scrollTop||e.scrollTop,r=t.scrollLeft||e.scrollLeft;this._map._container.focus(),window.scrollTo(r,n)}},_onFocus:function(){this._focused=!0,this._map.fire("focus")},_onBlur:function(){this._focused=!1,this._map.fire("blur")},_setPanDelta:function(t){var e,n,r=this._panKeys={},i=this.keyCodes;for(e=0,n=i.left.length;e<n;e++)r[i.left[e]]=[-1*t,0];for(e=0,n=i.right.length;e<n;e++)r[i.right[e]]=[t,0];for(e=0,n=i.down.length;e<n;e++)r[i.down[e]]=[0,t];for(e=0,n=i.up.length;e<n;e++)r[i.up[e]]=[0,-1*t]},_setZoomDelta:function(t){var e,n,r=this._zoomKeys={},i=this.keyCodes;for(e=0,n=i.zoomIn.length;e<n;e++)r[i.zoomIn[e]]=t;for(e=0,n=i.zoomOut.length;e<n;e++)r[i.zoomOut[e]]=-t},_addHooks:function(){Ae(document,"keydown",this._onKeyDown,this)},_removeHooks:function(){Le(document,"keydown",this._onKeyDown,this)},_onKeyDown:function(t){if(!(t.altKey||t.ctrlKey||t.metaKey)){var e,n=t.keyCode,r=this._map;if(n in this._panKeys)r._panAnim&&r._panAnim._inProgress||(e=this._panKeys[n],t.shiftKey&&(e=M(e).multiplyBy(3)),r.panBy(e),r.options.maxBounds&&r.panInsideBounds(r.options.maxBounds));else if(n in this._zoomKeys)r.setZoom(r.getZoom()+(t.shiftKey?3:1)*this._zoomKeys[n]);else{if(27!==n||!r._popup||!r._popup.options.closeOnEscapeKey)return;r.closePopup()}Be(t)}}});Ze.addInitHook("addHandler","keyboard",Pr),Ze.mergeOptions({scrollWheelZoom:!0,wheelDebounceTime:40,wheelPxPerZoomLevel:60});var br=nn.extend({addHooks:function(){Ae(this._map._container,"mousewheel",this._onWheelScroll,this),this._delta=0},removeHooks:function(){Le(this._map._container,"mousewheel",this._onWheelScroll,this)},_onWheelScroll:function(t){var e=Ye(t),n=this._map.options.wheelDebounceTime;this._delta+=e,this._lastMousePos=this._map.mouseEventToContainerPoint(t),this._startTime||(this._startTime=+new Date);var r=Math.max(n-(+new Date-this._startTime),0);clearTimeout(this._timer),this._timer=setTimeout(i(this._performZoom,this),r),Be(t)},_performZoom:function(){var t=this._map,e=t.getZoom(),n=this._map.options.zoomSnap||0;t._stop();var r=this._delta/(4*this._map.options.wheelPxPerZoomLevel),i=4*Math.log(2/(1+Math.exp(-Math.abs(r))))/Math.LN2,o=n?Math.ceil(i/n)*n:i,s=t._limitZoom(e+(this._delta>0?o:-o))-e;this._delta=0,this._startTime=null,s&&("center"===t.options.scrollWheelZoom?t.setZoom(e+s):t.setZoomAround(this._lastMousePos,e+s))}});Ze.addInitHook("addHandler","scrollWheelZoom",br),Ze.mergeOptions({tap:!0,tapTolerance:15});var Sr=nn.extend({addHooks:function(){Ae(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){Le(this._map._container,"touchstart",this._onDown,this)},_onDown:function(t){if(t.touches){if(je(t),this._fireClick=!0,t.touches.length>1)return this._fireClick=!1,void clearTimeout(this._holdTimeout);var e=t.touches[0],n=e.target;this._startPos=this._newPos=new R(e.clientX,e.clientY),n.tagName&&"a"===n.tagName.toLowerCase()&&fe(n,"leaflet-active"),this._holdTimeout=setTimeout(i(function(){this._isTapValid()&&(this._fireClick=!1,this._onUp(),this._simulateEvent("contextmenu",e))},this),1e3),this._simulateEvent("mousedown",e),Ae(document,{touchmove:this._onMove,touchend:this._onUp},this)}},_onUp:function(t){if(clearTimeout(this._holdTimeout),Le(document,{touchmove:this._onMove,touchend:this._onUp},this),this._fireClick&&t&&t.changedTouches){var e=t.changedTouches[0],n=e.target;n&&n.tagName&&"a"===n.tagName.toLowerCase()&&pe(n,"leaflet-active"),this._simulateEvent("mouseup",e),this._isTapValid()&&this._simulateEvent("click",e)}},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_onMove:function(t){var e=t.touches[0];this._newPos=new R(e.clientX,e.clientY),this._simulateEvent("mousemove",e)},_simulateEvent:function(t,e){var n=document.createEvent("MouseEvents");n._simulated=!0,e.target._simulatedClick=!0,n.initMouseEvent(t,!0,!0,window,1,e.screenX,e.screenY,e.clientX,e.clientY,!1,!1,!1,!1,0,null),e.target.dispatchEvent(n)}});St&&!bt&&Ze.addInitHook("addHandler","tap",Sr),Ze.mergeOptions({touchZoom:St&&!rt,bounceAtZoomLimits:!0});var Er=nn.extend({addHooks:function(){fe(this._map._container,"leaflet-touch-zoom"),Ae(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){pe(this._map._container,"leaflet-touch-zoom"),Le(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(t){var e=this._map;if(t.touches&&2===t.touches.length&&!e._animatingZoom&&!this._zooming){var n=e.mouseEventToContainerPoint(t.touches[0]),r=e.mouseEventToContainerPoint(t.touches[1]);this._centerPoint=e.getSize()._divideBy(2),this._startLatLng=e.containerPointToLatLng(this._centerPoint),"center"!==e.options.touchZoom&&(this._pinchStartLatLng=e.containerPointToLatLng(n.add(r)._divideBy(2))),this._startDist=n.distanceTo(r),this._startZoom=e.getZoom(),this._moved=!1,this._zooming=!0,e._stop(),Ae(document,"touchmove",this._onTouchMove,this),Ae(document,"touchend",this._onTouchEnd,this),je(t)}},_onTouchMove:function(t){if(t.touches&&2===t.touches.length&&this._zooming){var e=this._map,n=e.mouseEventToContainerPoint(t.touches[0]),r=e.mouseEventToContainerPoint(t.touches[1]),o=n.distanceTo(r)/this._startDist;if(this._zoom=e.getScaleZoom(o,this._startZoom),!e.options.bounceAtZoomLimits&&(this._zoom<e.getMinZoom()&&o<1||this._zoom>e.getMaxZoom()&&o>1)&&(this._zoom=e._limitZoom(this._zoom)),"center"===e.options.touchZoom){if(this._center=this._startLatLng,1===o)return}else{var s=n._add(r)._divideBy(2)._subtract(this._centerPoint);if(1===o&&0===s.x&&0===s.y)return;this._center=e.unproject(e.project(this._pinchStartLatLng,this._zoom).subtract(s),this._zoom)}this._moved||(e._moveStart(!0,!1),this._moved=!0),T(this._animRequest);var a=i(e._move,e,this._center,this._zoom,{pinch:!0,round:!1});this._animRequest=I(a,this,!0),je(t)}},_onTouchEnd:function(){this._moved&&this._zooming?(this._zooming=!1,T(this._animRequest),Le(document,"touchmove",this._onTouchMove),Le(document,"touchend",this._onTouchEnd),this._map.options.zoomAnimation?this._map._animateZoom(this._center,this._map._limitZoom(this._zoom),!0,this._map.options.zoomSnap):this._map._resetView(this._center,this._map._limitZoom(this._zoom))):this._zooming=!1}});Ze.addInitHook("addHandler","touchZoom",Er),Ze.BoxZoom=mr,Ze.DoubleClickZoom=gr,Ze.Drag=vr,Ze.Keyboard=Pr,Ze.ScrollWheelZoom=br,Ze.Tap=Sr,Ze.TouchZoom=Er,Object.freeze=e,t.version="1.6.0",t.Control=qe,t.control=Ke,t.Browser=Lt,t.Evented=C,t.Mixin=on,t.Util=O,t.Class=w,t.Handler=nn,t.extend=n,t.bind=i,t.stamp=s,t.setOptions=p,t.DomEvent=He,t.DomUtil=we,t.PosAnimation=Ve,t.Draggable=un,t.LineUtil=gn,t.PolyUtil=Pn,t.Point=R,t.point=M,t.Bounds=D,t.bounds=$,t.Transformation=G,t.transformation=W,t.Projection=En,t.LatLng=F,t.latLng=k,t.LatLngBounds=j,t.latLngBounds=B,t.CRS=z,t.GeoJSON=Fn,t.geoJSON=Zn,t.geoJson=qn,t.Layer=On,t.LayerGroup=wn,t.layerGroup=function(t,e){return new wn(t,e)},t.FeatureGroup=An,t.featureGroup=function(t){return new An(t)},t.ImageOverlay=Kn,t.imageOverlay=function(t,e,n){return new Kn(t,e,n)},t.VideoOverlay=Jn,t.videoOverlay=function(t,e,n){return new Jn(t,e,n)},t.SVGOverlay=Qn,t.svgOverlay=function(t,e,n){return new Qn(t,e,n)},t.DivOverlay=tr,t.Popup=er,t.popup=function(t,e){return new er(t,e)},t.Tooltip=nr,t.tooltip=function(t,e){return new nr(t,e)},t.Icon=Cn,t.icon=function(t){return new Cn(t)},t.DivIcon=rr,t.divIcon=function(t){return new rr(t)},t.Marker=Nn,t.marker=function(t,e){return new Nn(t,e)},t.TileLayer=or,t.tileLayer=sr,t.GridLayer=ir,t.gridLayer=function(t){return new ir(t)},t.SVG=dr,t.svg=yr,t.Renderer=lr,t.Canvas=ur,t.canvas=cr,t.Path=Mn,t.CircleMarker=Dn,t.circleMarker=function(t,e){return new Dn(t,e)},t.Circle=$n,t.circle=function(t,e,n){return new $n(t,e,n)},t.Polyline=jn,t.polyline=function(t,e){return new jn(t,e)},t.Polygon=Bn,t.polygon=function(t,e){return new Bn(t,e)},t.Rectangle=_r,t.rectangle=function(t,e){return new _r(t,e)},t.Map=Ze,t.map=function(t,e){return new Ze(t,e)};var xr=window.L;t.noConflict=function(){return window.L=xr,this},window.L=t}(e)}),leafletSrc_1=leafletSrc.noConflict,leafletSrc_2=leafletSrc.DomUtil,leafletSrc_3=leafletSrc.Point,leafletSrc_4=leafletSrc.DivIcon,leafletSrc_5=leafletSrc.Marker,leafletSrc_6=leafletSrc.DomEvent,leafletSrc_7=leafletSrc.Polygon,leafletSrc_8=leafletSrc.LineUtil,leafletSrc_9=leafletSrc.FeatureGroup,xhtml="http://www.w3.org/1999/xhtml",namespaces={svg:"http://www.w3.org/2000/svg",xhtml:xhtml,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function namespace(t){var e=t+="",n=e.indexOf(":");return n>=0&&"xmlns"!==(e=t.slice(0,n))&&(t=t.slice(n+1)),namespaces.hasOwnProperty(e)?{space:namespaces[e],local:t}:t}function creatorInherit(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===xhtml&&e.documentElement.namespaceURI===xhtml?e.createElement(t):e.createElementNS(n,t)}}function creatorFixed(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function creator(t){var e=namespace(t);return(e.local?creatorFixed:creatorInherit)(e)}var matcher=function(t){return function(){return this.matches(t)}};if("undefined"!=typeof document){var element=document.documentElement;if(!element.matches){var vendorMatches=element.webkitMatchesSelector||element.msMatchesSelector||element.mozMatchesSelector||element.oMatchesSelector;matcher=function(t){return function(){return vendorMatches.call(this,t)}}}}var matcher$1=matcher,filterEvents={};if("undefined"!=typeof document){var element$1=document.documentElement;"onmouseenter"in element$1||(filterEvents={mouseenter:"mouseover",mouseleave:"mouseout"})}function filterContextListener(t,e,n){return t=contextListener(t,e,n),function(e){var n=e.relatedTarget;n&&(n===this||8&n.compareDocumentPosition(this))||t.call(this,e)}}function contextListener(t,e,n){return function(r){try{t.call(this,this.__data__,e,n)}finally{}}}function parseTypenames(t){return t.trim().split(/^|\s+/).map(function(t){var e="",n=t.indexOf(".");return n>=0&&(e=t.slice(n+1),t=t.slice(0,n)),{type:t,name:e}})}function onRemove(t){return function(){var e=this.__on;if(e){for(var n,r=0,i=-1,o=e.length;r<o;++r)n=e[r],t.type&&n.type!==t.type||n.name!==t.name?e[++i]=n:this.removeEventListener(n.type,n.listener,n.capture);++i?e.length=i:delete this.__on}}}function onAdd(t,e,n){var r=filterEvents.hasOwnProperty(t.type)?filterContextListener:contextListener;return function(i,o,s){var a,l=this.__on,u=r(e,o,s);if(l)for(var c=0,h=l.length;c<h;++c)if((a=l[c]).type===t.type&&a.name===t.name)return this.removeEventListener(a.type,a.listener,a.capture),this.addEventListener(a.type,a.listener=u,a.capture=n),void(a.value=e);this.addEventListener(t.type,u,n),a={type:t.type,name:t.name,value:e,listener:u,capture:n},l?l.push(a):this.__on=[a]}}function selection_on(t,e,n){var r,i,o=parseTypenames(t+""),s=o.length;if(!(arguments.length<2)){for(a=e?onAdd:onRemove,null==n&&(n=!1),r=0;r<s;++r)this.each(a(o[r],e,n));return this}var a=this.node().__on;if(a)for(var l,u=0,c=a.length;u<c;++u)for(r=0,l=a[u];r<s;++r)if((i=o[r]).type===l.type&&i.name===l.name)return l.value}function none(){}function selector(t){return null==t?none:function(){return this.querySelector(t)}}function selection_select(t){"function"!=typeof t&&(t=selector(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o,s,a=e[i],l=a.length,u=r[i]=new Array(l),c=0;c<l;++c)(o=a[c])&&(s=t.call(o,o.__data__,c,a))&&("__data__"in o&&(s.__data__=o.__data__),u[c]=s);return new Selection(r,this._parents)}function empty(){return[]}function selectorAll(t){return null==t?empty:function(){return this.querySelectorAll(t)}}function selection_selectAll(t){"function"!=typeof t&&(t=selectorAll(t));for(var e=this._groups,n=e.length,r=[],i=[],o=0;o<n;++o)for(var s,a=e[o],l=a.length,u=0;u<l;++u)(s=a[u])&&(r.push(t.call(s,s.__data__,u,a)),i.push(s));return new Selection(r,i)}function selection_filter(t){"function"!=typeof t&&(t=matcher$1(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o,s=e[i],a=s.length,l=r[i]=[],u=0;u<a;++u)(o=s[u])&&t.call(o,o.__data__,u,s)&&l.push(o);return new Selection(r,this._parents)}function sparse(t){return new Array(t.length)}function selection_enter(){return new Selection(this._enter||this._groups.map(sparse),this._parents)}function EnterNode(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}function constant(t){return function(){return t}}EnterNode.prototype={constructor:EnterNode,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};var keyPrefix="$";function bindIndex(t,e,n,r,i,o){for(var s,a=0,l=e.length,u=o.length;a<u;++a)(s=e[a])?(s.__data__=o[a],r[a]=s):n[a]=new EnterNode(t,o[a]);for(;a<l;++a)(s=e[a])&&(i[a]=s)}function bindKey(t,e,n,r,i,o,s){var a,l,u,c={},h=e.length,f=o.length,p=new Array(h);for(a=0;a<h;++a)(l=e[a])&&(p[a]=u=keyPrefix+s.call(l,l.__data__,a,e),u in c?i[a]=l:c[u]=l);for(a=0;a<f;++a)(l=c[u=keyPrefix+s.call(t,o[a],a,o)])?(r[a]=l,l.__data__=o[a],c[u]=null):n[a]=new EnterNode(t,o[a]);for(a=0;a<h;++a)(l=e[a])&&c[p[a]]===l&&(i[a]=l)}function selection_data(t,e){if(!t)return p=new Array(this.size()),u=-1,this.each(function(t){p[++u]=t}),p;var n=e?bindKey:bindIndex,r=this._parents,i=this._groups;"function"!=typeof t&&(t=constant(t));for(var o=i.length,s=new Array(o),a=new Array(o),l=new Array(o),u=0;u<o;++u){var c=r[u],h=i[u],f=h.length,p=t.call(c,c&&c.__data__,u,r),d=p.length,y=a[u]=new Array(d),_=s[u]=new Array(d);n(c,h,y,_,l[u]=new Array(f),p,e);for(var m,g,v=0,P=0;v<d;++v)if(m=y[v]){for(v>=P&&(P=v+1);!(g=_[P])&&++P<d;);m._next=g||null}}return(s=new Selection(s,r))._enter=a,s._exit=l,s}function selection_exit(){return new Selection(this._exit||this._groups.map(sparse),this._parents)}function selection_merge(t){for(var e=this._groups,n=t._groups,r=e.length,i=n.length,o=Math.min(r,i),s=new Array(r),a=0;a<o;++a)for(var l,u=e[a],c=n[a],h=u.length,f=s[a]=new Array(h),p=0;p<h;++p)(l=u[p]||c[p])&&(f[p]=l);for(;a<r;++a)s[a]=e[a];return new Selection(s,this._parents)}function selection_order(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var r,i=t[e],o=i.length-1,s=i[o];--o>=0;)(r=i[o])&&(s&&s!==r.nextSibling&&s.parentNode.insertBefore(r,s),s=r);return this}function selection_sort(t){function e(e,n){return e&&n?t(e.__data__,n.__data__):!e-!n}t||(t=ascending);for(var n=this._groups,r=n.length,i=new Array(r),o=0;o<r;++o){for(var s,a=n[o],l=a.length,u=i[o]=new Array(l),c=0;c<l;++c)(s=a[c])&&(u[c]=s);u.sort(e)}return new Selection(i,this._parents).order()}function ascending(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function selection_call(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function selection_nodes(){var t=new Array(this.size()),e=-1;return this.each(function(){t[++e]=this}),t}function selection_node(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],i=0,o=r.length;i<o;++i){var s=r[i];if(s)return s}return null}function selection_size(){var t=0;return this.each(function(){++t}),t}function selection_empty(){return!this.node()}function selection_each(t){for(var e=this._groups,n=0,r=e.length;n<r;++n)for(var i,o=e[n],s=0,a=o.length;s<a;++s)(i=o[s])&&t.call(i,i.__data__,s,o);return this}function attrRemove(t){return function(){this.removeAttribute(t)}}function attrRemoveNS(t){return function(){this.removeAttributeNS(t.space,t.local)}}function attrConstant(t,e){return function(){this.setAttribute(t,e)}}function attrConstantNS(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function attrFunction(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttribute(t):this.setAttribute(t,n)}}function attrFunctionNS(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}function selection_attr(t,e){var n=namespace(t);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((null==e?n.local?attrRemoveNS:attrRemove:"function"==typeof e?n.local?attrFunctionNS:attrFunction:n.local?attrConstantNS:attrConstant)(n,e))}function defaultView(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function styleRemove(t){return function(){this.style.removeProperty(t)}}function styleConstant(t,e,n){return function(){this.style.setProperty(t,e,n)}}function styleFunction(t,e,n){return function(){var r=e.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function selection_style(t,e,n){return arguments.length>1?this.each((null==e?styleRemove:"function"==typeof e?styleFunction:styleConstant)(t,e,null==n?"":n)):styleValue(this.node(),t)}function styleValue(t,e){return t.style.getPropertyValue(e)||defaultView(t).getComputedStyle(t,null).getPropertyValue(e)}function propertyRemove(t){return function(){delete this[t]}}function propertyConstant(t,e){return function(){this[t]=e}}function propertyFunction(t,e){return function(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}}function selection_property(t,e){return arguments.length>1?this.each((null==e?propertyRemove:"function"==typeof e?propertyFunction:propertyConstant)(t,e)):this.node()[t]}function classArray(t){return t.trim().split(/^|\s+/)}function classList(t){return t.classList||new ClassList(t)}function ClassList(t){this._node=t,this._names=classArray(t.getAttribute("class")||"")}function classedAdd(t,e){for(var n=classList(t),r=-1,i=e.length;++r<i;)n.add(e[r])}function classedRemove(t,e){for(var n=classList(t),r=-1,i=e.length;++r<i;)n.remove(e[r])}function classedTrue(t){return function(){classedAdd(this,t)}}function classedFalse(t){return function(){classedRemove(this,t)}}function classedFunction(t,e){return function(){(e.apply(this,arguments)?classedAdd:classedRemove)(this,t)}}function selection_classed(t,e){var n=classArray(t+"");if(arguments.length<2){for(var r=classList(this.node()),i=-1,o=n.length;++i<o;)if(!r.contains(n[i]))return!1;return!0}return this.each(("function"==typeof e?classedFunction:e?classedTrue:classedFalse)(n,e))}function textRemove(){this.textContent=""}function textConstant(t){return function(){this.textContent=t}}function textFunction(t){return function(){var e=t.apply(this,arguments);this.textContent=null==e?"":e}}function selection_text(t){return arguments.length?this.each(null==t?textRemove:("function"==typeof t?textFunction:textConstant)(t)):this.node().textContent}function htmlRemove(){this.innerHTML=""}function htmlConstant(t){return function(){this.innerHTML=t}}function htmlFunction(t){return function(){var e=t.apply(this,arguments);this.innerHTML=null==e?"":e}}function selection_html(t){return arguments.length?this.each(null==t?htmlRemove:("function"==typeof t?htmlFunction:htmlConstant)(t)):this.node().innerHTML}function raise(){this.nextSibling&&this.parentNode.appendChild(this)}function selection_raise(){return this.each(raise)}function lower(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function selection_lower(){return this.each(lower)}function selection_append(t){var e="function"==typeof t?t:creator(t);return this.select(function(){return this.appendChild(e.apply(this,arguments))})}function constantNull(){return null}function selection_insert(t,e){var n="function"==typeof t?t:creator(t),r=null==e?constantNull:"function"==typeof e?e:selector(e);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function remove(){var t=this.parentNode;t&&t.removeChild(this)}function selection_remove(){return this.each(remove)}function selection_datum(t){return arguments.length?this.property("__data__",t):this.node().__data__}function dispatchEvent$1(t,e,n){var r=defaultView(t),i=r.CustomEvent;"function"==typeof i?i=new i(e,n):(i=r.document.createEvent("Event"),n?(i.initEvent(e,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(e,!1,!1)),t.dispatchEvent(i)}function dispatchConstant(t,e){return function(){return dispatchEvent$1(this,t,e)}}function dispatchFunction(t,e){return function(){return dispatchEvent$1(this,t,e.apply(this,arguments))}}function selection_dispatch(t,e){return this.each(("function"==typeof e?dispatchFunction:dispatchConstant)(t,e))}ClassList.prototype={add:function(t){this._names.indexOf(t)<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};var root$1=[null];function Selection(t,e){this._groups=t,this._parents=e}function selection(){return new Selection([[document.documentElement]],root$1)}function select(t){return"string"==typeof t?new Selection([[document.querySelector(t)]],[document.documentElement]):new Selection([[t]],root$1)}Selection.prototype=selection.prototype={constructor:Selection,select:selection_select,selectAll:selection_selectAll,filter:selection_filter,data:selection_data,enter:selection_enter,exit:selection_exit,merge:selection_merge,order:selection_order,sort:selection_sort,call:selection_call,nodes:selection_nodes,node:selection_node,size:selection_size,empty:selection_empty,each:selection_each,attr:selection_attr,style:selection_style,property:selection_property,classed:selection_classed,text:selection_text,html:selection_html,raise:selection_raise,lower:selection_lower,append:selection_append,insert:selection_insert,remove:selection_remove,datum:selection_datum,on:selection_on,dispatch:selection_dispatch};var pi=Math.PI,tau=2*pi,epsilon=1e-6,tauEpsilon=tau-epsilon;function Path(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function path$1(){return new Path}function constant$1(t){return function(){return t}}function Linear(t){this._context=t}function curveLinear(t){return new Linear(t)}function x(t){return t[0]}function y(t){return t[1]}function line(){var t=x,e=y,n=constant$1(!0),r=null,i=curveLinear,o=null;function s(s){var a,l,u,c=s.length,h=!1;for(null==r&&(o=i(u=path$1())),a=0;a<=c;++a)!(a<c&&n(l=s[a],a,s))===h&&((h=!h)?o.lineStart():o.lineEnd()),h&&o.point(+t(l,a,s),+e(l,a,s));if(u)return o=null,u+""||null}return s.x=function(e){return arguments.length?(t="function"==typeof e?e:constant$1(+e),s):t},s.y=function(t){return arguments.length?(e="function"==typeof t?t:constant$1(+t),s):e},s.defined=function(t){return arguments.length?(n="function"==typeof t?t:constant$1(!!t),s):n},s.curve=function(t){return arguments.length?(i=t,null!=r&&(o=i(r)),s):i},s.context=function(t){return arguments.length?(null==t?r=o=null:o=i(r=t),s):r},s}function sign(t){return t<0?-1:1}function slope3(t,e,n){var r=t._x1-t._x0,i=e-t._x1,o=(t._y1-t._y0)/(r||i<0&&-0),s=(n-t._y1)/(i||r<0&&-0),a=(o*i+s*r)/(r+i);return(sign(o)+sign(s))*Math.min(Math.abs(o),Math.abs(s),.5*Math.abs(a))||0}function slope2(t,e){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-e)/2:e}function point(t,e,n){var r=t._x0,i=t._y0,o=t._x1,s=t._y1,a=(o-r)/3;t._context.bezierCurveTo(r+a,i+a*e,o-a,s-a*n,o,s)}function MonotoneX(t){this._context=t}function MonotoneY(t){this._context=new ReflectContext(t)}function ReflectContext(t){this._context=t}function monotoneX(t){return new MonotoneX(t)}Path.prototype=path$1.prototype={constructor:Path,moveTo:function(t,e){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)},closePath:function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,e){this._+="L"+(this._x1=+t)+","+(this._y1=+e)},quadraticCurveTo:function(t,e,n,r){this._+="Q"+ +t+","+ +e+","+(this._x1=+n)+","+(this._y1=+r)},bezierCurveTo:function(t,e,n,r,i,o){this._+="C"+ +t+","+ +e+","+ +n+","+ +r+","+(this._x1=+i)+","+(this._y1=+o)},arcTo:function(t,e,n,r,i){t=+t,e=+e,n=+n,r=+r,i=+i;var o=this._x1,s=this._y1,a=n-t,l=r-e,u=o-t,c=s-e,h=u*u+c*c;if(i<0)throw new Error("negative radius: "+i);if(null===this._x1)this._+="M"+(this._x1=t)+","+(this._y1=e);else if(h>epsilon)if(Math.abs(c*a-l*u)>epsilon&&i){var f=n-o,p=r-s,d=a*a+l*l,y=f*f+p*p,_=Math.sqrt(d),m=Math.sqrt(h),g=i*Math.tan((pi-Math.acos((d+h-y)/(2*_*m)))/2),v=g/m,P=g/_;Math.abs(v-1)>epsilon&&(this._+="L"+(t+v*u)+","+(e+v*c)),this._+="A"+i+","+i+",0,0,"+ +(c*f>u*p)+","+(this._x1=t+P*a)+","+(this._y1=e+P*l)}else this._+="L"+(this._x1=t)+","+(this._y1=e);else;},arc:function(t,e,n,r,i,o){t=+t,e=+e,o=!!o;var s=(n=+n)*Math.cos(r),a=n*Math.sin(r),l=t+s,u=e+a,c=1^o,h=o?r-i:i-r;if(n<0)throw new Error("negative radius: "+n);null===this._x1?this._+="M"+l+","+u:(Math.abs(this._x1-l)>epsilon||Math.abs(this._y1-u)>epsilon)&&(this._+="L"+l+","+u),n&&(h<0&&(h=h%tau+tau),h>tauEpsilon?this._+="A"+n+","+n+",0,1,"+c+","+(t-s)+","+(e-a)+"A"+n+","+n+",0,1,"+c+","+(this._x1=l)+","+(this._y1=u):h>epsilon&&(this._+="A"+n+","+n+",0,"+ +(h>=pi)+","+c+","+(this._x1=t+n*Math.cos(i))+","+(this._y1=e+n*Math.sin(i))))},rect:function(t,e,n,r){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)+"h"+ +n+"v"+ +r+"h"+-n+"Z"},toString:function(){return this._}},Linear.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e)}}},MonotoneX.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:point(this,this._t0,slope2(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){var n=NaN;if(e=+e,(t=+t)!==this._x1||e!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,point(this,slope2(this,n=slope3(this,t,e)),n);break;default:point(this,this._t0,n=slope3(this,t,e))}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=n}}},(MonotoneY.prototype=Object.create(MonotoneX.prototype)).point=function(t,e){MonotoneX.prototype.point.call(this,e,t)},ReflectContext.prototype={moveTo:function(t,e){this._context.moveTo(e,t)},closePath:function(){this._context.closePath()},lineTo:function(t,e){this._context.lineTo(e,t)},bezierCurveTo:function(t,e,n,r,i,o){this._context.bezierCurveTo(e,t,r,n,o,i)}};var shim$2,isImplemented=function(){var t,e;return"function"==typeof Set&&(t=new Set(["raz","dwa","trzy"]),"[object Set]"===String(t)&&(3===t.size&&("function"==typeof t.add&&("function"==typeof t.clear&&("function"==typeof t.delete&&("function"==typeof t.entries&&("function"==typeof t.forEach&&("function"==typeof t.has&&("function"==typeof t.keys&&("function"==typeof t.values&&(!1===(e=t.values().next()).done&&"raz"===e.value)))))))))))},_undefined=void 0,is=function(t){return t!==_undefined&&null!==t},noop=function(){},_undefined$1=noop(),isValue=function(t){return t!==_undefined$1&&null!==t},validValue=function(t){if(!isValue(t))throw new TypeError("Cannot use null or undefined");return t},clear$1=function(){return validValue(this).length=0,this},isImplemented$1=function(){var t=Number.isNaN;return"function"==typeof t&&(!t({})&&t(NaN)&&!t(34))},shim=function(t){return t!=t},isNan=isImplemented$1()?Number.isNaN:shim,isImplemented$2=function(){var t=Math.sign;return"function"==typeof t&&(1===t(10)&&-1===t(-20))},shim$1=function(t){return t=Number(t),isNaN(t)||0===t?t:t>0?1:-1},sign$1=isImplemented$2()?Math.sign:shim$1,abs$5=Math.abs,floor$7=Math.floor,toInteger$1=function(t){return isNaN(t)?0:0!==(t=Number(t))&&isFinite(t)?sign$1(t)*floor$7(abs$5(t)):t},max$5=Math.max,toPosInteger=function(t){return max$5(0,toInteger$1(t))},indexOf=Array.prototype.indexOf,objHasOwnProperty=Object.prototype.hasOwnProperty,abs$6=Math.abs,floor$8=Math.floor,eIndexOf=function(t){var e,n,r,i;if(!isNan(t))return indexOf.apply(this,arguments);for(n=toPosInteger(validValue(this).length),r=arguments[1],e=r=isNaN(r)?0:r>=0?floor$8(r):toPosInteger(this.length)-floor$8(abs$6(r));e<n;++e)if(objHasOwnProperty.call(this,e)&&(i=this[e],isNan(i)))return e;return-1},create=Object.create,getPrototypeOf=Object.getPrototypeOf,plainObject={},isImplemented$3=function(){var t=Object.setPrototypeOf,e=arguments[0]||create;return"function"==typeof t&&getPrototypeOf(t(e(null),plainObject))===plainObject},map={function:!0,object:!0},isObject$1=function(t){return isValue(t)&&map[typeof t]||!1},create$1=Object.create;isImplemented$3()||(shim$2=shim$3);var validate,create_1=function(){var t,e,n;return shim$2?1!==shim$2.level?create$1:(t={},e={},n={configurable:!1,enumerable:!1,writable:!0,value:void 0},Object.getOwnPropertyNames(Object.prototype).forEach(function(t){e[t]="__proto__"!==t?n:{configurable:!0,enumerable:!1,writable:!0,value:void 0}}),Object.defineProperties(t,e),Object.defineProperty(shim$2,"nullPolyfill",{configurable:!1,enumerable:!1,writable:!1,value:t}),function(e,n){return create$1(null===e?t:e,n)}):create$1}(),objIsPrototypeOf=Object.prototype.isPrototypeOf,defineProperty$b=Object.defineProperty,nullDesc={configurable:!0,enumerable:!1,writable:!0,value:void 0};validate=function(t,e){if(validValue(t),null===e||isObject$1(e))return t;throw new TypeError("Prototype must be null or an object")};var SymbolPolyfill,HiddenSymbol,isNativeSafe,shim$3=function(t){var e,n;return t?(2===t.level?t.set?(n=t.set,e=function(t,e){return n.call(validate(t,e),e),t}):e=function(t,e){return validate(t,e).__proto__=e,t}:e=function t(e,n){var r;return validate(e,n),(r=objIsPrototypeOf.call(t.nullPolyfill,e))&&delete t.nullPolyfill.__proto__,null===n&&(n=t.nullPolyfill),e.__proto__=n,r&&defineProperty$b(t.nullPolyfill,"__proto__",nullDesc),e},Object.defineProperty(e,"level",{configurable:!1,enumerable:!1,writable:!1,value:t.level})):null}(function(){var t,e=Object.create(null),n={},r=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__");if(r){try{(t=r.set).call(e,n)}catch(t){}if(Object.getPrototypeOf(e)===n)return{set:t,level:2}}return e.__proto__=n,Object.getPrototypeOf(e)===n?{level:2}:((e={}).__proto__=n,Object.getPrototypeOf(e)===n&&{level:1})}()),setPrototypeOf=isImplemented$3()?Object.setPrototypeOf:shim$3,validCallable=function(t){if("function"!=typeof t)throw new TypeError(t+" is not a function");return t},possibleTypes={object:!0,function:!0,undefined:!0},is$1=function(t){return!!is(t)&&hasOwnProperty.call(possibleTypes,typeof t)},is$2=function(t){if(!is$1(t))return!1;try{return!!t.constructor&&t.constructor.prototype===t}catch(t){return!1}},is$3=function(t){if("function"!=typeof t)return!1;if(!hasOwnProperty.call(t,"length"))return!1;try{if("number"!=typeof t.length)return!1;if("function"!=typeof t.call)return!1;if("function"!=typeof t.apply)return!1}catch(t){return!1}return!is$2(t)},classRe=/^\s*class[\s{/}]/,functionToString$1=Function.prototype.toString,is$4=function(t){return!!is$3(t)&&!classRe.test(functionToString$1.call(t))},isImplemented$4=function(){var t,e=Object.assign;return"function"==typeof e&&(e(t={foo:"raz"},{bar:"dwa"},{trzy:"trzy"}),t.foo+t.bar+t.trzy==="razdwatrzy")},isImplemented$5=function(){try{return Object.keys("primitive"),!0}catch(t){return!1}},keys$2=Object.keys,shim$4=function(t){return keys$2(isValue(t)?Object(t):t)},keys$3=isImplemented$5()?Object.keys:shim$4,max$6=Math.max,shim$5=function(t,e){var n,r,i,o=max$6(arguments.length,2);for(t=Object(validValue(t)),i=function(r){try{t[r]=e[r]}catch(t){n||(n=t)}},r=1;r<o;++r)e=arguments[r],keys$3(e).forEach(i);if(void 0!==n)throw n;return t},assign=isImplemented$4()?Object.assign:shim$5,forEach=Array.prototype.forEach,create$2=Object.create,process$4=function(t,e){var n;for(n in t)e[n]=t[n]},normalizeOptions=function(t){var e=create$2(null);return forEach.call(arguments,function(t){isValue(t)&&process$4(Object(t),e)}),e},str="razdwatrzy",isImplemented$6=function(){return"function"==typeof str.contains&&(!0===str.contains("dwa")&&!1===str.contains("foo"))},indexOf$1=String.prototype.indexOf,shim$6=function(t){return indexOf$1.call(this,t,arguments[1])>-1},contains=isImplemented$6()?String.prototype.contains:shim$6,d_1=createCommonjsModule(function(t){(t.exports=function(t,e){var n,r,i,o,s;return arguments.length<2||"string"!=typeof t?(o=e,e=t,t=null):o=arguments[2],is(t)?(n=contains.call(t,"c"),r=contains.call(t,"e"),i=contains.call(t,"w")):(n=i=!0,r=!1),s={value:e,configurable:n,enumerable:r,writable:i},o?assign(normalizeOptions(o),s):s}).gs=function(t,e,n){var r,i,o,s;return"string"!=typeof t?(o=n,n=e,e=t,t=null):o=arguments[3],is(e)?is$4(e)?is(n)?is$4(n)||(o=n,n=void 0):n=void 0:(o=e,e=n=void 0):e=void 0,is(t)?(r=contains.call(t,"c"),i=contains.call(t,"e")):(r=!0,i=!1),s={get:e,set:n,configurable:r,enumerable:i},o?assign(normalizeOptions(o),s):s}}),eventEmitter=createCommonjsModule(function(t,e){var n,r,i,o,s,a,l,u=Function.prototype.apply,c=Function.prototype.call,h=Object.create,f=Object.defineProperty,p=Object.defineProperties,d=Object.prototype.hasOwnProperty,y={configurable:!0,enumerable:!1,writable:!0};r=function(t,e){var r,o;return validCallable(e),o=this,n.call(this,t,r=function(){i.call(o,t,r),u.call(e,this,arguments)}),r.__eeOnceListener__=e,this},s={on:n=function(t,e){var n;return validCallable(e),d.call(this,"__ee__")?n=this.__ee__:(n=y.value=h(null),f(this,"__ee__",y),y.value=null),n[t]?"object"==typeof n[t]?n[t].push(e):n[t]=[n[t],e]:n[t]=e,this},once:r,off:i=function(t,e){var n,r,i,o;if(validCallable(e),!d.call(this,"__ee__"))return this;if(!(n=this.__ee__)[t])return this;if("object"==typeof(r=n[t]))for(o=0;i=r[o];++o)i!==e&&i.__eeOnceListener__!==e||(2===r.length?n[t]=r[o?0:1]:r.splice(o,1));else r!==e&&r.__eeOnceListener__!==e||delete n[t];return this},emit:o=function(t){var e,n,r,i,o;if(d.call(this,"__ee__")&&(i=this.__ee__[t]))if("object"==typeof i){for(n=arguments.length,o=new Array(n-1),e=1;e<n;++e)o[e-1]=arguments[e];for(i=i.slice(),e=0;r=i[e];++e)u.call(r,this,o)}else switch(arguments.length){case 1:c.call(i,this);break;case 2:c.call(i,this,arguments[1]);break;case 3:c.call(i,this,arguments[1],arguments[2]);break;default:for(n=arguments.length,o=new Array(n-1),e=1;e<n;++e)o[e-1]=arguments[e];u.call(i,this,o)}}},a={on:d_1(n),once:d_1(r),off:d_1(i),emit:d_1(o)},l=p({},a),t.exports=e=function(t){return null==t?h(l):p(Object(t),a)},e.methods=s}),eventEmitter_1=eventEmitter.methods,isImplemented$7=function(){return"object"==typeof globalThis&&(!!globalThis&&globalThis.Array===Array)},naiveFallback=function(){if("object"==typeof self&&self)return self;if("object"==typeof window&&window)return window;throw new Error("Unable to resolve global `this`")},implementation=function(){if(this)return this;try{Object.defineProperty(Object.prototype,"__global__",{get:function(){return this},configurable:!0})}catch(t){return naiveFallback()}try{return __global__||naiveFallback()}finally{delete Object.prototype.__global__}}(),globalThis_1=isImplemented$7()?globalThis:implementation,validTypes={object:!0,symbol:!0},isImplemented$8=function(){var t,e=globalThis_1.Symbol;if("function"!=typeof e)return!1;t=e("test symbol");try{String(t)}catch(t){return!1}return!!validTypes[typeof e.iterator]&&(!!validTypes[typeof e.toPrimitive]&&!!validTypes[typeof e.toStringTag])},isSymbol$1=function(t){return!!t&&("symbol"==typeof t||!!t.constructor&&("Symbol"===t.constructor.name&&"Symbol"===t[t.constructor.toStringTag]))},validateSymbol=function(t){if(!isSymbol$1(t))throw new TypeError(t+" is not a symbol");return t},create$3=Object.create,defineProperty$c=Object.defineProperty,objPrototype=Object.prototype,created=create$3(null),generateName=function(t){for(var e,n,r=0;created[t+(r||"")];)++r;return created[t+=r||""]=!0,defineProperty$c(objPrototype,e="@@"+t,d_1.gs(null,function(t){n||(n=!0,defineProperty$c(this,e,d_1(t)),n=!1)})),e},NativeSymbol$1=globalThis_1.Symbol,standardSymbols=function(t){return Object.defineProperties(t,{hasInstance:d_1("",NativeSymbol$1&&NativeSymbol$1.hasInstance||t("hasInstance")),isConcatSpreadable:d_1("",NativeSymbol$1&&NativeSymbol$1.isConcatSpreadable||t("isConcatSpreadable")),iterator:d_1("",NativeSymbol$1&&NativeSymbol$1.iterator||t("iterator")),match:d_1("",NativeSymbol$1&&NativeSymbol$1.match||t("match")),replace:d_1("",NativeSymbol$1&&NativeSymbol$1.replace||t("replace")),search:d_1("",NativeSymbol$1&&NativeSymbol$1.search||t("search")),species:d_1("",NativeSymbol$1&&NativeSymbol$1.species||t("species")),split:d_1("",NativeSymbol$1&&NativeSymbol$1.split||t("split")),toPrimitive:d_1("",NativeSymbol$1&&NativeSymbol$1.toPrimitive||t("toPrimitive")),toStringTag:d_1("",NativeSymbol$1&&NativeSymbol$1.toStringTag||t("toStringTag")),unscopables:d_1("",NativeSymbol$1&&NativeSymbol$1.unscopables||t("unscopables"))})},registry=Object.create(null),symbolRegistry=function(t){return Object.defineProperties(t,{for:d_1(function(e){return registry[e]?registry[e]:registry[e]=t(String(e))}),keyFor:d_1(function(t){var e;for(e in validateSymbol(t),registry)if(registry[e]===t)return e})})},NativeSymbol$2=globalThis_1.Symbol,create$4=Object.create,defineProperties=Object.defineProperties,defineProperty$d=Object.defineProperty;if("function"==typeof NativeSymbol$2)try{String(NativeSymbol$2()),isNativeSafe=!0}catch(t){}else NativeSymbol$2=null;HiddenSymbol=function(t){if(this instanceof HiddenSymbol)throw new TypeError("Symbol is not a constructor");return SymbolPolyfill(t)};var polyfill=SymbolPolyfill=function t(e){var n;if(this instanceof t)throw new TypeError("Symbol is not a constructor");return isNativeSafe?NativeSymbol$2(e):(n=create$4(HiddenSymbol.prototype),e=void 0===e?"":String(e),defineProperties(n,{__description__:d_1("",e),__name__:d_1("",generateName(e))}))};standardSymbols(SymbolPolyfill),symbolRegistry(SymbolPolyfill),defineProperties(HiddenSymbol.prototype,{constructor:d_1(SymbolPolyfill),toString:d_1("",function(){return this.__name__})}),defineProperties(SymbolPolyfill.prototype,{toString:d_1(function(){return"Symbol ("+validateSymbol(this).__description__+")"}),valueOf:d_1(function(){return validateSymbol(this)})}),defineProperty$d(SymbolPolyfill.prototype,SymbolPolyfill.toPrimitive,d_1("",function(){var t=validateSymbol(this);return"symbol"==typeof t?t:t.toString()})),defineProperty$d(SymbolPolyfill.prototype,SymbolPolyfill.toStringTag,d_1("c","Symbol")),defineProperty$d(HiddenSymbol.prototype,SymbolPolyfill.toStringTag,d_1("c",SymbolPolyfill.prototype[SymbolPolyfill.toStringTag])),defineProperty$d(HiddenSymbol.prototype,SymbolPolyfill.toPrimitive,d_1("c",SymbolPolyfill.prototype[SymbolPolyfill.toPrimitive]));var define,es6Symbol=isImplemented$8()?globalThis_1.Symbol:polyfill,objToString=Object.prototype.toString,id$2=objToString.call(function(){return arguments}()),isArguments=function(t){return objToString.call(t)===id$2},objToString$1=Object.prototype.toString,id$3=objToString$1.call(""),isString=function(t){return"string"==typeof t||t&&"object"==typeof t&&(t instanceof String||objToString$1.call(t)===id$3)||!1},iteratorSymbol=es6Symbol.iterator,isArray$1=Array.isArray,isIterable=function(t){return!!isValue(t)&&(!!isArray$1(t)||(!!isString(t)||(!!isArguments(t)||"function"==typeof t[iteratorSymbol])))},validIterable=function(t){if(!isIterable(t))throw new TypeError(t+" is not iterable");return t},objectToString$1=Object.prototype.toString,coerce=function(t){if(!is(t))return null;if(is$1(t)){var e=t.toString;if("function"!=typeof e)return null;if(e===objectToString$1)return null}try{return""+t}catch(t){return null}},safeToString=function(t){try{return t.toString()}catch(e){try{return String(t)}catch(t){return null}}},reNewLine=/[\n\r\u2028\u2029]/g,toShortString=function(t){var e=safeToString(t);return null===e?"<Non-coercible to string value>":(e.length>100&&(e=e.slice(0,99)+"…"),e=e.replace(reNewLine,function(t){switch(t){case"\n":return"\\n";case"\r":return"\\r";case"\u2028":return"\\u2028";case"\u2029":return"\\u2029";default:throw new Error("Unexpected character")}}))},resolveErrorMessage=function(t,e,n){n&&n.errorMessage&&(t=coerce(n.errorMessage));var r=t.indexOf("%v"),i=r>-1?toShortString(e):null;if(n&&n.name){var o,s,a,l,u=t.indexOf("%n");if(u>-1)return r>-1?(u>r?(o=i,a=r,s=n.name,l=u):(o=n.name,a=u,s=i,l=r),t.slice(0,a)+o+t.slice(a+2,l)+s+t.slice(l+2)):t.slice(0,u)+n.name+t.slice(u+2)}return r>-1?t.slice(0,r)+i+t.slice(r+2):t},resolveException=function(t,e,n){if(n&&!is(t)){if("default"in n)return n.default;if(n.isOptional)return null}var r=new(n&&n.Error||TypeError)(resolveErrorMessage(e,t,n));throw n&&n.errorCode&&(r.code=n.errorCode),r},ensure=function(t){if(is(t))return t;var e=arguments[1],n=e&&e.name?"Expected a value for %n, received %v":"Cannot use %v";return resolveException(t,n,e)},ensure$1=function(t){if(is$4(t))return t;var e=arguments[1],n=e&&e.name?"Expected a plain function for %n, received %v":"%v is not a plain function";return resolveException(t,n,e)},isImplemented$9=function(){var t,e,n=Array.from;return"function"==typeof n&&(e=n(t=["raz","dwa"]),Boolean(e&&e!==t&&"dwa"===e[1]))},objToString$2=Object.prototype.toString,isFunctionStringTag=RegExp.prototype.test.bind(/^[object [A-Za-z0-9]*Function]$/),isFunction=function(t){return"function"==typeof t&&isFunctionStringTag(objToString$2.call(t))},iteratorSymbol$1=es6Symbol.iterator,isArray$2=Array.isArray,call=Function.prototype.call,desc={configurable:!0,enumerable:!0,writable:!0,value:null},defineProperty$e=Object.defineProperty,shim$7=function(t){var e,n,r,i,o,s,a,l,u,c,h=arguments[1],f=arguments[2];if(t=Object(validValue(t)),isValue(h)&&validCallable(h),this&&this!==Array&&isFunction(this))e=this;else{if(!h){if(isArguments(t))return 1!==(o=t.length)?Array.apply(null,t):((i=new Array(1))[0]=t[0],i);if(isArray$2(t)){for(i=new Array(o=t.length),n=0;n<o;++n)i[n]=t[n];return i}}i=[]}if(!isArray$2(t))if(void 0!==(u=t[iteratorSymbol$1])){for(a=validCallable(u).call(t),e&&(i=new e),l=a.next(),n=0;!l.done;)c=h?call.call(h,f,l.value,n):l.value,e?(desc.value=c,defineProperty$e(i,n,desc)):i[n]=c,l=a.next(),++n;o=n}else if(isString(t)){for(o=t.length,e&&(i=new e),n=0,r=0;n<o;++n)c=t[n],n+1<o&&(s=c.charCodeAt(0))>=55296&&s<=56319&&(c+=t[++n]),c=h?call.call(h,f,c,r):c,e?(desc.value=c,defineProperty$e(i,r,desc)):i[r]=c,++r;o=r}if(void 0===o)for(o=toPosInteger(t.length),e&&(i=new e(o)),n=0;n<o;++n)c=h?call.call(h,f,t[n],n):t[n],e?(desc.value=c,defineProperty$e(i,n,desc)):i[n]=c;return e&&(desc.value=null,i.length=o),i},from_1=isImplemented$9()?Array.from:shim$7,copy=function(t){var e=Object(validValue(t)),n=arguments[1],r=Object(arguments[2]);if(e!==t&&!n)return e;var i={};return n?from_1(n,function(e){(r.ensure||e in t)&&(i[e]=t[e])}):assign(i,t),i},bind$1=Function.prototype.bind,call$1=Function.prototype.call,keys$4=Object.keys,objPropertyIsEnumerable=Object.prototype.propertyIsEnumerable,_iterate=function(t,e){return function(n,r){var i,o=arguments[2],s=arguments[3];return n=Object(validValue(n)),validCallable(r),i=keys$4(n),s&&i.sort("function"==typeof s?bind$1.call(s,n):void 0),"function"!=typeof t&&(t=i[t]),call$1.call(t,i,function(t,i){return objPropertyIsEnumerable.call(n,t)?call$1.call(r,o,n[t],t,n,i):e})}},forEach$1=_iterate("forEach"),call$2=Function.prototype.call,map$1=function(t,e){var n={},r=arguments[2];return validCallable(e),forEach$1(t,function(t,i,o,s){n[i]=call$2.call(e,r,t,i,o,s)}),n},bind$2=Function.prototype.bind,defineProperty$f=Object.defineProperty,hasOwnProperty$2=Object.prototype.hasOwnProperty;define=function(t,e,n){var r,i=ensure(e)&&ensure$1(e.value);return delete(r=copy(e)).writable,delete r.value,r.get=function(){return!n.overwriteDefinition&&hasOwnProperty$2.call(this,t)?i:(e.value=bind$2.call(i,n.resolveContext?n.resolveContext(this):this),defineProperty$f(this,t,e),this[t])},r};var Iterator,autoBind=function(t){var e=normalizeOptions(arguments[1]);return is(e.resolveContext)&&ensure$1(e.resolveContext),map$1(t,function(t,n){return define(n,t,e)})},defineProperty$g=Object.defineProperty,defineProperties$1=Object.defineProperties,es6Iterator=Iterator=function(t,e){if(!(this instanceof Iterator))throw new TypeError("Constructor requires 'new'");defineProperties$1(this,{__list__:d_1("w",validValue(t)),__context__:d_1("w",e),__nextIndex__:d_1("w",0)}),e&&(validCallable(e.on),e.on("_add",this._onAdd),e.on("_delete",this._onDelete),e.on("_clear",this._onClear))};delete Iterator.prototype.constructor,defineProperties$1(Iterator.prototype,assign({_next:d_1(function(){var t;if(this.__list__)return this.__redo__&&void 0!==(t=this.__redo__.shift())?t:this.__nextIndex__<this.__list__.length?this.__nextIndex__++:void this._unBind()}),next:d_1(function(){return this._createResult(this._next())}),_createResult:d_1(function(t){return void 0===t?{done:!0,value:void 0}:{done:!1,value:this._resolve(t)}}),_resolve:d_1(function(t){return this.__list__[t]}),_unBind:d_1(function(){this.__list__=null,delete this.__redo__,this.__context__&&(this.__context__.off("_add",this._onAdd),this.__context__.off("_delete",this._onDelete),this.__context__.off("_clear",this._onClear),this.__context__=null)}),toString:d_1(function(){return"[object "+(this[es6Symbol.toStringTag]||"Object")+"]"})},autoBind({_onAdd:d_1(function(t){t>=this.__nextIndex__||(++this.__nextIndex__,this.__redo__?(this.__redo__.forEach(function(e,n){e>=t&&(this.__redo__[n]=++e)},this),this.__redo__.push(t)):defineProperty$g(this,"__redo__",d_1("c",[t])))}),_onDelete:d_1(function(t){var e;t>=this.__nextIndex__||(--this.__nextIndex__,this.__redo__&&(-1!==(e=this.__redo__.indexOf(t))&&this.__redo__.splice(e,1),this.__redo__.forEach(function(e,n){e>t&&(this.__redo__[n]=--e)},this)))}),_onClear:d_1(function(){this.__redo__&&clear$1.call(this.__redo__),this.__nextIndex__=0})}))),defineProperty$g(Iterator.prototype,es6Symbol.iterator,d_1(function(){return this}));var SetPoly,getValues,NativeSet,array=createCommonjsModule(function(t){var e,n=Object.defineProperty;e=t.exports=function(t,r){if(!(this instanceof e))throw new TypeError("Constructor requires 'new'");es6Iterator.call(this,t),r=r?contains.call(r,"key+value")?"key+value":contains.call(r,"key")?"key":"value":"value",n(this,"__kind__",d_1("",r))},setPrototypeOf&&setPrototypeOf(e,es6Iterator),delete e.prototype.constructor,e.prototype=Object.create(es6Iterator.prototype,{_resolve:d_1(function(t){return"value"===this.__kind__?this.__list__[t]:"key+value"===this.__kind__?[t,this.__list__[t]]:t})}),n(e.prototype,es6Symbol.toStringTag,d_1("c","Array Iterator"))}),string=createCommonjsModule(function(t){var e,n=Object.defineProperty;e=t.exports=function(t){if(!(this instanceof e))throw new TypeError("Constructor requires 'new'");t=String(t),es6Iterator.call(this,t),n(this,"__length__",d_1("",t.length))},setPrototypeOf&&setPrototypeOf(e,es6Iterator),delete e.prototype.constructor,e.prototype=Object.create(es6Iterator.prototype,{_next:d_1(function(){if(this.__list__)return this.__nextIndex__<this.__length__?this.__nextIndex__++:void this._unBind()}),_resolve:d_1(function(t){var e,n=this.__list__[t];return this.__nextIndex__===this.__length__?n:(e=n.charCodeAt(0))>=55296&&e<=56319?n+this.__list__[this.__nextIndex__++]:n})}),n(e.prototype,es6Symbol.toStringTag,d_1("c","String Iterator"))}),iteratorSymbol$2=es6Symbol.iterator,get$2=function(t){return"function"==typeof validIterable(t)[iteratorSymbol$2]?t[iteratorSymbol$2]():isArguments(t)?new array(t):isString(t)?new string(t):new array(t)},isArray$3=Array.isArray,call$3=Function.prototype.call,some=Array.prototype.some,forOf=function(t,e){var n,r,i,o,s,a,l,u,c=arguments[2];if(isArray$3(t)||isArguments(t)?n="array":isString(t)?n="string":t=get$2(t),validCallable(e),i=function(){o=!0},"array"!==n)if("string"!==n)for(r=t.next();!r.done;){if(call$3.call(e,c,r.value,i),o)return;r=t.next()}else for(a=t.length,s=0;s<a&&(l=t[s],s+1<a&&(u=l.charCodeAt(0))>=55296&&u<=56319&&(l+=t[++s]),call$3.call(e,c,l,i),!o);++s);else some.call(t,function(t){return call$3.call(e,c,t,i),o})},iterator=createCommonjsModule(function(t){var e,n=es6Symbol.toStringTag,r=Object.defineProperty;e=t.exports=function(t,n){return this instanceof e?(es6Iterator.call(this,t.__setData__,t),n=n&&contains.call(n,"key+value")?"key+value":"value",r(this,"__kind__",d_1("",n))):new e(t,n)},setPrototypeOf&&setPrototypeOf(e,es6Iterator),e.prototype=Object.create(es6Iterator.prototype,{constructor:d_1(e),_resolve:d_1(function(t){return"value"===this.__kind__?this.__list__[t]:[this.__list__[t],this.__list__[t]]}),toString:d_1(function(){return"[object Set Iterator]"})}),r(e.prototype,n,d_1("c","Set Iterator"))}),isNativeImplemented="undefined"!=typeof Set&&"[object Set]"===Object.prototype.toString.call(Set.prototype),iterator$1=validIterable,call$4=Function.prototype.call,defineProperty$h=Object.defineProperty,getPrototypeOf$1=Object.getPrototypeOf;isNativeImplemented&&(NativeSet=Set);var polyfill$1=SetPoly=function(){var t,e=arguments[0];if(!(this instanceof SetPoly))throw new TypeError("Constructor requires 'new'");return t=isNativeImplemented&&setPrototypeOf?setPrototypeOf(new NativeSet,getPrototypeOf$1(this)):this,is(e)&&iterator$1(e),defineProperty$h(t,"__setData__",d_1("c",[])),e?(forOf(e,function(t){-1===eIndexOf.call(this,t)&&this.push(t)},t.__setData__),t):t};isNativeImplemented&&(setPrototypeOf&&setPrototypeOf(SetPoly,NativeSet),SetPoly.prototype=Object.create(NativeSet.prototype,{constructor:d_1(SetPoly)})),eventEmitter(Object.defineProperties(SetPoly.prototype,{add:d_1(function(t){return this.has(t)?this:(this.emit("_add",this.__setData__.push(t)-1,t),this)}),clear:d_1(function(){this.__setData__.length&&(clear$1.call(this.__setData__),this.emit("_clear"))}),delete:d_1(function(t){var e=eIndexOf.call(this.__setData__,t);return-1!==e&&(this.__setData__.splice(e,1),this.emit("_delete",e,t),!0)}),entries:d_1(function(){return new iterator(this,"key+value")}),forEach:d_1(function(t){var e,n,r,i=arguments[1];for(validCallable(t),n=(e=this.values())._next();void 0!==n;)r=e._resolve(n),call$4.call(t,i,r,r,this),n=e._next()}),has:d_1(function(t){return-1!==eIndexOf.call(this.__setData__,t)}),keys:d_1(getValues=function(){return this.values()}),size:d_1.gs(function(){return this.__setData__.length}),values:d_1(function(){return new iterator(this)}),toString:d_1(function(){return"[object Set]"})})),defineProperty$h(SetPoly.prototype,es6Symbol.iterator,d_1(getValues)),defineProperty$h(SetPoly.prototype,es6Symbol.toStringTag,d_1("c","Set"));var WeakMapPoly,es6Set=isImplemented()?Set:polyfill$1,isImplemented$a=function(){var t,e;if("function"!=typeof WeakMap)return!1;try{t=new WeakMap([[e={},"one"],[{},"two"],[{},"three"]])}catch(t){return!1}return"[object WeakMap]"===String(t)&&("function"==typeof t.set&&(t.set({},1)===t&&("function"==typeof t.delete&&("function"==typeof t.has&&"one"===t.get(e)))))},validObject=function(t){if(!isObject$1(t))throw new TypeError(t+" is not an Object");return t},generated=Object.create(null),random=Math.random,randomUniq=function(){var t;do{t=random().toString(36).slice(2)}while(generated[t]);return t},isNativeImplemented$1="function"==typeof WeakMap&&"[object WeakMap]"===Object.prototype.toString.call(new WeakMap),toStringTagSymbol=es6Symbol.toStringTag,isArray$4=Array.isArray,defineProperty$i=Object.defineProperty,objHasOwnProperty$1=Object.prototype.hasOwnProperty,getPrototypeOf$2=Object.getPrototypeOf,polyfill$2=WeakMapPoly=function(){var t,e=arguments[0];if(!(this instanceof WeakMapPoly))throw new TypeError("Constructor requires 'new'");return t=isNativeImplemented$1&&setPrototypeOf&&WeakMap!==WeakMapPoly?setPrototypeOf(new WeakMap,getPrototypeOf$2(this)):this,isValue(e)&&(isArray$4(e)||(e=get$2(e))),defineProperty$i(t,"__weakMapData__",d_1("c","$weakMap$"+randomUniq())),e?(forOf(e,function(e){validValue(e),t.set(e[0],e[1])}),t):t};isNativeImplemented$1&&(setPrototypeOf&&setPrototypeOf(WeakMapPoly,WeakMap),WeakMapPoly.prototype=Object.create(WeakMap.prototype,{constructor:d_1(WeakMapPoly)})),Object.defineProperties(WeakMapPoly.prototype,{delete:d_1(function(t){return!!objHasOwnProperty$1.call(validObject(t),this.__weakMapData__)&&(delete t[this.__weakMapData__],!0)}),get:d_1(function(t){if(objHasOwnProperty$1.call(validObject(t),this.__weakMapData__))return t[this.__weakMapData__]}),has:d_1(function(t){return objHasOwnProperty$1.call(validObject(t),this.__weakMapData__)}),set:d_1(function(t,e){return defineProperty$i(validObject(t),this.__weakMapData__,d_1("c",e)),this}),toString:d_1(function(){return"[object WeakMap]"})}),defineProperty$i(WeakMapPoly.prototype,toStringTagSymbol,d_1("c","WeakMap"));var es6WeakMap=isImplemented$a()?WeakMap:polyfill$2,NONE=0,CREATE=1,EDIT=2,DELETE=4,APPEND=8,EDIT_APPEND=EDIT|APPEND,ALL=CREATE|EDIT|DELETE|APPEND,modeFor=function(t,e,n){return t[modesKey]=e,t[instanceKey].fire("mode",{mode:e}),e&CREATE?t.dragging.disable():t.dragging.enable(),Array.from(polygons.get(t)).forEach(function(t){t[edgesKey].forEach(function(t){e&EDIT?leafletSrc_2.removeClass(t._icon,"disabled"):leafletSrc_2.addClass(t._icon,"disabled")})}),classesFor(t,e),n.notifyAfterEditExit&&t[notifyDeferredKey](),t[notifyDeferredKey]=function(){},e},updateFor=function(t,e){var n=Array.from(polygons.get(t)||[]).map(function(t){var e=t.getLatLngs();return[].concat(_toConsumableArray(e[0]),[e[0][0]])});t.hasOwnProperty(instanceKey)&&t[instanceKey].fire("markers",{latLngs:n,eventType:e})},classesFor=function(t,e){var n=_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({},NONE,"mode-none"),CREATE,"mode-create"),EDIT,"mode-edit"),DELETE,"mode-delete"),APPEND,"mode-append");Object.keys(n).forEach(function(r){var i=n[r],o=e&r;leafletSrc_2.removeClass(t._container,i),o&&leafletSrc_2.addClass(t._container,i),0===e&&leafletSrc_2.addClass(t._container,n[NONE])})},ramda=createCommonjsModule(function(t,e){(function(){var e,n,r,i,o,s,a,l=function(t,e){switch(t){case 0:return function(){return e.apply(this,arguments)};case 1:return function(t){return e.apply(this,arguments)};case 2:return function(t,n){return e.apply(this,arguments)};case 3:return function(t,n,r){return e.apply(this,arguments)};case 4:return function(t,n,r,i){return e.apply(this,arguments)};case 5:return function(t,n,r,i,o){return e.apply(this,arguments)};case 6:return function(t,n,r,i,o,s){return e.apply(this,arguments)};case 7:return function(t,n,r,i,o,s,a){return e.apply(this,arguments)};case 8:return function(t,n,r,i,o,s,a,l){return e.apply(this,arguments)};case 9:return function(t,n,r,i,o,s,a,l,u){return e.apply(this,arguments)};case 10:return function(t,n,r,i,o,s,a,l,u,c){return e.apply(this,arguments)};default:throw new Error("First argument to _arity must be a non-negative integer no greater than ten")}},u=function(t){for(var e,n=[];!(e=t.next()).done;)n.push(e.value);return n},c=function(){return Array.prototype.slice.call(arguments)},h=function(t){return new RegExp(t.source,(t.global?"g":"")+(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.sticky?"y":"")+(t.unicode?"u":""))},f=function(t){return function(){return!t.apply(this,arguments)}},p=function(t,e){var n;e=e||[];var r=(t=t||[]).length,i=e.length,o=[];for(n=0;n<r;)o[o.length]=t[n],n+=1;for(n=0;n<i;)o[o.length]=e[n],n+=1;return o},d=function(t,e,n){for(var r=0,i=n.length;r<i;){if(t(e,n[r]))return!0;r+=1}return!1},y=function(t,e){for(var n=0,r=e.length,i=[];n<r;)t(e[n])&&(i[i.length]=e[n]),n+=1;return i},_=function(t,e){return Object.prototype.hasOwnProperty.call(e,t)},m=function(t){return t},g=function(){var t=Object.prototype.toString;return"[object Arguments]"===t.call(arguments)?function(e){return"[object Arguments]"===t.call(e)}:function(t){return _("callee",t)}}(),v=Array.isArray||function(t){return null!=t&&t.length>=0&&"[object Array]"===Object.prototype.toString.call(t)},P=function(t){return"[object Function]"===Object.prototype.toString.call(t)},b=Number.isInteger||function(t){return t<<0===t},S=function(t){return"[object Number]"===Object.prototype.toString.call(t)},E=function(t){return"[object Object]"===Object.prototype.toString.call(t)},x=function(t){return null!=t&&"object"==typeof t&&!0===t["@@functional/placeholder"]},I=function(t){return"[object String]"===Object.prototype.toString.call(t)},T=function(t){return"function"==typeof t["@@transducer/step"]},O=function(t,e){for(var n=0,r=e.length,i=Array(r);n<r;)i[n]=t(e[n]),n+=1;return i},w=function(t,e){return function(){return e.call(this,t.apply(this,arguments))}},A=function(t,e){return function(){var n=this;return t.apply(n,arguments).then(function(t){return e.call(n,t)})}},C=function(t){return'"'+t.replace(/\\/g,"\\\\").replace(/[\b]/g,"\\b").replace(/\f/g,"\\f").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\t/g,"\\t").replace(/\v/g,"\\v").replace(/\0/g,"\\0").replace(/"/g,'\\"')+'"'},L=function(t){return t&&t["@@transducer/reduced"]?t:{"@@transducer/value":t,"@@transducer/reduced":!0}},R=function t(e,n,r){switch(arguments.length){case 1:return t(e,0,e.length);case 2:return t(e,n,e.length);default:for(var i=[],o=0,s=Math.max(0,Math.min(e.length,r)-n);o<s;)i[o]=e[n+o],o+=1;return i}},N=(e=function(t){return(t<10?"0":"")+t},"function"==typeof Date.prototype.toISOString?function(t){return t.toISOString()}:function(t){return t.getUTCFullYear()+"-"+e(t.getUTCMonth()+1)+"-"+e(t.getUTCDate())+"T"+e(t.getUTCHours())+":"+e(t.getUTCMinutes())+":"+e(t.getUTCSeconds())+"."+(t.getUTCMilliseconds()/1e3).toFixed(3).slice(2,5)+"Z"}),M={init:function(){return this.xf["@@transducer/init"]()},result:function(t){return this.xf["@@transducer/result"](t)}},D=function(){function t(t){this.f=t}return t.prototype["@@transducer/init"]=function(){throw new Error("init not implemented on XWrap")},t.prototype["@@transducer/result"]=function(t){return t},t.prototype["@@transducer/step"]=function(t,e){return this.f(t,e)},function(e){return new t(e)}}(),$="function"==typeof Object.assign?Object.assign:function(t){if(null==t)throw new TypeError("Cannot convert undefined or null to object");for(var e=Object(t),n=1,r=arguments.length;n<r;){var i=arguments[n];if(null!=i)for(var o in i)_(o,i)&&(e[o]=i[o]);n+=1}return e},j=function(t,e){return function(){var n=arguments.length;if(0===n)return e();var r=arguments[n-1];return v(r)||"function"!=typeof r[t]?e.apply(this,arguments):r[t].apply(r,R(arguments,0,n-1))}},B=function(t){return function e(n){return 0===arguments.length||x(n)?e:t.apply(this,arguments)}},F=function(t){return function e(n,r){switch(arguments.length){case 0:return e;case 1:return x(n)?e:B(function(e){return t(n,e)});default:return x(n)&&x(r)?e:x(n)?B(function(e){return t(e,r)}):x(r)?B(function(e){return t(n,e)}):t(n,r)}}},k=function(t){return function e(n,r,i){switch(arguments.length){case 0:return e;case 1:return x(n)?e:F(function(e,r){return t(n,e,r)});case 2:return x(n)&&x(r)?e:x(n)?F(function(e,n){return t(e,r,n)}):x(r)?F(function(e,r){return t(n,e,r)}):B(function(e){return t(n,r,e)});default:return x(n)&&x(r)&&x(i)?e:x(n)&&x(r)?F(function(e,n){return t(e,n,i)}):x(n)&&x(i)?F(function(e,n){return t(e,r,n)}):x(r)&&x(i)?F(function(e,r){return t(n,e,r)}):x(n)?B(function(e){return t(e,r,i)}):x(r)?B(function(e){return t(n,e,i)}):x(i)?B(function(e){return t(n,r,e)}):t(n,r,i)}}},Y=function t(e,n,r){return function(){for(var i=[],o=0,s=e,a=0;a<n.length||o<arguments.length;){var u;a<n.length&&(!x(n[a])||o>=arguments.length)?u=n[a]:(u=arguments[o],o+=1),i[a]=u,x(u)||(s-=1),a+=1}return s<=0?r.apply(this,i):l(s,t(e,i,r))}},z=function(t,e,n){return function(){var r=arguments.length;if(0===r)return n();var i=arguments[r-1];if(!v(i)){var o=R(arguments,0,r-1);if("function"==typeof i[t])return i[t].apply(i,o);if(T(i))return e.apply(null,o)(i)}return n.apply(this,arguments)}},X=function(){function t(t,e){this.xf=e,this.f=t,this.all=!0}return t.prototype["@@transducer/init"]=M.init,t.prototype["@@transducer/result"]=function(t){return this.all&&(t=this.xf["@@transducer/step"](t,!0)),this.xf["@@transducer/result"](t)},t.prototype["@@transducer/step"]=function(t,e){return this.f(e)||(this.all=!1,t=L(this.xf["@@transducer/step"](t,!1))),t},F(function(e,n){return new t(e,n)})}(),U=function(){function t(t,e){this.xf=e,this.f=t,this.any=!1}return t.prototype["@@transducer/init"]=M.init,t.prototype["@@transducer/result"]=function(t){return this.any||(t=this.xf["@@transducer/step"](t,!1)),this.xf["@@transducer/result"](t)},t.prototype["@@transducer/step"]=function(t,e){return this.f(e)&&(this.any=!0,t=L(this.xf["@@transducer/step"](t,!0))),t},F(function(e,n){return new t(e,n)})}(),G=function(){function t(t,e){this.xf=e,this.pos=0,this.full=!1,this.acc=new Array(t)}return t.prototype["@@transducer/init"]=M.init,t.prototype["@@transducer/result"]=function(t){return this.acc=null,this.xf["@@transducer/result"](t)},t.prototype["@@transducer/step"]=function(t,e){return this.store(e),this.full?this.xf["@@transducer/step"](t,this.getCopy()):t},t.prototype.store=function(t){this.acc[this.pos]=t,this.pos+=1,this.pos===this.acc.length&&(this.pos=0,this.full=!0)},t.prototype.getCopy=function(){return p(R(this.acc,this.pos),R(this.acc,0,this.pos))},F(function(e,n){return new t(e,n)})}(),W=function(){function t(t,e){this.xf=e,this.n=t}return t.prototype["@@transducer/init"]=M.init,t.prototype["@@transducer/result"]=M.result,t.prototype["@@transducer/step"]=function(t,e){return this.n>0?(this.n-=1,t):this.xf["@@transducer/step"](t,e)},F(function(e,n){return new t(e,n)})}(),H=function(){function t(t,e){this.xf=e,this.pos=0,this.full=!1,this.acc=new Array(t)}return t.prototype["@@transducer/init"]=M.init,t.prototype["@@transducer/result"]=function(t){return this.acc=null,this.xf["@@transducer/result"](t)},t.prototype["@@transducer/step"]=function(t,e){return this.full&&(t=this.xf["@@transducer/step"](t,this.acc[this.pos])),this.store(e),t},t.prototype.store=function(t){this.acc[this.pos]=t,this.pos+=1,this.pos===this.acc.length&&(this.pos=0,this.full=!0)},F(function(e,n){return new t(e,n)})}(),V=function(){function t(t,e){this.xf=e,this.pred=t,this.lastValue=void 0,this.seenFirstValue=!1}return t.prototype["@@transducer/init"]=function(){return this.xf["@@transducer/init"]()},t.prototype["@@transducer/result"]=function(t){return this.xf["@@transducer/result"](t)},t.prototype["@@transducer/step"]=function(t,e){var n=!1;return this.seenFirstValue?this.pred(this.lastValue,e)&&(n=!0):this.seenFirstValue=!0,this.lastValue=e,n?t:this.xf["@@transducer/step"](t,e)},F(function(e,n){return new t(e,n)})}(),Z=function(){function t(t,e){this.xf=e,this.f=t}return t.prototype["@@transducer/init"]=M.init,t.prototype["@@transducer/result"]=M.result,t.prototype["@@transducer/step"]=function(t,e){if(this.f){if(this.f(e))return t;this.f=null}return this.xf["@@transducer/step"](t,e)},F(function(e,n){return new t(e,n)})}(),q=function(){function t(t,e){this.xf=e,this.f=t}return t.prototype["@@transducer/init"]=M.init,t.prototype["@@transducer/result"]=M.result,t.prototype["@@transducer/step"]=function(t,e){return this.f(e)?this.xf["@@transducer/step"](t,e):t},F(function(e,n){return new t(e,n)})}(),K=function(){function t(t,e){this.xf=e,this.f=t,this.found=!1}return t.prototype["@@transducer/init"]=M.init,t.prototype["@@transducer/result"]=function(t){return this.found||(t=this.xf["@@transducer/step"](t,void 0)),this.xf["@@transducer/result"](t)},t.prototype["@@transducer/step"]=function(t,e){return this.f(e)&&(this.found=!0,t=L(this.xf["@@transducer/step"](t,e))),t},F(function(e,n){return new t(e,n)})}(),J=function(){function t(t,e){this.xf=e,this.f=t,this.idx=-1,this.found=!1}return t.prototype["@@transducer/init"]=M.init,t.prototype["@@transducer/result"]=function(t){return this.found||(t=this.xf["@@transducer/step"](t,-1)),this.xf["@@transducer/result"](t)},t.prototype["@@transducer/step"]=function(t,e){return this.idx+=1,this.f(e)&&(this.found=!0,t=L(this.xf["@@transducer/step"](t,this.idx))),t},F(function(e,n){return new t(e,n)})}(),Q=function(){function t(t,e){this.xf=e,this.f=t}return t.prototype["@@transducer/init"]=M.init,t.prototype["@@transducer/result"]=function(t){return this.xf["@@transducer/result"](this.xf["@@transducer/step"](t,this.last))},t.prototype["@@transducer/step"]=function(t,e){return this.f(e)&&(this.last=e),t},F(function(e,n){return new t(e,n)})}(),tt=function(){function t(t,e){this.xf=e,this.f=t,this.idx=-1,this.lastIdx=-1}return t.prototype["@@transducer/init"]=M.init,t.prototype["@@transducer/result"]=function(t){return this.xf["@@transducer/result"](this.xf["@@transducer/step"](t,this.lastIdx))},t.prototype["@@transducer/step"]=function(t,e){return this.idx+=1,this.f(e)&&(this.lastIdx=this.idx),t},F(function(e,n){return new t(e,n)})}(),et=function(){function t(t,e){this.xf=e,this.f=t}return t.prototype["@@transducer/init"]=M.init,t.prototype["@@transducer/result"]=M.result,t.prototype["@@transducer/step"]=function(t,e){return this.xf["@@transducer/step"](t,this.f(e))},F(function(e,n){return new t(e,n)})}(),nt=function(){function t(t,e,n,r){this.valueFn=t,this.valueAcc=e,this.keyFn=n,this.xf=r,this.inputs={}}return t.prototype["@@transducer/init"]=M.init,t.prototype["@@transducer/result"]=function(t){var e;for(e in this.inputs)if(_(e,this.inputs)&&(t=this.xf["@@transducer/step"](t,this.inputs[e]))["@@transducer/reduced"]){t=t["@@transducer/value"];break}return this.inputs=null,this.xf["@@transducer/result"](t)},t.prototype["@@transducer/step"]=function(t,e){var n=this.keyFn(e);return this.inputs[n]=this.inputs[n]||[n,this.valueAcc],this.inputs[n][1]=this.valueFn(this.inputs[n][1],e),t},Y(4,[],function(e,n,r,i){return new t(e,n,r,i)})}(),rt=function(){function t(t,e){this.xf=e,this.n=t,this.i=0}return t.prototype["@@transducer/init"]=M.init,t.prototype["@@transducer/result"]=M.result,t.prototype["@@transducer/step"]=function(t,e){this.i+=1;var n=0===this.n?t:this.xf["@@transducer/step"](t,e);return this.i>=this.n?L(n):n},F(function(e,n){return new t(e,n)})}(),it=function(){function t(t,e){this.xf=e,this.f=t}return t.prototype["@@transducer/init"]=M.init,t.prototype["@@transducer/result"]=M.result,t.prototype["@@transducer/step"]=function(t,e){return this.f(e)?this.xf["@@transducer/step"](t,e):L(t)},F(function(e,n){return new t(e,n)})}(),ot=F(function(t,e){return Number(t)+Number(e)}),st=k(function(t,e,n){if(e>=n.length||e<-n.length)return n;var r=(e<0?n.length:0)+e,i=p(n);return i[r]=t(n[r]),i}),at=F(z("all",X,function(t,e){for(var n=0;n<e.length;){if(!t(e[n]))return!1;n+=1}return!0})),lt=B(function(t){return function(){return t}}),ut=F(function(t,e){return t&&e}),ct=F(z("any",U,function(t,e){for(var n=0;n<e.length;){if(t(e[n]))return!0;n+=1}return!1})),ht=F(z("aperture",G,function(t,e){for(var n=0,r=e.length-(t-1),i=new Array(r>=0?r:0);n<r;)i[n]=R(e,n,n+t),n+=1;return i})),ft=F(function(t,e){return p(e,[t])}),pt=F(function(t,e){return t.apply(this,e)}),dt=k(function(t,e,n){var r={};for(var i in n)r[i]=n[i];return r[t]=e,r}),yt=k(function t(e,n,r){switch(e.length){case 0:return n;case 1:return dt(e[0],n,r);default:return dt(e[0],t(R(e,1),n,Object(r[e[0]])),r)}}),_t=F(function(t,e){return l(t.length,function(){return t.apply(e,arguments)})}),mt=k(function(t,e,n){if(t>e)throw new Error("min must not be greater than max in clamp(min, max, value)");return n<t?t:n>e?e:n}),gt=B(function(t){return function(e,n){return t(e,n)?-1:t(n,e)?1:0}}),vt=F(function(t,e){return 1===t?B(e):l(t,Y(t,[],e))}),Pt=ot(-1),bt=F(function(t,e){return null==e||e!=e?t:e}),St=k(function(t,e,n){for(var r=[],i=0,o=e.length;i<o;)d(t,e[i],n)||d(t,e[i],r)||r.push(e[i]),i+=1;return r}),Et=F(function(t,e){var n={};for(var r in e)r!==t&&(n[r]=e[r]);return n}),xt=F(function t(e,n){switch(e.length){case 0:return n;case 1:return Et(e[0],n);default:var r=e[0],i=R(e,1);return null==n[r]?n:dt(r,t(i,n[r]),n)}}),It=F(function(t,e){return t/e}),Tt=F(z("dropWhile",Z,function(t,e){for(var n=0,r=e.length;n<r&&t(e[n]);)n+=1;return R(e,n)})),Ot=B(function(t){return null!=t&&"function"==typeof t.empty?t.empty():null!=t&&null!=t.constructor&&"function"==typeof t.constructor.empty?t.constructor.empty():v(t)?[]:I(t)?"":E(t)?{}:g(t)?function(){return arguments}():void 0}),wt=F(function t(e,n){var r,i,o,s={};for(i in n)o=typeof(r=e[i]),s[i]="function"===o?r(n[i]):"object"===o?t(e[i],n[i]):n[i];return s}),At=F(z("find",K,function(t,e){for(var n=0,r=e.length;n<r;){if(t(e[n]))return e[n];n+=1}})),Ct=F(z("findIndex",J,function(t,e){for(var n=0,r=e.length;n<r;){if(t(e[n]))return n;n+=1}return-1})),Lt=F(z("findLast",Q,function(t,e){for(var n=e.length-1;n>=0;){if(t(e[n]))return e[n];n-=1}})),Rt=F(z("findLastIndex",tt,function(t,e){for(var n=e.length-1;n>=0;){if(t(e[n]))return n;n-=1}return-1})),Nt=F(j("forEach",function(t,e){for(var n=e.length,r=0;r<n;)t(e[r]),r+=1;return e})),Mt=B(function(t){for(var e={},n=0;n<t.length;)e[t[n][0]]=t[n][1],n+=1;return e}),Dt=F(function(t,e){for(var n=[],r=0,i=e.length;r<i;){for(var o=r+1;o<i&&t(e[r],e[o]);)o+=1;n.push(e.slice(r,o)),r=o}return n}),$t=F(function(t,e){return t>e}),jt=F(function(t,e){return t>=e}),Bt=F(_),Ft=F(function(t,e){return t in e}),kt=F(function(t,e){return t===e?0!==t||1/t==1/e:t!=t&&e!=e}),Yt=B(m),zt=k(function(t,e,n){return vt(Math.max(t.length,e.length,n.length),function(){return t.apply(this,arguments)?e.apply(this,arguments):n.apply(this,arguments)})}),Xt=ot(1),Ut=k(function(t,e,n){t=t<n.length&&t>=0?t:n.length;var r=R(n);return r.splice(t,0,e),r}),Gt=k(function(t,e,n){return t=t<n.length&&t>=0?t:n.length,p(p(R(n,0,t),e),R(n,t))}),Wt=F(j("intersperse",function(t,e){for(var n=[],r=0,i=e.length;r<i;)r===i-1?n.push(e[r]):n.push(e[r],t),r+=1;return n})),Ht=F(function(t,e){return null!=e&&e.constructor===t||e instanceof t}),Vt=B(function(t){return!!v(t)||!!t&&("object"==typeof t&&(!I(t)&&(1===t.nodeType?!!t.length:0===t.length||t.length>0&&(t.hasOwnProperty(0)&&t.hasOwnProperty(t.length-1)))))}),Zt=B(function(t){return null==t}),qt=function(){var t=!{toString:null}.propertyIsEnumerable("toString"),e=["constructor","valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],n=function(){return arguments.propertyIsEnumerable("length")}(),r=function(t,e){for(var n=0;n<t.length;){if(t[n]===e)return!0;n+=1}return!1};return"function"!=typeof Object.keys||n?B(function(i){if(Object(i)!==i)return[];var o,s,a=[],l=n&&g(i);for(o in i)!_(o,i)||l&&"length"===o||(a[a.length]=o);if(t)for(s=e.length-1;s>=0;)_(o=e[s],i)&&!r(a,o)&&(a[a.length]=o),s-=1;return a}):B(function(t){return Object(t)!==t?[]:Object.keys(t)})}(),Kt=B(function(t){var e,n=[];for(e in t)n[n.length]=e;return n}),Jt=B(function(t){return null!=t&&S(t.length)?t.length:NaN}),Qt=F(function(t,e){return t<e}),te=F(function(t,e){return t<=e}),ee=k(function(t,e,n){for(var r=0,i=n.length,o=[],s=[e];r<i;)s=t(s[0],n[r]),o[r]=s[1],r+=1;return[s[0],o]}),ne=k(function(t,e,n){for(var r=n.length-1,i=[],o=[e];r>=0;)o=t(o[0],n[r]),i[r]=o[1],r-=1;return[o[0],i]}),re=F(function(t,e){return e.match(t)||[]}),ie=F(function(t,e){return b(t)?!b(e)||e<1?NaN:(t%e+e)%e:NaN}),oe=F(function(t,e){return e>t?e:t}),se=k(function(t,e,n){return t(n)>t(e)?n:e}),ae=F(function(t,e){return $({},t,e)}),le=B(function(t){return $.apply(null,[{}].concat(t))}),ue=k(function(t,e,n){var r,i={};for(r in e)_(r,e)&&(i[r]=_(r,n)?t(r,e[r],n[r]):e[r]);for(r in n)_(r,n)&&!_(r,i)&&(i[r]=n[r]);return i}),ce=F(function(t,e){return e<t?e:t}),he=k(function(t,e,n){return t(n)<t(e)?n:e}),fe=F(function(t,e){return t%e}),pe=F(function(t,e){return t*e}),de=F(function(t,e){switch(t){case 0:return function(){return e.call(this)};case 1:return function(t){return e.call(this,t)};case 2:return function(t,n){return e.call(this,t,n)};case 3:return function(t,n,r){return e.call(this,t,n,r)};case 4:return function(t,n,r,i){return e.call(this,t,n,r,i)};case 5:return function(t,n,r,i,o){return e.call(this,t,n,r,i,o)};case 6:return function(t,n,r,i,o,s){return e.call(this,t,n,r,i,o,s)};case 7:return function(t,n,r,i,o,s,a){return e.call(this,t,n,r,i,o,s,a)};case 8:return function(t,n,r,i,o,s,a,l){return e.call(this,t,n,r,i,o,s,a,l)};case 9:return function(t,n,r,i,o,s,a,l,u){return e.call(this,t,n,r,i,o,s,a,l,u)};case 10:return function(t,n,r,i,o,s,a,l,u,c){return e.call(this,t,n,r,i,o,s,a,l,u,c)};default:throw new Error("First argument to nAry must be a non-negative integer no greater than ten")}}),ye=B(function(t){return-t}),_e=F(f(z("any",U,ct))),me=B(function(t){return!t}),ge=F(function(t,e){var n=t<0?e.length+t:t;return I(e)?e.charAt(n):e[n]}),ve=B(function(t){return vt(t<0?1:t+1,function(){return ge(t,arguments)})}),Pe=F(function(t,e){var n={};return n[t]=e,n}),be=B(function(t){return[t]}),Se=B(function(t){var e,n=!1;return l(t.length,function(){return n?e:(n=!0,e=t.apply(this,arguments))})}),Ee=F(function(t,e){return t||e}),xe=(n=function(t){return{value:t,map:function(e){return n(e(t))}}},k(function(t,e,r){return t(function(t){return n(e(t))})(r).value})),Ie=F(function(t,e){return[t,e]}),Te=F(function(t,e){for(var n=e,r=0;r<t.length;){if(null==n)return;n=n[t[r]],r+=1}return n}),Oe=k(function(t,e,n){return bt(t,Te(e,n))}),we=k(function(t,e,n){return e.length>0&&t(Te(e,n))}),Ae=F(function(t,e){for(var n={},r=0;r<t.length;)t[r]in e&&(n[t[r]]=e[t[r]]),r+=1;return n}),Ce=F(function(t,e){for(var n={},r=0,i=t.length;r<i;){var o=t[r];n[o]=e[o],r+=1}return n}),Le=F(function(t,e){var n={};for(var r in e)t(e[r],r,e)&&(n[r]=e[r]);return n}),Re=F(function(t,e){return p([t],e)}),Ne=F(function(t,e){return e[t]}),Me=k(function(t,e,n){return Ht(t,n[e])}),De=k(function(t,e,n){return null!=n&&_(e,n)?n[e]:t}),$e=k(function(t,e,n){return t(n[e])}),je=F(function(t,e){for(var n=t.length,r=[],i=0;i<n;)r[i]=e[t[i]],i+=1;return r}),Be=F(function(t,e){if(!S(t)||!S(e))throw new TypeError("Both arguments to range must be numbers");for(var n=[],r=t;r<e;)n.push(r),r+=1;return n}),Fe=k(function(t,e,n){for(var r=n.length-1;r>=0;)e=t(e,n[r]),r-=1;return e}),ke=B(L),Ye=k(function(t,e,n){return p(R(n,0,Math.min(t,n.length)),R(n,Math.min(n.length,t+e)))}),ze=k(function(t,e,n){return n.replace(t,e)}),Xe=B(function(t){return I(t)?t.split("").reverse().join(""):R(t).reverse()}),Ue=k(function(t,e,n){for(var r=0,i=n.length,o=[e];r<i;)e=t(e,n[r]),o[r+1]=e,r+=1;return o}),Ge=k(function(t,e,n){return xe(t,lt(e),n)}),We=k(j("slice",function(t,e,n){return Array.prototype.slice.call(n,t,e)})),He=F(function(t,e){return R(e).sort(t)}),Ve=F(function(t,e){return R(e).sort(function(e,n){var r=t(e),i=t(n);return r<i?-1:r>i?1:0})}),Ze=F(function(t,e){return[We(0,t,e),We(t,Jt(e),e)]}),qe=F(function(t,e){if(t<=0)throw new Error("First argument to splitEvery must be a positive integer");for(var n=[],r=0;r<e.length;)n.push(We(r,r+=t,e));return n}),Ke=F(function(t,e){for(var n=0,r=e.length,i=[];n<r&&!t(e[n]);)i.push(e[n]),n+=1;return[i,R(e,n)]}),Je=F(function(t,e){return Number(t)-Number(e)}),Qe=j("tail",We(1,1/0)),tn=F(z("take",rt,function(t,e){return We(0,t<0?1/0:t,e)})),en=F(function(t,e){for(var n=e.length-1;n>=0&&t(e[n]);)n-=1;return R(e,n+1,1/0)}),nn=F(z("takeWhile",it,function(t,e){for(var n=0,r=e.length;n<r&&t(e[n]);)n+=1;return R(e,0,n)})),rn=F(function(t,e){return t(e),e}),on=F(function(t,e){var n,r=Number(e),i=0;if(r<0||isNaN(r))throw new RangeError("n must be a non-negative number");for(n=new Array(r);i<r;)n[i]=t(i),i+=1;return n}),sn=B(function(t){var e=[];for(var n in t)_(n,t)&&(e[e.length]=[n,t[n]]);return e}),an=B(function(t){var e=[];for(var n in t)e[e.length]=[n,t[n]];return e}),ln=B(function(t){for(var e=0,n=[];e<t.length;){for(var r=t[e],i=0;i<r.length;)void 0===n[i]&&(n[i]=[]),n[i].push(r[i]),i+=1;e+=1}return n}),un=(r="\t\n\v\f\r \u2028\u2029\ufeff","function"==typeof String.prototype.trim&&!r.trim()&&"".trim()?B(function(t){return t.trim()}):B(function(t){var e=new RegExp("^["+r+"]["+r+"]*"),n=new RegExp("["+r+"]["+r+"]*$");return t.replace(e,"").replace(n,"")})),cn=F(function(t,e){return l(t.length,function(){try{return t.apply(this,arguments)}catch(t){return e.apply(this,p([t],arguments))}})}),hn=B(function(t){return null===t?"Null":void 0===t?"Undefined":Object.prototype.toString.call(t).slice(8,-1)}),fn=B(function(t){return function(){return t(R(arguments))}}),pn=B(function(t){return de(1,t)}),dn=F(function(t,e){return vt(t,function(){for(var n,r=1,i=e,o=0;r<=t&&"function"==typeof i;)n=r===t?arguments.length:o+i.length,i=i.apply(this,R(arguments,o,n)),r+=1,o=n;return i})}),yn=F(function(t,e){for(var n=t(e),r=[];n&&n.length;)r[r.length]=n[0],n=t(n[1]);return r}),_n=F(function(t,e){for(var n,r=0,i=e.length,o=[];r<i;)n=e[r],d(t,n,o)||(o[o.length]=n),r+=1;return o}),mn=k(function(t,e,n){return t(n)?n:e(n)}),gn=k(function(t,e,n){for(var r=n;!t(r);)r=e(r);return r}),vn=k(function(t,e,n){return st(lt(e),t,n)}),Pn=F(function(t,e){return vt(e.length,function(){for(var n=[],r=0;r<e.length;)n.push(e[r].call(this,arguments[r])),r+=1;return t.apply(this,n.concat(R(arguments,e.length)))})}),bn=B(function(t){for(var e=qt(t),n=e.length,r=[],i=0;i<n;)r[i]=t[e[i]],i+=1;return r}),Sn=B(function(t){var e,n=[];for(e in t)n[n.length]=t[e];return n}),En=(i=function(t){return{value:t,map:function(){return this}}},F(function(t,e){return t(i)(e).value})),xn=k(function(t,e,n){return t(n)?e(n):n}),In=F(function(t,e){for(var n in t)if(_(n,t)&&!t[n](e[n]))return!1;return!0}),Tn=F(function(t,e){return vt(t.length,function(){return e.apply(this,p([t],arguments))})}),On=F(function(t,e){for(var n,r=0,i=t.length,o=e.length,s=[];r<i;){for(n=0;n<o;)s[s.length]=[t[r],e[n]],n+=1;r+=1}return s}),wn=F(function(t,e){for(var n=[],r=0,i=Math.min(t.length,e.length);r<i;)n[r]=[t[r],e[r]],r+=1;return n}),An=F(function(t,e){for(var n=0,r=Math.min(t.length,e.length),i={};n<r;)i[t[n]]=e[n],n+=1;return i}),Cn=k(function(t,e,n){for(var r=[],i=0,o=Math.min(e.length,n.length);i<o;)r[i]=t(e[i],n[i]),i+=1;return r}),Ln=lt(!1),Rn=lt(!0),Nn=function t(e,n,r,i){var o=function(o){for(var s=n.length,a=0;a<s;){if(e===n[a])return r[a];a+=1}for(var l in n[a+1]=e,r[a+1]=o,e)o[l]=i?t(e[l],n,r,!0):e[l];return o};switch(hn(e)){case"Object":return o({});case"Array":return o([]);case"Date":return new Date(e.valueOf());case"RegExp":return h(e);default:return e}},Mn=function(t){return F(function(e,n){return l(Math.max(0,e.length-n.length),function(){return e.apply(this,t(n,arguments))})})},Dn=function t(e,n,r,i){if(kt(e,n))return!0;if(hn(e)!==hn(n))return!1;if(null==e||null==n)return!1;if("function"==typeof e.equals||"function"==typeof n.equals)return"function"==typeof e.equals&&e.equals(n)&&"function"==typeof n.equals&&n.equals(e);switch(hn(e)){case"Arguments":case"Array":case"Object":if("function"==typeof e.constructor&&"Promise"===(o=e.constructor,null==(s=String(o).match(/^function (\w*)/))?"":s[1]))return e===n;break;case"Boolean":case"Number":case"String":if(typeof e!=typeof n||!kt(e.valueOf(),n.valueOf()))return!1;break;case"Date":if(!kt(e.valueOf(),n.valueOf()))return!1;break;case"Error":return e.name===n.name&&e.message===n.message;case"RegExp":if(e.source!==n.source||e.global!==n.global||e.ignoreCase!==n.ignoreCase||e.multiline!==n.multiline||e.sticky!==n.sticky||e.unicode!==n.unicode)return!1;break;case"Map":case"Set":if(!t(u(e.entries()),u(n.entries()),r,i))return!1;break;case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"ArrayBuffer":break;default:return!1}var o,s,a=qt(e);if(a.length!==qt(n).length)return!1;for(var l=r.length-1;l>=0;){if(r[l]===e)return i[l]===n;l-=1}for(r.push(e),i.push(n),l=a.length-1;l>=0;){var c=a[l];if(!_(c,n)||!t(n[c],e[c],r,i))return!1;l-=1}return r.pop(),i.pop(),!0},$n=function(t){return function e(n){for(var r,i,o,s=[],a=0,l=n.length;a<l;){if(Vt(n[a]))for(o=0,i=(r=t?e(n[a]):n[a]).length;o<i;)s[s.length]=r[o],o+=1;else s[s.length]=n[a];a+=1}return s}},jn=function(){function t(t,e,n){for(var r=n.next();!r.done;){if((e=t["@@transducer/step"](e,r.value))&&e["@@transducer/reduced"]){e=e["@@transducer/value"];break}r=n.next()}return t["@@transducer/result"](e)}var e="undefined"!=typeof Symbol?Symbol.iterator:"@@iterator";return function(n,r,i){if("function"==typeof n&&(n=D(n)),Vt(i))return function(t,e,n){for(var r=0,i=n.length;r<i;){if((e=t["@@transducer/step"](e,n[r]))&&e["@@transducer/reduced"]){e=e["@@transducer/value"];break}r+=1}return t["@@transducer/result"](e)}(n,r,i);if("function"==typeof i.reduce)return function(t,e,n){return t["@@transducer/result"](n.reduce(_t(t["@@transducer/step"],t),e))}(n,r,i);if(null!=i[e])return t(n,r,i[e]());if("function"==typeof i.next)return t(n,r,i);throw new TypeError("reduce: list must be array or iterable")}}(),Bn=(o={"@@transducer/init":Array,"@@transducer/step":function(t,e){return t.push(e),t},"@@transducer/result":m},s={"@@transducer/init":String,"@@transducer/step":function(t,e){return t+e},"@@transducer/result":m},a={"@@transducer/init":Object,"@@transducer/step":function(t,e){return $(t,Vt(e)?Pe(e[0],e[1]):e)},"@@transducer/result":m},function(t){if(T(t))return t;if(Vt(t))return o;if("string"==typeof t)return s;if("object"==typeof t)return a;throw new Error("Cannot create transformer for "+t)}),Fn=function(){function t(t,e){this.f=t,this.retained=[],this.xf=e}return t.prototype["@@transducer/init"]=M.init,t.prototype["@@transducer/result"]=function(t){return this.retained=null,this.xf["@@transducer/result"](t)},t.prototype["@@transducer/step"]=function(t,e){return this.f(e)?this.retain(t,e):this.flush(t,e)},t.prototype.flush=function(t,e){return t=jn(this.xf["@@transducer/step"],t,this.retained),this.retained=[],this.xf["@@transducer/step"](t,e)},t.prototype.retain=function(t,e){return this.retained.push(e),t},F(function(e,n){return new t(e,n)})}(),kn=B(function(t){return vt(t.length,function(){var e=0,n=arguments[0],r=arguments[arguments.length-1],i=R(arguments);return i[0]=function(){var t=n.apply(this,p(arguments,[e,r]));return e+=1,t},t.apply(this,i)})}),Yn=B(function(t){return de(2,t)}),zn=B(function(t){return null!=t&&"function"==typeof t.clone?t.clone():Nn(t,[],[],!0)}),Xn=B(function(t){return vt(t.length,t)}),Un=F(z("drop",W,function(t,e){return We(Math.max(0,t),1/0,e)})),Gn=F(z("dropLast",H,function(t,e){return tn(t<e.length?e.length-t:0,e)})),Wn=F(z("dropLastWhile",Fn,function(t,e){for(var n=e.length-1;n>=0&&t(e[n]);)n-=1;return R(e,0,n+1)})),Hn=F(function(t,e){return Dn(t,e,[],[])}),Vn=F(z("filter",q,function(t,e){return E(e)?jn(function(n,r){return t(e[r])&&(n[r]=e[r]),n},{},qt(e)):y(t,e)})),Zn=B($n(!0)),qn=B(function(t){return Xn(function(e,n){var r=R(arguments);return r[0]=n,r[1]=e,t.apply(this,r)})}),Kn=ge(0),Jn=We(0,-1),Qn=k(function(t,e,n){var r,i;e.length>n.length?(r=e,i=n):(r=n,i=e);for(var o=[],s=0;s<i.length;)d(t,i[s],r)&&(o[o.length]=i[s]),s+=1;return _n(t,o)}),tr=k(function(t,e,n){return T(t)?jn(e(t),t["@@transducer/init"](),n):jn(e(Bn(t)),Nn(t,[],[],!1),n)}),er=B(function(t){for(var e=qt(t),n=e.length,r=0,i={};r<n;){var o=e[r],s=t[o],a=_(s,i)?i[s]:i[s]=[];a[a.length]=o,r+=1}return i}),nr=B(function(t){for(var e=qt(t),n=e.length,r=0,i={};r<n;){var o=e[r];i[t[o]]=o,r+=1}return i}),rr=B(function(t){return null!=t&&Hn(t,Ot(t))}),ir=ge(-1),or=F(function(t,e){if("function"!=typeof e.lastIndexOf||v(e)){for(var n=e.length-1;n>=0;){if(Hn(e[n],t))return n;n-=1}return-1}return e.lastIndexOf(t)}),sr=F(z("map",et,function(t,e){switch(Object.prototype.toString.call(e)){case"[object Function]":return vt(e.length,function(){return t.call(this,e.apply(this,arguments))});case"[object Object]":return jn(function(n,r){return n[r]=t(e[r]),n},{},qt(e));default:return O(t,e)}})),ar=F(function(t,e){return jn(function(n,r){return n[r]=t(e[r],r,e),n},{},qt(e))}),lr=k(function(t,e,n){return ue(function(e,n,r){return t(n,r)},e,n)}),ur=Mn(p),cr=Mn(qn(p)),hr=k(function(t,e,n){return Hn(Te(t,n),e)}),fr=F(function(t,e){return sr(Ne(t),e)}),pr=Pn(O,[Ce,Yt]),dr=k(function(t,e,n){return Hn(e,n[t])}),yr=k(jn),_r=Y(4,[],z("reduceBy",nt,function(t,e,n,r){return jn(function(r,i){var o=n(i);return r[o]=t(_(o,r)?r[o]:e,i),r},{},r)})),mr=Y(4,[],function(t,e,n,r){return jn(function(n,r){return t(n,r)?e(n,r):L(n)},n,r)}),gr=F(function(t,e){return Vn(f(t),e)}),vr=F(function(t,e){return on(lt(t),e)}),Pr=yr(ot,0),br=F(function(t,e){return Un(t>=0?e.length-t:0,e)}),Sr=vt(4,function(t,e,n,r){return jn(t("function"==typeof e?D(e):e),n,r)}),Er=k(function(t,e,n){return _n(t,p(e,n))}),xr=F(function(t,e){return In(sr(Hn,t),e)}),Ir=function(t){var e=function(t){return{"@@transducer/init":M.init,"@@transducer/result":function(e){return t["@@transducer/result"](e)},"@@transducer/step":function(e,n){var r=t["@@transducer/step"](e,n);return r["@@transducer/reduced"]?{"@@transducer/value":r,"@@transducer/reduced":!0}:r}}}(t);return{"@@transducer/init":M.init,"@@transducer/result":function(t){return e["@@transducer/result"](t)},"@@transducer/step":function(t,n){return Vt(n)?jn(e,t,n):jn(e,t,[n])}}},Tr=function(t,e,n){var r,i;if("function"==typeof t.indexOf)switch(typeof e){case"number":if(0===e){for(r=1/e;n<t.length;){if(0===(i=t[n])&&1/i===r)return n;n+=1}return-1}if(e!=e){for(;n<t.length;){if("number"==typeof(i=t[n])&&i!=i)return n;n+=1}return-1}return t.indexOf(e,n);case"string":case"boolean":case"function":case"undefined":return t.indexOf(e,n);case"object":if(null===e)return t.indexOf(e,n)}for(;n<t.length;){if(Hn(t[n],e))return n;n+=1}return-1},Or=F(function(t,e){return sr(t,Ir(e))}),wr=B(function(t){return vt(yr(oe,0,fr("length",t)),function(){for(var e=0,n=t.length;e<n;){if(!t[e].apply(this,arguments))return!1;e+=1}return!0})}),Ar=B(function(t){return vt(yr(oe,0,fr("length",t)),function(){for(var e=0,n=t.length;e<n;){if(t[e].apply(this,arguments))return!0;e+=1}return!1})}),Cr=F(function(t,e){return"function"==typeof t.ap?t.ap(e):"function"==typeof t?function(n){return t(n)(e(n))}:jn(function(t,n){return p(t,sr(n,e))},[],t)}),Lr=B(function t(e){return e=sr(function(e){return"function"==typeof e?e:t(e)},e),vt(yr(oe,0,fr("length",bn(e))),function(){var t=arguments;return sr(function(e){return pt(e,t)},e)})}),Rr=Xn(function(t){return t.apply(this,R(arguments,1))}),Nr=F(z("chain",Or,function(t,e){return"function"==typeof e?function(){return e.call(this,t.apply(this,arguments)).apply(this,arguments)}:$n(!1)(sr(t,e))})),Mr=B(function(t){var e=yr(oe,0,sr(function(t){return t[0].length},t));return l(e,function(){for(var e=0;e<t.length;){if(t[e][0].apply(this,arguments))return t[e][1].apply(this,arguments);e+=1}})}),Dr=F(function(t,e){if(t>10)throw new Error("Constructor with greater than ten arguments");return 0===t?function(){return new e}:Xn(de(t,function(t,n,r,i,o,s,a,l,u,c){switch(arguments.length){case 1:return new e(t);case 2:return new e(t,n);case 3:return new e(t,n,r);case 4:return new e(t,n,r,i);case 5:return new e(t,n,r,i,o);case 6:return new e(t,n,r,i,o,s);case 7:return new e(t,n,r,i,o,s,a);case 8:return new e(t,n,r,i,o,s,a,l);case 9:return new e(t,n,r,i,o,s,a,l,u);case 10:return new e(t,n,r,i,o,s,a,l,u,c)}}))}),$r=F(function(t,e){return vt(yr(oe,0,fr("length",e)),function(){var n=arguments,r=this;return t.apply(r,O(function(t){return t.apply(r,n)},e))})}),jr=_r(function(t,e){return t+1},0),Br=F(z("dropRepeatsWith",V,function(t,e){var n=[],r=1,i=e.length;if(0!==i)for(n[0]=e[0];r<i;)t(ir(n),e[r])||(n[n.length]=e[r]),r+=1;return n})),Fr=k(function(t,e,n){return Hn(t(e),t(n))}),kr=k(function(t,e,n){return Hn(e[t],n[t])}),Yr=F(j("groupBy",_r(function(t,e){return null==t&&(t=[]),t.push(e),t},null))),zr=_r(function(t,e){return e},null),Xr=F(function(t,e){return"function"!=typeof e.indexOf||v(e)?Tr(e,t,0):e.indexOf(t)}),Ur=B(function(t){return $r(c,t)}),Gr=F(function(t,e){return function(n){return function(r){return sr(function(t){return e(t,r)},n(t(r)))}}}),Wr=B(function(t){return Gr(ge(t),vn(t))}),Hr=B(function(t){return Gr(Te(t),yt(t))}),Vr=B(function(t){return Gr(Ne(t),dt(t))}),Zr=F(function(t,e){var n=vt(t,e);return vt(t,function(){return jn(Cr,sr(n,arguments[0]),R(arguments,1))})}),qr=B(function(t){return Pr(t)/t.length}),Kr=B(function(t){var e=t.length;if(0===e)return NaN;var n=2-e%2,r=(e-n)/2;return qr(R(t).sort(function(t,e){return t<e?-1:t>e?1:0}).slice(r,r+n))}),Jr=Ur([Vn,gr]),Qr=function(){if(0===arguments.length)throw new Error("pipe requires at least one argument");return l(arguments[0].length,yr(w,arguments[0],Qe(arguments)))},ti=function(){if(0===arguments.length)throw new Error("pipeP requires at least one argument");return l(arguments[0].length,yr(A,arguments[0],Qe(arguments)))},ei=yr(pe,1),ni=F(function(t,e){return"function"==typeof e.sequence?e.sequence(t):Fe(function(t,e){return Cr(sr(Re,e),t)},t([]),e)}),ri=k(function(t,e,n){return ni(t,sr(e,n))}),ii=Nr(m),oi=function(t,e){return Tr(e,t,0)>=0},si=function(){if(0===arguments.length)throw new Error("compose requires at least one argument");return Qr.apply(this,Xe(arguments))},ai=function(){return si.apply(this,Re(Yt,sr(Nr,arguments)))},li=B(function(t){return Dr(t.length,t)}),ui=F(oi),ci=F(function(t,e){for(var n=[],r=0,i=t.length;r<i;)oi(t[r],e)||oi(t[r],n)||(n[n.length]=t[r]),r+=1;return n}),hi=B(z("dropRepeats",V(Hn),Br(Hn))),fi=B(function(t){return Zr(t.length,t)}),pi=F(function(t,e){var n={};for(var r in e)oi(r,t)||(n[r]=e[r]);return n}),di=B(function(t){return function t(e,n){var r=function(r){var i=n.concat([e]);return oi(r,i)?"<Circular>":t(r,i)},i=function(t,e){return O(function(e){return C(e)+": "+r(t[e])},e.slice().sort())};switch(Object.prototype.toString.call(e)){case"[object Arguments]":return"(function() { return arguments; }("+O(r,e).join(", ")+"))";case"[object Array]":return"["+O(r,e).concat(i(e,gr(function(t){return/^\d+$/.test(t)},qt(e)))).join(", ")+"]";case"[object Boolean]":return"object"==typeof e?"new Boolean("+r(e.valueOf())+")":e.toString();case"[object Date]":return"new Date("+(isNaN(e.valueOf())?r(NaN):C(N(e)))+")";case"[object Null]":return"null";case"[object Number]":return"object"==typeof e?"new Number("+r(e.valueOf())+")":1/e==-1/0?"-0":e.toString(10);case"[object String]":return"object"==typeof e?"new String("+r(e.valueOf())+")":C(e);case"[object Undefined]":return"undefined";default:if("function"==typeof e.toString){var o=e.toString();if("[object Object]"!==o)return o}return"{"+i(e,qt(e)).join(", ")+"}"}}(t,[])}),yi=F(function(t,e){return gr(qn(oi)(t),e)}),_i=function(){function t(){this._nativeSet="function"==typeof Set?new Set:null,this._items={}}function e(t,e,n){var r,i=typeof t;switch(i){case"string":case"number":return 0===t&&1/t==-1/0?!!n._items["-0"]||(e&&(n._items["-0"]=!0),!1):null!==n._nativeSet?e?(r=n._nativeSet.size,n._nativeSet.add(t),n._nativeSet.size===r):n._nativeSet.has(t):i in n._items?t in n._items[i]||(e&&(n._items[i][t]=!0),!1):(e&&(n._items[i]={},n._items[i][t]=!0),!1);case"boolean":if(i in n._items){var o=t?1:0;return!!n._items[i][o]||(e&&(n._items[i][o]=!0),!1)}return e&&(n._items[i]=t?[!1,!0]:[!0,!1]),!1;case"function":return null!==n._nativeSet?e?(r=n._nativeSet.size,n._nativeSet.add(t),n._nativeSet.size>r):n._nativeSet.has(t):i in n._items?!!oi(t,n._items[i])||(e&&n._items[i].push(t),!1):(e&&(n._items[i]=[t]),!1);case"undefined":return!!n._items[i]||(e&&(n._items[i]=!0),!1);case"object":if(null===t)return!!n._items.null||(e&&(n._items.null=!0),!1);default:return(i=Object.prototype.toString.call(t))in n._items?!!oi(t,n._items[i])||(e&&n._items[i].push(t),!1):(e&&(n._items[i]=[t]),!1)}}return t.prototype.add=function(t){return!e(t,!0,this)},t.prototype.has=function(t){return e(t,!1,this)},t}(),mi=F(function(t,e){return P(t)?function(){return t.apply(this,arguments)&&e.apply(this,arguments)}:fi(ut)(t,e)}),gi=fi(me),vi=F(function(t,e){if(null==t||!P(t.concat))throw new TypeError(di(t)+' does not have a method named "concat"');if(v(t)&&!v(e))throw new TypeError(di(e)+" is not an array");return t.concat(e)}),Pi=F(function(t,e){return P(t)?function(){return t.apply(this,arguments)||e.apply(this,arguments)}:fi(Ee)(t,e)}),bi=F(function(t,e){return vt(t+1,function(){var n=arguments[t];if(null!=n&&P(n[e]))return n[e].apply(n,R(arguments,0,t));throw new TypeError(di(n)+' does not have a method named "'+e+'"')})}),Si=bi(1,"join"),Ei=B(function(t){var e={};return l(t.length,function(){var n=di(arguments);return _(n,e)||(e[n]=t.apply(this,arguments)),e[n]})}),xi=bi(1,"split"),Ii=F(function(t,e){return vi(ci(t,e),ci(e,t))}),Ti=k(function(t,e,n){return vi(St(t,e,n),St(t,n,e))}),Oi=F(function(t,e){if(n=t,"[object RegExp]"!==Object.prototype.toString.call(n))throw new TypeError("‘test’ requires a value of type RegExp as its first argument; received "+di(t));var n;return h(t).test(e)}),wi=bi(0,"toLowerCase"),Ai=bi(0,"toUpperCase"),Ci=F(function(t,e){for(var n,r,i=new _i,o=[],s=0;s<e.length;)n=t(r=e[s]),i.add(n)&&o.push(r),s+=1;return o}),Li=Ci(Yt),Ri=F(function(t,e){var n,r;return t.length>e.length?(n=t,r=e):(n=e,r=t),Li(y(qn(oi)(n),r))}),Ni=F(si(Li,p)),Mi={F:Ln,T:Rn,__:{"@@functional/placeholder":!0},add:ot,addIndex:kn,adjust:st,all:at,allPass:wr,always:lt,and:ut,any:ct,anyPass:Ar,ap:Cr,aperture:ht,append:ft,apply:pt,applySpec:Lr,assoc:dt,assocPath:yt,binary:Yn,bind:_t,both:mi,call:Rr,chain:Nr,clamp:mt,clone:zn,comparator:gt,complement:gi,compose:si,composeK:ai,composeP:function(){if(0===arguments.length)throw new Error("composeP requires at least one argument");return ti.apply(this,Xe(arguments))},concat:vi,cond:Mr,construct:li,constructN:Dr,contains:ui,converge:$r,countBy:jr,curry:Xn,curryN:vt,dec:Pt,defaultTo:bt,difference:ci,differenceWith:St,dissoc:Et,dissocPath:xt,divide:It,drop:Un,dropLast:Gn,dropLastWhile:Wn,dropRepeats:hi,dropRepeatsWith:Br,dropWhile:Tt,either:Pi,empty:Ot,eqBy:Fr,eqProps:kr,equals:Hn,evolve:wt,filter:Vn,find:At,findIndex:Ct,findLast:Lt,findLastIndex:Rt,flatten:Zn,flip:qn,forEach:Nt,fromPairs:Mt,groupBy:Yr,groupWith:Dt,gt:$t,gte:jt,has:Bt,hasIn:Ft,head:Kn,identical:kt,identity:Yt,ifElse:zt,inc:Xt,indexBy:zr,indexOf:Xr,init:Jn,insert:Ut,insertAll:Gt,intersection:Ri,intersectionWith:Qn,intersperse:Wt,into:tr,invert:er,invertObj:nr,invoker:bi,is:Ht,isArrayLike:Vt,isEmpty:rr,isNil:Zt,join:Si,juxt:Ur,keys:qt,keysIn:Kt,last:ir,lastIndexOf:or,length:Jt,lens:Gr,lensIndex:Wr,lensPath:Hr,lensProp:Vr,lift:fi,liftN:Zr,lt:Qt,lte:te,map:sr,mapAccum:ee,mapAccumRight:ne,mapObjIndexed:ar,match:re,mathMod:ie,max:oe,maxBy:se,mean:qr,median:Kr,memoize:Ei,merge:ae,mergeAll:le,mergeWith:lr,mergeWithKey:ue,min:ce,minBy:he,modulo:fe,multiply:pe,nAry:de,negate:ye,none:_e,not:me,nth:ge,nthArg:ve,objOf:Pe,of:be,omit:pi,once:Se,or:Ee,over:xe,pair:Ie,partial:ur,partialRight:cr,partition:Jr,path:Te,pathEq:hr,pathOr:Oe,pathSatisfies:we,pick:Ae,pickAll:Ce,pickBy:Le,pipe:Qr,pipeK:function(){return ai.apply(this,Xe(arguments))},pipeP:ti,pluck:fr,prepend:Re,product:ei,project:pr,prop:Ne,propEq:dr,propIs:Me,propOr:De,propSatisfies:$e,props:je,range:Be,reduce:yr,reduceBy:_r,reduceRight:Fe,reduceWhile:mr,reduced:ke,reject:gr,remove:Ye,repeat:vr,replace:ze,reverse:Xe,scan:Ue,sequence:ni,set:Ge,slice:We,sort:He,sortBy:Ve,split:xi,splitAt:Ze,splitEvery:qe,splitWhen:Ke,subtract:Je,sum:Pr,symmetricDifference:Ii,symmetricDifferenceWith:Ti,tail:Qe,take:tn,takeLast:br,takeLastWhile:en,takeWhile:nn,tap:rn,test:Oi,times:on,toLower:wi,toPairs:sn,toPairsIn:an,toString:di,toUpper:Ai,transduce:Sr,transpose:ln,traverse:ri,trim:un,tryCatch:cn,type:hn,unapply:fn,unary:pn,uncurryN:dn,unfold:yn,union:Ni,unionWith:Er,uniq:Li,uniqBy:Ci,uniqWith:_n,unless:mn,unnest:ii,until:gn,update:vn,useWith:Pn,values:bn,valuesIn:Sn,view:En,when:xn,where:In,whereEq:xr,without:yi,wrap:Tn,xprod:On,zip:wn,zipObj:An,zipWith:Cn};t.exports=Mi}).call(commonjsGlobal)}),ramda_1=ramda.flatten,ramda_2=ramda.compose,ramda_3=ramda.head,ramda_4=ramda.complement,ramda_5=ramda.identical,clipper=createCommonjsModule(function(t){!function(){var e,n={},r=!1;if(t.exports?(t.exports=n,r=!0):"undefined"!=typeof document?window.ClipperLib=n:self.ClipperLib=n,r){i="chrome";e="Netscape"}else{var i=navigator.userAgent.toString().toLowerCase();e=navigator.appName}var o,s={};function a(t,e,r){n.biginteger_used=1,null!=t&&("number"==typeof t&&void 0===e?this.fromInt(t):"number"==typeof t?this.fromNumber(t,e,r):null==e&&"string"!=typeof t?this.fromString(t,256):this.fromString(t,e))}function l(){return new a(null,void 0,void 0)}-1!=i.indexOf("chrome")&&-1==i.indexOf("chromium")?s.chrome=1:s.chrome=0,-1!=i.indexOf("chromium")?s.chromium=1:s.chromium=0,-1!=i.indexOf("safari")&&-1==i.indexOf("chrome")&&-1==i.indexOf("chromium")?s.safari=1:s.safari=0,-1!=i.indexOf("firefox")?s.firefox=1:s.firefox=0,-1!=i.indexOf("firefox/17")?s.firefox17=1:s.firefox17=0,-1!=i.indexOf("firefox/15")?s.firefox15=1:s.firefox15=0,-1!=i.indexOf("firefox/3")?s.firefox3=1:s.firefox3=0,-1!=i.indexOf("opera")?s.opera=1:s.opera=0,-1!=i.indexOf("msie 10")?s.msie10=1:s.msie10=0,-1!=i.indexOf("msie 9")?s.msie9=1:s.msie9=0,-1!=i.indexOf("msie 8")?s.msie8=1:s.msie8=0,-1!=i.indexOf("msie 7")?s.msie7=1:s.msie7=0,-1!=i.indexOf("msie ")?s.msie=1:s.msie=0,n.biginteger_used=null,"Microsoft Internet Explorer"==e?(a.prototype.am=function(t,e,n,r,i,o){for(var s=32767&e,a=e>>15;--o>=0;){var l=32767&this[t],u=this[t++]>>15,c=a*l+u*s;i=((l=s*l+((32767&c)<<15)+n[r]+(1073741823&i))>>>30)+(c>>>15)+a*u+(i>>>30),n[r++]=1073741823&l}return i},o=30):"Netscape"!=e?(a.prototype.am=function(t,e,n,r,i,o){for(;--o>=0;){var s=e*this[t++]+n[r]+i;i=Math.floor(s/67108864),n[r++]=67108863&s}return i},o=26):(a.prototype.am=function(t,e,n,r,i,o){for(var s=16383&e,a=e>>14;--o>=0;){var l=16383&this[t],u=this[t++]>>14,c=a*l+u*s;i=((l=s*l+((16383&c)<<14)+n[r]+i)>>28)+(c>>14)+a*u,n[r++]=268435455&l}return i},o=28),a.prototype.DB=o,a.prototype.DM=(1<<o)-1,a.prototype.DV=1<<o;a.prototype.FV=Math.pow(2,52),a.prototype.F1=52-o,a.prototype.F2=2*o-52;var u,c,h="0123456789abcdefghijklmnopqrstuvwxyz",f=new Array;for(u="0".charCodeAt(0),c=0;c<=9;++c)f[u++]=c;for(u="a".charCodeAt(0),c=10;c<36;++c)f[u++]=c;for(u="A".charCodeAt(0),c=10;c<36;++c)f[u++]=c;function p(t){return h.charAt(t)}function d(t,e){var n=f[t.charCodeAt(e)];return null==n?-1:n}function y(t){var e=l();return e.fromInt(t),e}function _(t){var e,n=1;return 0!=(e=t>>>16)&&(t=e,n+=16),0!=(e=t>>8)&&(t=e,n+=8),0!=(e=t>>4)&&(t=e,n+=4),0!=(e=t>>2)&&(t=e,n+=2),0!=(e=t>>1)&&(t=e,n+=1),n}function m(t){this.m=t}function g(t){this.m=t,this.mp=t.invDigit(),this.mpl=32767&this.mp,this.mph=this.mp>>15,this.um=(1<<t.DB-15)-1,this.mt2=2*t.t}function v(t,e){return t&e}function P(t,e){return t|e}function b(t,e){return t^e}function S(t,e){return t&~e}function E(t){if(0==t)return-1;var e=0;return 0==(65535&t)&&(t>>=16,e+=16),0==(255&t)&&(t>>=8,e+=8),0==(15&t)&&(t>>=4,e+=4),0==(3&t)&&(t>>=2,e+=2),0==(1&t)&&++e,e}function x(t){for(var e=0;0!=t;)t&=t-1,++e;return e}function I(){}function T(t){return t}function O(t){this.r2=l(),this.q3=l(),a.ONE.dlShiftTo(2*t.t,this.r2),this.mu=this.r2.divide(t),this.m=t}m.prototype.convert=function(t){return t.s<0||t.compareTo(this.m)>=0?t.mod(this.m):t},m.prototype.revert=function(t){return t},m.prototype.reduce=function(t){t.divRemTo(this.m,null,t)},m.prototype.mulTo=function(t,e,n){t.multiplyTo(e,n),this.reduce(n)},m.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)},g.prototype.convert=function(t){var e=l();return t.abs().dlShiftTo(this.m.t,e),e.divRemTo(this.m,null,e),t.s<0&&e.compareTo(a.ZERO)>0&&this.m.subTo(e,e),e},g.prototype.revert=function(t){var e=l();return t.copyTo(e),this.reduce(e),e},g.prototype.reduce=function(t){for(;t.t<=this.mt2;)t[t.t++]=0;for(var e=0;e<this.m.t;++e){var n=32767&t[e],r=n*this.mpl+((n*this.mph+(t[e]>>15)*this.mpl&this.um)<<15)&t.DM;for(t[n=e+this.m.t]+=this.m.am(0,r,t,e,0,this.m.t);t[n]>=t.DV;)t[n]-=t.DV,t[++n]++}t.clamp(),t.drShiftTo(this.m.t,t),t.compareTo(this.m)>=0&&t.subTo(this.m,t)},g.prototype.mulTo=function(t,e,n){t.multiplyTo(e,n),this.reduce(n)},g.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)},a.prototype.copyTo=function(t){for(var e=this.t-1;e>=0;--e)t[e]=this[e];t.t=this.t,t.s=this.s},a.prototype.fromInt=function(t){this.t=1,this.s=t<0?-1:0,t>0?this[0]=t:t<-1?this[0]=t+this.DV:this.t=0},a.prototype.fromString=function(t,e){var n;if(16==e)n=4;else if(8==e)n=3;else if(256==e)n=8;else if(2==e)n=1;else if(32==e)n=5;else{if(4!=e)return void this.fromRadix(t,e);n=2}this.t=0,this.s=0;for(var r=t.length,i=!1,o=0;--r>=0;){var s=8==n?255&t[r]:d(t,r);s<0?"-"==t.charAt(r)&&(i=!0):(i=!1,0==o?this[this.t++]=s:o+n>this.DB?(this[this.t-1]|=(s&(1<<this.DB-o)-1)<<o,this[this.t++]=s>>this.DB-o):this[this.t-1]|=s<<o,(o+=n)>=this.DB&&(o-=this.DB))}8==n&&0!=(128&t[0])&&(this.s=-1,o>0&&(this[this.t-1]|=(1<<this.DB-o)-1<<o)),this.clamp(),i&&a.ZERO.subTo(this,this)},a.prototype.clamp=function(){for(var t=this.s&this.DM;this.t>0&&this[this.t-1]==t;)--this.t},a.prototype.dlShiftTo=function(t,e){var n;for(n=this.t-1;n>=0;--n)e[n+t]=this[n];for(n=t-1;n>=0;--n)e[n]=0;e.t=this.t+t,e.s=this.s},a.prototype.drShiftTo=function(t,e){for(var n=t;n<this.t;++n)e[n-t]=this[n];e.t=Math.max(this.t-t,0),e.s=this.s},a.prototype.lShiftTo=function(t,e){var n,r=t%this.DB,i=this.DB-r,o=(1<<i)-1,s=Math.floor(t/this.DB),a=this.s<<r&this.DM;for(n=this.t-1;n>=0;--n)e[n+s+1]=this[n]>>i|a,a=(this[n]&o)<<r;for(n=s-1;n>=0;--n)e[n]=0;e[s]=a,e.t=this.t+s+1,e.s=this.s,e.clamp()},a.prototype.rShiftTo=function(t,e){e.s=this.s;var n=Math.floor(t/this.DB);if(n>=this.t)e.t=0;else{var r=t%this.DB,i=this.DB-r,o=(1<<r)-1;e[0]=this[n]>>r;for(var s=n+1;s<this.t;++s)e[s-n-1]|=(this[s]&o)<<i,e[s-n]=this[s]>>r;r>0&&(e[this.t-n-1]|=(this.s&o)<<i),e.t=this.t-n,e.clamp()}},a.prototype.subTo=function(t,e){for(var n=0,r=0,i=Math.min(t.t,this.t);n<i;)r+=this[n]-t[n],e[n++]=r&this.DM,r>>=this.DB;if(t.t<this.t){for(r-=t.s;n<this.t;)r+=this[n],e[n++]=r&this.DM,r>>=this.DB;r+=this.s}else{for(r+=this.s;n<t.t;)r-=t[n],e[n++]=r&this.DM,r>>=this.DB;r-=t.s}e.s=r<0?-1:0,r<-1?e[n++]=this.DV+r:r>0&&(e[n++]=r),e.t=n,e.clamp()},a.prototype.multiplyTo=function(t,e){var n=this.abs(),r=t.abs(),i=n.t;for(e.t=i+r.t;--i>=0;)e[i]=0;for(i=0;i<r.t;++i)e[i+n.t]=n.am(0,r[i],e,i,0,n.t);e.s=0,e.clamp(),this.s!=t.s&&a.ZERO.subTo(e,e)},a.prototype.squareTo=function(t){for(var e=this.abs(),n=t.t=2*e.t;--n>=0;)t[n]=0;for(n=0;n<e.t-1;++n){var r=e.am(n,e[n],t,2*n,0,1);(t[n+e.t]+=e.am(n+1,2*e[n],t,2*n+1,r,e.t-n-1))>=e.DV&&(t[n+e.t]-=e.DV,t[n+e.t+1]=1)}t.t>0&&(t[t.t-1]+=e.am(n,e[n],t,2*n,0,1)),t.s=0,t.clamp()},a.prototype.divRemTo=function(t,e,n){var r=t.abs();if(!(r.t<=0)){var i=this.abs();if(i.t<r.t)return null!=e&&e.fromInt(0),void(null!=n&&this.copyTo(n));null==n&&(n=l());var o=l(),s=this.s,u=t.s,c=this.DB-_(r[r.t-1]);c>0?(r.lShiftTo(c,o),i.lShiftTo(c,n)):(r.copyTo(o),i.copyTo(n));var h=o.t,f=o[h-1];if(0!=f){var p=f*(1<<this.F1)+(h>1?o[h-2]>>this.F2:0),d=this.FV/p,y=(1<<this.F1)/p,m=1<<this.F2,g=n.t,v=g-h,P=null==e?l():e;for(o.dlShiftTo(v,P),n.compareTo(P)>=0&&(n[n.t++]=1,n.subTo(P,n)),a.ONE.dlShiftTo(h,P),P.subTo(o,o);o.t<h;)o[o.t++]=0;for(;--v>=0;){var b=n[--g]==f?this.DM:Math.floor(n[g]*d+(n[g-1]+m)*y);if((n[g]+=o.am(0,b,n,v,0,h))<b)for(o.dlShiftTo(v,P),n.subTo(P,n);n[g]<--b;)n.subTo(P,n)}null!=e&&(n.drShiftTo(h,e),s!=u&&a.ZERO.subTo(e,e)),n.t=h,n.clamp(),c>0&&n.rShiftTo(c,n),s<0&&a.ZERO.subTo(n,n)}}},a.prototype.invDigit=function(){if(this.t<1)return 0;var t=this[0];if(0==(1&t))return 0;var e=3&t;return(e=(e=(e=(e=e*(2-(15&t)*e)&15)*(2-(255&t)*e)&255)*(2-((65535&t)*e&65535))&65535)*(2-t*e%this.DV)%this.DV)>0?this.DV-e:-e},a.prototype.isEven=function(){return 0==(this.t>0?1&this[0]:this.s)},a.prototype.exp=function(t,e){if(t>4294967295||t<1)return a.ONE;var n=l(),r=l(),i=e.convert(this),o=_(t)-1;for(i.copyTo(n);--o>=0;)if(e.sqrTo(n,r),(t&1<<o)>0)e.mulTo(r,i,n);else{var s=n;n=r,r=s}return e.revert(n)},a.prototype.toString=function(t){if(this.s<0)return"-"+this.negate().toString(t);var e;if(16==t)e=4;else if(8==t)e=3;else if(2==t)e=1;else if(32==t)e=5;else{if(4!=t)return this.toRadix(t);e=2}var n,r=(1<<e)-1,i=!1,o="",s=this.t,a=this.DB-s*this.DB%e;if(s-- >0)for(a<this.DB&&(n=this[s]>>a)>0&&(i=!0,o=p(n));s>=0;)a<e?(n=(this[s]&(1<<a)-1)<<e-a,n|=this[--s]>>(a+=this.DB-e)):(n=this[s]>>(a-=e)&r,a<=0&&(a+=this.DB,--s)),n>0&&(i=!0),i&&(o+=p(n));return i?o:"0"},a.prototype.negate=function(){var t=l();return a.ZERO.subTo(this,t),t},a.prototype.abs=function(){return this.s<0?this.negate():this},a.prototype.compareTo=function(t){var e=this.s-t.s;if(0!=e)return e;var n=this.t;if(0!=(e=n-t.t))return this.s<0?-e:e;for(;--n>=0;)if(0!=(e=this[n]-t[n]))return e;return 0},a.prototype.bitLength=function(){return this.t<=0?0:this.DB*(this.t-1)+_(this[this.t-1]^this.s&this.DM)},a.prototype.mod=function(t){var e=l();return this.abs().divRemTo(t,null,e),this.s<0&&e.compareTo(a.ZERO)>0&&t.subTo(e,e),e},a.prototype.modPowInt=function(t,e){var n;return n=t<256||e.isEven()?new m(e):new g(e),this.exp(t,n)},a.ZERO=y(0),a.ONE=y(1),I.prototype.convert=T,I.prototype.revert=T,I.prototype.mulTo=function(t,e,n){t.multiplyTo(e,n)},I.prototype.sqrTo=function(t,e){t.squareTo(e)},O.prototype.convert=function(t){if(t.s<0||t.t>2*this.m.t)return t.mod(this.m);if(t.compareTo(this.m)<0)return t;var e=l();return t.copyTo(e),this.reduce(e),e},O.prototype.revert=function(t){return t},O.prototype.reduce=function(t){for(t.drShiftTo(this.m.t-1,this.r2),t.t>this.m.t+1&&(t.t=this.m.t+1,t.clamp()),this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);t.compareTo(this.r2)<0;)t.dAddOffset(1,this.m.t+1);for(t.subTo(this.r2,t);t.compareTo(this.m)>=0;)t.subTo(this.m,t)},O.prototype.mulTo=function(t,e,n){t.multiplyTo(e,n),this.reduce(n)},O.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)};var w=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997],A=(1<<26)/w[w.length-1];a.prototype.chunkSize=function(t){return Math.floor(Math.LN2*this.DB/Math.log(t))},a.prototype.toRadix=function(t){if(null==t&&(t=10),0==this.signum()||t<2||t>36)return"0";var e=this.chunkSize(t),n=Math.pow(t,e),r=y(n),i=l(),o=l(),s="";for(this.divRemTo(r,i,o);i.signum()>0;)s=(n+o.intValue()).toString(t).substr(1)+s,i.divRemTo(r,i,o);return o.intValue().toString(t)+s},a.prototype.fromRadix=function(t,e){this.fromInt(0),null==e&&(e=10);for(var n=this.chunkSize(e),r=Math.pow(e,n),i=!1,o=0,s=0,l=0;l<t.length;++l){var u=d(t,l);u<0?"-"==t.charAt(l)&&0==this.signum()&&(i=!0):(s=e*s+u,++o>=n&&(this.dMultiply(r),this.dAddOffset(s,0),o=0,s=0))}o>0&&(this.dMultiply(Math.pow(e,o)),this.dAddOffset(s,0)),i&&a.ZERO.subTo(this,this)},a.prototype.fromNumber=function(t,e,n){if("number"==typeof e)if(t<2)this.fromInt(1);else for(this.fromNumber(t,n),this.testBit(t-1)||this.bitwiseTo(a.ONE.shiftLeft(t-1),P,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(e);)this.dAddOffset(2,0),this.bitLength()>t&&this.subTo(a.ONE.shiftLeft(t-1),this);else{var r=new Array,i=7&t;r.length=1+(t>>3),e.nextBytes(r),i>0?r[0]&=(1<<i)-1:r[0]=0,this.fromString(r,256)}},a.prototype.bitwiseTo=function(t,e,n){var r,i,o=Math.min(t.t,this.t);for(r=0;r<o;++r)n[r]=e(this[r],t[r]);if(t.t<this.t){for(i=t.s&this.DM,r=o;r<this.t;++r)n[r]=e(this[r],i);n.t=this.t}else{for(i=this.s&this.DM,r=o;r<t.t;++r)n[r]=e(i,t[r]);n.t=t.t}n.s=e(this.s,t.s),n.clamp()},a.prototype.changeBit=function(t,e){var n=a.ONE.shiftLeft(t);return this.bitwiseTo(n,e,n),n},a.prototype.addTo=function(t,e){for(var n=0,r=0,i=Math.min(t.t,this.t);n<i;)r+=this[n]+t[n],e[n++]=r&this.DM,r>>=this.DB;if(t.t<this.t){for(r+=t.s;n<this.t;)r+=this[n],e[n++]=r&this.DM,r>>=this.DB;r+=this.s}else{for(r+=this.s;n<t.t;)r+=t[n],e[n++]=r&this.DM,r>>=this.DB;r+=t.s}e.s=r<0?-1:0,r>0?e[n++]=r:r<-1&&(e[n++]=this.DV+r),e.t=n,e.clamp()},a.prototype.dMultiply=function(t){this[this.t]=this.am(0,t-1,this,0,0,this.t),++this.t,this.clamp()},a.prototype.dAddOffset=function(t,e){if(0!=t){for(;this.t<=e;)this[this.t++]=0;for(this[e]+=t;this[e]>=this.DV;)this[e]-=this.DV,++e>=this.t&&(this[this.t++]=0),++this[e]}},a.prototype.multiplyLowerTo=function(t,e,n){var r,i=Math.min(this.t+t.t,e);for(n.s=0,n.t=i;i>0;)n[--i]=0;for(r=n.t-this.t;i<r;++i)n[i+this.t]=this.am(0,t[i],n,i,0,this.t);for(r=Math.min(t.t,e);i<r;++i)this.am(0,t[i],n,i,0,e-i);n.clamp()},a.prototype.multiplyUpperTo=function(t,e,n){--e;var r=n.t=this.t+t.t-e;for(n.s=0;--r>=0;)n[r]=0;for(r=Math.max(e-this.t,0);r<t.t;++r)n[this.t+r-e]=this.am(e-r,t[r],n,0,0,this.t+r-e);n.clamp(),n.drShiftTo(1,n)},a.prototype.modInt=function(t){if(t<=0)return 0;var e=this.DV%t,n=this.s<0?t-1:0;if(this.t>0)if(0==e)n=this[0]%t;else for(var r=this.t-1;r>=0;--r)n=(e*n+this[r])%t;return n},a.prototype.millerRabin=function(t){var e=this.subtract(a.ONE),n=e.getLowestSetBit();if(n<=0)return!1;var r=e.shiftRight(n);(t=t+1>>1)>w.length&&(t=w.length);for(var i=l(),o=0;o<t;++o){i.fromInt(w[Math.floor(Math.random()*w.length)]);var s=i.modPow(r,this);if(0!=s.compareTo(a.ONE)&&0!=s.compareTo(e)){for(var u=1;u++<n&&0!=s.compareTo(e);)if(0==(s=s.modPowInt(2,this)).compareTo(a.ONE))return!1;if(0!=s.compareTo(e))return!1}}return!0},a.prototype.clone=function(){var t=l();return this.copyTo(t),t},a.prototype.intValue=function(){if(this.s<0){if(1==this.t)return this[0]-this.DV;if(0==this.t)return-1}else{if(1==this.t)return this[0];if(0==this.t)return 0}return(this[1]&(1<<32-this.DB)-1)<<this.DB|this[0]},a.prototype.byteValue=function(){return 0==this.t?this.s:this[0]<<24>>24},a.prototype.shortValue=function(){return 0==this.t?this.s:this[0]<<16>>16},a.prototype.signum=function(){return this.s<0?-1:this.t<=0||1==this.t&&this[0]<=0?0:1},a.prototype.toByteArray=function(){var t=this.t,e=new Array;e[0]=this.s;var n,r=this.DB-t*this.DB%8,i=0;if(t-- >0)for(r<this.DB&&(n=this[t]>>r)!=(this.s&this.DM)>>r&&(e[i++]=n|this.s<<this.DB-r);t>=0;)r<8?(n=(this[t]&(1<<r)-1)<<8-r,n|=this[--t]>>(r+=this.DB-8)):(n=this[t]>>(r-=8)&255,r<=0&&(r+=this.DB,--t)),0!=(128&n)&&(n|=-256),0==i&&(128&this.s)!=(128&n)&&++i,(i>0||n!=this.s)&&(e[i++]=n);return e},a.prototype.equals=function(t){return 0==this.compareTo(t)},a.prototype.min=function(t){return this.compareTo(t)<0?this:t},a.prototype.max=function(t){return this.compareTo(t)>0?this:t},a.prototype.and=function(t){var e=l();return this.bitwiseTo(t,v,e),e},a.prototype.or=function(t){var e=l();return this.bitwiseTo(t,P,e),e},a.prototype.xor=function(t){var e=l();return this.bitwiseTo(t,b,e),e},a.prototype.andNot=function(t){var e=l();return this.bitwiseTo(t,S,e),e},a.prototype.not=function(){for(var t=l(),e=0;e<this.t;++e)t[e]=this.DM&~this[e];return t.t=this.t,t.s=~this.s,t},a.prototype.shiftLeft=function(t){var e=l();return t<0?this.rShiftTo(-t,e):this.lShiftTo(t,e),e},a.prototype.shiftRight=function(t){var e=l();return t<0?this.lShiftTo(-t,e):this.rShiftTo(t,e),e},a.prototype.getLowestSetBit=function(){for(var t=0;t<this.t;++t)if(0!=this[t])return t*this.DB+E(this[t]);return this.s<0?this.t*this.DB:-1},a.prototype.bitCount=function(){for(var t=0,e=this.s&this.DM,n=0;n<this.t;++n)t+=x(this[n]^e);return t},a.prototype.testBit=function(t){var e=Math.floor(t/this.DB);return e>=this.t?0!=this.s:0!=(this[e]&1<<t%this.DB)},a.prototype.setBit=function(t){return this.changeBit(t,P)},a.prototype.clearBit=function(t){return this.changeBit(t,S)},a.prototype.flipBit=function(t){return this.changeBit(t,b)},a.prototype.add=function(t){var e=l();return this.addTo(t,e),e},a.prototype.subtract=function(t){var e=l();return this.subTo(t,e),e},a.prototype.multiply=function(t){var e=l();return this.multiplyTo(t,e),e},a.prototype.divide=function(t){var e=l();return this.divRemTo(t,e,null),e},a.prototype.remainder=function(t){var e=l();return this.divRemTo(t,null,e),e},a.prototype.divideAndRemainder=function(t){var e=l(),n=l();return this.divRemTo(t,e,n),new Array(e,n)},a.prototype.modPow=function(t,e){var n,r,i=t.bitLength(),o=y(1);if(i<=0)return o;n=i<18?1:i<48?3:i<144?4:i<768?5:6,r=i<8?new m(e):e.isEven()?new O(e):new g(e);var s=new Array,a=3,u=n-1,c=(1<<n)-1;if(s[1]=r.convert(this),n>1){var h=l();for(r.sqrTo(s[1],h);a<=c;)s[a]=l(),r.mulTo(h,s[a-2],s[a]),a+=2}var f,p,d=t.t-1,v=!0,P=l();for(i=_(t[d])-1;d>=0;){for(i>=u?f=t[d]>>i-u&c:(f=(t[d]&(1<<i+1)-1)<<u-i,d>0&&(f|=t[d-1]>>this.DB+i-u)),a=n;0==(1&f);)f>>=1,--a;if((i-=a)<0&&(i+=this.DB,--d),v)s[f].copyTo(o),v=!1;else{for(;a>1;)r.sqrTo(o,P),r.sqrTo(P,o),a-=2;a>0?r.sqrTo(o,P):(p=o,o=P,P=p),r.mulTo(P,s[f],o)}for(;d>=0&&0==(t[d]&1<<i);)r.sqrTo(o,P),p=o,o=P,P=p,--i<0&&(i=this.DB-1,--d)}return r.revert(o)},a.prototype.modInverse=function(t){var e=t.isEven();if(this.isEven()&&e||0==t.signum())return a.ZERO;for(var n=t.clone(),r=this.clone(),i=y(1),o=y(0),s=y(0),l=y(1);0!=n.signum();){for(;n.isEven();)n.rShiftTo(1,n),e?(i.isEven()&&o.isEven()||(i.addTo(this,i),o.subTo(t,o)),i.rShiftTo(1,i)):o.isEven()||o.subTo(t,o),o.rShiftTo(1,o);for(;r.isEven();)r.rShiftTo(1,r),e?(s.isEven()&&l.isEven()||(s.addTo(this,s),l.subTo(t,l)),s.rShiftTo(1,s)):l.isEven()||l.subTo(t,l),l.rShiftTo(1,l);n.compareTo(r)>=0?(n.subTo(r,n),e&&i.subTo(s,i),o.subTo(l,o)):(r.subTo(n,r),e&&s.subTo(i,s),l.subTo(o,l))}return 0!=r.compareTo(a.ONE)?a.ZERO:l.compareTo(t)>=0?l.subtract(t):l.signum()<0?(l.addTo(t,l),l.signum()<0?l.add(t):l):l},a.prototype.pow=function(t){return this.exp(t,new I)},a.prototype.gcd=function(t){var e=this.s<0?this.negate():this.clone(),n=t.s<0?t.negate():t.clone();if(e.compareTo(n)<0){var r=e;e=n,n=r}var i=e.getLowestSetBit(),o=n.getLowestSetBit();if(o<0)return e;for(i<o&&(o=i),o>0&&(e.rShiftTo(o,e),n.rShiftTo(o,n));e.signum()>0;)(i=e.getLowestSetBit())>0&&e.rShiftTo(i,e),(i=n.getLowestSetBit())>0&&n.rShiftTo(i,n),e.compareTo(n)>=0?(e.subTo(n,e),e.rShiftTo(1,e)):(n.subTo(e,n),n.rShiftTo(1,n));return o>0&&n.lShiftTo(o,n),n},a.prototype.isProbablePrime=function(t){var e,n=this.abs();if(1==n.t&&n[0]<=w[w.length-1]){for(e=0;e<w.length;++e)if(n[0]==w[e])return!0;return!1}if(n.isEven())return!1;for(e=1;e<w.length;){for(var r=w[e],i=e+1;i<w.length&&r<A;)r*=w[i++];for(r=n.modInt(r);e<i;)if(r%w[e++]==0)return!1}return n.millerRabin(t)},a.prototype.square=function(){var t=l();return this.squareTo(t),t};var C=a;C.prototype.IsNegative=function(){return-1==this.compareTo(C.ZERO)},C.op_Equality=function(t,e){return 0==t.compareTo(e)},C.op_Inequality=function(t,e){return 0!=t.compareTo(e)},C.op_GreaterThan=function(t,e){return t.compareTo(e)>0},C.op_LessThan=function(t,e){return t.compareTo(e)<0},C.op_Addition=function(t,e){return new C(t).add(new C(e))},C.op_Subtraction=function(t,e){return new C(t).subtract(new C(e))},C.Int128Mul=function(t,e){return new C(t).multiply(new C(e))},C.op_Division=function(t,e){return t.divide(e)},C.prototype.ToDouble=function(){return parseFloat(this.toString())};var L=function(t,e){var n;if(void 0===Object.getOwnPropertyNames){for(n in e.prototype)void 0!==t.prototype[n]&&t.prototype[n]!=Object.prototype[n]||(t.prototype[n]=e.prototype[n]);for(n in e)void 0===t[n]&&(t[n]=e[n]);t.$baseCtor=e}else{for(var r=Object.getOwnPropertyNames(e.prototype),i=0;i<r.length;i++)void 0===Object.getOwnPropertyDescriptor(t.prototype,r[i])&&Object.defineProperty(t.prototype,r[i],Object.getOwnPropertyDescriptor(e.prototype,r[i]));for(n in e)void 0===t[n]&&(t[n]=e[n]);t.$baseCtor=e}};n.Path=function(){return[]},n.Paths=function(){return[]},n.DoublePoint=function(){var t=arguments;this.X=0,this.Y=0,1==t.length?(this.X=t[0].X,this.Y=t[0].Y):2==t.length&&(this.X=t[0],this.Y=t[1])},n.DoublePoint0=function(){this.X=0,this.Y=0},n.DoublePoint1=function(t){this.X=t.X,this.Y=t.Y},n.DoublePoint2=function(t,e){this.X=t,this.Y=e},n.PolyNode=function(){this.m_Parent=null,this.m_polygon=new n.Path,this.m_Index=0,this.m_jointype=0,this.m_endtype=0,this.m_Childs=[],this.IsOpen=!1},n.PolyNode.prototype.IsHoleNode=function(){for(var t=!0,e=this.m_Parent;null!==e;)t=!t,e=e.m_Parent;return t},n.PolyNode.prototype.ChildCount=function(){return this.m_Childs.length},n.PolyNode.prototype.Contour=function(){return this.m_polygon},n.PolyNode.prototype.AddChild=function(t){var e=this.m_Childs.length;this.m_Childs.push(t),t.m_Parent=this,t.m_Index=e},n.PolyNode.prototype.GetNext=function(){return this.m_Childs.length>0?this.m_Childs[0]:this.GetNextSiblingUp()},n.PolyNode.prototype.GetNextSiblingUp=function(){return null===this.m_Parent?null:this.m_Index==this.m_Parent.m_Childs.length-1?this.m_Parent.GetNextSiblingUp():this.m_Parent.m_Childs[this.m_Index+1]},n.PolyNode.prototype.Childs=function(){return this.m_Childs},n.PolyNode.prototype.Parent=function(){return this.m_Parent},n.PolyNode.prototype.IsHole=function(){return this.IsHoleNode()},n.PolyTree=function(){this.m_AllPolys=[],n.PolyNode.call(this)},n.PolyTree.prototype.Clear=function(){for(var t=0,e=this.m_AllPolys.length;t<e;t++)this.m_AllPolys[t]=null;this.m_AllPolys.length=0,this.m_Childs.length=0},n.PolyTree.prototype.GetFirst=function(){return this.m_Childs.length>0?this.m_Childs[0]:null},n.PolyTree.prototype.Total=function(){var t=this.m_AllPolys.length;return t>0&&this.m_Childs[0]!=this.m_AllPolys[0]&&t--,t},L(n.PolyTree,n.PolyNode),n.Math_Abs_Int64=n.Math_Abs_Int32=n.Math_Abs_Double=function(t){return Math.abs(t)},n.Math_Max_Int32_Int32=function(t,e){return Math.max(t,e)},s.msie||s.opera||s.safari?n.Cast_Int32=function(t){return 0|t}:n.Cast_Int32=function(t){return~~t},s.chrome?n.Cast_Int64=function(t){return t<-2147483648||t>2147483647?t<0?Math.ceil(t):Math.floor(t):~~t}:s.firefox&&"function"==typeof Number.toInteger?n.Cast_Int64=function(t){return Number.toInteger(t)}:s.msie7||s.msie8?n.Cast_Int64=function(t){return parseInt(t,10)}:s.msie?n.Cast_Int64=function(t){return t<-2147483648||t>2147483647?t<0?Math.ceil(t):Math.floor(t):0|t}:n.Cast_Int64=function(t){return t<0?Math.ceil(t):Math.floor(t)},n.Clear=function(t){t.length=0},n.PI=3.141592653589793,n.PI2=6.283185307179586,n.IntPoint=function(){var t=arguments,e=t.length;if(this.X=0,this.Y=0,2==e)this.X=t[0],this.Y=t[1];else if(1==e)if(t[0]instanceof n.DoublePoint){var r=t[0];this.X=n.Clipper.Round(r.X),this.Y=n.Clipper.Round(r.Y)}else{var i=t[0];this.X=i.X,this.Y=i.Y}else this.X=0,this.Y=0},n.IntPoint.op_Equality=function(t,e){return t.X==e.X&&t.Y==e.Y},n.IntPoint.op_Inequality=function(t,e){return t.X!=e.X||t.Y!=e.Y},n.IntPoint0=function(){this.X=0,this.Y=0},n.IntPoint1=function(t){this.X=t.X,this.Y=t.Y},n.IntPoint1dp=function(t){this.X=n.Clipper.Round(t.X),this.Y=n.Clipper.Round(t.Y)},n.IntPoint2=function(t,e){this.X=t,this.Y=e},n.IntRect=function(){var t=arguments,e=t.length;4==e?(this.left=t[0],this.top=t[1],this.right=t[2],this.bottom=t[3]):1==e?(this.left=ir.left,this.top=ir.top,this.right=ir.right,this.bottom=ir.bottom):(this.left=0,this.top=0,this.right=0,this.bottom=0)},n.IntRect0=function(){this.left=0,this.top=0,this.right=0,this.bottom=0},n.IntRect1=function(t){this.left=t.left,this.top=t.top,this.right=t.right,this.bottom=t.bottom},n.IntRect4=function(t,e,n,r){this.left=t,this.top=e,this.right=n,this.bottom=r},n.ClipType={ctIntersection:0,ctUnion:1,ctDifference:2,ctXor:3},n.PolyType={ptSubject:0,ptClip:1},n.PolyFillType={pftEvenOdd:0,pftNonZero:1,pftPositive:2,pftNegative:3},n.JoinType={jtSquare:0,jtRound:1,jtMiter:2},n.EndType={etOpenSquare:0,etOpenRound:1,etOpenButt:2,etClosedLine:3,etClosedPolygon:4},n.EdgeSide={esLeft:0,esRight:1},n.Direction={dRightToLeft:0,dLeftToRight:1},n.TEdge=function(){this.Bot=new n.IntPoint,this.Curr=new n.IntPoint,this.Top=new n.IntPoint,this.Delta=new n.IntPoint,this.Dx=0,this.PolyTyp=n.PolyType.ptSubject,this.Side=n.EdgeSide.esLeft,this.WindDelta=0,this.WindCnt=0,this.WindCnt2=0,this.OutIdx=0,this.Next=null,this.Prev=null,this.NextInLML=null,this.NextInAEL=null,this.PrevInAEL=null,this.NextInSEL=null,this.PrevInSEL=null},n.IntersectNode=function(){this.Edge1=null,this.Edge2=null,this.Pt=new n.IntPoint},n.MyIntersectNodeSort=function(){},n.MyIntersectNodeSort.Compare=function(t,e){var n=e.Pt.Y-t.Pt.Y;return n>0?1:n<0?-1:0},n.LocalMinima=function(){this.Y=0,this.LeftBound=null,this.RightBound=null,this.Next=null},n.Scanbeam=function(){this.Y=0,this.Next=null},n.OutRec=function(){this.Idx=0,this.IsHole=!1,this.IsOpen=!1,this.FirstLeft=null,this.Pts=null,this.BottomPt=null,this.PolyNode=null},n.OutPt=function(){this.Idx=0,this.Pt=new n.IntPoint,this.Next=null,this.Prev=null},n.Join=function(){this.OutPt1=null,this.OutPt2=null,this.OffPt=new n.IntPoint},n.ClipperBase=function(){this.m_MinimaList=null,this.m_CurrentLM=null,this.m_edges=new Array,this.m_UseFullRange=!1,this.m_HasOpenPaths=!1,this.PreserveCollinear=!1,this.m_MinimaList=null,this.m_CurrentLM=null,this.m_UseFullRange=!1,this.m_HasOpenPaths=!1},n.ClipperBase.horizontal=-9007199254740992,n.ClipperBase.Skip=-2,n.ClipperBase.Unassigned=-1,n.ClipperBase.tolerance=1e-20,n.ClipperBase.loRange=47453132,n.ClipperBase.hiRange=0xfffffffffffff,n.ClipperBase.near_zero=function(t){return t>-n.ClipperBase.tolerance&&t<n.ClipperBase.tolerance},n.ClipperBase.IsHorizontal=function(t){return 0===t.Delta.Y},n.ClipperBase.prototype.PointIsVertex=function(t,e){var r=e;do{if(n.IntPoint.op_Equality(r.Pt,t))return!0;r=r.Next}while(r!=e);return!1},n.ClipperBase.prototype.PointOnLineSegment=function(t,e,n,r){return r?t.X==e.X&&t.Y==e.Y||t.X==n.X&&t.Y==n.Y||t.X>e.X==t.X<n.X&&t.Y>e.Y==t.Y<n.Y&&C.op_Equality(C.Int128Mul(t.X-e.X,n.Y-e.Y),C.Int128Mul(n.X-e.X,t.Y-e.Y)):t.X==e.X&&t.Y==e.Y||t.X==n.X&&t.Y==n.Y||t.X>e.X==t.X<n.X&&t.Y>e.Y==t.Y<n.Y&&(t.X-e.X)*(n.Y-e.Y)==(n.X-e.X)*(t.Y-e.Y)},n.ClipperBase.prototype.PointOnPolygon=function(t,e,n){for(var r=e;;){if(this.PointOnLineSegment(t,r.Pt,r.Next.Pt,n))return!0;if((r=r.Next)==e)break}return!1},n.ClipperBase.prototype.SlopesEqual=n.ClipperBase.SlopesEqual=function(){var t,e,r,i,o,s,a=arguments,l=a.length;return 3==l?(t=a[0],e=a[1],a[2]?C.op_Equality(C.Int128Mul(t.Delta.Y,e.Delta.X),C.Int128Mul(t.Delta.X,e.Delta.Y)):n.Cast_Int64(t.Delta.Y*e.Delta.X)==n.Cast_Int64(t.Delta.X*e.Delta.Y)):4==l?(r=a[0],i=a[1],o=a[2],a[3]?C.op_Equality(C.Int128Mul(r.Y-i.Y,i.X-o.X),C.Int128Mul(r.X-i.X,i.Y-o.Y)):n.Cast_Int64((r.Y-i.Y)*(i.X-o.X))-n.Cast_Int64((r.X-i.X)*(i.Y-o.Y))==0):(r=a[0],i=a[1],o=a[2],s=a[3],a[4]?C.op_Equality(C.Int128Mul(r.Y-i.Y,o.X-s.X),C.Int128Mul(r.X-i.X,o.Y-s.Y)):n.Cast_Int64((r.Y-i.Y)*(o.X-s.X))-n.Cast_Int64((r.X-i.X)*(o.Y-s.Y))==0)},n.ClipperBase.SlopesEqual3=function(t,e,r){return r?C.op_Equality(C.Int128Mul(t.Delta.Y,e.Delta.X),C.Int128Mul(t.Delta.X,e.Delta.Y)):n.Cast_Int64(t.Delta.Y*e.Delta.X)==n.Cast_Int64(t.Delta.X*e.Delta.Y)},n.ClipperBase.SlopesEqual4=function(t,e,r,i){return i?C.op_Equality(C.Int128Mul(t.Y-e.Y,e.X-r.X),C.Int128Mul(t.X-e.X,e.Y-r.Y)):n.Cast_Int64((t.Y-e.Y)*(e.X-r.X))-n.Cast_Int64((t.X-e.X)*(e.Y-r.Y))==0},n.ClipperBase.SlopesEqual5=function(t,e,r,i,o){return o?C.op_Equality(C.Int128Mul(t.Y-e.Y,r.X-i.X),C.Int128Mul(t.X-e.X,r.Y-i.Y)):n.Cast_Int64((t.Y-e.Y)*(r.X-i.X))-n.Cast_Int64((t.X-e.X)*(r.Y-i.Y))==0},n.ClipperBase.prototype.Clear=function(){this.DisposeLocalMinimaList();for(var t=0,e=this.m_edges.length;t<e;++t){for(var r=0,i=this.m_edges[t].length;r<i;++r)this.m_edges[t][r]=null;n.Clear(this.m_edges[t])}n.Clear(this.m_edges),this.m_UseFullRange=!1,this.m_HasOpenPaths=!1},n.ClipperBase.prototype.DisposeLocalMinimaList=function(){for(;null!==this.m_MinimaList;){var t=this.m_MinimaList.Next;this.m_MinimaList=null,this.m_MinimaList=t}this.m_CurrentLM=null},n.ClipperBase.prototype.RangeTest=function(t,e){e.Value?(t.X>n.ClipperBase.hiRange||t.Y>n.ClipperBase.hiRange||-t.X>n.ClipperBase.hiRange||-t.Y>n.ClipperBase.hiRange)&&n.Error("Coordinate outside allowed range in RangeTest()."):(t.X>n.ClipperBase.loRange||t.Y>n.ClipperBase.loRange||-t.X>n.ClipperBase.loRange||-t.Y>n.ClipperBase.loRange)&&(e.Value=!0,this.RangeTest(t,e))},n.ClipperBase.prototype.InitEdge=function(t,e,n,r){t.Next=e,t.Prev=n,t.Curr.X=r.X,t.Curr.Y=r.Y,t.OutIdx=-1},n.ClipperBase.prototype.InitEdge2=function(t,e){t.Curr.Y>=t.Next.Curr.Y?(t.Bot.X=t.Curr.X,t.Bot.Y=t.Curr.Y,t.Top.X=t.Next.Curr.X,t.Top.Y=t.Next.Curr.Y):(t.Top.X=t.Curr.X,t.Top.Y=t.Curr.Y,t.Bot.X=t.Next.Curr.X,t.Bot.Y=t.Next.Curr.Y),this.SetDx(t),t.PolyTyp=e},n.ClipperBase.prototype.FindNextLocMin=function(t){for(var e;;){for(;n.IntPoint.op_Inequality(t.Bot,t.Prev.Bot)||n.IntPoint.op_Equality(t.Curr,t.Top);)t=t.Next;if(t.Dx!=n.ClipperBase.horizontal&&t.Prev.Dx!=n.ClipperBase.horizontal)break;for(;t.Prev.Dx==n.ClipperBase.horizontal;)t=t.Prev;for(e=t;t.Dx==n.ClipperBase.horizontal;)t=t.Next;if(t.Top.Y!=t.Prev.Bot.Y){e.Prev.Bot.X<t.Bot.X&&(t=e);break}}return t},n.ClipperBase.prototype.ProcessBound=function(t,e){var r,i,o=t;if(o.OutIdx==n.ClipperBase.Skip){if(t=o,e){for(;t.Top.Y==t.Next.Bot.Y;)t=t.Next;for(;t!=o&&t.Dx==n.ClipperBase.horizontal;)t=t.Prev}else{for(;t.Top.Y==t.Prev.Bot.Y;)t=t.Prev;for(;t!=o&&t.Dx==n.ClipperBase.horizontal;)t=t.Next}if(t==o)o=e?t.Next:t.Prev;else{t=e?o.Next:o.Prev;var s=new n.LocalMinima;s.Next=null,s.Y=t.Bot.Y,s.LeftBound=null,s.RightBound=t,t.WindDelta=0,o=this.ProcessBound(t,e),this.InsertLocalMinima(s)}return o}if(t.Dx==n.ClipperBase.horizontal&&(r=e?t.Prev:t.Next).OutIdx!=n.ClipperBase.Skip&&(r.Dx==n.ClipperBase.horizontal?r.Bot.X!=t.Bot.X&&r.Top.X!=t.Bot.X&&this.ReverseHorizontal(t):r.Bot.X!=t.Bot.X&&this.ReverseHorizontal(t)),r=t,e){for(;o.Top.Y==o.Next.Bot.Y&&o.Next.OutIdx!=n.ClipperBase.Skip;)o=o.Next;if(o.Dx==n.ClipperBase.horizontal&&o.Next.OutIdx!=n.ClipperBase.Skip){for(i=o;i.Prev.Dx==n.ClipperBase.horizontal;)i=i.Prev;i.Prev.Top.X==o.Next.Top.X?e||(o=i.Prev):i.Prev.Top.X>o.Next.Top.X&&(o=i.Prev)}for(;t!=o;)t.NextInLML=t.Next,t.Dx==n.ClipperBase.horizontal&&t!=r&&t.Bot.X!=t.Prev.Top.X&&this.ReverseHorizontal(t),t=t.Next;t.Dx==n.ClipperBase.horizontal&&t!=r&&t.Bot.X!=t.Prev.Top.X&&this.ReverseHorizontal(t),o=o.Next}else{for(;o.Top.Y==o.Prev.Bot.Y&&o.Prev.OutIdx!=n.ClipperBase.Skip;)o=o.Prev;if(o.Dx==n.ClipperBase.horizontal&&o.Prev.OutIdx!=n.ClipperBase.Skip){for(i=o;i.Next.Dx==n.ClipperBase.horizontal;)i=i.Next;i.Next.Top.X==o.Prev.Top.X?e||(o=i.Next):i.Next.Top.X>o.Prev.Top.X&&(o=i.Next)}for(;t!=o;)t.NextInLML=t.Prev,t.Dx==n.ClipperBase.horizontal&&t!=r&&t.Bot.X!=t.Next.Top.X&&this.ReverseHorizontal(t),t=t.Prev;t.Dx==n.ClipperBase.horizontal&&t!=r&&t.Bot.X!=t.Next.Top.X&&this.ReverseHorizontal(t),o=o.Prev}return o},n.ClipperBase.prototype.AddPath=function(t,e,r){r||e!=n.PolyType.ptClip||n.Error("AddPath: Open paths must be subject.");var i=t.length-1;if(r)for(;i>0&&n.IntPoint.op_Equality(t[i],t[0]);)--i;for(;i>0&&n.IntPoint.op_Equality(t[i],t[i-1]);)--i;if(r&&i<2||!r&&i<1)return!1;for(var o=new Array,s=0;s<=i;s++)o.push(new n.TEdge);var a=!0;o[1].Curr.X=t[1].X,o[1].Curr.Y=t[1].Y;var l={Value:this.m_UseFullRange};this.RangeTest(t[0],l),this.m_UseFullRange=l.Value,l.Value=this.m_UseFullRange,this.RangeTest(t[i],l),this.m_UseFullRange=l.Value,this.InitEdge(o[0],o[1],o[i],t[0]),this.InitEdge(o[i],o[0],o[i-1],t[i]);for(s=i-1;s>=1;--s)l.Value=this.m_UseFullRange,this.RangeTest(t[s],l),this.m_UseFullRange=l.Value,this.InitEdge(o[s],o[s+1],o[s-1],t[s]);for(var u,c=o[0],h=c,f=c;;)if(h.Curr!=h.Next.Curr||!r&&h.Next==c){if(h.Prev==h.Next)break;if(!r||!n.ClipperBase.SlopesEqual(h.Prev.Curr,h.Curr,h.Next.Curr,this.m_UseFullRange)||this.PreserveCollinear&&this.Pt2IsBetweenPt1AndPt3(h.Prev.Curr,h.Curr,h.Next.Curr)){if((h=h.Next)==f||!r&&h.Next==c)break}else h==c&&(c=h.Next),f=h=(h=this.RemoveEdge(h)).Prev}else{if(h==h.Next)break;h==c&&(c=h.Next),f=h=this.RemoveEdge(h)}if(!r&&h==h.Next||r&&h.Prev==h.Next)return!1;r||(this.m_HasOpenPaths=!0,c.Prev.OutIdx=n.ClipperBase.Skip),h=c;do{this.InitEdge2(h,e),h=h.Next,a&&h.Curr.Y!=c.Curr.Y&&(a=!1)}while(h!=c);if(a){if(r)return!1;for(h.Prev.OutIdx=n.ClipperBase.Skip,h.Prev.Bot.X<h.Prev.Top.X&&this.ReverseHorizontal(h.Prev),(d=new n.LocalMinima).Next=null,d.Y=h.Bot.Y,d.LeftBound=null,d.RightBound=h,d.RightBound.Side=n.EdgeSide.esRight,d.RightBound.WindDelta=0;h.Next.OutIdx!=n.ClipperBase.Skip;)h.NextInLML=h.Next,h.Bot.X!=h.Prev.Top.X&&this.ReverseHorizontal(h),h=h.Next;return this.InsertLocalMinima(d),this.m_edges.push(o),!0}this.m_edges.push(o);var p=null;for(n.IntPoint.op_Equality(h.Prev.Bot,h.Prev.Top)&&(h=h.Next);(h=this.FindNextLocMin(h))!=p;){var d;null==p&&(p=h),(d=new n.LocalMinima).Next=null,d.Y=h.Bot.Y,h.Dx<h.Prev.Dx?(d.LeftBound=h.Prev,d.RightBound=h,u=!1):(d.LeftBound=h,d.RightBound=h.Prev,u=!0),d.LeftBound.Side=n.EdgeSide.esLeft,d.RightBound.Side=n.EdgeSide.esRight,r?d.LeftBound.Next==d.RightBound?d.LeftBound.WindDelta=-1:d.LeftBound.WindDelta=1:d.LeftBound.WindDelta=0,d.RightBound.WindDelta=-d.LeftBound.WindDelta,(h=this.ProcessBound(d.LeftBound,u)).OutIdx==n.ClipperBase.Skip&&(h=this.ProcessBound(h,u));var y=this.ProcessBound(d.RightBound,!u);y.OutIdx==n.ClipperBase.Skip&&(y=this.ProcessBound(y,!u)),d.LeftBound.OutIdx==n.ClipperBase.Skip?d.LeftBound=null:d.RightBound.OutIdx==n.ClipperBase.Skip&&(d.RightBound=null),this.InsertLocalMinima(d),u||(h=y)}return!0},n.ClipperBase.prototype.AddPaths=function(t,e,n){for(var r=!1,i=0,o=t.length;i<o;++i)this.AddPath(t[i],e,n)&&(r=!0);return r},n.ClipperBase.prototype.Pt2IsBetweenPt1AndPt3=function(t,e,r){return!(n.IntPoint.op_Equality(t,r)||n.IntPoint.op_Equality(t,e)||n.IntPoint.op_Equality(r,e))&&(t.X!=r.X?e.X>t.X==e.X<r.X:e.Y>t.Y==e.Y<r.Y)},n.ClipperBase.prototype.RemoveEdge=function(t){t.Prev.Next=t.Next,t.Next.Prev=t.Prev;var e=t.Next;return t.Prev=null,e},n.ClipperBase.prototype.SetDx=function(t){t.Delta.X=t.Top.X-t.Bot.X,t.Delta.Y=t.Top.Y-t.Bot.Y,0===t.Delta.Y?t.Dx=n.ClipperBase.horizontal:t.Dx=t.Delta.X/t.Delta.Y},n.ClipperBase.prototype.InsertLocalMinima=function(t){if(null===this.m_MinimaList)this.m_MinimaList=t;else if(t.Y>=this.m_MinimaList.Y)t.Next=this.m_MinimaList,this.m_MinimaList=t;else{for(var e=this.m_MinimaList;null!==e.Next&&t.Y<e.Next.Y;)e=e.Next;t.Next=e.Next,e.Next=t}},n.ClipperBase.prototype.PopLocalMinima=function(){null!==this.m_CurrentLM&&(this.m_CurrentLM=this.m_CurrentLM.Next)},n.ClipperBase.prototype.ReverseHorizontal=function(t){var e=t.Top.X;t.Top.X=t.Bot.X,t.Bot.X=e},n.ClipperBase.prototype.Reset=function(){if(this.m_CurrentLM=this.m_MinimaList,null!=this.m_CurrentLM)for(var t=this.m_MinimaList;null!=t;){var e=t.LeftBound;null!=e&&(e.Curr.X=e.Bot.X,e.Curr.Y=e.Bot.Y,e.Side=n.EdgeSide.esLeft,e.OutIdx=n.ClipperBase.Unassigned),null!=(e=t.RightBound)&&(e.Curr.X=e.Bot.X,e.Curr.Y=e.Bot.Y,e.Side=n.EdgeSide.esRight,e.OutIdx=n.ClipperBase.Unassigned),t=t.Next}},n.Clipper=function(t){void 0===t&&(t=0),this.m_PolyOuts=null,this.m_ClipType=n.ClipType.ctIntersection,this.m_Scanbeam=null,this.m_ActiveEdges=null,this.m_SortedEdges=null,this.m_IntersectList=null,this.m_IntersectNodeComparer=null,this.m_ExecuteLocked=!1,this.m_ClipFillType=n.PolyFillType.pftEvenOdd,this.m_SubjFillType=n.PolyFillType.pftEvenOdd,this.m_Joins=null,this.m_GhostJoins=null,this.m_UsingPolyTree=!1,this.ReverseSolution=!1,this.StrictlySimple=!1,n.ClipperBase.call(this),this.m_Scanbeam=null,this.m_ActiveEdges=null,this.m_SortedEdges=null,this.m_IntersectList=new Array,this.m_IntersectNodeComparer=n.MyIntersectNodeSort.Compare,this.m_ExecuteLocked=!1,this.m_UsingPolyTree=!1,this.m_PolyOuts=new Array,this.m_Joins=new Array,this.m_GhostJoins=new Array,this.ReverseSolution=0!=(1&t),this.StrictlySimple=0!=(2&t),this.PreserveCollinear=0!=(4&t)},n.Clipper.ioReverseSolution=1,n.Clipper.ioStrictlySimple=2,n.Clipper.ioPreserveCollinear=4,n.Clipper.prototype.Clear=function(){0!==this.m_edges.length&&(this.DisposeAllPolyPts(),n.ClipperBase.prototype.Clear.call(this))},n.Clipper.prototype.DisposeScanbeamList=function(){for(;null!==this.m_Scanbeam;){var t=this.m_Scanbeam.Next;this.m_Scanbeam=null,this.m_Scanbeam=t}},n.Clipper.prototype.Reset=function(){n.ClipperBase.prototype.Reset.call(this),this.m_Scanbeam=null,this.m_ActiveEdges=null,this.m_SortedEdges=null;for(var t=this.m_MinimaList;null!==t;)this.InsertScanbeam(t.Y),t=t.Next},n.Clipper.prototype.InsertScanbeam=function(t){if(null===this.m_Scanbeam)this.m_Scanbeam=new n.Scanbeam,this.m_Scanbeam.Next=null,this.m_Scanbeam.Y=t;else if(t>this.m_Scanbeam.Y){(r=new n.Scanbeam).Y=t,r.Next=this.m_Scanbeam,this.m_Scanbeam=r}else{for(var e=this.m_Scanbeam;null!==e.Next&&t<=e.Next.Y;)e=e.Next;if(t==e.Y)return;var r;(r=new n.Scanbeam).Y=t,r.Next=e.Next,e.Next=r}},n.Clipper.prototype.Execute=function(){var t=arguments,e=t.length,r=t[1]instanceof n.PolyTree;if(4==e&&!r){var i=t[0],o=t[1],s=t[2],a=t[3];if(this.m_ExecuteLocked)return!1;this.m_HasOpenPaths&&n.Error("Error: PolyTree struct is need for open path clipping."),this.m_ExecuteLocked=!0,n.Clear(o),this.m_SubjFillType=s,this.m_ClipFillType=a,this.m_ClipType=i,this.m_UsingPolyTree=!1;try{(u=this.ExecuteInternal())&&this.BuildResult(o)}finally{this.DisposeAllPolyPts(),this.m_ExecuteLocked=!1}return u}if(4==e&&r){i=t[0];var l=t[1];s=t[2],a=t[3];if(this.m_ExecuteLocked)return!1;this.m_ExecuteLocked=!0,this.m_SubjFillType=s,this.m_ClipFillType=a,this.m_ClipType=i,this.m_UsingPolyTree=!0;try{var u;(u=this.ExecuteInternal())&&this.BuildResult2(l)}finally{this.DisposeAllPolyPts(),this.m_ExecuteLocked=!1}return u}if(2==e&&!r){i=t[0],o=t[1];return this.Execute(i,o,n.PolyFillType.pftEvenOdd,n.PolyFillType.pftEvenOdd)}if(2==e&&r){i=t[0],l=t[1];return this.Execute(i,l,n.PolyFillType.pftEvenOdd,n.PolyFillType.pftEvenOdd)}},n.Clipper.prototype.FixHoleLinkage=function(t){if(null!==t.FirstLeft&&(t.IsHole==t.FirstLeft.IsHole||null===t.FirstLeft.Pts)){for(var e=t.FirstLeft;null!==e&&(e.IsHole==t.IsHole||null===e.Pts);)e=e.FirstLeft;t.FirstLeft=e}},n.Clipper.prototype.ExecuteInternal=function(){try{if(this.Reset(),null===this.m_CurrentLM)return!1;var t=this.PopScanbeam();do{if(this.InsertLocalMinimaIntoAEL(t),n.Clear(this.m_GhostJoins),this.ProcessHorizontals(!1),null===this.m_Scanbeam)break;var e=this.PopScanbeam();if(!this.ProcessIntersections(e))return!1;this.ProcessEdgesAtTopOfScanbeam(e),t=e}while(null!==this.m_Scanbeam||null!==this.m_CurrentLM);for(var r=0,i=this.m_PolyOuts.length;r<i;r++){null===(o=this.m_PolyOuts[r]).Pts||o.IsOpen||(o.IsHole^this.ReverseSolution)==this.Area(o)>0&&this.ReversePolyPtLinks(o.Pts)}this.JoinCommonEdges();for(r=0,i=this.m_PolyOuts.length;r<i;r++){var o;null===(o=this.m_PolyOuts[r]).Pts||o.IsOpen||this.FixupOutPolygon(o)}return this.StrictlySimple&&this.DoSimplePolygons(),!0}finally{n.Clear(this.m_Joins),n.Clear(this.m_GhostJoins)}},n.Clipper.prototype.PopScanbeam=function(){var t=this.m_Scanbeam.Y;return this.m_Scanbeam=this.m_Scanbeam.Next,t},n.Clipper.prototype.DisposeAllPolyPts=function(){for(var t=0,e=this.m_PolyOuts.length;t<e;++t)this.DisposeOutRec(t);n.Clear(this.m_PolyOuts)},n.Clipper.prototype.DisposeOutRec=function(t){var e=this.m_PolyOuts[t];e.Pts=null,e=null,this.m_PolyOuts[t]=null},n.Clipper.prototype.AddJoin=function(t,e,r){var i=new n.Join;i.OutPt1=t,i.OutPt2=e,i.OffPt.X=r.X,i.OffPt.Y=r.Y,this.m_Joins.push(i)},n.Clipper.prototype.AddGhostJoin=function(t,e){var r=new n.Join;r.OutPt1=t,r.OffPt.X=e.X,r.OffPt.Y=e.Y,this.m_GhostJoins.push(r)},n.Clipper.prototype.InsertLocalMinimaIntoAEL=function(t){for(;null!==this.m_CurrentLM&&this.m_CurrentLM.Y==t;){var e=this.m_CurrentLM.LeftBound,r=this.m_CurrentLM.RightBound;this.PopLocalMinima();var i=null;if(null===e?(this.InsertEdgeIntoAEL(r,null),this.SetWindingCount(r),this.IsContributing(r)&&(i=this.AddOutPt(r,r.Bot))):null==r?(this.InsertEdgeIntoAEL(e,null),this.SetWindingCount(e),this.IsContributing(e)&&(i=this.AddOutPt(e,e.Bot)),this.InsertScanbeam(e.Top.Y)):(this.InsertEdgeIntoAEL(e,null),this.InsertEdgeIntoAEL(r,e),this.SetWindingCount(e),r.WindCnt=e.WindCnt,r.WindCnt2=e.WindCnt2,this.IsContributing(e)&&(i=this.AddLocalMinPoly(e,r,e.Bot)),this.InsertScanbeam(e.Top.Y)),null!=r&&(n.ClipperBase.IsHorizontal(r)?this.AddEdgeToSEL(r):this.InsertScanbeam(r.Top.Y)),null!=e&&null!=r){if(null!==i&&n.ClipperBase.IsHorizontal(r)&&this.m_GhostJoins.length>0&&0!==r.WindDelta)for(var o=0,s=this.m_GhostJoins.length;o<s;o++){var a=this.m_GhostJoins[o];this.HorzSegmentsOverlap(a.OutPt1.Pt.X,a.OffPt.X,r.Bot.X,r.Top.X)&&this.AddJoin(a.OutPt1,i,a.OffPt)}if(e.OutIdx>=0&&null!==e.PrevInAEL&&e.PrevInAEL.Curr.X==e.Bot.X&&e.PrevInAEL.OutIdx>=0&&n.ClipperBase.SlopesEqual(e.PrevInAEL,e,this.m_UseFullRange)&&0!==e.WindDelta&&0!==e.PrevInAEL.WindDelta){var l=this.AddOutPt(e.PrevInAEL,e.Bot);this.AddJoin(i,l,e.Top)}if(e.NextInAEL!=r){if(r.OutIdx>=0&&r.PrevInAEL.OutIdx>=0&&n.ClipperBase.SlopesEqual(r.PrevInAEL,r,this.m_UseFullRange)&&0!==r.WindDelta&&0!==r.PrevInAEL.WindDelta){l=this.AddOutPt(r.PrevInAEL,r.Bot);this.AddJoin(i,l,r.Top)}var u=e.NextInAEL;if(null!==u)for(;u!=r;)this.IntersectEdges(r,u,e.Curr,!1),u=u.NextInAEL}}}},n.Clipper.prototype.InsertEdgeIntoAEL=function(t,e){if(null===this.m_ActiveEdges)t.PrevInAEL=null,t.NextInAEL=null,this.m_ActiveEdges=t;else if(null===e&&this.E2InsertsBeforeE1(this.m_ActiveEdges,t))t.PrevInAEL=null,t.NextInAEL=this.m_ActiveEdges,this.m_ActiveEdges.PrevInAEL=t,this.m_ActiveEdges=t;else{for(null===e&&(e=this.m_ActiveEdges);null!==e.NextInAEL&&!this.E2InsertsBeforeE1(e.NextInAEL,t);)e=e.NextInAEL;t.NextInAEL=e.NextInAEL,null!==e.NextInAEL&&(e.NextInAEL.PrevInAEL=t),t.PrevInAEL=e,e.NextInAEL=t}},n.Clipper.prototype.E2InsertsBeforeE1=function(t,e){return e.Curr.X==t.Curr.X?e.Top.Y>t.Top.Y?e.Top.X<n.Clipper.TopX(t,e.Top.Y):t.Top.X>n.Clipper.TopX(e,t.Top.Y):e.Curr.X<t.Curr.X},n.Clipper.prototype.IsEvenOddFillType=function(t){return t.PolyTyp==n.PolyType.ptSubject?this.m_SubjFillType==n.PolyFillType.pftEvenOdd:this.m_ClipFillType==n.PolyFillType.pftEvenOdd},n.Clipper.prototype.IsEvenOddAltFillType=function(t){return t.PolyTyp==n.PolyType.ptSubject?this.m_ClipFillType==n.PolyFillType.pftEvenOdd:this.m_SubjFillType==n.PolyFillType.pftEvenOdd},n.Clipper.prototype.IsContributing=function(t){var e,r;switch(t.PolyTyp==n.PolyType.ptSubject?(e=this.m_SubjFillType,r=this.m_ClipFillType):(e=this.m_ClipFillType,r=this.m_SubjFillType),e){case n.PolyFillType.pftEvenOdd:if(0===t.WindDelta&&1!=t.WindCnt)return!1;break;case n.PolyFillType.pftNonZero:if(1!=Math.abs(t.WindCnt))return!1;break;case n.PolyFillType.pftPositive:if(1!=t.WindCnt)return!1;break;default:if(-1!=t.WindCnt)return!1}switch(this.m_ClipType){case n.ClipType.ctIntersection:switch(r){case n.PolyFillType.pftEvenOdd:case n.PolyFillType.pftNonZero:return 0!==t.WindCnt2;case n.PolyFillType.pftPositive:return t.WindCnt2>0;default:return t.WindCnt2<0}case n.ClipType.ctUnion:switch(r){case n.PolyFillType.pftEvenOdd:case n.PolyFillType.pftNonZero:return 0===t.WindCnt2;case n.PolyFillType.pftPositive:return t.WindCnt2<=0;default:return t.WindCnt2>=0}case n.ClipType.ctDifference:if(t.PolyTyp==n.PolyType.ptSubject)switch(r){case n.PolyFillType.pftEvenOdd:case n.PolyFillType.pftNonZero:return 0===t.WindCnt2;case n.PolyFillType.pftPositive:return t.WindCnt2<=0;default:return t.WindCnt2>=0}else switch(r){case n.PolyFillType.pftEvenOdd:case n.PolyFillType.pftNonZero:return 0!==t.WindCnt2;case n.PolyFillType.pftPositive:return t.WindCnt2>0;default:return t.WindCnt2<0}case n.ClipType.ctXor:if(0!==t.WindDelta)return!0;switch(r){case n.PolyFillType.pftEvenOdd:case n.PolyFillType.pftNonZero:return 0===t.WindCnt2;case n.PolyFillType.pftPositive:return t.WindCnt2<=0;default:return t.WindCnt2>=0}}return!0},n.Clipper.prototype.SetWindingCount=function(t){for(var e=t.PrevInAEL;null!==e&&(e.PolyTyp!=t.PolyTyp||0===e.WindDelta);)e=e.PrevInAEL;if(null===e)t.WindCnt=0===t.WindDelta?1:t.WindDelta,t.WindCnt2=0,e=this.m_ActiveEdges;else if(0===t.WindDelta&&this.m_ClipType!=n.ClipType.ctUnion)t.WindCnt=1,t.WindCnt2=e.WindCnt2,e=e.NextInAEL;else if(this.IsEvenOddFillType(t)){if(0===t.WindDelta){for(var r=!0,i=e.PrevInAEL;null!==i;)i.PolyTyp==e.PolyTyp&&0!==i.WindDelta&&(r=!r),i=i.PrevInAEL;t.WindCnt=r?0:1}else t.WindCnt=t.WindDelta;t.WindCnt2=e.WindCnt2,e=e.NextInAEL}else e.WindCnt*e.WindDelta<0?Math.abs(e.WindCnt)>1?e.WindDelta*t.WindDelta<0?t.WindCnt=e.WindCnt:t.WindCnt=e.WindCnt+t.WindDelta:t.WindCnt=0===t.WindDelta?1:t.WindDelta:0===t.WindDelta?t.WindCnt=e.WindCnt<0?e.WindCnt-1:e.WindCnt+1:e.WindDelta*t.WindDelta<0?t.WindCnt=e.WindCnt:t.WindCnt=e.WindCnt+t.WindDelta,t.WindCnt2=e.WindCnt2,e=e.NextInAEL;if(this.IsEvenOddAltFillType(t))for(;e!=t;)0!==e.WindDelta&&(t.WindCnt2=0===t.WindCnt2?1:0),e=e.NextInAEL;else for(;e!=t;)t.WindCnt2+=e.WindDelta,e=e.NextInAEL},n.Clipper.prototype.AddEdgeToSEL=function(t){null===this.m_SortedEdges?(this.m_SortedEdges=t,t.PrevInSEL=null,t.NextInSEL=null):(t.NextInSEL=this.m_SortedEdges,t.PrevInSEL=null,this.m_SortedEdges.PrevInSEL=t,this.m_SortedEdges=t)},n.Clipper.prototype.CopyAELToSEL=function(){var t=this.m_ActiveEdges;for(this.m_SortedEdges=t;null!==t;)t.PrevInSEL=t.PrevInAEL,t.NextInSEL=t.NextInAEL,t=t.NextInAEL},n.Clipper.prototype.SwapPositionsInAEL=function(t,e){if(t.NextInAEL!=t.PrevInAEL&&e.NextInAEL!=e.PrevInAEL){if(t.NextInAEL==e)null!==(n=e.NextInAEL)&&(n.PrevInAEL=t),null!==(r=t.PrevInAEL)&&(r.NextInAEL=e),e.PrevInAEL=r,e.NextInAEL=t,t.PrevInAEL=e,t.NextInAEL=n;else if(e.NextInAEL==t){null!==(n=t.NextInAEL)&&(n.PrevInAEL=e),null!==(r=e.PrevInAEL)&&(r.NextInAEL=t),t.PrevInAEL=r,t.NextInAEL=e,e.PrevInAEL=t,e.NextInAEL=n}else{var n=t.NextInAEL,r=t.PrevInAEL;t.NextInAEL=e.NextInAEL,null!==t.NextInAEL&&(t.NextInAEL.PrevInAEL=t),t.PrevInAEL=e.PrevInAEL,null!==t.PrevInAEL&&(t.PrevInAEL.NextInAEL=t),e.NextInAEL=n,null!==e.NextInAEL&&(e.NextInAEL.PrevInAEL=e),e.PrevInAEL=r,null!==e.PrevInAEL&&(e.PrevInAEL.NextInAEL=e)}null===t.PrevInAEL?this.m_ActiveEdges=t:null===e.PrevInAEL&&(this.m_ActiveEdges=e)}},n.Clipper.prototype.SwapPositionsInSEL=function(t,e){if(!(null===t.NextInSEL&&null===t.PrevInSEL||null===e.NextInSEL&&null===e.PrevInSEL)){if(t.NextInSEL==e)null!==(n=e.NextInSEL)&&(n.PrevInSEL=t),null!==(r=t.PrevInSEL)&&(r.NextInSEL=e),e.PrevInSEL=r,e.NextInSEL=t,t.PrevInSEL=e,t.NextInSEL=n;else if(e.NextInSEL==t){null!==(n=t.NextInSEL)&&(n.PrevInSEL=e),null!==(r=e.PrevInSEL)&&(r.NextInSEL=t),t.PrevInSEL=r,t.NextInSEL=e,e.PrevInSEL=t,e.NextInSEL=n}else{var n=t.NextInSEL,r=t.PrevInSEL;t.NextInSEL=e.NextInSEL,null!==t.NextInSEL&&(t.NextInSEL.PrevInSEL=t),t.PrevInSEL=e.PrevInSEL,null!==t.PrevInSEL&&(t.PrevInSEL.NextInSEL=t),e.NextInSEL=n,null!==e.NextInSEL&&(e.NextInSEL.PrevInSEL=e),e.PrevInSEL=r,null!==e.PrevInSEL&&(e.PrevInSEL.NextInSEL=e)}null===t.PrevInSEL?this.m_SortedEdges=t:null===e.PrevInSEL&&(this.m_SortedEdges=e)}},n.Clipper.prototype.AddLocalMaxPoly=function(t,e,n){this.AddOutPt(t,n),0==e.WindDelta&&this.AddOutPt(e,n),t.OutIdx==e.OutIdx?(t.OutIdx=-1,e.OutIdx=-1):t.OutIdx<e.OutIdx?this.AppendPolygon(t,e):this.AppendPolygon(e,t)},n.Clipper.prototype.AddLocalMinPoly=function(t,e,r){var i,o,s;if(n.ClipperBase.IsHorizontal(e)||t.Dx>e.Dx?(i=this.AddOutPt(t,r),e.OutIdx=t.OutIdx,t.Side=n.EdgeSide.esLeft,e.Side=n.EdgeSide.esRight,s=(o=t).PrevInAEL==e?e.PrevInAEL:o.PrevInAEL):(i=this.AddOutPt(e,r),t.OutIdx=e.OutIdx,t.Side=n.EdgeSide.esRight,e.Side=n.EdgeSide.esLeft,s=(o=e).PrevInAEL==t?t.PrevInAEL:o.PrevInAEL),null!==s&&s.OutIdx>=0&&n.Clipper.TopX(s,r.Y)==n.Clipper.TopX(o,r.Y)&&n.ClipperBase.SlopesEqual(o,s,this.m_UseFullRange)&&0!==o.WindDelta&&0!==s.WindDelta){var a=this.AddOutPt(s,r);this.AddJoin(i,a,o.Top)}return i},n.Clipper.prototype.CreateOutRec=function(){var t=new n.OutRec;return t.Idx=-1,t.IsHole=!1,t.IsOpen=!1,t.FirstLeft=null,t.Pts=null,t.BottomPt=null,t.PolyNode=null,this.m_PolyOuts.push(t),t.Idx=this.m_PolyOuts.length-1,t},n.Clipper.prototype.AddOutPt=function(t,e){var r=t.Side==n.EdgeSide.esLeft;if(t.OutIdx<0){(o=this.CreateOutRec()).IsOpen=0===t.WindDelta;var i=new n.OutPt;return o.Pts=i,i.Idx=o.Idx,i.Pt.X=e.X,i.Pt.Y=e.Y,i.Next=i,i.Prev=i,o.IsOpen||this.SetHoleState(t,o),t.OutIdx=o.Idx,i}var o,s=(o=this.m_PolyOuts[t.OutIdx]).Pts;return r&&n.IntPoint.op_Equality(e,s.Pt)?s:!r&&n.IntPoint.op_Equality(e,s.Prev.Pt)?s.Prev:((i=new n.OutPt).Idx=o.Idx,i.Pt.X=e.X,i.Pt.Y=e.Y,i.Next=s,i.Prev=s.Prev,i.Prev.Next=i,s.Prev=i,r&&(o.Pts=i),i)},n.Clipper.prototype.SwapPoints=function(t,e){var r=new n.IntPoint(t.Value);t.Value.X=e.Value.X,t.Value.Y=e.Value.Y,e.Value.X=r.X,e.Value.Y=r.Y},n.Clipper.prototype.HorzSegmentsOverlap=function(t,e,n,r){var i;return t>e&&(i=t,t=e,e=i),n>r&&(i=n,n=r,r=i),t<r&&n<e},n.Clipper.prototype.SetHoleState=function(t,e){for(var n=!1,r=t.PrevInAEL;null!==r;)r.OutIdx>=0&&0!=r.WindDelta&&(n=!n,null===e.FirstLeft&&(e.FirstLeft=this.m_PolyOuts[r.OutIdx])),r=r.PrevInAEL;n&&(e.IsHole=!0)},n.Clipper.prototype.GetDx=function(t,e){return t.Y==e.Y?n.ClipperBase.horizontal:(e.X-t.X)/(e.Y-t.Y)},n.Clipper.prototype.FirstIsBottomPt=function(t,e){for(var r=t.Prev;n.IntPoint.op_Equality(r.Pt,t.Pt)&&r!=t;)r=r.Prev;var i=Math.abs(this.GetDx(t.Pt,r.Pt));for(r=t.Next;n.IntPoint.op_Equality(r.Pt,t.Pt)&&r!=t;)r=r.Next;var o=Math.abs(this.GetDx(t.Pt,r.Pt));for(r=e.Prev;n.IntPoint.op_Equality(r.Pt,e.Pt)&&r!=e;)r=r.Prev;var s=Math.abs(this.GetDx(e.Pt,r.Pt));for(r=e.Next;n.IntPoint.op_Equality(r.Pt,e.Pt)&&r!=e;)r=r.Next;var a=Math.abs(this.GetDx(e.Pt,r.Pt));return i>=s&&i>=a||o>=s&&o>=a},n.Clipper.prototype.GetBottomPt=function(t){for(var e=null,r=t.Next;r!=t;)r.Pt.Y>t.Pt.Y?(t=r,e=null):r.Pt.Y==t.Pt.Y&&r.Pt.X<=t.Pt.X&&(r.Pt.X<t.Pt.X?(e=null,t=r):r.Next!=t&&r.Prev!=t&&(e=r)),r=r.Next;if(null!==e)for(;e!=r;)for(this.FirstIsBottomPt(r,e)||(t=e),e=e.Next;n.IntPoint.op_Inequality(e.Pt,t.Pt);)e=e.Next;return t},n.Clipper.prototype.GetLowermostRec=function(t,e){null===t.BottomPt&&(t.BottomPt=this.GetBottomPt(t.Pts)),null===e.BottomPt&&(e.BottomPt=this.GetBottomPt(e.Pts));var n=t.BottomPt,r=e.BottomPt;return n.Pt.Y>r.Pt.Y?t:n.Pt.Y<r.Pt.Y?e:n.Pt.X<r.Pt.X?t:n.Pt.X>r.Pt.X?e:n.Next==n?e:r.Next==r?t:this.FirstIsBottomPt(n,r)?t:e},n.Clipper.prototype.Param1RightOfParam2=function(t,e){do{if((t=t.FirstLeft)==e)return!0}while(null!==t);return!1},n.Clipper.prototype.GetOutRec=function(t){for(var e=this.m_PolyOuts[t];e!=this.m_PolyOuts[e.Idx];)e=this.m_PolyOuts[e.Idx];return e},n.Clipper.prototype.AppendPolygon=function(t,e){var r,i=this.m_PolyOuts[t.OutIdx],o=this.m_PolyOuts[e.OutIdx];r=this.Param1RightOfParam2(i,o)?o:this.Param1RightOfParam2(o,i)?i:this.GetLowermostRec(i,o);var s,a=i.Pts,l=a.Prev,u=o.Pts,c=u.Prev;t.Side==n.EdgeSide.esLeft?(e.Side==n.EdgeSide.esLeft?(this.ReversePolyPtLinks(u),u.Next=a,a.Prev=u,l.Next=c,c.Prev=l,i.Pts=c):(c.Next=a,a.Prev=c,u.Prev=l,l.Next=u,i.Pts=u),s=n.EdgeSide.esLeft):(e.Side==n.EdgeSide.esRight?(this.ReversePolyPtLinks(u),l.Next=c,c.Prev=l,u.Next=a,a.Prev=u):(l.Next=u,u.Prev=l,a.Prev=c,c.Next=a),s=n.EdgeSide.esRight),i.BottomPt=null,r==o&&(o.FirstLeft!=i&&(i.FirstLeft=o.FirstLeft),i.IsHole=o.IsHole),o.Pts=null,o.BottomPt=null,o.FirstLeft=i;var h=t.OutIdx,f=e.OutIdx;t.OutIdx=-1,e.OutIdx=-1;for(var p=this.m_ActiveEdges;null!==p;){if(p.OutIdx==f){p.OutIdx=h,p.Side=s;break}p=p.NextInAEL}o.Idx=i.Idx},n.Clipper.prototype.ReversePolyPtLinks=function(t){if(null!==t){var e,n;e=t;do{n=e.Next,e.Next=e.Prev,e.Prev=n,e=n}while(e!=t)}},n.Clipper.SwapSides=function(t,e){var n=t.Side;t.Side=e.Side,e.Side=n},n.Clipper.SwapPolyIndexes=function(t,e){var n=t.OutIdx;t.OutIdx=e.OutIdx,e.OutIdx=n},n.Clipper.prototype.IntersectEdges=function(t,e,r){var i=t.OutIdx>=0,o=e.OutIdx>=0;if(0!==t.WindDelta&&0!==e.WindDelta){if(t.PolyTyp==e.PolyTyp)if(this.IsEvenOddFillType(t)){var s=t.WindCnt;t.WindCnt=e.WindCnt,e.WindCnt=s}else t.WindCnt+e.WindDelta===0?t.WindCnt=-t.WindCnt:t.WindCnt+=e.WindDelta,e.WindCnt-t.WindDelta==0?e.WindCnt=-e.WindCnt:e.WindCnt-=t.WindDelta;else this.IsEvenOddFillType(e)?t.WindCnt2=0===t.WindCnt2?1:0:t.WindCnt2+=e.WindDelta,this.IsEvenOddFillType(t)?e.WindCnt2=0===e.WindCnt2?1:0:e.WindCnt2-=t.WindDelta;var a,l,u,c,h,f;switch(t.PolyTyp==n.PolyType.ptSubject?(a=this.m_SubjFillType,u=this.m_ClipFillType):(a=this.m_ClipFillType,u=this.m_SubjFillType),e.PolyTyp==n.PolyType.ptSubject?(l=this.m_SubjFillType,c=this.m_ClipFillType):(l=this.m_ClipFillType,c=this.m_SubjFillType),a){case n.PolyFillType.pftPositive:h=t.WindCnt;break;case n.PolyFillType.pftNegative:h=-t.WindCnt;break;default:h=Math.abs(t.WindCnt)}switch(l){case n.PolyFillType.pftPositive:f=e.WindCnt;break;case n.PolyFillType.pftNegative:f=-e.WindCnt;break;default:f=Math.abs(e.WindCnt)}if(i&&o)0!=h&&1!=h||0!=f&&1!=f||t.PolyTyp!=e.PolyTyp&&this.m_ClipType!=n.ClipType.ctXor?this.AddLocalMaxPoly(t,e,r):(this.AddOutPt(t,r),this.AddOutPt(e,r),n.Clipper.SwapSides(t,e),n.Clipper.SwapPolyIndexes(t,e));else if(i)0!==f&&1!=f||(this.AddOutPt(t,r),n.Clipper.SwapSides(t,e),n.Clipper.SwapPolyIndexes(t,e));else if(o)0!==h&&1!=h||(this.AddOutPt(e,r),n.Clipper.SwapSides(t,e),n.Clipper.SwapPolyIndexes(t,e));else if(!(0!=h&&1!=h||0!=f&&1!=f)){var p,d;switch(u){case n.PolyFillType.pftPositive:p=t.WindCnt2;break;case n.PolyFillType.pftNegative:p=-t.WindCnt2;break;default:p=Math.abs(t.WindCnt2)}switch(c){case n.PolyFillType.pftPositive:d=e.WindCnt2;break;case n.PolyFillType.pftNegative:d=-e.WindCnt2;break;default:d=Math.abs(e.WindCnt2)}if(t.PolyTyp!=e.PolyTyp)this.AddLocalMinPoly(t,e,r);else if(1==h&&1==f)switch(this.m_ClipType){case n.ClipType.ctIntersection:p>0&&d>0&&this.AddLocalMinPoly(t,e,r);break;case n.ClipType.ctUnion:p<=0&&d<=0&&this.AddLocalMinPoly(t,e,r);break;case n.ClipType.ctDifference:(t.PolyTyp==n.PolyType.ptClip&&p>0&&d>0||t.PolyTyp==n.PolyType.ptSubject&&p<=0&&d<=0)&&this.AddLocalMinPoly(t,e,r);break;case n.ClipType.ctXor:this.AddLocalMinPoly(t,e,r)}else n.Clipper.SwapSides(t,e)}}else{if(0==t.WindDelta&&0==e.WindDelta)return;t.PolyTyp==e.PolyTyp&&t.WindDelta!=e.WindDelta&&this.m_ClipType==n.ClipType.ctUnion?0===t.WindDelta?o&&(this.AddOutPt(t,r),i&&(t.OutIdx=-1)):i&&(this.AddOutPt(e,r),o&&(e.OutIdx=-1)):t.PolyTyp!=e.PolyTyp&&(0!==t.WindDelta||1!=Math.abs(e.WindCnt)||this.m_ClipType==n.ClipType.ctUnion&&0!==e.WindCnt2?0!==e.WindDelta||1!=Math.abs(t.WindCnt)||this.m_ClipType==n.ClipType.ctUnion&&0!==t.WindCnt2||(this.AddOutPt(e,r),o&&(e.OutIdx=-1)):(this.AddOutPt(t,r),i&&(t.OutIdx=-1)))}},n.Clipper.prototype.DeleteFromAEL=function(t){var e=t.PrevInAEL,n=t.NextInAEL;null===e&&null===n&&t!=this.m_ActiveEdges||(null!==e?e.NextInAEL=n:this.m_ActiveEdges=n,null!==n&&(n.PrevInAEL=e),t.NextInAEL=null,t.PrevInAEL=null)},n.Clipper.prototype.DeleteFromSEL=function(t){var e=t.PrevInSEL,n=t.NextInSEL;null===e&&null===n&&t!=this.m_SortedEdges||(null!==e?e.NextInSEL=n:this.m_SortedEdges=n,null!==n&&(n.PrevInSEL=e),t.NextInSEL=null,t.PrevInSEL=null)},n.Clipper.prototype.UpdateEdgeIntoAEL=function(t){null===t.NextInLML&&n.Error("UpdateEdgeIntoAEL: invalid call");var e=t.PrevInAEL,r=t.NextInAEL;return t.NextInLML.OutIdx=t.OutIdx,null!==e?e.NextInAEL=t.NextInLML:this.m_ActiveEdges=t.NextInLML,null!==r&&(r.PrevInAEL=t.NextInLML),t.NextInLML.Side=t.Side,t.NextInLML.WindDelta=t.WindDelta,t.NextInLML.WindCnt=t.WindCnt,t.NextInLML.WindCnt2=t.WindCnt2,(t=t.NextInLML).Curr.X=t.Bot.X,t.Curr.Y=t.Bot.Y,t.PrevInAEL=e,t.NextInAEL=r,n.ClipperBase.IsHorizontal(t)||this.InsertScanbeam(t.Top.Y),t},n.Clipper.prototype.ProcessHorizontals=function(t){for(var e=this.m_SortedEdges;null!==e;)this.DeleteFromSEL(e),this.ProcessHorizontal(e,t),e=this.m_SortedEdges},n.Clipper.prototype.GetHorzDirection=function(t,e){t.Bot.X<t.Top.X?(e.Left=t.Bot.X,e.Right=t.Top.X,e.Dir=n.Direction.dLeftToRight):(e.Left=t.Top.X,e.Right=t.Bot.X,e.Dir=n.Direction.dRightToLeft)},n.Clipper.prototype.ProcessHorizontal=function(t,e){var r={Dir:null,Left:null,Right:null};this.GetHorzDirection(t,r);for(var i=r.Dir,o=r.Left,s=r.Right,a=t,l=null;null!==a.NextInLML&&n.ClipperBase.IsHorizontal(a.NextInLML);)a=a.NextInLML;for(null===a.NextInLML&&(l=this.GetMaximaPair(a));;){for(var u=t==a,c=this.GetNextInAEL(t,i);null!==c&&!(c.Curr.X==t.Top.X&&null!==t.NextInLML&&c.Dx<t.NextInLML.Dx);){var h=this.GetNextInAEL(c,i);if(i==n.Direction.dLeftToRight&&c.Curr.X<=s||i==n.Direction.dRightToLeft&&c.Curr.X>=o){if(c==l&&u){if(t.OutIdx>=0){for(var f=this.AddOutPt(t,t.Top),p=this.m_SortedEdges;null!==p;){if(p.OutIdx>=0&&this.HorzSegmentsOverlap(t.Bot.X,t.Top.X,p.Bot.X,p.Top.X)){var d=this.AddOutPt(p,p.Bot);this.AddJoin(d,f,p.Top)}p=p.NextInSEL}this.AddGhostJoin(f,t.Bot),this.AddLocalMaxPoly(t,l,t.Top)}return this.DeleteFromAEL(t),void this.DeleteFromAEL(l)}if(i==n.Direction.dLeftToRight){var y=new n.IntPoint(c.Curr.X,t.Curr.Y);this.IntersectEdges(t,c,y)}else{y=new n.IntPoint(c.Curr.X,t.Curr.Y);this.IntersectEdges(c,t,y)}this.SwapPositionsInAEL(t,c)}else if(i==n.Direction.dLeftToRight&&c.Curr.X>=s||i==n.Direction.dRightToLeft&&c.Curr.X<=o)break;c=h}if(null===t.NextInLML||!n.ClipperBase.IsHorizontal(t.NextInLML))break;(t=this.UpdateEdgeIntoAEL(t)).OutIdx>=0&&this.AddOutPt(t,t.Bot);r={Dir:i,Left:o,Right:s};this.GetHorzDirection(t,r),i=r.Dir,o=r.Left,s=r.Right}if(null!==t.NextInLML)if(t.OutIdx>=0){f=this.AddOutPt(t,t.Top);if(e&&this.AddGhostJoin(f,t.Bot),0===(t=this.UpdateEdgeIntoAEL(t)).WindDelta)return;var _=t.PrevInAEL;h=t.NextInAEL;if(null!==_&&_.Curr.X==t.Bot.X&&_.Curr.Y==t.Bot.Y&&0!==_.WindDelta&&_.OutIdx>=0&&_.Curr.Y>_.Top.Y&&n.ClipperBase.SlopesEqual(t,_,this.m_UseFullRange)){d=this.AddOutPt(_,t.Bot);this.AddJoin(f,d,t.Top)}else if(null!==h&&h.Curr.X==t.Bot.X&&h.Curr.Y==t.Bot.Y&&0!==h.WindDelta&&h.OutIdx>=0&&h.Curr.Y>h.Top.Y&&n.ClipperBase.SlopesEqual(t,h,this.m_UseFullRange)){d=this.AddOutPt(h,t.Bot);this.AddJoin(f,d,t.Top)}}else t=this.UpdateEdgeIntoAEL(t);else t.OutIdx>=0&&this.AddOutPt(t,t.Top),this.DeleteFromAEL(t)},n.Clipper.prototype.GetNextInAEL=function(t,e){return e==n.Direction.dLeftToRight?t.NextInAEL:t.PrevInAEL},n.Clipper.prototype.IsMinima=function(t){return null!==t&&t.Prev.NextInLML!=t&&t.Next.NextInLML!=t},n.Clipper.prototype.IsMaxima=function(t,e){return null!==t&&t.Top.Y==e&&null===t.NextInLML},n.Clipper.prototype.IsIntermediate=function(t,e){return t.Top.Y==e&&null!==t.NextInLML},n.Clipper.prototype.GetMaximaPair=function(t){var e=null;return n.IntPoint.op_Equality(t.Next.Top,t.Top)&&null===t.Next.NextInLML?e=t.Next:n.IntPoint.op_Equality(t.Prev.Top,t.Top)&&null===t.Prev.NextInLML&&(e=t.Prev),null===e||-2!=e.OutIdx&&(e.NextInAEL!=e.PrevInAEL||n.ClipperBase.IsHorizontal(e))?e:null},n.Clipper.prototype.ProcessIntersections=function(t){if(null==this.m_ActiveEdges)return!0;try{if(this.BuildIntersectList(t),0==this.m_IntersectList.length)return!0;if(1!=this.m_IntersectList.length&&!this.FixupIntersectionOrder())return!1;this.ProcessIntersectList()}catch(t){this.m_SortedEdges=null,this.m_IntersectList.length=0,n.Error("ProcessIntersections error")}return this.m_SortedEdges=null,!0},n.Clipper.prototype.BuildIntersectList=function(t){if(null!==this.m_ActiveEdges){var e=this.m_ActiveEdges;for(this.m_SortedEdges=e;null!==e;)e.PrevInSEL=e.PrevInAEL,e.NextInSEL=e.NextInAEL,e.Curr.X=n.Clipper.TopX(e,t),e=e.NextInAEL;for(var r=!0;r&&null!==this.m_SortedEdges;){for(r=!1,e=this.m_SortedEdges;null!==e.NextInSEL;){var i=e.NextInSEL,o=new n.IntPoint;if(e.Curr.X>i.Curr.X){this.IntersectPoint(e,i,o);var s=new n.IntersectNode;s.Edge1=e,s.Edge2=i,s.Pt.X=o.X,s.Pt.Y=o.Y,this.m_IntersectList.push(s),this.SwapPositionsInSEL(e,i),r=!0}else e=i}if(null===e.PrevInSEL)break;e.PrevInSEL.NextInSEL=null}this.m_SortedEdges=null}},n.Clipper.prototype.EdgesAdjacent=function(t){return t.Edge1.NextInSEL==t.Edge2||t.Edge1.PrevInSEL==t.Edge2},n.Clipper.IntersectNodeSort=function(t,e){return e.Pt.Y-t.Pt.Y},n.Clipper.prototype.FixupIntersectionOrder=function(){this.m_IntersectList.sort(this.m_IntersectNodeComparer),this.CopyAELToSEL();for(var t=this.m_IntersectList.length,e=0;e<t;e++){if(!this.EdgesAdjacent(this.m_IntersectList[e])){for(var n=e+1;n<t&&!this.EdgesAdjacent(this.m_IntersectList[n]);)n++;if(n==t)return!1;var r=this.m_IntersectList[e];this.m_IntersectList[e]=this.m_IntersectList[n],this.m_IntersectList[n]=r}this.SwapPositionsInSEL(this.m_IntersectList[e].Edge1,this.m_IntersectList[e].Edge2)}return!0},n.Clipper.prototype.ProcessIntersectList=function(){for(var t=0,e=this.m_IntersectList.length;t<e;t++){var n=this.m_IntersectList[t];this.IntersectEdges(n.Edge1,n.Edge2,n.Pt),this.SwapPositionsInAEL(n.Edge1,n.Edge2)}this.m_IntersectList.length=0};s.msie?n.Clipper.Round=function(t){return t<0?Math.ceil(t-.5):Math.round(t)}:s.chromium?n.Clipper.Round=function(t){return t<0?-Math.round(Math.abs(t)):Math.round(t)}:s.safari?n.Clipper.Round=function(t){return t<0?(t-=.5)<-2147483648?Math.ceil(t):0|t:(t+=.5)>2147483647?Math.floor(t):0|t}:n.Clipper.Round=function(t){return t<0?Math.ceil(t-.5):Math.floor(t+.5)},n.Clipper.TopX=function(t,e){return e==t.Top.Y?t.Top.X:t.Bot.X+n.Clipper.Round(t.Dx*(e-t.Bot.Y))},n.Clipper.prototype.IntersectPoint=function(t,e,r){var i,o;if(r.X=0,r.Y=0,t.Dx==e.Dx)return r.Y=t.Curr.Y,void(r.X=n.Clipper.TopX(t,r.Y));if(0===t.Delta.X)r.X=t.Bot.X,n.ClipperBase.IsHorizontal(e)?r.Y=e.Bot.Y:(o=e.Bot.Y-e.Bot.X/e.Dx,r.Y=n.Clipper.Round(r.X/e.Dx+o));else if(0===e.Delta.X)r.X=e.Bot.X,n.ClipperBase.IsHorizontal(t)?r.Y=t.Bot.Y:(i=t.Bot.Y-t.Bot.X/t.Dx,r.Y=n.Clipper.Round(r.X/t.Dx+i));else{i=t.Bot.X-t.Bot.Y*t.Dx;var s=((o=e.Bot.X-e.Bot.Y*e.Dx)-i)/(t.Dx-e.Dx);r.Y=n.Clipper.Round(s),Math.abs(t.Dx)<Math.abs(e.Dx)?r.X=n.Clipper.Round(t.Dx*s+i):r.X=n.Clipper.Round(e.Dx*s+o)}if(r.Y<t.Top.Y||r.Y<e.Top.Y){if(t.Top.Y>e.Top.Y)return r.Y=t.Top.Y,r.X=n.Clipper.TopX(e,t.Top.Y),r.X<t.Top.X;r.Y=e.Top.Y,Math.abs(t.Dx)<Math.abs(e.Dx)?r.X=n.Clipper.TopX(t,r.Y):r.X=n.Clipper.TopX(e,r.Y)}r.Y>t.Curr.Y&&(r.Y=t.Curr.Y,Math.abs(t.Dx)>Math.abs(e.Dx)?r.X=n.Clipper.TopX(e,r.Y):r.X=n.Clipper.TopX(t,r.Y))},n.Clipper.prototype.ProcessEdgesAtTopOfScanbeam=function(t){for(var e=this.m_ActiveEdges;null!==e;){var r=this.IsMaxima(e,t);if(r){var i=this.GetMaximaPair(e);r=null===i||!n.ClipperBase.IsHorizontal(i)}if(r){var o=e.PrevInAEL;this.DoMaxima(e),e=null===o?this.m_ActiveEdges:o.NextInAEL}else{if(this.IsIntermediate(e,t)&&n.ClipperBase.IsHorizontal(e.NextInLML)?((e=this.UpdateEdgeIntoAEL(e)).OutIdx>=0&&this.AddOutPt(e,e.Bot),this.AddEdgeToSEL(e)):(e.Curr.X=n.Clipper.TopX(e,t),e.Curr.Y=t),this.StrictlySimple){o=e.PrevInAEL;if(e.OutIdx>=0&&0!==e.WindDelta&&null!==o&&o.OutIdx>=0&&o.Curr.X==e.Curr.X&&0!==o.WindDelta){var s=new n.IntPoint(e.Curr),a=this.AddOutPt(o,s),l=this.AddOutPt(e,s);this.AddJoin(a,l,s)}}e=e.NextInAEL}}for(this.ProcessHorizontals(!0),e=this.m_ActiveEdges;null!==e;){if(this.IsIntermediate(e,t)){a=null;e.OutIdx>=0&&(a=this.AddOutPt(e,e.Top));o=(e=this.UpdateEdgeIntoAEL(e)).PrevInAEL;var u=e.NextInAEL;if(null!==o&&o.Curr.X==e.Bot.X&&o.Curr.Y==e.Bot.Y&&null!==a&&o.OutIdx>=0&&o.Curr.Y>o.Top.Y&&n.ClipperBase.SlopesEqual(e,o,this.m_UseFullRange)&&0!==e.WindDelta&&0!==o.WindDelta){l=this.AddOutPt(o,e.Bot);this.AddJoin(a,l,e.Top)}else if(null!==u&&u.Curr.X==e.Bot.X&&u.Curr.Y==e.Bot.Y&&null!==a&&u.OutIdx>=0&&u.Curr.Y>u.Top.Y&&n.ClipperBase.SlopesEqual(e,u,this.m_UseFullRange)&&0!==e.WindDelta&&0!==u.WindDelta){l=this.AddOutPt(u,e.Bot);this.AddJoin(a,l,e.Top)}}e=e.NextInAEL}},n.Clipper.prototype.DoMaxima=function(t){var e=this.GetMaximaPair(t);if(null===e)return t.OutIdx>=0&&this.AddOutPt(t,t.Top),void this.DeleteFromAEL(t);for(var r=t.NextInAEL;null!==r&&r!=e;)this.IntersectEdges(t,r,t.Top),this.SwapPositionsInAEL(t,r),r=t.NextInAEL;-1==t.OutIdx&&-1==e.OutIdx?(this.DeleteFromAEL(t),this.DeleteFromAEL(e)):t.OutIdx>=0&&e.OutIdx>=0?(t.OutIdx>=0&&this.AddLocalMaxPoly(t,e,t.Top),this.DeleteFromAEL(t),this.DeleteFromAEL(e)):0===t.WindDelta?(t.OutIdx>=0&&(this.AddOutPt(t,t.Top),t.OutIdx=-1),this.DeleteFromAEL(t),e.OutIdx>=0&&(this.AddOutPt(e,t.Top),e.OutIdx=-1),this.DeleteFromAEL(e)):n.Error("DoMaxima error")},n.Clipper.ReversePaths=function(t){for(var e=0,n=t.length;e<n;e++)t[e].reverse()},n.Clipper.Orientation=function(t){return n.Clipper.Area(t)>=0},n.Clipper.prototype.PointCount=function(t){if(null===t)return 0;var e=0,n=t;do{e++,n=n.Next}while(n!=t);return e},n.Clipper.prototype.BuildResult=function(t){n.Clear(t);for(var e=0,r=this.m_PolyOuts.length;e<r;e++){var i=this.m_PolyOuts[e];if(null!==i.Pts){var o=i.Pts.Prev,s=this.PointCount(o);if(!(s<2)){for(var a=new Array(s),l=0;l<s;l++)a[l]=o.Pt,o=o.Prev;t.push(a)}}}},n.Clipper.prototype.BuildResult2=function(t){t.Clear();for(var e=0,r=this.m_PolyOuts.length;e<r;e++){var i=this.m_PolyOuts[e],o=this.PointCount(i.Pts);if(!(i.IsOpen&&o<2||!i.IsOpen&&o<3)){this.FixHoleLinkage(i);var s=new n.PolyNode;t.m_AllPolys.push(s),i.PolyNode=s,s.m_polygon.length=o;for(var a=i.Pts.Prev,l=0;l<o;l++)s.m_polygon[l]=a.Pt,a=a.Prev}}for(e=0,r=this.m_PolyOuts.length;e<r;e++){null!==(i=this.m_PolyOuts[e]).PolyNode&&(i.IsOpen?(i.PolyNode.IsOpen=!0,t.AddChild(i.PolyNode)):null!==i.FirstLeft&&null!=i.FirstLeft.PolyNode?i.FirstLeft.PolyNode.AddChild(i.PolyNode):t.AddChild(i.PolyNode))}},n.Clipper.prototype.FixupOutPolygon=function(t){var e=null;t.BottomPt=null;for(var r=t.Pts;;){if(r.Prev==r||r.Prev==r.Next)return void(t.Pts=null);if(n.IntPoint.op_Equality(r.Pt,r.Next.Pt)||n.IntPoint.op_Equality(r.Pt,r.Prev.Pt)||n.ClipperBase.SlopesEqual(r.Prev.Pt,r.Pt,r.Next.Pt,this.m_UseFullRange)&&(!this.PreserveCollinear||!this.Pt2IsBetweenPt1AndPt3(r.Prev.Pt,r.Pt,r.Next.Pt)))e=null,r.Prev.Next=r.Next,r.Next.Prev=r.Prev,r=r.Prev;else{if(r==e)break;null===e&&(e=r),r=r.Next}}t.Pts=r},n.Clipper.prototype.DupOutPt=function(t,e){var r=new n.OutPt;return r.Pt.X=t.Pt.X,r.Pt.Y=t.Pt.Y,r.Idx=t.Idx,e?(r.Next=t.Next,r.Prev=t,t.Next.Prev=r,t.Next=r):(r.Prev=t.Prev,r.Next=t,t.Prev.Next=r,t.Prev=r),r},n.Clipper.prototype.GetOverlap=function(t,e,n,r,i){return t<e?n<r?(i.Left=Math.max(t,n),i.Right=Math.min(e,r)):(i.Left=Math.max(t,r),i.Right=Math.min(e,n)):n<r?(i.Left=Math.max(e,n),i.Right=Math.min(t,r)):(i.Left=Math.max(e,r),i.Right=Math.min(t,n)),i.Left<i.Right},n.Clipper.prototype.JoinHorz=function(t,e,r,i,o,s){var a=t.Pt.X>e.Pt.X?n.Direction.dRightToLeft:n.Direction.dLeftToRight,l=r.Pt.X>i.Pt.X?n.Direction.dRightToLeft:n.Direction.dLeftToRight;if(a==l)return!1;if(a==n.Direction.dLeftToRight){for(;t.Next.Pt.X<=o.X&&t.Next.Pt.X>=t.Pt.X&&t.Next.Pt.Y==o.Y;)t=t.Next;s&&t.Pt.X!=o.X&&(t=t.Next),e=this.DupOutPt(t,!s),n.IntPoint.op_Inequality(e.Pt,o)&&((t=e).Pt.X=o.X,t.Pt.Y=o.Y,e=this.DupOutPt(t,!s))}else{for(;t.Next.Pt.X>=o.X&&t.Next.Pt.X<=t.Pt.X&&t.Next.Pt.Y==o.Y;)t=t.Next;s||t.Pt.X==o.X||(t=t.Next),e=this.DupOutPt(t,s),n.IntPoint.op_Inequality(e.Pt,o)&&((t=e).Pt.X=o.X,t.Pt.Y=o.Y,e=this.DupOutPt(t,s))}if(l==n.Direction.dLeftToRight){for(;r.Next.Pt.X<=o.X&&r.Next.Pt.X>=r.Pt.X&&r.Next.Pt.Y==o.Y;)r=r.Next;s&&r.Pt.X!=o.X&&(r=r.Next),i=this.DupOutPt(r,!s),n.IntPoint.op_Inequality(i.Pt,o)&&((r=i).Pt.X=o.X,r.Pt.Y=o.Y,i=this.DupOutPt(r,!s))}else{for(;r.Next.Pt.X>=o.X&&r.Next.Pt.X<=r.Pt.X&&r.Next.Pt.Y==o.Y;)r=r.Next;s||r.Pt.X==o.X||(r=r.Next),i=this.DupOutPt(r,s),n.IntPoint.op_Inequality(i.Pt,o)&&((r=i).Pt.X=o.X,r.Pt.Y=o.Y,i=this.DupOutPt(r,s))}return a==n.Direction.dLeftToRight==s?(t.Prev=r,r.Next=t,e.Next=i,i.Prev=e):(t.Next=r,r.Prev=t,e.Prev=i,i.Next=e),!0},n.Clipper.prototype.JoinPoints=function(t,e,r){var i=t.OutPt1,o=new n.OutPt,s=t.OutPt2,a=new n.OutPt,l=t.OutPt1.Pt.Y==t.OffPt.Y;if(l&&n.IntPoint.op_Equality(t.OffPt,t.OutPt1.Pt)&&n.IntPoint.op_Equality(t.OffPt,t.OutPt2.Pt)){if(e!=r)return!1;for(o=t.OutPt1.Next;o!=i&&n.IntPoint.op_Equality(o.Pt,t.OffPt);)o=o.Next;var u=o.Pt.Y>t.OffPt.Y;for(a=t.OutPt2.Next;a!=s&&n.IntPoint.op_Equality(a.Pt,t.OffPt);)a=a.Next;return u!=a.Pt.Y>t.OffPt.Y&&(u?(o=this.DupOutPt(i,!1),a=this.DupOutPt(s,!0),i.Prev=s,s.Next=i,o.Next=a,a.Prev=o,t.OutPt1=i,t.OutPt2=o,!0):(o=this.DupOutPt(i,!0),a=this.DupOutPt(s,!1),i.Next=s,s.Prev=i,o.Prev=a,a.Next=o,t.OutPt1=i,t.OutPt2=o,!0))}if(l){for(o=i;i.Prev.Pt.Y==i.Pt.Y&&i.Prev!=o&&i.Prev!=s;)i=i.Prev;for(;o.Next.Pt.Y==o.Pt.Y&&o.Next!=i&&o.Next!=s;)o=o.Next;if(o.Next==i||o.Next==s)return!1;for(a=s;s.Prev.Pt.Y==s.Pt.Y&&s.Prev!=a&&s.Prev!=o;)s=s.Prev;for(;a.Next.Pt.Y==a.Pt.Y&&a.Next!=s&&a.Next!=i;)a=a.Next;if(a.Next==s||a.Next==i)return!1;var c={Left:null,Right:null};if(!this.GetOverlap(i.Pt.X,o.Pt.X,s.Pt.X,a.Pt.X,c))return!1;var h,f=c.Left,p=c.Right,d=new n.IntPoint;return i.Pt.X>=f&&i.Pt.X<=p?(d.X=i.Pt.X,d.Y=i.Pt.Y,h=i.Pt.X>o.Pt.X):s.Pt.X>=f&&s.Pt.X<=p?(d.X=s.Pt.X,d.Y=s.Pt.Y,h=s.Pt.X>a.Pt.X):o.Pt.X>=f&&o.Pt.X<=p?(d.X=o.Pt.X,d.Y=o.Pt.Y,h=o.Pt.X>i.Pt.X):(d.X=a.Pt.X,d.Y=a.Pt.Y,h=a.Pt.X>s.Pt.X),t.OutPt1=i,t.OutPt2=s,this.JoinHorz(i,o,s,a,d,h)}for(o=i.Next;n.IntPoint.op_Equality(o.Pt,i.Pt)&&o!=i;)o=o.Next;var y=o.Pt.Y>i.Pt.Y||!n.ClipperBase.SlopesEqual(i.Pt,o.Pt,t.OffPt,this.m_UseFullRange);if(y){for(o=i.Prev;n.IntPoint.op_Equality(o.Pt,i.Pt)&&o!=i;)o=o.Prev;if(o.Pt.Y>i.Pt.Y||!n.ClipperBase.SlopesEqual(i.Pt,o.Pt,t.OffPt,this.m_UseFullRange))return!1}for(a=s.Next;n.IntPoint.op_Equality(a.Pt,s.Pt)&&a!=s;)a=a.Next;var _=a.Pt.Y>s.Pt.Y||!n.ClipperBase.SlopesEqual(s.Pt,a.Pt,t.OffPt,this.m_UseFullRange);if(_){for(a=s.Prev;n.IntPoint.op_Equality(a.Pt,s.Pt)&&a!=s;)a=a.Prev;if(a.Pt.Y>s.Pt.Y||!n.ClipperBase.SlopesEqual(s.Pt,a.Pt,t.OffPt,this.m_UseFullRange))return!1}return o!=i&&a!=s&&o!=a&&(e!=r||y!=_)&&(y?(o=this.DupOutPt(i,!1),a=this.DupOutPt(s,!0),i.Prev=s,s.Next=i,o.Next=a,a.Prev=o,t.OutPt1=i,t.OutPt2=o,!0):(o=this.DupOutPt(i,!0),a=this.DupOutPt(s,!1),i.Next=s,s.Prev=i,o.Prev=a,a.Next=o,t.OutPt1=i,t.OutPt2=o,!0))},n.Clipper.GetBounds=function(t){for(var e=0,r=t.length;e<r&&0==t[e].length;)e++;if(e==r)return new n.IntRect(0,0,0,0);var i=new n.IntRect;for(i.left=t[e][0].X,i.right=i.left,i.top=t[e][0].Y,i.bottom=i.top;e<r;e++)for(var o=0,s=t[e].length;o<s;o++)t[e][o].X<i.left?i.left=t[e][o].X:t[e][o].X>i.right&&(i.right=t[e][o].X),t[e][o].Y<i.top?i.top=t[e][o].Y:t[e][o].Y>i.bottom&&(i.bottom=t[e][o].Y);return i},n.Clipper.prototype.GetBounds2=function(t){var e=t,r=new n.IntRect;for(r.left=t.Pt.X,r.right=t.Pt.X,r.top=t.Pt.Y,r.bottom=t.Pt.Y,t=t.Next;t!=e;)t.Pt.X<r.left&&(r.left=t.Pt.X),t.Pt.X>r.right&&(r.right=t.Pt.X),t.Pt.Y<r.top&&(r.top=t.Pt.Y),t.Pt.Y>r.bottom&&(r.bottom=t.Pt.Y),t=t.Next;return r},n.Clipper.PointInPolygon=function(t,e){var n=0,r=e.length;if(r<3)return 0;for(var i=e[0],o=1;o<=r;++o){var s=o==r?e[0]:e[o];if(s.Y==t.Y&&(s.X==t.X||i.Y==t.Y&&s.X>t.X==i.X<t.X))return-1;if(i.Y<t.Y!=s.Y<t.Y)if(i.X>=t.X)if(s.X>t.X)n=1-n;else{if(0==(a=(i.X-t.X)*(s.Y-t.Y)-(s.X-t.X)*(i.Y-t.Y)))return-1;a>0==s.Y>i.Y&&(n=1-n)}else if(s.X>t.X){var a;if(0==(a=(i.X-t.X)*(s.Y-t.Y)-(s.X-t.X)*(i.Y-t.Y)))return-1;a>0==s.Y>i.Y&&(n=1-n)}i=s}return n},n.Clipper.prototype.PointInPolygon=function(t,e){var n=0,r=e,i=t.X,o=t.Y,s=e.Pt.X,a=e.Pt.Y;do{var l=(e=e.Next).Pt.X,u=e.Pt.Y;if(u==o&&(l==i||a==o&&l>i==s<i))return-1;if(a<o!=u<o)if(s>=i)if(l>i)n=1-n;else{if(0==(c=(s-i)*(u-o)-(l-i)*(a-o)))return-1;c>0==u>a&&(n=1-n)}else if(l>i){var c;if(0==(c=(s-i)*(u-o)-(l-i)*(a-o)))return-1;c>0==u>a&&(n=1-n)}s=l,a=u}while(r!=e);return n},n.Clipper.prototype.Poly2ContainsPoly1=function(t,e){var n=t;do{var r=this.PointInPolygon(n.Pt,e);if(r>=0)return r>0;n=n.Next}while(n!=t);return!0},n.Clipper.prototype.FixupFirstLefts1=function(t,e){for(var n=0,r=this.m_PolyOuts.length;n<r;n++){var i=this.m_PolyOuts[n];if(null!=i.Pts&&null!=i.FirstLeft)this.ParseFirstLeft(i.FirstLeft)==t&&this.Poly2ContainsPoly1(i.Pts,e.Pts)&&(i.FirstLeft=e)}},n.Clipper.prototype.FixupFirstLefts2=function(t,e){for(var n=0,r=this.m_PolyOuts,i=r.length,o=r[n];n<i;o=r[++n])o.FirstLeft==t&&(o.FirstLeft=e)},n.Clipper.ParseFirstLeft=function(t){for(;null!=t&&null==t.Pts;)t=t.FirstLeft;return t},n.Clipper.prototype.JoinCommonEdges=function(){for(var t=0,e=this.m_Joins.length;t<e;t++){var r,i=this.m_Joins[t],o=this.GetOutRec(i.OutPt1.Idx),s=this.GetOutRec(i.OutPt2.Idx);if(null!=o.Pts&&null!=s.Pts)if(r=o==s?o:this.Param1RightOfParam2(o,s)?s:this.Param1RightOfParam2(s,o)?o:this.GetLowermostRec(o,s),this.JoinPoints(i,o,s))if(o==s){if(o.Pts=i.OutPt1,o.BottomPt=null,(s=this.CreateOutRec()).Pts=i.OutPt2,this.UpdateOutPtIdxs(s),this.m_UsingPolyTree)for(var a=0,l=this.m_PolyOuts.length;a<l-1;a++){var u=this.m_PolyOuts[a];null!=u.Pts&&n.Clipper.ParseFirstLeft(u.FirstLeft)==o&&u.IsHole!=o.IsHole&&(this.Poly2ContainsPoly1(u.Pts,i.OutPt2)&&(u.FirstLeft=s))}this.Poly2ContainsPoly1(s.Pts,o.Pts)?(s.IsHole=!o.IsHole,s.FirstLeft=o,this.m_UsingPolyTree&&this.FixupFirstLefts2(s,o),(s.IsHole^this.ReverseSolution)==this.Area(s)>0&&this.ReversePolyPtLinks(s.Pts)):this.Poly2ContainsPoly1(o.Pts,s.Pts)?(s.IsHole=o.IsHole,o.IsHole=!s.IsHole,s.FirstLeft=o.FirstLeft,o.FirstLeft=s,this.m_UsingPolyTree&&this.FixupFirstLefts2(o,s),(o.IsHole^this.ReverseSolution)==this.Area(o)>0&&this.ReversePolyPtLinks(o.Pts)):(s.IsHole=o.IsHole,s.FirstLeft=o.FirstLeft,this.m_UsingPolyTree&&this.FixupFirstLefts1(o,s))}else s.Pts=null,s.BottomPt=null,s.Idx=o.Idx,o.IsHole=r.IsHole,r==s&&(o.FirstLeft=s.FirstLeft),s.FirstLeft=o,this.m_UsingPolyTree&&this.FixupFirstLefts2(s,o)}},n.Clipper.prototype.UpdateOutPtIdxs=function(t){var e=t.Pts;do{e.Idx=t.Idx,e=e.Prev}while(e!=t.Pts)},n.Clipper.prototype.DoSimplePolygons=function(){for(var t=0;t<this.m_PolyOuts.length;){var e=this.m_PolyOuts[t++],r=e.Pts;if(null!=r&&!e.IsOpen)do{for(var i=r.Next;i!=e.Pts;){if(n.IntPoint.op_Equality(r.Pt,i.Pt)&&i.Next!=r&&i.Prev!=r){var o=r.Prev,s=i.Prev;r.Prev=s,s.Next=r,i.Prev=o,o.Next=i,e.Pts=r;var a=this.CreateOutRec();a.Pts=i,this.UpdateOutPtIdxs(a),this.Poly2ContainsPoly1(a.Pts,e.Pts)?(a.IsHole=!e.IsHole,a.FirstLeft=e,this.m_UsingPolyTree&&this.FixupFirstLefts2(a,e)):this.Poly2ContainsPoly1(e.Pts,a.Pts)?(a.IsHole=e.IsHole,e.IsHole=!a.IsHole,a.FirstLeft=e.FirstLeft,e.FirstLeft=a,this.m_UsingPolyTree&&this.FixupFirstLefts2(e,a)):(a.IsHole=e.IsHole,a.FirstLeft=e.FirstLeft,this.m_UsingPolyTree&&this.FixupFirstLefts1(e,a)),i=r}i=i.Next}r=r.Next}while(r!=e.Pts)}},n.Clipper.Area=function(t){var e=t.length;if(e<3)return 0;for(var n=0,r=0,i=e-1;r<e;++r)n+=(t[i].X+t[r].X)*(t[i].Y-t[r].Y),i=r;return.5*-n},n.Clipper.prototype.Area=function(t){var e=t.Pts;if(null==e)return 0;var n=0;do{n+=(e.Prev.Pt.X+e.Pt.X)*(e.Prev.Pt.Y-e.Pt.Y),e=e.Next}while(e!=t.Pts);return.5*n},n.Clipper.SimplifyPolygon=function(t,e){var r=new Array,i=new n.Clipper(0);return i.StrictlySimple=!0,i.AddPath(t,n.PolyType.ptSubject,!0),i.Execute(n.ClipType.ctUnion,r,e,e),r},n.Clipper.SimplifyPolygons=function(t,e){void 0===e&&(e=n.PolyFillType.pftEvenOdd);var r=new Array,i=new n.Clipper(0);return i.StrictlySimple=!0,i.AddPaths(t,n.PolyType.ptSubject,!0),i.Execute(n.ClipType.ctUnion,r,e,e),r},n.Clipper.DistanceSqrd=function(t,e){var n=t.X-e.X,r=t.Y-e.Y;return n*n+r*r},n.Clipper.DistanceFromLineSqrd=function(t,e,n){var r=e.Y-n.Y,i=n.X-e.X,o=r*e.X+i*e.Y;return(o=r*t.X+i*t.Y-o)*o/(r*r+i*i)},n.Clipper.SlopesNearCollinear=function(t,e,r,i){return Math.abs(t.X-e.X)>Math.abs(t.Y-e.Y)?t.X>e.X==t.X<r.X?n.Clipper.DistanceFromLineSqrd(t,e,r)<i:e.X>t.X==e.X<r.X?n.Clipper.DistanceFromLineSqrd(e,t,r)<i:n.Clipper.DistanceFromLineSqrd(r,t,e)<i:t.Y>e.Y==t.Y<r.Y?n.Clipper.DistanceFromLineSqrd(t,e,r)<i:e.Y>t.Y==e.Y<r.Y?n.Clipper.DistanceFromLineSqrd(e,t,r)<i:n.Clipper.DistanceFromLineSqrd(r,t,e)<i},n.Clipper.PointsAreClose=function(t,e,n){var r=t.X-e.X,i=t.Y-e.Y;return r*r+i*i<=n},n.Clipper.ExcludeOp=function(t){var e=t.Prev;return e.Next=t.Next,t.Next.Prev=e,e.Idx=0,e},n.Clipper.CleanPolygon=function(t,e){void 0===e&&(e=1.415);var r=t.length;if(0==r)return new Array;for(var i=new Array(r),o=0;o<r;++o)i[o]=new n.OutPt;for(o=0;o<r;++o)i[o].Pt=t[o],i[o].Next=i[(o+1)%r],i[o].Next.Prev=i[o],i[o].Idx=0;for(var s=e*e,a=i[0];0==a.Idx&&a.Next!=a.Prev;)n.Clipper.PointsAreClose(a.Pt,a.Prev.Pt,s)?(a=n.Clipper.ExcludeOp(a),r--):n.Clipper.PointsAreClose(a.Prev.Pt,a.Next.Pt,s)?(n.Clipper.ExcludeOp(a.Next),a=n.Clipper.ExcludeOp(a),r-=2):n.Clipper.SlopesNearCollinear(a.Prev.Pt,a.Pt,a.Next.Pt,s)?(a=n.Clipper.ExcludeOp(a),r--):(a.Idx=1,a=a.Next);r<3&&(r=0);var l=new Array(r);for(o=0;o<r;++o)l[o]=new n.IntPoint(a.Pt),a=a.Next;return i=null,l},n.Clipper.CleanPolygons=function(t,e){for(var r=new Array(t.length),i=0,o=t.length;i<o;i++)r[i]=n.Clipper.CleanPolygon(t[i],e);return r},n.Clipper.Minkowski=function(t,e,r,i){var o=i?1:0,s=t.length,a=e.length,l=new Array;if(r)for(var u=0;u<a;u++){for(var c=new Array(s),h=0,f=t.length,p=t[h];h<f;p=t[++h])c[h]=new n.IntPoint(e[u].X+p.X,e[u].Y+p.Y);l.push(c)}else for(u=0;u<a;u++){for(c=new Array(s),h=0,f=t.length,p=t[h];h<f;p=t[++h])c[h]=new n.IntPoint(e[u].X-p.X,e[u].Y-p.Y);l.push(c)}var d=new Array;for(u=0;u<a-1+o;u++)for(h=0;h<s;h++){var y=new Array;y.push(l[u%a][h%s]),y.push(l[(u+1)%a][h%s]),y.push(l[(u+1)%a][(h+1)%s]),y.push(l[u%a][(h+1)%s]),n.Clipper.Orientation(y)||y.reverse(),d.push(y)}return d},n.Clipper.MinkowskiSum=function(t,e,r){if(e[0]instanceof Array){u=e;for(var i=new n.Paths,o=(a=new n.Clipper,0);o<u.length;++o){var s=n.Clipper.Minkowski(t,u[o],!0,r);if(a.AddPaths(s,n.PolyType.ptSubject,!0),r){l=n.Clipper.TranslatePath(u[o],t[0]);a.AddPath(l,n.PolyType.ptClip,!0)}}return a.Execute(n.ClipType.ctUnion,i,n.PolyFillType.pftNonZero,n.PolyFillType.pftNonZero),i}var a,l=e,u=n.Clipper.Minkowski(t,l,!0,r);return(a=new n.Clipper).AddPaths(u,n.PolyType.ptSubject,!0),a.Execute(n.ClipType.ctUnion,u,n.PolyFillType.pftNonZero,n.PolyFillType.pftNonZero),u},n.Clipper.TranslatePath=function(t,e){for(var r=new n.Path,i=0;i<t.length;i++)r.push(new n.IntPoint(t[i].X+e.X,t[i].Y+e.Y));return r},n.Clipper.MinkowskiDiff=function(t,e){var r=n.Clipper.Minkowski(t,e,!1,!0),i=new n.Clipper;return i.AddPaths(r,n.PolyType.ptSubject,!0),i.Execute(n.ClipType.ctUnion,r,n.PolyFillType.pftNonZero,n.PolyFillType.pftNonZero),r},n.Clipper.PolyTreeToPaths=function(t){var e=new Array;return n.Clipper.AddPolyNodeToPaths(t,n.Clipper.NodeType.ntAny,e),e},n.Clipper.AddPolyNodeToPaths=function(t,e,r){var i=!0;switch(e){case n.Clipper.NodeType.ntOpen:return;case n.Clipper.NodeType.ntClosed:i=!t.IsOpen}t.m_polygon.length>0&&i&&r.push(t.m_polygon);for(var o=0,s=t.Childs(),a=s.length,l=s[o];o<a;l=s[++o])n.Clipper.AddPolyNodeToPaths(l,e,r)},n.Clipper.OpenPathsFromPolyTree=function(t){for(var e=new n.Paths,r=0,i=t.ChildCount();r<i;r++)t.Childs()[r].IsOpen&&e.push(t.Childs()[r].m_polygon);return e},n.Clipper.ClosedPathsFromPolyTree=function(t){var e=new n.Paths;return n.Clipper.AddPolyNodeToPaths(t,n.Clipper.NodeType.ntClosed,e),e},L(n.Clipper,n.ClipperBase),n.Clipper.NodeType={ntAny:0,ntOpen:1,ntClosed:2},n.ClipperOffset=function(t,e){void 0===t&&(t=2),void 0===e&&(e=n.ClipperOffset.def_arc_tolerance),this.m_destPolys=new n.Paths,this.m_srcPoly=new n.Path,this.m_destPoly=new n.Path,this.m_normals=new Array,this.m_delta=0,this.m_sinA=0,this.m_sin=0,this.m_cos=0,this.m_miterLim=0,this.m_StepsPerRad=0,this.m_lowest=new n.IntPoint,this.m_polyNodes=new n.PolyNode,this.MiterLimit=t,this.ArcTolerance=e,this.m_lowest.X=-1},n.ClipperOffset.two_pi=6.28318530717959,n.ClipperOffset.def_arc_tolerance=.25,n.ClipperOffset.prototype.Clear=function(){n.Clear(this.m_polyNodes.Childs()),this.m_lowest.X=-1},n.ClipperOffset.Round=n.Clipper.Round,n.ClipperOffset.prototype.AddPath=function(t,e,r){var i=t.length-1;if(!(i<0)){var o=new n.PolyNode;if(o.m_jointype=e,o.m_endtype=r,r==n.EndType.etClosedLine||r==n.EndType.etClosedPolygon)for(;i>0&&n.IntPoint.op_Equality(t[0],t[i]);)i--;o.m_polygon.push(t[0]);for(var s=0,a=0,l=1;l<=i;l++)n.IntPoint.op_Inequality(o.m_polygon[s],t[l])&&(s++,o.m_polygon.push(t[l]),(t[l].Y>o.m_polygon[a].Y||t[l].Y==o.m_polygon[a].Y&&t[l].X<o.m_polygon[a].X)&&(a=s));if(!(r==n.EndType.etClosedPolygon&&s<2)&&(this.m_polyNodes.AddChild(o),r==n.EndType.etClosedPolygon))if(this.m_lowest.X<0)this.m_lowest=new n.IntPoint(this.m_polyNodes.ChildCount()-1,a);else{var u=this.m_polyNodes.Childs()[this.m_lowest.X].m_polygon[this.m_lowest.Y];(o.m_polygon[a].Y>u.Y||o.m_polygon[a].Y==u.Y&&o.m_polygon[a].X<u.X)&&(this.m_lowest=new n.IntPoint(this.m_polyNodes.ChildCount()-1,a))}}},n.ClipperOffset.prototype.AddPaths=function(t,e,n){for(var r=0,i=t.length;r<i;r++)this.AddPath(t[r],e,n)},n.ClipperOffset.prototype.FixOrientations=function(){if(this.m_lowest.X>=0&&!n.Clipper.Orientation(this.m_polyNodes.Childs()[this.m_lowest.X].m_polygon))for(var t=0;t<this.m_polyNodes.ChildCount();t++){((e=this.m_polyNodes.Childs()[t]).m_endtype==n.EndType.etClosedPolygon||e.m_endtype==n.EndType.etClosedLine&&n.Clipper.Orientation(e.m_polygon))&&e.m_polygon.reverse()}else for(t=0;t<this.m_polyNodes.ChildCount();t++){var e;(e=this.m_polyNodes.Childs()[t]).m_endtype!=n.EndType.etClosedLine||n.Clipper.Orientation(e.m_polygon)||e.m_polygon.reverse()}},n.ClipperOffset.GetUnitNormal=function(t,e){var r=e.X-t.X,i=e.Y-t.Y;if(0==r&&0==i)return new n.DoublePoint(0,0);var o=1/Math.sqrt(r*r+i*i);return r*=o,i*=o,new n.DoublePoint(i,-r)},n.ClipperOffset.prototype.DoOffset=function(t){if(this.m_destPolys=new Array,this.m_delta=t,n.ClipperBase.near_zero(t))for(var e=0;e<this.m_polyNodes.ChildCount();e++){(o=this.m_polyNodes.Childs()[e]).m_endtype==n.EndType.etClosedPolygon&&this.m_destPolys.push(o.m_polygon)}else{var r;this.MiterLimit>2?this.m_miterLim=2/(this.MiterLimit*this.MiterLimit):this.m_miterLim=.5,r=this.ArcTolerance<=0?n.ClipperOffset.def_arc_tolerance:this.ArcTolerance>Math.abs(t)*n.ClipperOffset.def_arc_tolerance?Math.abs(t)*n.ClipperOffset.def_arc_tolerance:this.ArcTolerance;var i=3.14159265358979/Math.acos(1-r/Math.abs(t));this.m_sin=Math.sin(n.ClipperOffset.two_pi/i),this.m_cos=Math.cos(n.ClipperOffset.two_pi/i),this.m_StepsPerRad=i/n.ClipperOffset.two_pi,t<0&&(this.m_sin=-this.m_sin);for(e=0;e<this.m_polyNodes.ChildCount();e++){var o=this.m_polyNodes.Childs()[e];this.m_srcPoly=o.m_polygon;var s=this.m_srcPoly.length;if(!(0==s||t<=0&&(s<3||o.m_endtype!=n.EndType.etClosedPolygon)))if(this.m_destPoly=new Array,1!=s){this.m_normals.length=0;for(f=0;f<s-1;f++)this.m_normals.push(n.ClipperOffset.GetUnitNormal(this.m_srcPoly[f],this.m_srcPoly[f+1]));if(o.m_endtype==n.EndType.etClosedLine||o.m_endtype==n.EndType.etClosedPolygon?this.m_normals.push(n.ClipperOffset.GetUnitNormal(this.m_srcPoly[s-1],this.m_srcPoly[0])):this.m_normals.push(new n.DoublePoint(this.m_normals[s-2])),o.m_endtype==n.EndType.etClosedPolygon){var a=s-1;for(f=0;f<s;f++)a=this.OffsetPoint(f,a,o.m_jointype);this.m_destPolys.push(this.m_destPoly)}else if(o.m_endtype==n.EndType.etClosedLine){for(a=s-1,f=0;f<s;f++)a=this.OffsetPoint(f,a,o.m_jointype);this.m_destPolys.push(this.m_destPoly),this.m_destPoly=new Array;var l=this.m_normals[s-1];for(f=s-1;f>0;f--)this.m_normals[f]=new n.DoublePoint(-this.m_normals[f-1].X,-this.m_normals[f-1].Y);this.m_normals[0]=new n.DoublePoint(-l.X,-l.Y),a=0;for(f=s-1;f>=0;f--)a=this.OffsetPoint(f,a,o.m_jointype);this.m_destPolys.push(this.m_destPoly)}else{var u;for(a=0,f=1;f<s-1;++f)a=this.OffsetPoint(f,a,o.m_jointype);if(o.m_endtype==n.EndType.etOpenButt){f=s-1;u=new n.IntPoint(n.ClipperOffset.Round(this.m_srcPoly[f].X+this.m_normals[f].X*t),n.ClipperOffset.Round(this.m_srcPoly[f].Y+this.m_normals[f].Y*t)),this.m_destPoly.push(u),u=new n.IntPoint(n.ClipperOffset.Round(this.m_srcPoly[f].X-this.m_normals[f].X*t),n.ClipperOffset.Round(this.m_srcPoly[f].Y-this.m_normals[f].Y*t)),this.m_destPoly.push(u)}else{f=s-1;a=s-2,this.m_sinA=0,this.m_normals[f]=new n.DoublePoint(-this.m_normals[f].X,-this.m_normals[f].Y),o.m_endtype==n.EndType.etOpenSquare?this.DoSquare(f,a):this.DoRound(f,a)}for(f=s-1;f>0;f--)this.m_normals[f]=new n.DoublePoint(-this.m_normals[f-1].X,-this.m_normals[f-1].Y);this.m_normals[0]=new n.DoublePoint(-this.m_normals[1].X,-this.m_normals[1].Y);for(f=(a=s-1)-1;f>0;--f)a=this.OffsetPoint(f,a,o.m_jointype);o.m_endtype==n.EndType.etOpenButt?(u=new n.IntPoint(n.ClipperOffset.Round(this.m_srcPoly[0].X-this.m_normals[0].X*t),n.ClipperOffset.Round(this.m_srcPoly[0].Y-this.m_normals[0].Y*t)),this.m_destPoly.push(u),u=new n.IntPoint(n.ClipperOffset.Round(this.m_srcPoly[0].X+this.m_normals[0].X*t),n.ClipperOffset.Round(this.m_srcPoly[0].Y+this.m_normals[0].Y*t)),this.m_destPoly.push(u)):(a=1,this.m_sinA=0,o.m_endtype==n.EndType.etOpenSquare?this.DoSquare(0,1):this.DoRound(0,1)),this.m_destPolys.push(this.m_destPoly)}}else{if(o.m_jointype==n.JoinType.jtRound)for(var c=1,h=0,f=1;f<=i;f++){this.m_destPoly.push(new n.IntPoint(n.ClipperOffset.Round(this.m_srcPoly[0].X+c*t),n.ClipperOffset.Round(this.m_srcPoly[0].Y+h*t)));var p=c;c=c*this.m_cos-this.m_sin*h,h=p*this.m_sin+h*this.m_cos}else{c=-1,h=-1;for(var f=0;f<4;++f)this.m_destPoly.push(new n.IntPoint(n.ClipperOffset.Round(this.m_srcPoly[0].X+c*t),n.ClipperOffset.Round(this.m_srcPoly[0].Y+h*t))),c<0?c=1:h<0?h=1:c=-1}this.m_destPolys.push(this.m_destPoly)}}}},n.ClipperOffset.prototype.Execute=function(){var t=arguments;if(t[0]instanceof n.PolyTree){o=t[0],s=t[1];if(o.Clear(),this.FixOrientations(),this.DoOffset(s),(i=new n.Clipper(0)).AddPaths(this.m_destPolys,n.PolyType.ptSubject,!0),s>0)i.Execute(n.ClipType.ctUnion,o,n.PolyFillType.pftPositive,n.PolyFillType.pftPositive);else{l=n.Clipper.GetBounds(this.m_destPolys);if((a=new n.Path).push(new n.IntPoint(l.left-10,l.bottom+10)),a.push(new n.IntPoint(l.right+10,l.bottom+10)),a.push(new n.IntPoint(l.right+10,l.top-10)),a.push(new n.IntPoint(l.left-10,l.top-10)),i.AddPath(a,n.PolyType.ptSubject,!0),i.ReverseSolution=!0,i.Execute(n.ClipType.ctUnion,o,n.PolyFillType.pftNegative,n.PolyFillType.pftNegative),1==o.ChildCount()&&o.Childs()[0].ChildCount()>0){var e=o.Childs()[0];o.Childs()[0]=e.Childs()[0],o.Childs()[0].m_Parent=o;for(var r=1;r<e.ChildCount();r++)o.AddChild(e.Childs()[r])}else o.Clear()}}else{var i,o=t[0],s=t[1];if(n.Clear(o),this.FixOrientations(),this.DoOffset(s),(i=new n.Clipper(0)).AddPaths(this.m_destPolys,n.PolyType.ptSubject,!0),s>0)i.Execute(n.ClipType.ctUnion,o,n.PolyFillType.pftPositive,n.PolyFillType.pftPositive);else{var a,l=n.Clipper.GetBounds(this.m_destPolys);(a=new n.Path).push(new n.IntPoint(l.left-10,l.bottom+10)),a.push(new n.IntPoint(l.right+10,l.bottom+10)),a.push(new n.IntPoint(l.right+10,l.top-10)),a.push(new n.IntPoint(l.left-10,l.top-10)),i.AddPath(a,n.PolyType.ptSubject,!0),i.ReverseSolution=!0,i.Execute(n.ClipType.ctUnion,o,n.PolyFillType.pftNegative,n.PolyFillType.pftNegative),o.length>0&&o.splice(0,1)}}},n.ClipperOffset.prototype.OffsetPoint=function(t,e,r){if(this.m_sinA=this.m_normals[e].X*this.m_normals[t].Y-this.m_normals[t].X*this.m_normals[e].Y,Math.abs(this.m_sinA*this.m_delta)<1){if(this.m_normals[e].X*this.m_normals[t].X+this.m_normals[t].Y*this.m_normals[e].Y>0)return this.m_destPoly.push(new n.IntPoint(n.ClipperOffset.Round(this.m_srcPoly[t].X+this.m_normals[e].X*this.m_delta),n.ClipperOffset.Round(this.m_srcPoly[t].Y+this.m_normals[e].Y*this.m_delta))),e}else this.m_sinA>1?this.m_sinA=1:this.m_sinA<-1&&(this.m_sinA=-1);if(this.m_sinA*this.m_delta<0)this.m_destPoly.push(new n.IntPoint(n.ClipperOffset.Round(this.m_srcPoly[t].X+this.m_normals[e].X*this.m_delta),n.ClipperOffset.Round(this.m_srcPoly[t].Y+this.m_normals[e].Y*this.m_delta))),this.m_destPoly.push(new n.IntPoint(this.m_srcPoly[t])),this.m_destPoly.push(new n.IntPoint(n.ClipperOffset.Round(this.m_srcPoly[t].X+this.m_normals[t].X*this.m_delta),n.ClipperOffset.Round(this.m_srcPoly[t].Y+this.m_normals[t].Y*this.m_delta)));else switch(r){case n.JoinType.jtMiter:var i=this.m_normals[t].X*this.m_normals[e].X+this.m_normals[t].Y*this.m_normals[e].Y+1;i>=this.m_miterLim?this.DoMiter(t,e,i):this.DoSquare(t,e);break;case n.JoinType.jtSquare:this.DoSquare(t,e);break;case n.JoinType.jtRound:this.DoRound(t,e)}return e=t},n.ClipperOffset.prototype.DoSquare=function(t,e){var r=Math.tan(Math.atan2(this.m_sinA,this.m_normals[e].X*this.m_normals[t].X+this.m_normals[e].Y*this.m_normals[t].Y)/4);this.m_destPoly.push(new n.IntPoint(n.ClipperOffset.Round(this.m_srcPoly[t].X+this.m_delta*(this.m_normals[e].X-this.m_normals[e].Y*r)),n.ClipperOffset.Round(this.m_srcPoly[t].Y+this.m_delta*(this.m_normals[e].Y+this.m_normals[e].X*r)))),this.m_destPoly.push(new n.IntPoint(n.ClipperOffset.Round(this.m_srcPoly[t].X+this.m_delta*(this.m_normals[t].X+this.m_normals[t].Y*r)),n.ClipperOffset.Round(this.m_srcPoly[t].Y+this.m_delta*(this.m_normals[t].Y-this.m_normals[t].X*r))))},n.ClipperOffset.prototype.DoMiter=function(t,e,r){var i=this.m_delta/r;this.m_destPoly.push(new n.IntPoint(n.ClipperOffset.Round(this.m_srcPoly[t].X+(this.m_normals[e].X+this.m_normals[t].X)*i),n.ClipperOffset.Round(this.m_srcPoly[t].Y+(this.m_normals[e].Y+this.m_normals[t].Y)*i)))},n.ClipperOffset.prototype.DoRound=function(t,e){for(var r,i=Math.atan2(this.m_sinA,this.m_normals[e].X*this.m_normals[t].X+this.m_normals[e].Y*this.m_normals[t].Y),o=Math.max(n.Cast_Int32(n.ClipperOffset.Round(this.m_StepsPerRad*Math.abs(i))),1),s=this.m_normals[e].X,a=this.m_normals[e].Y,l=0;l<o;++l)this.m_destPoly.push(new n.IntPoint(n.ClipperOffset.Round(this.m_srcPoly[t].X+s*this.m_delta),n.ClipperOffset.Round(this.m_srcPoly[t].Y+a*this.m_delta))),r=s,s=s*this.m_cos-this.m_sin*a,a=r*this.m_sin+a*this.m_cos;this.m_destPoly.push(new n.IntPoint(n.ClipperOffset.Round(this.m_srcPoly[t].X+this.m_normals[t].X*this.m_delta),n.ClipperOffset.Round(this.m_srcPoly[t].Y+this.m_normals[t].Y*this.m_delta)))},n.Error=function(t){try{throw new Error(t)}catch(t){alert(t.message)}},n.JS={},n.JS.AreaOfPolygon=function(t,e){return e||(e=1),n.Clipper.Area(t)/(e*e)},n.JS.AreaOfPolygons=function(t,e){e||(e=1);for(var r=0,i=0;i<t.length;i++)r+=n.Clipper.Area(t[i]);return r/(e*e)},n.JS.BoundsOfPath=function(t,e){return n.JS.BoundsOfPaths([t],e)},n.JS.BoundsOfPaths=function(t,e){e||(e=1);var r=n.Clipper.GetBounds(t);return r.left/=e,r.bottom/=e,r.right/=e,r.top/=e,r},n.JS.Clean=function(t,e){if(!(t instanceof Array))return[];var r=t[0]instanceof Array;t=n.JS.Clone(t);if("number"!=typeof e||null===e)return n.Error("Delta is not a number in Clean()."),t;if(0===t.length||1==t.length&&0===t[0].length||e<0)return t;r||(t=[t]);for(var i,o,s,a,l,u,c,h=t.length,f=[],p=0;p<h;p++)if(0!==(i=(o=t[p]).length))if(i<3)s=o,f.push(s);else{for(s=o,a=e*e,l=o[0],u=1,c=1;c<i;c++)(o[c].X-l.X)*(o[c].X-l.X)+(o[c].Y-l.Y)*(o[c].Y-l.Y)<=a||(s[u]=o[c],l=o[c],u++);l=o[u-1],(o[0].X-l.X)*(o[0].X-l.X)+(o[0].Y-l.Y)*(o[0].Y-l.Y)<=a&&u--,u<i&&s.splice(u,i-u),s.length&&f.push(s)}return!r&&f.length?f=f[0]:r||0!==f.length?r&&0===f.length&&(f=[[]]):f=[],f},n.JS.Clone=function(t){if(!(t instanceof Array))return[];if(0===t.length)return[];if(1==t.length&&0===t[0].length)return[[]];var e=t[0]instanceof Array;e||(t=[t]);var n,r,i,o,s=t.length,a=new Array(s);for(r=0;r<s;r++){for(n=t[r].length,o=new Array(n),i=0;i<n;i++)o[i]={X:t[r][i].X,Y:t[r][i].Y};a[r]=o}return e||(a=a[0]),a},n.JS.Lighten=function(t,e){if(!(t instanceof Array))return[];if("number"!=typeof e||null===e)return n.Error("Tolerance is not a number in Lighten()."),n.JS.Clone(t);if(0===t.length||1==t.length&&0===t[0].length||e<0)return n.JS.Clone(t);var r,i,o,s,a,l,u,c,h,f,p,d,y,_,m,g;t[0]instanceof Array||(t=[t]);var v=t.length,P=e*e,b=[];for(r=0;r<v;r++)if(0!=(l=(o=t[r]).length)){for(s=0;s<1e6;s++){for(a=[],o[(l=o.length)-1].X!=o[0].X||o[l-1].Y!=o[0].Y?(p=1,o.push({X:o[0].X,Y:o[0].Y}),l=o.length):p=0,f=[],i=0;i<l-2;i++)u=o[i],h=o[i+1],c=o[i+2],m=u.X,g=u.Y,d=c.X-m,y=c.Y-g,0===d&&0===y||((_=((h.X-m)*d+(h.Y-g)*y)/(d*d+y*y))>1?(m=c.X,g=c.Y):_>0&&(m+=d*_,g+=y*_)),(d=h.X-m)*d+(y=h.Y-g)*y<=P&&(f[i+1]=1,i++);for(a.push({X:o[0].X,Y:o[0].Y}),i=1;i<l-1;i++)f[i]||a.push({X:o[i].X,Y:o[i].Y});if(a.push({X:o[l-1].X,Y:o[l-1].Y}),p&&o.pop(),!f.length)break;o=a}a[(l=a.length)-1].X==a[0].X&&a[l-1].Y==a[0].Y&&a.pop(),a.length>2&&b.push(a)}return t[0]instanceof Array||(b=b[0]),void 0===b&&(b=[[]]),b},n.JS.PerimeterOfPath=function(t,e,n){if(void 0===t)return 0;var r,i,o=Math.sqrt,s=0,a=0,l=0,u=0,c=0,h=t.length;if(h<2)return 0;for(e&&(t[h]=t[0],h++);--h;)a=(r=t[h]).X,l=r.Y,s+=o((a-(u=(i=t[h-1]).X))*(a-u)+(l-(c=i.Y))*(l-c));return e&&t.pop(),s/n},n.JS.PerimeterOfPaths=function(t,e,r){r||(r=1);for(var i=0,o=0;o<t.length;o++)i+=n.JS.PerimeterOfPath(t[o],e,r);return i},n.JS.ScaleDownPath=function(t,e){var n,r;for(e||(e=1),n=t.length;n--;)(r=t[n]).X=r.X/e,r.Y=r.Y/e},n.JS.ScaleDownPaths=function(t,e){var n,r,i;for(e||(e=1),n=t.length;n--;)for(r=t[n].length;r--;)(i=t[n][r]).X=i.X/e,i.Y=i.Y/e},n.JS.ScaleUpPath=function(t,e){var n,r,i=Math.round;for(e||(e=1),n=t.length;n--;)(r=t[n]).X=i(r.X*e),r.Y=i(r.Y*e)},n.JS.ScaleUpPaths=function(t,e){var n,r,i,o=Math.round;for(e||(e=1),n=t.length;n--;)for(r=t[n].length;r--;)(i=t[n][r]).X=o(i.X*e),i.Y=o(i.Y*e)},n.ExPolygons=function(){return[]},n.ExPolygon=function(){this.outer=null,this.holes=null},n.JS.AddOuterPolyNodeToExPolygons=function(t,e){var r=new n.ExPolygon;r.outer=t.Contour();var i,o,s,a,l,u,c=t.Childs(),h=c.length;for(r.holes=new Array(h),s=0;s<h;s++)for(i=c[s],r.holes[s]=i.Contour(),a=0,u=(l=i.Childs()).length;a<u;a++)o=l[a],n.JS.AddOuterPolyNodeToExPolygons(o,e);e.push(r)},n.JS.ExPolygonsToPaths=function(t){var e,r,i,o,s=new n.Paths;for(e=0,i=t.length;e<i;e++)for(s.push(t[e].outer),r=0,o=t[e].holes.length;r<o;r++)s.push(t[e].holes[r]);return s},n.JS.PolyTreeToExPolygons=function(t){var e,r,i,o,s=new n.ExPolygons;for(r=0,o=(i=t.Childs()).length;r<o;r++)e=i[r],n.JS.AddOuterPolyNodeToExPolygons(e,s);return s}}()}),clipper_1=clipper.Clipper,clipper_2=clipper.PolyFillType,turfPolygon=function(t,e){if(null===t)throw new Error("No coordinates passed");for(var n=0;n<t.length;n++)for(var r=t[n],i=0;i<r[r.length-1].length;i++){if(r.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");if(r[r.length-1][i]!==r[0][i])throw new Error("First and last Position are not equivalent.")}var o={type:"Feature",geometry:{type:"Polygon",coordinates:t},properties:e};return o.properties||(o.properties={}),o};function feature(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r={type:"Feature"};return(0===n.id||n.id)&&(r.id=n.id),n.bbox&&(r.bbox=n.bbox),r.properties=e||{},r.geometry=t,r}function polygon(t,e){var n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=_createForOfIteratorHelper(t);try{for(i.s();!(n=i.n()).done;){var o=n.value;if(o.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");if(o[o.length-1].length!==o[0].length)throw new Error("First and last Position are not equivalent.");for(var s=0;s<o[o.length-1].length;s++)if(o[o.length-1][s]!==o[0][s])throw new Error("First and last Position are not equivalent.")}}catch(t){i.e(t)}finally{i.f()}return feature({type:"Polygon",coordinates:t},e,r)}function multiPolygon(t,e){return feature({type:"MultiPolygon",coordinates:t},e,arguments.length>2&&void 0!==arguments[2]?arguments[2]:{})}function geomEach(t,e){var n,r,i,o,s,a,l,u,c,h,f=0,p="FeatureCollection"===t.type,d="Feature"===t.type,y=p?t.features.length:1;for(n=0;n<y;n++){for(a=p?t.features[n].geometry:d?t.geometry:t,u=p?t.features[n].properties:d?t.properties:{},c=p?t.features[n].bbox:d?t.bbox:void 0,h=p?t.features[n].id:d?t.id:void 0,s=(l=!!a&&"GeometryCollection"===a.type)?a.geometries.length:1,i=0;i<s;i++)if(null!==(o=l?a.geometries[i]:a))switch(o.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":if(!1===e(o,f,u,c,h))return!1;break;case"GeometryCollection":for(r=0;r<o.geometries.length;r++)if(!1===e(o.geometries[r],f,u,c,h))return!1;break;default:throw new Error("Unknown Geometry Type")}else if(!1===e(null,f,u,c,h))return!1;f++}}var isNumeric=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,mathceil=Math.ceil,mathfloor=Math.floor,bignumberError="[BigNumber Error] ",tooManyDigits=bignumberError+"Number primitive has more than 15 significant digits: ",BASE=1e14,LOG_BASE=14,MAX_SAFE_INTEGER$2=9007199254740991,POWS_TEN=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],SQRT_BASE=1e7,MAX=1e9;function clone(t){var e,n,r,i,o,s,a,l,u,c=x.prototype={constructor:x,toString:null,valueOf:null},h=new x(1),f=20,p=4,d=-7,y=21,_=-1e7,m=1e7,g=!1,v=1,P=0,b={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:" ",suffix:""},S="0123456789abcdefghijklmnopqrstuvwxyz",E=!0;function x(t,e){var i,o,s,a,l,u,c,h,d=this;if(!(d instanceof x))return new x(t,e);if(null==e){if(t&&!0===t._isBigNumber)return d.s=t.s,void(!t.c||t.e>m?d.c=d.e=null:t.e<_?d.c=[d.e=0]:(d.e=t.e,d.c=t.c.slice()));if((u="number"==typeof t)&&0*t==0){if(d.s=1/t<0?(t=-t,-1):1,t===~~t){for(a=0,l=t;l>=10;l/=10,a++);return void(a>m?d.c=d.e=null:(d.e=a,d.c=[t]))}h=String(t)}else{if(!isNumeric.test(h=String(t)))return r(d,h,u);d.s=45==h.charCodeAt(0)?(h=h.slice(1),-1):1}(a=h.indexOf("."))>-1&&(h=h.replace(".","")),(l=h.search(/e/i))>0?(a<0&&(a=l),a+=+h.slice(l+1),h=h.substring(0,l)):a<0&&(a=h.length)}else{if(intCheck(e,2,S.length,"Base"),10==e&&E)return w(d=new x(t),f+d.e+1,p);if(h=String(t),u="number"==typeof t){if(0*t!=0)return r(d,h,u,e);if(d.s=1/t<0?(h=h.slice(1),-1):1,x.DEBUG&&h.replace(/^0\.0*|\./,"").length>15)throw Error(tooManyDigits+t)}else d.s=45===h.charCodeAt(0)?(h=h.slice(1),-1):1;for(i=S.slice(0,e),a=l=0,c=h.length;l<c;l++)if(i.indexOf(o=h.charAt(l))<0){if("."==o){if(l>a){a=c;continue}}else if(!s&&(h==h.toUpperCase()&&(h=h.toLowerCase())||h==h.toLowerCase()&&(h=h.toUpperCase()))){s=!0,l=-1,a=0;continue}return r(d,String(t),u,e)}u=!1,(a=(h=n(h,e,10,d.s)).indexOf("."))>-1?h=h.replace(".",""):a=h.length}for(l=0;48===h.charCodeAt(l);l++);for(c=h.length;48===h.charCodeAt(--c););if(h=h.slice(l,++c)){if(c-=l,u&&x.DEBUG&&c>15&&(t>MAX_SAFE_INTEGER$2||t!==mathfloor(t)))throw Error(tooManyDigits+d.s*t);if((a=a-l-1)>m)d.c=d.e=null;else if(a<_)d.c=[d.e=0];else{if(d.e=a,d.c=[],l=(a+1)%LOG_BASE,a<0&&(l+=LOG_BASE),l<c){for(l&&d.c.push(+h.slice(0,l)),c-=LOG_BASE;l<c;)d.c.push(+h.slice(l,l+=LOG_BASE));l=LOG_BASE-(h=h.slice(l)).length}else l-=c;for(;l--;h+="0");d.c.push(+h)}}else d.c=[d.e=0]}function I(t,e,n,r){var i,o,s,a,l;if(null==n?n=p:intCheck(n,0,8),!t.c)return t.toString();if(i=t.c[0],s=t.e,null==e)l=coeffToString(t.c),l=1==r||2==r&&(s<=d||s>=y)?toExponential(l,s):toFixedPoint(l,s,"0");else if(o=(t=w(new x(t),e,n)).e,a=(l=coeffToString(t.c)).length,1==r||2==r&&(e<=o||o<=d)){for(;a<e;l+="0",a++);l=toExponential(l,o)}else if(e-=s,l=toFixedPoint(l,o,"0"),o+1>a){if(--e>0)for(l+=".";e--;l+="0");}else if((e+=o-a)>0)for(o+1==a&&(l+=".");e--;l+="0");return t.s<0&&i?"-"+l:l}function T(t,e){for(var n,r,i=1,o=new x(t[0]);i<t.length;i++)(!(r=new x(t[i])).s||(n=compare(o,r))===e||0===n&&o.s===e)&&(o=r);return o}function O(t,e,n){for(var r=1,i=e.length;!e[--i];e.pop());for(i=e[0];i>=10;i/=10,r++);return(n=r+n*LOG_BASE-1)>m?t.c=t.e=null:n<_?t.c=[t.e=0]:(t.e=n,t.c=e),t}function w(t,e,n,r){var i,o,s,a,l,u,c,h=t.c,f=POWS_TEN;if(h){t:{for(i=1,a=h[0];a>=10;a/=10,i++);if((o=e-i)<0)o+=LOG_BASE,s=e,l=h[u=0],c=mathfloor(l/f[i-s-1]%10);else if((u=mathceil((o+1)/LOG_BASE))>=h.length){if(!r)break t;for(;h.length<=u;h.push(0));l=c=0,i=1,s=(o%=LOG_BASE)-LOG_BASE+1}else{for(l=a=h[u],i=1;a>=10;a/=10,i++);c=(s=(o%=LOG_BASE)-LOG_BASE+i)<0?0:mathfloor(l/f[i-s-1]%10)}if(r=r||e<0||null!=h[u+1]||(s<0?l:l%f[i-s-1]),r=n<4?(c||r)&&(0==n||n==(t.s<0?3:2)):c>5||5==c&&(4==n||r||6==n&&(o>0?s>0?l/f[i-s]:0:h[u-1])%10&1||n==(t.s<0?8:7)),e<1||!h[0])return h.length=0,r?(e-=t.e+1,h[0]=f[(LOG_BASE-e%LOG_BASE)%LOG_BASE],t.e=-e||0):h[0]=t.e=0,t;if(0==o?(h.length=u,a=1,u--):(h.length=u+1,a=f[LOG_BASE-o],h[u]=s>0?mathfloor(l/f[i-s]%f[s])*a:0),r)for(;;){if(0==u){for(o=1,s=h[0];s>=10;s/=10,o++);for(s=h[0]+=a,a=1;s>=10;s/=10,a++);o!=a&&(t.e++,h[0]==BASE&&(h[0]=1));break}if(h[u]+=a,h[u]!=BASE)break;h[u--]=0,a=1}for(o=h.length;0===h[--o];h.pop());}t.e>m?t.c=t.e=null:t.e<_&&(t.c=[t.e=0])}return t}function A(t){var e,n=t.e;return null===n?t.toString():(e=coeffToString(t.c),e=n<=d||n>=y?toExponential(e,n):toFixedPoint(e,n,"0"),t.s<0?"-"+e:e)}return x.clone=clone,x.ROUND_UP=0,x.ROUND_DOWN=1,x.ROUND_CEIL=2,x.ROUND_FLOOR=3,x.ROUND_HALF_UP=4,x.ROUND_HALF_DOWN=5,x.ROUND_HALF_EVEN=6,x.ROUND_HALF_CEIL=7,x.ROUND_HALF_FLOOR=8,x.EUCLID=9,x.config=x.set=function(t){var e,n;if(null!=t){if("object"!=typeof t)throw Error(bignumberError+"Object expected: "+t);if(t.hasOwnProperty(e="DECIMAL_PLACES")&&(intCheck(n=t[e],0,MAX,e),f=n),t.hasOwnProperty(e="ROUNDING_MODE")&&(intCheck(n=t[e],0,8,e),p=n),t.hasOwnProperty(e="EXPONENTIAL_AT")&&((n=t[e])&&n.pop?(intCheck(n[0],-MAX,0,e),intCheck(n[1],0,MAX,e),d=n[0],y=n[1]):(intCheck(n,-MAX,MAX,e),d=-(y=n<0?-n:n))),t.hasOwnProperty(e="RANGE"))if((n=t[e])&&n.pop)intCheck(n[0],-MAX,-1,e),intCheck(n[1],1,MAX,e),_=n[0],m=n[1];else{if(intCheck(n,-MAX,MAX,e),!n)throw Error(bignumberError+e+" cannot be zero: "+n);_=-(m=n<0?-n:n)}if(t.hasOwnProperty(e="CRYPTO")){if((n=t[e])!==!!n)throw Error(bignumberError+e+" not true or false: "+n);if(n){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw g=!n,Error(bignumberError+"crypto unavailable");g=n}else g=n}if(t.hasOwnProperty(e="MODULO_MODE")&&(intCheck(n=t[e],0,9,e),v=n),t.hasOwnProperty(e="POW_PRECISION")&&(intCheck(n=t[e],0,MAX,e),P=n),t.hasOwnProperty(e="FORMAT")){if("object"!=typeof(n=t[e]))throw Error(bignumberError+e+" not an object: "+n);b=n}if(t.hasOwnProperty(e="ALPHABET")){if("string"!=typeof(n=t[e])||/^.?$|[+\-.\s]|(.).*\1/.test(n))throw Error(bignumberError+e+" invalid: "+n);E="0123456789"==n.slice(0,10),S=n}}return{DECIMAL_PLACES:f,ROUNDING_MODE:p,EXPONENTIAL_AT:[d,y],RANGE:[_,m],CRYPTO:g,MODULO_MODE:v,POW_PRECISION:P,FORMAT:b,ALPHABET:S}},x.isBigNumber=function(t){if(!t||!0!==t._isBigNumber)return!1;if(!x.DEBUG)return!0;var e,n,r=t.c,i=t.e,o=t.s;t:if("[object Array]"=={}.toString.call(r)){if((1===o||-1===o)&&i>=-MAX&&i<=MAX&&i===mathfloor(i)){if(0===r[0]){if(0===i&&1===r.length)return!0;break t}if((e=(i+1)%LOG_BASE)<1&&(e+=LOG_BASE),String(r[0]).length==e){for(e=0;e<r.length;e++)if((n=r[e])<0||n>=BASE||n!==mathfloor(n))break t;if(0!==n)return!0}}}else if(null===r&&null===i&&(null===o||1===o||-1===o))return!0;throw Error(bignumberError+"Invalid BigNumber: "+t)},x.maximum=x.max=function(){return T(arguments,-1)},x.minimum=x.min=function(){return T(arguments,1)},x.random=(i=9007199254740992*Math.random()&2097151?function(){return mathfloor(9007199254740992*Math.random())}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)},function(t){var e,n,r,o,s,a=0,l=[],u=new x(h);if(null==t?t=f:intCheck(t,0,MAX),o=mathceil(t/LOG_BASE),g)if(crypto.getRandomValues){for(e=crypto.getRandomValues(new Uint32Array(o*=2));a<o;)(s=131072*e[a]+(e[a+1]>>>11))>=9e15?(n=crypto.getRandomValues(new Uint32Array(2)),e[a]=n[0],e[a+1]=n[1]):(l.push(s%1e14),a+=2);a=o/2}else{if(!crypto.randomBytes)throw g=!1,Error(bignumberError+"crypto unavailable");for(e=crypto.randomBytes(o*=7);a<o;)(s=281474976710656*(31&e[a])+1099511627776*e[a+1]+4294967296*e[a+2]+16777216*e[a+3]+(e[a+4]<<16)+(e[a+5]<<8)+e[a+6])>=9e15?crypto.randomBytes(7).copy(e,a):(l.push(s%1e14),a+=7);a=o/7}if(!g)for(;a<o;)(s=i())<9e15&&(l[a++]=s%1e14);for(o=l[--a],t%=LOG_BASE,o&&t&&(s=POWS_TEN[LOG_BASE-t],l[a]=mathfloor(o/s)*s);0===l[a];l.pop(),a--);if(a<0)l=[r=0];else{for(r=-1;0===l[0];l.splice(0,1),r-=LOG_BASE);for(a=1,s=l[0];s>=10;s/=10,a++);a<LOG_BASE&&(r-=LOG_BASE-a)}return u.e=r,u.c=l,u}),x.sum=function(){for(var t=1,e=arguments,n=new x(e[0]);t<e.length;)n=n.plus(e[t++]);return n},n=function(){function t(t,e,n,r){for(var i,o,s=[0],a=0,l=t.length;a<l;){for(o=s.length;o--;s[o]*=e);for(s[0]+=r.indexOf(t.charAt(a++)),i=0;i<s.length;i++)s[i]>n-1&&(null==s[i+1]&&(s[i+1]=0),s[i+1]+=s[i]/n|0,s[i]%=n)}return s.reverse()}return function(n,r,i,o,s){var a,l,u,c,h,d,y,_,m=n.indexOf("."),g=f,v=p;for(m>=0&&(c=P,P=0,n=n.replace(".",""),d=(_=new x(r)).pow(n.length-m),P=c,_.c=t(toFixedPoint(coeffToString(d.c),d.e,"0"),10,i,"0123456789"),_.e=_.c.length),u=c=(y=t(n,r,i,s?(a=S,"0123456789"):(a="0123456789",S))).length;0==y[--c];y.pop());if(!y[0])return a.charAt(0);if(m<0?--u:(d.c=y,d.e=u,d.s=o,y=(d=e(d,_,g,v,i)).c,h=d.r,u=d.e),m=y[l=u+g+1],c=i/2,h=h||l<0||null!=y[l+1],h=v<4?(null!=m||h)&&(0==v||v==(d.s<0?3:2)):m>c||m==c&&(4==v||h||6==v&&1&y[l-1]||v==(d.s<0?8:7)),l<1||!y[0])n=h?toFixedPoint(a.charAt(1),-g,a.charAt(0)):a.charAt(0);else{if(y.length=l,h)for(--i;++y[--l]>i;)y[l]=0,l||(++u,y=[1].concat(y));for(c=y.length;!y[--c];);for(m=0,n="";m<=c;n+=a.charAt(y[m++]));n=toFixedPoint(n,u,a.charAt(0))}return n}}(),e=function(){function t(t,e,n){var r,i,o,s,a=0,l=t.length,u=e%SQRT_BASE,c=e/SQRT_BASE|0;for(t=t.slice();l--;)a=((i=u*(o=t[l]%SQRT_BASE)+(r=c*o+(s=t[l]/SQRT_BASE|0)*u)%SQRT_BASE*SQRT_BASE+a)/n|0)+(r/SQRT_BASE|0)+c*s,t[l]=i%n;return a&&(t=[a].concat(t)),t}function e(t,e,n,r){var i,o;if(n!=r)o=n>r?1:-1;else for(i=o=0;i<n;i++)if(t[i]!=e[i]){o=t[i]>e[i]?1:-1;break}return o}function n(t,e,n,r){for(var i=0;n--;)t[n]-=i,i=t[n]<e[n]?1:0,t[n]=i*r+t[n]-e[n];for(;!t[0]&&t.length>1;t.splice(0,1));}return function(r,i,o,s,a){var l,u,c,h,f,p,d,y,_,m,g,v,P,b,S,E,I,T=r.s==i.s?1:-1,O=r.c,A=i.c;if(!(O&&O[0]&&A&&A[0]))return new x(r.s&&i.s&&(O?!A||O[0]!=A[0]:A)?O&&0==O[0]||!A?0*T:T/0:NaN);for(_=(y=new x(T)).c=[],T=o+(u=r.e-i.e)+1,a||(a=BASE,u=bitFloor(r.e/LOG_BASE)-bitFloor(i.e/LOG_BASE),T=T/LOG_BASE|0),c=0;A[c]==(O[c]||0);c++);if(A[c]>(O[c]||0)&&u--,T<0)_.push(1),h=!0;else{for(b=O.length,E=A.length,c=0,T+=2,(f=mathfloor(a/(A[0]+1)))>1&&(A=t(A,f,a),O=t(O,f,a),E=A.length,b=O.length),P=E,g=(m=O.slice(0,E)).length;g<E;m[g++]=0);I=A.slice(),I=[0].concat(I),S=A[0],A[1]>=a/2&&S++;do{if(f=0,(l=e(A,m,E,g))<0){if(v=m[0],E!=g&&(v=v*a+(m[1]||0)),(f=mathfloor(v/S))>1)for(f>=a&&(f=a-1),d=(p=t(A,f,a)).length,g=m.length;1==e(p,m,d,g);)f--,n(p,E<d?I:A,d,a),d=p.length,l=1;else 0==f&&(l=f=1),d=(p=A.slice()).length;if(d<g&&(p=[0].concat(p)),n(m,p,g,a),g=m.length,-1==l)for(;e(A,m,E,g)<1;)f++,n(m,E<g?I:A,g,a),g=m.length}else 0===l&&(f++,m=[0]);_[c++]=f,m[0]?m[g++]=O[P]||0:(m=[O[P]],g=1)}while((P++<b||null!=m[0])&&T--);h=null!=m[0],_[0]||_.splice(0,1)}if(a==BASE){for(c=1,T=_[0];T>=10;T/=10,c++);w(y,o+(y.e=c+u*LOG_BASE-1)+1,s,h)}else y.e=u,y.r=+h;return y}}(),o=/^(-?)0([xbo])(?=\w[\w.]*$)/i,s=/^([^.]+)\.$/,a=/^\.([^.]+)$/,l=/^-?(Infinity|NaN)$/,u=/^\s*\+(?=[\w.])|^\s+|\s+$/g,r=function(t,e,n,r){var i,c=n?e:e.replace(u,"");if(l.test(c))t.s=isNaN(c)?null:c<0?-1:1;else{if(!n&&(c=c.replace(o,function(t,e,n){return i="x"==(n=n.toLowerCase())?16:"b"==n?2:8,r&&r!=i?t:e}),r&&(i=r,c=c.replace(s,"$1").replace(a,"0.$1")),e!=c))return new x(c,i);if(x.DEBUG)throw Error(bignumberError+"Not a"+(r?" base "+r:"")+" number: "+e);t.s=null}t.c=t.e=null},c.absoluteValue=c.abs=function(){var t=new x(this);return t.s<0&&(t.s=1),t},c.comparedTo=function(t,e){return compare(this,new x(t,e))},c.decimalPlaces=c.dp=function(t,e){var n,r,i,o=this;if(null!=t)return intCheck(t,0,MAX),null==e?e=p:intCheck(e,0,8),w(new x(o),t+o.e+1,e);if(!(n=o.c))return null;if(r=((i=n.length-1)-bitFloor(this.e/LOG_BASE))*LOG_BASE,i=n[i])for(;i%10==0;i/=10,r--);return r<0&&(r=0),r},c.dividedBy=c.div=function(t,n){return e(this,new x(t,n),f,p)},c.dividedToIntegerBy=c.idiv=function(t,n){return e(this,new x(t,n),0,1)},c.exponentiatedBy=c.pow=function(t,e){var n,r,i,o,s,a,l,u,c=this;if((t=new x(t)).c&&!t.isInteger())throw Error(bignumberError+"Exponent not an integer: "+A(t));if(null!=e&&(e=new x(e)),s=t.e>14,!c.c||!c.c[0]||1==c.c[0]&&!c.e&&1==c.c.length||!t.c||!t.c[0])return u=new x(Math.pow(+A(c),s?t.s*(2-isOdd(t)):+A(t))),e?u.mod(e):u;if(a=t.s<0,e){if(e.c?!e.c[0]:!e.s)return new x(NaN);(r=!a&&c.isInteger()&&e.isInteger())&&(c=c.mod(e))}else{if(t.e>9&&(c.e>0||c.e<-1||(0==c.e?c.c[0]>1||s&&c.c[1]>=24e7:c.c[0]<8e13||s&&c.c[0]<=9999975e7)))return o=c.s<0&&isOdd(t)?-0:0,c.e>-1&&(o=1/o),new x(a?1/o:o);P&&(o=mathceil(P/LOG_BASE+2))}for(s?(n=new x(.5),a&&(t.s=1),l=isOdd(t)):l=(i=Math.abs(+A(t)))%2,u=new x(h);;){if(l){if(!(u=u.times(c)).c)break;o?u.c.length>o&&(u.c.length=o):r&&(u=u.mod(e))}if(i){if(0===(i=mathfloor(i/2)))break;l=i%2}else if(w(t=t.times(n),t.e+1,1),t.e>14)l=isOdd(t);else{if(0===(i=+A(t)))break;l=i%2}c=c.times(c),o?c.c&&c.c.length>o&&(c.c.length=o):r&&(c=c.mod(e))}return r?u:(a&&(u=h.div(u)),e?u.mod(e):o?w(u,P,p,void 0):u)},c.integerValue=function(t){var e=new x(this);return null==t?t=p:intCheck(t,0,8),w(e,e.e+1,t)},c.isEqualTo=c.eq=function(t,e){return 0===compare(this,new x(t,e))},c.isFinite=function(){return!!this.c},c.isGreaterThan=c.gt=function(t,e){return compare(this,new x(t,e))>0},c.isGreaterThanOrEqualTo=c.gte=function(t,e){return 1===(e=compare(this,new x(t,e)))||0===e},c.isInteger=function(){return!!this.c&&bitFloor(this.e/LOG_BASE)>this.c.length-2},c.isLessThan=c.lt=function(t,e){return compare(this,new x(t,e))<0},c.isLessThanOrEqualTo=c.lte=function(t,e){return-1===(e=compare(this,new x(t,e)))||0===e},c.isNaN=function(){return!this.s},c.isNegative=function(){return this.s<0},c.isPositive=function(){return this.s>0},c.isZero=function(){return!!this.c&&0==this.c[0]},c.minus=function(t,e){var n,r,i,o,s=this,a=s.s;if(e=(t=new x(t,e)).s,!a||!e)return new x(NaN);if(a!=e)return t.s=-e,s.plus(t);var l=s.e/LOG_BASE,u=t.e/LOG_BASE,c=s.c,h=t.c;if(!l||!u){if(!c||!h)return c?(t.s=-e,t):new x(h?s:NaN);if(!c[0]||!h[0])return h[0]?(t.s=-e,t):new x(c[0]?s:3==p?-0:0)}if(l=bitFloor(l),u=bitFloor(u),c=c.slice(),a=l-u){for((o=a<0)?(a=-a,i=c):(u=l,i=h),i.reverse(),e=a;e--;i.push(0));i.reverse()}else for(r=(o=(a=c.length)<(e=h.length))?a:e,a=e=0;e<r;e++)if(c[e]!=h[e]){o=c[e]<h[e];break}if(o&&(i=c,c=h,h=i,t.s=-t.s),(e=(r=h.length)-(n=c.length))>0)for(;e--;c[n++]=0);for(e=BASE-1;r>a;){if(c[--r]<h[r]){for(n=r;n&&!c[--n];c[n]=e);--c[n],c[r]+=BASE}c[r]-=h[r]}for(;0==c[0];c.splice(0,1),--u);return c[0]?O(t,c,u):(t.s=3==p?-1:1,t.c=[t.e=0],t)},c.modulo=c.mod=function(t,n){var r,i,o=this;return t=new x(t,n),!o.c||!t.s||t.c&&!t.c[0]?new x(NaN):!t.c||o.c&&!o.c[0]?new x(o):(9==v?(i=t.s,t.s=1,r=e(o,t,0,3),t.s=i,r.s*=i):r=e(o,t,0,v),(t=o.minus(r.times(t))).c[0]||1!=v||(t.s=o.s),t)},c.multipliedBy=c.times=function(t,e){var n,r,i,o,s,a,l,u,c,h,f,p,d,y,_,m=this,g=m.c,v=(t=new x(t,e)).c;if(!(g&&v&&g[0]&&v[0]))return!m.s||!t.s||g&&!g[0]&&!v||v&&!v[0]&&!g?t.c=t.e=t.s=null:(t.s*=m.s,g&&v?(t.c=[0],t.e=0):t.c=t.e=null),t;for(r=bitFloor(m.e/LOG_BASE)+bitFloor(t.e/LOG_BASE),t.s*=m.s,(l=g.length)<(h=v.length)&&(d=g,g=v,v=d,i=l,l=h,h=i),i=l+h,d=[];i--;d.push(0));for(y=BASE,_=SQRT_BASE,i=h;--i>=0;){for(n=0,f=v[i]%_,p=v[i]/_|0,o=i+(s=l);o>i;)n=((u=f*(u=g[--s]%_)+(a=p*u+(c=g[s]/_|0)*f)%_*_+d[o]+n)/y|0)+(a/_|0)+p*c,d[o--]=u%y;d[o]=n}return n?++r:d.splice(0,1),O(t,d,r)},c.negated=function(){var t=new x(this);return t.s=-t.s||null,t},c.plus=function(t,e){var n,r=this,i=r.s;if(e=(t=new x(t,e)).s,!i||!e)return new x(NaN);if(i!=e)return t.s=-e,r.minus(t);var o=r.e/LOG_BASE,s=t.e/LOG_BASE,a=r.c,l=t.c;if(!o||!s){if(!a||!l)return new x(i/0);if(!a[0]||!l[0])return l[0]?t:new x(a[0]?r:0*i)}if(o=bitFloor(o),s=bitFloor(s),a=a.slice(),i=o-s){for(i>0?(s=o,n=l):(i=-i,n=a),n.reverse();i--;n.push(0));n.reverse()}for((i=a.length)-(e=l.length)<0&&(n=l,l=a,a=n,e=i),i=0;e;)i=(a[--e]=a[e]+l[e]+i)/BASE|0,a[e]=BASE===a[e]?0:a[e]%BASE;return i&&(a=[i].concat(a),++s),O(t,a,s)},c.precision=c.sd=function(t,e){var n,r,i,o=this;if(null!=t&&t!==!!t)return intCheck(t,1,MAX),null==e?e=p:intCheck(e,0,8),w(new x(o),t,e);if(!(n=o.c))return null;if(r=(i=n.length-1)*LOG_BASE+1,i=n[i]){for(;i%10==0;i/=10,r--);for(i=n[0];i>=10;i/=10,r++);}return t&&o.e+1>r&&(r=o.e+1),r},c.shiftedBy=function(t){return intCheck(t,-MAX_SAFE_INTEGER$2,MAX_SAFE_INTEGER$2),this.times("1e"+t)},c.squareRoot=c.sqrt=function(){var t,n,r,i,o,s=this,a=s.c,l=s.s,u=s.e,c=f+4,h=new x("0.5");if(1!==l||!a||!a[0])return new x(!l||l<0&&(!a||a[0])?NaN:a?s:1/0);if(0==(l=Math.sqrt(+A(s)))||l==1/0?(((n=coeffToString(a)).length+u)%2==0&&(n+="0"),l=Math.sqrt(+n),u=bitFloor((u+1)/2)-(u<0||u%2),r=new x(n=l==1/0?"5e"+u:(n=l.toExponential()).slice(0,n.indexOf("e")+1)+u)):r=new x(l+""),r.c[0])for((l=(u=r.e)+c)<3&&(l=0);;)if(o=r,r=h.times(o.plus(e(s,o,c,1))),coeffToString(o.c).slice(0,l)===(n=coeffToString(r.c)).slice(0,l)){if(r.e<u&&--l,"9999"!=(n=n.slice(l-3,l+1))&&(i||"4999"!=n)){+n&&(+n.slice(1)||"5"!=n.charAt(0))||(w(r,r.e+f+2,1),t=!r.times(r).eq(s));break}if(!i&&(w(o,o.e+f+2,0),o.times(o).eq(s))){r=o;break}c+=4,l+=4,i=1}return w(r,r.e+f+1,p,t)},c.toExponential=function(t,e){return null!=t&&(intCheck(t,0,MAX),t++),I(this,t,e,1)},c.toFixed=function(t,e){return null!=t&&(intCheck(t,0,MAX),t=t+this.e+1),I(this,t,e)},c.toFormat=function(t,e,n){var r,i=this;if(null==n)null!=t&&e&&"object"==typeof e?(n=e,e=null):t&&"object"==typeof t?(n=t,t=e=null):n=b;else if("object"!=typeof n)throw Error(bignumberError+"Argument not an object: "+n);if(r=i.toFixed(t,e),i.c){var o,s=r.split("."),a=+n.groupSize,l=+n.secondaryGroupSize,u=n.groupSeparator||"",c=s[0],h=s[1],f=i.s<0,p=f?c.slice(1):c,d=p.length;if(l&&(o=a,a=l,l=o,d-=o),a>0&&d>0){for(o=d%a||a,c=p.substr(0,o);o<d;o+=a)c+=u+p.substr(o,a);l>0&&(c+=u+p.slice(o)),f&&(c="-"+c)}r=h?c+(n.decimalSeparator||"")+((l=+n.fractionGroupSize)?h.replace(new RegExp("\\d{"+l+"}\\B","g"),"$&"+(n.fractionGroupSeparator||"")):h):c}return(n.prefix||"")+r+(n.suffix||"")},c.toFraction=function(t){var n,r,i,o,s,a,l,u,c,f,d,y,_=this,g=_.c;if(null!=t&&(!(l=new x(t)).isInteger()&&(l.c||1!==l.s)||l.lt(h)))throw Error(bignumberError+"Argument "+(l.isInteger()?"out of range: ":"not an integer: ")+A(l));if(!g)return new x(_);for(n=new x(h),c=r=new x(h),i=u=new x(h),y=coeffToString(g),s=n.e=y.length-_.e-1,n.c[0]=POWS_TEN[(a=s%LOG_BASE)<0?LOG_BASE+a:a],t=!t||l.comparedTo(n)>0?s>0?n:c:l,a=m,m=1/0,l=new x(y),u.c[0]=0;f=e(l,n,0,1),1!=(o=r.plus(f.times(i))).comparedTo(t);)r=i,i=o,c=u.plus(f.times(o=c)),u=o,n=l.minus(f.times(o=n)),l=o;return o=e(t.minus(r),i,0,1),u=u.plus(o.times(c)),r=r.plus(o.times(i)),u.s=c.s=_.s,d=e(c,i,s*=2,p).minus(_).abs().comparedTo(e(u,r,s,p).minus(_).abs())<1?[c,i]:[u,r],m=a,d},c.toNumber=function(){return+A(this)},c.toPrecision=function(t,e){return null!=t&&intCheck(t,1,MAX),I(this,t,e,2)},c.toString=function(t){var e,r=this,i=r.s,o=r.e;return null===o?i?(e="Infinity",i<0&&(e="-"+e)):e="NaN":(null==t?e=o<=d||o>=y?toExponential(coeffToString(r.c),o):toFixedPoint(coeffToString(r.c),o,"0"):10===t&&E?e=toFixedPoint(coeffToString((r=w(new x(r),f+o+1,p)).c),r.e,"0"):(intCheck(t,2,S.length,"Base"),e=n(toFixedPoint(coeffToString(r.c),o,"0"),10,t,i,!0)),i<0&&r.c[0]&&(e="-"+e)),e},c.valueOf=c.toJSON=function(){return A(this)},c._isBigNumber=!0,c[Symbol.toStringTag]="BigNumber",c[Symbol.for("nodejs.util.inspect.custom")]=c.valueOf,null!=t&&x.set(t),x}function bitFloor(t){var e=0|t;return t>0||t===e?e:e-1}function coeffToString(t){for(var e,n,r=1,i=t.length,o=t[0]+"";r<i;){for(e=t[r++]+"",n=LOG_BASE-e.length;n--;e="0"+e);o+=e}for(i=o.length;48===o.charCodeAt(--i););return o.slice(0,i+1||1)}function compare(t,e){var n,r,i=t.c,o=e.c,s=t.s,a=e.s,l=t.e,u=e.e;if(!s||!a)return null;if(n=i&&!i[0],r=o&&!o[0],n||r)return n?r?0:-a:s;if(s!=a)return s;if(n=s<0,r=l==u,!i||!o)return r?0:!i^n?1:-1;if(!r)return l>u^n?1:-1;for(a=(l=i.length)<(u=o.length)?l:u,s=0;s<a;s++)if(i[s]!=o[s])return i[s]>o[s]^n?1:-1;return l==u?0:l>u^n?1:-1}function intCheck(t,e,n,r){if(t<e||t>n||t!==mathfloor(t))throw Error(bignumberError+(r||"Argument")+("number"==typeof t?t<e||t>n?" out of range: ":" not an integer: ":" not a primitive number: ")+String(t))}function isOdd(t){var e=t.c.length-1;return bitFloor(t.e/LOG_BASE)==e&&t.c[e]%2!=0}function toExponential(t,e){return(t.length>1?t.charAt(0)+"."+t.slice(1):t)+(e<0?"e":"e+")+e}function toFixedPoint(t,e,n){var r,i;if(e<0){for(i=n+".";++e;i+=n);t=i+t}else if(++e>(r=t.length)){for(i=n,e-=r;--e;i+=n);t+=i}else e<r&&(t=t.slice(0,e)+"."+t.slice(e));return t}var BigNumber=clone(),SplayTreeNode=_createClass(function t(e){_classCallCheck(this,t),_defineProperty(this,"key",void 0),_defineProperty(this,"left",null),_defineProperty(this,"right",null),this.key=e}),SplayTreeSetNode=function(t){function e(t){return _classCallCheck(this,e),_callSuper(this,e,[t])}return _inherits(e,SplayTreeNode),_createClass(e)}(),SplayTree=function(){return _createClass(function t(){_classCallCheck(this,t),_defineProperty(this,"size",0),_defineProperty(this,"modificationCount",0),_defineProperty(this,"splayCount",0)},[{key:"splay",value:function(t){var e=this.root;if(null==e)return this.compare(t,t),-1;for(var n,r=null,i=null,o=null,s=null,a=e,l=this.compare;;)if((n=l(a.key,t))>0){var u=a.left;if(null==u)break;if((n=l(u.key,t))>0&&(a.left=u.right,u.right=a,null==(u=(a=u).left)))break;null==r?i=a:r.left=a,r=a,a=u}else{if(!(n<0))break;var c=a.right;if(null==c)break;if((n=l(c.key,t))<0&&(a.right=c.left,c.left=a,null==(c=(a=c).right)))break;null==o?s=a:o.right=a,o=a,a=c}return null!=o&&(o.right=a.left,a.left=s),null!=r&&(r.left=a.right,a.right=i),this.root!==a&&(this.root=a,this.splayCount++),n}},{key:"splayMin",value:function(t){for(var e=t,n=e.left;null!=n;){var r=n;e.left=r.right,r.right=e,n=(e=r).left}return e}},{key:"splayMax",value:function(t){for(var e=t,n=e.right;null!=n;){var r=n;e.right=r.left,r.left=e,n=(e=r).right}return e}},{key:"_delete",value:function(t){if(null==this.root)return null;if(0!=this.splay(t))return null;var e=this.root,n=e,r=e.left;if(this.size--,null==r)this.root=e.right;else{var i=e.right;(e=this.splayMax(r)).right=i,this.root=e}return this.modificationCount++,n}},{key:"addNewRoot",value:function(t,e){this.size++,this.modificationCount++;var n=this.root;null!=n?(e<0?(t.left=n,t.right=n.right,n.right=null):(t.right=n,t.left=n.left,n.left=null),this.root=t):this.root=t}},{key:"_first",value:function(){var t=this.root;return null==t?null:(this.root=this.splayMin(t),this.root)}},{key:"_last",value:function(){var t=this.root;return null==t?null:(this.root=this.splayMax(t),this.root)}},{key:"clear",value:function(){this.root=null,this.size=0,this.modificationCount++}},{key:"has",value:function(t){return this.validKey(t)&&0==this.splay(t)}},{key:"defaultCompare",value:function(){return function(t,e){return t<e?-1:t>e?1:0}}},{key:"wrap",value:function(){var t=this;return{getRoot:function(){return t.root},setRoot:function(e){t.root=e},getSize:function(){return t.size},getModificationCount:function(){return t.modificationCount},getSplayCount:function(){return t.splayCount},setSplayCount:function(e){t.splayCount=e},splay:function(e){return t.splay(e)},has:function(e){return t.has(e)}}}}])}(),SplayTreeSet=function(t){function e(t,n){var r;return _classCallCheck(this,e),_defineProperty(r=_callSuper(this,e),"root",null),_defineProperty(r,"compare",void 0),_defineProperty(r,"validKey",void 0),_defineProperty(r,Symbol.toStringTag,"[object Set]"),r.compare=null!=t?t:r.defaultCompare(),r.validKey=null!=n?n:function(t){return null!=t&&null!=t},r}return _inherits(e,SplayTree),_createClass(e,[{key:"delete",value:function(t){return!!this.validKey(t)&&null!=this._delete(t)}},{key:"deleteAll",value:function(t){var e,n=_createForOfIteratorHelper(t);try{for(n.s();!(e=n.n()).done;){var r=e.value;this.delete(r)}}catch(t){n.e(t)}finally{n.f()}}},{key:"forEach",value:function(t){for(var e,n=this[Symbol.iterator]();!(e=n.next()).done;)t(e.value,e.value,this)}},{key:"add",value:function(t){var e=this.splay(t);return 0!=e&&this.addNewRoot(new SplayTreeSetNode(t),e),this}},{key:"addAndReturn",value:function(t){var e=this.splay(t);return 0!=e&&this.addNewRoot(new SplayTreeSetNode(t),e),this.root.key}},{key:"addAll",value:function(t){var e,n=_createForOfIteratorHelper(t);try{for(n.s();!(e=n.n()).done;){var r=e.value;this.add(r)}}catch(t){n.e(t)}finally{n.f()}}},{key:"isEmpty",value:function(){return null==this.root}},{key:"isNotEmpty",value:function(){return null!=this.root}},{key:"single",value:function(){if(0==this.size)throw"Bad state: No element";if(this.size>1)throw"Bad state: Too many element";return this.root.key}},{key:"first",value:function(){if(0==this.size)throw"Bad state: No element";return this._first().key}},{key:"last",value:function(){if(0==this.size)throw"Bad state: No element";return this._last().key}},{key:"lastBefore",value:function(t){if(null==t)throw"Invalid arguments(s)";if(null==this.root)return null;if(this.splay(t)<0)return this.root.key;var e=this.root.left;if(null==e)return null;for(var n=e.right;null!=n;)n=(e=n).right;return e.key}},{key:"firstAfter",value:function(t){if(null==t)throw"Invalid arguments(s)";if(null==this.root)return null;if(this.splay(t)>0)return this.root.key;var e=this.root.right;if(null==e)return null;for(var n=e.left;null!=n;)n=(e=n).left;return e.key}},{key:"retainAll",value:function(t){var n,r=new e(this.compare,this.validKey),i=this.modificationCount,o=_createForOfIteratorHelper(t);try{for(o.s();!(n=o.n()).done;){var s=n.value;if(i!=this.modificationCount)throw"Concurrent modification during iteration.";this.validKey(s)&&0==this.splay(s)&&r.add(this.root.key)}}catch(t){o.e(t)}finally{o.f()}r.size!=this.size&&(this.root=r.root,this.size=r.size,this.modificationCount++)}},{key:"lookup",value:function(t){return this.validKey(t)?0!=this.splay(t)?null:this.root.key:null}},{key:"intersection",value:function(t){var n,r=new e(this.compare,this.validKey),i=_createForOfIteratorHelper(this);try{for(i.s();!(n=i.n()).done;){var o=n.value;t.has(o)&&r.add(o)}}catch(t){i.e(t)}finally{i.f()}return r}},{key:"difference",value:function(t){var n,r=new e(this.compare,this.validKey),i=_createForOfIteratorHelper(this);try{for(i.s();!(n=i.n()).done;){var o=n.value;t.has(o)||r.add(o)}}catch(t){i.e(t)}finally{i.f()}return r}},{key:"union",value:function(t){var e=this.clone();return e.addAll(t),e}},{key:"clone",value:function(){var t=new e(this.compare,this.validKey);return t.size=this.size,t.root=this.copyNode(this.root),t}},{key:"copyNode",value:function(t){if(null==t)return null;var e=new SplayTreeSetNode(t.key);return function t(e,n){var r,i;do{if(r=e.left,i=e.right,null!=r){var o=new SplayTreeSetNode(r.key);n.left=o,t(r,o)}if(null!=i){var s=new SplayTreeSetNode(i.key);n.right=s,e=i,n=s}}while(null!=i)}(t,e),e}},{key:"toSet",value:function(){return this.clone()}},{key:"entries",value:function(){return new SplayTreeSetEntryIterableIterator(this.wrap())}},{key:"keys",value:function(){return this[Symbol.iterator]()}},{key:"values",value:function(){return this[Symbol.iterator]()}},{key:Symbol.iterator,value:function(){return new SplayTreeKeyIterableIterator(this.wrap())}}])}(),SplayTreeIterableIterator=function(){return _createClass(function t(e){_classCallCheck(this,t),_defineProperty(this,"tree",void 0),_defineProperty(this,"path",new Array),_defineProperty(this,"modificationCount",null),_defineProperty(this,"splayCount",void 0),this.tree=e,this.splayCount=e.getSplayCount()},[{key:Symbol.iterator,value:function(){return this}},{key:"next",value:function(){return this.moveNext()?{done:!1,value:this.current()}:{done:!0,value:null}}},{key:"current",value:function(){if(!this.path.length)return null;var t=this.path[this.path.length-1];return this.getValue(t)}},{key:"rebuildPath",value:function(t){this.path.splice(0,this.path.length),this.tree.splay(t),this.path.push(this.tree.getRoot()),this.splayCount=this.tree.getSplayCount()}},{key:"findLeftMostDescendent",value:function(t){for(;null!=t;)this.path.push(t),t=t.left}},{key:"moveNext",value:function(){if(this.modificationCount!=this.tree.getModificationCount()){if(null==this.modificationCount){this.modificationCount=this.tree.getModificationCount();for(var t=this.tree.getRoot();null!=t;)this.path.push(t),t=t.left;return this.path.length>0}throw"Concurrent modification during iteration."}if(!this.path.length)return!1;this.splayCount!=this.tree.getSplayCount()&&this.rebuildPath(this.path[this.path.length-1].key);var e=this.path[this.path.length-1],n=e.right;if(null!=n){for(;null!=n;)this.path.push(n),n=n.left;return!0}for(this.path.pop();this.path.length&&this.path[this.path.length-1].right===e;)e=this.path.pop();return this.path.length>0}}])}(),SplayTreeKeyIterableIterator=function(t){function e(){return _classCallCheck(this,e),_callSuper(this,e,arguments)}return _inherits(e,SplayTreeIterableIterator),_createClass(e,[{key:"getValue",value:function(t){return t.key}}])}(),SplayTreeSetEntryIterableIterator=function(t){function e(){return _classCallCheck(this,e),_callSuper(this,e,arguments)}return _inherits(e,SplayTreeIterableIterator),_createClass(e,[{key:"getValue",value:function(t){return[t.key,t.key]}}])}(),constant_default=function(t){return function(){return t}},compare_default=function(t){var e=t?function(e,n){return n.minus(e).abs().isLessThanOrEqualTo(t)}:constant_default(!1);return function(t,n){return e(t,n)?0:t.comparedTo(n)}};function orient_default(t){var e=t?function(e,n,r,i,o){return e.exponentiatedBy(2).isLessThanOrEqualTo(i.minus(n).exponentiatedBy(2).plus(o.minus(r).exponentiatedBy(2)).times(t))}:constant_default(!1);return function(t,n,r){var i=t.x,o=t.y,s=r.x,a=r.y,l=o.minus(a).times(n.x.minus(s)).minus(i.minus(s).times(n.y.minus(a)));return e(l,i,o,s,a)?0:l.comparedTo(0)}}var identity_default=function(t){return t},snap_default=function(t){if(t){var e=new SplayTreeSet(compare_default(t)),n=new SplayTreeSet(compare_default(t)),r=function(t,e){return e.addAndReturn(t)},i=function(t){return{x:r(t.x,e),y:r(t.y,n)}};return i({x:new BigNumber(0),y:new BigNumber(0)}),i}return identity_default},_set2=function(t){return{set:function(t){precision=_set2(t)},reset:function(){return _set2(t)},compare:compare_default(t),snap:snap_default(t),orient:orient_default(t)}},precision=_set2(),isInBbox=function(t,e){return t.ll.x.isLessThanOrEqualTo(e.x)&&e.x.isLessThanOrEqualTo(t.ur.x)&&t.ll.y.isLessThanOrEqualTo(e.y)&&e.y.isLessThanOrEqualTo(t.ur.y)},getBboxOverlap=function(t,e){if(e.ur.x.isLessThan(t.ll.x)||t.ur.x.isLessThan(e.ll.x)||e.ur.y.isLessThan(t.ll.y)||t.ur.y.isLessThan(e.ll.y))return null;var n=t.ll.x.isLessThan(e.ll.x)?e.ll.x:t.ll.x,r=t.ur.x.isLessThan(e.ur.x)?t.ur.x:e.ur.x;return{ll:{x:n,y:t.ll.y.isLessThan(e.ll.y)?e.ll.y:t.ll.y},ur:{x:r,y:t.ur.y.isLessThan(e.ur.y)?t.ur.y:e.ur.y}}},crossProduct=function(t,e){return t.x.times(e.y).minus(t.y.times(e.x))},dotProduct=function(t,e){return t.x.times(e.x).plus(t.y.times(e.y))},length=function(t){return dotProduct(t,t).sqrt()},sineOfAngle=function(t,e,n){var r={x:e.x.minus(t.x),y:e.y.minus(t.y)},i={x:n.x.minus(t.x),y:n.y.minus(t.y)};return crossProduct(i,r).div(length(i)).div(length(r))},cosineOfAngle=function(t,e,n){var r={x:e.x.minus(t.x),y:e.y.minus(t.y)},i={x:n.x.minus(t.x),y:n.y.minus(t.y)};return dotProduct(i,r).div(length(i)).div(length(r))},horizontalIntersection=function(t,e,n){return e.y.isZero()?null:{x:t.x.plus(e.x.div(e.y).times(n.minus(t.y))),y:n}},verticalIntersection=function(t,e,n){return e.x.isZero()?null:{x:n,y:t.y.plus(e.y.div(e.x).times(n.minus(t.x)))}},intersection=function(t,e,n,r){if(e.x.isZero())return verticalIntersection(n,r,t.x);if(r.x.isZero())return verticalIntersection(t,e,n.x);if(e.y.isZero())return horizontalIntersection(n,r,t.y);if(r.y.isZero())return horizontalIntersection(t,e,n.y);var i=crossProduct(e,r);if(i.isZero())return null;var o={x:n.x.minus(t.x),y:n.y.minus(t.y)},s=crossProduct(o,e).div(i),a=crossProduct(o,r).div(i),l=t.x.plus(a.times(e.x)),u=n.x.plus(s.times(r.x)),c=t.y.plus(a.times(e.y)),h=n.y.plus(s.times(r.y));return{x:l.plus(u).div(2),y:c.plus(h).div(2)}},SweepEvent=function(){function t(e,n){_classCallCheck(this,t),_defineProperty(this,"point",void 0),_defineProperty(this,"isLeft",void 0),_defineProperty(this,"segment",void 0),_defineProperty(this,"otherSE",void 0),_defineProperty(this,"consumedBy",void 0),void 0===e.events?e.events=[this]:e.events.push(this),this.point=e,this.isLeft=n}return _createClass(t,[{key:"link",value:function(t){if(t.point===this.point)throw new Error("Tried to link already linked events");for(var e=t.point.events,n=0,r=e.length;n<r;n++){var i=e[n];this.point.events.push(i),i.point=this.point}this.checkForConsuming()}},{key:"checkForConsuming",value:function(){for(var t=this.point.events.length,e=0;e<t;e++){var n=this.point.events[e];if(void 0===n.segment.consumedBy)for(var r=e+1;r<t;r++){var i=this.point.events[r];void 0===i.consumedBy&&(n.otherSE.point.events===i.otherSE.point.events&&n.segment.consume(i.segment))}}}},{key:"getAvailableLinkedEvents",value:function(){for(var t=[],e=0,n=this.point.events.length;e<n;e++){var r=this.point.events[e];r!==this&&!r.segment.ringOut&&r.segment.isInResult()&&t.push(r)}return t}},{key:"getLeftmostComparator",value:function(t){var e=this,n=new Map,r=function(r){var i=r.otherSE;n.set(r,{sine:sineOfAngle(e.point,t.point,i.point),cosine:cosineOfAngle(e.point,t.point,i.point)})};return function(t,e){n.has(t)||r(t),n.has(e)||r(e);var i=n.get(t),o=i.sine,s=i.cosine,a=n.get(e),l=a.sine,u=a.cosine;return o.isGreaterThanOrEqualTo(0)&&l.isGreaterThanOrEqualTo(0)?s.isLessThan(u)?1:s.isGreaterThan(u)?-1:0:o.isLessThan(0)&&l.isLessThan(0)?s.isLessThan(u)?-1:s.isGreaterThan(u)?1:0:l.isLessThan(o)?-1:l.isGreaterThan(o)?1:0}}}],[{key:"compare",value:function(e,n){var r=t.comparePoints(e.point,n.point);return 0!==r?r:(e.point!==n.point&&e.link(n),e.isLeft!==n.isLeft?e.isLeft?1:-1:Segment.compare(e.segment,n.segment))}},{key:"comparePoints",value:function(t,e){return t.x.isLessThan(e.x)?-1:t.x.isGreaterThan(e.x)?1:t.y.isLessThan(e.y)?-1:t.y.isGreaterThan(e.y)?1:0}}])}(),RingOut=function(){function t(e){_classCallCheck(this,t),_defineProperty(this,"events",void 0),_defineProperty(this,"poly",void 0),_defineProperty(this,"_isExteriorRing",void 0),_defineProperty(this,"_enclosingRing",void 0),this.events=e;for(var n=0,r=e.length;n<r;n++)e[n].segment.ringOut=this;this.poly=null}return _createClass(t,[{key:"getGeom",value:function(){for(var t=this.events[0].point,e=[t],n=1,r=this.events.length-1;n<r;n++){var i=this.events[n].point,o=this.events[n+1].point;0!==precision.orient(i,t,o)&&(e.push(i),t=i)}if(1===e.length)return null;var s=e[0],a=e[1];0===precision.orient(s,t,a)&&e.shift(),e.push(e[0]);for(var l=this.isExteriorRing()?1:-1,u=this.isExteriorRing()?0:e.length-1,c=this.isExteriorRing()?e.length:-1,h=[],f=u;f!=c;f+=l)h.push([e[f].x.toNumber(),e[f].y.toNumber()]);return h}},{key:"isExteriorRing",value:function(){if(void 0===this._isExteriorRing){var t=this.enclosingRing();this._isExteriorRing=!t||!t.isExteriorRing()}return this._isExteriorRing}},{key:"enclosingRing",value:function(){return void 0===this._enclosingRing&&(this._enclosingRing=this._calcEnclosingRing()),this._enclosingRing}},{key:"_calcEnclosingRing",value:function(){for(var t=this.events[0],e=1,n=this.events.length;e<n;e++){var r=this.events[e];SweepEvent.compare(t,r)>0&&(t=r)}for(var i=t.segment.prevInResult(),o=i?i.prevInResult():null;;){if(!i)return null;if(!o)return i.ringOut;var s,a;if(o.ringOut!==i.ringOut)return(null===(s=o.ringOut)||void 0===s?void 0:s.enclosingRing())!==i.ringOut?i.ringOut:null===(a=i.ringOut)||void 0===a?void 0:a.enclosingRing();i=o.prevInResult(),o=i?i.prevInResult():null}}}],[{key:"factory",value:function(e){for(var n=[],r=0,i=e.length;r<i;r++){var o=e[r];if(o.isInResult()&&!o.ringOut){for(var s=null,a=o.leftSE,l=o.rightSE,u=[a],c=a.point,h=[];s=a,a=l,u.push(a),a.point!==c;)for(;;){var f=a.getAvailableLinkedEvents();if(0===f.length){var p=u[0].point,d=u[u.length-1].point;throw new Error("Unable to complete output ring starting at [".concat(p.x,", ").concat(p.y,"]. Last matching segment found ends at [").concat(d.x,", ").concat(d.y,"]."))}if(1===f.length){l=f[0].otherSE;break}for(var y=null,_=0,m=h.length;_<m;_++)if(h[_].point===a.point){y=_;break}if(null===y){h.push({index:u.length,point:a.point});var g=a.getLeftmostComparator(s);l=f.sort(g)[0].otherSE;break}var v=h.splice(y)[0],P=u.splice(v.index);P.unshift(P[0].otherSE),n.push(new t(P.reverse()))}n.push(new t(u))}}return n}}])}(),PolyOut=function(){return _createClass(function t(e){_classCallCheck(this,t),_defineProperty(this,"exteriorRing",void 0),_defineProperty(this,"interiorRings",void 0),this.exteriorRing=e,e.poly=this,this.interiorRings=[]},[{key:"addInterior",value:function(t){this.interiorRings.push(t),t.poly=this}},{key:"getGeom",value:function(){var t=this.exteriorRing.getGeom();if(null===t)return null;for(var e=[t],n=0,r=this.interiorRings.length;n<r;n++){var i=this.interiorRings[n].getGeom();null!==i&&e.push(i)}return e}}])}(),MultiPolyOut=function(){return _createClass(function t(e){_classCallCheck(this,t),_defineProperty(this,"rings",void 0),_defineProperty(this,"polys",void 0),this.rings=e,this.polys=this._composePolys(e)},[{key:"getGeom",value:function(){for(var t=[],e=0,n=this.polys.length;e<n;e++){var r=this.polys[e].getGeom();null!==r&&t.push(r)}return t}},{key:"_composePolys",value:function(t){for(var e=[],n=0,r=t.length;n<r;n++){var i=t[n];if(!i.poly)if(i.isExteriorRing())e.push(new PolyOut(i));else{var o,s=i.enclosingRing();null!=s&&s.poly||e.push(new PolyOut(s)),null==s||null===(o=s.poly)||void 0===o||o.addInterior(i)}}return e}}])}(),SweepLine=function(){return _createClass(function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Segment.compare;_classCallCheck(this,t),_defineProperty(this,"queue",void 0),_defineProperty(this,"tree",void 0),_defineProperty(this,"segments",void 0),this.queue=e,this.tree=new SplayTreeSet(n),this.segments=[]},[{key:"process",value:function(t){var e=t.segment,n=[];if(t.consumedBy)return t.isLeft?this.queue.delete(t.otherSE):this.tree.delete(e),n;t.isLeft&&this.tree.add(e);var r=e,i=e;do{r=this.tree.lastBefore(r)}while(null!=r&&null!=r.consumedBy);do{i=this.tree.firstAfter(i)}while(null!=i&&null!=i.consumedBy);if(t.isLeft){var o=null;if(r){var s=r.getIntersection(e);if(null!==s&&(e.isAnEndpoint(s)||(o=s),!r.isAnEndpoint(s)))for(var a=this._splitSafely(r,s),l=0,u=a.length;l<u;l++)n.push(a[l])}var c=null;if(i){var h=i.getIntersection(e);if(null!==h&&(e.isAnEndpoint(h)||(c=h),!i.isAnEndpoint(h)))for(var f=this._splitSafely(i,h),p=0,d=f.length;p<d;p++)n.push(f[p])}if(null!==o||null!==c){var y=null;if(null===o)y=c;else if(null===c)y=o;else{y=SweepEvent.comparePoints(o,c)<=0?o:c}this.queue.delete(e.rightSE),n.push(e.rightSE);for(var _=e.split(y),m=0,g=_.length;m<g;m++)n.push(_[m])}n.length>0?(this.tree.delete(e),n.push(t)):(this.segments.push(e),e.prev=r)}else{if(r&&i){var v=r.getIntersection(i);if(null!==v){if(!r.isAnEndpoint(v))for(var P=this._splitSafely(r,v),b=0,S=P.length;b<S;b++)n.push(P[b]);if(!i.isAnEndpoint(v))for(var E=this._splitSafely(i,v),x=0,I=E.length;x<I;x++)n.push(E[x])}}this.tree.delete(e)}return n}},{key:"_splitSafely",value:function(t,e){this.tree.delete(t);var n=t.rightSE;this.queue.delete(n);var r=t.split(e);return r.push(n),void 0===t.consumedBy&&this.tree.add(t),r}}])}(),Operation=function(){return _createClass(function t(){_classCallCheck(this,t),_defineProperty(this,"type",void 0),_defineProperty(this,"numMultiPolys",void 0)},[{key:"run",value:function(t,e,n){operation.type=t;for(var r=[new MultiPolyIn(e,!0)],i=0,o=n.length;i<o;i++)r.push(new MultiPolyIn(n[i],!1));if(operation.numMultiPolys=r.length,"difference"===operation.type)for(var s=r[0],a=1;a<r.length;)null!==getBboxOverlap(r[a].bbox,s.bbox)?a++:r.splice(a,1);if("intersection"===operation.type)for(var l=0,u=r.length;l<u;l++)for(var c=r[l],h=l+1,f=r.length;h<f;h++)if(null===getBboxOverlap(c.bbox,r[h].bbox))return[];for(var p=new SplayTreeSet(SweepEvent.compare),d=0,y=r.length;d<y;d++)for(var _=r[d].getSweepEvents(),m=0,g=_.length;m<g;m++)p.add(_[m]);var v=new SweepLine(p),P=null;for(0!=p.size&&(P=p.first(),p.delete(P));P;){for(var b=v.process(P),S=0,E=b.length;S<E;S++){var x=b[S];void 0===x.consumedBy&&p.add(x)}0!=p.size?(P=p.first(),p.delete(P)):P=null}precision.reset();var I=RingOut.factory(v.segments);return new MultiPolyOut(I).getGeom()}}])}(),operation=new Operation,operation_default=operation,segmentId=0,Segment=function(){function t(e,n,r,i){_classCallCheck(this,t),_defineProperty(this,"id",void 0),_defineProperty(this,"leftSE",void 0),_defineProperty(this,"rightSE",void 0),_defineProperty(this,"rings",void 0),_defineProperty(this,"windings",void 0),_defineProperty(this,"ringOut",void 0),_defineProperty(this,"consumedBy",void 0),_defineProperty(this,"prev",void 0),_defineProperty(this,"_prevInResult",void 0),_defineProperty(this,"_beforeState",void 0),_defineProperty(this,"_afterState",void 0),_defineProperty(this,"_isInResult",void 0),this.id=++segmentId,this.leftSE=e,e.segment=this,e.otherSE=n,this.rightSE=n,n.segment=this,n.otherSE=e,this.rings=r,this.windings=i}return _createClass(t,[{key:"replaceRightSE",value:function(t){this.rightSE=t,this.rightSE.segment=this,this.rightSE.otherSE=this.leftSE,this.leftSE.otherSE=this.rightSE}},{key:"bbox",value:function(){var t=this.leftSE.point.y,e=this.rightSE.point.y;return{ll:{x:this.leftSE.point.x,y:t.isLessThan(e)?t:e},ur:{x:this.rightSE.point.x,y:t.isGreaterThan(e)?t:e}}}},{key:"vector",value:function(){return{x:this.rightSE.point.x.minus(this.leftSE.point.x),y:this.rightSE.point.y.minus(this.leftSE.point.y)}}},{key:"isAnEndpoint",value:function(t){return t.x.eq(this.leftSE.point.x)&&t.y.eq(this.leftSE.point.y)||t.x.eq(this.rightSE.point.x)&&t.y.eq(this.rightSE.point.y)}},{key:"comparePoint",value:function(t){return precision.orient(this.leftSE.point,t,this.rightSE.point)}},{key:"getIntersection",value:function(t){var e=this.bbox(),n=t.bbox(),r=getBboxOverlap(e,n);if(null===r)return null;var i=this.leftSE.point,o=this.rightSE.point,s=t.leftSE.point,a=t.rightSE.point,l=isInBbox(e,s)&&0===this.comparePoint(s),u=isInBbox(n,i)&&0===t.comparePoint(i),c=isInBbox(e,a)&&0===this.comparePoint(a),h=isInBbox(n,o)&&0===t.comparePoint(o);if(u&&l)return h&&!c?o:!h&&c?a:null;if(u)return c&&i.x.eq(a.x)&&i.y.eq(a.y)?null:i;if(l)return h&&o.x.eq(s.x)&&o.y.eq(s.y)?null:s;if(h&&c)return null;if(h)return o;if(c)return a;var f=intersection(i,this.vector(),s,t.vector());return null===f?null:isInBbox(r,f)?precision.snap(f):null}},{key:"split",value:function(e){var n=[],r=void 0!==e.events,i=new SweepEvent(e,!0),o=new SweepEvent(e,!1),s=this.rightSE;this.replaceRightSE(o),n.push(o),n.push(i);var a=new t(i,s,this.rings.slice(),this.windings.slice());return SweepEvent.comparePoints(a.leftSE.point,a.rightSE.point)>0&&a.swapEvents(),SweepEvent.comparePoints(this.leftSE.point,this.rightSE.point)>0&&this.swapEvents(),r&&(i.checkForConsuming(),o.checkForConsuming()),n}},{key:"swapEvents",value:function(){var t=this.rightSE;this.rightSE=this.leftSE,this.leftSE=t,this.leftSE.isLeft=!0,this.rightSE.isLeft=!1;for(var e=0,n=this.windings.length;e<n;e++)this.windings[e]*=-1}},{key:"consume",value:function(e){for(var n=this,r=e;n.consumedBy;)n=n.consumedBy;for(;r.consumedBy;)r=r.consumedBy;var i=t.compare(n,r);if(0!==i){if(i>0){var o=n;n=r,r=o}if(n.prev===r){var s=n;n=r,r=s}for(var a=0,l=r.rings.length;a<l;a++){var u=r.rings[a],c=r.windings[a],h=n.rings.indexOf(u);-1===h?(n.rings.push(u),n.windings.push(c)):n.windings[h]+=c}r.rings=null,r.windings=null,r.consumedBy=n,r.leftSE.consumedBy=n.leftSE,r.rightSE.consumedBy=n.rightSE}}},{key:"prevInResult",value:function(){return void 0!==this._prevInResult?this._prevInResult:(this.prev?this.prev.isInResult()?this._prevInResult=this.prev:this._prevInResult=this.prev.prevInResult():this._prevInResult=null,this._prevInResult)}},{key:"beforeState",value:function(){if(void 0!==this._beforeState)return this._beforeState;if(this.prev){var t=this.prev.consumedBy||this.prev;this._beforeState=t.afterState()}else this._beforeState={rings:[],windings:[],multiPolys:[]};return this._beforeState}},{key:"afterState",value:function(){if(void 0!==this._afterState)return this._afterState;var t=this.beforeState();this._afterState={rings:t.rings.slice(0),windings:t.windings.slice(0),multiPolys:[]};for(var e=this._afterState.rings,n=this._afterState.windings,r=this._afterState.multiPolys,i=0,o=this.rings.length;i<o;i++){var s=this.rings[i],a=this.windings[i],l=e.indexOf(s);-1===l?(e.push(s),n.push(a)):n[l]+=a}for(var u=[],c=[],h=0,f=e.length;h<f;h++)if(0!==n[h]){var p=e[h],d=p.poly;if(-1===c.indexOf(d))if(p.isExterior)u.push(d);else{-1===c.indexOf(d)&&c.push(d);var y=u.indexOf(p.poly);-1!==y&&u.splice(y,1)}}for(var _=0,m=u.length;_<m;_++){var g=u[_].multiPoly;-1===r.indexOf(g)&&r.push(g)}return this._afterState}},{key:"isInResult",value:function(){if(this.consumedBy)return!1;if(void 0!==this._isInResult)return this._isInResult;var t=this.beforeState().multiPolys,e=this.afterState().multiPolys;switch(operation_default.type){case"union":var n=0===t.length,r=0===e.length;this._isInResult=n!==r;break;case"intersection":var i,o;t.length<e.length?(i=t.length,o=e.length):(i=e.length,o=t.length),this._isInResult=o===operation_default.numMultiPolys&&i<o;break;case"xor":var s=Math.abs(t.length-e.length);this._isInResult=s%2==1;break;case"difference":var a=function(t){return 1===t.length&&t[0].isSubject};this._isInResult=a(t)!==a(e)}return this._isInResult}}],[{key:"compare",value:function(t,e){var n=t.leftSE.point.x,r=e.leftSE.point.x,i=t.rightSE.point.x,o=e.rightSE.point.x;if(o.isLessThan(n))return 1;if(i.isLessThan(r))return-1;var s=t.leftSE.point.y,a=e.leftSE.point.y,l=t.rightSE.point.y,u=e.rightSE.point.y;if(n.isLessThan(r)){if(a.isLessThan(s)&&a.isLessThan(l))return 1;if(a.isGreaterThan(s)&&a.isGreaterThan(l))return-1;var c=t.comparePoint(e.leftSE.point);if(c<0)return 1;if(c>0)return-1;var h=e.comparePoint(t.rightSE.point);return 0!==h?h:-1}if(n.isGreaterThan(r)){if(s.isLessThan(a)&&s.isLessThan(u))return-1;if(s.isGreaterThan(a)&&s.isGreaterThan(u))return 1;var f=e.comparePoint(t.leftSE.point);if(0!==f)return f;var p=t.comparePoint(e.rightSE.point);return p<0?1:p>0?-1:1}if(s.isLessThan(a))return-1;if(s.isGreaterThan(a))return 1;if(i.isLessThan(o)){var d=e.comparePoint(t.rightSE.point);if(0!==d)return d}if(i.isGreaterThan(o)){var y=t.comparePoint(e.rightSE.point);if(y<0)return 1;if(y>0)return-1}if(!i.eq(o)){var _=l.minus(s),m=i.minus(n),g=u.minus(a),v=o.minus(r);if(_.isGreaterThan(m)&&g.isLessThan(v))return 1;if(_.isLessThan(m)&&g.isGreaterThan(v))return-1}return i.isGreaterThan(o)?1:i.isLessThan(o)?-1:l.isLessThan(u)?-1:l.isGreaterThan(u)?1:t.id<e.id?-1:t.id>e.id?1:0}},{key:"fromRing",value:function(e,n,r){var i,o,s,a=SweepEvent.comparePoints(e,n);if(a<0)i=e,o=n,s=1;else{if(!(a>0))throw new Error("Tried to create degenerate segment at [".concat(e.x,", ").concat(e.y,"]"));i=n,o=e,s=-1}return new t(new SweepEvent(i,!0),new SweepEvent(o,!1),[r],[s])}}])}(),RingIn=function(){return _createClass(function t(e,n,r){if(_classCallCheck(this,t),_defineProperty(this,"poly",void 0),_defineProperty(this,"isExterior",void 0),_defineProperty(this,"segments",void 0),_defineProperty(this,"bbox",void 0),!Array.isArray(e)||0===e.length)throw new Error("Input geometry is not a valid Polygon or MultiPolygon");if(this.poly=n,this.isExterior=r,this.segments=[],"number"!=typeof e[0][0]||"number"!=typeof e[0][1])throw new Error("Input geometry is not a valid Polygon or MultiPolygon");var i=precision.snap({x:new BigNumber(e[0][0]),y:new BigNumber(e[0][1])});this.bbox={ll:{x:i.x,y:i.y},ur:{x:i.x,y:i.y}};for(var o=i,s=1,a=e.length;s<a;s++){if("number"!=typeof e[s][0]||"number"!=typeof e[s][1])throw new Error("Input geometry is not a valid Polygon or MultiPolygon");var l=precision.snap({x:new BigNumber(e[s][0]),y:new BigNumber(e[s][1])});l.x.eq(o.x)&&l.y.eq(o.y)||(this.segments.push(Segment.fromRing(o,l,this)),l.x.isLessThan(this.bbox.ll.x)&&(this.bbox.ll.x=l.x),l.y.isLessThan(this.bbox.ll.y)&&(this.bbox.ll.y=l.y),l.x.isGreaterThan(this.bbox.ur.x)&&(this.bbox.ur.x=l.x),l.y.isGreaterThan(this.bbox.ur.y)&&(this.bbox.ur.y=l.y),o=l)}i.x.eq(o.x)&&i.y.eq(o.y)||this.segments.push(Segment.fromRing(o,i,this))},[{key:"getSweepEvents",value:function(){for(var t=[],e=0,n=this.segments.length;e<n;e++){var r=this.segments[e];t.push(r.leftSE),t.push(r.rightSE)}return t}}])}(),PolyIn=function(){return _createClass(function t(e,n){if(_classCallCheck(this,t),_defineProperty(this,"multiPoly",void 0),_defineProperty(this,"exteriorRing",void 0),_defineProperty(this,"interiorRings",void 0),_defineProperty(this,"bbox",void 0),!Array.isArray(e))throw new Error("Input geometry is not a valid Polygon or MultiPolygon");this.exteriorRing=new RingIn(e[0],this,!0),this.bbox={ll:{x:this.exteriorRing.bbox.ll.x,y:this.exteriorRing.bbox.ll.y},ur:{x:this.exteriorRing.bbox.ur.x,y:this.exteriorRing.bbox.ur.y}},this.interiorRings=[];for(var r=1,i=e.length;r<i;r++){var o=new RingIn(e[r],this,!1);o.bbox.ll.x.isLessThan(this.bbox.ll.x)&&(this.bbox.ll.x=o.bbox.ll.x),o.bbox.ll.y.isLessThan(this.bbox.ll.y)&&(this.bbox.ll.y=o.bbox.ll.y),o.bbox.ur.x.isGreaterThan(this.bbox.ur.x)&&(this.bbox.ur.x=o.bbox.ur.x),o.bbox.ur.y.isGreaterThan(this.bbox.ur.y)&&(this.bbox.ur.y=o.bbox.ur.y),this.interiorRings.push(o)}this.multiPoly=n},[{key:"getSweepEvents",value:function(){for(var t=this.exteriorRing.getSweepEvents(),e=0,n=this.interiorRings.length;e<n;e++)for(var r=this.interiorRings[e].getSweepEvents(),i=0,o=r.length;i<o;i++)t.push(r[i]);return t}}])}(),MultiPolyIn=function(){return _createClass(function t(e,n){if(_classCallCheck(this,t),_defineProperty(this,"isSubject",void 0),_defineProperty(this,"polys",void 0),_defineProperty(this,"bbox",void 0),!Array.isArray(e))throw new Error("Input geometry is not a valid Polygon or MultiPolygon");try{"number"==typeof e[0][0][0]&&(e=[e])}catch(t){}this.polys=[],this.bbox={ll:{x:new BigNumber(Number.POSITIVE_INFINITY),y:new BigNumber(Number.POSITIVE_INFINITY)},ur:{x:new BigNumber(Number.NEGATIVE_INFINITY),y:new BigNumber(Number.NEGATIVE_INFINITY)}};for(var r=0,i=e.length;r<i;r++){var o=new PolyIn(e[r],this);o.bbox.ll.x.isLessThan(this.bbox.ll.x)&&(this.bbox.ll.x=o.bbox.ll.x),o.bbox.ll.y.isLessThan(this.bbox.ll.y)&&(this.bbox.ll.y=o.bbox.ll.y),o.bbox.ur.x.isGreaterThan(this.bbox.ur.x)&&(this.bbox.ur.x=o.bbox.ur.x),o.bbox.ur.y.isGreaterThan(this.bbox.ur.y)&&(this.bbox.ur.y=o.bbox.ur.y),this.polys.push(o)}this.isSubject=n},[{key:"getSweepEvents",value:function(){for(var t=[],e=0,n=this.polys.length;e<n;e++)for(var r=this.polys[e].getSweepEvents(),i=0,o=r.length;i<o;i++)t.push(r[i]);return t}}])}(),union=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];return operation_default.run("union",t,n)},intersection2=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];return operation_default.run("intersection",t,n)},xor=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];return operation_default.run("xor",t,n)},difference=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];return operation_default.run("difference",t,n)},setPrecision=precision.set,polyclip=Object.freeze({__proto__:null,difference:difference,intersection:intersection2,setPrecision:setPrecision,union:union,xor:xor});function intersect(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=[];if(geomEach(t,function(t){n.push(t.coordinates)}),n.length<2)throw new Error("Must specify at least 2 geometries");var r=intersection2.apply(polyclip,[n[0]].concat(_toConsumableArray(n.slice(1))));return 0===r.length?null:1===r.length?polygon(r[0],e.properties):multiPolygon(r,e.properties)}var turf_intersect_default=intersect,latLngsToClipperPoints=function(t,e){return e.map(function(e){var n=t.latLngToLayerPoint(e);return{X:n.x,Y:n.y}})},clipperPolygonsToLatLngs=function(t,e){return e.map(function(e){return e.map(function(e){var n=new leafletSrc_3(e.X,e.Y);return t.layerPointToLatLng(n)})})},simplifyPolygon=function(t,e,n){var r=clipper_1.CleanPolygon(latLngsToClipperPoints(t,e),n.simplifyFactor),i=clipper_1.SimplifyPolygon(r,clipper_2.pftNonZero);return clipperPolygonsToLatLngs(t,i)};function fillPolygon(t,e,n){var r=latLngsToClipperPoints(t,e.getLatLngs()[0]);clipper_1.SimplifyPolygon(r,clipper_2.pftNonZero),removeFor(t,e);var i=r.map(function(e){return t.layerPointToLatLng(new leafletSrc_3(e.X,e.Y))});createFor(t,i,n,!0)}function latLngsToTuple(t){return t.map(function(t){return[t.lat,t.lng]})}var mergePolygons=function(t,e,n){var r=ramda_2(turfPolygon,function(t){return[t]},function(t){return[].concat(_toConsumableArray(t),[ramda_3(t)])},latLngsToTuple),i=e.reduce(function(n,i){var o=i.getLatLngs()[0],s=latLngsToClipperPoints(t,i.getLatLngs()[0]),a=r(o),l=e.filter(ramda_4(ramda_5(i))).some(function(t){var e=r(t.getLatLngs()[0]);return!(!a||!e)&&Boolean(turf_intersect_default({type:"FeatureCollection",features:[a,e]}))}),u=l?"intersecting":"rest";return _objectSpread2(_objectSpread2({},n),{},_defineProperty(_defineProperty({},u,[].concat(_toConsumableArray(n[u]),[l?s:o])),"intersectingPolygons",l?[].concat(_toConsumableArray(n.intersectingPolygons),[i]):n.intersectingPolygons))},{intersecting:[],rest:[],intersectingPolygons:[]}),o=clipper_1.SimplifyPolygons(i.intersecting,clipper_2.pftNonZero);return i.intersectingPolygons.forEach(function(e){return removeFor(t,e)}),ramda_1(o.map(function(e){var r=e.map(function(e){return t.layerPointToLatLng(new leafletSrc_3(e.X,e.Y))});return createFor(t,r,n,!0)}))};function createEdges(t,e,n){var r=function(e){return e.getLatLngs()[0].map(function(e){return t.latLngToLayerPoint(e)})}(e).map(function(i){var o=t[modesKey],s=new leafletSrc_4({className:"leaflet-edge ".concat(o&EDIT?"":"disabled").trim()}),a=t.layerPointToLatLng(i),l=new leafletSrc_5(a,{icon:s}).addTo(t);return leafletSrc_6.disableClickPropagation(l),l.on("mousedown",function i(){if(t[modesKey]&EDIT){t.dragging.disable();var o=function(n){var i=t.latLngToContainerPoint(n.latlng),o=t.containerPointToLatLng(i);l.setLatLng(o);var s=r.map(function(t){return t.getLatLng()});e.setLatLngs(s),e.redraw()};t.on("mousemove",o),t.on("mouseup",s),l.on("mouseup",s)}else t.off("mousedown",i);function s(){t[modesKey]&CREATE||t.dragging.enable(),t.off("mouseup",s),t.off("mousedown",i),t.off("mousemove",o),fillPolygon(t,e,n);var r=function(){return mergePolygons(t,Array.from(polygons.get(t)),n)};n.mergePolygons&&r()&&r(),n.notifyAfterEditExit?t[notifyDeferredKey]=function(){return updateFor(t,"edit")}:updateFor(t,"edit")}}),l});return r}var concavehull_min=createCommonjsModule(function(t){var e,n;e=Math,(n=function(t,e){var n=this.convertLatLngs(t);this.points=n.points,this.maxDistance=isFinite(e)?e:n.maxDistance+1}).prototype={points:[],maxDistance:0,convertLatLngs:function(t){var e=0;return{points:t.map(function(n,r){if(n.x=n.lng,n.y=this.lat2y(n),t[r-1]){var i=this.distanceTo(n,t[r-1]);i>e&&(e=i)}return n}.bind(this)),maxDistance:e}},distanceTo:function(t,n){var r=e.PI/180,i=(n.lat-t.lat)*r,o=(n.lng-t.lng)*r,s=t.lat*r,a=n.lat*r,l=e.sin(i/2),u=e.sin(o/2),c=l*l+u*u*e.cos(s)*e.cos(a);return 12756274*e.atan2(e.sqrt(c),e.sqrt(1-c))},getLatLngs:function(){if(this.length<=3)return this.points;var t=this.points.slice().sort(function(t,e){return t.y-e.y}),e=[],n=t[0],r=n,i={x:r.x,y:r.y-1};e.push(n);for(var o,s=0,a=function(t,e){return this.getAngle(r,i,e)-this.getAngle(r,i,t)}.bind(this);;){s++;for(var l=this.points.slice().sort(a),u=0,c=l.length;c>u;u++)if(this.distanceTo(r,l[u])<this.maxDistance&&!this.isIntersecting(e,l[u])){o=l[u];break}if(!o)return this.points;if(o===r)return this.points;if(e.push(o),o===n)return e;if(i=r,r=o,o=void 0,s>1e3)return this.points}},isIntersecting:function(t,e){for(var n=1,r=t.length-1;r>n;n++)if(this.intersect(t[n-1],t[n],t[r],e))return!0;return!1},intersect:function(t,e,n,r){return!(t.x===n.x&&t.y===n.y||e.x===r.x&&e.y===r.y||t.x===r.x&&t.y===r.y||e.x===n.x&&e.y===n.y)&&this.ccw(t,e,n)*this.ccw(t,e,r)<=0&&this.ccw(n,r,t)*this.ccw(n,r,e)<=0},lat2y:function(t){return 180/e.PI*e.log(e.tan(e.PI/4+t.lat*(e.PI/180)/2))},ccw:function(t,e,n){var r=1e-13,i=e.x-t.x,o=e.y-t.y,s=n.x-t.x,a=n.y-t.y,l=i*a-o*s;return l>r?1:-r>l?-1:-r>i*s||-r>o*a?-1:s*s+a*a+r>i*i+o*o?1:0},getAngle:function(t,n,r){if(r.x===t.x&&r.y===t.y)return-9e3;if(r.x===n.x&&r.y===n.y)return-360;var i,o=t.x-n.x,s=t.y-n.y,a=r.x-t.x,l=r.y-t.y,u=o*l-a*s,c=o*a+s*l;return 0===c?(u>0&&(i=90),0>u&&(i=-90)):(i=180*e.atan(u/c)/e.PI,0>c&&(u>=0&&(i+=180),0>u&&(i-=180))),360===i&&(i=0),180-i}},t.exports?t.exports=n:window.ConcaveHull=n}),concavePolygon=function(t,e){return new concavehull_min([].concat(_toConsumableArray(e),[e[0]])).getLatLngs()},appendEdgeFor=function(t,e,n,r){var i=r.parts,o=r.newPoint,s=r.startPoint,a=r.endPoint,l=i.reduce(function(e,n,r){var l=i[r+1]||i[0];return[].concat(_toConsumableArray(e),n===s&&l===a?[t.containerPointToLatLng(n),t.containerPointToLatLng(o)]:[t.containerPointToLatLng(n)])},[]);e.setLatLngs(l),e[edgesKey].map(function(e){return t.removeLayer(e)}),e[edgesKey]=createEdges(t,e,n)},createFor=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:defaultOptions,r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=polygons.get(t).size===n.maximumPolygons,o=!r&&n.concavePolygon?concavePolygon(t,e):e,s=i?[]:t.simplifyPolygon(t,o,n).map(function(e){var r=new leafletSrc_7(e,_objectSpread2(_objectSpread2(_objectSpread2({},defaultOptions),n),{},{className:"leaflet-polygon"})).addTo(t);return r[edgesKey]=createEdges(t,r,n),leafletSrc_6.disableClickPropagation(r),r.off("click"),r.on("click",handlePolygonClick(t,r,n)),r});if(s.forEach(function(e){return polygons.get(t).add(e)}),!i&&!r&&polygons.get(t).size>1&&n.mergePolygons){var a=mergePolygons(t,Array.from(polygons.get(t)),n);return a.forEach(function(e){return polygons.get(t).add(e)}),a}return s},removeFor=function(t,e){t.removeLayer(e),edgesKey in e&&e[edgesKey].map(function(e){return t.removeLayer(e)}),polygons.get(t).delete(e)},clearFor=function(t){Array.from(polygons.get(t).values()).forEach(function(e){return removeFor(t,e)})},handlePolygonClick=function(t,e,n){return function(r){var i=t.mouseEventToContainerPoint("originalEvent"in r?r.originalEvent:r),o=e.getLatLngs()[0].map(function(e){return t.latLngToContainerPoint(e)}),s=o.reduce(function(t,e,n){var r=e,s=o[n+1]||o[0],a=leafletSrc_8.pointToSegmentDistance(i,r,s);return a<t.lowestDistance?{lowestDistance:a,startPoint:r,endPoint:s}:t},{lowestDistance:1/0,startPoint:new leafletSrc_3,endPoint:new leafletSrc_3}),a=s.startPoint,l=s.endPoint,u=s.lowestDistance,c=t[modesKey],h=Boolean(c&DELETE),f=Boolean(c&APPEND),p=function(){return removeFor(t,e)},d=function(){return appendEdgeFor(t,e,n,{parts:o,newPoint:i,startPoint:a,endPoint:l})};switch(!0){case Boolean(c&DELETE&&c&APPEND):u>n.elbowDistance?p():d();break;case h:p();break;case f:d()}(h||f)&&updateFor(t,h?"remove":"append")}};leafletSrc_1();var polygons=new es6WeakMap,defaultOptions={mode:ALL,smoothFactor:.3,elbowDistance:10,simplifyFactor:1.1,mergePolygons:!0,concavePolygon:!0,maximumPolygons:1/0,notifyAfterEditExit:!1,leaveModeAfterCreate:!1,strokeWidth:2},instanceKey=es6Symbol("freedraw/instance"),modesKey=es6Symbol("freedraw/modes"),notifyDeferredKey=es6Symbol("freedraw/notify-deferred"),edgesKey=es6Symbol("freedraw/edges"),cancelKey=es6Symbol("freedraw/cancel"),FreeDraw=function(t){function e(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:defaultOptions;return _classCallCheck(this,e),(t=_callSuper(this,e)).options=_objectSpread2(_objectSpread2({},defaultOptions),n),t}return _inherits(e,leafletSrc_9),_createClass(e,[{key:"onAdd",value:function(t){this.map=t,t[cancelKey]=function(){},t[instanceKey]=this,t[notifyDeferredKey]=function(){},t.simplifyPolygon=simplifyPolygon,polygons.set(t,new es6Set),modeFor(t,this.options.mode,this.options);var e=this.svg=select(t._container).append("svg").classed("free-draw",!0).attr("width","100%").attr("height","100%").style("pointer-events","none").style("z-index","1001").style("position","relative");this.listenForEvents(t,e,this.options)}},{key:"onRemove",value:function(t){polygons.delete(t),this.svg.remove(),delete t[cancelKey],delete t[instanceKey],delete t.simplifyPolygon}},{key:"create",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{concavePolygon:!1},n=createFor(this.map,t,_objectSpread2(_objectSpread2({},this.options),e));return updateFor(this.map,"create"),n}},{key:"remove",value:function(t){t?removeFor(this.map,t):_superPropGet(e,"remove",this,3)([]),updateFor(this.map,"remove")}},{key:"clear",value:function(){clearFor(this.map),updateFor(this.map,"clear")}},{key:"mode",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return"number"==typeof t&&modeFor(this.map,t,this.options),this.map[modesKey]}},{key:"size",value:function(){return polygons.get(this.map).size}},{key:"all",value:function(){return Array.from(polygons.get(this.map))}},{key:"cancel",value:function(){this.map[cancelKey]()}},{key:"listenForEvents",value:function(t,e,n){var r=this;t.on("mousedown touchstart",function(i){if(t[modesKey]&CREATE){var o=new es6Set,s=r.createPath(e,t.latLngToContainerPoint(i.latlng),n.strokeWidth),a=function(e){var n=t.mouseEventToContainerPoint(e.originalEvent);o.add(t.containerPointToLatLng(n)),s(new leafletSrc_3(n.x,n.y))};t.on("mousemove touchmove",a);var l=function(i){var s=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];t[cancelKey]=function(){},t.off("mouseup",l),t.off("mousemove",a),"body"in document&&document.body.removeEventListener("mouseleave",l),e.selectAll("*").remove(),s&&(o.size&&createFor(t,Array.from(o),n),updateFor(t,"create"),n.leaveModeAfterCreate&&r.mode(r.mode()^CREATE))};t.on("mouseup touchend",l),"body"in document&&document.body.addEventListener("mouseleave",l),t[cancelKey]=function(){return l({},!1)}}})}},{key:"createPath",value:function(t,e,n){var r=e,i=line().curve(monotoneX).x(function(t){return t.x}).y(function(t){return t.y});return function(e){var o=[r,e];r=e,t.append("path").classed("leaflet-line",!0).attr("d",i(o)).attr("fill","none").attr("stroke","black").attr("stroke-width",n)}}}])}(),freeDraw=function(t){return new FreeDraw(t)};"undefined"!=typeof window&&(window.FreeDraw=FreeDraw,FreeDraw.CREATE=CREATE,FreeDraw.EDIT=EDIT,FreeDraw.DELETE=DELETE,FreeDraw.APPEND=APPEND,FreeDraw.EDIT_APPEND=EDIT_APPEND,FreeDraw.NONE=NONE,FreeDraw.ALL=ALL),exports.ALL=ALL,exports.APPEND=APPEND,exports.CREATE=CREATE,exports.DELETE=DELETE,exports.EDIT=EDIT,exports.EDIT_APPEND=EDIT_APPEND,exports.NONE=NONE,exports.default=FreeDraw,exports.defaultOptions=defaultOptions,exports.edgesKey=edgesKey,exports.freeDraw=freeDraw,exports.instanceKey=instanceKey,exports.modesKey=modesKey,exports.notifyDeferredKey=notifyDeferredKey,exports.polygons=polygons;
//# sourceMappingURL=leaflet-freedraw.web.js.map