var W9=Object.defineProperty,H9=Object.defineProperties;var X9=Object.getOwnPropertyDescriptors;var qS=Object.getOwnPropertySymbols;var Zk=Object.prototype.hasOwnProperty,Kk=Object.prototype.propertyIsEnumerable;var Jk=(e,t,n)=>t in e?W9(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,am=(e,t)=>{for(var n in t||(t={}))Zk.call(t,n)&&Jk(e,n,t[n]);if(qS)for(var n of qS(t))Kk.call(t,n)&&Jk(e,n,t[n]);return e},P_=(e,t)=>H9(e,X9(t));var Qk=(e,t)=>{var n={};for(var r in e)Zk.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&qS)for(var r of qS(e))t.indexOf(r)<0&&Kk.call(e,r)&&(n[r]=e[r]);return n};var Iu=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function Y9(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Z9(e){if(e.__esModule)return e;var t=Object.defineProperty({},"__esModule",{value:!0});return Object.keys(e).forEach(function(n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})}),t}var i1={exports:{}},Qc={},Pr={exports:{}},yi={};/** * @license React * react.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var o1=Symbol.for("react.element"),K9=Symbol.for("react.portal"),J9=Symbol.for("react.fragment"),Q9=Symbol.for("react.strict_mode"),tq=Symbol.for("react.profiler"),eq=Symbol.for("react.provider"),nq=Symbol.for("react.context"),rq=Symbol.for("react.forward_ref"),iq=Symbol.for("react.suspense"),oq=Symbol.for("react.memo"),aq=Symbol.for("react.lazy"),tD=Symbol.iterator;function sq(e){return e===null||typeof e!="object"?null:(e=tD&&e[tD]||e["@@iterator"],typeof e=="function"?e:null)}var eD={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},nD=Object.assign,rD={};function T_(e,t,n){this.props=e,this.context=t,this.refs=rD,this.updater=n||eD}T_.prototype.isReactComponent={};T_.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};T_.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function iD(){}iD.prototype=T_.prototype;function dT(e,t,n){this.props=e,this.context=t,this.refs=rD,this.updater=n||eD}var gT=dT.prototype=new iD;gT.constructor=dT;nD(gT,T_.prototype);gT.isPureReactComponent=!0;var oD=Array.isArray,aD=Object.prototype.hasOwnProperty,mT={current:null},sD={key:!0,ref:!0,__self:!0,__source:!0};function uD(e,t,n){var r,i={},a=null,o=null;if(t!=null)for(r in t.ref!==void 0&&(o=t.ref),t.key!==void 0&&(a=""+t.key),t)aD.call(t,r)&&!sD.hasOwnProperty(r)&&(i[r]=t[r]);var u=arguments.length-2;if(u===1)i.children=n;else if(1<u){for(var c=Array(u),g=0;g<u;g++)c[g]=arguments[g+2];i.children=c}if(e&&e.defaultProps)for(r in u=e.defaultProps,u)i[r]===void 0&&(i[r]=u[r]);return{$$typeof:o1,type:e,key:a,ref:o,props:i,_owner:mT.current}}function uq(e,t){return{$$typeof:o1,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function vT(e){return typeof e=="object"&&e!==null&&e.$$typeof===o1}function lq(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var lD=/\/+/g;function yT(e,t){return typeof e=="object"&&e!==null&&e.key!=null?lq(""+e.key):t.toString(36)}function GS(e,t,n,r,i){var a=typeof e;(a==="undefined"||a==="boolean")&&(e=null);var o=!1;if(e===null)o=!0;else switch(a){case"string":case"number":o=!0;break;case"object":switch(e.$$typeof){case o1:case K9:o=!0}}if(o)return o=e,i=i(o),e=r===""?"."+yT(o,0):r,oD(i)?(n="",e!=null&&(n=e.replace(lD,"$&/")+"/"),GS(i,t,n,"",function(g){return g})):i!=null&&(vT(i)&&(i=uq(i,n+(!i.key||o&&o.key===i.key?"":(""+i.key).replace(lD,"$&/")+"/")+e)),t.push(i)),1;if(o=0,r=r===""?".":r+":",oD(e))for(var u=0;u<e.length;u++){a=e[u];var c=r+yT(a,u);o+=GS(a,t,n,c,i)}else if(c=sq(e),typeof c=="function")for(e=c.call(e),u=0;!(a=e.next()).done;)a=a.value,c=r+yT(a,u++),o+=GS(a,t,n,c,i);else if(a==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return o}function WS(e,t,n){if(e==null)return e;var r=[],i=0;return GS(e,r,"","",function(a){return t.call(n,a,i++)}),r}function cq(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var kl={current:null},HS={transition:null},fq={ReactCurrentDispatcher:kl,ReactCurrentBatchConfig:HS,ReactCurrentOwner:mT};yi.Children={map:WS,forEach:function(e,t,n){WS(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return WS(e,function(){t++}),t},toArray:function(e){return WS(e,function(t){return t})||[]},only:function(e){if(!vT(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};yi.Component=T_;yi.Fragment=J9;yi.Profiler=tq;yi.PureComponent=dT;yi.StrictMode=Q9;yi.Suspense=iq;yi.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=fq;yi.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=nD({},e.props),i=e.key,a=e.ref,o=e._owner;if(t!=null){if(t.ref!==void 0&&(a=t.ref,o=mT.current),t.key!==void 0&&(i=""+t.key),e.type&&e.type.defaultProps)var u=e.type.defaultProps;for(c in t)aD.call(t,c)&&!sD.hasOwnProperty(c)&&(r[c]=t[c]===void 0&&u!==void 0?u[c]:t[c])}var c=arguments.length-2;if(c===1)r.children=n;else if(1<c){u=Array(c);for(var g=0;g<c;g++)u[g]=arguments[g+2];r.children=u}return{$$typeof:o1,type:e.type,key:i,ref:a,props:r,_owner:o}};yi.createContext=function(e){return e={$$typeof:nq,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:eq,_context:e},e.Consumer=e};yi.createElement=uD;yi.createFactory=function(e){var t=uD.bind(null,e);return t.type=e,t};yi.createRef=function(){return{current:null}};yi.forwardRef=function(e){return{$$typeof:rq,render:e}};yi.isValidElement=vT;yi.lazy=function(e){return{$$typeof:aq,_payload:{_status:-1,_result:e},_init:cq}};yi.memo=function(e,t){return{$$typeof:oq,type:e,compare:t===void 0?null:t}};yi.startTransition=function(e){var t=HS.transition;HS.transition={};try{e()}finally{HS.transition=t}};yi.unstable_act=function(){throw Error("act(...) is not supported in production builds of React.")};yi.useCallback=function(e,t){return kl.current.useCallback(e,t)};yi.useContext=function(e){return kl.current.useContext(e)};yi.useDebugValue=function(){};yi.useDeferredValue=function(e){return kl.current.useDeferredValue(e)};yi.useEffect=function(e,t){return kl.current.useEffect(e,t)};yi.useId=function(){return kl.current.useId()};yi.useImperativeHandle=function(e,t,n){return kl.current.useImperativeHandle(e,t,n)};yi.useInsertionEffect=function(e,t){return kl.current.useInsertionEffect(e,t)};yi.useLayoutEffect=function(e,t){return kl.current.useLayoutEffect(e,t)};yi.useMemo=function(e,t){return kl.current.useMemo(e,t)};yi.useReducer=function(e,t,n){return kl.current.useReducer(e,t,n)};yi.useRef=function(e){return kl.current.useRef(e)};yi.useState=function(e){return kl.current.useState(e)};yi.useSyncExternalStore=function(e,t,n){return kl.current.useSyncExternalStore(e,t,n)};yi.useTransition=function(){return kl.current.useTransition()};yi.version="18.2.0";Pr.exports=yi;var vr=Pr.exports,cD={exports:{}},fD={};/** * @license React * scheduler.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */(function(e){function t(te,ve){var Wt=te.length;te.push(ve);t:for(;0<Wt;){var be=Wt-1>>>1,De=te[be];if(0<i(De,ve))te[be]=ve,te[Wt]=De,Wt=be;else break t}}function n(te){return te.length===0?null:te[0]}function r(te){if(te.length===0)return null;var ve=te[0],Wt=te.pop();if(Wt!==ve){te[0]=Wt;t:for(var be=0,De=te.length,Fn=De>>>1;be<Fn;){var ar=2*(be+1)-1,Jn=te[ar],Ar=ar+1,cr=te[Ar];if(0>i(Jn,Wt))Ar<De&&0>i(cr,Jn)?(te[be]=cr,te[Ar]=Wt,be=Ar):(te[be]=Jn,te[ar]=Wt,be=ar);else if(Ar<De&&0>i(cr,Wt))te[be]=cr,te[Ar]=Wt,be=Ar;else break t}}return ve}function i(te,ve){var Wt=te.sortIndex-ve.sortIndex;return Wt!==0?Wt:te.id-ve.id}if(typeof performance=="object"&&typeof performance.now=="function"){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,u=o.now();e.unstable_now=function(){return o.now()-u}}var c=[],g=[],_=1,E=null,C=3,O=!1,R=!1,D=!1,B=typeof setTimeout=="function"?setTimeout:null,z=typeof clearTimeout=="function"?clearTimeout:null,k=typeof setImmediate!="undefined"?setImmediate:null;typeof navigator!="undefined"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function $(te){for(var ve=n(g);ve!==null;){if(ve.callback===null)r(g);else if(ve.startTime<=te)r(g),ve.sortIndex=ve.expirationTime,t(c,ve);else break;ve=n(g)}}function K(te){if(D=!1,$(te),!R)if(n(c)!==null)R=!0,Ge(et);else{var ve=n(g);ve!==null&&Yt(K,ve.startTime-te)}}function et(te,ve){R=!1,D&&(D=!1,z(Ot),Ot=-1),O=!0;var Wt=C;try{for($(ve),E=n(c);E!==null&&(!(E.expirationTime>ve)||te&&!_e());){var be=E.callback;if(typeof be=="function"){E.callback=null,C=E.priorityLevel;var De=be(E.expirationTime<=ve);ve=e.unstable_now(),typeof De=="function"?E.callback=De:E===n(c)&&r(c),$(ve)}else r(c);E=n(c)}if(E!==null)var Fn=!0;else{var ar=n(g);ar!==null&&Yt(K,ar.startTime-ve),Fn=!1}return Fn}finally{E=null,C=Wt,O=!1}}var mt=!1,wt=null,Ot=-1,Bt=5,se=-1;function _e(){return!(e.unstable_now()-se<Bt)}function Ne(){if(wt!==null){var te=e.unstable_now();se=te;var ve=!0;try{ve=wt(!0,te)}finally{ve?He():(mt=!1,wt=null)}}else mt=!1}var He;if(typeof k=="function")He=function(){k(Ne)};else if(typeof MessageChannel!="undefined"){var de=new MessageChannel,he=de.port2;de.port1.onmessage=Ne,He=function(){he.postMessage(null)}}else He=function(){B(Ne,0)};function Ge(te){wt=te,mt||(mt=!0,He())}function Yt(te,ve){Ot=B(function(){te(e.unstable_now())},ve)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(te){te.callback=null},e.unstable_continueExecution=function(){R||O||(R=!0,Ge(et))},e.unstable_forceFrameRate=function(te){0>te||125<te?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):Bt=0<te?Math.floor(1e3/te):5},e.unstable_getCurrentPriorityLevel=function(){return C},e.unstable_getFirstCallbackNode=function(){return n(c)},e.unstable_next=function(te){switch(C){case 1:case 2:case 3:var ve=3;break;default:ve=C}var Wt=C;C=ve;try{return te()}finally{C=Wt}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(te,ve){switch(te){case 1:case 2:case 3:case 4:case 5:break;default:te=3}var Wt=C;C=te;try{return ve()}finally{C=Wt}},e.unstable_scheduleCallback=function(te,ve,Wt){var be=e.unstable_now();switch(typeof Wt=="object"&&Wt!==null?(Wt=Wt.delay,Wt=typeof Wt=="number"&&0<Wt?be+Wt:be):Wt=be,te){case 1:var De=-1;break;case 2:De=250;break;case 5:De=1073741823;break;case 4:De=1e4;break;default:De=5e3}return De=Wt+De,te={id:_++,callback:ve,priorityLevel:te,startTime:Wt,expirationTime:De,sortIndex:-1},Wt>be?(te.sortIndex=Wt,t(g,te),n(c)===null&&te===n(g)&&(D?(z(Ot),Ot=-1):D=!0,Yt(K,Wt-be))):(te.sortIndex=De,t(c,te),R||O||(R=!0,Ge(et))),te},e.unstable_shouldYield=_e,e.unstable_wrapCallback=function(te){var ve=C;return function(){var Wt=C;C=ve;try{return te.apply(this,arguments)}finally{C=Wt}}}})(fD);cD.exports=fD;/** * @license React * react-dom.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var hD=Pr.exports,tf=cD.exports;function Ye(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var pD=new Set,a1={};function Rv(e,t){M_(e,t),M_(e+"Capture",t)}function M_(e,t){for(a1[e]=t,e=0;e<t.length;e++)pD.add(t[e])}var Xd=!(typeof window=="undefined"||typeof window.document=="undefined"||typeof window.document.createElement=="undefined"),_T=Object.prototype.hasOwnProperty,hq=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,dD={},gD={};function pq(e){return _T.call(gD,e)?!0:_T.call(dD,e)?!1:hq.test(e)?gD[e]=!0:(dD[e]=!0,!1)}function dq(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function gq(e,t,n,r){if(t===null||typeof t=="undefined"||dq(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Dl(e,t,n,r,i,a,o){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=a,this.removeEmptyString=o}var Pu={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Pu[e]=new Dl(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Pu[t]=new Dl(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Pu[e]=new Dl(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Pu[e]=new Dl(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Pu[e]=new Dl(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Pu[e]=new Dl(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Pu[e]=new Dl(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Pu[e]=new Dl(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Pu[e]=new Dl(e,5,!1,e.toLowerCase(),null,!1,!1)});var xT=/[\-:]([a-z])/g;function bT(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(xT,bT);Pu[t]=new Dl(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(xT,bT);Pu[t]=new Dl(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(xT,bT);Pu[t]=new Dl(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Pu[e]=new Dl(e,1,!1,e.toLowerCase(),null,!1,!1)});Pu.xlinkHref=new Dl("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Pu[e]=new Dl(e,1,!1,e.toLowerCase(),null,!0,!0)});function wT(e,t,n,r){var i=Pu.hasOwnProperty(t)?Pu[t]:null;(i!==null?i.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(gq(t,n,i,r)&&(n=null),r||i===null?pq(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):i.mustUseProperty?e[i.propertyName]=n===null?i.type===3?!1:"":n:(t=i.attributeName,r=i.attributeNamespace,n===null?e.removeAttribute(t):(i=i.type,n=i===3||i===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var Yd=hD.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,XS=Symbol.for("react.element"),A_=Symbol.for("react.portal"),L_=Symbol.for("react.fragment"),ST=Symbol.for("react.strict_mode"),ET=Symbol.for("react.profiler"),mD=Symbol.for("react.provider"),vD=Symbol.for("react.context"),CT=Symbol.for("react.forward_ref"),IT=Symbol.for("react.suspense"),PT=Symbol.for("react.suspense_list"),TT=Symbol.for("react.memo"),sm=Symbol.for("react.lazy"),yD=Symbol.for("react.offscreen"),_D=Symbol.iterator;function s1(e){return e===null||typeof e!="object"?null:(e=_D&&e[_D]||e["@@iterator"],typeof e=="function"?e:null)}var La=Object.assign,MT;function u1(e){if(MT===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);MT=t&&t[1]||""}return` `+MT+e}var AT=!1;function LT(e,t){if(!e||AT)return"";AT=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(g){var r=g}Reflect.construct(e,[],t)}else{try{t.call()}catch(g){r=g}e.call(t.prototype)}else{try{throw Error()}catch(g){r=g}e()}}catch(g){if(g&&r&&typeof g.stack=="string"){for(var i=g.stack.split(` `),a=r.stack.split(` `),o=i.length-1,u=a.length-1;1<=o&&0<=u&&i[o]!==a[u];)u--;for(;1<=o&&0<=u;o--,u--)if(i[o]!==a[u]){if(o!==1||u!==1)do if(o--,u--,0>u||i[o]!==a[u]){var c=` `+i[o].replace(" at new "," at ");return e.displayName&&c.includes("<anonymous>")&&(c=c.replace("<anonymous>",e.displayName)),c}while(1<=o&&0<=u);break}}}finally{AT=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?u1(e):""}function mq(e){switch(e.tag){case 5:return u1(e.type);case 16:return u1("Lazy");case 13:return u1("Suspense");case 19:return u1("SuspenseList");case 0:case 2:case 15:return e=LT(e.type,!1),e;case 11:return e=LT(e.type.render,!1),e;case 1:return e=LT(e.type,!0),e;default:return""}}function OT(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case L_:return"Fragment";case A_:return"Portal";case ET:return"Profiler";case ST:return"StrictMode";case IT:return"Suspense";case PT:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case vD:return(e.displayName||"Context")+".Consumer";case mD:return(e._context.displayName||"Context")+".Provider";case CT:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case TT:return t=e.displayName||null,t!==null?t:OT(e.type)||"Memo";case sm:t=e._payload,e=e._init;try{return OT(e(t))}catch{}}return null}function vq(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return OT(t);case 8:return t===ST?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function um(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function xD(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function yq(e){var t=xD(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n!="undefined"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,a=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(o){r=""+o,a.call(this,o)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(o){r=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function YS(e){e._valueTracker||(e._valueTracker=yq(e))}function bD(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=xD(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function ZS(e){if(e=e||(typeof document!="undefined"?document:void 0),typeof e=="undefined")return null;try{return e.activeElement||e.body}catch{return e.body}}function RT(e,t){var n=t.checked;return La({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n!=null?n:e._wrapperState.initialChecked})}function wD(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=um(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function SD(e,t){t=t.checked,t!=null&&wT(e,"checked",t,!1)}function kT(e,t){SD(e,t);var n=um(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?DT(e,t.type,n):t.hasOwnProperty("defaultValue")&&DT(e,t.type,um(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function ED(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function DT(e,t,n){(t!=="number"||ZS(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var l1=Array.isArray;function O_(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=""+um(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function NT(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(Ye(91));return La({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function CD(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(Ye(92));if(l1(n)){if(1<n.length)throw Error(Ye(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:um(n)}}function ID(e,t){var n=um(t.value),r=um(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function PD(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function TD(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function FT(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?TD(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var KS,MD=function(e){return typeof MSApp!="undefined"&&MSApp.execUnsafeLocalFunction?function(t,n,r,i){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,i)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(KS=KS||document.createElement("div"),KS.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=KS.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function c1(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var f1={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},_q=["Webkit","ms","Moz","O"];Object.keys(f1).forEach(function(e){_q.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),f1[t]=f1[e]})});function AD(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||f1.hasOwnProperty(e)&&f1[e]?(""+t).trim():t+"px"}function LD(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=AD(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var xq=La({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function zT(e,t){if(t){if(xq[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(Ye(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(Ye(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(Ye(61))}if(t.style!=null&&typeof t.style!="object")throw Error(Ye(62))}}function BT(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var UT=null;function VT(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var $T=null,R_=null,k_=null;function OD(e){if(e=R1(e)){if(typeof $T!="function")throw Error(Ye(280));var t=e.stateNode;t&&(t=xE(t),$T(e.stateNode,e.type,t))}}function RD(e){R_?k_?k_.push(e):k_=[e]:R_=e}function kD(){if(R_){var e=R_,t=k_;if(k_=R_=null,OD(e),t)for(e=0;e<t.length;e++)OD(t[e])}}function DD(e,t){return e(t)}function ND(){}var jT=!1;function FD(e,t,n){if(jT)return e(t,n);jT=!0;try{return DD(e,t,n)}finally{jT=!1,(R_!==null||k_!==null)&&(ND(),kD())}}function h1(e,t){var n=e.stateNode;if(n===null)return null;var r=xE(n);if(r===null)return null;n=r[t];t:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break t;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(Ye(231,t,typeof n));return n}var qT=!1;if(Xd)try{var p1={};Object.defineProperty(p1,"passive",{get:function(){qT=!0}}),window.addEventListener("test",p1,p1),window.removeEventListener("test",p1,p1)}catch{qT=!1}function bq(e,t,n,r,i,a,o,u,c){var g=Array.prototype.slice.call(arguments,3);try{t.apply(n,g)}catch(_){this.onError(_)}}var d1=!1,JS=null,QS=!1,GT=null,wq={onError:function(e){d1=!0,JS=e}};function Sq(e,t,n,r,i,a,o,u,c){d1=!1,JS=null,bq.apply(wq,arguments)}function Eq(e,t,n,r,i,a,o,u,c){if(Sq.apply(this,arguments),d1){if(d1){var g=JS;d1=!1,JS=null}else throw Error(Ye(198));QS||(QS=!0,GT=g)}}function kv(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!=0&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function zD(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function BD(e){if(kv(e)!==e)throw Error(Ye(188))}function Cq(e){var t=e.alternate;if(!t){if(t=kv(e),t===null)throw Error(Ye(188));return t!==e?null:e}for(var n=e,r=t;;){var i=n.return;if(i===null)break;var a=i.alternate;if(a===null){if(r=i.return,r!==null){n=r;continue}break}if(i.child===a.child){for(a=i.child;a;){if(a===n)return BD(i),e;if(a===r)return BD(i),t;a=a.sibling}throw Error(Ye(188))}if(n.return!==r.return)n=i,r=a;else{for(var o=!1,u=i.child;u;){if(u===n){o=!0,n=i,r=a;break}if(u===r){o=!0,r=i,n=a;break}u=u.sibling}if(!o){for(u=a.child;u;){if(u===n){o=!0,n=a,r=i;break}if(u===r){o=!0,r=a,n=i;break}u=u.sibling}if(!o)throw Error(Ye(189))}}if(n.alternate!==r)throw Error(Ye(190))}if(n.tag!==3)throw Error(Ye(188));return n.stateNode.current===n?e:t}function UD(e){return e=Cq(e),e!==null?VD(e):null}function VD(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=VD(e);if(t!==null)return t;e=e.sibling}return null}var $D=tf.unstable_scheduleCallback,jD=tf.unstable_cancelCallback,Iq=tf.unstable_shouldYield,Pq=tf.unstable_requestPaint,ns=tf.unstable_now,Tq=tf.unstable_getCurrentPriorityLevel,WT=tf.unstable_ImmediatePriority,qD=tf.unstable_UserBlockingPriority,tE=tf.unstable_NormalPriority,Mq=tf.unstable_LowPriority,GD=tf.unstable_IdlePriority,eE=null,Gp=null;function Aq(e){if(Gp&&typeof Gp.onCommitFiberRoot=="function")try{Gp.onCommitFiberRoot(eE,e,void 0,(e.current.flags&128)==128)}catch{}}var ep=Math.clz32?Math.clz32:Rq,Lq=Math.log,Oq=Math.LN2;function Rq(e){return e>>>=0,e===0?32:31-(Lq(e)/Oq|0)|0}var nE=64,rE=4194304;function g1(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function iE(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,a=e.pingedLanes,o=n&268435455;if(o!==0){var u=o&~i;u!==0?r=g1(u):(a&=o,a!==0&&(r=g1(a)))}else o=n&~i,o!==0?r=g1(o):a!==0&&(r=g1(a));if(r===0)return 0;if(t!==0&&t!==r&&(t&i)==0&&(i=r&-r,a=t&-t,i>=a||i===16&&(a&4194240)!=0))return t;if((r&4)!=0&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-ep(t),i=1<<n,r|=e[n],t&=~i;return r}function kq(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Dq(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes;0<a;){var o=31-ep(a),u=1<<o,c=i[o];c===-1?((u&n)==0||(u&r)!=0)&&(i[o]=kq(u,t)):c<=t&&(e.expiredLanes|=u),a&=~u}}function HT(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function WD(){var e=nE;return nE<<=1,(nE&4194240)==0&&(nE=64),e}function XT(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function m1(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-ep(t),e[t]=n}function Nq(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var i=31-ep(n),a=1<<i;t[i]=0,r[i]=-1,e[i]=-1,n&=~a}}function YT(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-ep(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var co=0;function HD(e){return e&=-e,1<e?4<e?(e&268435455)!=0?16:536870912:4:1}var XD,ZT,YD,ZD,KD,KT=!1,oE=[],lm=null,cm=null,fm=null,v1=new Map,y1=new Map,hm=[],Fq="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function JD(e,t){switch(e){case"focusin":case"focusout":lm=null;break;case"dragenter":case"dragleave":cm=null;break;case"mouseover":case"mouseout":fm=null;break;case"pointerover":case"pointerout":v1.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":y1.delete(t.pointerId)}}function _1(e,t,n,r,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},t!==null&&(t=R1(t),t!==null&&ZT(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function zq(e,t,n,r,i){switch(t){case"focusin":return lm=_1(lm,e,t,n,r,i),!0;case"dragenter":return cm=_1(cm,e,t,n,r,i),!0;case"mouseover":return fm=_1(fm,e,t,n,r,i),!0;case"pointerover":var a=i.pointerId;return v1.set(a,_1(v1.get(a)||null,e,t,n,r,i)),!0;case"gotpointercapture":return a=i.pointerId,y1.set(a,_1(y1.get(a)||null,e,t,n,r,i)),!0}return!1}function QD(e){var t=Dv(e.target);if(t!==null){var n=kv(t);if(n!==null){if(t=n.tag,t===13){if(t=zD(n),t!==null){e.blockedOn=t,KD(e.priority,function(){YD(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function aE(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=QT(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);UT=r,n.target.dispatchEvent(r),UT=null}else return t=R1(n),t!==null&&ZT(t),e.blockedOn=n,!1;t.shift()}return!0}function tN(e,t,n){aE(e)&&n.delete(t)}function Bq(){KT=!1,lm!==null&&aE(lm)&&(lm=null),cm!==null&&aE(cm)&&(cm=null),fm!==null&&aE(fm)&&(fm=null),v1.forEach(tN),y1.forEach(tN)}function x1(e,t){e.blockedOn===t&&(e.blockedOn=null,KT||(KT=!0,tf.unstable_scheduleCallback(tf.unstable_NormalPriority,Bq)))}function b1(e){function t(i){return x1(i,e)}if(0<oE.length){x1(oE[0],e);for(var n=1;n<oE.length;n++){var r=oE[n];r.blockedOn===e&&(r.blockedOn=null)}}for(lm!==null&&x1(lm,e),cm!==null&&x1(cm,e),fm!==null&&x1(fm,e),v1.forEach(t),y1.forEach(t),n=0;n<hm.length;n++)r=hm[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<hm.length&&(n=hm[0],n.blockedOn===null);)QD(n),n.blockedOn===null&&hm.shift()}var D_=Yd.ReactCurrentBatchConfig,sE=!0;function Uq(e,t,n,r){var i=co,a=D_.transition;D_.transition=null;try{co=1,JT(e,t,n,r)}finally{co=i,D_.transition=a}}function Vq(e,t,n,r){var i=co,a=D_.transition;D_.transition=null;try{co=4,JT(e,t,n,r)}finally{co=i,D_.transition=a}}function JT(e,t,n,r){if(sE){var i=QT(e,t,n,r);if(i===null)mM(e,t,r,uE,n),JD(e,r);else if(zq(i,e,t,n,r))r.stopPropagation();else if(JD(e,r),t&4&&-1<Fq.indexOf(e)){for(;i!==null;){var a=R1(i);if(a!==null&&XD(a),a=QT(e,t,n,r),a===null&&mM(e,t,r,uE,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else mM(e,t,r,null,n)}}var uE=null;function QT(e,t,n,r){if(uE=null,e=VT(r),e=Dv(e),e!==null)if(t=kv(e),t===null)e=null;else if(n=t.tag,n===13){if(e=zD(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return uE=e,null}function eN(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(Tq()){case WT:return 1;case qD:return 4;case tE:case Mq:return 16;case GD:return 536870912;default:return 16}default:return 16}}var pm=null,tM=null,lE=null;function nN(){if(lE)return lE;var e,t=tM,n=t.length,r,i="value"in pm?pm.value:pm.textContent,a=i.length;for(e=0;e<n&&t[e]===i[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===i[a-r];r++);return lE=i.slice(e,1<r?1-r:void 0)}function cE(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function fE(){return!0}function rN(){return!1}function ef(e){function t(n,r,i,a,o){this._reactName=n,this._targetInst=i,this.type=r,this.nativeEvent=a,this.target=o,this.currentTarget=null;for(var u in e)e.hasOwnProperty(u)&&(n=e[u],this[u]=n?n(a):a[u]);return this.isDefaultPrevented=(a.defaultPrevented!=null?a.defaultPrevented:a.returnValue===!1)?fE:rN,this.isPropagationStopped=rN,this}return La(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=fE)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=fE)},persist:function(){},isPersistent:fE}),t}var N_={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},eM=ef(N_),w1=La({},N_,{view:0,detail:0}),$q=ef(w1),nM,rM,S1,hE=La({},w1,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:oM,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==S1&&(S1&&e.type==="mousemove"?(nM=e.screenX-S1.screenX,rM=e.screenY-S1.screenY):rM=nM=0,S1=e),nM)},movementY:function(e){return"movementY"in e?e.movementY:rM}}),iN=ef(hE),jq=La({},hE,{dataTransfer:0}),qq=ef(jq),Gq=La({},w1,{relatedTarget:0}),iM=ef(Gq),Wq=La({},N_,{animationName:0,elapsedTime:0,pseudoElement:0}),Hq=ef(Wq),Xq=La({},N_,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Yq=ef(Xq),Zq=La({},N_,{data:0}),oN=ef(Zq),Kq={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Jq={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},Qq={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function tG(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Qq[e])?!!t[e]:!1}function oM(){return tG}var eG=La({},w1,{key:function(e){if(e.key){var t=Kq[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=cE(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Jq[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:oM,charCode:function(e){return e.type==="keypress"?cE(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?cE(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),nG=ef(eG),rG=La({},hE,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),aN=ef(rG),iG=La({},w1,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:oM}),oG=ef(iG),aG=La({},N_,{propertyName:0,elapsedTime:0,pseudoElement:0}),sG=ef(aG),uG=La({},hE,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),lG=ef(uG),cG=[9,13,27,32],aM=Xd&&"CompositionEvent"in window,E1=null;Xd&&"documentMode"in document&&(E1=document.documentMode);var fG=Xd&&"TextEvent"in window&&!E1,sN=Xd&&(!aM||E1&&8<E1&&11>=E1),uN=String.fromCharCode(32),lN=!1;function cN(e,t){switch(e){case"keyup":return cG.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function fN(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var F_=!1;function hG(e,t){switch(e){case"compositionend":return fN(t);case"keypress":return t.which!==32?null:(lN=!0,uN);case"textInput":return e=t.data,e===uN&&lN?null:e;default:return null}}function pG(e,t){if(F_)return e==="compositionend"||!aM&&cN(e,t)?(e=nN(),lE=tM=pm=null,F_=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return sN&&t.locale!=="ko"?null:t.data;default:return null}}var dG={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function hN(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!dG[e.type]:t==="textarea"}function pN(e,t,n,r){RD(r),t=vE(t,"onChange"),0<t.length&&(n=new eM("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var C1=null,I1=null;function gG(e){LN(e,0)}function pE(e){var t=$_(e);if(bD(t))return e}function mG(e,t){if(e==="change")return t}var dN=!1;if(Xd){var sM;if(Xd){var uM="oninput"in document;if(!uM){var gN=document.createElement("div");gN.setAttribute("oninput","return;"),uM=typeof gN.oninput=="function"}sM=uM}else sM=!1;dN=sM&&(!document.documentMode||9<document.documentMode)}function mN(){C1&&(C1.detachEvent("onpropertychange",vN),I1=C1=null)}function vN(e){if(e.propertyName==="value"&&pE(I1)){var t=[];pN(t,I1,e,VT(e)),FD(gG,t)}}function vG(e,t,n){e==="focusin"?(mN(),C1=t,I1=n,C1.attachEvent("onpropertychange",vN)):e==="focusout"&&mN()}function yG(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return pE(I1)}function _G(e,t){if(e==="click")return pE(t)}function xG(e,t){if(e==="input"||e==="change")return pE(t)}function bG(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var np=typeof Object.is=="function"?Object.is:bG;function P1(e,t){if(np(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!_T.call(t,i)||!np(e[i],t[i]))return!1}return!0}function yN(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function _N(e,t){var n=yN(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}t:{for(;n;){if(n.nextSibling){n=n.nextSibling;break t}n=n.parentNode}n=void 0}n=yN(n)}}function xN(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?xN(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function bN(){for(var e=window,t=ZS();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=ZS(e.document)}return t}function lM(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function wG(e){var t=bN(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&xN(n.ownerDocument.documentElement,n)){if(r!==null&&lM(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,a=Math.min(r.start,i);r=r.end===void 0?a:Math.min(r.end,i),!e.extend&&a>r&&(i=r,r=a,a=i),i=_N(n,a);var o=_N(n,r);i&&o&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),a>r?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var SG=Xd&&"documentMode"in document&&11>=document.documentMode,z_=null,cM=null,T1=null,fM=!1;function wN(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;fM||z_==null||z_!==ZS(r)||(r=z_,"selectionStart"in r&&lM(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),T1&&P1(T1,r)||(T1=r,r=vE(cM,"onSelect"),0<r.length&&(t=new eM("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=z_)))}function dE(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var B_={animationend:dE("Animation","AnimationEnd"),animationiteration:dE("Animation","AnimationIteration"),animationstart:dE("Animation","AnimationStart"),transitionend:dE("Transition","TransitionEnd")},hM={},SN={};Xd&&(SN=document.createElement("div").style,"AnimationEvent"in window||(delete B_.animationend.animation,delete B_.animationiteration.animation,delete B_.animationstart.animation),"TransitionEvent"in window||delete B_.transitionend.transition);function gE(e){if(hM[e])return hM[e];if(!B_[e])return e;var t=B_[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in SN)return hM[e]=t[n];return e}var EN=gE("animationend"),CN=gE("animationiteration"),IN=gE("animationstart"),PN=gE("transitionend"),TN=new Map,MN="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function dm(e,t){TN.set(e,t),Rv(t,[e])}for(var pM=0;pM<MN.length;pM++){var dM=MN[pM],EG=dM.toLowerCase(),CG=dM[0].toUpperCase()+dM.slice(1);dm(EG,"on"+CG)}dm(EN,"onAnimationEnd");dm(CN,"onAnimationIteration");dm(IN,"onAnimationStart");dm("dblclick","onDoubleClick");dm("focusin","onFocus");dm("focusout","onBlur");dm(PN,"onTransitionEnd");M_("onMouseEnter",["mouseout","mouseover"]);M_("onMouseLeave",["mouseout","mouseover"]);M_("onPointerEnter",["pointerout","pointerover"]);M_("onPointerLeave",["pointerout","pointerover"]);Rv("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Rv("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Rv("onBeforeInput",["compositionend","keypress","textInput","paste"]);Rv("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Rv("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Rv("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var M1="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),IG=new Set("cancel close invalid load scroll toggle".split(" ").concat(M1));function AN(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,Eq(r,t,void 0,e),e.currentTarget=null}function LN(e,t){t=(t&4)!=0;for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;t:{var a=void 0;if(t)for(var o=r.length-1;0<=o;o--){var u=r[o],c=u.instance,g=u.currentTarget;if(u=u.listener,c!==a&&i.isPropagationStopped())break t;AN(i,u,g),a=c}else for(o=0;o<r.length;o++){if(u=r[o],c=u.instance,g=u.currentTarget,u=u.listener,c!==a&&i.isPropagationStopped())break t;AN(i,u,g),a=c}}}if(QS)throw e=GT,QS=!1,GT=null,e}function Qo(e,t){var n=t[wM];n===void 0&&(n=t[wM]=new Set);var r=e+"__bubble";n.has(r)||(ON(t,e,2,!1),n.add(r))}function gM(e,t,n){var r=0;t&&(r|=4),ON(n,e,r,t)}var mE="_reactListening"+Math.random().toString(36).slice(2);function A1(e){if(!e[mE]){e[mE]=!0,pD.forEach(function(n){n!=="selectionchange"&&(IG.has(n)||gM(n,!1,e),gM(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[mE]||(t[mE]=!0,gM("selectionchange",!1,t))}}function ON(e,t,n,r){switch(eN(t)){case 1:var i=Uq;break;case 4:i=Vq;break;default:i=JT}n=i.bind(null,t,n,e),i=void 0,!qT||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(i=!0),r?i!==void 0?e.addEventListener(t,n,{capture:!0,passive:i}):e.addEventListener(t,n,!0):i!==void 0?e.addEventListener(t,n,{passive:i}):e.addEventListener(t,n,!1)}function mM(e,t,n,r,i){var a=r;if((t&1)==0&&(t&2)==0&&r!==null)t:for(;;){if(r===null)return;var o=r.tag;if(o===3||o===4){var u=r.stateNode.containerInfo;if(u===i||u.nodeType===8&&u.parentNode===i)break;if(o===4)for(o=r.return;o!==null;){var c=o.tag;if((c===3||c===4)&&(c=o.stateNode.containerInfo,c===i||c.nodeType===8&&c.parentNode===i))return;o=o.return}for(;u!==null;){if(o=Dv(u),o===null)return;if(c=o.tag,c===5||c===6){r=a=o;continue t}u=u.parentNode}}r=r.return}FD(function(){var g=a,_=VT(n),E=[];t:{var C=TN.get(e);if(C!==void 0){var O=eM,R=e;switch(e){case"keypress":if(cE(n)===0)break t;case"keydown":case"keyup":O=nG;break;case"focusin":R="focus",O=iM;break;case"focusout":R="blur",O=iM;break;case"beforeblur":case"afterblur":O=iM;break;case"click":if(n.button===2)break t;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":O=iN;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":O=qq;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":O=oG;break;case EN:case CN:case IN:O=Hq;break;case PN:O=sG;break;case"scroll":O=$q;break;case"wheel":O=lG;break;case"copy":case"cut":case"paste":O=Yq;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":O=aN}var D=(t&4)!=0,B=!D&&e==="scroll",z=D?C!==null?C+"Capture":null:C;D=[];for(var k=g,$;k!==null;){$=k;var K=$.stateNode;if($.tag===5&&K!==null&&($=K,z!==null&&(K=h1(k,z),K!=null&&D.push(L1(k,K,$)))),B)break;k=k.return}0<D.length&&(C=new O(C,R,null,n,_),E.push({event:C,listeners:D}))}}if((t&7)==0){t:{if(C=e==="mouseover"||e==="pointerover",O=e==="mouseout"||e==="pointerout",C&&n!==UT&&(R=n.relatedTarget||n.fromElement)&&(Dv(R)||R[Zd]))break t;if((O||C)&&(C=_.window===_?_:(C=_.ownerDocument)?C.defaultView||C.parentWindow:window,O?(R=n.relatedTarget||n.toElement,O=g,R=R?Dv(R):null,R!==null&&(B=kv(R),R!==B||R.tag!==5&&R.tag!==6)&&(R=null)):(O=null,R=g),O!==R)){if(D=iN,K="onMouseLeave",z="onMouseEnter",k="mouse",(e==="pointerout"||e==="pointerover")&&(D=aN,K="onPointerLeave",z="onPointerEnter",k="pointer"),B=O==null?C:$_(O),$=R==null?C:$_(R),C=new D(K,k+"leave",O,n,_),C.target=B,C.relatedTarget=$,K=null,Dv(_)===g&&(D=new D(z,k+"enter",R,n,_),D.target=$,D.relatedTarget=B,K=D),B=K,O&&R)e:{for(D=O,z=R,k=0,$=D;$;$=U_($))k++;for($=0,K=z;K;K=U_(K))$++;for(;0<k-$;)D=U_(D),k--;for(;0<$-k;)z=U_(z),$--;for(;k--;){if(D===z||z!==null&&D===z.alternate)break e;D=U_(D),z=U_(z)}D=null}else D=null;O!==null&&RN(E,C,O,D,!1),R!==null&&B!==null&&RN(E,B,R,D,!0)}}t:{if(C=g?$_(g):window,O=C.nodeName&&C.nodeName.toLowerCase(),O==="select"||O==="input"&&C.type==="file")var et=mG;else if(hN(C))if(dN)et=xG;else{et=yG;var mt=vG}else(O=C.nodeName)&&O.toLowerCase()==="input"&&(C.type==="checkbox"||C.type==="radio")&&(et=_G);if(et&&(et=et(e,g))){pN(E,et,n,_);break t}mt&&mt(e,C,g),e==="focusout"&&(mt=C._wrapperState)&&mt.controlled&&C.type==="number"&&DT(C,"number",C.value)}switch(mt=g?$_(g):window,e){case"focusin":(hN(mt)||mt.contentEditable==="true")&&(z_=mt,cM=g,T1=null);break;case"focusout":T1=cM=z_=null;break;case"mousedown":fM=!0;break;case"contextmenu":case"mouseup":case"dragend":fM=!1,wN(E,n,_);break;case"selectionchange":if(SG)break;case"keydown":case"keyup":wN(E,n,_)}var wt;if(aM)t:{switch(e){case"compositionstart":var Ot="onCompositionStart";break t;case"compositionend":Ot="onCompositionEnd";break t;case"compositionupdate":Ot="onCompositionUpdate";break t}Ot=void 0}else F_?cN(e,n)&&(Ot="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(Ot="onCompositionStart");Ot&&(sN&&n.locale!=="ko"&&(F_||Ot!=="onCompositionStart"?Ot==="onCompositionEnd"&&F_&&(wt=nN()):(pm=_,tM="value"in pm?pm.value:pm.textContent,F_=!0)),mt=vE(g,Ot),0<mt.length&&(Ot=new oN(Ot,e,null,n,_),E.push({event:Ot,listeners:mt}),wt?Ot.data=wt:(wt=fN(n),wt!==null&&(Ot.data=wt)))),(wt=fG?hG(e,n):pG(e,n))&&(g=vE(g,"onBeforeInput"),0<g.length&&(_=new oN("onBeforeInput","beforeinput",null,n,_),E.push({event:_,listeners:g}),_.data=wt))}LN(E,t)})}function L1(e,t,n){return{instance:e,listener:t,currentTarget:n}}function vE(e,t){for(var n=t+"Capture",r=[];e!==null;){var i=e,a=i.stateNode;i.tag===5&&a!==null&&(i=a,a=h1(e,n),a!=null&&r.unshift(L1(e,a,i)),a=h1(e,t),a!=null&&r.push(L1(e,a,i))),e=e.return}return r}function U_(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function RN(e,t,n,r,i){for(var a=t._reactName,o=[];n!==null&&n!==r;){var u=n,c=u.alternate,g=u.stateNode;if(c!==null&&c===r)break;u.tag===5&&g!==null&&(u=g,i?(c=h1(n,a),c!=null&&o.unshift(L1(n,c,u))):i||(c=h1(n,a),c!=null&&o.push(L1(n,c,u)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var PG=/\r\n?/g,TG=/\u0000|\uFFFD/g;function kN(e){return(typeof e=="string"?e:""+e).replace(PG,` `).replace(TG,"")}function yE(e,t,n){if(t=kN(t),kN(e)!==t&&n)throw Error(Ye(425))}function _E(){}var vM=null,yM=null;function _M(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var xM=typeof setTimeout=="function"?setTimeout:void 0,MG=typeof clearTimeout=="function"?clearTimeout:void 0,DN=typeof Promise=="function"?Promise:void 0,AG=typeof queueMicrotask=="function"?queueMicrotask:typeof DN!="undefined"?function(e){return DN.resolve(null).then(e).catch(LG)}:xM;function LG(e){setTimeout(function(){throw e})}function bM(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n==="/$"){if(r===0){e.removeChild(i),b1(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=i}while(n);b1(t)}function gm(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function NN(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var V_=Math.random().toString(36).slice(2),Wp="__reactFiber$"+V_,O1="__reactProps$"+V_,Zd="__reactContainer$"+V_,wM="__reactEvents$"+V_,OG="__reactListeners$"+V_,RG="__reactHandles$"+V_;function Dv(e){var t=e[Wp];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Zd]||n[Wp]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=NN(e);e!==null;){if(n=e[Wp])return n;e=NN(e)}return t}e=n,n=e.parentNode}return null}function R1(e){return e=e[Wp]||e[Zd],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function $_(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(Ye(33))}function xE(e){return e[O1]||null}var SM=[],j_=-1;function mm(e){return{current:e}}function ta(e){0>j_||(e.current=SM[j_],SM[j_]=null,j_--)}function No(e,t){j_++,SM[j_]=e.current,e.current=t}var vm={},rl=mm(vm),gc=mm(!1),Nv=vm;function q_(e,t){var n=e.type.contextTypes;if(!n)return vm;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},a;for(a in n)i[a]=t[a];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function mc(e){return e=e.childContextTypes,e!=null}function bE(){ta(gc),ta(rl)}function FN(e,t,n){if(rl.current!==vm)throw Error(Ye(168));No(rl,t),No(gc,n)}function zN(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(Ye(108,vq(e)||"Unknown",i));return La({},n,r)}function wE(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||vm,Nv=rl.current,No(rl,e),No(gc,gc.current),!0}function BN(e,t,n){var r=e.stateNode;if(!r)throw Error(Ye(169));n?(e=zN(e,t,Nv),r.__reactInternalMemoizedMergedChildContext=e,ta(gc),ta(rl),No(rl,e)):ta(gc),No(gc,n)}var Kd=null,SE=!1,EM=!1;function UN(e){Kd===null?Kd=[e]:Kd.push(e)}function kG(e){SE=!0,UN(e)}function ym(){if(!EM&&Kd!==null){EM=!0;var e=0,t=co;try{var n=Kd;for(co=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}Kd=null,SE=!1}catch(i){throw Kd!==null&&(Kd=Kd.slice(e+1)),$D(WT,ym),i}finally{co=t,EM=!1}}return null}var G_=[],W_=0,EE=null,CE=0,Qf=[],th=0,Fv=null,Jd=1,Qd="";function zv(e,t){G_[W_++]=CE,G_[W_++]=EE,EE=e,CE=t}function VN(e,t,n){Qf[th++]=Jd,Qf[th++]=Qd,Qf[th++]=Fv,Fv=e;var r=Jd;e=Qd;var i=32-ep(r)-1;r&=~(1<<i),n+=1;var a=32-ep(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,Jd=1<<32-ep(t)+i|n<<i|r,Qd=a+e}else Jd=1<<a|n<<i|r,Qd=e}function CM(e){e.return!==null&&(zv(e,1),VN(e,1,0))}function IM(e){for(;e===EE;)EE=G_[--W_],G_[W_]=null,CE=G_[--W_],G_[W_]=null;for(;e===Fv;)Fv=Qf[--th],Qf[th]=null,Qd=Qf[--th],Qf[th]=null,Jd=Qf[--th],Qf[th]=null}var nf=null,rf=null,ha=!1,rp=null;function $N(e,t){var n=ih(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function jN(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,nf=e,rf=gm(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,nf=e,rf=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=Fv!==null?{id:Jd,overflow:Qd}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=ih(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,nf=e,rf=null,!0):!1;default:return!1}}function PM(e){return(e.mode&1)!=0&&(e.flags&128)==0}function TM(e){if(ha){var t=rf;if(t){var n=t;if(!jN(e,t)){if(PM(e))throw Error(Ye(418));t=gm(n.nextSibling);var r=nf;t&&jN(e,t)?$N(r,n):(e.flags=e.flags&-4097|2,ha=!1,nf=e)}}else{if(PM(e))throw Error(Ye(418));e.flags=e.flags&-4097|2,ha=!1,nf=e}}}function qN(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;nf=e}function IE(e){if(e!==nf)return!1;if(!ha)return qN(e),ha=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!_M(e.type,e.memoizedProps)),t&&(t=rf)){if(PM(e))throw GN(),Error(Ye(418));for(;t;)$N(e,t),t=gm(t.nextSibling)}if(qN(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(Ye(317));t:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){rf=gm(e.nextSibling);break t}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}rf=null}}else rf=nf?gm(e.stateNode.nextSibling):null;return!0}function GN(){for(var e=rf;e;)e=gm(e.nextSibling)}function H_(){rf=nf=null,ha=!1}function MM(e){rp===null?rp=[e]:rp.push(e)}var DG=Yd.ReactCurrentBatchConfig;function ip(e,t){if(e&&e.defaultProps){t=La({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}var PE=mm(null),TE=null,X_=null,AM=null;function LM(){AM=X_=TE=null}function OM(e){var t=PE.current;ta(PE),e._currentValue=t}function RM(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Y_(e,t){TE=e,AM=X_=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&t)!=0&&(vc=!0),e.firstContext=null)}function eh(e){var t=e._currentValue;if(AM!==e)if(e={context:e,memoizedValue:t,next:null},X_===null){if(TE===null)throw Error(Ye(308));X_=e,TE.dependencies={lanes:0,firstContext:e}}else X_=X_.next=e;return t}var Bv=null;function kM(e){Bv===null?Bv=[e]:Bv.push(e)}function WN(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,kM(t)):(n.next=i.next,i.next=n),t.interleaved=n,tg(e,r)}function tg(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var _m=!1;function DM(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function HN(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function eg(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function xm(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,(ki&2)!=0){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,tg(e,n)}return i=r.interleaved,i===null?(t.next=t,kM(r)):(t.next=i.next,i.next=t),r.interleaved=t,tg(e,n)}function ME(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!=0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,YT(e,n)}}function XN(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function AE(e,t,n,r){var i=e.updateQueue;_m=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,u=i.shared.pending;if(u!==null){i.shared.pending=null;var c=u,g=c.next;c.next=null,o===null?a=g:o.next=g,o=c;var _=e.alternate;_!==null&&(_=_.updateQueue,u=_.lastBaseUpdate,u!==o&&(u===null?_.firstBaseUpdate=g:u.next=g,_.lastBaseUpdate=c))}if(a!==null){var E=i.baseState;o=0,_=g=c=null,u=a;do{var C=u.lane,O=u.eventTime;if((r&C)===C){_!==null&&(_=_.next={eventTime:O,lane:0,tag:u.tag,payload:u.payload,callback:u.callback,next:null});t:{var R=e,D=u;switch(C=t,O=n,D.tag){case 1:if(R=D.payload,typeof R=="function"){E=R.call(O,E,C);break t}E=R;break t;case 3:R.flags=R.flags&-65537|128;case 0:if(R=D.payload,C=typeof R=="function"?R.call(O,E,C):R,C==null)break t;E=La({},E,C);break t;case 2:_m=!0}}u.callback!==null&&u.lane!==0&&(e.flags|=64,C=i.effects,C===null?i.effects=[u]:C.push(u))}else O={eventTime:O,lane:C,tag:u.tag,payload:u.payload,callback:u.callback,next:null},_===null?(g=_=O,c=E):_=_.next=O,o|=C;if(u=u.next,u===null){if(u=i.shared.pending,u===null)break;C=u,u=C.next,C.next=null,i.lastBaseUpdate=C,i.shared.pending=null}}while(1);if(_===null&&(c=E),i.baseState=c,i.firstBaseUpdate=g,i.lastBaseUpdate=_,t=i.shared.interleaved,t!==null){i=t;do o|=i.lane,i=i.next;while(i!==t)}else a===null&&(i.shared.lanes=0);$v|=o,e.lanes=o,e.memoizedState=E}}function YN(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],i=r.callback;if(i!==null){if(r.callback=null,r=n,typeof i!="function")throw Error(Ye(191,i));i.call(r)}}}var ZN=new hD.Component().refs;function NM(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:La({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var LE={isMounted:function(e){return(e=e._reactInternals)?kv(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Fl(),i=Em(e),a=eg(r,i);a.payload=t,n!=null&&(a.callback=n),t=xm(e,a,i),t!==null&&(sp(t,e,i,r),ME(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Fl(),i=Em(e),a=eg(r,i);a.tag=1,a.payload=t,n!=null&&(a.callback=n),t=xm(e,a,i),t!==null&&(sp(t,e,i,r),ME(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Fl(),r=Em(e),i=eg(n,r);i.tag=2,t!=null&&(i.callback=t),t=xm(e,i,r),t!==null&&(sp(t,e,r,n),ME(t,e,r))}};function KN(e,t,n,r,i,a,o){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,a,o):t.prototype&&t.prototype.isPureReactComponent?!P1(n,r)||!P1(i,a):!0}function JN(e,t,n){var r=!1,i=vm,a=t.contextType;return typeof a=="object"&&a!==null?a=eh(a):(i=mc(t)?Nv:rl.current,r=t.contextTypes,a=(r=r!=null)?q_(e,i):vm),t=new t(n,a),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=LE,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=a),t}function QN(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&LE.enqueueReplaceState(t,t.state,null)}function FM(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs=ZN,DM(e);var a=t.contextType;typeof a=="object"&&a!==null?i.context=eh(a):(a=mc(t)?Nv:rl.current,i.context=q_(e,a)),i.state=e.memoizedState,a=t.getDerivedStateFromProps,typeof a=="function"&&(NM(e,t,a,n),i.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(t=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),t!==i.state&&LE.enqueueReplaceState(i,i.state,null),AE(e,n,i,r),i.state=e.memoizedState),typeof i.componentDidMount=="function"&&(e.flags|=4194308)}function k1(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(Ye(309));var r=n.stateNode}if(!r)throw Error(Ye(147,e));var i=r,a=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===a?t.ref:(t=function(o){var u=i.refs;u===ZN&&(u=i.refs={}),o===null?delete u[a]:u[a]=o},t._stringRef=a,t)}if(typeof e!="string")throw Error(Ye(284));if(!n._owner)throw Error(Ye(290,e))}return e}function OE(e,t){throw e=Object.prototype.toString.call(t),Error(Ye(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function tF(e){var t=e._init;return t(e._payload)}function eF(e){function t(z,k){if(e){var $=z.deletions;$===null?(z.deletions=[k],z.flags|=16):$.push(k)}}function n(z,k){if(!e)return null;for(;k!==null;)t(z,k),k=k.sibling;return null}function r(z,k){for(z=new Map;k!==null;)k.key!==null?z.set(k.key,k):z.set(k.index,k),k=k.sibling;return z}function i(z,k){return z=Im(z,k),z.index=0,z.sibling=null,z}function a(z,k,$){return z.index=$,e?($=z.alternate,$!==null?($=$.index,$<k?(z.flags|=2,k):$):(z.flags|=2,k)):(z.flags|=1048576,k)}function o(z){return e&&z.alternate===null&&(z.flags|=2),z}function u(z,k,$,K){return k===null||k.tag!==6?(k=xA($,z.mode,K),k.return=z,k):(k=i(k,$),k.return=z,k)}function c(z,k,$,K){var et=$.type;return et===L_?_(z,k,$.props.children,K,$.key):k!==null&&(k.elementType===et||typeof et=="object"&&et!==null&&et.$$typeof===sm&&tF(et)===k.type)?(K=i(k,$.props),K.ref=k1(z,k,$),K.return=z,K):(K=KE($.type,$.key,$.props,null,z.mode,K),K.ref=k1(z,k,$),K.return=z,K)}function g(z,k,$,K){return k===null||k.tag!==4||k.stateNode.containerInfo!==$.containerInfo||k.stateNode.implementation!==$.implementation?(k=bA($,z.mode,K),k.return=z,k):(k=i(k,$.children||[]),k.return=z,k)}function _(z,k,$,K,et){return k===null||k.tag!==7?(k=Wv($,z.mode,K,et),k.return=z,k):(k=i(k,$),k.return=z,k)}function E(z,k,$){if(typeof k=="string"&&k!==""||typeof k=="number")return k=xA(""+k,z.mode,$),k.return=z,k;if(typeof k=="object"&&k!==null){switch(k.$$typeof){case XS:return $=KE(k.type,k.key,k.props,null,z.mode,$),$.ref=k1(z,null,k),$.return=z,$;case A_:return k=bA(k,z.mode,$),k.return=z,k;case sm:var K=k._init;return E(z,K(k._payload),$)}if(l1(k)||s1(k))return k=Wv(k,z.mode,$,null),k.return=z,k;OE(z,k)}return null}function C(z,k,$,K){var et=k!==null?k.key:null;if(typeof $=="string"&&$!==""||typeof $=="number")return et!==null?null:u(z,k,""+$,K);if(typeof $=="object"&&$!==null){switch($.$$typeof){case XS:return $.key===et?c(z,k,$,K):null;case A_:return $.key===et?g(z,k,$,K):null;case sm:return et=$._init,C(z,k,et($._payload),K)}if(l1($)||s1($))return et!==null?null:_(z,k,$,K,null);OE(z,$)}return null}function O(z,k,$,K,et){if(typeof K=="string"&&K!==""||typeof K=="number")return z=z.get($)||null,u(k,z,""+K,et);if(typeof K=="object"&&K!==null){switch(K.$$typeof){case XS:return z=z.get(K.key===null?$:K.key)||null,c(k,z,K,et);case A_:return z=z.get(K.key===null?$:K.key)||null,g(k,z,K,et);case sm:var mt=K._init;return O(z,k,$,mt(K._payload),et)}if(l1(K)||s1(K))return z=z.get($)||null,_(k,z,K,et,null);OE(k,K)}return null}function R(z,k,$,K){for(var et=null,mt=null,wt=k,Ot=k=0,Bt=null;wt!==null&&Ot<$.length;Ot++){wt.index>Ot?(Bt=wt,wt=null):Bt=wt.sibling;var se=C(z,wt,$[Ot],K);if(se===null){wt===null&&(wt=Bt);break}e&&wt&&se.alternate===null&&t(z,wt),k=a(se,k,Ot),mt===null?et=se:mt.sibling=se,mt=se,wt=Bt}if(Ot===$.length)return n(z,wt),ha&&zv(z,Ot),et;if(wt===null){for(;Ot<$.length;Ot++)wt=E(z,$[Ot],K),wt!==null&&(k=a(wt,k,Ot),mt===null?et=wt:mt.sibling=wt,mt=wt);return ha&&zv(z,Ot),et}for(wt=r(z,wt);Ot<$.length;Ot++)Bt=O(wt,z,Ot,$[Ot],K),Bt!==null&&(e&&Bt.alternate!==null&&wt.delete(Bt.key===null?Ot:Bt.key),k=a(Bt,k,Ot),mt===null?et=Bt:mt.sibling=Bt,mt=Bt);return e&&wt.forEach(function(_e){return t(z,_e)}),ha&&zv(z,Ot),et}function D(z,k,$,K){var et=s1($);if(typeof et!="function")throw Error(Ye(150));if($=et.call($),$==null)throw Error(Ye(151));for(var mt=et=null,wt=k,Ot=k=0,Bt=null,se=$.next();wt!==null&&!se.done;Ot++,se=$.next()){wt.index>Ot?(Bt=wt,wt=null):Bt=wt.sibling;var _e=C(z,wt,se.value,K);if(_e===null){wt===null&&(wt=Bt);break}e&&wt&&_e.alternate===null&&t(z,wt),k=a(_e,k,Ot),mt===null?et=_e:mt.sibling=_e,mt=_e,wt=Bt}if(se.done)return n(z,wt),ha&&zv(z,Ot),et;if(wt===null){for(;!se.done;Ot++,se=$.next())se=E(z,se.value,K),se!==null&&(k=a(se,k,Ot),mt===null?et=se:mt.sibling=se,mt=se);return ha&&zv(z,Ot),et}for(wt=r(z,wt);!se.done;Ot++,se=$.next())se=O(wt,z,Ot,se.value,K),se!==null&&(e&&se.alternate!==null&&wt.delete(se.key===null?Ot:se.key),k=a(se,k,Ot),mt===null?et=se:mt.sibling=se,mt=se);return e&&wt.forEach(function(Ne){return t(z,Ne)}),ha&&zv(z,Ot),et}function B(z,k,$,K){if(typeof $=="object"&&$!==null&&$.type===L_&&$.key===null&&($=$.props.children),typeof $=="object"&&$!==null){switch($.$$typeof){case XS:t:{for(var et=$.key,mt=k;mt!==null;){if(mt.key===et){if(et=$.type,et===L_){if(mt.tag===7){n(z,mt.sibling),k=i(mt,$.props.children),k.return=z,z=k;break t}}else if(mt.elementType===et||typeof et=="object"&&et!==null&&et.$$typeof===sm&&tF(et)===mt.type){n(z,mt.sibling),k=i(mt,$.props),k.ref=k1(z,mt,$),k.return=z,z=k;break t}n(z,mt);break}else t(z,mt);mt=mt.sibling}$.type===L_?(k=Wv($.props.children,z.mode,K,$.key),k.return=z,z=k):(K=KE($.type,$.key,$.props,null,z.mode,K),K.ref=k1(z,k,$),K.return=z,z=K)}return o(z);case A_:t:{for(mt=$.key;k!==null;){if(k.key===mt)if(k.tag===4&&k.stateNode.containerInfo===$.containerInfo&&k.stateNode.implementation===$.implementation){n(z,k.sibling),k=i(k,$.children||[]),k.return=z,z=k;break t}else{n(z,k);break}else t(z,k);k=k.sibling}k=bA($,z.mode,K),k.return=z,z=k}return o(z);case sm:return mt=$._init,B(z,k,mt($._payload),K)}if(l1($))return R(z,k,$,K);if(s1($))return D(z,k,$,K);OE(z,$)}return typeof $=="string"&&$!==""||typeof $=="number"?($=""+$,k!==null&&k.tag===6?(n(z,k.sibling),k=i(k,$),k.return=z,z=k):(n(z,k),k=xA($,z.mode,K),k.return=z,z=k),o(z)):n(z,k)}return B}var Z_=eF(!0),nF=eF(!1),D1={},Hp=mm(D1),N1=mm(D1),F1=mm(D1);function Uv(e){if(e===D1)throw Error(Ye(174));return e}function zM(e,t){switch(No(F1,t),No(N1,e),No(Hp,D1),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:FT(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=FT(t,e)}ta(Hp),No(Hp,t)}function K_(){ta(Hp),ta(N1),ta(F1)}function rF(e){Uv(F1.current);var t=Uv(Hp.current),n=FT(t,e.type);t!==n&&(No(N1,e),No(Hp,n))}function BM(e){N1.current===e&&(ta(Hp),ta(N1))}var Oa=mm(0);function RE(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if((t.flags&128)!=0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var UM=[];function VM(){for(var e=0;e<UM.length;e++)UM[e]._workInProgressVersionPrimary=null;UM.length=0}var kE=Yd.ReactCurrentDispatcher,$M=Yd.ReactCurrentBatchConfig,Vv=0,Ra=null,Rs=null,ru=null,DE=!1,z1=!1,B1=0,NG=0;function il(){throw Error(Ye(321))}function jM(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!np(e[n],t[n]))return!1;return!0}function qM(e,t,n,r,i,a){if(Vv=a,Ra=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,kE.current=e===null||e.memoizedState===null?UG:VG,e=n(r,i),z1){a=0;do{if(z1=!1,B1=0,25<=a)throw Error(Ye(301));a+=1,ru=Rs=null,t.updateQueue=null,kE.current=$G,e=n(r,i)}while(z1)}if(kE.current=zE,t=Rs!==null&&Rs.next!==null,Vv=0,ru=Rs=Ra=null,DE=!1,t)throw Error(Ye(300));return e}function GM(){var e=B1!==0;return B1=0,e}function Xp(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ru===null?Ra.memoizedState=ru=e:ru=ru.next=e,ru}function nh(){if(Rs===null){var e=Ra.alternate;e=e!==null?e.memoizedState:null}else e=Rs.next;var t=ru===null?Ra.memoizedState:ru.next;if(t!==null)ru=t,Rs=e;else{if(e===null)throw Error(Ye(310));Rs=e,e={memoizedState:Rs.memoizedState,baseState:Rs.baseState,baseQueue:Rs.baseQueue,queue:Rs.queue,next:null},ru===null?Ra.memoizedState=ru=e:ru=ru.next=e}return ru}function U1(e,t){return typeof t=="function"?t(e):t}function WM(e){var t=nh(),n=t.queue;if(n===null)throw Error(Ye(311));n.lastRenderedReducer=e;var r=Rs,i=r.baseQueue,a=n.pending;if(a!==null){if(i!==null){var o=i.next;i.next=a.next,a.next=o}r.baseQueue=i=a,n.pending=null}if(i!==null){a=i.next,r=r.baseState;var u=o=null,c=null,g=a;do{var _=g.lane;if((Vv&_)===_)c!==null&&(c=c.next={lane:0,action:g.action,hasEagerState:g.hasEagerState,eagerState:g.eagerState,next:null}),r=g.hasEagerState?g.eagerState:e(r,g.action);else{var E={lane:_,action:g.action,hasEagerState:g.hasEagerState,eagerState:g.eagerState,next:null};c===null?(u=c=E,o=r):c=c.next=E,Ra.lanes|=_,$v|=_}g=g.next}while(g!==null&&g!==a);c===null?o=r:c.next=u,np(r,t.memoizedState)||(vc=!0),t.memoizedState=r,t.baseState=o,t.baseQueue=c,n.lastRenderedState=r}if(e=n.interleaved,e!==null){i=e;do a=i.lane,Ra.lanes|=a,$v|=a,i=i.next;while(i!==e)}else i===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function HM(e){var t=nh(),n=t.queue;if(n===null)throw Error(Ye(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,a=t.memoizedState;if(i!==null){n.pending=null;var o=i=i.next;do a=e(a,o.action),o=o.next;while(o!==i);np(a,t.memoizedState)||(vc=!0),t.memoizedState=a,t.baseQueue===null&&(t.baseState=a),n.lastRenderedState=a}return[a,r]}function iF(){}function oF(e,t){var n=Ra,r=nh(),i=t(),a=!np(r.memoizedState,i);if(a&&(r.memoizedState=i,vc=!0),r=r.queue,XM(uF.bind(null,n,r,e),[e]),r.getSnapshot!==t||a||ru!==null&&ru.memoizedState.tag&1){if(n.flags|=2048,V1(9,sF.bind(null,n,r,i,t),void 0,null),iu===null)throw Error(Ye(349));(Vv&30)!=0||aF(n,t,i)}return i}function aF(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Ra.updateQueue,t===null?(t={lastEffect:null,stores:null},Ra.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function sF(e,t,n,r){t.value=n,t.getSnapshot=r,lF(t)&&cF(e)}function uF(e,t,n){return n(function(){lF(t)&&cF(e)})}function lF(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!np(e,n)}catch{return!0}}function cF(e){var t=tg(e,1);t!==null&&sp(t,e,1,-1)}function fF(e){var t=Xp();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:U1,lastRenderedState:e},t.queue=e,e=e.dispatch=BG.bind(null,Ra,e),[t.memoizedState,e]}function V1(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=Ra.updateQueue,t===null?(t={lastEffect:null,stores:null},Ra.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function hF(){return nh().memoizedState}function NE(e,t,n,r){var i=Xp();Ra.flags|=e,i.memoizedState=V1(1|t,n,void 0,r===void 0?null:r)}function FE(e,t,n,r){var i=nh();r=r===void 0?null:r;var a=void 0;if(Rs!==null){var o=Rs.memoizedState;if(a=o.destroy,r!==null&&jM(r,o.deps)){i.memoizedState=V1(t,n,a,r);return}}Ra.flags|=e,i.memoizedState=V1(1|t,n,a,r)}function pF(e,t){return NE(8390656,8,e,t)}function XM(e,t){return FE(2048,8,e,t)}function dF(e,t){return FE(4,2,e,t)}function gF(e,t){return FE(4,4,e,t)}function mF(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function vF(e,t,n){return n=n!=null?n.concat([e]):null,FE(4,4,mF.bind(null,t,e),n)}function YM(){}function yF(e,t){var n=nh();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&jM(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function _F(e,t){var n=nh();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&jM(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function xF(e,t,n){return(Vv&21)==0?(e.baseState&&(e.baseState=!1,vc=!0),e.memoizedState=n):(np(n,t)||(n=WD(),Ra.lanes|=n,$v|=n,e.baseState=!0),t)}function FG(e,t){var n=co;co=n!==0&&4>n?n:4,e(!0);var r=$M.transition;$M.transition={};try{e(!1),t()}finally{co=n,$M.transition=r}}function bF(){return nh().memoizedState}function zG(e,t,n){var r=Em(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},wF(e))SF(t,n);else if(n=WN(e,t,n,r),n!==null){var i=Fl();sp(n,e,r,i),EF(n,t,r)}}function BG(e,t,n){var r=Em(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(wF(e))SF(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,u=a(o,n);if(i.hasEagerState=!0,i.eagerState=u,np(u,o)){var c=t.interleaved;c===null?(i.next=i,kM(t)):(i.next=c.next,c.next=i),t.interleaved=i;return}}catch{}finally{}n=WN(e,t,i,r),n!==null&&(i=Fl(),sp(n,e,r,i),EF(n,t,r))}}function wF(e){var t=e.alternate;return e===Ra||t!==null&&t===Ra}function SF(e,t){z1=DE=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function EF(e,t,n){if((n&4194240)!=0){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,YT(e,n)}}var zE={readContext:eh,useCallback:il,useContext:il,useEffect:il,useImperativeHandle:il,useInsertionEffect:il,useLayoutEffect:il,useMemo:il,useReducer:il,useRef:il,useState:il,useDebugValue:il,useDeferredValue:il,useTransition:il,useMutableSource:il,useSyncExternalStore:il,useId:il,unstable_isNewReconciler:!1},UG={readContext:eh,useCallback:function(e,t){return Xp().memoizedState=[e,t===void 0?null:t],e},useContext:eh,useEffect:pF,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,NE(4194308,4,mF.bind(null,t,e),n)},useLayoutEffect:function(e,t){return NE(4194308,4,e,t)},useInsertionEffect:function(e,t){return NE(4,2,e,t)},useMemo:function(e,t){var n=Xp();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Xp();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=zG.bind(null,Ra,e),[r.memoizedState,e]},useRef:function(e){var t=Xp();return e={current:e},t.memoizedState=e},useState:fF,useDebugValue:YM,useDeferredValue:function(e){return Xp().memoizedState=e},useTransition:function(){var e=fF(!1),t=e[0];return e=FG.bind(null,e[1]),Xp().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Ra,i=Xp();if(ha){if(n===void 0)throw Error(Ye(407));n=n()}else{if(n=t(),iu===null)throw Error(Ye(349));(Vv&30)!=0||aF(r,t,n)}i.memoizedState=n;var a={value:n,getSnapshot:t};return i.queue=a,pF(uF.bind(null,r,a,e),[e]),r.flags|=2048,V1(9,sF.bind(null,r,a,n,t),void 0,null),n},useId:function(){var e=Xp(),t=iu.identifierPrefix;if(ha){var n=Qd,r=Jd;n=(r&~(1<<32-ep(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=B1++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=NG++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},VG={readContext:eh,useCallback:yF,useContext:eh,useEffect:XM,useImperativeHandle:vF,useInsertionEffect:dF,useLayoutEffect:gF,useMemo:_F,useReducer:WM,useRef:hF,useState:function(){return WM(U1)},useDebugValue:YM,useDeferredValue:function(e){var t=nh();return xF(t,Rs.memoizedState,e)},useTransition:function(){var e=WM(U1)[0],t=nh().memoizedState;return[e,t]},useMutableSource:iF,useSyncExternalStore:oF,useId:bF,unstable_isNewReconciler:!1},$G={readContext:eh,useCallback:yF,useContext:eh,useEffect:XM,useImperativeHandle:vF,useInsertionEffect:dF,useLayoutEffect:gF,useMemo:_F,useReducer:HM,useRef:hF,useState:function(){return HM(U1)},useDebugValue:YM,useDeferredValue:function(e){var t=nh();return Rs===null?t.memoizedState=e:xF(t,Rs.memoizedState,e)},useTransition:function(){var e=HM(U1)[0],t=nh().memoizedState;return[e,t]},useMutableSource:iF,useSyncExternalStore:oF,useId:bF,unstable_isNewReconciler:!1};function J_(e,t){try{var n="",r=t;do n+=mq(r),r=r.return;while(r);var i=n}catch(a){i=` Error generating stack: `+a.message+` `+a.stack}return{value:e,source:t,stack:i,digest:null}}function ZM(e,t,n){return{value:e,source:null,stack:n!=null?n:null,digest:t!=null?t:null}}function KM(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var jG=typeof WeakMap=="function"?WeakMap:Map;function CF(e,t,n){n=eg(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){GE||(GE=!0,hA=r),KM(e,t)},n}function IF(e,t,n){n=eg(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){KM(e,t)}}var a=e.stateNode;return a!==null&&typeof a.componentDidCatch=="function"&&(n.callback=function(){KM(e,t),typeof r!="function"&&(wm===null?wm=new Set([this]):wm.add(this));var o=t.stack;this.componentDidCatch(t.value,{componentStack:o!==null?o:""})}),n}function PF(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new jG;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=rW.bind(null,e,t,n),t.then(e,e))}function TF(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function MF(e,t,n,r,i){return(e.mode&1)==0?(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=eg(-1,1),t.tag=2,xm(n,t,1))),n.lanes|=1),e):(e.flags|=65536,e.lanes=i,e)}var qG=Yd.ReactCurrentOwner,vc=!1;function Nl(e,t,n,r){t.child=e===null?nF(t,null,n,r):Z_(t,e.child,n,r)}function AF(e,t,n,r,i){n=n.render;var a=t.ref;return Y_(t,i),r=qM(e,t,n,r,a,i),n=GM(),e!==null&&!vc?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,ng(e,t,i)):(ha&&n&&CM(t),t.flags|=1,Nl(e,t,r,i),t.child)}function LF(e,t,n,r,i){if(e===null){var a=n.type;return typeof a=="function"&&!_A(a)&&a.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=a,OF(e,t,a,r,i)):(e=KE(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,(e.lanes&i)==0){var o=a.memoizedProps;if(n=n.compare,n=n!==null?n:P1,n(o,r)&&e.ref===t.ref)return ng(e,t,i)}return t.flags|=1,e=Im(a,r),e.ref=t.ref,e.return=t,t.child=e}function OF(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(P1(a,r)&&e.ref===t.ref)if(vc=!1,t.pendingProps=r=a,(e.lanes&i)!=0)(e.flags&131072)!=0&&(vc=!0);else return t.lanes=e.lanes,ng(e,t,i)}return JM(e,t,n,r,i)}function RF(e,t,n){var r=t.pendingProps,i=r.children,a=e!==null?e.memoizedState:null;if(r.mode==="hidden")if((t.mode&1)==0)t.memoizedState={baseLanes:0,cachePool:null,transitions:null},No(t0,of),of|=n;else{if((n&1073741824)==0)return e=a!==null?a.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,No(t0,of),of|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=a!==null?a.baseLanes:n,No(t0,of),of|=r}else a!==null?(r=a.baseLanes|n,t.memoizedState=null):r=n,No(t0,of),of|=r;return Nl(e,t,i,n),t.child}function kF(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function JM(e,t,n,r,i){var a=mc(n)?Nv:rl.current;return a=q_(t,a),Y_(t,i),n=qM(e,t,n,r,a,i),r=GM(),e!==null&&!vc?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,ng(e,t,i)):(ha&&r&&CM(t),t.flags|=1,Nl(e,t,n,i),t.child)}function DF(e,t,n,r,i){if(mc(n)){var a=!0;wE(t)}else a=!1;if(Y_(t,i),t.stateNode===null)UE(e,t),JN(t,n,r),FM(t,n,r,i),r=!0;else if(e===null){var o=t.stateNode,u=t.memoizedProps;o.props=u;var c=o.context,g=n.contextType;typeof g=="object"&&g!==null?g=eh(g):(g=mc(n)?Nv:rl.current,g=q_(t,g));var _=n.getDerivedStateFromProps,E=typeof _=="function"||typeof o.getSnapshotBeforeUpdate=="function";E||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(u!==r||c!==g)&&QN(t,o,r,g),_m=!1;var C=t.memoizedState;o.state=C,AE(t,r,o,i),c=t.memoizedState,u!==r||C!==c||gc.current||_m?(typeof _=="function"&&(NM(t,n,_,r),c=t.memoizedState),(u=_m||KN(t,n,u,r,C,c,g))?(E||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(t.flags|=4194308)):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=c),o.props=r,o.state=c,o.context=g,r=u):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{o=t.stateNode,HN(e,t),u=t.memoizedProps,g=t.type===t.elementType?u:ip(t.type,u),o.props=g,E=t.pendingProps,C=o.context,c=n.contextType,typeof c=="object"&&c!==null?c=eh(c):(c=mc(n)?Nv:rl.current,c=q_(t,c));var O=n.getDerivedStateFromProps;(_=typeof O=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(u!==E||C!==c)&&QN(t,o,r,c),_m=!1,C=t.memoizedState,o.state=C,AE(t,r,o,i);var R=t.memoizedState;u!==E||C!==R||gc.current||_m?(typeof O=="function"&&(NM(t,n,O,r),R=t.memoizedState),(g=_m||KN(t,n,g,r,C,R,c)||!1)?(_||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(r,R,c),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(r,R,c)),typeof o.componentDidUpdate=="function"&&(t.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof o.componentDidUpdate!="function"||u===e.memoizedProps&&C===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||u===e.memoizedProps&&C===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=R),o.props=r,o.state=R,o.context=c,r=g):(typeof o.componentDidUpdate!="function"||u===e.memoizedProps&&C===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||u===e.memoizedProps&&C===e.memoizedState||(t.flags|=1024),r=!1)}return QM(e,t,n,r,a,i)}function QM(e,t,n,r,i,a){kF(e,t);var o=(t.flags&128)!=0;if(!r&&!o)return i&&BN(t,n,!1),ng(e,t,a);r=t.stateNode,qG.current=t;var u=o&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&o?(t.child=Z_(t,e.child,null,a),t.child=Z_(t,null,u,a)):Nl(e,t,u,a),t.memoizedState=r.state,i&&BN(t,n,!0),t.child}function NF(e){var t=e.stateNode;t.pendingContext?FN(e,t.pendingContext,t.pendingContext!==t.context):t.context&&FN(e,t.context,!1),zM(e,t.containerInfo)}function FF(e,t,n,r,i){return H_(),MM(i),t.flags|=256,Nl(e,t,n,r),t.child}var tA={dehydrated:null,treeContext:null,retryLane:0};function eA(e){return{baseLanes:e,cachePool:null,transitions:null}}function zF(e,t,n){var r=t.pendingProps,i=Oa.current,a=!1,o=(t.flags&128)!=0,u;if((u=o)||(u=e!==null&&e.memoizedState===null?!1:(i&2)!=0),u?(a=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),No(Oa,i&1),e===null)return TM(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?((t.mode&1)==0?t.lanes=1:e.data==="$!"?t.lanes=8:t.lanes=1073741824,null):(o=r.children,e=r.fallback,a?(r=t.mode,a=t.child,o={mode:"hidden",children:o},(r&1)==0&&a!==null?(a.childLanes=0,a.pendingProps=o):a=JE(o,r,0,null),e=Wv(e,r,n,null),a.return=t,e.return=t,a.sibling=e,t.child=a,t.child.memoizedState=eA(n),t.memoizedState=tA,e):nA(t,o));if(i=e.memoizedState,i!==null&&(u=i.dehydrated,u!==null))return GG(e,t,o,r,u,i,n);if(a){a=r.fallback,o=t.mode,i=e.child,u=i.sibling;var c={mode:"hidden",children:r.children};return(o&1)==0&&t.child!==i?(r=t.child,r.childLanes=0,r.pendingProps=c,t.deletions=null):(r=Im(i,c),r.subtreeFlags=i.subtreeFlags&14680064),u!==null?a=Im(u,a):(a=Wv(a,o,n,null),a.flags|=2),a.return=t,r.return=t,r.sibling=a,t.child=r,r=a,a=t.child,o=e.child.memoizedState,o=o===null?eA(n):{baseLanes:o.baseLanes|n,cachePool:null,transitions:o.transitions},a.memoizedState=o,a.childLanes=e.childLanes&~n,t.memoizedState=tA,r}return a=e.child,e=a.sibling,r=Im(a,{mode:"visible",children:r.children}),(t.mode&1)==0&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function nA(e,t){return t=JE({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function BE(e,t,n,r){return r!==null&&MM(r),Z_(t,e.child,null,n),e=nA(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function GG(e,t,n,r,i,a,o){if(n)return t.flags&256?(t.flags&=-257,r=ZM(Error(Ye(422))),BE(e,t,o,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(a=r.fallback,i=t.mode,r=JE({mode:"visible",children:r.children},i,0,null),a=Wv(a,i,o,null),a.flags|=2,r.return=t,a.return=t,r.sibling=a,t.child=r,(t.mode&1)!=0&&Z_(t,e.child,null,o),t.child.memoizedState=eA(o),t.memoizedState=tA,a);if((t.mode&1)==0)return BE(e,t,o,null);if(i.data==="$!"){if(r=i.nextSibling&&i.nextSibling.dataset,r)var u=r.dgst;return r=u,a=Error(Ye(419)),r=ZM(a,r,void 0),BE(e,t,o,r)}if(u=(o&e.childLanes)!=0,vc||u){if(r=iu,r!==null){switch(o&-o){case 4:i=2;break;case 16:i=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}i=(i&(r.suspendedLanes|o))!=0?0:i,i!==0&&i!==a.retryLane&&(a.retryLane=i,tg(e,i),sp(r,e,i,-1))}return yA(),r=ZM(Error(Ye(421))),BE(e,t,o,r)}return i.data==="$?"?(t.flags|=128,t.child=e.child,t=iW.bind(null,e),i._reactRetry=t,null):(e=a.treeContext,rf=gm(i.nextSibling),nf=t,ha=!0,rp=null,e!==null&&(Qf[th++]=Jd,Qf[th++]=Qd,Qf[th++]=Fv,Jd=e.id,Qd=e.overflow,Fv=t),t=nA(t,r.children),t.flags|=4096,t)}function BF(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),RM(e.return,t,n)}function rA(e,t,n,r,i){var a=e.memoizedState;a===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(a.isBackwards=t,a.rendering=null,a.renderingStartTime=0,a.last=r,a.tail=n,a.tailMode=i)}function UF(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;if(Nl(e,t,r.children,n),r=Oa.current,(r&2)!=0)r=r&1|2,t.flags|=128;else{if(e!==null&&(e.flags&128)!=0)t:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&BF(e,n,t);else if(e.tag===19)BF(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break t;for(;e.sibling===null;){if(e.return===null||e.return===t)break t;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(No(Oa,r),(t.mode&1)==0)t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&RE(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),rA(t,!1,i,n,a);break;case"backwards":for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&RE(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}rA(t,!0,n,null,a);break;case"together":rA(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function UE(e,t){(t.mode&1)==0&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function ng(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),$v|=t.lanes,(n&t.childLanes)==0)return null;if(e!==null&&t.child!==e.child)throw Error(Ye(153));if(t.child!==null){for(e=t.child,n=Im(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Im(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function WG(e,t,n){switch(t.tag){case 3:NF(t),H_();break;case 5:rF(t);break;case 1:mc(t.type)&&wE(t);break;case 4:zM(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;No(PE,r._currentValue),r._currentValue=i;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(No(Oa,Oa.current&1),t.flags|=128,null):(n&t.child.childLanes)!=0?zF(e,t,n):(No(Oa,Oa.current&1),e=ng(e,t,n),e!==null?e.sibling:null);No(Oa,Oa.current&1);break;case 19:if(r=(n&t.childLanes)!=0,(e.flags&128)!=0){if(r)return UF(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),No(Oa,Oa.current),r)break;return null;case 22:case 23:return t.lanes=0,RF(e,t,n)}return ng(e,t,n)}var VF,iA,$F,jF;VF=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};iA=function(){};$F=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,Uv(Hp.current);var a=null;switch(n){case"input":i=RT(e,i),r=RT(e,r),a=[];break;case"select":i=La({},i,{value:void 0}),r=La({},r,{value:void 0}),a=[];break;case"textarea":i=NT(e,i),r=NT(e,r),a=[];break;default:typeof i.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=_E)}zT(n,r);var o;n=null;for(g in i)if(!r.hasOwnProperty(g)&&i.hasOwnProperty(g)&&i[g]!=null)if(g==="style"){var u=i[g];for(o in u)u.hasOwnProperty(o)&&(n||(n={}),n[o]="")}else g!=="dangerouslySetInnerHTML"&&g!=="children"&&g!=="suppressContentEditableWarning"&&g!=="suppressHydrationWarning"&&g!=="autoFocus"&&(a1.hasOwnProperty(g)?a||(a=[]):(a=a||[]).push(g,null));for(g in r){var c=r[g];if(u=i!=null?i[g]:void 0,r.hasOwnProperty(g)&&c!==u&&(c!=null||u!=null))if(g==="style")if(u){for(o in u)!u.hasOwnProperty(o)||c&&c.hasOwnProperty(o)||(n||(n={}),n[o]="");for(o in c)c.hasOwnProperty(o)&&u[o]!==c[o]&&(n||(n={}),n[o]=c[o])}else n||(a||(a=[]),a.push(g,n)),n=c;else g==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,u=u?u.__html:void 0,c!=null&&u!==c&&(a=a||[]).push(g,c)):g==="children"?typeof c!="string"&&typeof c!="number"||(a=a||[]).push(g,""+c):g!=="suppressContentEditableWarning"&&g!=="suppressHydrationWarning"&&(a1.hasOwnProperty(g)?(c!=null&&g==="onScroll"&&Qo("scroll",e),a||u===c||(a=[])):(a=a||[]).push(g,c))}n&&(a=a||[]).push("style",n);var g=a;(t.updateQueue=g)&&(t.flags|=4)}};jF=function(e,t,n,r){n!==r&&(t.flags|=4)};function $1(e,t){if(!ha)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function ol(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&14680064,r|=i.flags&14680064,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function HG(e,t,n){var r=t.pendingProps;switch(IM(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ol(t),null;case 1:return mc(t.type)&&bE(),ol(t),null;case 3:return r=t.stateNode,K_(),ta(gc),ta(rl),VM(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(IE(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&(t.flags&256)==0||(t.flags|=1024,rp!==null&&(gA(rp),rp=null))),iA(e,t),ol(t),null;case 5:BM(t);var i=Uv(F1.current);if(n=t.type,e!==null&&t.stateNode!=null)$F(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(Ye(166));return ol(t),null}if(e=Uv(Hp.current),IE(t)){r=t.stateNode,n=t.type;var a=t.memoizedProps;switch(r[Wp]=t,r[O1]=a,e=(t.mode&1)!=0,n){case"dialog":Qo("cancel",r),Qo("close",r);break;case"iframe":case"object":case"embed":Qo("load",r);break;case"video":case"audio":for(i=0;i<M1.length;i++)Qo(M1[i],r);break;case"source":Qo("error",r);break;case"img":case"image":case"link":Qo("error",r),Qo("load",r);break;case"details":Qo("toggle",r);break;case"input":wD(r,a),Qo("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!a.multiple},Qo("invalid",r);break;case"textarea":CD(r,a),Qo("invalid",r)}zT(n,a),i=null;for(var o in a)if(a.hasOwnProperty(o)){var u=a[o];o==="children"?typeof u=="string"?r.textContent!==u&&(a.suppressHydrationWarning!==!0&&yE(r.textContent,u,e),i=["children",u]):typeof u=="number"&&r.textContent!==""+u&&(a.suppressHydrationWarning!==!0&&yE(r.textContent,u,e),i=["children",""+u]):a1.hasOwnProperty(o)&&u!=null&&o==="onScroll"&&Qo("scroll",r)}switch(n){case"input":YS(r),ED(r,a,!0);break;case"textarea":YS(r),PD(r);break;case"select":case"option":break;default:typeof a.onClick=="function"&&(r.onclick=_E)}r=i,t.updateQueue=r,r!==null&&(t.flags|=4)}else{o=i.nodeType===9?i:i.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=TD(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=o.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=o.createElement(n,{is:r.is}):(e=o.createElement(n),n==="select"&&(o=e,r.multiple?o.multiple=!0:r.size&&(o.size=r.size))):e=o.createElementNS(e,n),e[Wp]=t,e[O1]=r,VF(e,t,!1,!1),t.stateNode=e;t:{switch(o=BT(n,r),n){case"dialog":Qo("cancel",e),Qo("close",e),i=r;break;case"iframe":case"object":case"embed":Qo("load",e),i=r;break;case"video":case"audio":for(i=0;i<M1.length;i++)Qo(M1[i],e);i=r;break;case"source":Qo("error",e),i=r;break;case"img":case"image":case"link":Qo("error",e),Qo("load",e),i=r;break;case"details":Qo("toggle",e),i=r;break;case"input":wD(e,r),i=RT(e,r),Qo("invalid",e);break;case"option":i=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},i=La({},r,{value:void 0}),Qo("invalid",e);break;case"textarea":CD(e,r),i=NT(e,r),Qo("invalid",e);break;default:i=r}zT(n,i),u=i;for(a in u)if(u.hasOwnProperty(a)){var c=u[a];a==="style"?LD(e,c):a==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,c!=null&&MD(e,c)):a==="children"?typeof c=="string"?(n!=="textarea"||c!=="")&&c1(e,c):typeof c=="number"&&c1(e,""+c):a!=="suppressContentEditableWarning"&&a!=="suppressHydrationWarning"&&a!=="autoFocus"&&(a1.hasOwnProperty(a)?c!=null&&a==="onScroll"&&Qo("scroll",e):c!=null&&wT(e,a,c,o))}switch(n){case"input":YS(e),ED(e,r,!1);break;case"textarea":YS(e),PD(e);break;case"option":r.value!=null&&e.setAttribute("value",""+um(r.value));break;case"select":e.multiple=!!r.multiple,a=r.value,a!=null?O_(e,!!r.multiple,a,!1):r.defaultValue!=null&&O_(e,!!r.multiple,r.defaultValue,!0);break;default:typeof i.onClick=="function"&&(e.onclick=_E)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break t;case"img":r=!0;break t;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return ol(t),null;case 6:if(e&&t.stateNode!=null)jF(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(Ye(166));if(n=Uv(F1.current),Uv(Hp.current),IE(t)){if(r=t.stateNode,n=t.memoizedProps,r[Wp]=t,(a=r.nodeValue!==n)&&(e=nf,e!==null))switch(e.tag){case 3:yE(r.nodeValue,n,(e.mode&1)!=0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&yE(r.nodeValue,n,(e.mode&1)!=0)}a&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[Wp]=t,t.stateNode=r}return ol(t),null;case 13:if(ta(Oa),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(ha&&rf!==null&&(t.mode&1)!=0&&(t.flags&128)==0)GN(),H_(),t.flags|=98560,a=!1;else if(a=IE(t),r!==null&&r.dehydrated!==null){if(e===null){if(!a)throw Error(Ye(318));if(a=t.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(Ye(317));a[Wp]=t}else H_(),(t.flags&128)==0&&(t.memoizedState=null),t.flags|=4;ol(t),a=!1}else rp!==null&&(gA(rp),rp=null),a=!0;if(!a)return t.flags&65536?t:null}return(t.flags&128)!=0?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,(t.mode&1)!=0&&(e===null||(Oa.current&1)!=0?ks===0&&(ks=3):yA())),t.updateQueue!==null&&(t.flags|=4),ol(t),null);case 4:return K_(),iA(e,t),e===null&&A1(t.stateNode.containerInfo),ol(t),null;case 10:return OM(t.type._context),ol(t),null;case 17:return mc(t.type)&&bE(),ol(t),null;case 19:if(ta(Oa),a=t.memoizedState,a===null)return ol(t),null;if(r=(t.flags&128)!=0,o=a.rendering,o===null)if(r)$1(a,!1);else{if(ks!==0||e!==null&&(e.flags&128)!=0)for(e=t.child;e!==null;){if(o=RE(e),o!==null){for(t.flags|=128,$1(a,!1),r=o.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)a=n,e=r,a.flags&=14680066,o=a.alternate,o===null?(a.childLanes=0,a.lanes=e,a.child=null,a.subtreeFlags=0,a.memoizedProps=null,a.memoizedState=null,a.updateQueue=null,a.dependencies=null,a.stateNode=null):(a.childLanes=o.childLanes,a.lanes=o.lanes,a.child=o.child,a.subtreeFlags=0,a.deletions=null,a.memoizedProps=o.memoizedProps,a.memoizedState=o.memoizedState,a.updateQueue=o.updateQueue,a.type=o.type,e=o.dependencies,a.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return No(Oa,Oa.current&1|2),t.child}e=e.sibling}a.tail!==null&&ns()>e0&&(t.flags|=128,r=!0,$1(a,!1),t.lanes=4194304)}else{if(!r)if(e=RE(o),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),$1(a,!0),a.tail===null&&a.tailMode==="hidden"&&!o.alternate&&!ha)return ol(t),null}else 2*ns()-a.renderingStartTime>e0&&n!==1073741824&&(t.flags|=128,r=!0,$1(a,!1),t.lanes=4194304);a.isBackwards?(o.sibling=t.child,t.child=o):(n=a.last,n!==null?n.sibling=o:t.child=o,a.last=o)}return a.tail!==null?(t=a.tail,a.rendering=t,a.tail=t.sibling,a.renderingStartTime=ns(),t.sibling=null,n=Oa.current,No(Oa,r?n&1|2:n&1),t):(ol(t),null);case 22:case 23:return vA(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&(t.mode&1)!=0?(of&1073741824)!=0&&(ol(t),t.subtreeFlags&6&&(t.flags|=8192)):ol(t),null;case 24:return null;case 25:return null}throw Error(Ye(156,t.tag))}function XG(e,t){switch(IM(t),t.tag){case 1:return mc(t.type)&&bE(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return K_(),ta(gc),ta(rl),VM(),e=t.flags,(e&65536)!=0&&(e&128)==0?(t.flags=e&-65537|128,t):null;case 5:return BM(t),null;case 13:if(ta(Oa),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(Ye(340));H_()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ta(Oa),null;case 4:return K_(),null;case 10:return OM(t.type._context),null;case 22:case 23:return vA(),null;case 24:return null;default:return null}}var VE=!1,al=!1,YG=typeof WeakSet=="function"?WeakSet:Set,Cn=null;function Q_(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){$a(e,t,r)}else n.current=null}function oA(e,t,n){try{n()}catch(r){$a(e,t,r)}}var qF=!1;function ZG(e,t){if(vM=sE,e=bN(),lM(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else t:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,a=r.focusNode;r=r.focusOffset;try{n.nodeType,a.nodeType}catch{n=null;break t}var o=0,u=-1,c=-1,g=0,_=0,E=e,C=null;e:for(;;){for(var O;E!==n||i!==0&&E.nodeType!==3||(u=o+i),E!==a||r!==0&&E.nodeType!==3||(c=o+r),E.nodeType===3&&(o+=E.nodeValue.length),(O=E.firstChild)!==null;)C=E,E=O;for(;;){if(E===e)break e;if(C===n&&++g===i&&(u=o),C===a&&++_===r&&(c=o),(O=E.nextSibling)!==null)break;E=C,C=E.parentNode}E=O}n=u===-1||c===-1?null:{start:u,end:c}}else n=null}n=n||{start:0,end:0}}else n=null;for(yM={focusedElem:e,selectionRange:n},sE=!1,Cn=t;Cn!==null;)if(t=Cn,e=t.child,(t.subtreeFlags&1028)!=0&&e!==null)e.return=t,Cn=e;else for(;Cn!==null;){t=Cn;try{var R=t.alternate;if((t.flags&1024)!=0)switch(t.tag){case 0:case 11:case 15:break;case 1:if(R!==null){var D=R.memoizedProps,B=R.memoizedState,z=t.stateNode,k=z.getSnapshotBeforeUpdate(t.elementType===t.type?D:ip(t.type,D),B);z.__reactInternalSnapshotBeforeUpdate=k}break;case 3:var $=t.stateNode.containerInfo;$.nodeType===1?$.textContent="":$.nodeType===9&&$.documentElement&&$.removeChild($.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(Ye(163))}}catch(K){$a(t,t.return,K)}if(e=t.sibling,e!==null){e.return=t.return,Cn=e;break}Cn=t.return}return R=qF,qF=!1,R}function j1(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var a=i.destroy;i.destroy=void 0,a!==void 0&&oA(t,n,a)}i=i.next}while(i!==r)}}function $E(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function aA(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function GF(e){var t=e.alternate;t!==null&&(e.alternate=null,GF(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Wp],delete t[O1],delete t[wM],delete t[OG],delete t[RG])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function WF(e){return e.tag===5||e.tag===3||e.tag===4}function HF(e){t:for(;;){for(;e.sibling===null;){if(e.return===null||WF(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue t;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function sA(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=_E));else if(r!==4&&(e=e.child,e!==null))for(sA(e,t,n),e=e.sibling;e!==null;)sA(e,t,n),e=e.sibling}function uA(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(uA(e,t,n),e=e.sibling;e!==null;)uA(e,t,n),e=e.sibling}var Tu=null,op=!1;function bm(e,t,n){for(n=n.child;n!==null;)XF(e,t,n),n=n.sibling}function XF(e,t,n){if(Gp&&typeof Gp.onCommitFiberUnmount=="function")try{Gp.onCommitFiberUnmount(eE,n)}catch{}switch(n.tag){case 5:al||Q_(n,t);case 6:var r=Tu,i=op;Tu=null,bm(e,t,n),Tu=r,op=i,Tu!==null&&(op?(e=Tu,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Tu.removeChild(n.stateNode));break;case 18:Tu!==null&&(op?(e=Tu,n=n.stateNode,e.nodeType===8?bM(e.parentNode,n):e.nodeType===1&&bM(e,n),b1(e)):bM(Tu,n.stateNode));break;case 4:r=Tu,i=op,Tu=n.stateNode.containerInfo,op=!0,bm(e,t,n),Tu=r,op=i;break;case 0:case 11:case 14:case 15:if(!al&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var a=i,o=a.destroy;a=a.tag,o!==void 0&&((a&2)!=0||(a&4)!=0)&&oA(n,t,o),i=i.next}while(i!==r)}bm(e,t,n);break;case 1:if(!al&&(Q_(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(u){$a(n,t,u)}bm(e,t,n);break;case 21:bm(e,t,n);break;case 22:n.mode&1?(al=(r=al)||n.memoizedState!==null,bm(e,t,n),al=r):bm(e,t,n);break;default:bm(e,t,n)}}function YF(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new YG),t.forEach(function(r){var i=oW.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function ap(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];try{var a=e,o=t,u=o;t:for(;u!==null;){switch(u.tag){case 5:Tu=u.stateNode,op=!1;break t;case 3:Tu=u.stateNode.containerInfo,op=!0;break t;case 4:Tu=u.stateNode.containerInfo,op=!0;break t}u=u.return}if(Tu===null)throw Error(Ye(160));XF(a,o,i),Tu=null,op=!1;var c=i.alternate;c!==null&&(c.return=null),i.return=null}catch(g){$a(i,t,g)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)ZF(t,e),t=t.sibling}function ZF(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(ap(t,e),Yp(e),r&4){try{j1(3,e,e.return),$E(3,e)}catch(D){$a(e,e.return,D)}try{j1(5,e,e.return)}catch(D){$a(e,e.return,D)}}break;case 1:ap(t,e),Yp(e),r&512&&n!==null&&Q_(n,n.return);break;case 5:if(ap(t,e),Yp(e),r&512&&n!==null&&Q_(n,n.return),e.flags&32){var i=e.stateNode;try{c1(i,"")}catch(D){$a(e,e.return,D)}}if(r&4&&(i=e.stateNode,i!=null)){var a=e.memoizedProps,o=n!==null?n.memoizedProps:a,u=e.type,c=e.updateQueue;if(e.updateQueue=null,c!==null)try{u==="input"&&a.type==="radio"&&a.name!=null&&SD(i,a),BT(u,o);var g=BT(u,a);for(o=0;o<c.length;o+=2){var _=c[o],E=c[o+1];_==="style"?LD(i,E):_==="dangerouslySetInnerHTML"?MD(i,E):_==="children"?c1(i,E):wT(i,_,E,g)}switch(u){case"input":kT(i,a);break;case"textarea":ID(i,a);break;case"select":var C=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!a.multiple;var O=a.value;O!=null?O_(i,!!a.multiple,O,!1):C!==!!a.multiple&&(a.defaultValue!=null?O_(i,!!a.multiple,a.defaultValue,!0):O_(i,!!a.multiple,a.multiple?[]:"",!1))}i[O1]=a}catch(D){$a(e,e.return,D)}}break;case 6:if(ap(t,e),Yp(e),r&4){if(e.stateNode===null)throw Error(Ye(162));i=e.stateNode,a=e.memoizedProps;try{i.nodeValue=a}catch(D){$a(e,e.return,D)}}break;case 3:if(ap(t,e),Yp(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{b1(t.containerInfo)}catch(D){$a(e,e.return,D)}break;case 4:ap(t,e),Yp(e);break;case 13:ap(t,e),Yp(e),i=e.child,i.flags&8192&&(a=i.memoizedState!==null,i.stateNode.isHidden=a,!a||i.alternate!==null&&i.alternate.memoizedState!==null||(fA=ns())),r&4&&YF(e);break;case 22:if(_=n!==null&&n.memoizedState!==null,e.mode&1?(al=(g=al)||_,ap(t,e),al=g):ap(t,e),Yp(e),r&8192){if(g=e.memoizedState!==null,(e.stateNode.isHidden=g)&&!_&&(e.mode&1)!=0)for(Cn=e,_=e.child;_!==null;){for(E=Cn=_;Cn!==null;){switch(C=Cn,O=C.child,C.tag){case 0:case 11:case 14:case 15:j1(4,C,C.return);break;case 1:Q_(C,C.return);var R=C.stateNode;if(typeof R.componentWillUnmount=="function"){r=C,n=C.return;try{t=r,R.props=t.memoizedProps,R.state=t.memoizedState,R.componentWillUnmount()}catch(D){$a(r,n,D)}}break;case 5:Q_(C,C.return);break;case 22:if(C.memoizedState!==null){QF(E);continue}}O!==null?(O.return=C,Cn=O):QF(E)}_=_.sibling}t:for(_=null,E=e;;){if(E.tag===5){if(_===null){_=E;try{i=E.stateNode,g?(a=i.style,typeof a.setProperty=="function"?a.setProperty("display","none","important"):a.display="none"):(u=E.stateNode,c=E.memoizedProps.style,o=c!=null&&c.hasOwnProperty("display")?c.display:null,u.style.display=AD("display",o))}catch(D){$a(e,e.return,D)}}}else if(E.tag===6){if(_===null)try{E.stateNode.nodeValue=g?"":E.memoizedProps}catch(D){$a(e,e.return,D)}}else if((E.tag!==22&&E.tag!==23||E.memoizedState===null||E===e)&&E.child!==null){E.child.return=E,E=E.child;continue}if(E===e)break t;for(;E.sibling===null;){if(E.return===null||E.return===e)break t;_===E&&(_=null),E=E.return}_===E&&(_=null),E.sibling.return=E.return,E=E.sibling}}break;case 19:ap(t,e),Yp(e),r&4&&YF(e);break;case 21:break;default:ap(t,e),Yp(e)}}function Yp(e){var t=e.flags;if(t&2){try{t:{for(var n=e.return;n!==null;){if(WF(n)){var r=n;break t}n=n.return}throw Error(Ye(160))}switch(r.tag){case 5:var i=r.stateNode;r.flags&32&&(c1(i,""),r.flags&=-33);var a=HF(e);uA(e,a,i);break;case 3:case 4:var o=r.stateNode.containerInfo,u=HF(e);sA(e,u,o);break;default:throw Error(Ye(161))}}catch(c){$a(e,e.return,c)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function KG(e,t,n){Cn=e,KF(e)}function KF(e,t,n){for(var r=(e.mode&1)!=0;Cn!==null;){var i=Cn,a=i.child;if(i.tag===22&&r){var o=i.memoizedState!==null||VE;if(!o){var u=i.alternate,c=u!==null&&u.memoizedState!==null||al;u=VE;var g=al;if(VE=o,(al=c)&&!g)for(Cn=i;Cn!==null;)o=Cn,c=o.child,o.tag===22&&o.memoizedState!==null?tz(i):c!==null?(c.return=o,Cn=c):tz(i);for(;a!==null;)Cn=a,KF(a),a=a.sibling;Cn=i,VE=u,al=g}JF(e)}else(i.subtreeFlags&8772)!=0&&a!==null?(a.return=i,Cn=a):JF(e)}}function JF(e){for(;Cn!==null;){var t=Cn;if((t.flags&8772)!=0){var n=t.alternate;try{if((t.flags&8772)!=0)switch(t.tag){case 0:case 11:case 15:al||$E(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!al)if(n===null)r.componentDidMount();else{var i=t.elementType===t.type?n.memoizedProps:ip(t.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var a=t.updateQueue;a!==null&&YN(t,a,r);break;case 3:var o=t.updateQueue;if(o!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}YN(t,o,n)}break;case 5:var u=t.stateNode;if(n===null&&t.flags&4){n=u;var c=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":c.autoFocus&&n.focus();break;case"img":c.src&&(n.src=c.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var g=t.alternate;if(g!==null){var _=g.memoizedState;if(_!==null){var E=_.dehydrated;E!==null&&b1(E)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(Ye(163))}al||t.flags&512&&aA(t)}catch(C){$a(t,t.return,C)}}if(t===e){Cn=null;break}if(n=t.sibling,n!==null){n.return=t.return,Cn=n;break}Cn=t.return}}function QF(e){for(;Cn!==null;){var t=Cn;if(t===e){Cn=null;break}var n=t.sibling;if(n!==null){n.return=t.return,Cn=n;break}Cn=t.return}}function tz(e){for(;Cn!==null;){var t=Cn;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{$E(4,t)}catch(c){$a(t,n,c)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var i=t.return;try{r.componentDidMount()}catch(c){$a(t,i,c)}}var a=t.return;try{aA(t)}catch(c){$a(t,a,c)}break;case 5:var o=t.return;try{aA(t)}catch(c){$a(t,o,c)}}}catch(c){$a(t,t.return,c)}if(t===e){Cn=null;break}var u=t.sibling;if(u!==null){u.return=t.return,Cn=u;break}Cn=t.return}}var JG=Math.ceil,jE=Yd.ReactCurrentDispatcher,lA=Yd.ReactCurrentOwner,rh=Yd.ReactCurrentBatchConfig,ki=0,iu=null,_s=null,Mu=0,of=0,t0=mm(0),ks=0,q1=null,$v=0,qE=0,cA=0,G1=null,yc=null,fA=0,e0=1/0,rg=null,GE=!1,hA=null,wm=null,WE=!1,Sm=null,HE=0,W1=0,pA=null,XE=-1,YE=0;function Fl(){return(ki&6)!=0?ns():XE!==-1?XE:XE=ns()}function Em(e){return(e.mode&1)==0?1:(ki&2)!=0&&Mu!==0?Mu&-Mu:DG.transition!==null?(YE===0&&(YE=WD()),YE):(e=co,e!==0||(e=window.event,e=e===void 0?16:eN(e.type)),e)}function sp(e,t,n,r){if(50<W1)throw W1=0,pA=null,Error(Ye(185));m1(e,n,r),((ki&2)==0||e!==iu)&&(e===iu&&((ki&2)==0&&(qE|=n),ks===4&&Cm(e,Mu)),_c(e,r),n===1&&ki===0&&(t.mode&1)==0&&(e0=ns()+500,SE&&ym()))}function _c(e,t){var n=e.callbackNode;Dq(e,t);var r=iE(e,e===iu?Mu:0);if(r===0)n!==null&&jD(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&jD(n),t===1)e.tag===0?kG(nz.bind(null,e)):UN(nz.bind(null,e)),AG(function(){(ki&6)==0&&ym()}),n=null;else{switch(HD(r)){case 1:n=WT;break;case 4:n=qD;break;case 16:n=tE;break;case 536870912:n=GD;break;default:n=tE}n=cz(n,ez.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function ez(e,t){if(XE=-1,YE=0,(ki&6)!=0)throw Error(Ye(327));var n=e.callbackNode;if(n0()&&e.callbackNode!==n)return null;var r=iE(e,e===iu?Mu:0);if(r===0)return null;if((r&30)!=0||(r&e.expiredLanes)!=0||t)t=ZE(e,r);else{t=r;var i=ki;ki|=2;var a=iz();(iu!==e||Mu!==t)&&(rg=null,e0=ns()+500,qv(e,t));do try{eW();break}catch(u){rz(e,u)}while(1);LM(),jE.current=a,ki=i,_s!==null?t=0:(iu=null,Mu=0,t=ks)}if(t!==0){if(t===2&&(i=HT(e),i!==0&&(r=i,t=dA(e,i))),t===1)throw n=q1,qv(e,0),Cm(e,r),_c(e,ns()),n;if(t===6)Cm(e,r);else{if(i=e.current.alternate,(r&30)==0&&!QG(i)&&(t=ZE(e,r),t===2&&(a=HT(e),a!==0&&(r=a,t=dA(e,a))),t===1))throw n=q1,qv(e,0),Cm(e,r),_c(e,ns()),n;switch(e.finishedWork=i,e.finishedLanes=r,t){case 0:case 1:throw Error(Ye(345));case 2:Gv(e,yc,rg);break;case 3:if(Cm(e,r),(r&130023424)===r&&(t=fA+500-ns(),10<t)){if(iE(e,0)!==0)break;if(i=e.suspendedLanes,(i&r)!==r){Fl(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=xM(Gv.bind(null,e,yc,rg),t);break}Gv(e,yc,rg);break;case 4:if(Cm(e,r),(r&4194240)===r)break;for(t=e.eventTimes,i=-1;0<r;){var o=31-ep(r);a=1<<o,o=t[o],o>i&&(i=o),r&=~a}if(r=i,r=ns()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*JG(r/1960))-r,10<r){e.timeoutHandle=xM(Gv.bind(null,e,yc,rg),r);break}Gv(e,yc,rg);break;case 5:Gv(e,yc,rg);break;default:throw Error(Ye(329))}}}return _c(e,ns()),e.callbackNode===n?ez.bind(null,e):null}function dA(e,t){var n=G1;return e.current.memoizedState.isDehydrated&&(qv(e,t).flags|=256),e=ZE(e,t),e!==2&&(t=yc,yc=n,t!==null&&gA(t)),e}function gA(e){yc===null?yc=e:yc.push.apply(yc,e)}function QG(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var i=n[r],a=i.getSnapshot;i=i.value;try{if(!np(a(),i))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Cm(e,t){for(t&=~cA,t&=~qE,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-ep(t),r=1<<n;e[n]=-1,t&=~r}}function nz(e){if((ki&6)!=0)throw Error(Ye(327));n0();var t=iE(e,0);if((t&1)==0)return _c(e,ns()),null;var n=ZE(e,t);if(e.tag!==0&&n===2){var r=HT(e);r!==0&&(t=r,n=dA(e,r))}if(n===1)throw n=q1,qv(e,0),Cm(e,t),_c(e,ns()),n;if(n===6)throw Error(Ye(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Gv(e,yc,rg),_c(e,ns()),null}function mA(e,t){var n=ki;ki|=1;try{return e(t)}finally{ki=n,ki===0&&(e0=ns()+500,SE&&ym())}}function jv(e){Sm!==null&&Sm.tag===0&&(ki&6)==0&&n0();var t=ki;ki|=1;var n=rh.transition,r=co;try{if(rh.transition=null,co=1,e)return e()}finally{co=r,rh.transition=n,ki=t,(ki&6)==0&&ym()}}function vA(){of=t0.current,ta(t0)}function qv(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,MG(n)),_s!==null)for(n=_s.return;n!==null;){var r=n;switch(IM(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&bE();break;case 3:K_(),ta(gc),ta(rl),VM();break;case 5:BM(r);break;case 4:K_();break;case 13:ta(Oa);break;case 19:ta(Oa);break;case 10:OM(r.type._context);break;case 22:case 23:vA()}n=n.return}if(iu=e,_s=e=Im(e.current,null),Mu=of=t,ks=0,q1=null,cA=qE=$v=0,yc=G1=null,Bv!==null){for(t=0;t<Bv.length;t++)if(n=Bv[t],r=n.interleaved,r!==null){n.interleaved=null;var i=r.next,a=n.pending;if(a!==null){var o=a.next;a.next=i,r.next=o}n.pending=r}Bv=null}return e}function rz(e,t){do{var n=_s;try{if(LM(),kE.current=zE,DE){for(var r=Ra.memoizedState;r!==null;){var i=r.queue;i!==null&&(i.pending=null),r=r.next}DE=!1}if(Vv=0,ru=Rs=Ra=null,z1=!1,B1=0,lA.current=null,n===null||n.return===null){ks=1,q1=t,_s=null;break}t:{var a=e,o=n.return,u=n,c=t;if(t=Mu,u.flags|=32768,c!==null&&typeof c=="object"&&typeof c.then=="function"){var g=c,_=u,E=_.tag;if((_.mode&1)==0&&(E===0||E===11||E===15)){var C=_.alternate;C?(_.updateQueue=C.updateQueue,_.memoizedState=C.memoizedState,_.lanes=C.lanes):(_.updateQueue=null,_.memoizedState=null)}var O=TF(o);if(O!==null){O.flags&=-257,MF(O,o,u,a,t),O.mode&1&&PF(a,g,t),t=O,c=g;var R=t.updateQueue;if(R===null){var D=new Set;D.add(c),t.updateQueue=D}else R.add(c);break t}else{if((t&1)==0){PF(a,g,t),yA();break t}c=Error(Ye(426))}}else if(ha&&u.mode&1){var B=TF(o);if(B!==null){(B.flags&65536)==0&&(B.flags|=256),MF(B,o,u,a,t),MM(J_(c,u));break t}}a=c=J_(c,u),ks!==4&&(ks=2),G1===null?G1=[a]:G1.push(a),a=o;do{switch(a.tag){case 3:a.flags|=65536,t&=-t,a.lanes|=t;var z=CF(a,c,t);XN(a,z);break t;case 1:u=c;var k=a.type,$=a.stateNode;if((a.flags&128)==0&&(typeof k.getDerivedStateFromError=="function"||$!==null&&typeof $.componentDidCatch=="function"&&(wm===null||!wm.has($)))){a.flags|=65536,t&=-t,a.lanes|=t;var K=IF(a,u,t);XN(a,K);break t}}a=a.return}while(a!==null)}az(n)}catch(et){t=et,_s===n&&n!==null&&(_s=n=n.return);continue}break}while(1)}function iz(){var e=jE.current;return jE.current=zE,e===null?zE:e}function yA(){(ks===0||ks===3||ks===2)&&(ks=4),iu===null||($v&268435455)==0&&(qE&268435455)==0||Cm(iu,Mu)}function ZE(e,t){var n=ki;ki|=2;var r=iz();(iu!==e||Mu!==t)&&(rg=null,qv(e,t));do try{tW();break}catch(i){rz(e,i)}while(1);if(LM(),ki=n,jE.current=r,_s!==null)throw Error(Ye(261));return iu=null,Mu=0,ks}function tW(){for(;_s!==null;)oz(_s)}function eW(){for(;_s!==null&&!Iq();)oz(_s)}function oz(e){var t=lz(e.alternate,e,of);e.memoizedProps=e.pendingProps,t===null?az(e):_s=t,lA.current=null}function az(e){var t=e;do{var n=t.alternate;if(e=t.return,(t.flags&32768)==0){if(n=HG(n,t,of),n!==null){_s=n;return}}else{if(n=XG(n,t),n!==null){n.flags&=32767,_s=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{ks=6,_s=null;return}}if(t=t.sibling,t!==null){_s=t;return}_s=t=e}while(t!==null);ks===0&&(ks=5)}function Gv(e,t,n){var r=co,i=rh.transition;try{rh.transition=null,co=1,nW(e,t,n,r)}finally{rh.transition=i,co=r}return null}function nW(e,t,n,r){do n0();while(Sm!==null);if((ki&6)!=0)throw Error(Ye(327));n=e.finishedWork;var i=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(Ye(177));e.callbackNode=null,e.callbackPriority=0;var a=n.lanes|n.childLanes;if(Nq(e,a),e===iu&&(_s=iu=null,Mu=0),(n.subtreeFlags&2064)==0&&(n.flags&2064)==0||WE||(WE=!0,cz(tE,function(){return n0(),null})),a=(n.flags&15990)!=0,(n.subtreeFlags&15990)!=0||a){a=rh.transition,rh.transition=null;var o=co;co=1;var u=ki;ki|=4,lA.current=null,ZG(e,n),ZF(n,e),wG(yM),sE=!!vM,yM=vM=null,e.current=n,KG(n),Pq(),ki=u,co=o,rh.transition=a}else e.current=n;if(WE&&(WE=!1,Sm=e,HE=i),a=e.pendingLanes,a===0&&(wm=null),Aq(n.stateNode),_c(e,ns()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)i=t[n],r(i.value,{componentStack:i.stack,digest:i.digest});if(GE)throw GE=!1,e=hA,hA=null,e;return(HE&1)!=0&&e.tag!==0&&n0(),a=e.pendingLanes,(a&1)!=0?e===pA?W1++:(W1=0,pA=e):W1=0,ym(),null}function n0(){if(Sm!==null){var e=HD(HE),t=rh.transition,n=co;try{if(rh.transition=null,co=16>e?16:e,Sm===null)var r=!1;else{if(e=Sm,Sm=null,HE=0,(ki&6)!=0)throw Error(Ye(331));var i=ki;for(ki|=4,Cn=e.current;Cn!==null;){var a=Cn,o=a.child;if((Cn.flags&16)!=0){var u=a.deletions;if(u!==null){for(var c=0;c<u.length;c++){var g=u[c];for(Cn=g;Cn!==null;){var _=Cn;switch(_.tag){case 0:case 11:case 15:j1(8,_,a)}var E=_.child;if(E!==null)E.return=_,Cn=E;else for(;Cn!==null;){_=Cn;var C=_.sibling,O=_.return;if(GF(_),_===g){Cn=null;break}if(C!==null){C.return=O,Cn=C;break}Cn=O}}}var R=a.alternate;if(R!==null){var D=R.child;if(D!==null){R.child=null;do{var B=D.sibling;D.sibling=null,D=B}while(D!==null)}}Cn=a}}if((a.subtreeFlags&2064)!=0&&o!==null)o.return=a,Cn=o;else t:for(;Cn!==null;){if(a=Cn,(a.flags&2048)!=0)switch(a.tag){case 0:case 11:case 15:j1(9,a,a.return)}var z=a.sibling;if(z!==null){z.return=a.return,Cn=z;break t}Cn=a.return}}var k=e.current;for(Cn=k;Cn!==null;){o=Cn;var $=o.child;if((o.subtreeFlags&2064)!=0&&$!==null)$.return=o,Cn=$;else t:for(o=k;Cn!==null;){if(u=Cn,(u.flags&2048)!=0)try{switch(u.tag){case 0:case 11:case 15:$E(9,u)}}catch(et){$a(u,u.return,et)}if(u===o){Cn=null;break t}var K=u.sibling;if(K!==null){K.return=u.return,Cn=K;break t}Cn=u.return}}if(ki=i,ym(),Gp&&typeof Gp.onPostCommitFiberRoot=="function")try{Gp.onPostCommitFiberRoot(eE,e)}catch{}r=!0}return r}finally{co=n,rh.transition=t}}return!1}function sz(e,t,n){t=J_(n,t),t=CF(e,t,1),e=xm(e,t,1),t=Fl(),e!==null&&(m1(e,1,t),_c(e,t))}function $a(e,t,n){if(e.tag===3)sz(e,e,n);else for(;t!==null;){if(t.tag===3){sz(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(wm===null||!wm.has(r))){e=J_(n,e),e=IF(t,e,1),t=xm(t,e,1),e=Fl(),t!==null&&(m1(t,1,e),_c(t,e));break}}t=t.return}}function rW(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=Fl(),e.pingedLanes|=e.suspendedLanes&n,iu===e&&(Mu&n)===n&&(ks===4||ks===3&&(Mu&130023424)===Mu&&500>ns()-fA?qv(e,0):cA|=n),_c(e,t)}function uz(e,t){t===0&&((e.mode&1)==0?t=1:(t=rE,rE<<=1,(rE&130023424)==0&&(rE=4194304)));var n=Fl();e=tg(e,t),e!==null&&(m1(e,t,n),_c(e,n))}function iW(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),uz(e,n)}function oW(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(Ye(314))}r!==null&&r.delete(t),uz(e,n)}var lz;lz=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||gc.current)vc=!0;else{if((e.lanes&n)==0&&(t.flags&128)==0)return vc=!1,WG(e,t,n);vc=(e.flags&131072)!=0}else vc=!1,ha&&(t.flags&1048576)!=0&&VN(t,CE,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;UE(e,t),e=t.pendingProps;var i=q_(t,rl.current);Y_(t,n),i=qM(null,t,r,e,i,n);var a=GM();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,mc(r)?(a=!0,wE(t)):a=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,DM(t),i.updater=LE,t.stateNode=i,i._reactInternals=t,FM(t,r,e,n),t=QM(null,t,r,!0,a,n)):(t.tag=0,ha&&a&&CM(t),Nl(null,t,i,n),t=t.child),t;case 16:r=t.elementType;t:{switch(UE(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=sW(r),e=ip(r,e),i){case 0:t=JM(null,t,r,e,n);break t;case 1:t=DF(null,t,r,e,n);break t;case 11:t=AF(null,t,r,e,n);break t;case 14:t=LF(null,t,r,ip(r.type,e),n);break t}throw Error(Ye(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ip(r,i),JM(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ip(r,i),DF(e,t,r,i,n);case 3:t:{if(NF(t),e===null)throw Error(Ye(387));r=t.pendingProps,a=t.memoizedState,i=a.element,HN(e,t),AE(t,r,null,n);var o=t.memoizedState;if(r=o.element,a.isDehydrated)if(a={element:r,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},t.updateQueue.baseState=a,t.memoizedState=a,t.flags&256){i=J_(Error(Ye(423)),t),t=FF(e,t,r,n,i);break t}else if(r!==i){i=J_(Error(Ye(424)),t),t=FF(e,t,r,n,i);break t}else for(rf=gm(t.stateNode.containerInfo.firstChild),nf=t,ha=!0,rp=null,n=nF(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(H_(),r===i){t=ng(e,t,n);break t}Nl(e,t,r,n)}t=t.child}return t;case 5:return rF(t),e===null&&TM(t),r=t.type,i=t.pendingProps,a=e!==null?e.memoizedProps:null,o=i.children,_M(r,i)?o=null:a!==null&&_M(r,a)&&(t.flags|=32),kF(e,t),Nl(e,t,o,n),t.child;case 6:return e===null&&TM(t),null;case 13:return zF(e,t,n);case 4:return zM(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Z_(t,null,r,n):Nl(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ip(r,i),AF(e,t,r,i,n);case 7:return Nl(e,t,t.pendingProps,n),t.child;case 8:return Nl(e,t,t.pendingProps.children,n),t.child;case 12:return Nl(e,t,t.pendingProps.children,n),t.child;case 10:t:{if(r=t.type._context,i=t.pendingProps,a=t.memoizedProps,o=i.value,No(PE,r._currentValue),r._currentValue=o,a!==null)if(np(a.value,o)){if(a.children===i.children&&!gc.current){t=ng(e,t,n);break t}}else for(a=t.child,a!==null&&(a.return=t);a!==null;){var u=a.dependencies;if(u!==null){o=a.child;for(var c=u.firstContext;c!==null;){if(c.context===r){if(a.tag===1){c=eg(-1,n&-n),c.tag=2;var g=a.updateQueue;if(g!==null){g=g.shared;var _=g.pending;_===null?c.next=c:(c.next=_.next,_.next=c),g.pending=c}}a.lanes|=n,c=a.alternate,c!==null&&(c.lanes|=n),RM(a.return,n,t),u.lanes|=n;break}c=c.next}}else if(a.tag===10)o=a.type===t.type?null:a.child;else if(a.tag===18){if(o=a.return,o===null)throw Error(Ye(341));o.lanes|=n,u=o.alternate,u!==null&&(u.lanes|=n),RM(o,n,t),o=a.sibling}else o=a.child;if(o!==null)o.return=a;else for(o=a;o!==null;){if(o===t){o=null;break}if(a=o.sibling,a!==null){a.return=o.return,o=a;break}o=o.return}a=o}Nl(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,Y_(t,n),i=eh(i),r=r(i),t.flags|=1,Nl(e,t,r,n),t.child;case 14:return r=t.type,i=ip(r,t.pendingProps),i=ip(r.type,i),LF(e,t,r,i,n);case 15:return OF(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ip(r,i),UE(e,t),t.tag=1,mc(r)?(e=!0,wE(t)):e=!1,Y_(t,n),JN(t,r,i),FM(t,r,i,n),QM(null,t,r,!0,e,n);case 19:return UF(e,t,n);case 22:return RF(e,t,n)}throw Error(Ye(156,t.tag))};function cz(e,t){return $D(e,t)}function aW(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ih(e,t,n,r){return new aW(e,t,n,r)}function _A(e){return e=e.prototype,!(!e||!e.isReactComponent)}function sW(e){if(typeof e=="function")return _A(e)?1:0;if(e!=null){if(e=e.$$typeof,e===CT)return 11;if(e===TT)return 14}return 2}function Im(e,t){var n=e.alternate;return n===null?(n=ih(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function KE(e,t,n,r,i,a){var o=2;if(r=e,typeof e=="function")_A(e)&&(o=1);else if(typeof e=="string")o=5;else t:switch(e){case L_:return Wv(n.children,i,a,t);case ST:o=8,i|=8;break;case ET:return e=ih(12,n,t,i|2),e.elementType=ET,e.lanes=a,e;case IT:return e=ih(13,n,t,i),e.elementType=IT,e.lanes=a,e;case PT:return e=ih(19,n,t,i),e.elementType=PT,e.lanes=a,e;case yD:return JE(n,i,a,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case mD:o=10;break t;case vD:o=9;break t;case CT:o=11;break t;case TT:o=14;break t;case sm:o=16,r=null;break t}throw Error(Ye(130,e==null?e:typeof e,""))}return t=ih(o,n,t,i),t.elementType=e,t.type=r,t.lanes=a,t}function Wv(e,t,n,r){return e=ih(7,e,r,t),e.lanes=n,e}function JE(e,t,n,r){return e=ih(22,e,r,t),e.elementType=yD,e.lanes=n,e.stateNode={isHidden:!1},e}function xA(e,t,n){return e=ih(6,e,null,t),e.lanes=n,e}function bA(e,t,n){return t=ih(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function uW(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=XT(0),this.expirationTimes=XT(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=XT(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function wA(e,t,n,r,i,a,o,u,c){return e=new uW(e,t,n,u,c),t===1?(t=1,a===!0&&(t|=8)):t=0,a=ih(3,null,null,t),e.current=a,a.stateNode=e,a.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},DM(a),e}function lW(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:A_,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function fz(e){if(!e)return vm;e=e._reactInternals;t:{if(kv(e)!==e||e.tag!==1)throw Error(Ye(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break t;case 1:if(mc(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break t}}t=t.return}while(t!==null);throw Error(Ye(171))}if(e.tag===1){var n=e.type;if(mc(n))return zN(e,n,t)}return t}function hz(e,t,n,r,i,a,o,u,c){return e=wA(n,r,!0,e,i,a,o,u,c),e.context=fz(null),n=e.current,r=Fl(),i=Em(n),a=eg(r,i),a.callback=t!=null?t:null,xm(n,a,i),e.current.lanes=i,m1(e,i,r),_c(e,r),e}function QE(e,t,n,r){var i=t.current,a=Fl(),o=Em(i);return n=fz(n),t.context===null?t.context=n:t.pendingContext=n,t=eg(a,o),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=xm(i,t,o),e!==null&&(sp(e,i,o,a),ME(e,i,o)),o}function tC(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function pz(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function SA(e,t){pz(e,t),(e=e.alternate)&&pz(e,t)}function cW(){return null}var dz=typeof reportError=="function"?reportError:function(e){console.error(e)};function EA(e){this._internalRoot=e}eC.prototype.render=EA.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(Ye(409));QE(e,t,null,null)};eC.prototype.unmount=EA.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;jv(function(){QE(null,e,null,null)}),t[Zd]=null}};function eC(e){this._internalRoot=e}eC.prototype.unstable_scheduleHydration=function(e){if(e){var t=ZD();e={blockedOn:null,target:e,priority:t};for(var n=0;n<hm.length&&t!==0&&t<hm[n].priority;n++);hm.splice(n,0,e),n===0&&QD(e)}};function CA(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function nC(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function gz(){}function fW(e,t,n,r,i){if(i){if(typeof r=="function"){var a=r;r=function(){var g=tC(o);a.call(g)}}var o=hz(t,r,e,0,null,!1,!1,"",gz);return e._reactRootContainer=o,e[Zd]=o.current,A1(e.nodeType===8?e.parentNode:e),jv(),o}for(;i=e.lastChild;)e.removeChild(i);if(typeof r=="function"){var u=r;r=function(){var g=tC(c);u.call(g)}}var c=wA(e,0,!1,null,null,!1,!1,"",gz);return e._reactRootContainer=c,e[Zd]=c.current,A1(e.nodeType===8?e.parentNode:e),jv(function(){QE(t,c,n,r)}),c}function rC(e,t,n,r,i){var a=n._reactRootContainer;if(a){var o=a;if(typeof i=="function"){var u=i;i=function(){var c=tC(o);u.call(c)}}QE(t,o,e,i)}else o=fW(n,t,e,i,r);return tC(o)}XD=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=g1(t.pendingLanes);n!==0&&(YT(t,n|1),_c(t,ns()),(ki&6)==0&&(e0=ns()+500,ym()))}break;case 13:jv(function(){var r=tg(e,1);if(r!==null){var i=Fl();sp(r,e,1,i)}}),SA(e,1)}};ZT=function(e){if(e.tag===13){var t=tg(e,134217728);if(t!==null){var n=Fl();sp(t,e,134217728,n)}SA(e,134217728)}};YD=function(e){if(e.tag===13){var t=Em(e),n=tg(e,t);if(n!==null){var r=Fl();sp(n,e,t,r)}SA(e,t)}};ZD=function(){return co};KD=function(e,t){var n=co;try{return co=e,t()}finally{co=n}};$T=function(e,t,n){switch(t){case"input":if(kT(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=xE(r);if(!i)throw Error(Ye(90));bD(r),kT(r,i)}}}break;case"textarea":ID(e,n);break;case"select":t=n.value,t!=null&&O_(e,!!n.multiple,t,!1)}};DD=mA;ND=jv;var hW={usingClientEntryPoint:!1,Events:[R1,$_,xE,RD,kD,mA]},H1={findFiberByHostInstance:Dv,bundleType:0,version:"18.2.0",rendererPackageName:"react-dom"},pW={bundleType:H1.bundleType,version:H1.version,rendererPackageName:H1.rendererPackageName,rendererConfig:H1.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Yd.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=UD(e),e===null?null:e.stateNode},findFiberByHostInstance:H1.findFiberByHostInstance||cW,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.2.0-next-9e3b772b8-20220608"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__!="undefined"){var iC=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!iC.isDisabled&&iC.supportsFiber)try{eE=iC.inject(pW),Gp=iC}catch{}}Qc.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=hW;Qc.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!CA(t))throw Error(Ye(200));return lW(e,t,null,n)};Qc.createRoot=function(e,t){if(!CA(e))throw Error(Ye(299));var n=!1,r="",i=dz;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(i=t.onRecoverableError)),t=wA(e,1,!1,null,null,n,!1,r,i),e[Zd]=t.current,A1(e.nodeType===8?e.parentNode:e),new EA(t)};Qc.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(Ye(188)):(e=Object.keys(e).join(","),Error(Ye(268,e)));return e=UD(t),e=e===null?null:e.stateNode,e};Qc.flushSync=function(e){return jv(e)};Qc.hydrate=function(e,t,n){if(!nC(t))throw Error(Ye(200));return rC(null,e,t,!0,n)};Qc.hydrateRoot=function(e,t,n){if(!CA(e))throw Error(Ye(405));var r=n!=null&&n.hydratedSources||null,i=!1,a="",o=dz;if(n!=null&&(n.unstable_strictMode===!0&&(i=!0),n.identifierPrefix!==void 0&&(a=n.identifierPrefix),n.onRecoverableError!==void 0&&(o=n.onRecoverableError)),t=hz(t,null,e,1,n!=null?n:null,i,!1,a,o),e[Zd]=t.current,A1(e),r)for(e=0;e<r.length;e++)n=r[e],i=n._getVersion,i=i(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,i]:t.mutableSourceEagerHydrationData.push(n,i);return new eC(t)};Qc.render=function(e,t,n){if(!nC(t))throw Error(Ye(200));return rC(null,e,t,!1,n)};Qc.unmountComponentAtNode=function(e){if(!nC(e))throw Error(Ye(40));return e._reactRootContainer?(jv(function(){rC(null,null,e,!1,function(){e._reactRootContainer=null,e[Zd]=null})}),!0):!1};Qc.unstable_batchedUpdates=mA;Qc.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!nC(n))throw Error(Ye(200));if(e==null||e._reactInternals===void 0)throw Error(Ye(38));return rC(e,t,n,!1,r)};Qc.version="18.2.0-next-9e3b772b8-20220608";function mz(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__=="undefined"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(mz)}catch(e){console.error(e)}}mz(),i1.exports=Qc;var FSt=i1.exports,dW,vz=i1.exports;dW=vz.createRoot,vz.hydrateRoot;var oC={exports:{}},gW="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",mW=gW,vW=mW;function yz(){}function _z(){}_z.resetWarningCache=yz;var yW=function(){function e(r,i,a,o,u,c){if(c!==vW){var g=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw g.name="Invariant Violation",g}}e.isRequired=e;function t(){return e}var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:_z,resetWarningCache:yz};return n.PropTypes=n,n};oC.exports=yW();var xz=oC.exports,bz=vr.createContext(null);function _W(e){e()}var wz=_W,xW=function(t){return wz=t},bW=function(){return wz},Sz={notify:function(){}};function wW(){var e=bW(),t=null,n=null;return{clear:function(){t=null,n=null},notify:function(){e(function(){for(var i=t;i;)i.callback(),i=i.next})},get:function(){for(var i=[],a=t;a;)i.push(a),a=a.next;return i},subscribe:function(i){var a=!0,o=n={callback:i,next:null,prev:n};return o.prev?o.prev.next=o:t=o,function(){!a||t===null||(a=!1,o.next?o.next.prev=o.prev:n=o.prev,o.prev?o.prev.next=o.next:t=o.next)}}}}var Ez=function(){function e(n,r){this.store=n,this.parentSub=r,this.unsubscribe=null,this.listeners=Sz,this.handleChangeWrapper=this.handleChangeWrapper.bind(this)}var t=e.prototype;return t.addNestedSub=function(r){return this.trySubscribe(),this.listeners.subscribe(r)},t.notifyNestedSubs=function(){this.listeners.notify()},t.handleChangeWrapper=function(){this.onStateChange&&this.onStateChange()},t.isSubscribed=function(){return Boolean(this.unsubscribe)},t.trySubscribe=function(){this.unsubscribe||(this.unsubscribe=this.parentSub?this.parentSub.addNestedSub(this.handleChangeWrapper):this.store.subscribe(this.handleChangeWrapper),this.listeners=wW())},t.tryUnsubscribe=function(){this.unsubscribe&&(this.unsubscribe(),this.unsubscribe=null,this.listeners.clear(),this.listeners=Sz)},e}(),aC={exports:{}},sC={};/** * @license React * react-jsx-runtime.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var SW=Pr.exports,EW=Symbol.for("react.element"),CW=Symbol.for("react.fragment"),IW=Object.prototype.hasOwnProperty,PW=SW.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,TW={key:!0,ref:!0,__self:!0,__source:!0};function Cz(e,t,n){var r,i={},a=null,o=null;n!==void 0&&(a=""+n),t.key!==void 0&&(a=""+t.key),t.ref!==void 0&&(o=t.ref);for(r in t)IW.call(t,r)&&!TW.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)i[r]===void 0&&(i[r]=t[r]);return{$$typeof:EW,type:e,key:a,ref:o,props:i,_owner:PW.current}}sC.Fragment=CW;sC.jsx=Cz;sC.jsxs=Cz;aC.exports=sC;const r0=aC.exports.jsx,zSt=aC.exports.jsxs,BSt=aC.exports.Fragment;function USt(e){var t=e.store,n=e.context,r=e.children,i=Pr.exports.useMemo(function(){var u=new Ez(t);return u.onStateChange=u.notifyNestedSubs,{store:t,subscription:u}},[t]),a=Pr.exports.useMemo(function(){return t.getState()},[t]);Pr.exports.useEffect(function(){var u=i.subscription;return u.trySubscribe(),a!==t.getState()&&u.notifyNestedSubs(),function(){u.tryUnsubscribe(),u.onStateChange=null}},[i,a]);var o=n||bz;return r0(o.Provider,{value:i,children:r})}function Vn(){return Vn=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Vn.apply(this,arguments)}function Zp(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var IA={exports:{}},fo={};/** @license React v16.13.1 * react-is.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var ou=typeof Symbol=="function"&&Symbol.for,PA=ou?Symbol.for("react.element"):60103,TA=ou?Symbol.for("react.portal"):60106,uC=ou?Symbol.for("react.fragment"):60107,lC=ou?Symbol.for("react.strict_mode"):60108,cC=ou?Symbol.for("react.profiler"):60114,fC=ou?Symbol.for("react.provider"):60109,hC=ou?Symbol.for("react.context"):60110,MA=ou?Symbol.for("react.async_mode"):60111,pC=ou?Symbol.for("react.concurrent_mode"):60111,dC=ou?Symbol.for("react.forward_ref"):60112,gC=ou?Symbol.for("react.suspense"):60113,MW=ou?Symbol.for("react.suspense_list"):60120,mC=ou?Symbol.for("react.memo"):60115,vC=ou?Symbol.for("react.lazy"):60116,AW=ou?Symbol.for("react.block"):60121,LW=ou?Symbol.for("react.fundamental"):60117,OW=ou?Symbol.for("react.responder"):60118,RW=ou?Symbol.for("react.scope"):60119;function af(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case PA:switch(e=e.type,e){case MA:case pC:case uC:case cC:case lC:case gC:return e;default:switch(e=e&&e.$$typeof,e){case hC:case dC:case vC:case mC:case fC:return e;default:return t}}case TA:return t}}}function Iz(e){return af(e)===pC}fo.AsyncMode=MA;fo.ConcurrentMode=pC;fo.ContextConsumer=hC;fo.ContextProvider=fC;fo.Element=PA;fo.ForwardRef=dC;fo.Fragment=uC;fo.Lazy=vC;fo.Memo=mC;fo.Portal=TA;fo.Profiler=cC;fo.StrictMode=lC;fo.Suspense=gC;fo.isAsyncMode=function(e){return Iz(e)||af(e)===MA};fo.isConcurrentMode=Iz;fo.isContextConsumer=function(e){return af(e)===hC};fo.isContextProvider=function(e){return af(e)===fC};fo.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===PA};fo.isForwardRef=function(e){return af(e)===dC};fo.isFragment=function(e){return af(e)===uC};fo.isLazy=function(e){return af(e)===vC};fo.isMemo=function(e){return af(e)===mC};fo.isPortal=function(e){return af(e)===TA};fo.isProfiler=function(e){return af(e)===cC};fo.isStrictMode=function(e){return af(e)===lC};fo.isSuspense=function(e){return af(e)===gC};fo.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===uC||e===pC||e===cC||e===lC||e===gC||e===MW||typeof e=="object"&&e!==null&&(e.$$typeof===vC||e.$$typeof===mC||e.$$typeof===fC||e.$$typeof===hC||e.$$typeof===dC||e.$$typeof===LW||e.$$typeof===OW||e.$$typeof===RW||e.$$typeof===AW)};fo.typeOf=af;IA.exports=fo;var AA=IA.exports,kW={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},DW={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},NW={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},Pz={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},LA={};LA[AA.ForwardRef]=NW;LA[AA.Memo]=Pz;function Tz(e){return AA.isMemo(e)?Pz:LA[e.$$typeof]||kW}var FW=Object.defineProperty,zW=Object.getOwnPropertyNames,Mz=Object.getOwnPropertySymbols,BW=Object.getOwnPropertyDescriptor,UW=Object.getPrototypeOf,Az=Object.prototype;function Lz(e,t,n){if(typeof t!="string"){if(Az){var r=UW(t);r&&r!==Az&&Lz(e,r,n)}var i=zW(t);Mz&&(i=i.concat(Mz(t)));for(var a=Tz(e),o=Tz(t),u=0;u<i.length;++u){var c=i[u];if(!DW[c]&&!(n&&n[c])&&!(o&&o[c])&&!(a&&a[c])){var g=BW(t,c);try{FW(e,c,g)}catch{}}}}return e}var OA=Lz,VW=typeof window!="undefined"&&typeof window.document!="undefined"&&typeof window.document.createElement!="undefined"?Pr.exports.useLayoutEffect:Pr.exports.useEffect,$W=[],jW=[null,null];function qW(e,t){var n=e[1];return[t.payload,n+1]}function Oz(e,t,n){VW(function(){return e.apply(void 0,t)},n)}function GW(e,t,n,r,i,a,o){e.current=r,t.current=i,n.current=!1,a.current&&(a.current=null,o())}function WW(e,t,n,r,i,a,o,u,c,g){if(!!e){var _=!1,E=null,C=function(){if(!_){var D=t.getState(),B,z;try{B=r(D,i.current)}catch(k){z=k,E=k}z||(E=null),B===a.current?o.current||c():(a.current=B,u.current=B,o.current=!0,g({type:"STORE_UPDATED",payload:{error:z}}))}};n.onStateChange=C,n.trySubscribe(),C();var O=function(){if(_=!0,n.tryUnsubscribe(),n.onStateChange=null,E)throw E};return O}}var HW=function(){return[null,0]};function XW(e,t){t===void 0&&(t={});var n=t,r=n.getDisplayName,i=r===void 0?function($){return"ConnectAdvanced("+$+")"}:r,a=n.methodName,o=a===void 0?"connectAdvanced":a,u=n.renderCountProp,c=u===void 0?void 0:u,g=n.shouldHandleStateChanges,_=g===void 0?!0:g,E=n.storeKey,C=E===void 0?"store":E;n.withRef;var O=n.forwardRef,R=O===void 0?!1:O,D=n.context,B=D===void 0?bz:D,z=Zp(n,["getDisplayName","methodName","renderCountProp","shouldHandleStateChanges","storeKey","withRef","forwardRef","context"]),k=B;return function(K){var et=K.displayName||K.name||"Component",mt=i(et),wt=Vn({},z,{getDisplayName:i,methodName:o,renderCountProp:c,shouldHandleStateChanges:_,storeKey:C,displayName:mt,wrappedComponentName:et,WrappedComponent:K}),Ot=z.pure;function Bt(de){return e(de.dispatch,wt)}var se=Ot?Pr.exports.useMemo:function(de){return de()};function _e(de){var he=Pr.exports.useMemo(function(){var ss=de.forwardedRef,ri=Zp(de,["forwardedRef"]);return[de.context,ss,ri]},[de]),Ge=he[0],Yt=he[1],te=he[2],ve=Pr.exports.useMemo(function(){return Ge&&Ge.Consumer&&IA.exports.isContextConsumer(r0(Ge.Consumer,{}))?Ge:k},[Ge,k]),Wt=Pr.exports.useContext(ve),be=Boolean(de.store)&&Boolean(de.store.getState)&&Boolean(de.store.dispatch);Boolean(Wt)&&Boolean(Wt.store);var De=be?de.store:Wt.store,Fn=Pr.exports.useMemo(function(){return Bt(De)},[De]),ar=Pr.exports.useMemo(function(){if(!_)return jW;var ss=new Ez(De,be?null:Wt.subscription),ri=ss.notifyNestedSubs.bind(ss);return[ss,ri]},[De,be,Wt]),Jn=ar[0],Ar=ar[1],cr=Pr.exports.useMemo(function(){return be?Wt:Vn({},Wt,{subscription:Jn})},[be,Wt,Jn]),Fi=Pr.exports.useReducer(qW,$W,HW),fr=Fi[0],_a=fr[0],Is=Fi[1];if(_a&&_a.error)throw _a.error;var Gi=Pr.exports.useRef(),jn=Pr.exports.useRef(te),bi=Pr.exports.useRef(),ni=Pr.exports.useRef(!1),Wi=se(function(){return bi.current&&te===jn.current?bi.current:Fn(De.getState(),te)},[De,_a,te]);Oz(GW,[jn,Gi,ni,te,Wi,bi,Ar]),Oz(WW,[_,De,Jn,Fn,jn,Gi,ni,bi,Ar,Is],[De,Jn,Fn]);var xa=Pr.exports.useMemo(function(){return r0(K,P_(am({},Wi),{ref:Yt}))},[Yt,K,Wi]),ba=Pr.exports.useMemo(function(){return _?r0(ve.Provider,{value:cr,children:xa}):xa},[ve,xa,cr]);return ba}var Ne=Ot?vr.memo(_e):_e;if(Ne.WrappedComponent=K,Ne.displayName=mt,R){var He=vr.forwardRef(function(he,Ge){return r0(Ne,P_(am({},he),{forwardedRef:Ge}))});return He.displayName=mt,He.WrappedComponent=K,OA(He,K)}return OA(Ne,K)}}function Rz(e,t){return e===t?e!==0||t!==0||1/e==1/t:e!==e&&t!==t}function RA(e,t){if(Rz(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(var i=0;i<n.length;i++)if(!Object.prototype.hasOwnProperty.call(t,n[i])||!Rz(e[n[i]],t[n[i]]))return!1;return!0}function yC(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function kz(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Dz(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?kz(Object(n),!0).forEach(function(r){yC(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):kz(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Au(e){return"Minified Redux error #"+e+"; visit https://redux.js.org/Errors?code="+e+" for the full message or use the non-minified dev environment for full errors. "}var Nz=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),kA=function(){return Math.random().toString(36).substring(7).split("").join(".")},_C={INIT:"@@redux/INIT"+kA(),REPLACE:"@@redux/REPLACE"+kA(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+kA()}};function YW(e){if(typeof e!="object"||e===null)return!1;for(var t=e;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function ZW(e,t,n){var r;if(typeof t=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(Au(0));if(typeof t=="function"&&typeof n=="undefined"&&(n=t,t=void 0),typeof n!="undefined"){if(typeof n!="function")throw new Error(Au(1));return n(ZW)(e,t)}if(typeof e!="function")throw new Error(Au(2));var i=e,a=t,o=[],u=o,c=!1;function g(){u===o&&(u=o.slice())}function _(){if(c)throw new Error(Au(3));return a}function E(D){if(typeof D!="function")throw new Error(Au(4));if(c)throw new Error(Au(5));var B=!0;return g(),u.push(D),function(){if(!!B){if(c)throw new Error(Au(6));B=!1,g();var k=u.indexOf(D);u.splice(k,1),o=null}}}function C(D){if(!YW(D))throw new Error(Au(7));if(typeof D.type=="undefined")throw new Error(Au(8));if(c)throw new Error(Au(9));try{c=!0,a=i(a,D)}finally{c=!1}for(var B=o=u,z=0;z<B.length;z++){var k=B[z];k()}return D}function O(D){if(typeof D!="function")throw new Error(Au(10));i=D,C({type:_C.REPLACE})}function R(){var D,B=E;return D={subscribe:function(k){if(typeof k!="object"||k===null)throw new Error(Au(11));function $(){k.next&&k.next(_())}$();var K=B($);return{unsubscribe:K}}},D[Nz]=function(){return this},D}return C({type:_C.INIT}),r={dispatch:C,subscribe:E,getState:_,replaceReducer:O},r[Nz]=R,r}function KW(e){Object.keys(e).forEach(function(t){var n=e[t],r=n(void 0,{type:_C.INIT});if(typeof r=="undefined")throw new Error(Au(12));if(typeof n(void 0,{type:_C.PROBE_UNKNOWN_ACTION()})=="undefined")throw new Error(Au(13))})}function VSt(e){for(var t=Object.keys(e),n={},r=0;r<t.length;r++){var i=t[r];typeof e[i]=="function"&&(n[i]=e[i])}var a=Object.keys(n),o;try{KW(n)}catch(u){o=u}return function(c,g){if(c===void 0&&(c={}),o)throw o;for(var _=!1,E={},C=0;C<a.length;C++){var O=a[C],R=n[O],D=c[O],B=R(D,g);if(typeof B=="undefined")throw g&&g.type,new Error(Au(14));E[O]=B,_=_||B!==D}return _=_||a.length!==Object.keys(c).length,_?E:c}}function Fz(e,t){return function(){return t(e.apply(this,arguments))}}function JW(e,t){if(typeof e=="function")return Fz(e,t);if(typeof e!="object"||e===null)throw new Error(Au(16));var n={};for(var r in e){var i=e[r];typeof i=="function"&&(n[r]=Fz(i,t))}return n}function QW(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.length===0?function(r){return r}:t.length===1?t[0]:t.reduce(function(r,i){return function(){return r(i.apply(void 0,arguments))}})}function $St(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(r){return function(){var i=r.apply(void 0,arguments),a=function(){throw new Error(Au(15))},o={getState:i.getState,dispatch:function(){return a.apply(void 0,arguments)}},u=t.map(function(c){return c(o)});return a=QW.apply(void 0,u)(i.dispatch),Dz(Dz({},i),{},{dispatch:a})}}}function DA(e){return function(n,r){var i=e(n,r);function a(){return i}return a.dependsOnOwnProps=!1,a}}function zz(e){return e.dependsOnOwnProps!==null&&e.dependsOnOwnProps!==void 0?Boolean(e.dependsOnOwnProps):e.length!==1}function Bz(e,t){return function(r,i){i.displayName;var a=function(u,c){return a.dependsOnOwnProps?a.mapToProps(u,c):a.mapToProps(u)};return a.dependsOnOwnProps=!0,a.mapToProps=function(u,c){a.mapToProps=e,a.dependsOnOwnProps=zz(e);var g=a(u,c);return typeof g=="function"&&(a.mapToProps=g,a.dependsOnOwnProps=zz(g),g=a(u,c)),g},a}}function t7(e){return typeof e=="function"?Bz(e):void 0}function e7(e){return e?void 0:DA(function(t){return{dispatch:t}})}function n7(e){return e&&typeof e=="object"?DA(function(t){return JW(e,t)}):void 0}var r7=[t7,e7,n7];function i7(e){return typeof e=="function"?Bz(e):void 0}function o7(e){return e?void 0:DA(function(){return{}})}var a7=[i7,o7];function s7(e,t,n){return Vn({},n,{},e,{},t)}function u7(e){return function(n,r){r.displayName;var i=r.pure,a=r.areMergedPropsEqual,o=!1,u;return function(g,_,E){var C=e(g,_,E);return o?(!i||!a(C,u))&&(u=C):(o=!0,u=C),u}}}function l7(e){return typeof e=="function"?u7(e):void 0}function c7(e){return e?void 0:function(){return s7}}var f7=[l7,c7];function h7(e,t,n,r){return function(a,o){return n(e(a,o),t(r,o),o)}}function p7(e,t,n,r,i){var a=i.areStatesEqual,o=i.areOwnPropsEqual,u=i.areStatePropsEqual,c=!1,g,_,E,C,O;function R($,K){return g=$,_=K,E=e(g,_),C=t(r,_),O=n(E,C,_),c=!0,O}function D(){return E=e(g,_),t.dependsOnOwnProps&&(C=t(r,_)),O=n(E,C,_),O}function B(){return e.dependsOnOwnProps&&(E=e(g,_)),t.dependsOnOwnProps&&(C=t(r,_)),O=n(E,C,_),O}function z(){var $=e(g,_),K=!u($,E);return E=$,K&&(O=n(E,C,_)),O}function k($,K){var et=!o(K,_),mt=!a($,g);return g=$,_=K,et&&mt?D():et?B():mt?z():O}return function(K,et){return c?k(K,et):R(K,et)}}function d7(e,t){var n=t.initMapStateToProps,r=t.initMapDispatchToProps,i=t.initMergeProps,a=Zp(t,["initMapStateToProps","initMapDispatchToProps","initMergeProps"]),o=n(e,a),u=r(e,a),c=i(e,a),g=a.pure?p7:h7;return g(o,u,c,e,a)}function NA(e,t,n){for(var r=t.length-1;r>=0;r--){var i=t[r](e);if(i)return i}return function(a,o){throw new Error("Invalid value of type "+typeof e+" for "+n+" argument when connecting component "+o.wrappedComponentName+".")}}function g7(e,t){return e===t}function m7(e){var t=e===void 0?{}:e,n=t.connectHOC,r=n===void 0?XW:n,i=t.mapStateToPropsFactories,a=i===void 0?a7:i,o=t.mapDispatchToPropsFactories,u=o===void 0?r7:o,c=t.mergePropsFactories,g=c===void 0?f7:c,_=t.selectorFactory,E=_===void 0?d7:_;return function(O,R,D,B){B===void 0&&(B={});var z=B,k=z.pure,$=k===void 0?!0:k,K=z.areStatesEqual,et=K===void 0?g7:K,mt=z.areOwnPropsEqual,wt=mt===void 0?RA:mt,Ot=z.areStatePropsEqual,Bt=Ot===void 0?RA:Ot,se=z.areMergedPropsEqual,_e=se===void 0?RA:se,Ne=Zp(z,["pure","areStatesEqual","areOwnPropsEqual","areStatePropsEqual","areMergedPropsEqual"]),He=NA(O,a,"mapStateToProps"),de=NA(R,u,"mapDispatchToProps"),he=NA(D,g,"mergeProps");return r(E,Vn({methodName:"connect",getDisplayName:function(Yt){return"Connect("+Yt+")"},shouldHandleStateChanges:Boolean(O),initMapStateToProps:He,initMapDispatchToProps:de,initMergeProps:he,pure:$,areStatesEqual:et,areOwnPropsEqual:wt,areStatePropsEqual:Bt,areMergedPropsEqual:_e},Ne))}}var jSt=m7();xW(i1.exports.unstable_batchedUpdates);function v7(){this.__data__=[],this.size=0}var y7=v7;function _7(e,t){return e===t||e!==e&&t!==t}var i0=_7,x7=i0;function b7(e,t){for(var n=e.length;n--;)if(x7(e[n][0],t))return n;return-1}var xC=b7,w7=xC,S7=Array.prototype,E7=S7.splice;function C7(e){var t=this.__data__,n=w7(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():E7.call(t,n,1),--this.size,!0}var I7=C7,P7=xC;function T7(e){var t=this.__data__,n=P7(t,e);return n<0?void 0:t[n][1]}var M7=T7,A7=xC;function L7(e){return A7(this.__data__,e)>-1}var O7=L7,R7=xC;function k7(e,t){var n=this.__data__,r=R7(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}var D7=k7,N7=y7,F7=I7,z7=M7,B7=O7,U7=D7;function o0(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}o0.prototype.clear=N7;o0.prototype.delete=F7;o0.prototype.get=z7;o0.prototype.has=B7;o0.prototype.set=U7;var bC=o0,V7=bC;function $7(){this.__data__=new V7,this.size=0}var j7=$7;function q7(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}var G7=q7;function W7(e){return this.__data__.get(e)}var H7=W7;function X7(e){return this.__data__.has(e)}var Y7=X7,Z7=typeof Iu=="object"&&Iu&&Iu.Object===Object&&Iu,Uz=Z7,K7=Uz,J7=typeof self=="object"&&self&&self.Object===Object&&self,Q7=K7||J7||Function("return this")(),up=Q7,tH=up,eH=tH.Symbol,a0=eH,Vz=a0,$z=Object.prototype,nH=$z.hasOwnProperty,rH=$z.toString,X1=Vz?Vz.toStringTag:void 0;function iH(e){var t=nH.call(e,X1),n=e[X1];try{e[X1]=void 0;var r=!0}catch{}var i=rH.call(e);return r&&(t?e[X1]=n:delete e[X1]),i}var oH=iH,aH=Object.prototype,sH=aH.toString;function uH(e){return sH.call(e)}var lH=uH,jz=a0,cH=oH,fH=lH,hH="[object Null]",pH="[object Undefined]",qz=jz?jz.toStringTag:void 0;function dH(e){return e==null?e===void 0?pH:hH:qz&&qz in Object(e)?cH(e):fH(e)}var Hv=dH;function gH(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var sf=gH,mH=Hv,vH=sf,yH="[object AsyncFunction]",_H="[object Function]",xH="[object GeneratorFunction]",bH="[object Proxy]";function wH(e){if(!vH(e))return!1;var t=mH(e);return t==_H||t==xH||t==yH||t==bH}var FA=wH,SH=up,EH=SH["__core-js_shared__"],CH=EH,zA=CH,Gz=function(){var e=/[^.]+$/.exec(zA&&zA.keys&&zA.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function IH(e){return!!Gz&&Gz in e}var PH=IH,TH=Function.prototype,MH=TH.toString;function AH(e){if(e!=null){try{return MH.call(e)}catch{}try{return e+""}catch{}}return""}var Wz=AH,LH=FA,OH=PH,RH=sf,kH=Wz,DH=/[\\^$.*+?()[\]{}|]/g,NH=/^\[object .+?Constructor\]$/,FH=Function.prototype,zH=Object.prototype,BH=FH.toString,UH=zH.hasOwnProperty,VH=RegExp("^"+BH.call(UH).replace(DH,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function $H(e){if(!RH(e)||OH(e))return!1;var t=LH(e)?VH:NH;return t.test(kH(e))}var jH=$H;function qH(e,t){return e==null?void 0:e[t]}var GH=qH,WH=jH,HH=GH;function XH(e,t){var n=HH(e,t);return WH(n)?n:void 0}var Xv=XH,YH=Xv,ZH=up,KH=YH(ZH,"Map"),BA=KH,JH=Xv,QH=JH(Object,"create"),wC=QH,Hz=wC;function tX(){this.__data__=Hz?Hz(null):{},this.size=0}var eX=tX;function nX(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var rX=nX,iX=wC,oX="__lodash_hash_undefined__",aX=Object.prototype,sX=aX.hasOwnProperty;function uX(e){var t=this.__data__;if(iX){var n=t[e];return n===oX?void 0:n}return sX.call(t,e)?t[e]:void 0}var lX=uX,cX=wC,fX=Object.prototype,hX=fX.hasOwnProperty;function pX(e){var t=this.__data__;return cX?t[e]!==void 0:hX.call(t,e)}var dX=pX,gX=wC,mX="__lodash_hash_undefined__";function vX(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=gX&&t===void 0?mX:t,this}var yX=vX,_X=eX,xX=rX,bX=lX,wX=dX,SX=yX;function s0(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}s0.prototype.clear=_X;s0.prototype.delete=xX;s0.prototype.get=bX;s0.prototype.has=wX;s0.prototype.set=SX;var EX=s0,Xz=EX,CX=bC,IX=BA;function PX(){this.size=0,this.__data__={hash:new Xz,map:new(IX||CX),string:new Xz}}var TX=PX;function MX(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var AX=MX,LX=AX;function OX(e,t){var n=e.__data__;return LX(t)?n[typeof t=="string"?"string":"hash"]:n.map}var SC=OX,RX=SC;function kX(e){var t=RX(this,e).delete(e);return this.size-=t?1:0,t}var DX=kX,NX=SC;function FX(e){return NX(this,e).get(e)}var zX=FX,BX=SC;function UX(e){return BX(this,e).has(e)}var VX=UX,$X=SC;function jX(e,t){var n=$X(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}var qX=jX,GX=TX,WX=DX,HX=zX,XX=VX,YX=qX;function u0(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}u0.prototype.clear=GX;u0.prototype.delete=WX;u0.prototype.get=HX;u0.prototype.has=XX;u0.prototype.set=YX;var UA=u0,ZX=bC,KX=BA,JX=UA,QX=200;function tY(e,t){var n=this.__data__;if(n instanceof ZX){var r=n.__data__;if(!KX||r.length<QX-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new JX(r)}return n.set(e,t),this.size=n.size,this}var eY=tY,nY=bC,rY=j7,iY=G7,oY=H7,aY=Y7,sY=eY;function l0(e){var t=this.__data__=new nY(e);this.size=t.size}l0.prototype.clear=rY;l0.prototype.delete=iY;l0.prototype.get=oY;l0.prototype.has=aY;l0.prototype.set=sY;var EC=l0,uY="__lodash_hash_undefined__";function lY(e){return this.__data__.set(e,uY),this}var cY=lY;function fY(e){return this.__data__.has(e)}var hY=fY,pY=UA,dY=cY,gY=hY;function CC(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new pY;++t<n;)this.add(e[t])}CC.prototype.add=CC.prototype.push=dY;CC.prototype.has=gY;var mY=CC;function vY(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}var yY=vY;function _Y(e,t){return e.has(t)}var xY=_Y,bY=mY,wY=yY,SY=xY,EY=1,CY=2;function IY(e,t,n,r,i,a){var o=n&EY,u=e.length,c=t.length;if(u!=c&&!(o&&c>u))return!1;var g=a.get(e),_=a.get(t);if(g&&_)return g==t&&_==e;var E=-1,C=!0,O=n&CY?new bY:void 0;for(a.set(e,t),a.set(t,e);++E<u;){var R=e[E],D=t[E];if(r)var B=o?r(D,R,E,t,e,a):r(R,D,E,e,t,a);if(B!==void 0){if(B)continue;C=!1;break}if(O){if(!wY(t,function(z,k){if(!SY(O,k)&&(R===z||i(R,z,n,r,a)))return O.push(k)})){C=!1;break}}else if(!(R===D||i(R,D,n,r,a))){C=!1;break}}return a.delete(e),a.delete(t),C}var Yz=IY,PY=up,TY=PY.Uint8Array,Zz=TY;function MY(e){var t=-1,n=Array(e.size);return e.forEach(function(r,i){n[++t]=[i,r]}),n}var AY=MY;function LY(e){var t=-1,n=Array(e.size);return e.forEach(function(r){n[++t]=r}),n}var OY=LY,Kz=a0,Jz=Zz,RY=i0,kY=Yz,DY=AY,NY=OY,FY=1,zY=2,BY="[object Boolean]",UY="[object Date]",VY="[object Error]",$Y="[object Map]",jY="[object Number]",qY="[object RegExp]",GY="[object Set]",WY="[object String]",HY="[object Symbol]",XY="[object ArrayBuffer]",YY="[object DataView]",Qz=Kz?Kz.prototype:void 0,VA=Qz?Qz.valueOf:void 0;function ZY(e,t,n,r,i,a,o){switch(n){case YY:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case XY:return!(e.byteLength!=t.byteLength||!a(new Jz(e),new Jz(t)));case BY:case UY:case jY:return RY(+e,+t);case VY:return e.name==t.name&&e.message==t.message;case qY:case WY:return e==t+"";case $Y:var u=DY;case GY:var c=r&FY;if(u||(u=NY),e.size!=t.size&&!c)return!1;var g=o.get(e);if(g)return g==t;r|=zY,o.set(e,t);var _=kY(u(e),u(t),r,i,a,o);return o.delete(e),_;case HY:if(VA)return VA.call(e)==VA.call(t)}return!1}var KY=ZY;function JY(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}var $A=JY,QY=Array.isArray,oh=QY,tZ=$A,eZ=oh;function nZ(e,t,n){var r=t(e);return eZ(e)?r:tZ(r,n(e))}var t3=nZ;function rZ(e,t){for(var n=-1,r=e==null?0:e.length,i=0,a=[];++n<r;){var o=e[n];t(o,n,e)&&(a[i++]=o)}return a}var iZ=rZ;function oZ(){return[]}var e3=oZ,aZ=iZ,sZ=e3,uZ=Object.prototype,lZ=uZ.propertyIsEnumerable,n3=Object.getOwnPropertySymbols,cZ=n3?function(e){return e==null?[]:(e=Object(e),aZ(n3(e),function(t){return lZ.call(e,t)}))}:sZ,jA=cZ;function fZ(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var hZ=fZ;function pZ(e){return e!=null&&typeof e=="object"}var Kp=pZ,dZ=Hv,gZ=Kp,mZ="[object Arguments]";function vZ(e){return gZ(e)&&dZ(e)==mZ}var yZ=vZ,r3=yZ,_Z=Kp,i3=Object.prototype,xZ=i3.hasOwnProperty,bZ=i3.propertyIsEnumerable,wZ=r3(function(){return arguments}())?r3:function(e){return _Z(e)&&xZ.call(e,"callee")&&!bZ.call(e,"callee")},IC=wZ,c0={exports:{}};function SZ(){return!1}var EZ=SZ;(function(e,t){var n=up,r=EZ,i=t&&!t.nodeType&&t,a=i&&!0&&e&&!e.nodeType&&e,o=a&&a.exports===i,u=o?n.Buffer:void 0,c=u?u.isBuffer:void 0,g=c||r;e.exports=g})(c0,c0.exports);var CZ=9007199254740991,IZ=/^(?:0|[1-9]\d*)$/;function PZ(e,t){var n=typeof e;return t=t==null?CZ:t,!!t&&(n=="number"||n!="symbol"&&IZ.test(e))&&e>-1&&e%1==0&&e<t}var PC=PZ,TZ=9007199254740991;function MZ(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=TZ}var qA=MZ,AZ=Hv,LZ=qA,OZ=Kp,RZ="[object Arguments]",kZ="[object Array]",DZ="[object Boolean]",NZ="[object Date]",FZ="[object Error]",zZ="[object Function]",BZ="[object Map]",UZ="[object Number]",VZ="[object Object]",$Z="[object RegExp]",jZ="[object Set]",qZ="[object String]",GZ="[object WeakMap]",WZ="[object ArrayBuffer]",HZ="[object DataView]",XZ="[object Float32Array]",YZ="[object Float64Array]",ZZ="[object Int8Array]",KZ="[object Int16Array]",JZ="[object Int32Array]",QZ="[object Uint8Array]",tK="[object Uint8ClampedArray]",eK="[object Uint16Array]",nK="[object Uint32Array]",ea={};ea[XZ]=ea[YZ]=ea[ZZ]=ea[KZ]=ea[JZ]=ea[QZ]=ea[tK]=ea[eK]=ea[nK]=!0;ea[RZ]=ea[kZ]=ea[WZ]=ea[DZ]=ea[HZ]=ea[NZ]=ea[FZ]=ea[zZ]=ea[BZ]=ea[UZ]=ea[VZ]=ea[$Z]=ea[jZ]=ea[qZ]=ea[GZ]=!1;function rK(e){return OZ(e)&&LZ(e.length)&&!!ea[AZ(e)]}var iK=rK;function oK(e){return function(t){return e(t)}}var GA=oK,Y1={exports:{}};(function(e,t){var n=Uz,r=t&&!t.nodeType&&t,i=r&&!0&&e&&!e.nodeType&&e,a=i&&i.exports===r,o=a&&n.process,u=function(){try{var c=i&&i.require&&i.require("util").types;return c||o&&o.binding&&o.binding("util")}catch{}}();e.exports=u})(Y1,Y1.exports);var aK=iK,sK=GA,o3=Y1.exports,a3=o3&&o3.isTypedArray,uK=a3?sK(a3):aK,WA=uK,lK=hZ,cK=IC,fK=oh,hK=c0.exports,pK=PC,dK=WA,gK=Object.prototype,mK=gK.hasOwnProperty;function vK(e,t){var n=fK(e),r=!n&&cK(e),i=!n&&!r&&hK(e),a=!n&&!r&&!i&&dK(e),o=n||r||i||a,u=o?lK(e.length,String):[],c=u.length;for(var g in e)(t||mK.call(e,g))&&!(o&&(g=="length"||i&&(g=="offset"||g=="parent")||a&&(g=="buffer"||g=="byteLength"||g=="byteOffset")||pK(g,c)))&&u.push(g);return u}var s3=vK,yK=Object.prototype;function _K(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||yK;return e===n}var TC=_K;function xK(e,t){return function(n){return e(t(n))}}var u3=xK,bK=u3,wK=bK(Object.keys,Object),SK=wK,EK=TC,CK=SK,IK=Object.prototype,PK=IK.hasOwnProperty;function TK(e){if(!EK(e))return CK(e);var t=[];for(var n in Object(e))PK.call(e,n)&&n!="constructor"&&t.push(n);return t}var MK=TK,AK=FA,LK=qA;function OK(e){return e!=null&&LK(e.length)&&!AK(e)}var Yv=OK,RK=s3,kK=MK,DK=Yv;function NK(e){return DK(e)?RK(e):kK(e)}var Pm=NK,FK=t3,zK=jA,BK=Pm;function UK(e){return FK(e,BK,zK)}var l3=UK,c3=l3,VK=1,$K=Object.prototype,jK=$K.hasOwnProperty;function qK(e,t,n,r,i,a){var o=n&VK,u=c3(e),c=u.length,g=c3(t),_=g.length;if(c!=_&&!o)return!1;for(var E=c;E--;){var C=u[E];if(!(o?C in t:jK.call(t,C)))return!1}var O=a.get(e),R=a.get(t);if(O&&R)return O==t&&R==e;var D=!0;a.set(e,t),a.set(t,e);for(var B=o;++E<c;){C=u[E];var z=e[C],k=t[C];if(r)var $=o?r(k,z,C,t,e,a):r(z,k,C,e,t,a);if(!($===void 0?z===k||i(z,k,n,r,a):$)){D=!1;break}B||(B=C=="constructor")}if(D&&!B){var K=e.constructor,et=t.constructor;K!=et&&"constructor"in e&&"constructor"in t&&!(typeof K=="function"&&K instanceof K&&typeof et=="function"&&et instanceof et)&&(D=!1)}return a.delete(e),a.delete(t),D}var GK=qK,WK=Xv,HK=up,XK=WK(HK,"DataView"),YK=XK,ZK=Xv,KK=up,JK=ZK(KK,"Promise"),QK=JK,tJ=Xv,eJ=up,nJ=tJ(eJ,"Set"),rJ=nJ,iJ=Xv,oJ=up,aJ=iJ(oJ,"WeakMap"),sJ=aJ,HA=YK,XA=BA,YA=QK,ZA=rJ,KA=sJ,f3=Hv,f0=Wz,h3="[object Map]",uJ="[object Object]",p3="[object Promise]",d3="[object Set]",g3="[object WeakMap]",m3="[object DataView]",lJ=f0(HA),cJ=f0(XA),fJ=f0(YA),hJ=f0(ZA),pJ=f0(KA),Zv=f3;(HA&&Zv(new HA(new ArrayBuffer(1)))!=m3||XA&&Zv(new XA)!=h3||YA&&Zv(YA.resolve())!=p3||ZA&&Zv(new ZA)!=d3||KA&&Zv(new KA)!=g3)&&(Zv=function(e){var t=f3(e),n=t==uJ?e.constructor:void 0,r=n?f0(n):"";if(r)switch(r){case lJ:return m3;case cJ:return h3;case fJ:return p3;case hJ:return d3;case pJ:return g3}return t});var MC=Zv,JA=EC,dJ=Yz,gJ=KY,mJ=GK,v3=MC,y3=oh,_3=c0.exports,vJ=WA,yJ=1,x3="[object Arguments]",b3="[object Array]",AC="[object Object]",_J=Object.prototype,w3=_J.hasOwnProperty;function xJ(e,t,n,r,i,a){var o=y3(e),u=y3(t),c=o?b3:v3(e),g=u?b3:v3(t);c=c==x3?AC:c,g=g==x3?AC:g;var _=c==AC,E=g==AC,C=c==g;if(C&&_3(e)){if(!_3(t))return!1;o=!0,_=!1}if(C&&!_)return a||(a=new JA),o||vJ(e)?dJ(e,t,n,r,i,a):gJ(e,t,c,n,r,i,a);if(!(n&yJ)){var O=_&&w3.call(e,"__wrapped__"),R=E&&w3.call(t,"__wrapped__");if(O||R){var D=O?e.value():e,B=R?t.value():t;return a||(a=new JA),i(D,B,n,r,a)}}return C?(a||(a=new JA),mJ(e,t,n,r,i,a)):!1}var bJ=xJ,wJ=bJ,S3=Kp;function E3(e,t,n,r,i){return e===t?!0:e==null||t==null||!S3(e)&&!S3(t)?e!==e&&t!==t:wJ(e,t,n,r,E3,i)}var QA=E3,SJ=QA;function EJ(e,t){return SJ(e,t)}var qSt=EJ;function C3(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=C3(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function CJ(){for(var e=0,t,n,r="";e<arguments.length;)(t=arguments[e++])&&(n=C3(t))&&(r&&(r+=" "),r+=n);return r}var tL={exports:{}},I3=function(t,n){return function(){for(var i=new Array(arguments.length),a=0;a<i.length;a++)i[a]=arguments[a];return t.apply(n,i)}},IJ=I3,Kv=Object.prototype.toString;function eL(e){return Kv.call(e)==="[object Array]"}function nL(e){return typeof e=="undefined"}function PJ(e){return e!==null&&!nL(e)&&e.constructor!==null&&!nL(e.constructor)&&typeof e.constructor.isBuffer=="function"&&e.constructor.isBuffer(e)}function TJ(e){return Kv.call(e)==="[object ArrayBuffer]"}function MJ(e){return typeof FormData!="undefined"&&e instanceof FormData}function AJ(e){var t;return typeof ArrayBuffer!="undefined"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&e.buffer instanceof ArrayBuffer,t}function LJ(e){return typeof e=="string"}function OJ(e){return typeof e=="number"}function P3(e){return e!==null&&typeof e=="object"}function LC(e){if(Kv.call(e)!=="[object Object]")return!1;var t=Object.getPrototypeOf(e);return t===null||t===Object.prototype}function RJ(e){return Kv.call(e)==="[object Date]"}function kJ(e){return Kv.call(e)==="[object File]"}function DJ(e){return Kv.call(e)==="[object Blob]"}function T3(e){return Kv.call(e)==="[object Function]"}function NJ(e){return P3(e)&&T3(e.pipe)}function FJ(e){return typeof URLSearchParams!="undefined"&&e instanceof URLSearchParams}function zJ(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function BJ(){return typeof navigator!="undefined"&&(navigator.product==="ReactNative"||navigator.product==="NativeScript"||navigator.product==="NS")?!1:typeof window!="undefined"&&typeof document!="undefined"}function rL(e,t){if(!(e===null||typeof e=="undefined"))if(typeof e!="object"&&(e=[e]),eL(e))for(var n=0,r=e.length;n<r;n++)t.call(null,e[n],n,e);else for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.call(null,e[i],i,e)}function iL(){var e={};function t(i,a){LC(e[a])&&LC(i)?e[a]=iL(e[a],i):LC(i)?e[a]=iL({},i):eL(i)?e[a]=i.slice():e[a]=i}for(var n=0,r=arguments.length;n<r;n++)rL(arguments[n],t);return e}function UJ(e,t,n){return rL(t,function(i,a){n&&typeof i=="function"?e[a]=IJ(i,n):e[a]=i}),e}function VJ(e){return e.charCodeAt(0)===65279&&(e=e.slice(1)),e}var uf={isArray:eL,isArrayBuffer:TJ,isBuffer:PJ,isFormData:MJ,isArrayBufferView:AJ,isString:LJ,isNumber:OJ,isObject:P3,isPlainObject:LC,isUndefined:nL,isDate:RJ,isFile:kJ,isBlob:DJ,isFunction:T3,isStream:NJ,isURLSearchParams:FJ,isStandardBrowserEnv:BJ,forEach:rL,merge:iL,extend:UJ,trim:zJ,stripBOM:VJ},h0=uf;function M3(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}var A3=function(t,n,r){if(!n)return t;var i;if(r)i=r(n);else if(h0.isURLSearchParams(n))i=n.toString();else{var a=[];h0.forEach(n,function(c,g){c===null||typeof c=="undefined"||(h0.isArray(c)?g=g+"[]":c=[c],h0.forEach(c,function(E){h0.isDate(E)?E=E.toISOString():h0.isObject(E)&&(E=JSON.stringify(E)),a.push(M3(g)+"="+M3(E))}))}),i=a.join("&")}if(i){var o=t.indexOf("#");o!==-1&&(t=t.slice(0,o)),t+=(t.indexOf("?")===-1?"?":"&")+i}return t},$J=uf;function OC(){this.handlers=[]}OC.prototype.use=function(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1};OC.prototype.eject=function(t){this.handlers[t]&&(this.handlers[t]=null)};OC.prototype.forEach=function(t){$J.forEach(this.handlers,function(r){r!==null&&t(r)})};var jJ=OC,qJ=uf,GJ=function(t,n){qJ.forEach(t,function(i,a){a!==n&&a.toUpperCase()===n.toUpperCase()&&(t[n]=i,delete t[a])})},L3=function(t,n,r,i,a){return t.config=n,r&&(t.code=r),t.request=i,t.response=a,t.isAxiosError=!0,t.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code,status:this.response&&this.response.status?this.response.status:null}},t},WJ=L3,O3=function(t,n,r,i,a){var o=new Error(t);return WJ(o,n,r,i,a)},HJ=O3,XJ=function(t,n,r){var i=r.config.validateStatus;!r.status||!i||i(r.status)?t(r):n(HJ("Request failed with status code "+r.status,r.config,null,r.request,r))},RC=uf,YJ=RC.isStandardBrowserEnv()?function(){return{write:function(n,r,i,a,o,u){var c=[];c.push(n+"="+encodeURIComponent(r)),RC.isNumber(i)&&c.push("expires="+new Date(i).toGMTString()),RC.isString(a)&&c.push("path="+a),RC.isString(o)&&c.push("domain="+o),u===!0&&c.push("secure"),document.cookie=c.join("; ")},read:function(n){var r=document.cookie.match(new RegExp("(^|;\\s*)("+n+")=([^;]*)"));return r?decodeURIComponent(r[3]):null},remove:function(n){this.write(n,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}(),ZJ=function(t){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(t)},KJ=function(t,n){return n?t.replace(/\/+$/,"")+"/"+n.replace(/^\/+/,""):t},JJ=ZJ,QJ=KJ,tQ=function(t,n){return t&&!JJ(n)?QJ(t,n):n},oL=uf,eQ=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"],nQ=function(t){var n={},r,i,a;return t&&oL.forEach(t.split(` `),function(u){if(a=u.indexOf(":"),r=oL.trim(u.substr(0,a)).toLowerCase(),i=oL.trim(u.substr(a+1)),r){if(n[r]&&eQ.indexOf(r)>=0)return;r==="set-cookie"?n[r]=(n[r]?n[r]:[]).concat([i]):n[r]=n[r]?n[r]+", "+i:i}}),n},R3=uf,rQ=R3.isStandardBrowserEnv()?function(){var t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a"),r;function i(a){var o=a;return t&&(n.setAttribute("href",o),o=n.href),n.setAttribute("href",o),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return r=i(window.location.href),function(o){var u=R3.isString(o)?i(o):o;return u.protocol===r.protocol&&u.host===r.host}}():function(){return function(){return!0}}();function aL(e){this.message=e}aL.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")};aL.prototype.__CANCEL__=!0;var kC=aL,DC=uf,iQ=XJ,oQ=YJ,aQ=A3,sQ=tQ,uQ=nQ,lQ=rQ,sL=O3,cQ=FC,fQ=kC,k3=function(t){return new Promise(function(r,i){var a=t.data,o=t.headers,u=t.responseType,c;function g(){t.cancelToken&&t.cancelToken.unsubscribe(c),t.signal&&t.signal.removeEventListener("abort",c)}DC.isFormData(a)&&delete o["Content-Type"];var _=new XMLHttpRequest;if(t.auth){var E=t.auth.username||"",C=t.auth.password?unescape(encodeURIComponent(t.auth.password)):"";o.Authorization="Basic "+btoa(E+":"+C)}var O=sQ(t.baseURL,t.url);_.open(t.method.toUpperCase(),aQ(O,t.params,t.paramsSerializer),!0),_.timeout=t.timeout;function R(){if(!!_){var B="getAllResponseHeaders"in _?uQ(_.getAllResponseHeaders()):null,z=!u||u==="text"||u==="json"?_.responseText:_.response,k={data:z,status:_.status,statusText:_.statusText,headers:B,config:t,request:_};iQ(function(K){r(K),g()},function(K){i(K),g()},k),_=null}}if("onloadend"in _?_.onloadend=R:_.onreadystatechange=function(){!_||_.readyState!==4||_.status===0&&!(_.responseURL&&_.responseURL.indexOf("file:")===0)||setTimeout(R)},_.onabort=function(){!_||(i(sL("Request aborted",t,"ECONNABORTED",_)),_=null)},_.onerror=function(){i(sL("Network Error",t,null,_)),_=null},_.ontimeout=function(){var z=t.timeout?"timeout of "+t.timeout+"ms exceeded":"timeout exceeded",k=t.transitional||cQ.transitional;t.timeoutErrorMessage&&(z=t.timeoutErrorMessage),i(sL(z,t,k.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",_)),_=null},DC.isStandardBrowserEnv()){var D=(t.withCredentials||lQ(O))&&t.xsrfCookieName?oQ.read(t.xsrfCookieName):void 0;D&&(o[t.xsrfHeaderName]=D)}"setRequestHeader"in _&&DC.forEach(o,function(z,k){typeof a=="undefined"&&k.toLowerCase()==="content-type"?delete o[k]:_.setRequestHeader(k,z)}),DC.isUndefined(t.withCredentials)||(_.withCredentials=!!t.withCredentials),u&&u!=="json"&&(_.responseType=t.responseType),typeof t.onDownloadProgress=="function"&&_.addEventListener("progress",t.onDownloadProgress),typeof t.onUploadProgress=="function"&&_.upload&&_.upload.addEventListener("progress",t.onUploadProgress),(t.cancelToken||t.signal)&&(c=function(B){!_||(i(!B||B&&B.type?new fQ("canceled"):B),_.abort(),_=null)},t.cancelToken&&t.cancelToken.subscribe(c),t.signal&&(t.signal.aborted?c():t.signal.addEventListener("abort",c))),a||(a=null),_.send(a)})},Lu=uf,D3=GJ,hQ=L3,pQ={"Content-Type":"application/x-www-form-urlencoded"};function N3(e,t){!Lu.isUndefined(e)&&Lu.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}function dQ(){var e;return(typeof XMLHttpRequest!="undefined"||typeof process!="undefined"&&Object.prototype.toString.call(process)==="[object process]")&&(e=k3),e}function gQ(e,t,n){if(Lu.isString(e))try{return(t||JSON.parse)(e),Lu.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}var NC={transitional:{silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},adapter:dQ(),transformRequest:[function(t,n){return D3(n,"Accept"),D3(n,"Content-Type"),Lu.isFormData(t)||Lu.isArrayBuffer(t)||Lu.isBuffer(t)||Lu.isStream(t)||Lu.isFile(t)||Lu.isBlob(t)?t:Lu.isArrayBufferView(t)?t.buffer:Lu.isURLSearchParams(t)?(N3(n,"application/x-www-form-urlencoded;charset=utf-8"),t.toString()):Lu.isObject(t)||n&&n["Content-Type"]==="application/json"?(N3(n,"application/json"),gQ(t)):t}],transformResponse:[function(t){var n=this.transitional||NC.transitional,r=n&&n.silentJSONParsing,i=n&&n.forcedJSONParsing,a=!r&&this.responseType==="json";if(a||i&&Lu.isString(t)&&t.length)try{return JSON.parse(t)}catch(o){if(a)throw o.name==="SyntaxError"?hQ(o,this,"E_JSON_PARSE"):o}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};Lu.forEach(["delete","get","head"],function(t){NC.headers[t]={}});Lu.forEach(["post","put","patch"],function(t){NC.headers[t]=Lu.merge(pQ)});var FC=NC,mQ=uf,vQ=FC,yQ=function(t,n,r){var i=this||vQ;return mQ.forEach(r,function(o){t=o.call(i,t,n)}),t},F3=function(t){return!!(t&&t.__CANCEL__)},z3=uf,uL=yQ,_Q=F3,xQ=FC,bQ=kC;function lL(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new bQ("canceled")}var wQ=function(t){lL(t),t.headers=t.headers||{},t.data=uL.call(t,t.data,t.headers,t.transformRequest),t.headers=z3.merge(t.headers.common||{},t.headers[t.method]||{},t.headers),z3.forEach(["delete","get","head","post","put","patch","common"],function(i){delete t.headers[i]});var n=t.adapter||xQ.adapter;return n(t).then(function(i){return lL(t),i.data=uL.call(t,i.data,i.headers,t.transformResponse),i},function(i){return _Q(i)||(lL(t),i&&i.response&&(i.response.data=uL.call(t,i.response.data,i.response.headers,t.transformResponse))),Promise.reject(i)})},lf=uf,B3=function(t,n){n=n||{};var r={};function i(_,E){return lf.isPlainObject(_)&&lf.isPlainObject(E)?lf.merge(_,E):lf.isPlainObject(E)?lf.merge({},E):lf.isArray(E)?E.slice():E}function a(_){if(lf.isUndefined(n[_])){if(!lf.isUndefined(t[_]))return i(void 0,t[_])}else return i(t[_],n[_])}function o(_){if(!lf.isUndefined(n[_]))return i(void 0,n[_])}function u(_){if(lf.isUndefined(n[_])){if(!lf.isUndefined(t[_]))return i(void 0,t[_])}else return i(void 0,n[_])}function c(_){if(_ in n)return i(t[_],n[_]);if(_ in t)return i(void 0,t[_])}var g={url:o,method:o,data:o,baseURL:u,transformRequest:u,transformResponse:u,paramsSerializer:u,timeout:u,timeoutMessage:u,withCredentials:u,adapter:u,responseType:u,xsrfCookieName:u,xsrfHeaderName:u,onUploadProgress:u,onDownloadProgress:u,decompress:u,maxContentLength:u,maxBodyLength:u,transport:u,httpAgent:u,httpsAgent:u,cancelToken:u,socketPath:u,responseEncoding:u,validateStatus:c};return lf.forEach(Object.keys(t).concat(Object.keys(n)),function(E){var C=g[E]||a,O=C(E);lf.isUndefined(O)&&C!==c||(r[E]=O)}),r},U3={version:"0.23.0"},SQ=U3.version,cL={};["object","boolean","number","function","string","symbol"].forEach(function(e,t){cL[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});var V3={};cL.transitional=function(t,n,r){function i(a,o){return"[Axios v"+SQ+"] Transitional option '"+a+"'"+o+(r?". "+r:"")}return function(a,o,u){if(t===!1)throw new Error(i(o," has been removed"+(n?" in "+n:"")));return n&&!V3[o]&&(V3[o]=!0,console.warn(i(o," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(a,o,u):!0}};function EQ(e,t,n){if(typeof e!="object")throw new TypeError("options must be an object");for(var r=Object.keys(e),i=r.length;i-- >0;){var a=r[i],o=t[a];if(o){var u=e[a],c=u===void 0||o(u,a,e);if(c!==!0)throw new TypeError("option "+a+" must be "+c);continue}if(n!==!0)throw Error("Unknown option "+a)}}var CQ={assertOptions:EQ,validators:cL},$3=uf,IQ=A3,j3=jJ,q3=wQ,zC=B3,G3=CQ,p0=G3.validators;function Z1(e){this.defaults=e,this.interceptors={request:new j3,response:new j3}}Z1.prototype.request=function(t){typeof t=="string"?(t=arguments[1]||{},t.url=arguments[0]):t=t||{},t=zC(this.defaults,t),t.method?t.method=t.method.toLowerCase():this.defaults.method?t.method=this.defaults.method.toLowerCase():t.method="get";var n=t.transitional;n!==void 0&&G3.assertOptions(n,{silentJSONParsing:p0.transitional(p0.boolean),forcedJSONParsing:p0.transitional(p0.boolean),clarifyTimeoutError:p0.transitional(p0.boolean)},!1);var r=[],i=!0;this.interceptors.request.forEach(function(C){typeof C.runWhen=="function"&&C.runWhen(t)===!1||(i=i&&C.synchronous,r.unshift(C.fulfilled,C.rejected))});var a=[];this.interceptors.response.forEach(function(C){a.push(C.fulfilled,C.rejected)});var o;if(!i){var u=[q3,void 0];for(Array.prototype.unshift.apply(u,r),u=u.concat(a),o=Promise.resolve(t);u.length;)o=o.then(u.shift(),u.shift());return o}for(var c=t;r.length;){var g=r.shift(),_=r.shift();try{c=g(c)}catch(E){_(E);break}}try{o=q3(c)}catch(E){return Promise.reject(E)}for(;a.length;)o=o.then(a.shift(),a.shift());return o};Z1.prototype.getUri=function(t){return t=zC(this.defaults,t),IQ(t.url,t.params,t.paramsSerializer).replace(/^\?/,"")};$3.forEach(["delete","get","head","options"],function(t){Z1.prototype[t]=function(n,r){return this.request(zC(r||{},{method:t,url:n,data:(r||{}).data}))}});$3.forEach(["post","put","patch"],function(t){Z1.prototype[t]=function(n,r,i){return this.request(zC(i||{},{method:t,url:n,data:r}))}});var PQ=Z1,TQ=kC;function d0(e){if(typeof e!="function")throw new TypeError("executor must be a function.");var t;this.promise=new Promise(function(i){t=i});var n=this;this.promise.then(function(r){if(!!n._listeners){var i,a=n._listeners.length;for(i=0;i<a;i++)n._listeners[i](r);n._listeners=null}}),this.promise.then=function(r){var i,a=new Promise(function(o){n.subscribe(o),i=o}).then(r);return a.cancel=function(){n.unsubscribe(i)},a},e(function(i){n.reason||(n.reason=new TQ(i),t(n.reason))})}d0.prototype.throwIfRequested=function(){if(this.reason)throw this.reason};d0.prototype.subscribe=function(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]};d0.prototype.unsubscribe=function(t){if(!!this._listeners){var n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}};d0.source=function(){var t,n=new d0(function(i){t=i});return{token:n,cancel:t}};var MQ=d0,AQ=function(t){return function(r){return t.apply(null,r)}},LQ=function(t){return typeof t=="object"&&t.isAxiosError===!0},W3=uf,OQ=I3,BC=PQ,RQ=B3,kQ=FC;function H3(e){var t=new BC(e),n=OQ(BC.prototype.request,t);return W3.extend(n,BC.prototype,t),W3.extend(n,t),n.create=function(i){return H3(RQ(e,i))},n}var Jp=H3(kQ);Jp.Axios=BC;Jp.Cancel=kC;Jp.CancelToken=MQ;Jp.isCancel=F3;Jp.VERSION=U3.version;Jp.all=function(t){return Promise.all(t)};Jp.spread=AQ;Jp.isAxiosError=LQ;tL.exports=Jp;tL.exports.default=Jp;var GSt=tL.exports,DQ=Hv,NQ=Kp,FQ="[object Symbol]";function zQ(e){return typeof e=="symbol"||NQ(e)&&DQ(e)==FQ}var UC=zQ,BQ=oh,UQ=UC,VQ=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,$Q=/^\w*$/;function jQ(e,t){if(BQ(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||UQ(e)?!0:$Q.test(e)||!VQ.test(e)||t!=null&&e in Object(t)}var fL=jQ,X3=UA,qQ="Expected a function";function hL(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(qQ);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],a=n.cache;if(a.has(i))return a.get(i);var o=e.apply(this,r);return n.cache=a.set(i,o)||a,o};return n.cache=new(hL.Cache||X3),n}hL.Cache=X3;var GQ=hL,WQ=GQ,HQ=500;function XQ(e){var t=WQ(e,function(r){return n.size===HQ&&n.clear(),r}),n=t.cache;return t}var YQ=XQ,ZQ=YQ,KQ=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,JQ=/\\(\\)?/g,QQ=ZQ(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(KQ,function(n,r,i,a){t.push(i?a.replace(JQ,"$1"):r||n)}),t}),ttt=QQ;function ett(e,t){for(var n=-1,r=e==null?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}var VC=ett,Y3=a0,ntt=VC,rtt=oh,itt=UC,ott=1/0,Z3=Y3?Y3.prototype:void 0,K3=Z3?Z3.toString:void 0;function J3(e){if(typeof e=="string")return e;if(rtt(e))return ntt(e,J3)+"";if(itt(e))return K3?K3.call(e):"";var t=e+"";return t=="0"&&1/e==-ott?"-0":t}var att=J3,stt=att;function utt(e){return e==null?"":stt(e)}var pL=utt,ltt=oh,ctt=fL,ftt=ttt,htt=pL;function ptt(e,t){return ltt(e)?e:ctt(e,t)?[e]:ftt(htt(e))}var g0=ptt,dtt=UC,gtt=1/0;function mtt(e){if(typeof e=="string"||dtt(e))return e;var t=e+"";return t=="0"&&1/e==-gtt?"-0":t}var m0=mtt,vtt=g0,ytt=m0;function _tt(e,t){t=vtt(t,e);for(var n=0,r=t.length;e!=null&&n<r;)e=e[ytt(t[n++])];return n&&n==r?e:void 0}var $C=_tt,xtt=$C;function btt(e,t,n){var r=e==null?void 0:xtt(e,t);return r===void 0?n:r}var wtt=btt;function Q3(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function Stt(e){return e.length===1&&(e=Ett(e)),{left:function(t,n,r,i){for(r==null&&(r=0),i==null&&(i=t.length);r<i;){var a=r+i>>>1;e(t[a],n)<0?r=a+1:i=a}return r},right:function(t,n,r,i){for(r==null&&(r=0),i==null&&(i=t.length);r<i;){var a=r+i>>>1;e(t[a],n)>0?i=a:r=a+1}return r}}}function Ett(e){return function(t,n){return Q3(e(t),n)}}var Ctt=Stt(Q3),Itt=Ctt.right;function Ptt(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}var ah="$";function jC(){}jC.prototype=tB.prototype={constructor:jC,has:function(e){return ah+e in this},get:function(e){return this[ah+e]},set:function(e,t){return this[ah+e]=t,this},remove:function(e){var t=ah+e;return t in this&&delete this[t]},clear:function(){for(var e in this)e[0]===ah&&delete this[e]},keys:function(){var e=[];for(var t in this)t[0]===ah&&e.push(t.slice(1));return e},values:function(){var e=[];for(var t in this)t[0]===ah&&e.push(this[t]);return e},entries:function(){var e=[];for(var t in this)t[0]===ah&&e.push({key:t.slice(1),value:this[t]});return e},size:function(){var e=0;for(var t in this)t[0]===ah&&++e;return e},empty:function(){for(var e in this)if(e[0]===ah)return!1;return!0},each:function(e){for(var t in this)t[0]===ah&&e(this[t],t.slice(1),this)}};function tB(e,t){var n=new jC;if(e instanceof jC)e.each(function(u,c){n.set(c,u)});else if(Array.isArray(e)){var r=-1,i=e.length,a;if(t==null)for(;++r<i;)n.set(r,e[r]);else for(;++r<i;)n.set(t(a=e[r],r,e),a)}else if(e)for(var o in e)n.set(o,e[o]);return n}function eB(){}var Jv=tB.prototype;eB.prototype={constructor:eB,has:Jv.has,add:function(e){return e+="",this[ah+e]=e,this},remove:Jv.remove,clear:Jv.clear,values:Jv.keys,size:Jv.size,empty:Jv.empty,each:Jv.each};var Ttt=Array.prototype,nB=Ttt.slice;function dL(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function rB(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function K1(){}var J1=.7,qC=1/J1,v0="\\s*([+-]?\\d+)\\s*",Q1="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",Qp="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Mtt=/^#([0-9a-f]{3,8})$/,Att=new RegExp("^rgb\\("+[v0,v0,v0]+"\\)$"),Ltt=new RegExp("^rgb\\("+[Qp,Qp,Qp]+"\\)$"),Ott=new RegExp("^rgba\\("+[v0,v0,v0,Q1]+"\\)$"),Rtt=new RegExp("^rgba\\("+[Qp,Qp,Qp,Q1]+"\\)$"),ktt=new RegExp("^hsl\\("+[Q1,Qp,Qp]+"\\)$"),Dtt=new RegExp("^hsla\\("+[Q1,Qp,Qp,Q1]+"\\)$"),iB={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};dL(K1,gL,{copy:function(e){return Object.assign(new this.constructor,this,e)},displayable:function(){return this.rgb().displayable()},hex:oB,formatHex:oB,formatHsl:Ntt,formatRgb:aB,toString:aB});function oB(){return this.rgb().formatHex()}function Ntt(){return fB(this).formatHsl()}function aB(){return this.rgb().formatRgb()}function gL(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=Mtt.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?sB(t):n===3?new cf(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?GC(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?GC(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=Att.exec(e))?new cf(t[1],t[2],t[3],1):(t=Ltt.exec(e))?new cf(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=Ott.exec(e))?GC(t[1],t[2],t[3],t[4]):(t=Rtt.exec(e))?GC(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=ktt.exec(e))?cB(t[1],t[2]/100,t[3]/100,1):(t=Dtt.exec(e))?cB(t[1],t[2]/100,t[3]/100,t[4]):iB.hasOwnProperty(e)?sB(iB[e]):e==="transparent"?new cf(NaN,NaN,NaN,0):null}function sB(e){return new cf(e>>16&255,e>>8&255,e&255,1)}function GC(e,t,n,r){return r<=0&&(e=t=n=NaN),new cf(e,t,n,r)}function Ftt(e){return e instanceof K1||(e=gL(e)),e?(e=e.rgb(),new cf(e.r,e.g,e.b,e.opacity)):new cf}function WC(e,t,n,r){return arguments.length===1?Ftt(e):new cf(e,t,n,r==null?1:r)}function cf(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}dL(cf,WC,rB(K1,{brighter:function(e){return e=e==null?qC:Math.pow(qC,e),new cf(this.r*e,this.g*e,this.b*e,this.opacity)},darker:function(e){return e=e==null?J1:Math.pow(J1,e),new cf(this.r*e,this.g*e,this.b*e,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:uB,formatHex:uB,formatRgb:lB,toString:lB}));function uB(){return"#"+mL(this.r)+mL(this.g)+mL(this.b)}function lB(){var e=this.opacity;return e=isNaN(e)?1:Math.max(0,Math.min(1,e)),(e===1?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(e===1?")":", "+e+")")}function mL(e){return e=Math.max(0,Math.min(255,Math.round(e)||0)),(e<16?"0":"")+e.toString(16)}function cB(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new td(e,t,n,r)}function fB(e){if(e instanceof td)return new td(e.h,e.s,e.l,e.opacity);if(e instanceof K1||(e=gL(e)),!e)return new td;if(e instanceof td)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),a=Math.max(t,n,r),o=NaN,u=a-i,c=(a+i)/2;return u?(t===a?o=(n-r)/u+(n<r)*6:n===a?o=(r-t)/u+2:o=(t-n)/u+4,u/=c<.5?a+i:2-a-i,o*=60):u=c>0&&c<1?0:o,new td(o,u,c,e.opacity)}function ztt(e,t,n,r){return arguments.length===1?fB(e):new td(e,t,n,r==null?1:r)}function td(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}dL(td,ztt,rB(K1,{brighter:function(e){return e=e==null?qC:Math.pow(qC,e),new td(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=e==null?J1:Math.pow(J1,e),new td(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new cf(vL(e>=240?e-240:e+120,i,r),vL(e,i,r),vL(e<120?e+240:e-120,i,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var e=this.opacity;return e=isNaN(e)?1:Math.max(0,Math.min(1,e)),(e===1?"hsl(":"hsla(")+(this.h||0)+", "+(this.s||0)*100+"%, "+(this.l||0)*100+"%"+(e===1?")":", "+e+")")}}));function vL(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}function Btt(e,t,n,r,i){var a=e*e,o=a*e;return((1-3*e+3*a-o)*t+(4-6*a+3*o)*n+(1+3*e+3*a-3*o)*r+o*i)/6}function Utt(e){var t=e.length-1;return function(n){var r=n<=0?n=0:n>=1?(n=1,t-1):Math.floor(n*t),i=e[r],a=e[r+1],o=r>0?e[r-1]:2*i-a,u=r<t-1?e[r+2]:2*a-i;return Btt((n-r/t)*t,o,i,a,u)}}function hB(e){return function(){return e}}function Vtt(e,t){return function(n){return e+n*t}}function $tt(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}function jtt(e){return(e=+e)==1?pB:function(t,n){return n-t?$tt(t,n,e):hB(isNaN(t)?n:t)}}function pB(e,t){var n=t-e;return n?Vtt(e,n):hB(isNaN(e)?t:e)}(function e(t){var n=jtt(t);function r(i,a){var o=n((i=WC(i)).r,(a=WC(a)).r),u=n(i.g,a.g),c=n(i.b,a.b),g=pB(i.opacity,a.opacity);return function(_){return i.r=o(_),i.g=u(_),i.b=c(_),i.opacity=g(_),i+""}}return r.gamma=e,r})(1);function qtt(e){return function(t){var n=t.length,r=new Array(n),i=new Array(n),a=new Array(n),o,u;for(o=0;o<n;++o)u=WC(t[o]),r[o]=u.r||0,i[o]=u.g||0,a[o]=u.b||0;return r=e(r),i=e(i),a=e(a),u.opacity=1,function(c){return u.r=r(c),u.g=i(c),u.b=a(c),u+""}}}var Gtt=qtt(Utt);function Wtt(){var e=[.5],t=[0,1],n,r=1;function i(a){return a<=a?t[Itt(e,a,0,r)]:n}return i.domain=function(a){return arguments.length?(e=nB.call(a),r=Math.min(e.length,t.length-1),i):e.slice()},i.range=function(a){return arguments.length?(t=nB.call(a),r=Math.min(e.length,t.length-1),i):t.slice()},i.invertExtent=function(a){var o=t.indexOf(a);return[e[o-1],e[o]]},i.unknown=function(a){return arguments.length?(n=a,i):n},i.copy=function(){return Wtt().domain(e).range(t).unknown(n)},Ptt.apply(i,arguments)}function dB(e){for(var t=e.length/6|0,n=new Array(t),r=0;r<t;)n[r]="#"+e.slice(r*6,++r*6);return n}var WSt=dB("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928");function Htt(e){return Gtt(e[e.length-1])}var Xtt=new Array(3).concat("deebf79ecae13182bd","eff3ffbdd7e76baed62171b5","eff3ffbdd7e76baed63182bd08519c","eff3ffc6dbef9ecae16baed63182bd08519c","eff3ffc6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b").map(dB);Htt(Xtt);/*! * Chart.js v3.9.1 * https://www.chartjs.org * (c) 2022 Chart.js Contributors * Released under the MIT License */function ig(){}const Ytt=function(){let e=0;return function(){return e++}}();function Di(e){return e===null||typeof e=="undefined"}function Fo(e){if(Array.isArray&&Array.isArray(e))return!0;const t=Object.prototype.toString.call(e);return t.slice(0,7)==="[object"&&t.slice(-6)==="Array]"}function _i(e){return e!==null&&Object.prototype.toString.call(e)==="[object Object]"}const rs=e=>(typeof e=="number"||e instanceof Number)&&isFinite(+e);function sh(e,t){return rs(e)?e:t}function Hr(e,t){return typeof e=="undefined"?t:e}const Ztt=(e,t)=>typeof e=="string"&&e.endsWith("%")?parseFloat(e)/100:e/t,gB=(e,t)=>typeof e=="string"&&e.endsWith("%")?parseFloat(e)/100*t:+e;function zo(e,t,n){if(e&&typeof e.call=="function")return e.apply(n,t)}function ho(e,t,n,r){let i,a,o;if(Fo(e))if(a=e.length,r)for(i=a-1;i>=0;i--)t.call(n,e[i],i);else for(i=0;i<a;i++)t.call(n,e[i],i);else if(_i(e))for(o=Object.keys(e),a=o.length,i=0;i<a;i++)t.call(n,e[o[i]],o[i])}function HC(e,t){let n,r,i,a;if(!e||!t||e.length!==t.length)return!1;for(n=0,r=e.length;n<r;++n)if(i=e[n],a=t[n],i.datasetIndex!==a.datasetIndex||i.index!==a.index)return!1;return!0}function XC(e){if(Fo(e))return e.map(XC);if(_i(e)){const t=Object.create(null),n=Object.keys(e),r=n.length;let i=0;for(;i<r;++i)t[n[i]]=XC(e[n[i]]);return t}return e}function mB(e){return["__proto__","prototype","constructor"].indexOf(e)===-1}function Ktt(e,t,n,r){if(!mB(e))return;const i=t[e],a=n[e];_i(i)&&_i(a)?tb(i,a,r):t[e]=XC(a)}function tb(e,t,n){const r=Fo(t)?t:[t],i=r.length;if(!_i(e))return e;n=n||{};const a=n.merger||Ktt;for(let o=0;o<i;++o){if(t=r[o],!_i(t))continue;const u=Object.keys(t);for(let c=0,g=u.length;c<g;++c)a(u[c],e,t,n)}return e}function eb(e,t){return tb(e,t,{merger:Jtt})}function Jtt(e,t,n){if(!mB(e))return;const r=t[e],i=n[e];_i(r)&&_i(i)?eb(r,i):Object.prototype.hasOwnProperty.call(t,e)||(t[e]=XC(i))}const vB={"":e=>e,x:e=>e.x,y:e=>e.y};function Tm(e,t){return(vB[t]||(vB[t]=Qtt(t)))(e)}function Qtt(e){const t=tet(e);return n=>{for(const r of t){if(r==="")break;n=n&&n[r]}return n}}function tet(e){const t=e.split("."),n=[];let r="";for(const i of t)r+=i,r.endsWith("\\")?r=r.slice(0,-1)+".":(n.push(r),r="");return n}function yL(e){return e.charAt(0).toUpperCase()+e.slice(1)}const uh=e=>typeof e!="undefined",Mm=e=>typeof e=="function",yB=(e,t)=>{if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0};function eet(e){return e.type==="mouseup"||e.type==="click"||e.type==="contextmenu"}const pa=Math.PI,xo=2*pa,net=xo+pa,YC=Number.POSITIVE_INFINITY,ret=pa/180,ja=pa/2,nb=pa/4,_B=pa*2/3,lh=Math.log10,ed=Math.sign;function xB(e){const t=Math.round(e);e=rb(e,t,e/1e3)?t:e;const n=Math.pow(10,Math.floor(lh(e))),r=e/n;return(r<=1?1:r<=2?2:r<=5?5:10)*n}function iet(e){const t=[],n=Math.sqrt(e);let r;for(r=1;r<n;r++)e%r==0&&(t.push(r),t.push(e/r));return n===(n|0)&&t.push(n),t.sort((i,a)=>i-a).pop(),t}function y0(e){return!isNaN(parseFloat(e))&&isFinite(e)}function rb(e,t,n){return Math.abs(e-t)<n}function oet(e,t){const n=Math.round(e);return n-t<=e&&n+t>=e}function bB(e,t,n){let r,i,a;for(r=0,i=e.length;r<i;r++)a=e[r][n],isNaN(a)||(t.min=Math.min(t.min,a),t.max=Math.max(t.max,a))}function lp(e){return e*(pa/180)}function _L(e){return e*(180/pa)}function wB(e){if(!rs(e))return;let t=1,n=0;for(;Math.round(e*t)/t!==e;)t*=10,n++;return n}function SB(e,t){const n=t.x-e.x,r=t.y-e.y,i=Math.sqrt(n*n+r*r);let a=Math.atan2(r,n);return a<-.5*pa&&(a+=xo),{angle:a,distance:i}}function xL(e,t){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}function aet(e,t){return(e-t+net)%xo-pa}function ff(e){return(e%xo+xo)%xo}function ib(e,t,n,r){const i=ff(e),a=ff(t),o=ff(n),u=ff(a-i),c=ff(o-i),g=ff(i-a),_=ff(i-o);return i===a||i===o||r&&a===o||u>c&&g<_}function au(e,t,n){return Math.max(t,Math.min(n,e))}function set(e){return au(e,-32768,32767)}function og(e,t,n,r=1e-6){return e>=Math.min(t,n)-r&&e<=Math.max(t,n)+r}function bL(e,t,n){n=n||(o=>e[o]<t);let r=e.length-1,i=0,a;for(;r-i>1;)a=i+r>>1,n(a)?i=a:r=a;return{lo:i,hi:r}}const ag=(e,t,n,r)=>bL(e,n,r?i=>e[i][t]<=n:i=>e[i][t]<n),uet=(e,t,n)=>bL(e,n,r=>e[r][t]>=n);function cet(e,t,n){let r=0,i=e.length;for(;r<i&&e[r]<t;)r++;for(;i>r&&e[i-1]>n;)i--;return r>0||i<e.length?e.slice(r,i):e}const EB=["push","pop","shift","splice","unshift"];function fet(e,t){if(e._chartjs){e._chartjs.listeners.push(t);return}Object.defineProperty(e,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[t]}}),EB.forEach(n=>{const r="_onData"+yL(n),i=e[n];Object.defineProperty(e,n,{configurable:!0,enumerable:!1,value(...a){const o=i.apply(this,a);return e._chartjs.listeners.forEach(u=>{typeof u[r]=="function"&&u[r](...a)}),o}})})}function CB(e,t){const n=e._chartjs;if(!n)return;const r=n.listeners,i=r.indexOf(t);i!==-1&&r.splice(i,1),!(r.length>0)&&(EB.forEach(a=>{delete e[a]}),delete e._chartjs)}function IB(e){const t=new Set;let n,r;for(n=0,r=e.length;n<r;++n)t.add(e[n]);return t.size===r?e:Array.from(t)}const PB=function(){return typeof window=="undefined"?function(e){return e()}:window.requestAnimationFrame}();function TB(e,t,n){const r=n||(o=>Array.prototype.slice.call(o));let i=!1,a=[];return function(...o){a=r(o),i||(i=!0,PB.call(window,()=>{i=!1,e.apply(t,a)}))}}function het(e,t){let n;return function(...r){return t?(clearTimeout(n),n=setTimeout(e,t,r)):e.apply(this,r),t}}const wL=e=>e==="start"?"left":e==="end"?"right":"center",sl=(e,t,n)=>e==="start"?t:e==="end"?n:(t+n)/2,pet=(e,t,n,r)=>e===(r?"left":"right")?n:e==="center"?(t+n)/2:t;function MB(e,t,n){const r=t.length;let i=0,a=r;if(e._sorted){const{iScale:o,_parsed:u}=e,c=o.axis,{min:g,max:_,minDefined:E,maxDefined:C}=o.getUserBounds();E&&(i=au(Math.min(ag(u,o.axis,g).lo,n?r:ag(t,c,o.getPixelForValue(g)).lo),0,r-1)),C?a=au(Math.max(ag(u,o.axis,_,!0).hi+1,n?0:ag(t,c,o.getPixelForValue(_),!0).hi+1),i,r)-i:a=r-i}return{start:i,count:a}}function AB(e){const{xScale:t,yScale:n,_scaleRanges:r}=e,i={xmin:t.min,xmax:t.max,ymin:n.min,ymax:n.max};if(!r)return e._scaleRanges=i,!0;const a=r.xmin!==t.min||r.xmax!==t.max||r.ymin!==n.min||r.ymax!==n.max;return Object.assign(r,i),a}const ZC=e=>e===0||e===1,LB=(e,t,n)=>-(Math.pow(2,10*(e-=1))*Math.sin((e-t)*xo/n)),OB=(e,t,n)=>Math.pow(2,-10*e)*Math.sin((e-t)*xo/n)+1,ob={linear:e=>e,easeInQuad:e=>e*e,easeOutQuad:e=>-e*(e-2),easeInOutQuad:e=>(e/=.5)<1?.5*e*e:-.5*(--e*(e-2)-1),easeInCubic:e=>e*e*e,easeOutCubic:e=>(e-=1)*e*e+1,easeInOutCubic:e=>(e/=.5)<1?.5*e*e*e:.5*((e-=2)*e*e+2),easeInQuart:e=>e*e*e*e,easeOutQuart:e=>-((e-=1)*e*e*e-1),easeInOutQuart:e=>(e/=.5)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2),easeInQuint:e=>e*e*e*e*e,easeOutQuint:e=>(e-=1)*e*e*e*e+1,easeInOutQuint:e=>(e/=.5)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2),easeInSine:e=>-Math.cos(e*ja)+1,easeOutSine:e=>Math.sin(e*ja),easeInOutSine:e=>-.5*(Math.cos(pa*e)-1),easeInExpo:e=>e===0?0:Math.pow(2,10*(e-1)),easeOutExpo:e=>e===1?1:-Math.pow(2,-10*e)+1,easeInOutExpo:e=>ZC(e)?e:e<.5?.5*Math.pow(2,10*(e*2-1)):.5*(-Math.pow(2,-10*(e*2-1))+2),easeInCirc:e=>e>=1?e:-(Math.sqrt(1-e*e)-1),easeOutCirc:e=>Math.sqrt(1-(e-=1)*e),easeInOutCirc:e=>(e/=.5)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1),easeInElastic:e=>ZC(e)?e:LB(e,.075,.3),easeOutElastic:e=>ZC(e)?e:OB(e,.075,.3),easeInOutElastic(e){const t=.1125,n=.45;return ZC(e)?e:e<.5?.5*LB(e*2,t,n):.5+.5*OB(e*2-1,t,n)},easeInBack(e){const t=1.70158;return e*e*((t+1)*e-t)},easeOutBack(e){const t=1.70158;return(e-=1)*e*((t+1)*e+t)+1},easeInOutBack(e){let t=1.70158;return(e/=.5)<1?.5*(e*e*(((t*=1.525)+1)*e-t)):.5*((e-=2)*e*(((t*=1.525)+1)*e+t)+2)},easeInBounce:e=>1-ob.easeOutBounce(1-e),easeOutBounce(e){const t=7.5625,n=2.75;return e<1/n?t*e*e:e<2/n?t*(e-=1.5/n)*e+.75:e<2.5/n?t*(e-=2.25/n)*e+.9375:t*(e-=2.625/n)*e+.984375},easeInOutBounce:e=>e<.5?ob.easeInBounce(e*2)*.5:ob.easeOutBounce(e*2-1)*.5+.5};/*! * @kurkle/color v0.2.1 * https://github.com/kurkle/color#readme * (c) 2022 Jukka Kurkela * Released under the MIT License */function ab(e){return e+.5|0}const Am=(e,t,n)=>Math.max(Math.min(e,n),t);function sb(e){return Am(ab(e*2.55),0,255)}function Lm(e){return Am(ab(e*255),0,255)}function sg(e){return Am(ab(e/2.55)/100,0,1)}function RB(e){return Am(ab(e*100),0,100)}const ch={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},SL=[..."0123456789ABCDEF"],det=e=>SL[e&15],get=e=>SL[(e&240)>>4]+SL[e&15],KC=e=>(e&240)>>4==(e&15),met=e=>KC(e.r)&&KC(e.g)&&KC(e.b)&&KC(e.a);function vet(e){var t=e.length,n;return e[0]==="#"&&(t===4||t===5?n={r:255&ch[e[1]]*17,g:255&ch[e[2]]*17,b:255&ch[e[3]]*17,a:t===5?ch[e[4]]*17:255}:(t===7||t===9)&&(n={r:ch[e[1]]<<4|ch[e[2]],g:ch[e[3]]<<4|ch[e[4]],b:ch[e[5]]<<4|ch[e[6]],a:t===9?ch[e[7]]<<4|ch[e[8]]:255})),n}const yet=(e,t)=>e<255?t(e):"";function _et(e){var t=met(e)?det:get;return e?"#"+t(e.r)+t(e.g)+t(e.b)+yet(e.a,t):void 0}const xet=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function kB(e,t,n){const r=t*Math.min(n,1-n),i=(a,o=(a+e/30)%12)=>n-r*Math.max(Math.min(o-3,9-o,1),-1);return[i(0),i(8),i(4)]}function bet(e,t,n){const r=(i,a=(i+e/60)%6)=>n-n*t*Math.max(Math.min(a,4-a,1),0);return[r(5),r(3),r(1)]}function wet(e,t,n){const r=kB(e,1,.5);let i;for(t+n>1&&(i=1/(t+n),t*=i,n*=i),i=0;i<3;i++)r[i]*=1-t-n,r[i]+=t;return r}function Eet(e,t,n,r,i){return e===i?(t-n)/r+(t<n?6:0):t===i?(n-e)/r+2:(e-t)/r+4}function EL(e){const t=255,n=e.r/t,r=e.g/t,i=e.b/t,a=Math.max(n,r,i),o=Math.min(n,r,i),u=(a+o)/2;let c,g,_;return a!==o&&(_=a-o,g=u>.5?_/(2-a-o):_/(a+o),c=Eet(n,r,i,_,a),c=c*60+.5),[c|0,g||0,u]}function CL(e,t,n,r){return(Array.isArray(t)?e(t[0],t[1],t[2]):e(t,n,r)).map(Lm)}function IL(e,t,n){return CL(kB,e,t,n)}function Cet(e,t,n){return CL(wet,e,t,n)}function Iet(e,t,n){return CL(bet,e,t,n)}function DB(e){return(e%360+360)%360}function Pet(e){const t=xet.exec(e);let n=255,r;if(!t)return;t[5]!==r&&(n=t[6]?sb(+t[5]):Lm(+t[5]));const i=DB(+t[2]),a=+t[3]/100,o=+t[4]/100;return t[1]==="hwb"?r=Cet(i,a,o):t[1]==="hsv"?r=Iet(i,a,o):r=IL(i,a,o),{r:r[0],g:r[1],b:r[2],a:n}}function Tet(e,t){var n=EL(e);n[0]=DB(n[0]+t),n=IL(n),e.r=n[0],e.g=n[1],e.b=n[2]}function Met(e){if(!e)return;const t=EL(e),n=t[0],r=RB(t[1]),i=RB(t[2]);return e.a<255?`hsla(${n}, ${r}%, ${i}%, ${sg(e.a)})`:`hsl(${n}, ${r}%, ${i}%)`}const NB={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},FB={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};function Aet(){const e={},t=Object.keys(FB),n=Object.keys(NB);let r,i,a,o,u;for(r=0;r<t.length;r++){for(o=u=t[r],i=0;i<n.length;i++)a=n[i],u=u.replace(a,NB[a]);a=parseInt(FB[o],16),e[u]=[a>>16&255,a>>8&255,a&255]}return e}let JC;function Let(e){JC||(JC=Aet(),JC.transparent=[0,0,0,0]);const t=JC[e.toLowerCase()];return t&&{r:t[0],g:t[1],b:t[2],a:t.length===4?t[3]:255}}const Oet=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function Ret(e){const t=Oet.exec(e);let n=255,r,i,a;if(!!t){if(t[7]!==r){const o=+t[7];n=t[8]?sb(o):Am(o*255,0,255)}return r=+t[1],i=+t[3],a=+t[5],r=255&(t[2]?sb(r):Am(r,0,255)),i=255&(t[4]?sb(i):Am(i,0,255)),a=255&(t[6]?sb(a):Am(a,0,255)),{r,g:i,b:a,a:n}}}function ket(e){return e&&(e.a<255?`rgba(${e.r}, ${e.g}, ${e.b}, ${sg(e.a)})`:`rgb(${e.r}, ${e.g}, ${e.b})`)}const PL=e=>e<=.0031308?e*12.92:Math.pow(e,1/2.4)*1.055-.055,_0=e=>e<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4);function Det(e,t,n){const r=_0(sg(e.r)),i=_0(sg(e.g)),a=_0(sg(e.b));return{r:Lm(PL(r+n*(_0(sg(t.r))-r))),g:Lm(PL(i+n*(_0(sg(t.g))-i))),b:Lm(PL(a+n*(_0(sg(t.b))-a))),a:e.a+n*(t.a-e.a)}}function QC(e,t,n){if(e){let r=EL(e);r[t]=Math.max(0,Math.min(r[t]+r[t]*n,t===0?360:1)),r=IL(r),e.r=r[0],e.g=r[1],e.b=r[2]}}function zB(e,t){return e&&Object.assign(t||{},e)}function BB(e){var t={r:0,g:0,b:0,a:255};return Array.isArray(e)?e.length>=3&&(t={r:e[0],g:e[1],b:e[2],a:255},e.length>3&&(t.a=Lm(e[3]))):(t=zB(e,{r:0,g:0,b:0,a:1}),t.a=Lm(t.a)),t}function Net(e){return e.charAt(0)==="r"?Ret(e):Pet(e)}class t2{constructor(t){if(t instanceof t2)return t;const n=typeof t;let r;n==="object"?r=BB(t):n==="string"&&(r=vet(t)||Let(t)||Net(t)),this._rgb=r,this._valid=!!r}get valid(){return this._valid}get rgb(){var t=zB(this._rgb);return t&&(t.a=sg(t.a)),t}set rgb(t){this._rgb=BB(t)}rgbString(){return this._valid?ket(this._rgb):void 0}hexString(){return this._valid?_et(this._rgb):void 0}hslString(){return this._valid?Met(this._rgb):void 0}mix(t,n){if(t){const r=this.rgb,i=t.rgb;let a;const o=n===a?.5:n,u=2*o-1,c=r.a-i.a,g=((u*c==-1?u:(u+c)/(1+u*c))+1)/2;a=1-g,r.r=255&g*r.r+a*i.r+.5,r.g=255&g*r.g+a*i.g+.5,r.b=255&g*r.b+a*i.b+.5,r.a=o*r.a+(1-o)*i.a,this.rgb=r}return this}interpolate(t,n){return t&&(this._rgb=Det(this._rgb,t._rgb,n)),this}clone(){return new t2(this.rgb)}alpha(t){return this._rgb.a=Lm(t),this}clearer(t){const n=this._rgb;return n.a*=1-t,this}greyscale(){const t=this._rgb,n=ab(t.r*.3+t.g*.59+t.b*.11);return t.r=t.g=t.b=n,this}opaquer(t){const n=this._rgb;return n.a*=1+t,this}negate(){const t=this._rgb;return t.r=255-t.r,t.g=255-t.g,t.b=255-t.b,this}lighten(t){return QC(this._rgb,2,t),this}darken(t){return QC(this._rgb,2,-t),this}saturate(t){return QC(this._rgb,1,t),this}desaturate(t){return QC(this._rgb,1,-t),this}rotate(t){return Tet(this._rgb,t),this}}function UB(e){return new t2(e)}function VB(e){if(e&&typeof e=="object"){const t=e.toString();return t==="[object CanvasPattern]"||t==="[object CanvasGradient]"}return!1}function $B(e){return VB(e)?e:UB(e)}function TL(e){return VB(e)?e:UB(e).saturate(.5).darken(.1).hexString()}const Qv=Object.create(null),ML=Object.create(null);function ub(e,t){if(!t)return e;const n=t.split(".");for(let r=0,i=n.length;r<i;++r){const a=n[r];e=e[a]||(e[a]=Object.create(null))}return e}function AL(e,t,n){return typeof t=="string"?tb(ub(e,t),n):tb(ub(e,""),t)}class Fet{constructor(t){this.animation=void 0,this.backgroundColor="rgba(0,0,0,0.1)",this.borderColor="rgba(0,0,0,0.1)",this.color="#666",this.datasets={},this.devicePixelRatio=n=>n.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(n,r)=>TL(r.backgroundColor),this.hoverBorderColor=(n,r)=>TL(r.borderColor),this.hoverColor=(n,r)=>TL(r.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(t)}set(t,n){return AL(this,t,n)}get(t){return ub(this,t)}describe(t,n){return AL(ML,t,n)}override(t,n){return AL(Qv,t,n)}route(t,n,r,i){const a=ub(this,t),o=ub(this,r),u="_"+n;Object.defineProperties(a,{[u]:{value:a[n],writable:!0},[n]:{enumerable:!0,get(){const c=this[u],g=o[i];return _i(c)?Object.assign({},g,c):Hr(c,g)},set(c){this[u]=c}}})}}var Ei=new Fet({_scriptable:e=>!e.startsWith("on"),_indexable:e=>e!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}});function zet(e){return!e||Di(e.size)||Di(e.family)?null:(e.style?e.style+" ":"")+(e.weight?e.weight+" ":"")+e.size+"px "+e.family}function e2(e,t,n,r,i){let a=t[i];return a||(a=t[i]=e.measureText(i).width,n.push(i)),a>r&&(r=a),r}function Bet(e,t,n,r){r=r||{};let i=r.data=r.data||{},a=r.garbageCollect=r.garbageCollect||[];r.font!==t&&(i=r.data={},a=r.garbageCollect=[],r.font=t),e.save(),e.font=t;let o=0;const u=n.length;let c,g,_,E,C;for(c=0;c<u;c++)if(E=n[c],E!=null&&Fo(E)!==!0)o=e2(e,i,a,o,E);else if(Fo(E))for(g=0,_=E.length;g<_;g++)C=E[g],C!=null&&!Fo(C)&&(o=e2(e,i,a,o,C));e.restore();const O=a.length/2;if(O>n.length){for(c=0;c<O;c++)delete i[a[c]];a.splice(0,O)}return o}function ty(e,t,n){const r=e.currentDevicePixelRatio,i=n!==0?Math.max(n/2,.5):0;return Math.round((t-i)*r)/r+i}function jB(e,t){t=t||e.getContext("2d"),t.save(),t.resetTransform(),t.clearRect(0,0,e.width,e.height),t.restore()}function LL(e,t,n,r){qB(e,t,n,r,null)}function qB(e,t,n,r,i){let a,o,u,c,g,_;const E=t.pointStyle,C=t.rotation,O=t.radius;let R=(C||0)*ret;if(E&&typeof E=="object"&&(a=E.toString(),a==="[object HTMLImageElement]"||a==="[object HTMLCanvasElement]")){e.save(),e.translate(n,r),e.rotate(R),e.drawImage(E,-E.width/2,-E.height/2,E.width,E.height),e.restore();return}if(!(isNaN(O)||O<=0)){switch(e.beginPath(),E){default:i?e.ellipse(n,r,i/2,O,0,0,xo):e.arc(n,r,O,0,xo),e.closePath();break;case"triangle":e.moveTo(n+Math.sin(R)*O,r-Math.cos(R)*O),R+=_B,e.lineTo(n+Math.sin(R)*O,r-Math.cos(R)*O),R+=_B,e.lineTo(n+Math.sin(R)*O,r-Math.cos(R)*O),e.closePath();break;case"rectRounded":g=O*.516,c=O-g,o=Math.cos(R+nb)*c,u=Math.sin(R+nb)*c,e.arc(n-o,r-u,g,R-pa,R-ja),e.arc(n+u,r-o,g,R-ja,R),e.arc(n+o,r+u,g,R,R+ja),e.arc(n-u,r+o,g,R+ja,R+pa),e.closePath();break;case"rect":if(!C){c=Math.SQRT1_2*O,_=i?i/2:c,e.rect(n-_,r-c,2*_,2*c);break}R+=nb;case"rectRot":o=Math.cos(R)*O,u=Math.sin(R)*O,e.moveTo(n-o,r-u),e.lineTo(n+u,r-o),e.lineTo(n+o,r+u),e.lineTo(n-u,r+o),e.closePath();break;case"crossRot":R+=nb;case"cross":o=Math.cos(R)*O,u=Math.sin(R)*O,e.moveTo(n-o,r-u),e.lineTo(n+o,r+u),e.moveTo(n+u,r-o),e.lineTo(n-u,r+o);break;case"star":o=Math.cos(R)*O,u=Math.sin(R)*O,e.moveTo(n-o,r-u),e.lineTo(n+o,r+u),e.moveTo(n+u,r-o),e.lineTo(n-u,r+o),R+=nb,o=Math.cos(R)*O,u=Math.sin(R)*O,e.moveTo(n-o,r-u),e.lineTo(n+o,r+u),e.moveTo(n+u,r-o),e.lineTo(n-u,r+o);break;case"line":o=i?i/2:Math.cos(R)*O,u=Math.sin(R)*O,e.moveTo(n-o,r-u),e.lineTo(n+o,r+u);break;case"dash":e.moveTo(n,r),e.lineTo(n+Math.cos(R)*O,r+Math.sin(R)*O);break}e.fill(),t.borderWidth>0&&e.stroke()}}function lb(e,t,n){return n=n||.5,!t||e&&e.x>t.left-n&&e.x<t.right+n&&e.y>t.top-n&&e.y<t.bottom+n}function n2(e,t){e.save(),e.beginPath(),e.rect(t.left,t.top,t.right-t.left,t.bottom-t.top),e.clip()}function r2(e){e.restore()}function Uet(e,t,n,r,i){if(!t)return e.lineTo(n.x,n.y);if(i==="middle"){const a=(t.x+n.x)/2;e.lineTo(a,t.y),e.lineTo(a,n.y)}else i==="after"!=!!r?e.lineTo(t.x,n.y):e.lineTo(n.x,t.y);e.lineTo(n.x,n.y)}function Vet(e,t,n,r){if(!t)return e.lineTo(n.x,n.y);e.bezierCurveTo(r?t.cp1x:t.cp2x,r?t.cp1y:t.cp2y,r?n.cp2x:n.cp1x,r?n.cp2y:n.cp1y,n.x,n.y)}function ey(e,t,n,r,i,a={}){const o=Fo(t)?t:[t],u=a.strokeWidth>0&&a.strokeColor!=="";let c,g;for(e.save(),e.font=i.string,$et(e,a),c=0;c<o.length;++c)g=o[c],u&&(a.strokeColor&&(e.strokeStyle=a.strokeColor),Di(a.strokeWidth)||(e.lineWidth=a.strokeWidth),e.strokeText(g,n,r,a.maxWidth)),e.fillText(g,n,r,a.maxWidth),jet(e,n,r,g,a),r+=i.lineHeight;e.restore()}function $et(e,t){t.translation&&e.translate(t.translation[0],t.translation[1]),Di(t.rotation)||e.rotate(t.rotation),t.color&&(e.fillStyle=t.color),t.textAlign&&(e.textAlign=t.textAlign),t.textBaseline&&(e.textBaseline=t.textBaseline)}function jet(e,t,n,r,i){if(i.strikethrough||i.underline){const a=e.measureText(r),o=t-a.actualBoundingBoxLeft,u=t+a.actualBoundingBoxRight,c=n-a.actualBoundingBoxAscent,g=n+a.actualBoundingBoxDescent,_=i.strikethrough?(c+g)/2:g;e.strokeStyle=e.fillStyle,e.beginPath(),e.lineWidth=i.decorationWidth||2,e.moveTo(o,_),e.lineTo(u,_),e.stroke()}}function cb(e,t){const{x:n,y:r,w:i,h:a,radius:o}=t;e.arc(n+o.topLeft,r+o.topLeft,o.topLeft,-ja,pa,!0),e.lineTo(n,r+a-o.bottomLeft),e.arc(n+o.bottomLeft,r+a-o.bottomLeft,o.bottomLeft,pa,ja,!0),e.lineTo(n+i-o.bottomRight,r+a),e.arc(n+i-o.bottomRight,r+a-o.bottomRight,o.bottomRight,ja,0,!0),e.lineTo(n+i,r+o.topRight),e.arc(n+i-o.topRight,r+o.topRight,o.topRight,0,-ja,!0),e.lineTo(n+o.topLeft,r)}const qet=new RegExp(/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/),Get=new RegExp(/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/);function Wet(e,t){const n=(""+e).match(qet);if(!n||n[1]==="normal")return t*1.2;switch(e=+n[2],n[3]){case"px":return e;case"%":e/=100;break}return t*e}const Het=e=>+e||0;function OL(e,t){const n={},r=_i(t),i=r?Object.keys(t):t,a=_i(e)?r?o=>Hr(e[o],e[t[o]]):o=>e[o]:()=>e;for(const o of i)n[o]=Het(a(o));return n}function GB(e){return OL(e,{top:"y",right:"x",bottom:"y",left:"x"})}function ny(e){return OL(e,["topLeft","topRight","bottomLeft","bottomRight"])}function ul(e){const t=GB(e);return t.width=t.left+t.right,t.height=t.top+t.bottom,t}function Ds(e,t){e=e||{},t=t||Ei.font;let n=Hr(e.size,t.size);typeof n=="string"&&(n=parseInt(n,10));let r=Hr(e.style,t.style);r&&!(""+r).match(Get)&&(console.warn('Invalid font style specified: "'+r+'"'),r="");const i={family:Hr(e.family,t.family),lineHeight:Wet(Hr(e.lineHeight,t.lineHeight),n),size:n,style:r,weight:Hr(e.weight,t.weight),string:""};return i.string=zet(i),i}function fb(e,t,n,r){let i=!0,a,o,u;for(a=0,o=e.length;a<o;++a)if(u=e[a],u!==void 0&&(t!==void 0&&typeof u=="function"&&(u=u(t),i=!1),n!==void 0&&Fo(u)&&(u=u[n%u.length],i=!1),u!==void 0))return r&&!i&&(r.cacheable=!1),u}function Xet(e,t,n){const{min:r,max:i}=e,a=gB(t,(i-r)/2),o=(u,c)=>n&&u===0?0:u+c;return{min:o(r,-Math.abs(a)),max:o(i,a)}}function Om(e,t){return Object.assign(Object.create(e),t)}function RL(e,t=[""],n=e,r,i=()=>e[0]){uh(r)||(r=ZB("_fallback",e));const a={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:e,_rootScopes:n,_fallback:r,_getTarget:i,override:o=>RL([o,...e],t,n,r)};return new Proxy(a,{deleteProperty(o,u){return delete o[u],delete o._keys,delete e[0][u],!0},get(o,u){return HB(o,u,()=>nnt(u,t,e,o))},getOwnPropertyDescriptor(o,u){return Reflect.getOwnPropertyDescriptor(o._scopes[0],u)},getPrototypeOf(){return Reflect.getPrototypeOf(e[0])},has(o,u){return KB(o).includes(u)},ownKeys(o){return KB(o)},set(o,u,c){const g=o._storage||(o._storage=i());return o[u]=g[u]=c,delete o._keys,!0}})}function x0(e,t,n,r){const i={_cacheable:!1,_proxy:e,_context:t,_subProxy:n,_stack:new Set,_descriptors:WB(e,r),setContext:a=>x0(e,a,n,r),override:a=>x0(e.override(a),t,n,r)};return new Proxy(i,{deleteProperty(a,o){return delete a[o],delete e[o],!0},get(a,o,u){return HB(a,o,()=>Zet(a,o,u))},getOwnPropertyDescriptor(a,o){return a._descriptors.allKeys?Reflect.has(e,o)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(e,o)},getPrototypeOf(){return Reflect.getPrototypeOf(e)},has(a,o){return Reflect.has(e,o)},ownKeys(){return Reflect.ownKeys(e)},set(a,o,u){return e[o]=u,delete a[o],!0}})}function WB(e,t={scriptable:!0,indexable:!0}){const{_scriptable:n=t.scriptable,_indexable:r=t.indexable,_allKeys:i=t.allKeys}=e;return{allKeys:i,scriptable:n,indexable:r,isScriptable:Mm(n)?n:()=>n,isIndexable:Mm(r)?r:()=>r}}const Yet=(e,t)=>e?e+yL(t):t,kL=(e,t)=>_i(t)&&e!=="adapters"&&(Object.getPrototypeOf(t)===null||t.constructor===Object);function HB(e,t,n){if(Object.prototype.hasOwnProperty.call(e,t))return e[t];const r=n();return e[t]=r,r}function Zet(e,t,n){const{_proxy:r,_context:i,_subProxy:a,_descriptors:o}=e;let u=r[t];return Mm(u)&&o.isScriptable(t)&&(u=Ket(t,u,e,n)),Fo(u)&&u.length&&(u=Jet(t,u,e,o.isIndexable)),kL(t,u)&&(u=x0(u,i,a&&a[t],o)),u}function Ket(e,t,n,r){const{_proxy:i,_context:a,_subProxy:o,_stack:u}=n;if(u.has(e))throw new Error("Recursion detected: "+Array.from(u).join("->")+"->"+e);return u.add(e),t=t(a,o||r),u.delete(e),kL(e,t)&&(t=DL(i._scopes,i,e,t)),t}function Jet(e,t,n,r){const{_proxy:i,_context:a,_subProxy:o,_descriptors:u}=n;if(uh(a.index)&&r(e))t=t[a.index%t.length];else if(_i(t[0])){const c=t,g=i._scopes.filter(_=>_!==c);t=[];for(const _ of c){const E=DL(g,i,e,_);t.push(x0(E,a,o&&o[e],u))}}return t}function XB(e,t,n){return Mm(e)?e(t,n):e}const Qet=(e,t)=>e===!0?t:typeof e=="string"?Tm(t,e):void 0;function tnt(e,t,n,r,i){for(const a of t){const o=Qet(n,a);if(o){e.add(o);const u=XB(o._fallback,n,i);if(uh(u)&&u!==n&&u!==r)return u}else if(o===!1&&uh(r)&&n!==r)return null}return!1}function DL(e,t,n,r){const i=t._rootScopes,a=XB(t._fallback,n,r),o=[...e,...i],u=new Set;u.add(r);let c=YB(u,o,n,a||n,r);return c===null||uh(a)&&a!==n&&(c=YB(u,o,a,c,r),c===null)?!1:RL(Array.from(u),[""],i,a,()=>ent(t,n,r))}function YB(e,t,n,r,i){for(;n;)n=tnt(e,t,n,r,i);return n}function ent(e,t,n){const r=e._getTarget();t in r||(r[t]={});const i=r[t];return Fo(i)&&_i(n)?n:i}function nnt(e,t,n,r){let i;for(const a of t)if(i=ZB(Yet(a,e),n),uh(i))return kL(e,i)?DL(n,r,e,i):i}function ZB(e,t){for(const n of t){if(!n)continue;const r=n[e];if(uh(r))return r}}function KB(e){let t=e._keys;return t||(t=e._keys=rnt(e._scopes)),t}function rnt(e){const t=new Set;for(const n of e)for(const r of Object.keys(n).filter(i=>!i.startsWith("_")))t.add(r);return Array.from(t)}function JB(e,t,n,r){const{iScale:i}=e,{key:a="r"}=this._parsing,o=new Array(r);let u,c,g,_;for(u=0,c=r;u<c;++u)g=u+n,_=t[g],o[u]={r:i.parse(Tm(_,a),g)};return o}const int=Number.EPSILON||1e-14,b0=(e,t)=>t<e.length&&!e[t].skip&&e[t],QB=e=>e==="x"?"y":"x";function ont(e,t,n,r){const i=e.skip?t:e,a=t,o=n.skip?t:n,u=xL(a,i),c=xL(o,a);let g=u/(u+c),_=c/(u+c);g=isNaN(g)?0:g,_=isNaN(_)?0:_;const E=r*g,C=r*_;return{previous:{x:a.x-E*(o.x-i.x),y:a.y-E*(o.y-i.y)},next:{x:a.x+C*(o.x-i.x),y:a.y+C*(o.y-i.y)}}}function ant(e,t,n){const r=e.length;let i,a,o,u,c,g=b0(e,0);for(let _=0;_<r-1;++_)if(c=g,g=b0(e,_+1),!(!c||!g)){if(rb(t[_],0,int)){n[_]=n[_+1]=0;continue}i=n[_]/t[_],a=n[_+1]/t[_],u=Math.pow(i,2)+Math.pow(a,2),!(u<=9)&&(o=3/Math.sqrt(u),n[_]=i*o*t[_],n[_+1]=a*o*t[_])}}function snt(e,t,n="x"){const r=QB(n),i=e.length;let a,o,u,c=b0(e,0);for(let g=0;g<i;++g){if(o=u,u=c,c=b0(e,g+1),!u)continue;const _=u[n],E=u[r];o&&(a=(_-o[n])/3,u[`cp1${n}`]=_-a,u[`cp1${r}`]=E-a*t[g]),c&&(a=(c[n]-_)/3,u[`cp2${n}`]=_+a,u[`cp2${r}`]=E+a*t[g])}}function unt(e,t="x"){const n=QB(t),r=e.length,i=Array(r).fill(0),a=Array(r);let o,u,c,g=b0(e,0);for(o=0;o<r;++o)if(u=c,c=g,g=b0(e,o+1),!!c){if(g){const _=g[t]-c[t];i[o]=_!==0?(g[n]-c[n])/_:0}a[o]=u?g?ed(i[o-1])!==ed(i[o])?0:(i[o-1]+i[o])/2:i[o-1]:i[o]}ant(e,i,a),snt(e,a,t)}function i2(e,t,n){return Math.max(Math.min(e,n),t)}function lnt(e,t){let n,r,i,a,o,u=lb(e[0],t);for(n=0,r=e.length;n<r;++n)o=a,a=u,u=n<r-1&&lb(e[n+1],t),!!a&&(i=e[n],o&&(i.cp1x=i2(i.cp1x,t.left,t.right),i.cp1y=i2(i.cp1y,t.top,t.bottom)),u&&(i.cp2x=i2(i.cp2x,t.left,t.right),i.cp2y=i2(i.cp2y,t.top,t.bottom)))}function cnt(e,t,n,r,i){let a,o,u,c;if(t.spanGaps&&(e=e.filter(g=>!g.skip)),t.cubicInterpolationMode==="monotone")unt(e,i);else{let g=r?e[e.length-1]:e[0];for(a=0,o=e.length;a<o;++a)u=e[a],c=ont(g,u,e[Math.min(a+1,o-(r?0:1))%o],t.tension),u.cp1x=c.previous.x,u.cp1y=c.previous.y,u.cp2x=c.next.x,u.cp2y=c.next.y,g=u}t.capBezierPoints&&lnt(e,n)}function t5(){return typeof window!="undefined"&&typeof document!="undefined"}function NL(e){let t=e.parentNode;return t&&t.toString()==="[object ShadowRoot]"&&(t=t.host),t}function o2(e,t,n){let r;return typeof e=="string"?(r=parseInt(e,10),e.indexOf("%")!==-1&&(r=r/100*t.parentNode[n])):r=e,r}const a2=e=>window.getComputedStyle(e,null);function fnt(e,t){return a2(e).getPropertyValue(t)}const hnt=["top","right","bottom","left"];function ry(e,t,n){const r={};n=n?"-"+n:"";for(let i=0;i<4;i++){const a=hnt[i];r[a]=parseFloat(e[t+"-"+a+n])||0}return r.width=r.left+r.right,r.height=r.top+r.bottom,r}const pnt=(e,t,n)=>(e>0||t>0)&&(!n||!n.shadowRoot);function dnt(e,t){const n=e.touches,r=n&&n.length?n[0]:e,{offsetX:i,offsetY:a}=r;let o=!1,u,c;if(pnt(i,a,e.target))u=i,c=a;else{const g=t.getBoundingClientRect();u=r.clientX-g.left,c=r.clientY-g.top,o=!0}return{x:u,y:c,box:o}}function iy(e,t){if("native"in e)return e;const{canvas:n,currentDevicePixelRatio:r}=t,i=a2(n),a=i.boxSizing==="border-box",o=ry(i,"padding"),u=ry(i,"border","width"),{x:c,y:g,box:_}=dnt(e,n),E=o.left+(_&&u.left),C=o.top+(_&&u.top);let{width:O,height:R}=t;return a&&(O-=o.width+u.width,R-=o.height+u.height),{x:Math.round((c-E)/O*n.width/r),y:Math.round((g-C)/R*n.height/r)}}function gnt(e,t,n){let r,i;if(t===void 0||n===void 0){const a=NL(e);if(!a)t=e.clientWidth,n=e.clientHeight;else{const o=a.getBoundingClientRect(),u=a2(a),c=ry(u,"border","width"),g=ry(u,"padding");t=o.width-g.width-c.width,n=o.height-g.height-c.height,r=o2(u.maxWidth,a,"clientWidth"),i=o2(u.maxHeight,a,"clientHeight")}}return{width:t,height:n,maxWidth:r||YC,maxHeight:i||YC}}const FL=e=>Math.round(e*10)/10;function mnt(e,t,n,r){const i=a2(e),a=ry(i,"margin"),o=o2(i.maxWidth,e,"clientWidth")||YC,u=o2(i.maxHeight,e,"clientHeight")||YC,c=gnt(e,t,n);let{width:g,height:_}=c;if(i.boxSizing==="content-box"){const E=ry(i,"border","width"),C=ry(i,"padding");g-=C.width+E.width,_-=C.height+E.height}return g=Math.max(0,g-a.width),_=Math.max(0,r?Math.floor(g/r):_-a.height),g=FL(Math.min(g,o,c.maxWidth)),_=FL(Math.min(_,u,c.maxHeight)),g&&!_&&(_=FL(g/2)),{width:g,height:_}}function e5(e,t,n){const r=t||1,i=Math.floor(e.height*r),a=Math.floor(e.width*r);e.height=i/r,e.width=a/r;const o=e.canvas;return o.style&&(n||!o.style.height&&!o.style.width)&&(o.style.height=`${e.height}px`,o.style.width=`${e.width}px`),e.currentDevicePixelRatio!==r||o.height!==i||o.width!==a?(e.currentDevicePixelRatio=r,o.height=i,o.width=a,e.ctx.setTransform(r,0,0,r,0,0),!0):!1}const vnt=function(){let e=!1;try{const t={get passive(){return e=!0,!1}};window.addEventListener("test",null,t),window.removeEventListener("test",null,t)}catch{}return e}();function n5(e,t){const n=fnt(e,t),r=n&&n.match(/^(\d+)(\.\d+)?px$/);return r?+r[1]:void 0}function oy(e,t,n,r){return{x:e.x+n*(t.x-e.x),y:e.y+n*(t.y-e.y)}}function ynt(e,t,n,r){return{x:e.x+n*(t.x-e.x),y:r==="middle"?n<.5?e.y:t.y:r==="after"?n<1?e.y:t.y:n>0?t.y:e.y}}function _nt(e,t,n,r){const i={x:e.cp2x,y:e.cp2y},a={x:t.cp1x,y:t.cp1y},o=oy(e,i,n),u=oy(i,a,n),c=oy(a,t,n),g=oy(o,u,n),_=oy(u,c,n);return oy(g,_,n)}const r5=new Map;function xnt(e,t){t=t||{};const n=e+JSON.stringify(t);let r=r5.get(n);return r||(r=new Intl.NumberFormat(e,t),r5.set(n,r)),r}function hb(e,t,n){return xnt(t,n).format(e)}const bnt=function(e,t){return{x(n){return e+e+t-n},setWidth(n){t=n},textAlign(n){return n==="center"?n:n==="right"?"left":"right"},xPlus(n,r){return n-r},leftForLtr(n,r){return n-r}}},wnt=function(){return{x(e){return e},setWidth(e){},textAlign(e){return e},xPlus(e,t){return e+t},leftForLtr(e,t){return e}}};function w0(e,t,n){return e?bnt(t,n):wnt()}function i5(e,t){let n,r;(t==="ltr"||t==="rtl")&&(n=e.canvas.style,r=[n.getPropertyValue("direction"),n.getPropertyPriority("direction")],n.setProperty("direction",t,"important"),e.prevTextDirection=r)}function o5(e,t){t!==void 0&&(delete e.prevTextDirection,e.canvas.style.setProperty("direction",t[0],t[1]))}function a5(e){return e==="angle"?{between:ib,compare:aet,normalize:ff}:{between:og,compare:(t,n)=>t-n,normalize:t=>t}}function s5({start:e,end:t,count:n,loop:r,style:i}){return{start:e%n,end:t%n,loop:r&&(t-e+1)%n==0,style:i}}function Snt(e,t,n){const{property:r,start:i,end:a}=n,{between:o,normalize:u}=a5(r),c=t.length;let{start:g,end:_,loop:E}=e,C,O;if(E){for(g+=c,_+=c,C=0,O=c;C<O&&o(u(t[g%c][r]),i,a);++C)g--,_--;g%=c,_%=c}return _<g&&(_+=c),{start:g,end:_,loop:E,style:e.style}}function u5(e,t,n){if(!n)return[e];const{property:r,start:i,end:a}=n,o=t.length,{compare:u,between:c,normalize:g}=a5(r),{start:_,end:E,loop:C,style:O}=Snt(e,t,n),R=[];let D=!1,B=null,z,k,$;const K=()=>c(i,$,z)&&u(i,$)!==0,et=()=>u(a,z)===0||c(a,$,z),mt=()=>D||K(),wt=()=>!D||et();for(let Ot=_,Bt=_;Ot<=E;++Ot)k=t[Ot%o],!k.skip&&(z=g(k[r]),z!==$&&(D=c(z,i,a),B===null&&mt()&&(B=u(z,i)===0?Ot:Bt),B!==null&&wt()&&(R.push(s5({start:B,end:Ot,loop:C,count:o,style:O})),B=null),Bt=Ot,$=z));return B!==null&&R.push(s5({start:B,end:E,loop:C,count:o,style:O})),R}function l5(e,t){const n=[],r=e.segments;for(let i=0;i<r.length;i++){const a=u5(r[i],e.points,t);a.length&&n.push(...a)}return n}function Ent(e,t,n,r){let i=0,a=t-1;if(n&&!r)for(;i<t&&!e[i].skip;)i++;for(;i<t&&e[i].skip;)i++;for(i%=t,n&&(a+=i);a>i&&e[a%t].skip;)a--;return a%=t,{start:i,end:a}}function Cnt(e,t,n,r){const i=e.length,a=[];let o=t,u=e[t],c;for(c=t+1;c<=n;++c){const g=e[c%i];g.skip||g.stop?u.skip||(r=!1,a.push({start:t%i,end:(c-1)%i,loop:r}),t=o=g.stop?c:null):(o=c,u.skip&&(t=c)),u=g}return o!==null&&a.push({start:t%i,end:o%i,loop:r}),a}function Int(e,t){const n=e.points,r=e.options.spanGaps,i=n.length;if(!i)return[];const a=!!e._loop,{start:o,end:u}=Ent(n,i,a,r);if(r===!0)return c5(e,[{start:o,end:u,loop:a}],n,t);const c=u<o?u+i:u,g=!!e._fullLoop&&o===0&&u===i-1;return c5(e,Cnt(n,o,c,g),n,t)}function c5(e,t,n,r){return!r||!r.setContext||!n?t:Pnt(e,t,n,r)}function Pnt(e,t,n,r){const i=e._chart.getContext(),a=f5(e.options),{_datasetIndex:o,options:{spanGaps:u}}=e,c=n.length,g=[];let _=a,E=t[0].start,C=E;function O(R,D,B,z){const k=u?-1:1;if(R!==D){for(R+=c;n[R%c].skip;)R-=k;for(;n[D%c].skip;)D+=k;R%c!=D%c&&(g.push({start:R%c,end:D%c,loop:B,style:z}),_=z,E=D%c)}}for(const R of t){E=u?E:R.start;let D=n[E%c],B;for(C=E+1;C<=R.end;C++){const z=n[C%c];B=f5(r.setContext(Om(i,{type:"segment",p0:D,p1:z,p0DataIndex:(C-1)%c,p1DataIndex:C%c,datasetIndex:o}))),Tnt(B,_)&&O(E,C-1,R.loop,_),D=z,_=B}E<C-1&&O(E,C-1,R.loop,_)}return g}function f5(e){return{backgroundColor:e.backgroundColor,borderCapStyle:e.borderCapStyle,borderDash:e.borderDash,borderDashOffset:e.borderDashOffset,borderJoinStyle:e.borderJoinStyle,borderWidth:e.borderWidth,borderColor:e.borderColor}}function Tnt(e,t){return t&&JSON.stringify(e)!==JSON.stringify(t)}/*! * Chart.js v3.9.1 * https://www.chartjs.org * (c) 2022 Chart.js Contributors * Released under the MIT License */class Mnt{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(t,n,r,i){const a=n.listeners[i],o=n.duration;a.forEach(u=>u({chart:t,initial:n.initial,numSteps:o,currentStep:Math.min(r-n.start,o)}))}_refresh(){this._request||(this._running=!0,this._request=PB.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(t=Date.now()){let n=0;this._charts.forEach((r,i)=>{if(!r.running||!r.items.length)return;const a=r.items;let o=a.length-1,u=!1,c;for(;o>=0;--o)c=a[o],c._active?(c._total>r.duration&&(r.duration=c._total),c.tick(t),u=!0):(a[o]=a[a.length-1],a.pop());u&&(i.draw(),this._notify(i,r,t,"progress")),a.length||(r.running=!1,this._notify(i,r,t,"complete"),r.initial=!1),n+=a.length}),this._lastDate=t,n===0&&(this._running=!1)}_getAnims(t){const n=this._charts;let r=n.get(t);return r||(r={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},n.set(t,r)),r}listen(t,n,r){this._getAnims(t).listeners[n].push(r)}add(t,n){!n||!n.length||this._getAnims(t).items.push(...n)}has(t){return this._getAnims(t).items.length>0}start(t){const n=this._charts.get(t);!n||(n.running=!0,n.start=Date.now(),n.duration=n.items.reduce((r,i)=>Math.max(r,i._duration),0),this._refresh())}running(t){if(!this._running)return!1;const n=this._charts.get(t);return!(!n||!n.running||!n.items.length)}stop(t){const n=this._charts.get(t);if(!n||!n.items.length)return;const r=n.items;let i=r.length-1;for(;i>=0;--i)r[i].cancel();n.items=[],this._notify(t,n,Date.now(),"complete")}remove(t){return this._charts.delete(t)}}var ug=new Mnt;const h5="transparent",Ant={boolean(e,t,n){return n>.5?t:e},color(e,t,n){const r=$B(e||h5),i=r.valid&&$B(t||h5);return i&&i.valid?i.mix(r,n).hexString():t},number(e,t,n){return e+(t-e)*n}};class Lnt{constructor(t,n,r,i){const a=n[r];i=fb([t.to,i,a,t.from]);const o=fb([t.from,a,i]);this._active=!0,this._fn=t.fn||Ant[t.type||typeof o],this._easing=ob[t.easing]||ob.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=n,this._prop=r,this._from=o,this._to=i,this._promises=void 0}active(){return this._active}update(t,n,r){if(this._active){this._notify(!1);const i=this._target[this._prop],a=r-this._start,o=this._duration-a;this._start=r,this._duration=Math.floor(Math.max(o,t.duration)),this._total+=a,this._loop=!!t.loop,this._to=fb([t.to,n,i,t.from]),this._from=fb([t.from,i,n])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const n=t-this._start,r=this._duration,i=this._prop,a=this._from,o=this._loop,u=this._to;let c;if(this._active=a!==u&&(o||n<r),!this._active){this._target[i]=u,this._notify(!0);return}if(n<0){this._target[i]=a;return}c=n/r%2,c=o&&c>1?2-c:c,c=this._easing(Math.min(1,Math.max(0,c))),this._target[i]=this._fn(a,u,c)}wait(){const t=this._promises||(this._promises=[]);return new Promise((n,r)=>{t.push({res:n,rej:r})})}_notify(t){const n=t?"res":"rej",r=this._promises||[];for(let i=0;i<r.length;i++)r[i][n]()}}const Ont=["x","y","borderWidth","radius","tension"],Rnt=["color","borderColor","backgroundColor"];Ei.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0});const knt=Object.keys(Ei.animation);Ei.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:e=>e!=="onProgress"&&e!=="onComplete"&&e!=="fn"});Ei.set("animations",{colors:{type:"color",properties:Rnt},numbers:{type:"number",properties:Ont}});Ei.describe("animations",{_fallback:"animation"});Ei.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:e=>e|0}}}});class p5{constructor(t,n){this._chart=t,this._properties=new Map,this.configure(n)}configure(t){if(!_i(t))return;const n=this._properties;Object.getOwnPropertyNames(t).forEach(r=>{const i=t[r];if(!_i(i))return;const a={};for(const o of knt)a[o]=i[o];(Fo(i.properties)&&i.properties||[r]).forEach(o=>{(o===r||!n.has(o))&&n.set(o,a)})})}_animateOptions(t,n){const r=n.options,i=Nnt(t,r);if(!i)return[];const a=this._createAnimations(i,r);return r.$shared&&Dnt(t.options.$animations,r).then(()=>{t.options=r},()=>{}),a}_createAnimations(t,n){const r=this._properties,i=[],a=t.$animations||(t.$animations={}),o=Object.keys(n),u=Date.now();let c;for(c=o.length-1;c>=0;--c){const g=o[c];if(g.charAt(0)==="$")continue;if(g==="options"){i.push(...this._animateOptions(t,n));continue}const _=n[g];let E=a[g];const C=r.get(g);if(E)if(C&&E.active()){E.update(C,_,u);continue}else E.cancel();if(!C||!C.duration){t[g]=_;continue}a[g]=E=new Lnt(C,t,g,_),i.push(E)}return i}update(t,n){if(this._properties.size===0){Object.assign(t,n);return}const r=this._createAnimations(t,n);if(r.length)return ug.add(this._chart,r),!0}}function Dnt(e,t){const n=[],r=Object.keys(t);for(let i=0;i<r.length;i++){const a=e[r[i]];a&&a.active()&&n.push(a.wait())}return Promise.all(n)}function Nnt(e,t){if(!t)return;let n=e.options;if(!n){e.options=t;return}return n.$shared&&(e.options=n=Object.assign({},n,{$shared:!1,$animations:{}})),n}function d5(e,t){const n=e&&e.options||{},r=n.reverse,i=n.min===void 0?t:0,a=n.max===void 0?t:0;return{start:r?a:i,end:r?i:a}}function Fnt(e,t,n){if(n===!1)return!1;const r=d5(e,n),i=d5(t,n);return{top:i.end,right:r.end,bottom:i.start,left:r.start}}function znt(e){let t,n,r,i;return _i(e)?(t=e.top,n=e.right,r=e.bottom,i=e.left):t=n=r=i=e,{top:t,right:n,bottom:r,left:i,disabled:e===!1}}function g5(e,t){const n=[],r=e._getSortedDatasetMetas(t);let i,a;for(i=0,a=r.length;i<a;++i)n.push(r[i].index);return n}function m5(e,t,n,r={}){const i=e.keys,a=r.mode==="single";let o,u,c,g;if(t!==null){for(o=0,u=i.length;o<u;++o){if(c=+i[o],c===n){if(r.all)continue;break}g=e.values[c],rs(g)&&(a||t===0||ed(t)===ed(g))&&(t+=g)}return t}}function Bnt(e){const t=Object.keys(e),n=new Array(t.length);let r,i,a;for(r=0,i=t.length;r<i;++r)a=t[r],n[r]={x:a,y:e[a]};return n}function v5(e,t){const n=e&&e.options.stacked;return n||n===void 0&&t.stack!==void 0}function Unt(e,t,n){return`${e.id}.${t.id}.${n.stack||n.type}`}function Vnt(e){const{min:t,max:n,minDefined:r,maxDefined:i}=e.getUserBounds();return{min:r?t:Number.NEGATIVE_INFINITY,max:i?n:Number.POSITIVE_INFINITY}}function $nt(e,t,n){const r=e[t]||(e[t]={});return r[n]||(r[n]={})}function y5(e,t,n,r){for(const i of t.getMatchingVisibleMetas(r).reverse()){const a=e[i.index];if(n&&a>0||!n&&a<0)return i.index}return null}function _5(e,t){const{chart:n,_cachedMeta:r}=e,i=n._stacks||(n._stacks={}),{iScale:a,vScale:o,index:u}=r,c=a.axis,g=o.axis,_=Unt(a,o,r),E=t.length;let C;for(let O=0;O<E;++O){const R=t[O],{[c]:D,[g]:B}=R,z=R._stacks||(R._stacks={});C=z[g]=$nt(i,_,D),C[u]=B,C._top=y5(C,o,!0,r.type),C._bottom=y5(C,o,!1,r.type)}}function zL(e,t){const n=e.scales;return Object.keys(n).filter(r=>n[r].axis===t).shift()}function jnt(e,t){return Om(e,{active:!1,dataset:void 0,datasetIndex:t,index:t,mode:"default",type:"dataset"})}function qnt(e,t,n){return Om(e,{active:!1,dataIndex:t,parsed:void 0,raw:void 0,element:n,index:t,mode:"default",type:"data"})}function pb(e,t){const n=e.controller.index,r=e.vScale&&e.vScale.axis;if(!!r){t=t||e._parsed;for(const i of t){const a=i._stacks;if(!a||a[r]===void 0||a[r][n]===void 0)return;delete a[r][n]}}}const BL=e=>e==="reset"||e==="none",x5=(e,t)=>t?e:Object.assign({},e),Gnt=(e,t,n)=>e&&!t.hidden&&t._stacked&&{keys:g5(n,!0),values:null};class cp{constructor(t,n){this.chart=t,this._ctx=t.ctx,this.index=n,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.initialize()}initialize(){const t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=v5(t.vScale,t),this.addElements()}updateIndex(t){this.index!==t&&pb(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,n=this._cachedMeta,r=this.getDataset(),i=(E,C,O,R)=>E==="x"?C:E==="r"?R:O,a=n.xAxisID=Hr(r.xAxisID,zL(t,"x")),o=n.yAxisID=Hr(r.yAxisID,zL(t,"y")),u=n.rAxisID=Hr(r.rAxisID,zL(t,"r")),c=n.indexAxis,g=n.iAxisID=i(c,a,o,u),_=n.vAxisID=i(c,o,a,u);n.xScale=this.getScaleForId(a),n.yScale=this.getScaleForId(o),n.rScale=this.getScaleForId(u),n.iScale=this.getScaleForId(g),n.vScale=this.getScaleForId(_)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){const n=this._cachedMeta;return t===n.iScale?n.vScale:n.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;this._data&&CB(this._data,this),t._stacked&&pb(t)}_dataCheck(){const t=this.getDataset(),n=t.data||(t.data=[]),r=this._data;if(_i(n))this._data=Bnt(n);else if(r!==n){if(r){CB(r,this);const i=this._cachedMeta;pb(i),i._parsed=[]}n&&Object.isExtensible(n)&&fet(n,this),this._syncList=[],this._data=n}}addElements(){const t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){const n=this._cachedMeta,r=this.getDataset();let i=!1;this._dataCheck();const a=n._stacked;n._stacked=v5(n.vScale,n),n.stack!==r.stack&&(i=!0,pb(n),n.stack=r.stack),this._resyncElements(t),(i||a!==n._stacked)&&_5(this,n._parsed)}configure(){const t=this.chart.config,n=t.datasetScopeKeys(this._type),r=t.getOptionScopes(this.getDataset(),n,!0);this.options=t.createResolver(r,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,n){const{_cachedMeta:r,_data:i}=this,{iScale:a,_stacked:o}=r,u=a.axis;let c=t===0&&n===i.length?!0:r._sorted,g=t>0&&r._parsed[t-1],_,E,C;if(this._parsing===!1)r._parsed=i,r._sorted=!0,C=i;else{Fo(i[t])?C=this.parseArrayData(r,i,t,n):_i(i[t])?C=this.parseObjectData(r,i,t,n):C=this.parsePrimitiveData(r,i,t,n);const O=()=>E[u]===null||g&&E[u]<g[u];for(_=0;_<n;++_)r._parsed[_+t]=E=C[_],c&&(O()&&(c=!1),g=E);r._sorted=c}o&&_5(this,C)}parsePrimitiveData(t,n,r,i){const{iScale:a,vScale:o}=t,u=a.axis,c=o.axis,g=a.getLabels(),_=a===o,E=new Array(i);let C,O,R;for(C=0,O=i;C<O;++C)R=C+r,E[C]={[u]:_||a.parse(g[R],R),[c]:o.parse(n[R],R)};return E}parseArrayData(t,n,r,i){const{xScale:a,yScale:o}=t,u=new Array(i);let c,g,_,E;for(c=0,g=i;c<g;++c)_=c+r,E=n[_],u[c]={x:a.parse(E[0],_),y:o.parse(E[1],_)};return u}parseObjectData(t,n,r,i){const{xScale:a,yScale:o}=t,{xAxisKey:u="x",yAxisKey:c="y"}=this._parsing,g=new Array(i);let _,E,C,O;for(_=0,E=i;_<E;++_)C=_+r,O=n[C],g[_]={x:a.parse(Tm(O,u),C),y:o.parse(Tm(O,c),C)};return g}getParsed(t){return this._cachedMeta._parsed[t]}getDataElement(t){return this._cachedMeta.data[t]}applyStack(t,n,r){const i=this.chart,a=this._cachedMeta,o=n[t.axis],u={keys:g5(i,!0),values:n._stacks[t.axis]};return m5(u,o,a.index,{mode:r})}updateRangeFromParsed(t,n,r,i){const a=r[n.axis];let o=a===null?NaN:a;const u=i&&r._stacks[n.axis];i&&u&&(i.values=u,o=m5(i,a,this._cachedMeta.index)),t.min=Math.min(t.min,o),t.max=Math.max(t.max,o)}getMinMax(t,n){const r=this._cachedMeta,i=r._parsed,a=r._sorted&&t===r.iScale,o=i.length,u=this._getOtherScale(t),c=Gnt(n,r,this.chart),g={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:_,max:E}=Vnt(u);let C,O;function R(){O=i[C];const D=O[u.axis];return!rs(O[t.axis])||_>D||E<D}for(C=0;C<o&&!(!R()&&(this.updateRangeFromParsed(g,t,O,c),a));++C);if(a){for(C=o-1;C>=0;--C)if(!R()){this.updateRangeFromParsed(g,t,O,c);break}}return g}getAllParsedValues(t){const n=this._cachedMeta._parsed,r=[];let i,a,o;for(i=0,a=n.length;i<a;++i)o=n[i][t.axis],rs(o)&&r.push(o);return r}getMaxOverflow(){return!1}getLabelAndValue(t){const n=this._cachedMeta,r=n.iScale,i=n.vScale,a=this.getParsed(t);return{label:r?""+r.getLabelForValue(a[r.axis]):"",value:i?""+i.getLabelForValue(a[i.axis]):""}}_update(t){const n=this._cachedMeta;this.update(t||"default"),n._clip=znt(Hr(this.options.clip,Fnt(n.xScale,n.yScale,this.getMaxOverflow())))}update(t){}draw(){const t=this._ctx,n=this.chart,r=this._cachedMeta,i=r.data||[],a=n.chartArea,o=[],u=this._drawStart||0,c=this._drawCount||i.length-u,g=this.options.drawActiveElementsOnTop;let _;for(r.dataset&&r.dataset.draw(t,a,u,c),_=u;_<u+c;++_){const E=i[_];E.hidden||(E.active&&g?o.push(E):E.draw(t,a))}for(_=0;_<o.length;++_)o[_].draw(t,a)}getStyle(t,n){const r=n?"active":"default";return t===void 0&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(r):this.resolveDataElementOptions(t||0,r)}getContext(t,n,r){const i=this.getDataset();let a;if(t>=0&&t<this._cachedMeta.data.length){const o=this._cachedMeta.data[t];a=o.$context||(o.$context=qnt(this.getContext(),t,o)),a.parsed=this.getParsed(t),a.raw=i.data[t],a.index=a.dataIndex=t}else a=this.$context||(this.$context=jnt(this.chart.getContext(),this.index)),a.dataset=i,a.index=a.datasetIndex=this.index;return a.active=!!n,a.mode=r,a}resolveDatasetElementOptions(t){return this._resolveElementOptions(this.datasetElementType.id,t)}resolveDataElementOptions(t,n){return this._resolveElementOptions(this.dataElementType.id,n,t)}_resolveElementOptions(t,n="default",r){const i=n==="active",a=this._cachedDataOpts,o=t+"-"+n,u=a[o],c=this.enableOptionSharing&&uh(r);if(u)return x5(u,c);const g=this.chart.config,_=g.datasetElementScopeKeys(this._type,t),E=i?[`${t}Hover`,"hover",t,""]:[t,""],C=g.getOptionScopes(this.getDataset(),_),O=Object.keys(Ei.elements[t]),R=()=>this.getContext(r,i),D=g.resolveNamedOptions(C,O,R,E);return D.$shared&&(D.$shared=c,a[o]=Object.freeze(x5(D,c))),D}_resolveAnimations(t,n,r){const i=this.chart,a=this._cachedDataOpts,o=`animation-${n}`,u=a[o];if(u)return u;let c;if(i.options.animation!==!1){const _=this.chart.config,E=_.datasetAnimationScopeKeys(this._type,n),C=_.getOptionScopes(this.getDataset(),E);c=_.createResolver(C,this.getContext(t,r,n))}const g=new p5(i,c&&c.animations);return c&&c._cacheable&&(a[o]=Object.freeze(g)),g}getSharedOptions(t){if(!!t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,n){return!n||BL(t)||this.chart._animationsDisabled}_getSharedOptions(t,n){const r=this.resolveDataElementOptions(t,n),i=this._sharedOptions,a=this.getSharedOptions(r),o=this.includeOptions(n,a)||a!==i;return this.updateSharedOptions(a,n,r),{sharedOptions:a,includeOptions:o}}updateElement(t,n,r,i){BL(i)?Object.assign(t,r):this._resolveAnimations(n,i).update(t,r)}updateSharedOptions(t,n,r){t&&!BL(n)&&this._resolveAnimations(void 0,n).update(t,r)}_setStyle(t,n,r,i){t.active=i;const a=this.getStyle(n,i);this._resolveAnimations(n,r,i).update(t,{options:!i&&this.getSharedOptions(a)||a})}removeHoverStyle(t,n,r){this._setStyle(t,r,"active",!1)}setHoverStyle(t,n,r){this._setStyle(t,r,"active",!0)}_removeDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){const n=this._data,r=this._cachedMeta.data;for(const[u,c,g]of this._syncList)this[u](c,g);this._syncList=[];const i=r.length,a=n.length,o=Math.min(a,i);o&&this.parse(0,o),a>i?this._insertElements(i,a-i,t):a<i&&this._removeElements(a,i-a)}_insertElements(t,n,r=!0){const i=this._cachedMeta,a=i.data,o=t+n;let u;const c=g=>{for(g.length+=n,u=g.length-1;u>=o;u--)g[u]=g[u-n]};for(c(a),u=t;u<o;++u)a[u]=new this.dataElementType;this._parsing&&c(i._parsed),this.parse(t,n),r&&this.updateElements(a,t,n,"reset")}updateElements(t,n,r,i){}_removeElements(t,n){const r=this._cachedMeta;if(this._parsing){const i=r._parsed.splice(t,n);r._stacked&&pb(r,i)}r.data.splice(t,n)}_sync(t){if(this._parsing)this._syncList.push(t);else{const[n,r,i]=t;this[n](r,i)}this.chart._dataChanges.push([this.index,...t])}_onDataPush(){const t=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-t,t])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(t,n){n&&this._sync(["_removeElements",t,n]);const r=arguments.length-2;r&&this._sync(["_insertElements",t,r])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}cp.defaults={};cp.prototype.datasetElementType=null;cp.prototype.dataElementType=null;function Wnt(e,t){if(!e._cache.$bar){const n=e.getMatchingVisibleMetas(t);let r=[];for(let i=0,a=n.length;i<a;i++)r=r.concat(n[i].controller.getAllParsedValues(e));e._cache.$bar=IB(r.sort((i,a)=>i-a))}return e._cache.$bar}function Hnt(e){const t=e.iScale,n=Wnt(t,e.type);let r=t._length,i,a,o,u;const c=()=>{o===32767||o===-32768||(uh(u)&&(r=Math.min(r,Math.abs(o-u)||r)),u=o)};for(i=0,a=n.length;i<a;++i)o=t.getPixelForValue(n[i]),c();for(u=void 0,i=0,a=t.ticks.length;i<a;++i)o=t.getPixelForTick(i),c();return r}function Xnt(e,t,n,r){const i=n.barThickness;let a,o;return Di(i)?(a=t.min*n.categoryPercentage,o=n.barPercentage):(a=i*r,o=1),{chunk:a/r,ratio:o,start:t.pixels[e]-a/2}}function Ynt(e,t,n,r){const i=t.pixels,a=i[e];let o=e>0?i[e-1]:null,u=e<i.length-1?i[e+1]:null;const c=n.categoryPercentage;o===null&&(o=a-(u===null?t.end-t.start:u-a)),u===null&&(u=a+a-o);const g=a-(a-Math.min(o,u))/2*c;return{chunk:Math.abs(u-o)/2*c/r,ratio:n.barPercentage,start:g}}function Znt(e,t,n,r){const i=n.parse(e[0],r),a=n.parse(e[1],r),o=Math.min(i,a),u=Math.max(i,a);let c=o,g=u;Math.abs(o)>Math.abs(u)&&(c=u,g=o),t[n.axis]=g,t._custom={barStart:c,barEnd:g,start:i,end:a,min:o,max:u}}function b5(e,t,n,r){return Fo(e)?Znt(e,t,n,r):t[n.axis]=n.parse(e,r),t}function w5(e,t,n,r){const i=e.iScale,a=e.vScale,o=i.getLabels(),u=i===a,c=[];let g,_,E,C;for(g=n,_=n+r;g<_;++g)C=t[g],E={},E[i.axis]=u||i.parse(o[g],g),c.push(b5(C,E,a,g));return c}function UL(e){return e&&e.barStart!==void 0&&e.barEnd!==void 0}function Knt(e,t,n){return e!==0?ed(e):(t.isHorizontal()?1:-1)*(t.min>=n?1:-1)}function Jnt(e){let t,n,r,i,a;return e.horizontal?(t=e.base>e.x,n="left",r="right"):(t=e.base<e.y,n="bottom",r="top"),t?(i="end",a="start"):(i="start",a="end"),{start:n,end:r,reverse:t,top:i,bottom:a}}function Qnt(e,t,n,r){let i=t.borderSkipped;const a={};if(!i){e.borderSkipped=a;return}if(i===!0){e.borderSkipped={top:!0,right:!0,bottom:!0,left:!0};return}const{start:o,end:u,reverse:c,top:g,bottom:_}=Jnt(e);i==="middle"&&n&&(e.enableBorderRadius=!0,(n._top||0)===r?i=g:(n._bottom||0)===r?i=_:(a[S5(_,o,u,c)]=!0,i=g)),a[S5(i,o,u,c)]=!0,e.borderSkipped=a}function S5(e,t,n,r){return r?(e=trt(e,t,n),e=E5(e,n,t)):e=E5(e,t,n),e}function trt(e,t,n){return e===t?n:e===n?t:e}function E5(e,t,n){return e==="start"?t:e==="end"?n:e}function ert(e,{inflateAmount:t},n){e.inflateAmount=t==="auto"?n===1?.33:0:t}class s2 extends cp{parsePrimitiveData(t,n,r,i){return w5(t,n,r,i)}parseArrayData(t,n,r,i){return w5(t,n,r,i)}parseObjectData(t,n,r,i){const{iScale:a,vScale:o}=t,{xAxisKey:u="x",yAxisKey:c="y"}=this._parsing,g=a.axis==="x"?u:c,_=o.axis==="x"?u:c,E=[];let C,O,R,D;for(C=r,O=r+i;C<O;++C)D=n[C],R={},R[a.axis]=a.parse(Tm(D,g),C),E.push(b5(Tm(D,_),R,o,C));return E}updateRangeFromParsed(t,n,r,i){super.updateRangeFromParsed(t,n,r,i);const a=r._custom;a&&n===this._cachedMeta.vScale&&(t.min=Math.min(t.min,a.min),t.max=Math.max(t.max,a.max))}getMaxOverflow(){return 0}getLabelAndValue(t){const n=this._cachedMeta,{iScale:r,vScale:i}=n,a=this.getParsed(t),o=a._custom,u=UL(o)?"["+o.start+", "+o.end+"]":""+i.getLabelForValue(a[i.axis]);return{label:""+r.getLabelForValue(a[r.axis]),value:u}}initialize(){this.enableOptionSharing=!0,super.initialize();const t=this._cachedMeta;t.stack=this.getDataset().stack}update(t){const n=this._cachedMeta;this.updateElements(n.data,0,n.data.length,t)}updateElements(t,n,r,i){const a=i==="reset",{index:o,_cachedMeta:{vScale:u}}=this,c=u.getBasePixel(),g=u.isHorizontal(),_=this._getRuler(),{sharedOptions:E,includeOptions:C}=this._getSharedOptions(n,i);for(let O=n;O<n+r;O++){const R=this.getParsed(O),D=a||Di(R[u.axis])?{base:c,head:c}:this._calculateBarValuePixels(O),B=this._calculateBarIndexPixels(O,_),z=(R._stacks||{})[u.axis],k={horizontal:g,base:D.base,enableBorderRadius:!z||UL(R._custom)||o===z._top||o===z._bottom,x:g?D.head:B.center,y:g?B.center:D.head,height:g?B.size:Math.abs(D.size),width:g?Math.abs(D.size):B.size};C&&(k.options=E||this.resolveDataElementOptions(O,t[O].active?"active":i));const $=k.options||t[O].options;Qnt(k,$,z,o),ert(k,$,_.ratio),this.updateElement(t[O],O,k,i)}}_getStacks(t,n){const{iScale:r}=this._cachedMeta,i=r.getMatchingVisibleMetas(this._type).filter(c=>c.controller.options.grouped),a=r.options.stacked,o=[],u=c=>{const g=c.controller.getParsed(n),_=g&&g[c.vScale.axis];if(Di(_)||isNaN(_))return!0};for(const c of i)if(!(n!==void 0&&u(c))&&((a===!1||o.indexOf(c.stack)===-1||a===void 0&&c.stack===void 0)&&o.push(c.stack),c.index===t))break;return o.length||o.push(void 0),o}_getStackCount(t){return this._getStacks(void 0,t).length}_getStackIndex(t,n,r){const i=this._getStacks(t,r),a=n!==void 0?i.indexOf(n):-1;return a===-1?i.length-1:a}_getRuler(){const t=this.options,n=this._cachedMeta,r=n.iScale,i=[];let a,o;for(a=0,o=n.data.length;a<o;++a)i.push(r.getPixelForValue(this.getParsed(a)[r.axis],a));const u=t.barThickness;return{min:u||Hnt(n),pixels:i,start:r._startPixel,end:r._endPixel,stackCount:this._getStackCount(),scale:r,grouped:t.grouped,ratio:u?1:t.categoryPercentage*t.barPercentage}}_calculateBarValuePixels(t){const{_cachedMeta:{vScale:n,_stacked:r},options:{base:i,minBarLength:a}}=this,o=i||0,u=this.getParsed(t),c=u._custom,g=UL(c);let _=u[n.axis],E=0,C=r?this.applyStack(n,u,r):_,O,R;C!==_&&(E=C-_,C=_),g&&(_=c.barStart,C=c.barEnd-c.barStart,_!==0&&ed(_)!==ed(c.barEnd)&&(E=0),E+=_);const D=!Di(i)&&!g?i:E;let B=n.getPixelForValue(D);if(this.chart.getDataVisibility(t)?O=n.getPixelForValue(E+C):O=B,R=O-B,Math.abs(R)<a){R=Knt(R,n,o)*a,_===o&&(B-=R/2);const z=n.getPixelForDecimal(0),k=n.getPixelForDecimal(1),$=Math.min(z,k),K=Math.max(z,k);B=Math.max(Math.min(B,K),$),O=B+R}if(B===n.getPixelForValue(o)){const z=ed(R)*n.getLineWidthForValue(o)/2;B+=z,R-=z}return{size:R,base:B,head:O,center:O+R/2}}_calculateBarIndexPixels(t,n){const r=n.scale,i=this.options,a=i.skipNull,o=Hr(i.maxBarThickness,1/0);let u,c;if(n.grouped){const g=a?this._getStackCount(t):n.stackCount,_=i.barThickness==="flex"?Ynt(t,n,i,g):Xnt(t,n,i,g),E=this._getStackIndex(this.index,this._cachedMeta.stack,a?t:void 0);u=_.start+_.chunk*E+_.chunk/2,c=Math.min(o,_.chunk*_.ratio)}else u=r.getPixelForValue(this.getParsed(t)[r.axis],t),c=Math.min(o,n.min*n.ratio);return{base:u-c/2,head:u+c/2,center:u,size:c}}draw(){const t=this._cachedMeta,n=t.vScale,r=t.data,i=r.length;let a=0;for(;a<i;++a)this.getParsed(a)[n.axis]!==null&&r[a].draw(this._ctx)}}s2.id="bar";s2.defaults={datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}};s2.overrides={scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}};class u2 extends cp{initialize(){this.enableOptionSharing=!0,super.initialize()}parsePrimitiveData(t,n,r,i){const a=super.parsePrimitiveData(t,n,r,i);for(let o=0;o<a.length;o++)a[o]._custom=this.resolveDataElementOptions(o+r).radius;return a}parseArrayData(t,n,r,i){const a=super.parseArrayData(t,n,r,i);for(let o=0;o<a.length;o++){const u=n[r+o];a[o]._custom=Hr(u[2],this.resolveDataElementOptions(o+r).radius)}return a}parseObjectData(t,n,r,i){const a=super.parseObjectData(t,n,r,i);for(let o=0;o<a.length;o++){const u=n[r+o];a[o]._custom=Hr(u&&u.r&&+u.r,this.resolveDataElementOptions(o+r).radius)}return a}getMaxOverflow(){const t=this._cachedMeta.data;let n=0;for(let r=t.length-1;r>=0;--r)n=Math.max(n,t[r].size(this.resolveDataElementOptions(r))/2);return n>0&&n}getLabelAndValue(t){const n=this._cachedMeta,{xScale:r,yScale:i}=n,a=this.getParsed(t),o=r.getLabelForValue(a.x),u=i.getLabelForValue(a.y),c=a._custom;return{label:n.label,value:"("+o+", "+u+(c?", "+c:"")+")"}}update(t){const n=this._cachedMeta.data;this.updateElements(n,0,n.length,t)}updateElements(t,n,r,i){const a=i==="reset",{iScale:o,vScale:u}=this._cachedMeta,{sharedOptions:c,includeOptions:g}=this._getSharedOptions(n,i),_=o.axis,E=u.axis;for(let C=n;C<n+r;C++){const O=t[C],R=!a&&this.getParsed(C),D={},B=D[_]=a?o.getPixelForDecimal(.5):o.getPixelForValue(R[_]),z=D[E]=a?u.getBasePixel():u.getPixelForValue(R[E]);D.skip=isNaN(B)||isNaN(z),g&&(D.options=c||this.resolveDataElementOptions(C,O.active?"active":i),a&&(D.options.radius=0)),this.updateElement(O,C,D,i)}}resolveDataElementOptions(t,n){const r=this.getParsed(t);let i=super.resolveDataElementOptions(t,n);i.$shared&&(i=Object.assign({},i,{$shared:!1}));const a=i.radius;return n!=="active"&&(i.radius=0),i.radius+=Hr(r&&r._custom,a),i}}u2.id="bubble";u2.defaults={datasetElementType:!1,dataElementType:"point",animations:{numbers:{type:"number",properties:["x","y","borderWidth","radius"]}}};u2.overrides={scales:{x:{type:"linear"},y:{type:"linear"}},plugins:{tooltip:{callbacks:{title(){return""}}}}};function nrt(e,t,n){let r=1,i=1,a=0,o=0;if(t<xo){const u=e,c=u+t,g=Math.cos(u),_=Math.sin(u),E=Math.cos(c),C=Math.sin(c),O=($,K,et)=>ib($,u,c,!0)?1:Math.max(K,K*n,et,et*n),R=($,K,et)=>ib($,u,c,!0)?-1:Math.min(K,K*n,et,et*n),D=O(0,g,E),B=O(ja,_,C),z=R(pa,g,E),k=R(pa+ja,_,C);r=(D-z)/2,i=(B-k)/2,a=-(D+z)/2,o=-(B+k)/2}return{ratioX:r,ratioY:i,offsetX:a,offsetY:o}}class S0 extends cp{constructor(t,n){super(t,n);this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(t,n){const r=this.getDataset().data,i=this._cachedMeta;if(this._parsing===!1)i._parsed=r;else{let a=c=>+r[c];if(_i(r[t])){const{key:c="value"}=this._parsing;a=g=>+Tm(r[g],c)}let o,u;for(o=t,u=t+n;o<u;++o)i._parsed[o]=a(o)}}_getRotation(){return lp(this.options.rotation-90)}_getCircumference(){return lp(this.options.circumference)}_getRotationExtents(){let t=xo,n=-xo;for(let r=0;r<this.chart.data.datasets.length;++r)if(this.chart.isDatasetVisible(r)){const i=this.chart.getDatasetMeta(r).controller,a=i._getRotation(),o=i._getCircumference();t=Math.min(t,a),n=Math.max(n,a+o)}return{rotation:t,circumference:n-t}}update(t){const n=this.chart,{chartArea:r}=n,i=this._cachedMeta,a=i.data,o=this.getMaxBorderWidth()+this.getMaxOffset(a)+this.options.spacing,u=Math.max((Math.min(r.width,r.height)-o)/2,0),c=Math.min(Ztt(this.options.cutout,u),1),g=this._getRingWeight(this.index),{circumference:_,rotation:E}=this._getRotationExtents(),{ratioX:C,ratioY:O,offsetX:R,offsetY:D}=nrt(E,_,c),B=(r.width-o)/C,z=(r.height-o)/O,k=Math.max(Math.min(B,z)/2,0),$=gB(this.options.radius,k),K=Math.max($*c,0),et=($-K)/this._getVisibleDatasetWeightTotal();this.offsetX=R*$,this.offsetY=D*$,i.total=this.calculateTotal(),this.outerRadius=$-et*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-et*g,0),this.updateElements(a,0,a.length,t)}_circumference(t,n){const r=this.options,i=this._cachedMeta,a=this._getCircumference();return n&&r.animation.animateRotate||!this.chart.getDataVisibility(t)||i._parsed[t]===null||i.data[t].hidden?0:this.calculateCircumference(i._parsed[t]*a/xo)}updateElements(t,n,r,i){const a=i==="reset",o=this.chart,u=o.chartArea,g=o.options.animation,_=(u.left+u.right)/2,E=(u.top+u.bottom)/2,C=a&&g.animateScale,O=C?0:this.innerRadius,R=C?0:this.outerRadius,{sharedOptions:D,includeOptions:B}=this._getSharedOptions(n,i);let z=this._getRotation(),k;for(k=0;k<n;++k)z+=this._circumference(k,a);for(k=n;k<n+r;++k){const $=this._circumference(k,a),K=t[k],et={x:_+this.offsetX,y:E+this.offsetY,startAngle:z,endAngle:z+$,circumference:$,outerRadius:R,innerRadius:O};B&&(et.options=D||this.resolveDataElementOptions(k,K.active?"active":i)),z+=$,this.updateElement(K,k,et,i)}}calculateTotal(){const t=this._cachedMeta,n=t.data;let r=0,i;for(i=0;i<n.length;i++){const a=t._parsed[i];a!==null&&!isNaN(a)&&this.chart.getDataVisibility(i)&&!n[i].hidden&&(r+=Math.abs(a))}return r}calculateCircumference(t){const n=this._cachedMeta.total;return n>0&&!isNaN(t)?xo*(Math.abs(t)/n):0}getLabelAndValue(t){const n=this._cachedMeta,r=this.chart,i=r.data.labels||[],a=hb(n._parsed[t],r.options.locale);return{label:i[t]||"",value:a}}getMaxBorderWidth(t){let n=0;const r=this.chart;let i,a,o,u,c;if(!t){for(i=0,a=r.data.datasets.length;i<a;++i)if(r.isDatasetVisible(i)){o=r.getDatasetMeta(i),t=o.data,u=o.controller;break}}if(!t)return 0;for(i=0,a=t.length;i<a;++i)c=u.resolveDataElementOptions(i),c.borderAlign!=="inner"&&(n=Math.max(n,c.borderWidth||0,c.hoverBorderWidth||0));return n}getMaxOffset(t){let n=0;for(let r=0,i=t.length;r<i;++r){const a=this.resolveDataElementOptions(r);n=Math.max(n,a.offset||0,a.hoverOffset||0)}return n}_getRingWeightOffset(t){let n=0;for(let r=0;r<t;++r)this.chart.isDatasetVisible(r)&&(n+=this._getRingWeight(r));return n}_getRingWeight(t){return Math.max(Hr(this.chart.data.datasets[t].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}S0.id="doughnut";S0.defaults={datasetElementType:!1,dataElementType:"arc",animation:{animateRotate:!0,animateScale:!1},animations:{numbers:{type:"number",properties:["circumference","endAngle","innerRadius","outerRadius","startAngle","x","y","offset","borderWidth","spacing"]}},cutout:"50%",rotation:0,circumference:360,radius:"100%",spacing:0,indexAxis:"r"};S0.descriptors={_scriptable:e=>e!=="spacing",_indexable:e=>e!=="spacing"};S0.overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(e){const t=e.data;if(t.labels.length&&t.datasets.length){const{labels:{pointStyle:n}}=e.legend.options;return t.labels.map((r,i)=>{const o=e.getDatasetMeta(0).controller.getStyle(i);return{text:r,fillStyle:o.backgroundColor,strokeStyle:o.borderColor,lineWidth:o.borderWidth,pointStyle:n,hidden:!e.getDataVisibility(i),index:i}})}return[]}},onClick(e,t,n){n.chart.toggleDataVisibility(t.index),n.chart.update()}},tooltip:{callbacks:{title(){return""},label(e){let t=e.label;const n=": "+e.formattedValue;return Fo(t)?(t=t.slice(),t[0]+=n):t+=n,t}}}}};class l2 extends cp{initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(t){const n=this._cachedMeta,{dataset:r,data:i=[],_dataset:a}=n,o=this.chart._animationsDisabled;let{start:u,count:c}=MB(n,i,o);this._drawStart=u,this._drawCount=c,AB(n)&&(u=0,c=i.length),r._chart=this.chart,r._datasetIndex=this.index,r._decimated=!!a._decimated,r.points=i;const g=this.resolveDatasetElementOptions(t);this.options.showLine||(g.borderWidth=0),g.segment=this.options.segment,this.updateElement(r,void 0,{animated:!o,options:g},t),this.updateElements(i,u,c,t)}updateElements(t,n,r,i){const a=i==="reset",{iScale:o,vScale:u,_stacked:c,_dataset:g}=this._cachedMeta,{sharedOptions:_,includeOptions:E}=this._getSharedOptions(n,i),C=o.axis,O=u.axis,{spanGaps:R,segment:D}=this.options,B=y0(R)?R:Number.POSITIVE_INFINITY,z=this.chart._animationsDisabled||a||i==="none";let k=n>0&&this.getParsed(n-1);for(let $=n;$<n+r;++$){const K=t[$],et=this.getParsed($),mt=z?K:{},wt=Di(et[O]),Ot=mt[C]=o.getPixelForValue(et[C],$),Bt=mt[O]=a||wt?u.getBasePixel():u.getPixelForValue(c?this.applyStack(u,et,c):et[O],$);mt.skip=isNaN(Ot)||isNaN(Bt)||wt,mt.stop=$>0&&Math.abs(et[C]-k[C])>B,D&&(mt.parsed=et,mt.raw=g.data[$]),E&&(mt.options=_||this.resolveDataElementOptions($,K.active?"active":i)),z||this.updateElement(K,$,mt,i),k=et}}getMaxOverflow(){const t=this._cachedMeta,n=t.dataset,r=n.options&&n.options.borderWidth||0,i=t.data||[];if(!i.length)return r;const a=i[0].size(this.resolveDataElementOptions(0)),o=i[i.length-1].size(this.resolveDataElementOptions(i.length-1));return Math.max(r,a,o)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}}l2.id="line";l2.defaults={datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1};l2.overrides={scales:{_index_:{type:"category"},_value_:{type:"linear"}}};class c2 extends cp{constructor(t,n){super(t,n);this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(t){const n=this._cachedMeta,r=this.chart,i=r.data.labels||[],a=hb(n._parsed[t].r,r.options.locale);return{label:i[t]||"",value:a}}parseObjectData(t,n,r,i){return JB.bind(this)(t,n,r,i)}update(t){const n=this._cachedMeta.data;this._updateRadius(),this.updateElements(n,0,n.length,t)}getMinMax(){const t=this._cachedMeta,n={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return t.data.forEach((r,i)=>{const a=this.getParsed(i).r;!isNaN(a)&&this.chart.getDataVisibility(i)&&(a<n.min&&(n.min=a),a>n.max&&(n.max=a))}),n}_updateRadius(){const t=this.chart,n=t.chartArea,r=t.options,i=Math.min(n.right-n.left,n.bottom-n.top),a=Math.max(i/2,0),o=Math.max(r.cutoutPercentage?a/100*r.cutoutPercentage:1,0),u=(a-o)/t.getVisibleDatasetCount();this.outerRadius=a-u*this.index,this.innerRadius=this.outerRadius-u}updateElements(t,n,r,i){const a=i==="reset",o=this.chart,c=o.options.animation,g=this._cachedMeta.rScale,_=g.xCenter,E=g.yCenter,C=g.getIndexAngle(0)-.5*pa;let O=C,R;const D=360/this.countVisibleElements();for(R=0;R<n;++R)O+=this._computeAngle(R,i,D);for(R=n;R<n+r;R++){const B=t[R];let z=O,k=O+this._computeAngle(R,i,D),$=o.getDataVisibility(R)?g.getDistanceFromCenterForValue(this.getParsed(R).r):0;O=k,a&&(c.animateScale&&($=0),c.animateRotate&&(z=k=C));const K={x:_,y:E,innerRadius:0,outerRadius:$,startAngle:z,endAngle:k,options:this.resolveDataElementOptions(R,B.active?"active":i)};this.updateElement(B,R,K,i)}}countVisibleElements(){const t=this._cachedMeta;let n=0;return t.data.forEach((r,i)=>{!isNaN(this.getParsed(i).r)&&this.chart.getDataVisibility(i)&&n++}),n}_computeAngle(t,n,r){return this.chart.getDataVisibility(t)?lp(this.resolveDataElementOptions(t,n).angle||r):0}}c2.id="polarArea";c2.defaults={dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0};c2.overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(e){const t=e.data;if(t.labels.length&&t.datasets.length){const{labels:{pointStyle:n}}=e.legend.options;return t.labels.map((r,i)=>{const o=e.getDatasetMeta(0).controller.getStyle(i);return{text:r,fillStyle:o.backgroundColor,strokeStyle:o.borderColor,lineWidth:o.borderWidth,pointStyle:n,hidden:!e.getDataVisibility(i),index:i}})}return[]}},onClick(e,t,n){n.chart.toggleDataVisibility(t.index),n.chart.update()}},tooltip:{callbacks:{title(){return""},label(e){return e.chart.data.labels[e.dataIndex]+": "+e.formattedValue}}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}};class VL extends S0{}VL.id="pie";VL.defaults={cutout:0,rotation:0,circumference:360,radius:"100%"};class f2 extends cp{getLabelAndValue(t){const n=this._cachedMeta.vScale,r=this.getParsed(t);return{label:n.getLabels()[t],value:""+n.getLabelForValue(r[n.axis])}}parseObjectData(t,n,r,i){return JB.bind(this)(t,n,r,i)}update(t){const n=this._cachedMeta,r=n.dataset,i=n.data||[],a=n.iScale.getLabels();if(r.points=i,t!=="resize"){const o=this.resolveDatasetElementOptions(t);this.options.showLine||(o.borderWidth=0);const u={_loop:!0,_fullLoop:a.length===i.length,options:o};this.updateElement(r,void 0,u,t)}this.updateElements(i,0,i.length,t)}updateElements(t,n,r,i){const a=this._cachedMeta.rScale,o=i==="reset";for(let u=n;u<n+r;u++){const c=t[u],g=this.resolveDataElementOptions(u,c.active?"active":i),_=a.getPointPositionForValue(u,this.getParsed(u).r),E=o?a.xCenter:_.x,C=o?a.yCenter:_.y,O={x:E,y:C,angle:_.angle,skip:isNaN(E)||isNaN(C),options:g};this.updateElement(c,u,O,i)}}}f2.id="radar";f2.defaults={datasetElementType:"line",dataElementType:"point",indexAxis:"r",showLine:!0,elements:{line:{fill:"start"}}};f2.overrides={aspectRatio:1,scales:{r:{type:"radialLinear"}}};class fp{constructor(){this.x=void 0,this.y=void 0,this.active=!1,this.options=void 0,this.$animations=void 0}tooltipPosition(t){const{x:n,y:r}=this.getProps(["x","y"],t);return{x:n,y:r}}hasValue(){return y0(this.x)&&y0(this.y)}getProps(t,n){const r=this.$animations;if(!n||!r)return this;const i={};return t.forEach(a=>{i[a]=r[a]&&r[a].active()?r[a]._to:this[a]}),i}}fp.defaults={};fp.defaultRoutes=void 0;const C5={values(e){return Fo(e)?e:""+e},numeric(e,t,n){if(e===0)return"0";const r=this.chart.options.locale;let i,a=e;if(n.length>1){const g=Math.max(Math.abs(n[0].value),Math.abs(n[n.length-1].value));(g<1e-4||g>1e15)&&(i="scientific"),a=rrt(e,n)}const o=lh(Math.abs(a)),u=Math.max(Math.min(-1*Math.floor(o),20),0),c={notation:i,minimumFractionDigits:u,maximumFractionDigits:u};return Object.assign(c,this.options.ticks.format),hb(e,r,c)},logarithmic(e,t,n){if(e===0)return"0";const r=e/Math.pow(10,Math.floor(lh(e)));return r===1||r===2||r===5?C5.numeric.call(this,e,t,n):""}};function rrt(e,t){let n=t.length>3?t[2].value-t[1].value:t[1].value-t[0].value;return Math.abs(n)>=1&&e!==Math.floor(e)&&(n=e-Math.floor(e)),n}var h2={formatters:C5};Ei.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",grace:0,grid:{display:!0,lineWidth:1,drawBorder:!0,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(e,t)=>t.lineWidth,tickColor:(e,t)=>t.color,offset:!1,borderDash:[],borderDashOffset:0,borderWidth:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:h2.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}});Ei.route("scale.ticks","color","","color");Ei.route("scale.grid","color","","borderColor");Ei.route("scale.grid","borderColor","","borderColor");Ei.route("scale.title","color","","color");Ei.describe("scale",{_fallback:!1,_scriptable:e=>!e.startsWith("before")&&!e.startsWith("after")&&e!=="callback"&&e!=="parser",_indexable:e=>e!=="borderDash"&&e!=="tickBorderDash"});Ei.describe("scales",{_fallback:"scale"});Ei.describe("scale.ticks",{_scriptable:e=>e!=="backdropPadding"&&e!=="callback",_indexable:e=>e!=="backdropPadding"});function irt(e,t){const n=e.options.ticks,r=n.maxTicksLimit||ort(e),i=n.major.enabled?srt(t):[],a=i.length,o=i[0],u=i[a-1],c=[];if(a>r)return urt(t,c,i,a/r),c;const g=art(i,t,r);if(a>0){let _,E;const C=a>1?Math.round((u-o)/(a-1)):null;for(p2(t,c,g,Di(C)?0:o-C,o),_=0,E=a-1;_<E;_++)p2(t,c,g,i[_],i[_+1]);return p2(t,c,g,u,Di(C)?t.length:u+C),c}return p2(t,c,g),c}function ort(e){const t=e.options.offset,n=e._tickSize(),r=e._length/n+(t?0:1),i=e._maxLength/n;return Math.floor(Math.min(r,i))}function art(e,t,n){const r=lrt(e),i=t.length/n;if(!r)return Math.max(i,1);const a=iet(r);for(let o=0,u=a.length-1;o<u;o++){const c=a[o];if(c>i)return c}return Math.max(i,1)}function srt(e){const t=[];let n,r;for(n=0,r=e.length;n<r;n++)e[n].major&&t.push(n);return t}function urt(e,t,n,r){let i=0,a=n[0],o;for(r=Math.ceil(r),o=0;o<e.length;o++)o===a&&(t.push(e[o]),i++,a=n[i*r])}function p2(e,t,n,r,i){const a=Hr(r,0),o=Math.min(Hr(i,e.length),e.length);let u=0,c,g,_;for(n=Math.ceil(n),i&&(c=i-r,n=c/Math.floor(c/n)),_=a;_<0;)u++,_=Math.round(a+u*n);for(g=Math.max(a,0);g<o;g++)g===_&&(t.push(e[g]),u++,_=Math.round(a+u*n))}function lrt(e){const t=e.length;let n,r;if(t<2)return!1;for(r=e[0],n=1;n<t;++n)if(e[n]-e[n-1]!==r)return!1;return r}const crt=e=>e==="left"?"right":e==="right"?"left":e,I5=(e,t,n)=>t==="top"||t==="left"?e[t]+n:e[t]-n;function P5(e,t){const n=[],r=e.length/t,i=e.length;let a=0;for(;a<i;a+=r)n.push(e[Math.floor(a)]);return n}function frt(e,t,n){const r=e.ticks.length,i=Math.min(t,r-1),a=e._startPixel,o=e._endPixel,u=1e-6;let c=e.getPixelForTick(i),g;if(!(n&&(r===1?g=Math.max(c-a,o-c):t===0?g=(e.getPixelForTick(1)-c)/2:g=(c-e.getPixelForTick(i-1))/2,c+=i<t?g:-g,c<a-u||c>o+u)))return c}function hrt(e,t){ho(e,n=>{const r=n.gc,i=r.length/2;let a;if(i>t){for(a=0;a<i;++a)delete n.data[r[a]];r.splice(0,i)}})}function db(e){return e.drawTicks?e.tickLength:0}function T5(e,t){if(!e.display)return 0;const n=Ds(e.font,t),r=ul(e.padding);return(Fo(e.text)?e.text.length:1)*n.lineHeight+r.height}function prt(e,t){return Om(e,{scale:t,type:"scale"})}function drt(e,t,n){return Om(e,{tick:n,index:t,type:"tick"})}function grt(e,t,n){let r=wL(e);return(n&&t!=="right"||!n&&t==="right")&&(r=crt(r)),r}function mrt(e,t,n,r){const{top:i,left:a,bottom:o,right:u,chart:c}=e,{chartArea:g,scales:_}=c;let E=0,C,O,R;const D=o-i,B=u-a;if(e.isHorizontal()){if(O=sl(r,a,u),_i(n)){const z=Object.keys(n)[0],k=n[z];R=_[z].getPixelForValue(k)+D-t}else n==="center"?R=(g.bottom+g.top)/2+D-t:R=I5(e,n,t);C=u-a}else{if(_i(n)){const z=Object.keys(n)[0],k=n[z];O=_[z].getPixelForValue(k)-B+t}else n==="center"?O=(g.left+g.right)/2-B+t:O=I5(e,n,t);R=sl(r,o,i),E=n==="left"?-ja:ja}return{titleX:O,titleY:R,maxWidth:C,rotation:E}}class ay extends fp{constructor(t){super();this.id=t.id,this.type=t.type,this.options=void 0,this.ctx=t.ctx,this.chart=t.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(t){this.options=t.setContext(this.getContext()),this.axis=t.axis,this._userMin=this.parse(t.min),this._userMax=this.parse(t.max),this._suggestedMin=this.parse(t.suggestedMin),this._suggestedMax=this.parse(t.suggestedMax)}parse(t,n){return t}getUserBounds(){let{_userMin:t,_userMax:n,_suggestedMin:r,_suggestedMax:i}=this;return t=sh(t,Number.POSITIVE_INFINITY),n=sh(n,Number.NEGATIVE_INFINITY),r=sh(r,Number.POSITIVE_INFINITY),i=sh(i,Number.NEGATIVE_INFINITY),{min:sh(t,r),max:sh(n,i),minDefined:rs(t),maxDefined:rs(n)}}getMinMax(t){let{min:n,max:r,minDefined:i,maxDefined:a}=this.getUserBounds(),o;if(i&&a)return{min:n,max:r};const u=this.getMatchingVisibleMetas();for(let c=0,g=u.length;c<g;++c)o=u[c].controller.getMinMax(this,t),i||(n=Math.min(n,o.min)),a||(r=Math.max(r,o.max));return n=a&&n>r?r:n,r=i&&n>r?n:r,{min:sh(n,sh(r,n)),max:sh(r,sh(n,r))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){zo(this.options.beforeUpdate,[this])}update(t,n,r){const{beginAtZero:i,grace:a,ticks:o}=this.options,u=o.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=n,this._margins=r=Object.assign({left:0,right:0,top:0,bottom:0},r),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+r.left+r.right:this.height+r.top+r.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=Xet(this,a,i),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const c=u<this.ticks.length;this._convertTicksToLabels(c?P5(this.ticks,u):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),o.display&&(o.autoSkip||o.source==="auto")&&(this.ticks=irt(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),c&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let t=this.options.reverse,n,r;this.isHorizontal()?(n=this.left,r=this.right):(n=this.top,r=this.bottom,t=!t),this._startPixel=n,this._endPixel=r,this._reversePixels=t,this._length=r-n,this._alignToPixels=this.options.alignToPixels}afterUpdate(){zo(this.options.afterUpdate,[this])}beforeSetDimensions(){zo(this.options.beforeSetDimensions,[this])}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=0,this.right=this.width):(this.height=this.maxHeight,this.top=0,this.bottom=this.height),this.paddingLeft=0,this.paddingTop=0,this.paddingRight=0,this.paddingBottom=0}afterSetDimensions(){zo(this.options.afterSetDimensions,[this])}_callHooks(t){this.chart.notifyPlugins(t,this.getContext()),zo(this.options[t],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){zo(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(t){const n=this.options.ticks;let r,i,a;for(r=0,i=t.length;r<i;r++)a=t[r],a.label=zo(n.callback,[a.value,r,t],this)}afterTickToLabelConversion(){zo(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){zo(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const t=this.options,n=t.ticks,r=this.ticks.length,i=n.minRotation||0,a=n.maxRotation;let o=i,u,c,g;if(!this._isVisible()||!n.display||i>=a||r<=1||!this.isHorizontal()){this.labelRotation=i;return}const _=this._getLabelSizes(),E=_.widest.width,C=_.highest.height,O=au(this.chart.width-E,0,this.maxWidth);u=t.offset?this.maxWidth/r:O/(r-1),E+6>u&&(u=O/(r-(t.offset?.5:1)),c=this.maxHeight-db(t.grid)-n.padding-T5(t.title,this.chart.options.font),g=Math.sqrt(E*E+C*C),o=_L(Math.min(Math.asin(au((_.highest.height+6)/u,-1,1)),Math.asin(au(c/g,-1,1))-Math.asin(au(C/g,-1,1)))),o=Math.max(i,Math.min(a,o))),this.labelRotation=o}afterCalculateLabelRotation(){zo(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){zo(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:n,options:{ticks:r,title:i,grid:a}}=this,o=this._isVisible(),u=this.isHorizontal();if(o){const c=T5(i,n.options.font);if(u?(t.width=this.maxWidth,t.height=db(a)+c):(t.height=this.maxHeight,t.width=db(a)+c),r.display&&this.ticks.length){const{first:g,last:_,widest:E,highest:C}=this._getLabelSizes(),O=r.padding*2,R=lp(this.labelRotation),D=Math.cos(R),B=Math.sin(R);if(u){const z=r.mirror?0:B*E.width+D*C.height;t.height=Math.min(this.maxHeight,t.height+z+O)}else{const z=r.mirror?0:D*E.width+B*C.height;t.width=Math.min(this.maxWidth,t.width+z+O)}this._calculatePadding(g,_,B,D)}}this._handleMargins(),u?(this.width=this._length=n.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=n.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,n,r,i){const{ticks:{align:a,padding:o},position:u}=this.options,c=this.labelRotation!==0,g=u!=="top"&&this.axis==="x";if(this.isHorizontal()){const _=this.getPixelForTick(0)-this.left,E=this.right-this.getPixelForTick(this.ticks.length-1);let C=0,O=0;c?g?(C=i*t.width,O=r*n.height):(C=r*t.height,O=i*n.width):a==="start"?O=n.width:a==="end"?C=t.width:a!=="inner"&&(C=t.width/2,O=n.width/2),this.paddingLeft=Math.max((C-_+o)*this.width/(this.width-_),0),this.paddingRight=Math.max((O-E+o)*this.width/(this.width-E),0)}else{let _=n.height/2,E=t.height/2;a==="start"?(_=0,E=t.height):a==="end"&&(_=n.height,E=0),this.paddingTop=_+o,this.paddingBottom=E+o}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){zo(this.options.afterFit,[this])}isHorizontal(){const{axis:t,position:n}=this.options;return n==="top"||n==="bottom"||t==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){this.beforeTickToLabelConversion(),this.generateTickLabels(t);let n,r;for(n=0,r=t.length;n<r;n++)Di(t[n].label)&&(t.splice(n,1),r--,n--);this.afterTickToLabelConversion()}_getLabelSizes(){let t=this._labelSizes;if(!t){const n=this.options.ticks.sampleSize;let r=this.ticks;n<r.length&&(r=P5(r,n)),this._labelSizes=t=this._computeLabelSizes(r,r.length)}return t}_computeLabelSizes(t,n){const{ctx:r,_longestTextCache:i}=this,a=[],o=[];let u=0,c=0,g,_,E,C,O,R,D,B,z,k,$;for(g=0;g<n;++g){if(C=t[g].label,O=this._resolveTickFontOptions(g),r.font=R=O.string,D=i[R]=i[R]||{data:{},gc:[]},B=O.lineHeight,z=k=0,!Di(C)&&!Fo(C))z=e2(r,D.data,D.gc,z,C),k=B;else if(Fo(C))for(_=0,E=C.length;_<E;++_)$=C[_],!Di($)&&!Fo($)&&(z=e2(r,D.data,D.gc,z,$),k+=B);a.push(z),o.push(k),u=Math.max(z,u),c=Math.max(k,c)}hrt(i,n);const K=a.indexOf(u),et=o.indexOf(c),mt=wt=>({width:a[wt]||0,height:o[wt]||0});return{first:mt(0),last:mt(n-1),widest:mt(K),highest:mt(et),widths:a,heights:o}}getLabelForValue(t){return t}getPixelForValue(t,n){return NaN}getValueForPixel(t){}getPixelForTick(t){const n=this.ticks;return t<0||t>n.length-1?null:this.getPixelForValue(n[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);const n=this._startPixel+t*this._length;return set(this._alignToPixels?ty(this.chart,n,0):n)}getDecimalForPixel(t){const n=(t-this._startPixel)/this._length;return this._reversePixels?1-n:n}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:t,max:n}=this;return t<0&&n<0?n:t>0&&n>0?t:0}getContext(t){const n=this.ticks||[];if(t>=0&&t<n.length){const r=n[t];return r.$context||(r.$context=drt(this.getContext(),t,r))}return this.$context||(this.$context=prt(this.chart.getContext(),this))}_tickSize(){const t=this.options.ticks,n=lp(this.labelRotation),r=Math.abs(Math.cos(n)),i=Math.abs(Math.sin(n)),a=this._getLabelSizes(),o=t.autoSkipPadding||0,u=a?a.widest.width+o:0,c=a?a.highest.height+o:0;return this.isHorizontal()?c*r>u*i?u/r:c/i:c*i<u*r?c/r:u/i}_isVisible(){const t=this.options.display;return t!=="auto"?!!t:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(t){const n=this.axis,r=this.chart,i=this.options,{grid:a,position:o}=i,u=a.offset,c=this.isHorizontal(),_=this.ticks.length+(u?1:0),E=db(a),C=[],O=a.setContext(this.getContext()),R=O.drawBorder?O.borderWidth:0,D=R/2,B=function(he){return ty(r,he,R)};let z,k,$,K,et,mt,wt,Ot,Bt,se,_e,Ne;if(o==="top")z=B(this.bottom),mt=this.bottom-E,Ot=z-D,se=B(t.top)+D,Ne=t.bottom;else if(o==="bottom")z=B(this.top),se=t.top,Ne=B(t.bottom)-D,mt=z+D,Ot=this.top+E;else if(o==="left")z=B(this.right),et=this.right-E,wt=z-D,Bt=B(t.left)+D,_e=t.right;else if(o==="right")z=B(this.left),Bt=t.left,_e=B(t.right)-D,et=z+D,wt=this.left+E;else if(n==="x"){if(o==="center")z=B((t.top+t.bottom)/2+.5);else if(_i(o)){const he=Object.keys(o)[0],Ge=o[he];z=B(this.chart.scales[he].getPixelForValue(Ge))}se=t.top,Ne=t.bottom,mt=z+D,Ot=mt+E}else if(n==="y"){if(o==="center")z=B((t.left+t.right)/2);else if(_i(o)){const he=Object.keys(o)[0],Ge=o[he];z=B(this.chart.scales[he].getPixelForValue(Ge))}et=z-D,wt=et-E,Bt=t.left,_e=t.right}const He=Hr(i.ticks.maxTicksLimit,_),de=Math.max(1,Math.ceil(_/He));for(k=0;k<_;k+=de){const he=a.setContext(this.getContext(k)),Ge=he.lineWidth,Yt=he.color,te=he.borderDash||[],ve=he.borderDashOffset,Wt=he.tickWidth,be=he.tickColor,De=he.tickBorderDash||[],Fn=he.tickBorderDashOffset;$=frt(this,k,u),$!==void 0&&(K=ty(r,$,Ge),c?et=wt=Bt=_e=K:mt=Ot=se=Ne=K,C.push({tx1:et,ty1:mt,tx2:wt,ty2:Ot,x1:Bt,y1:se,x2:_e,y2:Ne,width:Ge,color:Yt,borderDash:te,borderDashOffset:ve,tickWidth:Wt,tickColor:be,tickBorderDash:De,tickBorderDashOffset:Fn}))}return this._ticksLength=_,this._borderValue=z,C}_computeLabelItems(t){const n=this.axis,r=this.options,{position:i,ticks:a}=r,o=this.isHorizontal(),u=this.ticks,{align:c,crossAlign:g,padding:_,mirror:E}=a,C=db(r.grid),O=C+_,R=E?-_:O,D=-lp(this.labelRotation),B=[];let z,k,$,K,et,mt,wt,Ot,Bt,se,_e,Ne,He="middle";if(i==="top")mt=this.bottom-R,wt=this._getXAxisLabelAlignment();else if(i==="bottom")mt=this.top+R,wt=this._getXAxisLabelAlignment();else if(i==="left"){const he=this._getYAxisLabelAlignment(C);wt=he.textAlign,et=he.x}else if(i==="right"){const he=this._getYAxisLabelAlignment(C);wt=he.textAlign,et=he.x}else if(n==="x"){if(i==="center")mt=(t.top+t.bottom)/2+O;else if(_i(i)){const he=Object.keys(i)[0],Ge=i[he];mt=this.chart.scales[he].getPixelForValue(Ge)+O}wt=this._getXAxisLabelAlignment()}else if(n==="y"){if(i==="center")et=(t.left+t.right)/2-O;else if(_i(i)){const he=Object.keys(i)[0],Ge=i[he];et=this.chart.scales[he].getPixelForValue(Ge)}wt=this._getYAxisLabelAlignment(C).textAlign}n==="y"&&(c==="start"?He="top":c==="end"&&(He="bottom"));const de=this._getLabelSizes();for(z=0,k=u.length;z<k;++z){$=u[z],K=$.label;const he=a.setContext(this.getContext(z));Ot=this.getPixelForTick(z)+a.labelOffset,Bt=this._resolveTickFontOptions(z),se=Bt.lineHeight,_e=Fo(K)?K.length:1;const Ge=_e/2,Yt=he.color,te=he.textStrokeColor,ve=he.textStrokeWidth;let Wt=wt;o?(et=Ot,wt==="inner"&&(z===k-1?Wt=this.options.reverse?"left":"right":z===0?Wt=this.options.reverse?"right":"left":Wt="center"),i==="top"?g==="near"||D!==0?Ne=-_e*se+se/2:g==="center"?Ne=-de.highest.height/2-Ge*se+se:Ne=-de.highest.height+se/2:g==="near"||D!==0?Ne=se/2:g==="center"?Ne=de.highest.height/2-Ge*se:Ne=de.highest.height-_e*se,E&&(Ne*=-1)):(mt=Ot,Ne=(1-_e)*se/2);let be;if(he.showLabelBackdrop){const De=ul(he.backdropPadding),Fn=de.heights[z],ar=de.widths[z];let Jn=mt+Ne-De.top,Ar=et-De.left;switch(He){case"middle":Jn-=Fn/2;break;case"bottom":Jn-=Fn;break}switch(wt){case"center":Ar-=ar/2;break;case"right":Ar-=ar;break}be={left:Ar,top:Jn,width:ar+De.width,height:Fn+De.height,color:he.backdropColor}}B.push({rotation:D,label:K,font:Bt,color:Yt,strokeColor:te,strokeWidth:ve,textOffset:Ne,textAlign:Wt,textBaseline:He,translation:[et,mt],backdrop:be})}return B}_getXAxisLabelAlignment(){const{position:t,ticks:n}=this.options;if(-lp(this.labelRotation))return t==="top"?"left":"right";let i="center";return n.align==="start"?i="left":n.align==="end"?i="right":n.align==="inner"&&(i="inner"),i}_getYAxisLabelAlignment(t){const{position:n,ticks:{crossAlign:r,mirror:i,padding:a}}=this.options,o=this._getLabelSizes(),u=t+a,c=o.widest.width;let g,_;return n==="left"?i?(_=this.right+a,r==="near"?g="left":r==="center"?(g="center",_+=c/2):(g="right",_+=c)):(_=this.right-u,r==="near"?g="right":r==="center"?(g="center",_-=c/2):(g="left",_=this.left)):n==="right"?i?(_=this.left+a,r==="near"?g="right":r==="center"?(g="center",_-=c/2):(g="left",_-=c)):(_=this.left+u,r==="near"?g="left":r==="center"?(g="center",_+=c/2):(g="right",_=this.right)):g="right",{textAlign:g,x:_}}_computeLabelArea(){if(this.options.ticks.mirror)return;const t=this.chart,n=this.options.position;if(n==="left"||n==="right")return{top:0,left:this.left,bottom:t.height,right:this.right};if(n==="top"||n==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:t.width}}drawBackground(){const{ctx:t,options:{backgroundColor:n},left:r,top:i,width:a,height:o}=this;n&&(t.save(),t.fillStyle=n,t.fillRect(r,i,a,o),t.restore())}getLineWidthForValue(t){const n=this.options.grid;if(!this._isVisible()||!n.display)return 0;const i=this.ticks.findIndex(a=>a.value===t);return i>=0?n.setContext(this.getContext(i)).lineWidth:0}drawGrid(t){const n=this.options.grid,r=this.ctx,i=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let a,o;const u=(c,g,_)=>{!_.width||!_.color||(r.save(),r.lineWidth=_.width,r.strokeStyle=_.color,r.setLineDash(_.borderDash||[]),r.lineDashOffset=_.borderDashOffset,r.beginPath(),r.moveTo(c.x,c.y),r.lineTo(g.x,g.y),r.stroke(),r.restore())};if(n.display)for(a=0,o=i.length;a<o;++a){const c=i[a];n.drawOnChartArea&&u({x:c.x1,y:c.y1},{x:c.x2,y:c.y2},c),n.drawTicks&&u({x:c.tx1,y:c.ty1},{x:c.tx2,y:c.ty2},{color:c.tickColor,width:c.tickWidth,borderDash:c.tickBorderDash,borderDashOffset:c.tickBorderDashOffset})}}drawBorder(){const{chart:t,ctx:n,options:{grid:r}}=this,i=r.setContext(this.getContext()),a=r.drawBorder?i.borderWidth:0;if(!a)return;const o=r.setContext(this.getContext(0)).lineWidth,u=this._borderValue;let c,g,_,E;this.isHorizontal()?(c=ty(t,this.left,a)-a/2,g=ty(t,this.right,o)+o/2,_=E=u):(_=ty(t,this.top,a)-a/2,E=ty(t,this.bottom,o)+o/2,c=g=u),n.save(),n.lineWidth=i.borderWidth,n.strokeStyle=i.borderColor,n.beginPath(),n.moveTo(c,_),n.lineTo(g,E),n.stroke(),n.restore()}drawLabels(t){if(!this.options.ticks.display)return;const r=this.ctx,i=this._computeLabelArea();i&&n2(r,i);const a=this._labelItems||(this._labelItems=this._computeLabelItems(t));let o,u;for(o=0,u=a.length;o<u;++o){const c=a[o],g=c.font,_=c.label;c.backdrop&&(r.fillStyle=c.backdrop.color,r.fillRect(c.backdrop.left,c.backdrop.top,c.backdrop.width,c.backdrop.height));let E=c.textOffset;ey(r,_,0,E,g,c)}i&&r2(r)}drawTitle(){const{ctx:t,options:{position:n,title:r,reverse:i}}=this;if(!r.display)return;const a=Ds(r.font),o=ul(r.padding),u=r.align;let c=a.lineHeight/2;n==="bottom"||n==="center"||_i(n)?(c+=o.bottom,Fo(r.text)&&(c+=a.lineHeight*(r.text.length-1))):c+=o.top;const{titleX:g,titleY:_,maxWidth:E,rotation:C}=mrt(this,c,n,u);ey(t,r.text,0,0,a,{color:r.color,maxWidth:E,rotation:C,textAlign:grt(u,n,i),textBaseline:"middle",translation:[g,_]})}draw(t){!this._isVisible()||(this.drawBackground(),this.drawGrid(t),this.drawBorder(),this.drawTitle(),this.drawLabels(t))}_layers(){const t=this.options,n=t.ticks&&t.ticks.z||0,r=Hr(t.grid&&t.grid.z,-1);return!this._isVisible()||this.draw!==ay.prototype.draw?[{z:n,draw:i=>{this.draw(i)}}]:[{z:r,draw:i=>{this.drawBackground(),this.drawGrid(i),this.drawTitle()}},{z:r+1,draw:()=>{this.drawBorder()}},{z:n,draw:i=>{this.drawLabels(i)}}]}getMatchingVisibleMetas(t){const n=this.chart.getSortedVisibleDatasetMetas(),r=this.axis+"AxisID",i=[];let a,o;for(a=0,o=n.length;a<o;++a){const u=n[a];u[r]===this.id&&(!t||u.type===t)&&i.push(u)}return i}_resolveTickFontOptions(t){const n=this.options.ticks.setContext(this.getContext(t));return Ds(n.font)}_maxDigits(){const t=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/t}}class d2{constructor(t,n,r){this.type=t,this.scope=n,this.override=r,this.items=Object.create(null)}isForType(t){return Object.prototype.isPrototypeOf.call(this.type.prototype,t.prototype)}register(t){const n=Object.getPrototypeOf(t);let r;_rt(n)&&(r=this.register(n));const i=this.items,a=t.id,o=this.scope+"."+a;if(!a)throw new Error("class does not have id: "+t);return a in i||(i[a]=t,vrt(t,o,r),this.override&&Ei.override(t.id,t.overrides)),o}get(t){return this.items[t]}unregister(t){const n=this.items,r=t.id,i=this.scope;r in n&&delete n[r],i&&r in Ei[i]&&(delete Ei[i][r],this.override&&delete Qv[r])}}function vrt(e,t,n){const r=tb(Object.create(null),[n?Ei.get(n):{},Ei.get(t),e.defaults]);Ei.set(t,r),e.defaultRoutes&&yrt(t,e.defaultRoutes),e.descriptors&&Ei.describe(t,e.descriptors)}function yrt(e,t){Object.keys(t).forEach(n=>{const r=n.split("."),i=r.pop(),a=[e].concat(r).join("."),o=t[n].split("."),u=o.pop(),c=o.join(".");Ei.route(a,i,c,u)})}function _rt(e){return"id"in e&&"defaults"in e}class xrt{constructor(){this.controllers=new d2(cp,"datasets",!0),this.elements=new d2(fp,"elements"),this.plugins=new d2(Object,"plugins"),this.scales=new d2(ay,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...t){this._each("register",t)}remove(...t){this._each("unregister",t)}addControllers(...t){this._each("register",t,this.controllers)}addElements(...t){this._each("register",t,this.elements)}addPlugins(...t){this._each("register",t,this.plugins)}addScales(...t){this._each("register",t,this.scales)}getController(t){return this._get(t,this.controllers,"controller")}getElement(t){return this._get(t,this.elements,"element")}getPlugin(t){return this._get(t,this.plugins,"plugin")}getScale(t){return this._get(t,this.scales,"scale")}removeControllers(...t){this._each("unregister",t,this.controllers)}removeElements(...t){this._each("unregister",t,this.elements)}removePlugins(...t){this._each("unregister",t,this.plugins)}removeScales(...t){this._each("unregister",t,this.scales)}_each(t,n,r){[...n].forEach(i=>{const a=r||this._getRegistryForType(i);r||a.isForType(i)||a===this.plugins&&i.id?this._exec(t,a,i):ho(i,o=>{const u=r||this._getRegistryForType(o);this._exec(t,u,o)})})}_exec(t,n,r){const i=yL(t);zo(r["before"+i],[],r),n[t](r),zo(r["after"+i],[],r)}_getRegistryForType(t){for(let n=0;n<this._typedRegistries.length;n++){const r=this._typedRegistries[n];if(r.isForType(t))return r}return this.plugins}_get(t,n,r){const i=n.get(t);if(i===void 0)throw new Error('"'+t+'" is not a registered '+r+".");return i}}var nd=new xrt;class g2 extends cp{update(t){const n=this._cachedMeta,{data:r=[]}=n,i=this.chart._animationsDisabled;let{start:a,count:o}=MB(n,r,i);if(this._drawStart=a,this._drawCount=o,AB(n)&&(a=0,o=r.length),this.options.showLine){const{dataset:u,_dataset:c}=n;u._chart=this.chart,u._datasetIndex=this.index,u._decimated=!!c._decimated,u.points=r;const g=this.resolveDatasetElementOptions(t);g.segment=this.options.segment,this.updateElement(u,void 0,{animated:!i,options:g},t)}this.updateElements(r,a,o,t)}addElements(){const{showLine:t}=this.options;!this.datasetElementType&&t&&(this.datasetElementType=nd.getElement("line")),super.addElements()}updateElements(t,n,r,i){const a=i==="reset",{iScale:o,vScale:u,_stacked:c,_dataset:g}=this._cachedMeta,_=this.resolveDataElementOptions(n,i),E=this.getSharedOptions(_),C=this.includeOptions(i,E),O=o.axis,R=u.axis,{spanGaps:D,segment:B}=this.options,z=y0(D)?D:Number.POSITIVE_INFINITY,k=this.chart._animationsDisabled||a||i==="none";let $=n>0&&this.getParsed(n-1);for(let K=n;K<n+r;++K){const et=t[K],mt=this.getParsed(K),wt=k?et:{},Ot=Di(mt[R]),Bt=wt[O]=o.getPixelForValue(mt[O],K),se=wt[R]=a||Ot?u.getBasePixel():u.getPixelForValue(c?this.applyStack(u,mt,c):mt[R],K);wt.skip=isNaN(Bt)||isNaN(se)||Ot,wt.stop=K>0&&Math.abs(mt[O]-$[O])>z,B&&(wt.parsed=mt,wt.raw=g.data[K]),C&&(wt.options=E||this.resolveDataElementOptions(K,et.active?"active":i)),k||this.updateElement(et,K,wt,i),$=mt}this.updateSharedOptions(E,i,_)}getMaxOverflow(){const t=this._cachedMeta,n=t.data||[];if(!this.options.showLine){let u=0;for(let c=n.length-1;c>=0;--c)u=Math.max(u,n[c].size(this.resolveDataElementOptions(c))/2);return u>0&&u}const r=t.dataset,i=r.options&&r.options.borderWidth||0;if(!n.length)return i;const a=n[0].size(this.resolveDataElementOptions(0)),o=n[n.length-1].size(this.resolveDataElementOptions(n.length-1));return Math.max(i,a,o)/2}}g2.id="scatter";g2.defaults={datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1};g2.overrides={interaction:{mode:"point"},plugins:{tooltip:{callbacks:{title(){return""},label(e){return"("+e.label+", "+e.formattedValue+")"}}}},scales:{x:{type:"linear"},y:{type:"linear"}}};var brt=Object.freeze({__proto__:null,BarController:s2,BubbleController:u2,DoughnutController:S0,LineController:l2,PolarAreaController:c2,PieController:VL,RadarController:f2,ScatterController:g2});function sy(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class $L{constructor(t){this.options=t||{}}init(t){}formats(){return sy()}parse(t,n){return sy()}format(t,n){return sy()}add(t,n,r){return sy()}diff(t,n,r){return sy()}startOf(t,n,r){return sy()}endOf(t,n){return sy()}}$L.override=function(e){Object.assign($L.prototype,e)};var wrt={_date:$L};function Srt(e,t,n,r){const{controller:i,data:a,_sorted:o}=e,u=i._cachedMeta.iScale;if(u&&t===u.axis&&t!=="r"&&o&&a.length){const c=u._reversePixels?uet:ag;if(r){if(i._sharedOptions){const g=a[0],_=typeof g.getRange=="function"&&g.getRange(t);if(_){const E=c(a,t,n-_),C=c(a,t,n+_);return{lo:E.lo,hi:C.hi}}}}else return c(a,t,n)}return{lo:0,hi:a.length-1}}function gb(e,t,n,r,i){const a=e.getSortedVisibleDatasetMetas(),o=n[t];for(let u=0,c=a.length;u<c;++u){const{index:g,data:_}=a[u],{lo:E,hi:C}=Srt(a[u],t,o,i);for(let O=E;O<=C;++O){const R=_[O];R.skip||r(R,g,O)}}}function Ert(e){const t=e.indexOf("x")!==-1,n=e.indexOf("y")!==-1;return function(r,i){const a=t?Math.abs(r.x-i.x):0,o=n?Math.abs(r.y-i.y):0;return Math.sqrt(Math.pow(a,2)+Math.pow(o,2))}}function jL(e,t,n,r,i){const a=[];return!i&&!e.isPointInArea(t)||gb(e,n,t,function(u,c,g){!i&&!lb(u,e.chartArea,0)||u.inRange(t.x,t.y,r)&&a.push({element:u,datasetIndex:c,index:g})},!0),a}function Crt(e,t,n,r){let i=[];function a(o,u,c){const{startAngle:g,endAngle:_}=o.getProps(["startAngle","endAngle"],r),{angle:E}=SB(o,{x:t.x,y:t.y});ib(E,g,_)&&i.push({element:o,datasetIndex:u,index:c})}return gb(e,n,t,a),i}function Irt(e,t,n,r,i,a){let o=[];const u=Ert(n);let c=Number.POSITIVE_INFINITY;function g(_,E,C){const O=_.inRange(t.x,t.y,i);if(r&&!O)return;const R=_.getCenterPoint(i);if(!(!!a||e.isPointInArea(R))&&!O)return;const B=u(t,R);B<c?(o=[{element:_,datasetIndex:E,index:C}],c=B):B===c&&o.push({element:_,datasetIndex:E,index:C})}return gb(e,n,t,g),o}function qL(e,t,n,r,i,a){return!a&&!e.isPointInArea(t)?[]:n==="r"&&!r?Crt(e,t,n,i):Irt(e,t,n,r,i,a)}function M5(e,t,n,r,i){const a=[],o=n==="x"?"inXRange":"inYRange";let u=!1;return gb(e,n,t,(c,g,_)=>{c[o](t[n],i)&&(a.push({element:c,datasetIndex:g,index:_}),u=u||c.inRange(t.x,t.y,i))}),r&&!u?[]:a}var Prt={evaluateInteractionItems:gb,modes:{index(e,t,n,r){const i=iy(t,e),a=n.axis||"x",o=n.includeInvisible||!1,u=n.intersect?jL(e,i,a,r,o):qL(e,i,a,!1,r,o),c=[];return u.length?(e.getSortedVisibleDatasetMetas().forEach(g=>{const _=u[0].index,E=g.data[_];E&&!E.skip&&c.push({element:E,datasetIndex:g.index,index:_})}),c):[]},dataset(e,t,n,r){const i=iy(t,e),a=n.axis||"xy",o=n.includeInvisible||!1;let u=n.intersect?jL(e,i,a,r,o):qL(e,i,a,!1,r,o);if(u.length>0){const c=u[0].datasetIndex,g=e.getDatasetMeta(c).data;u=[];for(let _=0;_<g.length;++_)u.push({element:g[_],datasetIndex:c,index:_})}return u},point(e,t,n,r){const i=iy(t,e),a=n.axis||"xy",o=n.includeInvisible||!1;return jL(e,i,a,r,o)},nearest(e,t,n,r){const i=iy(t,e),a=n.axis||"xy",o=n.includeInvisible||!1;return qL(e,i,a,n.intersect,r,o)},x(e,t,n,r){const i=iy(t,e);return M5(e,i,"x",n.intersect,r)},y(e,t,n,r){const i=iy(t,e);return M5(e,i,"y",n.intersect,r)}}};const A5=["left","top","right","bottom"];function mb(e,t){return e.filter(n=>n.pos===t)}function L5(e,t){return e.filter(n=>A5.indexOf(n.pos)===-1&&n.box.axis===t)}function vb(e,t){return e.sort((n,r)=>{const i=t?r:n,a=t?n:r;return i.weight===a.weight?i.index-a.index:i.weight-a.weight})}function Trt(e){const t=[];let n,r,i,a,o,u;for(n=0,r=(e||[]).length;n<r;++n)i=e[n],{position:a,options:{stack:o,stackWeight:u=1}}=i,t.push({index:n,box:i,pos:a,horizontal:i.isHorizontal(),weight:i.weight,stack:o&&a+o,stackWeight:u});return t}function Mrt(e){const t={};for(const n of e){const{stack:r,pos:i,stackWeight:a}=n;if(!r||!A5.includes(i))continue;const o=t[r]||(t[r]={count:0,placed:0,weight:0,size:0});o.count++,o.weight+=a}return t}function Art(e,t){const n=Mrt(e),{vBoxMaxWidth:r,hBoxMaxHeight:i}=t;let a,o,u;for(a=0,o=e.length;a<o;++a){u=e[a];const{fullSize:c}=u.box,g=n[u.stack],_=g&&u.stackWeight/g.weight;u.horizontal?(u.width=_?_*r:c&&t.availableWidth,u.height=i):(u.width=r,u.height=_?_*i:c&&t.availableHeight)}return n}function Lrt(e){const t=Trt(e),n=vb(t.filter(g=>g.box.fullSize),!0),r=vb(mb(t,"left"),!0),i=vb(mb(t,"right")),a=vb(mb(t,"top"),!0),o=vb(mb(t,"bottom")),u=L5(t,"x"),c=L5(t,"y");return{fullSize:n,leftAndTop:r.concat(a),rightAndBottom:i.concat(c).concat(o).concat(u),chartArea:mb(t,"chartArea"),vertical:r.concat(i).concat(c),horizontal:a.concat(o).concat(u)}}function O5(e,t,n,r){return Math.max(e[n],t[n])+Math.max(e[r],t[r])}function R5(e,t){e.top=Math.max(e.top,t.top),e.left=Math.max(e.left,t.left),e.bottom=Math.max(e.bottom,t.bottom),e.right=Math.max(e.right,t.right)}function Ort(e,t,n,r){const{pos:i,box:a}=n,o=e.maxPadding;if(!_i(i)){n.size&&(e[i]-=n.size);const E=r[n.stack]||{size:0,count:1};E.size=Math.max(E.size,n.horizontal?a.height:a.width),n.size=E.size/E.count,e[i]+=n.size}a.getPadding&&R5(o,a.getPadding());const u=Math.max(0,t.outerWidth-O5(o,e,"left","right")),c=Math.max(0,t.outerHeight-O5(o,e,"top","bottom")),g=u!==e.w,_=c!==e.h;return e.w=u,e.h=c,n.horizontal?{same:g,other:_}:{same:_,other:g}}function Rrt(e){const t=e.maxPadding;function n(r){const i=Math.max(t[r]-e[r],0);return e[r]+=i,i}e.y+=n("top"),e.x+=n("left"),n("right"),n("bottom")}function krt(e,t){const n=t.maxPadding;function r(i){const a={left:0,top:0,right:0,bottom:0};return i.forEach(o=>{a[o]=Math.max(t[o],n[o])}),a}return r(e?["left","right"]:["top","bottom"])}function yb(e,t,n,r){const i=[];let a,o,u,c,g,_;for(a=0,o=e.length,g=0;a<o;++a){u=e[a],c=u.box,c.update(u.width||t.w,u.height||t.h,krt(u.horizontal,t));const{same:E,other:C}=Ort(t,n,u,r);g|=E&&i.length,_=_||C,c.fullSize||i.push(u)}return g&&yb(i,t,n,r)||_}function m2(e,t,n,r,i){e.top=n,e.left=t,e.right=t+r,e.bottom=n+i,e.width=r,e.height=i}function k5(e,t,n,r){const i=n.padding;let{x:a,y:o}=t;for(const u of e){const c=u.box,g=r[u.stack]||{count:1,placed:0,weight:1},_=u.stackWeight/g.weight||1;if(u.horizontal){const E=t.w*_,C=g.size||c.height;uh(g.start)&&(o=g.start),c.fullSize?m2(c,i.left,o,n.outerWidth-i.right-i.left,C):m2(c,t.left+g.placed,o,E,C),g.start=o,g.placed+=E,o=c.bottom}else{const E=t.h*_,C=g.size||c.width;uh(g.start)&&(a=g.start),c.fullSize?m2(c,a,i.top,C,n.outerHeight-i.bottom-i.top):m2(c,a,t.top+g.placed,C,E),g.start=a,g.placed+=E,a=c.right}}t.x=a,t.y=o}Ei.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}});var ll={addBox(e,t){e.boxes||(e.boxes=[]),t.fullSize=t.fullSize||!1,t.position=t.position||"top",t.weight=t.weight||0,t._layers=t._layers||function(){return[{z:0,draw(n){t.draw(n)}}]},e.boxes.push(t)},removeBox(e,t){const n=e.boxes?e.boxes.indexOf(t):-1;n!==-1&&e.boxes.splice(n,1)},configure(e,t,n){t.fullSize=n.fullSize,t.position=n.position,t.weight=n.weight},update(e,t,n,r){if(!e)return;const i=ul(e.options.layout.padding),a=Math.max(t-i.width,0),o=Math.max(n-i.height,0),u=Lrt(e.boxes),c=u.vertical,g=u.horizontal;ho(e.boxes,D=>{typeof D.beforeLayout=="function"&&D.beforeLayout()});const _=c.reduce((D,B)=>B.box.options&&B.box.options.display===!1?D:D+1,0)||1,E=Object.freeze({outerWidth:t,outerHeight:n,padding:i,availableWidth:a,availableHeight:o,vBoxMaxWidth:a/2/_,hBoxMaxHeight:o/2}),C=Object.assign({},i);R5(C,ul(r));const O=Object.assign({maxPadding:C,w:a,h:o,x:i.left,y:i.top},i),R=Art(c.concat(g),E);yb(u.fullSize,O,E,R),yb(c,O,E,R),yb(g,O,E,R)&&yb(c,O,E,R),Rrt(O),k5(u.leftAndTop,O,E,R),O.x+=O.w,O.y+=O.h,k5(u.rightAndBottom,O,E,R),e.chartArea={left:O.left,top:O.top,right:O.left+O.w,bottom:O.top+O.h,height:O.h,width:O.w},ho(u.chartArea,D=>{const B=D.box;Object.assign(B,e.chartArea),B.update(O.w,O.h,{left:0,top:0,right:0,bottom:0})})}};class D5{acquireContext(t,n){}releaseContext(t){return!1}addEventListener(t,n,r){}removeEventListener(t,n,r){}getDevicePixelRatio(){return 1}getMaximumSize(t,n,r,i){return n=Math.max(0,n||t.width),r=r||t.height,{width:n,height:Math.max(0,i?Math.floor(n/i):r)}}isAttached(t){return!0}updateConfig(t){}}class Drt extends D5{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const v2="$chartjs",Nrt={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},N5=e=>e===null||e==="";function Frt(e,t){const n=e.style,r=e.getAttribute("height"),i=e.getAttribute("width");if(e[v2]={initial:{height:r,width:i,style:{display:n.display,height:n.height,width:n.width}}},n.display=n.display||"block",n.boxSizing=n.boxSizing||"border-box",N5(i)){const a=n5(e,"width");a!==void 0&&(e.width=a)}if(N5(r))if(e.style.height==="")e.height=e.width/(t||2);else{const a=n5(e,"height");a!==void 0&&(e.height=a)}return e}const F5=vnt?{passive:!0}:!1;function zrt(e,t,n){e.addEventListener(t,n,F5)}function Brt(e,t,n){e.canvas.removeEventListener(t,n,F5)}function Urt(e,t){const n=Nrt[e.type]||e.type,{x:r,y:i}=iy(e,t);return{type:n,chart:t,native:e,x:r!==void 0?r:null,y:i!==void 0?i:null}}function y2(e,t){for(const n of e)if(n===t||n.contains(t))return!0}function Vrt(e,t,n){const r=e.canvas,i=new MutationObserver(a=>{let o=!1;for(const u of a)o=o||y2(u.addedNodes,r),o=o&&!y2(u.removedNodes,r);o&&n()});return i.observe(document,{childList:!0,subtree:!0}),i}function $rt(e,t,n){const r=e.canvas,i=new MutationObserver(a=>{let o=!1;for(const u of a)o=o||y2(u.removedNodes,r),o=o&&!y2(u.addedNodes,r);o&&n()});return i.observe(document,{childList:!0,subtree:!0}),i}const _b=new Map;let z5=0;function B5(){const e=window.devicePixelRatio;e!==z5&&(z5=e,_b.forEach((t,n)=>{n.currentDevicePixelRatio!==e&&t()}))}function jrt(e,t){_b.size||window.addEventListener("resize",B5),_b.set(e,t)}function qrt(e){_b.delete(e),_b.size||window.removeEventListener("resize",B5)}function Grt(e,t,n){const r=e.canvas,i=r&&NL(r);if(!i)return;const a=TB((u,c)=>{const g=i.clientWidth;n(u,c),g<i.clientWidth&&n()},window),o=new ResizeObserver(u=>{const c=u[0],g=c.contentRect.width,_=c.contentRect.height;g===0&&_===0||a(g,_)});return o.observe(i),jrt(e,a),o}function GL(e,t,n){n&&n.disconnect(),t==="resize"&&qrt(e)}function Wrt(e,t,n){const r=e.canvas,i=TB(a=>{e.ctx!==null&&n(Urt(a,e))},e,a=>{const o=a[0];return[o,o.offsetX,o.offsetY]});return zrt(r,t,i),i}class Hrt extends D5{acquireContext(t,n){const r=t&&t.getContext&&t.getContext("2d");return r&&r.canvas===t?(Frt(t,n),r):null}releaseContext(t){const n=t.canvas;if(!n[v2])return!1;const r=n[v2].initial;["height","width"].forEach(a=>{const o=r[a];Di(o)?n.removeAttribute(a):n.setAttribute(a,o)});const i=r.style||{};return Object.keys(i).forEach(a=>{n.style[a]=i[a]}),n.width=n.width,delete n[v2],!0}addEventListener(t,n,r){this.removeEventListener(t,n);const i=t.$proxies||(t.$proxies={}),o={attach:Vrt,detach:$rt,resize:Grt}[n]||Wrt;i[n]=o(t,n,r)}removeEventListener(t,n){const r=t.$proxies||(t.$proxies={}),i=r[n];if(!i)return;({attach:GL,detach:GL,resize:GL}[n]||Brt)(t,n,i),r[n]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,n,r,i){return mnt(t,n,r,i)}isAttached(t){const n=NL(t);return!!(n&&n.isConnected)}}function Xrt(e){return!t5()||typeof OffscreenCanvas!="undefined"&&e instanceof OffscreenCanvas?Drt:Hrt}class Yrt{constructor(){this._init=[]}notify(t,n,r,i){n==="beforeInit"&&(this._init=this._createDescriptors(t,!0),this._notify(this._init,t,"install"));const a=i?this._descriptors(t).filter(i):this._descriptors(t),o=this._notify(a,t,n,r);return n==="afterDestroy"&&(this._notify(a,t,"stop"),this._notify(this._init,t,"uninstall")),o}_notify(t,n,r,i){i=i||{};for(const a of t){const o=a.plugin,u=o[r],c=[n,i,a.options];if(zo(u,c,o)===!1&&i.cancelable)return!1}return!0}invalidate(){Di(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(t){if(this._cache)return this._cache;const n=this._cache=this._createDescriptors(t);return this._notifyStateChanges(t),n}_createDescriptors(t,n){const r=t&&t.config,i=Hr(r.options&&r.options.plugins,{}),a=Zrt(r);return i===!1&&!n?[]:Jrt(t,a,i,n)}_notifyStateChanges(t){const n=this._oldCache||[],r=this._cache,i=(a,o)=>a.filter(u=>!o.some(c=>u.plugin.id===c.plugin.id));this._notify(i(n,r),t,"stop"),this._notify(i(r,n),t,"start")}}function Zrt(e){const t={},n=[],r=Object.keys(nd.plugins.items);for(let a=0;a<r.length;a++)n.push(nd.getPlugin(r[a]));const i=e.plugins||[];for(let a=0;a<i.length;a++){const o=i[a];n.indexOf(o)===-1&&(n.push(o),t[o.id]=!0)}return{plugins:n,localIds:t}}function Krt(e,t){return!t&&e===!1?null:e===!0?{}:e}function Jrt(e,{plugins:t,localIds:n},r,i){const a=[],o=e.getContext();for(const u of t){const c=u.id,g=Krt(r[c],i);g!==null&&a.push({plugin:u,options:Qrt(e.config,{plugin:u,local:n[c]},g,o)})}return a}function Qrt(e,{plugin:t,local:n},r,i){const a=e.pluginScopeKeys(t),o=e.getOptionScopes(r,a);return n&&t.defaults&&o.push(t.defaults),e.createResolver(o,i,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function WL(e,t){const n=Ei.datasets[e]||{};return((t.datasets||{})[e]||{}).indexAxis||t.indexAxis||n.indexAxis||"x"}function tit(e,t){let n=e;return e==="_index_"?n=t:e==="_value_"&&(n=t==="x"?"y":"x"),n}function eit(e,t){return e===t?"_index_":"_value_"}function nit(e){if(e==="top"||e==="bottom")return"x";if(e==="left"||e==="right")return"y"}function HL(e,t){return e==="x"||e==="y"?e:t.axis||nit(t.position)||e.charAt(0).toLowerCase()}function rit(e,t){const n=Qv[e.type]||{scales:{}},r=t.scales||{},i=WL(e.type,t),a=Object.create(null),o=Object.create(null);return Object.keys(r).forEach(u=>{const c=r[u];if(!_i(c))return console.error(`Invalid scale configuration for scale: ${u}`);if(c._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${u}`);const g=HL(u,c),_=eit(g,i),E=n.scales||{};a[g]=a[g]||u,o[u]=eb(Object.create(null),[{axis:g},c,E[g],E[_]])}),e.data.datasets.forEach(u=>{const c=u.type||e.type,g=u.indexAxis||WL(c,t),E=(Qv[c]||{}).scales||{};Object.keys(E).forEach(C=>{const O=tit(C,g),R=u[O+"AxisID"]||a[O]||O;o[R]=o[R]||Object.create(null),eb(o[R],[{axis:O},r[R],E[C]])})}),Object.keys(o).forEach(u=>{const c=o[u];eb(c,[Ei.scales[c.type],Ei.scale])}),o}function U5(e){const t=e.options||(e.options={});t.plugins=Hr(t.plugins,{}),t.scales=rit(e,t)}function V5(e){return e=e||{},e.datasets=e.datasets||[],e.labels=e.labels||[],e}function iit(e){return e=e||{},e.data=V5(e.data),U5(e),e}const $5=new Map,j5=new Set;function _2(e,t){let n=$5.get(e);return n||(n=t(),$5.set(e,n),j5.add(n)),n}const xb=(e,t,n)=>{const r=Tm(t,n);r!==void 0&&e.add(r)};class oit{constructor(t){this._config=iit(t),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(t){this._config.type=t}get data(){return this._config.data}set data(t){this._config.data=V5(t)}get options(){return this._config.options}set options(t){this._config.options=t}get plugins(){return this._config.plugins}update(){const t=this._config;this.clearCache(),U5(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return _2(t,()=>[[`datasets.${t}`,""]])}datasetAnimationScopeKeys(t,n){return _2(`${t}.transition.${n}`,()=>[[`datasets.${t}.transitions.${n}`,`transitions.${n}`],[`datasets.${t}`,""]])}datasetElementScopeKeys(t,n){return _2(`${t}-${n}`,()=>[[`datasets.${t}.elements.${n}`,`datasets.${t}`,`elements.${n}`,""]])}pluginScopeKeys(t){const n=t.id,r=this.type;return _2(`${r}-plugin-${n}`,()=>[[`plugins.${n}`,...t.additionalOptionScopes||[]]])}_cachedScopes(t,n){const r=this._scopeCache;let i=r.get(t);return(!i||n)&&(i=new Map,r.set(t,i)),i}getOptionScopes(t,n,r){const{options:i,type:a}=this,o=this._cachedScopes(t,r),u=o.get(n);if(u)return u;const c=new Set;n.forEach(_=>{t&&(c.add(t),_.forEach(E=>xb(c,t,E))),_.forEach(E=>xb(c,i,E)),_.forEach(E=>xb(c,Qv[a]||{},E)),_.forEach(E=>xb(c,Ei,E)),_.forEach(E=>xb(c,ML,E))});const g=Array.from(c);return g.length===0&&g.push(Object.create(null)),j5.has(n)&&o.set(n,g),g}chartOptionScopes(){const{options:t,type:n}=this;return[t,Qv[n]||{},Ei.datasets[n]||{},{type:n},Ei,ML]}resolveNamedOptions(t,n,r,i=[""]){const a={$shared:!0},{resolver:o,subPrefixes:u}=q5(this._resolverCache,t,i);let c=o;if(sit(o,n)){a.$shared=!1,r=Mm(r)?r():r;const g=this.createResolver(t,r,u);c=x0(o,r,g)}for(const g of n)a[g]=c[g];return a}createResolver(t,n,r=[""],i){const{resolver:a}=q5(this._resolverCache,t,r);return _i(n)?x0(a,n,void 0,i):a}}function q5(e,t,n){let r=e.get(t);r||(r=new Map,e.set(t,r));const i=n.join();let a=r.get(i);return a||(a={resolver:RL(t,n),subPrefixes:n.filter(u=>!u.toLowerCase().includes("hover"))},r.set(i,a)),a}const ait=e=>_i(e)&&Object.getOwnPropertyNames(e).reduce((t,n)=>t||Mm(e[n]),!1);function sit(e,t){const{isScriptable:n,isIndexable:r}=WB(e);for(const i of t){const a=n(i),o=r(i),u=(o||a)&&e[i];if(a&&(Mm(u)||ait(u))||o&&Fo(u))return!0}return!1}var uit="3.9.1";const lit=["top","bottom","left","right","chartArea"];function G5(e,t){return e==="top"||e==="bottom"||lit.indexOf(e)===-1&&t==="x"}function W5(e,t){return function(n,r){return n[e]===r[e]?n[t]-r[t]:n[e]-r[e]}}function H5(e){const t=e.chart,n=t.options.animation;t.notifyPlugins("afterRender"),zo(n&&n.onComplete,[e],t)}function cit(e){const t=e.chart,n=t.options.animation;zo(n&&n.onProgress,[e],t)}function X5(e){return t5()&&typeof e=="string"?e=document.getElementById(e):e&&e.length&&(e=e[0]),e&&e.canvas&&(e=e.canvas),e}const x2={},Y5=e=>{const t=X5(e);return Object.values(x2).filter(n=>n.canvas===t).pop()};function fit(e,t,n){const r=Object.keys(e);for(const i of r){const a=+i;if(a>=t){const o=e[i];delete e[i],(n>0||a>t)&&(e[a+n]=o)}}}function hit(e,t,n,r){return!n||e.type==="mouseout"?null:r?t:e}class b2{constructor(t,n){const r=this.config=new oit(n),i=X5(t),a=Y5(i);if(a)throw new Error("Canvas is already in use. Chart with ID '"+a.id+"' must be destroyed before the canvas with ID '"+a.canvas.id+"' can be reused.");const o=r.createResolver(r.chartOptionScopes(),this.getContext());this.platform=new(r.platform||Xrt(i)),this.platform.updateConfig(r);const u=this.platform.acquireContext(i,o.aspectRatio),c=u&&u.canvas,g=c&&c.height,_=c&&c.width;if(this.id=Ytt(),this.ctx=u,this.canvas=c,this.width=_,this.height=g,this._options=o,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new Yrt,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=het(E=>this.update(E),o.resizeDelay||0),this._dataChanges=[],x2[this.id]=this,!u||!c){console.error("Failed to create chart: can't acquire context from the given item");return}ug.listen(this,"complete",H5),ug.listen(this,"progress",cit),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:n},width:r,height:i,_aspectRatio:a}=this;return Di(t)?n&&a?a:i?r/i:null:t}get data(){return this.config.data}set data(t){this.config.data=t}get options(){return this._options}set options(t){this.config.options=t}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():e5(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return jB(this.canvas,this.ctx),this}stop(){return ug.stop(this),this}resize(t,n){ug.running(this)?this._resizeBeforeDraw={width:t,height:n}:this._resize(t,n)}_resize(t,n){const r=this.options,i=this.canvas,a=r.maintainAspectRatio&&this.aspectRatio,o=this.platform.getMaximumSize(i,t,n,a),u=r.devicePixelRatio||this.platform.getDevicePixelRatio(),c=this.width?"resize":"attach";this.width=o.width,this.height=o.height,this._aspectRatio=this.aspectRatio,!!e5(this,u,!0)&&(this.notifyPlugins("resize",{size:o}),zo(r.onResize,[this,o],this),this.attached&&this._doResize(c)&&this.render())}ensureScalesHaveIDs(){const n=this.options.scales||{};ho(n,(r,i)=>{r.id=i})}buildOrUpdateScales(){const t=this.options,n=t.scales,r=this.scales,i=Object.keys(r).reduce((o,u)=>(o[u]=!1,o),{});let a=[];n&&(a=a.concat(Object.keys(n).map(o=>{const u=n[o],c=HL(o,u),g=c==="r",_=c==="x";return{options:u,dposition:g?"chartArea":_?"bottom":"left",dtype:g?"radialLinear":_?"category":"linear"}}))),ho(a,o=>{const u=o.options,c=u.id,g=HL(c,u),_=Hr(u.type,o.dtype);(u.position===void 0||G5(u.position,g)!==G5(o.dposition))&&(u.position=o.dposition),i[c]=!0;let E=null;if(c in r&&r[c].type===_)E=r[c];else{const C=nd.getScale(_);E=new C({id:c,type:_,ctx:this.ctx,chart:this}),r[E.id]=E}E.init(u,t)}),ho(i,(o,u)=>{o||delete r[u]}),ho(r,o=>{ll.configure(this,o,o.options),ll.addBox(this,o)})}_updateMetasets(){const t=this._metasets,n=this.data.datasets.length,r=t.length;if(t.sort((i,a)=>i.index-a.index),r>n){for(let i=n;i<r;++i)this._destroyDatasetMeta(i);t.splice(n,r-n)}this._sortedMetasets=t.slice(0).sort(W5("order","index"))}_removeUnreferencedMetasets(){const{_metasets:t,data:{datasets:n}}=this;t.length>n.length&&delete this._stacks,t.forEach((r,i)=>{n.filter(a=>a===r._dataset).length===0&&this._destroyDatasetMeta(i)})}buildOrUpdateControllers(){const t=[],n=this.data.datasets;let r,i;for(this._removeUnreferencedMetasets(),r=0,i=n.length;r<i;r++){const a=n[r];let o=this.getDatasetMeta(r);const u=a.type||this.config.type;if(o.type&&o.type!==u&&(this._destroyDatasetMeta(r),o=this.getDatasetMeta(r)),o.type=u,o.indexAxis=a.indexAxis||WL(u,this.options),o.order=a.order||0,o.index=r,o.label=""+a.label,o.visible=this.isDatasetVisible(r),o.controller)o.controller.updateIndex(r),o.controller.linkScales();else{const c=nd.getController(u),{datasetElementType:g,dataElementType:_}=Ei.datasets[u];Object.assign(c.prototype,{dataElementType:nd.getElement(_),datasetElementType:g&&nd.getElement(g)}),o.controller=new c(this,r),t.push(o.controller)}}return this._updateMetasets(),t}_resetElements(){ho(this.data.datasets,(t,n)=>{this.getDatasetMeta(n).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const n=this.config;n.update();const r=this._options=n.createResolver(n.chartOptionScopes(),this.getContext()),i=this._animationsDisabled=!r.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0})===!1)return;const a=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let o=0;for(let g=0,_=this.data.datasets.length;g<_;g++){const{controller:E}=this.getDatasetMeta(g),C=!i&&a.indexOf(E)===-1;E.buildOrUpdateElements(C),o=Math.max(+E.getMaxOverflow(),o)}o=this._minPadding=r.layout.autoPadding?o:0,this._updateLayout(o),i||ho(a,g=>{g.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(W5("z","_idx"));const{_active:u,_lastEvent:c}=this;c?this._eventHandler(c,!0):u.length&&this._updateHoverStyles(u,u,!0),this.render()}_updateScales(){ho(this.scales,t=>{ll.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,n=new Set(Object.keys(this._listeners)),r=new Set(t.events);(!yB(n,r)||!!this._responsiveListeners!==t.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:t}=this,n=this._getUniformDataChanges()||[];for(const{method:r,start:i,count:a}of n){const o=r==="_removeElements"?-a:a;fit(t,i,o)}}_getUniformDataChanges(){const t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];const n=this.data.datasets.length,r=a=>new Set(t.filter(o=>o[0]===a).map((o,u)=>u+","+o.splice(1).join(","))),i=r(0);for(let a=1;a<n;a++)if(!yB(i,r(a)))return;return Array.from(i).map(a=>a.split(",")).map(a=>({method:a[1],start:+a[2],count:+a[3]}))}_updateLayout(t){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;ll.update(this,this.width,this.height,t);const n=this.chartArea,r=n.width<=0||n.height<=0;this._layers=[],ho(this.boxes,i=>{r&&i.position==="chartArea"||(i.configure&&i.configure(),this._layers.push(...i._layers()))},this),this._layers.forEach((i,a)=>{i._idx=a}),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})!==!1){for(let n=0,r=this.data.datasets.length;n<r;++n)this.getDatasetMeta(n).controller.configure();for(let n=0,r=this.data.datasets.length;n<r;++n)this._updateDataset(n,Mm(t)?t({datasetIndex:n}):t);this.notifyPlugins("afterDatasetsUpdate",{mode:t})}}_updateDataset(t,n){const r=this.getDatasetMeta(t),i={meta:r,index:t,mode:n,cancelable:!0};this.notifyPlugins("beforeDatasetUpdate",i)!==!1&&(r.controller._update(n),i.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",i))}render(){this.notifyPlugins("beforeRender",{cancelable:!0})!==!1&&(ug.has(this)?this.attached&&!ug.running(this)&&ug.start(this):(this.draw(),H5({chart:this})))}draw(){let t;if(this._resizeBeforeDraw){const{width:r,height:i}=this._resizeBeforeDraw;this._resize(r,i),this._resizeBeforeDraw=null}if(this.clear(),this.width<=0||this.height<=0||this.notifyPlugins("beforeDraw",{cancelable:!0})===!1)return;const n=this._layers;for(t=0;t<n.length&&n[t].z<=0;++t)n[t].draw(this.chartArea);for(this._drawDatasets();t<n.length;++t)n[t].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(t){const n=this._sortedMetasets,r=[];let i,a;for(i=0,a=n.length;i<a;++i){const o=n[i];(!t||o.visible)&&r.push(o)}return r}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0})===!1)return;const t=this.getSortedVisibleDatasetMetas();for(let n=t.length-1;n>=0;--n)this._drawDataset(t[n]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const n=this.ctx,r=t._clip,i=!r.disabled,a=this.chartArea,o={meta:t,index:t.index,cancelable:!0};this.notifyPlugins("beforeDatasetDraw",o)!==!1&&(i&&n2(n,{left:r.left===!1?0:a.left-r.left,right:r.right===!1?this.width:a.right+r.right,top:r.top===!1?0:a.top-r.top,bottom:r.bottom===!1?this.height:a.bottom+r.bottom}),t.controller.draw(),i&&r2(n),o.cancelable=!1,this.notifyPlugins("afterDatasetDraw",o))}isPointInArea(t){return lb(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,n,r,i){const a=Prt.modes[n];return typeof a=="function"?a(this,t,r,i):[]}getDatasetMeta(t){const n=this.data.datasets[t],r=this._metasets;let i=r.filter(a=>a&&a._dataset===n).pop();return i||(i={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:n&&n.order||0,index:t,_dataset:n,_parsed:[],_sorted:!1},r.push(i)),i}getContext(){return this.$context||(this.$context=Om(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const n=this.data.datasets[t];if(!n)return!1;const r=this.getDatasetMeta(t);return typeof r.hidden=="boolean"?!r.hidden:!n.hidden}setDatasetVisibility(t,n){const r=this.getDatasetMeta(t);r.hidden=!n}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,n,r){const i=r?"show":"hide",a=this.getDatasetMeta(t),o=a.controller._resolveAnimations(void 0,i);uh(n)?(a.data[n].hidden=!r,this.update()):(this.setDatasetVisibility(t,r),o.update(a,{visible:r}),this.update(u=>u.datasetIndex===t?i:void 0))}hide(t,n){this._updateVisibility(t,n,!1)}show(t,n){this._updateVisibility(t,n,!0)}_destroyDatasetMeta(t){const n=this._metasets[t];n&&n.controller&&n.controller._destroy(),delete this._metasets[t]}_stop(){let t,n;for(this.stop(),ug.remove(this),t=0,n=this.data.datasets.length;t<n;++t)this._destroyDatasetMeta(t)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:t,ctx:n}=this;this._stop(),this.config.clearCache(),t&&(this.unbindEvents(),jB(t,n),this.platform.releaseContext(n),this.canvas=null,this.ctx=null),this.notifyPlugins("destroy"),delete x2[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...t){return this.canvas.toDataURL(...t)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){const t=this._listeners,n=this.platform,r=(a,o)=>{n.addEventListener(this,a,o),t[a]=o},i=(a,o,u)=>{a.offsetX=o,a.offsetY=u,this._eventHandler(a)};ho(this.options.events,a=>r(a,i))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,n=this.platform,r=(c,g)=>{n.addEventListener(this,c,g),t[c]=g},i=(c,g)=>{t[c]&&(n.removeEventListener(this,c,g),delete t[c])},a=(c,g)=>{this.canvas&&this.resize(c,g)};let o;const u=()=>{i("attach",u),this.attached=!0,this.resize(),r("resize",a),r("detach",o)};o=()=>{this.attached=!1,i("resize",a),this._stop(),this._resize(0,0),r("attach",u)},n.isAttached(this.canvas)?u():o()}unbindEvents(){ho(this._listeners,(t,n)=>{this.platform.removeEventListener(this,n,t)}),this._listeners={},ho(this._responsiveListeners,(t,n)=>{this.platform.removeEventListener(this,n,t)}),this._responsiveListeners=void 0}updateHoverStyle(t,n,r){const i=r?"set":"remove";let a,o,u,c;for(n==="dataset"&&(a=this.getDatasetMeta(t[0].datasetIndex),a.controller["_"+i+"DatasetHoverStyle"]()),u=0,c=t.length;u<c;++u){o=t[u];const g=o&&this.getDatasetMeta(o.datasetIndex).controller;g&&g[i+"HoverStyle"](o.element,o.datasetIndex,o.index)}}getActiveElements(){return this._active||[]}setActiveElements(t){const n=this._active||[],r=t.map(({datasetIndex:a,index:o})=>{const u=this.getDatasetMeta(a);if(!u)throw new Error("No dataset found at index "+a);return{datasetIndex:a,element:u.data[o],index:o}});!HC(r,n)&&(this._active=r,this._lastEvent=null,this._updateHoverStyles(r,n))}notifyPlugins(t,n,r){return this._plugins.notify(this,t,n,r)}_updateHoverStyles(t,n,r){const i=this.options.hover,a=(c,g)=>c.filter(_=>!g.some(E=>_.datasetIndex===E.datasetIndex&&_.index===E.index)),o=a(n,t),u=r?t:a(t,n);o.length&&this.updateHoverStyle(o,i.mode,!1),u.length&&i.mode&&this.updateHoverStyle(u,i.mode,!0)}_eventHandler(t,n){const r={event:t,replay:n,cancelable:!0,inChartArea:this.isPointInArea(t)},i=o=>(o.options.events||this.options.events).includes(t.native.type);if(this.notifyPlugins("beforeEvent",r,i)===!1)return;const a=this._handleEvent(t,n,r.inChartArea);return r.cancelable=!1,this.notifyPlugins("afterEvent",r,i),(a||r.changed)&&this.render(),this}_handleEvent(t,n,r){const{_active:i=[],options:a}=this,o=n,u=this._getActiveElements(t,i,r,o),c=eet(t),g=hit(t,this._lastEvent,r,c);r&&(this._lastEvent=null,zo(a.onHover,[t,u,this],this),c&&zo(a.onClick,[t,u,this],this));const _=!HC(u,i);return(_||n)&&(this._active=u,this._updateHoverStyles(u,i,n)),this._lastEvent=g,_}_getActiveElements(t,n,r,i){if(t.type==="mouseout")return[];if(!r)return n;const a=this.options.hover;return this.getElementsAtEventForMode(t,a.mode,a,i)}}const Z5=()=>ho(b2.instances,e=>e._plugins.invalidate()),Rm=!0;Object.defineProperties(b2,{defaults:{enumerable:Rm,value:Ei},instances:{enumerable:Rm,value:x2},overrides:{enumerable:Rm,value:Qv},registry:{enumerable:Rm,value:nd},version:{enumerable:Rm,value:uit},getChart:{enumerable:Rm,value:Y5},register:{enumerable:Rm,value:(...e)=>{nd.add(...e),Z5()}},unregister:{enumerable:Rm,value:(...e)=>{nd.remove(...e),Z5()}}});function K5(e,t,n){const{startAngle:r,pixelMargin:i,x:a,y:o,outerRadius:u,innerRadius:c}=t;let g=i/u;e.beginPath(),e.arc(a,o,u,r-g,n+g),c>i?(g=i/c,e.arc(a,o,c,n+g,r-g,!0)):e.arc(a,o,i,n+ja,r-ja),e.closePath(),e.clip()}function pit(e){return OL(e,["outerStart","outerEnd","innerStart","innerEnd"])}function dit(e,t,n,r){const i=pit(e.options.borderRadius),a=(n-t)/2,o=Math.min(a,r*t/2),u=c=>{const g=(n-Math.min(a,c))*r/2;return au(c,0,Math.min(a,g))};return{outerStart:u(i.outerStart),outerEnd:u(i.outerEnd),innerStart:au(i.innerStart,0,o),innerEnd:au(i.innerEnd,0,o)}}function E0(e,t,n,r){return{x:n+e*Math.cos(t),y:r+e*Math.sin(t)}}function XL(e,t,n,r,i,a){const{x:o,y:u,startAngle:c,pixelMargin:g,innerRadius:_}=t,E=Math.max(t.outerRadius+r+n-g,0),C=_>0?_+r+n+g:0;let O=0;const R=i-c;if(r){const he=_>0?_-r:0,Ge=E>0?E-r:0,Yt=(he+Ge)/2,te=Yt!==0?R*Yt/(Yt+r):R;O=(R-te)/2}const D=Math.max(.001,R*E-n/pa)/E,B=(R-D)/2,z=c+B+O,k=i-B-O,{outerStart:$,outerEnd:K,innerStart:et,innerEnd:mt}=dit(t,C,E,k-z),wt=E-$,Ot=E-K,Bt=z+$/wt,se=k-K/Ot,_e=C+et,Ne=C+mt,He=z+et/_e,de=k-mt/Ne;if(e.beginPath(),a){if(e.arc(o,u,E,Bt,se),K>0){const Yt=E0(Ot,se,o,u);e.arc(Yt.x,Yt.y,K,se,k+ja)}const he=E0(Ne,k,o,u);if(e.lineTo(he.x,he.y),mt>0){const Yt=E0(Ne,de,o,u);e.arc(Yt.x,Yt.y,mt,k+ja,de+Math.PI)}if(e.arc(o,u,C,k-mt/C,z+et/C,!0),et>0){const Yt=E0(_e,He,o,u);e.arc(Yt.x,Yt.y,et,He+Math.PI,z-ja)}const Ge=E0(wt,z,o,u);if(e.lineTo(Ge.x,Ge.y),$>0){const Yt=E0(wt,Bt,o,u);e.arc(Yt.x,Yt.y,$,z-ja,Bt)}}else{e.moveTo(o,u);const he=Math.cos(Bt)*E+o,Ge=Math.sin(Bt)*E+u;e.lineTo(he,Ge);const Yt=Math.cos(se)*E+o,te=Math.sin(se)*E+u;e.lineTo(Yt,te)}e.closePath()}function git(e,t,n,r,i){const{fullCircles:a,startAngle:o,circumference:u}=t;let c=t.endAngle;if(a){XL(e,t,n,r,o+xo,i);for(let g=0;g<a;++g)e.fill();isNaN(u)||(c=o+u%xo,u%xo==0&&(c+=xo))}return XL(e,t,n,r,c,i),e.fill(),c}function mit(e,t,n){const{x:r,y:i,startAngle:a,pixelMargin:o,fullCircles:u}=t,c=Math.max(t.outerRadius-o,0),g=t.innerRadius+o;let _;for(n&&K5(e,t,a+xo),e.beginPath(),e.arc(r,i,g,a+xo,a,!0),_=0;_<u;++_)e.stroke();for(e.beginPath(),e.arc(r,i,c,a,a+xo),_=0;_<u;++_)e.stroke()}function vit(e,t,n,r,i,a){const{options:o}=t,{borderWidth:u,borderJoinStyle:c}=o,g=o.borderAlign==="inner";!u||(g?(e.lineWidth=u*2,e.lineJoin=c||"round"):(e.lineWidth=u,e.lineJoin=c||"bevel"),t.fullCircles&&mit(e,t,g),g&&K5(e,t,i),XL(e,t,n,r,i,a),e.stroke())}class w2 extends fp{constructor(t){super();this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,t&&Object.assign(this,t)}inRange(t,n,r){const i=this.getProps(["x","y"],r),{angle:a,distance:o}=SB(i,{x:t,y:n}),{startAngle:u,endAngle:c,innerRadius:g,outerRadius:_,circumference:E}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],r),C=this.options.spacing/2,R=Hr(E,c-u)>=xo||ib(a,u,c),D=og(o,g+C,_+C);return R&&D}getCenterPoint(t){const{x:n,y:r,startAngle:i,endAngle:a,innerRadius:o,outerRadius:u}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius","circumference"],t),{offset:c,spacing:g}=this.options,_=(i+a)/2,E=(o+u+g+c)/2;return{x:n+Math.cos(_)*E,y:r+Math.sin(_)*E}}tooltipPosition(t){return this.getCenterPoint(t)}draw(t){const{options:n,circumference:r}=this,i=(n.offset||0)/2,a=(n.spacing||0)/2,o=n.circular;if(this.pixelMargin=n.borderAlign==="inner"?.33:0,this.fullCircles=r>xo?Math.floor(r/xo):0,r===0||this.innerRadius<0||this.outerRadius<0)return;t.save();let u=0;if(i){u=i/2;const g=(this.startAngle+this.endAngle)/2;t.translate(Math.cos(g)*u,Math.sin(g)*u),this.circumference>=pa&&(u=i)}t.fillStyle=n.backgroundColor,t.strokeStyle=n.borderColor;const c=git(t,this,u,a,o);vit(t,this,u,a,c,o),t.restore()}}w2.id="arc";w2.defaults={borderAlign:"center",borderColor:"#fff",borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0};w2.defaultRoutes={backgroundColor:"backgroundColor"};function J5(e,t,n=t){e.lineCap=Hr(n.borderCapStyle,t.borderCapStyle),e.setLineDash(Hr(n.borderDash,t.borderDash)),e.lineDashOffset=Hr(n.borderDashOffset,t.borderDashOffset),e.lineJoin=Hr(n.borderJoinStyle,t.borderJoinStyle),e.lineWidth=Hr(n.borderWidth,t.borderWidth),e.strokeStyle=Hr(n.borderColor,t.borderColor)}function yit(e,t,n){e.lineTo(n.x,n.y)}function _it(e){return e.stepped?Uet:e.tension||e.cubicInterpolationMode==="monotone"?Vet:yit}function Q5(e,t,n={}){const r=e.length,{start:i=0,end:a=r-1}=n,{start:o,end:u}=t,c=Math.max(i,o),g=Math.min(a,u),_=i<o&&a<o||i>u&&a>u;return{count:r,start:c,loop:t.loop,ilen:g<c&&!_?r+g-c:g-c}}function xit(e,t,n,r){const{points:i,options:a}=t,{count:o,start:u,loop:c,ilen:g}=Q5(i,n,r),_=_it(a);let{move:E=!0,reverse:C}=r||{},O,R,D;for(O=0;O<=g;++O)R=i[(u+(C?g-O:O))%o],!R.skip&&(E?(e.moveTo(R.x,R.y),E=!1):_(e,D,R,C,a.stepped),D=R);return c&&(R=i[(u+(C?g:0))%o],_(e,D,R,C,a.stepped)),!!c}function bit(e,t,n,r){const i=t.points,{count:a,start:o,ilen:u}=Q5(i,n,r),{move:c=!0,reverse:g}=r||{};let _=0,E=0,C,O,R,D,B,z;const k=K=>(o+(g?u-K:K))%a,$=()=>{D!==B&&(e.lineTo(_,B),e.lineTo(_,D),e.lineTo(_,z))};for(c&&(O=i[k(0)],e.moveTo(O.x,O.y)),C=0;C<=u;++C){if(O=i[k(C)],O.skip)continue;const K=O.x,et=O.y,mt=K|0;mt===R?(et<D?D=et:et>B&&(B=et),_=(E*_+K)/++E):($(),e.lineTo(K,et),R=mt,E=0,D=B=et),z=et}$()}function YL(e){const t=e.options,n=t.borderDash&&t.borderDash.length;return!e._decimated&&!e._loop&&!t.tension&&t.cubicInterpolationMode!=="monotone"&&!t.stepped&&!n?bit:xit}function wit(e){return e.stepped?ynt:e.tension||e.cubicInterpolationMode==="monotone"?_nt:oy}function Sit(e,t,n,r){let i=t._path;i||(i=t._path=new Path2D,t.path(i,n,r)&&i.closePath()),J5(e,t.options),e.stroke(i)}function Eit(e,t,n,r){const{segments:i,options:a}=t,o=YL(t);for(const u of i)J5(e,a,u.style),e.beginPath(),o(e,t,u,{start:n,end:n+r-1})&&e.closePath(),e.stroke()}const Cit=typeof Path2D=="function";function Iit(e,t,n,r){Cit&&!t.options.segment?Sit(e,t,n,r):Eit(e,t,n,r)}class km extends fp{constructor(t){super();this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,t&&Object.assign(this,t)}updateControlPoints(t,n){const r=this.options;if((r.tension||r.cubicInterpolationMode==="monotone")&&!r.stepped&&!this._pointsUpdated){const i=r.spanGaps?this._loop:this._fullLoop;cnt(this._points,r,t,i,n),this._pointsUpdated=!0}}set points(t){this._points=t,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=Int(this,this.options.segment))}first(){const t=this.segments,n=this.points;return t.length&&n[t[0].start]}last(){const t=this.segments,n=this.points,r=t.length;return r&&n[t[r-1].end]}interpolate(t,n){const r=this.options,i=t[n],a=this.points,o=l5(this,{property:n,start:i,end:i});if(!o.length)return;const u=[],c=wit(r);let g,_;for(g=0,_=o.length;g<_;++g){const{start:E,end:C}=o[g],O=a[E],R=a[C];if(O===R){u.push(O);continue}const D=Math.abs((i-O[n])/(R[n]-O[n])),B=c(O,R,D,r.stepped);B[n]=t[n],u.push(B)}return u.length===1?u[0]:u}pathSegment(t,n,r){return YL(this)(t,this,n,r)}path(t,n,r){const i=this.segments,a=YL(this);let o=this._loop;n=n||0,r=r||this.points.length-n;for(const u of i)o&=a(t,this,u,{start:n,end:n+r-1});return!!o}draw(t,n,r,i){const a=this.options||{};(this.points||[]).length&&a.borderWidth&&(t.save(),Iit(t,this,r,i),t.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}km.id="line";km.defaults={borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0};km.defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};km.descriptors={_scriptable:!0,_indexable:e=>e!=="borderDash"&&e!=="fill"};function t4(e,t,n,r){const i=e.options,{[n]:a}=e.getProps([n],r);return Math.abs(t-a)<i.radius+i.hitRadius}class S2 extends fp{constructor(t){super();this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,t&&Object.assign(this,t)}inRange(t,n,r){const i=this.options,{x:a,y:o}=this.getProps(["x","y"],r);return Math.pow(t-a,2)+Math.pow(n-o,2)<Math.pow(i.hitRadius+i.radius,2)}inXRange(t,n){return t4(this,t,"x",n)}inYRange(t,n){return t4(this,t,"y",n)}getCenterPoint(t){const{x:n,y:r}=this.getProps(["x","y"],t);return{x:n,y:r}}size(t){t=t||this.options||{};let n=t.radius||0;n=Math.max(n,n&&t.hoverRadius||0);const r=n&&t.borderWidth||0;return(n+r)*2}draw(t,n){const r=this.options;this.skip||r.radius<.1||!lb(this,n,this.size(r)/2)||(t.strokeStyle=r.borderColor,t.lineWidth=r.borderWidth,t.fillStyle=r.backgroundColor,LL(t,r,this.x,this.y))}getRange(){const t=this.options||{};return t.radius+t.hitRadius}}S2.id="point";S2.defaults={borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0};S2.defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};function e4(e,t){const{x:n,y:r,base:i,width:a,height:o}=e.getProps(["x","y","base","width","height"],t);let u,c,g,_,E;return e.horizontal?(E=o/2,u=Math.min(n,i),c=Math.max(n,i),g=r-E,_=r+E):(E=a/2,u=n-E,c=n+E,g=Math.min(r,i),_=Math.max(r,i)),{left:u,top:g,right:c,bottom:_}}function Dm(e,t,n,r){return e?0:au(t,n,r)}function Pit(e,t,n){const r=e.options.borderWidth,i=e.borderSkipped,a=GB(r);return{t:Dm(i.top,a.top,0,n),r:Dm(i.right,a.right,0,t),b:Dm(i.bottom,a.bottom,0,n),l:Dm(i.left,a.left,0,t)}}function Tit(e,t,n){const{enableBorderRadius:r}=e.getProps(["enableBorderRadius"]),i=e.options.borderRadius,a=ny(i),o=Math.min(t,n),u=e.borderSkipped,c=r||_i(i);return{topLeft:Dm(!c||u.top||u.left,a.topLeft,0,o),topRight:Dm(!c||u.top||u.right,a.topRight,0,o),bottomLeft:Dm(!c||u.bottom||u.left,a.bottomLeft,0,o),bottomRight:Dm(!c||u.bottom||u.right,a.bottomRight,0,o)}}function Mit(e){const t=e4(e),n=t.right-t.left,r=t.bottom-t.top,i=Pit(e,n/2,r/2),a=Tit(e,n/2,r/2);return{outer:{x:t.left,y:t.top,w:n,h:r,radius:a},inner:{x:t.left+i.l,y:t.top+i.t,w:n-i.l-i.r,h:r-i.t-i.b,radius:{topLeft:Math.max(0,a.topLeft-Math.max(i.t,i.l)),topRight:Math.max(0,a.topRight-Math.max(i.t,i.r)),bottomLeft:Math.max(0,a.bottomLeft-Math.max(i.b,i.l)),bottomRight:Math.max(0,a.bottomRight-Math.max(i.b,i.r))}}}}function ZL(e,t,n,r){const i=t===null,a=n===null,u=e&&!(i&&a)&&e4(e,r);return u&&(i||og(t,u.left,u.right))&&(a||og(n,u.top,u.bottom))}function Ait(e){return e.topLeft||e.topRight||e.bottomLeft||e.bottomRight}function Lit(e,t){e.rect(t.x,t.y,t.w,t.h)}function KL(e,t,n={}){const r=e.x!==n.x?-t:0,i=e.y!==n.y?-t:0,a=(e.x+e.w!==n.x+n.w?t:0)-r,o=(e.y+e.h!==n.y+n.h?t:0)-i;return{x:e.x+r,y:e.y+i,w:e.w+a,h:e.h+o,radius:e.radius}}class E2 extends fp{constructor(t){super();this.options=void 0,this.horizontal=void 0,this.base=void 0,this.width=void 0,this.height=void 0,this.inflateAmount=void 0,t&&Object.assign(this,t)}draw(t){const{inflateAmount:n,options:{borderColor:r,backgroundColor:i}}=this,{inner:a,outer:o}=Mit(this),u=Ait(o.radius)?cb:Lit;t.save(),(o.w!==a.w||o.h!==a.h)&&(t.beginPath(),u(t,KL(o,n,a)),t.clip(),u(t,KL(a,-n,o)),t.fillStyle=r,t.fill("evenodd")),t.beginPath(),u(t,KL(a,n)),t.fillStyle=i,t.fill(),t.restore()}inRange(t,n,r){return ZL(this,t,n,r)}inXRange(t,n){return ZL(this,t,null,n)}inYRange(t,n){return ZL(this,null,t,n)}getCenterPoint(t){const{x:n,y:r,base:i,horizontal:a}=this.getProps(["x","y","base","horizontal"],t);return{x:a?(n+i)/2:n,y:a?r:(r+i)/2}}getRange(t){return t==="x"?this.width/2:this.height/2}}E2.id="bar";E2.defaults={borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0};E2.defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};var Oit=Object.freeze({__proto__:null,ArcElement:w2,LineElement:km,PointElement:S2,BarElement:E2});function Rit(e,t,n,r,i){const a=i.samples||r;if(a>=n)return e.slice(t,t+n);const o=[],u=(n-2)/(a-2);let c=0;const g=t+n-1;let _=t,E,C,O,R,D;for(o[c++]=e[_],E=0;E<a-2;E++){let B=0,z=0,k;const $=Math.floor((E+1)*u)+1+t,K=Math.min(Math.floor((E+2)*u)+1,n)+t,et=K-$;for(k=$;k<K;k++)B+=e[k].x,z+=e[k].y;B/=et,z/=et;const mt=Math.floor(E*u)+1+t,wt=Math.min(Math.floor((E+1)*u)+1,n)+t,{x:Ot,y:Bt}=e[_];for(O=R=-1,k=mt;k<wt;k++)R=.5*Math.abs((Ot-B)*(e[k].y-Bt)-(Ot-e[k].x)*(z-Bt)),R>O&&(O=R,C=e[k],D=k);o[c++]=C,_=D}return o[c++]=e[g],o}function kit(e,t,n,r){let i=0,a=0,o,u,c,g,_,E,C,O,R,D;const B=[],z=t+n-1,k=e[t].x,K=e[z].x-k;for(o=t;o<t+n;++o){u=e[o],c=(u.x-k)/K*r,g=u.y;const et=c|0;if(et===_)g<R?(R=g,E=o):g>D&&(D=g,C=o),i=(a*i+u.x)/++a;else{const mt=o-1;if(!Di(E)&&!Di(C)){const wt=Math.min(E,C),Ot=Math.max(E,C);wt!==O&&wt!==mt&&B.push(P_(am({},e[wt]),{x:i})),Ot!==O&&Ot!==mt&&B.push(P_(am({},e[Ot]),{x:i}))}o>0&&mt!==O&&B.push(e[mt]),B.push(u),_=et,a=0,R=D=g,E=C=O=o}}return B}function n4(e){if(e._decimated){const t=e._data;delete e._decimated,delete e._data,Object.defineProperty(e,"data",{value:t})}}function r4(e){e.data.datasets.forEach(t=>{n4(t)})}function Dit(e,t){const n=t.length;let r=0,i;const{iScale:a}=e,{min:o,max:u,minDefined:c,maxDefined:g}=a.getUserBounds();return c&&(r=au(ag(t,a.axis,o).lo,0,n-1)),g?i=au(ag(t,a.axis,u).hi+1,r,n)-r:i=n-r,{start:r,count:i}}var Nit={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(e,t,n)=>{if(!n.enabled){r4(e);return}const r=e.width;e.data.datasets.forEach((i,a)=>{const{_data:o,indexAxis:u}=i,c=e.getDatasetMeta(a),g=o||i.data;if(fb([u,e.options.indexAxis])==="y"||!c.controller.supportsDecimation)return;const _=e.scales[c.xAxisID];if(_.type!=="linear"&&_.type!=="time"||e.options.parsing)return;let{start:E,count:C}=Dit(c,g);const O=n.threshold||4*r;if(C<=O){n4(i);return}Di(o)&&(i._data=g,delete i.data,Object.defineProperty(i,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(D){this._data=D}}));let R;switch(n.algorithm){case"lttb":R=Rit(g,E,C,r,n);break;case"min-max":R=kit(g,E,C,r);break;default:throw new Error(`Unsupported decimation algorithm '${n.algorithm}'`)}i._decimated=R})},destroy(e){r4(e)}};function Fit(e,t,n){const r=e.segments,i=e.points,a=t.points,o=[];for(const u of r){let{start:c,end:g}=u;g=QL(c,g,i);const _=JL(n,i[c],i[g],u.loop);if(!t.segments){o.push({source:u,target:_,start:i[c],end:i[g]});continue}const E=l5(t,_);for(const C of E){const O=JL(n,a[C.start],a[C.end],C.loop),R=u5(u,i,O);for(const D of R)o.push({source:D,target:C,start:{[n]:i4(_,O,"start",Math.max)},end:{[n]:i4(_,O,"end",Math.min)}})}}return o}function JL(e,t,n,r){if(r)return;let i=t[e],a=n[e];return e==="angle"&&(i=ff(i),a=ff(a)),{property:e,start:i,end:a}}function zit(e,t){const{x:n=null,y:r=null}=e||{},i=t.points,a=[];return t.segments.forEach(({start:o,end:u})=>{u=QL(o,u,i);const c=i[o],g=i[u];r!==null?(a.push({x:c.x,y:r}),a.push({x:g.x,y:r})):n!==null&&(a.push({x:n,y:c.y}),a.push({x:n,y:g.y}))}),a}function QL(e,t,n){for(;t>e;t--){const r=n[t];if(!isNaN(r.x)&&!isNaN(r.y))break}return t}function i4(e,t,n,r){return e&&t?r(e[n],t[n]):e?e[n]:t?t[n]:0}function o4(e,t){let n=[],r=!1;return Fo(e)?(r=!0,n=e):n=zit(e,t),n.length?new km({points:n,options:{tension:0},_loop:r,_fullLoop:r}):null}function a4(e){return e&&e.fill!==!1}function Bit(e,t,n){let i=e[t].fill;const a=[t];let o;if(!n)return i;for(;i!==!1&&a.indexOf(i)===-1;){if(!rs(i))return i;if(o=e[i],!o)return!1;if(o.visible)return i;a.push(i),i=o.fill}return!1}function Uit(e,t,n){const r=qit(e);if(_i(r))return isNaN(r.value)?!1:r;let i=parseFloat(r);return rs(i)&&Math.floor(i)===i?Vit(r[0],t,i,n):["origin","start","end","stack","shape"].indexOf(r)>=0&&r}function Vit(e,t,n,r){return(e==="-"||e==="+")&&(n=t+n),n===t||n<0||n>=r?!1:n}function $it(e,t){let n=null;return e==="start"?n=t.bottom:e==="end"?n=t.top:_i(e)?n=t.getPixelForValue(e.value):t.getBasePixel&&(n=t.getBasePixel()),n}function jit(e,t,n){let r;return e==="start"?r=n:e==="end"?r=t.options.reverse?t.min:t.max:_i(e)?r=e.value:r=t.getBaseValue(),r}function qit(e){const t=e.options,n=t.fill;let r=Hr(n&&n.target,n);return r===void 0&&(r=!!t.backgroundColor),r===!1||r===null?!1:r===!0?"origin":r}function Git(e){const{scale:t,index:n,line:r}=e,i=[],a=r.segments,o=r.points,u=Wit(t,n);u.push(o4({x:null,y:t.bottom},r));for(let c=0;c<a.length;c++){const g=a[c];for(let _=g.start;_<=g.end;_++)Hit(i,o[_],u)}return new km({points:i,options:{}})}function Wit(e,t){const n=[],r=e.getMatchingVisibleMetas("line");for(let i=0;i<r.length;i++){const a=r[i];if(a.index===t)break;a.hidden||n.unshift(a.dataset)}return n}function Hit(e,t,n){const r=[];for(let i=0;i<n.length;i++){const a=n[i],{first:o,last:u,point:c}=Xit(a,t,"x");if(!(!c||o&&u)){if(o)r.unshift(c);else if(e.push(c),!u)break}}e.push(...r)}function Xit(e,t,n){const r=e.interpolate(t,n);if(!r)return{};const i=r[n],a=e.segments,o=e.points;let u=!1,c=!1;for(let g=0;g<a.length;g++){const _=a[g],E=o[_.start][n],C=o[_.end][n];if(og(i,E,C)){u=i===E,c=i===C;break}}return{first:u,last:c,point:r}}class s4{constructor(t){this.x=t.x,this.y=t.y,this.radius=t.radius}pathSegment(t,n,r){const{x:i,y:a,radius:o}=this;return n=n||{start:0,end:xo},t.arc(i,a,o,n.end,n.start,!0),!r.bounds}interpolate(t){const{x:n,y:r,radius:i}=this,a=t.angle;return{x:n+Math.cos(a)*i,y:r+Math.sin(a)*i,angle:a}}}function Yit(e){const{chart:t,fill:n,line:r}=e;if(rs(n))return Zit(t,n);if(n==="stack")return Git(e);if(n==="shape")return!0;const i=Kit(e);return i instanceof s4?i:o4(i,r)}function Zit(e,t){const n=e.getDatasetMeta(t);return n&&e.isDatasetVisible(t)?n.dataset:null}function Kit(e){return(e.scale||{}).getPointPositionForValue?Qit(e):Jit(e)}function Jit(e){const{scale:t={},fill:n}=e,r=$it(n,t);if(rs(r)){const i=t.isHorizontal();return{x:i?r:null,y:i?null:r}}return null}function Qit(e){const{scale:t,fill:n}=e,r=t.options,i=t.getLabels().length,a=r.reverse?t.max:t.min,o=jit(n,t,a),u=[];if(r.grid.circular){const c=t.getPointPositionForValue(0,a);return new s4({x:c.x,y:c.y,radius:t.getDistanceFromCenterForValue(o)})}for(let c=0;c<i;++c)u.push(t.getPointPositionForValue(c,o));return u}function tO(e,t,n){const r=Yit(t),{line:i,scale:a,axis:o}=t,u=i.options,c=u.fill,g=u.backgroundColor,{above:_=g,below:E=g}=c||{};r&&i.points.length&&(n2(e,n),tot(e,{line:i,target:r,above:_,below:E,area:n,scale:a,axis:o}),r2(e))}function tot(e,t){const{line:n,target:r,above:i,below:a,area:o,scale:u}=t,c=n._loop?"angle":t.axis;e.save(),c==="x"&&a!==i&&(u4(e,r,o.top),l4(e,{line:n,target:r,color:i,scale:u,property:c}),e.restore(),e.save(),u4(e,r,o.bottom)),l4(e,{line:n,target:r,color:a,scale:u,property:c}),e.restore()}function u4(e,t,n){const{segments:r,points:i}=t;let a=!0,o=!1;e.beginPath();for(const u of r){const{start:c,end:g}=u,_=i[c],E=i[QL(c,g,i)];a?(e.moveTo(_.x,_.y),a=!1):(e.lineTo(_.x,n),e.lineTo(_.x,_.y)),o=!!t.pathSegment(e,u,{move:o}),o?e.closePath():e.lineTo(E.x,n)}e.lineTo(t.first().x,n),e.closePath(),e.clip()}function l4(e,t){const{line:n,target:r,property:i,color:a,scale:o}=t,u=Fit(n,r,i);for(const{source:c,target:g,start:_,end:E}of u){const{style:{backgroundColor:C=a}={}}=c,O=r!==!0;e.save(),e.fillStyle=C,eot(e,o,O&&JL(i,_,E)),e.beginPath();const R=!!n.pathSegment(e,c);let D;if(O){R?e.closePath():c4(e,r,E,i);const B=!!r.pathSegment(e,g,{move:R,reverse:!0});D=R&&B,D||c4(e,r,_,i)}e.closePath(),e.fill(D?"evenodd":"nonzero"),e.restore()}}function eot(e,t,n){const{top:r,bottom:i}=t.chart.chartArea,{property:a,start:o,end:u}=n||{};a==="x"&&(e.beginPath(),e.rect(o,r,u-o,i-r),e.clip())}function c4(e,t,n,r){const i=t.interpolate(n,r);i&&e.lineTo(i.x,i.y)}var not={id:"filler",afterDatasetsUpdate(e,t,n){const r=(e.data.datasets||[]).length,i=[];let a,o,u,c;for(o=0;o<r;++o)a=e.getDatasetMeta(o),u=a.dataset,c=null,u&&u.options&&u instanceof km&&(c={visible:e.isDatasetVisible(o),index:o,fill:Uit(u,o,r),chart:e,axis:a.controller.options.indexAxis,scale:a.vScale,line:u}),a.$filler=c,i.push(c);for(o=0;o<r;++o)c=i[o],!(!c||c.fill===!1)&&(c.fill=Bit(i,o,n.propagate))},beforeDraw(e,t,n){const r=n.drawTime==="beforeDraw",i=e.getSortedVisibleDatasetMetas(),a=e.chartArea;for(let o=i.length-1;o>=0;--o){const u=i[o].$filler;!u||(u.line.updateControlPoints(a,u.axis),r&&u.fill&&tO(e.ctx,u,a))}},beforeDatasetsDraw(e,t,n){if(n.drawTime!=="beforeDatasetsDraw")return;const r=e.getSortedVisibleDatasetMetas();for(let i=r.length-1;i>=0;--i){const a=r[i].$filler;a4(a)&&tO(e.ctx,a,e.chartArea)}},beforeDatasetDraw(e,t,n){const r=t.meta.$filler;!a4(r)||n.drawTime!=="beforeDatasetDraw"||tO(e.ctx,r,e.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const f4=(e,t)=>{let{boxHeight:n=t,boxWidth:r=t}=e;return e.usePointStyle&&(n=Math.min(n,t),r=e.pointStyleWidth||Math.min(r,t)),{boxWidth:r,boxHeight:n,itemHeight:Math.max(t,n)}},rot=(e,t)=>e!==null&&t!==null&&e.datasetIndex===t.datasetIndex&&e.index===t.index;class h4 extends fp{constructor(t){super();this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,n,r){this.maxWidth=t,this.maxHeight=n,this._margins=r,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){const t=this.options.labels||{};let n=zo(t.generateLabels,[this.chart],this)||[];t.filter&&(n=n.filter(r=>t.filter(r,this.chart.data))),t.sort&&(n=n.sort((r,i)=>t.sort(r,i,this.chart.data))),this.options.reverse&&n.reverse(),this.legendItems=n}fit(){const{options:t,ctx:n}=this;if(!t.display){this.width=this.height=0;return}const r=t.labels,i=Ds(r.font),a=i.size,o=this._computeTitleHeight(),{boxWidth:u,itemHeight:c}=f4(r,a);let g,_;n.font=i.string,this.isHorizontal()?(g=this.maxWidth,_=this._fitRows(o,a,u,c)+10):(_=this.maxHeight,g=this._fitCols(o,a,u,c)+10),this.width=Math.min(g,t.maxWidth||this.maxWidth),this.height=Math.min(_,t.maxHeight||this.maxHeight)}_fitRows(t,n,r,i){const{ctx:a,maxWidth:o,options:{labels:{padding:u}}}=this,c=this.legendHitBoxes=[],g=this.lineWidths=[0],_=i+u;let E=t;a.textAlign="left",a.textBaseline="middle";let C=-1,O=-_;return this.legendItems.forEach((R,D)=>{const B=r+n/2+a.measureText(R.text).width;(D===0||g[g.length-1]+B+2*u>o)&&(E+=_,g[g.length-(D>0?0:1)]=0,O+=_,C++),c[D]={left:0,top:O,row:C,width:B,height:i},g[g.length-1]+=B+u}),E}_fitCols(t,n,r,i){const{ctx:a,maxHeight:o,options:{labels:{padding:u}}}=this,c=this.legendHitBoxes=[],g=this.columnSizes=[],_=o-t;let E=u,C=0,O=0,R=0,D=0;return this.legendItems.forEach((B,z)=>{const k=r+n/2+a.measureText(B.text).width;z>0&&O+i+2*u>_&&(E+=C+u,g.push({width:C,height:O}),R+=C+u,D++,C=O=0),c[z]={left:R,top:O,col:D,width:k,height:i},C=Math.max(C,k),O+=i+u}),E+=C,g.push({width:C,height:O}),E}adjustHitBoxes(){if(!this.options.display)return;const t=this._computeTitleHeight(),{legendHitBoxes:n,options:{align:r,labels:{padding:i},rtl:a}}=this,o=w0(a,this.left,this.width);if(this.isHorizontal()){let u=0,c=sl(r,this.left+i,this.right-this.lineWidths[u]);for(const g of n)u!==g.row&&(u=g.row,c=sl(r,this.left+i,this.right-this.lineWidths[u])),g.top+=this.top+t+i,g.left=o.leftForLtr(o.x(c),g.width),c+=g.width+i}else{let u=0,c=sl(r,this.top+t+i,this.bottom-this.columnSizes[u].height);for(const g of n)g.col!==u&&(u=g.col,c=sl(r,this.top+t+i,this.bottom-this.columnSizes[u].height)),g.top=c,g.left+=this.left+i,g.left=o.leftForLtr(o.x(g.left),g.width),c+=g.height+i}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){const t=this.ctx;n2(t,this),this._draw(),r2(t)}}_draw(){const{options:t,columnSizes:n,lineWidths:r,ctx:i}=this,{align:a,labels:o}=t,u=Ei.color,c=w0(t.rtl,this.left,this.width),g=Ds(o.font),{color:_,padding:E}=o,C=g.size,O=C/2;let R;this.drawTitle(),i.textAlign=c.textAlign("left"),i.textBaseline="middle",i.lineWidth=.5,i.font=g.string;const{boxWidth:D,boxHeight:B,itemHeight:z}=f4(o,C),k=function(wt,Ot,Bt){if(isNaN(D)||D<=0||isNaN(B)||B<0)return;i.save();const se=Hr(Bt.lineWidth,1);if(i.fillStyle=Hr(Bt.fillStyle,u),i.lineCap=Hr(Bt.lineCap,"butt"),i.lineDashOffset=Hr(Bt.lineDashOffset,0),i.lineJoin=Hr(Bt.lineJoin,"miter"),i.lineWidth=se,i.strokeStyle=Hr(Bt.strokeStyle,u),i.setLineDash(Hr(Bt.lineDash,[])),o.usePointStyle){const _e={radius:B*Math.SQRT2/2,pointStyle:Bt.pointStyle,rotation:Bt.rotation,borderWidth:se},Ne=c.xPlus(wt,D/2),He=Ot+O;qB(i,_e,Ne,He,o.pointStyleWidth&&D)}else{const _e=Ot+Math.max((C-B)/2,0),Ne=c.leftForLtr(wt,D),He=ny(Bt.borderRadius);i.beginPath(),Object.values(He).some(de=>de!==0)?cb(i,{x:Ne,y:_e,w:D,h:B,radius:He}):i.rect(Ne,_e,D,B),i.fill(),se!==0&&i.stroke()}i.restore()},$=function(wt,Ot,Bt){ey(i,Bt.text,wt,Ot+z/2,g,{strikethrough:Bt.hidden,textAlign:c.textAlign(Bt.textAlign)})},K=this.isHorizontal(),et=this._computeTitleHeight();K?R={x:sl(a,this.left+E,this.right-r[0]),y:this.top+E+et,line:0}:R={x:this.left+E,y:sl(a,this.top+et+E,this.bottom-n[0].height),line:0},i5(this.ctx,t.textDirection);const mt=z+E;this.legendItems.forEach((wt,Ot)=>{i.strokeStyle=wt.fontColor||_,i.fillStyle=wt.fontColor||_;const Bt=i.measureText(wt.text).width,se=c.textAlign(wt.textAlign||(wt.textAlign=o.textAlign)),_e=D+O+Bt;let Ne=R.x,He=R.y;c.setWidth(this.width),K?Ot>0&&Ne+_e+E>this.right&&(He=R.y+=mt,R.line++,Ne=R.x=sl(a,this.left+E,this.right-r[R.line])):Ot>0&&He+mt>this.bottom&&(Ne=R.x=Ne+n[R.line].width+E,R.line++,He=R.y=sl(a,this.top+et+E,this.bottom-n[R.line].height));const de=c.x(Ne);k(de,He,wt),Ne=pet(se,Ne+D+O,K?Ne+_e:this.right,t.rtl),$(c.x(Ne),He,wt),K?R.x+=_e+E:R.y+=mt}),o5(this.ctx,t.textDirection)}drawTitle(){const t=this.options,n=t.title,r=Ds(n.font),i=ul(n.padding);if(!n.display)return;const a=w0(t.rtl,this.left,this.width),o=this.ctx,u=n.position,c=r.size/2,g=i.top+c;let _,E=this.left,C=this.width;if(this.isHorizontal())C=Math.max(...this.lineWidths),_=this.top+g,E=sl(t.align,E,this.right-C);else{const R=this.columnSizes.reduce((D,B)=>Math.max(D,B.height),0);_=g+sl(t.align,this.top,this.bottom-R-t.labels.padding-this._computeTitleHeight())}const O=sl(u,E,E+C);o.textAlign=a.textAlign(wL(u)),o.textBaseline="middle",o.strokeStyle=n.color,o.fillStyle=n.color,o.font=r.string,ey(o,n.text,O,_,r)}_computeTitleHeight(){const t=this.options.title,n=Ds(t.font),r=ul(t.padding);return t.display?n.lineHeight+r.height:0}_getLegendItemAt(t,n){let r,i,a;if(og(t,this.left,this.right)&&og(n,this.top,this.bottom)){for(a=this.legendHitBoxes,r=0;r<a.length;++r)if(i=a[r],og(t,i.left,i.left+i.width)&&og(n,i.top,i.top+i.height))return this.legendItems[r]}return null}handleEvent(t){const n=this.options;if(!iot(t.type,n))return;const r=this._getLegendItemAt(t.x,t.y);if(t.type==="mousemove"||t.type==="mouseout"){const i=this._hoveredItem,a=rot(i,r);i&&!a&&zo(n.onLeave,[t,i,this],this),this._hoveredItem=r,r&&!a&&zo(n.onHover,[t,r,this],this)}else r&&zo(n.onClick,[t,r,this],this)}}function iot(e,t){return!!((e==="mousemove"||e==="mouseout")&&(t.onHover||t.onLeave)||t.onClick&&(e==="click"||e==="mouseup"))}var oot={id:"legend",_element:h4,start(e,t,n){const r=e.legend=new h4({ctx:e.ctx,options:n,chart:e});ll.configure(e,r,n),ll.addBox(e,r)},stop(e){ll.removeBox(e,e.legend),delete e.legend},beforeUpdate(e,t,n){const r=e.legend;ll.configure(e,r,n),r.options=n},afterUpdate(e){const t=e.legend;t.buildLabels(),t.adjustHitBoxes()},afterEvent(e,t){t.replay||e.legend.handleEvent(t.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(e,t,n){const r=t.datasetIndex,i=n.chart;i.isDatasetVisible(r)?(i.hide(r),t.hidden=!0):(i.show(r),t.hidden=!1)},onHover:null,onLeave:null,labels:{color:e=>e.chart.options.color,boxWidth:40,padding:10,generateLabels(e){const t=e.data.datasets,{labels:{usePointStyle:n,pointStyle:r,textAlign:i,color:a}}=e.legend.options;return e._getSortedDatasetMetas().map(o=>{const u=o.controller.getStyle(n?0:void 0),c=ul(u.borderWidth);return{text:t[o.index].label,fillStyle:u.backgroundColor,fontColor:a,hidden:!o.visible,lineCap:u.borderCapStyle,lineDash:u.borderDash,lineDashOffset:u.borderDashOffset,lineJoin:u.borderJoinStyle,lineWidth:(c.width+c.height)/4,strokeStyle:u.borderColor,pointStyle:r||u.pointStyle,rotation:u.rotation,textAlign:i||u.textAlign,borderRadius:0,datasetIndex:o.index}},this)}},title:{color:e=>e.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:e=>!e.startsWith("on"),labels:{_scriptable:e=>!["generateLabels","filter","sort"].includes(e)}}};class eO extends fp{constructor(t){super();this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,n){const r=this.options;if(this.left=0,this.top=0,!r.display){this.width=this.height=this.right=this.bottom=0;return}this.width=this.right=t,this.height=this.bottom=n;const i=Fo(r.text)?r.text.length:1;this._padding=ul(r.padding);const a=i*Ds(r.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=a:this.width=a}isHorizontal(){const t=this.options.position;return t==="top"||t==="bottom"}_drawArgs(t){const{top:n,left:r,bottom:i,right:a,options:o}=this,u=o.align;let c=0,g,_,E;return this.isHorizontal()?(_=sl(u,r,a),E=n+t,g=a-r):(o.position==="left"?(_=r+t,E=sl(u,i,n),c=pa*-.5):(_=a-t,E=sl(u,n,i),c=pa*.5),g=i-n),{titleX:_,titleY:E,maxWidth:g,rotation:c}}draw(){const t=this.ctx,n=this.options;if(!n.display)return;const r=Ds(n.font),a=r.lineHeight/2+this._padding.top,{titleX:o,titleY:u,maxWidth:c,rotation:g}=this._drawArgs(a);ey(t,n.text,0,0,r,{color:n.color,maxWidth:c,rotation:g,textAlign:wL(n.align),textBaseline:"middle",translation:[o,u]})}}function aot(e,t){const n=new eO({ctx:e.ctx,options:t,chart:e});ll.configure(e,n,t),ll.addBox(e,n),e.titleBlock=n}var sot={id:"title",_element:eO,start(e,t,n){aot(e,n)},stop(e){const t=e.titleBlock;ll.removeBox(e,t),delete e.titleBlock},beforeUpdate(e,t,n){const r=e.titleBlock;ll.configure(e,r,n),r.options=n},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const C2=new WeakMap;var uot={id:"subtitle",start(e,t,n){const r=new eO({ctx:e.ctx,options:n,chart:e});ll.configure(e,r,n),ll.addBox(e,r),C2.set(e,r)},stop(e){ll.removeBox(e,C2.get(e)),C2.delete(e)},beforeUpdate(e,t,n){const r=C2.get(e);ll.configure(e,r,n),r.options=n},defaults:{align:"center",display:!1,font:{weight:"normal"},fullSize:!0,padding:0,position:"top",text:"",weight:1500},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const bb={average(e){if(!e.length)return!1;let t,n,r=0,i=0,a=0;for(t=0,n=e.length;t<n;++t){const o=e[t].element;if(o&&o.hasValue()){const u=o.tooltipPosition();r+=u.x,i+=u.y,++a}}return{x:r/a,y:i/a}},nearest(e,t){if(!e.length)return!1;let n=t.x,r=t.y,i=Number.POSITIVE_INFINITY,a,o,u;for(a=0,o=e.length;a<o;++a){const c=e[a].element;if(c&&c.hasValue()){const g=c.getCenterPoint(),_=xL(t,g);_<i&&(i=_,u=c)}}if(u){const c=u.tooltipPosition();n=c.x,r=c.y}return{x:n,y:r}}};function rd(e,t){return t&&(Fo(t)?Array.prototype.push.apply(e,t):e.push(t)),e}function lg(e){return(typeof e=="string"||e instanceof String)&&e.indexOf(` `)>-1?e.split(` `):e}function lot(e,t){const{element:n,datasetIndex:r,index:i}=t,a=e.getDatasetMeta(r).controller,{label:o,value:u}=a.getLabelAndValue(i);return{chart:e,label:o,parsed:a.getParsed(i),raw:e.data.datasets[r].data[i],formattedValue:u,dataset:a.getDataset(),dataIndex:i,datasetIndex:r,element:n}}function p4(e,t){const n=e.chart.ctx,{body:r,footer:i,title:a}=e,{boxWidth:o,boxHeight:u}=t,c=Ds(t.bodyFont),g=Ds(t.titleFont),_=Ds(t.footerFont),E=a.length,C=i.length,O=r.length,R=ul(t.padding);let D=R.height,B=0,z=r.reduce((K,et)=>K+et.before.length+et.lines.length+et.after.length,0);if(z+=e.beforeBody.length+e.afterBody.length,E&&(D+=E*g.lineHeight+(E-1)*t.titleSpacing+t.titleMarginBottom),z){const K=t.displayColors?Math.max(u,c.lineHeight):c.lineHeight;D+=O*K+(z-O)*c.lineHeight+(z-1)*t.bodySpacing}C&&(D+=t.footerMarginTop+C*_.lineHeight+(C-1)*t.footerSpacing);let k=0;const $=function(K){B=Math.max(B,n.measureText(K).width+k)};return n.save(),n.font=g.string,ho(e.title,$),n.font=c.string,ho(e.beforeBody.concat(e.afterBody),$),k=t.displayColors?o+2+t.boxPadding:0,ho(r,K=>{ho(K.before,$),ho(K.lines,$),ho(K.after,$)}),k=0,n.font=_.string,ho(e.footer,$),n.restore(),B+=R.width,{width:B,height:D}}function cot(e,t){const{y:n,height:r}=t;return n<r/2?"top":n>e.height-r/2?"bottom":"center"}function fot(e,t,n,r){const{x:i,width:a}=r,o=n.caretSize+n.caretPadding;if(e==="left"&&i+a+o>t.width||e==="right"&&i-a-o<0)return!0}function hot(e,t,n,r){const{x:i,width:a}=n,{width:o,chartArea:{left:u,right:c}}=e;let g="center";return r==="center"?g=i<=(u+c)/2?"left":"right":i<=a/2?g="left":i>=o-a/2&&(g="right"),fot(g,e,t,n)&&(g="center"),g}function d4(e,t,n){const r=n.yAlign||t.yAlign||cot(e,n);return{xAlign:n.xAlign||t.xAlign||hot(e,t,n,r),yAlign:r}}function pot(e,t){let{x:n,width:r}=e;return t==="right"?n-=r:t==="center"&&(n-=r/2),n}function dot(e,t,n){let{y:r,height:i}=e;return t==="top"?r+=n:t==="bottom"?r-=i+n:r-=i/2,r}function g4(e,t,n,r){const{caretSize:i,caretPadding:a,cornerRadius:o}=e,{xAlign:u,yAlign:c}=n,g=i+a,{topLeft:_,topRight:E,bottomLeft:C,bottomRight:O}=ny(o);let R=pot(t,u);const D=dot(t,c,g);return c==="center"?u==="left"?R+=g:u==="right"&&(R-=g):u==="left"?R-=Math.max(_,C)+i:u==="right"&&(R+=Math.max(E,O)+i),{x:au(R,0,r.width-t.width),y:au(D,0,r.height-t.height)}}function I2(e,t,n){const r=ul(n.padding);return t==="center"?e.x+e.width/2:t==="right"?e.x+e.width-r.right:e.x+r.left}function m4(e){return rd([],lg(e))}function got(e,t,n){return Om(e,{tooltip:t,tooltipItems:n,type:"tooltip"})}function v4(e,t){const n=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return n?e.override(n):e}class nO extends fp{constructor(t){super();this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=t.chart||t._chart,this._chart=this.chart,this.options=t.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const t=this._cachedAnimations;if(t)return t;const n=this.chart,r=this.options.setContext(this.getContext()),i=r.enabled&&n.options.animation&&r.animations,a=new p5(this.chart,i);return i._cacheable&&(this._cachedAnimations=Object.freeze(a)),a}getContext(){return this.$context||(this.$context=got(this.chart.getContext(),this,this._tooltipItems))}getTitle(t,n){const{callbacks:r}=n,i=r.beforeTitle.apply(this,[t]),a=r.title.apply(this,[t]),o=r.afterTitle.apply(this,[t]);let u=[];return u=rd(u,lg(i)),u=rd(u,lg(a)),u=rd(u,lg(o)),u}getBeforeBody(t,n){return m4(n.callbacks.beforeBody.apply(this,[t]))}getBody(t,n){const{callbacks:r}=n,i=[];return ho(t,a=>{const o={before:[],lines:[],after:[]},u=v4(r,a);rd(o.before,lg(u.beforeLabel.call(this,a))),rd(o.lines,u.label.call(this,a)),rd(o.after,lg(u.afterLabel.call(this,a))),i.push(o)}),i}getAfterBody(t,n){return m4(n.callbacks.afterBody.apply(this,[t]))}getFooter(t,n){const{callbacks:r}=n,i=r.beforeFooter.apply(this,[t]),a=r.footer.apply(this,[t]),o=r.afterFooter.apply(this,[t]);let u=[];return u=rd(u,lg(i)),u=rd(u,lg(a)),u=rd(u,lg(o)),u}_createItems(t){const n=this._active,r=this.chart.data,i=[],a=[],o=[];let u=[],c,g;for(c=0,g=n.length;c<g;++c)u.push(lot(this.chart,n[c]));return t.filter&&(u=u.filter((_,E,C)=>t.filter(_,E,C,r))),t.itemSort&&(u=u.sort((_,E)=>t.itemSort(_,E,r))),ho(u,_=>{const E=v4(t.callbacks,_);i.push(E.labelColor.call(this,_)),a.push(E.labelPointStyle.call(this,_)),o.push(E.labelTextColor.call(this,_))}),this.labelColors=i,this.labelPointStyles=a,this.labelTextColors=o,this.dataPoints=u,u}update(t,n){const r=this.options.setContext(this.getContext()),i=this._active;let a,o=[];if(!i.length)this.opacity!==0&&(a={opacity:0});else{const u=bb[r.position].call(this,i,this._eventPosition);o=this._createItems(r),this.title=this.getTitle(o,r),this.beforeBody=this.getBeforeBody(o,r),this.body=this.getBody(o,r),this.afterBody=this.getAfterBody(o,r),this.footer=this.getFooter(o,r);const c=this._size=p4(this,r),g=Object.assign({},u,c),_=d4(this.chart,r,g),E=g4(r,g,_,this.chart);this.xAlign=_.xAlign,this.yAlign=_.yAlign,a={opacity:1,x:E.x,y:E.y,width:c.width,height:c.height,caretX:u.x,caretY:u.y}}this._tooltipItems=o,this.$context=void 0,a&&this._resolveAnimations().update(this,a),t&&r.external&&r.external.call(this,{chart:this.chart,tooltip:this,replay:n})}drawCaret(t,n,r,i){const a=this.getCaretPosition(t,r,i);n.lineTo(a.x1,a.y1),n.lineTo(a.x2,a.y2),n.lineTo(a.x3,a.y3)}getCaretPosition(t,n,r){const{xAlign:i,yAlign:a}=this,{caretSize:o,cornerRadius:u}=r,{topLeft:c,topRight:g,bottomLeft:_,bottomRight:E}=ny(u),{x:C,y:O}=t,{width:R,height:D}=n;let B,z,k,$,K,et;return a==="center"?(K=O+D/2,i==="left"?(B=C,z=B-o,$=K+o,et=K-o):(B=C+R,z=B+o,$=K-o,et=K+o),k=B):(i==="left"?z=C+Math.max(c,_)+o:i==="right"?z=C+R-Math.max(g,E)-o:z=this.caretX,a==="top"?($=O,K=$-o,B=z-o,k=z+o):($=O+D,K=$+o,B=z+o,k=z-o),et=$),{x1:B,x2:z,x3:k,y1:$,y2:K,y3:et}}drawTitle(t,n,r){const i=this.title,a=i.length;let o,u,c;if(a){const g=w0(r.rtl,this.x,this.width);for(t.x=I2(this,r.titleAlign,r),n.textAlign=g.textAlign(r.titleAlign),n.textBaseline="middle",o=Ds(r.titleFont),u=r.titleSpacing,n.fillStyle=r.titleColor,n.font=o.string,c=0;c<a;++c)n.fillText(i[c],g.x(t.x),t.y+o.lineHeight/2),t.y+=o.lineHeight+u,c+1===a&&(t.y+=r.titleMarginBottom-u)}}_drawColorBox(t,n,r,i,a){const o=this.labelColors[r],u=this.labelPointStyles[r],{boxHeight:c,boxWidth:g,boxPadding:_}=a,E=Ds(a.bodyFont),C=I2(this,"left",a),O=i.x(C),R=c<E.lineHeight?(E.lineHeight-c)/2:0,D=n.y+R;if(a.usePointStyle){const B={radius:Math.min(g,c)/2,pointStyle:u.pointStyle,rotation:u.rotation,borderWidth:1},z=i.leftForLtr(O,g)+g/2,k=D+c/2;t.strokeStyle=a.multiKeyBackground,t.fillStyle=a.multiKeyBackground,LL(t,B,z,k),t.strokeStyle=o.borderColor,t.fillStyle=o.backgroundColor,LL(t,B,z,k)}else{t.lineWidth=_i(o.borderWidth)?Math.max(...Object.values(o.borderWidth)):o.borderWidth||1,t.strokeStyle=o.borderColor,t.setLineDash(o.borderDash||[]),t.lineDashOffset=o.borderDashOffset||0;const B=i.leftForLtr(O,g-_),z=i.leftForLtr(i.xPlus(O,1),g-_-2),k=ny(o.borderRadius);Object.values(k).some($=>$!==0)?(t.beginPath(),t.fillStyle=a.multiKeyBackground,cb(t,{x:B,y:D,w:g,h:c,radius:k}),t.fill(),t.stroke(),t.fillStyle=o.backgroundColor,t.beginPath(),cb(t,{x:z,y:D+1,w:g-2,h:c-2,radius:k}),t.fill()):(t.fillStyle=a.multiKeyBackground,t.fillRect(B,D,g,c),t.strokeRect(B,D,g,c),t.fillStyle=o.backgroundColor,t.fillRect(z,D+1,g-2,c-2))}t.fillStyle=this.labelTextColors[r]}drawBody(t,n,r){const{body:i}=this,{bodySpacing:a,bodyAlign:o,displayColors:u,boxHeight:c,boxWidth:g,boxPadding:_}=r,E=Ds(r.bodyFont);let C=E.lineHeight,O=0;const R=w0(r.rtl,this.x,this.width),D=function(Ot){n.fillText(Ot,R.x(t.x+O),t.y+C/2),t.y+=C+a},B=R.textAlign(o);let z,k,$,K,et,mt,wt;for(n.textAlign=o,n.textBaseline="middle",n.font=E.string,t.x=I2(this,B,r),n.fillStyle=r.bodyColor,ho(this.beforeBody,D),O=u&&B!=="right"?o==="center"?g/2+_:g+2+_:0,K=0,mt=i.length;K<mt;++K){for(z=i[K],k=this.labelTextColors[K],n.fillStyle=k,ho(z.before,D),$=z.lines,u&&$.length&&(this._drawColorBox(n,t,K,R,r),C=Math.max(E.lineHeight,c)),et=0,wt=$.length;et<wt;++et)D($[et]),C=E.lineHeight;ho(z.after,D)}O=0,C=E.lineHeight,ho(this.afterBody,D),t.y-=a}drawFooter(t,n,r){const i=this.footer,a=i.length;let o,u;if(a){const c=w0(r.rtl,this.x,this.width);for(t.x=I2(this,r.footerAlign,r),t.y+=r.footerMarginTop,n.textAlign=c.textAlign(r.footerAlign),n.textBaseline="middle",o=Ds(r.footerFont),n.fillStyle=r.footerColor,n.font=o.string,u=0;u<a;++u)n.fillText(i[u],c.x(t.x),t.y+o.lineHeight/2),t.y+=o.lineHeight+r.footerSpacing}}drawBackground(t,n,r,i){const{xAlign:a,yAlign:o}=this,{x:u,y:c}=t,{width:g,height:_}=r,{topLeft:E,topRight:C,bottomLeft:O,bottomRight:R}=ny(i.cornerRadius);n.fillStyle=i.backgroundColor,n.strokeStyle=i.borderColor,n.lineWidth=i.borderWidth,n.beginPath(),n.moveTo(u+E,c),o==="top"&&this.drawCaret(t,n,r,i),n.lineTo(u+g-C,c),n.quadraticCurveTo(u+g,c,u+g,c+C),o==="center"&&a==="right"&&this.drawCaret(t,n,r,i),n.lineTo(u+g,c+_-R),n.quadraticCurveTo(u+g,c+_,u+g-R,c+_),o==="bottom"&&this.drawCaret(t,n,r,i),n.lineTo(u+O,c+_),n.quadraticCurveTo(u,c+_,u,c+_-O),o==="center"&&a==="left"&&this.drawCaret(t,n,r,i),n.lineTo(u,c+E),n.quadraticCurveTo(u,c,u+E,c),n.closePath(),n.fill(),i.borderWidth>0&&n.stroke()}_updateAnimationTarget(t){const n=this.chart,r=this.$animations,i=r&&r.x,a=r&&r.y;if(i||a){const o=bb[t.position].call(this,this._active,this._eventPosition);if(!o)return;const u=this._size=p4(this,t),c=Object.assign({},o,this._size),g=d4(n,t,c),_=g4(t,c,g,n);(i._to!==_.x||a._to!==_.y)&&(this.xAlign=g.xAlign,this.yAlign=g.yAlign,this.width=u.width,this.height=u.height,this.caretX=o.x,this.caretY=o.y,this._resolveAnimations().update(this,_))}}_willRender(){return!!this.opacity}draw(t){const n=this.options.setContext(this.getContext());let r=this.opacity;if(!r)return;this._updateAnimationTarget(n);const i={width:this.width,height:this.height},a={x:this.x,y:this.y};r=Math.abs(r)<.001?0:r;const o=ul(n.padding),u=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;n.enabled&&u&&(t.save(),t.globalAlpha=r,this.drawBackground(a,t,i,n),i5(t,n.textDirection),a.y+=o.top,this.drawTitle(a,t,n),this.drawBody(a,t,n),this.drawFooter(a,t,n),o5(t,n.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,n){const r=this._active,i=t.map(({datasetIndex:u,index:c})=>{const g=this.chart.getDatasetMeta(u);if(!g)throw new Error("Cannot find a dataset at index "+u);return{datasetIndex:u,element:g.data[c],index:c}}),a=!HC(r,i),o=this._positionChanged(i,n);(a||o)&&(this._active=i,this._eventPosition=n,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,n,r=!0){if(n&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const i=this.options,a=this._active||[],o=this._getActiveElements(t,a,n,r),u=this._positionChanged(o,t),c=n||!HC(o,a)||u;return c&&(this._active=o,(i.enabled||i.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,n))),c}_getActiveElements(t,n,r,i){const a=this.options;if(t.type==="mouseout")return[];if(!i)return n;const o=this.chart.getElementsAtEventForMode(t,a.mode,a,r);return a.reverse&&o.reverse(),o}_positionChanged(t,n){const{caretX:r,caretY:i,options:a}=this,o=bb[a.position].call(this,t,n);return o!==!1&&(r!==o.x||i!==o.y)}}nO.positioners=bb;var mot={id:"tooltip",_element:nO,positioners:bb,afterInit(e,t,n){n&&(e.tooltip=new nO({chart:e,options:n}))},beforeUpdate(e,t,n){e.tooltip&&e.tooltip.initialize(n)},reset(e,t,n){e.tooltip&&e.tooltip.initialize(n)},afterDraw(e){const t=e.tooltip;if(t&&t._willRender()){const n={tooltip:t};if(e.notifyPlugins("beforeTooltipDraw",n)===!1)return;t.draw(e.ctx),e.notifyPlugins("afterTooltipDraw",n)}},afterEvent(e,t){if(e.tooltip){const n=t.replay;e.tooltip.handleEvent(t.event,n,t.inChartArea)&&(t.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(e,t)=>t.bodyFont.size,boxWidth:(e,t)=>t.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:{beforeTitle:ig,title(e){if(e.length>0){const t=e[0],n=t.chart.data.labels,r=n?n.length:0;if(this&&this.options&&this.options.mode==="dataset")return t.dataset.label||"";if(t.label)return t.label;if(r>0&&t.dataIndex<r)return n[t.dataIndex]}return""},afterTitle:ig,beforeBody:ig,beforeLabel:ig,label(e){if(this&&this.options&&this.options.mode==="dataset")return e.label+": "+e.formattedValue||e.formattedValue;let t=e.dataset.label||"";t&&(t+=": ");const n=e.formattedValue;return Di(n)||(t+=n),t},labelColor(e){const n=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.dataIndex);return{borderColor:n.borderColor,backgroundColor:n.backgroundColor,borderWidth:n.borderWidth,borderDash:n.borderDash,borderDashOffset:n.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(e){const n=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.dataIndex);return{pointStyle:n.pointStyle,rotation:n.rotation}},afterLabel:ig,afterBody:ig,beforeFooter:ig,footer:ig,afterFooter:ig}},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:e=>e!=="filter"&&e!=="itemSort"&&e!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]},vot=Object.freeze({__proto__:null,Decimation:Nit,Filler:not,Legend:oot,SubTitle:uot,Title:sot,Tooltip:mot});const yot=(e,t,n,r)=>(typeof t=="string"?(n=e.push(t)-1,r.unshift({index:n,label:t})):isNaN(t)&&(n=null),n);function _ot(e,t,n,r){const i=e.indexOf(t);if(i===-1)return yot(e,t,n,r);const a=e.lastIndexOf(t);return i!==a?n:i}const xot=(e,t)=>e===null?null:au(Math.round(e),0,t);class P2 extends ay{constructor(t){super(t);this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(t){const n=this._addedLabels;if(n.length){const r=this.getLabels();for(const{index:i,label:a}of n)r[i]===a&&r.splice(i,1);this._addedLabels=[]}super.init(t)}parse(t,n){if(Di(t))return null;const r=this.getLabels();return n=isFinite(n)&&r[n]===t?n:_ot(r,t,Hr(n,t),this._addedLabels),xot(n,r.length-1)}determineDataLimits(){const{minDefined:t,maxDefined:n}=this.getUserBounds();let{min:r,max:i}=this.getMinMax(!0);this.options.bounds==="ticks"&&(t||(r=0),n||(i=this.getLabels().length-1)),this.min=r,this.max=i}buildTicks(){const t=this.min,n=this.max,r=this.options.offset,i=[];let a=this.getLabels();a=t===0&&n===a.length-1?a:a.slice(t,n+1),this._valueRange=Math.max(a.length-(r?0:1),1),this._startValue=this.min-(r?.5:0);for(let o=t;o<=n;o++)i.push({value:o});return i}getLabelForValue(t){const n=this.getLabels();return t>=0&&t<n.length?n[t]:t}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(t){return typeof t!="number"&&(t=this.parse(t)),t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getPixelForTick(t){const n=this.ticks;return t<0||t>n.length-1?null:this.getPixelForValue(n[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}}P2.id="category";P2.defaults={ticks:{callback:P2.prototype.getLabelForValue}};function bot(e,t){const n=[],r=1e-14,{bounds:i,step:a,min:o,max:u,precision:c,count:g,maxTicks:_,maxDigits:E,includeBounds:C}=e,O=a||1,R=_-1,{min:D,max:B}=t,z=!Di(o),k=!Di(u),$=!Di(g),K=(B-D)/(E+1);let et=xB((B-D)/R/O)*O,mt,wt,Ot,Bt;if(et<r&&!z&&!k)return[{value:D},{value:B}];Bt=Math.ceil(B/et)-Math.floor(D/et),Bt>R&&(et=xB(Bt*et/R/O)*O),Di(c)||(mt=Math.pow(10,c),et=Math.ceil(et*mt)/mt),i==="ticks"?(wt=Math.floor(D/et)*et,Ot=Math.ceil(B/et)*et):(wt=D,Ot=B),z&&k&&a&&oet((u-o)/a,et/1e3)?(Bt=Math.round(Math.min((u-o)/et,_)),et=(u-o)/Bt,wt=o,Ot=u):$?(wt=z?o:wt,Ot=k?u:Ot,Bt=g-1,et=(Ot-wt)/Bt):(Bt=(Ot-wt)/et,rb(Bt,Math.round(Bt),et/1e3)?Bt=Math.round(Bt):Bt=Math.ceil(Bt));const se=Math.max(wB(et),wB(wt));mt=Math.pow(10,Di(c)?se:c),wt=Math.round(wt*mt)/mt,Ot=Math.round(Ot*mt)/mt;let _e=0;for(z&&(C&&wt!==o?(n.push({value:o}),wt<o&&_e++,rb(Math.round((wt+_e*et)*mt)/mt,o,y4(o,K,e))&&_e++):wt<o&&_e++);_e<Bt;++_e)n.push({value:Math.round((wt+_e*et)*mt)/mt});return k&&C&&Ot!==u?n.length&&rb(n[n.length-1].value,u,y4(u,K,e))?n[n.length-1].value=u:n.push({value:u}):(!k||Ot===u)&&n.push({value:Ot}),n}function y4(e,t,{horizontal:n,minRotation:r}){const i=lp(r),a=(n?Math.sin(i):Math.cos(i))||.001,o=.75*t*(""+e).length;return Math.min(t/a,o)}class T2 extends ay{constructor(t){super(t);this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(t,n){return Di(t)||(typeof t=="number"||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){const{beginAtZero:t}=this.options,{minDefined:n,maxDefined:r}=this.getUserBounds();let{min:i,max:a}=this;const o=c=>i=n?i:c,u=c=>a=r?a:c;if(t){const c=ed(i),g=ed(a);c<0&&g<0?u(0):c>0&&g>0&&o(0)}if(i===a){let c=1;(a>=Number.MAX_SAFE_INTEGER||i<=Number.MIN_SAFE_INTEGER)&&(c=Math.abs(a*.05)),u(a+c),t||o(i-c)}this.min=i,this.max=a}getTickLimit(){const t=this.options.ticks;let{maxTicksLimit:n,stepSize:r}=t,i;return r?(i=Math.ceil(this.max/r)-Math.floor(this.min/r)+1,i>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${r} would result generating up to ${i} ticks. Limiting to 1000.`),i=1e3)):(i=this.computeTickLimit(),n=n||11),n&&(i=Math.min(n,i)),i}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,n=t.ticks;let r=this.getTickLimit();r=Math.max(2,r);const i={maxTicks:r,bounds:t.bounds,min:t.min,max:t.max,precision:n.precision,step:n.stepSize,count:n.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:n.minRotation||0,includeBounds:n.includeBounds!==!1},a=this._range||this,o=bot(i,a);return t.bounds==="ticks"&&bB(o,this,"value"),t.reverse?(o.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),o}configure(){const t=this.ticks;let n=this.min,r=this.max;if(super.configure(),this.options.offset&&t.length){const i=(r-n)/Math.max(t.length-1,1)/2;n-=i,r+=i}this._startValue=n,this._endValue=r,this._valueRange=r-n}getLabelForValue(t){return hb(t,this.chart.options.locale,this.options.ticks.format)}}class rO extends T2{determineDataLimits(){const{min:t,max:n}=this.getMinMax(!0);this.min=rs(t)?t:0,this.max=rs(n)?n:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),n=t?this.width:this.height,r=lp(this.options.ticks.minRotation),i=(t?Math.sin(r):Math.cos(r))||.001,a=this._resolveTickFontOptions(0);return Math.ceil(n/Math.min(40,a.lineHeight/i))}getPixelForValue(t){return t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}rO.id="linear";rO.defaults={ticks:{callback:h2.formatters.numeric}};function _4(e){return e/Math.pow(10,Math.floor(lh(e)))===1}function wot(e,t){const n=Math.floor(lh(t.max)),r=Math.ceil(t.max/Math.pow(10,n)),i=[];let a=sh(e.min,Math.pow(10,Math.floor(lh(t.min)))),o=Math.floor(lh(a)),u=Math.floor(a/Math.pow(10,o)),c=o<0?Math.pow(10,Math.abs(o)):1;do i.push({value:a,major:_4(a)}),++u,u===10&&(u=1,++o,c=o>=0?1:c),a=Math.round(u*Math.pow(10,o)*c)/c;while(o<n||o===n&&u<r);const g=sh(e.max,a);return i.push({value:g,major:_4(a)}),i}class iO extends ay{constructor(t){super(t);this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(t,n){const r=T2.prototype.parse.apply(this,[t,n]);if(r===0){this._zero=!0;return}return rs(r)&&r>0?r:null}determineDataLimits(){const{min:t,max:n}=this.getMinMax(!0);this.min=rs(t)?Math.max(0,t):null,this.max=rs(n)?Math.max(0,n):null,this.options.beginAtZero&&(this._zero=!0),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:t,maxDefined:n}=this.getUserBounds();let r=this.min,i=this.max;const a=c=>r=t?r:c,o=c=>i=n?i:c,u=(c,g)=>Math.pow(10,Math.floor(lh(c))+g);r===i&&(r<=0?(a(1),o(10)):(a(u(r,-1)),o(u(i,1)))),r<=0&&a(u(i,-1)),i<=0&&o(u(r,1)),this._zero&&this.min!==this._suggestedMin&&r===u(this.min,0)&&a(u(r,-1)),this.min=r,this.max=i}buildTicks(){const t=this.options,n={min:this._userMin,max:this._userMax},r=wot(n,this);return t.bounds==="ticks"&&bB(r,this,"value"),t.reverse?(r.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),r}getLabelForValue(t){return t===void 0?"0":hb(t,this.chart.options.locale,this.options.ticks.format)}configure(){const t=this.min;super.configure(),this._startValue=lh(t),this._valueRange=lh(this.max)-lh(t)}getPixelForValue(t){return(t===void 0||t===0)&&(t=this.min),t===null||isNaN(t)?NaN:this.getPixelForDecimal(t===this.min?0:(lh(t)-this._startValue)/this._valueRange)}getValueForPixel(t){const n=this.getDecimalForPixel(t);return Math.pow(10,this._startValue+n*this._valueRange)}}iO.id="logarithmic";iO.defaults={ticks:{callback:h2.formatters.logarithmic,major:{enabled:!0}}};function oO(e){const t=e.ticks;if(t.display&&e.display){const n=ul(t.backdropPadding);return Hr(t.font&&t.font.size,Ei.font.size)+n.height}return 0}function Sot(e,t,n){return n=Fo(n)?n:[n],{w:Bet(e,t.string,n),h:n.length*t.lineHeight}}function x4(e,t,n,r,i){return e===r||e===i?{start:t-n/2,end:t+n/2}:e<r||e>i?{start:t-n,end:t}:{start:t,end:t+n}}function Eot(e){const t={l:e.left+e._padding.left,r:e.right-e._padding.right,t:e.top+e._padding.top,b:e.bottom-e._padding.bottom},n=Object.assign({},t),r=[],i=[],a=e._pointLabels.length,o=e.options.pointLabels,u=o.centerPointLabels?pa/a:0;for(let c=0;c<a;c++){const g=o.setContext(e.getPointLabelContext(c));i[c]=g.padding;const _=e.getPointPosition(c,e.drawingArea+i[c],u),E=Ds(g.font),C=Sot(e.ctx,E,e._pointLabels[c]);r[c]=C;const O=ff(e.getIndexAngle(c)+u),R=Math.round(_L(O)),D=x4(R,_.x,C.w,0,180),B=x4(R,_.y,C.h,90,270);Cot(n,t,O,D,B)}e.setCenterPoint(t.l-n.l,n.r-t.r,t.t-n.t,n.b-t.b),e._pointLabelItems=Iot(e,r,i)}function Cot(e,t,n,r,i){const a=Math.abs(Math.sin(n)),o=Math.abs(Math.cos(n));let u=0,c=0;r.start<t.l?(u=(t.l-r.start)/a,e.l=Math.min(e.l,t.l-u)):r.end>t.r&&(u=(r.end-t.r)/a,e.r=Math.max(e.r,t.r+u)),i.start<t.t?(c=(t.t-i.start)/o,e.t=Math.min(e.t,t.t-c)):i.end>t.b&&(c=(i.end-t.b)/o,e.b=Math.max(e.b,t.b+c))}function Iot(e,t,n){const r=[],i=e._pointLabels.length,a=e.options,o=oO(a)/2,u=e.drawingArea,c=a.pointLabels.centerPointLabels?pa/i:0;for(let g=0;g<i;g++){const _=e.getPointPosition(g,u+o+n[g],c),E=Math.round(_L(ff(_.angle+ja))),C=t[g],O=Mot(_.y,C.h,E),R=Pot(E),D=Tot(_.x,C.w,R);r.push({x:_.x,y:O,textAlign:R,left:D,top:O,right:D+C.w,bottom:O+C.h})}return r}function Pot(e){return e===0||e===180?"center":e<180?"left":"right"}function Tot(e,t,n){return n==="right"?e-=t:n==="center"&&(e-=t/2),e}function Mot(e,t,n){return n===90||n===270?e-=t/2:(n>270||n<90)&&(e-=t),e}function Aot(e,t){const{ctx:n,options:{pointLabels:r}}=e;for(let i=t-1;i>=0;i--){const a=r.setContext(e.getPointLabelContext(i)),o=Ds(a.font),{x:u,y:c,textAlign:g,left:_,top:E,right:C,bottom:O}=e._pointLabelItems[i],{backdropColor:R}=a;if(!Di(R)){const D=ny(a.borderRadius),B=ul(a.backdropPadding);n.fillStyle=R;const z=_-B.left,k=E-B.top,$=C-_+B.width,K=O-E+B.height;Object.values(D).some(et=>et!==0)?(n.beginPath(),cb(n,{x:z,y:k,w:$,h:K,radius:D}),n.fill()):n.fillRect(z,k,$,K)}ey(n,e._pointLabels[i],u,c+o.lineHeight/2,o,{color:a.color,textAlign:g,textBaseline:"middle"})}}function b4(e,t,n,r){const{ctx:i}=e;if(n)i.arc(e.xCenter,e.yCenter,t,0,xo);else{let a=e.getPointPosition(0,t);i.moveTo(a.x,a.y);for(let o=1;o<r;o++)a=e.getPointPosition(o,t),i.lineTo(a.x,a.y)}}function Lot(e,t,n,r){const i=e.ctx,a=t.circular,{color:o,lineWidth:u}=t;!a&&!r||!o||!u||n<0||(i.save(),i.strokeStyle=o,i.lineWidth=u,i.setLineDash(t.borderDash),i.lineDashOffset=t.borderDashOffset,i.beginPath(),b4(e,n,a,r),i.closePath(),i.stroke(),i.restore())}function Oot(e,t,n){return Om(e,{label:n,index:t,type:"pointLabel"})}class wb extends T2{constructor(t){super(t);this.xCenter=void 0,this.yCenter=void 0,this.drawingArea=void 0,this._pointLabels=[],this._pointLabelItems=[]}setDimensions(){const t=this._padding=ul(oO(this.options)/2),n=this.width=this.maxWidth-t.width,r=this.height=this.maxHeight-t.height;this.xCenter=Math.floor(this.left+n/2+t.left),this.yCenter=Math.floor(this.top+r/2+t.top),this.drawingArea=Math.floor(Math.min(n,r)/2)}determineDataLimits(){const{min:t,max:n}=this.getMinMax(!1);this.min=rs(t)&&!isNaN(t)?t:0,this.max=rs(n)&&!isNaN(n)?n:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/oO(this.options))}generateTickLabels(t){T2.prototype.generateTickLabels.call(this,t),this._pointLabels=this.getLabels().map((n,r)=>{const i=zo(this.options.pointLabels.callback,[n,r],this);return i||i===0?i:""}).filter((n,r)=>this.chart.getDataVisibility(r))}fit(){const t=this.options;t.display&&t.pointLabels.display?Eot(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(t,n,r,i){this.xCenter+=Math.floor((t-n)/2),this.yCenter+=Math.floor((r-i)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(t,n,r,i))}getIndexAngle(t){const n=xo/(this._pointLabels.length||1),r=this.options.startAngle||0;return ff(t*n+lp(r))}getDistanceFromCenterForValue(t){if(Di(t))return NaN;const n=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-t)*n:(t-this.min)*n}getValueForDistanceFromCenter(t){if(Di(t))return NaN;const n=t/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-n:this.min+n}getPointLabelContext(t){const n=this._pointLabels||[];if(t>=0&&t<n.length){const r=n[t];return Oot(this.getContext(),t,r)}}getPointPosition(t,n,r=0){const i=this.getIndexAngle(t)-ja+r;return{x:Math.cos(i)*n+this.xCenter,y:Math.sin(i)*n+this.yCenter,angle:i}}getPointPositionForValue(t,n){return this.getPointPosition(t,this.getDistanceFromCenterForValue(n))}getBasePosition(t){return this.getPointPositionForValue(t||0,this.getBaseValue())}getPointLabelPosition(t){const{left:n,top:r,right:i,bottom:a}=this._pointLabelItems[t];return{left:n,top:r,right:i,bottom:a}}drawBackground(){const{backgroundColor:t,grid:{circular:n}}=this.options;if(t){const r=this.ctx;r.save(),r.beginPath(),b4(this,this.getDistanceFromCenterForValue(this._endValue),n,this._pointLabels.length),r.closePath(),r.fillStyle=t,r.fill(),r.restore()}}drawGrid(){const t=this.ctx,n=this.options,{angleLines:r,grid:i}=n,a=this._pointLabels.length;let o,u,c;if(n.pointLabels.display&&Aot(this,a),i.display&&this.ticks.forEach((g,_)=>{if(_!==0){u=this.getDistanceFromCenterForValue(g.value);const E=i.setContext(this.getContext(_-1));Lot(this,E,u,a)}}),r.display){for(t.save(),o=a-1;o>=0;o--){const g=r.setContext(this.getPointLabelContext(o)),{color:_,lineWidth:E}=g;!E||!_||(t.lineWidth=E,t.strokeStyle=_,t.setLineDash(g.borderDash),t.lineDashOffset=g.borderDashOffset,u=this.getDistanceFromCenterForValue(n.ticks.reverse?this.min:this.max),c=this.getPointPosition(o,u),t.beginPath(),t.moveTo(this.xCenter,this.yCenter),t.lineTo(c.x,c.y),t.stroke())}t.restore()}}drawBorder(){}drawLabels(){const t=this.ctx,n=this.options,r=n.ticks;if(!r.display)return;const i=this.getIndexAngle(0);let a,o;t.save(),t.translate(this.xCenter,this.yCenter),t.rotate(i),t.textAlign="center",t.textBaseline="middle",this.ticks.forEach((u,c)=>{if(c===0&&!n.reverse)return;const g=r.setContext(this.getContext(c)),_=Ds(g.font);if(a=this.getDistanceFromCenterForValue(this.ticks[c].value),g.showLabelBackdrop){t.font=_.string,o=t.measureText(u.label).width,t.fillStyle=g.backdropColor;const E=ul(g.backdropPadding);t.fillRect(-o/2-E.left,-a-_.size/2-E.top,o+E.width,_.size+E.height)}ey(t,u.label,0,-a,_,{color:g.color})}),t.restore()}drawTitle(){}}wb.id="radialLinear";wb.defaults={display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:h2.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback(e){return e},padding:5,centerPointLabels:!1}};wb.defaultRoutes={"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"};wb.descriptors={angleLines:{_fallback:"grid"}};const M2={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},xc=Object.keys(M2);function Rot(e,t){return e-t}function w4(e,t){if(Di(t))return null;const n=e._adapter,{parser:r,round:i,isoWeekday:a}=e._parseOpts;let o=t;return typeof r=="function"&&(o=r(o)),rs(o)||(o=typeof r=="string"?n.parse(o,r):n.parse(o)),o===null?null:(i&&(o=i==="week"&&(y0(a)||a===!0)?n.startOf(o,"isoWeek",a):n.startOf(o,i)),+o)}function S4(e,t,n,r){const i=xc.length;for(let a=xc.indexOf(e);a<i-1;++a){const o=M2[xc[a]],u=o.steps?o.steps:Number.MAX_SAFE_INTEGER;if(o.common&&Math.ceil((n-t)/(u*o.size))<=r)return xc[a]}return xc[i-1]}function kot(e,t,n,r,i){for(let a=xc.length-1;a>=xc.indexOf(n);a--){const o=xc[a];if(M2[o].common&&e._adapter.diff(i,r,o)>=t-1)return o}return xc[n?xc.indexOf(n):0]}function Dot(e){for(let t=xc.indexOf(e)+1,n=xc.length;t<n;++t)if(M2[xc[t]].common)return xc[t]}function E4(e,t,n){if(!n)e[t]=!0;else if(n.length){const{lo:r,hi:i}=bL(n,t),a=n[r]>=t?n[r]:n[i];e[a]=!0}}function Not(e,t,n,r){const i=e._adapter,a=+i.startOf(t[0].value,r),o=t[t.length-1].value;let u,c;for(u=a;u<=o;u=+i.add(u,1,r))c=n[u],c>=0&&(t[c].major=!0);return t}function C4(e,t,n){const r=[],i={},a=t.length;let o,u;for(o=0;o<a;++o)u=t[o],i[u]=o,r.push({value:u,major:!1});return a===0||!n?r:Not(e,r,i,n)}class Sb extends ay{constructor(t){super(t);this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(t,n){const r=t.time||(t.time={}),i=this._adapter=new wrt._date(t.adapters.date);i.init(n),eb(r.displayFormats,i.formats()),this._parseOpts={parser:r.parser,round:r.round,isoWeekday:r.isoWeekday},super.init(t),this._normalized=n.normalized}parse(t,n){return t===void 0?null:w4(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const t=this.options,n=this._adapter,r=t.time.unit||"day";let{min:i,max:a,minDefined:o,maxDefined:u}=this.getUserBounds();function c(g){!o&&!isNaN(g.min)&&(i=Math.min(i,g.min)),!u&&!isNaN(g.max)&&(a=Math.max(a,g.max))}(!o||!u)&&(c(this._getLabelBounds()),(t.bounds!=="ticks"||t.ticks.source!=="labels")&&c(this.getMinMax(!1))),i=rs(i)&&!isNaN(i)?i:+n.startOf(Date.now(),r),a=rs(a)&&!isNaN(a)?a:+n.endOf(Date.now(),r)+1,this.min=Math.min(i,a-1),this.max=Math.max(i+1,a)}_getLabelBounds(){const t=this.getLabelTimestamps();let n=Number.POSITIVE_INFINITY,r=Number.NEGATIVE_INFINITY;return t.length&&(n=t[0],r=t[t.length-1]),{min:n,max:r}}buildTicks(){const t=this.options,n=t.time,r=t.ticks,i=r.source==="labels"?this.getLabelTimestamps():this._generate();t.bounds==="ticks"&&i.length&&(this.min=this._userMin||i[0],this.max=this._userMax||i[i.length-1]);const a=this.min,o=this.max,u=cet(i,a,o);return this._unit=n.unit||(r.autoSkip?S4(n.minUnit,this.min,this.max,this._getLabelCapacity(a)):kot(this,u.length,n.minUnit,this.min,this.max)),this._majorUnit=!r.major.enabled||this._unit==="year"?void 0:Dot(this._unit),this.initOffsets(i),t.reverse&&u.reverse(),C4(this,u,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(t=>+t.value))}initOffsets(t){let n=0,r=0,i,a;this.options.offset&&t.length&&(i=this.getDecimalForValue(t[0]),t.length===1?n=1-i:n=(this.getDecimalForValue(t[1])-i)/2,a=this.getDecimalForValue(t[t.length-1]),t.length===1?r=a:r=(a-this.getDecimalForValue(t[t.length-2]))/2);const o=t.length<3?.5:.25;n=au(n,0,o),r=au(r,0,o),this._offsets={start:n,end:r,factor:1/(n+1+r)}}_generate(){const t=this._adapter,n=this.min,r=this.max,i=this.options,a=i.time,o=a.unit||S4(a.minUnit,n,r,this._getLabelCapacity(n)),u=Hr(a.stepSize,1),c=o==="week"?a.isoWeekday:!1,g=y0(c)||c===!0,_={};let E=n,C,O;if(g&&(E=+t.startOf(E,"isoWeek",c)),E=+t.startOf(E,g?"day":o),t.diff(r,n,o)>1e5*u)throw new Error(n+" and "+r+" are too far apart with stepSize of "+u+" "+o);const R=i.ticks.source==="data"&&this.getDataTimestamps();for(C=E,O=0;C<r;C=+t.add(C,u,o),O++)E4(_,C,R);return(C===r||i.bounds==="ticks"||O===1)&&E4(_,C,R),Object.keys(_).sort((D,B)=>D-B).map(D=>+D)}getLabelForValue(t){const n=this._adapter,r=this.options.time;return r.tooltipFormat?n.format(t,r.tooltipFormat):n.format(t,r.displayFormats.datetime)}_tickFormatFunction(t,n,r,i){const a=this.options,o=a.time.displayFormats,u=this._unit,c=this._majorUnit,g=u&&o[u],_=c&&o[c],E=r[n],C=c&&_&&E&&E.major,O=this._adapter.format(t,i||(C?_:g)),R=a.ticks.callback;return R?zo(R,[O,n,r],this):O}generateTickLabels(t){let n,r,i;for(n=0,r=t.length;n<r;++n)i=t[n],i.label=this._tickFormatFunction(i.value,n,t)}getDecimalForValue(t){return t===null?NaN:(t-this.min)/(this.max-this.min)}getPixelForValue(t){const n=this._offsets,r=this.getDecimalForValue(t);return this.getPixelForDecimal((n.start+r)*n.factor)}getValueForPixel(t){const n=this._offsets,r=this.getDecimalForPixel(t)/n.factor-n.end;return this.min+r*(this.max-this.min)}_getLabelSize(t){const n=this.options.ticks,r=this.ctx.measureText(t).width,i=lp(this.isHorizontal()?n.maxRotation:n.minRotation),a=Math.cos(i),o=Math.sin(i),u=this._resolveTickFontOptions(0).size;return{w:r*a+u*o,h:r*o+u*a}}_getLabelCapacity(t){const n=this.options.time,r=n.displayFormats,i=r[n.unit]||r.millisecond,a=this._tickFormatFunction(t,0,C4(this,[t],this._majorUnit),i),o=this._getLabelSize(a),u=Math.floor(this.isHorizontal()?this.width/o.w:this.height/o.h)-1;return u>0?u:1}getDataTimestamps(){let t=this._cache.data||[],n,r;if(t.length)return t;const i=this.getMatchingVisibleMetas();if(this._normalized&&i.length)return this._cache.data=i[0].controller.getAllParsedValues(this);for(n=0,r=i.length;n<r;++n)t=t.concat(i[n].controller.getAllParsedValues(this));return this._cache.data=this.normalize(t)}getLabelTimestamps(){const t=this._cache.labels||[];let n,r;if(t.length)return t;const i=this.getLabels();for(n=0,r=i.length;n<r;++n)t.push(w4(this,i[n]));return this._cache.labels=this._normalized?t:this.normalize(t)}normalize(t){return IB(t.sort(Rot))}}Sb.id="time";Sb.defaults={bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",major:{enabled:!1}}};function A2(e,t,n){let r=0,i=e.length-1,a,o,u,c;n?(t>=e[r].pos&&t<=e[i].pos&&({lo:r,hi:i}=ag(e,"pos",t)),{pos:a,time:u}=e[r],{pos:o,time:c}=e[i]):(t>=e[r].time&&t<=e[i].time&&({lo:r,hi:i}=ag(e,"time",t)),{time:a,pos:u}=e[r],{time:o,pos:c}=e[i]);const g=o-a;return g?u+(c-u)*(t-a)/g:u}class aO extends Sb{constructor(t){super(t);this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const t=this._getTimestampsForTable(),n=this._table=this.buildLookupTable(t);this._minPos=A2(n,this.min),this._tableRange=A2(n,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:n,max:r}=this,i=[],a=[];let o,u,c,g,_;for(o=0,u=t.length;o<u;++o)g=t[o],g>=n&&g<=r&&i.push(g);if(i.length<2)return[{time:n,pos:0},{time:r,pos:1}];for(o=0,u=i.length;o<u;++o)_=i[o+1],c=i[o-1],g=i[o],Math.round((_+c)/2)!==g&&a.push({time:g,pos:o/(u-1)});return a}_getTimestampsForTable(){let t=this._cache.all||[];if(t.length)return t;const n=this.getDataTimestamps(),r=this.getLabelTimestamps();return n.length&&r.length?t=this.normalize(n.concat(r)):t=n.length?n:r,t=this._cache.all=t,t}getDecimalForValue(t){return(A2(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){const n=this._offsets,r=this.getDecimalForPixel(t)/n.factor-n.end;return A2(this._table,r*this._tableRange+this._minPos,!0)}}aO.id="timeseries";aO.defaults=Sb.defaults;var Fot=Object.freeze({__proto__:null,CategoryScale:P2,LinearScale:rO,LogarithmicScale:iO,RadialLinearScale:wb,TimeScale:Sb,TimeSeriesScale:aO});const zot=[brt,Oit,vot,Fot];/*! * @kurkle/color v0.1.9 * https://github.com/kurkle/color#readme * (c) 2020 Jukka Kurkela * Released under the MIT License */const fh={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},sO="0123456789ABCDEF",Bot=e=>sO[e&15],Uot=e=>sO[(e&240)>>4]+sO[e&15],L2=e=>(e&240)>>4==(e&15);function Vot(e){return L2(e.r)&&L2(e.g)&&L2(e.b)&&L2(e.a)}function $ot(e){var t=e.length,n;return e[0]==="#"&&(t===4||t===5?n={r:255&fh[e[1]]*17,g:255&fh[e[2]]*17,b:255&fh[e[3]]*17,a:t===5?fh[e[4]]*17:255}:(t===7||t===9)&&(n={r:fh[e[1]]<<4|fh[e[2]],g:fh[e[3]]<<4|fh[e[4]],b:fh[e[5]]<<4|fh[e[6]],a:t===9?fh[e[7]]<<4|fh[e[8]]:255})),n}function jot(e){var t=Vot(e)?Bot:Uot;return e&&"#"+t(e.r)+t(e.g)+t(e.b)+(e.a<255?t(e.a):"")}function Eb(e){return e+.5|0}const O2=(e,t,n)=>Math.max(Math.min(e,n),t);function Cb(e){return O2(Eb(e*2.55),0,255)}function Ib(e){return O2(Eb(e*255),0,255)}function uO(e){return O2(Eb(e/2.55)/100,0,1)}function I4(e){return O2(Eb(e*100),0,100)}const qot=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function Got(e){const t=qot.exec(e);let n=255,r,i,a;if(!!t){if(t[7]!==r){const o=+t[7];n=255&(t[8]?Cb(o):o*255)}return r=+t[1],i=+t[3],a=+t[5],r=255&(t[2]?Cb(r):r),i=255&(t[4]?Cb(i):i),a=255&(t[6]?Cb(a):a),{r,g:i,b:a,a:n}}}function Wot(e){return e&&(e.a<255?`rgba(${e.r}, ${e.g}, ${e.b}, ${uO(e.a)})`:`rgb(${e.r}, ${e.g}, ${e.b})`)}const Hot=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function P4(e,t,n){const r=t*Math.min(n,1-n),i=(a,o=(a+e/30)%12)=>n-r*Math.max(Math.min(o-3,9-o,1),-1);return[i(0),i(8),i(4)]}function Xot(e,t,n){const r=(i,a=(i+e/60)%6)=>n-n*t*Math.max(Math.min(a,4-a,1),0);return[r(5),r(3),r(1)]}function Yot(e,t,n){const r=P4(e,1,.5);let i;for(t+n>1&&(i=1/(t+n),t*=i,n*=i),i=0;i<3;i++)r[i]*=1-t-n,r[i]+=t;return r}function lO(e){const t=255,n=e.r/t,r=e.g/t,i=e.b/t,a=Math.max(n,r,i),o=Math.min(n,r,i),u=(a+o)/2;let c,g,_;return a!==o&&(_=a-o,g=u>.5?_/(2-a-o):_/(a+o),c=a===n?(r-i)/_+(r<i?6:0):a===r?(i-n)/_+2:(n-r)/_+4,c=c*60+.5),[c|0,g||0,u]}function cO(e,t,n,r){return(Array.isArray(t)?e(t[0],t[1],t[2]):e(t,n,r)).map(Ib)}function fO(e,t,n){return cO(P4,e,t,n)}function Zot(e,t,n){return cO(Yot,e,t,n)}function Kot(e,t,n){return cO(Xot,e,t,n)}function T4(e){return(e%360+360)%360}function Jot(e){const t=Hot.exec(e);let n=255,r;if(!t)return;t[5]!==r&&(n=t[6]?Cb(+t[5]):Ib(+t[5]));const i=T4(+t[2]),a=+t[3]/100,o=+t[4]/100;return t[1]==="hwb"?r=Zot(i,a,o):t[1]==="hsv"?r=Kot(i,a,o):r=fO(i,a,o),{r:r[0],g:r[1],b:r[2],a:n}}function Qot(e,t){var n=lO(e);n[0]=T4(n[0]+t),n=fO(n),e.r=n[0],e.g=n[1],e.b=n[2]}function tat(e){if(!e)return;const t=lO(e),n=t[0],r=I4(t[1]),i=I4(t[2]);return e.a<255?`hsla(${n}, ${r}%, ${i}%, ${uO(e.a)})`:`hsl(${n}, ${r}%, ${i}%)`}const M4={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},A4={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};function eat(){const e={},t=Object.keys(A4),n=Object.keys(M4);let r,i,a,o,u;for(r=0;r<t.length;r++){for(o=u=t[r],i=0;i<n.length;i++)a=n[i],u=u.replace(a,M4[a]);a=parseInt(A4[o],16),e[u]=[a>>16&255,a>>8&255,a&255]}return e}let R2;function nat(e){R2||(R2=eat(),R2.transparent=[0,0,0,0]);const t=R2[e.toLowerCase()];return t&&{r:t[0],g:t[1],b:t[2],a:t.length===4?t[3]:255}}function k2(e,t,n){if(e){let r=lO(e);r[t]=Math.max(0,Math.min(r[t]+r[t]*n,t===0?360:1)),r=fO(r),e.r=r[0],e.g=r[1],e.b=r[2]}}function L4(e,t){return e&&Object.assign(t||{},e)}function O4(e){var t={r:0,g:0,b:0,a:255};return Array.isArray(e)?e.length>=3&&(t={r:e[0],g:e[1],b:e[2],a:255},e.length>3&&(t.a=Ib(e[3]))):(t=L4(e,{r:0,g:0,b:0,a:1}),t.a=Ib(t.a)),t}function rat(e){return e.charAt(0)==="r"?Got(e):Jot(e)}class D2{constructor(t){if(t instanceof D2)return t;const n=typeof t;let r;n==="object"?r=O4(t):n==="string"&&(r=$ot(t)||nat(t)||rat(t)),this._rgb=r,this._valid=!!r}get valid(){return this._valid}get rgb(){var t=L4(this._rgb);return t&&(t.a=uO(t.a)),t}set rgb(t){this._rgb=O4(t)}rgbString(){return this._valid?Wot(this._rgb):this._rgb}hexString(){return this._valid?jot(this._rgb):this._rgb}hslString(){return this._valid?tat(this._rgb):this._rgb}mix(t,n){const r=this;if(t){const i=r.rgb,a=t.rgb;let o;const u=n===o?.5:n,c=2*u-1,g=i.a-a.a,_=((c*g==-1?c:(c+g)/(1+c*g))+1)/2;o=1-_,i.r=255&_*i.r+o*a.r+.5,i.g=255&_*i.g+o*a.g+.5,i.b=255&_*i.b+o*a.b+.5,i.a=u*i.a+(1-u)*a.a,r.rgb=i}return r}clone(){return new D2(this.rgb)}alpha(t){return this._rgb.a=Ib(t),this}clearer(t){const n=this._rgb;return n.a*=1-t,this}greyscale(){const t=this._rgb,n=Eb(t.r*.3+t.g*.59+t.b*.11);return t.r=t.g=t.b=n,this}opaquer(t){const n=this._rgb;return n.a*=1+t,this}negate(){const t=this._rgb;return t.r=255-t.r,t.g=255-t.g,t.b=255-t.b,this}lighten(t){return k2(this._rgb,2,t),this}darken(t){return k2(this._rgb,2,-t),this}saturate(t){return k2(this._rgb,1,t),this}desaturate(t){return k2(this._rgb,1,-t),this}rotate(t){return Qot(this._rgb,t),this}}function HSt(e){return new D2(e)}var R4={exports:{}};/** * @license * Lodash <https://lodash.com/> * Copyright OpenJS Foundation and other contributors <https://openjsf.org/> * Released under MIT license <https://lodash.com/license> * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE> * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors */(function(e,t){(function(){var n,r="4.17.21",i=200,a="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",o="Expected a function",u="Invalid `variable` option passed into `_.template`",c="__lodash_hash_undefined__",g=500,_="__lodash_placeholder__",E=1,C=2,O=4,R=1,D=2,B=1,z=2,k=4,$=8,K=16,et=32,mt=64,wt=128,Ot=256,Bt=512,se=30,_e="...",Ne=800,He=16,de=1,he=2,Ge=3,Yt=1/0,te=9007199254740991,ve=17976931348623157e292,Wt=0/0,be=4294967295,De=be-1,Fn=be>>>1,ar=[["ary",wt],["bind",B],["bindKey",z],["curry",$],["curryRight",K],["flip",Bt],["partial",et],["partialRight",mt],["rearg",Ot]],Jn="[object Arguments]",Ar="[object Array]",cr="[object AsyncFunction]",Fi="[object Boolean]",fr="[object Date]",_a="[object DOMException]",Is="[object Error]",Gi="[object Function]",jn="[object GeneratorFunction]",bi="[object Map]",ni="[object Number]",Wi="[object Null]",xa="[object Object]",ba="[object Promise]",ss="[object Proxy]",ri="[object RegExp]",qo="[object Set]",Et="[object String]",pt="[object Symbol]",Ve="[object Undefined]",We="[object WeakMap]",Xn="[object WeakSet]",Br="[object ArrayBuffer]",sr="[object DataView]",Ai="[object Float32Array]",Un="[object Float64Array]",no="[object Int8Array]",To="[object Int16Array]",zi="[object Int32Array]",ii="[object Uint8Array]",Go="[object Uint8ClampedArray]",yr="[object Uint16Array]",Rn="[object Uint32Array]",yl=/\b__p \+= '';/g,us=/\b(__p \+=) '' \+/g,Vs=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Mo=/&(?:amp|lt|gt|quot|#39);/g,qa=/[&<>"']/g,Ur=RegExp(Mo.source),Yl=RegExp(qa.source),Vr=/<%-([\s\S]+?)%>/g,W=/<%([\s\S]+?)%>/g,Y=/<%=([\s\S]+?)%>/g,nt=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,lt=/^\w*$/,vt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Mt=/[\\^$.*+?()[\]{}|]/g,Rt=RegExp(Mt.source),at=/^\s+/,bt=/\s/,Vt=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,pe=/\{\n\/\* \[wrapped with (.+)\] \*/,ye=/,? & /,Qt=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,me=/[()=,{}\[\]\/\s]/,tn=/\\(\\)?/g,Je=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,re=/\w*$/,ze=/^[-+]0x[0-9a-f]+$/i,Me=/^0b[01]+$/i,Re=/^\[object .+?Constructor\]$/,Mn=/^0o[0-7]+$/i,$e=/^(?:0|[1-9]\d*)$/,Qn=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Rr=/($^)/,wn=/['\n\r\u2028\u2029\\]/g,hr="\\ud800-\\udfff",tr="\\u0300-\\u036f",go="\\ufe20-\\ufe2f",Er="\\u20d0-\\u20ff",Li=tr+go+Er,kr="\\u2700-\\u27bf",xn="a-z\\xdf-\\xf6\\xf8-\\xff",pr="\\xac\\xb1\\xd7\\xf7",sa="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Ii="\\u2000-\\u206f",Qr=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",mo="A-Z\\xc0-\\xd6\\xd8-\\xde",Ps="\\ufe0e\\ufe0f",Ga=pr+sa+Ii+Qr,Pi="['\u2019]",_l="["+hr+"]",ro="["+Ga+"]",Hi="["+Li+"]",wa="\\d+",oi="["+kr+"]",ls="["+xn+"]",Sa="[^"+hr+Ga+wa+kr+xn+mo+"]",Oc="\\ud83c[\\udffb-\\udfff]",Wa="(?:"+Hi+"|"+Oc+")",L="[^"+hr+"]",U="(?:\\ud83c[\\udde6-\\uddff]){2}",Q="[\\ud800-\\udbff][\\udc00-\\udfff]",At="["+mo+"]",tt="\\u200d",ot="(?:"+ls+"|"+Sa+")",ft="(?:"+At+"|"+Sa+")",Ft="(?:"+Pi+"(?:d|ll|m|re|s|t|ve))?",zt="(?:"+Pi+"(?:D|LL|M|RE|S|T|VE))?",ie=Wa+"?",kt="["+Ps+"]?",Ie="(?:"+tt+"(?:"+[L,U,Q].join("|")+")"+kt+ie+")*",Pe="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Xe="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",en=kt+ie+Ie,dr="(?:"+[oi,U,Q].join("|")+")"+en,le="(?:"+[L+Hi+"?",Hi,U,Q,_l].join("|")+")",Ue=RegExp(Pi,"g"),_r=RegExp(Hi,"g"),Yn=RegExp(Oc+"(?="+Oc+")|"+le+en,"g"),$r=RegExp([At+"?"+ls+"+"+Ft+"(?="+[ro,At,"$"].join("|")+")",ft+"+"+zt+"(?="+[ro,At+ot,"$"].join("|")+")",At+"?"+ot+"+"+Ft,At+"+"+zt,Xe,Pe,wa,dr].join("|"),"g"),fn=RegExp("["+tt+hr+Li+Ps+"]"),Ea=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Wo=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],er=-1,gr={};gr[Ai]=gr[Un]=gr[no]=gr[To]=gr[zi]=gr[ii]=gr[Go]=gr[yr]=gr[Rn]=!0,gr[Jn]=gr[Ar]=gr[Br]=gr[Fi]=gr[sr]=gr[fr]=gr[Is]=gr[Gi]=gr[bi]=gr[ni]=gr[xa]=gr[ri]=gr[qo]=gr[Et]=gr[We]=!1;var Ln={};Ln[Jn]=Ln[Ar]=Ln[Br]=Ln[sr]=Ln[Fi]=Ln[fr]=Ln[Ai]=Ln[Un]=Ln[no]=Ln[To]=Ln[zi]=Ln[bi]=Ln[ni]=Ln[xa]=Ln[ri]=Ln[qo]=Ln[Et]=Ln[pt]=Ln[ii]=Ln[Go]=Ln[yr]=Ln[Rn]=!0,Ln[Is]=Ln[Gi]=Ln[We]=!1;var Oi={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017F:"s"},Vu={"&":"&","<":"<",">":">",'"':""","'":"'"},mu={"&":"&","<":"<",">":">",""":'"',"'":"'"},Tg={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Mg=parseFloat,_d=parseInt,Ah=typeof Iu=="object"&&Iu&&Iu.Object===Object&&Iu,Of=typeof self=="object"&&self&&self.Object===Object&&self,Ao=Ah||Of||Function("return this")(),Lh=t&&!t.nodeType&&t,Zl=Lh&&!0&&e&&!e.nodeType&&e,Kl=Zl&&Zl.exports===Lh,Jl=Kl&&Ah.process,Fa=function(){try{var $t=Zl&&Zl.require&&Zl.require("util").types;return $t||Jl&&Jl.binding&&Jl.binding("util")}catch{}}(),xd=Fa&&Fa.isArrayBuffer,So=Fa&&Fa.isDate,Ql=Fa&&Fa.isMap,vu=Fa&&Fa.isRegExp,yu=Fa&&Fa.isSet,$u=Fa&&Fa.isTypedArray;function io($t,oe,Gt){switch(Gt.length){case 0:return $t.call(oe);case 1:return $t.call(oe,Gt[0]);case 2:return $t.call(oe,Gt[0],Gt[1]);case 3:return $t.call(oe,Gt[0],Gt[1],Gt[2])}return $t.apply(oe,Gt)}function tc($t,oe,Gt,Le){for(var kn=-1,br=$t==null?0:$t.length;++kn<br;){var Lr=$t[kn];oe(Le,Lr,Gt(Lr),$t)}return Le}function ua($t,oe){for(var Gt=-1,Le=$t==null?0:$t.length;++Gt<Le&&oe($t[Gt],Gt,$t)!==!1;);return $t}function Rc($t,oe){for(var Gt=$t==null?0:$t.length;Gt--&&oe($t[Gt],Gt,$t)!==!1;);return $t}function xl($t,oe){for(var Gt=-1,Le=$t==null?0:$t.length;++Gt<Le;)if(!oe($t[Gt],Gt,$t))return!1;return!0}function bl($t,oe){for(var Gt=-1,Le=$t==null?0:$t.length,kn=0,br=[];++Gt<Le;){var Lr=$t[Gt];oe(Lr,Gt,$t)&&(br[kn++]=Lr)}return br}function Rf($t,oe){var Gt=$t==null?0:$t.length;return!!Gt&&kc($t,oe,0)>-1}function jr($t,oe,Gt){for(var Le=-1,kn=$t==null?0:$t.length;++Le<kn;)if(Gt(oe,$t[Le]))return!0;return!1}function di($t,oe){for(var Gt=-1,Le=$t==null?0:$t.length,kn=Array(Le);++Gt<Le;)kn[Gt]=oe($t[Gt],Gt,$t);return kn}function Ho($t,oe){for(var Gt=-1,Le=oe.length,kn=$t.length;++Gt<Le;)$t[kn+Gt]=oe[Gt];return $t}function ju($t,oe,Gt,Le){var kn=-1,br=$t==null?0:$t.length;for(Le&&br&&(Gt=$t[++kn]);++kn<br;)Gt=oe(Gt,$t[kn],kn,$t);return Gt}function Oh($t,oe,Gt,Le){var kn=$t==null?0:$t.length;for(Le&&kn&&(Gt=$t[--kn]);kn--;)Gt=oe(Gt,$t[kn],kn,$t);return Gt}function _u($t,oe){for(var Gt=-1,Le=$t==null?0:$t.length;++Gt<Le;)if(oe($t[Gt],Gt,$t))return!0;return!1}var Ag=js("length");function qu($t){return $t.split("")}function $s($t){return $t.match(Qt)||[]}function wl($t,oe,Gt){var Le;return Gt($t,function(kn,br,Lr){if(oe(kn,br,Lr))return Le=br,!1}),Le}function kf($t,oe,Gt,Le){for(var kn=$t.length,br=Gt+(Le?1:-1);Le?br--:++br<kn;)if(oe($t[br],br,$t))return br;return-1}function kc($t,oe,Gt){return oe===oe?Eo($t,oe,Gt):kf($t,Sl,Gt)}function bd($t,oe,Gt,Le){for(var kn=Gt-1,br=$t.length;++kn<br;)if(Le($t[kn],oe))return kn;return-1}function Sl($t){return $t!==$t}function Ap($t,oe){var Gt=$t==null?0:$t.length;return Gt?ui($t,oe)/Gt:Wt}function js($t){return function(oe){return oe==null?n:oe[$t]}}function cs($t){return function(oe){return $t==null?n:$t[oe]}}function wd($t,oe,Gt,Le,kn){return kn($t,function(br,Lr,un){Gt=Le?(Le=!1,br):oe(Gt,br,Lr,un)}),Gt}function qs($t,oe){var Gt=$t.length;for($t.sort(oe);Gt--;)$t[Gt]=$t[Gt].value;return $t}function ui($t,oe){for(var Gt,Le=-1,kn=$t.length;++Le<kn;){var br=oe($t[Le]);br!==n&&(Gt=Gt===n?br:Gt+br)}return Gt}function Gs($t,oe){for(var Gt=-1,Le=Array($t);++Gt<$t;)Le[Gt]=oe(Gt);return Le}function Lg($t,oe){return di(oe,function(Gt){return[Gt,$t[Gt]]})}function Dc($t){return $t&&$t.slice(0,Ws($t)+1).replace(at,"")}function Ca($t){return function(oe){return $t(oe)}}function Rh($t,oe){return di(oe,function(Gt){return $t[Gt]})}function Nc($t,oe){return $t.has(oe)}function Df($t,oe){for(var Gt=-1,Le=$t.length;++Gt<Le&&kc(oe,$t[Gt],0)>-1;);return Gt}function ec($t,oe){for(var Gt=$t.length;Gt--&&kc(oe,$t[Gt],0)>-1;);return Gt}function El($t,oe){for(var Gt=$t.length,Le=0;Gt--;)$t[Gt]===oe&&++Le;return Le}var kh=cs(Oi),Dh=cs(Vu);function Ut($t){return"\\"+Tg[$t]}function ce($t,oe){return $t==null?n:$t[oe]}function Be($t){return fn.test($t)}function dn($t){return Ea.test($t)}function Bi($t){for(var oe,Gt=[];!(oe=$t.next()).done;)Gt.push(oe.value);return Gt}function xr($t){var oe=-1,Gt=Array($t.size);return $t.forEach(function(Le,kn){Gt[++oe]=[kn,Le]}),Gt}function to($t,oe){return function(Gt){return $t(oe(Gt))}}function ti($t,oe){for(var Gt=-1,Le=$t.length,kn=0,br=[];++Gt<Le;){var Lr=$t[Gt];(Lr===oe||Lr===_)&&($t[Gt]=_,br[kn++]=Gt)}return br}function la($t){var oe=-1,Gt=Array($t.size);return $t.forEach(function(Le){Gt[++oe]=Le}),Gt}function vo($t){var oe=-1,Gt=Array($t.size);return $t.forEach(function(Le){Gt[++oe]=[Le,Le]}),Gt}function Eo($t,oe,Gt){for(var Le=Gt-1,kn=$t.length;++Le<kn;)if($t[Le]===oe)return Le;return-1}function Ts($t,oe,Gt){for(var Le=Gt+1;Le--;)if($t[Le]===oe)return Le;return Le}function fs($t){return Be($t)?Nh($t):Ag($t)}function Ti($t){return Be($t)?Cl($t):qu($t)}function Ws($t){for(var oe=$t.length;oe--&&bt.test($t.charAt(oe)););return oe}var Fc=cs(mu);function Nh($t){for(var oe=Yn.lastIndex=0;Yn.test($t);)++oe;return oe}function Cl($t){return $t.match(Yn)||[]}function zc($t){return $t.match($r)||[]}var Lp=function $t(oe){oe=oe==null?Ao:nc.defaults(Ao.Object(),oe,nc.pick(Ao,Wo));var Gt=oe.Array,Le=oe.Date,kn=oe.Error,br=oe.Function,Lr=oe.Math,un=oe.Object,Cr=oe.RegExp,Ia=oe.String,Xo=oe.TypeError,hs=Gt.prototype,Hs=br.prototype,Bc=un.prototype,Uc=oe["__core-js_shared__"],Gu=Hs.toString,Dr=Bc.hasOwnProperty,Xs=0,oo=function(){var m=/[^.]+$/.exec(Uc&&Uc.keys&&Uc.keys.IE_PROTO||"");return m?"Symbol(src)_1."+m:""}(),xu=Bc.toString,Fh=Gu.call(un),Lo=Ao._,nn=Cr("^"+Gu.call(Dr).replace(Mt,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ha=Kl?oe.Buffer:n,Il=oe.Symbol,Vc=oe.Uint8Array,Wu=Ha?Ha.allocUnsafe:n,Xa=to(un.getPrototypeOf,un),Og=un.create,Fe=Bc.propertyIsEnumerable,Op=hs.splice,Sd=Il?Il.isConcatSpreadable:n,zh=Il?Il.iterator:n,za=Il?Il.toStringTag:n,Ya=function(){try{var m=Eu(un,"defineProperty");return m({},"",{}),m}catch{}}(),Rg=oe.clearTimeout!==Ao.clearTimeout&&oe.clearTimeout,kg=Le&&Le.now!==Ao.Date.now&&Le.now,Ys=oe.setTimeout!==Ao.setTimeout&&oe.setTimeout,Hu=Lr.ceil,Ed=Lr.floor,Bh=un.getOwnPropertySymbols,av=Ha?Ha.isBuffer:n,Dg=oe.isFinite,Pl=hs.join,bu=to(un.keys,un),Sn=Lr.max,ao=Lr.min,Xu=Le.now,Ba=oe.parseInt,Nf=Lr.random,Ff=hs.reverse,wu=Eu(oe,"DataView"),ca=Eu(oe,"Map"),Uh=Eu(oe,"Promise"),cn=Eu(oe,"Set"),rn=Eu(oe,"WeakMap"),zf=Eu(un,"create"),Pa=rn&&new rn,ps={},Ua=Up(wu),rc=Up(ca),sv=Up(Uh),Ng=Up(cn),ai=Up(rn),Oo=Il?Il.prototype:n,Rp=Oo?Oo.valueOf:n,Bf=Oo?Oo.toString:n;function ut(m){if(lo(m)&&!zn(m)&&!(m instanceof ur)){if(m instanceof Ka)return m;if(Dr.call(m,"__wrapped__"))return Vx(m)}return new Ka(m)}var Zs=function(){function m(){}return function(x){if(!uo(x))return{};if(Og)return Og(x);m.prototype=x;var T=new m;return m.prototype=n,T}}();function Za(){}function Ka(m,x){this.__wrapped__=m,this.__actions__=[],this.__chain__=!!x,this.__index__=0,this.__values__=n}ut.templateSettings={escape:Vr,evaluate:W,interpolate:Y,variable:"",imports:{_:ut}},ut.prototype=Za.prototype,ut.prototype.constructor=ut,Ka.prototype=Zs(Za.prototype),Ka.prototype.constructor=Ka;function ur(m){this.__wrapped__=m,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=be,this.__views__=[]}function Fg(){var m=new ur(this.__wrapped__);return m.__actions__=tl(this.__actions__),m.__dir__=this.__dir__,m.__filtered__=this.__filtered__,m.__iteratees__=tl(this.__iteratees__),m.__takeCount__=this.__takeCount__,m.__views__=tl(this.__views__),m}function kp(){if(this.__filtered__){var m=new ur(this);m.__dir__=-1,m.__filtered__=!0}else m=this.clone(),m.__dir__*=-1;return m}function Cd(){var m=this.__wrapped__.value(),x=this.__dir__,T=zn(m),V=x<0,Z=T?m.length:0,ht=MP(0,Z,this.__views__),Tt=ht.start,Dt=ht.end,Ht=Dt-Tt,Se=V?Dt:Tt-1,Ce=this.__iteratees__,Ae=Ce.length,pn=0,Dn=ao(Ht,this.__takeCount__);if(!T||!V&&Z==Ht&&Dn==Ht)return Px(m,this.__actions__);var rr=[];t:for(;Ht--&&pn<Dn;){Se+=x;for(var Kr=-1,ir=m[Se];++Kr<Ae;){var ci=Ce[Kr],Si=ci.iteratee,Kc=ci.type,Rl=Si(ir);if(Kc==he)ir=Rl;else if(!Rl){if(Kc==de)continue t;break t}}rr[pn++]=ir}return rr}ur.prototype=Zs(Za.prototype),ur.prototype.constructor=ur;function $c(m){var x=-1,T=m==null?0:m.length;for(this.clear();++x<T;){var V=m[x];this.set(V[0],V[1])}}function Dp(){this.__data__=zf?zf(null):{},this.size=0}function Vh(m){var x=this.has(m)&&delete this.__data__[m];return this.size-=x?1:0,x}function uv(m){var x=this.__data__;if(zf){var T=x[m];return T===c?n:T}return Dr.call(x,m)?x[m]:n}function Uf(m){var x=this.__data__;return zf?x[m]!==n:Dr.call(x,m)}function Vf(m,x){var T=this.__data__;return this.size+=this.has(m)?0:1,T[m]=zf&&x===n?c:x,this}$c.prototype.clear=Dp,$c.prototype.delete=Vh,$c.prototype.get=uv,$c.prototype.has=Uf,$c.prototype.set=Vf;function Yu(m){var x=-1,T=m==null?0:m.length;for(this.clear();++x<T;){var V=m[x];this.set(V[0],V[1])}}function $f(){this.__data__=[],this.size=0}function Zu(m){var x=this.__data__,T=ne(x,m);if(T<0)return!1;var V=x.length-1;return T==V?x.pop():Op.call(x,T,1),--this.size,!0}function lv(m){var x=this.__data__,T=ne(x,m);return T<0?n:x[T][1]}function Id(m){return ne(this.__data__,m)>-1}function cv(m,x){var T=this.__data__,V=ne(T,m);return V<0?(++this.size,T.push([m,x])):T[V][1]=x,this}Yu.prototype.clear=$f,Yu.prototype.delete=Zu,Yu.prototype.get=lv,Yu.prototype.has=Id,Yu.prototype.set=cv;function Ku(m){var x=-1,T=m==null?0:m.length;for(this.clear();++x<T;){var V=m[x];this.set(V[0],V[1])}}function h(){this.size=0,this.__data__={hash:new $c,map:new(ca||Yu),string:new $c}}function d(m){var x=gi(this,m).delete(m);return this.size-=x?1:0,x}function p(m){return gi(this,m).get(m)}function y(m){return gi(this,m).has(m)}function S(m,x){var T=gi(this,m),V=T.size;return T.set(m,x),this.size+=T.size==V?0:1,this}Ku.prototype.clear=h,Ku.prototype.delete=d,Ku.prototype.get=p,Ku.prototype.has=y,Ku.prototype.set=S;function P(m){var x=-1,T=m==null?0:m.length;for(this.__data__=new Ku;++x<T;)this.add(m[x])}function M(m){return this.__data__.set(m,c),this}function N(m){return this.__data__.has(m)}P.prototype.add=P.prototype.push=M,P.prototype.has=N;function q(m){var x=this.__data__=new Yu(m);this.size=x.size}function X(){this.__data__=new Yu,this.size=0}function it(m){var x=this.__data__,T=x.delete(m);return this.size=x.size,T}function st(m){return this.__data__.get(m)}function ct(m){return this.__data__.has(m)}function xt(m,x){var T=this.__data__;if(T instanceof Yu){var V=T.__data__;if(!ca||V.length<i-1)return V.push([m,x]),this.size=++T.size,this;T=this.__data__=new Ku(V)}return T.set(m,x),this.size=T.size,this}q.prototype.clear=X,q.prototype.delete=it,q.prototype.get=st,q.prototype.has=ct,q.prototype.set=xt;function yt(m,x){var T=zn(m),V=!T&&eu(m),Z=!T&&!V&&Ol(m),ht=!T&&!V&&!Z&&Xf(m),Tt=T||V||Z||ht,Dt=Tt?Gs(m.length,Ia):[],Ht=Dt.length;for(var Se in m)(x||Dr.call(m,Se))&&!(Tt&&(Se=="length"||Z&&(Se=="offset"||Se=="parent")||ht&&(Se=="buffer"||Se=="byteLength"||Se=="byteOffset")||el(Se,Ht)))&&Dt.push(Se);return Dt}function Ct(m){var x=m.length;return x?m[Ex(0,x-1)]:n}function gt(m,x){return Hh(tl(m),je(x,0,m.length))}function It(m){return Hh(tl(m))}function Lt(m,x,T){(T!==n&&!vi(m[x],T)||T===n&&!(x in m))&&we(m,x,T)}function jt(m,x,T){var V=m[x];(!(Dr.call(m,x)&&vi(V,T))||T===n&&!(x in m))&&we(m,x,T)}function ne(m,x){for(var T=m.length;T--;)if(vi(m[T][0],x))return T;return-1}function Jt(m,x,T,V){return bn(m,function(Z,ht,Tt){x(V,Z,T(Z),Tt)}),V}function ae(m,x){return m&&qf(x,ts(x),m)}function ge(m,x){return m&&qf(x,Va(x),m)}function we(m,x,T){x=="__proto__"&&Ya?Ya(m,x,{configurable:!0,enumerable:!0,value:T,writable:!0}):m[x]=T}function Te(m,x){for(var T=-1,V=x.length,Z=Gt(V),ht=m==null;++T<V;)Z[T]=ht?n:S_(m,x[T]);return Z}function je(m,x,T){return m===m&&(T!==n&&(m=m<=T?m:T),x!==n&&(m=m>=x?m:x)),m}function an(m,x,T,V,Z,ht){var Tt,Dt=x&E,Ht=x&C,Se=x&O;if(T&&(Tt=Z?T(m,V,Z,ht):T(m)),Tt!==n)return Tt;if(!uo(m))return m;var Ce=zn(m);if(Ce){if(Tt=LP(m),!Dt)return tl(m,Tt)}else{var Ae=Js(m),pn=Ae==Gi||Ae==jn;if(Ol(m))return Uw(m,Dt);if(Ae==xa||Ae==Jn||pn&&!Z){if(Tt=Ht||pn?{}:tS(m),!Dt)return Ht?Vg(m,ge(Tt,m)):jw(m,ae(Tt,m))}else{if(!Ln[Ae])return Z?m:{};Tt=OP(m,Ae,Dt)}}ht||(ht=new q);var Dn=ht.get(m);if(Dn)return Dn;ht.set(m,Tt),$d(m)?m.forEach(function(ir){Tt.add(an(ir,x,T,ir,m,ht))}):Kh(m)&&m.forEach(function(ir,ci){Tt.set(ci,an(ir,x,T,ci,m,ht))});var rr=Se?Ht?kx:Rx:Ht?Va:ts,Kr=Ce?n:rr(m);return ua(Kr||m,function(ir,ci){Kr&&(ci=ir,ir=m[ci]),jt(Tt,ci,an(ir,x,T,ci,m,ht))}),Tt}function _n(m){var x=ts(m);return function(T){return vn(T,m,x)}}function vn(m,x,T){var V=T.length;if(m==null)return!V;for(m=un(m);V--;){var Z=T[V],ht=x[Z],Tt=m[Z];if(Tt===n&&!(Z in m)||!ht(Tt))return!1}return!0}function Ir(m,x,T){if(typeof m!="function")throw new Xo(o);return kd(function(){m.apply(n,T)},x)}function Qe(m,x,T,V){var Z=-1,ht=Rf,Tt=!0,Dt=m.length,Ht=[],Se=x.length;if(!Dt)return Ht;T&&(x=di(x,Ca(T))),V?(ht=jr,Tt=!1):x.length>=i&&(ht=Nc,Tt=!1,x=new P(x));t:for(;++Z<Dt;){var Ce=m[Z],Ae=T==null?Ce:T(Ce);if(Ce=V||Ce!==0?Ce:0,Tt&&Ae===Ae){for(var pn=Se;pn--;)if(x[pn]===Ae)continue t;Ht.push(Ce)}else ht(x,Ae,V)||Ht.push(Ce)}return Ht}var bn=Mx(eo),Wn=Mx(Yo,!0);function On(m,x){var T=!0;return bn(m,function(V,Z,ht){return T=!!x(V,Z,ht),T}),T}function Pn(m,x,T){for(var V=-1,Z=m.length;++V<Z;){var ht=m[V],Tt=x(ht);if(Tt!=null&&(Dt===n?Tt===Tt&&!ys(Tt):T(Tt,Dt)))var Dt=Tt,Ht=ht}return Ht}function Hn(m,x,T,V){var Z=m.length;for(T=Sr(T),T<0&&(T=-T>Z?0:Z+T),V=V===n||V>Z?Z:Sr(V),V<0&&(V+=Z),V=T>V?0:PS(V);T<V;)m[T++]=x;return m}function An(m,x){var T=[];return bn(m,function(V,Z,ht){x(V,Z,ht)&&T.push(V)}),T}function ln(m,x,T,V,Z){var ht=-1,Tt=m.length;for(T||(T=Qy),Z||(Z=[]);++ht<Tt;){var Dt=m[ht];x>0&&T(Dt)?x>1?ln(Dt,x-1,T,V,Z):Ho(Z,Dt):V||(Z[Z.length]=Dt)}return Z}var Ro=Ax(),so=Ax(!0);function eo(m,x){return m&&Ro(m,x,ts)}function Yo(m,x){return m&&so(m,x,ts)}function Ui(m,x){return bl(x,function(T){return hc(m[T])})}function Ri(m,x){x=Gh(x,m);for(var T=0,V=x.length;m!=null&&T<V;)m=m[Yc(x[T++])];return T&&T==V?m:n}function Ms(m,x,T){var V=x(m);return zn(m)?V:Ho(V,T(m))}function Mi(m){return m==null?m===n?Ve:Wi:za&&za in un(m)?qg(m):n_(m)}function ic(m,x){return m>x}function As(m,x){return m!=null&&Dr.call(m,x)}function Tl(m,x){return m!=null&&x in un(m)}function Ju(m,x,T){return m>=ao(x,T)&&m<Sn(x,T)}function $h(m,x,T){for(var V=T?jr:Rf,Z=m[0].length,ht=m.length,Tt=ht,Dt=Gt(ht),Ht=1/0,Se=[];Tt--;){var Ce=m[Tt];Tt&&x&&(Ce=di(Ce,Ca(x))),Ht=ao(Ce.length,Ht),Dt[Tt]=!T&&(x||Z>=120&&Ce.length>=120)?new P(Tt&&Ce):n}Ce=m[0];var Ae=-1,pn=Dt[0];t:for(;++Ae<Z&&Se.length<Ht;){var Dn=Ce[Ae],rr=x?x(Dn):Dn;if(Dn=T||Dn!==0?Dn:0,!(pn?Nc(pn,rr):V(Se,rr,T))){for(Tt=ht;--Tt;){var Kr=Dt[Tt];if(!(Kr?Nc(Kr,rr):V(m[Tt],rr,T)))continue t}pn&&pn.push(rr),Se.push(Dn)}}return Se}function Np(m,x,T,V){return eo(m,function(Z,ht,Tt){x(V,T(Z),ht,Tt)}),V}function Qu(m,x,T){x=Gh(x,m),m=Fx(m,x);var V=m==null?m:m[Yc(cc(x))];return V==null?n:io(V,m,T)}function jh(m){return lo(m)&&Mi(m)==Jn}function Pd(m){return lo(m)&&Mi(m)==Br}function oc(m){return lo(m)&&Mi(m)==fr}function jc(m,x,T,V,Z){return m===x?!0:m==null||x==null||!lo(m)&&!lo(x)?m!==m&&x!==x:ac(m,x,T,V,jc,Z)}function ac(m,x,T,V,Z,ht){var Tt=zn(m),Dt=zn(x),Ht=Tt?Ar:Js(m),Se=Dt?Ar:Js(x);Ht=Ht==Jn?xa:Ht,Se=Se==Jn?xa:Se;var Ce=Ht==xa,Ae=Se==xa,pn=Ht==Se;if(pn&&Ol(m)){if(!Ol(x))return!1;Tt=!0,Ce=!1}if(pn&&!Ce)return ht||(ht=new q),Tt||Xf(m)?Kw(m,x,T,V,Z,ht):PP(m,x,Ht,T,V,Z,ht);if(!(T&R)){var Dn=Ce&&Dr.call(m,"__wrapped__"),rr=Ae&&Dr.call(x,"__wrapped__");if(Dn||rr){var Kr=Dn?m.value():m,ir=rr?x.value():x;return ht||(ht=new q),Z(Kr,ir,T,V,ht)}}return pn?(ht||(ht=new q),TP(m,x,T,V,Z,ht)):!1}function fa(m){return lo(m)&&Js(m)==bi}function Ml(m,x,T,V){var Z=T.length,ht=Z,Tt=!V;if(m==null)return!ht;for(m=un(m);Z--;){var Dt=T[Z];if(Tt&&Dt[2]?Dt[1]!==m[Dt[0]]:!(Dt[0]in m))return!1}for(;++Z<ht;){Dt=T[Z];var Ht=Dt[0],Se=m[Ht],Ce=Dt[1];if(Tt&&Dt[2]){if(Se===n&&!(Ht in m))return!1}else{var Ae=new q;if(V)var pn=V(Se,Ce,Ht,m,x,Ae);if(!(pn===n?jc(Ce,Se,R|D,V,Ae):pn))return!1}}return!0}function qc(m){if(!uo(m)||eS(m))return!1;var x=hc(m)?nn:Re;return x.test(Up(m))}function qh(m){return lo(m)&&Mi(m)==ri}function Yr(m){return lo(m)&&Js(m)==qo}function Su(m){return lo(m)&&pc(m.length)&&!!gr[Mi(m)]}function ds(m){return typeof m=="function"?m:m==null?dc:typeof m=="object"?zn(m)?fv(m[0],m[1]):zp(m):Xk(m)}function Gc(m){if(!Wh(m))return bu(m);var x=[];for(var T in un(m))Dr.call(m,T)&&T!="constructor"&&x.push(T);return x}function wx(m){if(!uo(m))return e_(m);var x=Wh(m),T=[];for(var V in m)V=="constructor"&&(x||!Dr.call(m,V))||T.push(V);return T}function Fp(m,x){return m<x}function Fy(m,x){var T=-1,V=Zr(m)?Gt(m.length):[];return bn(m,function(Z,ht,Tt){V[++T]=x(Z,ht,Tt)}),V}function zp(m){var x=Ky(m);return x.length==1&&x[0][2]?Cu(x[0][0],x[0][1]):function(T){return T===m||Ml(T,m,x)}}function fv(m,x){return Dx(m)&&Gg(x)?Cu(Yc(m),x):function(T){var V=S_(T,m);return V===n&&V===x?nm(T,m):jc(x,V,R|D)}}function Wc(m,x,T,V,Z){m!==x&&Ro(x,function(ht,Tt){if(Z||(Z=new q),uo(ht))zg(m,x,Tt,T,Wc,V,Z);else{var Dt=V?V(zx(m,Tt),ht,Tt+"",m,x,Z):n;Dt===n&&(Dt=ht),Lt(m,Tt,Dt)}},Va)}function zg(m,x,T,V,Z,ht,Tt){var Dt=zx(m,T),Ht=zx(x,T),Se=Tt.get(Ht);if(Se){Lt(m,T,Se);return}var Ce=ht?ht(Dt,Ht,T+"",m,x,Tt):n,Ae=Ce===n;if(Ae){var pn=zn(Ht),Dn=!pn&&Ol(Ht),rr=!pn&&!Dn&&Xf(Ht);Ce=Ht,pn||Dn||rr?zn(Dt)?Ce=Dt:ji(Dt)?Ce=tl(Dt):Dn?(Ae=!1,Ce=Uw(Ht,!0)):rr?(Ae=!1,Ce=qy(Ht,!0)):Ce=[]:Jh(Ht)||eu(Ht)?(Ce=Dt,eu(Dt)?Ce=_o(Dt):(!uo(Dt)||hc(Dt))&&(Ce=tS(Ht))):Ae=!1}Ae&&(Tt.set(Ht,Ce),Z(Ce,Ht,V,ht,Tt),Tt.delete(Ht)),Lt(m,T,Ce)}function zy(m,x){var T=m.length;if(!!T)return x+=x<0?T:0,el(x,T)?m[x]:n}function Bp(m,x,T){x.length?x=di(x,function(ht){return zn(ht)?function(Tt){return Ri(Tt,ht.length===1?ht[0]:ht)}:ht}):x=[dc];var V=-1;x=di(x,Ca(qn()));var Z=Fy(m,function(ht,Tt,Dt){var Ht=di(x,function(Se){return Se(ht)});return{criteria:Ht,index:++V,value:ht}});return qs(Z,function(ht,Tt){return Hc(ht,Tt,T)})}function Ks(m,x){return Dw(m,x,function(T,V){return nm(m,V)})}function Dw(m,x,T){for(var V=-1,Z=x.length,ht={};++V<Z;){var Tt=x[V],Dt=Ri(m,Tt);T(Dt,Tt)&&sc(ht,Gh(Tt,m),Dt)}return ht}function Nw(m){return function(x){return Ri(x,m)}}function Sx(m,x,T,V){var Z=V?bd:kc,ht=-1,Tt=x.length,Dt=m;for(m===x&&(x=tl(x)),T&&(Dt=di(m,Ca(T)));++ht<Tt;)for(var Ht=0,Se=x[ht],Ce=T?T(Se):Se;(Ht=Z(Dt,Ce,Ht,V))>-1;)Dt!==m&&Op.call(Dt,Ht,1),Op.call(m,Ht,1);return m}function Fw(m,x){for(var T=m?x.length:0,V=T-1;T--;){var Z=x[T];if(T==V||Z!==ht){var ht=Z;el(Z)?Op.call(m,Z,1):Ix(m,Z)}}return m}function Ex(m,x){return m+Ed(Nf()*(x-m+1))}function _P(m,x,T,V){for(var Z=-1,ht=Sn(Hu((x-m)/(T||1)),0),Tt=Gt(ht);ht--;)Tt[V?ht:++Z]=m,m+=T;return Tt}function hv(m,x){var T="";if(!m||x<1||x>te)return T;do x%2&&(T+=m),x=Ed(x/2),x&&(m+=m);while(x);return T}function qr(m,x){return yv(tu(m,x,dc),m+"")}function By(m){return Ct(Wd(m))}function zw(m,x){var T=Wd(m);return Hh(T,je(x,0,T.length))}function sc(m,x,T,V){if(!uo(m))return m;x=Gh(x,m);for(var Z=-1,ht=x.length,Tt=ht-1,Dt=m;Dt!=null&&++Z<ht;){var Ht=Yc(x[Z]),Se=T;if(Ht==="__proto__"||Ht==="constructor"||Ht==="prototype")return m;if(Z!=Tt){var Ce=Dt[Ht];Se=V?V(Ce,Ht,Dt):n,Se===n&&(Se=uo(Ce)?Ce:el(x[Z+1])?[]:{})}jt(Dt,Ht,Se),Dt=Dt[Ht]}return m}var Bg=Pa?function(m,x){return Pa.set(m,x),m}:dc,xP=Ya?function(m,x){return Ya(m,"toString",{configurable:!0,enumerable:!1,value:uT(x),writable:!0})}:dc;function bP(m){return Hh(Wd(m))}function uc(m,x,T){var V=-1,Z=m.length;x<0&&(x=-x>Z?0:Z+x),T=T>Z?Z:T,T<0&&(T+=Z),Z=x>T?0:T-x>>>0,x>>>=0;for(var ht=Gt(Z);++V<Z;)ht[V]=m[V+x];return ht}function wP(m,x){var T;return bn(m,function(V,Z,ht){return T=x(V,Z,ht),!T}),!!T}function Uy(m,x,T){var V=0,Z=m==null?V:m.length;if(typeof x=="number"&&x===x&&Z<=Fn){for(;V<Z;){var ht=V+Z>>>1,Tt=m[ht];Tt!==null&&!ys(Tt)&&(T?Tt<=x:Tt<x)?V=ht+1:Z=ht}return Z}return Cx(m,x,dc,T)}function Cx(m,x,T,V){var Z=0,ht=m==null?0:m.length;if(ht===0)return 0;x=T(x);for(var Tt=x!==x,Dt=x===null,Ht=ys(x),Se=x===n;Z<ht;){var Ce=Ed((Z+ht)/2),Ae=T(m[Ce]),pn=Ae!==n,Dn=Ae===null,rr=Ae===Ae,Kr=ys(Ae);if(Tt)var ir=V||rr;else Se?ir=rr&&(V||pn):Dt?ir=rr&&pn&&(V||!Dn):Ht?ir=rr&&pn&&!Dn&&(V||!Kr):Dn||Kr?ir=!1:ir=V?Ae<=x:Ae<x;ir?Z=Ce+1:ht=Ce}return ao(ht,De)}function Bw(m,x){for(var T=-1,V=m.length,Z=0,ht=[];++T<V;){var Tt=m[T],Dt=x?x(Tt):Tt;if(!T||!vi(Dt,Ht)){var Ht=Dt;ht[Z++]=Tt===0?0:Tt}}return ht}function Vy(m){return typeof m=="number"?m:ys(m)?Wt:+m}function Al(m){if(typeof m=="string")return m;if(zn(m))return di(m,Al)+"";if(ys(m))return Bf?Bf.call(m):"";var x=m+"";return x=="0"&&1/m==-Yt?"-0":x}function Ll(m,x,T){var V=-1,Z=Rf,ht=m.length,Tt=!0,Dt=[],Ht=Dt;if(T)Tt=!1,Z=jr;else if(ht>=i){var Se=x?null:Ls(m);if(Se)return la(Se);Tt=!1,Z=Nc,Ht=new P}else Ht=x?[]:Dt;t:for(;++V<ht;){var Ce=m[V],Ae=x?x(Ce):Ce;if(Ce=T||Ce!==0?Ce:0,Tt&&Ae===Ae){for(var pn=Ht.length;pn--;)if(Ht[pn]===Ae)continue t;x&&Ht.push(Ae),Dt.push(Ce)}else Z(Ht,Ae,T)||(Ht!==Dt&&Ht.push(Ae),Dt.push(Ce))}return Dt}function Ix(m,x){return x=Gh(x,m),m=Fx(m,x),m==null||delete m[Yc(cc(x))]}function ko(m,x,T,V){return sc(m,x,T(Ri(m,x)),V)}function Td(m,x,T,V){for(var Z=m.length,ht=V?Z:-1;(V?ht--:++ht<Z)&&x(m[ht],ht,m););return T?uc(m,V?0:ht,V?ht+1:Z):uc(m,V?ht+1:0,V?Z:ht)}function Px(m,x){var T=m;return T instanceof ur&&(T=T.value()),ju(x,function(V,Z){return Z.func.apply(Z.thisArg,Ho([V],Z.args))},T)}function Ug(m,x,T){var V=m.length;if(V<2)return V?Ll(m[0]):[];for(var Z=-1,ht=Gt(V);++Z<V;)for(var Tt=m[Z],Dt=-1;++Dt<V;)Dt!=Z&&(ht[Z]=Qe(ht[Z]||Tt,m[Dt],x,T));return Ll(ln(ht,1),x,T)}function pv(m,x,T){for(var V=-1,Z=m.length,ht=x.length,Tt={};++V<Z;){var Dt=V<ht?x[V]:n;T(Tt,m[V],Dt)}return Tt}function Md(m){return ji(m)?m:[]}function $y(m){return typeof m=="function"?m:dc}function Gh(m,x){return zn(m)?m:Dx(m,x)?[m]:r_(qi(m))}var dv=qr;function jf(m,x,T){var V=m.length;return T=T===n?V:T,!x&&T>=V?m:uc(m,x,T)}var jy=Rg||function(m){return Ao.clearTimeout(m)};function Uw(m,x){if(x)return m.slice();var T=m.length,V=Wu?Wu(T):new m.constructor(T);return m.copy(V),V}function Ad(m){var x=new m.constructor(m.byteLength);return new Vc(x).set(new Vc(m)),x}function SP(m,x){var T=x?Ad(m.buffer):m.buffer;return new m.constructor(T,m.byteOffset,m.byteLength)}function Tx(m){var x=new m.constructor(m.source,re.exec(m));return x.lastIndex=m.lastIndex,x}function EP(m){return Rp?un(Rp.call(m)):{}}function qy(m,x){var T=x?Ad(m.buffer):m.buffer;return new m.constructor(T,m.byteOffset,m.length)}function Gy(m,x){if(m!==x){var T=m!==n,V=m===null,Z=m===m,ht=ys(m),Tt=x!==n,Dt=x===null,Ht=x===x,Se=ys(x);if(!Dt&&!Se&&!ht&&m>x||ht&&Tt&&Ht&&!Dt&&!Se||V&&Tt&&Ht||!T&&Ht||!Z)return 1;if(!V&&!ht&&!Se&&m<x||Se&&T&&Z&&!V&&!ht||Dt&&T&&Z||!Tt&&Z||!Ht)return-1}return 0}function Hc(m,x,T){for(var V=-1,Z=m.criteria,ht=x.criteria,Tt=Z.length,Dt=T.length;++V<Tt;){var Ht=Gy(Z[V],ht[V]);if(Ht){if(V>=Dt)return Ht;var Se=T[V];return Ht*(Se=="desc"?-1:1)}}return m.index-x.index}function Vw(m,x,T,V){for(var Z=-1,ht=m.length,Tt=T.length,Dt=-1,Ht=x.length,Se=Sn(ht-Tt,0),Ce=Gt(Ht+Se),Ae=!V;++Dt<Ht;)Ce[Dt]=x[Dt];for(;++Z<Tt;)(Ae||Z<ht)&&(Ce[T[Z]]=m[Z]);for(;Se--;)Ce[Dt++]=m[Z++];return Ce}function $w(m,x,T,V){for(var Z=-1,ht=m.length,Tt=-1,Dt=T.length,Ht=-1,Se=x.length,Ce=Sn(ht-Dt,0),Ae=Gt(Ce+Se),pn=!V;++Z<Ce;)Ae[Z]=m[Z];for(var Dn=Z;++Ht<Se;)Ae[Dn+Ht]=x[Ht];for(;++Tt<Dt;)(pn||Z<ht)&&(Ae[Dn+T[Tt]]=m[Z++]);return Ae}function tl(m,x){var T=-1,V=m.length;for(x||(x=Gt(V));++T<V;)x[T]=m[T];return x}function qf(m,x,T,V){var Z=!T;T||(T={});for(var ht=-1,Tt=x.length;++ht<Tt;){var Dt=x[ht],Ht=V?V(T[Dt],m[Dt],Dt,T,m):n;Ht===n&&(Ht=m[Dt]),Z?we(T,Dt,Ht):jt(T,Dt,Ht)}return T}function jw(m,x){return qf(m,Jy(m),x)}function Vg(m,x){return qf(m,Jw(m),x)}function Wy(m,x){return function(T,V){var Z=zn(T)?tc:Jt,ht=x?x():{};return Z(T,m,qn(V,2),ht)}}function $g(m){return qr(function(x,T){var V=-1,Z=T.length,ht=Z>1?T[Z-1]:n,Tt=Z>2?T[2]:n;for(ht=m.length>3&&typeof ht=="function"?(Z--,ht):n,Tt&&Qs(T[0],T[1],Tt)&&(ht=Z<3?n:ht,Z=1),x=un(x);++V<Z;){var Dt=T[V];Dt&&m(x,Dt,V,ht)}return x})}function Mx(m,x){return function(T,V){if(T==null)return T;if(!Zr(T))return m(T,V);for(var Z=T.length,ht=x?Z:-1,Tt=un(T);(x?ht--:++ht<Z)&&V(Tt[ht],ht,Tt)!==!1;);return T}}function Ax(m){return function(x,T,V){for(var Z=-1,ht=un(x),Tt=V(x),Dt=Tt.length;Dt--;){var Ht=Tt[m?Dt:++Z];if(T(ht[Ht],Ht,ht)===!1)break}return x}}function CP(m,x,T){var V=x&B,Z=gv(m);function ht(){var Tt=this&&this!==Ao&&this instanceof ht?Z:m;return Tt.apply(V?T:this,arguments)}return ht}function qw(m){return function(x){x=qi(x);var T=Be(x)?Ti(x):n,V=T?T[0]:x.charAt(0),Z=T?jf(T,1).join(""):x.slice(1);return V[m]()+Z}}function Xc(m){return function(x){return ju(Wk(r1(x).replace(Ue,"")),m,"")}}function gv(m){return function(){var x=arguments;switch(x.length){case 0:return new m;case 1:return new m(x[0]);case 2:return new m(x[0],x[1]);case 3:return new m(x[0],x[1],x[2]);case 4:return new m(x[0],x[1],x[2],x[3]);case 5:return new m(x[0],x[1],x[2],x[3],x[4]);case 6:return new m(x[0],x[1],x[2],x[3],x[4],x[5]);case 7:return new m(x[0],x[1],x[2],x[3],x[4],x[5],x[6])}var T=Zs(m.prototype),V=m.apply(T,x);return uo(V)?V:T}}function Lx(m,x,T){var V=gv(m);function Z(){for(var ht=arguments.length,Tt=Gt(ht),Dt=ht,Ht=Rd(Z);Dt--;)Tt[Dt]=arguments[Dt];var Se=ht<3&&Tt[0]!==Ht&&Tt[ht-1]!==Ht?[]:ti(Tt,Ht);if(ht-=Se.length,ht<T)return Hw(m,x,Hy,Z.placeholder,n,Tt,Se,n,n,T-ht);var Ce=this&&this!==Ao&&this instanceof Z?V:m;return io(Ce,this,Tt)}return Z}function jg(m){return function(x,T,V){var Z=un(x);if(!Zr(x)){var ht=qn(T,3);x=ts(x),T=function(Dt){return ht(Z[Dt],Dt,Z)}}var Tt=m(x,T,V);return Tt>-1?Z[ht?x[Tt]:Tt]:n}}function lc(m){return Wf(function(x){var T=x.length,V=T,Z=Ka.prototype.thru;for(m&&x.reverse();V--;){var ht=x[V];if(typeof ht!="function")throw new Xo(o);if(Z&&!Tt&&vv(ht)=="wrapper")var Tt=new Ka([],!0)}for(V=Tt?V:T;++V<T;){ht=x[V];var Dt=vv(ht),Ht=Dt=="wrapper"?Od(ht):n;Ht&&Nx(Ht[0])&&Ht[1]==(wt|$|et|Ot)&&!Ht[4].length&&Ht[9]==1?Tt=Tt[vv(Ht[0])].apply(Tt,Ht[3]):Tt=ht.length==1&&Nx(ht)?Tt[Dt]():Tt.thru(ht)}return function(){var Se=arguments,Ce=Se[0];if(Tt&&Se.length==1&&zn(Ce))return Tt.plant(Ce).value();for(var Ae=0,pn=T?x[Ae].apply(this,Se):Ce;++Ae<T;)pn=x[Ae].call(this,pn);return pn}})}function Hy(m,x,T,V,Z,ht,Tt,Dt,Ht,Se){var Ce=x&wt,Ae=x&B,pn=x&z,Dn=x&($|K),rr=x&Bt,Kr=pn?n:gv(m);function ir(){for(var ci=arguments.length,Si=Gt(ci),Kc=ci;Kc--;)Si[Kc]=arguments[Kc];if(Dn)var Rl=Rd(ir),Jc=El(Si,Rl);if(V&&(Si=Vw(Si,V,Z,Dn)),ht&&(Si=$w(Si,ht,Tt,Dn)),ci-=Jc,Dn&&ci<Se){var es=ti(Si,Rl);return Hw(m,x,Hy,ir.placeholder,T,Si,es,Dt,Ht,Se-ci)}var tp=Ae?T:this,Hd=pn?tp[m]:m;return ci=Si.length,Dt?Si=nS(Si,Dt):rr&&ci>1&&Si.reverse(),Ce&&Ht<ci&&(Si.length=Ht),this&&this!==Ao&&this instanceof ir&&(Hd=Kr||gv(Hd)),Hd.apply(tp,Si)}return ir}function Gw(m,x){return function(T,V){return Np(T,m,x(V),{})}}function Xy(m,x){return function(T,V){var Z;if(T===n&&V===n)return x;if(T!==n&&(Z=T),V!==n){if(Z===n)return V;typeof T=="string"||typeof V=="string"?(T=Al(T),V=Al(V)):(T=Vy(T),V=Vy(V)),Z=m(T,V)}return Z}}function Ld(m){return Wf(function(x){return x=di(x,Ca(qn())),qr(function(T){var V=this;return m(x,function(Z){return io(Z,V,T)})})})}function mv(m,x){x=x===n?" ":Al(x);var T=x.length;if(T<2)return T?hv(x,m):x;var V=hv(x,Hu(m/fs(x)));return Be(x)?jf(Ti(V),0,m).join(""):V.slice(0,m)}function IP(m,x,T,V){var Z=x&B,ht=gv(m);function Tt(){for(var Dt=-1,Ht=arguments.length,Se=-1,Ce=V.length,Ae=Gt(Ce+Ht),pn=this&&this!==Ao&&this instanceof Tt?ht:m;++Se<Ce;)Ae[Se]=V[Se];for(;Ht--;)Ae[Se++]=arguments[++Dt];return io(pn,Z?T:this,Ae)}return Tt}function Ww(m){return function(x,T,V){return V&&typeof V!="number"&&Qs(x,T,V)&&(T=V=n),x=Yf(x),T===n?(T=x,x=0):T=Yf(T),V=V===n?x<T?1:-1:Yf(V),_P(x,T,V,m)}}function Yy(m){return function(x,T){return typeof x=="string"&&typeof T=="string"||(x=nu(x),T=nu(T)),m(x,T)}}function Hw(m,x,T,V,Z,ht,Tt,Dt,Ht,Se){var Ce=x&$,Ae=Ce?Tt:n,pn=Ce?n:Tt,Dn=Ce?ht:n,rr=Ce?n:ht;x|=Ce?et:mt,x&=~(Ce?mt:et),x&k||(x&=~(B|z));var Kr=[m,x,Z,Dn,Ae,rr,pn,Dt,Ht,Se],ir=T.apply(n,Kr);return Nx(m)&&Bx(ir,Kr),ir.placeholder=V,rS(ir,m,x)}function Zy(m){var x=Lr[m];return function(T,V){if(T=nu(T),V=V==null?0:ao(Sr(V),292),V&&Dg(T)){var Z=(qi(T)+"e").split("e"),ht=x(Z[0]+"e"+(+Z[1]+V));return Z=(qi(ht)+"e").split("e"),+(Z[0]+"e"+(+Z[1]-V))}return x(T)}}var Ls=cn&&1/la(new cn([,-0]))[1]==Yt?function(m){return new cn(m)}:fT;function Xw(m){return function(x){var T=Js(x);return T==bi?xr(x):T==qo?vo(x):Lg(x,m(x))}}function Gf(m,x,T,V,Z,ht,Tt,Dt){var Ht=x&z;if(!Ht&&typeof m!="function")throw new Xo(o);var Se=V?V.length:0;if(Se||(x&=~(et|mt),V=Z=n),Tt=Tt===n?Tt:Sn(Sr(Tt),0),Dt=Dt===n?Dt:Sr(Dt),Se-=Z?Z.length:0,x&mt){var Ce=V,Ae=Z;V=Z=n}var pn=Ht?n:Od(m),Dn=[m,x,T,V,Z,Ce,Ae,ht,Tt,Dt];if(pn&&gs(Dn,pn),m=Dn[0],x=Dn[1],T=Dn[2],V=Dn[3],Z=Dn[4],Dt=Dn[9]=Dn[9]===n?Ht?0:m.length:Sn(Dn[9]-Se,0),!Dt&&x&($|K)&&(x&=~($|K)),!x||x==B)var rr=CP(m,x,T);else x==$||x==K?rr=Lx(m,x,Dt):(x==et||x==(B|et))&&!Z.length?rr=IP(m,x,T,V):rr=Hy.apply(n,Dn);var Kr=pn?Bg:Bx;return rS(Kr(rr,Dn),m,x)}function Ox(m,x,T,V){return m===n||vi(m,Bc[T])&&!Dr.call(V,T)?x:m}function Yw(m,x,T,V,Z,ht){return uo(m)&&uo(x)&&(ht.set(x,m),Wc(m,x,n,Yw,ht),ht.delete(x)),m}function Zw(m){return Jh(m)?n:m}function Kw(m,x,T,V,Z,ht){var Tt=T&R,Dt=m.length,Ht=x.length;if(Dt!=Ht&&!(Tt&&Ht>Dt))return!1;var Se=ht.get(m),Ce=ht.get(x);if(Se&&Ce)return Se==x&&Ce==m;var Ae=-1,pn=!0,Dn=T&D?new P:n;for(ht.set(m,x),ht.set(x,m);++Ae<Dt;){var rr=m[Ae],Kr=x[Ae];if(V)var ir=Tt?V(Kr,rr,Ae,x,m,ht):V(rr,Kr,Ae,m,x,ht);if(ir!==n){if(ir)continue;pn=!1;break}if(Dn){if(!_u(x,function(ci,Si){if(!Nc(Dn,Si)&&(rr===ci||Z(rr,ci,T,V,ht)))return Dn.push(Si)})){pn=!1;break}}else if(!(rr===Kr||Z(rr,Kr,T,V,ht))){pn=!1;break}}return ht.delete(m),ht.delete(x),pn}function PP(m,x,T,V,Z,ht,Tt){switch(T){case sr:if(m.byteLength!=x.byteLength||m.byteOffset!=x.byteOffset)return!1;m=m.buffer,x=x.buffer;case Br:return!(m.byteLength!=x.byteLength||!ht(new Vc(m),new Vc(x)));case Fi:case fr:case ni:return vi(+m,+x);case Is:return m.name==x.name&&m.message==x.message;case ri:case Et:return m==x+"";case bi:var Dt=xr;case qo:var Ht=V&R;if(Dt||(Dt=la),m.size!=x.size&&!Ht)return!1;var Se=Tt.get(m);if(Se)return Se==x;V|=D,Tt.set(m,x);var Ce=Kw(Dt(m),Dt(x),V,Z,ht,Tt);return Tt.delete(m),Ce;case pt:if(Rp)return Rp.call(m)==Rp.call(x)}return!1}function TP(m,x,T,V,Z,ht){var Tt=T&R,Dt=Rx(m),Ht=Dt.length,Se=Rx(x),Ce=Se.length;if(Ht!=Ce&&!Tt)return!1;for(var Ae=Ht;Ae--;){var pn=Dt[Ae];if(!(Tt?pn in x:Dr.call(x,pn)))return!1}var Dn=ht.get(m),rr=ht.get(x);if(Dn&&rr)return Dn==x&&rr==m;var Kr=!0;ht.set(m,x),ht.set(x,m);for(var ir=Tt;++Ae<Ht;){pn=Dt[Ae];var ci=m[pn],Si=x[pn];if(V)var Kc=Tt?V(Si,ci,pn,x,m,ht):V(ci,Si,pn,m,x,ht);if(!(Kc===n?ci===Si||Z(ci,Si,T,V,ht):Kc)){Kr=!1;break}ir||(ir=pn=="constructor")}if(Kr&&!ir){var Rl=m.constructor,Jc=x.constructor;Rl!=Jc&&"constructor"in m&&"constructor"in x&&!(typeof Rl=="function"&&Rl instanceof Rl&&typeof Jc=="function"&&Jc instanceof Jc)&&(Kr=!1)}return ht.delete(m),ht.delete(x),Kr}function Wf(m){return yv(tu(m,n,cS),m+"")}function Rx(m){return Ms(m,ts,Jy)}function kx(m){return Ms(m,Va,Jw)}var Od=Pa?function(m){return Pa.get(m)}:fT;function vv(m){for(var x=m.name+"",T=ps[x],V=Dr.call(ps,x)?T.length:0;V--;){var Z=T[V],ht=Z.func;if(ht==null||ht==m)return Z.name}return x}function Rd(m){var x=Dr.call(ut,"placeholder")?ut:m;return x.placeholder}function qn(){var m=ut.iteratee||lT;return m=m===lT?ds:m,arguments.length?m(arguments[0],arguments[1]):m}function gi(m,x){var T=m.__data__;return kP(x)?T[typeof x=="string"?"string":"hash"]:T.map}function Ky(m){for(var x=ts(m),T=x.length;T--;){var V=x[T],Z=m[V];x[T]=[V,Z,Gg(Z)]}return x}function Eu(m,x){var T=ce(m,x);return qc(T)?T:n}function qg(m){var x=Dr.call(m,za),T=m[za];try{m[za]=n;var V=!0}catch{}var Z=xu.call(m);return V&&(x?m[za]=T:delete m[za]),Z}var Jy=Bh?function(m){return m==null?[]:(m=un(m),bl(Bh(m),function(x){return Fe.call(m,x)}))}:hT,Jw=Bh?function(m){for(var x=[];m;)Ho(x,Jy(m)),m=Xa(m);return x}:hT,Js=Mi;(wu&&Js(new wu(new ArrayBuffer(1)))!=sr||ca&&Js(new ca)!=bi||Uh&&Js(Uh.resolve())!=ba||cn&&Js(new cn)!=qo||rn&&Js(new rn)!=We)&&(Js=function(m){var x=Mi(m),T=x==xa?m.constructor:n,V=T?Up(T):"";if(V)switch(V){case Ua:return sr;case rc:return bi;case sv:return ba;case Ng:return qo;case ai:return We}return x});function MP(m,x,T){for(var V=-1,Z=T.length;++V<Z;){var ht=T[V],Tt=ht.size;switch(ht.type){case"drop":m+=Tt;break;case"dropRight":x-=Tt;break;case"take":x=ao(x,m+Tt);break;case"takeRight":m=Sn(m,x-Tt);break}}return{start:m,end:x}}function AP(m){var x=m.match(pe);return x?x[1].split(ye):[]}function Qw(m,x,T){x=Gh(x,m);for(var V=-1,Z=x.length,ht=!1;++V<Z;){var Tt=Yc(x[V]);if(!(ht=m!=null&&T(m,Tt)))break;m=m[Tt]}return ht||++V!=Z?ht:(Z=m==null?0:m.length,!!Z&&pc(Z)&&el(Tt,Z)&&(zn(m)||eu(m)))}function LP(m){var x=m.length,T=new m.constructor(x);return x&&typeof m[0]=="string"&&Dr.call(m,"index")&&(T.index=m.index,T.input=m.input),T}function tS(m){return typeof m.constructor=="function"&&!Wh(m)?Zs(Xa(m)):{}}function OP(m,x,T){var V=m.constructor;switch(x){case Br:return Ad(m);case Fi:case fr:return new V(+m);case sr:return SP(m,T);case Ai:case Un:case no:case To:case zi:case ii:case Go:case yr:case Rn:return qy(m,T);case bi:return new V;case ni:case Et:return new V(m);case ri:return Tx(m);case qo:return new V;case pt:return EP(m)}}function RP(m,x){var T=x.length;if(!T)return m;var V=T-1;return x[V]=(T>1?"& ":"")+x[V],x=x.join(T>2?", ":" "),m.replace(Vt,`{ /* [wrapped with `+x+`] */ `)}function Qy(m){return zn(m)||eu(m)||!!(Sd&&m&&m[Sd])}function el(m,x){var T=typeof m;return x=x==null?te:x,!!x&&(T=="number"||T!="symbol"&&$e.test(m))&&m>-1&&m%1==0&&m<x}function Qs(m,x,T){if(!uo(T))return!1;var V=typeof x;return(V=="number"?Zr(T)&&el(x,T.length):V=="string"&&x in T)?vi(T[x],m):!1}function Dx(m,x){if(zn(m))return!1;var T=typeof m;return T=="number"||T=="symbol"||T=="boolean"||m==null||ys(m)?!0:lt.test(m)||!nt.test(m)||x!=null&&m in un(x)}function kP(m){var x=typeof m;return x=="string"||x=="number"||x=="symbol"||x=="boolean"?m!=="__proto__":m===null}function Nx(m){var x=vv(m),T=ut[x];if(typeof T!="function"||!(x in ur.prototype))return!1;if(m===T)return!0;var V=Od(T);return!!V&&m===V[0]}function eS(m){return!!oo&&oo in m}var t_=Uc?hc:pT;function Wh(m){var x=m&&m.constructor,T=typeof x=="function"&&x.prototype||Bc;return m===T}function Gg(m){return m===m&&!uo(m)}function Cu(m,x){return function(T){return T==null?!1:T[m]===x&&(x!==n||m in un(T))}}function Wg(m){var x=Zi(m,function(V){return T.size===g&&T.clear(),V}),T=x.cache;return x}function gs(m,x){var T=m[1],V=x[1],Z=T|V,ht=Z<(B|z|wt),Tt=V==wt&&T==$||V==wt&&T==Ot&&m[7].length<=x[8]||V==(wt|Ot)&&x[7].length<=x[8]&&T==$;if(!(ht||Tt))return m;V&B&&(m[2]=x[2],Z|=T&B?0:k);var Dt=x[3];if(Dt){var Ht=m[3];m[3]=Ht?Vw(Ht,Dt,x[4]):Dt,m[4]=Ht?ti(m[3],_):x[4]}return Dt=x[5],Dt&&(Ht=m[5],m[5]=Ht?$w(Ht,Dt,x[6]):Dt,m[6]=Ht?ti(m[5],_):x[6]),Dt=x[7],Dt&&(m[7]=Dt),V&wt&&(m[8]=m[8]==null?x[8]:ao(m[8],x[8])),m[9]==null&&(m[9]=x[9]),m[0]=x[0],m[1]=Z,m}function e_(m){var x=[];if(m!=null)for(var T in un(m))x.push(T);return x}function n_(m){return xu.call(m)}function tu(m,x,T){return x=Sn(x===n?m.length-1:x,0),function(){for(var V=arguments,Z=-1,ht=Sn(V.length-x,0),Tt=Gt(ht);++Z<ht;)Tt[Z]=V[x+Z];Z=-1;for(var Dt=Gt(x+1);++Z<x;)Dt[Z]=V[Z];return Dt[x]=T(Tt),io(m,this,Dt)}}function Fx(m,x){return x.length<2?m:Ri(m,uc(x,0,-1))}function nS(m,x){for(var T=m.length,V=ao(x.length,T),Z=tl(m);V--;){var ht=x[V];m[V]=el(ht,T)?Z[ht]:n}return m}function zx(m,x){if(!(x==="constructor"&&typeof m[x]=="function")&&x!="__proto__")return m[x]}var Bx=Ux(Bg),kd=Ys||function(m,x){return Ao.setTimeout(m,x)},yv=Ux(xP);function rS(m,x,T){var V=x+"";return yv(m,RP(V,DP(AP(V),T)))}function Ux(m){var x=0,T=0;return function(){var V=Xu(),Z=He-(V-T);if(T=V,Z>0){if(++x>=Ne)return arguments[0]}else x=0;return m.apply(n,arguments)}}function Hh(m,x){var T=-1,V=m.length,Z=V-1;for(x=x===n?V:x;++T<x;){var ht=Ex(T,Z),Tt=m[ht];m[ht]=m[T],m[T]=Tt}return m.length=x,m}var r_=Wg(function(m){var x=[];return m.charCodeAt(0)===46&&x.push(""),m.replace(vt,function(T,V,Z,ht){x.push(Z?ht.replace(tn,"$1"):V||T)}),x});function Yc(m){if(typeof m=="string"||ys(m))return m;var x=m+"";return x=="0"&&1/m==-Yt?"-0":x}function Up(m){if(m!=null){try{return Gu.call(m)}catch{}try{return m+""}catch{}}return""}function DP(m,x){return ua(ar,function(T){var V="_."+T[0];x&T[1]&&!Rf(m,V)&&m.push(V)}),m.sort()}function Vx(m){if(m instanceof ur)return m.clone();var x=new Ka(m.__wrapped__,m.__chain__);return x.__actions__=tl(m.__actions__),x.__index__=m.__index__,x.__values__=m.__values__,x}function iS(m,x,T){(T?Qs(m,x,T):x===n)?x=1:x=Sn(Sr(x),0);var V=m==null?0:m.length;if(!V||x<1)return[];for(var Z=0,ht=0,Tt=Gt(Hu(V/x));Z<V;)Tt[ht++]=uc(m,Z,Z+=x);return Tt}function oS(m){for(var x=-1,T=m==null?0:m.length,V=0,Z=[];++x<T;){var ht=m[x];ht&&(Z[V++]=ht)}return Z}function aS(){var m=arguments.length;if(!m)return[];for(var x=Gt(m-1),T=arguments[0],V=m;V--;)x[V-1]=arguments[V];return Ho(zn(T)?tl(T):[T],ln(x,1))}var NP=qr(function(m,x){return ji(m)?Qe(m,ln(x,1,ji,!0)):[]}),FP=qr(function(m,x){var T=cc(x);return ji(T)&&(T=n),ji(m)?Qe(m,ln(x,1,ji,!0),qn(T,2)):[]}),sS=qr(function(m,x){var T=cc(x);return ji(T)&&(T=n),ji(m)?Qe(m,ln(x,1,ji,!0),n,T):[]});function uS(m,x,T){var V=m==null?0:m.length;return V?(x=T||x===n?1:Sr(x),uc(m,x<0?0:x,V)):[]}function i_(m,x,T){var V=m==null?0:m.length;return V?(x=T||x===n?1:Sr(x),x=V-x,uc(m,0,x<0?0:x)):[]}function lS(m,x){return m&&m.length?Td(m,qn(x,3),!0,!0):[]}function o_(m,x){return m&&m.length?Td(m,qn(x,3),!0):[]}function a_(m,x,T,V){var Z=m==null?0:m.length;return Z?(T&&typeof T!="number"&&Qs(m,x,T)&&(T=0,V=Z),Hn(m,x,T,V)):[]}function _v(m,x,T){var V=m==null?0:m.length;if(!V)return-1;var Z=T==null?0:Sr(T);return Z<0&&(Z=Sn(V+Z,0)),kf(m,qn(x,3),Z)}function Dd(m,x,T){var V=m==null?0:m.length;if(!V)return-1;var Z=V-1;return T!==n&&(Z=Sr(T),Z=T<0?Sn(V+Z,0):ao(Z,V-1)),kf(m,qn(x,3),Z,!0)}function cS(m){var x=m==null?0:m.length;return x?ln(m,1):[]}function zP(m){var x=m==null?0:m.length;return x?ln(m,Yt):[]}function BP(m,x){var T=m==null?0:m.length;return T?(x=x===n?1:Sr(x),ln(m,x)):[]}function Hg(m){for(var x=-1,T=m==null?0:m.length,V={};++x<T;){var Z=m[x];V[Z[0]]=Z[1]}return V}function s_(m){return m&&m.length?m[0]:n}function fS(m,x,T){var V=m==null?0:m.length;if(!V)return-1;var Z=T==null?0:Sr(T);return Z<0&&(Z=Sn(V+Z,0)),kc(m,x,Z)}function $x(m){var x=m==null?0:m.length;return x?uc(m,0,-1):[]}var hS=qr(function(m){var x=di(m,Md);return x.length&&x[0]===m[0]?$h(x):[]}),pS=qr(function(m){var x=cc(m),T=di(m,Md);return x===cc(T)?x=n:T.pop(),T.length&&T[0]===m[0]?$h(T,qn(x,2)):[]}),UP=qr(function(m){var x=cc(m),T=di(m,Md);return x=typeof x=="function"?x:n,x&&T.pop(),T.length&&T[0]===m[0]?$h(T,n,x):[]});function VP(m,x){return m==null?"":Pl.call(m,x)}function cc(m){var x=m==null?0:m.length;return x?m[x-1]:n}function u_(m,x,T){var V=m==null?0:m.length;if(!V)return-1;var Z=V;return T!==n&&(Z=Sr(T),Z=Z<0?Sn(V+Z,0):ao(Z,V-1)),x===x?Ts(m,x,Z):kf(m,Sl,Z,!0)}function jx(m,x){return m&&m.length?zy(m,Sr(x)):n}var $P=qr(Nd);function Nd(m,x){return m&&m.length&&x&&x.length?Sx(m,x):m}function xv(m,x,T){return m&&m.length&&x&&x.length?Sx(m,x,qn(T,2)):m}function mi(m,x,T){return m&&m.length&&x&&x.length?Sx(m,x,n,T):m}var jP=Wf(function(m,x){var T=m==null?0:m.length,V=Te(m,x);return Fw(m,di(x,function(Z){return el(Z,T)?+Z:Z}).sort(Gy)),V});function qx(m,x){var T=[];if(!(m&&m.length))return T;var V=-1,Z=[],ht=m.length;for(x=qn(x,3);++V<ht;){var Tt=m[V];x(Tt,V,m)&&(T.push(Tt),Z.push(V))}return Fw(m,Z),T}function Vp(m){return m==null?m:Ff.call(m)}function qP(m,x,T){var V=m==null?0:m.length;return V?(T&&typeof T!="number"&&Qs(m,x,T)?(x=0,T=V):(x=x==null?0:Sr(x),T=T===n?V:Sr(T)),uc(m,x,T)):[]}function GP(m,x){return Uy(m,x)}function WP(m,x,T){return Cx(m,x,qn(T,2))}function HP(m,x){var T=m==null?0:m.length;if(T){var V=Uy(m,x);if(V<T&&vi(m[V],x))return V}return-1}function XP(m,x){return Uy(m,x,!0)}function YP(m,x,T){return Cx(m,x,qn(T,2),!0)}function ZP(m,x){var T=m==null?0:m.length;if(T){var V=Uy(m,x,!0)-1;if(vi(m[V],x))return V}return-1}function dS(m){return m&&m.length?Bw(m):[]}function gS(m,x){return m&&m.length?Bw(m,qn(x,2)):[]}function mS(m){var x=m==null?0:m.length;return x?uc(m,1,x):[]}function vS(m,x,T){return m&&m.length?(x=T||x===n?1:Sr(x),uc(m,0,x<0?0:x)):[]}function l_(m,x,T){var V=m==null?0:m.length;return V?(x=T||x===n?1:Sr(x),x=V-x,uc(m,x<0?0:x,V)):[]}function Fd(m,x){return m&&m.length?Td(m,qn(x,3),!1,!0):[]}function Gx(m,x){return m&&m.length?Td(m,qn(x,3)):[]}var Xg=qr(function(m){return Ll(ln(m,1,ji,!0))}),yS=qr(function(m){var x=cc(m);return ji(x)&&(x=n),Ll(ln(m,1,ji,!0),qn(x,2))}),Zo=qr(function(m){var x=cc(m);return x=typeof x=="function"?x:n,Ll(ln(m,1,ji,!0),n,x)});function Xi(m){return m&&m.length?Ll(m):[]}function _S(m,x){return m&&m.length?Ll(m,qn(x,2)):[]}function xS(m,x){return x=typeof x=="function"?x:n,m&&m.length?Ll(m,n,x):[]}function c_(m){if(!(m&&m.length))return[];var x=0;return m=bl(m,function(T){if(ji(T))return x=Sn(T.length,x),!0}),Gs(x,function(T){return di(m,js(T))})}function Wx(m,x){if(!(m&&m.length))return[];var T=c_(m);return x==null?T:di(T,function(V){return io(x,n,V)})}var bS=qr(function(m,x){return ji(m)?Qe(m,x):[]}),Hx=qr(function(m){return Ug(bl(m,ji))}),zd=qr(function(m){var x=cc(m);return ji(x)&&(x=n),Ug(bl(m,ji),qn(x,2))}),Bd=qr(function(m){var x=cc(m);return x=typeof x=="function"?x:n,Ug(bl(m,ji),n,x)}),wS=qr(c_);function Ko(m,x){return pv(m||[],x||[],jt)}function bv(m,x){return pv(m||[],x||[],sc)}var Xh=qr(function(m){var x=m.length,T=x>1?m[x-1]:n;return T=typeof T=="function"?(m.pop(),T):n,Wx(m,T)});function wv(m){var x=ut(m);return x.__chain__=!0,x}function f_(m,x){return x(m),m}function Yg(m,x){return x(m)}var Zg=Wf(function(m){var x=m.length,T=x?m[0]:0,V=this.__wrapped__,Z=function(ht){return Te(ht,m)};return x>1||this.__actions__.length||!(V instanceof ur)||!el(T)?this.thru(Z):(V=V.slice(T,+T+(x?1:0)),V.__actions__.push({func:Yg,args:[Z],thisArg:n}),new Ka(V,this.__chain__).thru(function(ht){return x&&!ht.length&&ht.push(n),ht}))});function Yh(){return wv(this)}function SS(){return new Ka(this.value(),this.__chain__)}function ES(){this.__values__===n&&(this.__values__=v_(this.value()));var m=this.__index__>=this.__values__.length,x=m?n:this.__values__[this.__index__++];return{done:m,value:x}}function KP(){return this}function Ta(m){for(var x,T=this;T instanceof Za;){var V=Vx(T);V.__index__=0,V.__values__=n,x?Z.__wrapped__=V:x=V;var Z=V;T=T.__wrapped__}return Z.__wrapped__=m,x}function $p(){var m=this.__wrapped__;if(m instanceof ur){var x=m;return this.__actions__.length&&(x=new ur(this)),x=x.reverse(),x.__actions__.push({func:Yg,args:[Vp],thisArg:n}),new Ka(x,this.__chain__)}return this.thru(Vp)}function CS(){return Px(this.__wrapped__,this.__actions__)}var s=Wy(function(m,x,T){Dr.call(m,T)?++m[T]:we(m,T,1)});function l(m,x,T){var V=zn(m)?xl:On;return T&&Qs(m,x,T)&&(x=n),V(m,qn(x,3))}function f(m,x){var T=zn(m)?bl:An;return T(m,qn(x,3))}var v=jg(_v),b=jg(Dd);function w(m,x){return ln(dt(m,x),1)}function I(m,x){return ln(dt(m,x),Yt)}function A(m,x,T){return T=T===n?1:Sr(T),ln(dt(m,x),T)}function F(m,x){var T=zn(m)?ua:bn;return T(m,qn(x,3))}function j(m,x){var T=zn(m)?Rc:Wn;return T(m,qn(x,3))}var G=Wy(function(m,x,T){Dr.call(m,T)?m[T].push(x):we(m,T,[x])});function H(m,x,T,V){m=Zr(m)?m:Wd(m),T=T&&!V?Sr(T):0;var Z=m.length;return T<0&&(T=Sn(Z+T,0)),jd(m)?T<=Z&&m.indexOf(x,T)>-1:!!Z&&kc(m,x,T)>-1}var J=qr(function(m,x,T){var V=-1,Z=typeof x=="function",ht=Zr(m)?Gt(m.length):[];return bn(m,function(Tt){ht[++V]=Z?io(x,Tt,T):Qu(Tt,x,T)}),ht}),rt=Wy(function(m,x,T){we(m,T,x)});function dt(m,x){var T=zn(m)?di:Fy;return T(m,qn(x,3))}function _t(m,x,T,V){return m==null?[]:(zn(x)||(x=x==null?[]:[x]),T=V?n:T,zn(T)||(T=T==null?[]:[T]),Bp(m,x,T))}var Pt=Wy(function(m,x,T){m[T?0:1].push(x)},function(){return[[],[]]});function St(m,x,T){var V=zn(m)?ju:wd,Z=arguments.length<3;return V(m,qn(x,4),T,Z,bn)}function Nt(m,x,T){var V=zn(m)?Oh:wd,Z=arguments.length<3;return V(m,qn(x,4),T,Z,Wn)}function qt(m,x){var T=zn(m)?bl:An;return T(m,Vi(qn(x,3)))}function Zt(m){var x=zn(m)?Ct:By;return x(m)}function ee(m,x,T){(T?Qs(m,x,T):x===n)?x=1:x=Sr(x);var V=zn(m)?gt:zw;return V(m,x)}function fe(m){var x=zn(m)?It:bP;return x(m)}function Ee(m){if(m==null)return 0;if(Zr(m))return jd(m)?fs(m):m.length;var x=Js(m);return x==bi||x==qo?m.size:Gc(m).length}function Oe(m,x,T){var V=zn(m)?_u:wP;return T&&Qs(m,x,T)&&(x=n),V(m,qn(x,3))}var hn=qr(function(m,x){if(m==null)return[];var T=x.length;return T>1&&Qs(m,x[0],x[1])?x=[]:T>2&&Qs(x[0],x[1],x[2])&&(x=[x[0]]),Bp(m,ln(x,1),[])}),qe=kg||function(){return Ao.Date.now()};function mn(m,x){if(typeof x!="function")throw new Xo(o);return m=Sr(m),function(){if(--m<1)return x.apply(this,arguments)}}function Ze(m,x,T){return x=T?n:x,x=m&&x==null?m.length:x,Gf(m,wt,n,n,n,n,x)}function Zn(m,x){var T;if(typeof x!="function")throw new Xo(o);return m=Sr(m),function(){return--m>0&&(T=x.apply(this,arguments)),m<=1&&(x=n),T}}var En=qr(function(m,x,T){var V=B;if(T.length){var Z=ti(T,Rd(En));V|=et}return Gf(m,V,x,T,Z)}),sn=qr(function(m,x,T){var V=B|z;if(T.length){var Z=ti(T,Rd(sn));V|=et}return Gf(x,V,m,T,Z)});function nr(m,x,T){x=T?n:x;var V=Gf(m,$,n,n,n,n,n,x);return V.placeholder=nr.placeholder,V}function Gn(m,x,T){x=T?n:x;var V=Gf(m,K,n,n,n,n,n,x);return V.placeholder=Gn.placeholder,V}function wr(m,x,T){var V,Z,ht,Tt,Dt,Ht,Se=0,Ce=!1,Ae=!1,pn=!0;if(typeof m!="function")throw new Xo(o);x=nu(x)||0,uo(T)&&(Ce=!!T.leading,Ae="maxWait"in T,ht=Ae?Sn(nu(T.maxWait)||0,x):ht,pn="trailing"in T?!!T.trailing:pn);function Dn(es){var tp=V,Hd=Z;return V=Z=n,Se=es,Tt=m.apply(Hd,tp),Tt}function rr(es){return Se=es,Dt=kd(ci,x),Ce?Dn(es):Tt}function Kr(es){var tp=es-Ht,Hd=es-Se,Yk=x-tp;return Ae?ao(Yk,ht-Hd):Yk}function ir(es){var tp=es-Ht,Hd=es-Se;return Ht===n||tp>=x||tp<0||Ae&&Hd>=ht}function ci(){var es=qe();if(ir(es))return Si(es);Dt=kd(ci,Kr(es))}function Si(es){return Dt=n,pn&&V?Dn(es):(V=Z=n,Tt)}function Kc(){Dt!==n&&jy(Dt),Se=0,V=Ht=Z=Dt=n}function Rl(){return Dt===n?Tt:Si(qe())}function Jc(){var es=qe(),tp=ir(es);if(V=arguments,Z=this,Ht=es,tp){if(Dt===n)return rr(Ht);if(Ae)return jy(Dt),Dt=kd(ci,x),Dn(Ht)}return Dt===n&&(Dt=kd(ci,x)),Tt}return Jc.cancel=Kc,Jc.flush=Rl,Jc}var yn=qr(function(m,x){return Ir(m,1,x)}),Gr=qr(function(m,x,T){return Ir(m,nu(x)||0,T)});function Yi(m){return Gf(m,Bt)}function Zi(m,x){if(typeof m!="function"||x!=null&&typeof x!="function")throw new Xo(o);var T=function(){var V=arguments,Z=x?x.apply(this,V):V[0],ht=T.cache;if(ht.has(Z))return ht.get(Z);var Tt=m.apply(this,V);return T.cache=ht.set(Z,Tt)||ht,Tt};return T.cache=new(Zi.Cache||Ku),T}Zi.Cache=Ku;function Vi(m){if(typeof m!="function")throw new Xo(o);return function(){var x=arguments;switch(x.length){case 0:return!m.call(this);case 1:return!m.call(this,x[0]);case 2:return!m.call(this,x[0],x[1]);case 3:return!m.call(this,x[0],x[1],x[2])}return!m.apply(this,x)}}function Ki(m){return Zn(2,m)}var yo=dv(function(m,x){x=x.length==1&&zn(x[0])?di(x[0],Ca(qn())):di(ln(x,1),Ca(qn()));var T=x.length;return qr(function(V){for(var Z=-1,ht=ao(V.length,T);++Z<ht;)V[Z]=x[Z].call(this,V[Z]);return io(m,this,V)})}),Do=qr(function(m,x){var T=ti(x,Rd(Do));return Gf(m,et,n,x,T)}),Jo=qr(function(m,x){var T=ti(x,Rd(Jo));return Gf(m,mt,n,x,T)}),ms=Wf(function(m,x){return Gf(m,Ot,n,n,n,x)});function Ma(m,x){if(typeof m!="function")throw new Xo(o);return x=x===n?x:Sr(x),qr(m,x)}function vs(m,x){if(typeof m!="function")throw new Xo(o);return x=x==null?0:Sn(Sr(x),0),qr(function(T){var V=T[x],Z=jf(T,0,x);return V&&Ho(Z,V),io(m,this,Z)})}function Co(m,x,T){var V=!0,Z=!0;if(typeof m!="function")throw new Xo(o);return uo(T)&&(V="leading"in T?!!T.leading:V,Z="trailing"in T?!!T.trailing:Z),wr(m,x,{leading:V,maxWait:x,trailing:Z})}function Aa(m){return Ze(m,1)}function mr(m,x){return Do($y(x),m)}function wi(){if(!arguments.length)return[];var m=arguments[0];return zn(m)?m:[m]}function li(m){return an(m,O)}function Or(m,x){return x=typeof x=="function"?x:n,an(m,O,x)}function Os(m){return an(m,E|O)}function Ja(m,x){return x=typeof x=="function"?x:n,an(m,E|O,x)}function $i(m,x){return x==null||vn(m,x,ts(x))}function vi(m,x){return m===x||m!==m&&x!==x}var Qa=Yy(ic),Wr=Yy(function(m,x){return m>=x}),eu=jh(function(){return arguments}())?jh:function(m){return lo(m)&&Dr.call(m,"callee")&&!Fe.call(m,"callee")},zn=Gt.isArray,Hf=xd?Ca(xd):Pd;function Zr(m){return m!=null&&pc(m.length)&&!hc(m)}function ji(m){return lo(m)&&Zr(m)}function fc(m){return m===!0||m===!1||lo(m)&&Mi(m)==Fi}var Ol=av||pT,Ud=So?Ca(So):oc;function Kg(m){return lo(m)&&m.nodeType===1&&!Jh(m)}function Zh(m){if(m==null)return!0;if(Zr(m)&&(zn(m)||typeof m=="string"||typeof m.splice=="function"||Ol(m)||Xf(m)||eu(m)))return!m.length;var x=Js(m);if(x==bi||x==qo)return!m.size;if(Wh(m))return!Gc(m).length;for(var T in m)if(Dr.call(m,T))return!1;return!0}function Jg(m,x){return jc(m,x)}function h_(m,x,T){T=typeof T=="function"?T:n;var V=T?T(m,x):n;return V===n?jc(m,x,n,T):!!V}function jp(m){if(!lo(m))return!1;var x=Mi(m);return x==Is||x==_a||typeof m.message=="string"&&typeof m.name=="string"&&!Jh(m)}function Sv(m){return typeof m=="number"&&Dg(m)}function hc(m){if(!uo(m))return!1;var x=Mi(m);return x==Gi||x==jn||x==cr||x==ss}function Ev(m){return typeof m=="number"&&m==Sr(m)}function pc(m){return typeof m=="number"&&m>-1&&m%1==0&&m<=te}function uo(m){var x=typeof m;return m!=null&&(x=="object"||x=="function")}function lo(m){return m!=null&&typeof m=="object"}var Kh=Ql?Ca(Ql):fa;function Qg(m,x){return m===x||Ml(m,x,Ky(x))}function p_(m,x,T){return T=typeof T=="function"?T:n,Ml(m,x,Ky(x),T)}function d_(m){return tm(m)&&m!=+m}function Cv(m){if(t_(m))throw new kn(a);return qc(m)}function Iv(m){return m===null}function g_(m){return m==null}function tm(m){return typeof m=="number"||lo(m)&&Mi(m)==ni}function Jh(m){if(!lo(m)||Mi(m)!=xa)return!1;var x=Xa(m);if(x===null)return!0;var T=Dr.call(x,"constructor")&&x.constructor;return typeof T=="function"&&T instanceof T&&Gu.call(T)==Fh}var Vd=vu?Ca(vu):qh;function m_(m){return Ev(m)&&m>=-te&&m<=te}var $d=yu?Ca(yu):Yr;function jd(m){return typeof m=="string"||!zn(m)&&lo(m)&&Mi(m)==Et}function ys(m){return typeof m=="symbol"||lo(m)&&Mi(m)==pt}var Xf=$u?Ca($u):Su;function qd(m){return m===n}function Pv(m){return lo(m)&&Js(m)==We}function em(m){return lo(m)&&Mi(m)==Xn}var Xx=Yy(Fp),IS=Yy(function(m,x){return m<=x});function v_(m){if(!m)return[];if(Zr(m))return jd(m)?Ti(m):tl(m);if(zh&&m[zh])return Bi(m[zh]());var x=Js(m),T=x==bi?xr:x==qo?la:Wd;return T(m)}function Yf(m){if(!m)return m===0?m:0;if(m=nu(m),m===Yt||m===-Yt){var x=m<0?-1:1;return x*ve}return m===m?m:0}function Sr(m){var x=Yf(m),T=x%1;return x===x?T?x-T:x:0}function PS(m){return m?je(Sr(m),0,be):0}function nu(m){if(typeof m=="number")return m;if(ys(m))return Wt;if(uo(m)){var x=typeof m.valueOf=="function"?m.valueOf():m;m=uo(x)?x+"":x}if(typeof m!="string")return m===0?m:+m;m=Dc(m);var T=Me.test(m);return T||Mn.test(m)?_d(m.slice(2),T?2:8):ze.test(m)?Wt:+m}function _o(m){return qf(m,Va(m))}function Zc(m){return m?je(Sr(m),-te,te):m===0?m:0}function qi(m){return m==null?"":Al(m)}var qp=$g(function(m,x){if(Wh(x)||Zr(x)){qf(x,ts(x),m);return}for(var T in x)Dr.call(x,T)&&jt(m,T,x[T])}),y_=$g(function(m,x){qf(x,Va(x),m)}),Tv=$g(function(m,x,T,V){qf(x,Va(x),m,V)}),__=$g(function(m,x,T,V){qf(x,ts(x),m,V)}),Zf=Wf(Te);function x_(m,x){var T=Zs(m);return x==null?T:ae(T,x)}var Mv=qr(function(m,x){m=un(m);var T=-1,V=x.length,Z=V>2?x[2]:n;for(Z&&Qs(x[0],x[1],Z)&&(V=1);++T<V;)for(var ht=x[T],Tt=Va(ht),Dt=-1,Ht=Tt.length;++Dt<Ht;){var Se=Tt[Dt],Ce=m[Se];(Ce===n||vi(Ce,Bc[Se])&&!Dr.call(m,Se))&&(m[Se]=ht[Se])}return m}),b_=qr(function(m){return m.push(n,Yw),io(Gd,n,m)});function w_(m,x){return wl(m,qn(x,3),eo)}function Yx(m,x){return wl(m,qn(x,3),Yo)}function TS(m,x){return m==null?m:Ro(m,qn(x,3),Va)}function Av(m,x){return m==null?m:so(m,qn(x,3),Va)}function MS(m,x){return m&&eo(m,qn(x,3))}function AS(m,x){return m&&Yo(m,qn(x,3))}function LS(m){return m==null?[]:Ui(m,ts(m))}function OS(m){return m==null?[]:Ui(m,Va(m))}function S_(m,x,T){var V=m==null?n:Ri(m,x);return V===n?T:V}function nl(m,x){return m!=null&&Qw(m,x,As)}function nm(m,x){return m!=null&&Qw(m,x,Tl)}var RS=Gw(function(m,x,T){x!=null&&typeof x.toString!="function"&&(x=xu.call(x)),m[x]=T},uT(dc)),Kf=Gw(function(m,x,T){x!=null&&typeof x.toString!="function"&&(x=xu.call(x)),Dr.call(m,x)?m[x].push(T):m[x]=[T]},qn),JP=qr(Qu);function ts(m){return Zr(m)?yt(m):Gc(m)}function Va(m){return Zr(m)?yt(m,!0):wx(m)}function rm(m,x){var T={};return x=qn(x,3),eo(m,function(V,Z,ht){we(T,x(V,Z,ht),V)}),T}function im(m,x){var T={};return x=qn(x,3),eo(m,function(V,Z,ht){we(T,Z,x(V,Z,ht))}),T}var om=$g(function(m,x,T){Wc(m,x,T)}),Gd=$g(function(m,x,T,V){Wc(m,x,T,V)}),kS=Wf(function(m,x){var T={};if(m==null)return T;var V=!1;x=di(x,function(ht){return ht=Gh(ht,m),V||(V=ht.length>1),ht}),qf(m,kx(m),T),V&&(T=an(T,E|C|O,Zw));for(var Z=x.length;Z--;)Ix(T,x[Z]);return T});function DS(m,x){return Zx(m,Vi(qn(x)))}var NS=Wf(function(m,x){return m==null?{}:Ks(m,x)});function Zx(m,x){if(m==null)return{};var T=di(kx(m),function(V){return[V]});return x=qn(x),Dw(m,T,function(V,Z){return x(V,Z[0])})}function Kx(m,x,T){x=Gh(x,m);var V=-1,Z=x.length;for(Z||(Z=1,m=n);++V<Z;){var ht=m==null?n:m[Yc(x[V])];ht===n&&(V=Z,ht=T),m=hc(ht)?ht.call(m):ht}return m}function Jx(m,x,T){return m==null?m:sc(m,x,T)}function Qh(m,x,T,V){return V=typeof V=="function"?V:n,m==null?m:sc(m,x,T,V)}var Qx=Xw(ts),E_=Xw(Va);function t1(m,x,T){var V=zn(m),Z=V||Ol(m)||Xf(m);if(x=qn(x,4),T==null){var ht=m&&m.constructor;Z?T=V?new ht:[]:uo(m)?T=hc(ht)?Zs(Xa(m)):{}:T={}}return(Z?ua:eo)(m,function(Tt,Dt,Ht){return x(T,Tt,Dt,Ht)}),T}function FS(m,x){return m==null?!0:Ix(m,x)}function e1(m,x,T){return m==null?m:ko(m,x,$y(T))}function zS(m,x,T,V){return V=typeof V=="function"?V:n,m==null?m:ko(m,x,$y(T),V)}function Wd(m){return m==null?[]:Rh(m,ts(m))}function n1(m){return m==null?[]:Rh(m,Va(m))}function BS(m,x,T){return T===n&&(T=x,x=n),T!==n&&(T=nu(T),T=T===T?T:0),x!==n&&(x=nu(x),x=x===x?x:0),je(nu(m),x,T)}function Lv(m,x,T){return x=Yf(x),T===n?(T=x,x=0):T=Yf(T),m=nu(m),Ju(m,x,T)}function US(m,x,T){if(T&&typeof T!="boolean"&&Qs(m,x,T)&&(x=T=n),T===n&&(typeof x=="boolean"?(T=x,x=n):typeof m=="boolean"&&(T=m,m=n)),m===n&&x===n?(m=0,x=1):(m=Yf(m),x===n?(x=m,m=0):x=Yf(x)),m>x){var V=m;m=x,x=V}if(T||m%1||x%1){var Z=Nf();return ao(m+Z*(x-m+Mg("1e-"+((Z+"").length-1))),x)}return Ex(m,x)}var C_=Xc(function(m,x,T){return x=x.toLowerCase(),m+(T?VS(x):x)});function VS(m){return sT(qi(m).toLowerCase())}function r1(m){return m=qi(m),m&&m.replace(Qn,kh).replace(_r,"")}function QP(m,x,T){m=qi(m),x=Al(x);var V=m.length;T=T===n?V:je(Sr(T),0,V);var Z=T;return T-=x.length,T>=0&&m.slice(T,Z)==x}function tT(m){return m=qi(m),m&&Yl.test(m)?m.replace(qa,Dh):m}function eT(m){return m=qi(m),m&&Rt.test(m)?m.replace(Mt,"\\$&"):m}var nT=Xc(function(m,x,T){return m+(T?"-":"")+x.toLowerCase()}),rT=Xc(function(m,x,T){return m+(T?" ":"")+x.toLowerCase()}),iT=qw("toLowerCase");function oT(m,x,T){m=qi(m),x=Sr(x);var V=x?fs(m):0;if(!x||V>=x)return m;var Z=(x-V)/2;return mv(Ed(Z),T)+m+mv(Hu(Z),T)}function aT(m,x,T){m=qi(m),x=Sr(x);var V=x?fs(m):0;return x&&V<x?m+mv(x-V,T):m}function Jf(m,x,T){m=qi(m),x=Sr(x);var V=x?fs(m):0;return x&&V<x?mv(x-V,T)+m:m}function I_(m,x,T){return T||x==null?x=0:x&&(x=+x),Ba(qi(m).replace(at,""),x||0)}function $S(m,x,T){return(T?Qs(m,x,T):x===n)?x=1:x=Sr(x),hv(qi(m),x)}function Ov(){var m=arguments,x=qi(m[0]);return m.length<3?x:x.replace(m[1],m[2])}var jS=Xc(function(m,x,T){return m+(T?"_":"")+x.toLowerCase()});function Yj(m,x,T){return T&&typeof T!="number"&&Qs(m,x,T)&&(x=T=n),T=T===n?be:T>>>0,T?(m=qi(m),m&&(typeof x=="string"||x!=null&&!Vd(x))&&(x=Al(x),!x&&Be(m))?jf(Ti(m),0,T):m.split(x,T)):[]}var Zj=Xc(function(m,x,T){return m+(T?" ":"")+sT(x)});function Kj(m,x,T){return m=qi(m),T=T==null?0:je(Sr(T),0,m.length),x=Al(x),m.slice(T,T+x.length)==x}function Jj(m,x,T){var V=ut.templateSettings;T&&Qs(m,x,T)&&(x=n),m=qi(m),x=Tv({},x,V,Ox);var Z=Tv({},x.imports,V.imports,Ox),ht=ts(Z),Tt=Rh(Z,ht),Dt,Ht,Se=0,Ce=x.interpolate||Rr,Ae="__p += '",pn=Cr((x.escape||Rr).source+"|"+Ce.source+"|"+(Ce===Y?Je:Rr).source+"|"+(x.evaluate||Rr).source+"|$","g"),Dn="//# sourceURL="+(Dr.call(x,"sourceURL")?(x.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++er+"]")+` `;m.replace(pn,function(ir,ci,Si,Kc,Rl,Jc){return Si||(Si=Kc),Ae+=m.slice(Se,Jc).replace(wn,Ut),ci&&(Dt=!0,Ae+=`' + __e(`+ci+`) + '`),Rl&&(Ht=!0,Ae+=`'; `+Rl+`; __p += '`),Si&&(Ae+=`' + ((__t = (`+Si+`)) == null ? '' : __t) + '`),Se=Jc+ir.length,ir}),Ae+=`'; `;var rr=Dr.call(x,"variable")&&x.variable;if(!rr)Ae=`with (obj) { `+Ae+` } `;else if(me.test(rr))throw new kn(u);Ae=(Ht?Ae.replace(yl,""):Ae).replace(us,"$1").replace(Vs,"$1;"),Ae="function("+(rr||"obj")+`) { `+(rr?"":`obj || (obj = {}); `)+"var __t, __p = ''"+(Dt?", __e = _.escape":"")+(Ht?`, __j = Array.prototype.join; function print() { __p += __j.call(arguments, '') } `:`; `)+Ae+`return __p }`;var Kr=Hk(function(){return br(ht,Dn+"return "+Ae).apply(n,Tt)});if(Kr.source=Ae,jp(Kr))throw Kr;return Kr}function Qj(m){return qi(m).toLowerCase()}function t9(m){return qi(m).toUpperCase()}function e9(m,x,T){if(m=qi(m),m&&(T||x===n))return Dc(m);if(!m||!(x=Al(x)))return m;var V=Ti(m),Z=Ti(x),ht=Df(V,Z),Tt=ec(V,Z)+1;return jf(V,ht,Tt).join("")}function n9(m,x,T){if(m=qi(m),m&&(T||x===n))return m.slice(0,Ws(m)+1);if(!m||!(x=Al(x)))return m;var V=Ti(m),Z=ec(V,Ti(x))+1;return jf(V,0,Z).join("")}function r9(m,x,T){if(m=qi(m),m&&(T||x===n))return m.replace(at,"");if(!m||!(x=Al(x)))return m;var V=Ti(m),Z=Df(V,Ti(x));return jf(V,Z).join("")}function i9(m,x){var T=se,V=_e;if(uo(x)){var Z="separator"in x?x.separator:Z;T="length"in x?Sr(x.length):T,V="omission"in x?Al(x.omission):V}m=qi(m);var ht=m.length;if(Be(m)){var Tt=Ti(m);ht=Tt.length}if(T>=ht)return m;var Dt=T-fs(V);if(Dt<1)return V;var Ht=Tt?jf(Tt,0,Dt).join(""):m.slice(0,Dt);if(Z===n)return Ht+V;if(Tt&&(Dt+=Ht.length-Dt),Vd(Z)){if(m.slice(Dt).search(Z)){var Se,Ce=Ht;for(Z.global||(Z=Cr(Z.source,qi(re.exec(Z))+"g")),Z.lastIndex=0;Se=Z.exec(Ce);)var Ae=Se.index;Ht=Ht.slice(0,Ae===n?Dt:Ae)}}else if(m.indexOf(Al(Z),Dt)!=Dt){var pn=Ht.lastIndexOf(Z);pn>-1&&(Ht=Ht.slice(0,pn))}return Ht+V}function o9(m){return m=qi(m),m&&Ur.test(m)?m.replace(Mo,Fc):m}var a9=Xc(function(m,x,T){return m+(T?" ":"")+x.toUpperCase()}),sT=qw("toUpperCase");function Wk(m,x,T){return m=qi(m),x=T?n:x,x===n?dn(m)?zc(m):$s(m):m.match(x)||[]}var Hk=qr(function(m,x){try{return io(m,n,x)}catch(T){return jp(T)?T:new kn(T)}}),s9=Wf(function(m,x){return ua(x,function(T){T=Yc(T),we(m,T,En(m[T],m))}),m});function u9(m){var x=m==null?0:m.length,T=qn();return m=x?di(m,function(V){if(typeof V[1]!="function")throw new Xo(o);return[T(V[0]),V[1]]}):[],qr(function(V){for(var Z=-1;++Z<x;){var ht=m[Z];if(io(ht[0],this,V))return io(ht[1],this,V)}})}function l9(m){return _n(an(m,E))}function uT(m){return function(){return m}}function c9(m,x){return m==null||m!==m?x:m}var f9=lc(),h9=lc(!0);function dc(m){return m}function lT(m){return ds(typeof m=="function"?m:an(m,E))}function p9(m){return zp(an(m,E))}function d9(m,x){return fv(m,an(x,E))}var g9=qr(function(m,x){return function(T){return Qu(T,m,x)}}),m9=qr(function(m,x){return function(T){return Qu(m,T,x)}});function cT(m,x,T){var V=ts(x),Z=Ui(x,V);T==null&&!(uo(x)&&(Z.length||!V.length))&&(T=x,x=m,m=this,Z=Ui(x,ts(x)));var ht=!(uo(T)&&"chain"in T)||!!T.chain,Tt=hc(m);return ua(Z,function(Dt){var Ht=x[Dt];m[Dt]=Ht,Tt&&(m.prototype[Dt]=function(){var Se=this.__chain__;if(ht||Se){var Ce=m(this.__wrapped__),Ae=Ce.__actions__=tl(this.__actions__);return Ae.push({func:Ht,args:arguments,thisArg:m}),Ce.__chain__=Se,Ce}return Ht.apply(m,Ho([this.value()],arguments))})}),m}function v9(){return Ao._===this&&(Ao._=Lo),this}function fT(){}function y9(m){return m=Sr(m),qr(function(x){return zy(x,m)})}var _9=Ld(di),x9=Ld(xl),b9=Ld(_u);function Xk(m){return Dx(m)?js(Yc(m)):Nw(m)}function w9(m){return function(x){return m==null?n:Ri(m,x)}}var S9=Ww(),E9=Ww(!0);function hT(){return[]}function pT(){return!1}function C9(){return{}}function I9(){return""}function P9(){return!0}function T9(m,x){if(m=Sr(m),m<1||m>te)return[];var T=be,V=ao(m,be);x=qn(x),m-=be;for(var Z=Gs(V,x);++T<m;)x(T);return Z}function M9(m){return zn(m)?di(m,Yc):ys(m)?[m]:tl(r_(qi(m)))}function A9(m){var x=++Xs;return qi(m)+x}var L9=Xy(function(m,x){return m+x},0),O9=Zy("ceil"),R9=Xy(function(m,x){return m/x},1),k9=Zy("floor");function D9(m){return m&&m.length?Pn(m,dc,ic):n}function N9(m,x){return m&&m.length?Pn(m,qn(x,2),ic):n}function F9(m){return Ap(m,dc)}function z9(m,x){return Ap(m,qn(x,2))}function B9(m){return m&&m.length?Pn(m,dc,Fp):n}function U9(m,x){return m&&m.length?Pn(m,qn(x,2),Fp):n}var V9=Xy(function(m,x){return m*x},1),$9=Zy("round"),j9=Xy(function(m,x){return m-x},0);function q9(m){return m&&m.length?ui(m,dc):0}function G9(m,x){return m&&m.length?ui(m,qn(x,2)):0}return ut.after=mn,ut.ary=Ze,ut.assign=qp,ut.assignIn=y_,ut.assignInWith=Tv,ut.assignWith=__,ut.at=Zf,ut.before=Zn,ut.bind=En,ut.bindAll=s9,ut.bindKey=sn,ut.castArray=wi,ut.chain=wv,ut.chunk=iS,ut.compact=oS,ut.concat=aS,ut.cond=u9,ut.conforms=l9,ut.constant=uT,ut.countBy=s,ut.create=x_,ut.curry=nr,ut.curryRight=Gn,ut.debounce=wr,ut.defaults=Mv,ut.defaultsDeep=b_,ut.defer=yn,ut.delay=Gr,ut.difference=NP,ut.differenceBy=FP,ut.differenceWith=sS,ut.drop=uS,ut.dropRight=i_,ut.dropRightWhile=lS,ut.dropWhile=o_,ut.fill=a_,ut.filter=f,ut.flatMap=w,ut.flatMapDeep=I,ut.flatMapDepth=A,ut.flatten=cS,ut.flattenDeep=zP,ut.flattenDepth=BP,ut.flip=Yi,ut.flow=f9,ut.flowRight=h9,ut.fromPairs=Hg,ut.functions=LS,ut.functionsIn=OS,ut.groupBy=G,ut.initial=$x,ut.intersection=hS,ut.intersectionBy=pS,ut.intersectionWith=UP,ut.invert=RS,ut.invertBy=Kf,ut.invokeMap=J,ut.iteratee=lT,ut.keyBy=rt,ut.keys=ts,ut.keysIn=Va,ut.map=dt,ut.mapKeys=rm,ut.mapValues=im,ut.matches=p9,ut.matchesProperty=d9,ut.memoize=Zi,ut.merge=om,ut.mergeWith=Gd,ut.method=g9,ut.methodOf=m9,ut.mixin=cT,ut.negate=Vi,ut.nthArg=y9,ut.omit=kS,ut.omitBy=DS,ut.once=Ki,ut.orderBy=_t,ut.over=_9,ut.overArgs=yo,ut.overEvery=x9,ut.overSome=b9,ut.partial=Do,ut.partialRight=Jo,ut.partition=Pt,ut.pick=NS,ut.pickBy=Zx,ut.property=Xk,ut.propertyOf=w9,ut.pull=$P,ut.pullAll=Nd,ut.pullAllBy=xv,ut.pullAllWith=mi,ut.pullAt=jP,ut.range=S9,ut.rangeRight=E9,ut.rearg=ms,ut.reject=qt,ut.remove=qx,ut.rest=Ma,ut.reverse=Vp,ut.sampleSize=ee,ut.set=Jx,ut.setWith=Qh,ut.shuffle=fe,ut.slice=qP,ut.sortBy=hn,ut.sortedUniq=dS,ut.sortedUniqBy=gS,ut.split=Yj,ut.spread=vs,ut.tail=mS,ut.take=vS,ut.takeRight=l_,ut.takeRightWhile=Fd,ut.takeWhile=Gx,ut.tap=f_,ut.throttle=Co,ut.thru=Yg,ut.toArray=v_,ut.toPairs=Qx,ut.toPairsIn=E_,ut.toPath=M9,ut.toPlainObject=_o,ut.transform=t1,ut.unary=Aa,ut.union=Xg,ut.unionBy=yS,ut.unionWith=Zo,ut.uniq=Xi,ut.uniqBy=_S,ut.uniqWith=xS,ut.unset=FS,ut.unzip=c_,ut.unzipWith=Wx,ut.update=e1,ut.updateWith=zS,ut.values=Wd,ut.valuesIn=n1,ut.without=bS,ut.words=Wk,ut.wrap=mr,ut.xor=Hx,ut.xorBy=zd,ut.xorWith=Bd,ut.zip=wS,ut.zipObject=Ko,ut.zipObjectDeep=bv,ut.zipWith=Xh,ut.entries=Qx,ut.entriesIn=E_,ut.extend=y_,ut.extendWith=Tv,cT(ut,ut),ut.add=L9,ut.attempt=Hk,ut.camelCase=C_,ut.capitalize=VS,ut.ceil=O9,ut.clamp=BS,ut.clone=li,ut.cloneDeep=Os,ut.cloneDeepWith=Ja,ut.cloneWith=Or,ut.conformsTo=$i,ut.deburr=r1,ut.defaultTo=c9,ut.divide=R9,ut.endsWith=QP,ut.eq=vi,ut.escape=tT,ut.escapeRegExp=eT,ut.every=l,ut.find=v,ut.findIndex=_v,ut.findKey=w_,ut.findLast=b,ut.findLastIndex=Dd,ut.findLastKey=Yx,ut.floor=k9,ut.forEach=F,ut.forEachRight=j,ut.forIn=TS,ut.forInRight=Av,ut.forOwn=MS,ut.forOwnRight=AS,ut.get=S_,ut.gt=Qa,ut.gte=Wr,ut.has=nl,ut.hasIn=nm,ut.head=s_,ut.identity=dc,ut.includes=H,ut.indexOf=fS,ut.inRange=Lv,ut.invoke=JP,ut.isArguments=eu,ut.isArray=zn,ut.isArrayBuffer=Hf,ut.isArrayLike=Zr,ut.isArrayLikeObject=ji,ut.isBoolean=fc,ut.isBuffer=Ol,ut.isDate=Ud,ut.isElement=Kg,ut.isEmpty=Zh,ut.isEqual=Jg,ut.isEqualWith=h_,ut.isError=jp,ut.isFinite=Sv,ut.isFunction=hc,ut.isInteger=Ev,ut.isLength=pc,ut.isMap=Kh,ut.isMatch=Qg,ut.isMatchWith=p_,ut.isNaN=d_,ut.isNative=Cv,ut.isNil=g_,ut.isNull=Iv,ut.isNumber=tm,ut.isObject=uo,ut.isObjectLike=lo,ut.isPlainObject=Jh,ut.isRegExp=Vd,ut.isSafeInteger=m_,ut.isSet=$d,ut.isString=jd,ut.isSymbol=ys,ut.isTypedArray=Xf,ut.isUndefined=qd,ut.isWeakMap=Pv,ut.isWeakSet=em,ut.join=VP,ut.kebabCase=nT,ut.last=cc,ut.lastIndexOf=u_,ut.lowerCase=rT,ut.lowerFirst=iT,ut.lt=Xx,ut.lte=IS,ut.max=D9,ut.maxBy=N9,ut.mean=F9,ut.meanBy=z9,ut.min=B9,ut.minBy=U9,ut.stubArray=hT,ut.stubFalse=pT,ut.stubObject=C9,ut.stubString=I9,ut.stubTrue=P9,ut.multiply=V9,ut.nth=jx,ut.noConflict=v9,ut.noop=fT,ut.now=qe,ut.pad=oT,ut.padEnd=aT,ut.padStart=Jf,ut.parseInt=I_,ut.random=US,ut.reduce=St,ut.reduceRight=Nt,ut.repeat=$S,ut.replace=Ov,ut.result=Kx,ut.round=$9,ut.runInContext=$t,ut.sample=Zt,ut.size=Ee,ut.snakeCase=jS,ut.some=Oe,ut.sortedIndex=GP,ut.sortedIndexBy=WP,ut.sortedIndexOf=HP,ut.sortedLastIndex=XP,ut.sortedLastIndexBy=YP,ut.sortedLastIndexOf=ZP,ut.startCase=Zj,ut.startsWith=Kj,ut.subtract=j9,ut.sum=q9,ut.sumBy=G9,ut.template=Jj,ut.times=T9,ut.toFinite=Yf,ut.toInteger=Sr,ut.toLength=PS,ut.toLower=Qj,ut.toNumber=nu,ut.toSafeInteger=Zc,ut.toString=qi,ut.toUpper=t9,ut.trim=e9,ut.trimEnd=n9,ut.trimStart=r9,ut.truncate=i9,ut.unescape=o9,ut.uniqueId=A9,ut.upperCase=a9,ut.upperFirst=sT,ut.each=F,ut.eachRight=j,ut.first=s_,cT(ut,function(){var m={};return eo(ut,function(x,T){Dr.call(ut.prototype,T)||(m[T]=x)}),m}(),{chain:!1}),ut.VERSION=r,ua(["bind","bindKey","curry","curryRight","partial","partialRight"],function(m){ut[m].placeholder=ut}),ua(["drop","take"],function(m,x){ur.prototype[m]=function(T){T=T===n?1:Sn(Sr(T),0);var V=this.__filtered__&&!x?new ur(this):this.clone();return V.__filtered__?V.__takeCount__=ao(T,V.__takeCount__):V.__views__.push({size:ao(T,be),type:m+(V.__dir__<0?"Right":"")}),V},ur.prototype[m+"Right"]=function(T){return this.reverse()[m](T).reverse()}}),ua(["filter","map","takeWhile"],function(m,x){var T=x+1,V=T==de||T==Ge;ur.prototype[m]=function(Z){var ht=this.clone();return ht.__iteratees__.push({iteratee:qn(Z,3),type:T}),ht.__filtered__=ht.__filtered__||V,ht}}),ua(["head","last"],function(m,x){var T="take"+(x?"Right":"");ur.prototype[m]=function(){return this[T](1).value()[0]}}),ua(["initial","tail"],function(m,x){var T="drop"+(x?"":"Right");ur.prototype[m]=function(){return this.__filtered__?new ur(this):this[T](1)}}),ur.prototype.compact=function(){return this.filter(dc)},ur.prototype.find=function(m){return this.filter(m).head()},ur.prototype.findLast=function(m){return this.reverse().find(m)},ur.prototype.invokeMap=qr(function(m,x){return typeof m=="function"?new ur(this):this.map(function(T){return Qu(T,m,x)})}),ur.prototype.reject=function(m){return this.filter(Vi(qn(m)))},ur.prototype.slice=function(m,x){m=Sr(m);var T=this;return T.__filtered__&&(m>0||x<0)?new ur(T):(m<0?T=T.takeRight(-m):m&&(T=T.drop(m)),x!==n&&(x=Sr(x),T=x<0?T.dropRight(-x):T.take(x-m)),T)},ur.prototype.takeRightWhile=function(m){return this.reverse().takeWhile(m).reverse()},ur.prototype.toArray=function(){return this.take(be)},eo(ur.prototype,function(m,x){var T=/^(?:filter|find|map|reject)|While$/.test(x),V=/^(?:head|last)$/.test(x),Z=ut[V?"take"+(x=="last"?"Right":""):x],ht=V||/^find/.test(x);!Z||(ut.prototype[x]=function(){var Tt=this.__wrapped__,Dt=V?[1]:arguments,Ht=Tt instanceof ur,Se=Dt[0],Ce=Ht||zn(Tt),Ae=function(ci){var Si=Z.apply(ut,Ho([ci],Dt));return V&&pn?Si[0]:Si};Ce&&T&&typeof Se=="function"&&Se.length!=1&&(Ht=Ce=!1);var pn=this.__chain__,Dn=!!this.__actions__.length,rr=ht&&!pn,Kr=Ht&&!Dn;if(!ht&&Ce){Tt=Kr?Tt:new ur(this);var ir=m.apply(Tt,Dt);return ir.__actions__.push({func:Yg,args:[Ae],thisArg:n}),new Ka(ir,pn)}return rr&&Kr?m.apply(this,Dt):(ir=this.thru(Ae),rr?V?ir.value()[0]:ir.value():ir)})}),ua(["pop","push","shift","sort","splice","unshift"],function(m){var x=hs[m],T=/^(?:push|sort|unshift)$/.test(m)?"tap":"thru",V=/^(?:pop|shift)$/.test(m);ut.prototype[m]=function(){var Z=arguments;if(V&&!this.__chain__){var ht=this.value();return x.apply(zn(ht)?ht:[],Z)}return this[T](function(Tt){return x.apply(zn(Tt)?Tt:[],Z)})}}),eo(ur.prototype,function(m,x){var T=ut[x];if(T){var V=T.name+"";Dr.call(ps,V)||(ps[V]=[]),ps[V].push({name:x,func:T})}}),ps[Hy(n,z).name]=[{name:"wrapper",func:n}],ur.prototype.clone=Fg,ur.prototype.reverse=kp,ur.prototype.value=Cd,ut.prototype.at=Zg,ut.prototype.chain=Yh,ut.prototype.commit=SS,ut.prototype.next=ES,ut.prototype.plant=Ta,ut.prototype.reverse=$p,ut.prototype.toJSON=ut.prototype.valueOf=ut.prototype.value=CS,ut.prototype.first=ut.prototype.head,zh&&(ut.prototype[zh]=KP),ut},nc=Lp();Zl?((Zl.exports=nc)._=nc,Lh._=nc):Ao._=nc}).call(Iu)})(R4,R4.exports);b2.register(...zot);var iat=Xv,oat=function(){try{var e=iat(Object,"defineProperty");return e({},"",{}),e}catch{}}(),k4=oat,D4=k4;function aat(e,t,n){t=="__proto__"&&D4?D4(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}var N2=aat,sat=N2,uat=i0;function lat(e,t,n){(n!==void 0&&!uat(e[t],n)||n===void 0&&!(t in e))&&sat(e,t,n)}var N4=lat;function cat(e){return function(t,n,r){for(var i=-1,a=Object(t),o=r(t),u=o.length;u--;){var c=o[e?u:++i];if(n(a[c],c,a)===!1)break}return t}}var fat=cat,hat=fat,pat=hat(),F4=pat,F2={exports:{}};(function(e,t){var n=up,r=t&&!t.nodeType&&t,i=r&&!0&&e&&!e.nodeType&&e,a=i&&i.exports===r,o=a?n.Buffer:void 0,u=o?o.allocUnsafe:void 0;function c(g,_){if(_)return g.slice();var E=g.length,C=u?u(E):new g.constructor(E);return g.copy(C),C}e.exports=c})(F2,F2.exports);var z4=Zz;function dat(e){var t=new e.constructor(e.byteLength);return new z4(t).set(new z4(e)),t}var hO=dat,gat=hO;function mat(e,t){var n=t?gat(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}var B4=mat;function vat(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}var U4=vat,yat=sf,V4=Object.create,_at=function(){function e(){}return function(t){if(!yat(t))return{};if(V4)return V4(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}(),xat=_at,bat=u3,wat=bat(Object.getPrototypeOf,Object),pO=wat,Sat=xat,Eat=pO,Cat=TC;function Iat(e){return typeof e.constructor=="function"&&!Cat(e)?Sat(Eat(e)):{}}var $4=Iat,Pat=Yv,Tat=Kp;function Mat(e){return Tat(e)&&Pat(e)}var Aat=Mat,Lat=Hv,Oat=pO,Rat=Kp,kat="[object Object]",Dat=Function.prototype,Nat=Object.prototype,j4=Dat.toString,Fat=Nat.hasOwnProperty,zat=j4.call(Object);function Bat(e){if(!Rat(e)||Lat(e)!=kat)return!1;var t=Oat(e);if(t===null)return!0;var n=Fat.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&j4.call(n)==zat}var dO=Bat;function Uat(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}var q4=Uat,Vat=N2,$at=i0,jat=Object.prototype,qat=jat.hasOwnProperty;function Gat(e,t,n){var r=e[t];(!(qat.call(e,t)&&$at(r,n))||n===void 0&&!(t in e))&&Vat(e,t,n)}var z2=Gat,Wat=z2,Hat=N2;function Xat(e,t,n,r){var i=!n;n||(n={});for(var a=-1,o=t.length;++a<o;){var u=t[a],c=r?r(n[u],e[u],u,n,e):void 0;c===void 0&&(c=e[u]),i?Hat(n,u,c):Wat(n,u,c)}return n}var Nm=Xat;function Yat(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var Zat=Yat,Kat=sf,Jat=TC,Qat=Zat,tst=Object.prototype,est=tst.hasOwnProperty;function nst(e){if(!Kat(e))return Qat(e);var t=Jat(e),n=[];for(var r in e)r=="constructor"&&(t||!est.call(e,r))||n.push(r);return n}var rst=nst,ist=s3,ost=rst,ast=Yv;function sst(e){return ast(e)?ist(e,!0):ost(e)}var C0=sst,ust=Nm,lst=C0;function cst(e){return ust(e,lst(e))}var fst=cst,G4=N4,hst=F2.exports,pst=B4,dst=U4,gst=$4,W4=IC,H4=oh,mst=Aat,vst=c0.exports,yst=FA,_st=sf,xst=dO,bst=WA,X4=q4,wst=fst;function Sst(e,t,n,r,i,a,o){var u=X4(e,n),c=X4(t,n),g=o.get(c);if(g){G4(e,n,g);return}var _=a?a(u,c,n+"",e,t,o):void 0,E=_===void 0;if(E){var C=H4(c),O=!C&&vst(c),R=!C&&!O&&bst(c);_=c,C||O||R?H4(u)?_=u:mst(u)?_=dst(u):O?(E=!1,_=hst(c,!0)):R?(E=!1,_=pst(c,!0)):_=[]:xst(c)||W4(c)?(_=u,W4(u)?_=wst(u):(!_st(u)||yst(u))&&(_=gst(c))):E=!1}E&&(o.set(c,_),i(_,c,r,a,o),o.delete(c)),G4(e,n,_)}var Est=Sst,Cst=EC,Ist=N4,Pst=F4,Tst=Est,Mst=sf,Ast=C0,Lst=q4;function Y4(e,t,n,r,i){e!==t&&Pst(t,function(a,o){if(i||(i=new Cst),Mst(a))Tst(e,t,o,n,Y4,r,i);else{var u=r?r(Lst(e,o),a,o+"",e,t,i):void 0;u===void 0&&(u=a),Ist(e,o,u)}},Ast)}var Ost=Y4;function Rst(e){return e}var gO=Rst;function kst(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}var Z4=kst,Dst=Z4,K4=Math.max;function Nst(e,t,n){return t=K4(t===void 0?e.length-1:t,0),function(){for(var r=arguments,i=-1,a=K4(r.length-t,0),o=Array(a);++i<a;)o[i]=r[t+i];i=-1;for(var u=Array(t+1);++i<t;)u[i]=r[i];return u[t]=n(o),Dst(e,this,u)}}var J4=Nst;function Fst(e){return function(){return e}}var zst=Fst,Bst=zst,Q4=k4,Ust=gO,Vst=Q4?function(e,t){return Q4(e,"toString",{configurable:!0,enumerable:!1,value:Bst(t),writable:!0})}:Ust,$st=Vst,jst=800,qst=16,Gst=Date.now;function Wst(e){var t=0,n=0;return function(){var r=Gst(),i=qst-(r-n);if(n=r,i>0){if(++t>=jst)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var Hst=Wst,Xst=$st,Yst=Hst,Zst=Yst(Xst),t6=Zst,Kst=gO,Jst=J4,Qst=t6;function tut(e,t){return Qst(Jst(e,t,Kst),e+"")}var mO=tut,eut=i0,nut=Yv,rut=PC,iut=sf;function out(e,t,n){if(!iut(n))return!1;var r=typeof t;return(r=="number"?nut(n)&&rut(t,n.length):r=="string"&&t in n)?eut(n[t],e):!1}var e6=out,aut=mO,sut=e6;function uut(e){return aut(function(t,n){var r=-1,i=n.length,a=i>1?n[i-1]:void 0,o=i>2?n[2]:void 0;for(a=e.length>3&&typeof a=="function"?(i--,a):void 0,o&&sut(n[0],n[1],o)&&(a=i<3?void 0:a,i=1),t=Object(t);++r<i;){var u=n[r];u&&e(t,u,r,a)}return t})}var vO=uut,lut=Ost,cut=vO,fut=cut(function(e,t,n){lut(e,t,n)}),XSt=fut,hut=z2,put=Nm,dut=vO,gut=Yv,mut=TC,vut=Pm,yut=Object.prototype,_ut=yut.hasOwnProperty,xut=dut(function(e,t){if(mut(t)||gut(t)){put(t,vut(t),e);return}for(var n in t)_ut.call(t,n)&&hut(e,n,t[n])}),YSt=xut,but=EC,wut=QA,Sut=1,Eut=2;function Cut(e,t,n,r){var i=n.length,a=i,o=!r;if(e==null)return!a;for(e=Object(e);i--;){var u=n[i];if(o&&u[2]?u[1]!==e[u[0]]:!(u[0]in e))return!1}for(;++i<a;){u=n[i];var c=u[0],g=e[c],_=u[1];if(o&&u[2]){if(g===void 0&&!(c in e))return!1}else{var E=new but;if(r)var C=r(g,_,c,e,t,E);if(!(C===void 0?wut(_,g,Sut|Eut,r,E):C))return!1}}return!0}var Iut=Cut,Put=sf;function Tut(e){return e===e&&!Put(e)}var n6=Tut,Mut=n6,Aut=Pm;function Lut(e){for(var t=Aut(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,Mut(i)]}return t}var Out=Lut;function Rut(e,t){return function(n){return n==null?!1:n[e]===t&&(t!==void 0||e in Object(n))}}var r6=Rut,kut=Iut,Dut=Out,Nut=r6;function Fut(e){var t=Dut(e);return t.length==1&&t[0][2]?Nut(t[0][0],t[0][1]):function(n){return n===e||kut(n,e,t)}}var zut=Fut;function But(e,t){return e!=null&&t in Object(e)}var Uut=But,Vut=g0,$ut=IC,jut=oh,qut=PC,Gut=qA,Wut=m0;function Hut(e,t,n){t=Vut(t,e);for(var r=-1,i=t.length,a=!1;++r<i;){var o=Wut(t[r]);if(!(a=e!=null&&n(e,o)))break;e=e[o]}return a||++r!=i?a:(i=e==null?0:e.length,!!i&&Gut(i)&&qut(o,i)&&(jut(e)||$ut(e)))}var i6=Hut,Xut=Uut,Yut=i6;function Zut(e,t){return e!=null&&Yut(e,t,Xut)}var Kut=Zut,Jut=QA,Qut=wtt,tlt=Kut,elt=fL,nlt=n6,rlt=r6,ilt=m0,olt=1,alt=2;function slt(e,t){return elt(e)&&nlt(t)?rlt(ilt(e),t):function(n){var r=Qut(n,e);return r===void 0&&r===t?tlt(n,e):Jut(t,r,olt|alt)}}var ult=slt;function llt(e){return function(t){return t==null?void 0:t[e]}}var clt=llt,flt=$C;function hlt(e){return function(t){return flt(t,e)}}var plt=hlt,dlt=clt,glt=plt,mlt=fL,vlt=m0;function ylt(e){return mlt(e)?dlt(vlt(e)):glt(e)}var _lt=ylt,xlt=zut,blt=ult,wlt=gO,Slt=oh,Elt=_lt;function Clt(e){return typeof e=="function"?e:e==null?wlt:typeof e=="object"?Slt(e)?blt(e[0],e[1]):xlt(e):Elt(e)}var B2=Clt,Ilt=B2,Plt=Yv,Tlt=Pm;function Mlt(e){return function(t,n,r){var i=Object(t);if(!Plt(t)){var a=Ilt(n);t=Tlt(t),n=function(u){return a(i[u],u,i)}}var o=e(t,n,r);return o>-1?i[a?t[o]:o]:void 0}}var Alt=Mlt;function Llt(e,t,n,r){for(var i=e.length,a=n+(r?1:-1);r?a--:++a<i;)if(t(e[a],a,e))return a;return-1}var Olt=Llt,Rlt=/\s/;function klt(e){for(var t=e.length;t--&&Rlt.test(e.charAt(t)););return t}var Dlt=klt,Nlt=Dlt,Flt=/^\s+/;function zlt(e){return e&&e.slice(0,Nlt(e)+1).replace(Flt,"")}var Blt=zlt,Ult=Blt,o6=sf,Vlt=UC,a6=0/0,$lt=/^[-+]0x[0-9a-f]+$/i,jlt=/^0b[01]+$/i,qlt=/^0o[0-7]+$/i,Glt=parseInt;function Wlt(e){if(typeof e=="number")return e;if(Vlt(e))return a6;if(o6(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=o6(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=Ult(e);var n=jlt.test(e);return n||qlt.test(e)?Glt(e.slice(2),n?2:8):$lt.test(e)?a6:+e}var s6=Wlt,Hlt=s6,u6=1/0,Xlt=17976931348623157e292;function Ylt(e){if(!e)return e===0?e:0;if(e=Hlt(e),e===u6||e===-u6){var t=e<0?-1:1;return t*Xlt}return e===e?e:0}var Zlt=Ylt,Klt=Zlt;function Jlt(e){var t=Klt(e),n=t%1;return t===t?n?t-n:t:0}var Qlt=Jlt,tct=Olt,ect=B2,nct=Qlt,rct=Math.max;function ict(e,t,n){var r=e==null?0:e.length;if(!r)return-1;var i=n==null?0:nct(n);return i<0&&(i=rct(r+i,0)),tct(e,ect(t),i)}var oct=ict,act=Alt,sct=oct,uct=act(sct),ZSt=uct,l6=Object.prototype.hasOwnProperty;function c6(e,t,n){for(n of e.keys())if(Pb(n,t))return n}function Pb(e,t){var n,r,i;if(e===t)return!0;if(e&&t&&(n=e.constructor)===t.constructor){if(n===Date)return e.getTime()===t.getTime();if(n===RegExp)return e.toString()===t.toString();if(n===Array){if((r=e.length)===t.length)for(;r--&&Pb(e[r],t[r]););return r===-1}if(n===Set){if(e.size!==t.size)return!1;for(r of e)if(i=r,i&&typeof i=="object"&&(i=c6(t,i),!i)||!t.has(i))return!1;return!0}if(n===Map){if(e.size!==t.size)return!1;for(r of e)if(i=r[0],i&&typeof i=="object"&&(i=c6(t,i),!i)||!Pb(r[1],t.get(i)))return!1;return!0}if(n===ArrayBuffer)e=new Uint8Array(e),t=new Uint8Array(t);else if(n===DataView){if((r=e.byteLength)===t.byteLength)for(;r--&&e.getInt8(r)===t.getInt8(r););return r===-1}if(ArrayBuffer.isView(e)){if((r=e.byteLength)===t.byteLength)for(;r--&&e[r]===t[r];);return r===-1}if(!n||typeof e=="object"){r=0;for(n in e)if(l6.call(e,n)&&++r&&!l6.call(t,n)||!(n in t)||!Pb(e[n],t[n]))return!1;return Object.keys(t).length===r}}return e!==e&&t!==t}function lct(e){var t=Pr.exports.useRef(),n=Pr.exports.useRef(0);return Pb(e,t.current)||(t.current=e,n.current+=1),[n.current]}function KSt(e,t){return Pr.exports.useEffect(e,lct(t))}const f6="label";function h6(e,t){typeof e=="function"?e(t):e&&(e.current=t)}function cct(e,t){const n=e.options;n&&t&&Object.assign(n,t)}function p6(e,t){e.labels=t}function d6(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:f6;const r=[];e.datasets=t.map(i=>{const a=e.datasets.find(o=>o[n]===i[n]);return!a||!i.data||r.includes(a)?am({},i):(r.push(a),Object.assign(a,i),a)})}function fct(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:f6;const n={labels:[],datasets:[]};return p6(n,e.labels),d6(n,e.datasets,t),n}function hct(e,t){const z=e,{height:n=150,width:r=300,redraw:i=!1,datasetIdKey:a,type:o,data:u,options:c,plugins:g=[],fallbackContent:_,updateMode:E}=z,C=Qk(z,["height","width","redraw","datasetIdKey","type","data","options","plugins","fallbackContent","updateMode"]),O=Pr.exports.useRef(null),R=Pr.exports.useRef(),D=()=>{!O.current||(R.current=new b2(O.current,{type:o,data:fct(u,a),options:c&&am({},c),plugins:g}),h6(t,R.current))},B=()=>{h6(t,null),R.current&&(R.current.destroy(),R.current=null)};return Pr.exports.useEffect(()=>{!i&&R.current&&c&&cct(R.current,c)},[i,c]),Pr.exports.useEffect(()=>{!i&&R.current&&p6(R.current.config.data,u.labels)},[i,u.labels]),Pr.exports.useEffect(()=>{!i&&R.current&&u.datasets&&d6(R.current.config.data,u.datasets,a)},[i,u.datasets]),Pr.exports.useEffect(()=>{!R.current||(i?(B(),setTimeout(D)):R.current.update(E))},[i,c,u.labels,u.datasets,E]),Pr.exports.useEffect(()=>{!R.current||(B(),setTimeout(D))},[o]),Pr.exports.useEffect(()=>(D(),()=>B()),[]),r0("canvas",P_(am({},Object.assign({ref:O,role:"img",height:n,width:r},C)),{children:_}))}const JSt=Pr.exports.forwardRef(hct);var pct=z2,dct=g0,gct=PC,g6=sf,mct=m0;function vct(e,t,n,r){if(!g6(e))return e;t=dct(t,e);for(var i=-1,a=t.length,o=a-1,u=e;u!=null&&++i<a;){var c=mct(t[i]),g=n;if(c==="__proto__"||c==="constructor"||c==="prototype")return e;if(i!=o){var _=u[c];g=r?r(_,c,u):void 0,g===void 0&&(g=g6(_)?_:gct(t[i+1])?[]:{})}pct(u,c,g),u=u[c]}return e}var m6=vct,yct=m6;function _ct(e,t,n){return e==null?e:yct(e,t,n)}var QSt=_ct;function xct(e,t){for(var n=-1,r=e==null?0:e.length;++n<r&&t(e[n],n,e)!==!1;);return e}var bct=xct,wct=Nm,Sct=Pm;function Ect(e,t){return e&&wct(t,Sct(t),e)}var Cct=Ect,Ict=Nm,Pct=C0;function Tct(e,t){return e&&Ict(t,Pct(t),e)}var Mct=Tct,Act=Nm,Lct=jA;function Oct(e,t){return Act(e,Lct(e),t)}var Rct=Oct,kct=$A,Dct=pO,Nct=jA,Fct=e3,zct=Object.getOwnPropertySymbols,Bct=zct?function(e){for(var t=[];e;)kct(t,Nct(e)),e=Dct(e);return t}:Fct,v6=Bct,Uct=Nm,Vct=v6;function $ct(e,t){return Uct(e,Vct(e),t)}var jct=$ct,qct=t3,Gct=v6,Wct=C0;function Hct(e){return qct(e,Wct,Gct)}var yO=Hct,Xct=Object.prototype,Yct=Xct.hasOwnProperty;function Zct(e){var t=e.length,n=new e.constructor(t);return t&&typeof e[0]=="string"&&Yct.call(e,"index")&&(n.index=e.index,n.input=e.input),n}var Kct=Zct,Jct=hO;function Qct(e,t){var n=t?Jct(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}var tft=Qct,eft=/\w*$/;function nft(e){var t=new e.constructor(e.source,eft.exec(e));return t.lastIndex=e.lastIndex,t}var rft=nft,y6=a0,_6=y6?y6.prototype:void 0,x6=_6?_6.valueOf:void 0;function ift(e){return x6?Object(x6.call(e)):{}}var oft=ift,aft=hO,sft=tft,uft=rft,lft=oft,cft=B4,fft="[object Boolean]",hft="[object Date]",pft="[object Map]",dft="[object Number]",gft="[object RegExp]",mft="[object Set]",vft="[object String]",yft="[object Symbol]",_ft="[object ArrayBuffer]",xft="[object DataView]",bft="[object Float32Array]",wft="[object Float64Array]",Sft="[object Int8Array]",Eft="[object Int16Array]",Cft="[object Int32Array]",Ift="[object Uint8Array]",Pft="[object Uint8ClampedArray]",Tft="[object Uint16Array]",Mft="[object Uint32Array]";function Aft(e,t,n){var r=e.constructor;switch(t){case _ft:return aft(e);case fft:case hft:return new r(+e);case xft:return sft(e,n);case bft:case wft:case Sft:case Eft:case Cft:case Ift:case Pft:case Tft:case Mft:return cft(e,n);case pft:return new r;case dft:case vft:return new r(e);case gft:return uft(e);case mft:return new r;case yft:return lft(e)}}var Lft=Aft,Oft=MC,Rft=Kp,kft="[object Map]";function Dft(e){return Rft(e)&&Oft(e)==kft}var Nft=Dft,Fft=Nft,zft=GA,b6=Y1.exports,w6=b6&&b6.isMap,Bft=w6?zft(w6):Fft,Uft=Bft,Vft=MC,$ft=Kp,jft="[object Set]";function qft(e){return $ft(e)&&Vft(e)==jft}var Gft=qft,Wft=Gft,Hft=GA,S6=Y1.exports,E6=S6&&S6.isSet,Xft=E6?Hft(E6):Wft,Yft=Xft,Zft=EC,Kft=bct,Jft=z2,Qft=Cct,tht=Mct,eht=F2.exports,nht=U4,rht=Rct,iht=jct,oht=l3,aht=yO,sht=MC,uht=Kct,lht=Lft,cht=$4,fht=oh,hht=c0.exports,pht=Uft,dht=sf,ght=Yft,mht=Pm,vht=C0,yht=1,_ht=2,xht=4,C6="[object Arguments]",bht="[object Array]",wht="[object Boolean]",Sht="[object Date]",Eht="[object Error]",I6="[object Function]",Cht="[object GeneratorFunction]",Iht="[object Map]",Pht="[object Number]",P6="[object Object]",Tht="[object RegExp]",Mht="[object Set]",Aht="[object String]",Lht="[object Symbol]",Oht="[object WeakMap]",Rht="[object ArrayBuffer]",kht="[object DataView]",Dht="[object Float32Array]",Nht="[object Float64Array]",Fht="[object Int8Array]",zht="[object Int16Array]",Bht="[object Int32Array]",Uht="[object Uint8Array]",Vht="[object Uint8ClampedArray]",$ht="[object Uint16Array]",jht="[object Uint32Array]",Bo={};Bo[C6]=Bo[bht]=Bo[Rht]=Bo[kht]=Bo[wht]=Bo[Sht]=Bo[Dht]=Bo[Nht]=Bo[Fht]=Bo[zht]=Bo[Bht]=Bo[Iht]=Bo[Pht]=Bo[P6]=Bo[Tht]=Bo[Mht]=Bo[Aht]=Bo[Lht]=Bo[Uht]=Bo[Vht]=Bo[$ht]=Bo[jht]=!0;Bo[Eht]=Bo[I6]=Bo[Oht]=!1;function U2(e,t,n,r,i,a){var o,u=t&yht,c=t&_ht,g=t&xht;if(n&&(o=i?n(e,r,i,a):n(e)),o!==void 0)return o;if(!dht(e))return e;var _=fht(e);if(_){if(o=uht(e),!u)return nht(e,o)}else{var E=sht(e),C=E==I6||E==Cht;if(hht(e))return eht(e,u);if(E==P6||E==C6||C&&!i){if(o=c||C?{}:cht(e),!u)return c?iht(e,tht(o,e)):rht(e,Qft(o,e))}else{if(!Bo[E])return i?e:{};o=lht(e,E,u)}}a||(a=new Zft);var O=a.get(e);if(O)return O;a.set(e,o),ght(e)?e.forEach(function(B){o.add(U2(B,t,n,B,e,a))}):pht(e)&&e.forEach(function(B,z){o.set(z,U2(B,t,n,z,e,a))});var R=g?c?aht:oht:c?vht:mht,D=_?void 0:R(e);return Kft(D||e,function(B,z){D&&(z=B,B=e[z]),Jft(o,z,U2(B,t,n,z,e,a))}),o}var T6=U2,qht=T6,Ght=1,Wht=4;function Hht(e){return qht(e,Ght|Wht)}var tEt=Hht,V2,Xht=new Uint8Array(16);function Yht(){if(!V2&&(V2=typeof crypto!="undefined"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto!="undefined"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),!V2))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return V2(Xht)}var Zht=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function Kht(e){return typeof e=="string"&&Zht.test(e)}var Ou=[];for(var _O=0;_O<256;++_O)Ou.push((_O+256).toString(16).substr(1));function Jht(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=(Ou[e[t+0]]+Ou[e[t+1]]+Ou[e[t+2]]+Ou[e[t+3]]+"-"+Ou[e[t+4]]+Ou[e[t+5]]+"-"+Ou[e[t+6]]+Ou[e[t+7]]+"-"+Ou[e[t+8]]+Ou[e[t+9]]+"-"+Ou[e[t+10]]+Ou[e[t+11]]+Ou[e[t+12]]+Ou[e[t+13]]+Ou[e[t+14]]+Ou[e[t+15]]).toLowerCase();if(!Kht(n))throw TypeError("Stringified UUID is invalid");return n}function eEt(e,t,n){e=e||{};var r=e.random||(e.rng||Yht)();if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t){n=n||0;for(var i=0;i<16;++i)t[n+i]=r[i];return t}return Jht(r)}var Qht={exports:{}};/** @license * * Copyright (C) 2012 K. Arthur Endsley (kaendsle@mtu.edu) * Michigan Tech Research Institute (MTRI) * 3600 Green Court, Suite 100, Ann Arbor, MI, 48105 * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. * */(function(e,t){(function(n,r){e.exports=r()})(Iu,function(){var n,r,i;return i=function(a){if(a instanceof i)return a;if(!(this instanceof i))return new i(a);this._wrapped=a},n=function(a,o){return a.substring(0,o.length)===o},r=function(a,o){return a.substring(a.length-o.length)===o},i.delimiter=" ",i.isArray=function(a){return!!(a&&a.constructor===Array)},i.trim=function(a,o){for(o=o||" ";n(a,o);)a=a.substring(1);for(;r(a,o);)a=a.substring(0,a.length-1);return a},i.Wkt=function(a){this.delimiter=i.delimiter||" ",this.wrapVertices=!0,this.regExes={typeStr:/^\s*(\w+)\s*\(\s*(.*)\s*\)\s*$/,spaces:/\s+|\+/,numeric:/-*\d+(\.*\d+)?/,comma:/\s*,\s*/,parenComma:/\)\s*,\s*\(/,coord:/-*\d+\.*\d+ -*\d+\.*\d+/,doubleParenComma:/\)\s*\)\s*,\s*\(\s*\(/,ogcTypes:/^(multi)?(point|line|polygon|box)?(string)?$/i,crudeJson:/^{.*"(type|coordinates|geometries|features)":.*}$/},this._stripWhitespaceAndParens=function(o){var u=o.trim(),c=u.replace(/^\(?(.*?)\)?$/,"$1");return c},this.components=void 0,a&&typeof a=="string"?this.read(a):a&&typeof a!==void 0&&this.fromObject(a)},i.Wkt.prototype.isCollection=function(){switch(this.type.slice(0,5)){case"multi":return!0;case"polyg":return!0;default:return!1}},i.Wkt.prototype.sameCoords=function(a,o){return a.x===o.x&&a.y===o.y},i.Wkt.prototype.fromObject=function(a){var o;return a.hasOwnProperty("type")&&a.hasOwnProperty("coordinates")?o=this.fromJson(a):o=this.deconstruct.call(this,a),this.components=o.components,this.isRectangle=o.isRectangle||!1,this.type=o.type,this},i.Wkt.prototype.toObject=function(a){var o=this.construct[this.type].call(this,a);return typeof o=="object"&&!i.isArray(o)&&(o.properties=this.properties),o},i.Wkt.prototype.toString=function(a){return this.write()},i.Wkt.prototype.fromJson=function(a){var o,u,c,g,_,E;if(this.type=a.type.toLowerCase(),this.components=[],a.hasOwnProperty("geometry"))return this.fromJson(a.geometry),this.properties=a.properties,this;if(g=a.coordinates,!i.isArray(g[0]))this.components.push({x:g[0],y:g[1]});else for(o in g)if(g.hasOwnProperty(o))if(!i.isArray(g[o][0]))this.type==="multipoint"?this.components.push([{x:g[o][0],y:g[o][1]}]):this.components.push({x:g[o][0],y:g[o][1]});else{E=[];for(u in g[o])if(g[o].hasOwnProperty(u))if(!i.isArray(g[o][u][0]))E.push({x:g[o][u][0],y:g[o][u][1]});else{_=[];for(c in g[o][u])g[o][u].hasOwnProperty(c)&&_.push({x:g[o][u][c][0],y:g[o][u][c][1]});E.push(_)}this.components.push(E)}return this},i.Wkt.prototype.toJson=function(){var a,o,u,c,g,_,E;if(a=this.components,o={coordinates:[],type:function(){var C,O,R;O=this.regExes.ogcTypes.exec(this.type).slice(1),R=[];for(C in O)O.hasOwnProperty(C)&&O[C]!==void 0&&R.push(O[C].toLowerCase().slice(0,1).toUpperCase()+O[C].toLowerCase().slice(1));return R}.call(this).join("")},this.type.toLowerCase()==="box"){o.type="Polygon",o.bbox=[];for(u in a)a.hasOwnProperty(u)&&(o.bbox=o.bbox.concat([a[u].x,a[u].y]));return o.coordinates=[[[a[0].x,a[0].y],[a[0].x,a[1].y],[a[1].x,a[1].y],[a[1].x,a[0].y],[a[0].x,a[0].y]]],o}for(u in a)if(a.hasOwnProperty(u))if(i.isArray(a[u])){E=[];for(c in a[u])if(a[u].hasOwnProperty(c))if(i.isArray(a[u][c])){_=[];for(g in a[u][c])a[u][c].hasOwnProperty(g)&&_.push([a[u][c][g].x,a[u][c][g].y]);E.push(_)}else a[u].length>1?E.push([a[u][c].x,a[u][c].y]):E=E.concat([a[u][c].x,a[u][c].y]);o.coordinates.push(E)}else a.length>1?o.coordinates.push([a[u].x,a[u].y]):o.coordinates=o.coordinates.concat([a[u].x,a[u].y]);return o},i.Wkt.prototype.merge=function(a){var o=this.type.slice(0,5);if(this.type!==a.type&&this.type.slice(5,this.type.length)!==a.type)throw TypeError("The input geometry types must agree or the calling this.Wkt.Wkt instance must be a multigeometry of the other");switch(o){case"point":this.components=[this.components.concat(a.components)];break;case"multi":this.components=this.components.concat(a.type.slice(0,5)==="multi"?a.components:[a.components]);break;default:this.components=[this.components,a.components];break}return o!=="multi"&&(this.type="multi"+this.type),this},i.Wkt.prototype.read=function(a){var o;if(o=this.regExes.typeStr.exec(a),o)this.type=o[1].toLowerCase(),this.base=o[2],this.ingest[this.type]&&(this.components=this.ingest[this.type].apply(this,[this.base]));else if(this.regExes.crudeJson.test(a))if(typeof JSON=="object"&&typeof JSON.parse=="function")this.fromJson(JSON.parse(a));else throw console.log("JSON.parse() is not available; cannot parse GeoJSON strings"),{name:"JSONError",message:"JSON.parse() is not available; cannot parse GeoJSON strings"};else throw console.log("Invalid WKT string provided to read()"),{name:"WKTError",message:"Invalid WKT string provided to read()"};return this},i.Wkt.prototype.write=function(a){var o,u,c;for(a=a||this.components,u=[],u.push(this.type.toUpperCase()+"("),o=0;o<a.length;o+=1){if(this.isCollection()&&o>0&&u.push(","),!this.extract[this.type])return null;c=this.extract[this.type].apply(this,[a[o]]),this.isCollection()&&this.type!=="multipoint"?u.push("("+c+")"):(u.push(c),o!==a.length-1&&this.type!=="multipoint"&&u.push(","))}return u.push(")"),u.join("")},i.Wkt.prototype.extract={point:function(a){return String(a.x)+this.delimiter+String(a.y)},multipoint:function(a){var o,u=[],c;for(o=0;o<a.length;o+=1)c=this.extract.point.apply(this,[a[o]]),this.wrapVertices&&(c="("+c+")"),u.push(c);return u.join(",")},linestring:function(a){return this.extract.point.apply(this,[a])},multilinestring:function(a){var o,u=[];if(a.length)for(o=0;o<a.length;o+=1)u.push(this.extract.linestring.apply(this,[a[o]]));else u.push(this.extract.point.apply(this,[a]));return u.join(",")},polygon:function(a){return this.extract.multilinestring.apply(this,[a])},multipolygon:function(a){var o,u=[];for(o=0;o<a.length;o+=1)u.push("("+this.extract.polygon.apply(this,[a[o]])+")");return u.join(",")},box:function(a){return this.extract.linestring.apply(this,[a])},geometrycollection:function(a){console.log("The geometrycollection WKT type is not yet supported.")}},i.Wkt.prototype.ingest={point:function(a){var o=i.trim(a).split(this.regExes.spaces);return[{x:parseFloat(this.regExes.numeric.exec(o[0])[0]),y:parseFloat(this.regExes.numeric.exec(o[1])[0])}]},multipoint:function(a){var o,u,c;for(u=[],c=i.trim(a).split(this.regExes.comma),o=0;o<c.length;o+=1)u.push(this.ingest.point.apply(this,[c[o]]));return u},linestring:function(a){var o,u,c;for(u=this.ingest.multipoint.apply(this,[a]),c=[],o=0;o<u.length;o+=1)c=c.concat(u[o]);return c},multilinestring:function(a){var o,u,c,g;for(u=[],g=i.trim(a).split(this.regExes.doubleParenComma),g.length===1&&(g=i.trim(a).split(this.regExes.parenComma)),o=0;o<g.length;o+=1)c=this._stripWhitespaceAndParens(g[o]),u.push(this.ingest.linestring.apply(this,[c]));return u},polygon:function(a){var o,u,c,g,_,E;for(E=i.trim(a).split(this.regExes.parenComma),c=[],o=0;o<E.length;o+=1){for(_=this._stripWhitespaceAndParens(E[o]).split(this.regExes.comma),g=[],u=0;u<_.length;u+=1){var C=_[u].split(this.regExes.spaces);if(C.length>2&&(C=C.filter(function(D){return D!=""})),C.length===2){var O=C[0],R=C[1];g.push({x:parseFloat(O),y:parseFloat(R)})}}c.push(g)}return c},box:function(a){var o,u,c;for(u=this.ingest.multipoint.apply(this,[a]),c=[],o=0;o<u.length;o+=1)c=c.concat(u[o]);return c},multipolygon:function(a){var o,u,c,g;for(u=[],g=i.trim(a).split(this.regExes.doubleParenComma),o=0;o<g.length;o+=1)c=this._stripWhitespaceAndParens(g[o]),u.push(this.ingest.polygon.apply(this,[c]));return u},geometrycollection:function(a){console.log("The geometrycollection WKT type is not yet supported.")}},i})})(Qht);var tpt=Object.prototype,ept=tpt.hasOwnProperty;function npt(e,t){return e!=null&&ept.call(e,t)}var rpt=npt,ipt=rpt,opt=i6;function apt(e,t){return e!=null&&opt(e,t,ipt)}var nEt=apt,spt=up,upt=function(){return spt.Date.now()},lpt=upt,cpt=sf,xO=lpt,M6=s6,fpt="Expected a function",hpt=Math.max,ppt=Math.min;function dpt(e,t,n){var r,i,a,o,u,c,g=0,_=!1,E=!1,C=!0;if(typeof e!="function")throw new TypeError(fpt);t=M6(t)||0,cpt(n)&&(_=!!n.leading,E="maxWait"in n,a=E?hpt(M6(n.maxWait)||0,t):a,C="trailing"in n?!!n.trailing:C);function O(mt){var wt=r,Ot=i;return r=i=void 0,g=mt,o=e.apply(Ot,wt),o}function R(mt){return g=mt,u=setTimeout(z,t),_?O(mt):o}function D(mt){var wt=mt-c,Ot=mt-g,Bt=t-wt;return E?ppt(Bt,a-Ot):Bt}function B(mt){var wt=mt-c,Ot=mt-g;return c===void 0||wt>=t||wt<0||E&&Ot>=a}function z(){var mt=xO();if(B(mt))return k(mt);u=setTimeout(z,D(mt))}function k(mt){return u=void 0,C&&r?O(mt):(r=i=void 0,o)}function $(){u!==void 0&&clearTimeout(u),g=0,r=c=i=u=void 0}function K(){return u===void 0?o:k(xO())}function et(){var mt=xO(),wt=B(mt);if(r=arguments,i=this,c=mt,wt){if(u===void 0)return R(c);if(E)return clearTimeout(u),u=setTimeout(z,t),O(c)}return u===void 0&&(u=setTimeout(z,t)),o}return et.cancel=$,et.flush=K,et}var gpt=dpt,mpt=gpt,vpt=sf,ypt="Expected a function";function _pt(e,t,n){var r=!0,i=!0;if(typeof e!="function")throw new TypeError(ypt);return vpt(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),mpt(e,t,{leading:r,maxWait:t,trailing:i})}var rEt=_pt,bO={exports:{}},uy={},wO={exports:{}},hp={},$2={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=u;/*! * Adapted from jQuery UI core * * http://jqueryui.com * * Copyright 2014 jQuery Foundation and other contributors * Released under the MIT license. * http://jquery.org/license * * http://api.jqueryui.com/category/ui-core/ */var n=/input|select|textarea|button|object/;function r(c){var g=c.offsetWidth<=0&&c.offsetHeight<=0;if(g&&!c.innerHTML)return!0;try{var _=window.getComputedStyle(c);return g?_.getPropertyValue("overflow")!=="visible"||c.scrollWidth<=0&&c.scrollHeight<=0:_.getPropertyValue("display")=="none"}catch{return console.warn("Failed to inspect element style"),!1}}function i(c){for(var g=c;g&&g!==document.body;){if(r(g))return!1;g=g.parentNode}return!0}function a(c,g){var _=c.nodeName.toLowerCase(),E=n.test(_)&&!c.disabled||_==="a"&&c.href||g;return E&&i(c)}function o(c){var g=c.getAttribute("tabindex");g===null&&(g=void 0);var _=isNaN(g);return(_||g>=0)&&a(c,!_)}function u(c){return[].slice.call(c.querySelectorAll("*"),0).filter(o)}e.exports=t.default})($2,$2.exports);Object.defineProperty(hp,"__esModule",{value:!0});hp.resetState=Spt;hp.log=Ept;hp.handleBlur=Tb;hp.handleFocus=Mb;hp.markForFocusLater=Cpt;hp.returnFocus=Ipt;hp.popWithoutFocus=Ppt;hp.setupScopedFocus=Tpt;hp.teardownScopedFocus=Mpt;var xpt=$2.exports,bpt=wpt(xpt);function wpt(e){return e&&e.__esModule?e:{default:e}}var I0=[],P0=null,SO=!1;function Spt(){I0=[]}function Ept(){}function Tb(){SO=!0}function Mb(){if(SO){if(SO=!1,!P0)return;setTimeout(function(){if(!P0.contains(document.activeElement)){var e=(0,bpt.default)(P0)[0]||P0;e.focus()}},0)}}function Cpt(){I0.push(document.activeElement)}function Ipt(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,t=null;try{I0.length!==0&&(t=I0.pop(),t.focus({preventScroll:e}));return}catch{console.warn(["You tried to return focus to",t,"but it is not in the DOM anymore"].join(" "))}}function Ppt(){I0.length>0&&I0.pop()}function Tpt(e){P0=e,window.addEventListener?(window.addEventListener("blur",Tb,!1),document.addEventListener("focus",Mb,!0)):(window.attachEvent("onBlur",Tb),document.attachEvent("onFocus",Mb))}function Mpt(){P0=null,window.addEventListener?(window.removeEventListener("blur",Tb),document.removeEventListener("focus",Mb)):(window.detachEvent("onBlur",Tb),document.detachEvent("onFocus",Mb))}var EO={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=a;var n=$2.exports,r=i(n);function i(o){return o&&o.__esModule?o:{default:o}}function a(o,u){var c=(0,r.default)(o);if(!c.length){u.preventDefault();return}var g=void 0,_=u.shiftKey,E=c[0],C=c[c.length-1];if(o===document.activeElement){if(!_)return;g=C}if(C===document.activeElement&&!_&&(g=E),E===document.activeElement&&_&&(g=C),g){u.preventDefault(),g.focus();return}var O=/(\bChrome\b|\bSafari\b)\//.exec(navigator.userAgent),R=O!=null&&O[1]!="Chrome"&&/\biPod\b|\biPad\b/g.exec(navigator.userAgent)==null;if(!!R){var D=c.indexOf(document.activeElement);if(D>-1&&(D+=_?-1:1),g=c[D],typeof g=="undefined"){u.preventDefault(),g=_?C:E,g.focus();return}u.preventDefault(),g.focus()}}e.exports=t.default})(EO,EO.exports);var pp={},Apt=function(){},Lpt=Apt,dp={},A6={exports:{}};/*! Copyright (c) 2015 Jed Watson. Based on code that is Copyright 2013-2015, Facebook, Inc. All rights reserved. */(function(e){(function(){var t=!!(typeof window!="undefined"&&window.document&&window.document.createElement),n={canUseDOM:t,canUseWorkers:typeof Worker!="undefined",canUseEventListeners:t&&!!(window.addEventListener||window.attachEvent),canUseViewport:t&&!!window.screen};e.exports?e.exports=n:window.ExecutionEnvironment=n})()})(A6);Object.defineProperty(dp,"__esModule",{value:!0});dp.canUseDOM=dp.SafeNodeList=dp.SafeHTMLCollection=void 0;var Opt=A6.exports,Rpt=kpt(Opt);function kpt(e){return e&&e.__esModule?e:{default:e}}var j2=Rpt.default,Dpt=j2.canUseDOM?window.HTMLElement:{};dp.SafeHTMLCollection=j2.canUseDOM?window.HTMLCollection:{};dp.SafeNodeList=j2.canUseDOM?window.NodeList:{};dp.canUseDOM=j2.canUseDOM;dp.default=Dpt;Object.defineProperty(pp,"__esModule",{value:!0});pp.resetState=Upt;pp.log=Vpt;pp.assertNodeList=L6;pp.setElement=$pt;pp.validateElement=CO;pp.hide=jpt;pp.show=qpt;pp.documentNotReadyOrSSRTesting=Gpt;var Npt=Lpt,Fpt=Bpt(Npt),zpt=dp;function Bpt(e){return e&&e.__esModule?e:{default:e}}var hh=null;function Upt(){hh&&(hh.removeAttribute?hh.removeAttribute("aria-hidden"):hh.length!=null?hh.forEach(function(e){return e.removeAttribute("aria-hidden")}):document.querySelectorAll(hh).forEach(function(e){return e.removeAttribute("aria-hidden")})),hh=null}function Vpt(){}function L6(e,t){if(!e||!e.length)throw new Error("react-modal: No elements were found for selector "+t+".")}function $pt(e){var t=e;if(typeof t=="string"&&zpt.canUseDOM){var n=document.querySelectorAll(t);L6(n,t),t=n}return hh=t||hh,hh}function CO(e){var t=e||hh;return t?Array.isArray(t)||t instanceof HTMLCollection||t instanceof NodeList?t:[t]:((0,Fpt.default)(!1,["react-modal: App element is not defined.","Please use `Modal.setAppElement(el)` or set `appElement={el}`.","This is needed so screen readers don't see main content","when modal is opened. It is not recommended, but you can opt-out","by setting `ariaHideApp={false}`."].join(" ")),[])}function jpt(e){var t=!0,n=!1,r=void 0;try{for(var i=CO(e)[Symbol.iterator](),a;!(t=(a=i.next()).done);t=!0){var o=a.value;o.setAttribute("aria-hidden","true")}}catch(u){n=!0,r=u}finally{try{!t&&i.return&&i.return()}finally{if(n)throw r}}}function qpt(e){var t=!0,n=!1,r=void 0;try{for(var i=CO(e)[Symbol.iterator](),a;!(t=(a=i.next()).done);t=!0){var o=a.value;o.removeAttribute("aria-hidden")}}catch(u){n=!0,r=u}finally{try{!t&&i.return&&i.return()}finally{if(n)throw r}}}function Gpt(){hh=null}var T0={};Object.defineProperty(T0,"__esModule",{value:!0});T0.resetState=Wpt;T0.log=Hpt;var Ab={},Lb={};function O6(e,t){e.classList.remove(t)}function Wpt(){var e=document.getElementsByTagName("html")[0];for(var t in Ab)O6(e,Ab[t]);var n=document.body;for(var r in Lb)O6(n,Lb[r]);Ab={},Lb={}}function Hpt(){}var Xpt=function(t,n){return t[n]||(t[n]=0),t[n]+=1,n},Ypt=function(t,n){return t[n]&&(t[n]-=1),n},Zpt=function(t,n,r){r.forEach(function(i){Xpt(n,i),t.add(i)})},Kpt=function(t,n,r){r.forEach(function(i){Ypt(n,i),n[i]===0&&t.remove(i)})};T0.add=function(t,n){return Zpt(t.classList,t.nodeName.toLowerCase()=="html"?Ab:Lb,n.split(" "))};T0.remove=function(t,n){return Kpt(t.classList,t.nodeName.toLowerCase()=="html"?Ab:Lb,n.split(" "))};var M0={};Object.defineProperty(M0,"__esModule",{value:!0});M0.log=Qpt;M0.resetState=tdt;function Jpt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var R6=function e(){var t=this;Jpt(this,e),this.register=function(n){t.openInstances.indexOf(n)===-1&&(t.openInstances.push(n),t.emit("register"))},this.deregister=function(n){var r=t.openInstances.indexOf(n);r!==-1&&(t.openInstances.splice(r,1),t.emit("deregister"))},this.subscribe=function(n){t.subscribers.push(n)},this.emit=function(n){t.subscribers.forEach(function(r){return r(n,t.openInstances.slice())})},this.openInstances=[],this.subscribers=[]},q2=new R6;function Qpt(){console.log("portalOpenInstances ----------"),console.log(q2.openInstances.length),q2.openInstances.forEach(function(e){return console.log(e)}),console.log("end portalOpenInstances ----------")}function tdt(){q2=new R6}M0.default=q2;var IO={};Object.defineProperty(IO,"__esModule",{value:!0});IO.resetState=idt;IO.log=odt;var edt=M0,ndt=rdt(edt);function rdt(e){return e&&e.__esModule?e:{default:e}}var cl=void 0,gp=void 0,ly=[];function idt(){for(var e=[cl,gp],t=0;t<e.length;t++){var n=e[t];!n||n.parentNode&&n.parentNode.removeChild(n)}cl=gp=null,ly=[]}function odt(){console.log("bodyTrap ----------"),console.log(ly.length);for(var e=[cl,gp],t=0;t<e.length;t++){var n=e[t],r=n||{};console.log(r.nodeName,r.className,r.id)}console.log("edn bodyTrap ----------")}function k6(){ly.length!==0&&ly[ly.length-1].focusContent()}function adt(e,t){!cl&&!gp&&(cl=document.createElement("div"),cl.setAttribute("data-react-modal-body-trap",""),cl.style.position="absolute",cl.style.opacity="0",cl.setAttribute("tabindex","0"),cl.addEventListener("focus",k6),gp=cl.cloneNode(),gp.addEventListener("focus",k6)),ly=t,ly.length>0?(document.body.firstChild!==cl&&document.body.insertBefore(cl,document.body.firstChild),document.body.lastChild!==gp&&document.body.appendChild(gp)):(cl.parentElement&&cl.parentElement.removeChild(cl),gp.parentElement&&gp.parentElement.removeChild(gp))}ndt.default.subscribe(adt);(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var n=Object.assign||function(de){for(var he=1;he<arguments.length;he++){var Ge=arguments[he];for(var Yt in Ge)Object.prototype.hasOwnProperty.call(Ge,Yt)&&(de[Yt]=Ge[Yt])}return de},r=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(de){return typeof de}:function(de){return de&&typeof Symbol=="function"&&de.constructor===Symbol&&de!==Symbol.prototype?"symbol":typeof de},i=function(){function de(he,Ge){for(var Yt=0;Yt<Ge.length;Yt++){var te=Ge[Yt];te.enumerable=te.enumerable||!1,te.configurable=!0,"value"in te&&(te.writable=!0),Object.defineProperty(he,te.key,te)}}return function(he,Ge,Yt){return Ge&&de(he.prototype,Ge),Yt&&de(he,Yt),he}}(),a=Pr.exports,o=oC.exports,u=et(o),c=hp,g=K(c),_=EO.exports,E=et(_),C=pp,O=K(C),R=T0,D=K(R),B=dp,z=et(B),k=M0,$=et(k);function K(de){if(de&&de.__esModule)return de;var he={};if(de!=null)for(var Ge in de)Object.prototype.hasOwnProperty.call(de,Ge)&&(he[Ge]=de[Ge]);return he.default=de,he}function et(de){return de&&de.__esModule?de:{default:de}}function mt(de,he){if(!(de instanceof he))throw new TypeError("Cannot call a class as a function")}function wt(de,he){if(!de)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return he&&(typeof he=="object"||typeof he=="function")?he:de}function Ot(de,he){if(typeof he!="function"&&he!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof he);de.prototype=Object.create(he&&he.prototype,{constructor:{value:de,enumerable:!1,writable:!0,configurable:!0}}),he&&(Object.setPrototypeOf?Object.setPrototypeOf(de,he):de.__proto__=he)}var Bt={overlay:"ReactModal__Overlay",content:"ReactModal__Content"},se=9,_e=27,Ne=0,He=function(de){Ot(he,de);function he(Ge){mt(this,he);var Yt=wt(this,(he.__proto__||Object.getPrototypeOf(he)).call(this,Ge));return Yt.setOverlayRef=function(te){Yt.overlay=te,Yt.props.overlayRef&&Yt.props.overlayRef(te)},Yt.setContentRef=function(te){Yt.content=te,Yt.props.contentRef&&Yt.props.contentRef(te)},Yt.afterClose=function(){var te=Yt.props,ve=te.appElement,Wt=te.ariaHideApp,be=te.htmlOpenClassName,De=te.bodyOpenClassName;De&&D.remove(document.body,De),be&&D.remove(document.getElementsByTagName("html")[0],be),Wt&&Ne>0&&(Ne-=1,Ne===0&&O.show(ve)),Yt.props.shouldFocusAfterRender&&(Yt.props.shouldReturnFocusAfterClose?(g.returnFocus(Yt.props.preventScroll),g.teardownScopedFocus()):g.popWithoutFocus()),Yt.props.onAfterClose&&Yt.props.onAfterClose(),$.default.deregister(Yt)},Yt.open=function(){Yt.beforeOpen(),Yt.state.afterOpen&&Yt.state.beforeClose?(clearTimeout(Yt.closeTimer),Yt.setState({beforeClose:!1})):(Yt.props.shouldFocusAfterRender&&(g.setupScopedFocus(Yt.node),g.markForFocusLater()),Yt.setState({isOpen:!0},function(){Yt.openAnimationFrame=requestAnimationFrame(function(){Yt.setState({afterOpen:!0}),Yt.props.isOpen&&Yt.props.onAfterOpen&&Yt.props.onAfterOpen({overlayEl:Yt.overlay,contentEl:Yt.content})})}))},Yt.close=function(){Yt.props.closeTimeoutMS>0?Yt.closeWithTimeout():Yt.closeWithoutTimeout()},Yt.focusContent=function(){return Yt.content&&!Yt.contentHasFocus()&&Yt.content.focus({preventScroll:!0})},Yt.closeWithTimeout=function(){var te=Date.now()+Yt.props.closeTimeoutMS;Yt.setState({beforeClose:!0,closesAt:te},function(){Yt.closeTimer=setTimeout(Yt.closeWithoutTimeout,Yt.state.closesAt-Date.now())})},Yt.closeWithoutTimeout=function(){Yt.setState({beforeClose:!1,isOpen:!1,afterOpen:!1,closesAt:null},Yt.afterClose)},Yt.handleKeyDown=function(te){te.keyCode===se&&(0,E.default)(Yt.content,te),Yt.props.shouldCloseOnEsc&&te.keyCode===_e&&(te.stopPropagation(),Yt.requestClose(te))},Yt.handleOverlayOnClick=function(te){Yt.shouldClose===null&&(Yt.shouldClose=!0),Yt.shouldClose&&Yt.props.shouldCloseOnOverlayClick&&(Yt.ownerHandlesClose()?Yt.requestClose(te):Yt.focusContent()),Yt.shouldClose=null},Yt.handleContentOnMouseUp=function(){Yt.shouldClose=!1},Yt.handleOverlayOnMouseDown=function(te){!Yt.props.shouldCloseOnOverlayClick&&te.target==Yt.overlay&&te.preventDefault()},Yt.handleContentOnClick=function(){Yt.shouldClose=!1},Yt.handleContentOnMouseDown=function(){Yt.shouldClose=!1},Yt.requestClose=function(te){return Yt.ownerHandlesClose()&&Yt.props.onRequestClose(te)},Yt.ownerHandlesClose=function(){return Yt.props.onRequestClose},Yt.shouldBeClosed=function(){return!Yt.state.isOpen&&!Yt.state.beforeClose},Yt.contentHasFocus=function(){return document.activeElement===Yt.content||Yt.content.contains(document.activeElement)},Yt.buildClassName=function(te,ve){var Wt=(typeof ve=="undefined"?"undefined":r(ve))==="object"?ve:{base:Bt[te],afterOpen:Bt[te]+"--after-open",beforeClose:Bt[te]+"--before-close"},be=Wt.base;return Yt.state.afterOpen&&(be=be+" "+Wt.afterOpen),Yt.state.beforeClose&&(be=be+" "+Wt.beforeClose),typeof ve=="string"&&ve?be+" "+ve:be},Yt.attributesFromObject=function(te,ve){return Object.keys(ve).reduce(function(Wt,be){return Wt[te+"-"+be]=ve[be],Wt},{})},Yt.state={afterOpen:!1,beforeClose:!1},Yt.shouldClose=null,Yt.moveFromContentToOverlay=null,Yt}return i(he,[{key:"componentDidMount",value:function(){this.props.isOpen&&this.open()}},{key:"componentDidUpdate",value:function(Yt,te){this.props.isOpen&&!Yt.isOpen?this.open():!this.props.isOpen&&Yt.isOpen&&this.close(),this.props.shouldFocusAfterRender&&this.state.isOpen&&!te.isOpen&&this.focusContent()}},{key:"componentWillUnmount",value:function(){this.state.isOpen&&this.afterClose(),clearTimeout(this.closeTimer),cancelAnimationFrame(this.openAnimationFrame)}},{key:"beforeOpen",value:function(){var Yt=this.props,te=Yt.appElement,ve=Yt.ariaHideApp,Wt=Yt.htmlOpenClassName,be=Yt.bodyOpenClassName;be&&D.add(document.body,be),Wt&&D.add(document.getElementsByTagName("html")[0],Wt),ve&&(Ne+=1,O.hide(te)),$.default.register(this)}},{key:"render",value:function(){var Yt=this.props,te=Yt.id,ve=Yt.className,Wt=Yt.overlayClassName,be=Yt.defaultStyles,De=Yt.children,Fn=ve?{}:be.content,ar=Wt?{}:be.overlay;if(this.shouldBeClosed())return null;var Jn={ref:this.setOverlayRef,className:this.buildClassName("overlay",Wt),style:n({},ar,this.props.style.overlay),onClick:this.handleOverlayOnClick,onMouseDown:this.handleOverlayOnMouseDown},Ar=n({id:te,ref:this.setContentRef,style:n({},Fn,this.props.style.content),className:this.buildClassName("content",ve),tabIndex:"-1",onKeyDown:this.handleKeyDown,onMouseDown:this.handleContentOnMouseDown,onMouseUp:this.handleContentOnMouseUp,onClick:this.handleContentOnClick,role:this.props.role,"aria-label":this.props.contentLabel},this.attributesFromObject("aria",n({modal:!0},this.props.aria)),this.attributesFromObject("data",this.props.data||{}),{"data-testid":this.props.testId}),cr=this.props.contentElement(Ar,De);return this.props.overlayElement(Jn,cr)}}]),he}(a.Component);He.defaultProps={style:{overlay:{},content:{}},defaultStyles:{}},He.propTypes={isOpen:u.default.bool.isRequired,defaultStyles:u.default.shape({content:u.default.object,overlay:u.default.object}),style:u.default.shape({content:u.default.object,overlay:u.default.object}),className:u.default.oneOfType([u.default.string,u.default.object]),overlayClassName:u.default.oneOfType([u.default.string,u.default.object]),bodyOpenClassName:u.default.string,htmlOpenClassName:u.default.string,ariaHideApp:u.default.bool,appElement:u.default.oneOfType([u.default.instanceOf(z.default),u.default.instanceOf(B.SafeHTMLCollection),u.default.instanceOf(B.SafeNodeList),u.default.arrayOf(u.default.instanceOf(z.default))]),onAfterOpen:u.default.func,onAfterClose:u.default.func,onRequestClose:u.default.func,closeTimeoutMS:u.default.number,shouldFocusAfterRender:u.default.bool,shouldCloseOnOverlayClick:u.default.bool,shouldReturnFocusAfterClose:u.default.bool,preventScroll:u.default.bool,role:u.default.string,contentLabel:u.default.string,aria:u.default.object,data:u.default.object,children:u.default.node,shouldCloseOnEsc:u.default.bool,overlayRef:u.default.func,contentRef:u.default.func,id:u.default.string,overlayElement:u.default.func,contentElement:u.default.func,testId:u.default.string},t.default=He,e.exports=t.default})(wO,wO.exports);function D6(){var e=this.constructor.getDerivedStateFromProps(this.props,this.state);e!=null&&this.setState(e)}function N6(e){function t(n){var r=this.constructor.getDerivedStateFromProps(e,n);return r!=null?r:null}this.setState(t.bind(this))}function F6(e,t){try{var n=this.props,r=this.state;this.props=e,this.state=t,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(n,r)}finally{this.props=n,this.state=r}}D6.__suppressDeprecationWarning=!0;N6.__suppressDeprecationWarning=!0;F6.__suppressDeprecationWarning=!0;function sdt(e){var t=e.prototype;if(!t||!t.isReactComponent)throw new Error("Can only polyfill class components");if(typeof e.getDerivedStateFromProps!="function"&&typeof t.getSnapshotBeforeUpdate!="function")return e;var n=null,r=null,i=null;if(typeof t.componentWillMount=="function"?n="componentWillMount":typeof t.UNSAFE_componentWillMount=="function"&&(n="UNSAFE_componentWillMount"),typeof t.componentWillReceiveProps=="function"?r="componentWillReceiveProps":typeof t.UNSAFE_componentWillReceiveProps=="function"&&(r="UNSAFE_componentWillReceiveProps"),typeof t.componentWillUpdate=="function"?i="componentWillUpdate":typeof t.UNSAFE_componentWillUpdate=="function"&&(i="UNSAFE_componentWillUpdate"),n!==null||r!==null||i!==null){var a=e.displayName||e.name,o=typeof e.getDerivedStateFromProps=="function"?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error(`Unsafe legacy lifecycles will not be called for components using new component APIs. `+a+" uses "+o+" but also contains the following legacy lifecycles:"+(n!==null?` `+n:"")+(r!==null?` `+r:"")+(i!==null?` `+i:"")+` The above lifecycles should be removed. Learn more about this warning here: https://fb.me/react-async-component-lifecycle-hooks`)}if(typeof e.getDerivedStateFromProps=="function"&&(t.componentWillMount=D6,t.componentWillReceiveProps=N6),typeof t.getSnapshotBeforeUpdate=="function"){if(typeof t.componentDidUpdate!="function")throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");t.componentWillUpdate=F6;var u=t.componentDidUpdate;t.componentDidUpdate=function(g,_,E){var C=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:E;u.call(this,g,_,C)}}return e}var udt=Object.freeze(Object.defineProperty({__proto__:null,polyfill:sdt},Symbol.toStringTag,{value:"Module"})),ldt=Z9(udt);Object.defineProperty(uy,"__esModule",{value:!0});uy.bodyOpenClassName=uy.portalClassName=void 0;var z6=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},cdt=function(){function e(t,n){for(var r=0;r<n.length;r++){var i=n[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),B6=Pr.exports,G2=Ob(B6),fdt=i1.exports,W2=Ob(fdt),hdt=oC.exports,Tr=Ob(hdt),pdt=wO.exports,U6=Ob(pdt),ddt=pp,gdt=vdt(ddt),Fm=dp,V6=Ob(Fm),mdt=ldt;function vdt(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function Ob(e){return e&&e.__esModule?e:{default:e}}function ydt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function $6(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&(typeof t=="object"||typeof t=="function")?t:e}function _dt(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var xdt=uy.portalClassName="ReactModalPortal",bdt=uy.bodyOpenClassName="ReactModal__Body--open",cy=Fm.canUseDOM&&W2.default.createPortal!==void 0,j6=function(t){return document.createElement(t)},q6=function(){return cy?W2.default.createPortal:W2.default.unstable_renderSubtreeIntoContainer};function H2(e){return e()}var Rb=function(e){_dt(t,e);function t(){var n,r,i,a;ydt(this,t);for(var o=arguments.length,u=Array(o),c=0;c<o;c++)u[c]=arguments[c];return a=(r=(i=$6(this,(n=t.__proto__||Object.getPrototypeOf(t)).call.apply(n,[this].concat(u))),i),i.removePortal=function(){!cy&&W2.default.unmountComponentAtNode(i.node);var g=H2(i.props.parentSelector);g&&g.contains(i.node)?g.removeChild(i.node):console.warn('React-Modal: "parentSelector" prop did not returned any DOM element. Make sure that the parent element is unmounted to avoid any memory leaks.')},i.portalRef=function(g){i.portal=g},i.renderPortal=function(g){var _=q6(),E=_(i,G2.default.createElement(U6.default,z6({defaultStyles:t.defaultStyles},g)),i.node);i.portalRef(E)},r),$6(i,a)}return cdt(t,[{key:"componentDidMount",value:function(){if(!!Fm.canUseDOM){cy||(this.node=j6("div")),this.node.className=this.props.portalClassName;var r=H2(this.props.parentSelector);r.appendChild(this.node),!cy&&this.renderPortal(this.props)}}},{key:"getSnapshotBeforeUpdate",value:function(r){var i=H2(r.parentSelector),a=H2(this.props.parentSelector);return{prevParent:i,nextParent:a}}},{key:"componentDidUpdate",value:function(r,i,a){if(!!Fm.canUseDOM){var o=this.props,u=o.isOpen,c=o.portalClassName;r.portalClassName!==c&&(this.node.className=c);var g=a.prevParent,_=a.nextParent;_!==g&&(g.removeChild(this.node),_.appendChild(this.node)),!(!r.isOpen&&!u)&&!cy&&this.renderPortal(this.props)}}},{key:"componentWillUnmount",value:function(){if(!(!Fm.canUseDOM||!this.node||!this.portal)){var r=this.portal.state,i=Date.now(),a=r.isOpen&&this.props.closeTimeoutMS&&(r.closesAt||i+this.props.closeTimeoutMS);a?(r.beforeClose||this.portal.closeWithTimeout(),setTimeout(this.removePortal,a-i)):this.removePortal()}}},{key:"render",value:function(){if(!Fm.canUseDOM||!cy)return null;!this.node&&cy&&(this.node=j6("div"));var r=q6();return r(G2.default.createElement(U6.default,z6({ref:this.portalRef,defaultStyles:t.defaultStyles},this.props)),this.node)}}],[{key:"setAppElement",value:function(r){gdt.setElement(r)}}]),t}(B6.Component);Rb.propTypes={isOpen:Tr.default.bool.isRequired,style:Tr.default.shape({content:Tr.default.object,overlay:Tr.default.object}),portalClassName:Tr.default.string,bodyOpenClassName:Tr.default.string,htmlOpenClassName:Tr.default.string,className:Tr.default.oneOfType([Tr.default.string,Tr.default.shape({base:Tr.default.string.isRequired,afterOpen:Tr.default.string.isRequired,beforeClose:Tr.default.string.isRequired})]),overlayClassName:Tr.default.oneOfType([Tr.default.string,Tr.default.shape({base:Tr.default.string.isRequired,afterOpen:Tr.default.string.isRequired,beforeClose:Tr.default.string.isRequired})]),appElement:Tr.default.oneOfType([Tr.default.instanceOf(V6.default),Tr.default.instanceOf(Fm.SafeHTMLCollection),Tr.default.instanceOf(Fm.SafeNodeList),Tr.default.arrayOf(Tr.default.instanceOf(V6.default))]),onAfterOpen:Tr.default.func,onRequestClose:Tr.default.func,closeTimeoutMS:Tr.default.number,ariaHideApp:Tr.default.bool,shouldFocusAfterRender:Tr.default.bool,shouldCloseOnOverlayClick:Tr.default.bool,shouldReturnFocusAfterClose:Tr.default.bool,preventScroll:Tr.default.bool,parentSelector:Tr.default.func,aria:Tr.default.object,data:Tr.default.object,role:Tr.default.string,contentLabel:Tr.default.string,shouldCloseOnEsc:Tr.default.bool,overlayRef:Tr.default.func,contentRef:Tr.default.func,id:Tr.default.string,overlayElement:Tr.default.func,contentElement:Tr.default.func};Rb.defaultProps={isOpen:!1,portalClassName:xdt,bodyOpenClassName:bdt,role:"dialog",ariaHideApp:!0,closeTimeoutMS:0,shouldFocusAfterRender:!0,shouldCloseOnEsc:!0,shouldCloseOnOverlayClick:!0,shouldReturnFocusAfterClose:!0,preventScroll:!1,parentSelector:function(){return document.body},overlayElement:function(t,n){return G2.default.createElement("div",t,n)},contentElement:function(t,n){return G2.default.createElement("div",t,n)}};Rb.defaultStyles={overlay:{position:"fixed",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(255, 255, 255, 0.75)"},content:{position:"absolute",top:"40px",left:"40px",right:"40px",bottom:"40px",border:"1px solid #ccc",background:"#fff",overflow:"auto",WebkitOverflowScrolling:"touch",borderRadius:"4px",outline:"none",padding:"20px"}};(0,mdt.polyfill)(Rb);uy.default=Rb;(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var n=uy,r=i(n);function i(a){return a&&a.__esModule?a:{default:a}}t.default=r.default,e.exports=t.default})(bO,bO.exports);var iEt=Y9(bO.exports);function PO(e,t){return PO=Object.setPrototypeOf||function(r,i){return r.__proto__=i,r},PO(e,t)}function ph(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,PO(e,t)}function X2(e){return e.charAt(0)==="/"}function TO(e,t){for(var n=t,r=n+1,i=e.length;r<i;n+=1,r+=1)e[n]=e[r];e.pop()}function wdt(e,t){t===void 0&&(t="");var n=e&&e.split("/")||[],r=t&&t.split("/")||[],i=e&&X2(e),a=t&&X2(t),o=i||a;if(e&&X2(e)?r=n:n.length&&(r.pop(),r=r.concat(n)),!r.length)return"/";var u;if(r.length){var c=r[r.length-1];u=c==="."||c===".."||c===""}else u=!1;for(var g=0,_=r.length;_>=0;_--){var E=r[_];E==="."?TO(r,_):E===".."?(TO(r,_),g++):g&&(TO(r,_),g--)}if(!o)for(;g--;g)r.unshift("..");o&&r[0]!==""&&(!r[0]||!X2(r[0]))&&r.unshift("");var C=r.join("/");return u&&C.substr(-1)!=="/"&&(C+="/"),C}var Sdt=!0,G6="Invariant failed";function fy(e,t){if(!e)throw Sdt?new Error(G6):new Error(G6+": "+(t||""))}function kb(e){return e.charAt(0)==="/"?e:"/"+e}function W6(e){return e.charAt(0)==="/"?e.substr(1):e}function Edt(e,t){return e.toLowerCase().indexOf(t.toLowerCase())===0&&"/?#".indexOf(e.charAt(t.length))!==-1}function H6(e,t){return Edt(e,t)?e.substr(t.length):e}function X6(e){return e.charAt(e.length-1)==="/"?e.slice(0,-1):e}function Cdt(e){var t=e||"/",n="",r="",i=t.indexOf("#");i!==-1&&(r=t.substr(i),t=t.substr(0,i));var a=t.indexOf("?");return a!==-1&&(n=t.substr(a),t=t.substr(0,a)),{pathname:t,search:n==="?"?"":n,hash:r==="#"?"":r}}function bc(e){var t=e.pathname,n=e.search,r=e.hash,i=t||"/";return n&&n!=="?"&&(i+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(i+=r.charAt(0)==="#"?r:"#"+r),i}function hf(e,t,n,r){var i;typeof e=="string"?(i=Cdt(e),i.state=t):(i=Vn({},e),i.pathname===void 0&&(i.pathname=""),i.search?i.search.charAt(0)!=="?"&&(i.search="?"+i.search):i.search="",i.hash?i.hash.charAt(0)!=="#"&&(i.hash="#"+i.hash):i.hash="",t!==void 0&&i.state===void 0&&(i.state=t));try{i.pathname=decodeURI(i.pathname)}catch(a){throw a instanceof URIError?new URIError('Pathname "'+i.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):a}return n&&(i.key=n),r?i.pathname?i.pathname.charAt(0)!=="/"&&(i.pathname=wdt(i.pathname,r.pathname)):i.pathname=r.pathname:i.pathname||(i.pathname="/"),i}function MO(){var e=null;function t(o){return e=o,function(){e===o&&(e=null)}}function n(o,u,c,g){if(e!=null){var _=typeof e=="function"?e(o,u):e;typeof _=="string"?typeof c=="function"?c(_,g):g(!0):g(_!==!1)}else g(!0)}var r=[];function i(o){var u=!0;function c(){u&&o.apply(void 0,arguments)}return r.push(c),function(){u=!1,r=r.filter(function(g){return g!==c})}}function a(){for(var o=arguments.length,u=new Array(o),c=0;c<o;c++)u[c]=arguments[c];r.forEach(function(g){return g.apply(void 0,u)})}return{setPrompt:t,confirmTransitionTo:n,appendListener:i,notifyListeners:a}}var Y6=!!(typeof window!="undefined"&&window.document&&window.document.createElement);function Z6(e,t){t(window.confirm(e))}function Idt(){var e=window.navigator.userAgent;return(e.indexOf("Android 2.")!==-1||e.indexOf("Android 4.0")!==-1)&&e.indexOf("Mobile Safari")!==-1&&e.indexOf("Chrome")===-1&&e.indexOf("Windows Phone")===-1?!1:window.history&&"pushState"in window.history}function Pdt(){return window.navigator.userAgent.indexOf("Trident")===-1}function Tdt(){return window.navigator.userAgent.indexOf("Firefox")===-1}function Mdt(e){return e.state===void 0&&navigator.userAgent.indexOf("CriOS")===-1}var K6="popstate",J6="hashchange";function Q6(){try{return window.history.state||{}}catch{return{}}}function Adt(e){e===void 0&&(e={}),Y6||fy(!1);var t=window.history,n=Idt(),r=!Pdt(),i=e,a=i.forceRefresh,o=a===void 0?!1:a,u=i.getUserConfirmation,c=u===void 0?Z6:u,g=i.keyLength,_=g===void 0?6:g,E=e.basename?X6(kb(e.basename)):"";function C(ve){var Wt=ve||{},be=Wt.key,De=Wt.state,Fn=window.location,ar=Fn.pathname,Jn=Fn.search,Ar=Fn.hash,cr=ar+Jn+Ar;return E&&(cr=H6(cr,E)),hf(cr,De,be)}function O(){return Math.random().toString(36).substr(2,_)}var R=MO();function D(ve){Vn(te,ve),te.length=t.length,R.notifyListeners(te.location,te.action)}function B(ve){Mdt(ve)||$(C(ve.state))}function z(){$(C(Q6()))}var k=!1;function $(ve){if(k)k=!1,D();else{var Wt="POP";R.confirmTransitionTo(ve,Wt,c,function(be){be?D({action:Wt,location:ve}):K(ve)})}}function K(ve){var Wt=te.location,be=mt.indexOf(Wt.key);be===-1&&(be=0);var De=mt.indexOf(ve.key);De===-1&&(De=0);var Fn=be-De;Fn&&(k=!0,se(Fn))}var et=C(Q6()),mt=[et.key];function wt(ve){return E+bc(ve)}function Ot(ve,Wt){var be="PUSH",De=hf(ve,Wt,O(),te.location);R.confirmTransitionTo(De,be,c,function(Fn){if(!!Fn){var ar=wt(De),Jn=De.key,Ar=De.state;if(n)if(t.pushState({key:Jn,state:Ar},null,ar),o)window.location.href=ar;else{var cr=mt.indexOf(te.location.key),Fi=mt.slice(0,cr+1);Fi.push(De.key),mt=Fi,D({action:be,location:De})}else window.location.href=ar}})}function Bt(ve,Wt){var be="REPLACE",De=hf(ve,Wt,O(),te.location);R.confirmTransitionTo(De,be,c,function(Fn){if(!!Fn){var ar=wt(De),Jn=De.key,Ar=De.state;if(n)if(t.replaceState({key:Jn,state:Ar},null,ar),o)window.location.replace(ar);else{var cr=mt.indexOf(te.location.key);cr!==-1&&(mt[cr]=De.key),D({action:be,location:De})}else window.location.replace(ar)}})}function se(ve){t.go(ve)}function _e(){se(-1)}function Ne(){se(1)}var He=0;function de(ve){He+=ve,He===1&&ve===1?(window.addEventListener(K6,B),r&&window.addEventListener(J6,z)):He===0&&(window.removeEventListener(K6,B),r&&window.removeEventListener(J6,z))}var he=!1;function Ge(ve){ve===void 0&&(ve=!1);var Wt=R.setPrompt(ve);return he||(de(1),he=!0),function(){return he&&(he=!1,de(-1)),Wt()}}function Yt(ve){var Wt=R.appendListener(ve);return de(1),function(){de(-1),Wt()}}var te={length:t.length,action:"POP",location:et,createHref:wt,push:Ot,replace:Bt,go:se,goBack:_e,goForward:Ne,block:Ge,listen:Yt};return te}var tU="hashchange",Ldt={hashbang:{encodePath:function(t){return t.charAt(0)==="!"?t:"!/"+W6(t)},decodePath:function(t){return t.charAt(0)==="!"?t.substr(1):t}},noslash:{encodePath:W6,decodePath:kb},slash:{encodePath:kb,decodePath:kb}};function eU(e){var t=e.indexOf("#");return t===-1?e:e.slice(0,t)}function Db(){var e=window.location.href,t=e.indexOf("#");return t===-1?"":e.substring(t+1)}function Odt(e){window.location.hash=e}function AO(e){window.location.replace(eU(window.location.href)+"#"+e)}function Rdt(e){e===void 0&&(e={}),Y6||fy(!1);var t=window.history;Tdt();var n=e,r=n.getUserConfirmation,i=r===void 0?Z6:r,a=n.hashType,o=a===void 0?"slash":a,u=e.basename?X6(kb(e.basename)):"",c=Ldt[o],g=c.encodePath,_=c.decodePath;function E(){var Wt=_(Db());return u&&(Wt=H6(Wt,u)),hf(Wt)}var C=MO();function O(Wt){Vn(ve,Wt),ve.length=t.length,C.notifyListeners(ve.location,ve.action)}var R=!1,D=null;function B(Wt,be){return Wt.pathname===be.pathname&&Wt.search===be.search&&Wt.hash===be.hash}function z(){var Wt=Db(),be=g(Wt);if(Wt!==be)AO(be);else{var De=E(),Fn=ve.location;if(!R&&B(Fn,De)||D===bc(De))return;D=null,k(De)}}function k(Wt){if(R)R=!1,O();else{var be="POP";C.confirmTransitionTo(Wt,be,i,function(De){De?O({action:be,location:Wt}):$(Wt)})}}function $(Wt){var be=ve.location,De=wt.lastIndexOf(bc(be));De===-1&&(De=0);var Fn=wt.lastIndexOf(bc(Wt));Fn===-1&&(Fn=0);var ar=De-Fn;ar&&(R=!0,_e(ar))}var K=Db(),et=g(K);K!==et&&AO(et);var mt=E(),wt=[bc(mt)];function Ot(Wt){var be=document.querySelector("base"),De="";return be&&be.getAttribute("href")&&(De=eU(window.location.href)),De+"#"+g(u+bc(Wt))}function Bt(Wt,be){var De="PUSH",Fn=hf(Wt,void 0,void 0,ve.location);C.confirmTransitionTo(Fn,De,i,function(ar){if(!!ar){var Jn=bc(Fn),Ar=g(u+Jn),cr=Db()!==Ar;if(cr){D=Jn,Odt(Ar);var Fi=wt.lastIndexOf(bc(ve.location)),fr=wt.slice(0,Fi+1);fr.push(Jn),wt=fr,O({action:De,location:Fn})}else O()}})}function se(Wt,be){var De="REPLACE",Fn=hf(Wt,void 0,void 0,ve.location);C.confirmTransitionTo(Fn,De,i,function(ar){if(!!ar){var Jn=bc(Fn),Ar=g(u+Jn),cr=Db()!==Ar;cr&&(D=Jn,AO(Ar));var Fi=wt.indexOf(bc(ve.location));Fi!==-1&&(wt[Fi]=Jn),O({action:De,location:Fn})}})}function _e(Wt){t.go(Wt)}function Ne(){_e(-1)}function He(){_e(1)}var de=0;function he(Wt){de+=Wt,de===1&&Wt===1?window.addEventListener(tU,z):de===0&&window.removeEventListener(tU,z)}var Ge=!1;function Yt(Wt){Wt===void 0&&(Wt=!1);var be=C.setPrompt(Wt);return Ge||(he(1),Ge=!0),function(){return Ge&&(Ge=!1,he(-1)),be()}}function te(Wt){var be=C.appendListener(Wt);return he(1),function(){he(-1),be()}}var ve={length:t.length,action:"POP",location:mt,createHref:Ot,push:Bt,replace:se,go:_e,goBack:Ne,goForward:He,block:Yt,listen:te};return ve}function nU(e,t,n){return Math.min(Math.max(e,t),n)}function kdt(e){e===void 0&&(e={});var t=e,n=t.getUserConfirmation,r=t.initialEntries,i=r===void 0?["/"]:r,a=t.initialIndex,o=a===void 0?0:a,u=t.keyLength,c=u===void 0?6:u,g=MO();function _(Ot){Vn(wt,Ot),wt.length=wt.entries.length,g.notifyListeners(wt.location,wt.action)}function E(){return Math.random().toString(36).substr(2,c)}var C=nU(o,0,i.length-1),O=i.map(function(Ot){return typeof Ot=="string"?hf(Ot,void 0,E()):hf(Ot,void 0,Ot.key||E())}),R=bc;function D(Ot,Bt){var se="PUSH",_e=hf(Ot,Bt,E(),wt.location);g.confirmTransitionTo(_e,se,n,function(Ne){if(!!Ne){var He=wt.index,de=He+1,he=wt.entries.slice(0);he.length>de?he.splice(de,he.length-de,_e):he.push(_e),_({action:se,location:_e,index:de,entries:he})}})}function B(Ot,Bt){var se="REPLACE",_e=hf(Ot,Bt,E(),wt.location);g.confirmTransitionTo(_e,se,n,function(Ne){!Ne||(wt.entries[wt.index]=_e,_({action:se,location:_e}))})}function z(Ot){var Bt=nU(wt.index+Ot,0,wt.entries.length-1),se="POP",_e=wt.entries[Bt];g.confirmTransitionTo(_e,se,n,function(Ne){Ne?_({action:se,location:_e,index:Bt}):_()})}function k(){z(-1)}function $(){z(1)}function K(Ot){var Bt=wt.index+Ot;return Bt>=0&&Bt<wt.entries.length}function et(Ot){return Ot===void 0&&(Ot=!1),g.setPrompt(Ot)}function mt(Ot){return g.appendListener(Ot)}var wt={length:O.length,action:"POP",location:O[C],index:C,entries:O,createHref:R,push:D,replace:B,go:z,goBack:k,goForward:$,canGo:K,block:et,listen:mt};return wt}var LO=1073741823,rU=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:{};function Ddt(){var e="__global_unique_id__";return rU[e]=(rU[e]||0)+1}function Ndt(e,t){return e===t?e!==0||1/e==1/t:e!==e&&t!==t}function Fdt(e){var t=[];return{on:function(r){t.push(r)},off:function(r){t=t.filter(function(i){return i!==r})},get:function(){return e},set:function(r,i){e=r,t.forEach(function(a){return a(e,i)})}}}function zdt(e){return Array.isArray(e)?e[0]:e}function Bdt(e,t){var n,r,i="__create-react-context-"+Ddt()+"__",a=function(u){ph(c,u);function c(){var _;return _=u.apply(this,arguments)||this,_.emitter=Fdt(_.props.value),_}var g=c.prototype;return g.getChildContext=function(){var E;return E={},E[i]=this.emitter,E},g.componentWillReceiveProps=function(E){if(this.props.value!==E.value){var C=this.props.value,O=E.value,R;Ndt(C,O)?R=0:(R=typeof t=="function"?t(C,O):LO,R|=0,R!==0&&this.emitter.set(E.value,R))}},g.render=function(){return this.props.children},c}(Pr.exports.Component);a.childContextTypes=(n={},n[i]=xz.object.isRequired,n);var o=function(u){ph(c,u);function c(){var _;return _=u.apply(this,arguments)||this,_.state={value:_.getValue()},_.onUpdate=function(E,C){var O=_.observedBits|0;(O&C)!=0&&_.setState({value:_.getValue()})},_}var g=c.prototype;return g.componentWillReceiveProps=function(E){var C=E.observedBits;this.observedBits=C==null?LO:C},g.componentDidMount=function(){this.context[i]&&this.context[i].on(this.onUpdate);var E=this.props.observedBits;this.observedBits=E==null?LO:E},g.componentWillUnmount=function(){this.context[i]&&this.context[i].off(this.onUpdate)},g.getValue=function(){return this.context[i]?this.context[i].get():e},g.render=function(){return zdt(this.props.children)(this.state.value)},c}(Pr.exports.Component);return o.contextTypes=(r={},r[i]=xz.object,r),{Provider:a,Consumer:o}}var Udt=vr.createContext||Bdt,A0={exports:{}},Vdt=Array.isArray||function(e){return Object.prototype.toString.call(e)=="[object Array]"},Y2=Vdt;A0.exports=aU;A0.exports.parse=OO;A0.exports.compile=jdt;A0.exports.tokensToFunction=iU;A0.exports.tokensToRegExp=oU;var $dt=new RegExp(["(\\\\.)","([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))"].join("|"),"g");function OO(e,t){for(var n=[],r=0,i=0,a="",o=t&&t.delimiter||"/",u;(u=$dt.exec(e))!=null;){var c=u[0],g=u[1],_=u.index;if(a+=e.slice(i,_),i=_+c.length,g){a+=g[1];continue}var E=e[i],C=u[2],O=u[3],R=u[4],D=u[5],B=u[6],z=u[7];a&&(n.push(a),a="");var k=C!=null&&E!=null&&E!==C,$=B==="+"||B==="*",K=B==="?"||B==="*",et=u[2]||o,mt=R||D;n.push({name:O||r++,prefix:C||"",delimiter:et,optional:K,repeat:$,partial:k,asterisk:!!z,pattern:mt?Wdt(mt):z?".*":"[^"+Z2(et)+"]+?"})}return i<e.length&&(a+=e.substr(i)),a&&n.push(a),n}function jdt(e,t){return iU(OO(e,t),t)}function qdt(e){return encodeURI(e).replace(/[\/?#]/g,function(t){return"%"+t.charCodeAt(0).toString(16).toUpperCase()})}function Gdt(e){return encodeURI(e).replace(/[?#]/g,function(t){return"%"+t.charCodeAt(0).toString(16).toUpperCase()})}function iU(e,t){for(var n=new Array(e.length),r=0;r<e.length;r++)typeof e[r]=="object"&&(n[r]=new RegExp("^(?:"+e[r].pattern+")$",kO(t)));return function(i,a){for(var o="",u=i||{},c=a||{},g=c.pretty?qdt:encodeURIComponent,_=0;_<e.length;_++){var E=e[_];if(typeof E=="string"){o+=E;continue}var C=u[E.name],O;if(C==null)if(E.optional){E.partial&&(o+=E.prefix);continue}else throw new TypeError('Expected "'+E.name+'" to be defined');if(Y2(C)){if(!E.repeat)throw new TypeError('Expected "'+E.name+'" to not repeat, but received `'+JSON.stringify(C)+"`");if(C.length===0){if(E.optional)continue;throw new TypeError('Expected "'+E.name+'" to not be empty')}for(var R=0;R<C.length;R++){if(O=g(C[R]),!n[_].test(O))throw new TypeError('Expected all "'+E.name+'" to match "'+E.pattern+'", but received `'+JSON.stringify(O)+"`");o+=(R===0?E.prefix:E.delimiter)+O}continue}if(O=E.asterisk?Gdt(C):g(C),!n[_].test(O))throw new TypeError('Expected "'+E.name+'" to match "'+E.pattern+'", but received "'+O+'"');o+=E.prefix+O}return o}}function Z2(e){return e.replace(/([.+*?=^!:${}()[\]|\/\\])/g,"\\$1")}function Wdt(e){return e.replace(/([=!:$\/()])/g,"\\$1")}function RO(e,t){return e.keys=t,e}function kO(e){return e&&e.sensitive?"":"i"}function Hdt(e,t){var n=e.source.match(/\((?!\?)/g);if(n)for(var r=0;r<n.length;r++)t.push({name:r,prefix:null,delimiter:null,optional:!1,repeat:!1,partial:!1,asterisk:!1,pattern:null});return RO(e,t)}function Xdt(e,t,n){for(var r=[],i=0;i<e.length;i++)r.push(aU(e[i],t,n).source);var a=new RegExp("(?:"+r.join("|")+")",kO(n));return RO(a,t)}function Ydt(e,t,n){return oU(OO(e,n),t,n)}function oU(e,t,n){Y2(t)||(n=t||n,t=[]),n=n||{};for(var r=n.strict,i=n.end!==!1,a="",o=0;o<e.length;o++){var u=e[o];if(typeof u=="string")a+=Z2(u);else{var c=Z2(u.prefix),g="(?:"+u.pattern+")";t.push(u),u.repeat&&(g+="(?:"+c+g+")*"),u.optional?u.partial?g=c+"("+g+")?":g="(?:"+c+"("+g+"))?":g=c+"("+g+")",a+=g}}var _=Z2(n.delimiter||"/"),E=a.slice(-_.length)===_;return r||(a=(E?a.slice(0,-_.length):a)+"(?:"+_+"(?=$))?"),i?a+="$":a+=r&&E?"":"(?="+_+"|$)",RO(new RegExp("^"+a,kO(n)),t)}function aU(e,t,n){return Y2(t)||(n=t||n,t=[]),n=n||{},e instanceof RegExp?Hdt(e,t):Y2(e)?Xdt(e,t,n):Ydt(e,t,n)}var Zdt=A0.exports,sU=function(t){var n=Udt();return n.displayName=t,n},Kdt=sU("Router-History"),L0=sU("Router"),K2=function(e){ph(t,e),t.computeRootMatch=function(i){return{path:"/",url:"/",params:{},isExact:i==="/"}};function t(r){var i;return i=e.call(this,r)||this,i.state={location:r.history.location},i._isMounted=!1,i._pendingLocation=null,r.staticContext||(i.unlisten=r.history.listen(function(a){i._isMounted?i.setState({location:a}):i._pendingLocation=a})),i}var n=t.prototype;return n.componentDidMount=function(){this._isMounted=!0,this._pendingLocation&&this.setState({location:this._pendingLocation})},n.componentWillUnmount=function(){this.unlisten&&(this.unlisten(),this._isMounted=!1,this._pendingLocation=null)},n.render=function(){return vr.createElement(L0.Provider,{value:{history:this.props.history,location:this.state.location,match:t.computeRootMatch(this.state.location.pathname),staticContext:this.props.staticContext}},vr.createElement(Kdt.Provider,{children:this.props.children||null,value:this.props.history}))},t}(vr.Component);vr.Component;vr.Component;var uU={},Jdt=1e4,lU=0;function Qdt(e,t){var n=""+t.end+t.strict+t.sensitive,r=uU[n]||(uU[n]={});if(r[e])return r[e];var i=[],a=Zdt(e,i,t),o={regexp:a,keys:i};return lU<Jdt&&(r[e]=o,lU++),o}function DO(e,t){t===void 0&&(t={}),(typeof t=="string"||Array.isArray(t))&&(t={path:t});var n=t,r=n.path,i=n.exact,a=i===void 0?!1:i,o=n.strict,u=o===void 0?!1:o,c=n.sensitive,g=c===void 0?!1:c,_=[].concat(r);return _.reduce(function(E,C){if(!C&&C!=="")return null;if(E)return E;var O=Qdt(C,{end:a,strict:u,sensitive:g}),R=O.regexp,D=O.keys,B=R.exec(e);if(!B)return null;var z=B[0],k=B.slice(1),$=e===z;return a&&!$?null:{path:C,url:C==="/"&&z===""?"/":z,isExact:$,params:D.reduce(function(K,et,mt){return K[et.name]=k[mt],K},{})}},null)}function tgt(e){return vr.Children.count(e)===0}vr.Component;function NO(e){return e.charAt(0)==="/"?e:"/"+e}function egt(e,t){return e?Vn({},t,{pathname:NO(e)+t.pathname}):t}function ngt(e,t){if(!e)return t;var n=NO(e);return t.pathname.indexOf(n)!==0?t:Vn({},t,{pathname:t.pathname.substr(n.length)})}function cU(e){return typeof e=="string"?e:bc(e)}function FO(e){return function(){fy(!1)}}function fU(){}vr.Component;vr.Component;vr.useContext;vr.Component;vr.Component;var zO=function(t,n){return typeof t=="function"?t(n):t},BO=function(t,n){return typeof t=="string"?hf(t,null,null,n):t},UO=function(t){return t},O0=vr.forwardRef;typeof O0=="undefined"&&(O0=UO);function rgt(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}var igt=O0(function(e,t){var n=e.innerRef,r=e.navigate,i=e.onClick,a=Zp(e,["innerRef","navigate","onClick"]),o=a.target,u=Vn({},a,{onClick:function(g){try{i&&i(g)}catch(_){throw g.preventDefault(),_}!g.defaultPrevented&&g.button===0&&(!o||o==="_self")&&!rgt(g)&&(g.preventDefault(),r())}});return UO!==O0?u.ref=t||n:u.ref=n,vr.createElement("a",u)}),ogt=O0(function(e,t){var n=e.component,r=n===void 0?igt:n,i=e.replace,a=e.to,o=e.innerRef,u=Zp(e,["component","replace","to","innerRef"]);return vr.createElement(L0.Consumer,null,function(c){c||fy(!1);var g=c.history,_=BO(zO(a,c.location),c.location),E=_?g.createHref(_):"",C=Vn({},u,{href:E,navigate:function(){var R=zO(a,c.location),D=bc(c.location)===bc(BO(R)),B=i||D?g.replace:g.push;B(R)}});return UO!==O0?C.ref=t||o:C.innerRef=o,vr.createElement(r,C)})}),hU=function(t){return t},J2=vr.forwardRef;typeof J2=="undefined"&&(J2=hU);function agt(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.filter(function(r){return r}).join(" ")}J2(function(e,t){var n=e["aria-current"],r=n===void 0?"page":n,i=e.activeClassName,a=i===void 0?"active":i,o=e.activeStyle,u=e.className,c=e.exact,g=e.isActive,_=e.location,E=e.sensitive,C=e.strict,O=e.style,R=e.to,D=e.innerRef,B=Zp(e,["aria-current","activeClassName","activeStyle","className","exact","isActive","location","sensitive","strict","style","to","innerRef"]);return vr.createElement(L0.Consumer,null,function(z){z||fy(!1);var k=_||z.location,$=BO(zO(R,k),k),K=$.pathname,et=K&&K.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1"),mt=et?DO(k.pathname,{path:et,exact:c,sensitive:E,strict:C}):null,wt=!!(g?g(mt,k):mt),Ot=typeof u=="function"?u(wt):u,Bt=typeof O=="function"?O(wt):O;wt&&(Ot=agt(Ot,a),Bt=Vn({},Bt,o));var se=Vn({"aria-current":wt&&r||null,className:Ot,style:Bt,to:$},B);return hU!==J2?se.ref=t||D:se.innerRef=D,vr.createElement(ogt,se)})});var pU={exports:{}};/*! nouislider - 13.1.5 - 4/24/2019 */(function(e,t){(function(n){e.exports=n()})(function(){var n="13.1.5";function r(Et){return typeof Et=="object"&&typeof Et.to=="function"&&typeof Et.from=="function"}function i(Et){Et.parentElement.removeChild(Et)}function a(Et){return Et!=null}function o(Et){Et.preventDefault()}function u(Et){return Et.filter(function(pt){return this[pt]?!1:this[pt]=!0},{})}function c(Et,pt){return Math.round(Et/pt)*pt}function g(Et,pt){var Ve=Et.getBoundingClientRect(),We=Et.ownerDocument,Xn=We.documentElement,Br=k(We);return/webkit.*Chrome.*Mobile/i.test(navigator.userAgent)&&(Br.x=0),pt?Ve.top+Br.y-Xn.clientTop:Ve.left+Br.x-Xn.clientLeft}function _(Et){return typeof Et=="number"&&!isNaN(Et)&&isFinite(Et)}function E(Et,pt,Ve){Ve>0&&(D(Et,pt),setTimeout(function(){B(Et,pt)},Ve))}function C(Et){return Math.max(Math.min(Et,100),0)}function O(Et){return Array.isArray(Et)?Et:[Et]}function R(Et){Et=String(Et);var pt=Et.split(".");return pt.length>1?pt[1].length:0}function D(Et,pt){Et.classList?Et.classList.add(pt):Et.className+=" "+pt}function B(Et,pt){Et.classList?Et.classList.remove(pt):Et.className=Et.className.replace(new RegExp("(^|\\b)"+pt.split(" ").join("|")+"(\\b|$)","gi")," ")}function z(Et,pt){return Et.classList?Et.classList.contains(pt):new RegExp("\\b"+pt+"\\b").test(Et.className)}function k(Et){var pt=window.pageXOffset!==void 0,Ve=(Et.compatMode||"")==="CSS1Compat",We=pt?window.pageXOffset:Ve?Et.documentElement.scrollLeft:Et.body.scrollLeft,Xn=pt?window.pageYOffset:Ve?Et.documentElement.scrollTop:Et.body.scrollTop;return{x:We,y:Xn}}function $(){return window.navigator.pointerEnabled?{start:"pointerdown",move:"pointermove",end:"pointerup"}:window.navigator.msPointerEnabled?{start:"MSPointerDown",move:"MSPointerMove",end:"MSPointerUp"}:{start:"mousedown touchstart",move:"mousemove touchmove",end:"mouseup touchend"}}function K(){var Et=!1;try{var pt=Object.defineProperty({},"passive",{get:function(){Et=!0}});window.addEventListener("test",null,pt)}catch{}return Et}function et(){return window.CSS&&CSS.supports&&CSS.supports("touch-action","none")}function mt(Et,pt){return 100/(pt-Et)}function wt(Et,pt){return pt*100/(Et[1]-Et[0])}function Ot(Et,pt){return wt(Et,Et[0]<0?pt+Math.abs(Et[0]):pt-Et[0])}function Bt(Et,pt){return pt*(Et[1]-Et[0])/100+Et[0]}function se(Et,pt){for(var Ve=1;Et>=pt[Ve];)Ve+=1;return Ve}function _e(Et,pt,Ve){if(Ve>=Et.slice(-1)[0])return 100;var We=se(Ve,Et),Xn=Et[We-1],Br=Et[We],sr=pt[We-1],Ai=pt[We];return sr+Ot([Xn,Br],Ve)/mt(sr,Ai)}function Ne(Et,pt,Ve){if(Ve>=100)return Et.slice(-1)[0];var We=se(Ve,pt),Xn=Et[We-1],Br=Et[We],sr=pt[We-1],Ai=pt[We];return Bt([Xn,Br],(Ve-sr)*mt(sr,Ai))}function He(Et,pt,Ve,We){if(We===100)return We;var Xn=se(We,Et),Br=Et[Xn-1],sr=Et[Xn];return Ve?We-Br>(sr-Br)/2?sr:Br:pt[Xn-1]?Et[Xn-1]+c(We-Et[Xn-1],pt[Xn-1]):We}function de(Et,pt,Ve){var We;if(typeof pt=="number"&&(pt=[pt]),!Array.isArray(pt))throw new Error("noUiSlider ("+n+"): 'range' contains invalid value.");if(Et==="min"?We=0:Et==="max"?We=100:We=parseFloat(Et),!_(We)||!_(pt[0]))throw new Error("noUiSlider ("+n+"): 'range' value isn't numeric.");Ve.xPct.push(We),Ve.xVal.push(pt[0]),We?Ve.xSteps.push(isNaN(pt[1])?!1:pt[1]):isNaN(pt[1])||(Ve.xSteps[0]=pt[1]),Ve.xHighestCompleteStep.push(0)}function he(Et,pt,Ve){if(!!pt){if(Ve.xVal[Et]===Ve.xVal[Et+1]){Ve.xSteps[Et]=Ve.xHighestCompleteStep[Et]=Ve.xVal[Et];return}Ve.xSteps[Et]=wt([Ve.xVal[Et],Ve.xVal[Et+1]],pt)/mt(Ve.xPct[Et],Ve.xPct[Et+1]);var We=(Ve.xVal[Et+1]-Ve.xVal[Et])/Ve.xNumSteps[Et],Xn=Math.ceil(Number(We.toFixed(3))-1),Br=Ve.xVal[Et]+Ve.xNumSteps[Et]*Xn;Ve.xHighestCompleteStep[Et]=Br}}function Ge(Et,pt,Ve){this.xPct=[],this.xVal=[],this.xSteps=[Ve||!1],this.xNumSteps=[!1],this.xHighestCompleteStep=[],this.snap=pt;var We,Xn=[];for(We in Et)Et.hasOwnProperty(We)&&Xn.push([Et[We],We]);for(Xn.length&&typeof Xn[0][0]=="object"?Xn.sort(function(Br,sr){return Br[0][0]-sr[0][0]}):Xn.sort(function(Br,sr){return Br[0]-sr[0]}),We=0;We<Xn.length;We++)de(Xn[We][1],Xn[We][0],this);for(this.xNumSteps=this.xSteps.slice(0),We=0;We<this.xNumSteps.length;We++)he(We,this.xNumSteps[We],this)}Ge.prototype.getMargin=function(Et){var pt=this.xNumSteps[0];if(pt&&Et/pt%1!=0)throw new Error("noUiSlider ("+n+"): 'limit', 'margin' and 'padding' must be divisible by step.");return this.xPct.length===2?wt(this.xVal,Et):!1},Ge.prototype.toStepping=function(Et){return Et=_e(this.xVal,this.xPct,Et),Et},Ge.prototype.fromStepping=function(Et){return Ne(this.xVal,this.xPct,Et)},Ge.prototype.getStep=function(Et){return Et=He(this.xPct,this.xSteps,this.snap,Et),Et},Ge.prototype.getDefaultStep=function(Et,pt,Ve){var We=se(Et,this.xPct);return(Et===100||pt&&Et===this.xPct[We-1])&&(We=Math.max(We-1,1)),(this.xVal[We]-this.xVal[We-1])/Ve},Ge.prototype.getNearbySteps=function(Et){var pt=se(Et,this.xPct);return{stepBefore:{startValue:this.xVal[pt-2],step:this.xNumSteps[pt-2],highestStep:this.xHighestCompleteStep[pt-2]},thisStep:{startValue:this.xVal[pt-1],step:this.xNumSteps[pt-1],highestStep:this.xHighestCompleteStep[pt-1]},stepAfter:{startValue:this.xVal[pt],step:this.xNumSteps[pt],highestStep:this.xHighestCompleteStep[pt]}}},Ge.prototype.countStepDecimals=function(){var Et=this.xNumSteps.map(R);return Math.max.apply(null,Et)},Ge.prototype.convert=function(Et){return this.getStep(this.toStepping(Et))};var Yt={to:function(Et){return Et!==void 0&&Et.toFixed(2)},from:Number};function te(Et){if(r(Et))return!0;throw new Error("noUiSlider ("+n+"): 'format' requires 'to' and 'from' methods.")}function ve(Et,pt){if(!_(pt))throw new Error("noUiSlider ("+n+"): 'step' is not numeric.");Et.singleStep=pt}function Wt(Et,pt){if(typeof pt!="object"||Array.isArray(pt))throw new Error("noUiSlider ("+n+"): 'range' is not an object.");if(pt.min===void 0||pt.max===void 0)throw new Error("noUiSlider ("+n+"): Missing 'min' or 'max' in 'range'.");if(pt.min===pt.max)throw new Error("noUiSlider ("+n+"): 'range' 'min' and 'max' cannot be equal.");Et.spectrum=new Ge(pt,Et.snap,Et.singleStep)}function be(Et,pt){if(pt=O(pt),!Array.isArray(pt)||!pt.length)throw new Error("noUiSlider ("+n+"): 'start' option is incorrect.");Et.handles=pt.length,Et.start=pt}function De(Et,pt){if(Et.snap=pt,typeof pt!="boolean")throw new Error("noUiSlider ("+n+"): 'snap' option must be a boolean.")}function Fn(Et,pt){if(Et.animate=pt,typeof pt!="boolean")throw new Error("noUiSlider ("+n+"): 'animate' option must be a boolean.")}function ar(Et,pt){if(Et.animationDuration=pt,typeof pt!="number")throw new Error("noUiSlider ("+n+"): 'animationDuration' option must be a number.")}function Jn(Et,pt){var Ve=[!1],We;if(pt==="lower"?pt=[!0,!1]:pt==="upper"&&(pt=[!1,!0]),pt===!0||pt===!1){for(We=1;We<Et.handles;We++)Ve.push(pt);Ve.push(!1)}else{if(!Array.isArray(pt)||!pt.length||pt.length!==Et.handles+1)throw new Error("noUiSlider ("+n+"): 'connect' option doesn't match handle count.");Ve=pt}Et.connect=Ve}function Ar(Et,pt){switch(pt){case"horizontal":Et.ort=0;break;case"vertical":Et.ort=1;break;default:throw new Error("noUiSlider ("+n+"): 'orientation' option is invalid.")}}function cr(Et,pt){if(!_(pt))throw new Error("noUiSlider ("+n+"): 'margin' option must be numeric.");if(pt!==0&&(Et.margin=Et.spectrum.getMargin(pt),!Et.margin))throw new Error("noUiSlider ("+n+"): 'margin' option is only supported on linear sliders.")}function Fi(Et,pt){if(!_(pt))throw new Error("noUiSlider ("+n+"): 'limit' option must be numeric.");if(Et.limit=Et.spectrum.getMargin(pt),!Et.limit||Et.handles<2)throw new Error("noUiSlider ("+n+"): 'limit' option is only supported on linear sliders with 2 or more handles.")}function fr(Et,pt){if(!_(pt)&&!Array.isArray(pt))throw new Error("noUiSlider ("+n+"): 'padding' option must be numeric or array of exactly 2 numbers.");if(Array.isArray(pt)&&!(pt.length===2||_(pt[0])||_(pt[1])))throw new Error("noUiSlider ("+n+"): 'padding' option must be numeric or array of exactly 2 numbers.");if(pt!==0){if(Array.isArray(pt)||(pt=[pt,pt]),Et.padding=[Et.spectrum.getMargin(pt[0]),Et.spectrum.getMargin(pt[1])],Et.padding[0]===!1||Et.padding[1]===!1)throw new Error("noUiSlider ("+n+"): 'padding' option is only supported on linear sliders.");if(Et.padding[0]<0||Et.padding[1]<0)throw new Error("noUiSlider ("+n+"): 'padding' option must be a positive number(s).");if(Et.padding[0]+Et.padding[1]>100)throw new Error("noUiSlider ("+n+"): 'padding' option must not exceed 100% of the range.")}}function _a(Et,pt){switch(pt){case"ltr":Et.dir=0;break;case"rtl":Et.dir=1;break;default:throw new Error("noUiSlider ("+n+"): 'direction' option was not recognized.")}}function Is(Et,pt){if(typeof pt!="string")throw new Error("noUiSlider ("+n+"): 'behaviour' must be a string containing options.");var Ve=pt.indexOf("tap")>=0,We=pt.indexOf("drag")>=0,Xn=pt.indexOf("fixed")>=0,Br=pt.indexOf("snap")>=0,sr=pt.indexOf("hover")>=0,Ai=pt.indexOf("unconstrained")>=0;if(Xn){if(Et.handles!==2)throw new Error("noUiSlider ("+n+"): 'fixed' behaviour must be used with 2 handles");cr(Et,Et.start[1]-Et.start[0])}if(Ai&&(Et.margin||Et.limit))throw new Error("noUiSlider ("+n+"): 'unconstrained' behaviour cannot be used with margin or limit");Et.events={tap:Ve||Br,drag:We,fixed:Xn,snap:Br,hover:sr,unconstrained:Ai}}function Gi(Et,pt){if(pt!==!1)if(pt===!0){Et.tooltips=[];for(var Ve=0;Ve<Et.handles;Ve++)Et.tooltips.push(!0)}else{if(Et.tooltips=O(pt),Et.tooltips.length!==Et.handles)throw new Error("noUiSlider ("+n+"): must pass a formatter for all handles.");Et.tooltips.forEach(function(We){if(typeof We!="boolean"&&(typeof We!="object"||typeof We.to!="function"))throw new Error("noUiSlider ("+n+"): 'tooltips' must be passed a formatter or 'false'.")})}}function jn(Et,pt){Et.ariaFormat=pt,te(pt)}function bi(Et,pt){Et.format=pt,te(pt)}function ni(Et,pt){if(Et.keyboardSupport=pt,typeof pt!="boolean")throw new Error("noUiSlider ("+n+"): 'keyboardSupport' option must be a boolean.")}function Wi(Et,pt){Et.documentElement=pt}function xa(Et,pt){if(typeof pt!="string"&&pt!==!1)throw new Error("noUiSlider ("+n+"): 'cssPrefix' must be a string or `false`.");Et.cssPrefix=pt}function ba(Et,pt){if(typeof pt!="object")throw new Error("noUiSlider ("+n+"): 'cssClasses' must be an object.");if(typeof Et.cssPrefix=="string"){Et.cssClasses={};for(var Ve in pt)!pt.hasOwnProperty(Ve)||(Et.cssClasses[Ve]=Et.cssPrefix+pt[Ve])}else Et.cssClasses=pt}function ss(Et){var pt={margin:0,limit:0,padding:0,animate:!0,animationDuration:300,ariaFormat:Yt,format:Yt},Ve={step:{r:!1,t:ve},start:{r:!0,t:be},connect:{r:!0,t:Jn},direction:{r:!0,t:_a},snap:{r:!1,t:De},animate:{r:!1,t:Fn},animationDuration:{r:!1,t:ar},range:{r:!0,t:Wt},orientation:{r:!1,t:Ar},margin:{r:!1,t:cr},limit:{r:!1,t:Fi},padding:{r:!1,t:fr},behaviour:{r:!0,t:Is},ariaFormat:{r:!1,t:jn},format:{r:!1,t:bi},tooltips:{r:!1,t:Gi},keyboardSupport:{r:!0,t:ni},documentElement:{r:!1,t:Wi},cssPrefix:{r:!0,t:xa},cssClasses:{r:!0,t:ba}},We={connect:!1,direction:"ltr",behaviour:"tap",orientation:"horizontal",keyboardSupport:!0,cssPrefix:"noUi-",cssClasses:{target:"target",base:"base",origin:"origin",handle:"handle",handleLower:"handle-lower",handleUpper:"handle-upper",touchArea:"touch-area",horizontal:"horizontal",vertical:"vertical",background:"background",connect:"connect",connects:"connects",ltr:"ltr",rtl:"rtl",draggable:"draggable",drag:"state-drag",tap:"state-tap",active:"active",tooltip:"tooltip",pips:"pips",pipsHorizontal:"pips-horizontal",pipsVertical:"pips-vertical",marker:"marker",markerHorizontal:"marker-horizontal",markerVertical:"marker-vertical",markerNormal:"marker-normal",markerLarge:"marker-large",markerSub:"marker-sub",value:"value",valueHorizontal:"value-horizontal",valueVertical:"value-vertical",valueNormal:"value-normal",valueLarge:"value-large",valueSub:"value-sub"}};Et.format&&!Et.ariaFormat&&(Et.ariaFormat=Et.format),Object.keys(Ve).forEach(function(Un){if(!a(Et[Un])&&We[Un]===void 0){if(Ve[Un].r)throw new Error("noUiSlider ("+n+"): '"+Un+"' is required.");return!0}Ve[Un].t(pt,a(Et[Un])?Et[Un]:We[Un])}),pt.pips=Et.pips;var Xn=document.createElement("div"),Br=Xn.style.msTransform!==void 0,sr=Xn.style.transform!==void 0;pt.transformRule=sr?"transform":Br?"msTransform":"webkitTransform";var Ai=[["left","top"],["right","bottom"]];return pt.style=Ai[pt.dir][pt.ort],pt}function ri(Et,pt,Ve){var We=$(),Xn=et(),Br=Xn&&K(),sr=Et,Ai,Un,no,To,zi,ii=pt.spectrum,Go=[],yr=[],Rn=[],yl=0,us={},Vs,Mo=Et.ownerDocument,qa=pt.documentElement||Mo.documentElement,Ur=Mo.body,Yl=-1,Vr=0,W=1,Y=2,nt=Mo.dir==="rtl"||pt.ort===1?0:100;function lt(tt,ot){var ft=Mo.createElement("div");return ot&&D(ft,ot),tt.appendChild(ft),ft}function vt(tt,ot){var ft=lt(tt,pt.cssClasses.origin),Ft=lt(ft,pt.cssClasses.handle);return lt(Ft,pt.cssClasses.touchArea),Ft.setAttribute("data-handle",ot),pt.keyboardSupport&&(Ft.setAttribute("tabindex","0"),Ft.addEventListener("keydown",function(zt){return kr(zt,ot)})),Ft.setAttribute("role","slider"),Ft.setAttribute("aria-orientation",pt.ort?"vertical":"horizontal"),ot===0?D(Ft,pt.cssClasses.handleLower):ot===pt.handles-1&&D(Ft,pt.cssClasses.handleUpper),ft}function Mt(tt,ot){return ot?lt(tt,pt.cssClasses.connect):!1}function Rt(tt,ot){var ft=lt(ot,pt.cssClasses.connects);Un=[],no=[],no.push(Mt(ft,tt[0]));for(var Ft=0;Ft<pt.handles;Ft++)Un.push(vt(ot,Ft)),Rn[Ft]=Ft,no.push(Mt(ft,tt[Ft+1]))}function at(tt){return D(tt,pt.cssClasses.target),pt.dir===0?D(tt,pt.cssClasses.ltr):D(tt,pt.cssClasses.rtl),pt.ort===0?D(tt,pt.cssClasses.horizontal):D(tt,pt.cssClasses.vertical),lt(tt,pt.cssClasses.base)}function bt(tt,ot){return pt.tooltips[ot]?lt(tt.firstChild,pt.cssClasses.tooltip):!1}function Vt(){return sr.hasAttribute("disabled")}function pe(tt){var ot=Un[tt];return ot.hasAttribute("disabled")}function ye(){zi&&(sa("update.tooltips"),zi.forEach(function(tt){tt&&i(tt)}),zi=null)}function Qt(){ye(),zi=Un.map(bt),pr("update.tooltips",function(tt,ot,ft){if(!!zi[ot]){var Ft=tt[ot];pt.tooltips[ot]!==!0&&(Ft=pt.tooltips[ot].to(ft[ot])),zi[ot].innerHTML=Ft}})}function me(){pr("update",function(tt,ot,ft,Ft,zt){Rn.forEach(function(ie){var kt=Un[ie],Ie=Qr(yr,ie,0,!0,!0,!0),Pe=Qr(yr,ie,100,!0,!0,!0),Xe=zt[ie],en=pt.ariaFormat.to(ft[ie]);Ie=ii.fromStepping(Ie).toFixed(1),Pe=ii.fromStepping(Pe).toFixed(1),Xe=ii.fromStepping(Xe).toFixed(1),kt.children[0].setAttribute("aria-valuemin",Ie),kt.children[0].setAttribute("aria-valuemax",Pe),kt.children[0].setAttribute("aria-valuenow",Xe),kt.children[0].setAttribute("aria-valuetext",en)})})}function tn(tt,ot,ft){if(tt==="range"||tt==="steps")return ii.xVal;if(tt==="count"){if(ot<2)throw new Error("noUiSlider ("+n+"): 'values' (>= 2) required for mode 'count'.");var Ft=ot-1,zt=100/Ft;for(ot=[];Ft--;)ot[Ft]=Ft*zt;ot.push(100),tt="positions"}if(tt==="positions")return ot.map(function(ie){return ii.fromStepping(ft?ii.getStep(ie):ie)});if(tt==="values")return ft?ot.map(function(ie){return ii.fromStepping(ii.getStep(ii.toStepping(ie)))}):ot}function Je(tt,ot,ft){function Ft(en,dr){return(en+dr).toFixed(7)/1}var zt={},ie=ii.xVal[0],kt=ii.xVal[ii.xVal.length-1],Ie=!1,Pe=!1,Xe=0;return ft=u(ft.slice().sort(function(en,dr){return en-dr})),ft[0]!==ie&&(ft.unshift(ie),Ie=!0),ft[ft.length-1]!==kt&&(ft.push(kt),Pe=!0),ft.forEach(function(en,dr){var le,Ue,_r,Yn=en,$r=ft[dr+1],fn,Ea,Wo,er,gr,Ln,Oi,Vu=ot==="steps";if(Vu&&(le=ii.xNumSteps[dr]),le||(le=$r-Yn),!(Yn===!1||$r===void 0))for(le=Math.max(le,1e-7),Ue=Yn;Ue<=$r;Ue=Ft(Ue,le)){for(fn=ii.toStepping(Ue),Ea=fn-Xe,gr=Ea/tt,Ln=Math.round(gr),Oi=Ea/Ln,_r=1;_r<=Ln;_r+=1)Wo=Xe+_r*Oi,zt[Wo.toFixed(5)]=[ii.fromStepping(Wo),0];er=ft.indexOf(Ue)>-1?W:Vu?Y:Vr,!dr&&Ie&&(er=0),Ue===$r&&Pe||(zt[fn.toFixed(5)]=[Ue,er]),Xe=fn}}),zt}function re(tt,ot,ft){var Ft=Mo.createElement("div"),zt=[];zt[Vr]=pt.cssClasses.valueNormal,zt[W]=pt.cssClasses.valueLarge,zt[Y]=pt.cssClasses.valueSub;var ie=[];ie[Vr]=pt.cssClasses.markerNormal,ie[W]=pt.cssClasses.markerLarge,ie[Y]=pt.cssClasses.markerSub;var kt=[pt.cssClasses.valueHorizontal,pt.cssClasses.valueVertical],Ie=[pt.cssClasses.markerHorizontal,pt.cssClasses.markerVertical];D(Ft,pt.cssClasses.pips),D(Ft,pt.ort===0?pt.cssClasses.pipsHorizontal:pt.cssClasses.pipsVertical);function Pe(en,dr){var le=dr===pt.cssClasses.value,Ue=le?kt:Ie,_r=le?zt:ie;return dr+" "+Ue[pt.ort]+" "+_r[en]}function Xe(en,dr,le){if(le=ot?ot(dr,le):le,le!==Yl){var Ue=lt(Ft,!1);Ue.className=Pe(le,pt.cssClasses.marker),Ue.style[pt.style]=en+"%",le>Vr&&(Ue=lt(Ft,!1),Ue.className=Pe(le,pt.cssClasses.value),Ue.setAttribute("data-value",dr),Ue.style[pt.style]=en+"%",Ue.innerHTML=ft.to(dr))}}return Object.keys(tt).forEach(function(en){Xe(en,tt[en][0],tt[en][1])}),Ft}function ze(){To&&(i(To),To=null)}function Me(tt){ze();var ot=tt.mode,ft=tt.density||1,Ft=tt.filter||!1,zt=tt.values||!1,ie=tt.stepped||!1,kt=tn(ot,zt,ie),Ie=Je(ft,ot,kt),Pe=tt.format||{to:Math.round};return To=sr.appendChild(re(Ie,Ft,Pe)),To}function Re(){var tt=Ai.getBoundingClientRect(),ot="offset"+["Width","Height"][pt.ort];return pt.ort===0?tt.width||Ai[ot]:tt.height||Ai[ot]}function Mn(tt,ot,ft,Ft){var zt=function(kt){if(kt=$e(kt,Ft.pageOffset,Ft.target||ot),!kt||Vt()&&!Ft.doNotReject||z(sr,pt.cssClasses.tap)&&!Ft.doNotReject||tt===We.start&&kt.buttons!==void 0&&kt.buttons>1||Ft.hover&&kt.buttons)return!1;Br||kt.preventDefault(),kt.calcPoint=kt.points[pt.ort],ft(kt,Ft)},ie=[];return tt.split(" ").forEach(function(kt){ot.addEventListener(kt,zt,Br?{passive:!0}:!1),ie.push([kt,zt])}),ie}function $e(tt,ot,ft){var Ft=tt.type.indexOf("touch")===0,zt=tt.type.indexOf("mouse")===0,ie=tt.type.indexOf("pointer")===0,kt,Ie;if(tt.type.indexOf("MSPointer")===0&&(ie=!0),Ft){var Pe=function(dr){return dr.target===ft||ft.contains(dr.target)};if(tt.type==="touchstart"){var Xe=Array.prototype.filter.call(tt.touches,Pe);if(Xe.length>1)return!1;kt=Xe[0].pageX,Ie=Xe[0].pageY}else{var en=Array.prototype.find.call(tt.changedTouches,Pe);if(!en)return!1;kt=en.pageX,Ie=en.pageY}}return ot=ot||k(Mo),(zt||ie)&&(kt=tt.clientX+ot.x,Ie=tt.clientY+ot.y),tt.pageOffset=ot,tt.points=[kt,Ie],tt.cursor=zt||ie,tt}function Qn(tt){var ot=tt-g(Ai,pt.ort),ft=ot*100/Re();return ft=C(ft),pt.dir?100-ft:ft}function Rr(tt){var ot=100,ft=!1;return Un.forEach(function(Ft,zt){if(!pe(zt)){var ie=Math.abs(yr[zt]-tt);(ie<ot||ie===100&&ot===100)&&(ft=zt,ot=ie)}}),ft}function wn(tt,ot){tt.type==="mouseout"&&tt.target.nodeName==="HTML"&&tt.relatedTarget===null&&tr(tt,ot)}function hr(tt,ot){if(navigator.appVersion.indexOf("MSIE 9")===-1&&tt.buttons===0&&ot.buttonsProperty!==0)return tr(tt,ot);var ft=(pt.dir?-1:1)*(tt.calcPoint-ot.startCalcPoint),Ft=ft*100/ot.baseSize;Ps(ft>0,Ft,ot.locations,ot.handleNumbers)}function tr(tt,ot){ot.handle&&(B(ot.handle,pt.cssClasses.active),yl-=1),ot.listeners.forEach(function(ft){qa.removeEventListener(ft[0],ft[1])}),yl===0&&(B(sr,pt.cssClasses.drag),_l(),tt.cursor&&(Ur.style.cursor="",Ur.removeEventListener("selectstart",o))),ot.handleNumbers.forEach(function(ft){Ii("change",ft),Ii("set",ft),Ii("end",ft)})}function go(tt,ot){if(ot.handleNumbers.some(pe))return!1;var ft;if(ot.handleNumbers.length===1){var Ft=Un[ot.handleNumbers[0]];ft=Ft.children[0],yl+=1,D(ft,pt.cssClasses.active)}tt.stopPropagation();var zt=[],ie=Mn(We.move,qa,hr,{target:tt.target,handle:ft,listeners:zt,startCalcPoint:tt.calcPoint,baseSize:Re(),pageOffset:tt.pageOffset,handleNumbers:ot.handleNumbers,buttonsProperty:tt.buttons,locations:yr.slice()}),kt=Mn(We.end,qa,tr,{target:tt.target,handle:ft,listeners:zt,doNotReject:!0,handleNumbers:ot.handleNumbers}),Ie=Mn("mouseout",qa,wn,{target:tt.target,handle:ft,listeners:zt,doNotReject:!0,handleNumbers:ot.handleNumbers});zt.push.apply(zt,ie.concat(kt,Ie)),tt.cursor&&(Ur.style.cursor=getComputedStyle(tt.target).cursor,Un.length>1&&D(sr,pt.cssClasses.drag),Ur.addEventListener("selectstart",o,!1)),ot.handleNumbers.forEach(function(Pe){Ii("start",Pe)})}function Er(tt){tt.stopPropagation();var ot=Qn(tt.calcPoint),ft=Rr(ot);if(ft===!1)return!1;pt.events.snap||E(sr,pt.cssClasses.tap,pt.animationDuration),ro(ft,ot,!0,!0),_l(),Ii("slide",ft,!0),Ii("update",ft,!0),Ii("change",ft,!0),Ii("set",ft,!0),pt.events.snap&&go(tt,{handleNumbers:[ft]})}function Li(tt){var ot=Qn(tt.calcPoint),ft=ii.getStep(ot),Ft=ii.fromStepping(ft);Object.keys(us).forEach(function(zt){zt.split(".")[0]==="hover"&&us[zt].forEach(function(ie){ie.call(Vs,Ft)})})}function kr(tt,ot){if(Vt()||pe(ot))return!1;var ft=["Left","Right"],Ft=["Down","Up"];pt.dir&&!pt.ort?ft.reverse():pt.ort&&!pt.dir&&Ft.reverse();var zt=tt.key.replace("Arrow",""),ie=zt===Ft[0]||zt===ft[0],kt=zt===Ft[1]||zt===ft[1];if(!ie&&!kt)return!0;tt.preventDefault();var Ie=ie?0:1,Pe=L(ot),Xe=Pe[Ie];return Xe===null||(Xe===!1&&(Xe=ii.getDefaultStep(yr[ot],ie,10)),Xe=Math.max(Xe,1e-7),Xe=(ie?-1:1)*Xe,Sa(ot,Go[ot]+Xe,!0)),!1}function xn(tt){tt.fixed||Un.forEach(function(ot,ft){Mn(We.start,ot.children[0],go,{handleNumbers:[ft]})}),tt.tap&&Mn(We.start,Ai,Er,{}),tt.hover&&Mn(We.move,Ai,Li,{hover:!0}),tt.drag&&no.forEach(function(ot,ft){if(!(ot===!1||ft===0||ft===no.length-1)){var Ft=Un[ft-1],zt=Un[ft],ie=[ot];D(ot,pt.cssClasses.draggable),tt.fixed&&(ie.push(Ft.children[0]),ie.push(zt.children[0])),ie.forEach(function(kt){Mn(We.start,kt,go,{handles:[Ft,zt],handleNumbers:[ft-1,ft]})})}})}function pr(tt,ot){us[tt]=us[tt]||[],us[tt].push(ot),tt.split(".")[0]==="update"&&Un.forEach(function(ft,Ft){Ii("update",Ft)})}function sa(tt){var ot=tt&&tt.split(".")[0],ft=ot&&tt.substring(ot.length);Object.keys(us).forEach(function(Ft){var zt=Ft.split(".")[0],ie=Ft.substring(zt.length);(!ot||ot===zt)&&(!ft||ft===ie)&&delete us[Ft]})}function Ii(tt,ot,ft){Object.keys(us).forEach(function(Ft){var zt=Ft.split(".")[0];tt===zt&&us[Ft].forEach(function(ie){ie.call(Vs,Go.map(pt.format.to),ot,Go.slice(),ft||!1,yr.slice())})})}function Qr(tt,ot,ft,Ft,zt,ie){return Un.length>1&&!pt.events.unconstrained&&(Ft&&ot>0&&(ft=Math.max(ft,tt[ot-1]+pt.margin)),zt&&ot<Un.length-1&&(ft=Math.min(ft,tt[ot+1]-pt.margin))),Un.length>1&&pt.limit&&(Ft&&ot>0&&(ft=Math.min(ft,tt[ot-1]+pt.limit)),zt&&ot<Un.length-1&&(ft=Math.max(ft,tt[ot+1]-pt.limit))),pt.padding&&(ot===0&&(ft=Math.max(ft,pt.padding[0])),ot===Un.length-1&&(ft=Math.min(ft,100-pt.padding[1]))),ft=ii.getStep(ft),ft=C(ft),ft===tt[ot]&&!ie?!1:ft}function mo(tt,ot){var ft=pt.ort;return(ft?ot:tt)+", "+(ft?tt:ot)}function Ps(tt,ot,ft,Ft){var zt=ft.slice(),ie=[!tt,tt],kt=[tt,!tt];Ft=Ft.slice(),tt&&Ft.reverse(),Ft.length>1?Ft.forEach(function(Pe,Xe){var en=Qr(zt,Pe,zt[Pe]+ot,ie[Xe],kt[Xe],!1);en===!1?ot=0:(ot=en-zt[Pe],zt[Pe]=en)}):ie=kt=[!0];var Ie=!1;Ft.forEach(function(Pe,Xe){Ie=ro(Pe,ft[Pe]+ot,ie[Xe],kt[Xe])||Ie}),Ie&&Ft.forEach(function(Pe){Ii("update",Pe),Ii("slide",Pe)})}function Ga(tt,ot){return pt.dir?100-tt-ot:tt}function Pi(tt,ot){yr[tt]=ot,Go[tt]=ii.fromStepping(ot);var ft="translate("+mo(Ga(ot,0)-nt+"%","0")+")";Un[tt].style[pt.transformRule]=ft,Hi(tt),Hi(tt+1)}function _l(){Rn.forEach(function(tt){var ot=yr[tt]>50?-1:1,ft=3+(Un.length+ot*tt);Un[tt].style.zIndex=ft})}function ro(tt,ot,ft,Ft){return ot=Qr(yr,tt,ot,ft,Ft,!1),ot===!1?!1:(Pi(tt,ot),!0)}function Hi(tt){if(!!no[tt]){var ot=0,ft=100;tt!==0&&(ot=yr[tt-1]),tt!==no.length-1&&(ft=yr[tt]);var Ft=ft-ot,zt="translate("+mo(Ga(ot,Ft)+"%","0")+")",ie="scale("+mo(Ft/100,"1")+")";no[tt].style[pt.transformRule]=zt+" "+ie}}function wa(tt,ot){return tt===null||tt===!1||tt===void 0||(typeof tt=="number"&&(tt=String(tt)),tt=pt.format.from(tt),tt=ii.toStepping(tt),tt===!1||isNaN(tt))?yr[ot]:tt}function oi(tt,ot){var ft=O(tt),Ft=yr[0]===void 0;ot=ot===void 0?!0:!!ot,pt.animate&&!Ft&&E(sr,pt.cssClasses.tap,pt.animationDuration),Rn.forEach(function(zt){ro(zt,wa(ft[zt],zt),!0,!1)}),Rn.forEach(function(zt){ro(zt,yr[zt],!0,!0)}),_l(),Rn.forEach(function(zt){Ii("update",zt),ft[zt]!==null&&ot&&Ii("set",zt)})}function ls(tt){oi(pt.start,tt)}function Sa(tt,ot,ft){if(tt=Number(tt),!(tt>=0&&tt<Rn.length))throw new Error("noUiSlider ("+n+"): invalid handle number, got: "+tt);ro(tt,wa(ot,tt),!0,!0),Ii("update",tt),ft&&Ii("set",tt)}function Oc(){var tt=Go.map(pt.format.to);return tt.length===1?tt[0]:tt}function Wa(){for(var tt in pt.cssClasses)!pt.cssClasses.hasOwnProperty(tt)||B(sr,pt.cssClasses[tt]);for(;sr.firstChild;)sr.removeChild(sr.firstChild);delete sr.noUiSlider}function L(tt){var ot=yr[tt],ft=ii.getNearbySteps(ot),Ft=Go[tt],zt=ft.thisStep.step,ie=null;if(pt.snap)return[Ft-ft.stepBefore.startValue||null,ft.stepAfter.startValue-Ft||null];zt!==!1&&Ft+zt>ft.stepAfter.startValue&&(zt=ft.stepAfter.startValue-Ft),Ft>ft.thisStep.startValue?ie=ft.thisStep.step:ft.stepBefore.step===!1?ie=!1:ie=Ft-ft.stepBefore.highestStep,ot===100?zt=null:ot===0&&(ie=null);var kt=ii.countStepDecimals();return zt!==null&&zt!==!1&&(zt=Number(zt.toFixed(kt))),ie!==null&&ie!==!1&&(ie=Number(ie.toFixed(kt))),[ie,zt]}function U(){return Rn.map(L)}function Q(tt,ot){var ft=Oc(),Ft=["margin","limit","padding","range","animate","snap","step","format","pips","tooltips"];Ft.forEach(function(ie){tt[ie]!==void 0&&(Ve[ie]=tt[ie])});var zt=ss(Ve);Ft.forEach(function(ie){tt[ie]!==void 0&&(pt[ie]=zt[ie])}),ii=zt.spectrum,pt.margin=zt.margin,pt.limit=zt.limit,pt.padding=zt.padding,pt.pips?Me(pt.pips):ze(),pt.tooltips?Qt():ye(),yr=[],oi(tt.start||ft,ot)}function At(){Ai=at(sr),Rt(pt.connect,Ai),xn(pt.events),oi(pt.start),pt.pips&&Me(pt.pips),pt.tooltips&&Qt(),me()}return At(),Vs={destroy:Wa,steps:U,on:pr,off:sa,get:Oc,set:oi,setHandle:Sa,reset:ls,__moveHandles:function(tt,ot,ft){Ps(tt,ot,yr,ft)},options:Ve,updateOptions:Q,target:sr,removePips:ze,removeTooltips:ye,pips:Me},Vs}function qo(Et,pt){if(!Et||!Et.nodeName)throw new Error("noUiSlider ("+n+"): create requires a single element, got: "+Et);if(Et.noUiSlider)throw new Error("noUiSlider ("+n+"): Slider was already initialized.");var Ve=ss(pt),We=ri(Et,Ve,pt);return Et.noUiSlider=We,We}return{__spectrum:Ge,version:n,create:qo}})})(pU);var oEt=pU.exports,sgt={black:"#000",white:"#fff"},Q2=sgt,ugt={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",A100:"#ff8a80",A200:"#ff5252",A400:"#ff1744",A700:"#d50000"},VO=ugt,lgt={50:"#fce4ec",100:"#f8bbd0",200:"#f48fb1",300:"#f06292",400:"#ec407a",500:"#e91e63",600:"#d81b60",700:"#c2185b",800:"#ad1457",900:"#880e4f",A100:"#ff80ab",A200:"#ff4081",A400:"#f50057",A700:"#c51162"},$O=lgt,cgt={50:"#e8eaf6",100:"#c5cae9",200:"#9fa8da",300:"#7986cb",400:"#5c6bc0",500:"#3f51b5",600:"#3949ab",700:"#303f9f",800:"#283593",900:"#1a237e",A100:"#8c9eff",A200:"#536dfe",A400:"#3d5afe",A700:"#304ffe"},jO=cgt,fgt={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",A100:"#82b1ff",A200:"#448aff",A400:"#2979ff",A700:"#2962ff"},qO=fgt,hgt={50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",A100:"#b9f6ca",A200:"#69f0ae",A400:"#00e676",A700:"#00c853"},GO=hgt,pgt={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",A100:"#ffd180",A200:"#ffab40",A400:"#ff9100",A700:"#ff6d00"},WO=pgt,dgt={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#d5d5d5",A200:"#aaaaaa",A400:"#303030",A700:"#616161"},HO=dgt;function tI(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?tI=function(n){return typeof n}:tI=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},tI(e)}function XO(e){return e&&tI(e)==="object"&&e.constructor===Object}function R0(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{clone:!0},r=n.clone?Vn({},e):e;return XO(e)&&XO(t)&&Object.keys(t).forEach(function(i){i!=="__proto__"&&(XO(t[i])&&i in e?r[i]=R0(e[i],t[i],n):r[i]=t[i])}),r}function eI(e){for(var t="https://material-ui.com/production-error/?code="+e,n=1;n<arguments.length;n+=1)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified Material-UI error #"+e+"; visit "+t+" for the full message."}function dU(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1;return Math.min(Math.max(t,e),n)}function ggt(e){e=e.substr(1);var t=new RegExp(".{1,".concat(e.length>=6?2:1,"}"),"g"),n=e.match(t);return n&&n[0].length===1&&(n=n.map(function(r){return r+r})),n?"rgb".concat(n.length===4?"a":"","(").concat(n.map(function(r,i){return i<3?parseInt(r,16):Math.round(parseInt(r,16)/255*1e3)/1e3}).join(", "),")"):""}function mgt(e){e=k0(e);var t=e,n=t.values,r=n[0],i=n[1]/100,a=n[2]/100,o=i*Math.min(a,1-a),u=function(E){var C=arguments.length>1&&arguments[1]!==void 0?arguments[1]:(E+r/30)%12;return a-o*Math.max(Math.min(C-3,9-C,1),-1)},c="rgb",g=[Math.round(u(0)*255),Math.round(u(8)*255),Math.round(u(4)*255)];return e.type==="hsla"&&(c+="a",g.push(n[3])),YO({type:c,values:g})}function k0(e){if(e.type)return e;if(e.charAt(0)==="#")return k0(ggt(e));var t=e.indexOf("("),n=e.substring(0,t);if(["rgb","rgba","hsl","hsla"].indexOf(n)===-1)throw new Error(eI(3,e));var r=e.substring(t+1,e.length-1).split(",");return r=r.map(function(i){return parseFloat(i)}),{type:n,values:r}}function YO(e){var t=e.type,n=e.values;return t.indexOf("rgb")!==-1?n=n.map(function(r,i){return i<3?parseInt(r,10):r}):t.indexOf("hsl")!==-1&&(n[1]="".concat(n[1],"%"),n[2]="".concat(n[2],"%")),"".concat(t,"(").concat(n.join(", "),")")}function vgt(e,t){var n=gU(e),r=gU(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}function gU(e){e=k0(e);var t=e.type==="hsl"?k0(mgt(e)).values:e.values;return t=t.map(function(n){return n/=255,n<=.03928?n/12.92:Math.pow((n+.055)/1.055,2.4)}),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function ygt(e,t){if(e=k0(e),t=dU(t),e.type.indexOf("hsl")!==-1)e.values[2]*=1-t;else if(e.type.indexOf("rgb")!==-1)for(var n=0;n<3;n+=1)e.values[n]*=1-t;return YO(e)}function _gt(e,t){if(e=k0(e),t=dU(t),e.type.indexOf("hsl")!==-1)e.values[2]+=(100-e.values[2])*t;else if(e.type.indexOf("rgb")!==-1)for(var n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;return YO(e)}function cg(e,t){if(e==null)return{};var n=Zp(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,r)||(n[r]=e[r]))}return n}var zm=["xs","sm","md","lg","xl"];function xgt(e){var t=e.values,n=t===void 0?{xs:0,sm:600,md:960,lg:1280,xl:1920}:t,r=e.unit,i=r===void 0?"px":r,a=e.step,o=a===void 0?5:a,u=cg(e,["values","unit","step"]);function c(O){var R=typeof n[O]=="number"?n[O]:O;return"@media (min-width:".concat(R).concat(i,")")}function g(O){var R=zm.indexOf(O)+1,D=n[zm[R]];if(R===zm.length)return c("xs");var B=typeof D=="number"&&R>0?D:O;return"@media (max-width:".concat(B-o/100).concat(i,")")}function _(O,R){var D=zm.indexOf(R);return D===zm.length-1?c(O):"@media (min-width:".concat(typeof n[O]=="number"?n[O]:O).concat(i,") and ")+"(max-width:".concat((D!==-1&&typeof n[zm[D+1]]=="number"?n[zm[D+1]]:R)-o/100).concat(i,")")}function E(O){return _(O,O)}function C(O){return n[O]}return Vn({keys:zm,values:n,up:c,down:g,between:_,only:E,width:C},u)}function bgt(e,t,n){var r;return Vn({gutters:function(){var a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return console.warn(["Material-UI: theme.mixins.gutters() is deprecated.","You can use the source of the mixin directly:",` paddingLeft: theme.spacing(2), paddingRight: theme.spacing(2), [theme.breakpoints.up('sm')]: { paddingLeft: theme.spacing(3), paddingRight: theme.spacing(3), }, `].join(` `)),Vn({paddingLeft:t(2),paddingRight:t(2)},a,yC({},e.up("sm"),Vn({paddingLeft:t(3),paddingRight:t(3)},a[e.up("sm")])))},toolbar:(r={minHeight:56},yC(r,"".concat(e.up("xs")," and (orientation: landscape)"),{minHeight:48}),yC(r,e.up("sm"),{minHeight:64}),r)},n)}var mU={text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.54)",disabled:"rgba(0, 0, 0, 0.38)",hint:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:Q2.white,default:HO[50]},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}},ZO={text:{primary:Q2.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",hint:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:HO[800],default:"#303030"},action:{active:Q2.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}};function vU(e,t,n,r){var i=r.light||r,a=r.dark||r*1.5;e[t]||(e.hasOwnProperty(n)?e[t]=e[n]:t==="light"?e.light=_gt(e.main,i):t==="dark"&&(e.dark=ygt(e.main,a)))}function wgt(e){var t=e.primary,n=t===void 0?{light:jO[300],main:jO[500],dark:jO[700]}:t,r=e.secondary,i=r===void 0?{light:$O.A200,main:$O.A400,dark:$O.A700}:r,a=e.error,o=a===void 0?{light:VO[300],main:VO[500],dark:VO[700]}:a,u=e.warning,c=u===void 0?{light:WO[300],main:WO[500],dark:WO[700]}:u,g=e.info,_=g===void 0?{light:qO[300],main:qO[500],dark:qO[700]}:g,E=e.success,C=E===void 0?{light:GO[300],main:GO[500],dark:GO[700]}:E,O=e.type,R=O===void 0?"light":O,D=e.contrastThreshold,B=D===void 0?3:D,z=e.tonalOffset,k=z===void 0?.2:z,$=cg(e,["primary","secondary","error","warning","info","success","type","contrastThreshold","tonalOffset"]);function K(Ot){var Bt=vgt(Ot,ZO.text.primary)>=B?ZO.text.primary:mU.text.primary;return Bt}var et=function(Bt){var se=arguments.length>1&&arguments[1]!==void 0?arguments[1]:500,_e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:300,Ne=arguments.length>3&&arguments[3]!==void 0?arguments[3]:700;if(Bt=Vn({},Bt),!Bt.main&&Bt[se]&&(Bt.main=Bt[se]),!Bt.main)throw new Error(eI(4,se));if(typeof Bt.main!="string")throw new Error(eI(5,JSON.stringify(Bt.main)));return vU(Bt,"light",_e,k),vU(Bt,"dark",Ne,k),Bt.contrastText||(Bt.contrastText=K(Bt.main)),Bt},mt={dark:ZO,light:mU},wt=R0(Vn({common:Q2,type:R,primary:et(n),secondary:et(i,"A400","A200","A700"),error:et(o),warning:et(c),info:et(_),success:et(C),grey:HO,contrastThreshold:B,getContrastText:K,augmentColor:et,tonalOffset:k},mt[R]),$);return wt}function yU(e){return Math.round(e*1e5)/1e5}function Sgt(e){return yU(e)}var _U={textTransform:"uppercase"},xU='"Roboto", "Helvetica", "Arial", sans-serif';function Egt(e,t){var n=typeof t=="function"?t(e):t,r=n.fontFamily,i=r===void 0?xU:r,a=n.fontSize,o=a===void 0?14:a,u=n.fontWeightLight,c=u===void 0?300:u,g=n.fontWeightRegular,_=g===void 0?400:g,E=n.fontWeightMedium,C=E===void 0?500:E,O=n.fontWeightBold,R=O===void 0?700:O,D=n.htmlFontSize,B=D===void 0?16:D,z=n.allVariants,k=n.pxToRem,$=cg(n,["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"]),K=o/14,et=k||function(Ot){return"".concat(Ot/B*K,"rem")},mt=function(Bt,se,_e,Ne,He){return Vn({fontFamily:i,fontWeight:Bt,fontSize:et(se),lineHeight:_e},i===xU?{letterSpacing:"".concat(yU(Ne/se),"em")}:{},He,z)},wt={h1:mt(c,96,1.167,-1.5),h2:mt(c,60,1.2,-.5),h3:mt(_,48,1.167,0),h4:mt(_,34,1.235,.25),h5:mt(_,24,1.334,0),h6:mt(C,20,1.6,.15),subtitle1:mt(_,16,1.75,.15),subtitle2:mt(C,14,1.57,.1),body1:mt(_,16,1.5,.15),body2:mt(_,14,1.43,.15),button:mt(C,14,1.75,.4,_U),caption:mt(_,12,1.66,.4),overline:mt(_,12,2.66,1,_U)};return R0(Vn({htmlFontSize:B,pxToRem:et,round:Sgt,fontFamily:i,fontSize:o,fontWeightLight:c,fontWeightRegular:_,fontWeightMedium:C,fontWeightBold:R},wt),$,{clone:!1})}var Cgt=.2,Igt=.14,Pgt=.12;function da(){return["".concat(arguments.length<=0?void 0:arguments[0],"px ").concat(arguments.length<=1?void 0:arguments[1],"px ").concat(arguments.length<=2?void 0:arguments[2],"px ").concat(arguments.length<=3?void 0:arguments[3],"px rgba(0,0,0,").concat(Cgt,")"),"".concat(arguments.length<=4?void 0:arguments[4],"px ").concat(arguments.length<=5?void 0:arguments[5],"px ").concat(arguments.length<=6?void 0:arguments[6],"px ").concat(arguments.length<=7?void 0:arguments[7],"px rgba(0,0,0,").concat(Igt,")"),"".concat(arguments.length<=8?void 0:arguments[8],"px ").concat(arguments.length<=9?void 0:arguments[9],"px ").concat(arguments.length<=10?void 0:arguments[10],"px ").concat(arguments.length<=11?void 0:arguments[11],"px rgba(0,0,0,").concat(Pgt,")")].join(",")}var Tgt=["none",da(0,2,1,-1,0,1,1,0,0,1,3,0),da(0,3,1,-2,0,2,2,0,0,1,5,0),da(0,3,3,-2,0,3,4,0,0,1,8,0),da(0,2,4,-1,0,4,5,0,0,1,10,0),da(0,3,5,-1,0,5,8,0,0,1,14,0),da(0,3,5,-1,0,6,10,0,0,1,18,0),da(0,4,5,-2,0,7,10,1,0,2,16,1),da(0,5,5,-3,0,8,10,1,0,3,14,2),da(0,5,6,-3,0,9,12,1,0,3,16,2),da(0,6,6,-3,0,10,14,1,0,4,18,3),da(0,6,7,-4,0,11,15,1,0,4,20,3),da(0,7,8,-4,0,12,17,2,0,5,22,4),da(0,7,8,-4,0,13,19,2,0,5,24,4),da(0,7,9,-4,0,14,21,2,0,5,26,4),da(0,8,9,-5,0,15,22,2,0,6,28,5),da(0,8,10,-5,0,16,24,2,0,6,30,5),da(0,8,11,-5,0,17,26,2,0,6,32,5),da(0,9,11,-5,0,18,28,2,0,7,34,6),da(0,9,12,-6,0,19,29,2,0,7,36,6),da(0,10,13,-6,0,20,31,3,0,8,38,7),da(0,10,13,-6,0,21,33,3,0,8,40,7),da(0,10,14,-6,0,22,35,3,0,8,42,7),da(0,11,14,-7,0,23,36,3,0,9,44,8),da(0,11,15,-7,0,24,38,3,0,9,46,8)],Mgt=Tgt,Agt={borderRadius:4},Lgt=Agt;function KO(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Ogt(e){if(Array.isArray(e))return KO(e)}function Rgt(e){if(typeof Symbol!="undefined"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function kgt(e,t){if(!!e){if(typeof e=="string")return KO(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return KO(e,t)}}function Dgt(){throw new TypeError(`Invalid attempt to spread non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ngt(e){return Ogt(e)||Rgt(e)||kgt(e)||Dgt()}function Fgt(e){var t=e.spacing||8;return typeof t=="number"?function(n){return t*n}:Array.isArray(t)?function(n){return t[n]}:typeof t=="function"?t:function(){}}function zgt(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:8;if(e.mui)return e;var t=Fgt({spacing:e}),n=function(){for(var i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];return a.length===0?t(1):a.length===1?t(a[0]):a.map(function(u){if(typeof u=="string")return u;var c=t(u);return typeof c=="number"?"".concat(c,"px"):c}).join(" ")};return Object.defineProperty(n,"unit",{get:function(){return e}}),n.mui=!0,n}var bU={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},wU={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function SU(e){return"".concat(Math.round(e),"ms")}var Bgt={easing:bU,duration:wU,create:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:["all"],n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=n.duration,i=r===void 0?wU.standard:r,a=n.easing,o=a===void 0?bU.easeInOut:a,u=n.delay,c=u===void 0?0:u;return cg(n,["duration","easing","delay"]),(Array.isArray(t)?t:[t]).map(function(g){return"".concat(g," ").concat(typeof i=="string"?i:SU(i)," ").concat(o," ").concat(typeof c=="string"?c:SU(c))}).join(",")},getAutoHeightDuration:function(t){if(!t)return 0;var n=t/36;return Math.round((4+15*Math.pow(n,.25)+n/5)*10)}},Ugt={mobileStepper:1e3,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500},Vgt=Ugt;function $gt(){for(var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=e.breakpoints,n=t===void 0?{}:t,r=e.mixins,i=r===void 0?{}:r,a=e.palette,o=a===void 0?{}:a,u=e.spacing,c=e.typography,g=c===void 0?{}:c,_=cg(e,["breakpoints","mixins","palette","spacing","typography"]),E=wgt(o),C=xgt(n),O=zgt(u),R=R0({breakpoints:C,direction:"ltr",mixins:bgt(C,O,i),overrides:{},palette:E,props:{},shadows:Mgt,typography:Egt(E,g),spacing:O,shape:Lgt,transitions:Bgt,zIndex:Vgt},_),D=arguments.length,B=new Array(D>1?D-1:0),z=1;z<D;z++)B[z-1]=arguments[z];return R=B.reduce(function(k,$){return R0(k,$)},R),R}var jgt=typeof Symbol=="function"&&Symbol.for,qgt=jgt?Symbol.for("mui.nested"):"__THEME_NESTED__",Ggt=["checked","disabled","error","focused","focusVisible","required","expanded","selected"];function Wgt(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=e.disableGlobal,n=t===void 0?!1:t,r=e.productionPrefix,i=r===void 0?"jss":r,a=e.seed,o=a===void 0?"":a,u=o===""?"":"".concat(o,"-"),c=0,g=function(){return c+=1,c};return function(_,E){var C=E.options.name;if(C&&C.indexOf("Mui")===0&&!E.options.link&&!n){if(Ggt.indexOf(_.key)!==-1)return"Mui-".concat(_.key);var O="".concat(u).concat(C,"-").concat(_.key);return!E.options.theme[qgt]||o!==""?O:"".concat(O,"-").concat(g())}return"".concat(u).concat(i).concat(g())}}function Hgt(e){var t=e.theme,n=e.name,r=e.props;if(!t||!t.props||!t.props[n])return r;var i=t.props[n],a;for(a in i)r[a]===void 0&&(r[a]=i[a]);return r}var EU=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Nb=(typeof window=="undefined"?"undefined":EU(window))==="object"&&(typeof document=="undefined"?"undefined":EU(document))==="object"&&document.nodeType===9;function CU(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function IU(e,t,n){return t&&CU(e.prototype,t),n&&CU(e,n),e}function PU(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var Xgt={}.constructor;function JO(e){if(e==null||typeof e!="object")return e;if(Array.isArray(e))return e.map(JO);if(e.constructor!==Xgt)return e;var t={};for(var n in e)t[n]=JO(e[n]);return t}function QO(e,t,n){e===void 0&&(e="unnamed");var r=n.jss,i=JO(t),a=r.plugins.onCreateRule(e,i,n);return a||(e[0]==="@",null)}var TU=function(t,n){for(var r="",i=0;i<t.length&&t[i]!=="!important";i++)r&&(r+=n),r+=t[i];return r},hy=function(t,n){if(n===void 0&&(n=!1),!Array.isArray(t))return t;var r="";if(Array.isArray(t[0]))for(var i=0;i<t.length&&t[i]!=="!important";i++)r&&(r+=", "),r+=TU(t[i]," ");else r=TU(t,", ");return!n&&t[t.length-1]==="!important"&&(r+=" !important"),r};function D0(e){return e&&e.format===!1?{linebreak:"",space:""}:{linebreak:` `,space:" "}}function Fb(e,t){for(var n="",r=0;r<t;r++)n+=" ";return n+e}function zb(e,t,n){n===void 0&&(n={});var r="";if(!t)return r;var i=n,a=i.indent,o=a===void 0?0:a,u=t.fallbacks;n.format===!1&&(o=-1/0);var c=D0(n),g=c.linebreak,_=c.space;if(e&&o++,u)if(Array.isArray(u))for(var E=0;E<u.length;E++){var C=u[E];for(var O in C){var R=C[O];R!=null&&(r&&(r+=g),r+=Fb(O+":"+_+hy(R)+";",o))}}else for(var D in u){var B=u[D];B!=null&&(r&&(r+=g),r+=Fb(D+":"+_+hy(B)+";",o))}for(var z in t){var k=t[z];k!=null&&z!=="fallbacks"&&(r&&(r+=g),r+=Fb(z+":"+_+hy(k)+";",o))}return!r&&!n.allowEmpty||!e?r:(o--,r&&(r=""+g+r+g),Fb(""+e+_+"{"+r,o)+Fb("}",o))}var Ygt=/([[\].#*$><+~=|^:(),"'`\s])/g,MU=typeof CSS!="undefined"&&CSS.escape,tR=function(e){return MU?MU(e):e.replace(Ygt,"\\$1")},AU=function(){function e(n,r,i){this.type="style",this.isProcessed=!1;var a=i.sheet,o=i.Renderer;this.key=n,this.options=i,this.style=r,a?this.renderer=a.renderer:o&&(this.renderer=new o)}var t=e.prototype;return t.prop=function(r,i,a){if(i===void 0)return this.style[r];var o=a?a.force:!1;if(!o&&this.style[r]===i)return this;var u=i;(!a||a.process!==!1)&&(u=this.options.jss.plugins.onChangeValue(i,r,this));var c=u==null||u===!1,g=r in this.style;if(c&&!g&&!o)return this;var _=c&&g;if(_?delete this.style[r]:this.style[r]=u,this.renderable&&this.renderer)return _?this.renderer.removeProperty(this.renderable,r):this.renderer.setProperty(this.renderable,r,u),this;var E=this.options.sheet;return E&&E.attached,this},e}(),eR=function(e){ph(t,e);function t(r,i,a){var o;o=e.call(this,r,i,a)||this;var u=a.selector,c=a.scoped,g=a.sheet,_=a.generateId;return u?o.selectorText=u:c!==!1&&(o.id=_(PU(PU(o)),g),o.selectorText="."+tR(o.id)),o}var n=t.prototype;return n.applyTo=function(i){var a=this.renderer;if(a){var o=this.toJSON();for(var u in o)a.setProperty(i,u,o[u])}return this},n.toJSON=function(){var i={};for(var a in this.style){var o=this.style[a];typeof o!="object"?i[a]=o:Array.isArray(o)&&(i[a]=hy(o))}return i},n.toString=function(i){var a=this.options.sheet,o=a?a.options.link:!1,u=o?Vn({},i,{allowEmpty:!0}):i;return zb(this.selectorText,this.style,u)},IU(t,[{key:"selector",set:function(i){if(i!==this.selectorText){this.selectorText=i;var a=this.renderer,o=this.renderable;if(!(!o||!a)){var u=a.setSelector(o,i);u||a.replaceRule(o,this)}}},get:function(){return this.selectorText}}]),t}(AU),Zgt={onCreateRule:function(t,n,r){return t[0]==="@"||r.parent&&r.parent.type==="keyframes"?null:new eR(t,n,r)}},nR={indent:1,children:!0},Kgt=/@([\w-]+)/,Jgt=function(){function e(n,r,i){this.type="conditional",this.isProcessed=!1,this.key=n;var a=n.match(Kgt);this.at=a?a[1]:"unknown",this.query=i.name||"@"+this.at,this.options=i,this.rules=new nI(Vn({},i,{parent:this}));for(var o in r)this.rules.add(o,r[o]);this.rules.process()}var t=e.prototype;return t.getRule=function(r){return this.rules.get(r)},t.indexOf=function(r){return this.rules.indexOf(r)},t.addRule=function(r,i,a){var o=this.rules.add(r,i,a);return o?(this.options.jss.plugins.onProcessRule(o),o):null},t.toString=function(r){r===void 0&&(r=nR);var i=D0(r),a=i.linebreak;if(r.indent==null&&(r.indent=nR.indent),r.children==null&&(r.children=nR.children),r.children===!1)return this.query+" {}";var o=this.rules.toString(r);return o?this.query+" {"+a+o+a+"}":""},e}(),Qgt=/@media|@supports\s+/,tmt={onCreateRule:function(t,n,r){return Qgt.test(t)?new Jgt(t,n,r):null}},rR={indent:1,children:!0},emt=/@keyframes\s+([\w-]+)/,iR=function(){function e(n,r,i){this.type="keyframes",this.at="@keyframes",this.isProcessed=!1;var a=n.match(emt);a&&a[1]?this.name=a[1]:this.name="noname",this.key=this.type+"-"+this.name,this.options=i;var o=i.scoped,u=i.sheet,c=i.generateId;this.id=o===!1?this.name:tR(c(this,u)),this.rules=new nI(Vn({},i,{parent:this}));for(var g in r)this.rules.add(g,r[g],Vn({},i,{parent:this}));this.rules.process()}var t=e.prototype;return t.toString=function(r){r===void 0&&(r=rR);var i=D0(r),a=i.linebreak;if(r.indent==null&&(r.indent=rR.indent),r.children==null&&(r.children=rR.children),r.children===!1)return this.at+" "+this.id+" {}";var o=this.rules.toString(r);return o&&(o=""+a+o+a),this.at+" "+this.id+" {"+o+"}"},e}(),nmt=/@keyframes\s+/,rmt=/\$([\w-]+)/g,oR=function(t,n){return typeof t=="string"?t.replace(rmt,function(r,i){return i in n?n[i]:r}):t},LU=function(t,n,r){var i=t[n],a=oR(i,r);a!==i&&(t[n]=a)},imt={onCreateRule:function(t,n,r){return typeof t=="string"&&nmt.test(t)?new iR(t,n,r):null},onProcessStyle:function(t,n,r){return n.type!=="style"||!r||("animation-name"in t&&LU(t,"animation-name",r.keyframes),"animation"in t&&LU(t,"animation",r.keyframes)),t},onChangeValue:function(t,n,r){var i=r.options.sheet;if(!i)return t;switch(n){case"animation":return oR(t,i.keyframes);case"animation-name":return oR(t,i.keyframes);default:return t}}},omt=function(e){ph(t,e);function t(){return e.apply(this,arguments)||this}var n=t.prototype;return n.toString=function(i){var a=this.options.sheet,o=a?a.options.link:!1,u=o?Vn({},i,{allowEmpty:!0}):i;return zb(this.key,this.style,u)},t}(AU),amt={onCreateRule:function(t,n,r){return r.parent&&r.parent.type==="keyframes"?new omt(t,n,r):null}},smt=function(){function e(n,r,i){this.type="font-face",this.at="@font-face",this.isProcessed=!1,this.key=n,this.style=r,this.options=i}var t=e.prototype;return t.toString=function(r){var i=D0(r),a=i.linebreak;if(Array.isArray(this.style)){for(var o="",u=0;u<this.style.length;u++)o+=zb(this.at,this.style[u]),this.style[u+1]&&(o+=a);return o}return zb(this.at,this.style,r)},e}(),umt=/@font-face/,lmt={onCreateRule:function(t,n,r){return umt.test(t)?new smt(t,n,r):null}},cmt=function(){function e(n,r,i){this.type="viewport",this.at="@viewport",this.isProcessed=!1,this.key=n,this.style=r,this.options=i}var t=e.prototype;return t.toString=function(r){return zb(this.key,this.style,r)},e}(),fmt={onCreateRule:function(t,n,r){return t==="@viewport"||t==="@-ms-viewport"?new cmt(t,n,r):null}},hmt=function(){function e(n,r,i){this.type="simple",this.isProcessed=!1,this.key=n,this.value=r,this.options=i}var t=e.prototype;return t.toString=function(r){if(Array.isArray(this.value)){for(var i="",a=0;a<this.value.length;a++)i+=this.key+" "+this.value[a]+";",this.value[a+1]&&(i+=` `);return i}return this.key+" "+this.value+";"},e}(),pmt={"@charset":!0,"@import":!0,"@namespace":!0},dmt={onCreateRule:function(t,n,r){return t in pmt?new hmt(t,n,r):null}},OU=[Zgt,tmt,imt,amt,lmt,fmt,dmt],gmt={process:!0},RU={force:!0,process:!0},nI=function(){function e(n){this.map={},this.raw={},this.index=[],this.counter=0,this.options=n,this.classes=n.classes,this.keyframes=n.keyframes}var t=e.prototype;return t.add=function(r,i,a){var o=this.options,u=o.parent,c=o.sheet,g=o.jss,_=o.Renderer,E=o.generateId,C=o.scoped,O=Vn({classes:this.classes,parent:u,sheet:c,jss:g,Renderer:_,generateId:E,scoped:C,name:r,keyframes:this.keyframes,selector:void 0},a),R=r;r in this.raw&&(R=r+"-d"+this.counter++),this.raw[R]=i,R in this.classes&&(O.selector="."+tR(this.classes[R]));var D=QO(R,i,O);if(!D)return null;this.register(D);var B=O.index===void 0?this.index.length:O.index;return this.index.splice(B,0,D),D},t.get=function(r){return this.map[r]},t.remove=function(r){this.unregister(r),delete this.raw[r.key],this.index.splice(this.index.indexOf(r),1)},t.indexOf=function(r){return this.index.indexOf(r)},t.process=function(){var r=this.options.jss.plugins;this.index.slice(0).forEach(r.onProcessRule,r)},t.register=function(r){this.map[r.key]=r,r instanceof eR?(this.map[r.selector]=r,r.id&&(this.classes[r.key]=r.id)):r instanceof iR&&this.keyframes&&(this.keyframes[r.name]=r.id)},t.unregister=function(r){delete this.map[r.key],r instanceof eR?(delete this.map[r.selector],delete this.classes[r.key]):r instanceof iR&&delete this.keyframes[r.name]},t.update=function(){var r,i,a;if(typeof(arguments.length<=0?void 0:arguments[0])=="string"?(r=arguments.length<=0?void 0:arguments[0],i=arguments.length<=1?void 0:arguments[1],a=arguments.length<=2?void 0:arguments[2]):(i=arguments.length<=0?void 0:arguments[0],a=arguments.length<=1?void 0:arguments[1],r=null),r)this.updateOne(this.map[r],i,a);else for(var o=0;o<this.index.length;o++)this.updateOne(this.index[o],i,a)},t.updateOne=function(r,i,a){a===void 0&&(a=gmt);var o=this.options,u=o.jss.plugins,c=o.sheet;if(r.rules instanceof e){r.rules.update(i,a);return}var g=r.style;if(u.onUpdate(i,r,c,a),a.process&&g&&g!==r.style){u.onProcessStyle(r.style,r,c);for(var _ in r.style){var E=r.style[_],C=g[_];E!==C&&r.prop(_,E,RU)}for(var O in g){var R=r.style[O],D=g[O];R==null&&R!==D&&r.prop(O,null,RU)}}},t.toString=function(r){for(var i="",a=this.options.sheet,o=a?a.options.link:!1,u=D0(r),c=u.linebreak,g=0;g<this.index.length;g++){var _=this.index[g],E=_.toString(r);!E&&!o||(i&&(i+=c),i+=E)}return i},e}(),kU=function(){function e(n,r){this.attached=!1,this.deployed=!1,this.classes={},this.keyframes={},this.options=Vn({},r,{sheet:this,parent:this,classes:this.classes,keyframes:this.keyframes}),r.Renderer&&(this.renderer=new r.Renderer(this)),this.rules=new nI(this.options);for(var i in n)this.rules.add(i,n[i]);this.rules.process()}var t=e.prototype;return t.attach=function(){return this.attached?this:(this.renderer&&this.renderer.attach(),this.attached=!0,this.deployed||this.deploy(),this)},t.detach=function(){return this.attached?(this.renderer&&this.renderer.detach(),this.attached=!1,this):this},t.addRule=function(r,i,a){var o=this.queue;this.attached&&!o&&(this.queue=[]);var u=this.rules.add(r,i,a);return u?(this.options.jss.plugins.onProcessRule(u),this.attached?(this.deployed&&(o?o.push(u):(this.insertRule(u),this.queue&&(this.queue.forEach(this.insertRule,this),this.queue=void 0))),u):(this.deployed=!1,u)):null},t.insertRule=function(r){this.renderer&&this.renderer.insertRule(r)},t.addRules=function(r,i){var a=[];for(var o in r){var u=this.addRule(o,r[o],i);u&&a.push(u)}return a},t.getRule=function(r){return this.rules.get(r)},t.deleteRule=function(r){var i=typeof r=="object"?r:this.rules.get(r);return!i||this.attached&&!i.renderable?!1:(this.rules.remove(i),this.attached&&i.renderable&&this.renderer?this.renderer.deleteRule(i.renderable):!0)},t.indexOf=function(r){return this.rules.indexOf(r)},t.deploy=function(){return this.renderer&&this.renderer.deploy(),this.deployed=!0,this},t.update=function(){var r;return(r=this.rules).update.apply(r,arguments),this},t.updateOne=function(r,i,a){return this.rules.updateOne(r,i,a),this},t.toString=function(r){return this.rules.toString(r)},e}(),mmt=function(){function e(){this.plugins={internal:[],external:[]},this.registry={}}var t=e.prototype;return t.onCreateRule=function(r,i,a){for(var o=0;o<this.registry.onCreateRule.length;o++){var u=this.registry.onCreateRule[o](r,i,a);if(u)return u}return null},t.onProcessRule=function(r){if(!r.isProcessed){for(var i=r.options.sheet,a=0;a<this.registry.onProcessRule.length;a++)this.registry.onProcessRule[a](r,i);r.style&&this.onProcessStyle(r.style,r,i),r.isProcessed=!0}},t.onProcessStyle=function(r,i,a){for(var o=0;o<this.registry.onProcessStyle.length;o++)i.style=this.registry.onProcessStyle[o](i.style,i,a)},t.onProcessSheet=function(r){for(var i=0;i<this.registry.onProcessSheet.length;i++)this.registry.onProcessSheet[i](r)},t.onUpdate=function(r,i,a,o){for(var u=0;u<this.registry.onUpdate.length;u++)this.registry.onUpdate[u](r,i,a,o)},t.onChangeValue=function(r,i,a){for(var o=r,u=0;u<this.registry.onChangeValue.length;u++)o=this.registry.onChangeValue[u](o,i,a);return o},t.use=function(r,i){i===void 0&&(i={queue:"external"});var a=this.plugins[i.queue];a.indexOf(r)===-1&&(a.push(r),this.registry=[].concat(this.plugins.external,this.plugins.internal).reduce(function(o,u){for(var c in u)c in o&&o[c].push(u[c]);return o},{onCreateRule:[],onProcessRule:[],onProcessStyle:[],onProcessSheet:[],onChangeValue:[],onUpdate:[]}))},e}(),vmt=function(){function e(){this.registry=[]}var t=e.prototype;return t.add=function(r){var i=this.registry,a=r.options.index;if(i.indexOf(r)===-1){if(i.length===0||a>=this.index){i.push(r);return}for(var o=0;o<i.length;o++)if(i[o].options.index>a){i.splice(o,0,r);return}}},t.reset=function(){this.registry=[]},t.remove=function(r){var i=this.registry.indexOf(r);this.registry.splice(i,1)},t.toString=function(r){for(var i=r===void 0?{}:r,a=i.attached,o=Zp(i,["attached"]),u=D0(o),c=u.linebreak,g="",_=0;_<this.registry.length;_++){var E=this.registry[_];a!=null&&E.attached!==a||(g&&(g+=c),g+=E.toString(o))}return g},IU(e,[{key:"index",get:function(){return this.registry.length===0?0:this.registry[this.registry.length-1].options.index}}]),e}(),Bb=new vmt,aR=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"&&window.Math===Math?window:typeof self!="undefined"&&self.Math===Math?self:Function("return this")(),sR="2f1acc6c3a606b082e5eef5e54414ffb";aR[sR]==null&&(aR[sR]=0);var DU=aR[sR]++,NU=function(t){t===void 0&&(t={});var n=0,r=function(a,o){n+=1;var u="",c="";return o&&(o.options.classNamePrefix&&(c=o.options.classNamePrefix),o.options.jss.id!=null&&(u=String(o.options.jss.id))),t.minify?""+(c||"c")+DU+u+n:c+a.key+"-"+DU+(u?"-"+u:"")+"-"+n};return r},FU=function(t){var n;return function(){return n||(n=t()),n}},ymt=function(t,n){try{return t.attributeStyleMap?t.attributeStyleMap.get(n):t.style.getPropertyValue(n)}catch{return""}},_mt=function(t,n,r){try{var i=r;if(Array.isArray(r)&&(i=hy(r,!0),r[r.length-1]==="!important"))return t.style.setProperty(n,i,"important"),!0;t.attributeStyleMap?t.attributeStyleMap.set(n,i):t.style.setProperty(n,i)}catch{return!1}return!0},xmt=function(t,n){try{t.attributeStyleMap?t.attributeStyleMap.delete(n):t.style.removeProperty(n)}catch{}},bmt=function(t,n){return t.selectorText=n,t.selectorText===n},zU=FU(function(){return document.querySelector("head")});function wmt(e,t){for(var n=0;n<e.length;n++){var r=e[n];if(r.attached&&r.options.index>t.index&&r.options.insertionPoint===t.insertionPoint)return r}return null}function Smt(e,t){for(var n=e.length-1;n>=0;n--){var r=e[n];if(r.attached&&r.options.insertionPoint===t.insertionPoint)return r}return null}function Emt(e){for(var t=zU(),n=0;n<t.childNodes.length;n++){var r=t.childNodes[n];if(r.nodeType===8&&r.nodeValue.trim()===e)return r}return null}function Cmt(e){var t=Bb.registry;if(t.length>0){var n=wmt(t,e);if(n&&n.renderer)return{parent:n.renderer.element.parentNode,node:n.renderer.element};if(n=Smt(t,e),n&&n.renderer)return{parent:n.renderer.element.parentNode,node:n.renderer.element.nextSibling}}var r=e.insertionPoint;if(r&&typeof r=="string"){var i=Emt(r);if(i)return{parent:i.parentNode,node:i.nextSibling}}return!1}function Imt(e,t){var n=t.insertionPoint,r=Cmt(t);if(r!==!1&&r.parent){r.parent.insertBefore(e,r.node);return}if(n&&typeof n.nodeType=="number"){var i=n,a=i.parentNode;a&&a.insertBefore(e,i.nextSibling);return}zU().appendChild(e)}var Pmt=FU(function(){var e=document.querySelector('meta[property="csp-nonce"]');return e?e.getAttribute("content"):null}),BU=function(t,n,r){try{"insertRule"in t?t.insertRule(n,r):"appendRule"in t&&t.appendRule(n)}catch{return!1}return t.cssRules[r]},UU=function(t,n){var r=t.cssRules.length;return n===void 0||n>r?r:n},Tmt=function(){var t=document.createElement("style");return t.textContent=` `,t},Mmt=function(){function e(n){this.getPropertyValue=ymt,this.setProperty=_mt,this.removeProperty=xmt,this.setSelector=bmt,this.hasInsertedRules=!1,this.cssRules=[],n&&Bb.add(n),this.sheet=n;var r=this.sheet?this.sheet.options:{},i=r.media,a=r.meta,o=r.element;this.element=o||Tmt(),this.element.setAttribute("data-jss",""),i&&this.element.setAttribute("media",i),a&&this.element.setAttribute("data-meta",a);var u=Pmt();u&&this.element.setAttribute("nonce",u)}var t=e.prototype;return t.attach=function(){if(!(this.element.parentNode||!this.sheet)){Imt(this.element,this.sheet.options);var r=Boolean(this.sheet&&this.sheet.deployed);this.hasInsertedRules&&r&&(this.hasInsertedRules=!1,this.deploy())}},t.detach=function(){if(!!this.sheet){var r=this.element.parentNode;r&&r.removeChild(this.element),this.sheet.options.link&&(this.cssRules=[],this.element.textContent=` `)}},t.deploy=function(){var r=this.sheet;if(!!r){if(r.options.link){this.insertRules(r.rules);return}this.element.textContent=` `+r.toString()+` `}},t.insertRules=function(r,i){for(var a=0;a<r.index.length;a++)this.insertRule(r.index[a],a,i)},t.insertRule=function(r,i,a){if(a===void 0&&(a=this.element.sheet),r.rules){var o=r,u=a;if(r.type==="conditional"||r.type==="keyframes"){var c=UU(a,i);if(u=BU(a,o.toString({children:!1}),c),u===!1)return!1;this.refCssRule(r,c,u)}return this.insertRules(o.rules,u),u}var g=r.toString();if(!g)return!1;var _=UU(a,i),E=BU(a,g,_);return E===!1?!1:(this.hasInsertedRules=!0,this.refCssRule(r,_,E),E)},t.refCssRule=function(r,i,a){r.renderable=a,r.options.parent instanceof kU&&(this.cssRules[i]=a)},t.deleteRule=function(r){var i=this.element.sheet,a=this.indexOf(r);return a===-1?!1:(i.deleteRule(a),this.cssRules.splice(a,1),!0)},t.indexOf=function(r){return this.cssRules.indexOf(r)},t.replaceRule=function(r,i){var a=this.indexOf(r);return a===-1?!1:(this.element.sheet.deleteRule(a),this.cssRules.splice(a,1),this.insertRule(i,a))},t.getRules=function(){return this.element.sheet.cssRules},e}(),Amt=0,Lmt=function(){function e(n){this.id=Amt++,this.version="10.8.0",this.plugins=new mmt,this.options={id:{minify:!1},createGenerateId:NU,Renderer:Nb?Mmt:null,plugins:[]},this.generateId=NU({minify:!1});for(var r=0;r<OU.length;r++)this.plugins.use(OU[r],{queue:"internal"});this.setup(n)}var t=e.prototype;return t.setup=function(r){return r===void 0&&(r={}),r.createGenerateId&&(this.options.createGenerateId=r.createGenerateId),r.id&&(this.options.id=Vn({},this.options.id,r.id)),(r.createGenerateId||r.id)&&(this.generateId=this.options.createGenerateId(this.options.id)),r.insertionPoint!=null&&(this.options.insertionPoint=r.insertionPoint),"Renderer"in r&&(this.options.Renderer=r.Renderer),r.plugins&&this.use.apply(this,r.plugins),this},t.createStyleSheet=function(r,i){i===void 0&&(i={});var a=i,o=a.index;typeof o!="number"&&(o=Bb.index===0?0:Bb.index+1);var u=new kU(r,Vn({},i,{jss:this,generateId:i.generateId||this.generateId,insertionPoint:this.options.insertionPoint,Renderer:this.options.Renderer,index:o}));return this.plugins.onProcessSheet(u),u},t.removeStyleSheet=function(r){return r.detach(),Bb.remove(r),this},t.createRule=function(r,i,a){if(i===void 0&&(i={}),a===void 0&&(a={}),typeof r=="object")return this.createRule(void 0,r,i);var o=Vn({},a,{name:r,jss:this,Renderer:this.options.Renderer});o.generateId||(o.generateId=this.generateId),o.classes||(o.classes={}),o.keyframes||(o.keyframes={});var u=QO(r,i,o);return u&&this.plugins.onProcessRule(u),u},t.use=function(){for(var r=this,i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];return a.forEach(function(u){r.plugins.use(u)}),this},e}(),VU=function(t){return new Lmt(t)},uR=typeof CSS=="object"&&CSS!=null&&"number"in CSS;function $U(e){var t=null;for(var n in e){var r=e[n],i=typeof r;if(i==="function")t||(t={}),t[n]=r;else if(i==="object"&&r!==null&&!Array.isArray(r)){var a=$U(r);a&&(t||(t={}),t[n]=a)}}return t}/** * A better abstraction over CSS. * * @copyright Oleg Isonen (Slobodskoi) / Isonen 2014-present * @website https://github.com/cssinjs/jss * @license MIT */VU();var jU=Date.now(),lR="fnValues"+jU,cR="fnStyle"+ ++jU,Omt=function(){return{onCreateRule:function(n,r,i){if(typeof r!="function")return null;var a=QO(n,{},i);return a[cR]=r,a},onProcessStyle:function(n,r){if(lR in r||cR in r)return n;var i={};for(var a in n){var o=n[a];typeof o=="function"&&(delete n[a],i[a]=o)}return r[lR]=i,n},onUpdate:function(n,r,i,a){var o=r,u=o[cR];u&&(o.style=u(n)||{});var c=o[lR];if(c)for(var g in c)o.prop(g,c[g](n),a)}}},Rmt=Omt,Bm="@global",fR="@global ",kmt=function(){function e(n,r,i){this.type="global",this.at=Bm,this.isProcessed=!1,this.key=n,this.options=i,this.rules=new nI(Vn({},i,{parent:this}));for(var a in r)this.rules.add(a,r[a]);this.rules.process()}var t=e.prototype;return t.getRule=function(r){return this.rules.get(r)},t.addRule=function(r,i,a){var o=this.rules.add(r,i,a);return o&&this.options.jss.plugins.onProcessRule(o),o},t.indexOf=function(r){return this.rules.indexOf(r)},t.toString=function(){return this.rules.toString()},e}(),Dmt=function(){function e(n,r,i){this.type="global",this.at=Bm,this.isProcessed=!1,this.key=n,this.options=i;var a=n.substr(fR.length);this.rule=i.jss.createRule(a,r,Vn({},i,{parent:this}))}var t=e.prototype;return t.toString=function(r){return this.rule?this.rule.toString(r):""},e}(),Nmt=/\s*,\s*/g;function qU(e,t){for(var n=e.split(Nmt),r="",i=0;i<n.length;i++)r+=t+" "+n[i].trim(),n[i+1]&&(r+=", ");return r}function Fmt(e,t){var n=e.options,r=e.style,i=r?r[Bm]:null;if(!!i){for(var a in i)t.addRule(a,i[a],Vn({},n,{selector:qU(a,e.selector)}));delete r[Bm]}}function zmt(e,t){var n=e.options,r=e.style;for(var i in r)if(!(i[0]!=="@"||i.substr(0,Bm.length)!==Bm)){var a=qU(i.substr(Bm.length),e.selector);t.addRule(a,r[i],Vn({},n,{selector:a})),delete r[i]}}function Bmt(){function e(n,r,i){if(!n)return null;if(n===Bm)return new kmt(n,r,i);if(n[0]==="@"&&n.substr(0,fR.length)===fR)return new Dmt(n,r,i);var a=i.parent;return a&&(a.type==="global"||a.options.parent&&a.options.parent.type==="global")&&(i.scoped=!1),i.scoped===!1&&(i.selector=n),null}function t(n,r){n.type!=="style"||!r||(Fmt(n,r),zmt(n,r))}return{onCreateRule:e,onProcessRule:t}}var GU=/\s*,\s*/g,Umt=/&/g,Vmt=/\$([\w-]+)/g;function $mt(){function e(i,a){return function(o,u){var c=i.getRule(u)||a&&a.getRule(u);return c?c.selector:u}}function t(i,a){for(var o=a.split(GU),u=i.split(GU),c="",g=0;g<o.length;g++)for(var _=o[g],E=0;E<u.length;E++){var C=u[E];c&&(c+=", "),c+=C.indexOf("&")!==-1?C.replace(Umt,_):_+" "+C}return c}function n(i,a,o){if(o)return Vn({},o,{index:o.index+1});var u=i.options.nestingLevel;u=u===void 0?1:u+1;var c=Vn({},i.options,{nestingLevel:u,index:a.indexOf(i)+1});return delete c.name,c}function r(i,a,o){if(a.type!=="style")return i;var u=a,c=u.options.parent,g,_;for(var E in i){var C=E.indexOf("&")!==-1,O=E[0]==="@";if(!(!C&&!O)){if(g=n(u,c,g),C){var R=t(E,u.selector);_||(_=e(c,o)),R=R.replace(Vmt,_),c.addRule(R,i[E],Vn({},g,{selector:R}))}else O&&c.addRule(E,{},g).addRule(u.key,i[E],{selector:u.selector});delete i[E]}}return i}return{onProcessStyle:r}}var jmt=/[A-Z]/g,qmt=/^ms-/,hR={};function Gmt(e){return"-"+e.toLowerCase()}function WU(e){if(hR.hasOwnProperty(e))return hR[e];var t=e.replace(jmt,Gmt);return hR[e]=qmt.test(t)?"-"+t:t}function rI(e){var t={};for(var n in e){var r=n.indexOf("--")===0?n:WU(n);t[r]=e[n]}return e.fallbacks&&(Array.isArray(e.fallbacks)?t.fallbacks=e.fallbacks.map(rI):t.fallbacks=rI(e.fallbacks)),t}function Wmt(){function e(n){if(Array.isArray(n)){for(var r=0;r<n.length;r++)n[r]=rI(n[r]);return n}return rI(n)}function t(n,r,i){if(r.indexOf("--")===0)return n;var a=WU(r);return r===a?n:(i.prop(a,n),null)}return{onProcessStyle:e,onChangeValue:t}}var xe=uR&&CSS?CSS.px:"px",iI=uR&&CSS?CSS.ms:"ms",N0=uR&&CSS?CSS.percent:"%",Hmt={"animation-delay":iI,"animation-duration":iI,"background-position":xe,"background-position-x":xe,"background-position-y":xe,"background-size":xe,border:xe,"border-bottom":xe,"border-bottom-left-radius":xe,"border-bottom-right-radius":xe,"border-bottom-width":xe,"border-left":xe,"border-left-width":xe,"border-radius":xe,"border-right":xe,"border-right-width":xe,"border-top":xe,"border-top-left-radius":xe,"border-top-right-radius":xe,"border-top-width":xe,"border-width":xe,"border-block":xe,"border-block-end":xe,"border-block-end-width":xe,"border-block-start":xe,"border-block-start-width":xe,"border-block-width":xe,"border-inline":xe,"border-inline-end":xe,"border-inline-end-width":xe,"border-inline-start":xe,"border-inline-start-width":xe,"border-inline-width":xe,"border-start-start-radius":xe,"border-start-end-radius":xe,"border-end-start-radius":xe,"border-end-end-radius":xe,margin:xe,"margin-bottom":xe,"margin-left":xe,"margin-right":xe,"margin-top":xe,"margin-block":xe,"margin-block-end":xe,"margin-block-start":xe,"margin-inline":xe,"margin-inline-end":xe,"margin-inline-start":xe,padding:xe,"padding-bottom":xe,"padding-left":xe,"padding-right":xe,"padding-top":xe,"padding-block":xe,"padding-block-end":xe,"padding-block-start":xe,"padding-inline":xe,"padding-inline-end":xe,"padding-inline-start":xe,"mask-position-x":xe,"mask-position-y":xe,"mask-size":xe,height:xe,width:xe,"min-height":xe,"max-height":xe,"min-width":xe,"max-width":xe,bottom:xe,left:xe,top:xe,right:xe,inset:xe,"inset-block":xe,"inset-block-end":xe,"inset-block-start":xe,"inset-inline":xe,"inset-inline-end":xe,"inset-inline-start":xe,"box-shadow":xe,"text-shadow":xe,"column-gap":xe,"column-rule":xe,"column-rule-width":xe,"column-width":xe,"font-size":xe,"font-size-delta":xe,"letter-spacing":xe,"text-decoration-thickness":xe,"text-indent":xe,"text-stroke":xe,"text-stroke-width":xe,"word-spacing":xe,motion:xe,"motion-offset":xe,outline:xe,"outline-offset":xe,"outline-width":xe,perspective:xe,"perspective-origin-x":N0,"perspective-origin-y":N0,"transform-origin":N0,"transform-origin-x":N0,"transform-origin-y":N0,"transform-origin-z":N0,"transition-delay":iI,"transition-duration":iI,"vertical-align":xe,"flex-basis":xe,"shape-margin":xe,size:xe,gap:xe,grid:xe,"grid-gap":xe,"row-gap":xe,"grid-row-gap":xe,"grid-column-gap":xe,"grid-template-rows":xe,"grid-template-columns":xe,"grid-auto-rows":xe,"grid-auto-columns":xe,"box-shadow-x":xe,"box-shadow-y":xe,"box-shadow-blur":xe,"box-shadow-spread":xe,"font-line-height":xe,"text-shadow-x":xe,"text-shadow-y":xe,"text-shadow-blur":xe};function HU(e){var t=/(-[a-z])/g,n=function(o){return o[1].toUpperCase()},r={};for(var i in e)r[i]=e[i],r[i.replace(t,n)]=e[i];return r}var Xmt=HU(Hmt);function Ub(e,t,n){if(t==null)return t;if(Array.isArray(t))for(var r=0;r<t.length;r++)t[r]=Ub(e,t[r],n);else if(typeof t=="object")if(e==="fallbacks")for(var i in t)t[i]=Ub(i,t[i],n);else for(var a in t)t[a]=Ub(e+"-"+a,t[a],n);else if(typeof t=="number"&&isNaN(t)===!1){var o=n[e]||Xmt[e];return o&&!(t===0&&o===xe)?typeof o=="function"?o(t).toString():""+t+o:t.toString()}return t}function Ymt(e){e===void 0&&(e={});var t=HU(e);function n(i,a){if(a.type!=="style")return i;for(var o in i)i[o]=Ub(o,i[o],t);return i}function r(i,a){return Ub(a,i,t)}return{onProcessStyle:n,onChangeValue:r}}var Vb="",pR="",XU="",YU="",Zmt=Nb&&"ontouchstart"in document.documentElement;if(Nb){var dR={Moz:"-moz-",ms:"-ms-",O:"-o-",Webkit:"-webkit-"},Kmt=document.createElement("p"),gR=Kmt.style,Jmt="Transform";for(var mR in dR)if(mR+Jmt in gR){Vb=mR,pR=dR[mR];break}Vb==="Webkit"&&"msHyphens"in gR&&(Vb="ms",pR=dR.ms,YU="edge"),Vb==="Webkit"&&"-apple-trailing-word"in gR&&(XU="apple")}var Nr={js:Vb,css:pR,vendor:XU,browser:YU,isTouch:Zmt};function Qmt(e){return e[1]==="-"||Nr.js==="ms"?e:"@"+Nr.css+"keyframes"+e.substr(10)}var tvt={noPrefill:["appearance"],supportedProperty:function(t){return t!=="appearance"?!1:Nr.js==="ms"?"-webkit-"+t:Nr.css+t}},evt={noPrefill:["color-adjust"],supportedProperty:function(t){return t!=="color-adjust"?!1:Nr.js==="Webkit"?Nr.css+"print-"+t:t}},nvt=/[-\s]+(.)?/g;function rvt(e,t){return t?t.toUpperCase():""}function vR(e){return e.replace(nvt,rvt)}function Um(e){return vR("-"+e)}var ivt={noPrefill:["mask"],supportedProperty:function(t,n){if(!/^mask/.test(t))return!1;if(Nr.js==="Webkit"){var r="mask-image";if(vR(r)in n)return t;if(Nr.js+Um(r)in n)return Nr.css+t}return t}},ovt={noPrefill:["text-orientation"],supportedProperty:function(t){return t!=="text-orientation"?!1:Nr.vendor==="apple"&&!Nr.isTouch?Nr.css+t:t}},avt={noPrefill:["transform"],supportedProperty:function(t,n,r){return t!=="transform"?!1:r.transform?t:Nr.css+t}},svt={noPrefill:["transition"],supportedProperty:function(t,n,r){return t!=="transition"?!1:r.transition?t:Nr.css+t}},uvt={noPrefill:["writing-mode"],supportedProperty:function(t){return t!=="writing-mode"?!1:Nr.js==="Webkit"||Nr.js==="ms"&&Nr.browser!=="edge"?Nr.css+t:t}},lvt={noPrefill:["user-select"],supportedProperty:function(t){return t!=="user-select"?!1:Nr.js==="Moz"||Nr.js==="ms"||Nr.vendor==="apple"?Nr.css+t:t}},cvt={supportedProperty:function(t,n){if(!/^break-/.test(t))return!1;if(Nr.js==="Webkit"){var r="WebkitColumn"+Um(t);return r in n?Nr.css+"column-"+t:!1}if(Nr.js==="Moz"){var i="page"+Um(t);return i in n?"page-"+t:!1}return!1}},fvt={supportedProperty:function(t,n){if(!/^(border|margin|padding)-inline/.test(t))return!1;if(Nr.js==="Moz")return t;var r=t.replace("-inline","");return Nr.js+Um(r)in n?Nr.css+r:!1}},hvt={supportedProperty:function(t,n){return vR(t)in n?t:!1}},pvt={supportedProperty:function(t,n){var r=Um(t);return t[0]==="-"||t[0]==="-"&&t[1]==="-"?t:Nr.js+r in n?Nr.css+t:Nr.js!=="Webkit"&&"Webkit"+r in n?"-webkit-"+t:!1}},dvt={supportedProperty:function(t){return t.substring(0,11)!=="scroll-snap"?!1:Nr.js==="ms"?""+Nr.css+t:t}},gvt={supportedProperty:function(t){return t!=="overscroll-behavior"?!1:Nr.js==="ms"?Nr.css+"scroll-chaining":t}},mvt={"flex-grow":"flex-positive","flex-shrink":"flex-negative","flex-basis":"flex-preferred-size","justify-content":"flex-pack",order:"flex-order","align-items":"flex-align","align-content":"flex-line-pack"},vvt={supportedProperty:function(t,n){var r=mvt[t];return r&&Nr.js+Um(r)in n?Nr.css+r:!1}},ZU={flex:"box-flex","flex-grow":"box-flex","flex-direction":["box-orient","box-direction"],order:"box-ordinal-group","align-items":"box-align","flex-flow":["box-orient","box-direction"],"justify-content":"box-pack"},yvt=Object.keys(ZU),_vt=function(t){return Nr.css+t},xvt={supportedProperty:function(t,n,r){var i=r.multiple;if(yvt.indexOf(t)>-1){var a=ZU[t];if(!Array.isArray(a))return Nr.js+Um(a)in n?Nr.css+a:!1;if(!i)return!1;for(var o=0;o<a.length;o++)if(!(Nr.js+Um(a[0])in n))return!1;return a.map(_vt)}return!1}},KU=[tvt,evt,ivt,ovt,avt,svt,uvt,lvt,cvt,fvt,hvt,pvt,dvt,gvt,vvt,xvt],JU=KU.filter(function(e){return e.supportedProperty}).map(function(e){return e.supportedProperty}),bvt=KU.filter(function(e){return e.noPrefill}).reduce(function(e,t){return e.push.apply(e,Ngt(t.noPrefill)),e},[]),$b,py={};if(Nb){$b=document.createElement("p");var yR=window.getComputedStyle(document.documentElement,"");for(var _R in yR)isNaN(_R)||(py[yR[_R]]=yR[_R]);bvt.forEach(function(e){return delete py[e]})}function xR(e,t){if(t===void 0&&(t={}),!$b)return e;if(py[e]!=null)return py[e];(e==="transition"||e==="transform")&&(t[e]=e in $b.style);for(var n=0;n<JU.length&&(py[e]=JU[n](e,$b.style,t),!py[e]);n++);try{$b.style[e]=""}catch{return!1}return py[e]}var F0={},wvt={transition:1,"transition-property":1,"-webkit-transition":1,"-webkit-transition-property":1},Svt=/(^\s*[\w-]+)|, (\s*[\w-]+)(?![^()]*\))/g,Vm;function Evt(e,t,n){if(t==="var")return"var";if(t==="all")return"all";if(n==="all")return", all";var r=t?xR(t):", "+xR(n);return r||t||n}Nb&&(Vm=document.createElement("p"));function QU(e,t){var n=t;if(!Vm||e==="content")return t;if(typeof n!="string"||!isNaN(parseInt(n,10)))return n;var r=e+n;if(F0[r]!=null)return F0[r];try{Vm.style[e]=n}catch{return F0[r]=!1,!1}if(wvt[e])n=n.replace(Svt,Evt);else if(Vm.style[e]===""&&(n=Nr.css+n,n==="-ms-flex"&&(Vm.style[e]="-ms-flexbox"),Vm.style[e]=n,Vm.style[e]===""))return F0[r]=!1,!1;return Vm.style[e]="",F0[r]=n,F0[r]}function Cvt(){function e(i){if(i.type==="keyframes"){var a=i;a.at=Qmt(a.at)}}function t(i){for(var a in i){var o=i[a];if(a==="fallbacks"&&Array.isArray(o)){i[a]=o.map(t);continue}var u=!1,c=xR(a);c&&c!==a&&(u=!0);var g=!1,_=QU(c,hy(o));_&&_!==o&&(g=!0),(u||g)&&(u&&delete i[a],i[c||a]=_||o)}return i}function n(i,a){return a.type!=="style"?i:t(i)}function r(i,a){return QU(a,hy(i))||i}return{onProcessRule:e,onProcessStyle:n,onChangeValue:r}}function Ivt(){var e=function(n,r){return n.length===r.length?n>r?1:-1:n.length-r.length};return{onProcessStyle:function(n,r){if(r.type!=="style")return n;for(var i={},a=Object.keys(n).sort(e),o=0;o<a.length;o++)i[a[o]]=n[a[o]];return i}}}function Pvt(){return{plugins:[Rmt(),Bmt(),$mt(),Wmt(),Ymt(),typeof window=="undefined"?null:Cvt(),Ivt()]}}function tV(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=e.baseClasses,n=e.newClasses;if(e.Component,!n)return t;var r=Vn({},t);return Object.keys(n).forEach(function(i){n[i]&&(r[i]="".concat(t[i]," ").concat(n[i]))}),r}var Tvt={set:function(t,n,r,i){var a=t.get(n);a||(a=new Map,t.set(n,a)),a.set(r,i)},get:function(t,n,r){var i=t.get(n);return i?i.get(r):void 0},delete:function(t,n,r){var i=t.get(n);i.delete(r)}},z0=Tvt,Mvt=vr.createContext(null),Avt=Mvt;function eV(){var e=vr.useContext(Avt);return e}var Lvt=VU(Pvt()),Ovt=Wgt(),Rvt=new Map,kvt={disableGeneration:!1,generateClassName:Ovt,jss:Lvt,sheetsCache:null,sheetsManager:Rvt,sheetsRegistry:null},Dvt=vr.createContext(kvt),nV=-1e9;function Nvt(){return nV+=1,nV}var Fvt={},zvt=Fvt;function Bvt(e){var t=typeof e=="function";return{create:function(r,i){var a;try{a=t?e(r):e}catch(c){throw c}if(!i||!r.overrides||!r.overrides[i])return a;var o=r.overrides[i],u=Vn({},a);return Object.keys(o).forEach(function(c){u[c]=R0(u[c],o[c])}),u},options:{}}}function Uvt(e,t,n){var r=e.state,i=e.stylesOptions;if(i.disableGeneration)return t||{};r.cacheClasses||(r.cacheClasses={value:null,lastProp:null,lastJSS:{}});var a=!1;return r.classes!==r.cacheClasses.lastJSS&&(r.cacheClasses.lastJSS=r.classes,a=!0),t!==r.cacheClasses.lastProp&&(r.cacheClasses.lastProp=t,a=!0),a&&(r.cacheClasses.value=tV({baseClasses:r.cacheClasses.lastJSS,newClasses:t,Component:n})),r.cacheClasses.value}function Vvt(e,t){var n=e.state,r=e.theme,i=e.stylesOptions,a=e.stylesCreator,o=e.name;if(!i.disableGeneration){var u=z0.get(i.sheetsManager,a,r);u||(u={refs:0,staticSheet:null,dynamicStyles:null},z0.set(i.sheetsManager,a,r,u));var c=Vn({},a.options,i,{theme:r,flip:typeof i.flip=="boolean"?i.flip:r.direction==="rtl"});c.generateId=c.serverGenerateClassName||c.generateClassName;var g=i.sheetsRegistry;if(u.refs===0){var _;i.sheetsCache&&(_=z0.get(i.sheetsCache,a,r));var E=a.create(r,o);_||(_=i.jss.createStyleSheet(E,Vn({link:!1},c)),_.attach(),i.sheetsCache&&z0.set(i.sheetsCache,a,r,_)),g&&g.add(_),u.staticSheet=_,u.dynamicStyles=$U(E)}if(u.dynamicStyles){var C=i.jss.createStyleSheet(u.dynamicStyles,Vn({link:!0},c));C.update(t),C.attach(),n.dynamicSheet=C,n.classes=tV({baseClasses:u.staticSheet.classes,newClasses:C.classes}),g&&g.add(C)}else n.classes=u.staticSheet.classes;u.refs+=1}}function $vt(e,t){var n=e.state;n.dynamicSheet&&n.dynamicSheet.update(t)}function jvt(e){var t=e.state,n=e.theme,r=e.stylesOptions,i=e.stylesCreator;if(!r.disableGeneration){var a=z0.get(r.sheetsManager,i,n);a.refs-=1;var o=r.sheetsRegistry;a.refs===0&&(z0.delete(r.sheetsManager,i,n),r.jss.removeStyleSheet(a.staticSheet),o&&o.remove(a.staticSheet)),t.dynamicSheet&&(r.jss.removeStyleSheet(t.dynamicSheet),o&&o.remove(t.dynamicSheet))}}function qvt(e,t){var n=vr.useRef([]),r,i=vr.useMemo(function(){return{}},t);n.current!==i&&(n.current=i,r=e()),vr.useEffect(function(){return function(){r&&r()}},[i])}function rV(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.name,r=t.classNamePrefix,i=t.Component,a=t.defaultTheme,o=a===void 0?zvt:a,u=cg(t,["name","classNamePrefix","Component","defaultTheme"]),c=Bvt(e),g=n||r||"makeStyles";c.options={index:Nvt(),name:n,meta:g,classNamePrefix:g};var _=function(){var C=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},O=eV()||o,R=Vn({},vr.useContext(Dvt),u),D=vr.useRef(),B=vr.useRef();qvt(function(){var k={name:n,state:{},stylesCreator:c,stylesOptions:R,theme:O};return Vvt(k,C),B.current=!1,D.current=k,function(){jvt(k)}},[O,c]),vr.useEffect(function(){B.current&&$vt(D.current,C),B.current=!0});var z=Uvt(D.current,C.classes,i);return z};return _}var Gvt=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return function(r){var i=n.defaultTheme,a=n.withTheme,o=a===void 0?!1:a,u=n.name,c=cg(n,["defaultTheme","withTheme","name"]),g=u,_=rV(t,Vn({defaultTheme:i,Component:r,name:u||r.displayName,classNamePrefix:g},c)),E=vr.forwardRef(function(O,R){O.classes;var D=O.innerRef,B=cg(O,["classes","innerRef"]),z=_(Vn({},r.defaultProps,O)),k,$=B;return(typeof u=="string"||o)&&(k=eV()||i,u&&($=Hgt({theme:k,name:u,props:B})),o&&!$.theme&&($.theme=k)),vr.createElement(r,Vn({ref:D||R,classes:z},$))});return OA(E,r),E}},Wvt=Gvt,Hvt=$gt(),iV=Hvt;function aEt(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return rV(e,Vn({defaultTheme:iV},t))}function Xvt(e,t){return Wvt(e,Vn({defaultTheme:iV},t))}function bR(e){if(typeof e!="string")throw new Error(eI(7));return e.charAt(0).toUpperCase()+e.slice(1)}var Yvt=function(t){return{root:{margin:0},body2:t.typography.body2,body1:t.typography.body1,caption:t.typography.caption,button:t.typography.button,h1:t.typography.h1,h2:t.typography.h2,h3:t.typography.h3,h4:t.typography.h4,h5:t.typography.h5,h6:t.typography.h6,subtitle1:t.typography.subtitle1,subtitle2:t.typography.subtitle2,overline:t.typography.overline,srOnly:{position:"absolute",height:1,width:1,overflow:"hidden"},alignLeft:{textAlign:"left"},alignCenter:{textAlign:"center"},alignRight:{textAlign:"right"},alignJustify:{textAlign:"justify"},noWrap:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},gutterBottom:{marginBottom:"0.35em"},paragraph:{marginBottom:16},colorInherit:{color:"inherit"},colorPrimary:{color:t.palette.primary.main},colorSecondary:{color:t.palette.secondary.main},colorTextPrimary:{color:t.palette.text.primary},colorTextSecondary:{color:t.palette.text.secondary},colorError:{color:t.palette.error.main},displayInline:{display:"inline"},displayBlock:{display:"block"}}},oV={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p"},Zvt=Pr.exports.forwardRef(function(t,n){var r=t.align,i=r===void 0?"inherit":r,a=t.classes,o=t.className,u=t.color,c=u===void 0?"initial":u,g=t.component,_=t.display,E=_===void 0?"initial":_,C=t.gutterBottom,O=C===void 0?!1:C,R=t.noWrap,D=R===void 0?!1:R,B=t.paragraph,z=B===void 0?!1:B,k=t.variant,$=k===void 0?"body1":k,K=t.variantMapping,et=K===void 0?oV:K,mt=cg(t,["align","classes","className","color","component","display","gutterBottom","noWrap","paragraph","variant","variantMapping"]),wt=g||(z?"p":et[$]||oV[$])||"span";return Pr.exports.createElement(wt,Vn({className:CJ(a.root,o,$!=="inherit"&&a[$],c!=="initial"&&a["color".concat(bR(c))],D&&a.noWrap,O&&a.gutterBottom,z&&a.paragraph,i!=="inherit"&&a["align".concat(bR(i))],E!=="initial"&&a["display".concat(bR(E))]),ref:n},mt))}),sEt=Xvt(Yvt,{name:"MuiTypography"})(Zvt),Kvt=Nm,Jvt=vO,Qvt=C0,tyt=Jvt(function(e,t,n,r){Kvt(t,Qvt(t),e,r)}),eyt=tyt,nyt=Hv,ryt=Kp,iyt=dO,oyt="[object DOMException]",ayt="[object Error]";function syt(e){if(!ryt(e))return!1;var t=nyt(e);return t==ayt||t==oyt||typeof e.message=="string"&&typeof e.name=="string"&&!iyt(e)}var aV=syt,uyt=Z4,lyt=mO,cyt=aV,fyt=lyt(function(e,t){try{return uyt(e,void 0,t)}catch(n){return cyt(n)?n:new Error(n)}}),hyt=fyt,pyt=VC;function dyt(e,t){return pyt(t,function(n){return e[n]})}var gyt=dyt,myt=i0,sV=Object.prototype,vyt=sV.hasOwnProperty;function yyt(e,t,n,r){return e===void 0||myt(e,sV[n])&&!vyt.call(r,n)?t:e}var _yt=yyt,xyt={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"};function byt(e){return"\\"+xyt[e]}var wyt=byt,Syt=/<%=([\s\S]+?)%>/g,uV=Syt;function Eyt(e){return function(t){return e==null?void 0:e[t]}}var Cyt=Eyt,Iyt=Cyt,Pyt={"&":"&","<":"<",">":">",'"':""","'":"'"},Tyt=Iyt(Pyt),Myt=Tyt,Ayt=Myt,Lyt=pL,lV=/[&<>"']/g,Oyt=RegExp(lV.source);function Ryt(e){return e=Lyt(e),e&&Oyt.test(e)?e.replace(lV,Ayt):e}var kyt=Ryt,Dyt=/<%-([\s\S]+?)%>/g,Nyt=Dyt,Fyt=/<%([\s\S]+?)%>/g,zyt=Fyt,Byt=kyt,Uyt=Nyt,Vyt=zyt,$yt=uV,jyt={escape:Uyt,evaluate:Vyt,interpolate:$yt,variable:"",imports:{_:{escape:Byt}}},qyt=jyt,cV=eyt,Gyt=hyt,Wyt=gyt,fV=_yt,Hyt=wyt,Xyt=aV,Yyt=e6,Zyt=Pm,Kyt=uV,hV=qyt,Jyt=pL,Qyt="Invalid `variable` option passed into `_.template`",t_t=/\b__p \+= '';/g,e_t=/\b(__p \+=) '' \+/g,n_t=/(__e\(.*?\)|\b__t\)) \+\n'';/g,r_t=/[()=,{}\[\]\/\s]/,i_t=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,oI=/($^)/,o_t=/['\n\r\u2028\u2029\\]/g,a_t=Object.prototype,pV=a_t.hasOwnProperty;function s_t(e,t,n){var r=hV.imports._.templateSettings||hV;n&&Yyt(e,t,n)&&(t=void 0),e=Jyt(e),t=cV({},t,r,fV);var i=cV({},t.imports,r.imports,fV),a=Zyt(i),o=Wyt(i,a),u,c,g=0,_=t.interpolate||oI,E="__p += '",C=RegExp((t.escape||oI).source+"|"+_.source+"|"+(_===Kyt?i_t:oI).source+"|"+(t.evaluate||oI).source+"|$","g"),O=pV.call(t,"sourceURL")?"//# sourceURL="+(t.sourceURL+"").replace(/\s/g," ")+` `:"";e.replace(C,function(B,z,k,$,K,et){return k||(k=$),E+=e.slice(g,et).replace(o_t,Hyt),z&&(u=!0,E+=`' + __e(`+z+`) + '`),K&&(c=!0,E+=`'; `+K+`; __p += '`),k&&(E+=`' + ((__t = (`+k+`)) == null ? '' : __t) + '`),g=et+B.length,B}),E+=`'; `;var R=pV.call(t,"variable")&&t.variable;if(!R)E=`with (obj) { `+E+` } `;else if(r_t.test(R))throw new Error(Qyt);E=(c?E.replace(t_t,""):E).replace(e_t,"$1").replace(n_t,"$1;"),E="function("+(R||"obj")+`) { `+(R?"":`obj || (obj = {}); `)+"var __t, __p = ''"+(u?", __e = _.escape":"")+(c?`, __j = Array.prototype.join; function print() { __p += __j.call(arguments, '') } `:`; `)+E+`return __p }`;var D=Gyt(function(){return Function(a,O+"return "+E).apply(void 0,o)});if(D.source=E,Xyt(D))throw D;return D}var uEt=s_t,dV={exports:{}};(function(e,t){(function(n,r){e.exports=r(Pr.exports)})(Iu,function(n){function r(R,D){return function(B){if(Array.isArray(B))return B}(R)||function(B,z){if(!(typeof Symbol=="undefined"||!(Symbol.iterator in Object(B)))){var k=[],$=!0,K=!1,et=void 0;try{for(var mt,wt=B[Symbol.iterator]();!($=(mt=wt.next()).done)&&(k.push(mt.value),!z||k.length!==z);$=!0);}catch(Ot){K=!0,et=Ot}finally{try{$||wt.return==null||wt.return()}finally{if(K)throw et}}return k}}(R,D)||a(R,D)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function i(R,D){var B;if(typeof Symbol=="undefined"||R[Symbol.iterator]==null){if(Array.isArray(R)||(B=a(R))||D&&R&&typeof R.length=="number"){B&&(R=B);var z=0,k=function(){};return{s:k,n:function(){return z>=R.length?{done:!0}:{done:!1,value:R[z++]}},e:function(mt){throw mt},f:k}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var $,K=!0,et=!1;return{s:function(){B=R[Symbol.iterator]()},n:function(){var mt=B.next();return K=mt.done,mt},e:function(mt){et=!0,$=mt},f:function(){try{K||B.return==null||B.return()}finally{if(et)throw $}}}}function a(R,D){if(R){if(typeof R=="string")return o(R,D);var B=Object.prototype.toString.call(R).slice(8,-1);return B==="Object"&&R.constructor&&(B=R.constructor.name),B==="Map"||B==="Set"?Array.from(R):B==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(B)?o(R,D):void 0}}function o(R,D){(D==null||D>R.length)&&(D=R.length);for(var B=0,z=new Array(D);B<D;B++)z[B]=R[B];return z}function u(R){return(u=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(D){return typeof D}:function(D){return D&&typeof Symbol=="function"&&D.constructor===Symbol&&D!==Symbol.prototype?"symbol":typeof D})(R)}function c(R,D){var B=Object.keys(R);if(Object.getOwnPropertySymbols){var z=Object.getOwnPropertySymbols(R);D&&(z=z.filter(function(k){return Object.getOwnPropertyDescriptor(R,k).enumerable})),B.push.apply(B,z)}return B}function g(R){for(var D=1;D<arguments.length;D++){var B=arguments[D]!=null?arguments[D]:{};D%2?c(Object(B),!0).forEach(function(z){C(R,z,B[z])}):Object.getOwnPropertyDescriptors?Object.defineProperties(R,Object.getOwnPropertyDescriptors(B)):c(Object(B)).forEach(function(z){Object.defineProperty(R,z,Object.getOwnPropertyDescriptor(B,z))})}return R}function _(R,D){for(var B=0;B<D.length;B++){var z=D[B];z.enumerable=z.enumerable||!1,z.configurable=!0,"value"in z&&(z.writable=!0),Object.defineProperty(R,z.key,z)}}function E(R,D,B){return D&&_(R.prototype,D),B&&_(R,B),R}function C(R,D,B){return D in R?Object.defineProperty(R,D,{value:B,enumerable:!0,configurable:!0,writable:!0}):R[D]=B,R}var O=function(){function R(){var D=this,B=0<arguments.length&&arguments[0]!==void 0?arguments[0]:{};(function(k,$){if(!(k instanceof $))throw new TypeError("Cannot call a class as a function")})(this,R),C(this,"showMessageFor",function(k){D.visibleFields.includes(k)||D.visibleFields.push(k),D.helpers.forceUpdateIfNeeded()}),C(this,"hideMessageFor",function(k){var $=D.visibleFields.indexOf(k);-1<$&&D.visibleFields.splice($,1),D.helpers.forceUpdateIfNeeded()}),C(this,"helpers",{parent:this,passes:function(k,$,K,et){return et.hasOwnProperty(k)?!(this.isRequired(k,et)||!this.isBlank($))||et[k].rule($,K,this.parent)!==!1:(console.error("Rule Not Found: There is no rule with the name ".concat(k,".")),!0)},isRequired:function(k,$){return $[k].hasOwnProperty("required")&&$[k].required},isBlank:function(k){return k==null||this.testRegex(k,/^[\s]*$/)},normalizeValues:function(k,$){return[this.valueOrEmptyString(k),this.getValidation($),this.getOptions($)]},getValidation:function(k){return k===Object(k)&&Object.keys(k).length?Object.keys(k)[0]:k.split(":")[0]},getOptions:function(k){if(k===Object(k)&&Object.values(k).length){var $=Object.values(k)[0];return Array.isArray($)?$:[$]}return 1<($=k.split(":")).length?$[1].split(","):[]},valueOrEmptyString:function(k){return k==null?"":k},toSentence:function(k){return k.slice(0,-2).join(", ")+(k.slice(0,-2).length?", ":"")+k.slice(-2).join(2<k.length?", or ":" or ")},testRegex:function(k,$){return k.toString().match($)!==null},forceUpdateIfNeeded:function(){this.parent.autoForceUpdate&&this.parent.autoForceUpdate.forceUpdate()},message:function(k,$,K,et){K.messages=K.messages||{};var mt=K.messages[k]||K.messages.default||this.parent.messages[k]||this.parent.messages.default||et[k].message;return mt.replace(":attribute",this.humanizeFieldName($))},humanizeFieldName:function(k){return k.replace(/([A-Z])/g," $1").replace(/_/g," ").toLowerCase()},element:function(k,$){var K=$.element||this.parent.element;return K(k,$.className)},momentInstalled:function(){return!(!window||!window.moment)||(console.warn("Date validators require using momentjs https://momentjs.com and moment objects."),!1)},size:function(k,$){return $==="string"||$===void 0||$==="array"?k.length:$==="num"?parseFloat(k):void 0},sizeText:function(k){return k==="string"||k===void 0?" characters":k==="array"?" elements":""}}),this.fields={},this.visibleFields=[],this.errorMessages={},this.messagesShown=!1,this.rules=g({accepted:{message:"The :attribute must be accepted.",rule:function(k){return k===!0},required:!0},after:{message:"The :attribute must be after :date.",rule:function(k,$){return D.helpers.momentInstalled()&&moment.isMoment(k)&&k.isAfter($[0],"day")},messageReplace:function(k,$){return k.replace(":date",$[0].format("MM/DD/YYYY"))}},after_or_equal:{message:"The :attribute must be after or on :date.",rule:function(k,$){return D.helpers.momentInstalled()&&moment.isMoment(k)&&k.isSameOrAfter($[0],"day")},messageReplace:function(k,$){return k.replace(":date",$[0].format("MM/DD/YYYY"))}},alpha:{message:"The :attribute may only contain letters.",rule:function(k){return D.helpers.testRegex(k,/^[A-Z]*$/i)}},alpha_space:{message:"The :attribute may only contain letters and spaces.",rule:function(k){return D.helpers.testRegex(k,/^[A-Z\s]*$/i)}},alpha_num:{message:"The :attribute may only contain letters and numbers.",rule:function(k){return D.helpers.testRegex(k,/^[A-Z0-9]*$/i)}},alpha_num_space:{message:"The :attribute may only contain letters, numbers, and spaces.",rule:function(k){return D.helpers.testRegex(k,/^[A-Z0-9\s]*$/i)}},alpha_num_dash:{message:"The :attribute may only contain letters, numbers, and dashes.",rule:function(k){return D.helpers.testRegex(k,/^[A-Z0-9_-]*$/i)}},alpha_num_dash_space:{message:"The :attribute may only contain letters, numbers, dashes, and spaces.",rule:function(k){return D.helpers.testRegex(k,/^[A-Z0-9_-\s]*$/i)}},array:{message:"The :attribute must be an array.",rule:function(k){return Array.isArray(k)}},before:{message:"The :attribute must be before :date.",rule:function(k,$){return D.helpers.momentInstalled()&&moment.isMoment(k)&&k.isBefore($[0],"day")},messageReplace:function(k,$){return k.replace(":date",$[0].format("MM/DD/YYYY"))}},before_or_equal:{message:"The :attribute must be before or on :date.",rule:function(k,$){return D.helpers.momentInstalled()&&moment.isMoment(k)&&k.isSameOrBefore($[0],"day")},messageReplace:function(k,$){return k.replace(":date",$[0].format("MM/DD/YYYY"))}},between:{message:"The :attribute must be between :min and :max:type.",rule:function(k,$){return D.helpers.size(k,$[2])>=parseFloat($[0])&&D.helpers.size(k,$[2])<=parseFloat($[1])},messageReplace:function(k,$){return k.replace(":min",$[0]).replace(":max",$[1]).replace(":type",D.helpers.sizeText($[2]))}},boolean:{message:"The :attribute must be a boolean.",rule:function(k){return k===!1||k===!0}},card_exp:{message:"The :attribute must be a valid expiration date.",rule:function(k){return D.helpers.testRegex(k,/^(([0]?[1-9]{1})|([1]{1}[0-2]{1}))\s?\/\s?(\d{2}|\d{4})$/)}},card_num:{message:"The :attribute must be a valid credit card number.",rule:function(k){return D.helpers.testRegex(k,/^\d{4}\s?\d{4,6}\s?\d{4,5}\s?\d{0,8}$/)}},currency:{message:"The :attribute must be a valid currency.",rule:function(k){return D.helpers.testRegex(k,/^\$?(\d{1,3})(\,?\d{3})*\.?\d{0,2}$/)}},date:{message:"The :attribute must be a date.",rule:function(k){return D.helpers.momentInstalled()&&moment.isMoment(k)}},date_equals:{message:"The :attribute must be on :date.",rule:function(k,$){return D.helpers.momentInstalled()&&moment.isMoment(k)&&k.isSame($[0],"day")},messageReplace:function(k,$){return k.replace(":date",$[0].format("MM/DD/YYYY"))}},email:{message:"The :attribute must be a valid email address.",rule:function(k){return D.helpers.testRegex(k,/^[A-Z0-9.!#$%&'*+-/=?^_`{|}~]+@[A-Z0-9.-]+\.[A-Z]{2,}$/i)}},in:{message:"The selected :attribute must be :values.",rule:function(k,$){return $.includes(k)},messageReplace:function(k,$){return k.replace(":values",D.helpers.toSentence($))}},integer:{message:"The :attribute must be an integer.",rule:function(k){return D.helpers.testRegex(k,/^\-?\d*$/)}},max:{message:"The :attribute may not be greater than :max:type.",rule:function(k,$){return D.helpers.size(k,$[1])<=parseFloat($[0])},messageReplace:function(k,$){return k.replace(":max",$[0]).replace(":type",D.helpers.sizeText($[1]))}},min:{message:"The :attribute must be at least :min:type.",rule:function(k,$){return D.helpers.size(k,$[1])>=parseFloat($[0])},messageReplace:function(k,$){return k.replace(":min",$[0]).replace(":type",D.helpers.sizeText($[1]))}},not_in:{message:"The selected :attribute must not be :values.",rule:function(k,$){return!$.includes(k)},messageReplace:function(k,$){return k.replace(":values",D.helpers.toSentence($))}},not_regex:{message:"The :attribute must not match the required pattern.",rule:function(k,$){return!D.helpers.testRegex(k,typeof $[0]=="string"||$[0]instanceof String?new RegExp($[0]):$[0])}},numeric:{message:"The :attribute must be a number.",rule:function(k){return D.helpers.testRegex(k,/^\-?\d*\.?\d+$/)}},phone:{message:"The :attribute must be a valid phone number.",rule:function(k){return D.helpers.testRegex(k,/^(\+?\d{0,4})?\s?-?\s?(\(?\d{3}\)?)\s?-?\s?(\(?\d{3}\)?)\s?-?\s?(\(?\d{4}\)?)$/)&&!D.helpers.testRegex(k,/^\b(\d)\1{8,}\b$/)}},regex:{message:"The :attribute must match the required pattern.",rule:function(k,$){return D.helpers.testRegex(k,typeof $[0]=="string"||$[0]instanceof String?new RegExp($[0]):$[0])}},required:{message:"The :attribute field is required.",rule:function(k){return!D.helpers.isBlank(k)},required:!0},size:{message:"The :attribute must be :size:type.",rule:function(k,$){return D.helpers.size(k,$[1])==parseFloat($[0])},messageReplace:function(k,$){return k.replace(":size",$[0]).replace(":type",D.helpers.sizeText($[1]))}},string:{message:"The :attribute must be a string.",rule:function(k){return u(k)===u("string")}},typeof:{message:"The :attribute is not the correct type of :type.",rule:function(k,$){return u(k)===u($[0])},messageReplace:function(k,$){return k.replace(":type",u($[0]))}},url:{message:"The :attribute must be a url.",rule:function(k){return D.helpers.testRegex(k,/^https?:\/\/[-a-z0-9@:%._\+~#=]{1,256}\.[a-z0-9()]{2,6}\b([-a-z0-9()@:%_\+.~#?&//=]*)$/i)}}},B.validators||{}),B.locale&&!R.locales.hasOwnProperty(B.locale)&&console.warn("Locale not found! Make sure it is spelled correctly and the locale file is loaded.");var z=R.locales[B.locale]||{};Object.keys(this.rules).forEach(function(k){D.rules[k].message=z[k]||D.rules[k].message}),this.messages=B.messages||{},this.className=B.className,this.autoForceUpdate=B.autoForceUpdate||!1,B.element===!1?this.element=function(k){return k}:B.hasOwnProperty("element")?this.element=B.element:(typeof navigator=="undefined"?"undefined":u(navigator))==="object"&&navigator.product==="ReactNative"?this.element=function(k){return k}:this.element=function(k,$){return n.createElement("div",{className:$||D.className||"srv-validation-message"},k)}}return E(R,null,[{key:"addLocale",value:function(D,B){this.locales[D]=B}}]),E(R,[{key:"getErrorMessages",value:function(){return this.errorMessages}},{key:"showMessages",value:function(){this.messagesShown=!0,this.helpers.forceUpdateIfNeeded()}},{key:"hideMessages",value:function(){this.messagesShown=!1,this.helpers.forceUpdateIfNeeded()}},{key:"allValid",value:function(){for(var D in this.fields)if(this.fieldValid(D)===!1)return!1;return!0}},{key:"fieldValid",value:function(D){return this.fields.hasOwnProperty(D)&&this.fields[D]===!0}},{key:"purgeFields",value:function(){this.fields={},this.errorMessages={}}},{key:"messageWhenPresent",value:function(D){var B=1<arguments.length&&arguments[1]!==void 0?arguments[1]:{};if(!this.helpers.isBlank(D)&&this.messagesShown)return this.helpers.element(D,B)}},{key:"messageAlways",value:function(D,B){var z=2<arguments.length&&arguments[2]!==void 0?arguments[2]:{};if(console.warn("The messageAlways() method is deprecated in SimpleReactValidator. Please see the documentation and switch to the messageWhenPresent() method."),B&&this.messagesShown)return this.helpers.element(B,z)}},{key:"check",value:function(D,B){var z=2<arguments.length&&arguments[2]!==void 0?arguments[2]:{};Array.isArray(B)||(B=B.split("|"));var k,$=z.validators?g(g({},this.rules),z.validators):this.rules,K=i(B);try{for(K.s();!(k=K.n()).done;){var et=k.value,mt=r(this.helpers.normalizeValues(D,et),3),wt=mt[0],Ot=mt[1],Bt=mt[2];if(!this.helpers.passes(Ot,wt,Bt,$))return!1}}catch(se){K.e(se)}finally{K.f()}return!0}},{key:"message",value:function(D,B,z){var k=3<arguments.length&&arguments[3]!==void 0?arguments[3]:{};this.errorMessages[D]=null,this.fields[D]=!0,Array.isArray(z)||(z=z.split("|"));var $,K=k.validators?g(g({},this.rules),k.validators):this.rules,et=i(z);try{for(et.s();!($=et.n()).done;){var mt=$.value,wt=r(this.helpers.normalizeValues(B,mt),3),Ot=wt[0],Bt=wt[1],se=wt[2];if(!this.helpers.passes(Bt,Ot,se,K)){this.fields[D]=!1;var _e=this.helpers.message(Bt,D,k,K);if(0<se.length&&K[Bt].hasOwnProperty("messageReplace")&&(_e=K[Bt].messageReplace(_e,se)),this.errorMessages[D]=_e,this.messagesShown||this.visibleFields.includes(D))return this.helpers.element(_e,k)}}}catch(Ne){et.e(Ne)}finally{et.f()}}}]),R}();return C(O,"version","1.5.1"),C(O,"locales",{en:{}}),O})})(dV);var lEt=dV.exports,gV={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(Iu,function(){var n,r,i;function a(o,u){if(!n)n=u;else if(!r)r=u;else{var c="var sharedChunk = {}; ("+n+")(sharedChunk); ("+r+")(sharedChunk);",g={};n(g),i=u(g),typeof window!="undefined"&&(i.workerUrl=window.URL.createObjectURL(new Blob([c],{type:"text/javascript"})))}}return a(["exports"],function(o){function u(s,l){return s(l={exports:{}},l.exports),l.exports}var c=g;function g(s,l,f,v){this.cx=3*s,this.bx=3*(f-s)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*l,this.by=3*(v-l)-this.cy,this.ay=1-this.cy-this.by,this.p1x=s,this.p1y=v,this.p2x=f,this.p2y=v}g.prototype.sampleCurveX=function(s){return((this.ax*s+this.bx)*s+this.cx)*s},g.prototype.sampleCurveY=function(s){return((this.ay*s+this.by)*s+this.cy)*s},g.prototype.sampleCurveDerivativeX=function(s){return(3*this.ax*s+2*this.bx)*s+this.cx},g.prototype.solveCurveX=function(s,l){var f,v,b,w,I;for(l===void 0&&(l=1e-6),b=s,I=0;I<8;I++){if(w=this.sampleCurveX(b)-s,Math.abs(w)<l)return b;var A=this.sampleCurveDerivativeX(b);if(Math.abs(A)<1e-6)break;b-=w/A}if((b=s)<(f=0))return f;if(b>(v=1))return v;for(;f<v;){if(w=this.sampleCurveX(b),Math.abs(w-s)<l)return b;s>w?f=b:v=b,b=.5*(v-f)+f}return b},g.prototype.solve=function(s,l){return this.sampleCurveY(this.solveCurveX(s,l))};var _=E;function E(s,l){this.x=s,this.y=l}E.prototype={clone:function(){return new E(this.x,this.y)},add:function(s){return this.clone()._add(s)},sub:function(s){return this.clone()._sub(s)},multByPoint:function(s){return this.clone()._multByPoint(s)},divByPoint:function(s){return this.clone()._divByPoint(s)},mult:function(s){return this.clone()._mult(s)},div:function(s){return this.clone()._div(s)},rotate:function(s){return this.clone()._rotate(s)},rotateAround:function(s,l){return this.clone()._rotateAround(s,l)},matMult:function(s){return this.clone()._matMult(s)},unit:function(){return this.clone()._unit()},perp:function(){return this.clone()._perp()},round:function(){return this.clone()._round()},mag:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},equals:function(s){return this.x===s.x&&this.y===s.y},dist:function(s){return Math.sqrt(this.distSqr(s))},distSqr:function(s){var l=s.x-this.x,f=s.y-this.y;return l*l+f*f},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(s){return Math.atan2(this.y-s.y,this.x-s.x)},angleWith:function(s){return this.angleWithSep(s.x,s.y)},angleWithSep:function(s,l){return Math.atan2(this.x*l-this.y*s,this.x*s+this.y*l)},_matMult:function(s){var l=s[2]*this.x+s[3]*this.y;return this.x=s[0]*this.x+s[1]*this.y,this.y=l,this},_add:function(s){return this.x+=s.x,this.y+=s.y,this},_sub:function(s){return this.x-=s.x,this.y-=s.y,this},_mult:function(s){return this.x*=s,this.y*=s,this},_div:function(s){return this.x/=s,this.y/=s,this},_multByPoint:function(s){return this.x*=s.x,this.y*=s.y,this},_divByPoint:function(s){return this.x/=s.x,this.y/=s.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var s=this.y;return this.y=this.x,this.x=-s,this},_rotate:function(s){var l=Math.cos(s),f=Math.sin(s),v=f*this.x+l*this.y;return this.x=l*this.x-f*this.y,this.y=v,this},_rotateAround:function(s,l){var f=Math.cos(s),v=Math.sin(s),b=l.y+v*(this.x-l.x)+f*(this.y-l.y);return this.x=l.x+f*(this.x-l.x)-v*(this.y-l.y),this.y=b,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},E.convert=function(s){return s instanceof E?s:Array.isArray(s)?new E(s[0],s[1]):s};var C=typeof self!="undefined"?self:{},O=Math.pow(2,53)-1;function R(s,l,f,v){var b=new c(s,l,f,v);return function(w){return b.solve(w)}}var D=R(.25,.1,.25,1);function B(s,l,f){return Math.min(f,Math.max(l,s))}function z(s,l,f){var v=f-l,b=((s-l)%v+v)%v+l;return b===l?f:b}function k(s){for(var l=[],f=arguments.length-1;f-- >0;)l[f]=arguments[f+1];for(var v=0,b=l;v<b.length;v+=1){var w=b[v];for(var I in w)s[I]=w[I]}return s}var $=1;function K(){return $++}function et(){return function s(l){return l?(l^16*Math.random()>>l/4).toString(16):([1e7]+-[1e3]+-4e3+-8e3+-1e11).replace(/[018]/g,s)}()}function mt(s){return!!s&&/^[0-9a-f]{8}-[0-9a-f]{4}-[4][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(s)}function wt(s,l){s.forEach(function(f){l[f]&&(l[f]=l[f].bind(l))})}function Ot(s,l){return s.indexOf(l,s.length-l.length)!==-1}function Bt(s,l,f){var v={};for(var b in s)v[b]=l.call(f||this,s[b],b,s);return v}function se(s,l,f){var v={};for(var b in s)l.call(f||this,s[b],b,s)&&(v[b]=s[b]);return v}function _e(s){return Array.isArray(s)?s.map(_e):typeof s=="object"&&s?Bt(s,_e):s}var Ne={};function He(s){Ne[s]||(typeof console!="undefined"&&console.warn(s),Ne[s]=!0)}function de(s,l,f){return(f.y-s.y)*(l.x-s.x)>(l.y-s.y)*(f.x-s.x)}function he(s){for(var l=0,f=0,v=s.length,b=v-1,w=void 0,I=void 0;f<v;b=f++)l+=((I=s[b]).x-(w=s[f]).x)*(w.y+I.y);return l}function Ge(){return typeof WorkerGlobalScope!="undefined"&&typeof self!="undefined"&&self instanceof WorkerGlobalScope}function Yt(s){var l={};if(s.replace(/(?:^|(?:\s*\,\s*))([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,function(v,b,w,I){var A=w||I;return l[b]=!A||A.toLowerCase(),""}),l["max-age"]){var f=parseInt(l["max-age"],10);isNaN(f)?delete l["max-age"]:l["max-age"]=f}return l}var te=null;function ve(s){if(te==null){var l=s.navigator?s.navigator.userAgent:null;te=!!s.safari||!(!l||!(/\b(iPad|iPhone|iPod)\b/.test(l)||l.match("Safari")&&!l.match("Chrome")))}return te}function Wt(s){try{var l=C[s];return l.setItem("_mapbox_test_",1),l.removeItem("_mapbox_test_"),!0}catch{return!1}}var be,De,Fn,ar,Jn=C.performance&&C.performance.now?C.performance.now.bind(C.performance):Date.now.bind(Date),Ar=C.requestAnimationFrame||C.mozRequestAnimationFrame||C.webkitRequestAnimationFrame||C.msRequestAnimationFrame,cr=C.cancelAnimationFrame||C.mozCancelAnimationFrame||C.webkitCancelAnimationFrame||C.msCancelAnimationFrame,Fi={now:Jn,frame:function(s){var l=Ar(s);return{cancel:function(){return cr(l)}}},getImageData:function(s,l){l===void 0&&(l=0);var f=C.document.createElement("canvas"),v=f.getContext("2d");if(!v)throw new Error("failed to create canvas 2d context");return f.width=s.width,f.height=s.height,v.drawImage(s,0,0,s.width,s.height),v.getImageData(-l,-l,s.width+2*l,s.height+2*l)},resolveURL:function(s){return be||(be=C.document.createElement("a")),be.href=s,be.href},hardwareConcurrency:C.navigator&&C.navigator.hardwareConcurrency||4,get devicePixelRatio(){return C.devicePixelRatio},get prefersReducedMotion(){return!!C.matchMedia&&(De==null&&(De=C.matchMedia("(prefers-reduced-motion: reduce)")),De.matches)}},fr={API_URL:"https://api.mapbox.com",get EVENTS_URL(){return this.API_URL?this.API_URL.indexOf("https://api.mapbox.cn")===0?"https://events.mapbox.cn/events/v2":this.API_URL.indexOf("https://api.mapbox.com")===0?"https://events.mapbox.com/events/v2":null:null},FEEDBACK_URL:"https://apps.mapbox.com/feedback",REQUIRE_ACCESS_TOKEN:!0,ACCESS_TOKEN:null,MAX_PARALLEL_IMAGE_REQUESTS:16},_a={supported:!1,testSupport:function(s){!Is&&ar&&(Gi?jn(s):Fn=s)}},Is=!1,Gi=!1;function jn(s){var l=s.createTexture();s.bindTexture(s.TEXTURE_2D,l);try{if(s.texImage2D(s.TEXTURE_2D,0,s.RGBA,s.RGBA,s.UNSIGNED_BYTE,ar),s.isContextLost())return;_a.supported=!0}catch{}s.deleteTexture(l),Is=!0}C.document&&((ar=C.document.createElement("img")).onload=function(){Fn&&jn(Fn),Fn=null,Gi=!0},ar.onerror=function(){Is=!0,Fn=null},ar.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA=");var bi="01",ni=function(s,l){this._transformRequestFn=s,this._customAccessToken=l,this._createSkuToken()};function Wi(s){return s.indexOf("mapbox:")===0}ni.prototype._createSkuToken=function(){var s=function(){for(var l="",f=0;f<10;f++)l+="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"[Math.floor(62*Math.random())];return{token:["1",bi,l].join(""),tokenExpiresAt:Date.now()+432e5}}();this._skuToken=s.token,this._skuTokenExpiresAt=s.tokenExpiresAt},ni.prototype._isSkuTokenExpired=function(){return Date.now()>this._skuTokenExpiresAt},ni.prototype.transformRequest=function(s,l){return this._transformRequestFn&&this._transformRequestFn(s,l)||{url:s}},ni.prototype.normalizeStyleURL=function(s,l){if(!Wi(s))return s;var f=ri(s);return f.path="/styles/v1"+f.path,this._makeAPIURL(f,this._customAccessToken||l)},ni.prototype.normalizeGlyphsURL=function(s,l){if(!Wi(s))return s;var f=ri(s);return f.path="/fonts/v1"+f.path,this._makeAPIURL(f,this._customAccessToken||l)},ni.prototype.normalizeSourceURL=function(s,l){if(!Wi(s))return s;var f=ri(s);return f.path="/v4/"+f.authority+".json",f.params.push("secure"),this._makeAPIURL(f,this._customAccessToken||l)},ni.prototype.normalizeSpriteURL=function(s,l,f,v){var b=ri(s);return Wi(s)?(b.path="/styles/v1"+b.path+"/sprite"+l+f,this._makeAPIURL(b,this._customAccessToken||v)):(b.path+=""+l+f,qo(b))},ni.prototype.normalizeTileURL=function(s,l){if(this._isSkuTokenExpired()&&this._createSkuToken(),s&&!Wi(s))return s;var f=ri(s);f.path=f.path.replace(/(\.(png|jpg)\d*)(?=$)/,(Fi.devicePixelRatio>=2||l===512?"@2x":"")+(_a.supported?".webp":"$1")),f.path=f.path.replace(/^.+\/v4\//,"/"),f.path="/v4"+f.path;var v=this._customAccessToken||function(b){for(var w=0,I=b;w<I.length;w+=1){var A=I[w].match(/^access_token=(.*)$/);if(A)return A[1]}return null}(f.params)||fr.ACCESS_TOKEN;return fr.REQUIRE_ACCESS_TOKEN&&v&&this._skuToken&&f.params.push("sku="+this._skuToken),this._makeAPIURL(f,v)},ni.prototype.canonicalizeTileURL=function(s,l){var f=ri(s);if(!f.path.match(/(^\/v4\/)/)||!f.path.match(/\.[\w]+$/))return s;var v="mapbox://tiles/";v+=f.path.replace("/v4/","");var b=f.params;return l&&(b=b.filter(function(w){return!w.match(/^access_token=/)})),b.length&&(v+="?"+b.join("&")),v},ni.prototype.canonicalizeTileset=function(s,l){for(var f=!!l&&Wi(l),v=[],b=0,w=s.tiles||[];b<w.length;b+=1){var I=w[b];ba(I)?v.push(this.canonicalizeTileURL(I,f)):v.push(I)}return v},ni.prototype._makeAPIURL=function(s,l){var f="See https://www.mapbox.com/api-documentation/#access-tokens-and-token-scopes",v=ri(fr.API_URL);if(s.protocol=v.protocol,s.authority=v.authority,s.protocol==="http"){var b=s.params.indexOf("secure");b>=0&&s.params.splice(b,1)}if(v.path!=="/"&&(s.path=""+v.path+s.path),!fr.REQUIRE_ACCESS_TOKEN)return qo(s);if(!(l=l||fr.ACCESS_TOKEN))throw new Error("An API access token is required to use Mapbox GL. "+f);if(l[0]==="s")throw new Error("Use a public access token (pk.*) with Mapbox GL, not a secret access token (sk.*). "+f);return s.params=s.params.filter(function(w){return w.indexOf("access_token")===-1}),s.params.push("access_token="+l),qo(s)};var xa=/^((https?:)?\/\/)?([^\/]+\.)?mapbox\.c(n|om)(\/|\?|$)/i;function ba(s){return xa.test(s)}var ss=/^(\w+):\/\/([^/?]*)(\/[^?]+)?\??(.+)?/;function ri(s){var l=s.match(ss);if(!l)throw new Error("Unable to parse URL object");return{protocol:l[1],authority:l[2],path:l[3]||"/",params:l[4]?l[4].split("&"):[]}}function qo(s){var l=s.params.length?"?"+s.params.join("&"):"";return s.protocol+"://"+s.authority+s.path+l}function Et(s){if(!s)return null;var l=s.split(".");if(!l||l.length!==3)return null;try{return JSON.parse(decodeURIComponent(C.atob(l[1]).split("").map(function(f){return"%"+("00"+f.charCodeAt(0).toString(16)).slice(-2)}).join("")))}catch{return null}}var pt=function(s){this.type=s,this.anonId=null,this.eventData={},this.queue=[],this.pendingRequest=null};pt.prototype.getStorageKey=function(s){var l,f=Et(fr.ACCESS_TOKEN);return l=f&&f.u?C.btoa(encodeURIComponent(f.u).replace(/%([0-9A-F]{2})/g,function(v,b){return String.fromCharCode(Number("0x"+b))})):fr.ACCESS_TOKEN||"",s?"mapbox.eventData."+s+":"+l:"mapbox.eventData:"+l},pt.prototype.fetchEventData=function(){var s=Wt("localStorage"),l=this.getStorageKey(),f=this.getStorageKey("uuid");if(s)try{var v=C.localStorage.getItem(l);v&&(this.eventData=JSON.parse(v));var b=C.localStorage.getItem(f);b&&(this.anonId=b)}catch{He("Unable to read from LocalStorage")}},pt.prototype.saveEventData=function(){var s=Wt("localStorage"),l=this.getStorageKey(),f=this.getStorageKey("uuid");if(s)try{C.localStorage.setItem(f,this.anonId),Object.keys(this.eventData).length>=1&&C.localStorage.setItem(l,JSON.stringify(this.eventData))}catch{He("Unable to write to LocalStorage")}},pt.prototype.processRequests=function(s){},pt.prototype.postEvent=function(s,l,f,v){var b=this;if(fr.EVENTS_URL){var w=ri(fr.EVENTS_URL);w.params.push("access_token="+(v||fr.ACCESS_TOKEN||""));var I={event:this.type,created:new Date(s).toISOString(),sdkIdentifier:"mapbox-gl-js",sdkVersion:"1.13.2",skuId:bi,userId:this.anonId},A=l?k(I,l):I,F={url:qo(w),headers:{"Content-Type":"text/plain"},body:JSON.stringify([A])};this.pendingRequest=Vr(F,function(j){b.pendingRequest=null,f(j),b.saveEventData(),b.processRequests(v)})}},pt.prototype.queueRequest=function(s,l){this.queue.push(s),this.processRequests(l)};var Ve,We,Xn=function(s){function l(){s.call(this,"map.load"),this.success={},this.skuToken=""}return s&&(l.__proto__=s),(l.prototype=Object.create(s&&s.prototype)).constructor=l,l.prototype.postMapLoadEvent=function(f,v,b,w){this.skuToken=b,(fr.EVENTS_URL&&w||fr.ACCESS_TOKEN&&Array.isArray(f)&&f.some(function(I){return Wi(I)||ba(I)}))&&this.queueRequest({id:v,timestamp:Date.now()},w)},l.prototype.processRequests=function(f){var v=this;if(!this.pendingRequest&&this.queue.length!==0){var b=this.queue.shift(),w=b.id,I=b.timestamp;w&&this.success[w]||(this.anonId||this.fetchEventData(),mt(this.anonId)||(this.anonId=et()),this.postEvent(I,{skuToken:this.skuToken},function(A){A||w&&(v.success[w]=!0)},f))}},l}(pt),Br=new(function(s){function l(f){s.call(this,"appUserTurnstile"),this._customAccessToken=f}return s&&(l.__proto__=s),(l.prototype=Object.create(s&&s.prototype)).constructor=l,l.prototype.postTurnstileEvent=function(f,v){fr.EVENTS_URL&&fr.ACCESS_TOKEN&&Array.isArray(f)&&f.some(function(b){return Wi(b)||ba(b)})&&this.queueRequest(Date.now(),v)},l.prototype.processRequests=function(f){var v=this;if(!this.pendingRequest&&this.queue.length!==0){this.anonId&&this.eventData.lastSuccess&&this.eventData.tokenU||this.fetchEventData();var b=Et(fr.ACCESS_TOKEN),w=b?b.u:fr.ACCESS_TOKEN,I=w!==this.eventData.tokenU;mt(this.anonId)||(this.anonId=et(),I=!0);var A=this.queue.shift();if(this.eventData.lastSuccess){var F=new Date(this.eventData.lastSuccess),j=new Date(A),G=(A-this.eventData.lastSuccess)/864e5;I=I||G>=1||G<-1||F.getDate()!==j.getDate()}else I=!0;if(!I)return this.processRequests();this.postEvent(A,{"enabled.telemetry":!1},function(H){H||(v.eventData.lastSuccess=A,v.eventData.tokenU=w)},f)}},l}(pt)),sr=Br.postTurnstileEvent.bind(Br),Ai=new Xn,Un=Ai.postMapLoadEvent.bind(Ai),no=500,To=50;function zi(){C.caches&&!Ve&&(Ve=C.caches.open("mapbox-tiles"))}function ii(s){var l=s.indexOf("?");return l<0?s:s.slice(0,l)}var Go,yr=1/0;function Rn(){return Go==null&&(Go=C.OffscreenCanvas&&new C.OffscreenCanvas(1,1).getContext("2d")&&typeof C.createImageBitmap=="function"),Go}var yl={Unknown:"Unknown",Style:"Style",Source:"Source",Tile:"Tile",Glyphs:"Glyphs",SpriteImage:"SpriteImage",SpriteJSON:"SpriteJSON",Image:"Image"};typeof Object.freeze=="function"&&Object.freeze(yl);var us=function(s){function l(f,v,b){v===401&&ba(b)&&(f+=": you may have provided an invalid Mapbox access token. See https://www.mapbox.com/api-documentation/#access-tokens-and-token-scopes"),s.call(this,f),this.status=v,this.url=b,this.name=this.constructor.name,this.message=f}return s&&(l.__proto__=s),(l.prototype=Object.create(s&&s.prototype)).constructor=l,l.prototype.toString=function(){return this.name+": "+this.message+" ("+this.status+"): "+this.url},l}(Error),Vs=Ge()?function(){return self.worker&&self.worker.referrer}:function(){return(C.location.protocol==="blob:"?C.parent:C).location.href},Mo,qa,Ur=function(s,l){if(!(/^file:/.test(f=s.url)||/^file:/.test(Vs())&&!/^\w+:/.test(f))){if(C.fetch&&C.Request&&C.AbortController&&C.Request.prototype.hasOwnProperty("signal"))return function(v,b){var w,I=new C.AbortController,A=new C.Request(v.url,{method:v.method||"GET",body:v.body,credentials:v.credentials,headers:v.headers,referrer:Vs(),signal:I.signal}),F=!1,j=!1,G=(w=A.url).indexOf("sku=")>0&&ba(w);v.type==="json"&&A.headers.set("Accept","application/json");var H=function(rt,dt,_t){if(!j){if(rt&&rt.message!=="SecurityError"&&He(rt),dt&&_t)return J(dt);var Pt=Date.now();C.fetch(A).then(function(St){if(St.ok){var Nt=G?St.clone():null;return J(St,Nt,Pt)}return b(new us(St.statusText,St.status,v.url))}).catch(function(St){St.code!==20&&b(new Error(St.message))})}},J=function(rt,dt,_t){(v.type==="arrayBuffer"?rt.arrayBuffer():v.type==="json"?rt.json():rt.text()).then(function(Pt){j||(dt&&_t&&function(St,Nt,qt){if(zi(),Ve){var Zt={status:Nt.status,statusText:Nt.statusText,headers:new C.Headers};Nt.headers.forEach(function(fe,Ee){return Zt.headers.set(Ee,fe)});var ee=Yt(Nt.headers.get("Cache-Control")||"");ee["no-store"]||(ee["max-age"]&&Zt.headers.set("Expires",new Date(qt+1e3*ee["max-age"]).toUTCString()),new Date(Zt.headers.get("Expires")).getTime()-qt<42e4||function(fe,Ee){if(We===void 0)try{new Response(new ReadableStream),We=!0}catch{We=!1}We?Ee(fe.body):fe.blob().then(Ee)}(Nt,function(fe){var Ee=new C.Response(fe,Zt);zi(),Ve&&Ve.then(function(Oe){return Oe.put(ii(St.url),Ee)}).catch(function(Oe){return He(Oe.message)})}))}}(A,dt,_t),F=!0,b(null,Pt,rt.headers.get("Cache-Control"),rt.headers.get("Expires")))}).catch(function(Pt){j||b(new Error(Pt.message))})};return G?function(rt,dt){if(zi(),!Ve)return dt(null);var _t=ii(rt.url);Ve.then(function(Pt){Pt.match(_t).then(function(St){var Nt=function(qt){if(!qt)return!1;var Zt=new Date(qt.headers.get("Expires")||0),ee=Yt(qt.headers.get("Cache-Control")||"");return Zt>Date.now()&&!ee["no-cache"]}(St);Pt.delete(_t),Nt&&Pt.put(_t,St.clone()),dt(null,St,Nt)}).catch(dt)}).catch(dt)}(A,H):H(null,null),{cancel:function(){j=!0,F||I.abort()}}}(s,l);if(Ge()&&self.worker&&self.worker.actor)return self.worker.actor.send("getResource",s,l,void 0,!0)}var f;return function(v,b){var w=new C.XMLHttpRequest;for(var I in w.open(v.method||"GET",v.url,!0),v.type==="arrayBuffer"&&(w.responseType="arraybuffer"),v.headers)w.setRequestHeader(I,v.headers[I]);return v.type==="json"&&(w.responseType="text",w.setRequestHeader("Accept","application/json")),w.withCredentials=v.credentials==="include",w.onerror=function(){b(new Error(w.statusText))},w.onload=function(){if((w.status>=200&&w.status<300||w.status===0)&&w.response!==null){var A=w.response;if(v.type==="json")try{A=JSON.parse(w.response)}catch(F){return b(F)}b(null,A,w.getResponseHeader("Cache-Control"),w.getResponseHeader("Expires"))}else b(new us(w.statusText,w.status,v.url))},w.send(v.body),{cancel:function(){return w.abort()}}}(s,l)},Yl=function(s,l){return Ur(k(s,{type:"arrayBuffer"}),l)},Vr=function(s,l){return Ur(k(s,{method:"POST"}),l)},W="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";Mo=[],qa=0;var Y=function(s,l){if(_a.supported&&(s.headers||(s.headers={}),s.headers.accept="image/webp,*/*"),qa>=fr.MAX_PARALLEL_IMAGE_REQUESTS){var f={requestParameters:s,callback:l,cancelled:!1,cancel:function(){this.cancelled=!0}};return Mo.push(f),f}qa++;var v=!1,b=function(){if(!v)for(v=!0,qa--;Mo.length&&qa<fr.MAX_PARALLEL_IMAGE_REQUESTS;){var I=Mo.shift();I.cancelled||(I.cancel=Y(I.requestParameters,I.callback).cancel)}},w=Yl(s,function(I,A,F,j){b(),I?l(I):A&&(Rn()?function(G,H){var J=new C.Blob([new Uint8Array(G)],{type:"image/png"});C.createImageBitmap(J).then(function(rt){H(null,rt)}).catch(function(rt){H(new Error("Could not load image because of "+rt.message+". Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."))})}(A,l):function(G,H,J,rt){var dt=new C.Image,_t=C.URL;dt.onload=function(){H(null,dt),_t.revokeObjectURL(dt.src),dt.onload=null,C.requestAnimationFrame(function(){dt.src=W})},dt.onerror=function(){return H(new Error("Could not load image. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."))};var Pt=new C.Blob([new Uint8Array(G)],{type:"image/png"});dt.cacheControl=J,dt.expires=rt,dt.src=G.byteLength?_t.createObjectURL(Pt):W}(A,l,F,j))});return{cancel:function(){w.cancel(),b()}}};function nt(s,l,f){f[s]&&f[s].indexOf(l)!==-1||(f[s]=f[s]||[],f[s].push(l))}function lt(s,l,f){if(f&&f[s]){var v=f[s].indexOf(l);v!==-1&&f[s].splice(v,1)}}var vt=function(s,l){l===void 0&&(l={}),k(this,l),this.type=s},Mt=function(s){function l(f,v){v===void 0&&(v={}),s.call(this,"error",k({error:f},v))}return s&&(l.__proto__=s),(l.prototype=Object.create(s&&s.prototype)).constructor=l,l}(vt),Rt=function(){};Rt.prototype.on=function(s,l){return this._listeners=this._listeners||{},nt(s,l,this._listeners),this},Rt.prototype.off=function(s,l){return lt(s,l,this._listeners),lt(s,l,this._oneTimeListeners),this},Rt.prototype.once=function(s,l){return this._oneTimeListeners=this._oneTimeListeners||{},nt(s,l,this._oneTimeListeners),this},Rt.prototype.fire=function(s,l){typeof s=="string"&&(s=new vt(s,l||{}));var f=s.type;if(this.listens(f)){s.target=this;for(var v=0,b=this._listeners&&this._listeners[f]?this._listeners[f].slice():[];v<b.length;v+=1)b[v].call(this,s);for(var w=0,I=this._oneTimeListeners&&this._oneTimeListeners[f]?this._oneTimeListeners[f].slice():[];w<I.length;w+=1){var A=I[w];lt(f,A,this._oneTimeListeners),A.call(this,s)}var F=this._eventedParent;F&&(k(s,typeof this._eventedParentData=="function"?this._eventedParentData():this._eventedParentData),F.fire(s))}else s instanceof Mt&&console.error(s.error);return this},Rt.prototype.listens=function(s){return this._listeners&&this._listeners[s]&&this._listeners[s].length>0||this._oneTimeListeners&&this._oneTimeListeners[s]&&this._oneTimeListeners[s].length>0||this._eventedParent&&this._eventedParent.listens(s)},Rt.prototype.setEventedParent=function(s,l){return this._eventedParent=s,this._eventedParentData=l,this};var at={$version:8,$root:{version:{required:!0,type:"enum",values:[8]},name:{type:"string"},metadata:{type:"*"},center:{type:"array",value:"number"},zoom:{type:"number"},bearing:{type:"number",default:0,period:360,units:"degrees"},pitch:{type:"number",default:0,units:"degrees"},light:{type:"light"},sources:{required:!0,type:"sources"},sprite:{type:"string"},glyphs:{type:"string"},transition:{type:"transition"},layers:{required:!0,type:"array",value:"layer"}},sources:{"*":{type:"source"}},source:["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],source_vector:{type:{required:!0,type:"enum",values:{vector:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},attribution:{type:"string"},promoteId:{type:"promoteId"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_raster:{type:{required:!0,type:"enum",values:{raster:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},attribution:{type:"string"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_raster_dem:{type:{required:!0,type:"enum",values:{"raster-dem":{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},attribution:{type:"string"},encoding:{type:"enum",values:{terrarium:{},mapbox:{}},default:"mapbox"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_geojson:{type:{required:!0,type:"enum",values:{geojson:{}}},data:{type:"*"},maxzoom:{type:"number",default:18},attribution:{type:"string"},buffer:{type:"number",default:128,maximum:512,minimum:0},filter:{type:"*"},tolerance:{type:"number",default:.375},cluster:{type:"boolean",default:!1},clusterRadius:{type:"number",default:50,minimum:0},clusterMaxZoom:{type:"number"},clusterMinPoints:{type:"number"},clusterProperties:{type:"*"},lineMetrics:{type:"boolean",default:!1},generateId:{type:"boolean",default:!1},promoteId:{type:"promoteId"}},source_video:{type:{required:!0,type:"enum",values:{video:{}}},urls:{required:!0,type:"array",value:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},source_image:{type:{required:!0,type:"enum",values:{image:{}}},url:{required:!0,type:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},layer:{id:{type:"string",required:!0},type:{type:"enum",values:{fill:{},line:{},symbol:{},circle:{},heatmap:{},"fill-extrusion":{},raster:{},hillshade:{},background:{}},required:!0},metadata:{type:"*"},source:{type:"string"},"source-layer":{type:"string"},minzoom:{type:"number",minimum:0,maximum:24},maxzoom:{type:"number",minimum:0,maximum:24},filter:{type:"filter"},layout:{type:"layout"},paint:{type:"paint"}},layout:["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_background"],layout_background:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_fill:{"fill-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_circle:{"circle-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_heatmap:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_line:{"line-cap":{type:"enum",values:{butt:{},round:{},square:{}},default:"butt",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-join":{type:"enum",values:{bevel:{},round:{},miter:{}},default:"miter",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-miter-limit":{type:"number",default:2,requires:[{"line-join":"miter"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-round-limit":{type:"number",default:1.05,requires:[{"line-join":"round"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_symbol:{"symbol-placement":{type:"enum",values:{point:{},line:{},"line-center":{}},default:"point",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-spacing":{type:"number",default:250,minimum:1,units:"pixels",requires:[{"symbol-placement":"line"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"symbol-avoid-edges":{type:"boolean",default:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"symbol-z-order":{type:"enum",values:{auto:{},"viewport-y":{},source:{}},default:"auto",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-allow-overlap":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-ignore-placement":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-optional":{type:"boolean",default:!1,requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-size":{type:"number",default:1,minimum:0,units:"factor of the original icon size",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-text-fit":{type:"enum",values:{none:{},width:{},height:{},both:{}},default:"none",requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-text-fit-padding":{type:"array",value:"number",length:4,default:[0,0,0,0],units:"pixels",requires:["icon-image","text-field",{"icon-text-fit":["both","width","height"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-image":{type:"resolvedImage",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-keep-upright":{type:"boolean",default:!1,requires:["icon-image",{"icon-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-offset":{type:"array",value:"number",length:2,default:[0,0],requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-field":{type:"formatted",default:"",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-font":{type:"array",value:"string",default:["Open Sans Regular","Arial Unicode MS Regular"],requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-size":{type:"number",default:16,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-width":{type:"number",default:10,minimum:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-line-height":{type:"number",default:1.2,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-letter-spacing":{type:"number",default:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-justify":{type:"enum",values:{auto:{},left:{},center:{},right:{}},default:"center",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-radial-offset":{type:"number",units:"ems",default:0,requires:["text-field"],"property-type":"data-driven",expression:{interpolated:!0,parameters:["zoom","feature"]}},"text-variable-anchor":{type:"array",value:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["text-field",{"!":"text-variable-anchor"}],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-angle":{type:"number",default:45,units:"degrees",requires:["text-field",{"symbol-placement":["line","line-center"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-writing-mode":{type:"array",value:"enum",values:{horizontal:{},vertical:{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-keep-upright":{type:"boolean",default:!0,requires:["text-field",{"text-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-transform":{type:"enum",values:{none:{},uppercase:{},lowercase:{}},default:"none",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-offset":{type:"array",value:"number",units:"ems",length:2,default:[0,0],requires:["text-field",{"!":"text-radial-offset"}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-allow-overlap":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-ignore-placement":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-optional":{type:"boolean",default:!1,requires:["text-field","icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_raster:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_hillshade:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},filter:{type:"array",value:"*"},filter_operator:{type:"enum",values:{"==":{},"!=":{},">":{},">=":{},"<":{},"<=":{},in:{},"!in":{},all:{},any:{},none:{},has:{},"!has":{},within:{}}},geometry_type:{type:"enum",values:{Point:{},LineString:{},Polygon:{}}},function:{expression:{type:"expression"},stops:{type:"array",value:"function_stop"},base:{type:"number",default:1,minimum:0},property:{type:"string",default:"$zoom"},type:{type:"enum",values:{identity:{},exponential:{},interval:{},categorical:{}},default:"exponential"},colorSpace:{type:"enum",values:{rgb:{},lab:{},hcl:{}},default:"rgb"},default:{type:"*",required:!1}},function_stop:{type:"array",minimum:0,maximum:24,value:["number","color"],length:2},expression:{type:"array",value:"*",minimum:1},light:{anchor:{type:"enum",default:"viewport",values:{map:{},viewport:{}},"property-type":"data-constant",transition:!1,expression:{interpolated:!1,parameters:["zoom"]}},position:{type:"array",default:[1.15,210,30],length:3,value:"number","property-type":"data-constant",transition:!0,expression:{interpolated:!0,parameters:["zoom"]}},color:{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},intensity:{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},paint:["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_background"],paint_fill:{"fill-antialias":{type:"boolean",default:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-outline-color":{type:"color",transition:!0,requires:[{"!":"fill-pattern"},{"fill-antialias":!0}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"}},"paint_fill-extrusion":{"fill-extrusion-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-extrusion-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-extrusion-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"fill-extrusion-height":{type:"number",default:0,minimum:0,units:"meters",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-base":{type:"number",default:0,minimum:0,units:"meters",transition:!0,requires:["fill-extrusion-height"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-vertical-gradient":{type:"boolean",default:!0,transition:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_line:{"line-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"line-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["line-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-width":{type:"number",default:1,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-gap-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-offset":{type:"number",default:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-dasharray":{type:"array",value:"number",minimum:0,transition:!0,units:"line widths",requires:[{"!":"line-pattern"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"line-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-gradient":{type:"color",transition:!1,requires:[{"!":"line-dasharray"},{"!":"line-pattern"},{source:"geojson",has:{lineMetrics:!0}}],expression:{interpolated:!0,parameters:["line-progress"]},"property-type":"color-ramp"}},paint_circle:{"circle-radius":{type:"number",default:5,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-blur":{type:"number",default:0,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"circle-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["circle-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-scale":{type:"enum",values:{map:{},viewport:{}},default:"map",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-alignment":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-stroke-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"}},paint_heatmap:{"heatmap-radius":{type:"number",default:30,minimum:1,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-weight":{type:"number",default:1,minimum:0,transition:!1,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-intensity":{type:"number",default:1,minimum:0,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"heatmap-color":{type:"color",default:["interpolate",["linear"],["heatmap-density"],0,"rgba(0, 0, 255, 0)",.1,"royalblue",.3,"cyan",.5,"lime",.7,"yellow",1,"red"],transition:!1,expression:{interpolated:!0,parameters:["heatmap-density"]},"property-type":"color-ramp"},"heatmap-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_symbol:{"icon-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-color":{type:"color",default:"#000000",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["icon-image","icon-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-color":{type:"color",default:"#000000",transition:!0,overridable:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["text-field","text-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_raster:{"raster-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-hue-rotate":{type:"number",default:0,period:360,transition:!0,units:"degrees",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-min":{type:"number",default:0,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-max":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-saturation":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-contrast":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-resampling":{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"raster-fade-duration":{type:"number",default:300,minimum:0,transition:!1,units:"milliseconds",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_hillshade:{"hillshade-illumination-direction":{type:"number",default:335,minimum:0,maximum:359,transition:!1,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-anchor":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-exaggeration":{type:"number",default:.5,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-shadow-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-highlight-color":{type:"color",default:"#FFFFFF",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-accent-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_background:{"background-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"background-pattern"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"background-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"background-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},transition:{duration:{type:"number",default:300,minimum:0,units:"milliseconds"},delay:{type:"number",default:0,minimum:0,units:"milliseconds"}},"property-type":{"data-driven":{type:"property-type"},"cross-faded":{type:"property-type"},"cross-faded-data-driven":{type:"property-type"},"color-ramp":{type:"property-type"},"data-constant":{type:"property-type"},constant:{type:"property-type"}},promoteId:{"*":{type:"string"}}},bt=function(s,l,f,v){this.message=(s?s+": ":"")+f,v&&(this.identifier=v),l!=null&&l.__line__&&(this.line=l.__line__)};function Vt(s){var l=s.value;return l?[new bt(s.key,l,"constants have been deprecated as of v8")]:[]}function pe(s){for(var l=[],f=arguments.length-1;f-- >0;)l[f]=arguments[f+1];for(var v=0,b=l;v<b.length;v+=1){var w=b[v];for(var I in w)s[I]=w[I]}return s}function ye(s){return s instanceof Number||s instanceof String||s instanceof Boolean?s.valueOf():s}function Qt(s){if(Array.isArray(s))return s.map(Qt);if(s instanceof Object&&!(s instanceof Number||s instanceof String||s instanceof Boolean)){var l={};for(var f in s)l[f]=Qt(s[f]);return l}return ye(s)}var me=function(s){function l(f,v){s.call(this,v),this.message=v,this.key=f}return s&&(l.__proto__=s),(l.prototype=Object.create(s&&s.prototype)).constructor=l,l}(Error),tn=function(s,l){l===void 0&&(l=[]),this.parent=s,this.bindings={};for(var f=0,v=l;f<v.length;f+=1){var b=v[f];this.bindings[b[0]]=b[1]}};tn.prototype.concat=function(s){return new tn(this,s)},tn.prototype.get=function(s){if(this.bindings[s])return this.bindings[s];if(this.parent)return this.parent.get(s);throw new Error(s+" not found in scope.")},tn.prototype.has=function(s){return!!this.bindings[s]||!!this.parent&&this.parent.has(s)};var Je={kind:"null"},re={kind:"number"},ze={kind:"string"},Me={kind:"boolean"},Re={kind:"color"},Mn={kind:"object"},$e={kind:"value"},Qn={kind:"collator"},Rr={kind:"formatted"},wn={kind:"resolvedImage"};function hr(s,l){return{kind:"array",itemType:s,N:l}}function tr(s){if(s.kind==="array"){var l=tr(s.itemType);return typeof s.N=="number"?"array<"+l+", "+s.N+">":s.itemType.kind==="value"?"array":"array<"+l+">"}return s.kind}var go=[Je,re,ze,Me,Re,Rr,Mn,hr($e),wn];function Er(s,l){if(l.kind==="error")return null;if(s.kind==="array"){if(l.kind==="array"&&(l.N===0&&l.itemType.kind==="value"||!Er(s.itemType,l.itemType))&&(typeof s.N!="number"||s.N===l.N))return null}else{if(s.kind===l.kind)return null;if(s.kind==="value"){for(var f=0,v=go;f<v.length;f+=1)if(!Er(v[f],l))return null}}return"Expected "+tr(s)+" but found "+tr(l)+" instead."}function Li(s,l){return l.some(function(f){return f.kind===s.kind})}function kr(s,l){return l.some(function(f){return f==="null"?s===null:f==="array"?Array.isArray(s):f==="object"?s&&!Array.isArray(s)&&typeof s=="object":f===typeof s})}var xn=u(function(s,l){var f={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],rebeccapurple:[102,51,153,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function v(A){return(A=Math.round(A))<0?0:A>255?255:A}function b(A){return v(A[A.length-1]==="%"?parseFloat(A)/100*255:parseInt(A))}function w(A){return(F=A[A.length-1]==="%"?parseFloat(A)/100:parseFloat(A))<0?0:F>1?1:F;var F}function I(A,F,j){return j<0?j+=1:j>1&&(j-=1),6*j<1?A+(F-A)*j*6:2*j<1?F:3*j<2?A+(F-A)*(2/3-j)*6:A}try{l.parseCSSColor=function(A){var F,j=A.replace(/ /g,"").toLowerCase();if(j in f)return f[j].slice();if(j[0]==="#")return j.length===4?(F=parseInt(j.substr(1),16))>=0&&F<=4095?[(3840&F)>>4|(3840&F)>>8,240&F|(240&F)>>4,15&F|(15&F)<<4,1]:null:j.length===7&&(F=parseInt(j.substr(1),16))>=0&&F<=16777215?[(16711680&F)>>16,(65280&F)>>8,255&F,1]:null;var G=j.indexOf("("),H=j.indexOf(")");if(G!==-1&&H+1===j.length){var J=j.substr(0,G),rt=j.substr(G+1,H-(G+1)).split(","),dt=1;switch(J){case"rgba":if(rt.length!==4)return null;dt=w(rt.pop());case"rgb":return rt.length!==3?null:[b(rt[0]),b(rt[1]),b(rt[2]),dt];case"hsla":if(rt.length!==4)return null;dt=w(rt.pop());case"hsl":if(rt.length!==3)return null;var _t=(parseFloat(rt[0])%360+360)%360/360,Pt=w(rt[1]),St=w(rt[2]),Nt=St<=.5?St*(Pt+1):St+Pt-St*Pt,qt=2*St-Nt;return[v(255*I(qt,Nt,_t+1/3)),v(255*I(qt,Nt,_t)),v(255*I(qt,Nt,_t-1/3)),dt];default:return null}}return null}}catch{}}).parseCSSColor,pr=function(s,l,f,v){v===void 0&&(v=1),this.r=s,this.g=l,this.b=f,this.a=v};pr.parse=function(s){if(s){if(s instanceof pr)return s;if(typeof s=="string"){var l=xn(s);if(l)return new pr(l[0]/255*l[3],l[1]/255*l[3],l[2]/255*l[3],l[3])}}},pr.prototype.toString=function(){var s=this.toArray(),l=s[1],f=s[2],v=s[3];return"rgba("+Math.round(s[0])+","+Math.round(l)+","+Math.round(f)+","+v+")"},pr.prototype.toArray=function(){var s=this.a;return s===0?[0,0,0,0]:[255*this.r/s,255*this.g/s,255*this.b/s,s]},pr.black=new pr(0,0,0,1),pr.white=new pr(1,1,1,1),pr.transparent=new pr(0,0,0,0),pr.red=new pr(1,0,0,1);var sa=function(s,l,f){this.sensitivity=s?l?"variant":"case":l?"accent":"base",this.locale=f,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})};sa.prototype.compare=function(s,l){return this.collator.compare(s,l)},sa.prototype.resolvedLocale=function(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale};var Ii=function(s,l,f,v,b){this.text=s,this.image=l,this.scale=f,this.fontStack=v,this.textColor=b},Qr=function(s){this.sections=s};Qr.fromString=function(s){return new Qr([new Ii(s,null,null,null,null)])},Qr.prototype.isEmpty=function(){return this.sections.length===0||!this.sections.some(function(s){return s.text.length!==0||s.image&&s.image.name.length!==0})},Qr.factory=function(s){return s instanceof Qr?s:Qr.fromString(s)},Qr.prototype.toString=function(){return this.sections.length===0?"":this.sections.map(function(s){return s.text}).join("")},Qr.prototype.serialize=function(){for(var s=["format"],l=0,f=this.sections;l<f.length;l+=1){var v=f[l];if(v.image)s.push(["image",v.image.name]);else{s.push(v.text);var b={};v.fontStack&&(b["text-font"]=["literal",v.fontStack.split(",")]),v.scale&&(b["font-scale"]=v.scale),v.textColor&&(b["text-color"]=["rgba"].concat(v.textColor.toArray())),s.push(b)}}return s};var mo=function(s){this.name=s.name,this.available=s.available};function Ps(s,l,f,v){return typeof s=="number"&&s>=0&&s<=255&&typeof l=="number"&&l>=0&&l<=255&&typeof f=="number"&&f>=0&&f<=255?v===void 0||typeof v=="number"&&v>=0&&v<=1?null:"Invalid rgba value ["+[s,l,f,v].join(", ")+"]: 'a' must be between 0 and 1.":"Invalid rgba value ["+(typeof v=="number"?[s,l,f,v]:[s,l,f]).join(", ")+"]: 'r', 'g', and 'b' must be between 0 and 255."}function Ga(s){if(s===null||typeof s=="string"||typeof s=="boolean"||typeof s=="number"||s instanceof pr||s instanceof sa||s instanceof Qr||s instanceof mo)return!0;if(Array.isArray(s)){for(var l=0,f=s;l<f.length;l+=1)if(!Ga(f[l]))return!1;return!0}if(typeof s=="object"){for(var v in s)if(!Ga(s[v]))return!1;return!0}return!1}function Pi(s){if(s===null)return Je;if(typeof s=="string")return ze;if(typeof s=="boolean")return Me;if(typeof s=="number")return re;if(s instanceof pr)return Re;if(s instanceof sa)return Qn;if(s instanceof Qr)return Rr;if(s instanceof mo)return wn;if(Array.isArray(s)){for(var l,f=s.length,v=0,b=s;v<b.length;v+=1){var w=Pi(b[v]);if(l){if(l===w)continue;l=$e;break}l=w}return hr(l||$e,f)}return Mn}function _l(s){var l=typeof s;return s===null?"":l==="string"||l==="number"||l==="boolean"?String(s):s instanceof pr||s instanceof Qr||s instanceof mo?s.toString():JSON.stringify(s)}mo.prototype.toString=function(){return this.name},mo.fromString=function(s){return s?new mo({name:s,available:!1}):null},mo.prototype.serialize=function(){return["image",this.name]};var ro=function(s,l){this.type=s,this.value=l};ro.parse=function(s,l){if(s.length!==2)return l.error("'literal' expression requires exactly one argument, but found "+(s.length-1)+" instead.");if(!Ga(s[1]))return l.error("invalid value");var f=s[1],v=Pi(f),b=l.expectedType;return v.kind!=="array"||v.N!==0||!b||b.kind!=="array"||typeof b.N=="number"&&b.N!==0||(v=b),new ro(v,f)},ro.prototype.evaluate=function(){return this.value},ro.prototype.eachChild=function(){},ro.prototype.outputDefined=function(){return!0},ro.prototype.serialize=function(){return this.type.kind==="array"||this.type.kind==="object"?["literal",this.value]:this.value instanceof pr?["rgba"].concat(this.value.toArray()):this.value instanceof Qr?this.value.serialize():this.value};var Hi=function(s){this.name="ExpressionEvaluationError",this.message=s};Hi.prototype.toJSON=function(){return this.message};var wa={string:ze,number:re,boolean:Me,object:Mn},oi=function(s,l){this.type=s,this.args=l};oi.parse=function(s,l){if(s.length<2)return l.error("Expected at least one argument.");var f,v=1,b=s[0];if(b==="array"){var w,I;if(s.length>2){var A=s[1];if(typeof A!="string"||!(A in wa)||A==="object")return l.error('The item type argument of "array" must be one of string, number, boolean',1);w=wa[A],v++}else w=$e;if(s.length>3){if(s[2]!==null&&(typeof s[2]!="number"||s[2]<0||s[2]!==Math.floor(s[2])))return l.error('The length argument to "array" must be a positive integer literal',2);I=s[2],v++}f=hr(w,I)}else f=wa[b];for(var F=[];v<s.length;v++){var j=l.parse(s[v],v,$e);if(!j)return null;F.push(j)}return new oi(f,F)},oi.prototype.evaluate=function(s){for(var l=0;l<this.args.length;l++){var f=this.args[l].evaluate(s);if(!Er(this.type,Pi(f)))return f;if(l===this.args.length-1)throw new Hi("Expected value to be of type "+tr(this.type)+", but found "+tr(Pi(f))+" instead.")}return null},oi.prototype.eachChild=function(s){this.args.forEach(s)},oi.prototype.outputDefined=function(){return this.args.every(function(s){return s.outputDefined()})},oi.prototype.serialize=function(){var s=this.type,l=[s.kind];if(s.kind==="array"){var f=s.itemType;if(f.kind==="string"||f.kind==="number"||f.kind==="boolean"){l.push(f.kind);var v=s.N;(typeof v=="number"||this.args.length>1)&&l.push(v)}}return l.concat(this.args.map(function(b){return b.serialize()}))};var ls=function(s){this.type=Rr,this.sections=s};ls.parse=function(s,l){if(s.length<2)return l.error("Expected at least one argument.");var f=s[1];if(!Array.isArray(f)&&typeof f=="object")return l.error("First argument must be an image or text section.");for(var v=[],b=!1,w=1;w<=s.length-1;++w){var I=s[w];if(b&&typeof I=="object"&&!Array.isArray(I)){b=!1;var A=null;if(I["font-scale"]&&!(A=l.parse(I["font-scale"],1,re)))return null;var F=null;if(I["text-font"]&&!(F=l.parse(I["text-font"],1,hr(ze))))return null;var j=null;if(I["text-color"]&&!(j=l.parse(I["text-color"],1,Re)))return null;var G=v[v.length-1];G.scale=A,G.font=F,G.textColor=j}else{var H=l.parse(s[w],1,$e);if(!H)return null;var J=H.type.kind;if(J!=="string"&&J!=="value"&&J!=="null"&&J!=="resolvedImage")return l.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");b=!0,v.push({content:H,scale:null,font:null,textColor:null})}}return new ls(v)},ls.prototype.evaluate=function(s){return new Qr(this.sections.map(function(l){var f=l.content.evaluate(s);return Pi(f)===wn?new Ii("",f,null,null,null):new Ii(_l(f),null,l.scale?l.scale.evaluate(s):null,l.font?l.font.evaluate(s).join(","):null,l.textColor?l.textColor.evaluate(s):null)}))},ls.prototype.eachChild=function(s){for(var l=0,f=this.sections;l<f.length;l+=1){var v=f[l];s(v.content),v.scale&&s(v.scale),v.font&&s(v.font),v.textColor&&s(v.textColor)}},ls.prototype.outputDefined=function(){return!1},ls.prototype.serialize=function(){for(var s=["format"],l=0,f=this.sections;l<f.length;l+=1){var v=f[l];s.push(v.content.serialize());var b={};v.scale&&(b["font-scale"]=v.scale.serialize()),v.font&&(b["text-font"]=v.font.serialize()),v.textColor&&(b["text-color"]=v.textColor.serialize()),s.push(b)}return s};var Sa=function(s){this.type=wn,this.input=s};Sa.parse=function(s,l){if(s.length!==2)return l.error("Expected two arguments.");var f=l.parse(s[1],1,ze);return f?new Sa(f):l.error("No image name provided.")},Sa.prototype.evaluate=function(s){var l=this.input.evaluate(s),f=mo.fromString(l);return f&&s.availableImages&&(f.available=s.availableImages.indexOf(l)>-1),f},Sa.prototype.eachChild=function(s){s(this.input)},Sa.prototype.outputDefined=function(){return!1},Sa.prototype.serialize=function(){return["image",this.input.serialize()]};var Oc={"to-boolean":Me,"to-color":Re,"to-number":re,"to-string":ze},Wa=function(s,l){this.type=s,this.args=l};Wa.parse=function(s,l){if(s.length<2)return l.error("Expected at least one argument.");var f=s[0];if((f==="to-boolean"||f==="to-string")&&s.length!==2)return l.error("Expected one argument.");for(var v=Oc[f],b=[],w=1;w<s.length;w++){var I=l.parse(s[w],w,$e);if(!I)return null;b.push(I)}return new Wa(v,b)},Wa.prototype.evaluate=function(s){if(this.type.kind==="boolean")return Boolean(this.args[0].evaluate(s));if(this.type.kind==="color"){for(var l,f,v=0,b=this.args;v<b.length;v+=1){if(f=null,(l=b[v].evaluate(s))instanceof pr)return l;if(typeof l=="string"){var w=s.parseColor(l);if(w)return w}else if(Array.isArray(l)&&!(f=l.length<3||l.length>4?"Invalid rbga value "+JSON.stringify(l)+": expected an array containing either three or four numeric values.":Ps(l[0],l[1],l[2],l[3])))return new pr(l[0]/255,l[1]/255,l[2]/255,l[3])}throw new Hi(f||"Could not parse color from value '"+(typeof l=="string"?l:String(JSON.stringify(l)))+"'")}if(this.type.kind==="number"){for(var I=null,A=0,F=this.args;A<F.length;A+=1){if((I=F[A].evaluate(s))===null)return 0;var j=Number(I);if(!isNaN(j))return j}throw new Hi("Could not convert "+JSON.stringify(I)+" to number.")}return this.type.kind==="formatted"?Qr.fromString(_l(this.args[0].evaluate(s))):this.type.kind==="resolvedImage"?mo.fromString(_l(this.args[0].evaluate(s))):_l(this.args[0].evaluate(s))},Wa.prototype.eachChild=function(s){this.args.forEach(s)},Wa.prototype.outputDefined=function(){return this.args.every(function(s){return s.outputDefined()})},Wa.prototype.serialize=function(){if(this.type.kind==="formatted")return new ls([{content:this.args[0],scale:null,font:null,textColor:null}]).serialize();if(this.type.kind==="resolvedImage")return new Sa(this.args[0]).serialize();var s=["to-"+this.type.kind];return this.eachChild(function(l){s.push(l.serialize())}),s};var L=["Unknown","Point","LineString","Polygon"],U=function(){this.globals=null,this.feature=null,this.featureState=null,this.formattedSection=null,this._parseColorCache={},this.availableImages=null,this.canonical=null};U.prototype.id=function(){return this.feature&&"id"in this.feature?this.feature.id:null},U.prototype.geometryType=function(){return this.feature?typeof this.feature.type=="number"?L[this.feature.type]:this.feature.type:null},U.prototype.geometry=function(){return this.feature&&"geometry"in this.feature?this.feature.geometry:null},U.prototype.canonicalID=function(){return this.canonical},U.prototype.properties=function(){return this.feature&&this.feature.properties||{}},U.prototype.parseColor=function(s){var l=this._parseColorCache[s];return l||(l=this._parseColorCache[s]=pr.parse(s)),l};var Q=function(s,l,f,v){this.name=s,this.type=l,this._evaluate=f,this.args=v};Q.prototype.evaluate=function(s){return this._evaluate(s,this.args)},Q.prototype.eachChild=function(s){this.args.forEach(s)},Q.prototype.outputDefined=function(){return!1},Q.prototype.serialize=function(){return[this.name].concat(this.args.map(function(s){return s.serialize()}))},Q.parse=function(s,l){var f,v=s[0],b=Q.definitions[v];if(!b)return l.error('Unknown expression "'+v+'". If you wanted a literal array, use ["literal", [...]].',0);for(var w=Array.isArray(b)?b[0]:b.type,I=Array.isArray(b)?[[b[1],b[2]]]:b.overloads,A=I.filter(function(mn){var Ze=mn[0];return!Array.isArray(Ze)||Ze.length===s.length-1}),F=null,j=0,G=A;j<G.length;j+=1){var H=G[j],J=H[0],rt=H[1];F=new er(l.registry,l.path,null,l.scope);for(var dt=[],_t=!1,Pt=1;Pt<s.length;Pt++){var St=s[Pt],Nt=Array.isArray(J)?J[Pt-1]:J.type,qt=F.parse(St,1+dt.length,Nt);if(!qt){_t=!0;break}dt.push(qt)}if(!_t)if(Array.isArray(J)&&J.length!==dt.length)F.error("Expected "+J.length+" arguments, but found "+dt.length+" instead.");else{for(var Zt=0;Zt<dt.length;Zt++){var ee=Array.isArray(J)?J[Zt]:J.type,fe=dt[Zt];F.concat(Zt+1).checkSubtype(ee,fe.type)}if(F.errors.length===0)return new Q(v,w,rt,dt)}}if(A.length===1)(f=l.errors).push.apply(f,F.errors);else{for(var Ee=(A.length?A:I).map(function(mn){var Ze;return Ze=mn[0],Array.isArray(Ze)?"("+Ze.map(tr).join(", ")+")":"("+tr(Ze.type)+"...)"}).join(" | "),Oe=[],hn=1;hn<s.length;hn++){var qe=l.parse(s[hn],1+Oe.length);if(!qe)return null;Oe.push(tr(qe.type))}l.error("Expected arguments of type "+Ee+", but found ("+Oe.join(", ")+") instead.")}return null},Q.register=function(s,l){for(var f in Q.definitions=l,l)s[f]=Q};var At=function(s,l,f){this.type=Qn,this.locale=f,this.caseSensitive=s,this.diacriticSensitive=l};function tt(s,l){s[0]=Math.min(s[0],l[0]),s[1]=Math.min(s[1],l[1]),s[2]=Math.max(s[2],l[0]),s[3]=Math.max(s[3],l[1])}function ot(s,l){return!(s[0]<=l[0]||s[2]>=l[2]||s[1]<=l[1]||s[3]>=l[3])}function ft(s,l){var f=(180+s[0])/360,v=(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+s[1]*Math.PI/360)))/360,b=Math.pow(2,l.z);return[Math.round(f*b*8192),Math.round(v*b*8192)]}function Ft(s,l,f){return l[1]>s[1]!=f[1]>s[1]&&s[0]<(f[0]-l[0])*(s[1]-l[1])/(f[1]-l[1])+l[0]}function zt(s,l){for(var f,v,b,w,I,A,F,j=!1,G=0,H=l.length;G<H;G++)for(var J=l[G],rt=0,dt=J.length;rt<dt-1;rt++){if((w=(f=s)[0]-(v=J[rt])[0])*(F=f[1]-(b=J[rt+1])[1])-(A=f[0]-b[0])*(I=f[1]-v[1])==0&&w*A<=0&&I*F<=0)return!1;Ft(s,J[rt],J[rt+1])&&(j=!j)}return j}function ie(s,l){for(var f=0;f<l.length;f++)if(zt(s,l[f]))return!0;return!1}function kt(s,l,f,v){var b=v[0]-f[0],w=v[1]-f[1],I=(s[0]-f[0])*w-b*(s[1]-f[1]),A=(l[0]-f[0])*w-b*(l[1]-f[1]);return I>0&&A<0||I<0&&A>0}function Ie(s,l,f){for(var v=0,b=f;v<b.length;v+=1)for(var w=b[v],I=0;I<w.length-1;++I)if((H=[(G=w[I+1])[0]-(j=w[I])[0],G[1]-j[1]])[0]*(J=[(F=l)[0]-(A=s)[0],F[1]-A[1]])[1]-H[1]*J[0]!=0&&kt(A,F,j,G)&&kt(j,G,A,F))return!0;var A,F,j,G,H,J;return!1}function Pe(s,l){for(var f=0;f<s.length;++f)if(!zt(s[f],l))return!1;for(var v=0;v<s.length-1;++v)if(Ie(s[v],s[v+1],l))return!1;return!0}function Xe(s,l){for(var f=0;f<l.length;f++)if(Pe(s,l[f]))return!0;return!1}function en(s,l,f){for(var v=[],b=0;b<s.length;b++){for(var w=[],I=0;I<s[b].length;I++){var A=ft(s[b][I],f);tt(l,A),w.push(A)}v.push(w)}return v}function dr(s,l,f){for(var v=[],b=0;b<s.length;b++){var w=en(s[b],l,f);v.push(w)}return v}function le(s,l,f,v){if(s[0]<f[0]||s[0]>f[2]){var b=.5*v,w=s[0]-f[0]>b?-v:f[0]-s[0]>b?v:0;w===0&&(w=s[0]-f[2]>b?-v:f[2]-s[0]>b?v:0),s[0]+=w}tt(l,s)}function Ue(s,l,f,v){for(var b=8192*Math.pow(2,v.z),w=[8192*v.x,8192*v.y],I=[],A=0,F=s;A<F.length;A+=1)for(var j=0,G=F[A];j<G.length;j+=1){var H=G[j],J=[H.x+w[0],H.y+w[1]];le(J,l,f,b),I.push(J)}return I}function _r(s,l,f,v){for(var b,w=8192*Math.pow(2,v.z),I=[8192*v.x,8192*v.y],A=[],F=0,j=s;F<j.length;F+=1){for(var G=[],H=0,J=j[F];H<J.length;H+=1){var rt=J[H],dt=[rt.x+I[0],rt.y+I[1]];tt(l,dt),G.push(dt)}A.push(G)}if(l[2]-l[0]<=w/2){(b=l)[0]=b[1]=1/0,b[2]=b[3]=-1/0;for(var _t=0,Pt=A;_t<Pt.length;_t+=1)for(var St=0,Nt=Pt[_t];St<Nt.length;St+=1)le(Nt[St],l,f,w)}return A}At.parse=function(s,l){if(s.length!==2)return l.error("Expected one argument.");var f=s[1];if(typeof f!="object"||Array.isArray(f))return l.error("Collator options argument must be an object.");var v=l.parse(f["case-sensitive"]!==void 0&&f["case-sensitive"],1,Me);if(!v)return null;var b=l.parse(f["diacritic-sensitive"]!==void 0&&f["diacritic-sensitive"],1,Me);if(!b)return null;var w=null;return f.locale&&!(w=l.parse(f.locale,1,ze))?null:new At(v,b,w)},At.prototype.evaluate=function(s){return new sa(this.caseSensitive.evaluate(s),this.diacriticSensitive.evaluate(s),this.locale?this.locale.evaluate(s):null)},At.prototype.eachChild=function(s){s(this.caseSensitive),s(this.diacriticSensitive),this.locale&&s(this.locale)},At.prototype.outputDefined=function(){return!1},At.prototype.serialize=function(){var s={};return s["case-sensitive"]=this.caseSensitive.serialize(),s["diacritic-sensitive"]=this.diacriticSensitive.serialize(),this.locale&&(s.locale=this.locale.serialize()),["collator",s]};var Yn=function(s,l){this.type=Me,this.geojson=s,this.geometries=l};function $r(s){if(s instanceof Q&&(s.name==="get"&&s.args.length===1||s.name==="feature-state"||s.name==="has"&&s.args.length===1||s.name==="properties"||s.name==="geometry-type"||s.name==="id"||/^filter-/.test(s.name))||s instanceof Yn)return!1;var l=!0;return s.eachChild(function(f){l&&!$r(f)&&(l=!1)}),l}function fn(s){if(s instanceof Q&&s.name==="feature-state")return!1;var l=!0;return s.eachChild(function(f){l&&!fn(f)&&(l=!1)}),l}function Ea(s,l){if(s instanceof Q&&l.indexOf(s.name)>=0)return!1;var f=!0;return s.eachChild(function(v){f&&!Ea(v,l)&&(f=!1)}),f}Yn.parse=function(s,l){if(s.length!==2)return l.error("'within' expression requires exactly one argument, but found "+(s.length-1)+" instead.");if(Ga(s[1])){var f=s[1];if(f.type==="FeatureCollection")for(var v=0;v<f.features.length;++v){var b=f.features[v].geometry.type;if(b==="Polygon"||b==="MultiPolygon")return new Yn(f,f.features[v].geometry)}else if(f.type==="Feature"){var w=f.geometry.type;if(w==="Polygon"||w==="MultiPolygon")return new Yn(f,f.geometry)}else if(f.type==="Polygon"||f.type==="MultiPolygon")return new Yn(f,f)}return l.error("'within' expression requires valid geojson object that contains polygon geometry type.")},Yn.prototype.evaluate=function(s){if(s.geometry()!=null&&s.canonicalID()!=null){if(s.geometryType()==="Point")return function(l,f){var v=[1/0,1/0,-1/0,-1/0],b=[1/0,1/0,-1/0,-1/0],w=l.canonicalID();if(f.type==="Polygon"){var I=en(f.coordinates,b,w),A=Ue(l.geometry(),v,b,w);if(!ot(v,b))return!1;for(var F=0,j=A;F<j.length;F+=1)if(!zt(j[F],I))return!1}if(f.type==="MultiPolygon"){var G=dr(f.coordinates,b,w),H=Ue(l.geometry(),v,b,w);if(!ot(v,b))return!1;for(var J=0,rt=H;J<rt.length;J+=1)if(!ie(rt[J],G))return!1}return!0}(s,this.geometries);if(s.geometryType()==="LineString")return function(l,f){var v=[1/0,1/0,-1/0,-1/0],b=[1/0,1/0,-1/0,-1/0],w=l.canonicalID();if(f.type==="Polygon"){var I=en(f.coordinates,b,w),A=_r(l.geometry(),v,b,w);if(!ot(v,b))return!1;for(var F=0,j=A;F<j.length;F+=1)if(!Pe(j[F],I))return!1}if(f.type==="MultiPolygon"){var G=dr(f.coordinates,b,w),H=_r(l.geometry(),v,b,w);if(!ot(v,b))return!1;for(var J=0,rt=H;J<rt.length;J+=1)if(!Xe(rt[J],G))return!1}return!0}(s,this.geometries)}return!1},Yn.prototype.eachChild=function(){},Yn.prototype.outputDefined=function(){return!0},Yn.prototype.serialize=function(){return["within",this.geojson]};var Wo=function(s,l){this.type=l.type,this.name=s,this.boundExpression=l};Wo.parse=function(s,l){if(s.length!==2||typeof s[1]!="string")return l.error("'var' expression requires exactly one string literal argument.");var f=s[1];return l.scope.has(f)?new Wo(f,l.scope.get(f)):l.error('Unknown variable "'+f+'". Make sure "'+f+'" has been bound in an enclosing "let" expression before using it.',1)},Wo.prototype.evaluate=function(s){return this.boundExpression.evaluate(s)},Wo.prototype.eachChild=function(){},Wo.prototype.outputDefined=function(){return!1},Wo.prototype.serialize=function(){return["var",this.name]};var er=function(s,l,f,v,b){l===void 0&&(l=[]),v===void 0&&(v=new tn),b===void 0&&(b=[]),this.registry=s,this.path=l,this.key=l.map(function(w){return"["+w+"]"}).join(""),this.scope=v,this.errors=b,this.expectedType=f};function gr(s,l){for(var f,v=s.length-1,b=0,w=v,I=0;b<=w;)if((f=s[I=Math.floor((b+w)/2)])<=l){if(I===v||l<s[I+1])return I;b=I+1}else{if(!(f>l))throw new Hi("Input is not a number.");w=I-1}return 0}er.prototype.parse=function(s,l,f,v,b){return b===void 0&&(b={}),l?this.concat(l,f,v)._parse(s,b):this._parse(s,b)},er.prototype._parse=function(s,l){function f(j,G,H){return H==="assert"?new oi(G,[j]):H==="coerce"?new Wa(G,[j]):j}if(s!==null&&typeof s!="string"&&typeof s!="boolean"&&typeof s!="number"||(s=["literal",s]),Array.isArray(s)){if(s.length===0)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');var v=s[0];if(typeof v!="string")return this.error("Expression name must be a string, but found "+typeof v+' instead. If you wanted a literal array, use ["literal", [...]].',0),null;var b=this.registry[v];if(b){var w=b.parse(s,this);if(!w)return null;if(this.expectedType){var I=this.expectedType,A=w.type;if(I.kind!=="string"&&I.kind!=="number"&&I.kind!=="boolean"&&I.kind!=="object"&&I.kind!=="array"||A.kind!=="value")if(I.kind!=="color"&&I.kind!=="formatted"&&I.kind!=="resolvedImage"||A.kind!=="value"&&A.kind!=="string"){if(this.checkSubtype(I,A))return null}else w=f(w,I,l.typeAnnotation||"coerce");else w=f(w,I,l.typeAnnotation||"assert")}if(!(w instanceof ro)&&w.type.kind!=="resolvedImage"&&function j(G){if(G instanceof Wo)return j(G.boundExpression);if(G instanceof Q&&G.name==="error"||G instanceof At||G instanceof Yn)return!1;var H=G instanceof Wa||G instanceof oi,J=!0;return G.eachChild(function(rt){J=H?J&&j(rt):J&&rt instanceof ro}),!!J&&$r(G)&&Ea(G,["zoom","heatmap-density","line-progress","accumulated","is-supported-script"])}(w)){var F=new U;try{w=new ro(w.type,w.evaluate(F))}catch(j){return this.error(j.message),null}}return w}return this.error('Unknown expression "'+v+'". If you wanted a literal array, use ["literal", [...]].',0)}return this.error(s===void 0?"'undefined' value invalid. Use null instead.":typeof s=="object"?'Bare objects invalid. Use ["literal", {...}] instead.':"Expected an array, but found "+typeof s+" instead.")},er.prototype.concat=function(s,l,f){var v=typeof s=="number"?this.path.concat(s):this.path,b=f?this.scope.concat(f):this.scope;return new er(this.registry,v,l||null,b,this.errors)},er.prototype.error=function(s){for(var l=[],f=arguments.length-1;f-- >0;)l[f]=arguments[f+1];var v=""+this.key+l.map(function(b){return"["+b+"]"}).join("");this.errors.push(new me(v,s))},er.prototype.checkSubtype=function(s,l){var f=Er(s,l);return f&&this.error(f),f};var Ln=function(s,l,f){this.type=s,this.input=l,this.labels=[],this.outputs=[];for(var v=0,b=f;v<b.length;v+=1){var w=b[v],I=w[1];this.labels.push(w[0]),this.outputs.push(I)}};function Oi(s,l,f){return s*(1-f)+l*f}Ln.parse=function(s,l){if(s.length-1<4)return l.error("Expected at least 4 arguments, but found only "+(s.length-1)+".");if((s.length-1)%2!=0)return l.error("Expected an even number of arguments.");var f=l.parse(s[1],1,re);if(!f)return null;var v=[],b=null;l.expectedType&&l.expectedType.kind!=="value"&&(b=l.expectedType);for(var w=1;w<s.length;w+=2){var I=w===1?-1/0:s[w],A=s[w+1],F=w,j=w+1;if(typeof I!="number")return l.error('Input/output pairs for "step" expressions must be defined using literal numeric values (not computed expressions) for the input values.',F);if(v.length&&v[v.length-1][0]>=I)return l.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',F);var G=l.parse(A,j,b);if(!G)return null;b=b||G.type,v.push([I,G])}return new Ln(b,f,v)},Ln.prototype.evaluate=function(s){var l=this.labels,f=this.outputs;if(l.length===1)return f[0].evaluate(s);var v=this.input.evaluate(s);if(v<=l[0])return f[0].evaluate(s);var b=l.length;return v>=l[b-1]?f[b-1].evaluate(s):f[gr(l,v)].evaluate(s)},Ln.prototype.eachChild=function(s){s(this.input);for(var l=0,f=this.outputs;l<f.length;l+=1)s(f[l])},Ln.prototype.outputDefined=function(){return this.outputs.every(function(s){return s.outputDefined()})},Ln.prototype.serialize=function(){for(var s=["step",this.input.serialize()],l=0;l<this.labels.length;l++)l>0&&s.push(this.labels[l]),s.push(this.outputs[l].serialize());return s};var Vu=Object.freeze({__proto__:null,number:Oi,color:function(s,l,f){return new pr(Oi(s.r,l.r,f),Oi(s.g,l.g,f),Oi(s.b,l.b,f),Oi(s.a,l.a,f))},array:function(s,l,f){return s.map(function(v,b){return Oi(v,l[b],f)})}}),mu=6/29*3*(6/29),Tg=Math.PI/180,Mg=180/Math.PI;function _d(s){return s>.008856451679035631?Math.pow(s,1/3):s/mu+4/29}function Ah(s){return s>6/29?s*s*s:mu*(s-4/29)}function Of(s){return 255*(s<=.0031308?12.92*s:1.055*Math.pow(s,1/2.4)-.055)}function Ao(s){return(s/=255)<=.04045?s/12.92:Math.pow((s+.055)/1.055,2.4)}function Lh(s){var l=Ao(s.r),f=Ao(s.g),v=Ao(s.b),b=_d((.4124564*l+.3575761*f+.1804375*v)/.95047),w=_d((.2126729*l+.7151522*f+.072175*v)/1);return{l:116*w-16,a:500*(b-w),b:200*(w-_d((.0193339*l+.119192*f+.9503041*v)/1.08883)),alpha:s.a}}function Zl(s){var l=(s.l+16)/116,f=isNaN(s.a)?l:l+s.a/500,v=isNaN(s.b)?l:l-s.b/200;return l=1*Ah(l),f=.95047*Ah(f),v=1.08883*Ah(v),new pr(Of(3.2404542*f-1.5371385*l-.4985314*v),Of(-.969266*f+1.8760108*l+.041556*v),Of(.0556434*f-.2040259*l+1.0572252*v),s.alpha)}function Kl(s,l,f){var v=l-s;return s+f*(v>180||v<-180?v-360*Math.round(v/360):v)}var Jl={forward:Lh,reverse:Zl,interpolate:function(s,l,f){return{l:Oi(s.l,l.l,f),a:Oi(s.a,l.a,f),b:Oi(s.b,l.b,f),alpha:Oi(s.alpha,l.alpha,f)}}},Fa={forward:function(s){var l=Lh(s),f=l.l,v=l.a,b=l.b,w=Math.atan2(b,v)*Mg;return{h:w<0?w+360:w,c:Math.sqrt(v*v+b*b),l:f,alpha:s.a}},reverse:function(s){var l=s.h*Tg,f=s.c;return Zl({l:s.l,a:Math.cos(l)*f,b:Math.sin(l)*f,alpha:s.alpha})},interpolate:function(s,l,f){return{h:Kl(s.h,l.h,f),c:Oi(s.c,l.c,f),l:Oi(s.l,l.l,f),alpha:Oi(s.alpha,l.alpha,f)}}},xd=Object.freeze({__proto__:null,lab:Jl,hcl:Fa}),So=function(s,l,f,v,b){this.type=s,this.operator=l,this.interpolation=f,this.input=v,this.labels=[],this.outputs=[];for(var w=0,I=b;w<I.length;w+=1){var A=I[w],F=A[1];this.labels.push(A[0]),this.outputs.push(F)}};function Ql(s,l,f,v){var b=v-f,w=s-f;return b===0?0:l===1?w/b:(Math.pow(l,w)-1)/(Math.pow(l,b)-1)}So.interpolationFactor=function(s,l,f,v){var b=0;if(s.name==="exponential")b=Ql(l,s.base,f,v);else if(s.name==="linear")b=Ql(l,1,f,v);else if(s.name==="cubic-bezier"){var w=s.controlPoints;b=new c(w[0],w[1],w[2],w[3]).solve(Ql(l,1,f,v))}return b},So.parse=function(s,l){var f=s[0],v=s[1],b=s[2],w=s.slice(3);if(!Array.isArray(v)||v.length===0)return l.error("Expected an interpolation type expression.",1);if(v[0]==="linear")v={name:"linear"};else if(v[0]==="exponential"){var I=v[1];if(typeof I!="number")return l.error("Exponential interpolation requires a numeric base.",1,1);v={name:"exponential",base:I}}else{if(v[0]!=="cubic-bezier")return l.error("Unknown interpolation type "+String(v[0]),1,0);var A=v.slice(1);if(A.length!==4||A.some(function(Pt){return typeof Pt!="number"||Pt<0||Pt>1}))return l.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);v={name:"cubic-bezier",controlPoints:A}}if(s.length-1<4)return l.error("Expected at least 4 arguments, but found only "+(s.length-1)+".");if((s.length-1)%2!=0)return l.error("Expected an even number of arguments.");if(!(b=l.parse(b,2,re)))return null;var F=[],j=null;f==="interpolate-hcl"||f==="interpolate-lab"?j=Re:l.expectedType&&l.expectedType.kind!=="value"&&(j=l.expectedType);for(var G=0;G<w.length;G+=2){var H=w[G],J=w[G+1],rt=G+3,dt=G+4;if(typeof H!="number")return l.error('Input/output pairs for "interpolate" expressions must be defined using literal numeric values (not computed expressions) for the input values.',rt);if(F.length&&F[F.length-1][0]>=H)return l.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',rt);var _t=l.parse(J,dt,j);if(!_t)return null;j=j||_t.type,F.push([H,_t])}return j.kind==="number"||j.kind==="color"||j.kind==="array"&&j.itemType.kind==="number"&&typeof j.N=="number"?new So(j,f,v,b,F):l.error("Type "+tr(j)+" is not interpolatable.")},So.prototype.evaluate=function(s){var l=this.labels,f=this.outputs;if(l.length===1)return f[0].evaluate(s);var v=this.input.evaluate(s);if(v<=l[0])return f[0].evaluate(s);var b=l.length;if(v>=l[b-1])return f[b-1].evaluate(s);var w=gr(l,v),I=So.interpolationFactor(this.interpolation,v,l[w],l[w+1]),A=f[w].evaluate(s),F=f[w+1].evaluate(s);return this.operator==="interpolate"?Vu[this.type.kind.toLowerCase()](A,F,I):this.operator==="interpolate-hcl"?Fa.reverse(Fa.interpolate(Fa.forward(A),Fa.forward(F),I)):Jl.reverse(Jl.interpolate(Jl.forward(A),Jl.forward(F),I))},So.prototype.eachChild=function(s){s(this.input);for(var l=0,f=this.outputs;l<f.length;l+=1)s(f[l])},So.prototype.outputDefined=function(){return this.outputs.every(function(s){return s.outputDefined()})},So.prototype.serialize=function(){var s;s=this.interpolation.name==="linear"?["linear"]:this.interpolation.name==="exponential"?this.interpolation.base===1?["linear"]:["exponential",this.interpolation.base]:["cubic-bezier"].concat(this.interpolation.controlPoints);for(var l=[this.operator,s,this.input.serialize()],f=0;f<this.labels.length;f++)l.push(this.labels[f],this.outputs[f].serialize());return l};var vu=function(s,l){this.type=s,this.args=l};vu.parse=function(s,l){if(s.length<2)return l.error("Expectected at least one argument.");var f=null,v=l.expectedType;v&&v.kind!=="value"&&(f=v);for(var b=[],w=0,I=s.slice(1);w<I.length;w+=1){var A=l.parse(I[w],1+b.length,f,void 0,{typeAnnotation:"omit"});if(!A)return null;f=f||A.type,b.push(A)}var F=v&&b.some(function(j){return Er(v,j.type)});return new vu(F?$e:f,b)},vu.prototype.evaluate=function(s){for(var l,f=null,v=0,b=0,w=this.args;b<w.length&&(v++,(f=w[b].evaluate(s))&&f instanceof mo&&!f.available&&(l||(l=f.name),f=null,v===this.args.length&&(f=l)),f===null);b+=1);return f},vu.prototype.eachChild=function(s){this.args.forEach(s)},vu.prototype.outputDefined=function(){return this.args.every(function(s){return s.outputDefined()})},vu.prototype.serialize=function(){var s=["coalesce"];return this.eachChild(function(l){s.push(l.serialize())}),s};var yu=function(s,l){this.type=l.type,this.bindings=[].concat(s),this.result=l};yu.prototype.evaluate=function(s){return this.result.evaluate(s)},yu.prototype.eachChild=function(s){for(var l=0,f=this.bindings;l<f.length;l+=1)s(f[l][1]);s(this.result)},yu.parse=function(s,l){if(s.length<4)return l.error("Expected at least 3 arguments, but found "+(s.length-1)+" instead.");for(var f=[],v=1;v<s.length-1;v+=2){var b=s[v];if(typeof b!="string")return l.error("Expected string, but found "+typeof b+" instead.",v);if(/[^a-zA-Z0-9_]/.test(b))return l.error("Variable names must contain only alphanumeric characters or '_'.",v);var w=l.parse(s[v+1],v+1);if(!w)return null;f.push([b,w])}var I=l.parse(s[s.length-1],s.length-1,l.expectedType,f);return I?new yu(f,I):null},yu.prototype.outputDefined=function(){return this.result.outputDefined()},yu.prototype.serialize=function(){for(var s=["let"],l=0,f=this.bindings;l<f.length;l+=1){var v=f[l];s.push(v[0],v[1].serialize())}return s.push(this.result.serialize()),s};var $u=function(s,l,f){this.type=s,this.index=l,this.input=f};$u.parse=function(s,l){if(s.length!==3)return l.error("Expected 2 arguments, but found "+(s.length-1)+" instead.");var f=l.parse(s[1],1,re),v=l.parse(s[2],2,hr(l.expectedType||$e));return f&&v?new $u(v.type.itemType,f,v):null},$u.prototype.evaluate=function(s){var l=this.index.evaluate(s),f=this.input.evaluate(s);if(l<0)throw new Hi("Array index out of bounds: "+l+" < 0.");if(l>=f.length)throw new Hi("Array index out of bounds: "+l+" > "+(f.length-1)+".");if(l!==Math.floor(l))throw new Hi("Array index must be an integer, but found "+l+" instead.");return f[l]},$u.prototype.eachChild=function(s){s(this.index),s(this.input)},$u.prototype.outputDefined=function(){return!1},$u.prototype.serialize=function(){return["at",this.index.serialize(),this.input.serialize()]};var io=function(s,l){this.type=Me,this.needle=s,this.haystack=l};io.parse=function(s,l){if(s.length!==3)return l.error("Expected 2 arguments, but found "+(s.length-1)+" instead.");var f=l.parse(s[1],1,$e),v=l.parse(s[2],2,$e);return f&&v?Li(f.type,[Me,ze,re,Je,$e])?new io(f,v):l.error("Expected first argument to be of type boolean, string, number or null, but found "+tr(f.type)+" instead"):null},io.prototype.evaluate=function(s){var l=this.needle.evaluate(s),f=this.haystack.evaluate(s);if(!f)return!1;if(!kr(l,["boolean","string","number","null"]))throw new Hi("Expected first argument to be of type boolean, string, number or null, but found "+tr(Pi(l))+" instead.");if(!kr(f,["string","array"]))throw new Hi("Expected second argument to be of type array or string, but found "+tr(Pi(f))+" instead.");return f.indexOf(l)>=0},io.prototype.eachChild=function(s){s(this.needle),s(this.haystack)},io.prototype.outputDefined=function(){return!0},io.prototype.serialize=function(){return["in",this.needle.serialize(),this.haystack.serialize()]};var tc=function(s,l,f){this.type=re,this.needle=s,this.haystack=l,this.fromIndex=f};tc.parse=function(s,l){if(s.length<=2||s.length>=5)return l.error("Expected 3 or 4 arguments, but found "+(s.length-1)+" instead.");var f=l.parse(s[1],1,$e),v=l.parse(s[2],2,$e);if(!f||!v)return null;if(!Li(f.type,[Me,ze,re,Je,$e]))return l.error("Expected first argument to be of type boolean, string, number or null, but found "+tr(f.type)+" instead");if(s.length===4){var b=l.parse(s[3],3,re);return b?new tc(f,v,b):null}return new tc(f,v)},tc.prototype.evaluate=function(s){var l=this.needle.evaluate(s),f=this.haystack.evaluate(s);if(!kr(l,["boolean","string","number","null"]))throw new Hi("Expected first argument to be of type boolean, string, number or null, but found "+tr(Pi(l))+" instead.");if(!kr(f,["string","array"]))throw new Hi("Expected second argument to be of type array or string, but found "+tr(Pi(f))+" instead.");if(this.fromIndex){var v=this.fromIndex.evaluate(s);return f.indexOf(l,v)}return f.indexOf(l)},tc.prototype.eachChild=function(s){s(this.needle),s(this.haystack),this.fromIndex&&s(this.fromIndex)},tc.prototype.outputDefined=function(){return!1},tc.prototype.serialize=function(){if(this.fromIndex!=null&&this.fromIndex!==void 0){var s=this.fromIndex.serialize();return["index-of",this.needle.serialize(),this.haystack.serialize(),s]}return["index-of",this.needle.serialize(),this.haystack.serialize()]};var ua=function(s,l,f,v,b,w){this.inputType=s,this.type=l,this.input=f,this.cases=v,this.outputs=b,this.otherwise=w};ua.parse=function(s,l){if(s.length<5)return l.error("Expected at least 4 arguments, but found only "+(s.length-1)+".");if(s.length%2!=1)return l.error("Expected an even number of arguments.");var f,v;l.expectedType&&l.expectedType.kind!=="value"&&(v=l.expectedType);for(var b={},w=[],I=2;I<s.length-1;I+=2){var A=s[I],F=s[I+1];Array.isArray(A)||(A=[A]);var j=l.concat(I);if(A.length===0)return j.error("Expected at least one branch label.");for(var G=0,H=A;G<H.length;G+=1){var J=H[G];if(typeof J!="number"&&typeof J!="string")return j.error("Branch labels must be numbers or strings.");if(typeof J=="number"&&Math.abs(J)>Number.MAX_SAFE_INTEGER)return j.error("Branch labels must be integers no larger than "+Number.MAX_SAFE_INTEGER+".");if(typeof J=="number"&&Math.floor(J)!==J)return j.error("Numeric branch labels must be integer values.");if(f){if(j.checkSubtype(f,Pi(J)))return null}else f=Pi(J);if(b[String(J)]!==void 0)return j.error("Branch labels must be unique.");b[String(J)]=w.length}var rt=l.parse(F,I,v);if(!rt)return null;v=v||rt.type,w.push(rt)}var dt=l.parse(s[1],1,$e);if(!dt)return null;var _t=l.parse(s[s.length-1],s.length-1,v);return _t?dt.type.kind!=="value"&&l.concat(1).checkSubtype(f,dt.type)?null:new ua(f,v,dt,b,w,_t):null},ua.prototype.evaluate=function(s){var l=this.input.evaluate(s);return(Pi(l)===this.inputType&&this.outputs[this.cases[l]]||this.otherwise).evaluate(s)},ua.prototype.eachChild=function(s){s(this.input),this.outputs.forEach(s),s(this.otherwise)},ua.prototype.outputDefined=function(){return this.outputs.every(function(s){return s.outputDefined()})&&this.otherwise.outputDefined()},ua.prototype.serialize=function(){for(var s=this,l=["match",this.input.serialize()],f=[],v={},b=0,w=Object.keys(this.cases).sort();b<w.length;b+=1){var I=w[b];(H=v[this.cases[I]])===void 0?(v[this.cases[I]]=f.length,f.push([this.cases[I],[I]])):f[H][1].push(I)}for(var A=function(rt){return s.inputType.kind==="number"?Number(rt):rt},F=0,j=f;F<j.length;F+=1){var G=j[F],H=G[0],J=G[1];l.push(J.length===1?A(J[0]):J.map(A)),l.push(this.outputs[outputIndex$1].serialize())}return l.push(this.otherwise.serialize()),l};var Rc=function(s,l,f){this.type=s,this.branches=l,this.otherwise=f};Rc.parse=function(s,l){if(s.length<4)return l.error("Expected at least 3 arguments, but found only "+(s.length-1)+".");if(s.length%2!=0)return l.error("Expected an odd number of arguments.");var f;l.expectedType&&l.expectedType.kind!=="value"&&(f=l.expectedType);for(var v=[],b=1;b<s.length-1;b+=2){var w=l.parse(s[b],b,Me);if(!w)return null;var I=l.parse(s[b+1],b+1,f);if(!I)return null;v.push([w,I]),f=f||I.type}var A=l.parse(s[s.length-1],s.length-1,f);return A?new Rc(f,v,A):null},Rc.prototype.evaluate=function(s){for(var l=0,f=this.branches;l<f.length;l+=1){var v=f[l],b=v[1];if(v[0].evaluate(s))return b.evaluate(s)}return this.otherwise.evaluate(s)},Rc.prototype.eachChild=function(s){for(var l=0,f=this.branches;l<f.length;l+=1){var v=f[l],b=v[1];s(v[0]),s(b)}s(this.otherwise)},Rc.prototype.outputDefined=function(){return this.branches.every(function(s){return s[1].outputDefined()})&&this.otherwise.outputDefined()},Rc.prototype.serialize=function(){var s=["case"];return this.eachChild(function(l){s.push(l.serialize())}),s};var xl=function(s,l,f,v){this.type=s,this.input=l,this.beginIndex=f,this.endIndex=v};function bl(s,l){return s==="=="||s==="!="?l.kind==="boolean"||l.kind==="string"||l.kind==="number"||l.kind==="null"||l.kind==="value":l.kind==="string"||l.kind==="number"||l.kind==="value"}function Rf(s,l,f,v){return v.compare(l,f)===0}function jr(s,l,f){var v=s!=="=="&&s!=="!=";return function(){function b(w,I,A){this.type=Me,this.lhs=w,this.rhs=I,this.collator=A,this.hasUntypedArgument=w.type.kind==="value"||I.type.kind==="value"}return b.parse=function(w,I){if(w.length!==3&&w.length!==4)return I.error("Expected two or three arguments.");var A=w[0],F=I.parse(w[1],1,$e);if(!F)return null;if(!bl(A,F.type))return I.concat(1).error('"'+A+`" comparisons are not supported for type '`+tr(F.type)+"'.");var j=I.parse(w[2],2,$e);if(!j)return null;if(!bl(A,j.type))return I.concat(2).error('"'+A+`" comparisons are not supported for type '`+tr(j.type)+"'.");if(F.type.kind!==j.type.kind&&F.type.kind!=="value"&&j.type.kind!=="value")return I.error("Cannot compare types '"+tr(F.type)+"' and '"+tr(j.type)+"'.");v&&(F.type.kind==="value"&&j.type.kind!=="value"?F=new oi(j.type,[F]):F.type.kind!=="value"&&j.type.kind==="value"&&(j=new oi(F.type,[j])));var G=null;if(w.length===4){if(F.type.kind!=="string"&&j.type.kind!=="string"&&F.type.kind!=="value"&&j.type.kind!=="value")return I.error("Cannot use collator to compare non-string types.");if(!(G=I.parse(w[3],3,Qn)))return null}return new b(F,j,G)},b.prototype.evaluate=function(w){var I=this.lhs.evaluate(w),A=this.rhs.evaluate(w);if(v&&this.hasUntypedArgument){var F=Pi(I),j=Pi(A);if(F.kind!==j.kind||F.kind!=="string"&&F.kind!=="number")throw new Hi('Expected arguments for "'+s+'" to be (string, string) or (number, number), but found ('+F.kind+", "+j.kind+") instead.")}if(this.collator&&!v&&this.hasUntypedArgument){var G=Pi(I),H=Pi(A);if(G.kind!=="string"||H.kind!=="string")return l(w,I,A)}return this.collator?f(w,I,A,this.collator.evaluate(w)):l(w,I,A)},b.prototype.eachChild=function(w){w(this.lhs),w(this.rhs),this.collator&&w(this.collator)},b.prototype.outputDefined=function(){return!0},b.prototype.serialize=function(){var w=[s];return this.eachChild(function(I){w.push(I.serialize())}),w},b}()}xl.parse=function(s,l){if(s.length<=2||s.length>=5)return l.error("Expected 3 or 4 arguments, but found "+(s.length-1)+" instead.");var f=l.parse(s[1],1,$e),v=l.parse(s[2],2,re);if(!f||!v)return null;if(!Li(f.type,[hr($e),ze,$e]))return l.error("Expected first argument to be of type array or string, but found "+tr(f.type)+" instead");if(s.length===4){var b=l.parse(s[3],3,re);return b?new xl(f.type,f,v,b):null}return new xl(f.type,f,v)},xl.prototype.evaluate=function(s){var l=this.input.evaluate(s),f=this.beginIndex.evaluate(s);if(!kr(l,["string","array"]))throw new Hi("Expected first argument to be of type array or string, but found "+tr(Pi(l))+" instead.");if(this.endIndex){var v=this.endIndex.evaluate(s);return l.slice(f,v)}return l.slice(f)},xl.prototype.eachChild=function(s){s(this.input),s(this.beginIndex),this.endIndex&&s(this.endIndex)},xl.prototype.outputDefined=function(){return!1},xl.prototype.serialize=function(){if(this.endIndex!=null&&this.endIndex!==void 0){var s=this.endIndex.serialize();return["slice",this.input.serialize(),this.beginIndex.serialize(),s]}return["slice",this.input.serialize(),this.beginIndex.serialize()]};var di=jr("==",function(s,l,f){return l===f},Rf),Ho=jr("!=",function(s,l,f){return l!==f},function(s,l,f,v){return!Rf(0,l,f,v)}),ju=jr("<",function(s,l,f){return l<f},function(s,l,f,v){return v.compare(l,f)<0}),Oh=jr(">",function(s,l,f){return l>f},function(s,l,f,v){return v.compare(l,f)>0}),_u=jr("<=",function(s,l,f){return l<=f},function(s,l,f,v){return v.compare(l,f)<=0}),Ag=jr(">=",function(s,l,f){return l>=f},function(s,l,f,v){return v.compare(l,f)>=0}),qu=function(s,l,f,v,b){this.type=ze,this.number=s,this.locale=l,this.currency=f,this.minFractionDigits=v,this.maxFractionDigits=b};qu.parse=function(s,l){if(s.length!==3)return l.error("Expected two arguments.");var f=l.parse(s[1],1,re);if(!f)return null;var v=s[2];if(typeof v!="object"||Array.isArray(v))return l.error("NumberFormat options argument must be an object.");var b=null;if(v.locale&&!(b=l.parse(v.locale,1,ze)))return null;var w=null;if(v.currency&&!(w=l.parse(v.currency,1,ze)))return null;var I=null;if(v["min-fraction-digits"]&&!(I=l.parse(v["min-fraction-digits"],1,re)))return null;var A=null;return v["max-fraction-digits"]&&!(A=l.parse(v["max-fraction-digits"],1,re))?null:new qu(f,b,w,I,A)},qu.prototype.evaluate=function(s){return new Intl.NumberFormat(this.locale?this.locale.evaluate(s):[],{style:this.currency?"currency":"decimal",currency:this.currency?this.currency.evaluate(s):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(s):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(s):void 0}).format(this.number.evaluate(s))},qu.prototype.eachChild=function(s){s(this.number),this.locale&&s(this.locale),this.currency&&s(this.currency),this.minFractionDigits&&s(this.minFractionDigits),this.maxFractionDigits&&s(this.maxFractionDigits)},qu.prototype.outputDefined=function(){return!1},qu.prototype.serialize=function(){var s={};return this.locale&&(s.locale=this.locale.serialize()),this.currency&&(s.currency=this.currency.serialize()),this.minFractionDigits&&(s["min-fraction-digits"]=this.minFractionDigits.serialize()),this.maxFractionDigits&&(s["max-fraction-digits"]=this.maxFractionDigits.serialize()),["number-format",this.number.serialize(),s]};var $s=function(s){this.type=re,this.input=s};$s.parse=function(s,l){if(s.length!==2)return l.error("Expected 1 argument, but found "+(s.length-1)+" instead.");var f=l.parse(s[1],1);return f?f.type.kind!=="array"&&f.type.kind!=="string"&&f.type.kind!=="value"?l.error("Expected argument of type string or array, but found "+tr(f.type)+" instead."):new $s(f):null},$s.prototype.evaluate=function(s){var l=this.input.evaluate(s);if(typeof l=="string"||Array.isArray(l))return l.length;throw new Hi("Expected value to be of type string or array, but found "+tr(Pi(l))+" instead.")},$s.prototype.eachChild=function(s){s(this.input)},$s.prototype.outputDefined=function(){return!1},$s.prototype.serialize=function(){var s=["length"];return this.eachChild(function(l){s.push(l.serialize())}),s};var wl={"==":di,"!=":Ho,">":Oh,"<":ju,">=":Ag,"<=":_u,array:oi,at:$u,boolean:oi,case:Rc,coalesce:vu,collator:At,format:ls,image:Sa,in:io,"index-of":tc,interpolate:So,"interpolate-hcl":So,"interpolate-lab":So,length:$s,let:yu,literal:ro,match:ua,number:oi,"number-format":qu,object:oi,slice:xl,step:Ln,string:oi,"to-boolean":Wa,"to-color":Wa,"to-number":Wa,"to-string":Wa,var:Wo,within:Yn};function kf(s,l){var f=l[0],v=l[1],b=l[2],w=l[3];f=f.evaluate(s),v=v.evaluate(s),b=b.evaluate(s);var I=w?w.evaluate(s):1,A=Ps(f,v,b,I);if(A)throw new Hi(A);return new pr(f/255*I,v/255*I,b/255*I,I)}function kc(s,l){return s in l}function bd(s,l){var f=l[s];return f===void 0?null:f}function Sl(s){return{type:s}}function Ap(s){return{result:"success",value:s}}function js(s){return{result:"error",value:s}}function cs(s){return s["property-type"]==="data-driven"||s["property-type"]==="cross-faded-data-driven"}function wd(s){return!!s.expression&&s.expression.parameters.indexOf("zoom")>-1}function qs(s){return!!s.expression&&s.expression.interpolated}function ui(s){return s instanceof Number?"number":s instanceof String?"string":s instanceof Boolean?"boolean":Array.isArray(s)?"array":s===null?"null":typeof s}function Gs(s){return typeof s=="object"&&s!==null&&!Array.isArray(s)}function Lg(s){return s}function Dc(s,l,f){return s!==void 0?s:l!==void 0?l:f!==void 0?f:void 0}function Ca(s,l,f,v,b){return Dc(typeof f===b?v[f]:void 0,s.default,l.default)}function Rh(s,l,f){if(ui(f)!=="number")return Dc(s.default,l.default);var v=s.stops.length;if(v===1||f<=s.stops[0][0])return s.stops[0][1];if(f>=s.stops[v-1][0])return s.stops[v-1][1];var b=gr(s.stops.map(function(w){return w[0]}),f);return s.stops[b][1]}function Nc(s,l,f){var v=s.base!==void 0?s.base:1;if(ui(f)!=="number")return Dc(s.default,l.default);var b=s.stops.length;if(b===1||f<=s.stops[0][0])return s.stops[0][1];if(f>=s.stops[b-1][0])return s.stops[b-1][1];var w=gr(s.stops.map(function(H){return H[0]}),f),I=function(H,J,rt,dt){var _t=dt-rt,Pt=H-rt;return _t===0?0:J===1?Pt/_t:(Math.pow(J,Pt)-1)/(Math.pow(J,_t)-1)}(f,v,s.stops[w][0],s.stops[w+1][0]),A=s.stops[w][1],F=s.stops[w+1][1],j=Vu[l.type]||Lg;if(s.colorSpace&&s.colorSpace!=="rgb"){var G=xd[s.colorSpace];j=function(H,J){return G.reverse(G.interpolate(G.forward(H),G.forward(J),I))}}return typeof A.evaluate=="function"?{evaluate:function(){for(var H=[],J=arguments.length;J--;)H[J]=arguments[J];var rt=A.evaluate.apply(void 0,H),dt=F.evaluate.apply(void 0,H);if(rt!==void 0&&dt!==void 0)return j(rt,dt,I)}}:j(A,F,I)}function Df(s,l,f){return l.type==="color"?f=pr.parse(f):l.type==="formatted"?f=Qr.fromString(f.toString()):l.type==="resolvedImage"?f=mo.fromString(f.toString()):ui(f)===l.type||l.type==="enum"&&l.values[f]||(f=void 0),Dc(f,s.default,l.default)}Q.register(wl,{error:[{kind:"error"},[ze],function(s,l){throw new Hi(l[0].evaluate(s))}],typeof:[ze,[$e],function(s,l){return tr(Pi(l[0].evaluate(s)))}],"to-rgba":[hr(re,4),[Re],function(s,l){return l[0].evaluate(s).toArray()}],rgb:[Re,[re,re,re],kf],rgba:[Re,[re,re,re,re],kf],has:{type:Me,overloads:[[[ze],function(s,l){return kc(l[0].evaluate(s),s.properties())}],[[ze,Mn],function(s,l){var f=l[1];return kc(l[0].evaluate(s),f.evaluate(s))}]]},get:{type:$e,overloads:[[[ze],function(s,l){return bd(l[0].evaluate(s),s.properties())}],[[ze,Mn],function(s,l){var f=l[1];return bd(l[0].evaluate(s),f.evaluate(s))}]]},"feature-state":[$e,[ze],function(s,l){return bd(l[0].evaluate(s),s.featureState||{})}],properties:[Mn,[],function(s){return s.properties()}],"geometry-type":[ze,[],function(s){return s.geometryType()}],id:[$e,[],function(s){return s.id()}],zoom:[re,[],function(s){return s.globals.zoom}],"heatmap-density":[re,[],function(s){return s.globals.heatmapDensity||0}],"line-progress":[re,[],function(s){return s.globals.lineProgress||0}],accumulated:[$e,[],function(s){return s.globals.accumulated===void 0?null:s.globals.accumulated}],"+":[re,Sl(re),function(s,l){for(var f=0,v=0,b=l;v<b.length;v+=1)f+=b[v].evaluate(s);return f}],"*":[re,Sl(re),function(s,l){for(var f=1,v=0,b=l;v<b.length;v+=1)f*=b[v].evaluate(s);return f}],"-":{type:re,overloads:[[[re,re],function(s,l){var f=l[1];return l[0].evaluate(s)-f.evaluate(s)}],[[re],function(s,l){return-l[0].evaluate(s)}]]},"/":[re,[re,re],function(s,l){var f=l[1];return l[0].evaluate(s)/f.evaluate(s)}],"%":[re,[re,re],function(s,l){var f=l[1];return l[0].evaluate(s)%f.evaluate(s)}],ln2:[re,[],function(){return Math.LN2}],pi:[re,[],function(){return Math.PI}],e:[re,[],function(){return Math.E}],"^":[re,[re,re],function(s,l){var f=l[1];return Math.pow(l[0].evaluate(s),f.evaluate(s))}],sqrt:[re,[re],function(s,l){return Math.sqrt(l[0].evaluate(s))}],log10:[re,[re],function(s,l){return Math.log(l[0].evaluate(s))/Math.LN10}],ln:[re,[re],function(s,l){return Math.log(l[0].evaluate(s))}],log2:[re,[re],function(s,l){return Math.log(l[0].evaluate(s))/Math.LN2}],sin:[re,[re],function(s,l){return Math.sin(l[0].evaluate(s))}],cos:[re,[re],function(s,l){return Math.cos(l[0].evaluate(s))}],tan:[re,[re],function(s,l){return Math.tan(l[0].evaluate(s))}],asin:[re,[re],function(s,l){return Math.asin(l[0].evaluate(s))}],acos:[re,[re],function(s,l){return Math.acos(l[0].evaluate(s))}],atan:[re,[re],function(s,l){return Math.atan(l[0].evaluate(s))}],min:[re,Sl(re),function(s,l){return Math.min.apply(Math,l.map(function(f){return f.evaluate(s)}))}],max:[re,Sl(re),function(s,l){return Math.max.apply(Math,l.map(function(f){return f.evaluate(s)}))}],abs:[re,[re],function(s,l){return Math.abs(l[0].evaluate(s))}],round:[re,[re],function(s,l){var f=l[0].evaluate(s);return f<0?-Math.round(-f):Math.round(f)}],floor:[re,[re],function(s,l){return Math.floor(l[0].evaluate(s))}],ceil:[re,[re],function(s,l){return Math.ceil(l[0].evaluate(s))}],"filter-==":[Me,[ze,$e],function(s,l){var f=l[0],v=l[1];return s.properties()[f.value]===v.value}],"filter-id-==":[Me,[$e],function(s,l){var f=l[0];return s.id()===f.value}],"filter-type-==":[Me,[ze],function(s,l){var f=l[0];return s.geometryType()===f.value}],"filter-<":[Me,[ze,$e],function(s,l){var f=l[0],v=l[1],b=s.properties()[f.value],w=v.value;return typeof b==typeof w&&b<w}],"filter-id-<":[Me,[$e],function(s,l){var f=l[0],v=s.id(),b=f.value;return typeof v==typeof b&&v<b}],"filter->":[Me,[ze,$e],function(s,l){var f=l[0],v=l[1],b=s.properties()[f.value],w=v.value;return typeof b==typeof w&&b>w}],"filter-id->":[Me,[$e],function(s,l){var f=l[0],v=s.id(),b=f.value;return typeof v==typeof b&&v>b}],"filter-<=":[Me,[ze,$e],function(s,l){var f=l[0],v=l[1],b=s.properties()[f.value],w=v.value;return typeof b==typeof w&&b<=w}],"filter-id-<=":[Me,[$e],function(s,l){var f=l[0],v=s.id(),b=f.value;return typeof v==typeof b&&v<=b}],"filter->=":[Me,[ze,$e],function(s,l){var f=l[0],v=l[1],b=s.properties()[f.value],w=v.value;return typeof b==typeof w&&b>=w}],"filter-id->=":[Me,[$e],function(s,l){var f=l[0],v=s.id(),b=f.value;return typeof v==typeof b&&v>=b}],"filter-has":[Me,[$e],function(s,l){return l[0].value in s.properties()}],"filter-has-id":[Me,[],function(s){return s.id()!==null&&s.id()!==void 0}],"filter-type-in":[Me,[hr(ze)],function(s,l){return l[0].value.indexOf(s.geometryType())>=0}],"filter-id-in":[Me,[hr($e)],function(s,l){return l[0].value.indexOf(s.id())>=0}],"filter-in-small":[Me,[ze,hr($e)],function(s,l){var f=l[0];return l[1].value.indexOf(s.properties()[f.value])>=0}],"filter-in-large":[Me,[ze,hr($e)],function(s,l){var f=l[0],v=l[1];return function(b,w,I,A){for(;I<=A;){var F=I+A>>1;if(w[F]===b)return!0;w[F]>b?A=F-1:I=F+1}return!1}(s.properties()[f.value],v.value,0,v.value.length-1)}],all:{type:Me,overloads:[[[Me,Me],function(s,l){var f=l[1];return l[0].evaluate(s)&&f.evaluate(s)}],[Sl(Me),function(s,l){for(var f=0,v=l;f<v.length;f+=1)if(!v[f].evaluate(s))return!1;return!0}]]},any:{type:Me,overloads:[[[Me,Me],function(s,l){var f=l[1];return l[0].evaluate(s)||f.evaluate(s)}],[Sl(Me),function(s,l){for(var f=0,v=l;f<v.length;f+=1)if(v[f].evaluate(s))return!0;return!1}]]},"!":[Me,[Me],function(s,l){return!l[0].evaluate(s)}],"is-supported-script":[Me,[ze],function(s,l){var f=s.globals&&s.globals.isSupportedScript;return!f||f(l[0].evaluate(s))}],upcase:[ze,[ze],function(s,l){return l[0].evaluate(s).toUpperCase()}],downcase:[ze,[ze],function(s,l){return l[0].evaluate(s).toLowerCase()}],concat:[ze,Sl($e),function(s,l){return l.map(function(f){return _l(f.evaluate(s))}).join("")}],"resolved-locale":[ze,[Qn],function(s,l){return l[0].evaluate(s).resolvedLocale()}]});var ec=function(s,l){this.expression=s,this._warningHistory={},this._evaluator=new U,this._defaultValue=l?function(f){return f.type==="color"&&Gs(f.default)?new pr(0,0,0,0):f.type==="color"?pr.parse(f.default)||null:f.default===void 0?null:f.default}(l):null,this._enumValues=l&&l.type==="enum"?l.values:null};function El(s){return Array.isArray(s)&&s.length>0&&typeof s[0]=="string"&&s[0]in wl}function kh(s,l){var f=new er(wl,[],l?function(b){var w={color:Re,string:ze,number:re,enum:ze,boolean:Me,formatted:Rr,resolvedImage:wn};return b.type==="array"?hr(w[b.value]||$e,b.length):w[b.type]}(l):void 0),v=f.parse(s,void 0,void 0,void 0,l&&l.type==="string"?{typeAnnotation:"coerce"}:void 0);return v?Ap(new ec(v,l)):js(f.errors)}ec.prototype.evaluateWithoutErrorHandling=function(s,l,f,v,b,w){return this._evaluator.globals=s,this._evaluator.feature=l,this._evaluator.featureState=f,this._evaluator.canonical=v,this._evaluator.availableImages=b||null,this._evaluator.formattedSection=w,this.expression.evaluate(this._evaluator)},ec.prototype.evaluate=function(s,l,f,v,b,w){this._evaluator.globals=s,this._evaluator.feature=l||null,this._evaluator.featureState=f||null,this._evaluator.canonical=v,this._evaluator.availableImages=b||null,this._evaluator.formattedSection=w||null;try{var I=this.expression.evaluate(this._evaluator);if(I==null||typeof I=="number"&&I!=I)return this._defaultValue;if(this._enumValues&&!(I in this._enumValues))throw new Hi("Expected value to be one of "+Object.keys(this._enumValues).map(function(A){return JSON.stringify(A)}).join(", ")+", but found "+JSON.stringify(I)+" instead.");return I}catch(A){return this._warningHistory[A.message]||(this._warningHistory[A.message]=!0,typeof console!="undefined"&&console.warn(A.message)),this._defaultValue}};var Dh=function(s,l){this.kind=s,this._styleExpression=l,this.isStateDependent=s!=="constant"&&!fn(l.expression)};Dh.prototype.evaluateWithoutErrorHandling=function(s,l,f,v,b,w){return this._styleExpression.evaluateWithoutErrorHandling(s,l,f,v,b,w)},Dh.prototype.evaluate=function(s,l,f,v,b,w){return this._styleExpression.evaluate(s,l,f,v,b,w)};var Ut=function(s,l,f,v){this.kind=s,this.zoomStops=f,this._styleExpression=l,this.isStateDependent=s!=="camera"&&!fn(l.expression),this.interpolationType=v};function ce(s,l){if((s=kh(s,l)).result==="error")return s;var f=s.value.expression,v=$r(f);if(!v&&!cs(l))return js([new me("","data expressions not supported")]);var b=Ea(f,["zoom"]);if(!b&&!wd(l))return js([new me("","zoom expressions not supported")]);var w=function I(A){var F=null;if(A instanceof yu)F=I(A.result);else if(A instanceof vu)for(var j=0,G=A.args;j<G.length&&!(F=I(G[j]));j+=1);else(A instanceof Ln||A instanceof So)&&A.input instanceof Q&&A.input.name==="zoom"&&(F=A);return F instanceof me||A.eachChild(function(H){var J=I(H);J instanceof me?F=J:!F&&J?F=new me("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):F&&J&&F!==J&&(F=new me("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))}),F}(f);return w||b?w instanceof me?js([w]):w instanceof So&&!qs(l)?js([new me("",'"interpolate" expressions cannot be used with this property')]):Ap(w?new Ut(v?"camera":"composite",s.value,w.labels,w instanceof So?w.interpolation:void 0):new Dh(v?"constant":"source",s.value)):js([new me("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')])}Ut.prototype.evaluateWithoutErrorHandling=function(s,l,f,v,b,w){return this._styleExpression.evaluateWithoutErrorHandling(s,l,f,v,b,w)},Ut.prototype.evaluate=function(s,l,f,v,b,w){return this._styleExpression.evaluate(s,l,f,v,b,w)},Ut.prototype.interpolationFactor=function(s,l,f){return this.interpolationType?So.interpolationFactor(this.interpolationType,s,l,f):0};var Be=function(s,l){this._parameters=s,this._specification=l,pe(this,function f(v,b){var w,I,A,F=b.type==="color",j=v.stops&&typeof v.stops[0][0]=="object",G=j||!(j||v.property!==void 0),H=v.type||(qs(b)?"exponential":"interval");if(F&&((v=pe({},v)).stops&&(v.stops=v.stops.map(function(qe){return[qe[0],pr.parse(qe[1])]})),v.default=pr.parse(v.default?v.default:b.default)),v.colorSpace&&v.colorSpace!=="rgb"&&!xd[v.colorSpace])throw new Error("Unknown color space: "+v.colorSpace);if(H==="exponential")w=Nc;else if(H==="interval")w=Rh;else if(H==="categorical"){w=Ca,I=Object.create(null);for(var J=0,rt=v.stops;J<rt.length;J+=1){var dt=rt[J];I[dt[0]]=dt[1]}A=typeof v.stops[0][0]}else{if(H!=="identity")throw new Error('Unknown function type "'+H+'"');w=Df}if(j){for(var _t={},Pt=[],St=0;St<v.stops.length;St++){var Nt=v.stops[St],qt=Nt[0].zoom;_t[qt]===void 0&&(_t[qt]={zoom:qt,type:v.type,property:v.property,default:v.default,stops:[]},Pt.push(qt)),_t[qt].stops.push([Nt[0].value,Nt[1]])}for(var Zt=[],ee=0,fe=Pt;ee<fe.length;ee+=1){var Ee=fe[ee];Zt.push([_t[Ee].zoom,f(_t[Ee],b)])}var Oe={name:"linear"};return{kind:"composite",interpolationType:Oe,interpolationFactor:So.interpolationFactor.bind(void 0,Oe),zoomStops:Zt.map(function(qe){return qe[0]}),evaluate:function(qe,mn){var Ze=qe.zoom;return Nc({stops:Zt,base:v.base},b,Ze).evaluate(Ze,mn)}}}if(G){var hn=H==="exponential"?{name:"exponential",base:v.base!==void 0?v.base:1}:null;return{kind:"camera",interpolationType:hn,interpolationFactor:So.interpolationFactor.bind(void 0,hn),zoomStops:v.stops.map(function(qe){return qe[0]}),evaluate:function(qe){return w(v,b,qe.zoom,I,A)}}}return{kind:"source",evaluate:function(qe,mn){var Ze=mn&&mn.properties?mn.properties[v.property]:void 0;return Ze===void 0?Dc(v.default,b.default):w(v,b,Ze,I,A)}}}(this._parameters,this._specification))};function dn(s){var l=s.key,f=s.value,v=s.valueSpec||{},b=s.objectElementValidators||{},w=s.style,I=s.styleSpec,A=[],F=ui(f);if(F!=="object")return[new bt(l,f,"object expected, "+F+" found")];for(var j in f){var G=j.split(".")[0],H=v[G]||v["*"],J=void 0;if(b[G])J=b[G];else if(v[G])J=un;else if(b["*"])J=b["*"];else{if(!v["*"]){A.push(new bt(l,f[j],'unknown property "'+j+'"'));continue}J=un}A=A.concat(J({key:(l&&l+".")+j,value:f[j],valueSpec:H,style:w,styleSpec:I,object:f,objectKey:j},f))}for(var rt in v)b[rt]||v[rt].required&&v[rt].default===void 0&&f[rt]===void 0&&A.push(new bt(l,f,'missing required property "'+rt+'"'));return A}function Bi(s){var l=s.value,f=s.valueSpec,v=s.style,b=s.styleSpec,w=s.key,I=s.arrayElementValidator||un;if(ui(l)!=="array")return[new bt(w,l,"array expected, "+ui(l)+" found")];if(f.length&&l.length!==f.length)return[new bt(w,l,"array length "+f.length+" expected, length "+l.length+" found")];if(f["min-length"]&&l.length<f["min-length"])return[new bt(w,l,"array length at least "+f["min-length"]+" expected, length "+l.length+" found")];var A={type:f.value,values:f.values};b.$version<7&&(A.function=f.function),ui(f.value)==="object"&&(A=f.value);for(var F=[],j=0;j<l.length;j++)F=F.concat(I({array:l,arrayIndex:j,value:l[j],valueSpec:A,style:v,styleSpec:b,key:w+"["+j+"]"}));return F}function xr(s){var l=s.key,f=s.value,v=s.valueSpec,b=ui(f);return b==="number"&&f!=f&&(b="NaN"),b!=="number"?[new bt(l,f,"number expected, "+b+" found")]:"minimum"in v&&f<v.minimum?[new bt(l,f,f+" is less than the minimum value "+v.minimum)]:"maximum"in v&&f>v.maximum?[new bt(l,f,f+" is greater than the maximum value "+v.maximum)]:[]}function to(s){var l,f,v,b=s.valueSpec,w=ye(s.value.type),I={},A=w!=="categorical"&&s.value.property===void 0,F=!A,j=ui(s.value.stops)==="array"&&ui(s.value.stops[0])==="array"&&ui(s.value.stops[0][0])==="object",G=dn({key:s.key,value:s.value,valueSpec:s.styleSpec.function,style:s.style,styleSpec:s.styleSpec,objectElementValidators:{stops:function(rt){if(w==="identity")return[new bt(rt.key,rt.value,'identity function may not have a "stops" property')];var dt=[],_t=rt.value;return dt=dt.concat(Bi({key:rt.key,value:_t,valueSpec:rt.valueSpec,style:rt.style,styleSpec:rt.styleSpec,arrayElementValidator:H})),ui(_t)==="array"&&_t.length===0&&dt.push(new bt(rt.key,_t,"array must have at least one stop")),dt},default:function(rt){return un({key:rt.key,value:rt.value,valueSpec:b,style:rt.style,styleSpec:rt.styleSpec})}}});return w==="identity"&&A&&G.push(new bt(s.key,s.value,'missing required property "property"')),w==="identity"||s.value.stops||G.push(new bt(s.key,s.value,'missing required property "stops"')),w==="exponential"&&s.valueSpec.expression&&!qs(s.valueSpec)&&G.push(new bt(s.key,s.value,"exponential functions not supported")),s.styleSpec.$version>=8&&(F&&!cs(s.valueSpec)?G.push(new bt(s.key,s.value,"property functions not supported")):A&&!wd(s.valueSpec)&&G.push(new bt(s.key,s.value,"zoom functions not supported"))),w!=="categorical"&&!j||s.value.property!==void 0||G.push(new bt(s.key,s.value,'"property" property is required')),G;function H(rt){var dt=[],_t=rt.value,Pt=rt.key;if(ui(_t)!=="array")return[new bt(Pt,_t,"array expected, "+ui(_t)+" found")];if(_t.length!==2)return[new bt(Pt,_t,"array length 2 expected, length "+_t.length+" found")];if(j){if(ui(_t[0])!=="object")return[new bt(Pt,_t,"object expected, "+ui(_t[0])+" found")];if(_t[0].zoom===void 0)return[new bt(Pt,_t,"object stop key must have zoom")];if(_t[0].value===void 0)return[new bt(Pt,_t,"object stop key must have value")];if(v&&v>ye(_t[0].zoom))return[new bt(Pt,_t[0].zoom,"stop zoom values must appear in ascending order")];ye(_t[0].zoom)!==v&&(v=ye(_t[0].zoom),f=void 0,I={}),dt=dt.concat(dn({key:Pt+"[0]",value:_t[0],valueSpec:{zoom:{}},style:rt.style,styleSpec:rt.styleSpec,objectElementValidators:{zoom:xr,value:J}}))}else dt=dt.concat(J({key:Pt+"[0]",value:_t[0],valueSpec:{},style:rt.style,styleSpec:rt.styleSpec},_t));return El(Qt(_t[1]))?dt.concat([new bt(Pt+"[1]",_t[1],"expressions are not allowed in function stops.")]):dt.concat(un({key:Pt+"[1]",value:_t[1],valueSpec:b,style:rt.style,styleSpec:rt.styleSpec}))}function J(rt,dt){var _t=ui(rt.value),Pt=ye(rt.value),St=rt.value!==null?rt.value:dt;if(l){if(_t!==l)return[new bt(rt.key,St,_t+" stop domain type must match previous stop domain type "+l)]}else l=_t;if(_t!=="number"&&_t!=="string"&&_t!=="boolean")return[new bt(rt.key,St,"stop domain value must be a number, string, or boolean")];if(_t!=="number"&&w!=="categorical"){var Nt="number expected, "+_t+" found";return cs(b)&&w===void 0&&(Nt+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new bt(rt.key,St,Nt)]}return w!=="categorical"||_t!=="number"||isFinite(Pt)&&Math.floor(Pt)===Pt?w!=="categorical"&&_t==="number"&&f!==void 0&&Pt<f?[new bt(rt.key,St,"stop domain values must appear in ascending order")]:(f=Pt,w==="categorical"&&Pt in I?[new bt(rt.key,St,"stop domain values must be unique")]:(I[Pt]=!0,[])):[new bt(rt.key,St,"integer expected, found "+Pt)]}}function ti(s){var l=(s.expressionContext==="property"?ce:kh)(Qt(s.value),s.valueSpec);if(l.result==="error")return l.value.map(function(v){return new bt(""+s.key+v.key,s.value,v.message)});var f=l.value.expression||l.value._styleExpression.expression;if(s.expressionContext==="property"&&s.propertyKey==="text-font"&&!f.outputDefined())return[new bt(s.key,s.value,'Invalid data expression for "'+s.propertyKey+'". Output values must be contained as literals within the expression.')];if(s.expressionContext==="property"&&s.propertyType==="layout"&&!fn(f))return[new bt(s.key,s.value,'"feature-state" data expressions are not supported with layout properties.')];if(s.expressionContext==="filter"&&!fn(f))return[new bt(s.key,s.value,'"feature-state" data expressions are not supported with filters.')];if(s.expressionContext&&s.expressionContext.indexOf("cluster")===0){if(!Ea(f,["zoom","feature-state"]))return[new bt(s.key,s.value,'"zoom" and "feature-state" expressions are not supported with cluster properties.')];if(s.expressionContext==="cluster-initial"&&!$r(f))return[new bt(s.key,s.value,"Feature data expressions are not supported with initial expression part of cluster properties.")]}return[]}function la(s){var l=s.key,f=s.value,v=s.valueSpec,b=[];return Array.isArray(v.values)?v.values.indexOf(ye(f))===-1&&b.push(new bt(l,f,"expected one of ["+v.values.join(", ")+"], "+JSON.stringify(f)+" found")):Object.keys(v.values).indexOf(ye(f))===-1&&b.push(new bt(l,f,"expected one of ["+Object.keys(v.values).join(", ")+"], "+JSON.stringify(f)+" found")),b}function vo(s){if(s===!0||s===!1)return!0;if(!Array.isArray(s)||s.length===0)return!1;switch(s[0]){case"has":return s.length>=2&&s[1]!=="$id"&&s[1]!=="$type";case"in":return s.length>=3&&(typeof s[1]!="string"||Array.isArray(s[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return s.length!==3||Array.isArray(s[1])||Array.isArray(s[2]);case"any":case"all":for(var l=0,f=s.slice(1);l<f.length;l+=1){var v=f[l];if(!vo(v)&&typeof v!="boolean")return!1}return!0;default:return!0}}Be.deserialize=function(s){return new Be(s._parameters,s._specification)},Be.serialize=function(s){return{_parameters:s._parameters,_specification:s._specification}};var Eo={type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}};function Ts(s){if(s==null)return{filter:function(){return!0},needGeometry:!1};vo(s)||(s=Ti(s));var l=kh(s,Eo);if(l.result==="error")throw new Error(l.value.map(function(f){return f.key+": "+f.message}).join(", "));return{filter:function(f,v,b){return l.value.evaluate(f,v,{},b)},needGeometry:function f(v){if(!Array.isArray(v))return!1;if(v[0]==="within")return!0;for(var b=1;b<v.length;b++)if(f(v[b]))return!0;return!1}(s)}}function fs(s,l){return s<l?-1:s>l?1:0}function Ti(s){if(!s)return!0;var l,f=s[0];return s.length<=1?f!=="any":f==="=="?Ws(s[1],s[2],"=="):f==="!="?Cl(Ws(s[1],s[2],"==")):f==="<"||f===">"||f==="<="||f===">="?Ws(s[1],s[2],f):f==="any"?(l=s.slice(1),["any"].concat(l.map(Ti))):f==="all"?["all"].concat(s.slice(1).map(Ti)):f==="none"?["all"].concat(s.slice(1).map(Ti).map(Cl)):f==="in"?Fc(s[1],s.slice(2)):f==="!in"?Cl(Fc(s[1],s.slice(2))):f==="has"?Nh(s[1]):f==="!has"?Cl(Nh(s[1])):f!=="within"||s}function Ws(s,l,f){switch(s){case"$type":return["filter-type-"+f,l];case"$id":return["filter-id-"+f,l];default:return["filter-"+f,s,l]}}function Fc(s,l){if(l.length===0)return!1;switch(s){case"$type":return["filter-type-in",["literal",l]];case"$id":return["filter-id-in",["literal",l]];default:return l.length>200&&!l.some(function(f){return typeof f!=typeof l[0]})?["filter-in-large",s,["literal",l.sort(fs)]]:["filter-in-small",s,["literal",l]]}}function Nh(s){switch(s){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",s]}}function Cl(s){return["!",s]}function zc(s){return vo(Qt(s.value))?ti(pe({},s,{expressionContext:"filter",valueSpec:{value:"boolean"}})):function l(f){var v=f.value,b=f.key;if(ui(v)!=="array")return[new bt(b,v,"array expected, "+ui(v)+" found")];var w,I=f.styleSpec,A=[];if(v.length<1)return[new bt(b,v,"filter array must have at least 1 element")];switch(A=A.concat(la({key:b+"[0]",value:v[0],valueSpec:I.filter_operator,style:f.style,styleSpec:f.styleSpec})),ye(v[0])){case"<":case"<=":case">":case">=":v.length>=2&&ye(v[1])==="$type"&&A.push(new bt(b,v,'"$type" cannot be use with operator "'+v[0]+'"'));case"==":case"!=":v.length!==3&&A.push(new bt(b,v,'filter array for operator "'+v[0]+'" must have 3 elements'));case"in":case"!in":v.length>=2&&(w=ui(v[1]))!=="string"&&A.push(new bt(b+"[1]",v[1],"string expected, "+w+" found"));for(var F=2;F<v.length;F++)w=ui(v[F]),ye(v[1])==="$type"?A=A.concat(la({key:b+"["+F+"]",value:v[F],valueSpec:I.geometry_type,style:f.style,styleSpec:f.styleSpec})):w!=="string"&&w!=="number"&&w!=="boolean"&&A.push(new bt(b+"["+F+"]",v[F],"string, number, or boolean expected, "+w+" found"));break;case"any":case"all":case"none":for(var j=1;j<v.length;j++)A=A.concat(l({key:b+"["+j+"]",value:v[j],style:f.style,styleSpec:f.styleSpec}));break;case"has":case"!has":w=ui(v[1]),v.length!==2?A.push(new bt(b,v,'filter array for "'+v[0]+'" operator must have 2 elements')):w!=="string"&&A.push(new bt(b+"[1]",v[1],"string expected, "+w+" found"));break;case"within":w=ui(v[1]),v.length!==2?A.push(new bt(b,v,'filter array for "'+v[0]+'" operator must have 2 elements')):w!=="object"&&A.push(new bt(b+"[1]",v[1],"object expected, "+w+" found"))}return A}(s)}function Lp(s,l){var f=s.key,v=s.style,b=s.styleSpec,w=s.value,I=s.objectKey,A=b[l+"_"+s.layerType];if(!A)return[];var F=I.match(/^(.*)-transition$/);if(l==="paint"&&F&&A[F[1]]&&A[F[1]].transition)return un({key:f,value:w,valueSpec:b.transition,style:v,styleSpec:b});var j,G=s.valueSpec||A[I];if(!G)return[new bt(f,w,'unknown property "'+I+'"')];if(ui(w)==="string"&&cs(G)&&!G.tokens&&(j=/^{([^}]+)}$/.exec(w)))return[new bt(f,w,'"'+I+'" does not support interpolation syntax\nUse an identity property function instead: `{ "type": "identity", "property": '+JSON.stringify(j[1])+" }`.")];var H=[];return s.layerType==="symbol"&&(I==="text-field"&&v&&!v.glyphs&&H.push(new bt(f,w,'use of "text-field" requires a style "glyphs" property')),I==="text-font"&&Gs(Qt(w))&&ye(w.type)==="identity"&&H.push(new bt(f,w,'"text-font" does not support identity functions'))),H.concat(un({key:s.key,value:w,valueSpec:G,style:v,styleSpec:b,expressionContext:"property",propertyType:l,propertyKey:I}))}function nc(s){return Lp(s,"paint")}function $t(s){return Lp(s,"layout")}function oe(s){var l=[],f=s.value,v=s.key,b=s.style,w=s.styleSpec;f.type||f.ref||l.push(new bt(v,f,'either "type" or "ref" is required'));var I,A=ye(f.type),F=ye(f.ref);if(f.id)for(var j=ye(f.id),G=0;G<s.arrayIndex;G++){var H=b.layers[G];ye(H.id)===j&&l.push(new bt(v,f.id,'duplicate layer id "'+f.id+'", previously used at line '+H.id.__line__))}if("ref"in f)["type","source","source-layer","filter","layout"].forEach(function(dt){dt in f&&l.push(new bt(v,f[dt],'"'+dt+'" is prohibited for ref layers'))}),b.layers.forEach(function(dt){ye(dt.id)===F&&(I=dt)}),I?I.ref?l.push(new bt(v,f.ref,"ref cannot reference another ref layer")):A=ye(I.type):l.push(new bt(v,f.ref,'ref layer "'+F+'" not found'));else if(A!=="background")if(f.source){var J=b.sources&&b.sources[f.source],rt=J&&ye(J.type);J?rt==="vector"&&A==="raster"?l.push(new bt(v,f.source,'layer "'+f.id+'" requires a raster source')):rt==="raster"&&A!=="raster"?l.push(new bt(v,f.source,'layer "'+f.id+'" requires a vector source')):rt!=="vector"||f["source-layer"]?rt==="raster-dem"&&A!=="hillshade"?l.push(new bt(v,f.source,"raster-dem source can only be used with layer type 'hillshade'.")):A!=="line"||!f.paint||!f.paint["line-gradient"]||rt==="geojson"&&J.lineMetrics||l.push(new bt(v,f,'layer "'+f.id+'" specifies a line-gradient, which requires a GeoJSON source with `lineMetrics` enabled.')):l.push(new bt(v,f,'layer "'+f.id+'" must specify a "source-layer"')):l.push(new bt(v,f.source,'source "'+f.source+'" not found'))}else l.push(new bt(v,f,'missing required property "source"'));return l=l.concat(dn({key:v,value:f,valueSpec:w.layer,style:s.style,styleSpec:s.styleSpec,objectElementValidators:{"*":function(){return[]},type:function(){return un({key:v+".type",value:f.type,valueSpec:w.layer.type,style:s.style,styleSpec:s.styleSpec,object:f,objectKey:"type"})},filter:zc,layout:function(dt){return dn({layer:f,key:dt.key,value:dt.value,style:dt.style,styleSpec:dt.styleSpec,objectElementValidators:{"*":function(_t){return $t(pe({layerType:A},_t))}}})},paint:function(dt){return dn({layer:f,key:dt.key,value:dt.value,style:dt.style,styleSpec:dt.styleSpec,objectElementValidators:{"*":function(_t){return nc(pe({layerType:A},_t))}}})}}}))}function Gt(s){var l=s.value,f=s.key,v=ui(l);return v!=="string"?[new bt(f,l,"string expected, "+v+" found")]:[]}var Le={promoteId:function(s){var l=s.key,f=s.value;if(ui(f)==="string")return Gt({key:l,value:f});var v=[];for(var b in f)v.push.apply(v,Gt({key:l+"."+b,value:f[b]}));return v}};function kn(s){var l=s.value,f=s.key,v=s.styleSpec,b=s.style;if(!l.type)return[new bt(f,l,'"type" is required')];var w,I=ye(l.type);switch(I){case"vector":case"raster":case"raster-dem":return dn({key:f,value:l,valueSpec:v["source_"+I.replace("-","_")],style:s.style,styleSpec:v,objectElementValidators:Le});case"geojson":if(w=dn({key:f,value:l,valueSpec:v.source_geojson,style:b,styleSpec:v,objectElementValidators:Le}),l.cluster)for(var A in l.clusterProperties){var F=l.clusterProperties[A],j=F[0],G=typeof j=="string"?[j,["accumulated"],["get",A]]:j;w.push.apply(w,ti({key:f+"."+A+".map",value:F[1],expressionContext:"cluster-map"})),w.push.apply(w,ti({key:f+"."+A+".reduce",value:G,expressionContext:"cluster-reduce"}))}return w;case"video":return dn({key:f,value:l,valueSpec:v.source_video,style:b,styleSpec:v});case"image":return dn({key:f,value:l,valueSpec:v.source_image,style:b,styleSpec:v});case"canvas":return[new bt(f,null,"Please use runtime APIs to add canvas sources, rather than including them in stylesheets.","source.canvas")];default:return la({key:f+".type",value:l.type,valueSpec:{values:["vector","raster","raster-dem","geojson","video","image"]},style:b,styleSpec:v})}}function br(s){var l=s.value,f=s.styleSpec,v=f.light,b=s.style,w=[],I=ui(l);if(l===void 0)return w;if(I!=="object")return w.concat([new bt("light",l,"object expected, "+I+" found")]);for(var A in l){var F=A.match(/^(.*)-transition$/);w=w.concat(F&&v[F[1]]&&v[F[1]].transition?un({key:A,value:l[A],valueSpec:f.transition,style:b,styleSpec:f}):v[A]?un({key:A,value:l[A],valueSpec:v[A],style:b,styleSpec:f}):[new bt(A,l[A],'unknown property "'+A+'"')])}return w}var Lr={"*":function(){return[]},array:Bi,boolean:function(s){var l=s.value,f=s.key,v=ui(l);return v!=="boolean"?[new bt(f,l,"boolean expected, "+v+" found")]:[]},number:xr,color:function(s){var l=s.key,f=s.value,v=ui(f);return v!=="string"?[new bt(l,f,"color expected, "+v+" found")]:xn(f)===null?[new bt(l,f,'color expected, "'+f+'" found')]:[]},constants:Vt,enum:la,filter:zc,function:to,layer:oe,object:dn,source:kn,light:br,string:Gt,formatted:function(s){return Gt(s).length===0?[]:ti(s)},resolvedImage:function(s){return Gt(s).length===0?[]:ti(s)}};function un(s){var l=s.value,f=s.valueSpec,v=s.styleSpec;return f.expression&&Gs(ye(l))?to(s):f.expression&&El(Qt(l))?ti(s):f.type&&Lr[f.type]?Lr[f.type](s):dn(pe({},s,{valueSpec:f.type?v[f.type]:f}))}function Cr(s){var l=s.value,f=s.key,v=Gt(s);return v.length||(l.indexOf("{fontstack}")===-1&&v.push(new bt(f,l,'"glyphs" url must include a "{fontstack}" token')),l.indexOf("{range}")===-1&&v.push(new bt(f,l,'"glyphs" url must include a "{range}" token'))),v}function Ia(s,l){l===void 0&&(l=at);var f=[];return f=f.concat(un({key:"",value:s,valueSpec:l.$root,styleSpec:l,style:s,objectElementValidators:{glyphs:Cr,"*":function(){return[]}}})),s.constants&&(f=f.concat(Vt({key:"constants",value:s.constants,style:s,styleSpec:l}))),Xo(f)}function Xo(s){return[].concat(s).sort(function(l,f){return l.line-f.line})}function hs(s){return function(){for(var l=[],f=arguments.length;f--;)l[f]=arguments[f];return Xo(s.apply(this,l))}}Ia.source=hs(kn),Ia.light=hs(br),Ia.layer=hs(oe),Ia.filter=hs(zc),Ia.paintProperty=hs(nc),Ia.layoutProperty=hs($t);var Hs=Ia,Bc=Hs.light,Uc=Hs.paintProperty,Gu=Hs.layoutProperty;function Dr(s,l){var f=!1;if(l&&l.length)for(var v=0,b=l;v<b.length;v+=1)s.fire(new Mt(new Error(b[v].message))),f=!0;return f}var Xs=oo;function oo(s,l,f){var v=this.cells=[];if(s instanceof ArrayBuffer){this.arrayBuffer=s;var b=new Int32Array(this.arrayBuffer);s=b[0],this.d=(l=b[1])+2*(f=b[2]);for(var w=0;w<this.d*this.d;w++){var I=b[3+w],A=b[3+w+1];v.push(I===A?null:b.subarray(I,A))}var F=b[3+v.length+1];this.keys=b.subarray(b[3+v.length],F),this.bboxes=b.subarray(F),this.insert=this._insertReadonly}else{this.d=l+2*f;for(var j=0;j<this.d*this.d;j++)v.push([]);this.keys=[],this.bboxes=[]}this.n=l,this.extent=s,this.padding=f,this.scale=l/s,this.uid=0;var G=f/l*s;this.min=-G,this.max=s+G}oo.prototype.insert=function(s,l,f,v,b){this._forEachCell(l,f,v,b,this._insertCell,this.uid++),this.keys.push(s),this.bboxes.push(l),this.bboxes.push(f),this.bboxes.push(v),this.bboxes.push(b)},oo.prototype._insertReadonly=function(){throw"Cannot insert into a GridIndex created from an ArrayBuffer."},oo.prototype._insertCell=function(s,l,f,v,b,w){this.cells[b].push(w)},oo.prototype.query=function(s,l,f,v,b){var w=this.min,I=this.max;if(s<=w&&l<=w&&I<=f&&I<=v&&!b)return Array.prototype.slice.call(this.keys);var A=[];return this._forEachCell(s,l,f,v,this._queryCell,A,{},b),A},oo.prototype._queryCell=function(s,l,f,v,b,w,I,A){var F=this.cells[b];if(F!==null)for(var j=this.keys,G=this.bboxes,H=0;H<F.length;H++){var J=F[H];if(I[J]===void 0){var rt=4*J;(A?A(G[rt+0],G[rt+1],G[rt+2],G[rt+3]):s<=G[rt+2]&&l<=G[rt+3]&&f>=G[rt+0]&&v>=G[rt+1])?(I[J]=!0,w.push(j[J])):I[J]=!1}}},oo.prototype._forEachCell=function(s,l,f,v,b,w,I,A){for(var F=this._convertToCellCoord(s),j=this._convertToCellCoord(l),G=this._convertToCellCoord(f),H=this._convertToCellCoord(v),J=F;J<=G;J++)for(var rt=j;rt<=H;rt++){var dt=this.d*rt+J;if((!A||A(this._convertFromCellCoord(J),this._convertFromCellCoord(rt),this._convertFromCellCoord(J+1),this._convertFromCellCoord(rt+1)))&&b.call(this,s,l,f,v,dt,w,I,A))return}},oo.prototype._convertFromCellCoord=function(s){return(s-this.padding)/this.scale},oo.prototype._convertToCellCoord=function(s){return Math.max(0,Math.min(this.d-1,Math.floor(s*this.scale)+this.padding))},oo.prototype.toArrayBuffer=function(){if(this.arrayBuffer)return this.arrayBuffer;for(var s=this.cells,l=3+this.cells.length+1+1,f=0,v=0;v<this.cells.length;v++)f+=this.cells[v].length;var b=new Int32Array(l+f+this.keys.length+this.bboxes.length);b[0]=this.extent,b[1]=this.n,b[2]=this.padding;for(var w=l,I=0;I<s.length;I++){var A=s[I];b[3+I]=w,b.set(A,w),w+=A.length}return b[3+s.length]=w,b.set(this.keys,w),b[3+s.length+1]=w+=this.keys.length,b.set(this.bboxes,w),w+=this.bboxes.length,b.buffer};var xu=C.ImageData,Fh=C.ImageBitmap,Lo={};function nn(s,l,f){f===void 0&&(f={}),Object.defineProperty(l,"_classRegistryKey",{value:s,writeable:!1}),Lo[s]={klass:l,omit:f.omit||[],shallow:f.shallow||[]}}for(var Ha in nn("Object",Object),Xs.serialize=function(s,l){var f=s.toArrayBuffer();return l&&l.push(f),{buffer:f}},Xs.deserialize=function(s){return new Xs(s.buffer)},nn("Grid",Xs),nn("Color",pr),nn("Error",Error),nn("ResolvedImage",mo),nn("StylePropertyFunction",Be),nn("StyleExpression",ec,{omit:["_evaluator"]}),nn("ZoomDependentExpression",Ut),nn("ZoomConstantExpression",Dh),nn("CompoundExpression",Q,{omit:["_evaluate"]}),wl)wl[Ha]._classRegistryKey||nn("Expression_"+Ha,wl[Ha]);function Il(s){return s&&typeof ArrayBuffer!="undefined"&&(s instanceof ArrayBuffer||s.constructor&&s.constructor.name==="ArrayBuffer")}function Vc(s){return Fh&&s instanceof Fh}function Wu(s,l){if(s==null||typeof s=="boolean"||typeof s=="number"||typeof s=="string"||s instanceof Boolean||s instanceof Number||s instanceof String||s instanceof Date||s instanceof RegExp)return s;if(Il(s)||Vc(s))return l&&l.push(s),s;if(ArrayBuffer.isView(s)){var f=s;return l&&l.push(f.buffer),f}if(s instanceof xu)return l&&l.push(s.data.buffer),s;if(Array.isArray(s)){for(var v=[],b=0,w=s;b<w.length;b+=1)v.push(Wu(w[b],l));return v}if(typeof s=="object"){var I=s.constructor,A=I._classRegistryKey;if(!A)throw new Error("can't serialize object of unregistered class");var F=I.serialize?I.serialize(s,l):{};if(!I.serialize){for(var j in s)if(s.hasOwnProperty(j)&&!(Lo[A].omit.indexOf(j)>=0)){var G=s[j];F[j]=Lo[A].shallow.indexOf(j)>=0?G:Wu(G,l)}s instanceof Error&&(F.message=s.message)}if(F.$name)throw new Error("$name property is reserved for worker serialization logic.");return A!=="Object"&&(F.$name=A),F}throw new Error("can't serialize object of type "+typeof s)}function Xa(s){if(s==null||typeof s=="boolean"||typeof s=="number"||typeof s=="string"||s instanceof Boolean||s instanceof Number||s instanceof String||s instanceof Date||s instanceof RegExp||Il(s)||Vc(s)||ArrayBuffer.isView(s)||s instanceof xu)return s;if(Array.isArray(s))return s.map(Xa);if(typeof s=="object"){var l=s.$name||"Object",f=Lo[l].klass;if(!f)throw new Error("can't deserialize unregistered class "+l);if(f.deserialize)return f.deserialize(s);for(var v=Object.create(f.prototype),b=0,w=Object.keys(s);b<w.length;b+=1){var I=w[b];if(I!=="$name"){var A=s[I];v[I]=Lo[l].shallow.indexOf(I)>=0?A:Xa(A)}}return v}throw new Error("can't deserialize object of type "+typeof s)}var Og=function(){this.first=!0};Og.prototype.update=function(s,l){var f=Math.floor(s);return this.first?(this.first=!1,this.lastIntegerZoom=f,this.lastIntegerZoomTime=0,this.lastZoom=s,this.lastFloorZoom=f,!0):(this.lastFloorZoom>f?(this.lastIntegerZoom=f+1,this.lastIntegerZoomTime=l):this.lastFloorZoom<f&&(this.lastIntegerZoom=f,this.lastIntegerZoomTime=l),s!==this.lastZoom&&(this.lastZoom=s,this.lastFloorZoom=f,!0))};var Fe={"Latin-1 Supplement":function(s){return s>=128&&s<=255},Arabic:function(s){return s>=1536&&s<=1791},"Arabic Supplement":function(s){return s>=1872&&s<=1919},"Arabic Extended-A":function(s){return s>=2208&&s<=2303},"Hangul Jamo":function(s){return s>=4352&&s<=4607},"Unified Canadian Aboriginal Syllabics":function(s){return s>=5120&&s<=5759},Khmer:function(s){return s>=6016&&s<=6143},"Unified Canadian Aboriginal Syllabics Extended":function(s){return s>=6320&&s<=6399},"General Punctuation":function(s){return s>=8192&&s<=8303},"Letterlike Symbols":function(s){return s>=8448&&s<=8527},"Number Forms":function(s){return s>=8528&&s<=8591},"Miscellaneous Technical":function(s){return s>=8960&&s<=9215},"Control Pictures":function(s){return s>=9216&&s<=9279},"Optical Character Recognition":function(s){return s>=9280&&s<=9311},"Enclosed Alphanumerics":function(s){return s>=9312&&s<=9471},"Geometric Shapes":function(s){return s>=9632&&s<=9727},"Miscellaneous Symbols":function(s){return s>=9728&&s<=9983},"Miscellaneous Symbols and Arrows":function(s){return s>=11008&&s<=11263},"CJK Radicals Supplement":function(s){return s>=11904&&s<=12031},"Kangxi Radicals":function(s){return s>=12032&&s<=12255},"Ideographic Description Characters":function(s){return s>=12272&&s<=12287},"CJK Symbols and Punctuation":function(s){return s>=12288&&s<=12351},Hiragana:function(s){return s>=12352&&s<=12447},Katakana:function(s){return s>=12448&&s<=12543},Bopomofo:function(s){return s>=12544&&s<=12591},"Hangul Compatibility Jamo":function(s){return s>=12592&&s<=12687},Kanbun:function(s){return s>=12688&&s<=12703},"Bopomofo Extended":function(s){return s>=12704&&s<=12735},"CJK Strokes":function(s){return s>=12736&&s<=12783},"Katakana Phonetic Extensions":function(s){return s>=12784&&s<=12799},"Enclosed CJK Letters and Months":function(s){return s>=12800&&s<=13055},"CJK Compatibility":function(s){return s>=13056&&s<=13311},"CJK Unified Ideographs Extension A":function(s){return s>=13312&&s<=19903},"Yijing Hexagram Symbols":function(s){return s>=19904&&s<=19967},"CJK Unified Ideographs":function(s){return s>=19968&&s<=40959},"Yi Syllables":function(s){return s>=40960&&s<=42127},"Yi Radicals":function(s){return s>=42128&&s<=42191},"Hangul Jamo Extended-A":function(s){return s>=43360&&s<=43391},"Hangul Syllables":function(s){return s>=44032&&s<=55215},"Hangul Jamo Extended-B":function(s){return s>=55216&&s<=55295},"Private Use Area":function(s){return s>=57344&&s<=63743},"CJK Compatibility Ideographs":function(s){return s>=63744&&s<=64255},"Arabic Presentation Forms-A":function(s){return s>=64336&&s<=65023},"Vertical Forms":function(s){return s>=65040&&s<=65055},"CJK Compatibility Forms":function(s){return s>=65072&&s<=65103},"Small Form Variants":function(s){return s>=65104&&s<=65135},"Arabic Presentation Forms-B":function(s){return s>=65136&&s<=65279},"Halfwidth and Fullwidth Forms":function(s){return s>=65280&&s<=65519}};function Op(s){for(var l=0,f=s;l<f.length;l+=1)if(Sd(f[l].charCodeAt(0)))return!0;return!1}function Sd(s){return!(s!==746&&s!==747&&(s<4352||!(Fe["Bopomofo Extended"](s)||Fe.Bopomofo(s)||Fe["CJK Compatibility Forms"](s)&&!(s>=65097&&s<=65103)||Fe["CJK Compatibility Ideographs"](s)||Fe["CJK Compatibility"](s)||Fe["CJK Radicals Supplement"](s)||Fe["CJK Strokes"](s)||!(!Fe["CJK Symbols and Punctuation"](s)||s>=12296&&s<=12305||s>=12308&&s<=12319||s===12336)||Fe["CJK Unified Ideographs Extension A"](s)||Fe["CJK Unified Ideographs"](s)||Fe["Enclosed CJK Letters and Months"](s)||Fe["Hangul Compatibility Jamo"](s)||Fe["Hangul Jamo Extended-A"](s)||Fe["Hangul Jamo Extended-B"](s)||Fe["Hangul Jamo"](s)||Fe["Hangul Syllables"](s)||Fe.Hiragana(s)||Fe["Ideographic Description Characters"](s)||Fe.Kanbun(s)||Fe["Kangxi Radicals"](s)||Fe["Katakana Phonetic Extensions"](s)||Fe.Katakana(s)&&s!==12540||!(!Fe["Halfwidth and Fullwidth Forms"](s)||s===65288||s===65289||s===65293||s>=65306&&s<=65310||s===65339||s===65341||s===65343||s>=65371&&s<=65503||s===65507||s>=65512&&s<=65519)||!(!Fe["Small Form Variants"](s)||s>=65112&&s<=65118||s>=65123&&s<=65126)||Fe["Unified Canadian Aboriginal Syllabics"](s)||Fe["Unified Canadian Aboriginal Syllabics Extended"](s)||Fe["Vertical Forms"](s)||Fe["Yijing Hexagram Symbols"](s)||Fe["Yi Syllables"](s)||Fe["Yi Radicals"](s))))}function zh(s){return!(Sd(s)||function(l){return!!(Fe["Latin-1 Supplement"](l)&&(l===167||l===169||l===174||l===177||l===188||l===189||l===190||l===215||l===247)||Fe["General Punctuation"](l)&&(l===8214||l===8224||l===8225||l===8240||l===8241||l===8251||l===8252||l===8258||l===8263||l===8264||l===8265||l===8273)||Fe["Letterlike Symbols"](l)||Fe["Number Forms"](l)||Fe["Miscellaneous Technical"](l)&&(l>=8960&&l<=8967||l>=8972&&l<=8991||l>=8996&&l<=9e3||l===9003||l>=9085&&l<=9114||l>=9150&&l<=9165||l===9167||l>=9169&&l<=9179||l>=9186&&l<=9215)||Fe["Control Pictures"](l)&&l!==9251||Fe["Optical Character Recognition"](l)||Fe["Enclosed Alphanumerics"](l)||Fe["Geometric Shapes"](l)||Fe["Miscellaneous Symbols"](l)&&!(l>=9754&&l<=9759)||Fe["Miscellaneous Symbols and Arrows"](l)&&(l>=11026&&l<=11055||l>=11088&&l<=11097||l>=11192&&l<=11243)||Fe["CJK Symbols and Punctuation"](l)||Fe.Katakana(l)||Fe["Private Use Area"](l)||Fe["CJK Compatibility Forms"](l)||Fe["Small Form Variants"](l)||Fe["Halfwidth and Fullwidth Forms"](l)||l===8734||l===8756||l===8757||l>=9984&&l<=10087||l>=10102&&l<=10131||l===65532||l===65533)}(s))}function za(s){return s>=1424&&s<=2303||Fe["Arabic Presentation Forms-A"](s)||Fe["Arabic Presentation Forms-B"](s)}function Ya(s,l){return!(!l&&za(s)||s>=2304&&s<=3583||s>=3840&&s<=4255||Fe.Khmer(s))}function Rg(s){for(var l=0,f=s;l<f.length;l+=1)if(za(f[l].charCodeAt(0)))return!0;return!1}var kg=null,Ys="unavailable",Hu=null,Ed=function(s){s&&typeof s=="string"&&s.indexOf("NetworkError")>-1&&(Ys="error"),kg&&kg(s)};function Bh(){av.fire(new vt("pluginStateChange",{pluginStatus:Ys,pluginURL:Hu}))}var av=new Rt,Dg=function(){return Ys},Pl=function(){if(Ys!=="deferred"||!Hu)throw new Error("rtl-text-plugin cannot be downloaded unless a pluginURL is specified");Ys="loading",Bh(),Hu&&Yl({url:Hu},function(s){s?Ed(s):(Ys="loaded",Bh())})},bu={applyArabicShaping:null,processBidirectionalText:null,processStyledBidirectionalText:null,isLoaded:function(){return Ys==="loaded"||bu.applyArabicShaping!=null},isLoading:function(){return Ys==="loading"},setState:function(s){Ys=s.pluginStatus,Hu=s.pluginURL},isParsed:function(){return bu.applyArabicShaping!=null&&bu.processBidirectionalText!=null&&bu.processStyledBidirectionalText!=null},getPluginURL:function(){return Hu}},Sn=function(s,l){this.zoom=s,l?(this.now=l.now,this.fadeDuration=l.fadeDuration,this.zoomHistory=l.zoomHistory,this.transition=l.transition):(this.now=0,this.fadeDuration=0,this.zoomHistory=new Og,this.transition={})};Sn.prototype.isSupportedScript=function(s){return function(l,f){for(var v=0,b=l;v<b.length;v+=1)if(!Ya(b[v].charCodeAt(0),f))return!1;return!0}(s,bu.isLoaded())},Sn.prototype.crossFadingFactor=function(){return this.fadeDuration===0?1:Math.min((this.now-this.zoomHistory.lastIntegerZoomTime)/this.fadeDuration,1)},Sn.prototype.getCrossfadeParameters=function(){var s=this.zoom,l=s-Math.floor(s),f=this.crossFadingFactor();return s>this.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:l+(1-l)*f}:{fromScale:.5,toScale:1,t:1-(1-f)*l}};var ao=function(s,l){this.property=s,this.value=l,this.expression=function(f,v){if(Gs(f))return new Be(f,v);if(El(f)){var b=ce(f,v);if(b.result==="error")throw new Error(b.value.map(function(I){return I.key+": "+I.message}).join(", "));return b.value}var w=f;return typeof f=="string"&&v.type==="color"&&(w=pr.parse(f)),{kind:"constant",evaluate:function(){return w}}}(l===void 0?s.specification.default:l,s.specification)};ao.prototype.isDataDriven=function(){return this.expression.kind==="source"||this.expression.kind==="composite"},ao.prototype.possiblyEvaluate=function(s,l,f){return this.property.possiblyEvaluate(this,s,l,f)};var Xu=function(s){this.property=s,this.value=new ao(s,void 0)};Xu.prototype.transitioned=function(s,l){return new Nf(this.property,this.value,l,k({},s.transition,this.transition),s.now)},Xu.prototype.untransitioned=function(){return new Nf(this.property,this.value,null,{},0)};var Ba=function(s){this._properties=s,this._values=Object.create(s.defaultTransitionablePropertyValues)};Ba.prototype.getValue=function(s){return _e(this._values[s].value.value)},Ba.prototype.setValue=function(s,l){this._values.hasOwnProperty(s)||(this._values[s]=new Xu(this._values[s].property)),this._values[s].value=new ao(this._values[s].property,l===null?void 0:_e(l))},Ba.prototype.getTransition=function(s){return _e(this._values[s].transition)},Ba.prototype.setTransition=function(s,l){this._values.hasOwnProperty(s)||(this._values[s]=new Xu(this._values[s].property)),this._values[s].transition=_e(l)||void 0},Ba.prototype.serialize=function(){for(var s={},l=0,f=Object.keys(this._values);l<f.length;l+=1){var v=f[l],b=this.getValue(v);b!==void 0&&(s[v]=b);var w=this.getTransition(v);w!==void 0&&(s[v+"-transition"]=w)}return s},Ba.prototype.transitioned=function(s,l){for(var f=new Ff(this._properties),v=0,b=Object.keys(this._values);v<b.length;v+=1){var w=b[v];f._values[w]=this._values[w].transitioned(s,l._values[w])}return f},Ba.prototype.untransitioned=function(){for(var s=new Ff(this._properties),l=0,f=Object.keys(this._values);l<f.length;l+=1){var v=f[l];s._values[v]=this._values[v].untransitioned()}return s};var Nf=function(s,l,f,v,b){this.property=s,this.value=l,this.begin=b+v.delay||0,this.end=this.begin+v.duration||0,s.specification.transition&&(v.delay||v.duration)&&(this.prior=f)};Nf.prototype.possiblyEvaluate=function(s,l,f){var v=s.now||0,b=this.value.possiblyEvaluate(s,l,f),w=this.prior;if(w){if(v>this.end)return this.prior=null,b;if(this.value.isDataDriven())return this.prior=null,b;if(v<this.begin)return w.possiblyEvaluate(s,l,f);var I=(v-this.begin)/(this.end-this.begin);return this.property.interpolate(w.possiblyEvaluate(s,l,f),b,function(A){if(A<=0)return 0;if(A>=1)return 1;var F=A*A,j=F*A;return 4*(A<.5?j:3*(A-F)+j-.75)}(I))}return b};var Ff=function(s){this._properties=s,this._values=Object.create(s.defaultTransitioningPropertyValues)};Ff.prototype.possiblyEvaluate=function(s,l,f){for(var v=new Uh(this._properties),b=0,w=Object.keys(this._values);b<w.length;b+=1){var I=w[b];v._values[I]=this._values[I].possiblyEvaluate(s,l,f)}return v},Ff.prototype.hasTransition=function(){for(var s=0,l=Object.keys(this._values);s<l.length;s+=1)if(this._values[l[s]].prior)return!0;return!1};var wu=function(s){this._properties=s,this._values=Object.create(s.defaultPropertyValues)};wu.prototype.getValue=function(s){return _e(this._values[s].value)},wu.prototype.setValue=function(s,l){this._values[s]=new ao(this._values[s].property,l===null?void 0:_e(l))},wu.prototype.serialize=function(){for(var s={},l=0,f=Object.keys(this._values);l<f.length;l+=1){var v=f[l],b=this.getValue(v);b!==void 0&&(s[v]=b)}return s},wu.prototype.possiblyEvaluate=function(s,l,f){for(var v=new Uh(this._properties),b=0,w=Object.keys(this._values);b<w.length;b+=1){var I=w[b];v._values[I]=this._values[I].possiblyEvaluate(s,l,f)}return v};var ca=function(s,l,f){this.property=s,this.value=l,this.parameters=f};ca.prototype.isConstant=function(){return this.value.kind==="constant"},ca.prototype.constantOr=function(s){return this.value.kind==="constant"?this.value.value:s},ca.prototype.evaluate=function(s,l,f,v){return this.property.evaluate(this.value,this.parameters,s,l,f,v)};var Uh=function(s){this._properties=s,this._values=Object.create(s.defaultPossiblyEvaluatedValues)};Uh.prototype.get=function(s){return this._values[s]};var cn=function(s){this.specification=s};cn.prototype.possiblyEvaluate=function(s,l){return s.expression.evaluate(l)},cn.prototype.interpolate=function(s,l,f){var v=Vu[this.specification.type];return v?v(s,l,f):s};var rn=function(s,l){this.specification=s,this.overrides=l};rn.prototype.possiblyEvaluate=function(s,l,f,v){return new ca(this,s.expression.kind==="constant"||s.expression.kind==="camera"?{kind:"constant",value:s.expression.evaluate(l,null,{},f,v)}:s.expression,l)},rn.prototype.interpolate=function(s,l,f){if(s.value.kind!=="constant"||l.value.kind!=="constant")return s;if(s.value.value===void 0||l.value.value===void 0)return new ca(this,{kind:"constant",value:void 0},s.parameters);var v=Vu[this.specification.type];return v?new ca(this,{kind:"constant",value:v(s.value.value,l.value.value,f)},s.parameters):s},rn.prototype.evaluate=function(s,l,f,v,b,w){return s.kind==="constant"?s.value:s.evaluate(l,f,v,b,w)};var zf=function(s){function l(){s.apply(this,arguments)}return s&&(l.__proto__=s),(l.prototype=Object.create(s&&s.prototype)).constructor=l,l.prototype.possiblyEvaluate=function(f,v,b,w){if(f.value===void 0)return new ca(this,{kind:"constant",value:void 0},v);if(f.expression.kind==="constant"){var I=f.expression.evaluate(v,null,{},b,w),A=f.property.specification.type==="resolvedImage"&&typeof I!="string"?I.name:I,F=this._calculate(A,A,A,v);return new ca(this,{kind:"constant",value:F},v)}if(f.expression.kind==="camera"){var j=this._calculate(f.expression.evaluate({zoom:v.zoom-1}),f.expression.evaluate({zoom:v.zoom}),f.expression.evaluate({zoom:v.zoom+1}),v);return new ca(this,{kind:"constant",value:j},v)}return new ca(this,f.expression,v)},l.prototype.evaluate=function(f,v,b,w,I,A){if(f.kind==="source"){var F=f.evaluate(v,b,w,I,A);return this._calculate(F,F,F,v)}return f.kind==="composite"?this._calculate(f.evaluate({zoom:Math.floor(v.zoom)-1},b,w),f.evaluate({zoom:Math.floor(v.zoom)},b,w),f.evaluate({zoom:Math.floor(v.zoom)+1},b,w),v):f.value},l.prototype._calculate=function(f,v,b,w){return w.zoom>w.zoomHistory.lastIntegerZoom?{from:f,to:v}:{from:b,to:v}},l.prototype.interpolate=function(f){return f},l}(rn),Pa=function(s){this.specification=s};Pa.prototype.possiblyEvaluate=function(s,l,f,v){if(s.value!==void 0){if(s.expression.kind==="constant"){var b=s.expression.evaluate(l,null,{},f,v);return this._calculate(b,b,b,l)}return this._calculate(s.expression.evaluate(new Sn(Math.floor(l.zoom-1),l)),s.expression.evaluate(new Sn(Math.floor(l.zoom),l)),s.expression.evaluate(new Sn(Math.floor(l.zoom+1),l)),l)}},Pa.prototype._calculate=function(s,l,f,v){return v.zoom>v.zoomHistory.lastIntegerZoom?{from:s,to:l}:{from:f,to:l}},Pa.prototype.interpolate=function(s){return s};var ps=function(s){this.specification=s};ps.prototype.possiblyEvaluate=function(s,l,f,v){return!!s.expression.evaluate(l,null,{},f,v)},ps.prototype.interpolate=function(){return!1};var Ua=function(s){for(var l in this.properties=s,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[],s){var f=s[l];f.specification.overridable&&this.overridableProperties.push(l);var v=this.defaultPropertyValues[l]=new ao(f,void 0),b=this.defaultTransitionablePropertyValues[l]=new Xu(f);this.defaultTransitioningPropertyValues[l]=b.untransitioned(),this.defaultPossiblyEvaluatedValues[l]=v.possiblyEvaluate({})}};nn("DataDrivenProperty",rn),nn("DataConstantProperty",cn),nn("CrossFadedDataDrivenProperty",zf),nn("CrossFadedProperty",Pa),nn("ColorRampProperty",ps);var rc=function(s){function l(f,v){if(s.call(this),this.id=f.id,this.type=f.type,this._featureFilter={filter:function(){return!0},needGeometry:!1},f.type!=="custom"&&(this.metadata=(f=f).metadata,this.minzoom=f.minzoom,this.maxzoom=f.maxzoom,f.type!=="background"&&(this.source=f.source,this.sourceLayer=f["source-layer"],this.filter=f.filter),v.layout&&(this._unevaluatedLayout=new wu(v.layout)),v.paint)){for(var b in this._transitionablePaint=new Ba(v.paint),f.paint)this.setPaintProperty(b,f.paint[b],{validate:!1});for(var w in f.layout)this.setLayoutProperty(w,f.layout[w],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new Uh(v.paint)}}return s&&(l.__proto__=s),(l.prototype=Object.create(s&&s.prototype)).constructor=l,l.prototype.getCrossfadeParameters=function(){return this._crossfadeParameters},l.prototype.getLayoutProperty=function(f){return f==="visibility"?this.visibility:this._unevaluatedLayout.getValue(f)},l.prototype.setLayoutProperty=function(f,v,b){b===void 0&&(b={}),v!=null&&this._validate(Gu,"layers."+this.id+".layout."+f,f,v,b)||(f!=="visibility"?this._unevaluatedLayout.setValue(f,v):this.visibility=v)},l.prototype.getPaintProperty=function(f){return Ot(f,"-transition")?this._transitionablePaint.getTransition(f.slice(0,-"-transition".length)):this._transitionablePaint.getValue(f)},l.prototype.setPaintProperty=function(f,v,b){if(b===void 0&&(b={}),v!=null&&this._validate(Uc,"layers."+this.id+".paint."+f,f,v,b))return!1;if(Ot(f,"-transition"))return this._transitionablePaint.setTransition(f.slice(0,-"-transition".length),v||void 0),!1;var w=this._transitionablePaint._values[f],I=w.property.specification["property-type"]==="cross-faded-data-driven",A=w.value.isDataDriven(),F=w.value;this._transitionablePaint.setValue(f,v),this._handleSpecialPaintPropertyUpdate(f);var j=this._transitionablePaint._values[f].value;return j.isDataDriven()||A||I||this._handleOverridablePaintPropertyUpdate(f,F,j)},l.prototype._handleSpecialPaintPropertyUpdate=function(f){},l.prototype._handleOverridablePaintPropertyUpdate=function(f,v,b){return!1},l.prototype.isHidden=function(f){return!!(this.minzoom&&f<this.minzoom)||!!(this.maxzoom&&f>=this.maxzoom)||this.visibility==="none"},l.prototype.updateTransitions=function(f){this._transitioningPaint=this._transitionablePaint.transitioned(f,this._transitioningPaint)},l.prototype.hasTransition=function(){return this._transitioningPaint.hasTransition()},l.prototype.recalculate=function(f,v){f.getCrossfadeParameters&&(this._crossfadeParameters=f.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(f,void 0,v)),this.paint=this._transitioningPaint.possiblyEvaluate(f,void 0,v)},l.prototype.serialize=function(){var f={id:this.id,type:this.type,source:this.source,"source-layer":this.sourceLayer,metadata:this.metadata,minzoom:this.minzoom,maxzoom:this.maxzoom,filter:this.filter,layout:this._unevaluatedLayout&&this._unevaluatedLayout.serialize(),paint:this._transitionablePaint&&this._transitionablePaint.serialize()};return this.visibility&&(f.layout=f.layout||{},f.layout.visibility=this.visibility),se(f,function(v,b){return!(v===void 0||b==="layout"&&!Object.keys(v).length||b==="paint"&&!Object.keys(v).length)})},l.prototype._validate=function(f,v,b,w,I){return I===void 0&&(I={}),(!I||I.validate!==!1)&&Dr(this,f.call(Hs,{key:v,layerType:this.type,objectKey:b,value:w,styleSpec:at,style:{glyphs:!0,sprite:!0}}))},l.prototype.is3D=function(){return!1},l.prototype.isTileClipped=function(){return!1},l.prototype.hasOffscreenPass=function(){return!1},l.prototype.resize=function(){},l.prototype.isStateDependent=function(){for(var f in this.paint._values){var v=this.paint.get(f);if(v instanceof ca&&cs(v.property.specification)&&(v.value.kind==="source"||v.value.kind==="composite")&&v.value.isStateDependent)return!0}return!1},l}(Rt),sv={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array},Ng=function(s,l){this._structArray=s,this._pos1=l*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8},ai=function(){this.isTransferred=!1,this.capacity=-1,this.resize(0)};function Oo(s,l){l===void 0&&(l=1);var f=0,v=0;return{members:s.map(function(b){var w=sv[b.type].BYTES_PER_ELEMENT,I=f=Rp(f,Math.max(l,w)),A=b.components||1;return v=Math.max(v,w),f+=w*A,{name:b.name,type:b.type,components:A,offset:I}}),size:Rp(f,Math.max(v,l)),alignment:l}}function Rp(s,l){return Math.ceil(s/l)*l}ai.serialize=function(s,l){return s._trim(),l&&(s.isTransferred=!0,l.push(s.arrayBuffer)),{length:s.length,arrayBuffer:s.arrayBuffer}},ai.deserialize=function(s){var l=Object.create(this.prototype);return l.arrayBuffer=s.arrayBuffer,l.length=s.length,l.capacity=s.arrayBuffer.byteLength/l.bytesPerElement,l._refreshViews(),l},ai.prototype._trim=function(){this.length!==this.capacity&&(this.capacity=this.length,this.arrayBuffer=this.arrayBuffer.slice(0,this.length*this.bytesPerElement),this._refreshViews())},ai.prototype.clear=function(){this.length=0},ai.prototype.resize=function(s){this.reserve(s),this.length=s},ai.prototype.reserve=function(s){if(s>this.capacity){this.capacity=Math.max(s,Math.floor(5*this.capacity),128),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);var l=this.uint8;this._refreshViews(),l&&this.uint8.set(l)}},ai.prototype._refreshViews=function(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")};var Bf=function(s){function l(){s.apply(this,arguments)}return s&&(l.__proto__=s),(l.prototype=Object.create(s&&s.prototype)).constructor=l,l.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},l.prototype.emplaceBack=function(f,v){var b=this.length;return this.resize(b+1),this.emplace(b,f,v)},l.prototype.emplace=function(f,v,b){var w=2*f;return this.int16[w+0]=v,this.int16[w+1]=b,f},l}(ai);Bf.prototype.bytesPerElement=4,nn("StructArrayLayout2i4",Bf);var ut=function(s){function l(){s.apply(this,arguments)}return s&&(l.__proto__=s),(l.prototype=Object.create(s&&s.prototype)).constructor=l,l.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},l.prototype.emplaceBack=function(f,v,b,w){var I=this.length;return this.resize(I+1),this.emplace(I,f,v,b,w)},l.prototype.emplace=function(f,v,b,w,I){var A=4*f;return this.int16[A+0]=v,this.int16[A+1]=b,this.int16[A+2]=w,this.int16[A+3]=I,f},l}(ai);ut.prototype.bytesPerElement=8,nn("StructArrayLayout4i8",ut);var Zs=function(s){function l(){s.apply(this,arguments)}return s&&(l.__proto__=s),(l.prototype=Object.create(s&&s.prototype)).constructor=l,l.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},l.prototype.emplaceBack=function(f,v,b,w,I,A){var F=this.length;return this.resize(F+1),this.emplace(F,f,v,b,w,I,A)},l.prototype.emplace=function(f,v,b,w,I,A,F){var j=6*f;return this.int16[j+0]=v,this.int16[j+1]=b,this.int16[j+2]=w,this.int16[j+3]=I,this.int16[j+4]=A,this.int16[j+5]=F,f},l}(ai);Zs.prototype.bytesPerElement=12,nn("StructArrayLayout2i4i12",Zs);var Za=function(s){function l(){s.apply(this,arguments)}return s&&(l.__proto__=s),(l.prototype=Object.create(s&&s.prototype)).constructor=l,l.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},l.prototype.emplaceBack=function(f,v,b,w,I,A){var F=this.length;return this.resize(F+1),this.emplace(F,f,v,b,w,I,A)},l.prototype.emplace=function(f,v,b,w,I,A,F){var j=4*f,G=8*f;return this.int16[j+0]=v,this.int16[j+1]=b,this.uint8[G+4]=w,this.uint8[G+5]=I,this.uint8[G+6]=A,this.uint8[G+7]=F,f},l}(ai);Za.prototype.bytesPerElement=8,nn("StructArrayLayout2i4ub8",Za);var Ka=function(s){function l(){s.apply(this,arguments)}return s&&(l.__proto__=s),(l.prototype=Object.create(s&&s.prototype)).constructor=l,l.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},l.prototype.emplaceBack=function(f,v){var b=this.length;return this.resize(b+1),this.emplace(b,f,v)},l.prototype.emplace=function(f,v,b){var w=2*f;return this.float32[w+0]=v,this.float32[w+1]=b,f},l}(ai);Ka.prototype.bytesPerElement=8,nn("StructArrayLayout2f8",Ka);var ur=function(s){function l(){s.apply(this,arguments)}return s&&(l.__proto__=s),(l.prototype=Object.create(s&&s.prototype)).constructor=l,l.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},l.prototype.emplaceBack=function(f,v,b,w,I,A,F,j,G,H){var J=this.length;return this.resize(J+1),this.emplace(J,f,v,b,w,I,A,F,j,G,H)},l.prototype.emplace=function(f,v,b,w,I,A,F,j,G,H,J){var rt=10*f;return this.uint16[rt+0]=v,this.uint16[rt+1]=b,this.uint16[rt+2]=w,this.uint16[rt+3]=I,this.uint16[rt+4]=A,this.uint16[rt+5]=F,this.uint16[rt+6]=j,this.uint16[rt+7]=G,this.uint16[rt+8]=H,this.uint16[rt+9]=J,f},l}(ai);ur.prototype.bytesPerElement=20,nn("StructArrayLayout10ui20",ur);var Fg=function(s){function l(){s.apply(this,arguments)}return s&&(l.__proto__=s),(l.prototype=Object.create(s&&s.prototype)).constructor=l,l.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},l.prototype.emplaceBack=function(f,v,b,w,I,A,F,j,G,H,J,rt){var dt=this.length;return this.resize(dt+1),this.emplace(dt,f,v,b,w,I,A,F,j,G,H,J,rt)},l.prototype.emplace=function(f,v,b,w,I,A,F,j,G,H,J,rt,dt){var _t=12*f;return this.int16[_t+0]=v,this.int16[_t+1]=b,this.int16[_t+2]=w,this.int16[_t+3]=I,this.uint16[_t+4]=A,this.uint16[_t+5]=F,this.uint16[_t+6]=j,this.uint16[_t+7]=G,this.int16[_t+8]=H,this.int16[_t+9]=J,this.int16[_t+10]=rt,this.int16[_t+11]=dt,f},l}(ai);Fg.prototype.bytesPerElement=24,nn("StructArrayLayout4i4ui4i24",Fg);var kp=function(s){function l(){s.apply(this,arguments)}return s&&(l.__proto__=s),(l.prototype=Object.create(s&&s.prototype)).constructor=l,l.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},l.prototype.emplaceBack=function(f,v,b){var w=this.length;return this.resize(w+1),this.emplace(w,f,v,b)},l.prototype.emplace=function(f,v,b,w){var I=3*f;return this.float32[I+0]=v,this.float32[I+1]=b,this.float32[I+2]=w,f},l}(ai);kp.prototype.bytesPerElement=12,nn("StructArrayLayout3f12",kp);var Cd=function(s){function l(){s.apply(this,arguments)}return s&&(l.__proto__=s),(l.prototype=Object.create(s&&s.prototype)).constructor=l,l.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)},l.prototype.emplaceBack=function(f){var v=this.length;return this.resize(v+1),this.emplace(v,f)},l.prototype.emplace=function(f,v){return this.uint32[1*f+0]=v,f},l}(ai);Cd.prototype.bytesPerElement=4,nn("StructArrayLayout1ul4",Cd);var $c=function(s){function l(){s.apply(this,arguments)}return s&&(l.__proto__=s),(l.prototype=Object.create(s&&s.prototype)).constructor=l,l.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},l.prototype.emplaceBack=function(f,v,b,w,I,A,F,j,G){var H=this.length;return this.resize(H+1),this.emplace(H,f,v,b,w,I,A,F,j,G)},l.prototype.emplace=function(f,v,b,w,I,A,F,j,G,H){var J=10*f,rt=5*f;return this.int16[J+0]=v,this.int16[J+1]=b,this.int16[J+2]=w,this.int16[J+3]=I,this.int16[J+4]=A,this.int16[J+5]=F,this.uint32[rt+3]=j,this.uint16[J+8]=G,this.uint16[J+9]=H,f},l}(ai);$c.prototype.bytesPerElement=20,nn("StructArrayLayout6i1ul2ui20",$c);var Dp=function(s){function l(){s.apply(this,arguments)}return s&&(l.__proto__=s),(l.prototype=Object.create(s&&s.prototype)).constructor=l,l.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},l.prototype.emplaceBack=function(f,v,b,w,I,A){var F=this.length;return this.resize(F+1),this.emplace(F,f,v,b,w,I,A)},l.prototype.emplace=function(f,v,b,w,I,A,F){var j=6*f;return this.int16[j+0]=v,this.int16[j+1]=b,this.int16[j+2]=w,this.int16[j+3]=I,this.int16[j+4]=A,this.int16[j+5]=F,f},l}(ai);Dp.prototype.bytesPerElement=12,nn("StructArrayLayout2i2i2i12",Dp);var Vh=function(s){function l(){s.apply(this,arguments)}return s&&(l.__proto__=s),(l.prototype=Object.create(s&&s.prototype)).constructor=l,l.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},l.prototype.emplaceBack=function(f,v,b,w,I){var A=this.length;return this.resize(A+1),this.emplace(A,f,v,b,w,I)},l.prototype.emplace=function(f,v,b,w,I,A){var F=4*f,j=8*f;return this.float32[F+0]=v,this.float32[F+1]=b,this.float32[F+2]=w,this.int16[j+6]=I,this.int16[j+7]=A,f},l}(ai);Vh.prototype.bytesPerElement=16,nn("StructArrayLayout2f1f2i16",Vh);var uv=function(s){function l(){s.apply(this,arguments)}return s&&(l.__proto__=s),(l.prototype=Object.create(s&&s.prototype)).constructor=l,l.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},l.prototype.emplaceBack=function(f,v,b,w){var I=this.length;return this.resize(I+1),this.emplace(I,f,v,b,w)},l.prototype.emplace=function(f,v,b,w,I){var A=12*f,F=3*f;return this.uint8[A+0]=v,this.uint8[A+1]=b,this.float32[F+1]=w,this.float32[F+2]=I,f},l}(ai);uv.prototype.bytesPerElement=12,nn("StructArrayLayout2ub2f12",uv);var Uf=function(s){function l(){s.apply(this,arguments)}return s&&(l.__proto__=s),(l.prototype=Object.create(s&&s.prototype)).constructor=l,l.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},l.prototype.emplaceBack=function(f,v,b){var w=this.length;return this.resize(w+1),this.emplace(w,f,v,b)},l.prototype.emplace=function(f,v,b,w){var I=3*f;return this.uint16[I+0]=v,this.uint16[I+1]=b,this.uint16[I+2]=w,f},l}(ai);Uf.prototype.bytesPerElement=6,nn("StructArrayLayout3ui6",Uf);var Vf=function(s){function l(){s.apply(this,arguments)}return s&&(l.__proto__=s),(l.prototype=Object.create(s&&s.prototype)).constructor=l,l.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},l.prototype.emplaceBack=function(f,v,b,w,I,A,F,j,G,H,J,rt,dt,_t,Pt,St,Nt){var qt=this.length;return this.resize(qt+1),this.emplace(qt,f,v,b,w,I,A,F,j,G,H,J,rt,dt,_t,Pt,St,Nt)},l.prototype.emplace=function(f,v,b,w,I,A,F,j,G,H,J,rt,dt,_t,Pt,St,Nt,qt){var Zt=24*f,ee=12*f,fe=48*f;return this.int16[Zt+0]=v,this.int16[Zt+1]=b,this.uint16[Zt+2]=w,this.uint16[Zt+3]=I,this.uint32[ee+2]=A,this.uint32[ee+3]=F,this.uint32[ee+4]=j,this.uint16[Zt+10]=G,this.uint16[Zt+11]=H,this.uint16[Zt+12]=J,this.float32[ee+7]=rt,this.float32[ee+8]=dt,this.uint8[fe+36]=_t,this.uint8[fe+37]=Pt,this.uint8[fe+38]=St,this.uint32[ee+10]=Nt,this.int16[Zt+22]=qt,f},l}(ai);Vf.prototype.bytesPerElement=48,nn("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48",Vf);var Yu=function(s){function l(){s.apply(this,arguments)}return s&&(l.__proto__=s),(l.prototype=Object.create(s&&s.prototype)).constructor=l,l.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},l.prototype.emplaceBack=function(f,v,b,w,I,A,F,j,G,H,J,rt,dt,_t,Pt,St,Nt,qt,Zt,ee,fe,Ee,Oe,hn,qe,mn,Ze,Zn){var En=this.length;return this.resize(En+1),this.emplace(En,f,v,b,w,I,A,F,j,G,H,J,rt,dt,_t,Pt,St,Nt,qt,Zt,ee,fe,Ee,Oe,hn,qe,mn,Ze,Zn)},l.prototype.emplace=function(f,v,b,w,I,A,F,j,G,H,J,rt,dt,_t,Pt,St,Nt,qt,Zt,ee,fe,Ee,Oe,hn,qe,mn,Ze,Zn,En){var sn=34*f,nr=17*f;return this.int16[sn+0]=v,this.int16[sn+1]=b,this.int16[sn+2]=w,this.int16[sn+3]=I,this.int16[sn+4]=A,this.int16[sn+5]=F,this.int16[sn+6]=j,this.int16[sn+7]=G,this.uint16[sn+8]=H,this.uint16[sn+9]=J,this.uint16[sn+10]=rt,this.uint16[sn+11]=dt,this.uint16[sn+12]=_t,this.uint16[sn+13]=Pt,this.uint16[sn+14]=St,this.uint16[sn+15]=Nt,this.uint16[sn+16]=qt,this.uint16[sn+17]=Zt,this.uint16[sn+18]=ee,this.uint16[sn+19]=fe,this.uint16[sn+20]=Ee,this.uint16[sn+21]=Oe,this.uint16[sn+22]=hn,this.uint32[nr+12]=qe,this.float32[nr+13]=mn,this.float32[nr+14]=Ze,this.float32[nr+15]=Zn,this.float32[nr+16]=En,f},l}(ai);Yu.prototype.bytesPerElement=68,nn("StructArrayLayout8i15ui1ul4f68",Yu);var $f=function(s){function l(){s.apply(this,arguments)}return s&&(l.__proto__=s),(l.prototype=Object.create(s&&s.prototype)).constructor=l,l.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},l.prototype.emplaceBack=function(f){var v=this.length;return this.resize(v+1),this.emplace(v,f)},l.prototype.emplace=function(f,v){return this.float32[1*f+0]=v,f},l}(ai);$f.prototype.bytesPerElement=4,nn("StructArrayLayout1f4",$f);var Zu=function(s){function l(){s.apply(this,arguments)}return s&&(l.__proto__=s),(l.prototype=Object.create(s&&s.prototype)).constructor=l,l.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},l.prototype.emplaceBack=function(f,v,b){var w=this.length;return this.resize(w+1),this.emplace(w,f,v,b)},l.prototype.emplace=function(f,v,b,w){var I=3*f;return this.int16[I+0]=v,this.int16[I+1]=b,this.int16[I+2]=w,f},l}(ai);Zu.prototype.bytesPerElement=6,nn("StructArrayLayout3i6",Zu);var lv=function(s){function l(){s.apply(this,arguments)}return s&&(l.__proto__=s),(l.prototype=Object.create(s&&s.prototype)).constructor=l,l.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},l.prototype.emplaceBack=function(f,v,b){var w=this.length;return this.resize(w+1),this.emplace(w,f,v,b)},l.prototype.emplace=function(f,v,b,w){var I=4*f;return this.uint32[2*f+0]=v,this.uint16[I+2]=b,this.uint16[I+3]=w,f},l}(ai);lv.prototype.bytesPerElement=8,nn("StructArrayLayout1ul2ui8",lv);var Id=function(s){function l(){s.apply(this,arguments)}return s&&(l.__proto__=s),(l.prototype=Object.create(s&&s.prototype)).constructor=l,l.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},l.prototype.emplaceBack=function(f,v){var b=this.length;return this.resize(b+1),this.emplace(b,f,v)},l.prototype.emplace=function(f,v,b){var w=2*f;return this.uint16[w+0]=v,this.uint16[w+1]=b,f},l}(ai);Id.prototype.bytesPerElement=4,nn("StructArrayLayout2ui4",Id);var cv=function(s){function l(){s.apply(this,arguments)}return s&&(l.__proto__=s),(l.prototype=Object.create(s&&s.prototype)).constructor=l,l.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},l.prototype.emplaceBack=function(f){var v=this.length;return this.resize(v+1),this.emplace(v,f)},l.prototype.emplace=function(f,v){return this.uint16[1*f+0]=v,f},l}(ai);cv.prototype.bytesPerElement=2,nn("StructArrayLayout1ui2",cv);var Ku=function(s){function l(){s.apply(this,arguments)}return s&&(l.__proto__=s),(l.prototype=Object.create(s&&s.prototype)).constructor=l,l.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},l.prototype.emplaceBack=function(f,v,b,w){var I=this.length;return this.resize(I+1),this.emplace(I,f,v,b,w)},l.prototype.emplace=function(f,v,b,w,I){var A=4*f;return this.float32[A+0]=v,this.float32[A+1]=b,this.float32[A+2]=w,this.float32[A+3]=I,f},l}(ai);Ku.prototype.bytesPerElement=16,nn("StructArrayLayout4f16",Ku);var h=function(s){function l(){s.apply(this,arguments)}s&&(l.__proto__=s),(l.prototype=Object.create(s&&s.prototype)).constructor=l;var f={anchorPointX:{configurable:!0},anchorPointY:{configurable:!0},x1:{configurable:!0},y1:{configurable:!0},x2:{configurable:!0},y2:{configurable:!0},featureIndex:{configurable:!0},sourceLayerIndex:{configurable:!0},bucketIndex:{configurable:!0},anchorPoint:{configurable:!0}};return f.anchorPointX.get=function(){return this._structArray.int16[this._pos2+0]},f.anchorPointY.get=function(){return this._structArray.int16[this._pos2+1]},f.x1.get=function(){return this._structArray.int16[this._pos2+2]},f.y1.get=function(){return this._structArray.int16[this._pos2+3]},f.x2.get=function(){return this._structArray.int16[this._pos2+4]},f.y2.get=function(){return this._structArray.int16[this._pos2+5]},f.featureIndex.get=function(){return this._structArray.uint32[this._pos4+3]},f.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+8]},f.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+9]},f.anchorPoint.get=function(){return new _(this.anchorPointX,this.anchorPointY)},Object.defineProperties(l.prototype,f),l}(Ng);h.prototype.size=20;var d=function(s){function l(){s.apply(this,arguments)}return s&&(l.__proto__=s),(l.prototype=Object.create(s&&s.prototype)).constructor=l,l.prototype.get=function(f){return new h(this,f)},l}($c);nn("CollisionBoxArray",d);var p=function(s){function l(){s.apply(this,arguments)}s&&(l.__proto__=s),(l.prototype=Object.create(s&&s.prototype)).constructor=l;var f={anchorX:{configurable:!0},anchorY:{configurable:!0},glyphStartIndex:{configurable:!0},numGlyphs:{configurable:!0},vertexStartIndex:{configurable:!0},lineStartIndex:{configurable:!0},lineLength:{configurable:!0},segment:{configurable:!0},lowerSize:{configurable:!0},upperSize:{configurable:!0},lineOffsetX:{configurable:!0},lineOffsetY:{configurable:!0},writingMode:{configurable:!0},placedOrientation:{configurable:!0},hidden:{configurable:!0},crossTileID:{configurable:!0},associatedIconIndex:{configurable:!0}};return f.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},f.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},f.glyphStartIndex.get=function(){return this._structArray.uint16[this._pos2+2]},f.numGlyphs.get=function(){return this._structArray.uint16[this._pos2+3]},f.vertexStartIndex.get=function(){return this._structArray.uint32[this._pos4+2]},f.lineStartIndex.get=function(){return this._structArray.uint32[this._pos4+3]},f.lineLength.get=function(){return this._structArray.uint32[this._pos4+4]},f.segment.get=function(){return this._structArray.uint16[this._pos2+10]},f.lowerSize.get=function(){return this._structArray.uint16[this._pos2+11]},f.upperSize.get=function(){return this._structArray.uint16[this._pos2+12]},f.lineOffsetX.get=function(){return this._structArray.float32[this._pos4+7]},f.lineOffsetY.get=function(){return this._structArray.float32[this._pos4+8]},f.writingMode.get=function(){return this._structArray.uint8[this._pos1+36]},f.placedOrientation.get=function(){return this._structArray.uint8[this._pos1+37]},f.placedOrientation.set=function(v){this._structArray.uint8[this._pos1+37]=v},f.hidden.get=function(){return this._structArray.uint8[this._pos1+38]},f.hidden.set=function(v){this._structArray.uint8[this._pos1+38]=v},f.crossTileID.get=function(){return this._structArray.uint32[this._pos4+10]},f.crossTileID.set=function(v){this._structArray.uint32[this._pos4+10]=v},f.associatedIconIndex.get=function(){return this._structArray.int16[this._pos2+22]},Object.defineProperties(l.prototype,f),l}(Ng);p.prototype.size=48;var y=function(s){function l(){s.apply(this,arguments)}return s&&(l.__proto__=s),(l.prototype=Object.create(s&&s.prototype)).constructor=l,l.prototype.get=function(f){return new p(this,f)},l}(Vf);nn("PlacedSymbolArray",y);var S=function(s){function l(){s.apply(this,arguments)}s&&(l.__proto__=s),(l.prototype=Object.create(s&&s.prototype)).constructor=l;var f={anchorX:{configurable:!0},anchorY:{configurable:!0},rightJustifiedTextSymbolIndex:{configurable:!0},centerJustifiedTextSymbolIndex:{configurable:!0},leftJustifiedTextSymbolIndex:{configurable:!0},verticalPlacedTextSymbolIndex:{configurable:!0},placedIconSymbolIndex:{configurable:!0},verticalPlacedIconSymbolIndex:{configurable:!0},key:{configurable:!0},textBoxStartIndex:{configurable:!0},textBoxEndIndex:{configurable:!0},verticalTextBoxStartIndex:{configurable:!0},verticalTextBoxEndIndex:{configurable:!0},iconBoxStartIndex:{configurable:!0},iconBoxEndIndex:{configurable:!0},verticalIconBoxStartIndex:{configurable:!0},verticalIconBoxEndIndex:{configurable:!0},featureIndex:{configurable:!0},numHorizontalGlyphVertices:{configurable:!0},numVerticalGlyphVertices:{configurable:!0},numIconVertices:{configurable:!0},numVerticalIconVertices:{configurable:!0},useRuntimeCollisionCircles:{configurable:!0},crossTileID:{configurable:!0},textBoxScale:{configurable:!0},textOffset0:{configurable:!0},textOffset1:{configurable:!0},collisionCircleDiameter:{configurable:!0}};return f.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},f.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},f.rightJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+2]},f.centerJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+3]},f.leftJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+4]},f.verticalPlacedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+5]},f.placedIconSymbolIndex.get=function(){return this._structArray.int16[this._pos2+6]},f.verticalPlacedIconSymbolIndex.get=function(){return this._structArray.int16[this._pos2+7]},f.key.get=function(){return this._structArray.uint16[this._pos2+8]},f.textBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+9]},f.textBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+10]},f.verticalTextBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+11]},f.verticalTextBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+12]},f.iconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+13]},f.iconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+14]},f.verticalIconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+15]},f.verticalIconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+16]},f.featureIndex.get=function(){return this._structArray.uint16[this._pos2+17]},f.numHorizontalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+18]},f.numVerticalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+19]},f.numIconVertices.get=function(){return this._structArray.uint16[this._pos2+20]},f.numVerticalIconVertices.get=function(){return this._structArray.uint16[this._pos2+21]},f.useRuntimeCollisionCircles.get=function(){return this._structArray.uint16[this._pos2+22]},f.crossTileID.get=function(){return this._structArray.uint32[this._pos4+12]},f.crossTileID.set=function(v){this._structArray.uint32[this._pos4+12]=v},f.textBoxScale.get=function(){return this._structArray.float32[this._pos4+13]},f.textOffset0.get=function(){return this._structArray.float32[this._pos4+14]},f.textOffset1.get=function(){return this._structArray.float32[this._pos4+15]},f.collisionCircleDiameter.get=function(){return this._structArray.float32[this._pos4+16]},Object.defineProperties(l.prototype,f),l}(Ng);S.prototype.size=68;var P=function(s){function l(){s.apply(this,arguments)}return s&&(l.__proto__=s),(l.prototype=Object.create(s&&s.prototype)).constructor=l,l.prototype.get=function(f){return new S(this,f)},l}(Yu);nn("SymbolInstanceArray",P);var M=function(s){function l(){s.apply(this,arguments)}return s&&(l.__proto__=s),(l.prototype=Object.create(s&&s.prototype)).constructor=l,l.prototype.getoffsetX=function(f){return this.float32[1*f+0]},l}($f);nn("GlyphOffsetArray",M);var N=function(s){function l(){s.apply(this,arguments)}return s&&(l.__proto__=s),(l.prototype=Object.create(s&&s.prototype)).constructor=l,l.prototype.getx=function(f){return this.int16[3*f+0]},l.prototype.gety=function(f){return this.int16[3*f+1]},l.prototype.gettileUnitDistanceFromAnchor=function(f){return this.int16[3*f+2]},l}(Zu);nn("SymbolLineVertexArray",N);var q=function(s){function l(){s.apply(this,arguments)}s&&(l.__proto__=s),(l.prototype=Object.create(s&&s.prototype)).constructor=l;var f={featureIndex:{configurable:!0},sourceLayerIndex:{configurable:!0},bucketIndex:{configurable:!0}};return f.featureIndex.get=function(){return this._structArray.uint32[this._pos4+0]},f.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+2]},f.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+3]},Object.defineProperties(l.prototype,f),l}(Ng);q.prototype.size=8;var X=function(s){function l(){s.apply(this,arguments)}return s&&(l.__proto__=s),(l.prototype=Object.create(s&&s.prototype)).constructor=l,l.prototype.get=function(f){return new q(this,f)},l}(lv);nn("FeatureIndexArray",X);var it=Oo([{name:"a_pos",components:2,type:"Int16"}],4).members,st=function(s){s===void 0&&(s=[]),this.segments=s};function ct(s,l){return 256*(s=B(Math.floor(s),0,255))+B(Math.floor(l),0,255)}st.prototype.prepareSegment=function(s,l,f,v){var b=this.segments[this.segments.length-1];return s>st.MAX_VERTEX_ARRAY_LENGTH&&He("Max vertices per segment is "+st.MAX_VERTEX_ARRAY_LENGTH+": bucket requested "+s),(!b||b.vertexLength+s>st.MAX_VERTEX_ARRAY_LENGTH||b.sortKey!==v)&&(b={vertexOffset:l.length,primitiveOffset:f.length,vertexLength:0,primitiveLength:0},v!==void 0&&(b.sortKey=v),this.segments.push(b)),b},st.prototype.get=function(){return this.segments},st.prototype.destroy=function(){for(var s=0,l=this.segments;s<l.length;s+=1){var f=l[s];for(var v in f.vaos)f.vaos[v].destroy()}},st.simpleSegment=function(s,l,f,v){return new st([{vertexOffset:s,primitiveOffset:l,vertexLength:f,primitiveLength:v,vaos:{},sortKey:0}])},st.MAX_VERTEX_ARRAY_LENGTH=Math.pow(2,16)-1,nn("SegmentVector",st);var xt=Oo([{name:"a_pattern_from",components:4,type:"Uint16"},{name:"a_pattern_to",components:4,type:"Uint16"},{name:"a_pixel_ratio_from",components:1,type:"Uint16"},{name:"a_pixel_ratio_to",components:1,type:"Uint16"}]),yt=u(function(s){s.exports=function(l,f){var v,b,w,I,A,F,j,G;for(b=l.length-(v=3&l.length),w=f,A=3432918353,F=461845907,G=0;G<b;)j=255&l.charCodeAt(G)|(255&l.charCodeAt(++G))<<8|(255&l.charCodeAt(++G))<<16|(255&l.charCodeAt(++G))<<24,++G,w=27492+(65535&(I=5*(65535&(w=(w^=j=(65535&(j=(j=(65535&j)*A+(((j>>>16)*A&65535)<<16)&4294967295)<<15|j>>>17))*F+(((j>>>16)*F&65535)<<16)&4294967295)<<13|w>>>19))+((5*(w>>>16)&65535)<<16)&4294967295))+((58964+(I>>>16)&65535)<<16);switch(j=0,v){case 3:j^=(255&l.charCodeAt(G+2))<<16;case 2:j^=(255&l.charCodeAt(G+1))<<8;case 1:w^=j=(65535&(j=(j=(65535&(j^=255&l.charCodeAt(G)))*A+(((j>>>16)*A&65535)<<16)&4294967295)<<15|j>>>17))*F+(((j>>>16)*F&65535)<<16)&4294967295}return w^=l.length,w=2246822507*(65535&(w^=w>>>16))+((2246822507*(w>>>16)&65535)<<16)&4294967295,w=3266489909*(65535&(w^=w>>>13))+((3266489909*(w>>>16)&65535)<<16)&4294967295,(w^=w>>>16)>>>0}}),Ct=u(function(s){s.exports=function(l,f){for(var v,b=l.length,w=f^b,I=0;b>=4;)v=1540483477*(65535&(v=255&l.charCodeAt(I)|(255&l.charCodeAt(++I))<<8|(255&l.charCodeAt(++I))<<16|(255&l.charCodeAt(++I))<<24))+((1540483477*(v>>>16)&65535)<<16),w=1540483477*(65535&w)+((1540483477*(w>>>16)&65535)<<16)^(v=1540483477*(65535&(v^=v>>>24))+((1540483477*(v>>>16)&65535)<<16)),b-=4,++I;switch(b){case 3:w^=(255&l.charCodeAt(I+2))<<16;case 2:w^=(255&l.charCodeAt(I+1))<<8;case 1:w=1540483477*(65535&(w^=255&l.charCodeAt(I)))+((1540483477*(w>>>16)&65535)<<16)}return w=1540483477*(65535&(w^=w>>>13))+((1540483477*(w>>>16)&65535)<<16),(w^=w>>>15)>>>0}}),gt=yt,It=Ct;gt.murmur3=yt,gt.murmur2=It;var Lt=function(){this.ids=[],this.positions=[],this.indexed=!1};Lt.prototype.add=function(s,l,f,v){this.ids.push(ne(s)),this.positions.push(l,f,v)},Lt.prototype.getPositions=function(s){for(var l=ne(s),f=0,v=this.ids.length-1;f<v;){var b=f+v>>1;this.ids[b]>=l?v=b:f=b+1}for(var w=[];this.ids[f]===l;)w.push({index:this.positions[3*f],start:this.positions[3*f+1],end:this.positions[3*f+2]}),f++;return w},Lt.serialize=function(s,l){var f=new Float64Array(s.ids),v=new Uint32Array(s.positions);return function b(w,I,A,F){for(;A<F;){for(var j=w[A+F>>1],G=A-1,H=F+1;;){do G++;while(w[G]<j);do H--;while(w[H]>j);if(G>=H)break;Jt(w,G,H),Jt(I,3*G,3*H),Jt(I,3*G+1,3*H+1),Jt(I,3*G+2,3*H+2)}H-A<F-H?(b(w,I,A,H),A=H+1):(b(w,I,H+1,F),F=H)}}(f,v,0,f.length-1),l&&l.push(f.buffer,v.buffer),{ids:f,positions:v}},Lt.deserialize=function(s){var l=new Lt;return l.ids=s.ids,l.positions=s.positions,l.indexed=!0,l};var jt=Math.pow(2,53)-1;function ne(s){var l=+s;return!isNaN(l)&&l<=jt?l:gt(String(s))}function Jt(s,l,f){var v=s[l];s[l]=s[f],s[f]=v}nn("FeaturePositionMap",Lt);var ae=function(s,l){this.gl=s.gl,this.location=l},ge=function(s){function l(f,v){s.call(this,f,v),this.current=0}return s&&(l.__proto__=s),(l.prototype=Object.create(s&&s.prototype)).constructor=l,l.prototype.set=function(f){this.current!==f&&(this.current=f,this.gl.uniform1i(this.location,f))},l}(ae),we=function(s){function l(f,v){s.call(this,f,v),this.current=0}return s&&(l.__proto__=s),(l.prototype=Object.create(s&&s.prototype)).constructor=l,l.prototype.set=function(f){this.current!==f&&(this.current=f,this.gl.uniform1f(this.location,f))},l}(ae),Te=function(s){function l(f,v){s.call(this,f,v),this.current=[0,0]}return s&&(l.__proto__=s),(l.prototype=Object.create(s&&s.prototype)).constructor=l,l.prototype.set=function(f){f[0]===this.current[0]&&f[1]===this.current[1]||(this.current=f,this.gl.uniform2f(this.location,f[0],f[1]))},l}(ae),je=function(s){function l(f,v){s.call(this,f,v),this.current=[0,0,0]}return s&&(l.__proto__=s),(l.prototype=Object.create(s&&s.prototype)).constructor=l,l.prototype.set=function(f){f[0]===this.current[0]&&f[1]===this.current[1]&&f[2]===this.current[2]||(this.current=f,this.gl.uniform3f(this.location,f[0],f[1],f[2]))},l}(ae),an=function(s){function l(f,v){s.call(this,f,v),this.current=[0,0,0,0]}return s&&(l.__proto__=s),(l.prototype=Object.create(s&&s.prototype)).constructor=l,l.prototype.set=function(f){f[0]===this.current[0]&&f[1]===this.current[1]&&f[2]===this.current[2]&&f[3]===this.current[3]||(this.current=f,this.gl.uniform4f(this.location,f[0],f[1],f[2],f[3]))},l}(ae),_n=function(s){function l(f,v){s.call(this,f,v),this.current=pr.transparent}return s&&(l.__proto__=s),(l.prototype=Object.create(s&&s.prototype)).constructor=l,l.prototype.set=function(f){f.r===this.current.r&&f.g===this.current.g&&f.b===this.current.b&&f.a===this.current.a||(this.current=f,this.gl.uniform4f(this.location,f.r,f.g,f.b,f.a))},l}(ae),vn=new Float32Array(16),Ir=function(s){function l(f,v){s.call(this,f,v),this.current=vn}return s&&(l.__proto__=s),(l.prototype=Object.create(s&&s.prototype)).constructor=l,l.prototype.set=function(f){if(f[12]!==this.current[12]||f[0]!==this.current[0])return this.current=f,void this.gl.uniformMatrix4fv(this.location,!1,f);for(var v=1;v<16;v++)if(f[v]!==this.current[v]){this.current=f,this.gl.uniformMatrix4fv(this.location,!1,f);break}},l}(ae);function Qe(s){return[ct(255*s.r,255*s.g),ct(255*s.b,255*s.a)]}var bn=function(s,l,f){this.value=s,this.uniformNames=l.map(function(v){return"u_"+v}),this.type=f};bn.prototype.setUniform=function(s,l,f){s.set(f.constantOr(this.value))},bn.prototype.getBinding=function(s,l,f){return this.type==="color"?new _n(s,l):new we(s,l)};var Wn=function(s,l){this.uniformNames=l.map(function(f){return"u_"+f}),this.patternFrom=null,this.patternTo=null,this.pixelRatioFrom=1,this.pixelRatioTo=1};Wn.prototype.setConstantPatternPositions=function(s,l){this.pixelRatioFrom=l.pixelRatio,this.pixelRatioTo=s.pixelRatio,this.patternFrom=l.tlbr,this.patternTo=s.tlbr},Wn.prototype.setUniform=function(s,l,f,v){var b=v==="u_pattern_to"?this.patternTo:v==="u_pattern_from"?this.patternFrom:v==="u_pixel_ratio_to"?this.pixelRatioTo:v==="u_pixel_ratio_from"?this.pixelRatioFrom:null;b&&s.set(b)},Wn.prototype.getBinding=function(s,l,f){return f.substr(0,9)==="u_pattern"?new an(s,l):new we(s,l)};var On=function(s,l,f,v){this.expression=s,this.type=f,this.maxValue=0,this.paintVertexAttributes=l.map(function(b){return{name:"a_"+b,type:"Float32",components:f==="color"?2:1,offset:0}}),this.paintVertexArray=new v};On.prototype.populatePaintArray=function(s,l,f,v,b){var w=this.paintVertexArray.length,I=this.expression.evaluate(new Sn(0),l,{},v,[],b);this.paintVertexArray.resize(s),this._setPaintValue(w,s,I)},On.prototype.updatePaintArray=function(s,l,f,v){var b=this.expression.evaluate({zoom:0},f,v);this._setPaintValue(s,l,b)},On.prototype._setPaintValue=function(s,l,f){if(this.type==="color")for(var v=Qe(f),b=s;b<l;b++)this.paintVertexArray.emplace(b,v[0],v[1]);else{for(var w=s;w<l;w++)this.paintVertexArray.emplace(w,f);this.maxValue=Math.max(this.maxValue,Math.abs(f))}},On.prototype.upload=function(s){this.paintVertexArray&&this.paintVertexArray.arrayBuffer&&(this.paintVertexBuffer&&this.paintVertexBuffer.buffer?this.paintVertexBuffer.updateData(this.paintVertexArray):this.paintVertexBuffer=s.createVertexBuffer(this.paintVertexArray,this.paintVertexAttributes,this.expression.isStateDependent))},On.prototype.destroy=function(){this.paintVertexBuffer&&this.paintVertexBuffer.destroy()};var Pn=function(s,l,f,v,b,w){this.expression=s,this.uniformNames=l.map(function(I){return"u_"+I+"_t"}),this.type=f,this.useIntegerZoom=v,this.zoom=b,this.maxValue=0,this.paintVertexAttributes=l.map(function(I){return{name:"a_"+I,type:"Float32",components:f==="color"?4:2,offset:0}}),this.paintVertexArray=new w};Pn.prototype.populatePaintArray=function(s,l,f,v,b){var w=this.expression.evaluate(new Sn(this.zoom),l,{},v,[],b),I=this.expression.evaluate(new Sn(this.zoom+1),l,{},v,[],b),A=this.paintVertexArray.length;this.paintVertexArray.resize(s),this._setPaintValue(A,s,w,I)},Pn.prototype.updatePaintArray=function(s,l,f,v){var b=this.expression.evaluate({zoom:this.zoom},f,v),w=this.expression.evaluate({zoom:this.zoom+1},f,v);this._setPaintValue(s,l,b,w)},Pn.prototype._setPaintValue=function(s,l,f,v){if(this.type==="color")for(var b=Qe(f),w=Qe(v),I=s;I<l;I++)this.paintVertexArray.emplace(I,b[0],b[1],w[0],w[1]);else{for(var A=s;A<l;A++)this.paintVertexArray.emplace(A,f,v);this.maxValue=Math.max(this.maxValue,Math.abs(f),Math.abs(v))}},Pn.prototype.upload=function(s){this.paintVertexArray&&this.paintVertexArray.arrayBuffer&&(this.paintVertexBuffer&&this.paintVertexBuffer.buffer?this.paintVertexBuffer.updateData(this.paintVertexArray):this.paintVertexBuffer=s.createVertexBuffer(this.paintVertexArray,this.paintVertexAttributes,this.expression.isStateDependent))},Pn.prototype.destroy=function(){this.paintVertexBuffer&&this.paintVertexBuffer.destroy()},Pn.prototype.setUniform=function(s,l){var f=this.useIntegerZoom?Math.floor(l.zoom):l.zoom,v=B(this.expression.interpolationFactor(f,this.zoom,this.zoom+1),0,1);s.set(v)},Pn.prototype.getBinding=function(s,l,f){return new we(s,l)};var Hn=function(s,l,f,v,b,w){this.expression=s,this.type=l,this.useIntegerZoom=f,this.zoom=v,this.layerId=w,this.zoomInPaintVertexArray=new b,this.zoomOutPaintVertexArray=new b};Hn.prototype.populatePaintArray=function(s,l,f){var v=this.zoomInPaintVertexArray.length;this.zoomInPaintVertexArray.resize(s),this.zoomOutPaintVertexArray.resize(s),this._setPaintValues(v,s,l.patterns&&l.patterns[this.layerId],f)},Hn.prototype.updatePaintArray=function(s,l,f,v,b){this._setPaintValues(s,l,f.patterns&&f.patterns[this.layerId],b)},Hn.prototype._setPaintValues=function(s,l,f,v){if(v&&f){var b=v[f.min],w=v[f.mid],I=v[f.max];if(b&&w&&I)for(var A=s;A<l;A++)this.zoomInPaintVertexArray.emplace(A,w.tl[0],w.tl[1],w.br[0],w.br[1],b.tl[0],b.tl[1],b.br[0],b.br[1],w.pixelRatio,b.pixelRatio),this.zoomOutPaintVertexArray.emplace(A,w.tl[0],w.tl[1],w.br[0],w.br[1],I.tl[0],I.tl[1],I.br[0],I.br[1],w.pixelRatio,I.pixelRatio)}},Hn.prototype.upload=function(s){this.zoomInPaintVertexArray&&this.zoomInPaintVertexArray.arrayBuffer&&this.zoomOutPaintVertexArray&&this.zoomOutPaintVertexArray.arrayBuffer&&(this.zoomInPaintVertexBuffer=s.createVertexBuffer(this.zoomInPaintVertexArray,xt.members,this.expression.isStateDependent),this.zoomOutPaintVertexBuffer=s.createVertexBuffer(this.zoomOutPaintVertexArray,xt.members,this.expression.isStateDependent))},Hn.prototype.destroy=function(){this.zoomOutPaintVertexBuffer&&this.zoomOutPaintVertexBuffer.destroy(),this.zoomInPaintVertexBuffer&&this.zoomInPaintVertexBuffer.destroy()};var An=function(s,l,f){this.binders={},this._buffers=[];var v=[];for(var b in s.paint._values)if(f(b)){var w=s.paint.get(b);if(w instanceof ca&&cs(w.property.specification)){var I=Ro(b,s.type),A=w.value,F=w.property.specification.type,j=w.property.useIntegerZoom,G=w.property.specification["property-type"],H=G==="cross-faded"||G==="cross-faded-data-driven";if(A.kind==="constant")this.binders[b]=H?new Wn(A.value,I):new bn(A.value,I,F),v.push("/u_"+b);else if(A.kind==="source"||H){var J=so(b,F,"source");this.binders[b]=H?new Hn(A,F,j,l,J,s.id):new On(A,I,F,J),v.push("/a_"+b)}else{var rt=so(b,F,"composite");this.binders[b]=new Pn(A,I,F,j,l,rt),v.push("/z_"+b)}}}this.cacheKey=v.sort().join("")};An.prototype.getMaxValue=function(s){var l=this.binders[s];return l instanceof On||l instanceof Pn?l.maxValue:0},An.prototype.populatePaintArrays=function(s,l,f,v,b){for(var w in this.binders){var I=this.binders[w];(I instanceof On||I instanceof Pn||I instanceof Hn)&&I.populatePaintArray(s,l,f,v,b)}},An.prototype.setConstantPatternPositions=function(s,l){for(var f in this.binders){var v=this.binders[f];v instanceof Wn&&v.setConstantPatternPositions(s,l)}},An.prototype.updatePaintArrays=function(s,l,f,v,b){var w=!1;for(var I in s)for(var A=0,F=l.getPositions(I);A<F.length;A+=1){var j=F[A],G=f.feature(j.index);for(var H in this.binders){var J=this.binders[H];if((J instanceof On||J instanceof Pn||J instanceof Hn)&&J.expression.isStateDependent===!0){var rt=v.paint.get(H);J.expression=rt.value,J.updatePaintArray(j.start,j.end,G,s[I],b),w=!0}}}return w},An.prototype.defines=function(){var s=[];for(var l in this.binders){var f=this.binders[l];(f instanceof bn||f instanceof Wn)&&s.push.apply(s,f.uniformNames.map(function(v){return"#define HAS_UNIFORM_"+v}))}return s},An.prototype.getBinderAttributes=function(){var s=[];for(var l in this.binders){var f=this.binders[l];if(f instanceof On||f instanceof Pn)for(var v=0;v<f.paintVertexAttributes.length;v++)s.push(f.paintVertexAttributes[v].name);else if(f instanceof Hn)for(var b=0;b<xt.members.length;b++)s.push(xt.members[b].name)}return s},An.prototype.getBinderUniforms=function(){var s=[];for(var l in this.binders){var f=this.binders[l];if(f instanceof bn||f instanceof Wn||f instanceof Pn)for(var v=0,b=f.uniformNames;v<b.length;v+=1)s.push(b[v])}return s},An.prototype.getPaintVertexBuffers=function(){return this._buffers},An.prototype.getUniforms=function(s,l){var f=[];for(var v in this.binders){var b=this.binders[v];if(b instanceof bn||b instanceof Wn||b instanceof Pn)for(var w=0,I=b.uniformNames;w<I.length;w+=1){var A=I[w];if(l[A]){var F=b.getBinding(s,l[A],A);f.push({name:A,property:v,binding:F})}}}return f},An.prototype.setUniforms=function(s,l,f,v){for(var b=0,w=l;b<w.length;b+=1){var I=w[b],A=I.name,F=I.property;this.binders[F].setUniform(I.binding,v,f.get(F),A)}},An.prototype.updatePaintBuffers=function(s){for(var l in this._buffers=[],this.binders){var f=this.binders[l];if(s&&f instanceof Hn){var v=s.fromScale===2?f.zoomInPaintVertexBuffer:f.zoomOutPaintVertexBuffer;v&&this._buffers.push(v)}else(f instanceof On||f instanceof Pn)&&f.paintVertexBuffer&&this._buffers.push(f.paintVertexBuffer)}},An.prototype.upload=function(s){for(var l in this.binders){var f=this.binders[l];(f instanceof On||f instanceof Pn||f instanceof Hn)&&f.upload(s)}this.updatePaintBuffers()},An.prototype.destroy=function(){for(var s in this.binders){var l=this.binders[s];(l instanceof On||l instanceof Pn||l instanceof Hn)&&l.destroy()}};var ln=function(s,l,f){f===void 0&&(f=function(){return!0}),this.programConfigurations={};for(var v=0,b=s;v<b.length;v+=1){var w=b[v];this.programConfigurations[w.id]=new An(w,l,f)}this.needsUpload=!1,this._featureMap=new Lt,this._bufferOffset=0};function Ro(s,l){return{"text-opacity":["opacity"],"icon-opacity":["opacity"],"text-color":["fill_color"],"icon-color":["fill_color"],"text-halo-color":["halo_color"],"icon-halo-color":["halo_color"],"text-halo-blur":["halo_blur"],"icon-halo-blur":["halo_blur"],"text-halo-width":["halo_width"],"icon-halo-width":["halo_width"],"line-gap-width":["gapwidth"],"line-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"],"fill-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"],"fill-extrusion-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"]}[s]||[s.replace(l+"-","").replace(/-/g,"_")]}function so(s,l,f){var v={color:{source:Ka,composite:Ku},number:{source:$f,composite:Ka}},b=function(w){return{"line-pattern":{source:ur,composite:ur},"fill-pattern":{source:ur,composite:ur},"fill-extrusion-pattern":{source:ur,composite:ur}}[w]}(s);return b&&b[f]||v[l][f]}ln.prototype.populatePaintArrays=function(s,l,f,v,b,w){for(var I in this.programConfigurations)this.programConfigurations[I].populatePaintArrays(s,l,v,b,w);l.id!==void 0&&this._featureMap.add(l.id,f,this._bufferOffset,s),this._bufferOffset=s,this.needsUpload=!0},ln.prototype.updatePaintArrays=function(s,l,f,v){for(var b=0,w=f;b<w.length;b+=1){var I=w[b];this.needsUpload=this.programConfigurations[I.id].updatePaintArrays(s,this._featureMap,l,I,v)||this.needsUpload}},ln.prototype.get=function(s){return this.programConfigurations[s]},ln.prototype.upload=function(s){if(this.needsUpload){for(var l in this.programConfigurations)this.programConfigurations[l].upload(s);this.needsUpload=!1}},ln.prototype.destroy=function(){for(var s in this.programConfigurations)this.programConfigurations[s].destroy()},nn("ConstantBinder",bn),nn("CrossFadedConstantBinder",Wn),nn("SourceExpressionBinder",On),nn("CrossFadedCompositeBinder",Hn),nn("CompositeExpressionBinder",Pn),nn("ProgramConfiguration",An,{omit:["_buffers"]}),nn("ProgramConfigurationSet",ln);var eo=Math.pow(2,14)-1,Yo=-eo-1;function Ui(s){for(var l=8192/s.extent,f=s.loadGeometry(),v=0;v<f.length;v++)for(var b=f[v],w=0;w<b.length;w++){var I=b[w],A=Math.round(I.x*l),F=Math.round(I.y*l);I.x=B(A,Yo,eo),I.y=B(F,Yo,eo),(A<I.x||A>I.x+1||F<I.y||F>I.y+1)&&He("Geometry exceeds allowed extent, reduce your vector tile buffer size")}return f}function Ri(s,l){return{type:s.type,id:s.id,properties:s.properties,geometry:l?Ui(s):[]}}function Ms(s,l,f,v,b){s.emplaceBack(2*l+(v+1)/2,2*f+(b+1)/2)}var Mi=function(s){this.zoom=s.zoom,this.overscaling=s.overscaling,this.layers=s.layers,this.layerIds=this.layers.map(function(l){return l.id}),this.index=s.index,this.hasPattern=!1,this.layoutVertexArray=new Bf,this.indexArray=new Uf,this.segments=new st,this.programConfigurations=new ln(s.layers,s.zoom),this.stateDependentLayerIds=this.layers.filter(function(l){return l.isStateDependent()}).map(function(l){return l.id})};function ic(s,l){for(var f=0;f<s.length;f++)if(oc(l,s[f]))return!0;for(var v=0;v<l.length;v++)if(oc(s,l[v]))return!0;return!!$h(s,l)}function As(s,l,f){return!!oc(s,l)||!!Qu(l,s,f)}function Tl(s,l){if(s.length===1)return Pd(l,s[0]);for(var f=0;f<l.length;f++)for(var v=l[f],b=0;b<v.length;b++)if(oc(s,v[b]))return!0;for(var w=0;w<s.length;w++)if(Pd(l,s[w]))return!0;for(var I=0;I<l.length;I++)if($h(s,l[I]))return!0;return!1}function Ju(s,l,f){if(s.length>1){if($h(s,l))return!0;for(var v=0;v<l.length;v++)if(Qu(l[v],s,f))return!0}for(var b=0;b<s.length;b++)if(Qu(s[b],l,f))return!0;return!1}function $h(s,l){if(s.length===0||l.length===0)return!1;for(var f=0;f<s.length-1;f++)for(var v=s[f],b=s[f+1],w=0;w<l.length-1;w++)if(Np(v,b,l[w],l[w+1]))return!0;return!1}function Np(s,l,f,v){return de(s,f,v)!==de(l,f,v)&&de(s,l,f)!==de(s,l,v)}function Qu(s,l,f){var v=f*f;if(l.length===1)return s.distSqr(l[0])<v;for(var b=1;b<l.length;b++)if(jh(s,l[b-1],l[b])<v)return!0;return!1}function jh(s,l,f){var v=l.distSqr(f);if(v===0)return s.distSqr(l);var b=((s.x-l.x)*(f.x-l.x)+(s.y-l.y)*(f.y-l.y))/v;return s.distSqr(b<0?l:b>1?f:f.sub(l)._mult(b)._add(l))}function Pd(s,l){for(var f,v,b,w=!1,I=0;I<s.length;I++)for(var A=0,F=(f=s[I]).length-1;A<f.length;F=A++)(v=f[A]).y>l.y!=(b=f[F]).y>l.y&&l.x<(b.x-v.x)*(l.y-v.y)/(b.y-v.y)+v.x&&(w=!w);return w}function oc(s,l){for(var f=!1,v=0,b=s.length-1;v<s.length;b=v++){var w=s[v],I=s[b];w.y>l.y!=I.y>l.y&&l.x<(I.x-w.x)*(l.y-w.y)/(I.y-w.y)+w.x&&(f=!f)}return f}function jc(s,l,f){var v=f[0],b=f[2];if(s.x<v.x&&l.x<v.x||s.x>b.x&&l.x>b.x||s.y<v.y&&l.y<v.y||s.y>b.y&&l.y>b.y)return!1;var w=de(s,l,f[0]);return w!==de(s,l,f[1])||w!==de(s,l,f[2])||w!==de(s,l,f[3])}function ac(s,l,f){var v=l.paint.get(s).value;return v.kind==="constant"?v.value:f.programConfigurations.get(l.id).getMaxValue(s)}function fa(s){return Math.sqrt(s[0]*s[0]+s[1]*s[1])}function Ml(s,l,f,v,b){if(!l[0]&&!l[1])return s;var w=_.convert(l)._mult(b);f==="viewport"&&w._rotate(-v);for(var I=[],A=0;A<s.length;A++)I.push(s[A].sub(w));return I}Mi.prototype.populate=function(s,l,f){var v=this.layers[0],b=[],w=null;v.type==="circle"&&(w=v.layout.get("circle-sort-key"));for(var I=0,A=s;I<A.length;I+=1){var F=A[I],j=F.feature,G=F.id,H=F.index,J=F.sourceLayerIndex,rt=this.layers[0]._featureFilter.needGeometry,dt=Ri(j,rt);if(this.layers[0]._featureFilter.filter(new Sn(this.zoom),dt,f)){var _t=w?w.evaluate(dt,{},f):void 0,Pt={id:G,properties:j.properties,type:j.type,sourceLayerIndex:J,index:H,geometry:rt?dt.geometry:Ui(j),patterns:{},sortKey:_t};b.push(Pt)}}w&&b.sort(function(Oe,hn){return Oe.sortKey-hn.sortKey});for(var St=0,Nt=b;St<Nt.length;St+=1){var qt=Nt[St],Zt=qt.geometry,ee=qt.index,fe=qt.sourceLayerIndex,Ee=s[ee].feature;this.addFeature(qt,Zt,ee,f),l.featureIndex.insert(Ee,Zt,ee,fe,this.index)}},Mi.prototype.update=function(s,l,f){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(s,l,this.stateDependentLayers,f)},Mi.prototype.isEmpty=function(){return this.layoutVertexArray.length===0},Mi.prototype.uploadPending=function(){return!this.uploaded||this.programConfigurations.needsUpload},Mi.prototype.upload=function(s){this.uploaded||(this.layoutVertexBuffer=s.createVertexBuffer(this.layoutVertexArray,it),this.indexBuffer=s.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(s),this.uploaded=!0},Mi.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())},Mi.prototype.addFeature=function(s,l,f,v){for(var b=0,w=l;b<w.length;b+=1)for(var I=0,A=w[b];I<A.length;I+=1){var F=A[I],j=F.x,G=F.y;if(!(j<0||j>=8192||G<0||G>=8192)){var H=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray,s.sortKey),J=H.vertexLength;Ms(this.layoutVertexArray,j,G,-1,-1),Ms(this.layoutVertexArray,j,G,1,-1),Ms(this.layoutVertexArray,j,G,1,1),Ms(this.layoutVertexArray,j,G,-1,1),this.indexArray.emplaceBack(J,J+1,J+2),this.indexArray.emplaceBack(J,J+3,J+2),H.vertexLength+=4,H.primitiveLength+=2}}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,s,f,{},v)},nn("CircleBucket",Mi,{omit:["layers"]});var qc=new Ua({"circle-sort-key":new rn(at.layout_circle["circle-sort-key"])}),qh={paint:new Ua({"circle-radius":new rn(at.paint_circle["circle-radius"]),"circle-color":new rn(at.paint_circle["circle-color"]),"circle-blur":new rn(at.paint_circle["circle-blur"]),"circle-opacity":new rn(at.paint_circle["circle-opacity"]),"circle-translate":new cn(at.paint_circle["circle-translate"]),"circle-translate-anchor":new cn(at.paint_circle["circle-translate-anchor"]),"circle-pitch-scale":new cn(at.paint_circle["circle-pitch-scale"]),"circle-pitch-alignment":new cn(at.paint_circle["circle-pitch-alignment"]),"circle-stroke-width":new rn(at.paint_circle["circle-stroke-width"]),"circle-stroke-color":new rn(at.paint_circle["circle-stroke-color"]),"circle-stroke-opacity":new rn(at.paint_circle["circle-stroke-opacity"])}),layout:qc},Yr=typeof Float32Array!="undefined"?Float32Array:Array;function Su(s){return s[0]=1,s[1]=0,s[2]=0,s[3]=0,s[4]=0,s[5]=1,s[6]=0,s[7]=0,s[8]=0,s[9]=0,s[10]=1,s[11]=0,s[12]=0,s[13]=0,s[14]=0,s[15]=1,s}function ds(s,l,f){var v=l[0],b=l[1],w=l[2],I=l[3],A=l[4],F=l[5],j=l[6],G=l[7],H=l[8],J=l[9],rt=l[10],dt=l[11],_t=l[12],Pt=l[13],St=l[14],Nt=l[15],qt=f[0],Zt=f[1],ee=f[2],fe=f[3];return s[0]=qt*v+Zt*A+ee*H+fe*_t,s[1]=qt*b+Zt*F+ee*J+fe*Pt,s[2]=qt*w+Zt*j+ee*rt+fe*St,s[3]=qt*I+Zt*G+ee*dt+fe*Nt,s[4]=(qt=f[4])*v+(Zt=f[5])*A+(ee=f[6])*H+(fe=f[7])*_t,s[5]=qt*b+Zt*F+ee*J+fe*Pt,s[6]=qt*w+Zt*j+ee*rt+fe*St,s[7]=qt*I+Zt*G+ee*dt+fe*Nt,s[8]=(qt=f[8])*v+(Zt=f[9])*A+(ee=f[10])*H+(fe=f[11])*_t,s[9]=qt*b+Zt*F+ee*J+fe*Pt,s[10]=qt*w+Zt*j+ee*rt+fe*St,s[11]=qt*I+Zt*G+ee*dt+fe*Nt,s[12]=(qt=f[12])*v+(Zt=f[13])*A+(ee=f[14])*H+(fe=f[15])*_t,s[13]=qt*b+Zt*F+ee*J+fe*Pt,s[14]=qt*w+Zt*j+ee*rt+fe*St,s[15]=qt*I+Zt*G+ee*dt+fe*Nt,s}Math.hypot||(Math.hypot=function(){for(var s=arguments,l=0,f=arguments.length;f--;)l+=s[f]*s[f];return Math.sqrt(l)});var Gc,wx=ds;function Fp(s,l,f){var v=l[0],b=l[1],w=l[2],I=l[3];return s[0]=f[0]*v+f[4]*b+f[8]*w+f[12]*I,s[1]=f[1]*v+f[5]*b+f[9]*w+f[13]*I,s[2]=f[2]*v+f[6]*b+f[10]*w+f[14]*I,s[3]=f[3]*v+f[7]*b+f[11]*w+f[15]*I,s}Gc=new Yr(3),Yr!=Float32Array&&(Gc[0]=0,Gc[1]=0,Gc[2]=0),function(){var s=new Yr(4);Yr!=Float32Array&&(s[0]=0,s[1]=0,s[2]=0,s[3]=0)}();var Fy=(function(){var s=new Yr(2);Yr!=Float32Array&&(s[0]=0,s[1]=0)}(),function(s){function l(f){s.call(this,f,qh)}return s&&(l.__proto__=s),(l.prototype=Object.create(s&&s.prototype)).constructor=l,l.prototype.createBucket=function(f){return new Mi(f)},l.prototype.queryRadius=function(f){var v=f;return ac("circle-radius",this,v)+ac("circle-stroke-width",this,v)+fa(this.paint.get("circle-translate"))},l.prototype.queryIntersectsFeature=function(f,v,b,w,I,A,F,j){for(var G=Ml(f,this.paint.get("circle-translate"),this.paint.get("circle-translate-anchor"),A.angle,F),H=this.paint.get("circle-radius").evaluate(v,b)+this.paint.get("circle-stroke-width").evaluate(v,b),J=this.paint.get("circle-pitch-alignment")==="map",rt=J?G:function(Ee,Oe){return Ee.map(function(hn){return zp(hn,Oe)})}(G,j),dt=J?H*F:H,_t=0,Pt=w;_t<Pt.length;_t+=1)for(var St=0,Nt=Pt[_t];St<Nt.length;St+=1){var qt=Nt[St],Zt=J?qt:zp(qt,j),ee=dt,fe=Fp([],[qt.x,qt.y,0,1],j);if(this.paint.get("circle-pitch-scale")==="viewport"&&this.paint.get("circle-pitch-alignment")==="map"?ee*=fe[3]/A.cameraToCenterDistance:this.paint.get("circle-pitch-scale")==="map"&&this.paint.get("circle-pitch-alignment")==="viewport"&&(ee*=A.cameraToCenterDistance/fe[3]),As(rt,Zt,ee))return!0}return!1},l}(rc));function zp(s,l){var f=Fp([],[s.x,s.y,0,1],l);return new _(f[0]/f[3],f[1]/f[3])}var fv=function(s){function l(){s.apply(this,arguments)}return s&&(l.__proto__=s),(l.prototype=Object.create(s&&s.prototype)).constructor=l,l}(Mi);function Wc(s,l,f,v){var b=l.width,w=l.height;if(v){if(v instanceof Uint8ClampedArray)v=new Uint8Array(v.buffer);else if(v.length!==b*w*f)throw new RangeError("mismatched image size")}else v=new Uint8Array(b*w*f);return s.width=b,s.height=w,s.data=v,s}function zg(s,l,f){var v=l.width,b=l.height;if(v!==s.width||b!==s.height){var w=Wc({},{width:v,height:b},f);zy(s,w,{x:0,y:0},{x:0,y:0},{width:Math.min(s.width,v),height:Math.min(s.height,b)},f),s.width=v,s.height=b,s.data=w.data}}function zy(s,l,f,v,b,w){if(b.width===0||b.height===0)return l;if(b.width>s.width||b.height>s.height||f.x>s.width-b.width||f.y>s.height-b.height)throw new RangeError("out of range source coordinates for image copy");if(b.width>l.width||b.height>l.height||v.x>l.width-b.width||v.y>l.height-b.height)throw new RangeError("out of range destination coordinates for image copy");for(var I=s.data,A=l.data,F=0;F<b.height;F++)for(var j=((f.y+F)*s.width+f.x)*w,G=((v.y+F)*l.width+v.x)*w,H=0;H<b.width*w;H++)A[G+H]=I[j+H];return l}nn("HeatmapBucket",fv,{omit:["layers"]});var Bp=function(s,l){Wc(this,s,1,l)};Bp.prototype.resize=function(s){zg(this,s,1)},Bp.prototype.clone=function(){return new Bp({width:this.width,height:this.height},new Uint8Array(this.data))},Bp.copy=function(s,l,f,v,b){zy(s,l,f,v,b,1)};var Ks=function(s,l){Wc(this,s,4,l)};Ks.prototype.resize=function(s){zg(this,s,4)},Ks.prototype.replace=function(s,l){l?this.data.set(s):this.data=s instanceof Uint8ClampedArray?new Uint8Array(s.buffer):s},Ks.prototype.clone=function(){return new Ks({width:this.width,height:this.height},new Uint8Array(this.data))},Ks.copy=function(s,l,f,v,b){zy(s,l,f,v,b,4)},nn("AlphaImage",Bp),nn("RGBAImage",Ks);var Dw={paint:new Ua({"heatmap-radius":new rn(at.paint_heatmap["heatmap-radius"]),"heatmap-weight":new rn(at.paint_heatmap["heatmap-weight"]),"heatmap-intensity":new cn(at.paint_heatmap["heatmap-intensity"]),"heatmap-color":new ps(at.paint_heatmap["heatmap-color"]),"heatmap-opacity":new cn(at.paint_heatmap["heatmap-opacity"])})};function Nw(s){var l={},f=s.resolution||256,v=s.clips?s.clips.length:1,b=s.image||new Ks({width:f,height:v}),w=function(dt,_t,Pt){l[s.evaluationKey]=Pt;var St=s.expression.evaluate(l);b.data[dt+_t+0]=Math.floor(255*St.r/St.a),b.data[dt+_t+1]=Math.floor(255*St.g/St.a),b.data[dt+_t+2]=Math.floor(255*St.b/St.a),b.data[dt+_t+3]=Math.floor(255*St.a)};if(s.clips)for(var I=0,A=0;I<v;++I,A+=4*f)for(var F=0,j=0;F<f;F++,j+=4){var G=F/(f-1),H=s.clips[I];w(A,j,H.start*(1-G)+H.end*G)}else for(var J=0,rt=0;J<f;J++,rt+=4)w(0,rt,J/(f-1));return b}var Sx=function(s){function l(f){s.call(this,f,Dw),this._updateColorRamp()}return s&&(l.__proto__=s),(l.prototype=Object.create(s&&s.prototype)).constructor=l,l.prototype.createBucket=function(f){return new fv(f)},l.prototype._handleSpecialPaintPropertyUpdate=function(f){f==="heatmap-color"&&this._updateColorRamp()},l.prototype._updateColorRamp=function(){this.colorRamp=Nw({expression:this._transitionablePaint._values["heatmap-color"].value.expression,evaluationKey:"heatmapDensity",image:this.colorRamp}),this.colorRampTexture=null},l.prototype.resize=function(){this.heatmapFbo&&(this.heatmapFbo.destroy(),this.heatmapFbo=null)},l.prototype.queryRadius=function(){return 0},l.prototype.queryIntersectsFeature=function(){return!1},l.prototype.hasOffscreenPass=function(){return this.paint.get("heatmap-opacity")!==0&&this.visibility!=="none"},l}(rc),Fw={paint:new Ua({"hillshade-illumination-direction":new cn(at.paint_hillshade["hillshade-illumination-direction"]),"hillshade-illumination-anchor":new cn(at.paint_hillshade["hillshade-illumination-anchor"]),"hillshade-exaggeration":new cn(at.paint_hillshade["hillshade-exaggeration"]),"hillshade-shadow-color":new cn(at.paint_hillshade["hillshade-shadow-color"]),"hillshade-highlight-color":new cn(at.paint_hillshade["hillshade-highlight-color"]),"hillshade-accent-color":new cn(at.paint_hillshade["hillshade-accent-color"])})},Ex=function(s){function l(f){s.call(this,f,Fw)}return s&&(l.__proto__=s),(l.prototype=Object.create(s&&s.prototype)).constructor=l,l.prototype.hasOffscreenPass=function(){return this.paint.get("hillshade-exaggeration")!==0&&this.visibility!=="none"},l}(rc),_P=Oo([{name:"a_pos",components:2,type:"Int16"}],4).members,hv=By,qr=By;function By(s,l,f){f=f||2;var v,b,w,I,A,F,j,G=l&&l.length,H=G?l[0]*f:s.length,J=zw(s,0,H,f,!0),rt=[];if(!J||J.next===J.prev)return rt;if(G&&(J=function(_t,Pt,St,Nt){var qt,Zt,ee,fe=[];for(qt=0,Zt=Pt.length;qt<Zt;qt++)(ee=zw(_t,Pt[qt]*Nt,qt<Zt-1?Pt[qt+1]*Nt:_t.length,Nt,!1))===ee.next&&(ee.steiner=!0),fe.push(Al(ee));for(fe.sort(Uy),qt=0;qt<fe.length;qt++)Cx(fe[qt],St),St=sc(St,St.next);return St}(s,l,J,f)),s.length>80*f){v=w=s[0],b=I=s[1];for(var dt=f;dt<H;dt+=f)(A=s[dt])<v&&(v=A),(F=s[dt+1])<b&&(b=F),A>w&&(w=A),F>I&&(I=F);j=(j=Math.max(w-v,I-b))!==0?1/j:0}return Bg(J,rt,f,v,b,j),rt}function zw(s,l,f,v,b){var w,I;if(b===jy(s,l,f,v)>0)for(w=l;w<f;w+=v)I=Gh(w,s[w],s[w+1],I);else for(w=f-v;w>=l;w-=v)I=Gh(w,s[w],s[w+1],I);return I&&Td(I,I.next)&&(dv(I),I=I.next),I}function sc(s,l){if(!s)return s;l||(l=s);var f,v=s;do if(f=!1,v.steiner||!Td(v,v.next)&&ko(v.prev,v,v.next)!==0)v=v.next;else{if(dv(v),(v=l=v.prev)===v.next)break;f=!0}while(f||v!==l);return l}function Bg(s,l,f,v,b,w,I){if(s){!I&&w&&function(G,H,J,rt){var dt=G;do dt.z===null&&(dt.z=Vy(dt.x,dt.y,H,J,rt)),dt.prevZ=dt.prev,dt.nextZ=dt.next,dt=dt.next;while(dt!==G);dt.prevZ.nextZ=null,dt.prevZ=null,function(_t){var Pt,St,Nt,qt,Zt,ee,fe,Ee,Oe=1;do{for(St=_t,_t=null,Zt=null,ee=0;St;){for(ee++,Nt=St,fe=0,Pt=0;Pt<Oe&&(fe++,Nt=Nt.nextZ);Pt++);for(Ee=Oe;fe>0||Ee>0&&Nt;)fe!==0&&(Ee===0||!Nt||St.z<=Nt.z)?(qt=St,St=St.nextZ,fe--):(qt=Nt,Nt=Nt.nextZ,Ee--),Zt?Zt.nextZ=qt:_t=qt,qt.prevZ=Zt,Zt=qt;St=Nt}Zt.nextZ=null,Oe*=2}while(ee>1)}(dt)}(s,v,b,w);for(var A,F,j=s;s.prev!==s.next;)if(A=s.prev,F=s.next,w?bP(s,v,b,w):xP(s))l.push(A.i/f),l.push(s.i/f),l.push(F.i/f),dv(s),s=F.next,j=F.next;else if((s=F)===j){I?I===1?Bg(s=uc(sc(s),l,f),l,f,v,b,w,2):I===2&&wP(s,l,f,v,b,w):Bg(sc(s),l,f,v,b,w,1);break}}}function xP(s){var l=s.prev,f=s,v=s.next;if(ko(l,f,v)>=0)return!1;for(var b=s.next.next;b!==s.prev;){if(Ll(l.x,l.y,f.x,f.y,v.x,v.y,b.x,b.y)&&ko(b.prev,b,b.next)>=0)return!1;b=b.next}return!0}function bP(s,l,f,v){var b=s.prev,w=s,I=s.next;if(ko(b,w,I)>=0)return!1;for(var A=b.x>w.x?b.x>I.x?b.x:I.x:w.x>I.x?w.x:I.x,F=b.y>w.y?b.y>I.y?b.y:I.y:w.y>I.y?w.y:I.y,j=Vy(b.x<w.x?b.x<I.x?b.x:I.x:w.x<I.x?w.x:I.x,b.y<w.y?b.y<I.y?b.y:I.y:w.y<I.y?w.y:I.y,l,f,v),G=Vy(A,F,l,f,v),H=s.prevZ,J=s.nextZ;H&&H.z>=j&&J&&J.z<=G;){if(H!==s.prev&&H!==s.next&&Ll(b.x,b.y,w.x,w.y,I.x,I.y,H.x,H.y)&&ko(H.prev,H,H.next)>=0||(H=H.prevZ,J!==s.prev&&J!==s.next&&Ll(b.x,b.y,w.x,w.y,I.x,I.y,J.x,J.y)&&ko(J.prev,J,J.next)>=0))return!1;J=J.nextZ}for(;H&&H.z>=j;){if(H!==s.prev&&H!==s.next&&Ll(b.x,b.y,w.x,w.y,I.x,I.y,H.x,H.y)&&ko(H.prev,H,H.next)>=0)return!1;H=H.prevZ}for(;J&&J.z<=G;){if(J!==s.prev&&J!==s.next&&Ll(b.x,b.y,w.x,w.y,I.x,I.y,J.x,J.y)&&ko(J.prev,J,J.next)>=0)return!1;J=J.nextZ}return!0}function uc(s,l,f){var v=s;do{var b=v.prev,w=v.next.next;!Td(b,w)&&Px(b,v,v.next,w)&&Md(b,w)&&Md(w,b)&&(l.push(b.i/f),l.push(v.i/f),l.push(w.i/f),dv(v),dv(v.next),v=s=w),v=v.next}while(v!==s);return sc(v)}function wP(s,l,f,v,b,w){var I=s;do{for(var A=I.next.next;A!==I.prev;){if(I.i!==A.i&&Ix(I,A)){var F=$y(I,A);return I=sc(I,I.next),F=sc(F,F.next),Bg(I,l,f,v,b,w),void Bg(F,l,f,v,b,w)}A=A.next}I=I.next}while(I!==s)}function Uy(s,l){return s.x-l.x}function Cx(s,l){if(l=function(v,b){var w,I=b,A=v.x,F=v.y,j=-1/0;do{if(F<=I.y&&F>=I.next.y&&I.next.y!==I.y){var G=I.x+(F-I.y)*(I.next.x-I.x)/(I.next.y-I.y);if(G<=A&&G>j){if(j=G,G===A){if(F===I.y)return I;if(F===I.next.y)return I.next}w=I.x<I.next.x?I:I.next}}I=I.next}while(I!==b);if(!w)return null;if(A===j)return w;var H,J=w,rt=w.x,dt=w.y,_t=1/0;I=w;do A>=I.x&&I.x>=rt&&A!==I.x&&Ll(F<dt?A:j,F,rt,dt,F<dt?j:A,F,I.x,I.y)&&(H=Math.abs(F-I.y)/(A-I.x),Md(I,v)&&(H<_t||H===_t&&(I.x>w.x||I.x===w.x&&Bw(w,I)))&&(w=I,_t=H)),I=I.next;while(I!==J);return w}(s,l)){var f=$y(l,s);sc(l,l.next),sc(f,f.next)}}function Bw(s,l){return ko(s.prev,s,l.prev)<0&&ko(l.next,s,s.next)<0}function Vy(s,l,f,v,b){return(s=1431655765&((s=858993459&((s=252645135&((s=16711935&((s=32767*(s-f)*b)|s<<8))|s<<4))|s<<2))|s<<1))|(l=1431655765&((l=858993459&((l=252645135&((l=16711935&((l=32767*(l-v)*b)|l<<8))|l<<4))|l<<2))|l<<1))<<1}function Al(s){var l=s,f=s;do(l.x<f.x||l.x===f.x&&l.y<f.y)&&(f=l),l=l.next;while(l!==s);return f}function Ll(s,l,f,v,b,w,I,A){return(b-I)*(l-A)-(s-I)*(w-A)>=0&&(s-I)*(v-A)-(f-I)*(l-A)>=0&&(f-I)*(w-A)-(b-I)*(v-A)>=0}function Ix(s,l){return s.next.i!==l.i&&s.prev.i!==l.i&&!function(f,v){var b=f;do{if(b.i!==f.i&&b.next.i!==f.i&&b.i!==v.i&&b.next.i!==v.i&&Px(b,b.next,f,v))return!0;b=b.next}while(b!==f);return!1}(s,l)&&(Md(s,l)&&Md(l,s)&&function(f,v){var b=f,w=!1,I=(f.x+v.x)/2,A=(f.y+v.y)/2;do b.y>A!=b.next.y>A&&b.next.y!==b.y&&I<(b.next.x-b.x)*(A-b.y)/(b.next.y-b.y)+b.x&&(w=!w),b=b.next;while(b!==f);return w}(s,l)&&(ko(s.prev,s,l.prev)||ko(s,l.prev,l))||Td(s,l)&&ko(s.prev,s,s.next)>0&&ko(l.prev,l,l.next)>0)}function ko(s,l,f){return(l.y-s.y)*(f.x-l.x)-(l.x-s.x)*(f.y-l.y)}function Td(s,l){return s.x===l.x&&s.y===l.y}function Px(s,l,f,v){var b=pv(ko(s,l,f)),w=pv(ko(s,l,v)),I=pv(ko(f,v,s)),A=pv(ko(f,v,l));return b!==w&&I!==A||!(b!==0||!Ug(s,f,l))||!(w!==0||!Ug(s,v,l))||!(I!==0||!Ug(f,s,v))||!(A!==0||!Ug(f,l,v))}function Ug(s,l,f){return l.x<=Math.max(s.x,f.x)&&l.x>=Math.min(s.x,f.x)&&l.y<=Math.max(s.y,f.y)&&l.y>=Math.min(s.y,f.y)}function pv(s){return s>0?1:s<0?-1:0}function Md(s,l){return ko(s.prev,s,s.next)<0?ko(s,l,s.next)>=0&&ko(s,s.prev,l)>=0:ko(s,l,s.prev)<0||ko(s,s.next,l)<0}function $y(s,l){var f=new jf(s.i,s.x,s.y),v=new jf(l.i,l.x,l.y),b=s.next,w=l.prev;return s.next=l,l.prev=s,f.next=b,b.prev=f,v.next=f,f.prev=v,w.next=v,v.prev=w,v}function Gh(s,l,f,v){var b=new jf(s,l,f);return v?(b.next=v.next,b.prev=v,v.next.prev=b,v.next=b):(b.prev=b,b.next=b),b}function dv(s){s.next.prev=s.prev,s.prev.next=s.next,s.prevZ&&(s.prevZ.nextZ=s.nextZ),s.nextZ&&(s.nextZ.prevZ=s.prevZ)}function jf(s,l,f){this.i=s,this.x=l,this.y=f,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function jy(s,l,f,v){for(var b=0,w=l,I=f-v;w<f;w+=v)b+=(s[I]-s[w])*(s[w+1]+s[I+1]),I=w;return b}function Uw(s,l,f,v,b){(function w(I,A,F,j,G){for(;j>F;){if(j-F>600){var H=j-F+1,J=A-F+1,rt=Math.log(H),dt=.5*Math.exp(2*rt/3),_t=.5*Math.sqrt(rt*dt*(H-dt)/H)*(J-H/2<0?-1:1);w(I,A,Math.max(F,Math.floor(A-J*dt/H+_t)),Math.min(j,Math.floor(A+(H-J)*dt/H+_t)),G)}var Pt=I[A],St=F,Nt=j;for(Ad(I,F,A),G(I[j],Pt)>0&&Ad(I,F,j);St<Nt;){for(Ad(I,St,Nt),St++,Nt--;G(I[St],Pt)<0;)St++;for(;G(I[Nt],Pt)>0;)Nt--}G(I[F],Pt)===0?Ad(I,F,Nt):Ad(I,++Nt,j),Nt<=A&&(F=Nt+1),A<=Nt&&(j=Nt-1)}})(s,l,f||0,v||s.length-1,b||SP)}function Ad(s,l,f){var v=s[l];s[l]=s[f],s[f]=v}function SP(s,l){return s<l?-1:s>l?1:0}function Tx(s,l){var f=s.length;if(f<=1)return[s];for(var v,b,w=[],I=0;I<f;I++){var A=he(s[I]);A!==0&&(s[I].area=Math.abs(A),b===void 0&&(b=A<0),b===A<0?(v&&w.push(v),v=[s[I]]):v.push(s[I]))}if(v&&w.push(v),l>1)for(var F=0;F<w.length;F++)w[F].length<=l||(Uw(w[F],l,1,w[F].length-1,EP),w[F]=w[F].slice(0,l));return w}function EP(s,l){return l.area-s.area}function qy(s,l,f){for(var v=f.patternDependencies,b=!1,w=0,I=l;w<I.length;w+=1){var A=I[w].paint.get(s+"-pattern");A.isConstant()||(b=!0);var F=A.constantOr(null);F&&(b=!0,v[F.to]=!0,v[F.from]=!0)}return b}function Gy(s,l,f,v,b){for(var w=b.patternDependencies,I=0,A=l;I<A.length;I+=1){var F=A[I],j=F.paint.get(s+"-pattern").value;if(j.kind!=="constant"){var G=j.evaluate({zoom:v-1},f,{},b.availableImages),H=j.evaluate({zoom:v},f,{},b.availableImages),J=j.evaluate({zoom:v+1},f,{},b.availableImages);H=H&&H.name?H.name:H,J=J&&J.name?J.name:J,w[G=G&&G.name?G.name:G]=!0,w[H]=!0,w[J]=!0,f.patterns[F.id]={min:G,mid:H,max:J}}}return f}By.deviation=function(s,l,f,v){var b=l&&l.length,w=Math.abs(jy(s,0,b?l[0]*f:s.length,f));if(b)for(var I=0,A=l.length;I<A;I++)w-=Math.abs(jy(s,l[I]*f,I<A-1?l[I+1]*f:s.length,f));var F=0;for(I=0;I<v.length;I+=3){var j=v[I]*f,G=v[I+1]*f,H=v[I+2]*f;F+=Math.abs((s[j]-s[H])*(s[G+1]-s[j+1])-(s[j]-s[G])*(s[H+1]-s[j+1]))}return w===0&&F===0?0:Math.abs((F-w)/w)},By.flatten=function(s){for(var l=s[0][0].length,f={vertices:[],holes:[],dimensions:l},v=0,b=0;b<s.length;b++){for(var w=0;w<s[b].length;w++)for(var I=0;I<l;I++)f.vertices.push(s[b][w][I]);b>0&&f.holes.push(v+=s[b-1].length)}return f},hv.default=qr;var Hc=function(s){this.zoom=s.zoom,this.overscaling=s.overscaling,this.layers=s.layers,this.layerIds=this.layers.map(function(l){return l.id}),this.index=s.index,this.hasPattern=!1,this.patternFeatures=[],this.layoutVertexArray=new Bf,this.indexArray=new Uf,this.indexArray2=new Id,this.programConfigurations=new ln(s.layers,s.zoom),this.segments=new st,this.segments2=new st,this.stateDependentLayerIds=this.layers.filter(function(l){return l.isStateDependent()}).map(function(l){return l.id})};Hc.prototype.populate=function(s,l,f){this.hasPattern=qy("fill",this.layers,l);for(var v=this.layers[0].layout.get("fill-sort-key"),b=[],w=0,I=s;w<I.length;w+=1){var A=I[w],F=A.feature,j=A.id,G=A.index,H=A.sourceLayerIndex,J=this.layers[0]._featureFilter.needGeometry,rt=Ri(F,J);if(this.layers[0]._featureFilter.filter(new Sn(this.zoom),rt,f)){var dt=v?v.evaluate(rt,{},f,l.availableImages):void 0,_t={id:j,properties:F.properties,type:F.type,sourceLayerIndex:H,index:G,geometry:J?rt.geometry:Ui(F),patterns:{},sortKey:dt};b.push(_t)}}v&&b.sort(function(Ee,Oe){return Ee.sortKey-Oe.sortKey});for(var Pt=0,St=b;Pt<St.length;Pt+=1){var Nt=St[Pt],qt=Nt.geometry,Zt=Nt.index,ee=Nt.sourceLayerIndex;if(this.hasPattern){var fe=Gy("fill",this.layers,Nt,this.zoom,l);this.patternFeatures.push(fe)}else this.addFeature(Nt,qt,Zt,f,{});l.featureIndex.insert(s[Zt].feature,qt,Zt,ee,this.index)}},Hc.prototype.update=function(s,l,f){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(s,l,this.stateDependentLayers,f)},Hc.prototype.addFeatures=function(s,l,f){for(var v=0,b=this.patternFeatures;v<b.length;v+=1){var w=b[v];this.addFeature(w,w.geometry,w.index,l,f)}},Hc.prototype.isEmpty=function(){return this.layoutVertexArray.length===0},Hc.prototype.uploadPending=function(){return!this.uploaded||this.programConfigurations.needsUpload},Hc.prototype.upload=function(s){this.uploaded||(this.layoutVertexBuffer=s.createVertexBuffer(this.layoutVertexArray,_P),this.indexBuffer=s.createIndexBuffer(this.indexArray),this.indexBuffer2=s.createIndexBuffer(this.indexArray2)),this.programConfigurations.upload(s),this.uploaded=!0},Hc.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.indexBuffer2.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.segments2.destroy())},Hc.prototype.addFeature=function(s,l,f,v,b){for(var w=0,I=Tx(l,500);w<I.length;w+=1){for(var A=I[w],F=0,j=0,G=A;j<G.length;j+=1)F+=G[j].length;for(var H=this.segments.prepareSegment(F,this.layoutVertexArray,this.indexArray),J=H.vertexLength,rt=[],dt=[],_t=0,Pt=A;_t<Pt.length;_t+=1){var St=Pt[_t];if(St.length!==0){St!==A[0]&&dt.push(rt.length/2);var Nt=this.segments2.prepareSegment(St.length,this.layoutVertexArray,this.indexArray2),qt=Nt.vertexLength;this.layoutVertexArray.emplaceBack(St[0].x,St[0].y),this.indexArray2.emplaceBack(qt+St.length-1,qt),rt.push(St[0].x),rt.push(St[0].y);for(var Zt=1;Zt<St.length;Zt++)this.layoutVertexArray.emplaceBack(St[Zt].x,St[Zt].y),this.indexArray2.emplaceBack(qt+Zt-1,qt+Zt),rt.push(St[Zt].x),rt.push(St[Zt].y);Nt.vertexLength+=St.length,Nt.primitiveLength+=St.length}}for(var ee=hv(rt,dt),fe=0;fe<ee.length;fe+=3)this.indexArray.emplaceBack(J+ee[fe],J+ee[fe+1],J+ee[fe+2]);H.vertexLength+=F,H.primitiveLength+=ee.length/3}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,s,f,b,v)},nn("FillBucket",Hc,{omit:["layers","patternFeatures"]});var Vw=new Ua({"fill-sort-key":new rn(at.layout_fill["fill-sort-key"])}),$w={paint:new Ua({"fill-antialias":new cn(at.paint_fill["fill-antialias"]),"fill-opacity":new rn(at.paint_fill["fill-opacity"]),"fill-color":new rn(at.paint_fill["fill-color"]),"fill-outline-color":new rn(at.paint_fill["fill-outline-color"]),"fill-translate":new cn(at.paint_fill["fill-translate"]),"fill-translate-anchor":new cn(at.paint_fill["fill-translate-anchor"]),"fill-pattern":new zf(at.paint_fill["fill-pattern"])}),layout:Vw},tl=function(s){function l(f){s.call(this,f,$w)}return s&&(l.__proto__=s),(l.prototype=Object.create(s&&s.prototype)).constructor=l,l.prototype.recalculate=function(f,v){s.prototype.recalculate.call(this,f,v);var b=this.paint._values["fill-outline-color"];b.value.kind==="constant"&&b.value.value===void 0&&(this.paint._values["fill-outline-color"]=this.paint._values["fill-color"])},l.prototype.createBucket=function(f){return new Hc(f)},l.prototype.queryRadius=function(){return fa(this.paint.get("fill-translate"))},l.prototype.queryIntersectsFeature=function(f,v,b,w,I,A,F){return Tl(Ml(f,this.paint.get("fill-translate"),this.paint.get("fill-translate-anchor"),A.angle,F),w)},l.prototype.isTileClipped=function(){return!0},l}(rc),qf=Oo([{name:"a_pos",components:2,type:"Int16"},{name:"a_normal_ed",components:4,type:"Int16"}],4).members,jw=Vg;function Vg(s,l,f,v,b){this.properties={},this.extent=f,this.type=0,this._pbf=s,this._geometry=-1,this._keys=v,this._values=b,s.readFields(Wy,this,l)}function Wy(s,l,f){s==1?l.id=f.readVarint():s==2?function(v,b){for(var w=v.readVarint()+v.pos;v.pos<w;){var I=b._keys[v.readVarint()],A=b._values[v.readVarint()];b.properties[I]=A}}(f,l):s==3?l.type=f.readVarint():s==4&&(l._geometry=f.pos)}function $g(s){for(var l,f,v=0,b=0,w=s.length,I=w-1;b<w;I=b++)v+=((f=s[I]).x-(l=s[b]).x)*(l.y+f.y);return v}Vg.types=["Unknown","Point","LineString","Polygon"],Vg.prototype.loadGeometry=function(){var s=this._pbf;s.pos=this._geometry;for(var l,f=s.readVarint()+s.pos,v=1,b=0,w=0,I=0,A=[];s.pos<f;){if(b<=0){var F=s.readVarint();v=7&F,b=F>>3}if(b--,v===1||v===2)w+=s.readSVarint(),I+=s.readSVarint(),v===1&&(l&&A.push(l),l=[]),l.push(new _(w,I));else{if(v!==7)throw new Error("unknown command "+v);l&&l.push(l[0].clone())}}return l&&A.push(l),A},Vg.prototype.bbox=function(){var s=this._pbf;s.pos=this._geometry;for(var l=s.readVarint()+s.pos,f=1,v=0,b=0,w=0,I=1/0,A=-1/0,F=1/0,j=-1/0;s.pos<l;){if(v<=0){var G=s.readVarint();f=7&G,v=G>>3}if(v--,f===1||f===2)(b+=s.readSVarint())<I&&(I=b),b>A&&(A=b),(w+=s.readSVarint())<F&&(F=w),w>j&&(j=w);else if(f!==7)throw new Error("unknown command "+f)}return[I,F,A,j]},Vg.prototype.toGeoJSON=function(s,l,f){var v,b,w=this.extent*Math.pow(2,f),I=this.extent*s,A=this.extent*l,F=this.loadGeometry(),j=Vg.types[this.type];function G(rt){for(var dt=0;dt<rt.length;dt++){var _t=rt[dt];rt[dt]=[360*(_t.x+I)/w-180,360/Math.PI*Math.atan(Math.exp((180-360*(_t.y+A)/w)*Math.PI/180))-90]}}switch(this.type){case 1:var H=[];for(v=0;v<F.length;v++)H[v]=F[v][0];G(F=H);break;case 2:for(v=0;v<F.length;v++)G(F[v]);break;case 3:for(F=function(rt){var dt=rt.length;if(dt<=1)return[rt];for(var _t,Pt,St=[],Nt=0;Nt<dt;Nt++){var qt=$g(rt[Nt]);qt!==0&&(Pt===void 0&&(Pt=qt<0),Pt===qt<0?(_t&&St.push(_t),_t=[rt[Nt]]):_t.push(rt[Nt]))}return _t&&St.push(_t),St}(F),v=0;v<F.length;v++)for(b=0;b<F[v].length;b++)G(F[v][b])}F.length===1?F=F[0]:j="Multi"+j;var J={type:"Feature",geometry:{type:j,coordinates:F},properties:this.properties};return"id"in this&&(J.id=this.id),J};var Mx=Ax;function Ax(s,l){this.version=1,this.name=null,this.extent=4096,this.length=0,this._pbf=s,this._keys=[],this._values=[],this._features=[],s.readFields(CP,this,l),this.length=this._features.length}function CP(s,l,f){s===15?l.version=f.readVarint():s===1?l.name=f.readString():s===5?l.extent=f.readVarint():s===2?l._features.push(f.pos):s===3?l._keys.push(f.readString()):s===4&&l._values.push(function(v){for(var b=null,w=v.readVarint()+v.pos;v.pos<w;){var I=v.readVarint()>>3;b=I===1?v.readString():I===2?v.readFloat():I===3?v.readDouble():I===4?v.readVarint64():I===5?v.readVarint():I===6?v.readSVarint():I===7?v.readBoolean():null}return b}(f))}function qw(s,l,f){if(s===3){var v=new Mx(f,f.readVarint()+f.pos);v.length&&(l[v.name]=v)}}Ax.prototype.feature=function(s){if(s<0||s>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[s];var l=this._pbf.readVarint()+this._pbf.pos;return new jw(this._pbf,l,this.extent,this._keys,this._values)};var Xc={VectorTile:function(s,l){this.layers=s.readFields(qw,{},l)},VectorTileFeature:jw,VectorTileLayer:Mx},gv=Xc.VectorTileFeature.types,Lx=Math.pow(2,13);function jg(s,l,f,v,b,w,I,A){s.emplaceBack(l,f,2*Math.floor(v*Lx)+I,b*Lx*2,w*Lx*2,Math.round(A))}var lc=function(s){this.zoom=s.zoom,this.overscaling=s.overscaling,this.layers=s.layers,this.layerIds=this.layers.map(function(l){return l.id}),this.index=s.index,this.hasPattern=!1,this.layoutVertexArray=new Zs,this.indexArray=new Uf,this.programConfigurations=new ln(s.layers,s.zoom),this.segments=new st,this.stateDependentLayerIds=this.layers.filter(function(l){return l.isStateDependent()}).map(function(l){return l.id})};function Hy(s,l){return s.x===l.x&&(s.x<0||s.x>8192)||s.y===l.y&&(s.y<0||s.y>8192)}lc.prototype.populate=function(s,l,f){this.features=[],this.hasPattern=qy("fill-extrusion",this.layers,l);for(var v=0,b=s;v<b.length;v+=1){var w=b[v],I=w.feature,A=w.id,F=w.index,j=w.sourceLayerIndex,G=this.layers[0]._featureFilter.needGeometry,H=Ri(I,G);if(this.layers[0]._featureFilter.filter(new Sn(this.zoom),H,f)){var J={id:A,sourceLayerIndex:j,index:F,geometry:G?H.geometry:Ui(I),properties:I.properties,type:I.type,patterns:{}};this.hasPattern?this.features.push(Gy("fill-extrusion",this.layers,J,this.zoom,l)):this.addFeature(J,J.geometry,F,f,{}),l.featureIndex.insert(I,J.geometry,F,j,this.index,!0)}}},lc.prototype.addFeatures=function(s,l,f){for(var v=0,b=this.features;v<b.length;v+=1){var w=b[v];this.addFeature(w,w.geometry,w.index,l,f)}},lc.prototype.update=function(s,l,f){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(s,l,this.stateDependentLayers,f)},lc.prototype.isEmpty=function(){return this.layoutVertexArray.length===0},lc.prototype.uploadPending=function(){return!this.uploaded||this.programConfigurations.needsUpload},lc.prototype.upload=function(s){this.uploaded||(this.layoutVertexBuffer=s.createVertexBuffer(this.layoutVertexArray,qf),this.indexBuffer=s.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(s),this.uploaded=!0},lc.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())},lc.prototype.addFeature=function(s,l,f,v,b){for(var w=0,I=Tx(l,500);w<I.length;w+=1){for(var A=I[w],F=0,j=0,G=A;j<G.length;j+=1)F+=G[j].length;for(var H=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray),J=0,rt=A;J<rt.length;J+=1){var dt=rt[J];if(dt.length!==0&&!((nr=dt).every(function(Gn){return Gn.x<0})||nr.every(function(Gn){return Gn.x>8192})||nr.every(function(Gn){return Gn.y<0})||nr.every(function(Gn){return Gn.y>8192})))for(var _t=0,Pt=0;Pt<dt.length;Pt++){var St=dt[Pt];if(Pt>=1){var Nt=dt[Pt-1];if(!Hy(St,Nt)){H.vertexLength+4>st.MAX_VERTEX_ARRAY_LENGTH&&(H=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));var qt=St.sub(Nt)._perp()._unit(),Zt=Nt.dist(St);_t+Zt>32768&&(_t=0),jg(this.layoutVertexArray,St.x,St.y,qt.x,qt.y,0,0,_t),jg(this.layoutVertexArray,St.x,St.y,qt.x,qt.y,0,1,_t),jg(this.layoutVertexArray,Nt.x,Nt.y,qt.x,qt.y,0,0,_t+=Zt),jg(this.layoutVertexArray,Nt.x,Nt.y,qt.x,qt.y,0,1,_t);var ee=H.vertexLength;this.indexArray.emplaceBack(ee,ee+2,ee+1),this.indexArray.emplaceBack(ee+1,ee+2,ee+3),H.vertexLength+=4,H.primitiveLength+=2}}}}if(H.vertexLength+F>st.MAX_VERTEX_ARRAY_LENGTH&&(H=this.segments.prepareSegment(F,this.layoutVertexArray,this.indexArray)),gv[s.type]==="Polygon"){for(var fe=[],Ee=[],Oe=H.vertexLength,hn=0,qe=A;hn<qe.length;hn+=1){var mn=qe[hn];if(mn.length!==0){mn!==A[0]&&Ee.push(fe.length/2);for(var Ze=0;Ze<mn.length;Ze++){var Zn=mn[Ze];jg(this.layoutVertexArray,Zn.x,Zn.y,0,0,1,1,0),fe.push(Zn.x),fe.push(Zn.y)}}}for(var En=hv(fe,Ee),sn=0;sn<En.length;sn+=3)this.indexArray.emplaceBack(Oe+En[sn],Oe+En[sn+2],Oe+En[sn+1]);H.primitiveLength+=En.length/3,H.vertexLength+=F}}var nr;this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,s,f,b,v)},nn("FillExtrusionBucket",lc,{omit:["layers","features"]});var Gw={paint:new Ua({"fill-extrusion-opacity":new cn(at["paint_fill-extrusion"]["fill-extrusion-opacity"]),"fill-extrusion-color":new rn(at["paint_fill-extrusion"]["fill-extrusion-color"]),"fill-extrusion-translate":new cn(at["paint_fill-extrusion"]["fill-extrusion-translate"]),"fill-extrusion-translate-anchor":new cn(at["paint_fill-extrusion"]["fill-extrusion-translate-anchor"]),"fill-extrusion-pattern":new zf(at["paint_fill-extrusion"]["fill-extrusion-pattern"]),"fill-extrusion-height":new rn(at["paint_fill-extrusion"]["fill-extrusion-height"]),"fill-extrusion-base":new rn(at["paint_fill-extrusion"]["fill-extrusion-base"]),"fill-extrusion-vertical-gradient":new cn(at["paint_fill-extrusion"]["fill-extrusion-vertical-gradient"])})},Xy=function(s){function l(f){s.call(this,f,Gw)}return s&&(l.__proto__=s),(l.prototype=Object.create(s&&s.prototype)).constructor=l,l.prototype.createBucket=function(f){return new lc(f)},l.prototype.queryRadius=function(){return fa(this.paint.get("fill-extrusion-translate"))},l.prototype.is3D=function(){return!0},l.prototype.queryIntersectsFeature=function(f,v,b,w,I,A,F,j){var G=Ml(f,this.paint.get("fill-extrusion-translate"),this.paint.get("fill-extrusion-translate-anchor"),A.angle,F),H=this.paint.get("fill-extrusion-height").evaluate(v,b),J=this.paint.get("fill-extrusion-base").evaluate(v,b),rt=function(_t,Pt,St,Nt){for(var qt=[],Zt=0,ee=_t;Zt<ee.length;Zt+=1){var fe=ee[Zt],Ee=[fe.x,fe.y,0,1];Fp(Ee,Ee,Pt),qt.push(new _(Ee[0]/Ee[3],Ee[1]/Ee[3]))}return qt}(G,j),dt=function(_t,Pt,St,Nt){for(var qt=[],Zt=[],ee=Nt[8]*Pt,fe=Nt[9]*Pt,Ee=Nt[10]*Pt,Oe=Nt[11]*Pt,hn=Nt[8]*St,qe=Nt[9]*St,mn=Nt[10]*St,Ze=Nt[11]*St,Zn=0,En=_t;Zn<En.length;Zn+=1){for(var sn=[],nr=[],Gn=0,wr=En[Zn];Gn<wr.length;Gn+=1){var yn=wr[Gn],Gr=yn.x,Yi=yn.y,Zi=Nt[0]*Gr+Nt[4]*Yi+Nt[12],Vi=Nt[1]*Gr+Nt[5]*Yi+Nt[13],Ki=Nt[2]*Gr+Nt[6]*Yi+Nt[14],yo=Nt[3]*Gr+Nt[7]*Yi+Nt[15],Do=Ki+Ee,Jo=yo+Oe,ms=Zi+hn,Ma=Vi+qe,vs=Ki+mn,Co=yo+Ze,Aa=new _((Zi+ee)/Jo,(Vi+fe)/Jo);Aa.z=Do/Jo,sn.push(Aa);var mr=new _(ms/Co,Ma/Co);mr.z=vs/Co,nr.push(mr)}qt.push(sn),Zt.push(nr)}return[qt,Zt]}(w,J,H,j);return function(_t,Pt,St){var Nt=1/0;Tl(St,Pt)&&(Nt=mv(St,Pt[0]));for(var qt=0;qt<Pt.length;qt++)for(var Zt=Pt[qt],ee=_t[qt],fe=0;fe<Zt.length-1;fe++){var Ee=Zt[fe],Oe=[Ee,Zt[fe+1],ee[fe+1],ee[fe],Ee];ic(St,Oe)&&(Nt=Math.min(Nt,mv(St,Oe)))}return Nt!==1/0&&Nt}(dt[0],dt[1],rt)},l}(rc);function Ld(s,l){return s.x*l.x+s.y*l.y}function mv(s,l){if(s.length===1){for(var f,v=0,b=l[v++];!f||b.equals(f);)if(!(f=l[v++]))return 1/0;for(;v<l.length;v++){var w=l[v],I=s[0],A=f.sub(b),F=w.sub(b),j=I.sub(b),G=Ld(A,A),H=Ld(A,F),J=Ld(F,F),rt=Ld(j,A),dt=Ld(j,F),_t=G*J-H*H,Pt=(J*rt-H*dt)/_t,St=(G*dt-H*rt)/_t,Nt=b.z*(1-Pt-St)+f.z*Pt+w.z*St;if(isFinite(Nt))return Nt}return 1/0}for(var qt=1/0,Zt=0,ee=l;Zt<ee.length;Zt+=1)qt=Math.min(qt,ee[Zt].z);return qt}var IP=Oo([{name:"a_pos_normal",components:2,type:"Int16"},{name:"a_data",components:4,type:"Uint8"}],4).members,Ww=Oo([{name:"a_uv_x",components:1,type:"Float32"},{name:"a_split_index",components:1,type:"Float32"}]).members,Yy=Xc.VectorTileFeature.types,Hw=Math.cos(Math.PI/180*37.5),Zy=Math.pow(2,14)/.5,Ls=function(s){var l=this;this.zoom=s.zoom,this.overscaling=s.overscaling,this.layers=s.layers,this.layerIds=this.layers.map(function(f){return f.id}),this.index=s.index,this.hasPattern=!1,this.patternFeatures=[],this.lineClipsArray=[],this.gradients={},this.layers.forEach(function(f){l.gradients[f.id]={}}),this.layoutVertexArray=new Za,this.layoutVertexArray2=new Ka,this.indexArray=new Uf,this.programConfigurations=new ln(s.layers,s.zoom),this.segments=new st,this.maxLineLength=0,this.stateDependentLayerIds=this.layers.filter(function(f){return f.isStateDependent()}).map(function(f){return f.id})};Ls.prototype.populate=function(s,l,f){this.hasPattern=qy("line",this.layers,l);for(var v=this.layers[0].layout.get("line-sort-key"),b=[],w=0,I=s;w<I.length;w+=1){var A=I[w],F=A.feature,j=A.id,G=A.index,H=A.sourceLayerIndex,J=this.layers[0]._featureFilter.needGeometry,rt=Ri(F,J);if(this.layers[0]._featureFilter.filter(new Sn(this.zoom),rt,f)){var dt=v?v.evaluate(rt,{},f):void 0,_t={id:j,properties:F.properties,type:F.type,sourceLayerIndex:H,index:G,geometry:J?rt.geometry:Ui(F),patterns:{},sortKey:dt};b.push(_t)}}v&&b.sort(function(Ee,Oe){return Ee.sortKey-Oe.sortKey});for(var Pt=0,St=b;Pt<St.length;Pt+=1){var Nt=St[Pt],qt=Nt.geometry,Zt=Nt.index,ee=Nt.sourceLayerIndex;if(this.hasPattern){var fe=Gy("line",this.layers,Nt,this.zoom,l);this.patternFeatures.push(fe)}else this.addFeature(Nt,qt,Zt,f,{});l.featureIndex.insert(s[Zt].feature,qt,Zt,ee,this.index)}},Ls.prototype.update=function(s,l,f){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(s,l,this.stateDependentLayers,f)},Ls.prototype.addFeatures=function(s,l,f){for(var v=0,b=this.patternFeatures;v<b.length;v+=1){var w=b[v];this.addFeature(w,w.geometry,w.index,l,f)}},Ls.prototype.isEmpty=function(){return this.layoutVertexArray.length===0},Ls.prototype.uploadPending=function(){return!this.uploaded||this.programConfigurations.needsUpload},Ls.prototype.upload=function(s){this.uploaded||(this.layoutVertexArray2.length!==0&&(this.layoutVertexBuffer2=s.createVertexBuffer(this.layoutVertexArray2,Ww)),this.layoutVertexBuffer=s.createVertexBuffer(this.layoutVertexArray,IP),this.indexBuffer=s.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(s),this.uploaded=!0},Ls.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())},Ls.prototype.lineFeatureClips=function(s){if(s.properties&&s.properties.hasOwnProperty("mapbox_clip_start")&&s.properties.hasOwnProperty("mapbox_clip_end"))return{start:+s.properties.mapbox_clip_start,end:+s.properties.mapbox_clip_end}},Ls.prototype.addFeature=function(s,l,f,v,b){var w=this.layers[0].layout,I=w.get("line-join").evaluate(s,{}),A=w.get("line-cap"),F=w.get("line-miter-limit"),j=w.get("line-round-limit");this.lineClips=this.lineFeatureClips(s);for(var G=0,H=l;G<H.length;G+=1)this.addLine(H[G],s,I,A,F,j);this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,s,f,b,v)},Ls.prototype.addLine=function(s,l,f,v,b,w){if(this.distance=0,this.scaledDistance=0,this.totalDistance=0,this.lineClips){this.lineClipsArray.push(this.lineClips);for(var I=0;I<s.length-1;I++)this.totalDistance+=s[I].dist(s[I+1]);this.updateScaledDistance(),this.maxLineLength=Math.max(this.maxLineLength,this.totalDistance)}for(var A=Yy[l.type]==="Polygon",F=s.length;F>=2&&s[F-1].equals(s[F-2]);)F--;for(var j=0;j<F-1&&s[j].equals(s[j+1]);)j++;if(!(F<(A?3:2))){f==="bevel"&&(b=1.05);var G,H=this.overscaling<=16?122880/(512*this.overscaling):0,J=this.segments.prepareSegment(10*F,this.layoutVertexArray,this.indexArray),rt=void 0,dt=void 0,_t=void 0,Pt=void 0;this.e1=this.e2=-1,A&&(Pt=s[j].sub(G=s[F-2])._unit()._perp());for(var St=j;St<F;St++)if(!(dt=St===F-1?A?s[j+1]:void 0:s[St+1])||!s[St].equals(dt)){Pt&&(_t=Pt),G&&(rt=G),G=s[St],Pt=dt?dt.sub(G)._unit()._perp():_t;var Nt=(_t=_t||Pt).add(Pt);Nt.x===0&&Nt.y===0||Nt._unit();var qt=_t.x*Pt.x+_t.y*Pt.y,Zt=Nt.x*Pt.x+Nt.y*Pt.y,ee=Zt!==0?1/Zt:1/0,fe=2*Math.sqrt(2-2*Zt),Ee=Zt<Hw&&rt&&dt,Oe=_t.x*Pt.y-_t.y*Pt.x>0;if(Ee&&St>j){var hn=G.dist(rt);if(hn>2*H){var qe=G.sub(G.sub(rt)._mult(H/hn)._round());this.updateDistance(rt,qe),this.addCurrentVertex(qe,_t,0,0,J),rt=qe}}var mn=rt&&dt,Ze=mn?f:A?"butt":v;if(mn&&Ze==="round"&&(ee<w?Ze="miter":ee<=2&&(Ze="fakeround")),Ze==="miter"&&ee>b&&(Ze="bevel"),Ze==="bevel"&&(ee>2&&(Ze="flipbevel"),ee<b&&(Ze="miter")),rt&&this.updateDistance(rt,G),Ze==="miter")Nt._mult(ee),this.addCurrentVertex(G,Nt,0,0,J);else if(Ze==="flipbevel"){if(ee>100)Nt=Pt.mult(-1);else{var Zn=ee*_t.add(Pt).mag()/_t.sub(Pt).mag();Nt._perp()._mult(Zn*(Oe?-1:1))}this.addCurrentVertex(G,Nt,0,0,J),this.addCurrentVertex(G,Nt.mult(-1),0,0,J)}else if(Ze==="bevel"||Ze==="fakeround"){var En=-Math.sqrt(ee*ee-1),sn=Oe?En:0,nr=Oe?0:En;if(rt&&this.addCurrentVertex(G,_t,sn,nr,J),Ze==="fakeround")for(var Gn=Math.round(180*fe/Math.PI/20),wr=1;wr<Gn;wr++){var yn=wr/Gn;if(yn!==.5){var Gr=yn-.5;yn+=yn*Gr*(yn-1)*((1.0904+qt*(qt*(3.55645-1.43519*qt)-3.2452))*Gr*Gr+(.848013+qt*(.215638*qt-1.06021)))}var Yi=Pt.sub(_t)._mult(yn)._add(_t)._unit()._mult(Oe?-1:1);this.addHalfVertex(G,Yi.x,Yi.y,!1,Oe,0,J)}dt&&this.addCurrentVertex(G,Pt,-sn,-nr,J)}else if(Ze==="butt")this.addCurrentVertex(G,Nt,0,0,J);else if(Ze==="square"){var Zi=rt?1:-1;this.addCurrentVertex(G,Nt,Zi,Zi,J)}else Ze==="round"&&(rt&&(this.addCurrentVertex(G,_t,0,0,J),this.addCurrentVertex(G,_t,1,1,J,!0)),dt&&(this.addCurrentVertex(G,Pt,-1,-1,J,!0),this.addCurrentVertex(G,Pt,0,0,J)));if(Ee&&St<F-1){var Vi=G.dist(dt);if(Vi>2*H){var Ki=G.add(dt.sub(G)._mult(H/Vi)._round());this.updateDistance(G,Ki),this.addCurrentVertex(Ki,Pt,0,0,J),G=Ki}}}}},Ls.prototype.addCurrentVertex=function(s,l,f,v,b,w){w===void 0&&(w=!1);var I=l.y*v-l.x,A=-l.y-l.x*v;this.addHalfVertex(s,l.x+l.y*f,l.y-l.x*f,w,!1,f,b),this.addHalfVertex(s,I,A,w,!0,-v,b),this.distance>Zy/2&&this.totalDistance===0&&(this.distance=0,this.addCurrentVertex(s,l,f,v,b,w))},Ls.prototype.addHalfVertex=function(s,l,f,v,b,w,I){var A=.5*(this.lineClips?this.scaledDistance*(Zy-1):this.scaledDistance);this.layoutVertexArray.emplaceBack((s.x<<1)+(v?1:0),(s.y<<1)+(b?1:0),Math.round(63*l)+128,Math.round(63*f)+128,1+(w===0?0:w<0?-1:1)|(63&A)<<2,A>>6),this.lineClips&&this.layoutVertexArray2.emplaceBack((this.scaledDistance-this.lineClips.start)/(this.lineClips.end-this.lineClips.start),this.lineClipsArray.length);var F=I.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,this.e2,F),I.primitiveLength++),b?this.e2=F:this.e1=F},Ls.prototype.updateScaledDistance=function(){this.scaledDistance=this.lineClips?this.lineClips.start+(this.lineClips.end-this.lineClips.start)*this.distance/this.totalDistance:this.distance},Ls.prototype.updateDistance=function(s,l){this.distance+=s.dist(l),this.updateScaledDistance()},nn("LineBucket",Ls,{omit:["layers","patternFeatures"]});var Xw=new Ua({"line-cap":new cn(at.layout_line["line-cap"]),"line-join":new rn(at.layout_line["line-join"]),"line-miter-limit":new cn(at.layout_line["line-miter-limit"]),"line-round-limit":new cn(at.layout_line["line-round-limit"]),"line-sort-key":new rn(at.layout_line["line-sort-key"])}),Gf={paint:new Ua({"line-opacity":new rn(at.paint_line["line-opacity"]),"line-color":new rn(at.paint_line["line-color"]),"line-translate":new cn(at.paint_line["line-translate"]),"line-translate-anchor":new cn(at.paint_line["line-translate-anchor"]),"line-width":new rn(at.paint_line["line-width"]),"line-gap-width":new rn(at.paint_line["line-gap-width"]),"line-offset":new rn(at.paint_line["line-offset"]),"line-blur":new rn(at.paint_line["line-blur"]),"line-dasharray":new Pa(at.paint_line["line-dasharray"]),"line-pattern":new zf(at.paint_line["line-pattern"]),"line-gradient":new ps(at.paint_line["line-gradient"])}),layout:Xw},Ox=new(function(s){function l(){s.apply(this,arguments)}return s&&(l.__proto__=s),(l.prototype=Object.create(s&&s.prototype)).constructor=l,l.prototype.possiblyEvaluate=function(f,v){return v=new Sn(Math.floor(v.zoom),{now:v.now,fadeDuration:v.fadeDuration,zoomHistory:v.zoomHistory,transition:v.transition}),s.prototype.possiblyEvaluate.call(this,f,v)},l.prototype.evaluate=function(f,v,b,w){return v=k({},v,{zoom:Math.floor(v.zoom)}),s.prototype.evaluate.call(this,f,v,b,w)},l}(rn))(Gf.paint.properties["line-width"].specification);Ox.useIntegerZoom=!0;var Yw=function(s){function l(f){s.call(this,f,Gf),this.gradientVersion=0}return s&&(l.__proto__=s),(l.prototype=Object.create(s&&s.prototype)).constructor=l,l.prototype._handleSpecialPaintPropertyUpdate=function(f){f==="line-gradient"&&(this.stepInterpolant=this._transitionablePaint._values["line-gradient"].value.expression._styleExpression.expression instanceof Ln,this.gradientVersion=(this.gradientVersion+1)%O)},l.prototype.gradientExpression=function(){return this._transitionablePaint._values["line-gradient"].value.expression},l.prototype.recalculate=function(f,v){s.prototype.recalculate.call(this,f,v),this.paint._values["line-floorwidth"]=Ox.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,f)},l.prototype.createBucket=function(f){return new Ls(f)},l.prototype.queryRadius=function(f){var v=f,b=Zw(ac("line-width",this,v),ac("line-gap-width",this,v)),w=ac("line-offset",this,v);return b/2+Math.abs(w)+fa(this.paint.get("line-translate"))},l.prototype.queryIntersectsFeature=function(f,v,b,w,I,A,F){var j=Ml(f,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),A.angle,F),G=F/2*Zw(this.paint.get("line-width").evaluate(v,b),this.paint.get("line-gap-width").evaluate(v,b)),H=this.paint.get("line-offset").evaluate(v,b);return H&&(w=function(J,rt){for(var dt=[],_t=new _(0,0),Pt=0;Pt<J.length;Pt++){for(var St=J[Pt],Nt=[],qt=0;qt<St.length;qt++){var Zt=St[qt],ee=St[qt+1],fe=qt===0?_t:Zt.sub(St[qt-1])._unit()._perp(),Ee=qt===St.length-1?_t:ee.sub(Zt)._unit()._perp(),Oe=fe._add(Ee)._unit();Oe._mult(1/(Oe.x*Ee.x+Oe.y*Ee.y)),Nt.push(Oe._mult(rt)._add(Zt))}dt.push(Nt)}return dt}(w,H*F)),function(J,rt,dt){for(var _t=0;_t<rt.length;_t++){var Pt=rt[_t];if(J.length>=3){for(var St=0;St<Pt.length;St++)if(oc(J,Pt[St]))return!0}if(Ju(J,Pt,dt))return!0}return!1}(j,w,G)},l.prototype.isTileClipped=function(){return!0},l}(rc);function Zw(s,l){return l>0?l+2*s:s}var Kw=Oo([{name:"a_pos_offset",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint16"},{name:"a_pixeloffset",components:4,type:"Int16"}],4),PP=Oo([{name:"a_projected_pos",components:3,type:"Float32"}],4),TP=(Oo([{name:"a_fade_opacity",components:1,type:"Uint32"}],4),Oo([{name:"a_placed",components:2,type:"Uint8"},{name:"a_shift",components:2,type:"Float32"}])),Wf=(Oo([{type:"Int16",name:"anchorPointX"},{type:"Int16",name:"anchorPointY"},{type:"Int16",name:"x1"},{type:"Int16",name:"y1"},{type:"Int16",name:"x2"},{type:"Int16",name:"y2"},{type:"Uint32",name:"featureIndex"},{type:"Uint16",name:"sourceLayerIndex"},{type:"Uint16",name:"bucketIndex"}]),Oo([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4)),Rx=Oo([{name:"a_pos",components:2,type:"Float32"},{name:"a_radius",components:1,type:"Float32"},{name:"a_flags",components:2,type:"Int16"}],4);function kx(s,l,f){return s.sections.forEach(function(v){v.text=function(b,w,I){var A=w.layout.get("text-transform").evaluate(I,{});return A==="uppercase"?b=b.toLocaleUpperCase():A==="lowercase"&&(b=b.toLocaleLowerCase()),bu.applyArabicShaping&&(b=bu.applyArabicShaping(b)),b}(v.text,l,f)}),s}Oo([{name:"triangle",components:3,type:"Uint16"}]),Oo([{type:"Int16",name:"anchorX"},{type:"Int16",name:"anchorY"},{type:"Uint16",name:"glyphStartIndex"},{type:"Uint16",name:"numGlyphs"},{type:"Uint32",name:"vertexStartIndex"},{type:"Uint32",name:"lineStartIndex"},{type:"Uint32",name:"lineLength"},{type:"Uint16",name:"segment"},{type:"Uint16",name:"lowerSize"},{type:"Uint16",name:"upperSize"},{type:"Float32",name:"lineOffsetX"},{type:"Float32",name:"lineOffsetY"},{type:"Uint8",name:"writingMode"},{type:"Uint8",name:"placedOrientation"},{type:"Uint8",name:"hidden"},{type:"Uint32",name:"crossTileID"},{type:"Int16",name:"associatedIconIndex"}]),Oo([{type:"Int16",name:"anchorX"},{type:"Int16",name:"anchorY"},{type:"Int16",name:"rightJustifiedTextSymbolIndex"},{type:"Int16",name:"centerJustifiedTextSymbolIndex"},{type:"Int16",name:"leftJustifiedTextSymbolIndex"},{type:"Int16",name:"verticalPlacedTextSymbolIndex"},{type:"Int16",name:"placedIconSymbolIndex"},{type:"Int16",name:"verticalPlacedIconSymbolIndex"},{type:"Uint16",name:"key"},{type:"Uint16",name:"textBoxStartIndex"},{type:"Uint16",name:"textBoxEndIndex"},{type:"Uint16",name:"verticalTextBoxStartIndex"},{type:"Uint16",name:"verticalTextBoxEndIndex"},{type:"Uint16",name:"iconBoxStartIndex"},{type:"Uint16",name:"iconBoxEndIndex"},{type:"Uint16",name:"verticalIconBoxStartIndex"},{type:"Uint16",name:"verticalIconBoxEndIndex"},{type:"Uint16",name:"featureIndex"},{type:"Uint16",name:"numHorizontalGlyphVertices"},{type:"Uint16",name:"numVerticalGlyphVertices"},{type:"Uint16",name:"numIconVertices"},{type:"Uint16",name:"numVerticalIconVertices"},{type:"Uint16",name:"useRuntimeCollisionCircles"},{type:"Uint32",name:"crossTileID"},{type:"Float32",name:"textBoxScale"},{type:"Float32",components:2,name:"textOffset"},{type:"Float32",name:"collisionCircleDiameter"}]),Oo([{type:"Float32",name:"offsetX"}]),Oo([{type:"Int16",name:"x"},{type:"Int16",name:"y"},{type:"Int16",name:"tileUnitDistanceFromAnchor"}]);var Od={"!":"\uFE15","#":"\uFF03",$:"\uFF04","%":"\uFF05","&":"\uFF06","(":"\uFE35",")":"\uFE36","*":"\uFF0A","+":"\uFF0B",",":"\uFE10","-":"\uFE32",".":"\u30FB","/":"\uFF0F",":":"\uFE13",";":"\uFE14","<":"\uFE3F","=":"\uFF1D",">":"\uFE40","?":"\uFE16","@":"\uFF20","[":"\uFE47","\\":"\uFF3C","]":"\uFE48","^":"\uFF3E",_:"\uFE33","`":"\uFF40","{":"\uFE37","|":"\u2015","}":"\uFE38","~":"\uFF5E","\xA2":"\uFFE0","\xA3":"\uFFE1","\xA5":"\uFFE5","\xA6":"\uFFE4","\xAC":"\uFFE2","\xAF":"\uFFE3","\u2013":"\uFE32","\u2014":"\uFE31","\u2018":"\uFE43","\u2019":"\uFE44","\u201C":"\uFE41","\u201D":"\uFE42","\u2026":"\uFE19","\u2027":"\u30FB","\u20A9":"\uFFE6","\u3001":"\uFE11","\u3002":"\uFE12","\u3008":"\uFE3F","\u3009":"\uFE40","\u300A":"\uFE3D","\u300B":"\uFE3E","\u300C":"\uFE41","\u300D":"\uFE42","\u300E":"\uFE43","\u300F":"\uFE44","\u3010":"\uFE3B","\u3011":"\uFE3C","\u3014":"\uFE39","\u3015":"\uFE3A","\u3016":"\uFE17","\u3017":"\uFE18","\uFF01":"\uFE15","\uFF08":"\uFE35","\uFF09":"\uFE36","\uFF0C":"\uFE10","\uFF0D":"\uFE32","\uFF0E":"\u30FB","\uFF1A":"\uFE13","\uFF1B":"\uFE14","\uFF1C":"\uFE3F","\uFF1E":"\uFE40","\uFF1F":"\uFE16","\uFF3B":"\uFE47","\uFF3D":"\uFE48","\uFF3F":"\uFE33","\uFF5B":"\uFE37","\uFF5C":"\u2015","\uFF5D":"\uFE38","\uFF5F":"\uFE35","\uFF60":"\uFE36","\uFF61":"\uFE12","\uFF62":"\uFE41","\uFF63":"\uFE42"},vv=function(s,l,f,v,b){var w,I,A=8*b-v-1,F=(1<<A)-1,j=F>>1,G=-7,H=f?b-1:0,J=f?-1:1,rt=s[l+H];for(H+=J,w=rt&(1<<-G)-1,rt>>=-G,G+=A;G>0;w=256*w+s[l+H],H+=J,G-=8);for(I=w&(1<<-G)-1,w>>=-G,G+=v;G>0;I=256*I+s[l+H],H+=J,G-=8);if(w===0)w=1-j;else{if(w===F)return I?NaN:1/0*(rt?-1:1);I+=Math.pow(2,v),w-=j}return(rt?-1:1)*I*Math.pow(2,w-v)},Rd=function(s,l,f,v,b,w){var I,A,F,j=8*w-b-1,G=(1<<j)-1,H=G>>1,J=b===23?Math.pow(2,-24)-Math.pow(2,-77):0,rt=v?0:w-1,dt=v?1:-1,_t=l<0||l===0&&1/l<0?1:0;for(l=Math.abs(l),isNaN(l)||l===1/0?(A=isNaN(l)?1:0,I=G):(I=Math.floor(Math.log(l)/Math.LN2),l*(F=Math.pow(2,-I))<1&&(I--,F*=2),(l+=I+H>=1?J/F:J*Math.pow(2,1-H))*F>=2&&(I++,F/=2),I+H>=G?(A=0,I=G):I+H>=1?(A=(l*F-1)*Math.pow(2,b),I+=H):(A=l*Math.pow(2,H-1)*Math.pow(2,b),I=0));b>=8;s[f+rt]=255&A,rt+=dt,A/=256,b-=8);for(I=I<<b|A,j+=b;j>0;s[f+rt]=255&I,rt+=dt,I/=256,j-=8);s[f+rt-dt]|=128*_t},qn=gi;function gi(s){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(s)?s:new Uint8Array(s||0),this.pos=0,this.type=0,this.length=this.buf.length}gi.Varint=0,gi.Fixed64=1,gi.Bytes=2,gi.Fixed32=5;var Ky=typeof TextDecoder=="undefined"?null:new TextDecoder("utf8");function Eu(s){return s.type===gi.Bytes?s.readVarint()+s.pos:s.pos+1}function qg(s,l,f){return f?4294967296*l+(s>>>0):4294967296*(l>>>0)+(s>>>0)}function Jy(s,l,f){var v=l<=16383?1:l<=2097151?2:l<=268435455?3:Math.floor(Math.log(l)/(7*Math.LN2));f.realloc(v);for(var b=f.pos-1;b>=s;b--)f.buf[b+v]=f.buf[b]}function Jw(s,l){for(var f=0;f<s.length;f++)l.writeVarint(s[f])}function Js(s,l){for(var f=0;f<s.length;f++)l.writeSVarint(s[f])}function MP(s,l){for(var f=0;f<s.length;f++)l.writeFloat(s[f])}function AP(s,l){for(var f=0;f<s.length;f++)l.writeDouble(s[f])}function Qw(s,l){for(var f=0;f<s.length;f++)l.writeBoolean(s[f])}function LP(s,l){for(var f=0;f<s.length;f++)l.writeFixed32(s[f])}function tS(s,l){for(var f=0;f<s.length;f++)l.writeSFixed32(s[f])}function OP(s,l){for(var f=0;f<s.length;f++)l.writeFixed64(s[f])}function RP(s,l){for(var f=0;f<s.length;f++)l.writeSFixed64(s[f])}function Qy(s,l){return(s[l]|s[l+1]<<8|s[l+2]<<16)+16777216*s[l+3]}function el(s,l,f){s[f]=l,s[f+1]=l>>>8,s[f+2]=l>>>16,s[f+3]=l>>>24}function Qs(s,l){return(s[l]|s[l+1]<<8|s[l+2]<<16)+(s[l+3]<<24)}function Dx(s,l,f){s===1&&f.readMessage(kP,l)}function kP(s,l,f){if(s===3){var v=f.readMessage(Nx,{}),b=v.width,w=v.height,I=v.left,A=v.top,F=v.advance;l.push({id:v.id,bitmap:new Bp({width:b+6,height:w+6},v.bitmap),metrics:{width:b,height:w,left:I,top:A,advance:F}})}}function Nx(s,l,f){s===1?l.id=f.readVarint():s===2?l.bitmap=f.readBytes():s===3?l.width=f.readVarint():s===4?l.height=f.readVarint():s===5?l.left=f.readSVarint():s===6?l.top=f.readSVarint():s===7&&(l.advance=f.readVarint())}function eS(s){for(var l=0,f=0,v=0,b=s;v<b.length;v+=1){var w=b[v];l+=w.w*w.h,f=Math.max(f,w.w)}s.sort(function(_t,Pt){return Pt.h-_t.h});for(var I=[{x:0,y:0,w:Math.max(Math.ceil(Math.sqrt(l/.95)),f),h:1/0}],A=0,F=0,j=0,G=s;j<G.length;j+=1)for(var H=G[j],J=I.length-1;J>=0;J--){var rt=I[J];if(!(H.w>rt.w||H.h>rt.h)){if(H.x=rt.x,H.y=rt.y,F=Math.max(F,H.y+H.h),A=Math.max(A,H.x+H.w),H.w===rt.w&&H.h===rt.h){var dt=I.pop();J<I.length&&(I[J]=dt)}else H.h===rt.h?(rt.x+=H.w,rt.w-=H.w):H.w===rt.w?(rt.y+=H.h,rt.h-=H.h):(I.push({x:rt.x+H.w,y:rt.y,w:rt.w-H.w,h:H.h}),rt.y+=H.h,rt.h-=H.h);break}}return{w:A,h:F,fill:l/(A*F)||0}}gi.prototype={destroy:function(){this.buf=null},readFields:function(s,l,f){for(f=f||this.length;this.pos<f;){var v=this.readVarint(),b=v>>3,w=this.pos;this.type=7&v,s(b,l,this),this.pos===w&&this.skip(v)}return l},readMessage:function(s,l){return this.readFields(s,l,this.readVarint()+this.pos)},readFixed32:function(){var s=Qy(this.buf,this.pos);return this.pos+=4,s},readSFixed32:function(){var s=Qs(this.buf,this.pos);return this.pos+=4,s},readFixed64:function(){var s=Qy(this.buf,this.pos)+4294967296*Qy(this.buf,this.pos+4);return this.pos+=8,s},readSFixed64:function(){var s=Qy(this.buf,this.pos)+4294967296*Qs(this.buf,this.pos+4);return this.pos+=8,s},readFloat:function(){var s=vv(this.buf,this.pos,!0,23,4);return this.pos+=4,s},readDouble:function(){var s=vv(this.buf,this.pos,!0,52,8);return this.pos+=8,s},readVarint:function(s){var l,f,v=this.buf;return l=127&(f=v[this.pos++]),f<128?l:(l|=(127&(f=v[this.pos++]))<<7,f<128?l:(l|=(127&(f=v[this.pos++]))<<14,f<128?l:(l|=(127&(f=v[this.pos++]))<<21,f<128?l:function(b,w,I){var A,F,j=I.buf;if(A=(112&(F=j[I.pos++]))>>4,F<128||(A|=(127&(F=j[I.pos++]))<<3,F<128)||(A|=(127&(F=j[I.pos++]))<<10,F<128)||(A|=(127&(F=j[I.pos++]))<<17,F<128)||(A|=(127&(F=j[I.pos++]))<<24,F<128)||(A|=(1&(F=j[I.pos++]))<<31,F<128))return qg(b,A,w);throw new Error("Expected varint not more than 10 bytes")}(l|=(15&(f=v[this.pos]))<<28,s,this))))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var s=this.readVarint();return s%2==1?(s+1)/-2:s/2},readBoolean:function(){return Boolean(this.readVarint())},readString:function(){var s=this.readVarint()+this.pos,l=this.pos;return this.pos=s,s-l>=12&&Ky?function(f,v,b){return Ky.decode(f.subarray(v,b))}(this.buf,l,s):function(f,v,b){for(var w="",I=v;I<b;){var A,F,j,G=f[I],H=null,J=G>239?4:G>223?3:G>191?2:1;if(I+J>b)break;J===1?G<128&&(H=G):J===2?(192&(A=f[I+1]))==128&&(H=(31&G)<<6|63&A)<=127&&(H=null):J===3?(F=f[I+2],(192&(A=f[I+1]))==128&&(192&F)==128&&((H=(15&G)<<12|(63&A)<<6|63&F)<=2047||H>=55296&&H<=57343)&&(H=null)):J===4&&(F=f[I+2],j=f[I+3],(192&(A=f[I+1]))==128&&(192&F)==128&&(192&j)==128&&((H=(15&G)<<18|(63&A)<<12|(63&F)<<6|63&j)<=65535||H>=1114112)&&(H=null)),H===null?(H=65533,J=1):H>65535&&(H-=65536,w+=String.fromCharCode(H>>>10&1023|55296),H=56320|1023&H),w+=String.fromCharCode(H),I+=J}return w}(this.buf,l,s)},readBytes:function(){var s=this.readVarint()+this.pos,l=this.buf.subarray(this.pos,s);return this.pos=s,l},readPackedVarint:function(s,l){if(this.type!==gi.Bytes)return s.push(this.readVarint(l));var f=Eu(this);for(s=s||[];this.pos<f;)s.push(this.readVarint(l));return s},readPackedSVarint:function(s){if(this.type!==gi.Bytes)return s.push(this.readSVarint());var l=Eu(this);for(s=s||[];this.pos<l;)s.push(this.readSVarint());return s},readPackedBoolean:function(s){if(this.type!==gi.Bytes)return s.push(this.readBoolean());var l=Eu(this);for(s=s||[];this.pos<l;)s.push(this.readBoolean());return s},readPackedFloat:function(s){if(this.type!==gi.Bytes)return s.push(this.readFloat());var l=Eu(this);for(s=s||[];this.pos<l;)s.push(this.readFloat());return s},readPackedDouble:function(s){if(this.type!==gi.Bytes)return s.push(this.readDouble());var l=Eu(this);for(s=s||[];this.pos<l;)s.push(this.readDouble());return s},readPackedFixed32:function(s){if(this.type!==gi.Bytes)return s.push(this.readFixed32());var l=Eu(this);for(s=s||[];this.pos<l;)s.push(this.readFixed32());return s},readPackedSFixed32:function(s){if(this.type!==gi.Bytes)return s.push(this.readSFixed32());var l=Eu(this);for(s=s||[];this.pos<l;)s.push(this.readSFixed32());return s},readPackedFixed64:function(s){if(this.type!==gi.Bytes)return s.push(this.readFixed64());var l=Eu(this);for(s=s||[];this.pos<l;)s.push(this.readFixed64());return s},readPackedSFixed64:function(s){if(this.type!==gi.Bytes)return s.push(this.readSFixed64());var l=Eu(this);for(s=s||[];this.pos<l;)s.push(this.readSFixed64());return s},skip:function(s){var l=7&s;if(l===gi.Varint)for(;this.buf[this.pos++]>127;);else if(l===gi.Bytes)this.pos=this.readVarint()+this.pos;else if(l===gi.Fixed32)this.pos+=4;else{if(l!==gi.Fixed64)throw new Error("Unimplemented type: "+l);this.pos+=8}},writeTag:function(s,l){this.writeVarint(s<<3|l)},realloc:function(s){for(var l=this.length||16;l<this.pos+s;)l*=2;if(l!==this.length){var f=new Uint8Array(l);f.set(this.buf),this.buf=f,this.length=l}},finish:function(){return this.length=this.pos,this.pos=0,this.buf.subarray(0,this.length)},writeFixed32:function(s){this.realloc(4),el(this.buf,s,this.pos),this.pos+=4},writeSFixed32:function(s){this.realloc(4),el(this.buf,s,this.pos),this.pos+=4},writeFixed64:function(s){this.realloc(8),el(this.buf,-1&s,this.pos),el(this.buf,Math.floor(s*(1/4294967296)),this.pos+4),this.pos+=8},writeSFixed64:function(s){this.realloc(8),el(this.buf,-1&s,this.pos),el(this.buf,Math.floor(s*(1/4294967296)),this.pos+4),this.pos+=8},writeVarint:function(s){(s=+s||0)>268435455||s<0?function(l,f){var v,b;if(l>=0?(v=l%4294967296|0,b=l/4294967296|0):(b=~(-l/4294967296),4294967295^(v=~(-l%4294967296))?v=v+1|0:(v=0,b=b+1|0)),l>=18446744073709552e3||l<-18446744073709552e3)throw new Error("Given varint doesn't fit into 10 bytes");f.realloc(10),function(w,I,A){A.buf[A.pos++]=127&w|128,w>>>=7,A.buf[A.pos++]=127&w|128,w>>>=7,A.buf[A.pos++]=127&w|128,w>>>=7,A.buf[A.pos++]=127&w|128,A.buf[A.pos]=127&(w>>>=7)}(v,0,f),function(w,I){var A=(7&w)<<4;I.buf[I.pos++]|=A|((w>>>=3)?128:0),w&&(I.buf[I.pos++]=127&w|((w>>>=7)?128:0),w&&(I.buf[I.pos++]=127&w|((w>>>=7)?128:0),w&&(I.buf[I.pos++]=127&w|((w>>>=7)?128:0),w&&(I.buf[I.pos++]=127&w|((w>>>=7)?128:0),w&&(I.buf[I.pos++]=127&w)))))}(b,f)}(s,this):(this.realloc(4),this.buf[this.pos++]=127&s|(s>127?128:0),s<=127||(this.buf[this.pos++]=127&(s>>>=7)|(s>127?128:0),s<=127||(this.buf[this.pos++]=127&(s>>>=7)|(s>127?128:0),s<=127||(this.buf[this.pos++]=s>>>7&127))))},writeSVarint:function(s){this.writeVarint(s<0?2*-s-1:2*s)},writeBoolean:function(s){this.writeVarint(Boolean(s))},writeString:function(s){s=String(s),this.realloc(4*s.length),this.pos++;var l=this.pos;this.pos=function(v,b,w){for(var I,A,F=0;F<b.length;F++){if((I=b.charCodeAt(F))>55295&&I<57344){if(!A){I>56319||F+1===b.length?(v[w++]=239,v[w++]=191,v[w++]=189):A=I;continue}if(I<56320){v[w++]=239,v[w++]=191,v[w++]=189,A=I;continue}I=A-55296<<10|I-56320|65536,A=null}else A&&(v[w++]=239,v[w++]=191,v[w++]=189,A=null);I<128?v[w++]=I:(I<2048?v[w++]=I>>6|192:(I<65536?v[w++]=I>>12|224:(v[w++]=I>>18|240,v[w++]=I>>12&63|128),v[w++]=I>>6&63|128),v[w++]=63&I|128)}return w}(this.buf,s,this.pos);var f=this.pos-l;f>=128&&Jy(l,f,this),this.pos=l-1,this.writeVarint(f),this.pos+=f},writeFloat:function(s){this.realloc(4),Rd(this.buf,s,this.pos,!0,23,4),this.pos+=4},writeDouble:function(s){this.realloc(8),Rd(this.buf,s,this.pos,!0,52,8),this.pos+=8},writeBytes:function(s){var l=s.length;this.writeVarint(l),this.realloc(l);for(var f=0;f<l;f++)this.buf[this.pos++]=s[f]},writeRawMessage:function(s,l){this.pos++;var f=this.pos;s(l,this);var v=this.pos-f;v>=128&&Jy(f,v,this),this.pos=f-1,this.writeVarint(v),this.pos+=v},writeMessage:function(s,l,f){this.writeTag(s,gi.Bytes),this.writeRawMessage(l,f)},writePackedVarint:function(s,l){l.length&&this.writeMessage(s,Jw,l)},writePackedSVarint:function(s,l){l.length&&this.writeMessage(s,Js,l)},writePackedBoolean:function(s,l){l.length&&this.writeMessage(s,Qw,l)},writePackedFloat:function(s,l){l.length&&this.writeMessage(s,MP,l)},writePackedDouble:function(s,l){l.length&&this.writeMessage(s,AP,l)},writePackedFixed32:function(s,l){l.length&&this.writeMessage(s,LP,l)},writePackedSFixed32:function(s,l){l.length&&this.writeMessage(s,tS,l)},writePackedFixed64:function(s,l){l.length&&this.writeMessage(s,OP,l)},writePackedSFixed64:function(s,l){l.length&&this.writeMessage(s,RP,l)},writeBytesField:function(s,l){this.writeTag(s,gi.Bytes),this.writeBytes(l)},writeFixed32Field:function(s,l){this.writeTag(s,gi.Fixed32),this.writeFixed32(l)},writeSFixed32Field:function(s,l){this.writeTag(s,gi.Fixed32),this.writeSFixed32(l)},writeFixed64Field:function(s,l){this.writeTag(s,gi.Fixed64),this.writeFixed64(l)},writeSFixed64Field:function(s,l){this.writeTag(s,gi.Fixed64),this.writeSFixed64(l)},writeVarintField:function(s,l){this.writeTag(s,gi.Varint),this.writeVarint(l)},writeSVarintField:function(s,l){this.writeTag(s,gi.Varint),this.writeSVarint(l)},writeStringField:function(s,l){this.writeTag(s,gi.Bytes),this.writeString(l)},writeFloatField:function(s,l){this.writeTag(s,gi.Fixed32),this.writeFloat(l)},writeDoubleField:function(s,l){this.writeTag(s,gi.Fixed64),this.writeDouble(l)},writeBooleanField:function(s,l){this.writeVarintField(s,Boolean(l))}};var t_=function(s,l){var f=l.pixelRatio,v=l.version,b=l.stretchX,w=l.stretchY,I=l.content;this.paddedRect=s,this.pixelRatio=f,this.stretchX=b,this.stretchY=w,this.content=I,this.version=v},Wh={tl:{configurable:!0},br:{configurable:!0},tlbr:{configurable:!0},displaySize:{configurable:!0}};Wh.tl.get=function(){return[this.paddedRect.x+1,this.paddedRect.y+1]},Wh.br.get=function(){return[this.paddedRect.x+this.paddedRect.w-1,this.paddedRect.y+this.paddedRect.h-1]},Wh.tlbr.get=function(){return this.tl.concat(this.br)},Wh.displaySize.get=function(){return[(this.paddedRect.w-2)/this.pixelRatio,(this.paddedRect.h-2)/this.pixelRatio]},Object.defineProperties(t_.prototype,Wh);var Gg=function(s,l){var f={},v={};this.haveRenderCallbacks=[];var b=[];this.addImages(s,f,b),this.addImages(l,v,b);var w=eS(b),I=new Ks({width:w.w||1,height:w.h||1});for(var A in s){var F=s[A],j=f[A].paddedRect;Ks.copy(F.data,I,{x:0,y:0},{x:j.x+1,y:j.y+1},F.data)}for(var G in l){var H=l[G],J=v[G].paddedRect,rt=J.x+1,dt=J.y+1,_t=H.data.width,Pt=H.data.height;Ks.copy(H.data,I,{x:0,y:0},{x:rt,y:dt},H.data),Ks.copy(H.data,I,{x:0,y:Pt-1},{x:rt,y:dt-1},{width:_t,height:1}),Ks.copy(H.data,I,{x:0,y:0},{x:rt,y:dt+Pt},{width:_t,height:1}),Ks.copy(H.data,I,{x:_t-1,y:0},{x:rt-1,y:dt},{width:1,height:Pt}),Ks.copy(H.data,I,{x:0,y:0},{x:rt+_t,y:dt},{width:1,height:Pt})}this.image=I,this.iconPositions=f,this.patternPositions=v};Gg.prototype.addImages=function(s,l,f){for(var v in s){var b=s[v],w={x:0,y:0,w:b.data.width+2,h:b.data.height+2};f.push(w),l[v]=new t_(w,b),b.hasRenderCallback&&this.haveRenderCallbacks.push(v)}},Gg.prototype.patchUpdatedImages=function(s,l){for(var f in s.dispatchRenderCallbacks(this.haveRenderCallbacks),s.updatedImages)this.patchUpdatedImage(this.iconPositions[f],s.getImage(f),l),this.patchUpdatedImage(this.patternPositions[f],s.getImage(f),l)},Gg.prototype.patchUpdatedImage=function(s,l,f){if(s&&l&&s.version!==l.version){s.version=l.version;var v=s.tl;f.update(l.data,void 0,{x:v[0],y:v[1]})}},nn("ImagePosition",t_),nn("ImageAtlas",Gg);var Cu={horizontal:1,vertical:2,horizontalOnly:3},Wg=function(){this.scale=1,this.fontStack="",this.imageName=null};Wg.forText=function(s,l){var f=new Wg;return f.scale=s||1,f.fontStack=l,f},Wg.forImage=function(s){var l=new Wg;return l.imageName=s,l};var gs=function(){this.text="",this.sectionIndex=[],this.sections=[],this.imageSectionID=null};function e_(s,l,f,v,b,w,I,A,F,j,G,H,J,rt,dt,_t){var Pt,St=gs.fromFeature(s,b);H===Cu.vertical&&St.verticalizePunctuation();var Nt=bu.processBidirectionalText,qt=bu.processStyledBidirectionalText;if(Nt&&St.sections.length===1){Pt=[];for(var Zt=0,ee=Nt(St.toString(),kd(St,j,w,l,v,rt,dt));Zt<ee.length;Zt+=1){var fe=ee[Zt],Ee=new gs;Ee.text=fe,Ee.sections=St.sections;for(var Oe=0;Oe<fe.length;Oe++)Ee.sectionIndex.push(0);Pt.push(Ee)}}else if(qt){Pt=[];for(var hn=0,qe=qt(St.text,St.sectionIndex,kd(St,j,w,l,v,rt,dt));hn<qe.length;hn+=1){var mn=qe[hn],Ze=new gs;Ze.text=mn[0],Ze.sectionIndex=mn[1],Ze.sections=St.sections,Pt.push(Ze)}}else Pt=function(sn,nr){for(var Gn=[],wr=sn.text,yn=0,Gr=0,Yi=nr;Gr<Yi.length;Gr+=1){var Zi=Yi[Gr];Gn.push(sn.substring(yn,Zi)),yn=Zi}return yn<wr.length&&Gn.push(sn.substring(yn,wr.length)),Gn}(St,kd(St,j,w,l,v,rt,dt));var Zn=[],En={positionedLines:Zn,text:St.toString(),top:G[1],bottom:G[1],left:G[0],right:G[0],writingMode:H,iconsInText:!1,verticalizable:!1};return function(sn,nr,Gn,wr,yn,Gr,Yi,Zi,Vi,Ki,yo,Do){for(var Jo=0,ms=-17,Ma=0,vs=0,Co=Zi==="right"?1:Zi==="left"?0:.5,Aa=0,mr=0,wi=yn;mr<wi.length;mr+=1){var li=wi[mr];li.trim();var Or=li.getMaxScale(),Os=24*(Or-1),Ja={positionedGlyphs:[],lineOffset:0};sn.positionedLines[Aa]=Ja;var $i=Ja.positionedGlyphs,vi=0;if(li.length()){for(var Qa=0;Qa<li.length();Qa++){var Wr=li.getSection(Qa),eu=li.getSectionIndex(Qa),zn=li.getCharCode(Qa),Hf=0,Zr=null,ji=null,fc=null,Ol=24,Ud=!(Vi===Cu.horizontal||!yo&&!Sd(zn)||yo&&(n_[zn]||(pc=zn,Fe.Arabic(pc)||Fe["Arabic Supplement"](pc)||Fe["Arabic Extended-A"](pc)||Fe["Arabic Presentation Forms-A"](pc)||Fe["Arabic Presentation Forms-B"](pc))));if(Wr.imageName){var Kg=wr[Wr.imageName];if(!Kg)continue;fc=Wr.imageName,sn.iconsInText=sn.iconsInText||!0,ji=Kg.paddedRect;var Zh=Kg.displaySize;Wr.scale=24*Wr.scale/Do,Hf=Os+(24-Zh[1]*Wr.scale),Ol=(Zr={width:Zh[0],height:Zh[1],left:1,top:-3,advance:Ud?Zh[1]:Zh[0]}).advance;var Jg=Ud?Zh[0]*Wr.scale-24*Or:Zh[1]*Wr.scale-24*Or;Jg>0&&Jg>vi&&(vi=Jg)}else{var h_=Gn[Wr.fontStack],jp=h_&&h_[zn];if(jp&&jp.rect)ji=jp.rect,Zr=jp.metrics;else{var Sv=nr[Wr.fontStack],hc=Sv&&Sv[zn];if(!hc)continue;Zr=hc.metrics}Hf=24*(Or-Wr.scale)}Ud?(sn.verticalizable=!0,$i.push({glyph:zn,imageName:fc,x:Jo,y:ms+Hf,vertical:Ud,scale:Wr.scale,fontStack:Wr.fontStack,sectionIndex:eu,metrics:Zr,rect:ji}),Jo+=Ol*Wr.scale+Ki):($i.push({glyph:zn,imageName:fc,x:Jo,y:ms+Hf,vertical:Ud,scale:Wr.scale,fontStack:Wr.fontStack,sectionIndex:eu,metrics:Zr,rect:ji}),Jo+=Zr.advance*Wr.scale+Ki)}$i.length!==0&&(Ma=Math.max(Jo-Ki,Ma),rS($i,0,$i.length-1,Co,vi)),Jo=0;var Ev=Gr*Or+vi;Ja.lineOffset=Math.max(vi,Os),ms+=Ev,vs=Math.max(Ev,vs),++Aa}else ms+=Gr,++Aa}var pc,uo=ms- -17,lo=yv(Yi),Kh=lo.horizontalAlign,Qg=lo.verticalAlign;(function(p_,d_,Cv,Iv,g_,tm,Jh,Vd,m_){var $d,jd=(d_-Cv)*g_;$d=tm!==Jh?-Vd*Iv- -17:(-Iv*m_+.5)*Jh;for(var ys=0,Xf=p_;ys<Xf.length;ys+=1)for(var qd=0,Pv=Xf[ys].positionedGlyphs;qd<Pv.length;qd+=1){var em=Pv[qd];em.x+=jd,em.y+=$d}})(sn.positionedLines,Co,Kh,Qg,Ma,vs,Gr,uo,yn.length),sn.top+=-Qg*uo,sn.bottom=sn.top+uo,sn.left+=-Kh*Ma,sn.right=sn.left+Ma}(En,l,f,v,Pt,I,A,F,H,j,J,_t),!function(sn){for(var nr=0,Gn=sn;nr<Gn.length;nr+=1)if(Gn[nr].positionedGlyphs.length!==0)return!1;return!0}(Zn)&&En}gs.fromFeature=function(s,l){for(var f=new gs,v=0;v<s.sections.length;v++){var b=s.sections[v];b.image?f.addImageSection(b):f.addTextSection(b,l)}return f},gs.prototype.length=function(){return this.text.length},gs.prototype.getSection=function(s){return this.sections[this.sectionIndex[s]]},gs.prototype.getSectionIndex=function(s){return this.sectionIndex[s]},gs.prototype.getCharCode=function(s){return this.text.charCodeAt(s)},gs.prototype.verticalizePunctuation=function(){this.text=function(s){for(var l="",f=0;f<s.length;f++){var v=s.charCodeAt(f+1)||null,b=s.charCodeAt(f-1)||null;l+=v&&zh(v)&&!Od[s[f+1]]||b&&zh(b)&&!Od[s[f-1]]||!Od[s[f]]?s[f]:Od[s[f]]}return l}(this.text)},gs.prototype.trim=function(){for(var s=0,l=0;l<this.text.length&&n_[this.text.charCodeAt(l)];l++)s++;for(var f=this.text.length,v=this.text.length-1;v>=0&&v>=s&&n_[this.text.charCodeAt(v)];v--)f--;this.text=this.text.substring(s,f),this.sectionIndex=this.sectionIndex.slice(s,f)},gs.prototype.substring=function(s,l){var f=new gs;return f.text=this.text.substring(s,l),f.sectionIndex=this.sectionIndex.slice(s,l),f.sections=this.sections,f},gs.prototype.toString=function(){return this.text},gs.prototype.getMaxScale=function(){var s=this;return this.sectionIndex.reduce(function(l,f){return Math.max(l,s.sections[f].scale)},0)},gs.prototype.addTextSection=function(s,l){this.text+=s.text,this.sections.push(Wg.forText(s.scale,s.fontStack||l));for(var f=this.sections.length-1,v=0;v<s.text.length;++v)this.sectionIndex.push(f)},gs.prototype.addImageSection=function(s){var l=s.image?s.image.name:"";if(l.length!==0){var f=this.getNextImageSectionCharCode();f?(this.text+=String.fromCharCode(f),this.sections.push(Wg.forImage(l)),this.sectionIndex.push(this.sections.length-1)):He("Reached maximum number of images 6401")}else He("Can't add FormattedSection with an empty image.")},gs.prototype.getNextImageSectionCharCode=function(){return this.imageSectionID?this.imageSectionID>=63743?null:++this.imageSectionID:(this.imageSectionID=57344,this.imageSectionID)};var n_={9:!0,10:!0,11:!0,12:!0,13:!0,32:!0},tu={};function Fx(s,l,f,v,b,w){if(l.imageName){var I=v[l.imageName];return I?I.displaySize[0]*l.scale*24/w+b:0}var A=f[l.fontStack],F=A&&A[s];return F?F.metrics.advance*l.scale+b:0}function nS(s,l,f,v){var b=Math.pow(s-l,2);return v?s<l?b/2:2*b:b+Math.abs(f)*f}function zx(s,l,f){var v=0;return s===10&&(v-=1e4),f&&(v+=150),s!==40&&s!==65288||(v+=50),l!==41&&l!==65289||(v+=50),v}function Bx(s,l,f,v,b,w){for(var I=null,A=nS(l,f,b,w),F=0,j=v;F<j.length;F+=1){var G=j[F],H=nS(l-G.x,f,b,w)+G.badness;H<=A&&(I=G,A=H)}return{index:s,x:l,priorBreak:I,badness:A}}function kd(s,l,f,v,b,w,I){if(w!=="point")return[];if(!s)return[];for(var A,F=[],j=function(Pt,St,Nt,qt,Zt,ee){for(var fe=0,Ee=0;Ee<Pt.length();Ee++){var Oe=Pt.getSection(Ee);fe+=Fx(Pt.getCharCode(Ee),Oe,qt,Zt,St,ee)}return fe/Math.max(1,Math.ceil(fe/Nt))}(s,l,f,v,b,I),G=s.text.indexOf("\u200B")>=0,H=0,J=0;J<s.length();J++){var rt=s.getSection(J),dt=s.getCharCode(J);if(n_[dt]||(H+=Fx(dt,rt,v,b,l,I)),J<s.length()-1){var _t=!((A=dt)<11904||!(Fe["Bopomofo Extended"](A)||Fe.Bopomofo(A)||Fe["CJK Compatibility Forms"](A)||Fe["CJK Compatibility Ideographs"](A)||Fe["CJK Compatibility"](A)||Fe["CJK Radicals Supplement"](A)||Fe["CJK Strokes"](A)||Fe["CJK Symbols and Punctuation"](A)||Fe["CJK Unified Ideographs Extension A"](A)||Fe["CJK Unified Ideographs"](A)||Fe["Enclosed CJK Letters and Months"](A)||Fe["Halfwidth and Fullwidth Forms"](A)||Fe.Hiragana(A)||Fe["Ideographic Description Characters"](A)||Fe["Kangxi Radicals"](A)||Fe["Katakana Phonetic Extensions"](A)||Fe.Katakana(A)||Fe["Vertical Forms"](A)||Fe["Yi Radicals"](A)||Fe["Yi Syllables"](A)));(tu[dt]||_t||rt.imageName)&&F.push(Bx(J+1,H,j,F,zx(dt,s.getCharCode(J+1),_t&&G),!1))}}return function Pt(St){return St?Pt(St.priorBreak).concat(St.index):[]}(Bx(s.length(),H,j,F,0,!0))}function yv(s){var l=.5,f=.5;switch(s){case"right":case"top-right":case"bottom-right":l=1;break;case"left":case"top-left":case"bottom-left":l=0}switch(s){case"bottom":case"bottom-right":case"bottom-left":f=1;break;case"top":case"top-right":case"top-left":f=0}return{horizontalAlign:l,verticalAlign:f}}function rS(s,l,f,v,b){if(v||b)for(var w=s[f],I=(s[f].x+w.metrics.advance*w.scale)*v,A=l;A<=f;A++)s[A].x-=I,s[A].y+=b}function Ux(s,l,f,v,b,w){var I,A=s.image;if(A.content){var F=A.content,j=A.pixelRatio||1;I=[F[0]/j,F[1]/j,A.displaySize[0]-F[2]/j,A.displaySize[1]-F[3]/j]}var G,H,J,rt,dt=l.left*w,_t=l.right*w;f==="width"||f==="both"?(rt=b[0]+dt-v[3],H=b[0]+_t+v[1]):H=(rt=b[0]+(dt+_t-A.displaySize[0])/2)+A.displaySize[0];var Pt=l.top*w,St=l.bottom*w;return f==="height"||f==="both"?(G=b[1]+Pt-v[0],J=b[1]+St+v[2]):J=(G=b[1]+(Pt+St-A.displaySize[1])/2)+A.displaySize[1],{image:A,top:G,right:H,bottom:J,left:rt,collisionPadding:I}}tu[10]=!0,tu[32]=!0,tu[38]=!0,tu[40]=!0,tu[41]=!0,tu[43]=!0,tu[45]=!0,tu[47]=!0,tu[173]=!0,tu[183]=!0,tu[8203]=!0,tu[8208]=!0,tu[8211]=!0,tu[8231]=!0;var Hh=function(s){function l(f,v,b,w){s.call(this,f,v),this.angle=b,w!==void 0&&(this.segment=w)}return s&&(l.__proto__=s),(l.prototype=Object.create(s&&s.prototype)).constructor=l,l.prototype.clone=function(){return new l(this.x,this.y,this.angle,this.segment)},l}(_);function r_(s,l){var f=l.expression;if(f.kind==="constant")return{kind:"constant",layoutSize:f.evaluate(new Sn(s+1))};if(f.kind==="source")return{kind:"source"};for(var v=f.zoomStops,b=f.interpolationType,w=0;w<v.length&&v[w]<=s;)w++;for(var I=w=Math.max(0,w-1);I<v.length&&v[I]<s+1;)I++;I=Math.min(v.length-1,I);var A=v[w],F=v[I];return f.kind==="composite"?{kind:"composite",minZoom:A,maxZoom:F,interpolationType:b}:{kind:"camera",minZoom:A,maxZoom:F,minSize:f.evaluate(new Sn(A)),maxSize:f.evaluate(new Sn(F)),interpolationType:b}}function Yc(s,l,f){var v=l.uSize,b=f.lowerSize;return s.kind==="source"?b/128:s.kind==="composite"?Oi(b/128,f.upperSize/128,l.uSizeT):v}function Up(s,l){var f=0,v=0;if(s.kind==="constant")v=s.layoutSize;else if(s.kind!=="source"){var b=s.interpolationType,w=b?B(So.interpolationFactor(b,l,s.minZoom,s.maxZoom),0,1):0;s.kind==="camera"?v=Oi(s.minSize,s.maxSize,w):f=w}return{uSizeT:f,uSize:v}}nn("Anchor",Hh);var DP=Object.freeze({__proto__:null,getSizeData:r_,evaluateSizeForFeature:Yc,evaluateSizeForZoom:Up,SIZE_PACK_FACTOR:128});function Vx(s,l,f,v,b){if(l.segment===void 0)return!0;for(var w=l,I=l.segment+1,A=0;A>-f/2;){if(--I<0)return!1;A-=s[I].dist(w),w=s[I]}A+=s[I].dist(s[I+1]),I++;for(var F=[],j=0;A<f/2;){var G=s[I],H=s[I+1];if(!H)return!1;var J=s[I-1].angleTo(G)-G.angleTo(H);for(J=Math.abs((J+3*Math.PI)%(2*Math.PI)-Math.PI),F.push({distance:A,angleDelta:J}),j+=J;A-F[0].distance>v;)j-=F.shift().angleDelta;if(j>b)return!1;I++,A+=G.dist(H)}return!0}function iS(s){for(var l=0,f=0;f<s.length-1;f++)l+=s[f].dist(s[f+1]);return l}function oS(s,l,f){return s?.6*l*f:0}function aS(s,l){return Math.max(s?s.right-s.left:0,l?l.right-l.left:0)}function NP(s,l,f,v,b,w){for(var I=oS(f,b,w),A=aS(f,v)*w,F=0,j=iS(s)/2,G=0;G<s.length-1;G++){var H=s[G],J=s[G+1],rt=H.dist(J);if(F+rt>j){var dt=(j-F)/rt,_t=Oi(H.x,J.x,dt),Pt=Oi(H.y,J.y,dt),St=new Hh(_t,Pt,J.angleTo(H),G);return St._round(),!I||Vx(s,St,A,I,l)?St:void 0}F+=rt}}function FP(s,l,f,v,b,w,I,A,F){var j=oS(v,w,I),G=aS(v,b),H=G*I,J=s[0].x===0||s[0].x===F||s[0].y===0||s[0].y===F;return l-H<l/4&&(l=H+l/4),function rt(dt,_t,Pt,St,Nt,qt,Zt,ee,fe){for(var Ee=qt/2,Oe=iS(dt),hn=0,qe=_t-Pt,mn=[],Ze=0;Ze<dt.length-1;Ze++){for(var Zn=dt[Ze],En=dt[Ze+1],sn=Zn.dist(En),nr=En.angleTo(Zn);qe+Pt<hn+sn;){var Gn=((qe+=Pt)-hn)/sn,wr=Oi(Zn.x,En.x,Gn),yn=Oi(Zn.y,En.y,Gn);if(wr>=0&&wr<fe&&yn>=0&&yn<fe&&qe-Ee>=0&&qe+Ee<=Oe){var Gr=new Hh(wr,yn,nr,Ze);Gr._round(),St&&!Vx(dt,Gr,qt,St,Nt)||mn.push(Gr)}}hn+=sn}return ee||mn.length||Zt||(mn=rt(dt,hn/2,Pt,St,Nt,qt,Zt,!0,fe)),mn}(s,J?l/2*A%l:(G/2+2*w)*I*A%l,l,j,f,H,J,!1,F)}function sS(s,l,f,v,b){for(var w=[],I=0;I<s.length;I++)for(var A=s[I],F=void 0,j=0;j<A.length-1;j++){var G=A[j],H=A[j+1];G.x<l&&H.x<l||(G.x<l?G=new _(l,G.y+(l-G.x)/(H.x-G.x)*(H.y-G.y))._round():H.x<l&&(H=new _(l,G.y+(l-G.x)/(H.x-G.x)*(H.y-G.y))._round()),G.y<f&&H.y<f||(G.y<f?G=new _(G.x+(f-G.y)/(H.y-G.y)*(H.x-G.x),f)._round():H.y<f&&(H=new _(G.x+(f-G.y)/(H.y-G.y)*(H.x-G.x),f)._round()),G.x>=v&&H.x>=v||(G.x>=v?G=new _(v,G.y+(v-G.x)/(H.x-G.x)*(H.y-G.y))._round():H.x>=v&&(H=new _(v,G.y+(v-G.x)/(H.x-G.x)*(H.y-G.y))._round()),G.y>=b&&H.y>=b||(G.y>=b?G=new _(G.x+(b-G.y)/(H.y-G.y)*(H.x-G.x),b)._round():H.y>=b&&(H=new _(G.x+(b-G.y)/(H.y-G.y)*(H.x-G.x),b)._round()),F&&G.equals(F[F.length-1])||w.push(F=[G]),F.push(H)))))}return w}function uS(s,l,f,v){var b=[],w=s.image,I=w.pixelRatio,A=w.paddedRect.w-2,F=w.paddedRect.h-2,j=s.right-s.left,G=s.bottom-s.top,H=w.stretchX||[[0,A]],J=w.stretchY||[[0,F]],rt=function(wr,yn){return wr+yn[1]-yn[0]},dt=H.reduce(rt,0),_t=J.reduce(rt,0),Pt=A-dt,St=F-_t,Nt=0,qt=dt,Zt=0,ee=_t,fe=0,Ee=Pt,Oe=0,hn=St;if(w.content&&v){var qe=w.content;Nt=i_(H,0,qe[0]),Zt=i_(J,0,qe[1]),qt=i_(H,qe[0],qe[2]),ee=i_(J,qe[1],qe[3]),fe=qe[0]-Nt,Oe=qe[1]-Zt,Ee=qe[2]-qe[0]-qt,hn=qe[3]-qe[1]-ee}var mn=function(wr,yn,Gr,Yi){var Zi=o_(wr.stretch-Nt,qt,j,s.left),Vi=a_(wr.fixed-fe,Ee,wr.stretch,dt),Ki=o_(yn.stretch-Zt,ee,G,s.top),yo=a_(yn.fixed-Oe,hn,yn.stretch,_t),Do=o_(Gr.stretch-Nt,qt,j,s.left),Jo=a_(Gr.fixed-fe,Ee,Gr.stretch,dt),ms=o_(Yi.stretch-Zt,ee,G,s.top),Ma=a_(Yi.fixed-Oe,hn,Yi.stretch,_t),vs=new _(Zi,Ki),Co=new _(Do,Ki),Aa=new _(Do,ms),mr=new _(Zi,ms),wi=new _(Vi/I,yo/I),li=new _(Jo/I,Ma/I),Or=l*Math.PI/180;if(Or){var Os=Math.sin(Or),Ja=Math.cos(Or),$i=[Ja,-Os,Os,Ja];vs._matMult($i),Co._matMult($i),mr._matMult($i),Aa._matMult($i)}var vi=wr.stretch+wr.fixed,Qa=yn.stretch+yn.fixed;return{tl:vs,tr:Co,bl:mr,br:Aa,tex:{x:w.paddedRect.x+1+vi,y:w.paddedRect.y+1+Qa,w:Gr.stretch+Gr.fixed-vi,h:Yi.stretch+Yi.fixed-Qa},writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:wi,pixelOffsetBR:li,minFontScaleX:Ee/I/j,minFontScaleY:hn/I/G,isSDF:f}};if(v&&(w.stretchX||w.stretchY))for(var Ze=lS(H,Pt,dt),Zn=lS(J,St,_t),En=0;En<Ze.length-1;En++)for(var sn=Ze[En],nr=Ze[En+1],Gn=0;Gn<Zn.length-1;Gn++)b.push(mn(sn,Zn[Gn],nr,Zn[Gn+1]));else b.push(mn({fixed:0,stretch:-1},{fixed:0,stretch:-1},{fixed:0,stretch:A+1},{fixed:0,stretch:F+1}));return b}function i_(s,l,f){for(var v=0,b=0,w=s;b<w.length;b+=1){var I=w[b];v+=Math.max(l,Math.min(f,I[1]))-Math.max(l,Math.min(f,I[0]))}return v}function lS(s,l,f){for(var v=[{fixed:-1,stretch:0}],b=0,w=s;b<w.length;b+=1){var I=w[b],A=I[0],F=I[1],j=v[v.length-1];v.push({fixed:A-j.stretch,stretch:j.stretch}),v.push({fixed:A-j.stretch,stretch:j.stretch+(F-A)})}return v.push({fixed:l+1,stretch:f}),v}function o_(s,l,f,v){return s/l*f+v}function a_(s,l,f,v){return s-l*f/v}var _v=function(s,l,f,v,b,w,I,A,F,j){if(this.boxStartIndex=s.length,F){var G=w.top,H=w.bottom,J=w.collisionPadding;J&&(G-=J[1],H+=J[3]);var rt=H-G;rt>0&&(rt=Math.max(10,rt),this.circleDiameter=rt)}else{var dt=w.top*I-A,_t=w.bottom*I+A,Pt=w.left*I-A,St=w.right*I+A,Nt=w.collisionPadding;if(Nt&&(Pt-=Nt[0]*I,dt-=Nt[1]*I,St+=Nt[2]*I,_t+=Nt[3]*I),j){var qt=new _(Pt,dt),Zt=new _(St,dt),ee=new _(Pt,_t),fe=new _(St,_t),Ee=j*Math.PI/180;qt._rotate(Ee),Zt._rotate(Ee),ee._rotate(Ee),fe._rotate(Ee),Pt=Math.min(qt.x,Zt.x,ee.x,fe.x),St=Math.max(qt.x,Zt.x,ee.x,fe.x),dt=Math.min(qt.y,Zt.y,ee.y,fe.y),_t=Math.max(qt.y,Zt.y,ee.y,fe.y)}s.emplaceBack(l.x,l.y,Pt,dt,St,_t,f,v,b)}this.boxEndIndex=s.length},Dd=function(s,l){if(s===void 0&&(s=[]),l===void 0&&(l=cS),this.data=s,this.length=this.data.length,this.compare=l,this.length>0)for(var f=(this.length>>1)-1;f>=0;f--)this._down(f)};function cS(s,l){return s<l?-1:s>l?1:0}function zP(s,l,f){l===void 0&&(l=1),f===void 0&&(f=!1);for(var v=1/0,b=1/0,w=-1/0,I=-1/0,A=s[0],F=0;F<A.length;F++){var j=A[F];(!F||j.x<v)&&(v=j.x),(!F||j.y<b)&&(b=j.y),(!F||j.x>w)&&(w=j.x),(!F||j.y>I)&&(I=j.y)}var G=Math.min(w-v,I-b),H=G/2,J=new Dd([],BP);if(G===0)return new _(v,b);for(var rt=v;rt<w;rt+=G)for(var dt=b;dt<I;dt+=G)J.push(new Hg(rt+H,dt+H,H,s));for(var _t=function(Nt){for(var qt=0,Zt=0,ee=0,fe=Nt[0],Ee=0,Oe=fe.length,hn=Oe-1;Ee<Oe;hn=Ee++){var qe=fe[Ee],mn=fe[hn],Ze=qe.x*mn.y-mn.x*qe.y;Zt+=(qe.x+mn.x)*Ze,ee+=(qe.y+mn.y)*Ze,qt+=3*Ze}return new Hg(Zt/qt,ee/qt,0,Nt)}(s),Pt=J.length;J.length;){var St=J.pop();(St.d>_t.d||!_t.d)&&(_t=St,f&&console.log("found best %d after %d probes",Math.round(1e4*St.d)/1e4,Pt)),St.max-_t.d<=l||(J.push(new Hg(St.p.x-(H=St.h/2),St.p.y-H,H,s)),J.push(new Hg(St.p.x+H,St.p.y-H,H,s)),J.push(new Hg(St.p.x-H,St.p.y+H,H,s)),J.push(new Hg(St.p.x+H,St.p.y+H,H,s)),Pt+=4)}return f&&(console.log("num probes: "+Pt),console.log("best distance: "+_t.d)),_t.p}function BP(s,l){return l.max-s.max}function Hg(s,l,f,v){this.p=new _(s,l),this.h=f,this.d=function(b,w){for(var I=!1,A=1/0,F=0;F<w.length;F++)for(var j=w[F],G=0,H=j.length,J=H-1;G<H;J=G++){var rt=j[G],dt=j[J];rt.y>b.y!=dt.y>b.y&&b.x<(dt.x-rt.x)*(b.y-rt.y)/(dt.y-rt.y)+rt.x&&(I=!I),A=Math.min(A,jh(b,rt,dt))}return(I?1:-1)*Math.sqrt(A)}(this.p,v),this.max=this.d+this.h*Math.SQRT2}Dd.prototype.push=function(s){this.data.push(s),this.length++,this._up(this.length-1)},Dd.prototype.pop=function(){if(this.length!==0){var s=this.data[0],l=this.data.pop();return this.length--,this.length>0&&(this.data[0]=l,this._down(0)),s}},Dd.prototype.peek=function(){return this.data[0]},Dd.prototype._up=function(s){for(var l=this.data,f=this.compare,v=l[s];s>0;){var b=s-1>>1,w=l[b];if(f(v,w)>=0)break;l[s]=w,s=b}l[s]=v},Dd.prototype._down=function(s){for(var l=this.data,f=this.compare,v=this.length>>1,b=l[s];s<v;){var w=1+(s<<1),I=l[w],A=w+1;if(A<this.length&&f(l[A],I)<0&&(w=A,I=l[A]),f(I,b)>=0)break;l[s]=I,s=w}l[s]=b};var s_=Number.POSITIVE_INFINITY;function fS(s,l){return l[1]!==s_?function(f,v,b){var w=0,I=0;switch(v=Math.abs(v),b=Math.abs(b),f){case"top-right":case"top-left":case"top":I=b-7;break;case"bottom-right":case"bottom-left":case"bottom":I=7-b}switch(f){case"top-right":case"bottom-right":case"right":w=-v;break;case"top-left":case"bottom-left":case"left":w=v}return[w,I]}(s,l[0],l[1]):function(f,v){var b=0,w=0;v<0&&(v=0);var I=v/Math.sqrt(2);switch(f){case"top-right":case"top-left":w=I-7;break;case"bottom-right":case"bottom-left":w=7-I;break;case"bottom":w=7-v;break;case"top":w=v-7}switch(f){case"top-right":case"bottom-right":b=-I;break;case"top-left":case"bottom-left":b=I;break;case"left":b=v;break;case"right":b=-v}return[b,w]}(s,l[0])}function $x(s){switch(s){case"right":case"top-right":case"bottom-right":return"right";case"left":case"top-left":case"bottom-left":return"left"}return"center"}function hS(s,l,f,v,b,w,I,A,F,j,G,H,J,rt,dt){var _t=function(Zt,ee,fe,Ee,Oe,hn,qe,mn){for(var Ze=Ee.layout.get("text-rotate").evaluate(hn,{})*Math.PI/180,Zn=[],En=0,sn=ee.positionedLines;En<sn.length;En+=1)for(var nr=sn[En],Gn=0,wr=nr.positionedGlyphs;Gn<wr.length;Gn+=1){var yn=wr[Gn];if(yn.rect){var Gr=yn.rect||{},Yi=4,Zi=!0,Vi=1,Ki=0,yo=(Oe||mn)&&yn.vertical,Do=yn.metrics.advance*yn.scale/2;if(mn&&ee.verticalizable&&(Ki=nr.lineOffset/2-(yn.imageName?-(24-yn.metrics.width*yn.scale)/2:24*(yn.scale-1))),yn.imageName){var Jo=qe[yn.imageName];Zi=Jo.sdf,Yi=1/(Vi=Jo.pixelRatio)}var ms=Oe?[yn.x+Do,yn.y]:[0,0],Ma=Oe?[0,0]:[yn.x+Do+fe[0],yn.y+fe[1]-Ki],vs=[0,0];yo&&(vs=Ma,Ma=[0,0]);var Co=(yn.metrics.left-Yi)*yn.scale-Do+Ma[0],Aa=(-yn.metrics.top-Yi)*yn.scale+Ma[1],mr=Co+Gr.w*yn.scale/Vi,wi=Aa+Gr.h*yn.scale/Vi,li=new _(Co,Aa),Or=new _(mr,Aa),Os=new _(Co,wi),Ja=new _(mr,wi);if(yo){var $i=new _(-Do,Do- -17),vi=-Math.PI/2,Qa=12-Do,Wr=new _(22-Qa,-(yn.imageName?Qa:0)),eu=new(Function.prototype.bind.apply(_,[null].concat(vs)));li._rotateAround(vi,$i)._add(Wr)._add(eu),Or._rotateAround(vi,$i)._add(Wr)._add(eu),Os._rotateAround(vi,$i)._add(Wr)._add(eu),Ja._rotateAround(vi,$i)._add(Wr)._add(eu)}if(Ze){var zn=Math.sin(Ze),Hf=Math.cos(Ze),Zr=[Hf,-zn,zn,Hf];li._matMult(Zr),Or._matMult(Zr),Os._matMult(Zr),Ja._matMult(Zr)}var ji=new _(0,0),fc=new _(0,0);Zn.push({tl:li,tr:Or,bl:Os,br:Ja,tex:Gr,writingMode:ee.writingMode,glyphOffset:ms,sectionIndex:yn.sectionIndex,isSDF:Zi,pixelOffsetTL:ji,pixelOffsetBR:fc,minFontScaleX:0,minFontScaleY:0})}}return Zn}(0,f,A,b,w,I,v,s.allowVerticalPlacement),Pt=s.textSizeData,St=null;Pt.kind==="source"?(St=[128*b.layout.get("text-size").evaluate(I,{})])[0]>32640&&He(s.layerIds[0]+': Value for "text-size" is >= 255. Reduce your "text-size".'):Pt.kind==="composite"&&((St=[128*rt.compositeTextSizes[0].evaluate(I,{},dt),128*rt.compositeTextSizes[1].evaluate(I,{},dt)])[0]>32640||St[1]>32640)&&He(s.layerIds[0]+': Value for "text-size" is >= 255. Reduce your "text-size".'),s.addSymbols(s.text,_t,St,A,w,I,j,l,F.lineStartIndex,F.lineLength,J,dt);for(var Nt=0,qt=G;Nt<qt.length;Nt+=1)H[qt[Nt]]=s.text.placedSymbolArray.length-1;return 4*_t.length}function pS(s){for(var l in s)return s[l];return null}function UP(s,l,f,v){var b=s.compareText;if(l in b){for(var w=b[l],I=w.length-1;I>=0;I--)if(v.dist(w[I])<f)return!0}else b[l]=[];return b[l].push(v),!1}var VP=Xc.VectorTileFeature.types,cc=[{name:"a_fade_opacity",components:1,type:"Uint8",offset:0}];function u_(s,l,f,v,b,w,I,A,F,j,G,H,J){var rt=A?Math.min(32640,Math.round(A[0])):0,dt=A?Math.min(32640,Math.round(A[1])):0;s.emplaceBack(l,f,Math.round(32*v),Math.round(32*b),w,I,(rt<<1)+(F?1:0),dt,16*j,16*G,256*H,256*J)}function jx(s,l,f){s.emplaceBack(l.x,l.y,f),s.emplaceBack(l.x,l.y,f),s.emplaceBack(l.x,l.y,f),s.emplaceBack(l.x,l.y,f)}function $P(s){for(var l=0,f=s.sections;l<f.length;l+=1)if(Rg(f[l].text))return!0;return!1}var Nd=function(s){this.layoutVertexArray=new Fg,this.indexArray=new Uf,this.programConfigurations=s,this.segments=new st,this.dynamicLayoutVertexArray=new kp,this.opacityVertexArray=new Cd,this.placedSymbolArray=new y};Nd.prototype.isEmpty=function(){return this.layoutVertexArray.length===0&&this.indexArray.length===0&&this.dynamicLayoutVertexArray.length===0&&this.opacityVertexArray.length===0},Nd.prototype.upload=function(s,l,f,v){this.isEmpty()||(f&&(this.layoutVertexBuffer=s.createVertexBuffer(this.layoutVertexArray,Kw.members),this.indexBuffer=s.createIndexBuffer(this.indexArray,l),this.dynamicLayoutVertexBuffer=s.createVertexBuffer(this.dynamicLayoutVertexArray,PP.members,!0),this.opacityVertexBuffer=s.createVertexBuffer(this.opacityVertexArray,cc,!0),this.opacityVertexBuffer.itemSize=1),(f||v)&&this.programConfigurations.upload(s))},Nd.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.dynamicLayoutVertexBuffer.destroy(),this.opacityVertexBuffer.destroy())},nn("SymbolBuffers",Nd);var xv=function(s,l,f){this.layoutVertexArray=new s,this.layoutAttributes=l,this.indexArray=new f,this.segments=new st,this.collisionVertexArray=new uv};xv.prototype.upload=function(s){this.layoutVertexBuffer=s.createVertexBuffer(this.layoutVertexArray,this.layoutAttributes),this.indexBuffer=s.createIndexBuffer(this.indexArray),this.collisionVertexBuffer=s.createVertexBuffer(this.collisionVertexArray,TP.members,!0)},xv.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.collisionVertexBuffer.destroy())},nn("CollisionBuffers",xv);var mi=function(s){this.collisionBoxArray=s.collisionBoxArray,this.zoom=s.zoom,this.overscaling=s.overscaling,this.layers=s.layers,this.layerIds=this.layers.map(function(w){return w.id}),this.index=s.index,this.pixelRatio=s.pixelRatio,this.sourceLayerIndex=s.sourceLayerIndex,this.hasPattern=!1,this.hasRTLText=!1,this.sortKeyRanges=[],this.collisionCircleArray=[],this.placementInvProjMatrix=Su([]),this.placementViewportMatrix=Su([]);var l=this.layers[0]._unevaluatedLayout._values;this.textSizeData=r_(this.zoom,l["text-size"]),this.iconSizeData=r_(this.zoom,l["icon-size"]);var f=this.layers[0].layout,v=f.get("symbol-sort-key"),b=f.get("symbol-z-order");this.canOverlap=f.get("text-allow-overlap")||f.get("icon-allow-overlap")||f.get("text-ignore-placement")||f.get("icon-ignore-placement"),this.sortFeaturesByKey=b!=="viewport-y"&&v.constantOr(1)!==void 0,this.sortFeaturesByY=(b==="viewport-y"||b==="auto"&&!this.sortFeaturesByKey)&&this.canOverlap,f.get("symbol-placement")==="point"&&(this.writingModes=f.get("text-writing-mode").map(function(w){return Cu[w]})),this.stateDependentLayerIds=this.layers.filter(function(w){return w.isStateDependent()}).map(function(w){return w.id}),this.sourceID=s.sourceID};mi.prototype.createArrays=function(){this.text=new Nd(new ln(this.layers,this.zoom,function(s){return/^text/.test(s)})),this.icon=new Nd(new ln(this.layers,this.zoom,function(s){return/^icon/.test(s)})),this.glyphOffsetArray=new M,this.lineVertexArray=new N,this.symbolInstances=new P},mi.prototype.calculateGlyphDependencies=function(s,l,f,v,b){for(var w=0;w<s.length;w++)if(l[s.charCodeAt(w)]=!0,(f||v)&&b){var I=Od[s.charAt(w)];I&&(l[I.charCodeAt(0)]=!0)}},mi.prototype.populate=function(s,l,f){var v=this.layers[0],b=v.layout,w=b.get("text-font"),I=b.get("text-field"),A=b.get("icon-image"),F=(I.value.kind!=="constant"||I.value.value instanceof Qr&&!I.value.value.isEmpty()||I.value.value.toString().length>0)&&(w.value.kind!=="constant"||w.value.value.length>0),j=A.value.kind!=="constant"||!!A.value.value||Object.keys(A.parameters).length>0,G=b.get("symbol-sort-key");if(this.features=[],F||j){for(var H=l.iconDependencies,J=l.glyphDependencies,rt=l.availableImages,dt=new Sn(this.zoom),_t=0,Pt=s;_t<Pt.length;_t+=1){var St=Pt[_t],Nt=St.feature,qt=St.id,Zt=St.index,ee=St.sourceLayerIndex,fe=v._featureFilter.needGeometry,Ee=Ri(Nt,fe);if(v._featureFilter.filter(dt,Ee,f)){fe||(Ee.geometry=Ui(Nt));var Oe=void 0;if(F){var hn=v.getValueAndResolveTokens("text-field",Ee,f,rt),qe=Qr.factory(hn);$P(qe)&&(this.hasRTLText=!0),(!this.hasRTLText||Dg()==="unavailable"||this.hasRTLText&&bu.isParsed())&&(Oe=kx(qe,v,Ee))}var mn=void 0;if(j){var Ze=v.getValueAndResolveTokens("icon-image",Ee,f,rt);mn=Ze instanceof mo?Ze:mo.fromString(Ze)}if(Oe||mn){var Zn=this.sortFeaturesByKey?G.evaluate(Ee,{},f):void 0;if(this.features.push({id:qt,text:Oe,icon:mn,index:Zt,sourceLayerIndex:ee,geometry:Ee.geometry,properties:Nt.properties,type:VP[Nt.type],sortKey:Zn}),mn&&(H[mn.name]=!0),Oe){var En=w.evaluate(Ee,{},f).join(","),sn=b.get("text-rotation-alignment")==="map"&&b.get("symbol-placement")!=="point";this.allowVerticalPlacement=this.writingModes&&this.writingModes.indexOf(Cu.vertical)>=0;for(var nr=0,Gn=Oe.sections;nr<Gn.length;nr+=1){var wr=Gn[nr];if(wr.image)H[wr.image.name]=!0;else{var yn=Op(Oe.toString()),Gr=wr.fontStack||En,Yi=J[Gr]=J[Gr]||{};this.calculateGlyphDependencies(wr.text,Yi,sn,this.allowVerticalPlacement,yn)}}}}}}b.get("symbol-placement")==="line"&&(this.features=function(Zi){var Vi={},Ki={},yo=[],Do=0;function Jo($i){yo.push(Zi[$i]),Do++}function ms($i,vi,Qa){var Wr=Ki[$i];return delete Ki[$i],Ki[vi]=Wr,yo[Wr].geometry[0].pop(),yo[Wr].geometry[0]=yo[Wr].geometry[0].concat(Qa[0]),Wr}function Ma($i,vi,Qa){var Wr=Vi[vi];return delete Vi[vi],Vi[$i]=Wr,yo[Wr].geometry[0].shift(),yo[Wr].geometry[0]=Qa[0].concat(yo[Wr].geometry[0]),Wr}function vs($i,vi,Qa){var Wr=Qa?vi[0][vi[0].length-1]:vi[0][0];return $i+":"+Wr.x+":"+Wr.y}for(var Co=0;Co<Zi.length;Co++){var Aa=Zi[Co],mr=Aa.geometry,wi=Aa.text?Aa.text.toString():null;if(wi){var li=vs(wi,mr),Or=vs(wi,mr,!0);if(li in Ki&&Or in Vi&&Ki[li]!==Vi[Or]){var Os=Ma(li,Or,mr),Ja=ms(li,Or,yo[Os].geometry);delete Vi[li],delete Ki[Or],Ki[vs(wi,yo[Ja].geometry,!0)]=Ja,yo[Os].geometry=null}else li in Ki?ms(li,Or,mr):Or in Vi?Ma(li,Or,mr):(Jo(Co),Vi[li]=Do-1,Ki[Or]=Do-1)}else Jo(Co)}return yo.filter(function($i){return $i.geometry})}(this.features)),this.sortFeaturesByKey&&this.features.sort(function(Zi,Vi){return Zi.sortKey-Vi.sortKey})}},mi.prototype.update=function(s,l,f){this.stateDependentLayers.length&&(this.text.programConfigurations.updatePaintArrays(s,l,this.layers,f),this.icon.programConfigurations.updatePaintArrays(s,l,this.layers,f))},mi.prototype.isEmpty=function(){return this.symbolInstances.length===0&&!this.hasRTLText},mi.prototype.uploadPending=function(){return!this.uploaded||this.text.programConfigurations.needsUpload||this.icon.programConfigurations.needsUpload},mi.prototype.upload=function(s){!this.uploaded&&this.hasDebugData()&&(this.textCollisionBox.upload(s),this.iconCollisionBox.upload(s)),this.text.upload(s,this.sortFeaturesByY,!this.uploaded,this.text.programConfigurations.needsUpload),this.icon.upload(s,this.sortFeaturesByY,!this.uploaded,this.icon.programConfigurations.needsUpload),this.uploaded=!0},mi.prototype.destroyDebugData=function(){this.textCollisionBox.destroy(),this.iconCollisionBox.destroy()},mi.prototype.destroy=function(){this.text.destroy(),this.icon.destroy(),this.hasDebugData()&&this.destroyDebugData()},mi.prototype.addToLineVertexArray=function(s,l){var f=this.lineVertexArray.length;if(s.segment!==void 0){for(var v=s.dist(l[s.segment+1]),b=s.dist(l[s.segment]),w={},I=s.segment+1;I<l.length;I++)w[I]={x:l[I].x,y:l[I].y,tileUnitDistanceFromAnchor:v},I<l.length-1&&(v+=l[I+1].dist(l[I]));for(var A=s.segment||0;A>=0;A--)w[A]={x:l[A].x,y:l[A].y,tileUnitDistanceFromAnchor:b},A>0&&(b+=l[A-1].dist(l[A]));for(var F=0;F<l.length;F++){var j=w[F];this.lineVertexArray.emplaceBack(j.x,j.y,j.tileUnitDistanceFromAnchor)}}return{lineStartIndex:f,lineLength:this.lineVertexArray.length-f}},mi.prototype.addSymbols=function(s,l,f,v,b,w,I,A,F,j,G,H){for(var J=s.indexArray,rt=s.layoutVertexArray,dt=s.segments.prepareSegment(4*l.length,rt,J,this.canOverlap?w.sortKey:void 0),_t=this.glyphOffsetArray.length,Pt=dt.vertexLength,St=this.allowVerticalPlacement&&I===Cu.vertical?Math.PI/2:0,Nt=w.text&&w.text.sections,qt=0;qt<l.length;qt++){var Zt=l[qt],ee=Zt.tl,fe=Zt.tr,Ee=Zt.bl,Oe=Zt.br,hn=Zt.tex,qe=Zt.pixelOffsetTL,mn=Zt.pixelOffsetBR,Ze=Zt.minFontScaleX,Zn=Zt.minFontScaleY,En=Zt.glyphOffset,sn=Zt.isSDF,nr=Zt.sectionIndex,Gn=dt.vertexLength,wr=En[1];u_(rt,A.x,A.y,ee.x,wr+ee.y,hn.x,hn.y,f,sn,qe.x,qe.y,Ze,Zn),u_(rt,A.x,A.y,fe.x,wr+fe.y,hn.x+hn.w,hn.y,f,sn,mn.x,qe.y,Ze,Zn),u_(rt,A.x,A.y,Ee.x,wr+Ee.y,hn.x,hn.y+hn.h,f,sn,qe.x,mn.y,Ze,Zn),u_(rt,A.x,A.y,Oe.x,wr+Oe.y,hn.x+hn.w,hn.y+hn.h,f,sn,mn.x,mn.y,Ze,Zn),jx(s.dynamicLayoutVertexArray,A,St),J.emplaceBack(Gn,Gn+1,Gn+2),J.emplaceBack(Gn+1,Gn+2,Gn+3),dt.vertexLength+=4,dt.primitiveLength+=2,this.glyphOffsetArray.emplaceBack(En[0]),qt!==l.length-1&&nr===l[qt+1].sectionIndex||s.programConfigurations.populatePaintArrays(rt.length,w,w.index,{},H,Nt&&Nt[nr])}s.placedSymbolArray.emplaceBack(A.x,A.y,_t,this.glyphOffsetArray.length-_t,Pt,F,j,A.segment,f?f[0]:0,f?f[1]:0,v[0],v[1],I,0,!1,0,G)},mi.prototype._addCollisionDebugVertex=function(s,l,f,v,b,w){return l.emplaceBack(0,0),s.emplaceBack(f.x,f.y,v,b,Math.round(w.x),Math.round(w.y))},mi.prototype.addCollisionDebugVertices=function(s,l,f,v,b,w,I){var A=b.segments.prepareSegment(4,b.layoutVertexArray,b.indexArray),F=A.vertexLength,j=b.layoutVertexArray,G=b.collisionVertexArray,H=I.anchorX,J=I.anchorY;this._addCollisionDebugVertex(j,G,w,H,J,new _(s,l)),this._addCollisionDebugVertex(j,G,w,H,J,new _(f,l)),this._addCollisionDebugVertex(j,G,w,H,J,new _(f,v)),this._addCollisionDebugVertex(j,G,w,H,J,new _(s,v)),A.vertexLength+=4;var rt=b.indexArray;rt.emplaceBack(F,F+1),rt.emplaceBack(F+1,F+2),rt.emplaceBack(F+2,F+3),rt.emplaceBack(F+3,F),A.primitiveLength+=4},mi.prototype.addDebugCollisionBoxes=function(s,l,f,v){for(var b=s;b<l;b++){var w=this.collisionBoxArray.get(b);this.addCollisionDebugVertices(w.x1,w.y1,w.x2,w.y2,v?this.textCollisionBox:this.iconCollisionBox,w.anchorPoint,f)}},mi.prototype.generateCollisionDebugBuffers=function(){this.hasDebugData()&&this.destroyDebugData(),this.textCollisionBox=new xv(Dp,Wf.members,Id),this.iconCollisionBox=new xv(Dp,Wf.members,Id);for(var s=0;s<this.symbolInstances.length;s++){var l=this.symbolInstances.get(s);this.addDebugCollisionBoxes(l.textBoxStartIndex,l.textBoxEndIndex,l,!0),this.addDebugCollisionBoxes(l.verticalTextBoxStartIndex,l.verticalTextBoxEndIndex,l,!0),this.addDebugCollisionBoxes(l.iconBoxStartIndex,l.iconBoxEndIndex,l,!1),this.addDebugCollisionBoxes(l.verticalIconBoxStartIndex,l.verticalIconBoxEndIndex,l,!1)}},mi.prototype._deserializeCollisionBoxesForSymbol=function(s,l,f,v,b,w,I,A,F){for(var j={},G=l;G<f;G++){var H=s.get(G);j.textBox={x1:H.x1,y1:H.y1,x2:H.x2,y2:H.y2,anchorPointX:H.anchorPointX,anchorPointY:H.anchorPointY},j.textFeatureIndex=H.featureIndex;break}for(var J=v;J<b;J++){var rt=s.get(J);j.verticalTextBox={x1:rt.x1,y1:rt.y1,x2:rt.x2,y2:rt.y2,anchorPointX:rt.anchorPointX,anchorPointY:rt.anchorPointY},j.verticalTextFeatureIndex=rt.featureIndex;break}for(var dt=w;dt<I;dt++){var _t=s.get(dt);j.iconBox={x1:_t.x1,y1:_t.y1,x2:_t.x2,y2:_t.y2,anchorPointX:_t.anchorPointX,anchorPointY:_t.anchorPointY},j.iconFeatureIndex=_t.featureIndex;break}for(var Pt=A;Pt<F;Pt++){var St=s.get(Pt);j.verticalIconBox={x1:St.x1,y1:St.y1,x2:St.x2,y2:St.y2,anchorPointX:St.anchorPointX,anchorPointY:St.anchorPointY},j.verticalIconFeatureIndex=St.featureIndex;break}return j},mi.prototype.deserializeCollisionBoxes=function(s){this.collisionArrays=[];for(var l=0;l<this.symbolInstances.length;l++){var f=this.symbolInstances.get(l);this.collisionArrays.push(this._deserializeCollisionBoxesForSymbol(s,f.textBoxStartIndex,f.textBoxEndIndex,f.verticalTextBoxStartIndex,f.verticalTextBoxEndIndex,f.iconBoxStartIndex,f.iconBoxEndIndex,f.verticalIconBoxStartIndex,f.verticalIconBoxEndIndex))}},mi.prototype.hasTextData=function(){return this.text.segments.get().length>0},mi.prototype.hasIconData=function(){return this.icon.segments.get().length>0},mi.prototype.hasDebugData=function(){return this.textCollisionBox&&this.iconCollisionBox},mi.prototype.hasTextCollisionBoxData=function(){return this.hasDebugData()&&this.textCollisionBox.segments.get().length>0},mi.prototype.hasIconCollisionBoxData=function(){return this.hasDebugData()&&this.iconCollisionBox.segments.get().length>0},mi.prototype.addIndicesForPlacedSymbol=function(s,l){for(var f=s.placedSymbolArray.get(l),v=f.vertexStartIndex+4*f.numGlyphs,b=f.vertexStartIndex;b<v;b+=4)s.indexArray.emplaceBack(b,b+1,b+2),s.indexArray.emplaceBack(b+1,b+2,b+3)},mi.prototype.getSortedSymbolIndexes=function(s){if(this.sortedAngle===s&&this.symbolInstanceIndexes!==void 0)return this.symbolInstanceIndexes;for(var l=Math.sin(s),f=Math.cos(s),v=[],b=[],w=[],I=0;I<this.symbolInstances.length;++I){w.push(I);var A=this.symbolInstances.get(I);v.push(0|Math.round(l*A.anchorX+f*A.anchorY)),b.push(A.featureIndex)}return w.sort(function(F,j){return v[F]-v[j]||b[j]-b[F]}),w},mi.prototype.addToSortKeyRanges=function(s,l){var f=this.sortKeyRanges[this.sortKeyRanges.length-1];f&&f.sortKey===l?f.symbolInstanceEnd=s+1:this.sortKeyRanges.push({sortKey:l,symbolInstanceStart:s,symbolInstanceEnd:s+1})},mi.prototype.sortFeatures=function(s){var l=this;if(this.sortFeaturesByY&&this.sortedAngle!==s&&!(this.text.segments.get().length>1||this.icon.segments.get().length>1)){this.symbolInstanceIndexes=this.getSortedSymbolIndexes(s),this.sortedAngle=s,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(var f=0,v=this.symbolInstanceIndexes;f<v.length;f+=1){var b=this.symbolInstances.get(v[f]);this.featureSortOrder.push(b.featureIndex),[b.rightJustifiedTextSymbolIndex,b.centerJustifiedTextSymbolIndex,b.leftJustifiedTextSymbolIndex].forEach(function(w,I,A){w>=0&&A.indexOf(w)===I&&l.addIndicesForPlacedSymbol(l.text,w)}),b.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,b.verticalPlacedTextSymbolIndex),b.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,b.placedIconSymbolIndex),b.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,b.verticalPlacedIconSymbolIndex)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}},nn("SymbolBucket",mi,{omit:["layers","collisionBoxArray","features","compareText"]}),mi.MAX_GLYPHS=65535,mi.addDynamicAttributes=jx;var jP=new Ua({"symbol-placement":new cn(at.layout_symbol["symbol-placement"]),"symbol-spacing":new cn(at.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new cn(at.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new rn(at.layout_symbol["symbol-sort-key"]),"symbol-z-order":new cn(at.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new cn(at.layout_symbol["icon-allow-overlap"]),"icon-ignore-placement":new cn(at.layout_symbol["icon-ignore-placement"]),"icon-optional":new cn(at.layout_symbol["icon-optional"]),"icon-rotation-alignment":new cn(at.layout_symbol["icon-rotation-alignment"]),"icon-size":new rn(at.layout_symbol["icon-size"]),"icon-text-fit":new cn(at.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new cn(at.layout_symbol["icon-text-fit-padding"]),"icon-image":new rn(at.layout_symbol["icon-image"]),"icon-rotate":new rn(at.layout_symbol["icon-rotate"]),"icon-padding":new cn(at.layout_symbol["icon-padding"]),"icon-keep-upright":new cn(at.layout_symbol["icon-keep-upright"]),"icon-offset":new rn(at.layout_symbol["icon-offset"]),"icon-anchor":new rn(at.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new cn(at.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new cn(at.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new cn(at.layout_symbol["text-rotation-alignment"]),"text-field":new rn(at.layout_symbol["text-field"]),"text-font":new rn(at.layout_symbol["text-font"]),"text-size":new rn(at.layout_symbol["text-size"]),"text-max-width":new rn(at.layout_symbol["text-max-width"]),"text-line-height":new cn(at.layout_symbol["text-line-height"]),"text-letter-spacing":new rn(at.layout_symbol["text-letter-spacing"]),"text-justify":new rn(at.layout_symbol["text-justify"]),"text-radial-offset":new rn(at.layout_symbol["text-radial-offset"]),"text-variable-anchor":new cn(at.layout_symbol["text-variable-anchor"]),"text-anchor":new rn(at.layout_symbol["text-anchor"]),"text-max-angle":new cn(at.layout_symbol["text-max-angle"]),"text-writing-mode":new cn(at.layout_symbol["text-writing-mode"]),"text-rotate":new rn(at.layout_symbol["text-rotate"]),"text-padding":new cn(at.layout_symbol["text-padding"]),"text-keep-upright":new cn(at.layout_symbol["text-keep-upright"]),"text-transform":new rn(at.layout_symbol["text-transform"]),"text-offset":new rn(at.layout_symbol["text-offset"]),"text-allow-overlap":new cn(at.layout_symbol["text-allow-overlap"]),"text-ignore-placement":new cn(at.layout_symbol["text-ignore-placement"]),"text-optional":new cn(at.layout_symbol["text-optional"])}),qx={paint:new Ua({"icon-opacity":new rn(at.paint_symbol["icon-opacity"]),"icon-color":new rn(at.paint_symbol["icon-color"]),"icon-halo-color":new rn(at.paint_symbol["icon-halo-color"]),"icon-halo-width":new rn(at.paint_symbol["icon-halo-width"]),"icon-halo-blur":new rn(at.paint_symbol["icon-halo-blur"]),"icon-translate":new cn(at.paint_symbol["icon-translate"]),"icon-translate-anchor":new cn(at.paint_symbol["icon-translate-anchor"]),"text-opacity":new rn(at.paint_symbol["text-opacity"]),"text-color":new rn(at.paint_symbol["text-color"],{runtimeType:Re,getOverride:function(s){return s.textColor},hasOverride:function(s){return!!s.textColor}}),"text-halo-color":new rn(at.paint_symbol["text-halo-color"]),"text-halo-width":new rn(at.paint_symbol["text-halo-width"]),"text-halo-blur":new rn(at.paint_symbol["text-halo-blur"]),"text-translate":new cn(at.paint_symbol["text-translate"]),"text-translate-anchor":new cn(at.paint_symbol["text-translate-anchor"])}),layout:jP},Vp=function(s){this.type=s.property.overrides?s.property.overrides.runtimeType:Je,this.defaultValue=s};Vp.prototype.evaluate=function(s){if(s.formattedSection){var l=this.defaultValue.property.overrides;if(l&&l.hasOverride(s.formattedSection))return l.getOverride(s.formattedSection)}return s.feature&&s.featureState?this.defaultValue.evaluate(s.feature,s.featureState):this.defaultValue.property.specification.default},Vp.prototype.eachChild=function(s){this.defaultValue.isConstant()||s(this.defaultValue.value._styleExpression.expression)},Vp.prototype.outputDefined=function(){return!1},Vp.prototype.serialize=function(){return null},nn("FormatSectionOverride",Vp,{omit:["defaultValue"]});var qP=function(s){function l(f){s.call(this,f,qx)}return s&&(l.__proto__=s),(l.prototype=Object.create(s&&s.prototype)).constructor=l,l.prototype.recalculate=function(f,v){if(s.prototype.recalculate.call(this,f,v),this.layout.get("icon-rotation-alignment")==="auto"&&(this.layout._values["icon-rotation-alignment"]=this.layout.get("symbol-placement")!=="point"?"map":"viewport"),this.layout.get("text-rotation-alignment")==="auto"&&(this.layout._values["text-rotation-alignment"]=this.layout.get("symbol-placement")!=="point"?"map":"viewport"),this.layout.get("text-pitch-alignment")==="auto"&&(this.layout._values["text-pitch-alignment"]=this.layout.get("text-rotation-alignment")),this.layout.get("icon-pitch-alignment")==="auto"&&(this.layout._values["icon-pitch-alignment"]=this.layout.get("icon-rotation-alignment")),this.layout.get("symbol-placement")==="point"){var b=this.layout.get("text-writing-mode");if(b){for(var w=[],I=0,A=b;I<A.length;I+=1){var F=A[I];w.indexOf(F)<0&&w.push(F)}this.layout._values["text-writing-mode"]=w}else this.layout._values["text-writing-mode"]=["horizontal"]}this._setPaintOverrides()},l.prototype.getValueAndResolveTokens=function(f,v,b,w){var I=this.layout.get(f).evaluate(v,{},b,w),A=this._unevaluatedLayout._values[f];return A.isDataDriven()||El(A.value)||!I?I:function(F,j){return j.replace(/{([^{}]+)}/g,function(G,H){return H in F?String(F[H]):""})}(v.properties,I)},l.prototype.createBucket=function(f){return new mi(f)},l.prototype.queryRadius=function(){return 0},l.prototype.queryIntersectsFeature=function(){return!1},l.prototype._setPaintOverrides=function(){for(var f=0,v=qx.paint.overridableProperties;f<v.length;f+=1){var b=v[f];if(l.hasPaintOverride(this.layout,b)){var w,I=this.paint.get(b),A=new Vp(I),F=new ec(A,I.property.specification);w=I.value.kind==="constant"||I.value.kind==="source"?new Dh("source",F):new Ut("composite",F,I.value.zoomStops,I.value._interpolationType),this.paint._values[b]=new ca(I.property,w,I.parameters)}}},l.prototype._handleOverridablePaintPropertyUpdate=function(f,v,b){return!(!this.layout||v.isDataDriven()||b.isDataDriven())&&l.hasPaintOverride(this.layout,f)},l.hasPaintOverride=function(f,v){var b=f.get("text-field"),w=qx.paint.properties[v],I=!1,A=function(G){for(var H=0,J=G;H<J.length;H+=1)if(w.overrides&&w.overrides.hasOverride(J[H]))return void(I=!0)};if(b.value.kind==="constant"&&b.value.value instanceof Qr)A(b.value.value.sections);else if(b.value.kind==="source"){var F=function(G){I||(G instanceof ro&&Pi(G.value)===Rr?A(G.value.sections):G instanceof ls?A(G.sections):G.eachChild(F))},j=b.value;j._styleExpression&&F(j._styleExpression.expression)}return I},l}(rc),GP={paint:new Ua({"background-color":new cn(at.paint_background["background-color"]),"background-pattern":new Pa(at.paint_background["background-pattern"]),"background-opacity":new cn(at.paint_background["background-opacity"])})},WP=function(s){function l(f){s.call(this,f,GP)}return s&&(l.__proto__=s),(l.prototype=Object.create(s&&s.prototype)).constructor=l,l}(rc),HP={paint:new Ua({"raster-opacity":new cn(at.paint_raster["raster-opacity"]),"raster-hue-rotate":new cn(at.paint_raster["raster-hue-rotate"]),"raster-brightness-min":new cn(at.paint_raster["raster-brightness-min"]),"raster-brightness-max":new cn(at.paint_raster["raster-brightness-max"]),"raster-saturation":new cn(at.paint_raster["raster-saturation"]),"raster-contrast":new cn(at.paint_raster["raster-contrast"]),"raster-resampling":new cn(at.paint_raster["raster-resampling"]),"raster-fade-duration":new cn(at.paint_raster["raster-fade-duration"])})},XP=function(s){function l(f){s.call(this,f,HP)}return s&&(l.__proto__=s),(l.prototype=Object.create(s&&s.prototype)).constructor=l,l}(rc),YP=function(s){function l(f){s.call(this,f,{}),this.implementation=f}return s&&(l.__proto__=s),(l.prototype=Object.create(s&&s.prototype)).constructor=l,l.prototype.is3D=function(){return this.implementation.renderingMode==="3d"},l.prototype.hasOffscreenPass=function(){return this.implementation.prerender!==void 0},l.prototype.recalculate=function(){},l.prototype.updateTransitions=function(){},l.prototype.hasTransition=function(){},l.prototype.serialize=function(){},l.prototype.onAdd=function(f){this.implementation.onAdd&&this.implementation.onAdd(f,f.painter.context.gl)},l.prototype.onRemove=function(f){this.implementation.onRemove&&this.implementation.onRemove(f,f.painter.context.gl)},l}(rc),ZP={circle:Fy,heatmap:Sx,hillshade:Ex,fill:tl,"fill-extrusion":Xy,line:Yw,symbol:qP,background:WP,raster:XP},dS=C.HTMLImageElement,gS=C.HTMLCanvasElement,mS=C.HTMLVideoElement,vS=C.ImageData,l_=C.ImageBitmap,Fd=function(s,l,f,v){this.context=s,this.format=f,this.texture=s.gl.createTexture(),this.update(l,v)};Fd.prototype.update=function(s,l,f){var v=s.width,b=s.height,w=!(this.size&&this.size[0]===v&&this.size[1]===b||f),I=this.context,A=I.gl;if(this.useMipmap=Boolean(l&&l.useMipmap),A.bindTexture(A.TEXTURE_2D,this.texture),I.pixelStoreUnpackFlipY.set(!1),I.pixelStoreUnpack.set(1),I.pixelStoreUnpackPremultiplyAlpha.set(this.format===A.RGBA&&(!l||l.premultiply!==!1)),w)this.size=[v,b],s instanceof dS||s instanceof gS||s instanceof mS||s instanceof vS||l_&&s instanceof l_?A.texImage2D(A.TEXTURE_2D,0,this.format,this.format,A.UNSIGNED_BYTE,s):A.texImage2D(A.TEXTURE_2D,0,this.format,v,b,0,this.format,A.UNSIGNED_BYTE,s.data);else{var F=f||{x:0,y:0},j=F.x,G=F.y;s instanceof dS||s instanceof gS||s instanceof mS||s instanceof vS||l_&&s instanceof l_?A.texSubImage2D(A.TEXTURE_2D,0,j,G,A.RGBA,A.UNSIGNED_BYTE,s):A.texSubImage2D(A.TEXTURE_2D,0,j,G,v,b,A.RGBA,A.UNSIGNED_BYTE,s.data)}this.useMipmap&&this.isSizePowerOfTwo()&&A.generateMipmap(A.TEXTURE_2D)},Fd.prototype.bind=function(s,l,f){var v=this.context.gl;v.bindTexture(v.TEXTURE_2D,this.texture),f!==v.LINEAR_MIPMAP_NEAREST||this.isSizePowerOfTwo()||(f=v.LINEAR),s!==this.filter&&(v.texParameteri(v.TEXTURE_2D,v.TEXTURE_MAG_FILTER,s),v.texParameteri(v.TEXTURE_2D,v.TEXTURE_MIN_FILTER,f||s),this.filter=s),l!==this.wrap&&(v.texParameteri(v.TEXTURE_2D,v.TEXTURE_WRAP_S,l),v.texParameteri(v.TEXTURE_2D,v.TEXTURE_WRAP_T,l),this.wrap=l)},Fd.prototype.isSizePowerOfTwo=function(){return this.size[0]===this.size[1]&&Math.log(this.size[0])/Math.LN2%1==0},Fd.prototype.destroy=function(){this.context.gl.deleteTexture(this.texture),this.texture=null};var Gx=function(s){var l=this;this._callback=s,this._triggered=!1,typeof MessageChannel!="undefined"&&(this._channel=new MessageChannel,this._channel.port2.onmessage=function(){l._triggered=!1,l._callback()})};Gx.prototype.trigger=function(){var s=this;this._triggered||(this._triggered=!0,this._channel?this._channel.port1.postMessage(!0):setTimeout(function(){s._triggered=!1,s._callback()},0))},Gx.prototype.remove=function(){delete this._channel,this._callback=function(){}};var Xg=function(s,l,f){this.target=s,this.parent=l,this.mapId=f,this.callbacks={},this.tasks={},this.taskQueue=[],this.cancelCallbacks={},wt(["receive","process"],this),this.invoker=new Gx(this.process),this.target.addEventListener("message",this.receive,!1),this.globalScope=Ge()?s:C};function yS(s,l,f){var v=2*Math.PI*6378137/256/Math.pow(2,f);return[s*v-2*Math.PI*6378137/2,l*v-2*Math.PI*6378137/2]}Xg.prototype.send=function(s,l,f,v,b){var w=this;b===void 0&&(b=!1);var I=Math.round(1e18*Math.random()).toString(36).substring(0,10);f&&(this.callbacks[I]=f);var A=ve(this.globalScope)?void 0:[];return this.target.postMessage({id:I,type:s,hasCallback:!!f,targetMapId:v,mustQueue:b,sourceMapId:this.mapId,data:Wu(l,A)},A),{cancel:function(){f&&delete w.callbacks[I],w.target.postMessage({id:I,type:"<cancel>",targetMapId:v,sourceMapId:w.mapId})}}},Xg.prototype.receive=function(s){var l=s.data,f=l.id;if(f&&(!l.targetMapId||this.mapId===l.targetMapId))if(l.type==="<cancel>"){delete this.tasks[f];var v=this.cancelCallbacks[f];delete this.cancelCallbacks[f],v&&v()}else Ge()||l.mustQueue?(this.tasks[f]=l,this.taskQueue.push(f),this.invoker.trigger()):this.processTask(f,l)},Xg.prototype.process=function(){if(this.taskQueue.length){var s=this.taskQueue.shift(),l=this.tasks[s];delete this.tasks[s],this.taskQueue.length&&this.invoker.trigger(),l&&this.processTask(s,l)}},Xg.prototype.processTask=function(s,l){var f=this;if(l.type==="<response>"){var v=this.callbacks[s];delete this.callbacks[s],v&&(l.error?v(Xa(l.error)):v(null,Xa(l.data)))}else{var b=!1,w=ve(this.globalScope)?void 0:[],I=l.hasCallback?function(G,H){b=!0,delete f.cancelCallbacks[s],f.target.postMessage({id:s,type:"<response>",sourceMapId:f.mapId,error:G?Wu(G):null,data:Wu(H,w)},w)}:function(G){b=!0},A=null,F=Xa(l.data);if(this.parent[l.type])A=this.parent[l.type](l.sourceMapId,F,I);else if(this.parent.getWorkerSource){var j=l.type.split(".");A=this.parent.getWorkerSource(l.sourceMapId,j[0],F.source)[j[1]](F,I)}else I(new Error("Could not find function "+l.type));!b&&A&&A.cancel&&(this.cancelCallbacks[s]=A.cancel)}},Xg.prototype.remove=function(){this.invoker.remove(),this.target.removeEventListener("message",this.receive,!1)};var Zo=function(s,l){s&&(l?this.setSouthWest(s).setNorthEast(l):s.length===4?this.setSouthWest([s[0],s[1]]).setNorthEast([s[2],s[3]]):this.setSouthWest(s[0]).setNorthEast(s[1]))};Zo.prototype.setNorthEast=function(s){return this._ne=s instanceof Xi?new Xi(s.lng,s.lat):Xi.convert(s),this},Zo.prototype.setSouthWest=function(s){return this._sw=s instanceof Xi?new Xi(s.lng,s.lat):Xi.convert(s),this},Zo.prototype.extend=function(s){var l,f,v=this._sw,b=this._ne;if(s instanceof Xi)l=s,f=s;else{if(!(s instanceof Zo))return Array.isArray(s)?s.length===4||s.every(Array.isArray)?this.extend(Zo.convert(s)):this.extend(Xi.convert(s)):this;if(f=s._ne,!(l=s._sw)||!f)return this}return v||b?(v.lng=Math.min(l.lng,v.lng),v.lat=Math.min(l.lat,v.lat),b.lng=Math.max(f.lng,b.lng),b.lat=Math.max(f.lat,b.lat)):(this._sw=new Xi(l.lng,l.lat),this._ne=new Xi(f.lng,f.lat)),this},Zo.prototype.getCenter=function(){return new Xi((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)},Zo.prototype.getSouthWest=function(){return this._sw},Zo.prototype.getNorthEast=function(){return this._ne},Zo.prototype.getNorthWest=function(){return new Xi(this.getWest(),this.getNorth())},Zo.prototype.getSouthEast=function(){return new Xi(this.getEast(),this.getSouth())},Zo.prototype.getWest=function(){return this._sw.lng},Zo.prototype.getSouth=function(){return this._sw.lat},Zo.prototype.getEast=function(){return this._ne.lng},Zo.prototype.getNorth=function(){return this._ne.lat},Zo.prototype.toArray=function(){return[this._sw.toArray(),this._ne.toArray()]},Zo.prototype.toString=function(){return"LngLatBounds("+this._sw.toString()+", "+this._ne.toString()+")"},Zo.prototype.isEmpty=function(){return!(this._sw&&this._ne)},Zo.prototype.contains=function(s){var l=Xi.convert(s),f=l.lng,v=l.lat,b=this._sw.lng<=f&&f<=this._ne.lng;return this._sw.lng>this._ne.lng&&(b=this._sw.lng>=f&&f>=this._ne.lng),this._sw.lat<=v&&v<=this._ne.lat&&b},Zo.convert=function(s){return!s||s instanceof Zo?s:new Zo(s)};var Xi=function(s,l){if(isNaN(s)||isNaN(l))throw new Error("Invalid LngLat object: ("+s+", "+l+")");if(this.lng=+s,this.lat=+l,this.lat>90||this.lat<-90)throw new Error("Invalid LngLat latitude value: must be between -90 and 90")};Xi.prototype.wrap=function(){return new Xi(z(this.lng,-180,180),this.lat)},Xi.prototype.toArray=function(){return[this.lng,this.lat]},Xi.prototype.toString=function(){return"LngLat("+this.lng+", "+this.lat+")"},Xi.prototype.distanceTo=function(s){var l=Math.PI/180,f=this.lat*l,v=s.lat*l,b=Math.sin(f)*Math.sin(v)+Math.cos(f)*Math.cos(v)*Math.cos((s.lng-this.lng)*l);return 63710088e-1*Math.acos(Math.min(b,1))},Xi.prototype.toBounds=function(s){s===void 0&&(s=0);var l=360*s/40075017,f=l/Math.cos(Math.PI/180*this.lat);return new Zo(new Xi(this.lng-f,this.lat-l),new Xi(this.lng+f,this.lat+l))},Xi.convert=function(s){if(s instanceof Xi)return s;if(Array.isArray(s)&&(s.length===2||s.length===3))return new Xi(Number(s[0]),Number(s[1]));if(!Array.isArray(s)&&typeof s=="object"&&s!==null)return new Xi(Number("lng"in s?s.lng:s.lon),Number(s.lat));throw new Error("`LngLatLike` argument must be specified as a LngLat instance, an object {lng: <lng>, lat: <lat>}, an object {lon: <lng>, lat: <lat>}, or an array of [<lng>, <lat>]")};var _S=2*Math.PI*63710088e-1;function xS(s){return _S*Math.cos(s*Math.PI/180)}function c_(s){return(180+s)/360}function Wx(s){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+s*Math.PI/360)))/360}function bS(s,l){return s/xS(l)}function Hx(s){return 360/Math.PI*Math.atan(Math.exp((180-360*s)*Math.PI/180))-90}var zd=function(s,l,f){f===void 0&&(f=0),this.x=+s,this.y=+l,this.z=+f};zd.fromLngLat=function(s,l){l===void 0&&(l=0);var f=Xi.convert(s);return new zd(c_(f.lng),Wx(f.lat),bS(l,f.lat))},zd.prototype.toLngLat=function(){return new Xi(360*this.x-180,Hx(this.y))},zd.prototype.toAltitude=function(){return this.z*xS(Hx(this.y))},zd.prototype.meterInMercatorCoordinateUnits=function(){return 1/_S*(s=Hx(this.y),1/Math.cos(s*Math.PI/180));var s};var Bd=function(s,l,f){this.z=s,this.x=l,this.y=f,this.key=bv(0,s,s,l,f)};Bd.prototype.equals=function(s){return this.z===s.z&&this.x===s.x&&this.y===s.y},Bd.prototype.url=function(s,l){var f,v,b,w,I,A=(v=this.y,b=this.z,w=yS(256*(f=this.x),256*(v=Math.pow(2,b)-v-1),b),I=yS(256*(f+1),256*(v+1),b),w[0]+","+w[1]+","+I[0]+","+I[1]),F=function(j,G,H){for(var J,rt="",dt=j;dt>0;dt--)rt+=(G&(J=1<<dt-1)?1:0)+(H&J?2:0);return rt}(this.z,this.x,this.y);return s[(this.x+this.y)%s.length].replace("{prefix}",(this.x%16).toString(16)+(this.y%16).toString(16)).replace("{z}",String(this.z)).replace("{x}",String(this.x)).replace("{y}",String(l==="tms"?Math.pow(2,this.z)-this.y-1:this.y)).replace("{quadkey}",F).replace("{bbox-epsg-3857}",A)},Bd.prototype.getTilePoint=function(s){var l=Math.pow(2,this.z);return new _(8192*(s.x*l-this.x),8192*(s.y*l-this.y))},Bd.prototype.toString=function(){return this.z+"/"+this.x+"/"+this.y};var wS=function(s,l){this.wrap=s,this.canonical=l,this.key=bv(s,l.z,l.z,l.x,l.y)},Ko=function(s,l,f,v,b){this.overscaledZ=s,this.wrap=l,this.canonical=new Bd(f,+v,+b),this.key=bv(l,s,f,v,b)};function bv(s,l,f,v,b){(s*=2)<0&&(s=-1*s-1);var w=1<<f;return(w*w*s+w*b+v).toString(36)+f.toString(36)+l.toString(36)}Ko.prototype.equals=function(s){return this.overscaledZ===s.overscaledZ&&this.wrap===s.wrap&&this.canonical.equals(s.canonical)},Ko.prototype.scaledTo=function(s){var l=this.canonical.z-s;return s>this.canonical.z?new Ko(s,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new Ko(s,this.wrap,s,this.canonical.x>>l,this.canonical.y>>l)},Ko.prototype.calculateScaledKey=function(s,l){var f=this.canonical.z-s;return s>this.canonical.z?bv(this.wrap*+l,s,this.canonical.z,this.canonical.x,this.canonical.y):bv(this.wrap*+l,s,s,this.canonical.x>>f,this.canonical.y>>f)},Ko.prototype.isChildOf=function(s){if(s.wrap!==this.wrap)return!1;var l=this.canonical.z-s.canonical.z;return s.overscaledZ===0||s.overscaledZ<this.overscaledZ&&s.canonical.x===this.canonical.x>>l&&s.canonical.y===this.canonical.y>>l},Ko.prototype.children=function(s){if(this.overscaledZ>=s)return[new Ko(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];var l=this.canonical.z+1,f=2*this.canonical.x,v=2*this.canonical.y;return[new Ko(l,this.wrap,l,f,v),new Ko(l,this.wrap,l,f+1,v),new Ko(l,this.wrap,l,f,v+1),new Ko(l,this.wrap,l,f+1,v+1)]},Ko.prototype.isLessThan=function(s){return this.wrap<s.wrap||!(this.wrap>s.wrap)&&(this.overscaledZ<s.overscaledZ||!(this.overscaledZ>s.overscaledZ)&&(this.canonical.x<s.canonical.x||!(this.canonical.x>s.canonical.x)&&this.canonical.y<s.canonical.y))},Ko.prototype.wrapped=function(){return new Ko(this.overscaledZ,0,this.canonical.z,this.canonical.x,this.canonical.y)},Ko.prototype.unwrapTo=function(s){return new Ko(this.overscaledZ,s,this.canonical.z,this.canonical.x,this.canonical.y)},Ko.prototype.overscaleFactor=function(){return Math.pow(2,this.overscaledZ-this.canonical.z)},Ko.prototype.toUnwrapped=function(){return new wS(this.wrap,this.canonical)},Ko.prototype.toString=function(){return this.overscaledZ+"/"+this.canonical.x+"/"+this.canonical.y},Ko.prototype.getTilePoint=function(s){return this.canonical.getTilePoint(new zd(s.x-this.wrap,s.y))},nn("CanonicalTileID",Bd),nn("OverscaledTileID",Ko,{omit:["posMatrix"]});var Xh=function(s,l,f){if(this.uid=s,l.height!==l.width)throw new RangeError("DEM tiles must be square");if(f&&f!=="mapbox"&&f!=="terrarium")return He('"'+f+'" is not a valid encoding type. Valid types include "mapbox" and "terrarium".');this.stride=l.height;var v=this.dim=l.height-2;this.data=new Uint32Array(l.data.buffer),this.encoding=f||"mapbox";for(var b=0;b<v;b++)this.data[this._idx(-1,b)]=this.data[this._idx(0,b)],this.data[this._idx(v,b)]=this.data[this._idx(v-1,b)],this.data[this._idx(b,-1)]=this.data[this._idx(b,0)],this.data[this._idx(b,v)]=this.data[this._idx(b,v-1)];this.data[this._idx(-1,-1)]=this.data[this._idx(0,0)],this.data[this._idx(v,-1)]=this.data[this._idx(v-1,0)],this.data[this._idx(-1,v)]=this.data[this._idx(0,v-1)],this.data[this._idx(v,v)]=this.data[this._idx(v-1,v-1)]};Xh.prototype.get=function(s,l){var f=new Uint8Array(this.data.buffer),v=4*this._idx(s,l);return(this.encoding==="terrarium"?this._unpackTerrarium:this._unpackMapbox)(f[v],f[v+1],f[v+2])},Xh.prototype.getUnpackVector=function(){return this.encoding==="terrarium"?[256,1,1/256,32768]:[6553.6,25.6,.1,1e4]},Xh.prototype._idx=function(s,l){if(s<-1||s>=this.dim+1||l<-1||l>=this.dim+1)throw new RangeError("out of range source coordinates for DEM data");return(l+1)*this.stride+(s+1)},Xh.prototype._unpackMapbox=function(s,l,f){return(256*s*256+256*l+f)/10-1e4},Xh.prototype._unpackTerrarium=function(s,l,f){return 256*s+l+f/256-32768},Xh.prototype.getPixels=function(){return new Ks({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))},Xh.prototype.backfillBorder=function(s,l,f){if(this.dim!==s.dim)throw new Error("dem dimension mismatch");var v=l*this.dim,b=l*this.dim+this.dim,w=f*this.dim,I=f*this.dim+this.dim;switch(l){case-1:v=b-1;break;case 1:b=v+1}switch(f){case-1:w=I-1;break;case 1:I=w+1}for(var A=-l*this.dim,F=-f*this.dim,j=w;j<I;j++)for(var G=v;G<b;G++)this.data[this._idx(G,j)]=s.data[this._idx(G+A,j+F)]},nn("DEMData",Xh);var wv=function(s){this._stringToNumber={},this._numberToString=[];for(var l=0;l<s.length;l++){var f=s[l];this._stringToNumber[f]=l,this._numberToString[l]=f}};wv.prototype.encode=function(s){return this._stringToNumber[s]},wv.prototype.decode=function(s){return this._numberToString[s]};var f_=function(s,l,f,v,b){this.type="Feature",this._vectorTileFeature=s,s._z=l,s._x=f,s._y=v,this.properties=s.properties,this.id=b},Yg={geometry:{configurable:!0}};Yg.geometry.get=function(){return this._geometry===void 0&&(this._geometry=this._vectorTileFeature.toGeoJSON(this._vectorTileFeature._x,this._vectorTileFeature._y,this._vectorTileFeature._z).geometry),this._geometry},Yg.geometry.set=function(s){this._geometry=s},f_.prototype.toJSON=function(){var s={geometry:this.geometry};for(var l in this)l!=="_geometry"&&l!=="_vectorTileFeature"&&(s[l]=this[l]);return s},Object.defineProperties(f_.prototype,Yg);var Zg=function(){this.state={},this.stateChanges={},this.deletedStates={}};Zg.prototype.updateState=function(s,l,f){var v=String(l);if(this.stateChanges[s]=this.stateChanges[s]||{},this.stateChanges[s][v]=this.stateChanges[s][v]||{},k(this.stateChanges[s][v],f),this.deletedStates[s]===null)for(var b in this.deletedStates[s]={},this.state[s])b!==v&&(this.deletedStates[s][b]=null);else if(this.deletedStates[s]&&this.deletedStates[s][v]===null)for(var w in this.deletedStates[s][v]={},this.state[s][v])f[w]||(this.deletedStates[s][v][w]=null);else for(var I in f)this.deletedStates[s]&&this.deletedStates[s][v]&&this.deletedStates[s][v][I]===null&&delete this.deletedStates[s][v][I]},Zg.prototype.removeFeatureState=function(s,l,f){if(this.deletedStates[s]!==null){var v=String(l);if(this.deletedStates[s]=this.deletedStates[s]||{},f&&l!==void 0)this.deletedStates[s][v]!==null&&(this.deletedStates[s][v]=this.deletedStates[s][v]||{},this.deletedStates[s][v][f]=null);else if(l!==void 0)if(this.stateChanges[s]&&this.stateChanges[s][v])for(f in this.deletedStates[s][v]={},this.stateChanges[s][v])this.deletedStates[s][v][f]=null;else this.deletedStates[s][v]=null;else this.deletedStates[s]=null}},Zg.prototype.getState=function(s,l){var f=String(l),v=k({},(this.state[s]||{})[f],(this.stateChanges[s]||{})[f]);if(this.deletedStates[s]===null)return{};if(this.deletedStates[s]){var b=this.deletedStates[s][l];if(b===null)return{};for(var w in b)delete v[w]}return v},Zg.prototype.initializeTileState=function(s,l){s.setFeatureState(this.state,l)},Zg.prototype.coalesceChanges=function(s,l){var f={};for(var v in this.stateChanges){this.state[v]=this.state[v]||{};var b={};for(var w in this.stateChanges[v])this.state[v][w]||(this.state[v][w]={}),k(this.state[v][w],this.stateChanges[v][w]),b[w]=this.state[v][w];f[v]=b}for(var I in this.deletedStates){this.state[I]=this.state[I]||{};var A={};if(this.deletedStates[I]===null)for(var F in this.state[I])A[F]={},this.state[I][F]={};else for(var j in this.deletedStates[I]){if(this.deletedStates[I][j]===null)this.state[I][j]={};else for(var G=0,H=Object.keys(this.deletedStates[I][j]);G<H.length;G+=1)delete this.state[I][j][H[G]];A[j]=this.state[I][j]}f[I]=f[I]||{},k(f[I],A)}if(this.stateChanges={},this.deletedStates={},Object.keys(f).length!==0)for(var J in s)s[J].setFeatureState(f,l)};var Yh=function(s,l){this.tileID=s,this.x=s.canonical.x,this.y=s.canonical.y,this.z=s.canonical.z,this.grid=new Xs(8192,16,0),this.grid3D=new Xs(8192,16,0),this.featureIndexArray=new X,this.promoteId=l};function SS(s,l,f,v,b){return Bt(s,function(w,I){var A=l instanceof Uh?l.get(I):null;return A&&A.evaluate?A.evaluate(f,v,b):A})}function ES(s){for(var l=1/0,f=1/0,v=-1/0,b=-1/0,w=0,I=s;w<I.length;w+=1){var A=I[w];l=Math.min(l,A.x),f=Math.min(f,A.y),v=Math.max(v,A.x),b=Math.max(b,A.y)}return{minX:l,minY:f,maxX:v,maxY:b}}function KP(s,l){return l-s}Yh.prototype.insert=function(s,l,f,v,b,w){var I=this.featureIndexArray.length;this.featureIndexArray.emplaceBack(f,v,b);for(var A=w?this.grid3D:this.grid,F=0;F<l.length;F++){for(var j=l[F],G=[1/0,1/0,-1/0,-1/0],H=0;H<j.length;H++){var J=j[H];G[0]=Math.min(G[0],J.x),G[1]=Math.min(G[1],J.y),G[2]=Math.max(G[2],J.x),G[3]=Math.max(G[3],J.y)}G[0]<8192&&G[1]<8192&&G[2]>=0&&G[3]>=0&&A.insert(I,G[0],G[1],G[2],G[3])}},Yh.prototype.loadVTLayers=function(){return this.vtLayers||(this.vtLayers=new Xc.VectorTile(new qn(this.rawTileData)).layers,this.sourceLayerCoder=new wv(this.vtLayers?Object.keys(this.vtLayers).sort():["_geojsonTileLayer"])),this.vtLayers},Yh.prototype.query=function(s,l,f,v){var b=this;this.loadVTLayers();for(var w=s.params||{},I=8192/s.tileSize/s.scale,A=Ts(w.filter),F=s.queryGeometry,j=s.queryPadding*I,G=ES(F),H=this.grid.query(G.minX-j,G.minY-j,G.maxX+j,G.maxY+j),J=ES(s.cameraQueryGeometry),rt=this.grid3D.query(J.minX-j,J.minY-j,J.maxX+j,J.maxY+j,function(Zt,ee,fe,Ee){return function(Oe,hn,qe,mn,Ze){for(var Zn=0,En=Oe;Zn<En.length;Zn+=1){var sn=En[Zn];if(hn<=sn.x&&qe<=sn.y&&mn>=sn.x&&Ze>=sn.y)return!0}var nr=[new _(hn,qe),new _(hn,Ze),new _(mn,Ze),new _(mn,qe)];if(Oe.length>2){for(var Gn=0,wr=nr;Gn<wr.length;Gn+=1)if(oc(Oe,wr[Gn]))return!0}for(var yn=0;yn<Oe.length-1;yn++)if(jc(Oe[yn],Oe[yn+1],nr))return!0;return!1}(s.cameraQueryGeometry,Zt-j,ee-j,fe+j,Ee+j)}),dt=0,_t=rt;dt<_t.length;dt+=1)H.push(_t[dt]);H.sort(KP);for(var Pt,St={},Nt=function(Zt){var ee=H[Zt];if(ee!==Pt){Pt=ee;var fe=b.featureIndexArray.get(ee),Ee=null;b.loadMatchingFeature(St,fe.bucketIndex,fe.sourceLayerIndex,fe.featureIndex,A,w.layers,w.availableImages,l,f,v,function(Oe,hn,qe){return Ee||(Ee=Ui(Oe)),hn.queryIntersectsFeature(F,Oe,qe,Ee,b.z,s.transform,I,s.pixelPosMatrix)})}},qt=0;qt<H.length;qt++)Nt(qt);return St},Yh.prototype.loadMatchingFeature=function(s,l,f,v,b,w,I,A,F,j,G){var H=this.bucketLayerIDs[l];if(!w||function(Oe,hn){for(var qe=0;qe<Oe.length;qe++)if(hn.indexOf(Oe[qe])>=0)return!0;return!1}(w,H)){var J=this.sourceLayerCoder.decode(f),rt=this.vtLayers[J].feature(v);if(b.needGeometry){var dt=Ri(rt,!0);if(!b.filter(new Sn(this.tileID.overscaledZ),dt,this.tileID.canonical))return}else if(!b.filter(new Sn(this.tileID.overscaledZ),rt))return;for(var _t=this.getId(rt,J),Pt=0;Pt<H.length;Pt++){var St=H[Pt];if(!(w&&w.indexOf(St)<0)){var Nt=A[St];if(Nt){var qt={};_t!==void 0&&j&&(qt=j.getState(Nt.sourceLayer||"_geojsonTileLayer",_t));var Zt=k({},F[St]);Zt.paint=SS(Zt.paint,Nt.paint,rt,qt,I),Zt.layout=SS(Zt.layout,Nt.layout,rt,qt,I);var ee=!G||G(rt,Nt,qt);if(ee){var fe=new f_(rt,this.z,this.x,this.y,_t);fe.layer=Zt;var Ee=s[St];Ee===void 0&&(Ee=s[St]=[]),Ee.push({featureIndex:v,feature:fe,intersectionZ:ee})}}}}}},Yh.prototype.lookupSymbolFeatures=function(s,l,f,v,b,w,I,A){var F={};this.loadVTLayers();for(var j=Ts(b),G=0,H=s;G<H.length;G+=1)this.loadMatchingFeature(F,f,v,H[G],j,w,I,A,l);return F},Yh.prototype.hasLayer=function(s){for(var l=0,f=this.bucketLayerIDs;l<f.length;l+=1)for(var v=0,b=f[l];v<b.length;v+=1)if(s===b[v])return!0;return!1},Yh.prototype.getId=function(s,l){var f=s.id;return this.promoteId&&typeof(f=s.properties[typeof this.promoteId=="string"?this.promoteId:this.promoteId[l]])=="boolean"&&(f=Number(f)),f},nn("FeatureIndex",Yh,{omit:["rawTileData","sourceLayerCoder"]});var Ta=function(s,l){this.tileID=s,this.uid=K(),this.uses=0,this.tileSize=l,this.buckets={},this.expirationTime=null,this.queryPadding=0,this.hasSymbolBuckets=!1,this.hasRTLText=!1,this.dependencies={},this.expiredRequestCount=0,this.state="loading"};Ta.prototype.registerFadeDuration=function(s){var l=s+this.timeAdded;l<Fi.now()||this.fadeEndTime&&l<this.fadeEndTime||(this.fadeEndTime=l)},Ta.prototype.wasRequested=function(){return this.state==="errored"||this.state==="loaded"||this.state==="reloading"},Ta.prototype.loadVectorData=function(s,l,f){if(this.hasData()&&this.unloadVectorData(),this.state="loaded",s){for(var v in s.featureIndex&&(this.latestFeatureIndex=s.featureIndex,s.rawTileData?(this.latestRawTileData=s.rawTileData,this.latestFeatureIndex.rawTileData=s.rawTileData):this.latestRawTileData&&(this.latestFeatureIndex.rawTileData=this.latestRawTileData)),this.collisionBoxArray=s.collisionBoxArray,this.buckets=function(j,G){var H={};if(!G)return H;for(var J=function(){var _t=dt[rt],Pt=_t.layerIds.map(function(qt){return G.getLayer(qt)}).filter(Boolean);if(Pt.length!==0){_t.layers=Pt,_t.stateDependentLayerIds&&(_t.stateDependentLayers=_t.stateDependentLayerIds.map(function(qt){return Pt.filter(function(Zt){return Zt.id===qt})[0]}));for(var St=0,Nt=Pt;St<Nt.length;St+=1)H[Nt[St].id]=_t}},rt=0,dt=j;rt<dt.length;rt+=1)J();return H}(s.buckets,l.style),this.hasSymbolBuckets=!1,this.buckets){var b=this.buckets[v];if(b instanceof mi){if(this.hasSymbolBuckets=!0,!f)break;b.justReloaded=!0}}if(this.hasRTLText=!1,this.hasSymbolBuckets)for(var w in this.buckets){var I=this.buckets[w];if(I instanceof mi&&I.hasRTLText){this.hasRTLText=!0,bu.isLoading()||bu.isLoaded()||Dg()!=="deferred"||Pl();break}}for(var A in this.queryPadding=0,this.buckets){var F=this.buckets[A];this.queryPadding=Math.max(this.queryPadding,l.style.getLayer(A).queryRadius(F))}s.imageAtlas&&(this.imageAtlas=s.imageAtlas),s.glyphAtlasImage&&(this.glyphAtlasImage=s.glyphAtlasImage)}else this.collisionBoxArray=new d},Ta.prototype.unloadVectorData=function(){for(var s in this.buckets)this.buckets[s].destroy();this.buckets={},this.imageAtlasTexture&&this.imageAtlasTexture.destroy(),this.imageAtlas&&(this.imageAtlas=null),this.glyphAtlasTexture&&this.glyphAtlasTexture.destroy(),this.latestFeatureIndex=null,this.state="unloaded"},Ta.prototype.getBucket=function(s){return this.buckets[s.id]},Ta.prototype.upload=function(s){for(var l in this.buckets){var f=this.buckets[l];f.uploadPending()&&f.upload(s)}var v=s.gl;this.imageAtlas&&!this.imageAtlas.uploaded&&(this.imageAtlasTexture=new Fd(s,this.imageAtlas.image,v.RGBA),this.imageAtlas.uploaded=!0),this.glyphAtlasImage&&(this.glyphAtlasTexture=new Fd(s,this.glyphAtlasImage,v.ALPHA),this.glyphAtlasImage=null)},Ta.prototype.prepare=function(s){this.imageAtlas&&this.imageAtlas.patchUpdatedImages(s,this.imageAtlasTexture)},Ta.prototype.queryRenderedFeatures=function(s,l,f,v,b,w,I,A,F,j){return this.latestFeatureIndex&&this.latestFeatureIndex.rawTileData?this.latestFeatureIndex.query({queryGeometry:v,cameraQueryGeometry:b,scale:w,tileSize:this.tileSize,pixelPosMatrix:j,transform:A,params:I,queryPadding:this.queryPadding*F},s,l,f):{}},Ta.prototype.querySourceFeatures=function(s,l){var f=this.latestFeatureIndex;if(f&&f.rawTileData){var v=f.loadVTLayers(),b=l?l.sourceLayer:"",w=v._geojsonTileLayer||v[b];if(w)for(var I=Ts(l&&l.filter),A=this.tileID.canonical,F=A.z,j=A.x,G=A.y,H={z:F,x:j,y:G},J=0;J<w.length;J++){var rt=w.feature(J);if(I.needGeometry){var dt=Ri(rt,!0);if(!I.filter(new Sn(this.tileID.overscaledZ),dt,this.tileID.canonical))continue}else if(!I.filter(new Sn(this.tileID.overscaledZ),rt))continue;var _t=f.getId(rt,b),Pt=new f_(rt,F,j,G,_t);Pt.tile=H,s.push(Pt)}}},Ta.prototype.hasData=function(){return this.state==="loaded"||this.state==="reloading"||this.state==="expired"},Ta.prototype.patternsLoaded=function(){return this.imageAtlas&&!!Object.keys(this.imageAtlas.patternPositions).length},Ta.prototype.setExpiryData=function(s){var l=this.expirationTime;if(s.cacheControl){var f=Yt(s.cacheControl);f["max-age"]&&(this.expirationTime=Date.now()+1e3*f["max-age"])}else s.expires&&(this.expirationTime=new Date(s.expires).getTime());if(this.expirationTime){var v=Date.now(),b=!1;if(this.expirationTime>v)b=!1;else if(l)if(this.expirationTime<l)b=!0;else{var w=this.expirationTime-l;w?this.expirationTime=v+Math.max(w,3e4):b=!0}else b=!0;b?(this.expiredRequestCount++,this.state="expired"):this.expiredRequestCount=0}},Ta.prototype.getExpiryTimeout=function(){if(this.expirationTime)return this.expiredRequestCount?1e3*(1<<Math.min(this.expiredRequestCount-1,31)):Math.min(this.expirationTime-new Date().getTime(),Math.pow(2,31)-1)},Ta.prototype.setFeatureState=function(s,l){if(this.latestFeatureIndex&&this.latestFeatureIndex.rawTileData&&Object.keys(s).length!==0){var f=this.latestFeatureIndex.loadVTLayers();for(var v in this.buckets)if(l.style.hasLayer(v)){var b=this.buckets[v],w=b.layers[0].sourceLayer||"_geojsonTileLayer",I=f[w],A=s[w];if(I&&A&&Object.keys(A).length!==0){b.update(A,I,this.imageAtlas&&this.imageAtlas.patternPositions||{});var F=l&&l.style&&l.style.getLayer(v);F&&(this.queryPadding=Math.max(this.queryPadding,F.queryRadius(b)))}}}},Ta.prototype.holdingForFade=function(){return this.symbolFadeHoldUntil!==void 0},Ta.prototype.symbolFadeFinished=function(){return!this.symbolFadeHoldUntil||this.symbolFadeHoldUntil<Fi.now()},Ta.prototype.clearFadeHold=function(){this.symbolFadeHoldUntil=void 0},Ta.prototype.setHoldDuration=function(s){this.symbolFadeHoldUntil=Fi.now()+s},Ta.prototype.setDependencies=function(s,l){for(var f={},v=0,b=l;v<b.length;v+=1)f[b[v]]=!0;this.dependencies[s]=f},Ta.prototype.hasDependency=function(s,l){for(var f=0,v=s;f<v.length;f+=1){var b=this.dependencies[v[f]];if(b){for(var w=0,I=l;w<I.length;w+=1)if(b[I[w]])return!0}}return!1};var $p=C.performance,CS=function(s){this._marks={start:[s.url,"start"].join("#"),end:[s.url,"end"].join("#"),measure:s.url.toString()},$p.mark(this._marks.start)};CS.prototype.finish=function(){$p.mark(this._marks.end);var s=$p.getEntriesByName(this._marks.measure);return s.length===0&&($p.measure(this._marks.measure,this._marks.start,this._marks.end),s=$p.getEntriesByName(this._marks.measure),$p.clearMarks(this._marks.start),$p.clearMarks(this._marks.end),$p.clearMeasures(this._marks.measure)),s},o.Actor=Xg,o.AlphaImage=Bp,o.CanonicalTileID=Bd,o.CollisionBoxArray=d,o.Color=pr,o.DEMData=Xh,o.DataConstantProperty=cn,o.DictionaryCoder=wv,o.EXTENT=8192,o.ErrorEvent=Mt,o.EvaluationParameters=Sn,o.Event=vt,o.Evented=Rt,o.FeatureIndex=Yh,o.FillBucket=Hc,o.FillExtrusionBucket=lc,o.ImageAtlas=Gg,o.ImagePosition=t_,o.LineBucket=Ls,o.LngLat=Xi,o.LngLatBounds=Zo,o.MercatorCoordinate=zd,o.ONE_EM=24,o.OverscaledTileID=Ko,o.Point=_,o.Point$1=_,o.Properties=Ua,o.Protobuf=qn,o.RGBAImage=Ks,o.RequestManager=ni,o.RequestPerformance=CS,o.ResourceType=yl,o.SegmentVector=st,o.SourceFeatureState=Zg,o.StructArrayLayout1ui2=cv,o.StructArrayLayout2f1f2i16=Vh,o.StructArrayLayout2i4=Bf,o.StructArrayLayout3ui6=Uf,o.StructArrayLayout4i8=ut,o.SymbolBucket=mi,o.Texture=Fd,o.Tile=Ta,o.Transitionable=Ba,o.Uniform1f=we,o.Uniform1i=ge,o.Uniform2f=Te,o.Uniform3f=je,o.Uniform4f=an,o.UniformColor=_n,o.UniformMatrix4f=Ir,o.UnwrappedTileID=wS,o.ValidationError=bt,o.WritingMode=Cu,o.ZoomHistory=Og,o.add=function(s,l,f){return s[0]=l[0]+f[0],s[1]=l[1]+f[1],s[2]=l[2]+f[2],s},o.addDynamicAttributes=jx,o.asyncAll=function(s,l,f){if(!s.length)return f(null,[]);var v=s.length,b=new Array(s.length),w=null;s.forEach(function(I,A){l(I,function(F,j){F&&(w=F),b[A]=j,--v==0&&f(w,b)})})},o.bezier=R,o.bindAll=wt,o.browser=Fi,o.cacheEntryPossiblyAdded=function(s){++yr>To&&(s.getActor().send("enforceCacheSizeLimit",no),yr=0)},o.clamp=B,o.clearTileCache=function(s){var l=C.caches.delete("mapbox-tiles");s&&l.catch(s).then(function(){return s()})},o.clipLine=sS,o.clone=function(s){var l=new Yr(16);return l[0]=s[0],l[1]=s[1],l[2]=s[2],l[3]=s[3],l[4]=s[4],l[5]=s[5],l[6]=s[6],l[7]=s[7],l[8]=s[8],l[9]=s[9],l[10]=s[10],l[11]=s[11],l[12]=s[12],l[13]=s[13],l[14]=s[14],l[15]=s[15],l},o.clone$1=_e,o.clone$2=function(s){var l=new Yr(3);return l[0]=s[0],l[1]=s[1],l[2]=s[2],l},o.collisionCircleLayout=Rx,o.config=fr,o.create=function(){var s=new Yr(16);return Yr!=Float32Array&&(s[1]=0,s[2]=0,s[3]=0,s[4]=0,s[6]=0,s[7]=0,s[8]=0,s[9]=0,s[11]=0,s[12]=0,s[13]=0,s[14]=0),s[0]=1,s[5]=1,s[10]=1,s[15]=1,s},o.create$1=function(){var s=new Yr(9);return Yr!=Float32Array&&(s[1]=0,s[2]=0,s[3]=0,s[5]=0,s[6]=0,s[7]=0),s[0]=1,s[4]=1,s[8]=1,s},o.create$2=function(){var s=new Yr(4);return Yr!=Float32Array&&(s[1]=0,s[2]=0),s[0]=1,s[3]=1,s},o.createCommonjsModule=u,o.createExpression=kh,o.createLayout=Oo,o.createStyleLayer=function(s){return s.type==="custom"?new YP(s):new ZP[s.type](s)},o.cross=function(s,l,f){var v=l[0],b=l[1],w=l[2],I=f[0],A=f[1],F=f[2];return s[0]=b*F-w*A,s[1]=w*I-v*F,s[2]=v*A-b*I,s},o.deepEqual=function s(l,f){if(Array.isArray(l)){if(!Array.isArray(f)||l.length!==f.length)return!1;for(var v=0;v<l.length;v++)if(!s(l[v],f[v]))return!1;return!0}if(typeof l=="object"&&l!==null&&f!==null){if(typeof f!="object"||Object.keys(l).length!==Object.keys(f).length)return!1;for(var b in l)if(!s(l[b],f[b]))return!1;return!0}return l===f},o.dot=function(s,l){return s[0]*l[0]+s[1]*l[1]+s[2]*l[2]},o.dot$1=function(s,l){return s[0]*l[0]+s[1]*l[1]+s[2]*l[2]+s[3]*l[3]},o.ease=D,o.emitValidationErrors=Dr,o.endsWith=Ot,o.enforceCacheSizeLimit=function(s){zi(),Ve&&Ve.then(function(l){l.keys().then(function(f){for(var v=0;v<f.length-s;v++)l.delete(f[v])})})},o.evaluateSizeForFeature=Yc,o.evaluateSizeForZoom=Up,o.evaluateVariableOffset=fS,o.evented=av,o.extend=k,o.featureFilter=Ts,o.filterObject=se,o.fromRotation=function(s,l){var f=Math.sin(l),v=Math.cos(l);return s[0]=v,s[1]=f,s[2]=0,s[3]=-f,s[4]=v,s[5]=0,s[6]=0,s[7]=0,s[8]=1,s},o.getAnchorAlignment=yv,o.getAnchorJustification=$x,o.getArrayBuffer=Yl,o.getImage=Y,o.getJSON=function(s,l){return Ur(k(s,{type:"json"}),l)},o.getRTLTextPluginStatus=Dg,o.getReferrer=Vs,o.getVideo=function(s,l){var f,v,b=C.document.createElement("video");b.muted=!0,b.onloadstart=function(){l(null,b)};for(var w=0;w<s.length;w++){var I=C.document.createElement("source");f=s[w],v=void 0,(v=C.document.createElement("a")).href=f,(v.protocol!==C.document.location.protocol||v.host!==C.document.location.host)&&(b.crossOrigin="Anonymous"),I.src=s[w],b.appendChild(I)}return{cancel:function(){}}},o.identity=Su,o.invert=function(s,l){var f=l[0],v=l[1],b=l[2],w=l[3],I=l[4],A=l[5],F=l[6],j=l[7],G=l[8],H=l[9],J=l[10],rt=l[11],dt=l[12],_t=l[13],Pt=l[14],St=l[15],Nt=f*A-v*I,qt=f*F-b*I,Zt=f*j-w*I,ee=v*F-b*A,fe=v*j-w*A,Ee=b*j-w*F,Oe=G*_t-H*dt,hn=G*Pt-J*dt,qe=G*St-rt*dt,mn=H*Pt-J*_t,Ze=H*St-rt*_t,Zn=J*St-rt*Pt,En=Nt*Zn-qt*Ze+Zt*mn+ee*qe-fe*hn+Ee*Oe;return En?(s[0]=(A*Zn-F*Ze+j*mn)*(En=1/En),s[1]=(b*Ze-v*Zn-w*mn)*En,s[2]=(_t*Ee-Pt*fe+St*ee)*En,s[3]=(J*fe-H*Ee-rt*ee)*En,s[4]=(F*qe-I*Zn-j*hn)*En,s[5]=(f*Zn-b*qe+w*hn)*En,s[6]=(Pt*Zt-dt*Ee-St*qt)*En,s[7]=(G*Ee-J*Zt+rt*qt)*En,s[8]=(I*Ze-A*qe+j*Oe)*En,s[9]=(v*qe-f*Ze-w*Oe)*En,s[10]=(dt*fe-_t*Zt+St*Nt)*En,s[11]=(H*Zt-G*fe-rt*Nt)*En,s[12]=(A*hn-I*mn-F*Oe)*En,s[13]=(f*mn-v*hn+b*Oe)*En,s[14]=(_t*qt-dt*ee-Pt*Nt)*En,s[15]=(G*ee-H*qt+J*Nt)*En,s):null},o.isChar=Fe,o.isMapboxURL=Wi,o.keysDifference=function(s,l){var f=[];for(var v in s)v in l||f.push(v);return f},o.makeRequest=Ur,o.mapObject=Bt,o.mercatorXfromLng=c_,o.mercatorYfromLat=Wx,o.mercatorZfromAltitude=bS,o.mul=wx,o.multiply=ds,o.mvt=Xc,o.nextPowerOfTwo=function(s){return s<=1?1:Math.pow(2,Math.ceil(Math.log(s)/Math.LN2))},o.normalize=function(s,l){var f=l[0],v=l[1],b=l[2],w=f*f+v*v+b*b;return w>0&&(w=1/Math.sqrt(w)),s[0]=l[0]*w,s[1]=l[1]*w,s[2]=l[2]*w,s},o.number=Oi,o.offscreenCanvasSupported=Rn,o.ortho=function(s,l,f,v,b,w,I){var A=1/(l-f),F=1/(v-b),j=1/(w-I);return s[0]=-2*A,s[1]=0,s[2]=0,s[3]=0,s[4]=0,s[5]=-2*F,s[6]=0,s[7]=0,s[8]=0,s[9]=0,s[10]=2*j,s[11]=0,s[12]=(l+f)*A,s[13]=(b+v)*F,s[14]=(I+w)*j,s[15]=1,s},o.parseGlyphPBF=function(s){return new qn(s).readFields(Dx,[])},o.pbf=qn,o.performSymbolLayout=function(s,l,f,v,b,w,I){s.createArrays(),s.tilePixelRatio=8192/(512*s.overscaling),s.compareText={},s.iconsNeedLinear=!1;var A=s.layers[0].layout,F=s.layers[0]._unevaluatedLayout._values,j={};if(s.textSizeData.kind==="composite"){var G=s.textSizeData,H=G.maxZoom;j.compositeTextSizes=[F["text-size"].possiblyEvaluate(new Sn(G.minZoom),I),F["text-size"].possiblyEvaluate(new Sn(H),I)]}if(s.iconSizeData.kind==="composite"){var J=s.iconSizeData,rt=J.maxZoom;j.compositeIconSizes=[F["icon-size"].possiblyEvaluate(new Sn(J.minZoom),I),F["icon-size"].possiblyEvaluate(new Sn(rt),I)]}j.layoutTextSize=F["text-size"].possiblyEvaluate(new Sn(s.zoom+1),I),j.layoutIconSize=F["icon-size"].possiblyEvaluate(new Sn(s.zoom+1),I),j.textMaxSize=F["text-size"].possiblyEvaluate(new Sn(18));for(var dt=24*A.get("text-line-height"),_t=A.get("text-rotation-alignment")==="map"&&A.get("symbol-placement")!=="point",Pt=A.get("text-keep-upright"),St=A.get("text-size"),Nt=function(){var ee=Zt[qt],fe=A.get("text-font").evaluate(ee,{},I).join(","),Ee=St.evaluate(ee,{},I),Oe=j.layoutTextSize.evaluate(ee,{},I),hn=j.layoutIconSize.evaluate(ee,{},I),qe={horizontal:{},vertical:void 0},mn=ee.text,Ze=[0,0];if(mn){var Zn=mn.toString(),En=24*A.get("text-letter-spacing").evaluate(ee,{},I),sn=function(mr){for(var wi=0,li=mr;wi<li.length;wi+=1)if(Or=li[wi].charCodeAt(0),Fe.Arabic(Or)||Fe["Arabic Supplement"](Or)||Fe["Arabic Extended-A"](Or)||Fe["Arabic Presentation Forms-A"](Or)||Fe["Arabic Presentation Forms-B"](Or))return!1;var Or;return!0}(Zn)?En:0,nr=A.get("text-anchor").evaluate(ee,{},I),Gn=A.get("text-variable-anchor");if(!Gn){var wr=A.get("text-radial-offset").evaluate(ee,{},I);Ze=wr?fS(nr,[24*wr,s_]):A.get("text-offset").evaluate(ee,{},I).map(function(mr){return 24*mr})}var yn=_t?"center":A.get("text-justify").evaluate(ee,{},I),Gr=A.get("symbol-placement"),Yi=Gr==="point"?24*A.get("text-max-width").evaluate(ee,{},I):0,Zi=function(){s.allowVerticalPlacement&&Op(Zn)&&(qe.vertical=e_(mn,l,f,b,fe,Yi,dt,nr,"left",sn,Ze,Cu.vertical,!0,Gr,Oe,Ee))};if(!_t&&Gn){for(var Vi=yn==="auto"?Gn.map(function(mr){return $x(mr)}):[yn],Ki=!1,yo=0;yo<Vi.length;yo++){var Do=Vi[yo];if(!qe.horizontal[Do])if(Ki)qe.horizontal[Do]=qe.horizontal[0];else{var Jo=e_(mn,l,f,b,fe,Yi,dt,"center",Do,sn,Ze,Cu.horizontal,!1,Gr,Oe,Ee);Jo&&(qe.horizontal[Do]=Jo,Ki=Jo.positionedLines.length===1)}}Zi()}else{yn==="auto"&&(yn=$x(nr));var ms=e_(mn,l,f,b,fe,Yi,dt,nr,yn,sn,Ze,Cu.horizontal,!1,Gr,Oe,Ee);ms&&(qe.horizontal[yn]=ms),Zi(),Op(Zn)&&_t&&Pt&&(qe.vertical=e_(mn,l,f,b,fe,Yi,dt,nr,yn,sn,Ze,Cu.vertical,!1,Gr,Oe,Ee))}}var Ma=void 0,vs=!1;if(ee.icon&&ee.icon.name){var Co=v[ee.icon.name];Co&&(Ma=function(mr,wi,li){var Or=yv(li),Os=wi[0]-mr.displaySize[0]*Or.horizontalAlign,Ja=wi[1]-mr.displaySize[1]*Or.verticalAlign;return{image:mr,top:Ja,bottom:Ja+mr.displaySize[1],left:Os,right:Os+mr.displaySize[0]}}(b[ee.icon.name],A.get("icon-offset").evaluate(ee,{},I),A.get("icon-anchor").evaluate(ee,{},I)),vs=Co.sdf,s.sdfIcons===void 0?s.sdfIcons=Co.sdf:s.sdfIcons!==Co.sdf&&He("Style sheet warning: Cannot mix SDF and non-SDF icons in one buffer"),(Co.pixelRatio!==s.pixelRatio||A.get("icon-rotate").constantOr(1)!==0)&&(s.iconsNeedLinear=!0))}var Aa=pS(qe.horizontal)||qe.vertical;s.iconsInText=!!Aa&&Aa.iconsInText,(Aa||Ma)&&function(mr,wi,li,Or,Os,Ja,$i,vi,Qa,Wr,eu){var zn=Ja.textMaxSize.evaluate(wi,{});zn===void 0&&(zn=$i);var Hf,Zr=mr.layers[0].layout,ji=Zr.get("icon-offset").evaluate(wi,{},eu),fc=pS(li.horizontal),Ol=$i/24,Ud=mr.tilePixelRatio*Ol,Kg=mr.tilePixelRatio*zn/24,Zh=mr.tilePixelRatio*vi,Jg=mr.tilePixelRatio*Zr.get("symbol-spacing"),h_=Zr.get("text-padding")*mr.tilePixelRatio,jp=Zr.get("icon-padding")*mr.tilePixelRatio,Sv=Zr.get("text-max-angle")/180*Math.PI,hc=Zr.get("text-rotation-alignment")==="map"&&Zr.get("symbol-placement")!=="point",Ev=Zr.get("icon-rotation-alignment")==="map"&&Zr.get("symbol-placement")!=="point",pc=Zr.get("symbol-placement"),uo=Jg/2,lo=Zr.get("icon-text-fit");Or&&lo!=="none"&&(mr.allowVerticalPlacement&&li.vertical&&(Hf=Ux(Or,li.vertical,lo,Zr.get("icon-text-fit-padding"),ji,Ol)),fc&&(Or=Ux(Or,fc,lo,Zr.get("icon-text-fit-padding"),ji,Ol)));var Kh=function(PS,nu){nu.x<0||nu.x>=8192||nu.y<0||nu.y>=8192||function(_o,Zc,qi,qp,y_,Tv,__,Zf,x_,Mv,b_,w_,Yx,TS,Av,MS,AS,LS,OS,S_,nl,nm,RS,Kf,JP){var ts,Va,rm,im,om,Gd=_o.addToLineVertexArray(Zc,qi),kS=0,DS=0,NS=0,Zx=0,Kx=-1,Jx=-1,Qh={},Qx=gt(""),E_=0,t1=0;if(Zf._unevaluatedLayout.getValue("text-radial-offset")===void 0?(E_=(ts=Zf.layout.get("text-offset").evaluate(nl,{},Kf).map(function(Ov){return 24*Ov}))[0],t1=ts[1]):(E_=24*Zf.layout.get("text-radial-offset").evaluate(nl,{},Kf),t1=s_),_o.allowVerticalPlacement&&qp.vertical){var FS=Zf.layout.get("text-rotate").evaluate(nl,{},Kf)+90;im=new _v(x_,Zc,Mv,b_,w_,qp.vertical,Yx,TS,Av,FS),__&&(om=new _v(x_,Zc,Mv,b_,w_,__,AS,LS,Av,FS))}if(y_){var e1=Zf.layout.get("icon-rotate").evaluate(nl,{}),zS=Zf.layout.get("icon-text-fit")!=="none",Wd=uS(y_,e1,RS,zS),n1=__?uS(__,e1,RS,zS):void 0;rm=new _v(x_,Zc,Mv,b_,w_,y_,AS,LS,!1,e1),kS=4*Wd.length;var BS=_o.iconSizeData,Lv=null;BS.kind==="source"?(Lv=[128*Zf.layout.get("icon-size").evaluate(nl,{})])[0]>32640&&He(_o.layerIds[0]+': Value for "icon-size" is >= 255. Reduce your "icon-size".'):BS.kind==="composite"&&((Lv=[128*nm.compositeIconSizes[0].evaluate(nl,{},Kf),128*nm.compositeIconSizes[1].evaluate(nl,{},Kf)])[0]>32640||Lv[1]>32640)&&He(_o.layerIds[0]+': Value for "icon-size" is >= 255. Reduce your "icon-size".'),_o.addSymbols(_o.icon,Wd,Lv,S_,OS,nl,!1,Zc,Gd.lineStartIndex,Gd.lineLength,-1,Kf),Kx=_o.icon.placedSymbolArray.length-1,n1&&(DS=4*n1.length,_o.addSymbols(_o.icon,n1,Lv,S_,OS,nl,Cu.vertical,Zc,Gd.lineStartIndex,Gd.lineLength,-1,Kf),Jx=_o.icon.placedSymbolArray.length-1)}for(var US in qp.horizontal){var C_=qp.horizontal[US];if(!Va){Qx=gt(C_.text);var VS=Zf.layout.get("text-rotate").evaluate(nl,{},Kf);Va=new _v(x_,Zc,Mv,b_,w_,C_,Yx,TS,Av,VS)}var r1=C_.positionedLines.length===1;if(NS+=hS(_o,Zc,C_,Tv,Zf,Av,nl,MS,Gd,qp.vertical?Cu.horizontal:Cu.horizontalOnly,r1?Object.keys(qp.horizontal):[US],Qh,Kx,nm,Kf),r1)break}qp.vertical&&(Zx+=hS(_o,Zc,qp.vertical,Tv,Zf,Av,nl,MS,Gd,Cu.vertical,["vertical"],Qh,Jx,nm,Kf));var QP=Va?Va.boxStartIndex:_o.collisionBoxArray.length,tT=Va?Va.boxEndIndex:_o.collisionBoxArray.length,eT=im?im.boxStartIndex:_o.collisionBoxArray.length,nT=im?im.boxEndIndex:_o.collisionBoxArray.length,rT=rm?rm.boxStartIndex:_o.collisionBoxArray.length,iT=rm?rm.boxEndIndex:_o.collisionBoxArray.length,oT=om?om.boxStartIndex:_o.collisionBoxArray.length,aT=om?om.boxEndIndex:_o.collisionBoxArray.length,Jf=-1,I_=function(Ov,jS){return Ov&&Ov.circleDiameter?Math.max(Ov.circleDiameter,jS):jS};Jf=I_(Va,Jf),Jf=I_(im,Jf),Jf=I_(rm,Jf);var $S=(Jf=I_(om,Jf))>-1?1:0;$S&&(Jf*=JP/24),_o.glyphOffsetArray.length>=mi.MAX_GLYPHS&&He("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),nl.sortKey!==void 0&&_o.addToSortKeyRanges(_o.symbolInstances.length,nl.sortKey),_o.symbolInstances.emplaceBack(Zc.x,Zc.y,Qh.right>=0?Qh.right:-1,Qh.center>=0?Qh.center:-1,Qh.left>=0?Qh.left:-1,Qh.vertical||-1,Kx,Jx,Qx,QP,tT,eT,nT,rT,iT,oT,aT,Mv,NS,Zx,kS,DS,$S,0,Yx,E_,t1,Jf)}(mr,nu,PS,li,Or,Os,Hf,mr.layers[0],mr.collisionBoxArray,wi.index,wi.sourceLayerIndex,mr.index,Ud,h_,hc,Qa,Zh,jp,Ev,ji,wi,Ja,Wr,eu,$i)};if(pc==="line")for(var Qg=0,p_=sS(wi.geometry,0,0,8192,8192);Qg<p_.length;Qg+=1)for(var d_=p_[Qg],Cv=0,Iv=FP(d_,Jg,Sv,li.vertical||fc,Or,24,Kg,mr.overscaling,8192);Cv<Iv.length;Cv+=1){var g_=Iv[Cv];fc&&UP(mr,fc.text,uo,g_)||Kh(d_,g_)}else if(pc==="line-center")for(var tm=0,Jh=wi.geometry;tm<Jh.length;tm+=1){var Vd=Jh[tm];if(Vd.length>1){var m_=NP(Vd,Sv,li.vertical||fc,Or,24,Kg);m_&&Kh(Vd,m_)}}else if(wi.type==="Polygon")for(var $d=0,jd=Tx(wi.geometry,0);$d<jd.length;$d+=1){var ys=jd[$d],Xf=zP(ys,16);Kh(ys[0],new Hh(Xf.x,Xf.y,0))}else if(wi.type==="LineString")for(var qd=0,Pv=wi.geometry;qd<Pv.length;qd+=1){var em=Pv[qd];Kh(em,new Hh(em[0].x,em[0].y,0))}else if(wi.type==="Point")for(var Xx=0,IS=wi.geometry;Xx<IS.length;Xx+=1)for(var v_=0,Yf=IS[Xx];v_<Yf.length;v_+=1){var Sr=Yf[v_];Kh([Sr],new Hh(Sr.x,Sr.y,0))}}(s,ee,qe,Ma,v,j,Oe,hn,Ze,vs,I)},qt=0,Zt=s.features;qt<Zt.length;qt+=1)Nt();w&&s.generateCollisionDebugBuffers()},o.perspective=function(s,l,f,v,b){var w,I=1/Math.tan(l/2);return s[0]=I/f,s[1]=0,s[2]=0,s[3]=0,s[4]=0,s[5]=I,s[6]=0,s[7]=0,s[8]=0,s[9]=0,s[11]=-1,s[12]=0,s[13]=0,s[15]=0,b!=null&&b!==1/0?(s[10]=(b+v)*(w=1/(v-b)),s[14]=2*b*v*w):(s[10]=-1,s[14]=-2*v),s},o.pick=function(s,l){for(var f={},v=0;v<l.length;v++){var b=l[v];b in s&&(f[b]=s[b])}return f},o.plugin=bu,o.polygonIntersectsPolygon=ic,o.postMapLoadEvent=Un,o.postTurnstileEvent=sr,o.potpack=eS,o.refProperties=["type","source","source-layer","minzoom","maxzoom","filter","layout"],o.register=nn,o.registerForPluginStateChange=function(s){return s({pluginStatus:Ys,pluginURL:Hu}),av.on("pluginStateChange",s),s},o.renderColorRamp=Nw,o.rotate=function(s,l,f){var v=l[0],b=l[1],w=l[2],I=l[3],A=Math.sin(f),F=Math.cos(f);return s[0]=v*F+w*A,s[1]=b*F+I*A,s[2]=v*-A+w*F,s[3]=b*-A+I*F,s},o.rotateX=function(s,l,f){var v=Math.sin(f),b=Math.cos(f),w=l[4],I=l[5],A=l[6],F=l[7],j=l[8],G=l[9],H=l[10],J=l[11];return l!==s&&(s[0]=l[0],s[1]=l[1],s[2]=l[2],s[3]=l[3],s[12]=l[12],s[13]=l[13],s[14]=l[14],s[15]=l[15]),s[4]=w*b+j*v,s[5]=I*b+G*v,s[6]=A*b+H*v,s[7]=F*b+J*v,s[8]=j*b-w*v,s[9]=G*b-I*v,s[10]=H*b-A*v,s[11]=J*b-F*v,s},o.rotateZ=function(s,l,f){var v=Math.sin(f),b=Math.cos(f),w=l[0],I=l[1],A=l[2],F=l[3],j=l[4],G=l[5],H=l[6],J=l[7];return l!==s&&(s[8]=l[8],s[9]=l[9],s[10]=l[10],s[11]=l[11],s[12]=l[12],s[13]=l[13],s[14]=l[14],s[15]=l[15]),s[0]=w*b+j*v,s[1]=I*b+G*v,s[2]=A*b+H*v,s[3]=F*b+J*v,s[4]=j*b-w*v,s[5]=G*b-I*v,s[6]=H*b-A*v,s[7]=J*b-F*v,s},o.scale=function(s,l,f){var v=f[0],b=f[1],w=f[2];return s[0]=l[0]*v,s[1]=l[1]*v,s[2]=l[2]*v,s[3]=l[3]*v,s[4]=l[4]*b,s[5]=l[5]*b,s[6]=l[6]*b,s[7]=l[7]*b,s[8]=l[8]*w,s[9]=l[9]*w,s[10]=l[10]*w,s[11]=l[11]*w,s[12]=l[12],s[13]=l[13],s[14]=l[14],s[15]=l[15],s},o.scale$1=function(s,l,f){return s[0]=l[0]*f,s[1]=l[1]*f,s[2]=l[2]*f,s[3]=l[3]*f,s},o.scale$2=function(s,l,f){return s[0]=l[0]*f,s[1]=l[1]*f,s[2]=l[2]*f,s},o.setCacheLimits=function(s,l){no=s,To=l},o.setRTLTextPlugin=function(s,l,f){if(f===void 0&&(f=!1),Ys==="deferred"||Ys==="loading"||Ys==="loaded")throw new Error("setRTLTextPlugin cannot be called multiple times.");Hu=Fi.resolveURL(s),Ys="deferred",kg=l,Bh(),f||Pl()},o.sphericalToCartesian=function(s){var l=s[0],f=s[1],v=s[2];return f+=90,f*=Math.PI/180,v*=Math.PI/180,{x:l*Math.cos(f)*Math.sin(v),y:l*Math.sin(f)*Math.sin(v),z:l*Math.cos(v)}},o.sqrLen=function(s){var l=s[0],f=s[1];return l*l+f*f},o.styleSpec=at,o.sub=function(s,l,f){return s[0]=l[0]-f[0],s[1]=l[1]-f[1],s[2]=l[2]-f[2],s},o.symbolSize=DP,o.transformMat3=function(s,l,f){var v=l[0],b=l[1],w=l[2];return s[0]=v*f[0]+b*f[3]+w*f[6],s[1]=v*f[1]+b*f[4]+w*f[7],s[2]=v*f[2]+b*f[5]+w*f[8],s},o.transformMat4=Fp,o.translate=function(s,l,f){var v,b,w,I,A,F,j,G,H,J,rt,dt,_t=f[0],Pt=f[1],St=f[2];return l===s?(s[12]=l[0]*_t+l[4]*Pt+l[8]*St+l[12],s[13]=l[1]*_t+l[5]*Pt+l[9]*St+l[13],s[14]=l[2]*_t+l[6]*Pt+l[10]*St+l[14],s[15]=l[3]*_t+l[7]*Pt+l[11]*St+l[15]):(b=l[1],w=l[2],I=l[3],A=l[4],F=l[5],j=l[6],G=l[7],H=l[8],J=l[9],rt=l[10],dt=l[11],s[0]=v=l[0],s[1]=b,s[2]=w,s[3]=I,s[4]=A,s[5]=F,s[6]=j,s[7]=G,s[8]=H,s[9]=J,s[10]=rt,s[11]=dt,s[12]=v*_t+A*Pt+H*St+l[12],s[13]=b*_t+F*Pt+J*St+l[13],s[14]=w*_t+j*Pt+rt*St+l[14],s[15]=I*_t+G*Pt+dt*St+l[15]),s},o.triggerPluginCompletionEvent=Ed,o.uniqueId=K,o.validateCustomStyleLayer=function(s){var l=[],f=s.id;return f===void 0&&l.push({message:"layers."+f+': missing required property "id"'}),s.render===void 0&&l.push({message:"layers."+f+': missing required method "render"'}),s.renderingMode&&s.renderingMode!=="2d"&&s.renderingMode!=="3d"&&l.push({message:"layers."+f+': property "renderingMode" must be either "2d" or "3d"'}),l},o.validateLight=Bc,o.validateStyle=Hs,o.values=function(s){var l=[];for(var f in s)l.push(s[f]);return l},o.vectorTile=Xc,o.version="1.13.2",o.warnOnce=He,o.webpSupported=_a,o.window=C,o.wrap=z}),a(["./shared"],function(o){function u(W){var Y=typeof W;if(Y==="number"||Y==="boolean"||Y==="string"||W==null)return JSON.stringify(W);if(Array.isArray(W)){for(var nt="[",lt=0,vt=W;lt<vt.length;lt+=1)nt+=u(vt[lt])+",";return nt+"]"}for(var Mt=Object.keys(W).sort(),Rt="{",at=0;at<Mt.length;at++)Rt+=JSON.stringify(Mt[at])+":"+u(W[Mt[at]])+",";return Rt+"}"}function c(W){for(var Y="",nt=0,lt=o.refProperties;nt<lt.length;nt+=1)Y+="/"+u(W[lt[nt]]);return Y}var g=function(W){this.keyCache={},W&&this.replace(W)};g.prototype.replace=function(W){this._layerConfigs={},this._layers={},this.update(W,[])},g.prototype.update=function(W,Y){for(var nt=this,lt=0,vt=W;lt<vt.length;lt+=1){var Mt=vt[lt];this._layerConfigs[Mt.id]=Mt;var Rt=this._layers[Mt.id]=o.createStyleLayer(Mt);Rt._featureFilter=o.featureFilter(Rt.filter),this.keyCache[Mt.id]&&delete this.keyCache[Mt.id]}for(var at=0,bt=Y;at<bt.length;at+=1){var Vt=bt[at];delete this.keyCache[Vt],delete this._layerConfigs[Vt],delete this._layers[Vt]}this.familiesBySource={};for(var pe=0,ye=function(Me,Re){for(var Mn={},$e=0;$e<Me.length;$e++){var Qn=Re&&Re[Me[$e].id]||c(Me[$e]);Re&&(Re[Me[$e].id]=Qn);var Rr=Mn[Qn];Rr||(Rr=Mn[Qn]=[]),Rr.push(Me[$e])}var wn=[];for(var hr in Mn)wn.push(Mn[hr]);return wn}(o.values(this._layerConfigs),this.keyCache);pe<ye.length;pe+=1){var Qt=ye[pe].map(function(Me){return nt._layers[Me.id]}),me=Qt[0];if(me.visibility!=="none"){var tn=me.source||"",Je=this.familiesBySource[tn];Je||(Je=this.familiesBySource[tn]={});var re=me.sourceLayer||"_geojsonTileLayer",ze=Je[re];ze||(ze=Je[re]=[]),ze.push(Qt)}}};var _=function(W){var Y={},nt=[];for(var lt in W){var vt=W[lt],Mt=Y[lt]={};for(var Rt in vt){var at=vt[+Rt];if(at&&at.bitmap.width!==0&&at.bitmap.height!==0){var bt={x:0,y:0,w:at.bitmap.width+2,h:at.bitmap.height+2};nt.push(bt),Mt[Rt]={rect:bt,metrics:at.metrics}}}}var Vt=o.potpack(nt),pe=new o.AlphaImage({width:Vt.w||1,height:Vt.h||1});for(var ye in W){var Qt=W[ye];for(var me in Qt){var tn=Qt[+me];if(tn&&tn.bitmap.width!==0&&tn.bitmap.height!==0){var Je=Y[ye][me].rect;o.AlphaImage.copy(tn.bitmap,pe,{x:0,y:0},{x:Je.x+1,y:Je.y+1},tn.bitmap)}}}this.image=pe,this.positions=Y};o.register("GlyphAtlas",_);var E=function(W){this.tileID=new o.OverscaledTileID(W.tileID.overscaledZ,W.tileID.wrap,W.tileID.canonical.z,W.tileID.canonical.x,W.tileID.canonical.y),this.uid=W.uid,this.zoom=W.zoom,this.pixelRatio=W.pixelRatio,this.tileSize=W.tileSize,this.source=W.source,this.overscaling=this.tileID.overscaleFactor(),this.showCollisionBoxes=W.showCollisionBoxes,this.collectResourceTiming=!!W.collectResourceTiming,this.returnDependencies=!!W.returnDependencies,this.promoteId=W.promoteId};function C(W,Y,nt){for(var lt=new o.EvaluationParameters(Y),vt=0,Mt=W;vt<Mt.length;vt+=1)Mt[vt].recalculate(lt,nt)}function O(W,Y){var nt=o.getArrayBuffer(W.request,function(lt,vt,Mt,Rt){lt?Y(lt):vt&&Y(null,{vectorTile:new o.vectorTile.VectorTile(new o.pbf(vt)),rawData:vt,cacheControl:Mt,expires:Rt})});return function(){nt.cancel(),Y()}}E.prototype.parse=function(W,Y,nt,lt,vt){var Mt=this;this.status="parsing",this.data=W,this.collisionBoxArray=new o.CollisionBoxArray;var Rt=new o.DictionaryCoder(Object.keys(W.layers).sort()),at=new o.FeatureIndex(this.tileID,this.promoteId);at.bucketLayerIDs=[];var bt,Vt,pe,ye,Qt={},me={featureIndex:at,iconDependencies:{},patternDependencies:{},glyphDependencies:{},availableImages:nt},tn=Y.familiesBySource[this.source];for(var Je in tn){var re=W.layers[Je];if(re){re.version===1&&o.warnOnce('Vector tile source "'+this.source+'" layer "'+Je+'" does not use vector tile spec v2 and therefore may have some rendering errors.');for(var ze=Rt.encode(Je),Me=[],Re=0;Re<re.length;Re++){var Mn=re.feature(Re),$e=at.getId(Mn,Je);Me.push({feature:Mn,id:$e,index:Re,sourceLayerIndex:ze})}for(var Qn=0,Rr=tn[Je];Qn<Rr.length;Qn+=1){var wn=Rr[Qn],hr=wn[0];hr.minzoom&&this.zoom<Math.floor(hr.minzoom)||hr.maxzoom&&this.zoom>=hr.maxzoom||hr.visibility!=="none"&&(C(wn,this.zoom,nt),(Qt[hr.id]=hr.createBucket({index:at.bucketLayerIDs.length,layers:wn,zoom:this.zoom,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:ze,sourceID:this.source})).populate(Me,me,this.tileID.canonical),at.bucketLayerIDs.push(wn.map(function(kr){return kr.id})))}}}var tr=o.mapObject(me.glyphDependencies,function(kr){return Object.keys(kr).map(Number)});Object.keys(tr).length?lt.send("getGlyphs",{uid:this.uid,stacks:tr},function(kr,xn){bt||(bt=kr,Vt=xn,Li.call(Mt))}):Vt={};var go=Object.keys(me.iconDependencies);go.length?lt.send("getImages",{icons:go,source:this.source,tileID:this.tileID,type:"icons"},function(kr,xn){bt||(bt=kr,pe=xn,Li.call(Mt))}):pe={};var Er=Object.keys(me.patternDependencies);function Li(){if(bt)return vt(bt);if(Vt&&pe&&ye){var kr=new _(Vt),xn=new o.ImageAtlas(pe,ye);for(var pr in Qt){var sa=Qt[pr];sa instanceof o.SymbolBucket?(C(sa.layers,this.zoom,nt),o.performSymbolLayout(sa,Vt,kr.positions,pe,xn.iconPositions,this.showCollisionBoxes,this.tileID.canonical)):sa.hasPattern&&(sa instanceof o.LineBucket||sa instanceof o.FillBucket||sa instanceof o.FillExtrusionBucket)&&(C(sa.layers,this.zoom,nt),sa.addFeatures(me,this.tileID.canonical,xn.patternPositions))}this.status="done",vt(null,{buckets:o.values(Qt).filter(function(Ii){return!Ii.isEmpty()}),featureIndex:at,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:kr.image,imageAtlas:xn,glyphMap:this.returnDependencies?Vt:null,iconMap:this.returnDependencies?pe:null,glyphPositions:this.returnDependencies?kr.positions:null})}}Er.length?lt.send("getImages",{icons:Er,source:this.source,tileID:this.tileID,type:"patterns"},function(kr,xn){bt||(bt=kr,ye=xn,Li.call(Mt))}):ye={},Li.call(this)};var R=function(W,Y,nt,lt){this.actor=W,this.layerIndex=Y,this.availableImages=nt,this.loadVectorData=lt||O,this.loading={},this.loaded={}};R.prototype.loadTile=function(W,Y){var nt=this,lt=W.uid;this.loading||(this.loading={});var vt=!!(W&&W.request&&W.request.collectResourceTiming)&&new o.RequestPerformance(W.request),Mt=this.loading[lt]=new E(W);Mt.abort=this.loadVectorData(W,function(Rt,at){if(delete nt.loading[lt],Rt||!at)return Mt.status="done",nt.loaded[lt]=Mt,Y(Rt);var bt=at.rawData,Vt={};at.expires&&(Vt.expires=at.expires),at.cacheControl&&(Vt.cacheControl=at.cacheControl);var pe={};if(vt){var ye=vt.finish();ye&&(pe.resourceTiming=JSON.parse(JSON.stringify(ye)))}Mt.vectorTile=at.vectorTile,Mt.parse(at.vectorTile,nt.layerIndex,nt.availableImages,nt.actor,function(Qt,me){if(Qt||!me)return Y(Qt);Y(null,o.extend({rawTileData:bt.slice(0)},me,Vt,pe))}),nt.loaded=nt.loaded||{},nt.loaded[lt]=Mt})},R.prototype.reloadTile=function(W,Y){var nt=this,lt=this.loaded,vt=W.uid,Mt=this;if(lt&<[vt]){var Rt=lt[vt];Rt.showCollisionBoxes=W.showCollisionBoxes;var at=function(bt,Vt){var pe=Rt.reloadCallback;pe&&(delete Rt.reloadCallback,Rt.parse(Rt.vectorTile,Mt.layerIndex,nt.availableImages,Mt.actor,pe)),Y(bt,Vt)};Rt.status==="parsing"?Rt.reloadCallback=at:Rt.status==="done"&&(Rt.vectorTile?Rt.parse(Rt.vectorTile,this.layerIndex,this.availableImages,this.actor,at):at())}},R.prototype.abortTile=function(W,Y){var nt=this.loading,lt=W.uid;nt&&nt[lt]&&nt[lt].abort&&(nt[lt].abort(),delete nt[lt]),Y()},R.prototype.removeTile=function(W,Y){var nt=this.loaded,lt=W.uid;nt&&nt[lt]&&delete nt[lt],Y()};var D=o.window.ImageBitmap,B=function(){this.loaded={}};function z(W,Y){if(W.length!==0){k(W[0],Y);for(var nt=1;nt<W.length;nt++)k(W[nt],!Y)}}function k(W,Y){for(var nt=0,lt=0,vt=W.length,Mt=vt-1;lt<vt;Mt=lt++)nt+=(W[lt][0]-W[Mt][0])*(W[Mt][1]+W[lt][1]);nt>=0!=!!Y&&W.reverse()}B.prototype.loadTile=function(W,Y){var nt=W.uid,lt=W.encoding,vt=W.rawImageData,Mt=D&&vt instanceof D?this.getImageData(vt):vt,Rt=new o.DEMData(nt,Mt,lt);this.loaded=this.loaded||{},this.loaded[nt]=Rt,Y(null,Rt)},B.prototype.getImageData=function(W){this.offscreenCanvas&&this.offscreenCanvasContext||(this.offscreenCanvas=new OffscreenCanvas(W.width,W.height),this.offscreenCanvasContext=this.offscreenCanvas.getContext("2d")),this.offscreenCanvas.width=W.width,this.offscreenCanvas.height=W.height,this.offscreenCanvasContext.drawImage(W,0,0,W.width,W.height);var Y=this.offscreenCanvasContext.getImageData(-1,-1,W.width+2,W.height+2);return this.offscreenCanvasContext.clearRect(0,0,this.offscreenCanvas.width,this.offscreenCanvas.height),new o.RGBAImage({width:Y.width,height:Y.height},Y.data)},B.prototype.removeTile=function(W){var Y=this.loaded,nt=W.uid;Y&&Y[nt]&&delete Y[nt]};var $=o.vectorTile.VectorTileFeature.prototype.toGeoJSON,K=function(W){this._feature=W,this.extent=o.EXTENT,this.type=W.type,this.properties=W.tags,"id"in W&&!isNaN(W.id)&&(this.id=parseInt(W.id,10))};K.prototype.loadGeometry=function(){if(this._feature.type===1){for(var W=[],Y=0,nt=this._feature.geometry;Y<nt.length;Y+=1){var lt=nt[Y];W.push([new o.Point$1(lt[0],lt[1])])}return W}for(var vt=[],Mt=0,Rt=this._feature.geometry;Mt<Rt.length;Mt+=1){for(var at=[],bt=0,Vt=Rt[Mt];bt<Vt.length;bt+=1){var pe=Vt[bt];at.push(new o.Point$1(pe[0],pe[1]))}vt.push(at)}return vt},K.prototype.toGeoJSON=function(W,Y,nt){return $.call(this,W,Y,nt)};var et=function(W){this.layers={_geojsonTileLayer:this},this.name="_geojsonTileLayer",this.extent=o.EXTENT,this.length=W.length,this._features=W};et.prototype.feature=function(W){return new K(this._features[W])};var mt=o.vectorTile.VectorTileFeature,wt=Ot;function Ot(W,Y){this.options=Y||{},this.features=W,this.length=W.length}function Bt(W,Y){this.id=typeof W.id=="number"?W.id:void 0,this.type=W.type,this.rawGeometry=W.type===1?[W.geometry]:W.geometry,this.properties=W.tags,this.extent=Y||4096}Ot.prototype.feature=function(W){return new Bt(this.features[W],this.options.extent)},Bt.prototype.loadGeometry=function(){var W=this.rawGeometry;this.geometry=[];for(var Y=0;Y<W.length;Y++){for(var nt=W[Y],lt=[],vt=0;vt<nt.length;vt++)lt.push(new o.Point$1(nt[vt][0],nt[vt][1]));this.geometry.push(lt)}return this.geometry},Bt.prototype.bbox=function(){this.geometry||this.loadGeometry();for(var W=this.geometry,Y=1/0,nt=-1/0,lt=1/0,vt=-1/0,Mt=0;Mt<W.length;Mt++)for(var Rt=W[Mt],at=0;at<Rt.length;at++){var bt=Rt[at];Y=Math.min(Y,bt.x),nt=Math.max(nt,bt.x),lt=Math.min(lt,bt.y),vt=Math.max(vt,bt.y)}return[Y,lt,nt,vt]},Bt.prototype.toGeoJSON=mt.prototype.toGeoJSON;var se=Ne,_e=wt;function Ne(W){var Y=new o.pbf;return function(nt,lt){for(var vt in nt.layers)lt.writeMessage(3,He,nt.layers[vt])}(W,Y),Y.finish()}function He(W,Y){var nt;Y.writeVarintField(15,W.version||1),Y.writeStringField(1,W.name||""),Y.writeVarintField(5,W.extent||4096);var lt={keys:[],values:[],keycache:{},valuecache:{}};for(nt=0;nt<W.length;nt++)lt.feature=W.feature(nt),Y.writeMessage(2,de,lt);var vt=lt.keys;for(nt=0;nt<vt.length;nt++)Y.writeStringField(3,vt[nt]);var Mt=lt.values;for(nt=0;nt<Mt.length;nt++)Y.writeMessage(4,ve,Mt[nt])}function de(W,Y){var nt=W.feature;nt.id!==void 0&&Y.writeVarintField(1,nt.id),Y.writeMessage(2,he,W),Y.writeVarintField(3,nt.type),Y.writeMessage(4,te,nt)}function he(W,Y){var nt=W.feature,lt=W.keys,vt=W.values,Mt=W.keycache,Rt=W.valuecache;for(var at in nt.properties){var bt=Mt[at];bt===void 0&&(lt.push(at),Mt[at]=bt=lt.length-1),Y.writeVarint(bt);var Vt=nt.properties[at],pe=typeof Vt;pe!=="string"&&pe!=="boolean"&&pe!=="number"&&(Vt=JSON.stringify(Vt));var ye=pe+":"+Vt,Qt=Rt[ye];Qt===void 0&&(vt.push(Vt),Rt[ye]=Qt=vt.length-1),Y.writeVarint(Qt)}}function Ge(W,Y){return(Y<<3)+(7&W)}function Yt(W){return W<<1^W>>31}function te(W,Y){for(var nt=W.loadGeometry(),lt=W.type,vt=0,Mt=0,Rt=nt.length,at=0;at<Rt;at++){var bt=nt[at],Vt=1;lt===1&&(Vt=bt.length),Y.writeVarint(Ge(1,Vt));for(var pe=lt===3?bt.length-1:bt.length,ye=0;ye<pe;ye++){ye===1&<!==1&&Y.writeVarint(Ge(2,pe-1));var Qt=bt[ye].x-vt,me=bt[ye].y-Mt;Y.writeVarint(Yt(Qt)),Y.writeVarint(Yt(me)),vt+=Qt,Mt+=me}lt===3&&Y.writeVarint(Ge(7,1))}}function ve(W,Y){var nt=typeof W;nt==="string"?Y.writeStringField(1,W):nt==="boolean"?Y.writeBooleanField(7,W):nt==="number"&&(W%1!=0?Y.writeDoubleField(3,W):W<0?Y.writeSVarintField(6,W):Y.writeVarintField(5,W))}function Wt(W,Y,nt,lt){be(W,nt,lt),be(Y,2*nt,2*lt),be(Y,2*nt+1,2*lt+1)}function be(W,Y,nt){var lt=W[Y];W[Y]=W[nt],W[nt]=lt}function De(W,Y,nt,lt){var vt=W-nt,Mt=Y-lt;return vt*vt+Mt*Mt}se.fromVectorTileJs=Ne,se.fromGeojsonVt=function(W,Y){Y=Y||{};var nt={};for(var lt in W)nt[lt]=new wt(W[lt].features,Y),nt[lt].name=lt,nt[lt].version=Y.version,nt[lt].extent=Y.extent;return Ne({layers:nt})},se.GeoJSONWrapper=_e;var Fn=function(W){return W[0]},ar=function(W){return W[1]},Jn=function(W,Y,nt,lt,vt){Y===void 0&&(Y=Fn),nt===void 0&&(nt=ar),lt===void 0&&(lt=64),vt===void 0&&(vt=Float64Array),this.nodeSize=lt,this.points=W;for(var Mt=W.length<65536?Uint16Array:Uint32Array,Rt=this.ids=new Mt(W.length),at=this.coords=new vt(2*W.length),bt=0;bt<W.length;bt++)Rt[bt]=bt,at[2*bt]=Y(W[bt]),at[2*bt+1]=nt(W[bt]);(function Vt(pe,ye,Qt,me,tn,Je){if(!(tn-me<=Qt)){var re=me+tn>>1;(function ze(Me,Re,Mn,$e,Qn,Rr){for(;Qn>$e;){if(Qn-$e>600){var wn=Qn-$e+1,hr=Mn-$e+1,tr=Math.log(wn),go=.5*Math.exp(2*tr/3),Er=.5*Math.sqrt(tr*go*(wn-go)/wn)*(hr-wn/2<0?-1:1);ze(Me,Re,Mn,Math.max($e,Math.floor(Mn-hr*go/wn+Er)),Math.min(Qn,Math.floor(Mn+(wn-hr)*go/wn+Er)),Rr)}var Li=Re[2*Mn+Rr],kr=$e,xn=Qn;for(Wt(Me,Re,$e,Mn),Re[2*Qn+Rr]>Li&&Wt(Me,Re,$e,Qn);kr<xn;){for(Wt(Me,Re,kr,xn),kr++,xn--;Re[2*kr+Rr]<Li;)kr++;for(;Re[2*xn+Rr]>Li;)xn--}Re[2*$e+Rr]===Li?Wt(Me,Re,$e,xn):Wt(Me,Re,++xn,Qn),xn<=Mn&&($e=xn+1),Mn<=xn&&(Qn=xn-1)}})(pe,ye,re,me,tn,Je%2),Vt(pe,ye,Qt,me,re-1,Je+1),Vt(pe,ye,Qt,re+1,tn,Je+1)}})(Rt,at,lt,0,Rt.length-1,0)};Jn.prototype.range=function(W,Y,nt,lt){return function(vt,Mt,Rt,at,bt,Vt,pe){for(var ye,Qt,me=[0,vt.length-1,0],tn=[];me.length;){var Je=me.pop(),re=me.pop(),ze=me.pop();if(re-ze<=pe)for(var Me=ze;Me<=re;Me++)Qt=Mt[2*Me+1],(ye=Mt[2*Me])>=Rt&&ye<=bt&&Qt>=at&&Qt<=Vt&&tn.push(vt[Me]);else{var Re=Math.floor((ze+re)/2);Qt=Mt[2*Re+1],(ye=Mt[2*Re])>=Rt&&ye<=bt&&Qt>=at&&Qt<=Vt&&tn.push(vt[Re]);var Mn=(Je+1)%2;(Je===0?Rt<=ye:at<=Qt)&&(me.push(ze),me.push(Re-1),me.push(Mn)),(Je===0?bt>=ye:Vt>=Qt)&&(me.push(Re+1),me.push(re),me.push(Mn))}}return tn}(this.ids,this.coords,W,Y,nt,lt,this.nodeSize)},Jn.prototype.within=function(W,Y,nt){return function(lt,vt,Mt,Rt,at,bt){for(var Vt=[0,lt.length-1,0],pe=[],ye=at*at;Vt.length;){var Qt=Vt.pop(),me=Vt.pop(),tn=Vt.pop();if(me-tn<=bt)for(var Je=tn;Je<=me;Je++)De(vt[2*Je],vt[2*Je+1],Mt,Rt)<=ye&&pe.push(lt[Je]);else{var re=Math.floor((tn+me)/2),ze=vt[2*re],Me=vt[2*re+1];De(ze,Me,Mt,Rt)<=ye&&pe.push(lt[re]);var Re=(Qt+1)%2;(Qt===0?Mt-at<=ze:Rt-at<=Me)&&(Vt.push(tn),Vt.push(re-1),Vt.push(Re)),(Qt===0?Mt+at>=ze:Rt+at>=Me)&&(Vt.push(re+1),Vt.push(me),Vt.push(Re))}}return pe}(this.ids,this.coords,W,Y,nt,this.nodeSize)};var Ar={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:function(W){return W}},cr=function(W){this.options=bi(Object.create(Ar),W),this.trees=new Array(this.options.maxZoom+1)};function Fi(W,Y,nt,lt,vt){return{x:W,y:Y,zoom:1/0,id:nt,parentId:-1,numPoints:lt,properties:vt}}function fr(W,Y){var nt=W.geometry.coordinates,lt=nt[1];return{x:Gi(nt[0]),y:jn(lt),zoom:1/0,index:Y,parentId:-1}}function _a(W){return{type:"Feature",id:W.id,properties:Is(W),geometry:{type:"Point",coordinates:[(lt=W.x,360*(lt-.5)),(Y=W.y,nt=(180-360*Y)*Math.PI/180,360*Math.atan(Math.exp(nt))/Math.PI-90)]}};var Y,nt,lt}function Is(W){var Y=W.numPoints,nt=Y>=1e4?Math.round(Y/1e3)+"k":Y>=1e3?Math.round(Y/100)/10+"k":Y;return bi(bi({},W.properties),{cluster:!0,cluster_id:W.id,point_count:Y,point_count_abbreviated:nt})}function Gi(W){return W/360+.5}function jn(W){var Y=Math.sin(W*Math.PI/180),nt=.5-.25*Math.log((1+Y)/(1-Y))/Math.PI;return nt<0?0:nt>1?1:nt}function bi(W,Y){for(var nt in Y)W[nt]=Y[nt];return W}function ni(W){return W.x}function Wi(W){return W.y}function xa(W,Y,nt,lt,vt,Mt){var Rt=vt-nt,at=Mt-lt;if(Rt!==0||at!==0){var bt=((W-nt)*Rt+(Y-lt)*at)/(Rt*Rt+at*at);bt>1?(nt=vt,lt=Mt):bt>0&&(nt+=Rt*bt,lt+=at*bt)}return(Rt=W-nt)*Rt+(at=Y-lt)*at}function ba(W,Y,nt,lt){var vt={id:W===void 0?null:W,type:Y,geometry:nt,tags:lt,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};return function(Mt){var Rt=Mt.geometry,at=Mt.type;if(at==="Point"||at==="MultiPoint"||at==="LineString")ss(Mt,Rt);else if(at==="Polygon"||at==="MultiLineString")for(var bt=0;bt<Rt.length;bt++)ss(Mt,Rt[bt]);else if(at==="MultiPolygon")for(bt=0;bt<Rt.length;bt++)for(var Vt=0;Vt<Rt[bt].length;Vt++)ss(Mt,Rt[bt][Vt])}(vt),vt}function ss(W,Y){for(var nt=0;nt<Y.length;nt+=3)W.minX=Math.min(W.minX,Y[nt]),W.minY=Math.min(W.minY,Y[nt+1]),W.maxX=Math.max(W.maxX,Y[nt]),W.maxY=Math.max(W.maxY,Y[nt+1])}function ri(W,Y,nt,lt){if(Y.geometry){var vt=Y.geometry.coordinates,Mt=Y.geometry.type,Rt=Math.pow(nt.tolerance/((1<<nt.maxZoom)*nt.extent),2),at=[],bt=Y.id;if(nt.promoteId?bt=Y.properties[nt.promoteId]:nt.generateId&&(bt=lt||0),Mt==="Point")qo(vt,at);else if(Mt==="MultiPoint")for(var Vt=0;Vt<vt.length;Vt++)qo(vt[Vt],at);else if(Mt==="LineString")Et(vt,at,Rt,!1);else if(Mt==="MultiLineString"){if(nt.lineMetrics){for(Vt=0;Vt<vt.length;Vt++)Et(vt[Vt],at=[],Rt,!1),W.push(ba(bt,"LineString",at,Y.properties));return}pt(vt,at,Rt,!1)}else if(Mt==="Polygon")pt(vt,at,Rt,!0);else{if(Mt!=="MultiPolygon"){if(Mt==="GeometryCollection"){for(Vt=0;Vt<Y.geometry.geometries.length;Vt++)ri(W,{id:bt,geometry:Y.geometry.geometries[Vt],properties:Y.properties},nt,lt);return}throw new Error("Input data is not a valid GeoJSON object.")}for(Vt=0;Vt<vt.length;Vt++){var pe=[];pt(vt[Vt],pe,Rt,!0),at.push(pe)}}W.push(ba(bt,Mt,at,Y.properties))}}function qo(W,Y){Y.push(Ve(W[0])),Y.push(We(W[1])),Y.push(0)}function Et(W,Y,nt,lt){for(var vt,Mt,Rt=0,at=0;at<W.length;at++){var bt=Ve(W[at][0]),Vt=We(W[at][1]);Y.push(bt),Y.push(Vt),Y.push(0),at>0&&(Rt+=lt?(vt*Vt-bt*Mt)/2:Math.sqrt(Math.pow(bt-vt,2)+Math.pow(Vt-Mt,2))),vt=bt,Mt=Vt}var pe=Y.length-3;Y[2]=1,function ye(Qt,me,tn,Je){for(var re,ze=Je,Me=tn-me>>1,Re=tn-me,Mn=Qt[me],$e=Qt[me+1],Qn=Qt[tn],Rr=Qt[tn+1],wn=me+3;wn<tn;wn+=3){var hr=xa(Qt[wn],Qt[wn+1],Mn,$e,Qn,Rr);if(hr>ze)re=wn,ze=hr;else if(hr===ze){var tr=Math.abs(wn-Me);tr<Re&&(re=wn,Re=tr)}}ze>Je&&(re-me>3&&ye(Qt,me,re,Je),Qt[re+2]=ze,tn-re>3&&ye(Qt,re,tn,Je))}(Y,0,pe,nt),Y[pe+2]=1,Y.size=Math.abs(Rt),Y.start=0,Y.end=Y.size}function pt(W,Y,nt,lt){for(var vt=0;vt<W.length;vt++){var Mt=[];Et(W[vt],Mt,nt,lt),Y.push(Mt)}}function Ve(W){return W/360+.5}function We(W){var Y=Math.sin(W*Math.PI/180),nt=.5-.25*Math.log((1+Y)/(1-Y))/Math.PI;return nt<0?0:nt>1?1:nt}function Xn(W,Y,nt,lt,vt,Mt,Rt,at){if(lt/=Y,Mt>=(nt/=Y)&&Rt<lt)return W;if(Rt<nt||Mt>=lt)return null;for(var bt=[],Vt=0;Vt<W.length;Vt++){var pe=W[Vt],ye=pe.geometry,Qt=pe.type,me=vt===0?pe.minX:pe.minY,tn=vt===0?pe.maxX:pe.maxY;if(me>=nt&&tn<lt)bt.push(pe);else if(!(tn<nt||me>=lt)){var Je=[];if(Qt==="Point"||Qt==="MultiPoint")Br(ye,Je,nt,lt,vt);else if(Qt==="LineString")sr(ye,Je,nt,lt,vt,!1,at.lineMetrics);else if(Qt==="MultiLineString")Un(ye,Je,nt,lt,vt,!1);else if(Qt==="Polygon")Un(ye,Je,nt,lt,vt,!0);else if(Qt==="MultiPolygon")for(var re=0;re<ye.length;re++){var ze=[];Un(ye[re],ze,nt,lt,vt,!0),ze.length&&Je.push(ze)}if(Je.length){if(at.lineMetrics&&Qt==="LineString"){for(re=0;re<Je.length;re++)bt.push(ba(pe.id,Qt,Je[re],pe.tags));continue}Qt!=="LineString"&&Qt!=="MultiLineString"||(Je.length===1?(Qt="LineString",Je=Je[0]):Qt="MultiLineString"),Qt!=="Point"&&Qt!=="MultiPoint"||(Qt=Je.length===3?"Point":"MultiPoint"),bt.push(ba(pe.id,Qt,Je,pe.tags))}}}return bt.length?bt:null}function Br(W,Y,nt,lt,vt){for(var Mt=0;Mt<W.length;Mt+=3){var Rt=W[Mt+vt];Rt>=nt&&Rt<=lt&&(Y.push(W[Mt]),Y.push(W[Mt+1]),Y.push(W[Mt+2]))}}function sr(W,Y,nt,lt,vt,Mt,Rt){for(var at,bt,Vt=Ai(W),pe=vt===0?To:zi,ye=W.start,Qt=0;Qt<W.length-3;Qt+=3){var me=W[Qt],tn=W[Qt+1],Je=W[Qt+2],re=W[Qt+3],ze=W[Qt+4],Me=vt===0?me:tn,Re=vt===0?re:ze,Mn=!1;Rt&&(at=Math.sqrt(Math.pow(me-re,2)+Math.pow(tn-ze,2))),Me<nt?Re>nt&&(bt=pe(Vt,me,tn,re,ze,nt),Rt&&(Vt.start=ye+at*bt)):Me>lt?Re<lt&&(bt=pe(Vt,me,tn,re,ze,lt),Rt&&(Vt.start=ye+at*bt)):no(Vt,me,tn,Je),Re<nt&&Me>=nt&&(bt=pe(Vt,me,tn,re,ze,nt),Mn=!0),Re>lt&&Me<=lt&&(bt=pe(Vt,me,tn,re,ze,lt),Mn=!0),!Mt&&Mn&&(Rt&&(Vt.end=ye+at*bt),Y.push(Vt),Vt=Ai(W)),Rt&&(ye+=at)}var $e=W.length-3;me=W[$e],tn=W[$e+1],Je=W[$e+2],(Me=vt===0?me:tn)>=nt&&Me<=lt&&no(Vt,me,tn,Je),$e=Vt.length-3,Mt&&$e>=3&&(Vt[$e]!==Vt[0]||Vt[$e+1]!==Vt[1])&&no(Vt,Vt[0],Vt[1],Vt[2]),Vt.length&&Y.push(Vt)}function Ai(W){var Y=[];return Y.size=W.size,Y.start=W.start,Y.end=W.end,Y}function Un(W,Y,nt,lt,vt,Mt){for(var Rt=0;Rt<W.length;Rt++)sr(W[Rt],Y,nt,lt,vt,Mt,!1)}function no(W,Y,nt,lt){W.push(Y),W.push(nt),W.push(lt)}function To(W,Y,nt,lt,vt,Mt){var Rt=(Mt-Y)/(lt-Y);return W.push(Mt),W.push(nt+(vt-nt)*Rt),W.push(1),Rt}function zi(W,Y,nt,lt,vt,Mt){var Rt=(Mt-nt)/(vt-nt);return W.push(Y+(lt-Y)*Rt),W.push(Mt),W.push(1),Rt}function ii(W,Y){for(var nt=[],lt=0;lt<W.length;lt++){var vt,Mt=W[lt],Rt=Mt.type;if(Rt==="Point"||Rt==="MultiPoint"||Rt==="LineString")vt=Go(Mt.geometry,Y);else if(Rt==="MultiLineString"||Rt==="Polygon"){vt=[];for(var at=0;at<Mt.geometry.length;at++)vt.push(Go(Mt.geometry[at],Y))}else if(Rt==="MultiPolygon")for(vt=[],at=0;at<Mt.geometry.length;at++){for(var bt=[],Vt=0;Vt<Mt.geometry[at].length;Vt++)bt.push(Go(Mt.geometry[at][Vt],Y));vt.push(bt)}nt.push(ba(Mt.id,Rt,vt,Mt.tags))}return nt}function Go(W,Y){var nt=[];nt.size=W.size,W.start!==void 0&&(nt.start=W.start,nt.end=W.end);for(var lt=0;lt<W.length;lt+=3)nt.push(W[lt]+Y,W[lt+1],W[lt+2]);return nt}function yr(W,Y){if(W.transformed)return W;var nt,lt,vt,Mt=1<<W.z,Rt=W.x,at=W.y;for(nt=0;nt<W.features.length;nt++){var bt=W.features[nt],Vt=bt.geometry,pe=bt.type;if(bt.geometry=[],pe===1)for(lt=0;lt<Vt.length;lt+=2)bt.geometry.push(Rn(Vt[lt],Vt[lt+1],Y,Mt,Rt,at));else for(lt=0;lt<Vt.length;lt++){var ye=[];for(vt=0;vt<Vt[lt].length;vt+=2)ye.push(Rn(Vt[lt][vt],Vt[lt][vt+1],Y,Mt,Rt,at));bt.geometry.push(ye)}}return W.transformed=!0,W}function Rn(W,Y,nt,lt,vt,Mt){return[Math.round(nt*(W*lt-vt)),Math.round(nt*(Y*lt-Mt))]}function yl(W,Y,nt,lt,vt){for(var Mt=Y===vt.maxZoom?0:vt.tolerance/((1<<Y)*vt.extent),Rt={features:[],numPoints:0,numSimplified:0,numFeatures:0,source:null,x:nt,y:lt,z:Y,transformed:!1,minX:2,minY:1,maxX:-1,maxY:0},at=0;at<W.length;at++){Rt.numFeatures++,us(Rt,W[at],Mt,vt);var bt=W[at].minX,Vt=W[at].minY,pe=W[at].maxX,ye=W[at].maxY;bt<Rt.minX&&(Rt.minX=bt),Vt<Rt.minY&&(Rt.minY=Vt),pe>Rt.maxX&&(Rt.maxX=pe),ye>Rt.maxY&&(Rt.maxY=ye)}return Rt}function us(W,Y,nt,lt){var vt=Y.geometry,Mt=Y.type,Rt=[];if(Mt==="Point"||Mt==="MultiPoint")for(var at=0;at<vt.length;at+=3)Rt.push(vt[at]),Rt.push(vt[at+1]),W.numPoints++,W.numSimplified++;else if(Mt==="LineString")Vs(Rt,vt,W,nt,!1,!1);else if(Mt==="MultiLineString"||Mt==="Polygon")for(at=0;at<vt.length;at++)Vs(Rt,vt[at],W,nt,Mt==="Polygon",at===0);else if(Mt==="MultiPolygon")for(var bt=0;bt<vt.length;bt++){var Vt=vt[bt];for(at=0;at<Vt.length;at++)Vs(Rt,Vt[at],W,nt,!0,at===0)}if(Rt.length){var pe=Y.tags||null;if(Mt==="LineString"&<.lineMetrics){for(var ye in pe={},Y.tags)pe[ye]=Y.tags[ye];pe.mapbox_clip_start=vt.start/vt.size,pe.mapbox_clip_end=vt.end/vt.size}var Qt={geometry:Rt,type:Mt==="Polygon"||Mt==="MultiPolygon"?3:Mt==="LineString"||Mt==="MultiLineString"?2:1,tags:pe};Y.id!==null&&(Qt.id=Y.id),W.features.push(Qt)}}function Vs(W,Y,nt,lt,vt,Mt){var Rt=lt*lt;if(lt>0&&Y.size<(vt?Rt:lt))nt.numPoints+=Y.length/3;else{for(var at=[],bt=0;bt<Y.length;bt+=3)(lt===0||Y[bt+2]>Rt)&&(nt.numSimplified++,at.push(Y[bt]),at.push(Y[bt+1])),nt.numPoints++;vt&&function(Vt,pe){for(var ye=0,Qt=0,me=Vt.length,tn=me-2;Qt<me;tn=Qt,Qt+=2)ye+=(Vt[Qt]-Vt[tn])*(Vt[Qt+1]+Vt[tn+1]);if(ye>0===pe)for(Qt=0,me=Vt.length;Qt<me/2;Qt+=2){var Je=Vt[Qt],re=Vt[Qt+1];Vt[Qt]=Vt[me-2-Qt],Vt[Qt+1]=Vt[me-1-Qt],Vt[me-2-Qt]=Je,Vt[me-1-Qt]=re}}(at,Mt),W.push(at)}}function Mo(W,Y){var nt=(Y=this.options=function(vt,Mt){for(var Rt in Mt)vt[Rt]=Mt[Rt];return vt}(Object.create(this.options),Y)).debug;if(nt&&console.time("preprocess data"),Y.maxZoom<0||Y.maxZoom>24)throw new Error("maxZoom should be in the 0-24 range");if(Y.promoteId&&Y.generateId)throw new Error("promoteId and generateId cannot be used together.");var lt=function(vt,Mt){var Rt=[];if(vt.type==="FeatureCollection")for(var at=0;at<vt.features.length;at++)ri(Rt,vt.features[at],Mt,at);else ri(Rt,vt.type==="Feature"?vt:{geometry:vt},Mt);return Rt}(W,Y);this.tiles={},this.tileCoords=[],nt&&(console.timeEnd("preprocess data"),console.log("index: maxZoom: %d, maxPoints: %d",Y.indexMaxZoom,Y.indexMaxPoints),console.time("generate tiles"),this.stats={},this.total=0),(lt=function(vt,Mt){var Rt=Mt.buffer/Mt.extent,at=vt,bt=Xn(vt,1,-1-Rt,Rt,0,-1,2,Mt),Vt=Xn(vt,1,1-Rt,2+Rt,0,-1,2,Mt);return(bt||Vt)&&(at=Xn(vt,1,-Rt,1+Rt,0,-1,2,Mt)||[],bt&&(at=ii(bt,1).concat(at)),Vt&&(at=at.concat(ii(Vt,-1)))),at}(lt,Y)).length&&this.splitTile(lt,0,0,0),nt&&(lt.length&&console.log("features: %d, points: %d",this.tiles[0].numFeatures,this.tiles[0].numPoints),console.timeEnd("generate tiles"),console.log("tiles generated:",this.total,JSON.stringify(this.stats)))}function qa(W,Y,nt){return 32*((1<<W)*nt+Y)+W}function Ur(W,Y){var nt=W.tileID.canonical;if(!this._geoJSONIndex)return Y(null,null);var lt=this._geoJSONIndex.getTile(nt.z,nt.x,nt.y);if(!lt)return Y(null,null);var vt=new et(lt.features),Mt=se(vt);Mt.byteOffset===0&&Mt.byteLength===Mt.buffer.byteLength||(Mt=new Uint8Array(Mt)),Y(null,{vectorTile:vt,rawData:Mt.buffer})}cr.prototype.load=function(W){var Y=this.options,nt=Y.log,lt=Y.minZoom,vt=Y.maxZoom,Mt=Y.nodeSize;nt&&console.time("total time");var Rt="prepare "+W.length+" points";nt&&console.time(Rt),this.points=W;for(var at=[],bt=0;bt<W.length;bt++)W[bt].geometry&&at.push(fr(W[bt],bt));this.trees[vt+1]=new Jn(at,ni,Wi,Mt,Float32Array),nt&&console.timeEnd(Rt);for(var Vt=vt;Vt>=lt;Vt--){var pe=+Date.now();at=this._cluster(at,Vt),this.trees[Vt]=new Jn(at,ni,Wi,Mt,Float32Array),nt&&console.log("z%d: %d clusters in %dms",Vt,at.length,+Date.now()-pe)}return nt&&console.timeEnd("total time"),this},cr.prototype.getClusters=function(W,Y){var nt=((W[0]+180)%360+360)%360-180,lt=Math.max(-90,Math.min(90,W[1])),vt=W[2]===180?180:((W[2]+180)%360+360)%360-180,Mt=Math.max(-90,Math.min(90,W[3]));if(W[2]-W[0]>=360)nt=-180,vt=180;else if(nt>vt){var Rt=this.getClusters([nt,lt,180,Mt],Y),at=this.getClusters([-180,lt,vt,Mt],Y);return Rt.concat(at)}for(var bt=this.trees[this._limitZoom(Y)],Vt=[],pe=0,ye=bt.range(Gi(nt),jn(Mt),Gi(vt),jn(lt));pe<ye.length;pe+=1){var Qt=bt.points[ye[pe]];Vt.push(Qt.numPoints?_a(Qt):this.points[Qt.index])}return Vt},cr.prototype.getChildren=function(W){var Y=this._getOriginId(W),nt=this._getOriginZoom(W),lt="No cluster with the specified id.",vt=this.trees[nt];if(!vt)throw new Error(lt);var Mt=vt.points[Y];if(!Mt)throw new Error(lt);for(var Rt=this.options.radius/(this.options.extent*Math.pow(2,nt-1)),at=[],bt=0,Vt=vt.within(Mt.x,Mt.y,Rt);bt<Vt.length;bt+=1){var pe=vt.points[Vt[bt]];pe.parentId===W&&at.push(pe.numPoints?_a(pe):this.points[pe.index])}if(at.length===0)throw new Error(lt);return at},cr.prototype.getLeaves=function(W,Y,nt){var lt=[];return this._appendLeaves(lt,W,Y=Y||10,nt=nt||0,0),lt},cr.prototype.getTile=function(W,Y,nt){var lt=this.trees[this._limitZoom(W)],vt=Math.pow(2,W),Mt=this.options,Rt=Mt.radius/Mt.extent,at=(nt-Rt)/vt,bt=(nt+1+Rt)/vt,Vt={features:[]};return this._addTileFeatures(lt.range((Y-Rt)/vt,at,(Y+1+Rt)/vt,bt),lt.points,Y,nt,vt,Vt),Y===0&&this._addTileFeatures(lt.range(1-Rt/vt,at,1,bt),lt.points,vt,nt,vt,Vt),Y===vt-1&&this._addTileFeatures(lt.range(0,at,Rt/vt,bt),lt.points,-1,nt,vt,Vt),Vt.features.length?Vt:null},cr.prototype.getClusterExpansionZoom=function(W){for(var Y=this._getOriginZoom(W)-1;Y<=this.options.maxZoom;){var nt=this.getChildren(W);if(Y++,nt.length!==1)break;W=nt[0].properties.cluster_id}return Y},cr.prototype._appendLeaves=function(W,Y,nt,lt,vt){for(var Mt=0,Rt=this.getChildren(Y);Mt<Rt.length;Mt+=1){var at=Rt[Mt],bt=at.properties;if(bt&&bt.cluster?vt+bt.point_count<=lt?vt+=bt.point_count:vt=this._appendLeaves(W,bt.cluster_id,nt,lt,vt):vt<lt?vt++:W.push(at),W.length===nt)break}return vt},cr.prototype._addTileFeatures=function(W,Y,nt,lt,vt,Mt){for(var Rt=0,at=W;Rt<at.length;Rt+=1){var bt=Y[at[Rt]],Vt=bt.numPoints,pe={type:1,geometry:[[Math.round(this.options.extent*(bt.x*vt-nt)),Math.round(this.options.extent*(bt.y*vt-lt))]],tags:Vt?Is(bt):this.points[bt.index].properties},ye=void 0;Vt?ye=bt.id:this.options.generateId?ye=bt.index:this.points[bt.index].id&&(ye=this.points[bt.index].id),ye!==void 0&&(pe.id=ye),Mt.features.push(pe)}},cr.prototype._limitZoom=function(W){return Math.max(this.options.minZoom,Math.min(+W,this.options.maxZoom+1))},cr.prototype._cluster=function(W,Y){for(var nt=[],lt=this.options,vt=lt.reduce,Mt=lt.minPoints,Rt=lt.radius/(lt.extent*Math.pow(2,Y)),at=0;at<W.length;at++){var bt=W[at];if(!(bt.zoom<=Y)){bt.zoom=Y;for(var Vt=this.trees[Y+1],pe=Vt.within(bt.x,bt.y,Rt),ye=bt.numPoints||1,Qt=ye,me=0,tn=pe;me<tn.length;me+=1){var Je=Vt.points[tn[me]];Je.zoom>Y&&(Qt+=Je.numPoints||1)}if(Qt>=Mt){for(var re=bt.x*ye,ze=bt.y*ye,Me=vt&&ye>1?this._map(bt,!0):null,Re=(at<<5)+(Y+1)+this.points.length,Mn=0,$e=pe;Mn<$e.length;Mn+=1){var Qn=Vt.points[$e[Mn]];if(!(Qn.zoom<=Y)){Qn.zoom=Y;var Rr=Qn.numPoints||1;re+=Qn.x*Rr,ze+=Qn.y*Rr,Qn.parentId=Re,vt&&(Me||(Me=this._map(bt,!0)),vt(Me,this._map(Qn)))}}bt.parentId=Re,nt.push(Fi(re/Qt,ze/Qt,Re,Qt,Me))}else if(nt.push(bt),Qt>1)for(var wn=0,hr=pe;wn<hr.length;wn+=1){var tr=Vt.points[hr[wn]];tr.zoom<=Y||(tr.zoom=Y,nt.push(tr))}}}return nt},cr.prototype._getOriginId=function(W){return W-this.points.length>>5},cr.prototype._getOriginZoom=function(W){return(W-this.points.length)%32},cr.prototype._map=function(W,Y){if(W.numPoints)return Y?bi({},W.properties):W.properties;var nt=this.points[W.index].properties,lt=this.options.map(nt);return Y&<===nt?bi({},lt):lt},Mo.prototype.options={maxZoom:14,indexMaxZoom:5,indexMaxPoints:1e5,tolerance:3,extent:4096,buffer:64,lineMetrics:!1,promoteId:null,generateId:!1,debug:0},Mo.prototype.splitTile=function(W,Y,nt,lt,vt,Mt,Rt){for(var at=[W,Y,nt,lt],bt=this.options,Vt=bt.debug;at.length;){lt=at.pop(),nt=at.pop(),Y=at.pop(),W=at.pop();var pe=1<<Y,ye=qa(Y,nt,lt),Qt=this.tiles[ye];if(!Qt&&(Vt>1&&console.time("creation"),Qt=this.tiles[ye]=yl(W,Y,nt,lt,bt),this.tileCoords.push({z:Y,x:nt,y:lt}),Vt)){Vt>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",Y,nt,lt,Qt.numFeatures,Qt.numPoints,Qt.numSimplified),console.timeEnd("creation"));var me="z"+Y;this.stats[me]=(this.stats[me]||0)+1,this.total++}if(Qt.source=W,vt){if(Y===bt.maxZoom||Y===vt)continue;var tn=1<<vt-Y;if(nt!==Math.floor(Mt/tn)||lt!==Math.floor(Rt/tn))continue}else if(Y===bt.indexMaxZoom||Qt.numPoints<=bt.indexMaxPoints)continue;if(Qt.source=null,W.length!==0){Vt>1&&console.time("clipping");var Je,re,ze,Me,Re,Mn,$e=.5*bt.buffer/bt.extent,Qn=.5-$e,Rr=.5+$e,wn=1+$e;Je=re=ze=Me=null,Re=Xn(W,pe,nt-$e,nt+Rr,0,Qt.minX,Qt.maxX,bt),Mn=Xn(W,pe,nt+Qn,nt+wn,0,Qt.minX,Qt.maxX,bt),W=null,Re&&(Je=Xn(Re,pe,lt-$e,lt+Rr,1,Qt.minY,Qt.maxY,bt),re=Xn(Re,pe,lt+Qn,lt+wn,1,Qt.minY,Qt.maxY,bt),Re=null),Mn&&(ze=Xn(Mn,pe,lt-$e,lt+Rr,1,Qt.minY,Qt.maxY,bt),Me=Xn(Mn,pe,lt+Qn,lt+wn,1,Qt.minY,Qt.maxY,bt),Mn=null),Vt>1&&console.timeEnd("clipping"),at.push(Je||[],Y+1,2*nt,2*lt),at.push(re||[],Y+1,2*nt,2*lt+1),at.push(ze||[],Y+1,2*nt+1,2*lt),at.push(Me||[],Y+1,2*nt+1,2*lt+1)}}},Mo.prototype.getTile=function(W,Y,nt){var lt=this.options,vt=lt.extent,Mt=lt.debug;if(W<0||W>24)return null;var Rt=1<<W,at=qa(W,Y=(Y%Rt+Rt)%Rt,nt);if(this.tiles[at])return yr(this.tiles[at],vt);Mt>1&&console.log("drilling down to z%d-%d-%d",W,Y,nt);for(var bt,Vt=W,pe=Y,ye=nt;!bt&&Vt>0;)Vt--,pe=Math.floor(pe/2),ye=Math.floor(ye/2),bt=this.tiles[qa(Vt,pe,ye)];return bt&&bt.source?(Mt>1&&console.log("found parent tile z%d-%d-%d",Vt,pe,ye),Mt>1&&console.time("drilling down"),this.splitTile(bt.source,Vt,pe,ye,W,Y,nt),Mt>1&&console.timeEnd("drilling down"),this.tiles[at]?yr(this.tiles[at],vt):null):null};var Yl=function(W){function Y(nt,lt,vt,Mt){W.call(this,nt,lt,vt,Ur),Mt&&(this.loadGeoJSON=Mt)}return W&&(Y.__proto__=W),(Y.prototype=Object.create(W&&W.prototype)).constructor=Y,Y.prototype.loadData=function(nt,lt){this._pendingCallback&&this._pendingCallback(null,{abandoned:!0}),this._pendingCallback=lt,this._pendingLoadDataParams=nt,this._state&&this._state!=="Idle"?this._state="NeedsLoadData":(this._state="Coalescing",this._loadData())},Y.prototype._loadData=function(){var nt=this;if(this._pendingCallback&&this._pendingLoadDataParams){var lt=this._pendingCallback,vt=this._pendingLoadDataParams;delete this._pendingCallback,delete this._pendingLoadDataParams;var Mt=!!(vt&&vt.request&&vt.request.collectResourceTiming)&&new o.RequestPerformance(vt.request);this.loadGeoJSON(vt,function(Rt,at){if(Rt||!at)return lt(Rt);if(typeof at!="object")return lt(new Error("Input data given to '"+vt.source+"' is not a valid GeoJSON object."));(function Qt(me,tn){var Je,re=me&&me.type;if(re==="FeatureCollection")for(Je=0;Je<me.features.length;Je++)Qt(me.features[Je],tn);else if(re==="GeometryCollection")for(Je=0;Je<me.geometries.length;Je++)Qt(me.geometries[Je],tn);else if(re==="Feature")Qt(me.geometry,tn);else if(re==="Polygon")z(me.coordinates,tn);else if(re==="MultiPolygon")for(Je=0;Je<me.coordinates.length;Je++)z(me.coordinates[Je],tn);return me})(at,!0);try{if(vt.filter){var bt=o.createExpression(vt.filter,{type:"boolean","property-type":"data-driven",overridable:!1,transition:!1});if(bt.result==="error")throw new Error(bt.value.map(function(Qt){return Qt.key+": "+Qt.message}).join(", "));var Vt=at.features.filter(function(Qt){return bt.value.evaluate({zoom:0},Qt)});at={type:"FeatureCollection",features:Vt}}nt._geoJSONIndex=vt.cluster?new cr(function(Qt){var me=Qt.superclusterOptions,tn=Qt.clusterProperties;if(!tn||!me)return me;for(var Je={},re={},ze={accumulated:null,zoom:0},Me={properties:null},Re=Object.keys(tn),Mn=0,$e=Re;Mn<$e.length;Mn+=1){var Qn=$e[Mn],Rr=tn[Qn],wn=Rr[0],hr=o.createExpression(Rr[1]),tr=o.createExpression(typeof wn=="string"?[wn,["accumulated"],["get",Qn]]:wn);Je[Qn]=hr.value,re[Qn]=tr.value}return me.map=function(go){Me.properties=go;for(var Er={},Li=0,kr=Re;Li<kr.length;Li+=1){var xn=kr[Li];Er[xn]=Je[xn].evaluate(ze,Me)}return Er},me.reduce=function(go,Er){Me.properties=Er;for(var Li=0,kr=Re;Li<kr.length;Li+=1){var xn=kr[Li];ze.accumulated=go[xn],go[xn]=re[xn].evaluate(ze,Me)}},me}(vt)).load(at.features):function(Qt,me){return new Mo(Qt,me)}(at,vt.geojsonVtOptions)}catch(Qt){return lt(Qt)}nt.loaded={};var pe={};if(Mt){var ye=Mt.finish();ye&&(pe.resourceTiming={},pe.resourceTiming[vt.source]=JSON.parse(JSON.stringify(ye)))}lt(null,pe)})}},Y.prototype.coalesce=function(){this._state==="Coalescing"?this._state="Idle":this._state==="NeedsLoadData"&&(this._state="Coalescing",this._loadData())},Y.prototype.reloadTile=function(nt,lt){var vt=this.loaded;return vt&&vt[nt.uid]?W.prototype.reloadTile.call(this,nt,lt):this.loadTile(nt,lt)},Y.prototype.loadGeoJSON=function(nt,lt){if(nt.request)o.getJSON(nt.request,lt);else{if(typeof nt.data!="string")return lt(new Error("Input data given to '"+nt.source+"' is not a valid GeoJSON object."));try{return lt(null,JSON.parse(nt.data))}catch{return lt(new Error("Input data given to '"+nt.source+"' is not a valid GeoJSON object."))}}},Y.prototype.removeSource=function(nt,lt){this._pendingCallback&&this._pendingCallback(null,{abandoned:!0}),lt()},Y.prototype.getClusterExpansionZoom=function(nt,lt){try{lt(null,this._geoJSONIndex.getClusterExpansionZoom(nt.clusterId))}catch(vt){lt(vt)}},Y.prototype.getClusterChildren=function(nt,lt){try{lt(null,this._geoJSONIndex.getChildren(nt.clusterId))}catch(vt){lt(vt)}},Y.prototype.getClusterLeaves=function(nt,lt){try{lt(null,this._geoJSONIndex.getLeaves(nt.clusterId,nt.limit,nt.offset))}catch(vt){lt(vt)}},Y}(R),Vr=function(W){var Y=this;this.self=W,this.actor=new o.Actor(W,this),this.layerIndexes={},this.availableImages={},this.workerSourceTypes={vector:R,geojson:Yl},this.workerSources={},this.demWorkerSources={},this.self.registerWorkerSource=function(nt,lt){if(Y.workerSourceTypes[nt])throw new Error('Worker source with name "'+nt+'" already registered.');Y.workerSourceTypes[nt]=lt},this.self.registerRTLTextPlugin=function(nt){if(o.plugin.isParsed())throw new Error("RTL text plugin already registered.");o.plugin.applyArabicShaping=nt.applyArabicShaping,o.plugin.processBidirectionalText=nt.processBidirectionalText,o.plugin.processStyledBidirectionalText=nt.processStyledBidirectionalText}};return Vr.prototype.setReferrer=function(W,Y){this.referrer=Y},Vr.prototype.setImages=function(W,Y,nt){for(var lt in this.availableImages[W]=Y,this.workerSources[W]){var vt=this.workerSources[W][lt];for(var Mt in vt)vt[Mt].availableImages=Y}nt()},Vr.prototype.setLayers=function(W,Y,nt){this.getLayerIndex(W).replace(Y),nt()},Vr.prototype.updateLayers=function(W,Y,nt){this.getLayerIndex(W).update(Y.layers,Y.removedIds),nt()},Vr.prototype.loadTile=function(W,Y,nt){this.getWorkerSource(W,Y.type,Y.source).loadTile(Y,nt)},Vr.prototype.loadDEMTile=function(W,Y,nt){this.getDEMWorkerSource(W,Y.source).loadTile(Y,nt)},Vr.prototype.reloadTile=function(W,Y,nt){this.getWorkerSource(W,Y.type,Y.source).reloadTile(Y,nt)},Vr.prototype.abortTile=function(W,Y,nt){this.getWorkerSource(W,Y.type,Y.source).abortTile(Y,nt)},Vr.prototype.removeTile=function(W,Y,nt){this.getWorkerSource(W,Y.type,Y.source).removeTile(Y,nt)},Vr.prototype.removeDEMTile=function(W,Y){this.getDEMWorkerSource(W,Y.source).removeTile(Y)},Vr.prototype.removeSource=function(W,Y,nt){if(this.workerSources[W]&&this.workerSources[W][Y.type]&&this.workerSources[W][Y.type][Y.source]){var lt=this.workerSources[W][Y.type][Y.source];delete this.workerSources[W][Y.type][Y.source],lt.removeSource!==void 0?lt.removeSource(Y,nt):nt()}},Vr.prototype.loadWorkerSource=function(W,Y,nt){try{this.self.importScripts(Y.url),nt()}catch(lt){nt(lt.toString())}},Vr.prototype.syncRTLPluginState=function(W,Y,nt){try{o.plugin.setState(Y);var lt=o.plugin.getPluginURL();if(o.plugin.isLoaded()&&!o.plugin.isParsed()&<!=null){this.self.importScripts(lt);var vt=o.plugin.isParsed();nt(vt?void 0:new Error("RTL Text Plugin failed to import scripts from "+lt),vt)}}catch(Mt){nt(Mt.toString())}},Vr.prototype.getAvailableImages=function(W){var Y=this.availableImages[W];return Y||(Y=[]),Y},Vr.prototype.getLayerIndex=function(W){var Y=this.layerIndexes[W];return Y||(Y=this.layerIndexes[W]=new g),Y},Vr.prototype.getWorkerSource=function(W,Y,nt){var lt=this;return this.workerSources[W]||(this.workerSources[W]={}),this.workerSources[W][Y]||(this.workerSources[W][Y]={}),this.workerSources[W][Y][nt]||(this.workerSources[W][Y][nt]=new this.workerSourceTypes[Y]({send:function(vt,Mt,Rt){lt.actor.send(vt,Mt,Rt,W)}},this.getLayerIndex(W),this.getAvailableImages(W))),this.workerSources[W][Y][nt]},Vr.prototype.getDEMWorkerSource=function(W,Y){return this.demWorkerSources[W]||(this.demWorkerSources[W]={}),this.demWorkerSources[W][Y]||(this.demWorkerSources[W][Y]=new B),this.demWorkerSources[W][Y]},Vr.prototype.enforceCacheSizeLimit=function(W,Y){o.enforceCacheSizeLimit(Y)},typeof WorkerGlobalScope!="undefined"&&typeof self!="undefined"&&self instanceof WorkerGlobalScope&&(self.worker=new Vr(self)),Vr}),a(["./shared"],function(o){var u=o.createCommonjsModule(function(h){function d(S){return!p(S)}function p(S){return typeof window=="undefined"||typeof document=="undefined"?"not a browser":Array.prototype&&Array.prototype.every&&Array.prototype.filter&&Array.prototype.forEach&&Array.prototype.indexOf&&Array.prototype.lastIndexOf&&Array.prototype.map&&Array.prototype.some&&Array.prototype.reduce&&Array.prototype.reduceRight&&Array.isArray?Function.prototype&&Function.prototype.bind?Object.keys&&Object.create&&Object.getPrototypeOf&&Object.getOwnPropertyNames&&Object.isSealed&&Object.isFrozen&&Object.isExtensible&&Object.getOwnPropertyDescriptor&&Object.defineProperty&&Object.defineProperties&&Object.seal&&Object.freeze&&Object.preventExtensions?"JSON"in window&&"parse"in JSON&&"stringify"in JSON?function(){if(!("Worker"in window&&"Blob"in window&&"URL"in window))return!1;var M,N,q=new Blob([""],{type:"text/javascript"}),X=URL.createObjectURL(q);try{N=new Worker(X),M=!0}catch{M=!1}return N&&N.terminate(),URL.revokeObjectURL(X),M}()?"Uint8ClampedArray"in window?ArrayBuffer.isView?function(){var M=document.createElement("canvas");M.width=M.height=1;var N=M.getContext("2d");if(!N)return!1;var q=N.getImageData(0,0,1,1);return q&&q.width===M.width}()?(y[P=S&&S.failIfMajorPerformanceCaveat]===void 0&&(y[P]=function(M){var N=function(X){var it=document.createElement("canvas"),st=Object.create(d.webGLContextAttributes);return st.failIfMajorPerformanceCaveat=X,it.probablySupportsContext?it.probablySupportsContext("webgl",st)||it.probablySupportsContext("experimental-webgl",st):it.supportsContext?it.supportsContext("webgl",st)||it.supportsContext("experimental-webgl",st):it.getContext("webgl",st)||it.getContext("experimental-webgl",st)}(M);if(!N)return!1;var q=N.createShader(N.VERTEX_SHADER);return!(!q||N.isContextLost())&&(N.shaderSource(q,"void main() {}"),N.compileShader(q),N.getShaderParameter(q,N.COMPILE_STATUS)===!0)}(P)),y[P]?void 0:"insufficient WebGL support"):"insufficient Canvas/getImageData support":"insufficient ArrayBuffer support":"insufficient Uint8ClampedArray support":"insufficient worker support":"insufficient JSON support":"insufficient Object support":"insufficient Function support":"insufficent Array support";var P}h.exports?h.exports=d:window&&(window.mapboxgl=window.mapboxgl||{},window.mapboxgl.supported=d,window.mapboxgl.notSupportedReason=p);var y={};d.webGLContextAttributes={antialias:!1,alpha:!0,stencil:!0,depth:!0}}),c={create:function(h,d,p){var y=o.window.document.createElement(h);return d!==void 0&&(y.className=d),p&&p.appendChild(y),y},createNS:function(h,d){return o.window.document.createElementNS(h,d)}},g=o.window.document&&o.window.document.documentElement.style;function _(h){if(!g)return h[0];for(var d=0;d<h.length;d++)if(h[d]in g)return h[d];return h[0]}var E,C=_(["userSelect","MozUserSelect","WebkitUserSelect","msUserSelect"]);c.disableDrag=function(){g&&C&&(E=g[C],g[C]="none")},c.enableDrag=function(){g&&C&&(g[C]=E)};var O=_(["transform","WebkitTransform"]);c.setTransform=function(h,d){h.style[O]=d};var R=!1;try{var D=Object.defineProperty({},"passive",{get:function(){R=!0}});o.window.addEventListener("test",D,D),o.window.removeEventListener("test",D,D)}catch{R=!1}c.addEventListener=function(h,d,p,y){y===void 0&&(y={}),h.addEventListener(d,p,"passive"in y&&R?y:y.capture)},c.removeEventListener=function(h,d,p,y){y===void 0&&(y={}),h.removeEventListener(d,p,"passive"in y&&R?y:y.capture)};var B=function(h){h.preventDefault(),h.stopPropagation(),o.window.removeEventListener("click",B,!0)};function z(h){var d=h.userImage;return!!(d&&d.render&&d.render())&&(h.data.replace(new Uint8Array(d.data.buffer)),!0)}c.suppressClick=function(){o.window.addEventListener("click",B,!0),o.window.setTimeout(function(){o.window.removeEventListener("click",B,!0)},0)},c.mousePos=function(h,d){var p=h.getBoundingClientRect();return new o.Point(d.clientX-p.left-h.clientLeft,d.clientY-p.top-h.clientTop)},c.touchPos=function(h,d){for(var p=h.getBoundingClientRect(),y=[],S=0;S<d.length;S++)y.push(new o.Point(d[S].clientX-p.left-h.clientLeft,d[S].clientY-p.top-h.clientTop));return y},c.mouseButton=function(h){return o.window.InstallTrigger!==void 0&&h.button===2&&h.ctrlKey&&o.window.navigator.platform.toUpperCase().indexOf("MAC")>=0?0:h.button},c.remove=function(h){h.parentNode&&h.parentNode.removeChild(h)};var k=function(h){function d(){h.call(this),this.images={},this.updatedImages={},this.callbackDispatchedThisFrame={},this.loaded=!1,this.requestors=[],this.patterns={},this.atlasImage=new o.RGBAImage({width:1,height:1}),this.dirty=!0}return h&&(d.__proto__=h),(d.prototype=Object.create(h&&h.prototype)).constructor=d,d.prototype.isLoaded=function(){return this.loaded},d.prototype.setLoaded=function(p){if(this.loaded!==p&&(this.loaded=p,p)){for(var y=0,S=this.requestors;y<S.length;y+=1){var P=S[y];this._notify(P.ids,P.callback)}this.requestors=[]}},d.prototype.getImage=function(p){return this.images[p]},d.prototype.addImage=function(p,y){this._validate(p,y)&&(this.images[p]=y)},d.prototype._validate=function(p,y){var S=!0;return this._validateStretch(y.stretchX,y.data&&y.data.width)||(this.fire(new o.ErrorEvent(new Error('Image "'+p+'" has invalid "stretchX" value'))),S=!1),this._validateStretch(y.stretchY,y.data&&y.data.height)||(this.fire(new o.ErrorEvent(new Error('Image "'+p+'" has invalid "stretchY" value'))),S=!1),this._validateContent(y.content,y)||(this.fire(new o.ErrorEvent(new Error('Image "'+p+'" has invalid "content" value'))),S=!1),S},d.prototype._validateStretch=function(p,y){if(!p)return!0;for(var S=0,P=0,M=p;P<M.length;P+=1){var N=M[P];if(N[0]<S||N[1]<N[0]||y<N[1])return!1;S=N[1]}return!0},d.prototype._validateContent=function(p,y){return!(p&&(p.length!==4||p[0]<0||y.data.width<p[0]||p[1]<0||y.data.height<p[1]||p[2]<0||y.data.width<p[2]||p[3]<0||y.data.height<p[3]||p[2]<p[0]||p[3]<p[1]))},d.prototype.updateImage=function(p,y){y.version=this.images[p].version+1,this.images[p]=y,this.updatedImages[p]=!0},d.prototype.removeImage=function(p){var y=this.images[p];delete this.images[p],delete this.patterns[p],y.userImage&&y.userImage.onRemove&&y.userImage.onRemove()},d.prototype.listImages=function(){return Object.keys(this.images)},d.prototype.getImages=function(p,y){var S=!0;if(!this.isLoaded())for(var P=0,M=p;P<M.length;P+=1)this.images[M[P]]||(S=!1);this.isLoaded()||S?this._notify(p,y):this.requestors.push({ids:p,callback:y})},d.prototype._notify=function(p,y){for(var S={},P=0,M=p;P<M.length;P+=1){var N=M[P];this.images[N]||this.fire(new o.Event("styleimagemissing",{id:N}));var q=this.images[N];q?S[N]={data:q.data.clone(),pixelRatio:q.pixelRatio,sdf:q.sdf,version:q.version,stretchX:q.stretchX,stretchY:q.stretchY,content:q.content,hasRenderCallback:Boolean(q.userImage&&q.userImage.render)}:o.warnOnce('Image "'+N+'" could not be loaded. Please make sure you have added the image with map.addImage() or a "sprite" property in your style. You can provide missing images by listening for the "styleimagemissing" map event.')}y(null,S)},d.prototype.getPixelSize=function(){var p=this.atlasImage;return{width:p.width,height:p.height}},d.prototype.getPattern=function(p){var y=this.patterns[p],S=this.getImage(p);if(!S)return null;if(y&&y.position.version===S.version)return y.position;if(y)y.position.version=S.version;else{var P={w:S.data.width+2,h:S.data.height+2,x:0,y:0},M=new o.ImagePosition(P,S);this.patterns[p]={bin:P,position:M}}return this._updatePatternAtlas(),this.patterns[p].position},d.prototype.bind=function(p){var y=p.gl;this.atlasTexture?this.dirty&&(this.atlasTexture.update(this.atlasImage),this.dirty=!1):this.atlasTexture=new o.Texture(p,this.atlasImage,y.RGBA),this.atlasTexture.bind(y.LINEAR,y.CLAMP_TO_EDGE)},d.prototype._updatePatternAtlas=function(){var p=[];for(var y in this.patterns)p.push(this.patterns[y].bin);var S=o.potpack(p),P=S.w,M=S.h,N=this.atlasImage;for(var q in N.resize({width:P||1,height:M||1}),this.patterns){var X=this.patterns[q].bin,it=X.x+1,st=X.y+1,ct=this.images[q].data,xt=ct.width,yt=ct.height;o.RGBAImage.copy(ct,N,{x:0,y:0},{x:it,y:st},{width:xt,height:yt}),o.RGBAImage.copy(ct,N,{x:0,y:yt-1},{x:it,y:st-1},{width:xt,height:1}),o.RGBAImage.copy(ct,N,{x:0,y:0},{x:it,y:st+yt},{width:xt,height:1}),o.RGBAImage.copy(ct,N,{x:xt-1,y:0},{x:it-1,y:st},{width:1,height:yt}),o.RGBAImage.copy(ct,N,{x:0,y:0},{x:it+xt,y:st},{width:1,height:yt})}this.dirty=!0},d.prototype.beginFrame=function(){this.callbackDispatchedThisFrame={}},d.prototype.dispatchRenderCallbacks=function(p){for(var y=0,S=p;y<S.length;y+=1){var P=S[y];if(!this.callbackDispatchedThisFrame[P]){this.callbackDispatchedThisFrame[P]=!0;var M=this.images[P];z(M)&&this.updateImage(P,M)}}},d}(o.Evented),$=mt,K=mt,et=1e20;function mt(h,d,p,y,S,P){this.fontSize=h||24,this.buffer=d===void 0?3:d,this.cutoff=y||.25,this.fontFamily=S||"sans-serif",this.fontWeight=P||"normal",this.radius=p||8;var M=this.size=this.fontSize+2*this.buffer;this.canvas=document.createElement("canvas"),this.canvas.width=this.canvas.height=M,this.ctx=this.canvas.getContext("2d"),this.ctx.font=this.fontWeight+" "+this.fontSize+"px "+this.fontFamily,this.ctx.textBaseline="middle",this.ctx.fillStyle="black",this.gridOuter=new Float64Array(M*M),this.gridInner=new Float64Array(M*M),this.f=new Float64Array(M),this.d=new Float64Array(M),this.z=new Float64Array(M+1),this.v=new Int16Array(M),this.middle=Math.round(M/2*(navigator.userAgent.indexOf("Gecko/")>=0?1.2:1))}function wt(h,d,p,y,S,P,M){for(var N=0;N<d;N++){for(var q=0;q<p;q++)y[q]=h[q*d+N];for(Ot(y,S,P,M,p),q=0;q<p;q++)h[q*d+N]=S[q]}for(q=0;q<p;q++){for(N=0;N<d;N++)y[N]=h[q*d+N];for(Ot(y,S,P,M,d),N=0;N<d;N++)h[q*d+N]=Math.sqrt(S[N])}}function Ot(h,d,p,y,S){p[0]=0,y[0]=-et,y[1]=+et;for(var P=1,M=0;P<S;P++){for(var N=(h[P]+P*P-(h[p[M]]+p[M]*p[M]))/(2*P-2*p[M]);N<=y[M];)M--,N=(h[P]+P*P-(h[p[M]]+p[M]*p[M]))/(2*P-2*p[M]);p[++M]=P,y[M]=N,y[M+1]=+et}for(P=0,M=0;P<S;P++){for(;y[M+1]<P;)M++;d[P]=(P-p[M])*(P-p[M])+h[p[M]]}}mt.prototype.draw=function(h){this.ctx.clearRect(0,0,this.size,this.size),this.ctx.fillText(h,this.buffer,this.middle);for(var d=this.ctx.getImageData(0,0,this.size,this.size),p=new Uint8ClampedArray(this.size*this.size),y=0;y<this.size*this.size;y++){var S=d.data[4*y+3]/255;this.gridOuter[y]=S===1?0:S===0?et:Math.pow(Math.max(0,.5-S),2),this.gridInner[y]=S===1?et:S===0?0:Math.pow(Math.max(0,S-.5),2)}for(wt(this.gridOuter,this.size,this.size,this.f,this.d,this.v,this.z),wt(this.gridInner,this.size,this.size,this.f,this.d,this.v,this.z),y=0;y<this.size*this.size;y++)p[y]=Math.max(0,Math.min(255,Math.round(255-255*((this.gridOuter[y]-this.gridInner[y])/this.radius+this.cutoff))));return p},$.default=K;var Bt=function(h,d){this.requestManager=h,this.localIdeographFontFamily=d,this.entries={}};Bt.prototype.setURL=function(h){this.url=h},Bt.prototype.getGlyphs=function(h,d){var p=this,y=[];for(var S in h)for(var P=0,M=h[S];P<M.length;P+=1)y.push({stack:S,id:M[P]});o.asyncAll(y,function(N,q){var X=N.stack,it=N.id,st=p.entries[X];st||(st=p.entries[X]={glyphs:{},requests:{},ranges:{}});var ct=st.glyphs[it];if(ct===void 0){if(ct=p._tinySDF(st,X,it))return st.glyphs[it]=ct,void q(null,{stack:X,id:it,glyph:ct});var xt=Math.floor(it/256);if(256*xt>65535)q(new Error("glyphs > 65535 not supported"));else if(st.ranges[xt])q(null,{stack:X,id:it,glyph:ct});else{var yt=st.requests[xt];yt||(yt=st.requests[xt]=[],Bt.loadGlyphRange(X,xt,p.url,p.requestManager,function(Ct,gt){if(gt){for(var It in gt)p._doesCharSupportLocalGlyph(+It)||(st.glyphs[+It]=gt[+It]);st.ranges[xt]=!0}for(var Lt=0,jt=yt;Lt<jt.length;Lt+=1)(0,jt[Lt])(Ct,gt);delete st.requests[xt]})),yt.push(function(Ct,gt){Ct?q(Ct):gt&&q(null,{stack:X,id:it,glyph:gt[it]||null})})}}else q(null,{stack:X,id:it,glyph:ct})},function(N,q){if(N)d(N);else if(q){for(var X={},it=0,st=q;it<st.length;it+=1){var ct=st[it],xt=ct.stack,yt=ct.id,Ct=ct.glyph;(X[xt]||(X[xt]={}))[yt]=Ct&&{id:Ct.id,bitmap:Ct.bitmap.clone(),metrics:Ct.metrics}}d(null,X)}})},Bt.prototype._doesCharSupportLocalGlyph=function(h){return!!this.localIdeographFontFamily&&(o.isChar["CJK Unified Ideographs"](h)||o.isChar["Hangul Syllables"](h)||o.isChar.Hiragana(h)||o.isChar.Katakana(h))},Bt.prototype._tinySDF=function(h,d,p){var y=this.localIdeographFontFamily;if(y&&this._doesCharSupportLocalGlyph(p)){var S=h.tinySDF;if(!S){var P="400";/bold/i.test(d)?P="900":/medium/i.test(d)?P="500":/light/i.test(d)&&(P="200"),S=h.tinySDF=new Bt.TinySDF(24,3,8,.25,y,P)}return{id:p,bitmap:new o.AlphaImage({width:30,height:30},S.draw(String.fromCharCode(p))),metrics:{width:24,height:24,left:0,top:-8,advance:24}}}},Bt.loadGlyphRange=function(h,d,p,y,S){var P=256*d,M=P+255,N=y.transformRequest(y.normalizeGlyphsURL(p).replace("{fontstack}",h).replace("{range}",P+"-"+M),o.ResourceType.Glyphs);o.getArrayBuffer(N,function(q,X){if(q)S(q);else if(X){for(var it={},st=0,ct=o.parseGlyphPBF(X);st<ct.length;st+=1){var xt=ct[st];it[xt.id]=xt}S(null,it)}})},Bt.TinySDF=$;var se=function(){this.specification=o.styleSpec.light.position};se.prototype.possiblyEvaluate=function(h,d){return o.sphericalToCartesian(h.expression.evaluate(d))},se.prototype.interpolate=function(h,d,p){return{x:o.number(h.x,d.x,p),y:o.number(h.y,d.y,p),z:o.number(h.z,d.z,p)}};var _e=new o.Properties({anchor:new o.DataConstantProperty(o.styleSpec.light.anchor),position:new se,color:new o.DataConstantProperty(o.styleSpec.light.color),intensity:new o.DataConstantProperty(o.styleSpec.light.intensity)}),Ne=function(h){function d(p){h.call(this),this._transitionable=new o.Transitionable(_e),this.setLight(p),this._transitioning=this._transitionable.untransitioned()}return h&&(d.__proto__=h),(d.prototype=Object.create(h&&h.prototype)).constructor=d,d.prototype.getLight=function(){return this._transitionable.serialize()},d.prototype.setLight=function(p,y){if(y===void 0&&(y={}),!this._validate(o.validateLight,p,y))for(var S in p){var P=p[S];o.endsWith(S,"-transition")?this._transitionable.setTransition(S.slice(0,-"-transition".length),P):this._transitionable.setValue(S,P)}},d.prototype.updateTransitions=function(p){this._transitioning=this._transitionable.transitioned(p,this._transitioning)},d.prototype.hasTransition=function(){return this._transitioning.hasTransition()},d.prototype.recalculate=function(p){this.properties=this._transitioning.possiblyEvaluate(p)},d.prototype._validate=function(p,y,S){return(!S||S.validate!==!1)&&o.emitValidationErrors(this,p.call(o.validateStyle,o.extend({value:y,style:{glyphs:!0,sprite:!0},styleSpec:o.styleSpec})))},d}(o.Evented),He=function(h,d){this.width=h,this.height=d,this.nextRow=0,this.data=new Uint8Array(this.width*this.height),this.dashEntry={}};He.prototype.getDash=function(h,d){var p=h.join(",")+String(d);return this.dashEntry[p]||(this.dashEntry[p]=this.addDash(h,d)),this.dashEntry[p]},He.prototype.getDashRanges=function(h,d,p){var y=[],S=h.length%2==1?-h[h.length-1]*p:0,P=h[0]*p,M=!0;y.push({left:S,right:P,isDash:M,zeroLength:h[0]===0});for(var N=h[0],q=1;q<h.length;q++){var X=h[q];y.push({left:S=N*p,right:P=(N+=X)*p,isDash:M=!M,zeroLength:X===0})}return y},He.prototype.addRoundDash=function(h,d,p){for(var y=d/2,S=-p;S<=p;S++)for(var P=this.width*(this.nextRow+p+S),M=0,N=h[M],q=0;q<this.width;q++){q/N.right>1&&(N=h[++M]);var X=Math.abs(q-N.left),it=Math.abs(q-N.right),st=Math.min(X,it),ct=void 0,xt=S/p*(y+1);if(N.isDash){var yt=y-Math.abs(xt);ct=Math.sqrt(st*st+yt*yt)}else ct=y-Math.sqrt(st*st+xt*xt);this.data[P+q]=Math.max(0,Math.min(255,ct+128))}},He.prototype.addRegularDash=function(h){for(var d=h.length-1;d>=0;--d){var p=h[d],y=h[d+1];p.zeroLength?h.splice(d,1):y&&y.isDash===p.isDash&&(y.left=p.left,h.splice(d,1))}var S=h[0],P=h[h.length-1];S.isDash===P.isDash&&(S.left=P.left-this.width,P.right=S.right+this.width);for(var M=this.width*this.nextRow,N=0,q=h[N],X=0;X<this.width;X++){X/q.right>1&&(q=h[++N]);var it=Math.abs(X-q.left),st=Math.abs(X-q.right),ct=Math.min(it,st);this.data[M+X]=Math.max(0,Math.min(255,(q.isDash?ct:-ct)+128))}},He.prototype.addDash=function(h,d){var p=d?7:0,y=2*p+1;if(this.nextRow+y>this.height)return o.warnOnce("LineAtlas out of space"),null;for(var S=0,P=0;P<h.length;P++)S+=h[P];if(S!==0){var M=this.width/S,N=this.getDashRanges(h,this.width,M);d?this.addRoundDash(N,M,p):this.addRegularDash(N)}var q={y:(this.nextRow+p+.5)/this.height,height:2*p/this.height,width:S};return this.nextRow+=y,this.dirty=!0,q},He.prototype.bind=function(h){var d=h.gl;this.texture?(d.bindTexture(d.TEXTURE_2D,this.texture),this.dirty&&(this.dirty=!1,d.texSubImage2D(d.TEXTURE_2D,0,0,0,this.width,this.height,d.ALPHA,d.UNSIGNED_BYTE,this.data))):(this.texture=d.createTexture(),d.bindTexture(d.TEXTURE_2D,this.texture),d.texParameteri(d.TEXTURE_2D,d.TEXTURE_WRAP_S,d.REPEAT),d.texParameteri(d.TEXTURE_2D,d.TEXTURE_WRAP_T,d.REPEAT),d.texParameteri(d.TEXTURE_2D,d.TEXTURE_MIN_FILTER,d.LINEAR),d.texParameteri(d.TEXTURE_2D,d.TEXTURE_MAG_FILTER,d.LINEAR),d.texImage2D(d.TEXTURE_2D,0,d.ALPHA,this.width,this.height,0,d.ALPHA,d.UNSIGNED_BYTE,this.data))};var de=function h(d,p){this.workerPool=d,this.actors=[],this.currentActor=0,this.id=o.uniqueId();for(var y=this.workerPool.acquire(this.id),S=0;S<y.length;S++){var P=new h.Actor(y[S],p,this.id);P.name="Worker "+S,this.actors.push(P)}};function he(h,d,p){var y=function(S,P){if(S)return p(S);if(P){var M=o.pick(o.extend(P,h),["tiles","minzoom","maxzoom","attribution","mapbox_logo","bounds","scheme","tileSize","encoding"]);P.vector_layers&&(M.vectorLayers=P.vector_layers,M.vectorLayerIds=M.vectorLayers.map(function(N){return N.id})),M.tiles=d.canonicalizeTileset(M,h.url),p(null,M)}};return h.url?o.getJSON(d.transformRequest(d.normalizeSourceURL(h.url),o.ResourceType.Source),y):o.browser.frame(function(){return y(null,h)})}de.prototype.broadcast=function(h,d,p){o.asyncAll(this.actors,function(y,S){y.send(h,d,S)},p=p||function(){})},de.prototype.getActor=function(){return this.currentActor=(this.currentActor+1)%this.actors.length,this.actors[this.currentActor]},de.prototype.remove=function(){this.actors.forEach(function(h){h.remove()}),this.actors=[],this.workerPool.release(this.id)},de.Actor=o.Actor;var Ge=function(h,d,p){this.bounds=o.LngLatBounds.convert(this.validateBounds(h)),this.minzoom=d||0,this.maxzoom=p||24};Ge.prototype.validateBounds=function(h){return Array.isArray(h)&&h.length===4?[Math.max(-180,h[0]),Math.max(-90,h[1]),Math.min(180,h[2]),Math.min(90,h[3])]:[-180,-90,180,90]},Ge.prototype.contains=function(h){var d=Math.pow(2,h.z),p=Math.floor(o.mercatorXfromLng(this.bounds.getWest())*d),y=Math.floor(o.mercatorYfromLat(this.bounds.getNorth())*d),S=Math.ceil(o.mercatorXfromLng(this.bounds.getEast())*d),P=Math.ceil(o.mercatorYfromLat(this.bounds.getSouth())*d);return h.x>=p&&h.x<S&&h.y>=y&&h.y<P};var Yt=function(h){function d(p,y,S,P){if(h.call(this),this.id=p,this.dispatcher=S,this.type="vector",this.minzoom=0,this.maxzoom=22,this.scheme="xyz",this.tileSize=512,this.reparseOverscaled=!0,this.isTileClipped=!0,this._loaded=!1,o.extend(this,o.pick(y,["url","scheme","tileSize","promoteId"])),this._options=o.extend({type:"vector"},y),this._collectResourceTiming=y.collectResourceTiming,this.tileSize!==512)throw new Error("vector tile sources must have a tileSize of 512");this.setEventedParent(P)}return h&&(d.__proto__=h),(d.prototype=Object.create(h&&h.prototype)).constructor=d,d.prototype.load=function(){var p=this;this._loaded=!1,this.fire(new o.Event("dataloading",{dataType:"source"})),this._tileJSONRequest=he(this._options,this.map._requestManager,function(y,S){p._tileJSONRequest=null,p._loaded=!0,y?p.fire(new o.ErrorEvent(y)):S&&(o.extend(p,S),S.bounds&&(p.tileBounds=new Ge(S.bounds,p.minzoom,p.maxzoom)),o.postTurnstileEvent(S.tiles,p.map._requestManager._customAccessToken),o.postMapLoadEvent(S.tiles,p.map._getMapId(),p.map._requestManager._skuToken,p.map._requestManager._customAccessToken),p.fire(new o.Event("data",{dataType:"source",sourceDataType:"metadata"})),p.fire(new o.Event("data",{dataType:"source",sourceDataType:"content"})))})},d.prototype.loaded=function(){return this._loaded},d.prototype.hasTile=function(p){return!this.tileBounds||this.tileBounds.contains(p.canonical)},d.prototype.onAdd=function(p){this.map=p,this.load()},d.prototype.setSourceProperty=function(p){this._tileJSONRequest&&this._tileJSONRequest.cancel(),p(),this.map.style.sourceCaches[this.id].clearTiles(),this.load()},d.prototype.setTiles=function(p){var y=this;return this.setSourceProperty(function(){y._options.tiles=p}),this},d.prototype.setUrl=function(p){var y=this;return this.setSourceProperty(function(){y.url=p,y._options.url=p}),this},d.prototype.onRemove=function(){this._tileJSONRequest&&(this._tileJSONRequest.cancel(),this._tileJSONRequest=null)},d.prototype.serialize=function(){return o.extend({},this._options)},d.prototype.loadTile=function(p,y){var S=this.map._requestManager.normalizeTileURL(p.tileID.canonical.url(this.tiles,this.scheme)),P={request:this.map._requestManager.transformRequest(S,o.ResourceType.Tile),uid:p.uid,tileID:p.tileID,zoom:p.tileID.overscaledZ,tileSize:this.tileSize*p.tileID.overscaleFactor(),type:this.type,source:this.id,pixelRatio:o.browser.devicePixelRatio,showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};function M(N,q){return delete p.request,p.aborted?y(null):N&&N.status!==404?y(N):(q&&q.resourceTiming&&(p.resourceTiming=q.resourceTiming),this.map._refreshExpiredTiles&&q&&p.setExpiryData(q),p.loadVectorData(q,this.map.painter),o.cacheEntryPossiblyAdded(this.dispatcher),y(null),void(p.reloadCallback&&(this.loadTile(p,p.reloadCallback),p.reloadCallback=null)))}P.request.collectResourceTiming=this._collectResourceTiming,p.actor&&p.state!=="expired"?p.state==="loading"?p.reloadCallback=y:p.request=p.actor.send("reloadTile",P,M.bind(this)):(p.actor=this.dispatcher.getActor(),p.request=p.actor.send("loadTile",P,M.bind(this)))},d.prototype.abortTile=function(p){p.request&&(p.request.cancel(),delete p.request),p.actor&&p.actor.send("abortTile",{uid:p.uid,type:this.type,source:this.id},void 0)},d.prototype.unloadTile=function(p){p.unloadVectorData(),p.actor&&p.actor.send("removeTile",{uid:p.uid,type:this.type,source:this.id},void 0)},d.prototype.hasTransition=function(){return!1},d}(o.Evented),te=function(h){function d(p,y,S,P){h.call(this),this.id=p,this.dispatcher=S,this.setEventedParent(P),this.type="raster",this.minzoom=0,this.maxzoom=22,this.roundZoom=!0,this.scheme="xyz",this.tileSize=512,this._loaded=!1,this._options=o.extend({type:"raster"},y),o.extend(this,o.pick(y,["url","scheme","tileSize"]))}return h&&(d.__proto__=h),(d.prototype=Object.create(h&&h.prototype)).constructor=d,d.prototype.load=function(){var p=this;this._loaded=!1,this.fire(new o.Event("dataloading",{dataType:"source"})),this._tileJSONRequest=he(this._options,this.map._requestManager,function(y,S){p._tileJSONRequest=null,p._loaded=!0,y?p.fire(new o.ErrorEvent(y)):S&&(o.extend(p,S),S.bounds&&(p.tileBounds=new Ge(S.bounds,p.minzoom,p.maxzoom)),o.postTurnstileEvent(S.tiles),o.postMapLoadEvent(S.tiles,p.map._getMapId(),p.map._requestManager._skuToken),p.fire(new o.Event("data",{dataType:"source",sourceDataType:"metadata"})),p.fire(new o.Event("data",{dataType:"source",sourceDataType:"content"})))})},d.prototype.loaded=function(){return this._loaded},d.prototype.onAdd=function(p){this.map=p,this.load()},d.prototype.onRemove=function(){this._tileJSONRequest&&(this._tileJSONRequest.cancel(),this._tileJSONRequest=null)},d.prototype.serialize=function(){return o.extend({},this._options)},d.prototype.hasTile=function(p){return!this.tileBounds||this.tileBounds.contains(p.canonical)},d.prototype.loadTile=function(p,y){var S=this,P=this.map._requestManager.normalizeTileURL(p.tileID.canonical.url(this.tiles,this.scheme),this.tileSize);p.request=o.getImage(this.map._requestManager.transformRequest(P,o.ResourceType.Tile),function(M,N){if(delete p.request,p.aborted)p.state="unloaded",y(null);else if(M)p.state="errored",y(M);else if(N){S.map._refreshExpiredTiles&&p.setExpiryData(N),delete N.cacheControl,delete N.expires;var q=S.map.painter.context,X=q.gl;p.texture=S.map.painter.getTileTexture(N.width),p.texture?p.texture.update(N,{useMipmap:!0}):(p.texture=new o.Texture(q,N,X.RGBA,{useMipmap:!0}),p.texture.bind(X.LINEAR,X.CLAMP_TO_EDGE,X.LINEAR_MIPMAP_NEAREST),q.extTextureFilterAnisotropic&&X.texParameterf(X.TEXTURE_2D,q.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,q.extTextureFilterAnisotropicMax)),p.state="loaded",o.cacheEntryPossiblyAdded(S.dispatcher),y(null)}})},d.prototype.abortTile=function(p,y){p.request&&(p.request.cancel(),delete p.request),y()},d.prototype.unloadTile=function(p,y){p.texture&&this.map.painter.saveTileTexture(p.texture),y()},d.prototype.hasTransition=function(){return!1},d}(o.Evented),ve=function(h){function d(p,y,S,P){h.call(this,p,y,S,P),this.type="raster-dem",this.maxzoom=22,this._options=o.extend({type:"raster-dem"},y),this.encoding=y.encoding||"mapbox"}return h&&(d.__proto__=h),(d.prototype=Object.create(h&&h.prototype)).constructor=d,d.prototype.serialize=function(){return{type:"raster-dem",url:this.url,tileSize:this.tileSize,tiles:this.tiles,bounds:this.bounds,encoding:this.encoding}},d.prototype.loadTile=function(p,y){var S=this.map._requestManager.normalizeTileURL(p.tileID.canonical.url(this.tiles,this.scheme),this.tileSize);function P(M,N){M&&(p.state="errored",y(M)),N&&(p.dem=N,p.needsHillshadePrepare=!0,p.state="loaded",y(null))}p.request=o.getImage(this.map._requestManager.transformRequest(S,o.ResourceType.Tile),function(M,N){if(delete p.request,p.aborted)p.state="unloaded",y(null);else if(M)p.state="errored",y(M);else if(N){this.map._refreshExpiredTiles&&p.setExpiryData(N),delete N.cacheControl,delete N.expires;var q=o.window.ImageBitmap&&N instanceof o.window.ImageBitmap&&o.offscreenCanvasSupported()?N:o.browser.getImageData(N,1),X={uid:p.uid,coord:p.tileID,source:this.id,rawImageData:q,encoding:this.encoding};p.actor&&p.state!=="expired"||(p.actor=this.dispatcher.getActor(),p.actor.send("loadDEMTile",X,P.bind(this)))}}.bind(this)),p.neighboringTiles=this._getNeighboringTiles(p.tileID)},d.prototype._getNeighboringTiles=function(p){var y=p.canonical,S=Math.pow(2,y.z),P=(y.x-1+S)%S,M=y.x===0?p.wrap-1:p.wrap,N=(y.x+1+S)%S,q=y.x+1===S?p.wrap+1:p.wrap,X={};return X[new o.OverscaledTileID(p.overscaledZ,M,y.z,P,y.y).key]={backfilled:!1},X[new o.OverscaledTileID(p.overscaledZ,q,y.z,N,y.y).key]={backfilled:!1},y.y>0&&(X[new o.OverscaledTileID(p.overscaledZ,M,y.z,P,y.y-1).key]={backfilled:!1},X[new o.OverscaledTileID(p.overscaledZ,p.wrap,y.z,y.x,y.y-1).key]={backfilled:!1},X[new o.OverscaledTileID(p.overscaledZ,q,y.z,N,y.y-1).key]={backfilled:!1}),y.y+1<S&&(X[new o.OverscaledTileID(p.overscaledZ,M,y.z,P,y.y+1).key]={backfilled:!1},X[new o.OverscaledTileID(p.overscaledZ,p.wrap,y.z,y.x,y.y+1).key]={backfilled:!1},X[new o.OverscaledTileID(p.overscaledZ,q,y.z,N,y.y+1).key]={backfilled:!1}),X},d.prototype.unloadTile=function(p){p.demTexture&&this.map.painter.saveTileTexture(p.demTexture),p.fbo&&(p.fbo.destroy(),delete p.fbo),p.dem&&delete p.dem,delete p.neighboringTiles,p.state="unloaded",p.actor&&p.actor.send("removeDEMTile",{uid:p.uid,source:this.id})},d}(te),Wt=function(h){function d(p,y,S,P){h.call(this),this.id=p,this.type="geojson",this.minzoom=0,this.maxzoom=18,this.tileSize=512,this.isTileClipped=!0,this.reparseOverscaled=!0,this._removed=!1,this._loaded=!1,this.actor=S.getActor(),this.setEventedParent(P),this._data=y.data,this._options=o.extend({},y),this._collectResourceTiming=y.collectResourceTiming,this._resourceTiming=[],y.maxzoom!==void 0&&(this.maxzoom=y.maxzoom),y.type&&(this.type=y.type),y.attribution&&(this.attribution=y.attribution),this.promoteId=y.promoteId;var M=o.EXTENT/this.tileSize;this.workerOptions=o.extend({source:this.id,cluster:y.cluster||!1,geojsonVtOptions:{buffer:(y.buffer!==void 0?y.buffer:128)*M,tolerance:(y.tolerance!==void 0?y.tolerance:.375)*M,extent:o.EXTENT,maxZoom:this.maxzoom,lineMetrics:y.lineMetrics||!1,generateId:y.generateId||!1},superclusterOptions:{maxZoom:y.clusterMaxZoom!==void 0?Math.min(y.clusterMaxZoom,this.maxzoom-1):this.maxzoom-1,minPoints:Math.max(2,y.clusterMinPoints||2),extent:o.EXTENT,radius:(y.clusterRadius||50)*M,log:!1,generateId:y.generateId||!1},clusterProperties:y.clusterProperties,filter:y.filter},y.workerOptions)}return h&&(d.__proto__=h),(d.prototype=Object.create(h&&h.prototype)).constructor=d,d.prototype.load=function(){var p=this;this.fire(new o.Event("dataloading",{dataType:"source"})),this._updateWorkerData(function(y){if(y)p.fire(new o.ErrorEvent(y));else{var S={dataType:"source",sourceDataType:"metadata"};p._collectResourceTiming&&p._resourceTiming&&p._resourceTiming.length>0&&(S.resourceTiming=p._resourceTiming,p._resourceTiming=[]),p.fire(new o.Event("data",S))}})},d.prototype.onAdd=function(p){this.map=p,this.load()},d.prototype.setData=function(p){var y=this;return this._data=p,this.fire(new o.Event("dataloading",{dataType:"source"})),this._updateWorkerData(function(S){if(S)y.fire(new o.ErrorEvent(S));else{var P={dataType:"source",sourceDataType:"content"};y._collectResourceTiming&&y._resourceTiming&&y._resourceTiming.length>0&&(P.resourceTiming=y._resourceTiming,y._resourceTiming=[]),y.fire(new o.Event("data",P))}}),this},d.prototype.getClusterExpansionZoom=function(p,y){return this.actor.send("geojson.getClusterExpansionZoom",{clusterId:p,source:this.id},y),this},d.prototype.getClusterChildren=function(p,y){return this.actor.send("geojson.getClusterChildren",{clusterId:p,source:this.id},y),this},d.prototype.getClusterLeaves=function(p,y,S,P){return this.actor.send("geojson.getClusterLeaves",{source:this.id,clusterId:p,limit:y,offset:S},P),this},d.prototype._updateWorkerData=function(p){var y=this;this._loaded=!1;var S=o.extend({},this.workerOptions),P=this._data;typeof P=="string"?(S.request=this.map._requestManager.transformRequest(o.browser.resolveURL(P),o.ResourceType.Source),S.request.collectResourceTiming=this._collectResourceTiming):S.data=JSON.stringify(P),this.actor.send(this.type+".loadData",S,function(M,N){y._removed||N&&N.abandoned||(y._loaded=!0,N&&N.resourceTiming&&N.resourceTiming[y.id]&&(y._resourceTiming=N.resourceTiming[y.id].slice(0)),y.actor.send(y.type+".coalesce",{source:S.source},null),p(M))})},d.prototype.loaded=function(){return this._loaded},d.prototype.loadTile=function(p,y){var S=this,P=p.actor?"reloadTile":"loadTile";p.actor=this.actor,p.request=this.actor.send(P,{type:this.type,uid:p.uid,tileID:p.tileID,zoom:p.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:o.browser.devicePixelRatio,showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId},function(M,N){return delete p.request,p.unloadVectorData(),p.aborted?y(null):M?y(M):(p.loadVectorData(N,S.map.painter,P==="reloadTile"),y(null))})},d.prototype.abortTile=function(p){p.request&&(p.request.cancel(),delete p.request),p.aborted=!0},d.prototype.unloadTile=function(p){p.unloadVectorData(),this.actor.send("removeTile",{uid:p.uid,type:this.type,source:this.id})},d.prototype.onRemove=function(){this._removed=!0,this.actor.send("removeSource",{type:this.type,source:this.id})},d.prototype.serialize=function(){return o.extend({},this._options,{type:this.type,data:this._data})},d.prototype.hasTransition=function(){return!1},d}(o.Evented),be=o.createLayout([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]),De=function(h){function d(p,y,S,P){h.call(this),this.id=p,this.dispatcher=S,this.coordinates=y.coordinates,this.type="image",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this._loaded=!1,this.setEventedParent(P),this.options=y}return h&&(d.__proto__=h),(d.prototype=Object.create(h&&h.prototype)).constructor=d,d.prototype.load=function(p,y){var S=this;this._loaded=!1,this.fire(new o.Event("dataloading",{dataType:"source"})),this.url=this.options.url,o.getImage(this.map._requestManager.transformRequest(this.url,o.ResourceType.Image),function(P,M){S._loaded=!0,P?S.fire(new o.ErrorEvent(P)):M&&(S.image=M,p&&(S.coordinates=p),y&&y(),S._finishLoading())})},d.prototype.loaded=function(){return this._loaded},d.prototype.updateImage=function(p){var y=this;return this.image&&p.url?(this.options.url=p.url,this.load(p.coordinates,function(){y.texture=null}),this):this},d.prototype._finishLoading=function(){this.map&&(this.setCoordinates(this.coordinates),this.fire(new o.Event("data",{dataType:"source",sourceDataType:"metadata"})))},d.prototype.onAdd=function(p){this.map=p,this.load()},d.prototype.setCoordinates=function(p){var y=this;this.coordinates=p;var S=p.map(o.MercatorCoordinate.fromLngLat);this.tileID=function(M){for(var N=1/0,q=1/0,X=-1/0,it=-1/0,st=0,ct=M;st<ct.length;st+=1){var xt=ct[st];N=Math.min(N,xt.x),q=Math.min(q,xt.y),X=Math.max(X,xt.x),it=Math.max(it,xt.y)}var yt=Math.max(X-N,it-q),Ct=Math.max(0,Math.floor(-Math.log(yt)/Math.LN2)),gt=Math.pow(2,Ct);return new o.CanonicalTileID(Ct,Math.floor((N+X)/2*gt),Math.floor((q+it)/2*gt))}(S),this.minzoom=this.maxzoom=this.tileID.z;var P=S.map(function(M){return y.tileID.getTilePoint(M)._round()});return this._boundsArray=new o.StructArrayLayout4i8,this._boundsArray.emplaceBack(P[0].x,P[0].y,0,0),this._boundsArray.emplaceBack(P[1].x,P[1].y,o.EXTENT,0),this._boundsArray.emplaceBack(P[3].x,P[3].y,0,o.EXTENT),this._boundsArray.emplaceBack(P[2].x,P[2].y,o.EXTENT,o.EXTENT),this.boundsBuffer&&(this.boundsBuffer.destroy(),delete this.boundsBuffer),this.fire(new o.Event("data",{dataType:"source",sourceDataType:"content"})),this},d.prototype.prepare=function(){if(Object.keys(this.tiles).length!==0&&this.image){var p=this.map.painter.context,y=p.gl;for(var S in this.boundsBuffer||(this.boundsBuffer=p.createVertexBuffer(this._boundsArray,be.members)),this.boundsSegments||(this.boundsSegments=o.SegmentVector.simpleSegment(0,0,4,2)),this.texture||(this.texture=new o.Texture(p,this.image,y.RGBA),this.texture.bind(y.LINEAR,y.CLAMP_TO_EDGE)),this.tiles){var P=this.tiles[S];P.state!=="loaded"&&(P.state="loaded",P.texture=this.texture)}}},d.prototype.loadTile=function(p,y){this.tileID&&this.tileID.equals(p.tileID.canonical)?(this.tiles[String(p.tileID.wrap)]=p,p.buckets={},y(null)):(p.state="errored",y(null))},d.prototype.serialize=function(){return{type:"image",url:this.options.url,coordinates:this.coordinates}},d.prototype.hasTransition=function(){return!1},d}(o.Evented),Fn=function(h){function d(p,y,S,P){h.call(this,p,y,S,P),this.roundZoom=!0,this.type="video",this.options=y}return h&&(d.__proto__=h),(d.prototype=Object.create(h&&h.prototype)).constructor=d,d.prototype.load=function(){var p=this;this._loaded=!1;var y=this.options;this.urls=[];for(var S=0,P=y.urls;S<P.length;S+=1)this.urls.push(this.map._requestManager.transformRequest(P[S],o.ResourceType.Source).url);o.getVideo(this.urls,function(M,N){p._loaded=!0,M?p.fire(new o.ErrorEvent(M)):N&&(p.video=N,p.video.loop=!0,p.video.addEventListener("playing",function(){p.map.triggerRepaint()}),p.map&&p.video.play(),p._finishLoading())})},d.prototype.pause=function(){this.video&&this.video.pause()},d.prototype.play=function(){this.video&&this.video.play()},d.prototype.seek=function(p){if(this.video){var y=this.video.seekable;p<y.start(0)||p>y.end(0)?this.fire(new o.ErrorEvent(new o.ValidationError("sources."+this.id,null,"Playback for this video can be set only between the "+y.start(0)+" and "+y.end(0)+"-second mark."))):this.video.currentTime=p}},d.prototype.getVideo=function(){return this.video},d.prototype.onAdd=function(p){this.map||(this.map=p,this.load(),this.video&&(this.video.play(),this.setCoordinates(this.coordinates)))},d.prototype.prepare=function(){if(!(Object.keys(this.tiles).length===0||this.video.readyState<2)){var p=this.map.painter.context,y=p.gl;for(var S in this.boundsBuffer||(this.boundsBuffer=p.createVertexBuffer(this._boundsArray,be.members)),this.boundsSegments||(this.boundsSegments=o.SegmentVector.simpleSegment(0,0,4,2)),this.texture?this.video.paused||(this.texture.bind(y.LINEAR,y.CLAMP_TO_EDGE),y.texSubImage2D(y.TEXTURE_2D,0,0,0,y.RGBA,y.UNSIGNED_BYTE,this.video)):(this.texture=new o.Texture(p,this.video,y.RGBA),this.texture.bind(y.LINEAR,y.CLAMP_TO_EDGE)),this.tiles){var P=this.tiles[S];P.state!=="loaded"&&(P.state="loaded",P.texture=this.texture)}}},d.prototype.serialize=function(){return{type:"video",urls:this.urls,coordinates:this.coordinates}},d.prototype.hasTransition=function(){return this.video&&!this.video.paused},d}(De),ar=function(h){function d(p,y,S,P){h.call(this,p,y,S,P),y.coordinates?Array.isArray(y.coordinates)&&y.coordinates.length===4&&!y.coordinates.some(function(M){return!Array.isArray(M)||M.length!==2||M.some(function(N){return typeof N!="number"})})||this.fire(new o.ErrorEvent(new o.ValidationError("sources."+p,null,'"coordinates" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new o.ErrorEvent(new o.ValidationError("sources."+p,null,'missing required property "coordinates"'))),y.animate&&typeof y.animate!="boolean"&&this.fire(new o.ErrorEvent(new o.ValidationError("sources."+p,null,'optional "animate" property must be a boolean value'))),y.canvas?typeof y.canvas=="string"||y.canvas instanceof o.window.HTMLCanvasElement||this.fire(new o.ErrorEvent(new o.ValidationError("sources."+p,null,'"canvas" must be either a string representing the ID of the canvas element from which to read, or an HTMLCanvasElement instance'))):this.fire(new o.ErrorEvent(new o.ValidationError("sources."+p,null,'missing required property "canvas"'))),this.options=y,this.animate=y.animate===void 0||y.animate}return h&&(d.__proto__=h),(d.prototype=Object.create(h&&h.prototype)).constructor=d,d.prototype.load=function(){this._loaded=!0,this.canvas||(this.canvas=this.options.canvas instanceof o.window.HTMLCanvasElement?this.options.canvas:o.window.document.getElementById(this.options.canvas)),this.width=this.canvas.width,this.height=this.canvas.height,this._hasInvalidDimensions()?this.fire(new o.ErrorEvent(new Error("Canvas dimensions cannot be less than or equal to zero."))):(this.play=function(){this._playing=!0,this.map.triggerRepaint()},this.pause=function(){this._playing&&(this.prepare(),this._playing=!1)},this._finishLoading())},d.prototype.getCanvas=function(){return this.canvas},d.prototype.onAdd=function(p){this.map=p,this.load(),this.canvas&&this.animate&&this.play()},d.prototype.onRemove=function(){this.pause()},d.prototype.prepare=function(){var p=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,p=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,p=!0),!this._hasInvalidDimensions()&&Object.keys(this.tiles).length!==0){var y=this.map.painter.context,S=y.gl;for(var P in this.boundsBuffer||(this.boundsBuffer=y.createVertexBuffer(this._boundsArray,be.members)),this.boundsSegments||(this.boundsSegments=o.SegmentVector.simpleSegment(0,0,4,2)),this.texture?(p||this._playing)&&this.texture.update(this.canvas,{premultiply:!0}):this.texture=new o.Texture(y,this.canvas,S.RGBA,{premultiply:!0}),this.tiles){var M=this.tiles[P];M.state!=="loaded"&&(M.state="loaded",M.texture=this.texture)}}},d.prototype.serialize=function(){return{type:"canvas",coordinates:this.coordinates}},d.prototype.hasTransition=function(){return this._playing},d.prototype._hasInvalidDimensions=function(){for(var p=0,y=[this.canvas.width,this.canvas.height];p<y.length;p+=1){var S=y[p];if(isNaN(S)||S<=0)return!0}return!1},d}(De),Jn={vector:Yt,raster:te,"raster-dem":ve,geojson:Wt,video:Fn,image:De,canvas:ar};function Ar(h,d){var p=o.identity([]);return o.translate(p,p,[1,1,0]),o.scale(p,p,[.5*h.width,.5*h.height,1]),o.multiply(p,p,h.calculatePosMatrix(d.toUnwrapped()))}function cr(h,d,p,y,S,P){var M=function(Ct,gt,It){if(Ct)for(var Lt=0,jt=Ct;Lt<jt.length;Lt+=1){var ne=gt[jt[Lt]];if(ne&&ne.source===It&&ne.type==="fill-extrusion")return!0}else for(var Jt in gt){var ae=gt[Jt];if(ae.source===It&&ae.type==="fill-extrusion")return!0}return!1}(S&&S.layers,d,h.id),N=P.maxPitchScaleFactor(),q=h.tilesIn(y,N,M);q.sort(Fi);for(var X=[],it=0,st=q;it<st.length;it+=1){var ct=st[it];X.push({wrappedTileID:ct.tileID.wrapped().key,queryResults:ct.tile.queryRenderedFeatures(d,p,h._state,ct.queryGeometry,ct.cameraQueryGeometry,ct.scale,S,P,N,Ar(h.transform,ct.tileID))})}var xt=function(Ct){for(var gt={},It={},Lt=0,jt=Ct;Lt<jt.length;Lt+=1){var ne=jt[Lt],Jt=ne.queryResults,ae=ne.wrappedTileID,ge=It[ae]=It[ae]||{};for(var we in Jt)for(var Te=Jt[we],je=ge[we]=ge[we]||{},an=gt[we]=gt[we]||[],_n=0,vn=Te;_n<vn.length;_n+=1){var Ir=vn[_n];je[Ir.featureIndex]||(je[Ir.featureIndex]=!0,an.push(Ir))}}return gt}(X);for(var yt in xt)xt[yt].forEach(function(Ct){var gt=Ct.feature,It=h.getFeatureState(gt.layer["source-layer"],gt.id);gt.source=gt.layer.source,gt.layer["source-layer"]&&(gt.sourceLayer=gt.layer["source-layer"]),gt.state=It});return xt}function Fi(h,d){var p=h.tileID,y=d.tileID;return p.overscaledZ-y.overscaledZ||p.canonical.y-y.canonical.y||p.wrap-y.wrap||p.canonical.x-y.canonical.x}var fr=function(h,d){this.max=h,this.onRemove=d,this.reset()};fr.prototype.reset=function(){for(var h in this.data)for(var d=0,p=this.data[h];d<p.length;d+=1){var y=p[d];y.timeout&&clearTimeout(y.timeout),this.onRemove(y.value)}return this.data={},this.order=[],this},fr.prototype.add=function(h,d,p){var y=this,S=h.wrapped().key;this.data[S]===void 0&&(this.data[S]=[]);var P={value:d,timeout:void 0};if(p!==void 0&&(P.timeout=setTimeout(function(){y.remove(h,P)},p)),this.data[S].push(P),this.order.push(S),this.order.length>this.max){var M=this._getAndRemoveByKey(this.order[0]);M&&this.onRemove(M)}return this},fr.prototype.has=function(h){return h.wrapped().key in this.data},fr.prototype.getAndRemove=function(h){return this.has(h)?this._getAndRemoveByKey(h.wrapped().key):null},fr.prototype._getAndRemoveByKey=function(h){var d=this.data[h].shift();return d.timeout&&clearTimeout(d.timeout),this.data[h].length===0&&delete this.data[h],this.order.splice(this.order.indexOf(h),1),d.value},fr.prototype.getByKey=function(h){var d=this.data[h];return d?d[0].value:null},fr.prototype.get=function(h){return this.has(h)?this.data[h.wrapped().key][0].value:null},fr.prototype.remove=function(h,d){if(!this.has(h))return this;var p=h.wrapped().key,y=d===void 0?0:this.data[p].indexOf(d),S=this.data[p][y];return this.data[p].splice(y,1),S.timeout&&clearTimeout(S.timeout),this.data[p].length===0&&delete this.data[p],this.onRemove(S.value),this.order.splice(this.order.indexOf(p),1),this},fr.prototype.setMaxSize=function(h){for(this.max=h;this.order.length>this.max;){var d=this._getAndRemoveByKey(this.order[0]);d&&this.onRemove(d)}return this},fr.prototype.filter=function(h){var d=[];for(var p in this.data)for(var y=0,S=this.data[p];y<S.length;y+=1){var P=S[y];h(P.value)||d.push(P)}for(var M=0,N=d;M<N.length;M+=1){var q=N[M];this.remove(q.value.tileID,q)}};var _a=function(h,d,p){this.context=h;var y=h.gl;this.buffer=y.createBuffer(),this.dynamicDraw=Boolean(p),this.context.unbindVAO(),h.bindElementBuffer.set(this.buffer),y.bufferData(y.ELEMENT_ARRAY_BUFFER,d.arrayBuffer,this.dynamicDraw?y.DYNAMIC_DRAW:y.STATIC_DRAW),this.dynamicDraw||delete d.arrayBuffer};_a.prototype.bind=function(){this.context.bindElementBuffer.set(this.buffer)},_a.prototype.updateData=function(h){var d=this.context.gl;this.context.unbindVAO(),this.bind(),d.bufferSubData(d.ELEMENT_ARRAY_BUFFER,0,h.arrayBuffer)},_a.prototype.destroy=function(){this.buffer&&(this.context.gl.deleteBuffer(this.buffer),delete this.buffer)};var Is={Int8:"BYTE",Uint8:"UNSIGNED_BYTE",Int16:"SHORT",Uint16:"UNSIGNED_SHORT",Int32:"INT",Uint32:"UNSIGNED_INT",Float32:"FLOAT"},Gi=function(h,d,p,y){this.length=d.length,this.attributes=p,this.itemSize=d.bytesPerElement,this.dynamicDraw=y,this.context=h;var S=h.gl;this.buffer=S.createBuffer(),h.bindVertexBuffer.set(this.buffer),S.bufferData(S.ARRAY_BUFFER,d.arrayBuffer,this.dynamicDraw?S.DYNAMIC_DRAW:S.STATIC_DRAW),this.dynamicDraw||delete d.arrayBuffer};Gi.prototype.bind=function(){this.context.bindVertexBuffer.set(this.buffer)},Gi.prototype.updateData=function(h){var d=this.context.gl;this.bind(),d.bufferSubData(d.ARRAY_BUFFER,0,h.arrayBuffer)},Gi.prototype.enableAttributes=function(h,d){for(var p=0;p<this.attributes.length;p++){var y=d.attributes[this.attributes[p].name];y!==void 0&&h.enableVertexAttribArray(y)}},Gi.prototype.setVertexAttribPointers=function(h,d,p){for(var y=0;y<this.attributes.length;y++){var S=this.attributes[y],P=d.attributes[S.name];P!==void 0&&h.vertexAttribPointer(P,S.components,h[Is[S.type]],!1,this.itemSize,S.offset+this.itemSize*(p||0))}},Gi.prototype.destroy=function(){this.buffer&&(this.context.gl.deleteBuffer(this.buffer),delete this.buffer)};var jn=function(h){this.gl=h.gl,this.default=this.getDefault(),this.current=this.default,this.dirty=!1};jn.prototype.get=function(){return this.current},jn.prototype.set=function(h){},jn.prototype.getDefault=function(){return this.default},jn.prototype.setDefault=function(){this.set(this.default)};var bi=function(h){function d(){h.apply(this,arguments)}return h&&(d.__proto__=h),(d.prototype=Object.create(h&&h.prototype)).constructor=d,d.prototype.getDefault=function(){return o.Color.transparent},d.prototype.set=function(p){var y=this.current;(p.r!==y.r||p.g!==y.g||p.b!==y.b||p.a!==y.a||this.dirty)&&(this.gl.clearColor(p.r,p.g,p.b,p.a),this.current=p,this.dirty=!1)},d}(jn),ni=function(h){function d(){h.apply(this,arguments)}return h&&(d.__proto__=h),(d.prototype=Object.create(h&&h.prototype)).constructor=d,d.prototype.getDefault=function(){return 1},d.prototype.set=function(p){(p!==this.current||this.dirty)&&(this.gl.clearDepth(p),this.current=p,this.dirty=!1)},d}(jn),Wi=function(h){function d(){h.apply(this,arguments)}return h&&(d.__proto__=h),(d.prototype=Object.create(h&&h.prototype)).constructor=d,d.prototype.getDefault=function(){return 0},d.prototype.set=function(p){(p!==this.current||this.dirty)&&(this.gl.clearStencil(p),this.current=p,this.dirty=!1)},d}(jn),xa=function(h){function d(){h.apply(this,arguments)}return h&&(d.__proto__=h),(d.prototype=Object.create(h&&h.prototype)).constructor=d,d.prototype.getDefault=function(){return[!0,!0,!0,!0]},d.prototype.set=function(p){var y=this.current;(p[0]!==y[0]||p[1]!==y[1]||p[2]!==y[2]||p[3]!==y[3]||this.dirty)&&(this.gl.colorMask(p[0],p[1],p[2],p[3]),this.current=p,this.dirty=!1)},d}(jn),ba=function(h){function d(){h.apply(this,arguments)}return h&&(d.__proto__=h),(d.prototype=Object.create(h&&h.prototype)).constructor=d,d.prototype.getDefault=function(){return!0},d.prototype.set=function(p){(p!==this.current||this.dirty)&&(this.gl.depthMask(p),this.current=p,this.dirty=!1)},d}(jn),ss=function(h){function d(){h.apply(this,arguments)}return h&&(d.__proto__=h),(d.prototype=Object.create(h&&h.prototype)).constructor=d,d.prototype.getDefault=function(){return 255},d.prototype.set=function(p){(p!==this.current||this.dirty)&&(this.gl.stencilMask(p),this.current=p,this.dirty=!1)},d}(jn),ri=function(h){function d(){h.apply(this,arguments)}return h&&(d.__proto__=h),(d.prototype=Object.create(h&&h.prototype)).constructor=d,d.prototype.getDefault=function(){return{func:this.gl.ALWAYS,ref:0,mask:255}},d.prototype.set=function(p){var y=this.current;(p.func!==y.func||p.ref!==y.ref||p.mask!==y.mask||this.dirty)&&(this.gl.stencilFunc(p.func,p.ref,p.mask),this.current=p,this.dirty=!1)},d}(jn),qo=function(h){function d(){h.apply(this,arguments)}return h&&(d.__proto__=h),(d.prototype=Object.create(h&&h.prototype)).constructor=d,d.prototype.getDefault=function(){var p=this.gl;return[p.KEEP,p.KEEP,p.KEEP]},d.prototype.set=function(p){var y=this.current;(p[0]!==y[0]||p[1]!==y[1]||p[2]!==y[2]||this.dirty)&&(this.gl.stencilOp(p[0],p[1],p[2]),this.current=p,this.dirty=!1)},d}(jn),Et=function(h){function d(){h.apply(this,arguments)}return h&&(d.__proto__=h),(d.prototype=Object.create(h&&h.prototype)).constructor=d,d.prototype.getDefault=function(){return!1},d.prototype.set=function(p){if(p!==this.current||this.dirty){var y=this.gl;p?y.enable(y.STENCIL_TEST):y.disable(y.STENCIL_TEST),this.current=p,this.dirty=!1}},d}(jn),pt=function(h){function d(){h.apply(this,arguments)}return h&&(d.__proto__=h),(d.prototype=Object.create(h&&h.prototype)).constructor=d,d.prototype.getDefault=function(){return[0,1]},d.prototype.set=function(p){var y=this.current;(p[0]!==y[0]||p[1]!==y[1]||this.dirty)&&(this.gl.depthRange(p[0],p[1]),this.current=p,this.dirty=!1)},d}(jn),Ve=function(h){function d(){h.apply(this,arguments)}return h&&(d.__proto__=h),(d.prototype=Object.create(h&&h.prototype)).constructor=d,d.prototype.getDefault=function(){return!1},d.prototype.set=function(p){if(p!==this.current||this.dirty){var y=this.gl;p?y.enable(y.DEPTH_TEST):y.disable(y.DEPTH_TEST),this.current=p,this.dirty=!1}},d}(jn),We=function(h){function d(){h.apply(this,arguments)}return h&&(d.__proto__=h),(d.prototype=Object.create(h&&h.prototype)).constructor=d,d.prototype.getDefault=function(){return this.gl.LESS},d.prototype.set=function(p){(p!==this.current||this.dirty)&&(this.gl.depthFunc(p),this.current=p,this.dirty=!1)},d}(jn),Xn=function(h){function d(){h.apply(this,arguments)}return h&&(d.__proto__=h),(d.prototype=Object.create(h&&h.prototype)).constructor=d,d.prototype.getDefault=function(){return!1},d.prototype.set=function(p){if(p!==this.current||this.dirty){var y=this.gl;p?y.enable(y.BLEND):y.disable(y.BLEND),this.current=p,this.dirty=!1}},d}(jn),Br=function(h){function d(){h.apply(this,arguments)}return h&&(d.__proto__=h),(d.prototype=Object.create(h&&h.prototype)).constructor=d,d.prototype.getDefault=function(){var p=this.gl;return[p.ONE,p.ZERO]},d.prototype.set=function(p){var y=this.current;(p[0]!==y[0]||p[1]!==y[1]||this.dirty)&&(this.gl.blendFunc(p[0],p[1]),this.current=p,this.dirty=!1)},d}(jn),sr=function(h){function d(){h.apply(this,arguments)}return h&&(d.__proto__=h),(d.prototype=Object.create(h&&h.prototype)).constructor=d,d.prototype.getDefault=function(){return o.Color.transparent},d.prototype.set=function(p){var y=this.current;(p.r!==y.r||p.g!==y.g||p.b!==y.b||p.a!==y.a||this.dirty)&&(this.gl.blendColor(p.r,p.g,p.b,p.a),this.current=p,this.dirty=!1)},d}(jn),Ai=function(h){function d(){h.apply(this,arguments)}return h&&(d.__proto__=h),(d.prototype=Object.create(h&&h.prototype)).constructor=d,d.prototype.getDefault=function(){return this.gl.FUNC_ADD},d.prototype.set=function(p){(p!==this.current||this.dirty)&&(this.gl.blendEquation(p),this.current=p,this.dirty=!1)},d}(jn),Un=function(h){function d(){h.apply(this,arguments)}return h&&(d.__proto__=h),(d.prototype=Object.create(h&&h.prototype)).constructor=d,d.prototype.getDefault=function(){return!1},d.prototype.set=function(p){if(p!==this.current||this.dirty){var y=this.gl;p?y.enable(y.CULL_FACE):y.disable(y.CULL_FACE),this.current=p,this.dirty=!1}},d}(jn),no=function(h){function d(){h.apply(this,arguments)}return h&&(d.__proto__=h),(d.prototype=Object.create(h&&h.prototype)).constructor=d,d.prototype.getDefault=function(){return this.gl.BACK},d.prototype.set=function(p){(p!==this.current||this.dirty)&&(this.gl.cullFace(p),this.current=p,this.dirty=!1)},d}(jn),To=function(h){function d(){h.apply(this,arguments)}return h&&(d.__proto__=h),(d.prototype=Object.create(h&&h.prototype)).constructor=d,d.prototype.getDefault=function(){return this.gl.CCW},d.prototype.set=function(p){(p!==this.current||this.dirty)&&(this.gl.frontFace(p),this.current=p,this.dirty=!1)},d}(jn),zi=function(h){function d(){h.apply(this,arguments)}return h&&(d.__proto__=h),(d.prototype=Object.create(h&&h.prototype)).constructor=d,d.prototype.getDefault=function(){return null},d.prototype.set=function(p){(p!==this.current||this.dirty)&&(this.gl.useProgram(p),this.current=p,this.dirty=!1)},d}(jn),ii=function(h){function d(){h.apply(this,arguments)}return h&&(d.__proto__=h),(d.prototype=Object.create(h&&h.prototype)).constructor=d,d.prototype.getDefault=function(){return this.gl.TEXTURE0},d.prototype.set=function(p){(p!==this.current||this.dirty)&&(this.gl.activeTexture(p),this.current=p,this.dirty=!1)},d}(jn),Go=function(h){function d(){h.apply(this,arguments)}return h&&(d.__proto__=h),(d.prototype=Object.create(h&&h.prototype)).constructor=d,d.prototype.getDefault=function(){var p=this.gl;return[0,0,p.drawingBufferWidth,p.drawingBufferHeight]},d.prototype.set=function(p){var y=this.current;(p[0]!==y[0]||p[1]!==y[1]||p[2]!==y[2]||p[3]!==y[3]||this.dirty)&&(this.gl.viewport(p[0],p[1],p[2],p[3]),this.current=p,this.dirty=!1)},d}(jn),yr=function(h){function d(){h.apply(this,arguments)}return h&&(d.__proto__=h),(d.prototype=Object.create(h&&h.prototype)).constructor=d,d.prototype.getDefault=function(){return null},d.prototype.set=function(p){if(p!==this.current||this.dirty){var y=this.gl;y.bindFramebuffer(y.FRAMEBUFFER,p),this.current=p,this.dirty=!1}},d}(jn),Rn=function(h){function d(){h.apply(this,arguments)}return h&&(d.__proto__=h),(d.prototype=Object.create(h&&h.prototype)).constructor=d,d.prototype.getDefault=function(){return null},d.prototype.set=function(p){if(p!==this.current||this.dirty){var y=this.gl;y.bindRenderbuffer(y.RENDERBUFFER,p),this.current=p,this.dirty=!1}},d}(jn),yl=function(h){function d(){h.apply(this,arguments)}return h&&(d.__proto__=h),(d.prototype=Object.create(h&&h.prototype)).constructor=d,d.prototype.getDefault=function(){return null},d.prototype.set=function(p){if(p!==this.current||this.dirty){var y=this.gl;y.bindTexture(y.TEXTURE_2D,p),this.current=p,this.dirty=!1}},d}(jn),us=function(h){function d(){h.apply(this,arguments)}return h&&(d.__proto__=h),(d.prototype=Object.create(h&&h.prototype)).constructor=d,d.prototype.getDefault=function(){return null},d.prototype.set=function(p){if(p!==this.current||this.dirty){var y=this.gl;y.bindBuffer(y.ARRAY_BUFFER,p),this.current=p,this.dirty=!1}},d}(jn),Vs=function(h){function d(){h.apply(this,arguments)}return h&&(d.__proto__=h),(d.prototype=Object.create(h&&h.prototype)).constructor=d,d.prototype.getDefault=function(){return null},d.prototype.set=function(p){var y=this.gl;y.bindBuffer(y.ELEMENT_ARRAY_BUFFER,p),this.current=p,this.dirty=!1},d}(jn),Mo=function(h){function d(p){h.call(this,p),this.vao=p.extVertexArrayObject}return h&&(d.__proto__=h),(d.prototype=Object.create(h&&h.prototype)).constructor=d,d.prototype.getDefault=function(){return null},d.prototype.set=function(p){this.vao&&(p!==this.current||this.dirty)&&(this.vao.bindVertexArrayOES(p),this.current=p,this.dirty=!1)},d}(jn),qa=function(h){function d(){h.apply(this,arguments)}return h&&(d.__proto__=h),(d.prototype=Object.create(h&&h.prototype)).constructor=d,d.prototype.getDefault=function(){return 4},d.prototype.set=function(p){if(p!==this.current||this.dirty){var y=this.gl;y.pixelStorei(y.UNPACK_ALIGNMENT,p),this.current=p,this.dirty=!1}},d}(jn),Ur=function(h){function d(){h.apply(this,arguments)}return h&&(d.__proto__=h),(d.prototype=Object.create(h&&h.prototype)).constructor=d,d.prototype.getDefault=function(){return!1},d.prototype.set=function(p){if(p!==this.current||this.dirty){var y=this.gl;y.pixelStorei(y.UNPACK_PREMULTIPLY_ALPHA_WEBGL,p),this.current=p,this.dirty=!1}},d}(jn),Yl=function(h){function d(){h.apply(this,arguments)}return h&&(d.__proto__=h),(d.prototype=Object.create(h&&h.prototype)).constructor=d,d.prototype.getDefault=function(){return!1},d.prototype.set=function(p){if(p!==this.current||this.dirty){var y=this.gl;y.pixelStorei(y.UNPACK_FLIP_Y_WEBGL,p),this.current=p,this.dirty=!1}},d}(jn),Vr=function(h){function d(p,y){h.call(this,p),this.context=p,this.parent=y}return h&&(d.__proto__=h),(d.prototype=Object.create(h&&h.prototype)).constructor=d,d.prototype.getDefault=function(){return null},d}(jn),W=function(h){function d(){h.apply(this,arguments)}return h&&(d.__proto__=h),(d.prototype=Object.create(h&&h.prototype)).constructor=d,d.prototype.setDirty=function(){this.dirty=!0},d.prototype.set=function(p){if(p!==this.current||this.dirty){this.context.bindFramebuffer.set(this.parent);var y=this.gl;y.framebufferTexture2D(y.FRAMEBUFFER,y.COLOR_ATTACHMENT0,y.TEXTURE_2D,p,0),this.current=p,this.dirty=!1}},d}(Vr),Y=function(h){function d(){h.apply(this,arguments)}return h&&(d.__proto__=h),(d.prototype=Object.create(h&&h.prototype)).constructor=d,d.prototype.set=function(p){if(p!==this.current||this.dirty){this.context.bindFramebuffer.set(this.parent);var y=this.gl;y.framebufferRenderbuffer(y.FRAMEBUFFER,y.DEPTH_ATTACHMENT,y.RENDERBUFFER,p),this.current=p,this.dirty=!1}},d}(Vr),nt=function(h,d,p,y){this.context=h,this.width=d,this.height=p;var S=this.framebuffer=h.gl.createFramebuffer();this.colorAttachment=new W(h,S),y&&(this.depthAttachment=new Y(h,S))};nt.prototype.destroy=function(){var h=this.context.gl,d=this.colorAttachment.get();if(d&&h.deleteTexture(d),this.depthAttachment){var p=this.depthAttachment.get();p&&h.deleteRenderbuffer(p)}h.deleteFramebuffer(this.framebuffer)};var lt=function(h,d,p){this.func=h,this.mask=d,this.range=p};lt.ReadOnly=!1,lt.ReadWrite=!0,lt.disabled=new lt(519,lt.ReadOnly,[0,1]);var vt=function(h,d,p,y,S,P){this.test=h,this.ref=d,this.mask=p,this.fail=y,this.depthFail=S,this.pass=P};vt.disabled=new vt({func:519,mask:0},0,0,7680,7680,7680);var Mt=function(h,d,p){this.blendFunction=h,this.blendColor=d,this.mask=p};Mt.disabled=new Mt(Mt.Replace=[1,0],o.Color.transparent,[!1,!1,!1,!1]),Mt.unblended=new Mt(Mt.Replace,o.Color.transparent,[!0,!0,!0,!0]),Mt.alphaBlended=new Mt([1,771],o.Color.transparent,[!0,!0,!0,!0]);var Rt=function(h,d,p){this.enable=h,this.mode=d,this.frontFace=p};Rt.disabled=new Rt(!1,1029,2305),Rt.backCCW=new Rt(!0,1029,2305);var at=function(h){this.gl=h,this.extVertexArrayObject=this.gl.getExtension("OES_vertex_array_object"),this.clearColor=new bi(this),this.clearDepth=new ni(this),this.clearStencil=new Wi(this),this.colorMask=new xa(this),this.depthMask=new ba(this),this.stencilMask=new ss(this),this.stencilFunc=new ri(this),this.stencilOp=new qo(this),this.stencilTest=new Et(this),this.depthRange=new pt(this),this.depthTest=new Ve(this),this.depthFunc=new We(this),this.blend=new Xn(this),this.blendFunc=new Br(this),this.blendColor=new sr(this),this.blendEquation=new Ai(this),this.cullFace=new Un(this),this.cullFaceSide=new no(this),this.frontFace=new To(this),this.program=new zi(this),this.activeTexture=new ii(this),this.viewport=new Go(this),this.bindFramebuffer=new yr(this),this.bindRenderbuffer=new Rn(this),this.bindTexture=new yl(this),this.bindVertexBuffer=new us(this),this.bindElementBuffer=new Vs(this),this.bindVertexArrayOES=this.extVertexArrayObject&&new Mo(this),this.pixelStoreUnpack=new qa(this),this.pixelStoreUnpackPremultiplyAlpha=new Ur(this),this.pixelStoreUnpackFlipY=new Yl(this),this.extTextureFilterAnisotropic=h.getExtension("EXT_texture_filter_anisotropic")||h.getExtension("MOZ_EXT_texture_filter_anisotropic")||h.getExtension("WEBKIT_EXT_texture_filter_anisotropic"),this.extTextureFilterAnisotropic&&(this.extTextureFilterAnisotropicMax=h.getParameter(this.extTextureFilterAnisotropic.MAX_TEXTURE_MAX_ANISOTROPY_EXT)),this.extTextureHalfFloat=h.getExtension("OES_texture_half_float"),this.extTextureHalfFloat&&(h.getExtension("OES_texture_half_float_linear"),this.extRenderToTextureHalfFloat=h.getExtension("EXT_color_buffer_half_float")),this.extTimerQuery=h.getExtension("EXT_disjoint_timer_query"),this.maxTextureSize=h.getParameter(h.MAX_TEXTURE_SIZE)};at.prototype.setDefault=function(){this.unbindVAO(),this.clearColor.setDefault(),this.clearDepth.setDefault(),this.clearStencil.setDefault(),this.colorMask.setDefault(),this.depthMask.setDefault(),this.stencilMask.setDefault(),this.stencilFunc.setDefault(),this.stencilOp.setDefault(),this.stencilTest.setDefault(),this.depthRange.setDefault(),this.depthTest.setDefault(),this.depthFunc.setDefault(),this.blend.setDefault(),this.blendFunc.setDefault(),this.blendColor.setDefault(),this.blendEquation.setDefault(),this.cullFace.setDefault(),this.cullFaceSide.setDefault(),this.frontFace.setDefault(),this.program.setDefault(),this.activeTexture.setDefault(),this.bindFramebuffer.setDefault(),this.pixelStoreUnpack.setDefault(),this.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.pixelStoreUnpackFlipY.setDefault()},at.prototype.setDirty=function(){this.clearColor.dirty=!0,this.clearDepth.dirty=!0,this.clearStencil.dirty=!0,this.colorMask.dirty=!0,this.depthMask.dirty=!0,this.stencilMask.dirty=!0,this.stencilFunc.dirty=!0,this.stencilOp.dirty=!0,this.stencilTest.dirty=!0,this.depthRange.dirty=!0,this.depthTest.dirty=!0,this.depthFunc.dirty=!0,this.blend.dirty=!0,this.blendFunc.dirty=!0,this.blendColor.dirty=!0,this.blendEquation.dirty=!0,this.cullFace.dirty=!0,this.cullFaceSide.dirty=!0,this.frontFace.dirty=!0,this.program.dirty=!0,this.activeTexture.dirty=!0,this.viewport.dirty=!0,this.bindFramebuffer.dirty=!0,this.bindRenderbuffer.dirty=!0,this.bindTexture.dirty=!0,this.bindVertexBuffer.dirty=!0,this.bindElementBuffer.dirty=!0,this.extVertexArrayObject&&(this.bindVertexArrayOES.dirty=!0),this.pixelStoreUnpack.dirty=!0,this.pixelStoreUnpackPremultiplyAlpha.dirty=!0,this.pixelStoreUnpackFlipY.dirty=!0},at.prototype.createIndexBuffer=function(h,d){return new _a(this,h,d)},at.prototype.createVertexBuffer=function(h,d,p){return new Gi(this,h,d,p)},at.prototype.createRenderbuffer=function(h,d,p){var y=this.gl,S=y.createRenderbuffer();return this.bindRenderbuffer.set(S),y.renderbufferStorage(y.RENDERBUFFER,h,d,p),this.bindRenderbuffer.set(null),S},at.prototype.createFramebuffer=function(h,d,p){return new nt(this,h,d,p)},at.prototype.clear=function(h){var d=h.color,p=h.depth,y=this.gl,S=0;d&&(S|=y.COLOR_BUFFER_BIT,this.clearColor.set(d),this.colorMask.set([!0,!0,!0,!0])),p!==void 0&&(S|=y.DEPTH_BUFFER_BIT,this.depthRange.set([0,1]),this.clearDepth.set(p),this.depthMask.set(!0)),y.clear(S)},at.prototype.setCullFace=function(h){h.enable===!1?this.cullFace.set(!1):(this.cullFace.set(!0),this.cullFaceSide.set(h.mode),this.frontFace.set(h.frontFace))},at.prototype.setDepthMode=function(h){h.func!==this.gl.ALWAYS||h.mask?(this.depthTest.set(!0),this.depthFunc.set(h.func),this.depthMask.set(h.mask),this.depthRange.set(h.range)):this.depthTest.set(!1)},at.prototype.setStencilMode=function(h){h.test.func!==this.gl.ALWAYS||h.mask?(this.stencilTest.set(!0),this.stencilMask.set(h.mask),this.stencilOp.set([h.fail,h.depthFail,h.pass]),this.stencilFunc.set({func:h.test.func,ref:h.ref,mask:h.test.mask})):this.stencilTest.set(!1)},at.prototype.setColorMode=function(h){o.deepEqual(h.blendFunction,Mt.Replace)?this.blend.set(!1):(this.blend.set(!0),this.blendFunc.set(h.blendFunction),this.blendColor.set(h.blendColor)),this.colorMask.set(h.mask)},at.prototype.unbindVAO=function(){this.extVertexArrayObject&&this.bindVertexArrayOES.set(null)};var bt=function(h){function d(p,y,S){var P=this;h.call(this),this.id=p,this.dispatcher=S,this.on("data",function(M){M.dataType==="source"&&M.sourceDataType==="metadata"&&(P._sourceLoaded=!0),P._sourceLoaded&&!P._paused&&M.dataType==="source"&&M.sourceDataType==="content"&&(P.reload(),P.transform&&P.update(P.transform))}),this.on("error",function(){P._sourceErrored=!0}),this._source=function(M,N,q,X){var it=new Jn[N.type](M,N,q,X);if(it.id!==M)throw new Error("Expected Source id to be "+M+" instead of "+it.id);return o.bindAll(["load","abort","unload","serialize","prepare"],it),it}(p,y,S,this),this._tiles={},this._cache=new fr(0,this._unloadTile.bind(this)),this._timers={},this._cacheTimers={},this._maxTileCacheSize=null,this._loadedParentTiles={},this._coveredTiles={},this._state=new o.SourceFeatureState}return h&&(d.__proto__=h),(d.prototype=Object.create(h&&h.prototype)).constructor=d,d.prototype.onAdd=function(p){this.map=p,this._maxTileCacheSize=p?p._maxTileCacheSize:null,this._source&&this._source.onAdd&&this._source.onAdd(p)},d.prototype.onRemove=function(p){this._source&&this._source.onRemove&&this._source.onRemove(p)},d.prototype.loaded=function(){if(this._sourceErrored)return!0;if(!this._sourceLoaded||!this._source.loaded())return!1;for(var p in this._tiles){var y=this._tiles[p];if(y.state!=="loaded"&&y.state!=="errored")return!1}return!0},d.prototype.getSource=function(){return this._source},d.prototype.pause=function(){this._paused=!0},d.prototype.resume=function(){if(this._paused){var p=this._shouldReloadOnResume;this._paused=!1,this._shouldReloadOnResume=!1,p&&this.reload(),this.transform&&this.update(this.transform)}},d.prototype._loadTile=function(p,y){return this._source.loadTile(p,y)},d.prototype._unloadTile=function(p){if(this._source.unloadTile)return this._source.unloadTile(p,function(){})},d.prototype._abortTile=function(p){if(this._source.abortTile)return this._source.abortTile(p,function(){})},d.prototype.serialize=function(){return this._source.serialize()},d.prototype.prepare=function(p){for(var y in this._source.prepare&&this._source.prepare(),this._state.coalesceChanges(this._tiles,this.map?this.map.painter:null),this._tiles){var S=this._tiles[y];S.upload(p),S.prepare(this.map.style.imageManager)}},d.prototype.getIds=function(){return o.values(this._tiles).map(function(p){return p.tileID}).sort(Vt).map(function(p){return p.key})},d.prototype.getRenderableIds=function(p){var y=this,S=[];for(var P in this._tiles)this._isIdRenderable(P,p)&&S.push(this._tiles[P]);return p?S.sort(function(M,N){var q=M.tileID,X=N.tileID,it=new o.Point(q.canonical.x,q.canonical.y)._rotate(y.transform.angle),st=new o.Point(X.canonical.x,X.canonical.y)._rotate(y.transform.angle);return q.overscaledZ-X.overscaledZ||st.y-it.y||st.x-it.x}).map(function(M){return M.tileID.key}):S.map(function(M){return M.tileID}).sort(Vt).map(function(M){return M.key})},d.prototype.hasRenderableParent=function(p){var y=this.findLoadedParent(p,0);return!!y&&this._isIdRenderable(y.tileID.key)},d.prototype._isIdRenderable=function(p,y){return this._tiles[p]&&this._tiles[p].hasData()&&!this._coveredTiles[p]&&(y||!this._tiles[p].holdingForFade())},d.prototype.reload=function(){if(this._paused)this._shouldReloadOnResume=!0;else for(var p in this._cache.reset(),this._tiles)this._tiles[p].state!=="errored"&&this._reloadTile(p,"reloading")},d.prototype._reloadTile=function(p,y){var S=this._tiles[p];S&&(S.state!=="loading"&&(S.state=y),this._loadTile(S,this._tileLoaded.bind(this,S,p,y)))},d.prototype._tileLoaded=function(p,y,S,P){if(P)return p.state="errored",void(P.status!==404?this._source.fire(new o.ErrorEvent(P,{tile:p})):this.update(this.transform));p.timeAdded=o.browser.now(),S==="expired"&&(p.refreshedUponExpiration=!0),this._setTileReloadTimer(y,p),this.getSource().type==="raster-dem"&&p.dem&&this._backfillDEM(p),this._state.initializeTileState(p,this.map?this.map.painter:null),this._source.fire(new o.Event("data",{dataType:"source",tile:p,coord:p.tileID}))},d.prototype._backfillDEM=function(p){for(var y=this.getRenderableIds(),S=0;S<y.length;S++){var P=y[S];if(p.neighboringTiles&&p.neighboringTiles[P]){var M=this.getTileByID(P);N(p,M),N(M,p)}}function N(q,X){q.needsHillshadePrepare=!0;var it=X.tileID.canonical.x-q.tileID.canonical.x,st=X.tileID.canonical.y-q.tileID.canonical.y,ct=Math.pow(2,q.tileID.canonical.z),xt=X.tileID.key;it===0&&st===0||Math.abs(st)>1||(Math.abs(it)>1&&(Math.abs(it+ct)===1?it+=ct:Math.abs(it-ct)===1&&(it-=ct)),X.dem&&q.dem&&(q.dem.backfillBorder(X.dem,it,st),q.neighboringTiles&&q.neighboringTiles[xt]&&(q.neighboringTiles[xt].backfilled=!0)))}},d.prototype.getTile=function(p){return this.getTileByID(p.key)},d.prototype.getTileByID=function(p){return this._tiles[p]},d.prototype._retainLoadedChildren=function(p,y,S,P){for(var M in this._tiles){var N=this._tiles[M];if(!(P[M]||!N.hasData()||N.tileID.overscaledZ<=y||N.tileID.overscaledZ>S)){for(var q=N.tileID;N&&N.tileID.overscaledZ>y+1;){var X=N.tileID.scaledTo(N.tileID.overscaledZ-1);(N=this._tiles[X.key])&&N.hasData()&&(q=X)}for(var it=q;it.overscaledZ>y;)if(p[(it=it.scaledTo(it.overscaledZ-1)).key]){P[q.key]=q;break}}}},d.prototype.findLoadedParent=function(p,y){if(p.key in this._loadedParentTiles){var S=this._loadedParentTiles[p.key];return S&&S.tileID.overscaledZ>=y?S:null}for(var P=p.overscaledZ-1;P>=y;P--){var M=p.scaledTo(P),N=this._getLoadedTile(M);if(N)return N}},d.prototype._getLoadedTile=function(p){var y=this._tiles[p.key];return y&&y.hasData()?y:this._cache.getByKey(p.wrapped().key)},d.prototype.updateCacheSize=function(p){var y=Math.ceil(p.width/this._source.tileSize)+1,S=Math.ceil(p.height/this._source.tileSize)+1,P=Math.floor(y*S*5),M=typeof this._maxTileCacheSize=="number"?Math.min(this._maxTileCacheSize,P):P;this._cache.setMaxSize(M)},d.prototype.handleWrapJump=function(p){var y=Math.round((p-(this._prevLng===void 0?p:this._prevLng))/360);if(this._prevLng=p,y){var S={};for(var P in this._tiles){var M=this._tiles[P];M.tileID=M.tileID.unwrapTo(M.tileID.wrap+y),S[M.tileID.key]=M}for(var N in this._tiles=S,this._timers)clearTimeout(this._timers[N]),delete this._timers[N];for(var q in this._tiles)this._setTileReloadTimer(q,this._tiles[q])}},d.prototype.update=function(p){var y=this;if(this.transform=p,this._sourceLoaded&&!this._paused){var S;this.updateCacheSize(p),this.handleWrapJump(this.transform.center.lng),this._coveredTiles={},this.used?this._source.tileID?S=p.getVisibleUnwrappedCoordinates(this._source.tileID).map(function(ge){return new o.OverscaledTileID(ge.canonical.z,ge.wrap,ge.canonical.z,ge.canonical.x,ge.canonical.y)}):(S=p.coveringTiles({tileSize:this._source.tileSize,minzoom:this._source.minzoom,maxzoom:this._source.maxzoom,roundZoom:this._source.roundZoom,reparseOverscaled:this._source.reparseOverscaled}),this._source.hasTile&&(S=S.filter(function(ge){return y._source.hasTile(ge)}))):S=[];var P=p.coveringZoomLevel(this._source),M=Math.max(P-d.maxOverzooming,this._source.minzoom),N=Math.max(P+d.maxUnderzooming,this._source.minzoom),q=this._updateRetainedTiles(S,P);if(pe(this._source.type)){for(var X={},it={},st=0,ct=Object.keys(q);st<ct.length;st+=1){var xt=ct[st],yt=q[xt],Ct=this._tiles[xt];if(Ct&&!(Ct.fadeEndTime&&Ct.fadeEndTime<=o.browser.now())){var gt=this.findLoadedParent(yt,M);gt&&(this._addTile(gt.tileID),X[gt.tileID.key]=gt.tileID),it[xt]=yt}}for(var It in this._retainLoadedChildren(it,P,N,q),X)q[It]||(this._coveredTiles[It]=!0,q[It]=X[It])}for(var Lt in q)this._tiles[Lt].clearFadeHold();for(var jt=0,ne=o.keysDifference(this._tiles,q);jt<ne.length;jt+=1){var Jt=ne[jt],ae=this._tiles[Jt];ae.hasSymbolBuckets&&!ae.holdingForFade()?ae.setHoldDuration(this.map._fadeDuration):ae.hasSymbolBuckets&&!ae.symbolFadeFinished()||this._removeTile(Jt)}this._updateLoadedParentTileCache()}},d.prototype.releaseSymbolFadeTiles=function(){for(var p in this._tiles)this._tiles[p].holdingForFade()&&this._removeTile(p)},d.prototype._updateRetainedTiles=function(p,y){for(var S={},P={},M=Math.max(y-d.maxOverzooming,this._source.minzoom),N=Math.max(y+d.maxUnderzooming,this._source.minzoom),q={},X=0,it=p;X<it.length;X+=1){var st=it[X],ct=this._addTile(st);S[st.key]=st,ct.hasData()||y<this._source.maxzoom&&(q[st.key]=st)}this._retainLoadedChildren(q,y,N,S);for(var xt=0,yt=p;xt<yt.length;xt+=1){var Ct=yt[xt],gt=this._tiles[Ct.key];if(!gt.hasData()){if(y+1>this._source.maxzoom){var It=Ct.children(this._source.maxzoom)[0],Lt=this.getTile(It);if(Lt&&Lt.hasData()){S[It.key]=It;continue}}else{var jt=Ct.children(this._source.maxzoom);if(S[jt[0].key]&&S[jt[1].key]&&S[jt[2].key]&&S[jt[3].key])continue}for(var ne=gt.wasRequested(),Jt=Ct.overscaledZ-1;Jt>=M;--Jt){var ae=Ct.scaledTo(Jt);if(P[ae.key]||(P[ae.key]=!0,!(gt=this.getTile(ae))&&ne&&(gt=this._addTile(ae)),gt&&(S[ae.key]=ae,ne=gt.wasRequested(),gt.hasData())))break}}}return S},d.prototype._updateLoadedParentTileCache=function(){for(var p in this._loadedParentTiles={},this._tiles){for(var y=[],S=void 0,P=this._tiles[p].tileID;P.overscaledZ>0;){if(P.key in this._loadedParentTiles){S=this._loadedParentTiles[P.key];break}y.push(P.key);var M=P.scaledTo(P.overscaledZ-1);if(S=this._getLoadedTile(M))break;P=M}for(var N=0,q=y;N<q.length;N+=1)this._loadedParentTiles[q[N]]=S}},d.prototype._addTile=function(p){var y=this._tiles[p.key];if(y)return y;(y=this._cache.getAndRemove(p))&&(this._setTileReloadTimer(p.key,y),y.tileID=p,this._state.initializeTileState(y,this.map?this.map.painter:null),this._cacheTimers[p.key]&&(clearTimeout(this._cacheTimers[p.key]),delete this._cacheTimers[p.key],this._setTileReloadTimer(p.key,y)));var S=Boolean(y);return S||(y=new o.Tile(p,this._source.tileSize*p.overscaleFactor()),this._loadTile(y,this._tileLoaded.bind(this,y,p.key,y.state))),y?(y.uses++,this._tiles[p.key]=y,S||this._source.fire(new o.Event("dataloading",{tile:y,coord:y.tileID,dataType:"source"})),y):null},d.prototype._setTileReloadTimer=function(p,y){var S=this;p in this._timers&&(clearTimeout(this._timers[p]),delete this._timers[p]);var P=y.getExpiryTimeout();P&&(this._timers[p]=setTimeout(function(){S._reloadTile(p,"expired"),delete S._timers[p]},P))},d.prototype._removeTile=function(p){var y=this._tiles[p];y&&(y.uses--,delete this._tiles[p],this._timers[p]&&(clearTimeout(this._timers[p]),delete this._timers[p]),y.uses>0||(y.hasData()&&y.state!=="reloading"?this._cache.add(y.tileID,y,y.getExpiryTimeout()):(y.aborted=!0,this._abortTile(y),this._unloadTile(y))))},d.prototype.clearTiles=function(){for(var p in this._shouldReloadOnResume=!1,this._paused=!1,this._tiles)this._removeTile(p);this._cache.reset()},d.prototype.tilesIn=function(p,y,S){var P=this,M=[],N=this.transform;if(!N)return M;for(var q=S?N.getCameraQueryGeometry(p):p,X=p.map(function(Jt){return N.pointCoordinate(Jt)}),it=q.map(function(Jt){return N.pointCoordinate(Jt)}),st=this.getIds(),ct=1/0,xt=1/0,yt=-1/0,Ct=-1/0,gt=0,It=it;gt<It.length;gt+=1){var Lt=It[gt];ct=Math.min(ct,Lt.x),xt=Math.min(xt,Lt.y),yt=Math.max(yt,Lt.x),Ct=Math.max(Ct,Lt.y)}for(var jt=function(Jt){var ae=P._tiles[st[Jt]];if(!ae.holdingForFade()){var ge=ae.tileID,we=Math.pow(2,N.zoom-ae.tileID.overscaledZ),Te=y*ae.queryPadding*o.EXTENT/ae.tileSize/we,je=[ge.getTilePoint(new o.MercatorCoordinate(ct,xt)),ge.getTilePoint(new o.MercatorCoordinate(yt,Ct))];if(je[0].x-Te<o.EXTENT&&je[0].y-Te<o.EXTENT&&je[1].x+Te>=0&&je[1].y+Te>=0){var an=X.map(function(vn){return ge.getTilePoint(vn)}),_n=it.map(function(vn){return ge.getTilePoint(vn)});M.push({tile:ae,tileID:ge,queryGeometry:an,cameraQueryGeometry:_n,scale:we})}}},ne=0;ne<st.length;ne++)jt(ne);return M},d.prototype.getVisibleCoordinates=function(p){for(var y=this,S=this.getRenderableIds(p).map(function(q){return y._tiles[q].tileID}),P=0,M=S;P<M.length;P+=1){var N=M[P];N.posMatrix=this.transform.calculatePosMatrix(N.toUnwrapped())}return S},d.prototype.hasTransition=function(){if(this._source.hasTransition())return!0;if(pe(this._source.type))for(var p in this._tiles){var y=this._tiles[p];if(y.fadeEndTime!==void 0&&y.fadeEndTime>=o.browser.now())return!0}return!1},d.prototype.setFeatureState=function(p,y,S){this._state.updateState(p=p||"_geojsonTileLayer",y,S)},d.prototype.removeFeatureState=function(p,y,S){this._state.removeFeatureState(p=p||"_geojsonTileLayer",y,S)},d.prototype.getFeatureState=function(p,y){return this._state.getState(p=p||"_geojsonTileLayer",y)},d.prototype.setDependencies=function(p,y,S){var P=this._tiles[p];P&&P.setDependencies(y,S)},d.prototype.reloadTilesForDependencies=function(p,y){for(var S in this._tiles)this._tiles[S].hasDependency(p,y)&&this._reloadTile(S,"reloading");this._cache.filter(function(P){return!P.hasDependency(p,y)})},d}(o.Evented);function Vt(h,d){var p=Math.abs(2*h.wrap)-+(h.wrap<0),y=Math.abs(2*d.wrap)-+(d.wrap<0);return h.overscaledZ-d.overscaledZ||y-p||d.canonical.y-h.canonical.y||d.canonical.x-h.canonical.x}function pe(h){return h==="raster"||h==="image"||h==="video"}function ye(){return new o.window.Worker(Ku.workerUrl)}bt.maxOverzooming=10,bt.maxUnderzooming=3;var Qt="mapboxgl_preloaded_worker_pool",me=function(){this.active={}};me.prototype.acquire=function(h){if(!this.workers)for(this.workers=[];this.workers.length<me.workerCount;)this.workers.push(new ye);return this.active[h]=!0,this.workers.slice()},me.prototype.release=function(h){delete this.active[h],this.numActive()===0&&(this.workers.forEach(function(d){d.terminate()}),this.workers=null)},me.prototype.isPreloaded=function(){return!!this.active[Qt]},me.prototype.numActive=function(){return Object.keys(this.active).length};var tn,Je=Math.floor(o.browser.hardwareConcurrency/2);function re(){return tn||(tn=new me),tn}function ze(h,d){var p={};for(var y in h)y!=="ref"&&(p[y]=h[y]);return o.refProperties.forEach(function(S){S in d&&(p[S]=d[S])}),p}function Me(h){h=h.slice();for(var d=Object.create(null),p=0;p<h.length;p++)d[h[p].id]=h[p];for(var y=0;y<h.length;y++)"ref"in h[y]&&(h[y]=ze(h[y],d[h[y].ref]));return h}me.workerCount=Math.max(Math.min(Je,6),1);var Re={setStyle:"setStyle",addLayer:"addLayer",removeLayer:"removeLayer",setPaintProperty:"setPaintProperty",setLayoutProperty:"setLayoutProperty",setFilter:"setFilter",addSource:"addSource",removeSource:"removeSource",setGeoJSONSourceData:"setGeoJSONSourceData",setLayerZoomRange:"setLayerZoomRange",setLayerProperty:"setLayerProperty",setCenter:"setCenter",setZoom:"setZoom",setBearing:"setBearing",setPitch:"setPitch",setSprite:"setSprite",setGlyphs:"setGlyphs",setTransition:"setTransition",setLight:"setLight"};function Mn(h,d,p){p.push({command:Re.addSource,args:[h,d[h]]})}function $e(h,d,p){d.push({command:Re.removeSource,args:[h]}),p[h]=!0}function Qn(h,d,p,y){$e(h,p,y),Mn(h,d,p)}function Rr(h,d,p){var y;for(y in h[p])if(h[p].hasOwnProperty(y)&&y!=="data"&&!o.deepEqual(h[p][y],d[p][y]))return!1;for(y in d[p])if(d[p].hasOwnProperty(y)&&y!=="data"&&!o.deepEqual(h[p][y],d[p][y]))return!1;return!0}function wn(h,d,p,y,S,P){var M;for(M in d=d||{},h=h||{})h.hasOwnProperty(M)&&(o.deepEqual(h[M],d[M])||p.push({command:P,args:[y,M,d[M],S]}));for(M in d)d.hasOwnProperty(M)&&!h.hasOwnProperty(M)&&(o.deepEqual(h[M],d[M])||p.push({command:P,args:[y,M,d[M],S]}))}function hr(h){return h.id}function tr(h,d){return h[d.id]=d,h}var go=function(h,d){this.reset(h,d)};go.prototype.reset=function(h,d){this.points=h||[],this._distances=[0];for(var p=1;p<this.points.length;p++)this._distances[p]=this._distances[p-1]+this.points[p].dist(this.points[p-1]);this.length=this._distances[this._distances.length-1],this.padding=Math.min(d||0,.5*this.length),this.paddedLength=this.length-2*this.padding},go.prototype.lerp=function(h){if(this.points.length===1)return this.points[0];h=o.clamp(h,0,1);for(var d=1,p=this._distances[d],y=h*this.paddedLength+this.padding;p<y&&d<this._distances.length;)p=this._distances[++d];var S=d-1,P=this._distances[S],M=p-P,N=M>0?(y-P)/M:0;return this.points[S].mult(1-N).add(this.points[d].mult(N))};var Er=function(h,d,p){var y=this.boxCells=[],S=this.circleCells=[];this.xCellCount=Math.ceil(h/p),this.yCellCount=Math.ceil(d/p);for(var P=0;P<this.xCellCount*this.yCellCount;P++)y.push([]),S.push([]);this.circleKeys=[],this.boxKeys=[],this.bboxes=[],this.circles=[],this.width=h,this.height=d,this.xScale=this.xCellCount/h,this.yScale=this.yCellCount/d,this.boxUid=0,this.circleUid=0};function Li(h,d,p,y,S){var P=o.create();return d?(o.scale(P,P,[1/S,1/S,1]),p||o.rotateZ(P,P,y.angle)):o.multiply(P,y.labelPlaneMatrix,h),P}function kr(h,d,p,y,S){if(d){var P=o.clone(h);return o.scale(P,P,[S,S,1]),p||o.rotateZ(P,P,-y.angle),P}return y.glCoordMatrix}function xn(h,d){var p=[h.x,h.y,0,1];Hi(p,p,d);var y=p[3];return{point:new o.Point(p[0]/y,p[1]/y),signedDistanceFromCamera:y}}function pr(h,d){return .5+h/d*.5}function sa(h,d){var p=h[0]/h[3],y=h[1]/h[3];return p>=-d[0]&&p<=d[0]&&y>=-d[1]&&y<=d[1]}function Ii(h,d,p,y,S,P,M,N){var q=y?h.textSizeData:h.iconSizeData,X=o.evaluateSizeForZoom(q,p.transform.zoom),it=[256/p.width*2+1,256/p.height*2+1],st=y?h.text.dynamicLayoutVertexArray:h.icon.dynamicLayoutVertexArray;st.clear();for(var ct=h.lineVertexArray,xt=y?h.text.placedSymbolArray:h.icon.placedSymbolArray,yt=p.transform.width/p.transform.height,Ct=!1,gt=0;gt<xt.length;gt++){var It=xt.get(gt);if(It.hidden||It.writingMode===o.WritingMode.vertical&&!Ct)ro(It.numGlyphs,st);else{Ct=!1;var Lt=[It.anchorX,It.anchorY,0,1];if(o.transformMat4(Lt,Lt,d),sa(Lt,it)){var jt=pr(p.transform.cameraToCenterDistance,Lt[3]),ne=o.evaluateSizeForFeature(q,X,It),Jt=M?ne/jt:ne*jt,ae=new o.Point(It.anchorX,It.anchorY),ge=xn(ae,S).point,we={},Te=Ps(It,Jt,!1,N,d,S,P,h.glyphOffsetArray,ct,st,ge,ae,we,yt);Ct=Te.useVertical,(Te.notEnoughRoom||Ct||Te.needsFlipping&&Ps(It,Jt,!0,N,d,S,P,h.glyphOffsetArray,ct,st,ge,ae,we,yt).notEnoughRoom)&&ro(It.numGlyphs,st)}else ro(It.numGlyphs,st)}}y?h.text.dynamicLayoutVertexBuffer.updateData(st):h.icon.dynamicLayoutVertexBuffer.updateData(st)}function Qr(h,d,p,y,S,P,M,N,q,X,it){var st=N.glyphStartIndex+N.numGlyphs,ct=N.lineStartIndex,xt=N.lineStartIndex+N.lineLength,yt=d.getoffsetX(N.glyphStartIndex),Ct=d.getoffsetX(st-1),gt=Pi(h*yt,p,y,S,P,M,N.segment,ct,xt,q,X,it);if(!gt)return null;var It=Pi(h*Ct,p,y,S,P,M,N.segment,ct,xt,q,X,it);return It?{first:gt,last:It}:null}function mo(h,d,p,y){return h===o.WritingMode.horizontal&&Math.abs(p.y-d.y)>Math.abs(p.x-d.x)*y?{useVertical:!0}:(h===o.WritingMode.vertical?d.y<p.y:d.x>p.x)?{needsFlipping:!0}:null}function Ps(h,d,p,y,S,P,M,N,q,X,it,st,ct,xt){var yt,Ct=d/24,gt=h.lineOffsetX*Ct,It=h.lineOffsetY*Ct;if(h.numGlyphs>1){var Lt=h.glyphStartIndex+h.numGlyphs,jt=h.lineStartIndex,ne=h.lineStartIndex+h.lineLength,Jt=Qr(Ct,N,gt,It,p,it,st,h,q,P,ct);if(!Jt)return{notEnoughRoom:!0};var ae=xn(Jt.first.point,M).point,ge=xn(Jt.last.point,M).point;if(y&&!p){var we=mo(h.writingMode,ae,ge,xt);if(we)return we}yt=[Jt.first];for(var Te=h.glyphStartIndex+1;Te<Lt-1;Te++)yt.push(Pi(Ct*N.getoffsetX(Te),gt,It,p,it,st,h.segment,jt,ne,q,P,ct));yt.push(Jt.last)}else{if(y&&!p){var je=xn(st,S).point,an=h.lineStartIndex+h.segment+1,_n=new o.Point(q.getx(an),q.gety(an)),vn=xn(_n,S),Ir=vn.signedDistanceFromCamera>0?vn.point:Ga(st,_n,je,1,S),Qe=mo(h.writingMode,je,Ir,xt);if(Qe)return Qe}var bn=Pi(Ct*N.getoffsetX(h.glyphStartIndex),gt,It,p,it,st,h.segment,h.lineStartIndex,h.lineStartIndex+h.lineLength,q,P,ct);if(!bn)return{notEnoughRoom:!0};yt=[bn]}for(var Wn=0,On=yt;Wn<On.length;Wn+=1){var Pn=On[Wn];o.addDynamicAttributes(X,Pn.point,Pn.angle)}return{}}function Ga(h,d,p,y,S){var P=xn(h.add(h.sub(d)._unit()),S).point,M=p.sub(P);return p.add(M._mult(y/M.mag()))}function Pi(h,d,p,y,S,P,M,N,q,X,it,st){var ct=y?h-d:h+d,xt=ct>0?1:-1,yt=0;y&&(xt*=-1,yt=Math.PI),xt<0&&(yt+=Math.PI);for(var Ct=xt>0?N+M:N+M+1,gt=S,It=S,Lt=0,jt=0,ne=Math.abs(ct),Jt=[];Lt+jt<=ne;){if((Ct+=xt)<N||Ct>=q)return null;if(It=gt,Jt.push(gt),(gt=st[Ct])===void 0){var ae=new o.Point(X.getx(Ct),X.gety(Ct)),ge=xn(ae,it);if(ge.signedDistanceFromCamera>0)gt=st[Ct]=ge.point;else{var we=Ct-xt;gt=Ga(Lt===0?P:new o.Point(X.getx(we),X.gety(we)),ae,It,ne-Lt+1,it)}}Lt+=jt,jt=It.dist(gt)}var Te=(ne-Lt)/jt,je=gt.sub(It),an=je.mult(Te)._add(It);an._add(je._unit()._perp()._mult(p*xt));var _n=yt+Math.atan2(gt.y-It.y,gt.x-It.x);return Jt.push(an),{point:an,angle:_n,path:Jt}}Er.prototype.keysLength=function(){return this.boxKeys.length+this.circleKeys.length},Er.prototype.insert=function(h,d,p,y,S){this._forEachCell(d,p,y,S,this._insertBoxCell,this.boxUid++),this.boxKeys.push(h),this.bboxes.push(d),this.bboxes.push(p),this.bboxes.push(y),this.bboxes.push(S)},Er.prototype.insertCircle=function(h,d,p,y){this._forEachCell(d-y,p-y,d+y,p+y,this._insertCircleCell,this.circleUid++),this.circleKeys.push(h),this.circles.push(d),this.circles.push(p),this.circles.push(y)},Er.prototype._insertBoxCell=function(h,d,p,y,S,P){this.boxCells[S].push(P)},Er.prototype._insertCircleCell=function(h,d,p,y,S,P){this.circleCells[S].push(P)},Er.prototype._query=function(h,d,p,y,S,P){if(p<0||h>this.width||y<0||d>this.height)return!S&&[];var M=[];if(h<=0&&d<=0&&this.width<=p&&this.height<=y){if(S)return!0;for(var N=0;N<this.boxKeys.length;N++)M.push({key:this.boxKeys[N],x1:this.bboxes[4*N],y1:this.bboxes[4*N+1],x2:this.bboxes[4*N+2],y2:this.bboxes[4*N+3]});for(var q=0;q<this.circleKeys.length;q++){var X=this.circles[3*q],it=this.circles[3*q+1],st=this.circles[3*q+2];M.push({key:this.circleKeys[q],x1:X-st,y1:it-st,x2:X+st,y2:it+st})}return P?M.filter(P):M}return this._forEachCell(h,d,p,y,this._queryCell,M,{hitTest:S,seenUids:{box:{},circle:{}}},P),S?M.length>0:M},Er.prototype._queryCircle=function(h,d,p,y,S){var P=h-p,M=h+p,N=d-p,q=d+p;if(M<0||P>this.width||q<0||N>this.height)return!y&&[];var X=[];return this._forEachCell(P,N,M,q,this._queryCellCircle,X,{hitTest:y,circle:{x:h,y:d,radius:p},seenUids:{box:{},circle:{}}},S),y?X.length>0:X},Er.prototype.query=function(h,d,p,y,S){return this._query(h,d,p,y,!1,S)},Er.prototype.hitTest=function(h,d,p,y,S){return this._query(h,d,p,y,!0,S)},Er.prototype.hitTestCircle=function(h,d,p,y){return this._queryCircle(h,d,p,!0,y)},Er.prototype._queryCell=function(h,d,p,y,S,P,M,N){var q=M.seenUids,X=this.boxCells[S];if(X!==null)for(var it=this.bboxes,st=0,ct=X;st<ct.length;st+=1){var xt=ct[st];if(!q.box[xt]){q.box[xt]=!0;var yt=4*xt;if(h<=it[yt+2]&&d<=it[yt+3]&&p>=it[yt+0]&&y>=it[yt+1]&&(!N||N(this.boxKeys[xt]))){if(M.hitTest)return P.push(!0),!0;P.push({key:this.boxKeys[xt],x1:it[yt],y1:it[yt+1],x2:it[yt+2],y2:it[yt+3]})}}}var Ct=this.circleCells[S];if(Ct!==null)for(var gt=this.circles,It=0,Lt=Ct;It<Lt.length;It+=1){var jt=Lt[It];if(!q.circle[jt]){q.circle[jt]=!0;var ne=3*jt;if(this._circleAndRectCollide(gt[ne],gt[ne+1],gt[ne+2],h,d,p,y)&&(!N||N(this.circleKeys[jt]))){if(M.hitTest)return P.push(!0),!0;var Jt=gt[ne],ae=gt[ne+1],ge=gt[ne+2];P.push({key:this.circleKeys[jt],x1:Jt-ge,y1:ae-ge,x2:Jt+ge,y2:ae+ge})}}}},Er.prototype._queryCellCircle=function(h,d,p,y,S,P,M,N){var q=M.circle,X=M.seenUids,it=this.boxCells[S];if(it!==null)for(var st=this.bboxes,ct=0,xt=it;ct<xt.length;ct+=1){var yt=xt[ct];if(!X.box[yt]){X.box[yt]=!0;var Ct=4*yt;if(this._circleAndRectCollide(q.x,q.y,q.radius,st[Ct+0],st[Ct+1],st[Ct+2],st[Ct+3])&&(!N||N(this.boxKeys[yt])))return P.push(!0),!0}}var gt=this.circleCells[S];if(gt!==null)for(var It=this.circles,Lt=0,jt=gt;Lt<jt.length;Lt+=1){var ne=jt[Lt];if(!X.circle[ne]){X.circle[ne]=!0;var Jt=3*ne;if(this._circlesCollide(It[Jt],It[Jt+1],It[Jt+2],q.x,q.y,q.radius)&&(!N||N(this.circleKeys[ne])))return P.push(!0),!0}}},Er.prototype._forEachCell=function(h,d,p,y,S,P,M,N){for(var q=this._convertToXCellCoord(h),X=this._convertToYCellCoord(d),it=this._convertToXCellCoord(p),st=this._convertToYCellCoord(y),ct=q;ct<=it;ct++)for(var xt=X;xt<=st;xt++)if(S.call(this,h,d,p,y,this.xCellCount*xt+ct,P,M,N))return},Er.prototype._convertToXCellCoord=function(h){return Math.max(0,Math.min(this.xCellCount-1,Math.floor(h*this.xScale)))},Er.prototype._convertToYCellCoord=function(h){return Math.max(0,Math.min(this.yCellCount-1,Math.floor(h*this.yScale)))},Er.prototype._circlesCollide=function(h,d,p,y,S,P){var M=y-h,N=S-d,q=p+P;return q*q>M*M+N*N},Er.prototype._circleAndRectCollide=function(h,d,p,y,S,P,M){var N=(P-y)/2,q=Math.abs(h-(y+N));if(q>N+p)return!1;var X=(M-S)/2,it=Math.abs(d-(S+X));if(it>X+p)return!1;if(q<=N||it<=X)return!0;var st=q-N,ct=it-X;return st*st+ct*ct<=p*p};var _l=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function ro(h,d){for(var p=0;p<h;p++){var y=d.length;d.resize(y+4),d.float32.set(_l,3*y)}}function Hi(h,d,p){var y=d[0],S=d[1];return h[0]=p[0]*y+p[4]*S+p[12],h[1]=p[1]*y+p[5]*S+p[13],h[3]=p[3]*y+p[7]*S+p[15],h}var wa=function(h,d,p){d===void 0&&(d=new Er(h.width+200,h.height+200,25)),p===void 0&&(p=new Er(h.width+200,h.height+200,25)),this.transform=h,this.grid=d,this.ignoredGrid=p,this.pitchfactor=Math.cos(h._pitch)*h.cameraToCenterDistance,this.screenRightBoundary=h.width+100,this.screenBottomBoundary=h.height+100,this.gridRightBoundary=h.width+200,this.gridBottomBoundary=h.height+200};function oi(h,d,p){return d*(o.EXTENT/(h.tileSize*Math.pow(2,p-h.tileID.overscaledZ)))}wa.prototype.placeCollisionBox=function(h,d,p,y,S){var P=this.projectAndGetPerspectiveRatio(y,h.anchorPointX,h.anchorPointY),M=p*P.perspectiveRatio,N=h.x1*M+P.point.x,q=h.y1*M+P.point.y,X=h.x2*M+P.point.x,it=h.y2*M+P.point.y;return!this.isInsideGrid(N,q,X,it)||!d&&this.grid.hitTest(N,q,X,it,S)?{box:[],offscreen:!1}:{box:[N,q,X,it],offscreen:this.isOffscreen(N,q,X,it)}},wa.prototype.placeCollisionCircles=function(h,d,p,y,S,P,M,N,q,X,it,st,ct){var xt=[],yt=new o.Point(d.anchorX,d.anchorY),Ct=xn(yt,P),gt=pr(this.transform.cameraToCenterDistance,Ct.signedDistanceFromCamera),It=(X?S/gt:S*gt)/o.ONE_EM,Lt=xn(yt,M).point,jt=Qr(It,y,d.lineOffsetX*It,d.lineOffsetY*It,!1,Lt,yt,d,p,M,{}),ne=!1,Jt=!1,ae=!0;if(jt){for(var ge=.5*st*gt+ct,we=new o.Point(-100,-100),Te=new o.Point(this.screenRightBoundary,this.screenBottomBoundary),je=new go,an=jt.first,_n=jt.last,vn=[],Ir=an.path.length-1;Ir>=1;Ir--)vn.push(an.path[Ir]);for(var Qe=1;Qe<_n.path.length;Qe++)vn.push(_n.path[Qe]);var bn=2.5*ge;if(N){var Wn=vn.map(function(Ju){return xn(Ju,N)});vn=Wn.some(function(Ju){return Ju.signedDistanceFromCamera<=0})?[]:Wn.map(function(Ju){return Ju.point})}var On=[];if(vn.length>0){for(var Pn=vn[0].clone(),Hn=vn[0].clone(),An=1;An<vn.length;An++)Pn.x=Math.min(Pn.x,vn[An].x),Pn.y=Math.min(Pn.y,vn[An].y),Hn.x=Math.max(Hn.x,vn[An].x),Hn.y=Math.max(Hn.y,vn[An].y);On=Pn.x>=we.x&&Hn.x<=Te.x&&Pn.y>=we.y&&Hn.y<=Te.y?[vn]:Hn.x<we.x||Pn.x>Te.x||Hn.y<we.y||Pn.y>Te.y?[]:o.clipLine([vn],we.x,we.y,Te.x,Te.y)}for(var ln=0,Ro=On;ln<Ro.length;ln+=1){var so;je.reset(Ro[ln],.25*ge),so=je.length<=.5*ge?1:Math.ceil(je.paddedLength/bn)+1;for(var eo=0;eo<so;eo++){var Yo=eo/Math.max(so-1,1),Ui=je.lerp(Yo),Ri=Ui.x+100,Ms=Ui.y+100;xt.push(Ri,Ms,ge,0);var Mi=Ri-ge,ic=Ms-ge,As=Ri+ge,Tl=Ms+ge;if(ae=ae&&this.isOffscreen(Mi,ic,As,Tl),Jt=Jt||this.isInsideGrid(Mi,ic,As,Tl),!h&&this.grid.hitTestCircle(Ri,Ms,ge,it)&&(ne=!0,!q))return{circles:[],offscreen:!1,collisionDetected:ne}}}}return{circles:!q&&ne||!Jt?[]:xt,offscreen:ae,collisionDetected:ne}},wa.prototype.queryRenderedSymbols=function(h){if(h.length===0||this.grid.keysLength()===0&&this.ignoredGrid.keysLength()===0)return{};for(var d=[],p=1/0,y=1/0,S=-1/0,P=-1/0,M=0,N=h;M<N.length;M+=1){var q=N[M],X=new o.Point(q.x+100,q.y+100);p=Math.min(p,X.x),y=Math.min(y,X.y),S=Math.max(S,X.x),P=Math.max(P,X.y),d.push(X)}for(var it={},st={},ct=0,xt=this.grid.query(p,y,S,P).concat(this.ignoredGrid.query(p,y,S,P));ct<xt.length;ct+=1){var yt=xt[ct],Ct=yt.key;if(it[Ct.bucketInstanceId]===void 0&&(it[Ct.bucketInstanceId]={}),!it[Ct.bucketInstanceId][Ct.featureIndex]){var gt=[new o.Point(yt.x1,yt.y1),new o.Point(yt.x2,yt.y1),new o.Point(yt.x2,yt.y2),new o.Point(yt.x1,yt.y2)];o.polygonIntersectsPolygon(d,gt)&&(it[Ct.bucketInstanceId][Ct.featureIndex]=!0,st[Ct.bucketInstanceId]===void 0&&(st[Ct.bucketInstanceId]=[]),st[Ct.bucketInstanceId].push(Ct.featureIndex))}}return st},wa.prototype.insertCollisionBox=function(h,d,p,y,S){(d?this.ignoredGrid:this.grid).insert({bucketInstanceId:p,featureIndex:y,collisionGroupID:S},h[0],h[1],h[2],h[3])},wa.prototype.insertCollisionCircles=function(h,d,p,y,S){for(var P=d?this.ignoredGrid:this.grid,M={bucketInstanceId:p,featureIndex:y,collisionGroupID:S},N=0;N<h.length;N+=4)P.insertCircle(M,h[N],h[N+1],h[N+2])},wa.prototype.projectAndGetPerspectiveRatio=function(h,d,p){var y=[d,p,0,1];return Hi(y,y,h),{point:new o.Point((y[0]/y[3]+1)/2*this.transform.width+100,(-y[1]/y[3]+1)/2*this.transform.height+100),perspectiveRatio:.5+this.transform.cameraToCenterDistance/y[3]*.5}},wa.prototype.isOffscreen=function(h,d,p,y){return p<100||h>=this.screenRightBoundary||y<100||d>this.screenBottomBoundary},wa.prototype.isInsideGrid=function(h,d,p,y){return p>=0&&h<this.gridRightBoundary&&y>=0&&d<this.gridBottomBoundary},wa.prototype.getViewportMatrix=function(){var h=o.identity([]);return o.translate(h,h,[-100,-100,0]),h};var ls=function(h,d,p,y){this.opacity=h?Math.max(0,Math.min(1,h.opacity+(h.placed?d:-d))):y&&p?1:0,this.placed=p};ls.prototype.isHidden=function(){return this.opacity===0&&!this.placed};var Sa=function(h,d,p,y,S){this.text=new ls(h?h.text:null,d,p,S),this.icon=new ls(h?h.icon:null,d,y,S)};Sa.prototype.isHidden=function(){return this.text.isHidden()&&this.icon.isHidden()};var Oc=function(h,d,p){this.text=h,this.icon=d,this.skipFade=p},Wa=function(){this.invProjMatrix=o.create(),this.viewportMatrix=o.create(),this.circles=[]},L=function(h,d,p,y,S){this.bucketInstanceId=h,this.featureIndex=d,this.sourceLayerIndex=p,this.bucketIndex=y,this.tileID=S},U=function(h){this.crossSourceCollisions=h,this.maxGroupID=0,this.collisionGroups={}};function Q(h,d,p,y,S){var P=o.getAnchorAlignment(h),M=-(P.horizontalAlign-.5)*d,N=-(P.verticalAlign-.5)*p,q=o.evaluateVariableOffset(h,y);return new o.Point(M+q[0]*S,N+q[1]*S)}function At(h,d,p,y,S,P){var M=h.x1,N=h.x2,q=h.y1,X=h.y2,it=h.anchorPointX,st=h.anchorPointY,ct=new o.Point(d,p);return y&&ct._rotate(S?P:-P),{x1:M+ct.x,y1:q+ct.y,x2:N+ct.x,y2:X+ct.y,anchorPointX:it,anchorPointY:st}}U.prototype.get=function(h){if(this.crossSourceCollisions)return{ID:0,predicate:null};if(!this.collisionGroups[h]){var d=++this.maxGroupID;this.collisionGroups[h]={ID:d,predicate:function(p){return p.collisionGroupID===d}}}return this.collisionGroups[h]};var tt=function(h,d,p,y){this.transform=h.clone(),this.collisionIndex=new wa(this.transform),this.placements={},this.opacities={},this.variableOffsets={},this.stale=!1,this.commitTime=0,this.fadeDuration=d,this.retainedQueryData={},this.collisionGroups=new U(p),this.collisionCircleArrays={},this.prevPlacement=y,y&&(y.prevPlacement=void 0),this.placedOrientations={}};function ot(h,d,p,y,S){h.emplaceBack(d?1:0,p?1:0,y||0,S||0),h.emplaceBack(d?1:0,p?1:0,y||0,S||0),h.emplaceBack(d?1:0,p?1:0,y||0,S||0),h.emplaceBack(d?1:0,p?1:0,y||0,S||0)}tt.prototype.getBucketParts=function(h,d,p,y){var S=p.getBucket(d),P=p.latestFeatureIndex;if(S&&P&&d.id===S.layerIds[0]){var M=p.collisionBoxArray,N=S.layers[0].layout,q=Math.pow(2,this.transform.zoom-p.tileID.overscaledZ),X=p.tileSize/o.EXTENT,it=this.transform.calculatePosMatrix(p.tileID.toUnwrapped()),st=N.get("text-pitch-alignment")==="map",ct=N.get("text-rotation-alignment")==="map",xt=oi(p,1,this.transform.zoom),yt=Li(it,st,ct,this.transform,xt),Ct=null;if(st){var gt=kr(it,st,ct,this.transform,xt);Ct=o.multiply([],this.transform.labelPlaneMatrix,gt)}this.retainedQueryData[S.bucketInstanceId]=new L(S.bucketInstanceId,P,S.sourceLayerIndex,S.index,p.tileID);var It={bucket:S,layout:N,posMatrix:it,textLabelPlaneMatrix:yt,labelToScreenMatrix:Ct,scale:q,textPixelRatio:X,holdingForFade:p.holdingForFade(),collisionBoxArray:M,partiallyEvaluatedTextSize:o.evaluateSizeForZoom(S.textSizeData,this.transform.zoom),collisionGroup:this.collisionGroups.get(S.sourceID)};if(y)for(var Lt=0,jt=S.sortKeyRanges;Lt<jt.length;Lt+=1){var ne=jt[Lt];h.push({sortKey:ne.sortKey,symbolInstanceStart:ne.symbolInstanceStart,symbolInstanceEnd:ne.symbolInstanceEnd,parameters:It})}else h.push({symbolInstanceStart:0,symbolInstanceEnd:S.symbolInstances.length,parameters:It})}},tt.prototype.attemptAnchorPlacement=function(h,d,p,y,S,P,M,N,q,X,it,st,ct,xt,yt){var Ct,gt=[st.textOffset0,st.textOffset1],It=Q(h,p,y,gt,S),Lt=this.collisionIndex.placeCollisionBox(At(d,It.x,It.y,P,M,this.transform.angle),it,N,q,X.predicate);if(!yt||this.collisionIndex.placeCollisionBox(At(yt,It.x,It.y,P,M,this.transform.angle),it,N,q,X.predicate).box.length!==0)return Lt.box.length>0?(this.prevPlacement&&this.prevPlacement.variableOffsets[st.crossTileID]&&this.prevPlacement.placements[st.crossTileID]&&this.prevPlacement.placements[st.crossTileID].text&&(Ct=this.prevPlacement.variableOffsets[st.crossTileID].anchor),this.variableOffsets[st.crossTileID]={textOffset:gt,width:p,height:y,anchor:h,textBoxScale:S,prevAnchor:Ct},this.markUsedJustification(ct,h,st,xt),ct.allowVerticalPlacement&&(this.markUsedOrientation(ct,xt,st),this.placedOrientations[st.crossTileID]=xt),{shift:It,placedGlyphBoxes:Lt}):void 0},tt.prototype.placeLayerBucketPart=function(h,d,p){var y=this,S=h.parameters,P=S.bucket,M=S.layout,N=S.posMatrix,q=S.textLabelPlaneMatrix,X=S.labelToScreenMatrix,it=S.textPixelRatio,st=S.holdingForFade,ct=S.collisionBoxArray,xt=S.partiallyEvaluatedTextSize,yt=S.collisionGroup,Ct=M.get("text-optional"),gt=M.get("icon-optional"),It=M.get("text-allow-overlap"),Lt=M.get("icon-allow-overlap"),jt=M.get("text-rotation-alignment")==="map",ne=M.get("text-pitch-alignment")==="map",Jt=M.get("icon-text-fit")!=="none",ae=M.get("symbol-z-order")==="viewport-y",ge=It&&(Lt||!P.hasIconData()||gt),we=Lt&&(It||!P.hasTextData()||Ct);!P.collisionArrays&&ct&&P.deserializeCollisionBoxes(ct);var Te=function(Qe,bn){if(!d[Qe.crossTileID])if(st)y.placements[Qe.crossTileID]=new Oc(!1,!1,!1);else{var Wn,On=!1,Pn=!1,Hn=!0,An=null,ln={box:null,offscreen:null},Ro={box:null,offscreen:null},so=null,eo=null,Yo=0,Ui=0,Ri=0;bn.textFeatureIndex?Yo=bn.textFeatureIndex:Qe.useRuntimeCollisionCircles&&(Yo=Qe.featureIndex),bn.verticalTextFeatureIndex&&(Ui=bn.verticalTextFeatureIndex);var Ms=bn.textBox;if(Ms){var Mi=function(Yr){var Su=o.WritingMode.horizontal;if(P.allowVerticalPlacement&&!Yr&&y.prevPlacement){var ds=y.prevPlacement.placedOrientations[Qe.crossTileID];ds&&(y.placedOrientations[Qe.crossTileID]=ds,y.markUsedOrientation(P,Su=ds,Qe))}return Su},ic=function(Yr,Su){if(P.allowVerticalPlacement&&Qe.numVerticalGlyphVertices>0&&bn.verticalTextBox)for(var ds=0,Gc=P.writingModes;ds<Gc.length&&(Gc[ds]===o.WritingMode.vertical?(ln=Su(),Ro=ln):ln=Yr(),!(ln&&ln.box&&ln.box.length));ds+=1);else ln=Yr()};if(M.get("text-variable-anchor")){var As=M.get("text-variable-anchor");if(y.prevPlacement&&y.prevPlacement.variableOffsets[Qe.crossTileID]){var Tl=y.prevPlacement.variableOffsets[Qe.crossTileID];As.indexOf(Tl.anchor)>0&&(As=As.filter(function(Yr){return Yr!==Tl.anchor})).unshift(Tl.anchor)}var Ju=function(Yr,Su,ds){for(var Gc=Yr.x2-Yr.x1,wx=Yr.y2-Yr.y1,Fp=Qe.textBoxScale,Fy=Jt&&!Lt?Su:null,zp={box:[],offscreen:!1},fv=It?2*As.length:As.length,Wc=0;Wc<fv;++Wc){var zg=y.attemptAnchorPlacement(As[Wc%As.length],Yr,Gc,wx,Fp,jt,ne,it,N,yt,Wc>=As.length,Qe,P,ds,Fy);if(zg&&(zp=zg.placedGlyphBoxes)&&zp.box&&zp.box.length){On=!0,An=zg.shift;break}}return zp};ic(function(){return Ju(Ms,bn.iconBox,o.WritingMode.horizontal)},function(){var Yr=bn.verticalTextBox;return P.allowVerticalPlacement&&!(ln&&ln.box&&ln.box.length)&&Qe.numVerticalGlyphVertices>0&&Yr?Ju(Yr,bn.verticalIconBox,o.WritingMode.vertical):{box:null,offscreen:null}}),ln&&(On=ln.box,Hn=ln.offscreen);var $h=Mi(ln&&ln.box);if(!On&&y.prevPlacement){var Np=y.prevPlacement.variableOffsets[Qe.crossTileID];Np&&(y.variableOffsets[Qe.crossTileID]=Np,y.markUsedJustification(P,Np.anchor,Qe,$h))}}else{var Qu=function(Yr,Su){var ds=y.collisionIndex.placeCollisionBox(Yr,It,it,N,yt.predicate);return ds&&ds.box&&ds.box.length&&(y.markUsedOrientation(P,Su,Qe),y.placedOrientations[Qe.crossTileID]=Su),ds};ic(function(){return Qu(Ms,o.WritingMode.horizontal)},function(){var Yr=bn.verticalTextBox;return P.allowVerticalPlacement&&Qe.numVerticalGlyphVertices>0&&Yr?Qu(Yr,o.WritingMode.vertical):{box:null,offscreen:null}}),Mi(ln&&ln.box&&ln.box.length)}}if(On=(Wn=ln)&&Wn.box&&Wn.box.length>0,Hn=Wn&&Wn.offscreen,Qe.useRuntimeCollisionCircles){var jh=P.text.placedSymbolArray.get(Qe.centerJustifiedTextSymbolIndex),Pd=o.evaluateSizeForFeature(P.textSizeData,xt,jh),oc=M.get("text-padding");so=y.collisionIndex.placeCollisionCircles(It,jh,P.lineVertexArray,P.glyphOffsetArray,Pd,N,q,X,p,ne,yt.predicate,Qe.collisionCircleDiameter,oc),On=It||so.circles.length>0&&!so.collisionDetected,Hn=Hn&&so.offscreen}if(bn.iconFeatureIndex&&(Ri=bn.iconFeatureIndex),bn.iconBox){var jc=function(Yr){var Su=Jt&&An?At(Yr,An.x,An.y,jt,ne,y.transform.angle):Yr;return y.collisionIndex.placeCollisionBox(Su,Lt,it,N,yt.predicate)};Pn=Ro&&Ro.box&&Ro.box.length&&bn.verticalIconBox?(eo=jc(bn.verticalIconBox)).box.length>0:(eo=jc(bn.iconBox)).box.length>0,Hn=Hn&&eo.offscreen}var ac=Ct||Qe.numHorizontalGlyphVertices===0&&Qe.numVerticalGlyphVertices===0,fa=gt||Qe.numIconVertices===0;if(ac||fa?fa?ac||(Pn=Pn&&On):On=Pn&&On:Pn=On=Pn&&On,On&&Wn&&Wn.box&&y.collisionIndex.insertCollisionBox(Wn.box,M.get("text-ignore-placement"),P.bucketInstanceId,Ro&&Ro.box&&Ui?Ui:Yo,yt.ID),Pn&&eo&&y.collisionIndex.insertCollisionBox(eo.box,M.get("icon-ignore-placement"),P.bucketInstanceId,Ri,yt.ID),so&&(On&&y.collisionIndex.insertCollisionCircles(so.circles,M.get("text-ignore-placement"),P.bucketInstanceId,Yo,yt.ID),p)){var Ml=P.bucketInstanceId,qc=y.collisionCircleArrays[Ml];qc===void 0&&(qc=y.collisionCircleArrays[Ml]=new Wa);for(var qh=0;qh<so.circles.length;qh+=4)qc.circles.push(so.circles[qh+0]),qc.circles.push(so.circles[qh+1]),qc.circles.push(so.circles[qh+2]),qc.circles.push(so.collisionDetected?1:0)}y.placements[Qe.crossTileID]=new Oc(On||ge,Pn||we,Hn||P.justReloaded),d[Qe.crossTileID]=!0}};if(ae)for(var je=P.getSortedSymbolIndexes(this.transform.angle),an=je.length-1;an>=0;--an){var _n=je[an];Te(P.symbolInstances.get(_n),P.collisionArrays[_n])}else for(var vn=h.symbolInstanceStart;vn<h.symbolInstanceEnd;vn++)Te(P.symbolInstances.get(vn),P.collisionArrays[vn]);if(p&&P.bucketInstanceId in this.collisionCircleArrays){var Ir=this.collisionCircleArrays[P.bucketInstanceId];o.invert(Ir.invProjMatrix,N),Ir.viewportMatrix=this.collisionIndex.getViewportMatrix()}P.justReloaded=!1},tt.prototype.markUsedJustification=function(h,d,p,y){var S;S=y===o.WritingMode.vertical?p.verticalPlacedTextSymbolIndex:{left:p.leftJustifiedTextSymbolIndex,center:p.centerJustifiedTextSymbolIndex,right:p.rightJustifiedTextSymbolIndex}[o.getAnchorJustification(d)];for(var P=0,M=[p.leftJustifiedTextSymbolIndex,p.centerJustifiedTextSymbolIndex,p.rightJustifiedTextSymbolIndex,p.verticalPlacedTextSymbolIndex];P<M.length;P+=1){var N=M[P];N>=0&&(h.text.placedSymbolArray.get(N).crossTileID=S>=0&&N!==S?0:p.crossTileID)}},tt.prototype.markUsedOrientation=function(h,d,p){for(var y=d===o.WritingMode.horizontal||d===o.WritingMode.horizontalOnly?d:0,S=d===o.WritingMode.vertical?d:0,P=0,M=[p.leftJustifiedTextSymbolIndex,p.centerJustifiedTextSymbolIndex,p.rightJustifiedTextSymbolIndex];P<M.length;P+=1)h.text.placedSymbolArray.get(M[P]).placedOrientation=y;p.verticalPlacedTextSymbolIndex&&(h.text.placedSymbolArray.get(p.verticalPlacedTextSymbolIndex).placedOrientation=S)},tt.prototype.commit=function(h){this.commitTime=h,this.zoomAtLastRecencyCheck=this.transform.zoom;var d=this.prevPlacement,p=!1;this.prevZoomAdjustment=d?d.zoomAdjustment(this.transform.zoom):0;var y=d?d.symbolFadeChange(h):1,S=d?d.opacities:{},P=d?d.variableOffsets:{},M=d?d.placedOrientations:{};for(var N in this.placements){var q=this.placements[N],X=S[N];X?(this.opacities[N]=new Sa(X,y,q.text,q.icon),p=p||q.text!==X.text.placed||q.icon!==X.icon.placed):(this.opacities[N]=new Sa(null,y,q.text,q.icon,q.skipFade),p=p||q.text||q.icon)}for(var it in S){var st=S[it];if(!this.opacities[it]){var ct=new Sa(st,y,!1,!1);ct.isHidden()||(this.opacities[it]=ct,p=p||st.text.placed||st.icon.placed)}}for(var xt in P)this.variableOffsets[xt]||!this.opacities[xt]||this.opacities[xt].isHidden()||(this.variableOffsets[xt]=P[xt]);for(var yt in M)this.placedOrientations[yt]||!this.opacities[yt]||this.opacities[yt].isHidden()||(this.placedOrientations[yt]=M[yt]);p?this.lastPlacementChangeTime=h:typeof this.lastPlacementChangeTime!="number"&&(this.lastPlacementChangeTime=d?d.lastPlacementChangeTime:h)},tt.prototype.updateLayerOpacities=function(h,d){for(var p={},y=0,S=d;y<S.length;y+=1){var P=S[y],M=P.getBucket(h);M&&P.latestFeatureIndex&&h.id===M.layerIds[0]&&this.updateBucketOpacities(M,p,P.collisionBoxArray)}},tt.prototype.updateBucketOpacities=function(h,d,p){var y=this;h.hasTextData()&&h.text.opacityVertexArray.clear(),h.hasIconData()&&h.icon.opacityVertexArray.clear(),h.hasIconCollisionBoxData()&&h.iconCollisionBox.collisionVertexArray.clear(),h.hasTextCollisionBoxData()&&h.textCollisionBox.collisionVertexArray.clear();var S=h.layers[0].layout,P=new Sa(null,0,!1,!1,!0),M=S.get("text-allow-overlap"),N=S.get("icon-allow-overlap"),q=S.get("text-variable-anchor"),X=S.get("text-rotation-alignment")==="map",it=S.get("text-pitch-alignment")==="map",st=S.get("icon-text-fit")!=="none",ct=new Sa(null,0,M&&(N||!h.hasIconData()||S.get("icon-optional")),N&&(M||!h.hasTextData()||S.get("text-optional")),!0);!h.collisionArrays&&p&&(h.hasIconCollisionBoxData()||h.hasTextCollisionBoxData())&&h.deserializeCollisionBoxes(p);for(var xt=function(It,Lt,jt){for(var ne=0;ne<Lt/4;ne++)It.opacityVertexArray.emplaceBack(jt)},yt=function(It){var Lt=h.symbolInstances.get(It),jt=Lt.numHorizontalGlyphVertices,ne=Lt.numVerticalGlyphVertices,Jt=Lt.crossTileID,ae=y.opacities[Jt];d[Jt]?ae=P:ae||(y.opacities[Jt]=ae=ct),d[Jt]=!0;var ge=Lt.numIconVertices>0,we=y.placedOrientations[Lt.crossTileID],Te=we===o.WritingMode.vertical,je=we===o.WritingMode.horizontal||we===o.WritingMode.horizontalOnly;if(jt>0||ne>0){var an=Xe(ae.text);xt(h.text,jt,Te?en:an),xt(h.text,ne,je?en:an);var _n=ae.text.isHidden();[Lt.rightJustifiedTextSymbolIndex,Lt.centerJustifiedTextSymbolIndex,Lt.leftJustifiedTextSymbolIndex].forEach(function(ln){ln>=0&&(h.text.placedSymbolArray.get(ln).hidden=_n||Te?1:0)}),Lt.verticalPlacedTextSymbolIndex>=0&&(h.text.placedSymbolArray.get(Lt.verticalPlacedTextSymbolIndex).hidden=_n||je?1:0);var vn=y.variableOffsets[Lt.crossTileID];vn&&y.markUsedJustification(h,vn.anchor,Lt,we);var Ir=y.placedOrientations[Lt.crossTileID];Ir&&(y.markUsedJustification(h,"left",Lt,Ir),y.markUsedOrientation(h,Ir,Lt))}if(ge){var Qe=Xe(ae.icon),bn=!(st&&Lt.verticalPlacedIconSymbolIndex&&Te);Lt.placedIconSymbolIndex>=0&&(xt(h.icon,Lt.numIconVertices,bn?Qe:en),h.icon.placedSymbolArray.get(Lt.placedIconSymbolIndex).hidden=ae.icon.isHidden()),Lt.verticalPlacedIconSymbolIndex>=0&&(xt(h.icon,Lt.numVerticalIconVertices,bn?en:Qe),h.icon.placedSymbolArray.get(Lt.verticalPlacedIconSymbolIndex).hidden=ae.icon.isHidden())}if(h.hasIconCollisionBoxData()||h.hasTextCollisionBoxData()){var Wn=h.collisionArrays[It];if(Wn){var On=new o.Point(0,0);if(Wn.textBox||Wn.verticalTextBox){var Pn=!0;if(q){var Hn=y.variableOffsets[Jt];Hn?(On=Q(Hn.anchor,Hn.width,Hn.height,Hn.textOffset,Hn.textBoxScale),X&&On._rotate(it?y.transform.angle:-y.transform.angle)):Pn=!1}Wn.textBox&&ot(h.textCollisionBox.collisionVertexArray,ae.text.placed,!Pn||Te,On.x,On.y),Wn.verticalTextBox&&ot(h.textCollisionBox.collisionVertexArray,ae.text.placed,!Pn||je,On.x,On.y)}var An=Boolean(!je&&Wn.verticalIconBox);Wn.iconBox&&ot(h.iconCollisionBox.collisionVertexArray,ae.icon.placed,An,st?On.x:0,st?On.y:0),Wn.verticalIconBox&&ot(h.iconCollisionBox.collisionVertexArray,ae.icon.placed,!An,st?On.x:0,st?On.y:0)}}},Ct=0;Ct<h.symbolInstances.length;Ct++)yt(Ct);if(h.sortFeatures(this.transform.angle),this.retainedQueryData[h.bucketInstanceId]&&(this.retainedQueryData[h.bucketInstanceId].featureSortOrder=h.featureSortOrder),h.hasTextData()&&h.text.opacityVertexBuffer&&h.text.opacityVertexBuffer.updateData(h.text.opacityVertexArray),h.hasIconData()&&h.icon.opacityVertexBuffer&&h.icon.opacityVertexBuffer.updateData(h.icon.opacityVertexArray),h.hasIconCollisionBoxData()&&h.iconCollisionBox.collisionVertexBuffer&&h.iconCollisionBox.collisionVertexBuffer.updateData(h.iconCollisionBox.collisionVertexArray),h.hasTextCollisionBoxData()&&h.textCollisionBox.collisionVertexBuffer&&h.textCollisionBox.collisionVertexBuffer.updateData(h.textCollisionBox.collisionVertexArray),h.bucketInstanceId in this.collisionCircleArrays){var gt=this.collisionCircleArrays[h.bucketInstanceId];h.placementInvProjMatrix=gt.invProjMatrix,h.placementViewportMatrix=gt.viewportMatrix,h.collisionCircleArray=gt.circles,delete this.collisionCircleArrays[h.bucketInstanceId]}},tt.prototype.symbolFadeChange=function(h){return this.fadeDuration===0?1:(h-this.commitTime)/this.fadeDuration+this.prevZoomAdjustment},tt.prototype.zoomAdjustment=function(h){return Math.max(0,(this.transform.zoom-h)/1.5)},tt.prototype.hasTransitions=function(h){return this.stale||h-this.lastPlacementChangeTime<this.fadeDuration},tt.prototype.stillRecent=function(h,d){var p=this.zoomAtLastRecencyCheck===d?1-this.zoomAdjustment(d):1;return this.zoomAtLastRecencyCheck=d,this.commitTime+this.fadeDuration*p>h},tt.prototype.setStale=function(){this.stale=!0};var ft=Math.pow(2,25),Ft=Math.pow(2,24),zt=Math.pow(2,17),ie=Math.pow(2,16),kt=Math.pow(2,9),Ie=Math.pow(2,8),Pe=Math.pow(2,1);function Xe(h){if(h.opacity===0&&!h.placed)return 0;if(h.opacity===1&&h.placed)return 4294967295;var d=h.placed?1:0,p=Math.floor(127*h.opacity);return p*ft+d*Ft+p*zt+d*ie+p*kt+d*Ie+p*Pe+d}var en=0,dr=function(h){this._sortAcrossTiles=h.layout.get("symbol-z-order")!=="viewport-y"&&h.layout.get("symbol-sort-key").constantOr(1)!==void 0,this._currentTileIndex=0,this._currentPartIndex=0,this._seenCrossTileIDs={},this._bucketParts=[]};dr.prototype.continuePlacement=function(h,d,p,y,S){for(var P=this._bucketParts;this._currentTileIndex<h.length;)if(d.getBucketParts(P,y,h[this._currentTileIndex],this._sortAcrossTiles),this._currentTileIndex++,S())return!0;for(this._sortAcrossTiles&&(this._sortAcrossTiles=!1,P.sort(function(M,N){return M.sortKey-N.sortKey}));this._currentPartIndex<P.length;)if(d.placeLayerBucketPart(P[this._currentPartIndex],this._seenCrossTileIDs,p),this._currentPartIndex++,S())return!0;return!1};var le=function(h,d,p,y,S,P,M){this.placement=new tt(h,S,P,M),this._currentPlacementIndex=d.length-1,this._forceFullPlacement=p,this._showCollisionBoxes=y,this._done=!1};le.prototype.isDone=function(){return this._done},le.prototype.continuePlacement=function(h,d,p){for(var y=this,S=o.browser.now(),P=function(){var q=o.browser.now()-S;return!y._forceFullPlacement&&q>2};this._currentPlacementIndex>=0;){var M=d[h[this._currentPlacementIndex]],N=this.placement.collisionIndex.transform.zoom;if(M.type==="symbol"&&(!M.minzoom||M.minzoom<=N)&&(!M.maxzoom||M.maxzoom>N)){if(this._inProgressLayer||(this._inProgressLayer=new dr(M)),this._inProgressLayer.continuePlacement(p[M.source],this.placement,this._showCollisionBoxes,M,P))return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0},le.prototype.commit=function(h){return this.placement.commit(h),this.placement};var Ue=512/o.EXTENT/2,_r=function(h,d,p){this.tileID=h,this.indexedSymbolInstances={},this.bucketInstanceId=p;for(var y=0;y<d.length;y++){var S=d.get(y),P=S.key;this.indexedSymbolInstances[P]||(this.indexedSymbolInstances[P]=[]),this.indexedSymbolInstances[P].push({crossTileID:S.crossTileID,coord:this.getScaledCoordinates(S,h)})}};_r.prototype.getScaledCoordinates=function(h,d){var p=Ue/Math.pow(2,d.canonical.z-this.tileID.canonical.z);return{x:Math.floor((d.canonical.x*o.EXTENT+h.anchorX)*p),y:Math.floor((d.canonical.y*o.EXTENT+h.anchorY)*p)}},_r.prototype.findMatches=function(h,d,p){for(var y=this.tileID.canonical.z<d.canonical.z?1:Math.pow(2,this.tileID.canonical.z-d.canonical.z),S=0;S<h.length;S++){var P=h.get(S);if(!P.crossTileID){var M=this.indexedSymbolInstances[P.key];if(M)for(var N=this.getScaledCoordinates(P,d),q=0,X=M;q<X.length;q+=1){var it=X[q];if(Math.abs(it.coord.x-N.x)<=y&&Math.abs(it.coord.y-N.y)<=y&&!p[it.crossTileID]){p[it.crossTileID]=!0,P.crossTileID=it.crossTileID;break}}}}};var Yn=function(){this.maxCrossTileID=0};Yn.prototype.generate=function(){return++this.maxCrossTileID};var $r=function(){this.indexes={},this.usedCrossTileIDs={},this.lng=0};$r.prototype.handleWrapJump=function(h){var d=Math.round((h-this.lng)/360);if(d!==0)for(var p in this.indexes){var y=this.indexes[p],S={};for(var P in y){var M=y[P];M.tileID=M.tileID.unwrapTo(M.tileID.wrap+d),S[M.tileID.key]=M}this.indexes[p]=S}this.lng=h},$r.prototype.addBucket=function(h,d,p){if(this.indexes[h.overscaledZ]&&this.indexes[h.overscaledZ][h.key]){if(this.indexes[h.overscaledZ][h.key].bucketInstanceId===d.bucketInstanceId)return!1;this.removeBucketCrossTileIDs(h.overscaledZ,this.indexes[h.overscaledZ][h.key])}for(var y=0;y<d.symbolInstances.length;y++)d.symbolInstances.get(y).crossTileID=0;this.usedCrossTileIDs[h.overscaledZ]||(this.usedCrossTileIDs[h.overscaledZ]={});var S=this.usedCrossTileIDs[h.overscaledZ];for(var P in this.indexes){var M=this.indexes[P];if(Number(P)>h.overscaledZ)for(var N in M){var q=M[N];q.tileID.isChildOf(h)&&q.findMatches(d.symbolInstances,h,S)}else{var X=M[h.scaledTo(Number(P)).key];X&&X.findMatches(d.symbolInstances,h,S)}}for(var it=0;it<d.symbolInstances.length;it++){var st=d.symbolInstances.get(it);st.crossTileID||(st.crossTileID=p.generate(),S[st.crossTileID]=!0)}return this.indexes[h.overscaledZ]===void 0&&(this.indexes[h.overscaledZ]={}),this.indexes[h.overscaledZ][h.key]=new _r(h,d.symbolInstances,d.bucketInstanceId),!0},$r.prototype.removeBucketCrossTileIDs=function(h,d){for(var p in d.indexedSymbolInstances)for(var y=0,S=d.indexedSymbolInstances[p];y<S.length;y+=1)delete this.usedCrossTileIDs[h][S[y].crossTileID]},$r.prototype.removeStaleBuckets=function(h){var d=!1;for(var p in this.indexes){var y=this.indexes[p];for(var S in y)h[y[S].bucketInstanceId]||(this.removeBucketCrossTileIDs(p,y[S]),delete y[S],d=!0)}return d};var fn=function(){this.layerIndexes={},this.crossTileIDs=new Yn,this.maxBucketInstanceId=0,this.bucketsInCurrentPlacement={}};fn.prototype.addLayer=function(h,d,p){var y=this.layerIndexes[h.id];y===void 0&&(y=this.layerIndexes[h.id]=new $r);var S=!1,P={};y.handleWrapJump(p);for(var M=0,N=d;M<N.length;M+=1){var q=N[M],X=q.getBucket(h);X&&h.id===X.layerIds[0]&&(X.bucketInstanceId||(X.bucketInstanceId=++this.maxBucketInstanceId),y.addBucket(q.tileID,X,this.crossTileIDs)&&(S=!0),P[X.bucketInstanceId]=!0)}return y.removeStaleBuckets(P)&&(S=!0),S},fn.prototype.pruneUnusedLayers=function(h){var d={};for(var p in h.forEach(function(y){d[y]=!0}),this.layerIndexes)d[p]||delete this.layerIndexes[p]};var Ea=function(h,d){return o.emitValidationErrors(h,d&&d.filter(function(p){return p.identifier!=="source.canvas"}))},Wo=o.pick(Re,["addLayer","removeLayer","setPaintProperty","setLayoutProperty","setFilter","addSource","removeSource","setLayerZoomRange","setLight","setTransition","setGeoJSONSourceData"]),er=o.pick(Re,["setCenter","setZoom","setBearing","setPitch"]),gr=function(){var h={},d=o.styleSpec.$version;for(var p in o.styleSpec.$root){var y,S=o.styleSpec.$root[p];S.required&&(y=p==="version"?d:S.type==="array"?[]:{})!=null&&(h[p]=y)}return h}(),Ln=function(h){function d(p,y){var S=this;y===void 0&&(y={}),h.call(this),this.map=p,this.dispatcher=new de(re(),this),this.imageManager=new k,this.imageManager.setEventedParent(this),this.glyphManager=new Bt(p._requestManager,y.localIdeographFontFamily),this.lineAtlas=new He(256,512),this.crossTileSymbolIndex=new fn,this._layers={},this._serializedLayers={},this._order=[],this.sourceCaches={},this.zoomHistory=new o.ZoomHistory,this._loaded=!1,this._availableImages=[],this._resetUpdates(),this.dispatcher.broadcast("setReferrer",o.getReferrer());var P=this;this._rtlTextPluginCallback=d.registerForPluginStateChange(function(M){P.dispatcher.broadcast("syncRTLPluginState",{pluginStatus:M.pluginStatus,pluginURL:M.pluginURL},function(N,q){if(o.triggerPluginCompletionEvent(N),q&&q.every(function(it){return it}))for(var X in P.sourceCaches)P.sourceCaches[X].reload()})}),this.on("data",function(M){if(M.dataType==="source"&&M.sourceDataType==="metadata"){var N=S.sourceCaches[M.sourceId];if(N){var q=N.getSource();if(q&&q.vectorLayerIds)for(var X in S._layers){var it=S._layers[X];it.source===q.id&&S._validateLayer(it)}}}})}return h&&(d.__proto__=h),(d.prototype=Object.create(h&&h.prototype)).constructor=d,d.prototype.loadURL=function(p,y){var S=this;y===void 0&&(y={}),this.fire(new o.Event("dataloading",{dataType:"style"}));var P=typeof y.validate=="boolean"?y.validate:!o.isMapboxURL(p);p=this.map._requestManager.normalizeStyleURL(p,y.accessToken);var M=this.map._requestManager.transformRequest(p,o.ResourceType.Style);this._request=o.getJSON(M,function(N,q){S._request=null,N?S.fire(new o.ErrorEvent(N)):q&&S._load(q,P)})},d.prototype.loadJSON=function(p,y){var S=this;y===void 0&&(y={}),this.fire(new o.Event("dataloading",{dataType:"style"})),this._request=o.browser.frame(function(){S._request=null,S._load(p,y.validate!==!1)})},d.prototype.loadEmpty=function(){this.fire(new o.Event("dataloading",{dataType:"style"})),this._load(gr,!1)},d.prototype._load=function(p,y){if(!y||!Ea(this,o.validateStyle(p))){for(var S in this._loaded=!0,this.stylesheet=p,p.sources)this.addSource(S,p.sources[S],{validate:!1});p.sprite?this._loadSprite(p.sprite):this.imageManager.setLoaded(!0),this.glyphManager.setURL(p.glyphs);var P=Me(this.stylesheet.layers);this._order=P.map(function(X){return X.id}),this._layers={},this._serializedLayers={};for(var M=0,N=P;M<N.length;M+=1){var q=N[M];(q=o.createStyleLayer(q)).setEventedParent(this,{layer:{id:q.id}}),this._layers[q.id]=q,this._serializedLayers[q.id]=q.serialize()}this.dispatcher.broadcast("setLayers",this._serializeLayers(this._order)),this.light=new Ne(this.stylesheet.light),this.fire(new o.Event("data",{dataType:"style"})),this.fire(new o.Event("style.load"))}},d.prototype._loadSprite=function(p){var y=this;this._spriteRequest=function(S,P,M){var N,q,X,it=o.browser.devicePixelRatio>1?"@2x":"",st=o.getJSON(P.transformRequest(P.normalizeSpriteURL(S,it,".json"),o.ResourceType.SpriteJSON),function(yt,Ct){st=null,X||(X=yt,N=Ct,xt())}),ct=o.getImage(P.transformRequest(P.normalizeSpriteURL(S,it,".png"),o.ResourceType.SpriteImage),function(yt,Ct){ct=null,X||(X=yt,q=Ct,xt())});function xt(){if(X)M(X);else if(N&&q){var yt=o.browser.getImageData(q),Ct={};for(var gt in N){var It=N[gt],Lt=It.width,jt=It.height,ne=It.x,Jt=It.y,ae=It.sdf,ge=It.pixelRatio,we=It.stretchX,Te=It.stretchY,je=It.content,an=new o.RGBAImage({width:Lt,height:jt});o.RGBAImage.copy(yt,an,{x:ne,y:Jt},{x:0,y:0},{width:Lt,height:jt}),Ct[gt]={data:an,pixelRatio:ge,sdf:ae,stretchX:we,stretchY:Te,content:je}}M(null,Ct)}}return{cancel:function(){st&&(st.cancel(),st=null),ct&&(ct.cancel(),ct=null)}}}(p,this.map._requestManager,function(S,P){if(y._spriteRequest=null,S)y.fire(new o.ErrorEvent(S));else if(P)for(var M in P)y.imageManager.addImage(M,P[M]);y.imageManager.setLoaded(!0),y._availableImages=y.imageManager.listImages(),y.dispatcher.broadcast("setImages",y._availableImages),y.fire(new o.Event("data",{dataType:"style"}))})},d.prototype._validateLayer=function(p){var y=this.sourceCaches[p.source];if(y){var S=p.sourceLayer;if(S){var P=y.getSource();(P.type==="geojson"||P.vectorLayerIds&&P.vectorLayerIds.indexOf(S)===-1)&&this.fire(new o.ErrorEvent(new Error('Source layer "'+S+'" does not exist on source "'+P.id+'" as specified by style layer "'+p.id+'"')))}}},d.prototype.loaded=function(){if(!this._loaded||Object.keys(this._updatedSources).length)return!1;for(var p in this.sourceCaches)if(!this.sourceCaches[p].loaded())return!1;return!!this.imageManager.isLoaded()},d.prototype._serializeLayers=function(p){for(var y=[],S=0,P=p;S<P.length;S+=1){var M=this._layers[P[S]];M.type!=="custom"&&y.push(M.serialize())}return y},d.prototype.hasTransitions=function(){if(this.light&&this.light.hasTransition())return!0;for(var p in this.sourceCaches)if(this.sourceCaches[p].hasTransition())return!0;for(var y in this._layers)if(this._layers[y].hasTransition())return!0;return!1},d.prototype._checkLoaded=function(){if(!this._loaded)throw new Error("Style is not done loading")},d.prototype.update=function(p){if(this._loaded){var y=this._changed;if(this._changed){var S=Object.keys(this._updatedLayers),P=Object.keys(this._removedLayers);for(var M in(S.length||P.length)&&this._updateWorkerLayers(S,P),this._updatedSources){var N=this._updatedSources[M];N==="reload"?this._reloadSource(M):N==="clear"&&this._clearSource(M)}for(var q in this._updateTilesForChangedImages(),this._updatedPaintProps)this._layers[q].updateTransitions(p);this.light.updateTransitions(p),this._resetUpdates()}var X={};for(var it in this.sourceCaches){var st=this.sourceCaches[it];X[it]=st.used,st.used=!1}for(var ct=0,xt=this._order;ct<xt.length;ct+=1){var yt=this._layers[xt[ct]];yt.recalculate(p,this._availableImages),!yt.isHidden(p.zoom)&&yt.source&&(this.sourceCaches[yt.source].used=!0)}for(var Ct in X){var gt=this.sourceCaches[Ct];X[Ct]!==gt.used&>.fire(new o.Event("data",{sourceDataType:"visibility",dataType:"source",sourceId:Ct}))}this.light.recalculate(p),this.z=p.zoom,y&&this.fire(new o.Event("data",{dataType:"style"}))}},d.prototype._updateTilesForChangedImages=function(){var p=Object.keys(this._changedImages);if(p.length){for(var y in this.sourceCaches)this.sourceCaches[y].reloadTilesForDependencies(["icons","patterns"],p);this._changedImages={}}},d.prototype._updateWorkerLayers=function(p,y){this.dispatcher.broadcast("updateLayers",{layers:this._serializeLayers(p),removedIds:y})},d.prototype._resetUpdates=function(){this._changed=!1,this._updatedLayers={},this._removedLayers={},this._updatedSources={},this._updatedPaintProps={},this._changedImages={}},d.prototype.setState=function(p){var y=this;if(this._checkLoaded(),Ea(this,o.validateStyle(p)))return!1;(p=o.clone$1(p)).layers=Me(p.layers);var S=function(M,N){if(!M)return[{command:Re.setStyle,args:[N]}];var q=[];try{if(!o.deepEqual(M.version,N.version))return[{command:Re.setStyle,args:[N]}];o.deepEqual(M.center,N.center)||q.push({command:Re.setCenter,args:[N.center]}),o.deepEqual(M.zoom,N.zoom)||q.push({command:Re.setZoom,args:[N.zoom]}),o.deepEqual(M.bearing,N.bearing)||q.push({command:Re.setBearing,args:[N.bearing]}),o.deepEqual(M.pitch,N.pitch)||q.push({command:Re.setPitch,args:[N.pitch]}),o.deepEqual(M.sprite,N.sprite)||q.push({command:Re.setSprite,args:[N.sprite]}),o.deepEqual(M.glyphs,N.glyphs)||q.push({command:Re.setGlyphs,args:[N.glyphs]}),o.deepEqual(M.transition,N.transition)||q.push({command:Re.setTransition,args:[N.transition]}),o.deepEqual(M.light,N.light)||q.push({command:Re.setLight,args:[N.light]});var X={},it=[];(function(ct,xt,yt,Ct){var gt;for(gt in xt=xt||{},ct=ct||{})ct.hasOwnProperty(gt)&&(xt.hasOwnProperty(gt)||$e(gt,yt,Ct));for(gt in xt)xt.hasOwnProperty(gt)&&(ct.hasOwnProperty(gt)?o.deepEqual(ct[gt],xt[gt])||(ct[gt].type==="geojson"&&xt[gt].type==="geojson"&&Rr(ct,xt,gt)?yt.push({command:Re.setGeoJSONSourceData,args:[gt,xt[gt].data]}):Qn(gt,xt,yt,Ct)):Mn(gt,xt,yt))})(M.sources,N.sources,it,X);var st=[];M.layers&&M.layers.forEach(function(ct){X[ct.source]?q.push({command:Re.removeLayer,args:[ct.id]}):st.push(ct)}),q=q.concat(it),function(ct,xt,yt){xt=xt||[];var Ct,gt,It,Lt,jt,ne,Jt,ae=(ct=ct||[]).map(hr),ge=xt.map(hr),we=ct.reduce(tr,{}),Te=xt.reduce(tr,{}),je=ae.slice(),an=Object.create(null);for(Ct=0,gt=0;Ct<ae.length;Ct++)Te.hasOwnProperty(It=ae[Ct])?gt++:(yt.push({command:Re.removeLayer,args:[It]}),je.splice(je.indexOf(It,gt),1));for(Ct=0,gt=0;Ct<ge.length;Ct++)je[je.length-1-Ct]!==(It=ge[ge.length-1-Ct])&&(we.hasOwnProperty(It)?(yt.push({command:Re.removeLayer,args:[It]}),je.splice(je.lastIndexOf(It,je.length-gt),1)):gt++,yt.push({command:Re.addLayer,args:[Te[It],ne=je[je.length-Ct]]}),je.splice(je.length-Ct,0,It),an[It]=!0);for(Ct=0;Ct<ge.length;Ct++)if(Lt=we[It=ge[Ct]],jt=Te[It],!an[It]&&!o.deepEqual(Lt,jt))if(o.deepEqual(Lt.source,jt.source)&&o.deepEqual(Lt["source-layer"],jt["source-layer"])&&o.deepEqual(Lt.type,jt.type)){for(Jt in wn(Lt.layout,jt.layout,yt,It,null,Re.setLayoutProperty),wn(Lt.paint,jt.paint,yt,It,null,Re.setPaintProperty),o.deepEqual(Lt.filter,jt.filter)||yt.push({command:Re.setFilter,args:[It,jt.filter]}),o.deepEqual(Lt.minzoom,jt.minzoom)&&o.deepEqual(Lt.maxzoom,jt.maxzoom)||yt.push({command:Re.setLayerZoomRange,args:[It,jt.minzoom,jt.maxzoom]}),Lt)Lt.hasOwnProperty(Jt)&&Jt!=="layout"&&Jt!=="paint"&&Jt!=="filter"&&Jt!=="metadata"&&Jt!=="minzoom"&&Jt!=="maxzoom"&&(Jt.indexOf("paint.")===0?wn(Lt[Jt],jt[Jt],yt,It,Jt.slice(6),Re.setPaintProperty):o.deepEqual(Lt[Jt],jt[Jt])||yt.push({command:Re.setLayerProperty,args:[It,Jt,jt[Jt]]}));for(Jt in jt)jt.hasOwnProperty(Jt)&&!Lt.hasOwnProperty(Jt)&&Jt!=="layout"&&Jt!=="paint"&&Jt!=="filter"&&Jt!=="metadata"&&Jt!=="minzoom"&&Jt!=="maxzoom"&&(Jt.indexOf("paint.")===0?wn(Lt[Jt],jt[Jt],yt,It,Jt.slice(6),Re.setPaintProperty):o.deepEqual(Lt[Jt],jt[Jt])||yt.push({command:Re.setLayerProperty,args:[It,Jt,jt[Jt]]}))}else yt.push({command:Re.removeLayer,args:[It]}),ne=je[je.lastIndexOf(It)+1],yt.push({command:Re.addLayer,args:[jt,ne]})}(st,N.layers,q)}catch(ct){console.warn("Unable to compute style diff:",ct),q=[{command:Re.setStyle,args:[N]}]}return q}(this.serialize(),p).filter(function(M){return!(M.command in er)});if(S.length===0)return!1;var P=S.filter(function(M){return!(M.command in Wo)});if(P.length>0)throw new Error("Unimplemented: "+P.map(function(M){return M.command}).join(", ")+".");return S.forEach(function(M){M.command!=="setTransition"&&y[M.command].apply(y,M.args)}),this.stylesheet=p,!0},d.prototype.addImage=function(p,y){if(this.getImage(p))return this.fire(new o.ErrorEvent(new Error("An image with this name already exists.")));this.imageManager.addImage(p,y),this._afterImageUpdated(p)},d.prototype.updateImage=function(p,y){this.imageManager.updateImage(p,y)},d.prototype.getImage=function(p){return this.imageManager.getImage(p)},d.prototype.removeImage=function(p){if(!this.getImage(p))return this.fire(new o.ErrorEvent(new Error("No image with this name exists.")));this.imageManager.removeImage(p),this._afterImageUpdated(p)},d.prototype._afterImageUpdated=function(p){this._availableImages=this.imageManager.listImages(),this._changedImages[p]=!0,this._changed=!0,this.dispatcher.broadcast("setImages",this._availableImages),this.fire(new o.Event("data",{dataType:"style"}))},d.prototype.listImages=function(){return this._checkLoaded(),this.imageManager.listImages()},d.prototype.addSource=function(p,y,S){var P=this;if(S===void 0&&(S={}),this._checkLoaded(),this.sourceCaches[p]!==void 0)throw new Error("There is already a source with this ID");if(!y.type)throw new Error("The type property must be defined, but only the following properties were given: "+Object.keys(y).join(", ")+".");if(!(["vector","raster","geojson","video","image"].indexOf(y.type)>=0&&this._validate(o.validateStyle.source,"sources."+p,y,null,S))){this.map&&this.map._collectResourceTiming&&(y.collectResourceTiming=!0);var M=this.sourceCaches[p]=new bt(p,y,this.dispatcher);M.style=this,M.setEventedParent(this,function(){return{isSourceLoaded:P.loaded(),source:M.serialize(),sourceId:p}}),M.onAdd(this.map),this._changed=!0}},d.prototype.removeSource=function(p){if(this._checkLoaded(),this.sourceCaches[p]===void 0)throw new Error("There is no source with this ID");for(var y in this._layers)if(this._layers[y].source===p)return this.fire(new o.ErrorEvent(new Error('Source "'+p+'" cannot be removed while layer "'+y+'" is using it.')));var S=this.sourceCaches[p];delete this.sourceCaches[p],delete this._updatedSources[p],S.fire(new o.Event("data",{sourceDataType:"metadata",dataType:"source",sourceId:p})),S.setEventedParent(null),S.clearTiles(),S.onRemove&&S.onRemove(this.map),this._changed=!0},d.prototype.setGeoJSONSourceData=function(p,y){this._checkLoaded(),this.sourceCaches[p].getSource().setData(y),this._changed=!0},d.prototype.getSource=function(p){return this.sourceCaches[p]&&this.sourceCaches[p].getSource()},d.prototype.addLayer=function(p,y,S){S===void 0&&(S={}),this._checkLoaded();var P=p.id;if(this.getLayer(P))this.fire(new o.ErrorEvent(new Error('Layer with id "'+P+'" already exists on this map')));else{var M;if(p.type==="custom"){if(Ea(this,o.validateCustomStyleLayer(p)))return;M=o.createStyleLayer(p)}else{if(typeof p.source=="object"&&(this.addSource(P,p.source),p=o.clone$1(p),p=o.extend(p,{source:P})),this._validate(o.validateStyle.layer,"layers."+P,p,{arrayIndex:-1},S))return;M=o.createStyleLayer(p),this._validateLayer(M),M.setEventedParent(this,{layer:{id:P}}),this._serializedLayers[M.id]=M.serialize()}var N=y?this._order.indexOf(y):this._order.length;if(y&&N===-1)this.fire(new o.ErrorEvent(new Error('Layer with id "'+y+'" does not exist on this map.')));else{if(this._order.splice(N,0,P),this._layerOrderChanged=!0,this._layers[P]=M,this._removedLayers[P]&&M.source&&M.type!=="custom"){var q=this._removedLayers[P];delete this._removedLayers[P],q.type!==M.type?this._updatedSources[M.source]="clear":(this._updatedSources[M.source]="reload",this.sourceCaches[M.source].pause())}this._updateLayer(M),M.onAdd&&M.onAdd(this.map)}}},d.prototype.moveLayer=function(p,y){if(this._checkLoaded(),this._changed=!0,this._layers[p]){if(p!==y){var S=this._order.indexOf(p);this._order.splice(S,1);var P=y?this._order.indexOf(y):this._order.length;y&&P===-1?this.fire(new o.ErrorEvent(new Error('Layer with id "'+y+'" does not exist on this map.'))):(this._order.splice(P,0,p),this._layerOrderChanged=!0)}}else this.fire(new o.ErrorEvent(new Error("The layer '"+p+"' does not exist in the map's style and cannot be moved.")))},d.prototype.removeLayer=function(p){this._checkLoaded();var y=this._layers[p];if(y){y.setEventedParent(null);var S=this._order.indexOf(p);this._order.splice(S,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[p]=y,delete this._layers[p],delete this._serializedLayers[p],delete this._updatedLayers[p],delete this._updatedPaintProps[p],y.onRemove&&y.onRemove(this.map)}else this.fire(new o.ErrorEvent(new Error("The layer '"+p+"' does not exist in the map's style and cannot be removed.")))},d.prototype.getLayer=function(p){return this._layers[p]},d.prototype.hasLayer=function(p){return p in this._layers},d.prototype.setLayerZoomRange=function(p,y,S){this._checkLoaded();var P=this.getLayer(p);P?P.minzoom===y&&P.maxzoom===S||(y!=null&&(P.minzoom=y),S!=null&&(P.maxzoom=S),this._updateLayer(P)):this.fire(new o.ErrorEvent(new Error("The layer '"+p+"' does not exist in the map's style and cannot have zoom extent.")))},d.prototype.setFilter=function(p,y,S){S===void 0&&(S={}),this._checkLoaded();var P=this.getLayer(p);if(P){if(!o.deepEqual(P.filter,y))return y==null?(P.filter=void 0,void this._updateLayer(P)):void(this._validate(o.validateStyle.filter,"layers."+P.id+".filter",y,null,S)||(P.filter=o.clone$1(y),this._updateLayer(P)))}else this.fire(new o.ErrorEvent(new Error("The layer '"+p+"' does not exist in the map's style and cannot be filtered.")))},d.prototype.getFilter=function(p){return o.clone$1(this.getLayer(p).filter)},d.prototype.setLayoutProperty=function(p,y,S,P){P===void 0&&(P={}),this._checkLoaded();var M=this.getLayer(p);M?o.deepEqual(M.getLayoutProperty(y),S)||(M.setLayoutProperty(y,S,P),this._updateLayer(M)):this.fire(new o.ErrorEvent(new Error("The layer '"+p+"' does not exist in the map's style and cannot be styled.")))},d.prototype.getLayoutProperty=function(p,y){var S=this.getLayer(p);if(S)return S.getLayoutProperty(y);this.fire(new o.ErrorEvent(new Error("The layer '"+p+"' does not exist in the map's style.")))},d.prototype.setPaintProperty=function(p,y,S,P){P===void 0&&(P={}),this._checkLoaded();var M=this.getLayer(p);M?o.deepEqual(M.getPaintProperty(y),S)||(M.setPaintProperty(y,S,P)&&this._updateLayer(M),this._changed=!0,this._updatedPaintProps[p]=!0):this.fire(new o.ErrorEvent(new Error("The layer '"+p+"' does not exist in the map's style and cannot be styled.")))},d.prototype.getPaintProperty=function(p,y){return this.getLayer(p).getPaintProperty(y)},d.prototype.setFeatureState=function(p,y){this._checkLoaded();var S=p.source,P=p.sourceLayer,M=this.sourceCaches[S];if(M!==void 0){var N=M.getSource().type;N==="geojson"&&P?this.fire(new o.ErrorEvent(new Error("GeoJSON sources cannot have a sourceLayer parameter."))):N!=="vector"||P?(p.id===void 0&&this.fire(new o.ErrorEvent(new Error("The feature id parameter must be provided."))),M.setFeatureState(P,p.id,y)):this.fire(new o.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")))}else this.fire(new o.ErrorEvent(new Error("The source '"+S+"' does not exist in the map's style.")))},d.prototype.removeFeatureState=function(p,y){this._checkLoaded();var S=p.source,P=this.sourceCaches[S];if(P!==void 0){var M=P.getSource().type,N=M==="vector"?p.sourceLayer:void 0;M!=="vector"||N?y&&typeof p.id!="string"&&typeof p.id!="number"?this.fire(new o.ErrorEvent(new Error("A feature id is required to remove its specific state property."))):P.removeFeatureState(N,p.id,y):this.fire(new o.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")))}else this.fire(new o.ErrorEvent(new Error("The source '"+S+"' does not exist in the map's style.")))},d.prototype.getFeatureState=function(p){this._checkLoaded();var y=p.source,S=p.sourceLayer,P=this.sourceCaches[y];if(P!==void 0){if(P.getSource().type!=="vector"||S)return p.id===void 0&&this.fire(new o.ErrorEvent(new Error("The feature id parameter must be provided."))),P.getFeatureState(S,p.id);this.fire(new o.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")))}else this.fire(new o.ErrorEvent(new Error("The source '"+y+"' does not exist in the map's style.")))},d.prototype.getTransition=function(){return o.extend({duration:300,delay:0},this.stylesheet&&this.stylesheet.transition)},d.prototype.serialize=function(){return o.filterObject({version:this.stylesheet.version,name:this.stylesheet.name,metadata:this.stylesheet.metadata,light:this.stylesheet.light,center:this.stylesheet.center,zoom:this.stylesheet.zoom,bearing:this.stylesheet.bearing,pitch:this.stylesheet.pitch,sprite:this.stylesheet.sprite,glyphs:this.stylesheet.glyphs,transition:this.stylesheet.transition,sources:o.mapObject(this.sourceCaches,function(p){return p.serialize()}),layers:this._serializeLayers(this._order)},function(p){return p!==void 0})},d.prototype._updateLayer=function(p){this._updatedLayers[p.id]=!0,p.source&&!this._updatedSources[p.source]&&this.sourceCaches[p.source].getSource().type!=="raster"&&(this._updatedSources[p.source]="reload",this.sourceCaches[p.source].pause()),this._changed=!0},d.prototype._flattenAndSortRenderedFeatures=function(p){for(var y=this,S=function(we){return y._layers[we].type==="fill-extrusion"},P={},M=[],N=this._order.length-1;N>=0;N--){var q=this._order[N];if(S(q)){P[q]=N;for(var X=0,it=p;X<it.length;X+=1){var st=it[X][q];if(st)for(var ct=0,xt=st;ct<xt.length;ct+=1)M.push(xt[ct])}}}M.sort(function(we,Te){return Te.intersectionZ-we.intersectionZ});for(var yt=[],Ct=this._order.length-1;Ct>=0;Ct--){var gt=this._order[Ct];if(S(gt))for(var It=M.length-1;It>=0;It--){var Lt=M[It].feature;if(P[Lt.layer.id]<Ct)break;yt.push(Lt),M.pop()}else for(var jt=0,ne=p;jt<ne.length;jt+=1){var Jt=ne[jt][gt];if(Jt)for(var ae=0,ge=Jt;ae<ge.length;ae+=1)yt.push(ge[ae].feature)}}return yt},d.prototype.queryRenderedFeatures=function(p,y,S){y&&y.filter&&this._validate(o.validateStyle.filter,"queryRenderedFeatures.filter",y.filter,null,y);var P={};if(y&&y.layers){if(!Array.isArray(y.layers))return this.fire(new o.ErrorEvent(new Error("parameters.layers must be an Array."))),[];for(var M=0,N=y.layers;M<N.length;M+=1){var q=N[M],X=this._layers[q];if(!X)return this.fire(new o.ErrorEvent(new Error("The layer '"+q+"' does not exist in the map's style and cannot be queried for features."))),[];P[X.source]=!0}}var it=[];for(var st in y.availableImages=this._availableImages,this.sourceCaches)y.layers&&!P[st]||it.push(cr(this.sourceCaches[st],this._layers,this._serializedLayers,p,y,S));return this.placement&&it.push(function(ct,xt,yt,Ct,gt,It,Lt){for(var jt={},ne=It.queryRenderedSymbols(Ct),Jt=[],ae=0,ge=Object.keys(ne).map(Number);ae<ge.length;ae+=1)Jt.push(Lt[ge[ae]]);Jt.sort(Fi);for(var we=function(){var vn=je[Te],Ir=vn.featureIndex.lookupSymbolFeatures(ne[vn.bucketInstanceId],xt,vn.bucketIndex,vn.sourceLayerIndex,gt.filter,gt.layers,gt.availableImages,ct);for(var Qe in Ir){var bn=jt[Qe]=jt[Qe]||[],Wn=Ir[Qe];Wn.sort(function(Hn,An){var ln=vn.featureSortOrder;if(ln){var Ro=ln.indexOf(Hn.featureIndex);return ln.indexOf(An.featureIndex)-Ro}return An.featureIndex-Hn.featureIndex});for(var On=0,Pn=Wn;On<Pn.length;On+=1)bn.push(Pn[On])}},Te=0,je=Jt;Te<je.length;Te+=1)we();var an=function(vn){jt[vn].forEach(function(Ir){var Qe=Ir.feature,bn=yt[ct[vn].source].getFeatureState(Qe.layer["source-layer"],Qe.id);Qe.source=Qe.layer.source,Qe.layer["source-layer"]&&(Qe.sourceLayer=Qe.layer["source-layer"]),Qe.state=bn})};for(var _n in jt)an(_n);return jt}(this._layers,this._serializedLayers,this.sourceCaches,p,y,this.placement.collisionIndex,this.placement.retainedQueryData)),this._flattenAndSortRenderedFeatures(it)},d.prototype.querySourceFeatures=function(p,y){y&&y.filter&&this._validate(o.validateStyle.filter,"querySourceFeatures.filter",y.filter,null,y);var S=this.sourceCaches[p];return S?function(P,M){for(var N=P.getRenderableIds().map(function(xt){return P.getTileByID(xt)}),q=[],X={},it=0;it<N.length;it++){var st=N[it],ct=st.tileID.canonical.key;X[ct]||(X[ct]=!0,st.querySourceFeatures(q,M))}return q}(S,y):[]},d.prototype.addSourceType=function(p,y,S){return d.getSourceType(p)?S(new Error('A source type called "'+p+'" already exists.')):(d.setSourceType(p,y),y.workerSourceURL?void this.dispatcher.broadcast("loadWorkerSource",{name:p,url:y.workerSourceURL},S):S(null,null))},d.prototype.getLight=function(){return this.light.getLight()},d.prototype.setLight=function(p,y){y===void 0&&(y={}),this._checkLoaded();var S=this.light.getLight(),P=!1;for(var M in p)if(!o.deepEqual(p[M],S[M])){P=!0;break}if(P){var N={now:o.browser.now(),transition:o.extend({duration:300,delay:0},this.stylesheet.transition)};this.light.setLight(p,y),this.light.updateTransitions(N)}},d.prototype._validate=function(p,y,S,P,M){return M===void 0&&(M={}),(!M||M.validate!==!1)&&Ea(this,p.call(o.validateStyle,o.extend({key:y,style:this.serialize(),value:S,styleSpec:o.styleSpec},P)))},d.prototype._remove=function(){for(var p in this._request&&(this._request.cancel(),this._request=null),this._spriteRequest&&(this._spriteRequest.cancel(),this._spriteRequest=null),o.evented.off("pluginStateChange",this._rtlTextPluginCallback),this._layers)this._layers[p].setEventedParent(null);for(var y in this.sourceCaches)this.sourceCaches[y].clearTiles(),this.sourceCaches[y].setEventedParent(null);this.imageManager.setEventedParent(null),this.setEventedParent(null),this.dispatcher.remove()},d.prototype._clearSource=function(p){this.sourceCaches[p].clearTiles()},d.prototype._reloadSource=function(p){this.sourceCaches[p].resume(),this.sourceCaches[p].reload()},d.prototype._updateSources=function(p){for(var y in this.sourceCaches)this.sourceCaches[y].update(p)},d.prototype._generateCollisionBoxes=function(){for(var p in this.sourceCaches)this._reloadSource(p)},d.prototype._updatePlacement=function(p,y,S,P,M){M===void 0&&(M=!1);for(var N=!1,q=!1,X={},it=0,st=this._order;it<st.length;it+=1){var ct=this._layers[st[it]];if(ct.type==="symbol"){if(!X[ct.source]){var xt=this.sourceCaches[ct.source];X[ct.source]=xt.getRenderableIds(!0).map(function(Lt){return xt.getTileByID(Lt)}).sort(function(Lt,jt){return jt.tileID.overscaledZ-Lt.tileID.overscaledZ||(Lt.tileID.isLessThan(jt.tileID)?-1:1)})}var yt=this.crossTileSymbolIndex.addLayer(ct,X[ct.source],p.center.lng);N=N||yt}}if(this.crossTileSymbolIndex.pruneUnusedLayers(this._order),((M=M||this._layerOrderChanged||S===0)||!this.pauseablePlacement||this.pauseablePlacement.isDone()&&!this.placement.stillRecent(o.browser.now(),p.zoom))&&(this.pauseablePlacement=new le(p,this._order,M,y,S,P,this.placement),this._layerOrderChanged=!1),this.pauseablePlacement.isDone()?this.placement.setStale():(this.pauseablePlacement.continuePlacement(this._order,this._layers,X),this.pauseablePlacement.isDone()&&(this.placement=this.pauseablePlacement.commit(o.browser.now()),q=!0),N&&this.pauseablePlacement.placement.setStale()),q||N)for(var Ct=0,gt=this._order;Ct<gt.length;Ct+=1){var It=this._layers[gt[Ct]];It.type==="symbol"&&this.placement.updateLayerOpacities(It,X[It.source])}return!this.pauseablePlacement.isDone()||this.placement.hasTransitions(o.browser.now())},d.prototype._releaseSymbolFadeTiles=function(){for(var p in this.sourceCaches)this.sourceCaches[p].releaseSymbolFadeTiles()},d.prototype.getImages=function(p,y,S){this.imageManager.getImages(y.icons,S),this._updateTilesForChangedImages();var P=this.sourceCaches[y.source];P&&P.setDependencies(y.tileID.key,y.type,y.icons)},d.prototype.getGlyphs=function(p,y,S){this.glyphManager.getGlyphs(y.stacks,S)},d.prototype.getResource=function(p,y,S){return o.makeRequest(y,S)},d}(o.Evented);Ln.getSourceType=function(h){return Jn[h]},Ln.setSourceType=function(h,d){Jn[h]=d},Ln.registerForPluginStateChange=o.registerForPluginStateChange;var Oi=o.createLayout([{name:"a_pos",type:"Int16",components:2}]),Vu=jr(`#ifdef GL_ES precision mediump float; #else #if !defined(lowp) #define lowp #endif #if !defined(mediump) #define mediump #endif #if !defined(highp) #define highp #endif #endif`,`#ifdef GL_ES precision highp float; #else #if !defined(lowp) #define lowp #endif #if !defined(mediump) #define mediump #endif #if !defined(highp) #define highp #endif #endif vec2 unpack_float(const float packedValue) {int packedIntValue=int(packedValue);int v0=packedIntValue/256;return vec2(v0,packedIntValue-v0*256);}vec2 unpack_opacity(const float packedOpacity) {int intOpacity=int(packedOpacity)/2;return vec2(float(intOpacity)/127.0,mod(packedOpacity,2.0));}vec4 decode_color(const vec2 encodedColor) {return vec4(unpack_float(encodedColor[0])/255.0,unpack_float(encodedColor[1])/255.0 );}float unpack_mix_vec2(const vec2 packedValue,const float t) {return mix(packedValue[0],packedValue[1],t);}vec4 unpack_mix_color(const vec4 packedColors,const float t) {vec4 minColor=decode_color(vec2(packedColors[0],packedColors[1]));vec4 maxColor=decode_color(vec2(packedColors[2],packedColors[3]));return mix(minColor,maxColor,t);}vec2 get_pattern_pos(const vec2 pixel_coord_upper,const vec2 pixel_coord_lower,const vec2 pattern_size,const float tile_units_to_pixels,const vec2 pos) {vec2 offset=mod(mod(mod(pixel_coord_upper,pattern_size)*256.0,pattern_size)*256.0+pixel_coord_lower,pattern_size);return (tile_units_to_pixels*pos+offset)/pattern_size;}`),mu=jr(`uniform vec4 u_color;uniform float u_opacity;void main() {gl_FragColor=u_color*u_opacity; #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif }`,"attribute vec2 a_pos;uniform mat4 u_matrix;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);}"),Tg=jr(`uniform vec2 u_pattern_tl_a;uniform vec2 u_pattern_br_a;uniform vec2 u_pattern_tl_b;uniform vec2 u_pattern_br_b;uniform vec2 u_texsize;uniform float u_mix;uniform float u_opacity;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;void main() {vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(u_pattern_tl_a/u_texsize,u_pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(u_pattern_tl_b/u_texsize,u_pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);gl_FragColor=mix(color1,color2,u_mix)*u_opacity; #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif }`,"uniform mat4 u_matrix;uniform vec2 u_pattern_size_a;uniform vec2 u_pattern_size_b;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_scale_a;uniform float u_scale_b;uniform float u_tile_units_to_pixels;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,u_scale_a*u_pattern_size_a,u_tile_units_to_pixels,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,u_scale_b*u_pattern_size_b,u_tile_units_to_pixels,a_pos);}"),Mg=jr(`varying vec3 v_data; #pragma mapbox: define highp vec4 color #pragma mapbox: define mediump float radius #pragma mapbox: define lowp float blur #pragma mapbox: define lowp float opacity #pragma mapbox: define highp vec4 stroke_color #pragma mapbox: define mediump float stroke_width #pragma mapbox: define lowp float stroke_opacity void main() { #pragma mapbox: initialize highp vec4 color #pragma mapbox: initialize mediump float radius #pragma mapbox: initialize lowp float blur #pragma mapbox: initialize lowp float opacity #pragma mapbox: initialize highp vec4 stroke_color #pragma mapbox: initialize mediump float stroke_width #pragma mapbox: initialize lowp float stroke_opacity vec2 extrude=v_data.xy;float extrude_length=length(extrude);lowp float antialiasblur=v_data.z;float antialiased_blur=-max(blur,antialiasblur);float opacity_t=smoothstep(0.0,antialiased_blur,extrude_length-1.0);float color_t=stroke_width < 0.01 ? 0.0 : smoothstep(antialiased_blur,0.0,extrude_length-radius/(radius+stroke_width));gl_FragColor=opacity_t*mix(color*opacity,stroke_color*stroke_opacity,color_t); #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif }`,`uniform mat4 u_matrix;uniform bool u_scale_with_map;uniform bool u_pitch_with_map;uniform vec2 u_extrude_scale;uniform lowp float u_device_pixel_ratio;uniform highp float u_camera_to_center_distance;attribute vec2 a_pos;varying vec3 v_data; #pragma mapbox: define highp vec4 color #pragma mapbox: define mediump float radius #pragma mapbox: define lowp float blur #pragma mapbox: define lowp float opacity #pragma mapbox: define highp vec4 stroke_color #pragma mapbox: define mediump float stroke_width #pragma mapbox: define lowp float stroke_opacity void main(void) { #pragma mapbox: initialize highp vec4 color #pragma mapbox: initialize mediump float radius #pragma mapbox: initialize lowp float blur #pragma mapbox: initialize lowp float opacity #pragma mapbox: initialize highp vec4 stroke_color #pragma mapbox: initialize mediump float stroke_width #pragma mapbox: initialize lowp float stroke_opacity vec2 extrude=vec2(mod(a_pos,2.0)*2.0-1.0);vec2 circle_center=floor(a_pos*0.5);if (u_pitch_with_map) {vec2 corner_position=circle_center;if (u_scale_with_map) {corner_position+=extrude*(radius+stroke_width)*u_extrude_scale;} else {vec4 projected_center=u_matrix*vec4(circle_center,0,1);corner_position+=extrude*(radius+stroke_width)*u_extrude_scale*(projected_center.w/u_camera_to_center_distance);}gl_Position=u_matrix*vec4(corner_position,0,1);} else {gl_Position=u_matrix*vec4(circle_center,0,1);if (u_scale_with_map) {gl_Position.xy+=extrude*(radius+stroke_width)*u_extrude_scale*u_camera_to_center_distance;} else {gl_Position.xy+=extrude*(radius+stroke_width)*u_extrude_scale*gl_Position.w;}}lowp float antialiasblur=1.0/u_device_pixel_ratio/(radius+stroke_width);v_data=vec3(extrude.x,extrude.y,antialiasblur);}`),_d=jr("void main() {gl_FragColor=vec4(1.0);}","attribute vec2 a_pos;uniform mat4 u_matrix;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);}"),Ah=jr(`uniform highp float u_intensity;varying vec2 v_extrude; #pragma mapbox: define highp float weight #define GAUSS_COEF 0.3989422804014327 void main() { #pragma mapbox: initialize highp float weight float d=-0.5*3.0*3.0*dot(v_extrude,v_extrude);float val=weight*u_intensity*GAUSS_COEF*exp(d);gl_FragColor=vec4(val,1.0,1.0,1.0); #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif }`,`uniform mat4 u_matrix;uniform float u_extrude_scale;uniform float u_opacity;uniform float u_intensity;attribute vec2 a_pos;varying vec2 v_extrude; #pragma mapbox: define highp float weight #pragma mapbox: define mediump float radius const highp float ZERO=1.0/255.0/16.0; #define GAUSS_COEF 0.3989422804014327 void main(void) { #pragma mapbox: initialize highp float weight #pragma mapbox: initialize mediump float radius vec2 unscaled_extrude=vec2(mod(a_pos,2.0)*2.0-1.0);float S=sqrt(-2.0*log(ZERO/weight/u_intensity/GAUSS_COEF))/3.0;v_extrude=S*unscaled_extrude;vec2 extrude=v_extrude*radius*u_extrude_scale;vec4 pos=vec4(floor(a_pos*0.5)+extrude,0,1);gl_Position=u_matrix*pos;}`),Of=jr(`uniform sampler2D u_image;uniform sampler2D u_color_ramp;uniform float u_opacity;varying vec2 v_pos;void main() {float t=texture2D(u_image,v_pos).r;vec4 color=texture2D(u_color_ramp,vec2(t,0.5));gl_FragColor=color*u_opacity; #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(0.0); #endif }`,"uniform mat4 u_matrix;uniform vec2 u_world;attribute vec2 a_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos*u_world,0,1);v_pos.x=a_pos.x;v_pos.y=1.0-a_pos.y;}"),Ao=jr("varying float v_placed;varying float v_notUsed;void main() {float alpha=0.5;gl_FragColor=vec4(1.0,0.0,0.0,1.0)*alpha;if (v_placed > 0.5) {gl_FragColor=vec4(0.0,0.0,1.0,0.5)*alpha;}if (v_notUsed > 0.5) {gl_FragColor*=.1;}}","attribute vec2 a_pos;attribute vec2 a_anchor_pos;attribute vec2 a_extrude;attribute vec2 a_placed;attribute vec2 a_shift;uniform mat4 u_matrix;uniform vec2 u_extrude_scale;uniform float u_camera_to_center_distance;varying float v_placed;varying float v_notUsed;void main() {vec4 projectedPoint=u_matrix*vec4(a_anchor_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float collision_perspective_ratio=clamp(0.5+0.5*(u_camera_to_center_distance/camera_to_anchor_distance),0.0,4.0);gl_Position=u_matrix*vec4(a_pos,0.0,1.0);gl_Position.xy+=(a_extrude+a_shift)*u_extrude_scale*gl_Position.w*collision_perspective_ratio;v_placed=a_placed.x;v_notUsed=a_placed.y;}"),Lh=jr("varying float v_radius;varying vec2 v_extrude;varying float v_perspective_ratio;varying float v_collision;void main() {float alpha=0.5*min(v_perspective_ratio,1.0);float stroke_radius=0.9*max(v_perspective_ratio,1.0);float distance_to_center=length(v_extrude);float distance_to_edge=abs(distance_to_center-v_radius);float opacity_t=smoothstep(-stroke_radius,0.0,-distance_to_edge);vec4 color=mix(vec4(0.0,0.0,1.0,0.5),vec4(1.0,0.0,0.0,1.0),v_collision);gl_FragColor=color*alpha*opacity_t;}","attribute vec2 a_pos;attribute float a_radius;attribute vec2 a_flags;uniform mat4 u_matrix;uniform mat4 u_inv_matrix;uniform vec2 u_viewport_size;uniform float u_camera_to_center_distance;varying float v_radius;varying vec2 v_extrude;varying float v_perspective_ratio;varying float v_collision;vec3 toTilePosition(vec2 screenPos) {vec4 rayStart=u_inv_matrix*vec4(screenPos,-1.0,1.0);vec4 rayEnd =u_inv_matrix*vec4(screenPos, 1.0,1.0);rayStart.xyz/=rayStart.w;rayEnd.xyz /=rayEnd.w;highp float t=(0.0-rayStart.z)/(rayEnd.z-rayStart.z);return mix(rayStart.xyz,rayEnd.xyz,t);}void main() {vec2 quadCenterPos=a_pos;float radius=a_radius;float collision=a_flags.x;float vertexIdx=a_flags.y;vec2 quadVertexOffset=vec2(mix(-1.0,1.0,float(vertexIdx >=2.0)),mix(-1.0,1.0,float(vertexIdx >=1.0 && vertexIdx <=2.0)));vec2 quadVertexExtent=quadVertexOffset*radius;vec3 tilePos=toTilePosition(quadCenterPos);vec4 clipPos=u_matrix*vec4(tilePos,1.0);highp float camera_to_anchor_distance=clipPos.w;highp float collision_perspective_ratio=clamp(0.5+0.5*(u_camera_to_center_distance/camera_to_anchor_distance),0.0,4.0);float padding_factor=1.2;v_radius=radius;v_extrude=quadVertexExtent*padding_factor;v_perspective_ratio=collision_perspective_ratio;v_collision=collision;gl_Position=vec4(clipPos.xyz/clipPos.w,1.0)+vec4(quadVertexExtent*padding_factor/u_viewport_size*2.0,0.0,0.0);}"),Zl=jr("uniform highp vec4 u_color;uniform sampler2D u_overlay;varying vec2 v_uv;void main() {vec4 overlay_color=texture2D(u_overlay,v_uv);gl_FragColor=mix(u_color,overlay_color,overlay_color.a);}","attribute vec2 a_pos;varying vec2 v_uv;uniform mat4 u_matrix;uniform float u_overlay_scale;void main() {v_uv=a_pos/8192.0;gl_Position=u_matrix*vec4(a_pos*u_overlay_scale,0,1);}"),Kl=jr(`#pragma mapbox: define highp vec4 color #pragma mapbox: define lowp float opacity void main() { #pragma mapbox: initialize highp vec4 color #pragma mapbox: initialize lowp float opacity gl_FragColor=color*opacity; #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif }`,`attribute vec2 a_pos;uniform mat4 u_matrix; #pragma mapbox: define highp vec4 color #pragma mapbox: define lowp float opacity void main() { #pragma mapbox: initialize highp vec4 color #pragma mapbox: initialize lowp float opacity gl_Position=u_matrix*vec4(a_pos,0,1);}`),Jl=jr(`varying vec2 v_pos; #pragma mapbox: define highp vec4 outline_color #pragma mapbox: define lowp float opacity void main() { #pragma mapbox: initialize highp vec4 outline_color #pragma mapbox: initialize lowp float opacity float dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);gl_FragColor=outline_color*(alpha*opacity); #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif }`,`attribute vec2 a_pos;uniform mat4 u_matrix;uniform vec2 u_world;varying vec2 v_pos; #pragma mapbox: define highp vec4 outline_color #pragma mapbox: define lowp float opacity void main() { #pragma mapbox: initialize highp vec4 outline_color #pragma mapbox: initialize lowp float opacity gl_Position=u_matrix*vec4(a_pos,0,1);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;}`),Fa=jr(`uniform vec2 u_texsize;uniform sampler2D u_image;uniform float u_fade;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec2 v_pos; #pragma mapbox: define lowp float opacity #pragma mapbox: define lowp vec4 pattern_from #pragma mapbox: define lowp vec4 pattern_to void main() { #pragma mapbox: initialize lowp float opacity #pragma mapbox: initialize mediump vec4 pattern_from #pragma mapbox: initialize mediump vec4 pattern_to vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);float dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);gl_FragColor=mix(color1,color2,u_fade)*alpha*opacity; #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif }`,`uniform mat4 u_matrix;uniform vec2 u_world;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec2 v_pos; #pragma mapbox: define lowp float opacity #pragma mapbox: define lowp vec4 pattern_from #pragma mapbox: define lowp vec4 pattern_to #pragma mapbox: define lowp float pixel_ratio_from #pragma mapbox: define lowp float pixel_ratio_to void main() { #pragma mapbox: initialize lowp float opacity #pragma mapbox: initialize mediump vec4 pattern_from #pragma mapbox: initialize mediump vec4 pattern_to #pragma mapbox: initialize lowp float pixel_ratio_from #pragma mapbox: initialize lowp float pixel_ratio_to vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;gl_Position=u_matrix*vec4(a_pos,0,1);vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,a_pos);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;}`),xd=jr(`uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b; #pragma mapbox: define lowp float opacity #pragma mapbox: define lowp vec4 pattern_from #pragma mapbox: define lowp vec4 pattern_to void main() { #pragma mapbox: initialize lowp float opacity #pragma mapbox: initialize mediump vec4 pattern_from #pragma mapbox: initialize mediump vec4 pattern_to vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);gl_FragColor=mix(color1,color2,u_fade)*opacity; #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif }`,`uniform mat4 u_matrix;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b; #pragma mapbox: define lowp float opacity #pragma mapbox: define lowp vec4 pattern_from #pragma mapbox: define lowp vec4 pattern_to #pragma mapbox: define lowp float pixel_ratio_from #pragma mapbox: define lowp float pixel_ratio_to void main() { #pragma mapbox: initialize lowp float opacity #pragma mapbox: initialize mediump vec4 pattern_from #pragma mapbox: initialize mediump vec4 pattern_to #pragma mapbox: initialize lowp float pixel_ratio_from #pragma mapbox: initialize lowp float pixel_ratio_to vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileZoomRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;gl_Position=u_matrix*vec4(a_pos,0,1);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileZoomRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileZoomRatio,a_pos);}`),So=jr(`varying vec4 v_color;void main() {gl_FragColor=v_color; #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif }`,`uniform mat4 u_matrix;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp float u_lightintensity;uniform float u_vertical_gradient;uniform lowp float u_opacity;attribute vec2 a_pos;attribute vec4 a_normal_ed;varying vec4 v_color; #pragma mapbox: define highp float base #pragma mapbox: define highp float height #pragma mapbox: define highp vec4 color void main() { #pragma mapbox: initialize highp float base #pragma mapbox: initialize highp float height #pragma mapbox: initialize highp vec4 color vec3 normal=a_normal_ed.xyz;base=max(0.0,base);height=max(0.0,height);float t=mod(normal.x,2.0);gl_Position=u_matrix*vec4(a_pos,t > 0.0 ? height : base,1);float colorvalue=color.r*0.2126+color.g*0.7152+color.b*0.0722;v_color=vec4(0.0,0.0,0.0,1.0);vec4 ambientlight=vec4(0.03,0.03,0.03,1.0);color+=ambientlight;float directional=clamp(dot(normal/16384.0,u_lightpos),0.0,1.0);directional=mix((1.0-u_lightintensity),max((1.0-colorvalue+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_color.r+=clamp(color.r*directional*u_lightcolor.r,mix(0.0,0.3,1.0-u_lightcolor.r),1.0);v_color.g+=clamp(color.g*directional*u_lightcolor.g,mix(0.0,0.3,1.0-u_lightcolor.g),1.0);v_color.b+=clamp(color.b*directional*u_lightcolor.b,mix(0.0,0.3,1.0-u_lightcolor.b),1.0);v_color*=u_opacity;}`),Ql=jr(`uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec4 v_lighting; #pragma mapbox: define lowp float base #pragma mapbox: define lowp float height #pragma mapbox: define lowp vec4 pattern_from #pragma mapbox: define lowp vec4 pattern_to #pragma mapbox: define lowp float pixel_ratio_from #pragma mapbox: define lowp float pixel_ratio_to void main() { #pragma mapbox: initialize lowp float base #pragma mapbox: initialize lowp float height #pragma mapbox: initialize mediump vec4 pattern_from #pragma mapbox: initialize mediump vec4 pattern_to #pragma mapbox: initialize lowp float pixel_ratio_from #pragma mapbox: initialize lowp float pixel_ratio_to vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);vec4 mixedColor=mix(color1,color2,u_fade);gl_FragColor=mixedColor*v_lighting; #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif }`,`uniform mat4 u_matrix;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_height_factor;uniform vec3 u_scale;uniform float u_vertical_gradient;uniform lowp float u_opacity;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp float u_lightintensity;attribute vec2 a_pos;attribute vec4 a_normal_ed;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec4 v_lighting; #pragma mapbox: define lowp float base #pragma mapbox: define lowp float height #pragma mapbox: define lowp vec4 pattern_from #pragma mapbox: define lowp vec4 pattern_to #pragma mapbox: define lowp float pixel_ratio_from #pragma mapbox: define lowp float pixel_ratio_to void main() { #pragma mapbox: initialize lowp float base #pragma mapbox: initialize lowp float height #pragma mapbox: initialize mediump vec4 pattern_from #pragma mapbox: initialize mediump vec4 pattern_to #pragma mapbox: initialize lowp float pixel_ratio_from #pragma mapbox: initialize lowp float pixel_ratio_to vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec3 normal=a_normal_ed.xyz;float edgedistance=a_normal_ed.w;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;base=max(0.0,base);height=max(0.0,height);float t=mod(normal.x,2.0);float z=t > 0.0 ? height : base;gl_Position=u_matrix*vec4(a_pos,z,1);vec2 pos=normal.x==1.0 && normal.y==0.0 && normal.z==16384.0 ? a_pos : vec2(edgedistance,z*u_height_factor);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,pos);v_lighting=vec4(0.0,0.0,0.0,1.0);float directional=clamp(dot(normal/16383.0,u_lightpos),0.0,1.0);directional=mix((1.0-u_lightintensity),max((0.5+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_lighting.rgb+=clamp(directional*u_lightcolor,mix(vec3(0.0),vec3(0.3),1.0-u_lightcolor),vec3(1.0));v_lighting*=u_opacity;}`),vu=jr(`#ifdef GL_ES precision highp float; #endif uniform sampler2D u_image;varying vec2 v_pos;uniform vec2 u_dimension;uniform float u_zoom;uniform vec4 u_unpack;float getElevation(vec2 coord,float bias) {vec4 data=texture2D(u_image,coord)*255.0;data.a=-1.0;return dot(data,u_unpack)/4.0;}void main() {vec2 epsilon=1.0/u_dimension;float a=getElevation(v_pos+vec2(-epsilon.x,-epsilon.y),0.0);float b=getElevation(v_pos+vec2(0,-epsilon.y),0.0);float c=getElevation(v_pos+vec2(epsilon.x,-epsilon.y),0.0);float d=getElevation(v_pos+vec2(-epsilon.x,0),0.0);float e=getElevation(v_pos,0.0);float f=getElevation(v_pos+vec2(epsilon.x,0),0.0);float g=getElevation(v_pos+vec2(-epsilon.x,epsilon.y),0.0);float h=getElevation(v_pos+vec2(0,epsilon.y),0.0);float i=getElevation(v_pos+vec2(epsilon.x,epsilon.y),0.0);float exaggerationFactor=u_zoom < 2.0 ? 0.4 : u_zoom < 4.5 ? 0.35 : 0.3;float exaggeration=u_zoom < 15.0 ? (u_zoom-15.0)*exaggerationFactor : 0.0;vec2 deriv=vec2((c+f+f+i)-(a+d+d+g),(g+h+h+i)-(a+b+b+c))/pow(2.0,exaggeration+(19.2562-u_zoom));gl_FragColor=clamp(vec4(deriv.x/2.0+0.5,deriv.y/2.0+0.5,1.0,1.0),0.0,1.0); #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif }`,"uniform mat4 u_matrix;uniform vec2 u_dimension;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);highp vec2 epsilon=1.0/u_dimension;float scale=(u_dimension.x-2.0)/u_dimension.x;v_pos=(a_texture_pos/8192.0)*scale+epsilon;}"),yu=jr(`uniform sampler2D u_image;varying vec2 v_pos;uniform vec2 u_latrange;uniform vec2 u_light;uniform vec4 u_shadow;uniform vec4 u_highlight;uniform vec4 u_accent; #define PI 3.141592653589793 void main() {vec4 pixel=texture2D(u_image,v_pos);vec2 deriv=((pixel.rg*2.0)-1.0);float scaleFactor=cos(radians((u_latrange[0]-u_latrange[1])*(1.0-v_pos.y)+u_latrange[1]));float slope=atan(1.25*length(deriv)/scaleFactor);float aspect=deriv.x !=0.0 ? atan(deriv.y,-deriv.x) : PI/2.0*(deriv.y > 0.0 ? 1.0 :-1.0);float intensity=u_light.x;float azimuth=u_light.y+PI;float base=1.875-intensity*1.75;float maxValue=0.5*PI;float scaledSlope=intensity !=0.5 ? ((pow(base,slope)-1.0)/(pow(base,maxValue)-1.0))*maxValue : slope;float accent=cos(scaledSlope);vec4 accent_color=(1.0-accent)*u_accent*clamp(intensity*2.0,0.0,1.0);float shade=abs(mod((aspect+azimuth)/PI+0.5,2.0)-1.0);vec4 shade_color=mix(u_shadow,u_highlight,shade)*sin(scaledSlope)*clamp(intensity*2.0,0.0,1.0);gl_FragColor=accent_color*(1.0-shade_color.a)+shade_color; #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif }`,"uniform mat4 u_matrix;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos=a_texture_pos/8192.0;}"),$u=jr(`uniform lowp float u_device_pixel_ratio;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale; #pragma mapbox: define highp vec4 color #pragma mapbox: define lowp float blur #pragma mapbox: define lowp float opacity void main() { #pragma mapbox: initialize highp vec4 color #pragma mapbox: initialize lowp float blur #pragma mapbox: initialize lowp float opacity float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);gl_FragColor=color*(alpha*opacity); #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif }`,` #define scale 0.015873016 attribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform vec2 u_units_to_pixels;uniform lowp float u_device_pixel_ratio;varying vec2 v_normal;varying vec2 v_width2;varying float v_gamma_scale;varying highp float v_linesofar; #pragma mapbox: define highp vec4 color #pragma mapbox: define lowp float blur #pragma mapbox: define lowp float opacity #pragma mapbox: define mediump float gapwidth #pragma mapbox: define lowp float offset #pragma mapbox: define mediump float width void main() { #pragma mapbox: initialize highp vec4 color #pragma mapbox: initialize lowp float blur #pragma mapbox: initialize lowp float opacity #pragma mapbox: initialize mediump float gapwidth #pragma mapbox: initialize lowp float offset #pragma mapbox: initialize mediump float width float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;v_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*2.0;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_width2=vec2(outset,inset);}`),io=jr(`uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale;varying highp vec2 v_uv; #pragma mapbox: define lowp float blur #pragma mapbox: define lowp float opacity void main() { #pragma mapbox: initialize lowp float blur #pragma mapbox: initialize lowp float opacity float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);vec4 color=texture2D(u_image,v_uv);gl_FragColor=color*(alpha*opacity); #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif }`,` #define scale 0.015873016 attribute vec2 a_pos_normal;attribute vec4 a_data;attribute float a_uv_x;attribute float a_split_index;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_units_to_pixels;uniform float u_image_height;varying vec2 v_normal;varying vec2 v_width2;varying float v_gamma_scale;varying highp vec2 v_uv; #pragma mapbox: define lowp float blur #pragma mapbox: define lowp float opacity #pragma mapbox: define mediump float gapwidth #pragma mapbox: define lowp float offset #pragma mapbox: define mediump float width void main() { #pragma mapbox: initialize lowp float blur #pragma mapbox: initialize lowp float opacity #pragma mapbox: initialize mediump float gapwidth #pragma mapbox: initialize lowp float offset #pragma mapbox: initialize mediump float width float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;highp float texel_height=1.0/u_image_height;highp float half_texel_height=0.5*texel_height;v_uv=vec2(a_uv_x,a_split_index*texel_height-half_texel_height);vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_width2=vec2(outset,inset);}`),tc=jr(`uniform lowp float u_device_pixel_ratio;uniform vec2 u_texsize;uniform float u_fade;uniform mediump vec3 u_scale;uniform sampler2D u_image;varying vec2 v_normal;varying vec2 v_width2;varying float v_linesofar;varying float v_gamma_scale;varying float v_width; #pragma mapbox: define lowp vec4 pattern_from #pragma mapbox: define lowp vec4 pattern_to #pragma mapbox: define lowp float pixel_ratio_from #pragma mapbox: define lowp float pixel_ratio_to #pragma mapbox: define lowp float blur #pragma mapbox: define lowp float opacity void main() { #pragma mapbox: initialize mediump vec4 pattern_from #pragma mapbox: initialize mediump vec4 pattern_to #pragma mapbox: initialize lowp float pixel_ratio_from #pragma mapbox: initialize lowp float pixel_ratio_to #pragma mapbox: initialize lowp float blur #pragma mapbox: initialize lowp float opacity vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileZoomRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;vec2 pattern_size_a=vec2(display_size_a.x*fromScale/tileZoomRatio,display_size_a.y);vec2 pattern_size_b=vec2(display_size_b.x*toScale/tileZoomRatio,display_size_b.y);float aspect_a=display_size_a.y/v_width;float aspect_b=display_size_b.y/v_width;float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float x_a=mod(v_linesofar/pattern_size_a.x*aspect_a,1.0);float x_b=mod(v_linesofar/pattern_size_b.x*aspect_b,1.0);float y=0.5*v_normal.y+0.5;vec2 texel_size=1.0/u_texsize;vec2 pos_a=mix(pattern_tl_a*texel_size-texel_size,pattern_br_a*texel_size+texel_size,vec2(x_a,y));vec2 pos_b=mix(pattern_tl_b*texel_size-texel_size,pattern_br_b*texel_size+texel_size,vec2(x_b,y));vec4 color=mix(texture2D(u_image,pos_a),texture2D(u_image,pos_b),u_fade);gl_FragColor=color*alpha*opacity; #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif }`,` #define scale 0.015873016 #define LINE_DISTANCE_SCALE 2.0 attribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform vec2 u_units_to_pixels;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;varying vec2 v_normal;varying vec2 v_width2;varying float v_linesofar;varying float v_gamma_scale;varying float v_width; #pragma mapbox: define lowp float blur #pragma mapbox: define lowp float opacity #pragma mapbox: define lowp float offset #pragma mapbox: define mediump float gapwidth #pragma mapbox: define mediump float width #pragma mapbox: define lowp float floorwidth #pragma mapbox: define lowp vec4 pattern_from #pragma mapbox: define lowp vec4 pattern_to #pragma mapbox: define lowp float pixel_ratio_from #pragma mapbox: define lowp float pixel_ratio_to void main() { #pragma mapbox: initialize lowp float blur #pragma mapbox: initialize lowp float opacity #pragma mapbox: initialize lowp float offset #pragma mapbox: initialize mediump float gapwidth #pragma mapbox: initialize mediump float width #pragma mapbox: initialize lowp float floorwidth #pragma mapbox: initialize mediump vec4 pattern_from #pragma mapbox: initialize mediump vec4 pattern_to #pragma mapbox: initialize lowp float pixel_ratio_from #pragma mapbox: initialize lowp float pixel_ratio_to float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;float a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_linesofar=a_linesofar;v_width2=vec2(outset,inset);v_width=floorwidth;}`),ua=jr(`uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;uniform float u_sdfgamma;uniform float u_mix;varying vec2 v_normal;varying vec2 v_width2;varying vec2 v_tex_a;varying vec2 v_tex_b;varying float v_gamma_scale; #pragma mapbox: define highp vec4 color #pragma mapbox: define lowp float blur #pragma mapbox: define lowp float opacity #pragma mapbox: define mediump float width #pragma mapbox: define lowp float floorwidth void main() { #pragma mapbox: initialize highp vec4 color #pragma mapbox: initialize lowp float blur #pragma mapbox: initialize lowp float opacity #pragma mapbox: initialize mediump float width #pragma mapbox: initialize lowp float floorwidth float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float sdfdist_a=texture2D(u_image,v_tex_a).a;float sdfdist_b=texture2D(u_image,v_tex_b).a;float sdfdist=mix(sdfdist_a,sdfdist_b,u_mix);alpha*=smoothstep(0.5-u_sdfgamma/floorwidth,0.5+u_sdfgamma/floorwidth,sdfdist);gl_FragColor=color*(alpha*opacity); #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif }`,` #define scale 0.015873016 #define LINE_DISTANCE_SCALE 2.0 attribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_patternscale_a;uniform float u_tex_y_a;uniform vec2 u_patternscale_b;uniform float u_tex_y_b;uniform vec2 u_units_to_pixels;varying vec2 v_normal;varying vec2 v_width2;varying vec2 v_tex_a;varying vec2 v_tex_b;varying float v_gamma_scale; #pragma mapbox: define highp vec4 color #pragma mapbox: define lowp float blur #pragma mapbox: define lowp float opacity #pragma mapbox: define mediump float gapwidth #pragma mapbox: define lowp float offset #pragma mapbox: define mediump float width #pragma mapbox: define lowp float floorwidth void main() { #pragma mapbox: initialize highp vec4 color #pragma mapbox: initialize lowp float blur #pragma mapbox: initialize lowp float opacity #pragma mapbox: initialize mediump float gapwidth #pragma mapbox: initialize lowp float offset #pragma mapbox: initialize mediump float width #pragma mapbox: initialize lowp float floorwidth float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;float a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_tex_a=vec2(a_linesofar*u_patternscale_a.x/floorwidth,normal.y*u_patternscale_a.y+u_tex_y_a);v_tex_b=vec2(a_linesofar*u_patternscale_b.x/floorwidth,normal.y*u_patternscale_b.y+u_tex_y_b);v_width2=vec2(outset,inset);}`),Rc=jr(`uniform float u_fade_t;uniform float u_opacity;uniform sampler2D u_image0;uniform sampler2D u_image1;varying vec2 v_pos0;varying vec2 v_pos1;uniform float u_brightness_low;uniform float u_brightness_high;uniform float u_saturation_factor;uniform float u_contrast_factor;uniform vec3 u_spin_weights;void main() {vec4 color0=texture2D(u_image0,v_pos0);vec4 color1=texture2D(u_image1,v_pos1);if (color0.a > 0.0) {color0.rgb=color0.rgb/color0.a;}if (color1.a > 0.0) {color1.rgb=color1.rgb/color1.a;}vec4 color=mix(color0,color1,u_fade_t);color.a*=u_opacity;vec3 rgb=color.rgb;rgb=vec3(dot(rgb,u_spin_weights.xyz),dot(rgb,u_spin_weights.zxy),dot(rgb,u_spin_weights.yzx));float average=(color.r+color.g+color.b)/3.0;rgb+=(average-rgb)*u_saturation_factor;rgb=(rgb-0.5)*u_contrast_factor+0.5;vec3 u_high_vec=vec3(u_brightness_low,u_brightness_low,u_brightness_low);vec3 u_low_vec=vec3(u_brightness_high,u_brightness_high,u_brightness_high);gl_FragColor=vec4(mix(u_high_vec,u_low_vec,rgb)*color.a,color.a); #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif }`,"uniform mat4 u_matrix;uniform vec2 u_tl_parent;uniform float u_scale_parent;uniform float u_buffer_scale;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos0;varying vec2 v_pos1;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos0=(((a_texture_pos/8192.0)-0.5)/u_buffer_scale )+0.5;v_pos1=(v_pos0*u_scale_parent)+u_tl_parent;}"),xl=jr(`uniform sampler2D u_texture;varying vec2 v_tex;varying float v_fade_opacity; #pragma mapbox: define lowp float opacity void main() { #pragma mapbox: initialize lowp float opacity lowp float alpha=opacity*v_fade_opacity;gl_FragColor=texture2D(u_texture,v_tex)*alpha; #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif }`,`const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec4 a_pixeloffset;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform highp float u_camera_to_center_distance;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform float u_fade_change;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform vec2 u_texsize;varying vec2 v_tex;varying float v_fade_opacity; #pragma mapbox: define lowp float opacity void main() { #pragma mapbox: initialize lowp float opacity vec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy;vec2 a_minFontScale=a_pixeloffset.zw/256.0;highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec4 projectedPoint=u_matrix*vec4(a_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ? camera_to_anchor_distance/u_camera_to_center_distance : u_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=u_matrix*vec4(a_pos+vec2(1,0),0,1);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,0.0,1.0);gl_Position=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*max(a_minFontScale,fontScale)+a_pxoffset/16.0),0.0,1.0);v_tex=a_tex/u_texsize;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;v_fade_opacity=max(0.0,min(1.0,fade_opacity[0]+fade_change));}`),bl=jr(`#define SDF_PX 8.0 uniform bool u_is_halo;uniform sampler2D u_texture;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;uniform bool u_is_text;varying vec2 v_data0;varying vec3 v_data1; #pragma mapbox: define highp vec4 fill_color #pragma mapbox: define highp vec4 halo_color #pragma mapbox: define lowp float opacity #pragma mapbox: define lowp float halo_width #pragma mapbox: define lowp float halo_blur void main() { #pragma mapbox: initialize highp vec4 fill_color #pragma mapbox: initialize highp vec4 halo_color #pragma mapbox: initialize lowp float opacity #pragma mapbox: initialize lowp float halo_width #pragma mapbox: initialize lowp float halo_blur float EDGE_GAMMA=0.105/u_device_pixel_ratio;vec2 tex=v_data0.xy;float gamma_scale=v_data1.x;float size=v_data1.y;float fade_opacity=v_data1[2];float fontScale=u_is_text ? size/24.0 : size;lowp vec4 color=fill_color;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float buff=(256.0-64.0)/256.0;if (u_is_halo) {color=halo_color;gamma=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);buff=(6.0-halo_width/fontScale)/SDF_PX;}lowp float dist=texture2D(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(buff-gamma_scaled,buff+gamma_scaled,dist);gl_FragColor=color*(alpha*opacity*fade_opacity); #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif }`,`const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec4 a_pixeloffset;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;varying vec2 v_data0;varying vec3 v_data1; #pragma mapbox: define highp vec4 fill_color #pragma mapbox: define highp vec4 halo_color #pragma mapbox: define lowp float opacity #pragma mapbox: define lowp float halo_width #pragma mapbox: define lowp float halo_blur void main() { #pragma mapbox: initialize highp vec4 fill_color #pragma mapbox: initialize highp vec4 halo_color #pragma mapbox: initialize lowp float opacity #pragma mapbox: initialize lowp float halo_width #pragma mapbox: initialize lowp float halo_blur vec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy;highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec4 projectedPoint=u_matrix*vec4(a_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ? camera_to_anchor_distance/u_camera_to_center_distance : u_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=u_matrix*vec4(a_pos+vec2(1,0),0,1);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,0.0,1.0);gl_Position=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale+a_pxoffset),0.0,1.0);float gamma_scale=gl_Position.w;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(1.0,fade_opacity[0]+fade_change));v_data0=a_tex/u_texsize;v_data1=vec3(gamma_scale,size,interpolated_fade_opacity);}`),Rf=jr(`#define SDF_PX 8.0 #define SDF 1.0 #define ICON 0.0 uniform bool u_is_halo;uniform sampler2D u_texture;uniform sampler2D u_texture_icon;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;varying vec4 v_data0;varying vec4 v_data1; #pragma mapbox: define highp vec4 fill_color #pragma mapbox: define highp vec4 halo_color #pragma mapbox: define lowp float opacity #pragma mapbox: define lowp float halo_width #pragma mapbox: define lowp float halo_blur void main() { #pragma mapbox: initialize highp vec4 fill_color #pragma mapbox: initialize highp vec4 halo_color #pragma mapbox: initialize lowp float opacity #pragma mapbox: initialize lowp float halo_width #pragma mapbox: initialize lowp float halo_blur float fade_opacity=v_data1[2];if (v_data1.w==ICON) {vec2 tex_icon=v_data0.zw;lowp float alpha=opacity*fade_opacity;gl_FragColor=texture2D(u_texture_icon,tex_icon)*alpha; #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif return;}vec2 tex=v_data0.xy;float EDGE_GAMMA=0.105/u_device_pixel_ratio;float gamma_scale=v_data1.x;float size=v_data1.y;float fontScale=size/24.0;lowp vec4 color=fill_color;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float buff=(256.0-64.0)/256.0;if (u_is_halo) {color=halo_color;gamma=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);buff=(6.0-halo_width/fontScale)/SDF_PX;}lowp float dist=texture2D(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(buff-gamma_scaled,buff+gamma_scaled,dist);gl_FragColor=color*(alpha*opacity*fade_opacity); #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif }`,`const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;uniform vec2 u_texsize_icon;varying vec4 v_data0;varying vec4 v_data1; #pragma mapbox: define highp vec4 fill_color #pragma mapbox: define highp vec4 halo_color #pragma mapbox: define lowp float opacity #pragma mapbox: define lowp float halo_width #pragma mapbox: define lowp float halo_blur void main() { #pragma mapbox: initialize highp vec4 fill_color #pragma mapbox: initialize highp vec4 halo_color #pragma mapbox: initialize lowp float opacity #pragma mapbox: initialize lowp float halo_width #pragma mapbox: initialize lowp float halo_blur vec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);float is_sdf=a_size[0]-2.0*a_size_min;highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec4 projectedPoint=u_matrix*vec4(a_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ? camera_to_anchor_distance/u_camera_to_center_distance : u_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=size/24.0;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=u_matrix*vec4(a_pos+vec2(1,0),0,1);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,0.0,1.0);gl_Position=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale),0.0,1.0);float gamma_scale=gl_Position.w;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(1.0,fade_opacity[0]+fade_change));v_data0.xy=a_tex/u_texsize;v_data0.zw=a_tex/u_texsize_icon;v_data1=vec4(gamma_scale,size,interpolated_fade_opacity,is_sdf);}`);function jr(h,d){var p=/#pragma mapbox: ([\w]+) ([\w]+) ([\w]+) ([\w]+)/g,y=d.match(/attribute ([\w]+) ([\w]+)/g),S=h.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),P=d.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),M=P?P.concat(S):S,N={};return{fragmentSource:h=h.replace(p,function(q,X,it,st,ct){return N[ct]=!0,X==="define"?` #ifndef HAS_UNIFORM_u_`+ct+` varying `+it+" "+st+" "+ct+`; #else uniform `+it+" "+st+" u_"+ct+`; #endif `:` #ifdef HAS_UNIFORM_u_`+ct+` `+it+" "+st+" "+ct+" = u_"+ct+`; #endif `}),vertexSource:d=d.replace(p,function(q,X,it,st,ct){var xt=st==="float"?"vec2":"vec4",yt=ct.match(/color/)?"color":xt;return N[ct]?X==="define"?` #ifndef HAS_UNIFORM_u_`+ct+` uniform lowp float u_`+ct+`_t; attribute `+it+" "+xt+" a_"+ct+`; varying `+it+" "+st+" "+ct+`; #else uniform `+it+" "+st+" u_"+ct+`; #endif `:yt==="vec4"?` #ifndef HAS_UNIFORM_u_`+ct+` `+ct+" = a_"+ct+`; #else `+it+" "+st+" "+ct+" = u_"+ct+`; #endif `:` #ifndef HAS_UNIFORM_u_`+ct+` `+ct+" = unpack_mix_"+yt+"(a_"+ct+", u_"+ct+`_t); #else `+it+" "+st+" "+ct+" = u_"+ct+`; #endif `:X==="define"?` #ifndef HAS_UNIFORM_u_`+ct+` uniform lowp float u_`+ct+`_t; attribute `+it+" "+xt+" a_"+ct+`; #else uniform `+it+" "+st+" u_"+ct+`; #endif `:yt==="vec4"?` #ifndef HAS_UNIFORM_u_`+ct+` `+it+" "+st+" "+ct+" = a_"+ct+`; #else `+it+" "+st+" "+ct+" = u_"+ct+`; #endif `:` #ifndef HAS_UNIFORM_u_`+ct+` `+it+" "+st+" "+ct+" = unpack_mix_"+yt+"(a_"+ct+", u_"+ct+`_t); #else `+it+" "+st+" "+ct+" = u_"+ct+`; #endif `}),staticAttributes:y,staticUniforms:M}}var di=Object.freeze({__proto__:null,prelude:Vu,background:mu,backgroundPattern:Tg,circle:Mg,clippingMask:_d,heatmap:Ah,heatmapTexture:Of,collisionBox:Ao,collisionCircle:Lh,debug:Zl,fill:Kl,fillOutline:Jl,fillOutlinePattern:Fa,fillPattern:xd,fillExtrusion:So,fillExtrusionPattern:Ql,hillshadePrepare:vu,hillshade:yu,line:$u,lineGradient:io,linePattern:tc,lineSDF:ua,raster:Rc,symbolIcon:xl,symbolSDF:bl,symbolTextAndIcon:Rf}),Ho=function(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null};function ju(h){for(var d=[],p=0;p<h.length;p++)if(h[p]!==null){var y=h[p].split(" ");d.push(y.pop())}return d}Ho.prototype.bind=function(h,d,p,y,S,P,M,N){this.context=h;for(var q=this.boundPaintVertexBuffers.length!==y.length,X=0;!q&&X<y.length;X++)this.boundPaintVertexBuffers[X]!==y[X]&&(q=!0);h.extVertexArrayObject&&this.vao&&this.boundProgram===d&&this.boundLayoutVertexBuffer===p&&!q&&this.boundIndexBuffer===S&&this.boundVertexOffset===P&&this.boundDynamicVertexBuffer===M&&this.boundDynamicVertexBuffer2===N?(h.bindVertexArrayOES.set(this.vao),M&&M.bind(),S&&S.dynamicDraw&&S.bind(),N&&N.bind()):this.freshBind(d,p,y,S,P,M,N)},Ho.prototype.freshBind=function(h,d,p,y,S,P,M){var N,q=h.numAttributes,X=this.context,it=X.gl;if(X.extVertexArrayObject)this.vao&&this.destroy(),this.vao=X.extVertexArrayObject.createVertexArrayOES(),X.bindVertexArrayOES.set(this.vao),N=0,this.boundProgram=h,this.boundLayoutVertexBuffer=d,this.boundPaintVertexBuffers=p,this.boundIndexBuffer=y,this.boundVertexOffset=S,this.boundDynamicVertexBuffer=P,this.boundDynamicVertexBuffer2=M;else{N=X.currentNumAttributes||0;for(var st=q;st<N;st++)it.disableVertexAttribArray(st)}d.enableAttributes(it,h);for(var ct=0,xt=p;ct<xt.length;ct+=1)xt[ct].enableAttributes(it,h);P&&P.enableAttributes(it,h),M&&M.enableAttributes(it,h),d.bind(),d.setVertexAttribPointers(it,h,S);for(var yt=0,Ct=p;yt<Ct.length;yt+=1){var gt=Ct[yt];gt.bind(),gt.setVertexAttribPointers(it,h,S)}P&&(P.bind(),P.setVertexAttribPointers(it,h,S)),y&&y.bind(),M&&(M.bind(),M.setVertexAttribPointers(it,h,S)),X.currentNumAttributes=q},Ho.prototype.destroy=function(){this.vao&&(this.context.extVertexArrayObject.deleteVertexArrayOES(this.vao),this.vao=null)};var Oh=function(h,d,p,y,S,P){var M=h.gl;this.program=M.createProgram();for(var N=ju(p.staticAttributes),q=y?y.getBinderAttributes():[],X=N.concat(q),it=p.staticUniforms?ju(p.staticUniforms):[],st=y?y.getBinderUniforms():[],ct=[],xt=0,yt=it.concat(st);xt<yt.length;xt+=1){var Ct=yt[xt];ct.indexOf(Ct)<0&&ct.push(Ct)}var gt=y?y.defines():[];P&>.push("#define OVERDRAW_INSPECTOR;");var It=gt.concat(Vu.fragmentSource,p.fragmentSource).join(` `),Lt=gt.concat(Vu.vertexSource,p.vertexSource).join(` `),jt=M.createShader(M.FRAGMENT_SHADER);if(M.isContextLost())this.failedToCreate=!0;else{M.shaderSource(jt,It),M.compileShader(jt),M.attachShader(this.program,jt);var ne=M.createShader(M.VERTEX_SHADER);if(M.isContextLost())this.failedToCreate=!0;else{M.shaderSource(ne,Lt),M.compileShader(ne),M.attachShader(this.program,ne),this.attributes={};var Jt={};this.numAttributes=X.length;for(var ae=0;ae<this.numAttributes;ae++)X[ae]&&(M.bindAttribLocation(this.program,ae,X[ae]),this.attributes[X[ae]]=ae);M.linkProgram(this.program),M.deleteShader(ne),M.deleteShader(jt);for(var ge=0;ge<ct.length;ge++){var we=ct[ge];if(we&&!Jt[we]){var Te=M.getUniformLocation(this.program,we);Te&&(Jt[we]=Te)}}this.fixedUniforms=S(h,Jt),this.binderUniforms=y?y.getUniforms(h,Jt):[]}}};function _u(h,d,p){var y=1/oi(p,1,d.transform.tileZoom),S=Math.pow(2,p.tileID.overscaledZ),P=p.tileSize*Math.pow(2,d.transform.tileZoom)/S,M=P*(p.tileID.canonical.x+p.tileID.wrap*S),N=P*p.tileID.canonical.y;return{u_image:0,u_texsize:p.imageAtlasTexture.size,u_scale:[y,h.fromScale,h.toScale],u_fade:h.t,u_pixel_coord_upper:[M>>16,N>>16],u_pixel_coord_lower:[65535&M,65535&N]}}Oh.prototype.draw=function(h,d,p,y,S,P,M,N,q,X,it,st,ct,xt,yt,Ct){var gt,It=h.gl;if(!this.failedToCreate){for(var Lt in h.program.set(this.program),h.setDepthMode(p),h.setStencilMode(y),h.setColorMode(S),h.setCullFace(P),this.fixedUniforms)this.fixedUniforms[Lt].set(M[Lt]);xt&&xt.setUniforms(h,this.binderUniforms,st,{zoom:ct});for(var jt=(gt={},gt[It.LINES]=2,gt[It.TRIANGLES]=3,gt[It.LINE_STRIP]=1,gt)[d],ne=0,Jt=it.get();ne<Jt.length;ne+=1){var ae=Jt[ne],ge=ae.vaos||(ae.vaos={});(ge[N]||(ge[N]=new Ho)).bind(h,this,q,xt?xt.getPaintVertexBuffers():[],X,ae.vertexOffset,yt,Ct),It.drawElements(d,ae.primitiveLength*jt,It.UNSIGNED_SHORT,ae.primitiveOffset*jt*2)}}};var Ag=function(h,d,p,y){var S=d.style.light,P=S.properties.get("position"),M=[P.x,P.y,P.z],N=o.create$1();S.properties.get("anchor")==="viewport"&&o.fromRotation(N,-d.transform.angle),o.transformMat3(M,M,N);var q=S.properties.get("color");return{u_matrix:h,u_lightpos:M,u_lightintensity:S.properties.get("intensity"),u_lightcolor:[q.r,q.g,q.b],u_vertical_gradient:+p,u_opacity:y}},qu=function(h,d,p,y,S,P,M){return o.extend(Ag(h,d,p,y),_u(P,d,M),{u_height_factor:-Math.pow(2,S.overscaledZ)/M.tileSize/8})},$s=function(h){return{u_matrix:h}},wl=function(h,d,p,y){return o.extend($s(h),_u(p,d,y))},kf=function(h,d){return{u_matrix:h,u_world:d}},kc=function(h,d,p,y,S){return o.extend(wl(h,d,p,y),{u_world:S})},bd=function(h,d,p,y){var S,P,M=h.transform;if(y.paint.get("circle-pitch-alignment")==="map"){var N=oi(p,1,M.zoom);S=!0,P=[N,N]}else S=!1,P=M.pixelsToGLUnits;return{u_camera_to_center_distance:M.cameraToCenterDistance,u_scale_with_map:+(y.paint.get("circle-pitch-scale")==="map"),u_matrix:h.translatePosMatrix(d.posMatrix,p,y.paint.get("circle-translate"),y.paint.get("circle-translate-anchor")),u_pitch_with_map:+S,u_device_pixel_ratio:o.browser.devicePixelRatio,u_extrude_scale:P}},Sl=function(h,d,p){var y=oi(p,1,d.zoom),S=Math.pow(2,d.zoom-p.tileID.overscaledZ),P=p.tileID.overscaleFactor();return{u_matrix:h,u_camera_to_center_distance:d.cameraToCenterDistance,u_pixels_to_tile_units:y,u_extrude_scale:[d.pixelsToGLUnits[0]/(y*S),d.pixelsToGLUnits[1]/(y*S)],u_overscale_factor:P}},Ap=function(h,d,p){return{u_matrix:h,u_inv_matrix:d,u_camera_to_center_distance:p.cameraToCenterDistance,u_viewport_size:[p.width,p.height]}},js=function(h,d,p){return p===void 0&&(p=1),{u_matrix:h,u_color:d,u_overlay:0,u_overlay_scale:p}},cs=function(h){return{u_matrix:h}},wd=function(h,d,p,y){return{u_matrix:h,u_extrude_scale:oi(d,1,p),u_intensity:y}},qs=function(h,d,p){var y=h.transform;return{u_matrix:Ca(h,d,p),u_ratio:1/oi(d,1,y.zoom),u_device_pixel_ratio:o.browser.devicePixelRatio,u_units_to_pixels:[1/y.pixelsToGLUnits[0],1/y.pixelsToGLUnits[1]]}},ui=function(h,d,p,y){return o.extend(qs(h,d,p),{u_image:0,u_image_height:y})},Gs=function(h,d,p,y){var S=h.transform,P=Dc(d,S);return{u_matrix:Ca(h,d,p),u_texsize:d.imageAtlasTexture.size,u_ratio:1/oi(d,1,S.zoom),u_device_pixel_ratio:o.browser.devicePixelRatio,u_image:0,u_scale:[P,y.fromScale,y.toScale],u_fade:y.t,u_units_to_pixels:[1/S.pixelsToGLUnits[0],1/S.pixelsToGLUnits[1]]}},Lg=function(h,d,p,y,S){var P=h.lineAtlas,M=Dc(d,h.transform),N=p.layout.get("line-cap")==="round",q=P.getDash(y.from,N),X=P.getDash(y.to,N),it=q.width*S.fromScale,st=X.width*S.toScale;return o.extend(qs(h,d,p),{u_patternscale_a:[M/it,-q.height/2],u_patternscale_b:[M/st,-X.height/2],u_sdfgamma:P.width/(256*Math.min(it,st)*o.browser.devicePixelRatio)/2,u_image:0,u_tex_y_a:q.y,u_tex_y_b:X.y,u_mix:S.t})};function Dc(h,d){return 1/oi(h,1,d.tileZoom)}function Ca(h,d,p){return h.translatePosMatrix(d.tileID.posMatrix,d,p.paint.get("line-translate"),p.paint.get("line-translate-anchor"))}var Rh=function(h,d,p,y,S){return{u_matrix:h,u_tl_parent:d,u_scale_parent:p,u_buffer_scale:1,u_fade_t:y.mix,u_opacity:y.opacity*S.paint.get("raster-opacity"),u_image0:0,u_image1:1,u_brightness_low:S.paint.get("raster-brightness-min"),u_brightness_high:S.paint.get("raster-brightness-max"),u_saturation_factor:(M=S.paint.get("raster-saturation"),M>0?1-1/(1.001-M):-M),u_contrast_factor:(P=S.paint.get("raster-contrast"),P>0?1/(1-P):1+P),u_spin_weights:Nc(S.paint.get("raster-hue-rotate"))};var P,M};function Nc(h){h*=Math.PI/180;var d=Math.sin(h),p=Math.cos(h);return[(2*p+1)/3,(-Math.sqrt(3)*d-p+1)/3,(Math.sqrt(3)*d-p+1)/3]}var Df,ec=function(h,d,p,y,S,P,M,N,q,X){var it=S.transform;return{u_is_size_zoom_constant:+(h==="constant"||h==="source"),u_is_size_feature_constant:+(h==="constant"||h==="camera"),u_size_t:d?d.uSizeT:0,u_size:d?d.uSize:0,u_camera_to_center_distance:it.cameraToCenterDistance,u_pitch:it.pitch/360*2*Math.PI,u_rotate_symbol:+p,u_aspect_ratio:it.width/it.height,u_fade_change:S.options.fadeDuration?S.symbolFadeChange:1,u_matrix:P,u_label_plane_matrix:M,u_coord_matrix:N,u_is_text:+q,u_pitch_with_map:+y,u_texsize:X,u_texture:0}},El=function(h,d,p,y,S,P,M,N,q,X,it){var st=S.transform;return o.extend(ec(h,d,p,y,S,P,M,N,q,X),{u_gamma_scale:y?Math.cos(st._pitch)*st.cameraToCenterDistance:1,u_device_pixel_ratio:o.browser.devicePixelRatio,u_is_halo:+it})},kh=function(h,d,p,y,S,P,M,N,q,X){return o.extend(El(h,d,p,y,S,P,M,N,!0,q,!0),{u_texsize_icon:X,u_texture_icon:1})},Dh=function(h,d,p){return{u_matrix:h,u_opacity:d,u_color:p}},Ut=function(h,d,p,y,S,P){return o.extend(function(M,N,q,X){var it=q.imageManager.getPattern(M.from.toString()),st=q.imageManager.getPattern(M.to.toString()),ct=q.imageManager.getPixelSize(),xt=ct.width,yt=ct.height,Ct=Math.pow(2,X.tileID.overscaledZ),gt=X.tileSize*Math.pow(2,q.transform.tileZoom)/Ct,It=gt*(X.tileID.canonical.x+X.tileID.wrap*Ct),Lt=gt*X.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:it.tl,u_pattern_br_a:it.br,u_pattern_tl_b:st.tl,u_pattern_br_b:st.br,u_texsize:[xt,yt],u_mix:N.t,u_pattern_size_a:it.displaySize,u_pattern_size_b:st.displaySize,u_scale_a:N.fromScale,u_scale_b:N.toScale,u_tile_units_to_pixels:1/oi(X,1,q.transform.tileZoom),u_pixel_coord_upper:[It>>16,Lt>>16],u_pixel_coord_lower:[65535&It,65535&Lt]}}(y,P,p,S),{u_matrix:h,u_opacity:d})},ce={fillExtrusion:function(h,d){return{u_matrix:new o.UniformMatrix4f(h,d.u_matrix),u_lightpos:new o.Uniform3f(h,d.u_lightpos),u_lightintensity:new o.Uniform1f(h,d.u_lightintensity),u_lightcolor:new o.Uniform3f(h,d.u_lightcolor),u_vertical_gradient:new o.Uniform1f(h,d.u_vertical_gradient),u_opacity:new o.Uniform1f(h,d.u_opacity)}},fillExtrusionPattern:function(h,d){return{u_matrix:new o.UniformMatrix4f(h,d.u_matrix),u_lightpos:new o.Uniform3f(h,d.u_lightpos),u_lightintensity:new o.Uniform1f(h,d.u_lightintensity),u_lightcolor:new o.Uniform3f(h,d.u_lightcolor),u_vertical_gradient:new o.Uniform1f(h,d.u_vertical_gradient),u_height_factor:new o.Uniform1f(h,d.u_height_factor),u_image:new o.Uniform1i(h,d.u_image),u_texsize:new o.Uniform2f(h,d.u_texsize),u_pixel_coord_upper:new o.Uniform2f(h,d.u_pixel_coord_upper),u_pixel_coord_lower:new o.Uniform2f(h,d.u_pixel_coord_lower),u_scale:new o.Uniform3f(h,d.u_scale),u_fade:new o.Uniform1f(h,d.u_fade),u_opacity:new o.Uniform1f(h,d.u_opacity)}},fill:function(h,d){return{u_matrix:new o.UniformMatrix4f(h,d.u_matrix)}},fillPattern:function(h,d){return{u_matrix:new o.UniformMatrix4f(h,d.u_matrix),u_image:new o.Uniform1i(h,d.u_image),u_texsize:new o.Uniform2f(h,d.u_texsize),u_pixel_coord_upper:new o.Uniform2f(h,d.u_pixel_coord_upper),u_pixel_coord_lower:new o.Uniform2f(h,d.u_pixel_coord_lower),u_scale:new o.Uniform3f(h,d.u_scale),u_fade:new o.Uniform1f(h,d.u_fade)}},fillOutline:function(h,d){return{u_matrix:new o.UniformMatrix4f(h,d.u_matrix),u_world:new o.Uniform2f(h,d.u_world)}},fillOutlinePattern:function(h,d){return{u_matrix:new o.UniformMatrix4f(h,d.u_matrix),u_world:new o.Uniform2f(h,d.u_world),u_image:new o.Uniform1i(h,d.u_image),u_texsize:new o.Uniform2f(h,d.u_texsize),u_pixel_coord_upper:new o.Uniform2f(h,d.u_pixel_coord_upper),u_pixel_coord_lower:new o.Uniform2f(h,d.u_pixel_coord_lower),u_scale:new o.Uniform3f(h,d.u_scale),u_fade:new o.Uniform1f(h,d.u_fade)}},circle:function(h,d){return{u_camera_to_center_distance:new o.Uniform1f(h,d.u_camera_to_center_distance),u_scale_with_map:new o.Uniform1i(h,d.u_scale_with_map),u_pitch_with_map:new o.Uniform1i(h,d.u_pitch_with_map),u_extrude_scale:new o.Uniform2f(h,d.u_extrude_scale),u_device_pixel_ratio:new o.Uniform1f(h,d.u_device_pixel_ratio),u_matrix:new o.UniformMatrix4f(h,d.u_matrix)}},collisionBox:function(h,d){return{u_matrix:new o.UniformMatrix4f(h,d.u_matrix),u_camera_to_center_distance:new o.Uniform1f(h,d.u_camera_to_center_distance),u_pixels_to_tile_units:new o.Uniform1f(h,d.u_pixels_to_tile_units),u_extrude_scale:new o.Uniform2f(h,d.u_extrude_scale),u_overscale_factor:new o.Uniform1f(h,d.u_overscale_factor)}},collisionCircle:function(h,d){return{u_matrix:new o.UniformMatrix4f(h,d.u_matrix),u_inv_matrix:new o.UniformMatrix4f(h,d.u_inv_matrix),u_camera_to_center_distance:new o.Uniform1f(h,d.u_camera_to_center_distance),u_viewport_size:new o.Uniform2f(h,d.u_viewport_size)}},debug:function(h,d){return{u_color:new o.UniformColor(h,d.u_color),u_matrix:new o.UniformMatrix4f(h,d.u_matrix),u_overlay:new o.Uniform1i(h,d.u_overlay),u_overlay_scale:new o.Uniform1f(h,d.u_overlay_scale)}},clippingMask:function(h,d){return{u_matrix:new o.UniformMatrix4f(h,d.u_matrix)}},heatmap:function(h,d){return{u_extrude_scale:new o.Uniform1f(h,d.u_extrude_scale),u_intensity:new o.Uniform1f(h,d.u_intensity),u_matrix:new o.UniformMatrix4f(h,d.u_matrix)}},heatmapTexture:function(h,d){return{u_matrix:new o.UniformMatrix4f(h,d.u_matrix),u_world:new o.Uniform2f(h,d.u_world),u_image:new o.Uniform1i(h,d.u_image),u_color_ramp:new o.Uniform1i(h,d.u_color_ramp),u_opacity:new o.Uniform1f(h,d.u_opacity)}},hillshade:function(h,d){return{u_matrix:new o.UniformMatrix4f(h,d.u_matrix),u_image:new o.Uniform1i(h,d.u_image),u_latrange:new o.Uniform2f(h,d.u_latrange),u_light:new o.Uniform2f(h,d.u_light),u_shadow:new o.UniformColor(h,d.u_shadow),u_highlight:new o.UniformColor(h,d.u_highlight),u_accent:new o.UniformColor(h,d.u_accent)}},hillshadePrepare:function(h,d){return{u_matrix:new o.UniformMatrix4f(h,d.u_matrix),u_image:new o.Uniform1i(h,d.u_image),u_dimension:new o.Uniform2f(h,d.u_dimension),u_zoom:new o.Uniform1f(h,d.u_zoom),u_unpack:new o.Uniform4f(h,d.u_unpack)}},line:function(h,d){return{u_matrix:new o.UniformMatrix4f(h,d.u_matrix),u_ratio:new o.Uniform1f(h,d.u_ratio),u_device_pixel_ratio:new o.Uniform1f(h,d.u_device_pixel_ratio),u_units_to_pixels:new o.Uniform2f(h,d.u_units_to_pixels)}},lineGradient:function(h,d){return{u_matrix:new o.UniformMatrix4f(h,d.u_matrix),u_ratio:new o.Uniform1f(h,d.u_ratio),u_device_pixel_ratio:new o.Uniform1f(h,d.u_device_pixel_ratio),u_units_to_pixels:new o.Uniform2f(h,d.u_units_to_pixels),u_image:new o.Uniform1i(h,d.u_image),u_image_height:new o.Uniform1f(h,d.u_image_height)}},linePattern:function(h,d){return{u_matrix:new o.UniformMatrix4f(h,d.u_matrix),u_texsize:new o.Uniform2f(h,d.u_texsize),u_ratio:new o.Uniform1f(h,d.u_ratio),u_device_pixel_ratio:new o.Uniform1f(h,d.u_device_pixel_ratio),u_image:new o.Uniform1i(h,d.u_image),u_units_to_pixels:new o.Uniform2f(h,d.u_units_to_pixels),u_scale:new o.Uniform3f(h,d.u_scale),u_fade:new o.Uniform1f(h,d.u_fade)}},lineSDF:function(h,d){return{u_matrix:new o.UniformMatrix4f(h,d.u_matrix),u_ratio:new o.Uniform1f(h,d.u_ratio),u_device_pixel_ratio:new o.Uniform1f(h,d.u_device_pixel_ratio),u_units_to_pixels:new o.Uniform2f(h,d.u_units_to_pixels),u_patternscale_a:new o.Uniform2f(h,d.u_patternscale_a),u_patternscale_b:new o.Uniform2f(h,d.u_patternscale_b),u_sdfgamma:new o.Uniform1f(h,d.u_sdfgamma),u_image:new o.Uniform1i(h,d.u_image),u_tex_y_a:new o.Uniform1f(h,d.u_tex_y_a),u_tex_y_b:new o.Uniform1f(h,d.u_tex_y_b),u_mix:new o.Uniform1f(h,d.u_mix)}},raster:function(h,d){return{u_matrix:new o.UniformMatrix4f(h,d.u_matrix),u_tl_parent:new o.Uniform2f(h,d.u_tl_parent),u_scale_parent:new o.Uniform1f(h,d.u_scale_parent),u_buffer_scale:new o.Uniform1f(h,d.u_buffer_scale),u_fade_t:new o.Uniform1f(h,d.u_fade_t),u_opacity:new o.Uniform1f(h,d.u_opacity),u_image0:new o.Uniform1i(h,d.u_image0),u_image1:new o.Uniform1i(h,d.u_image1),u_brightness_low:new o.Uniform1f(h,d.u_brightness_low),u_brightness_high:new o.Uniform1f(h,d.u_brightness_high),u_saturation_factor:new o.Uniform1f(h,d.u_saturation_factor),u_contrast_factor:new o.Uniform1f(h,d.u_contrast_factor),u_spin_weights:new o.Uniform3f(h,d.u_spin_weights)}},symbolIcon:function(h,d){return{u_is_size_zoom_constant:new o.Uniform1i(h,d.u_is_size_zoom_constant),u_is_size_feature_constant:new o.Uniform1i(h,d.u_is_size_feature_constant),u_size_t:new o.Uniform1f(h,d.u_size_t),u_size:new o.Uniform1f(h,d.u_size),u_camera_to_center_distance:new o.Uniform1f(h,d.u_camera_to_center_distance),u_pitch:new o.Uniform1f(h,d.u_pitch),u_rotate_symbol:new o.Uniform1i(h,d.u_rotate_symbol),u_aspect_ratio:new o.Uniform1f(h,d.u_aspect_ratio),u_fade_change:new o.Uniform1f(h,d.u_fade_change),u_matrix:new o.UniformMatrix4f(h,d.u_matrix),u_label_plane_matrix:new o.UniformMatrix4f(h,d.u_label_plane_matrix),u_coord_matrix:new o.UniformMatrix4f(h,d.u_coord_matrix),u_is_text:new o.Uniform1i(h,d.u_is_text),u_pitch_with_map:new o.Uniform1i(h,d.u_pitch_with_map),u_texsize:new o.Uniform2f(h,d.u_texsize),u_texture:new o.Uniform1i(h,d.u_texture)}},symbolSDF:function(h,d){return{u_is_size_zoom_constant:new o.Uniform1i(h,d.u_is_size_zoom_constant),u_is_size_feature_constant:new o.Uniform1i(h,d.u_is_size_feature_constant),u_size_t:new o.Uniform1f(h,d.u_size_t),u_size:new o.Uniform1f(h,d.u_size),u_camera_to_center_distance:new o.Uniform1f(h,d.u_camera_to_center_distance),u_pitch:new o.Uniform1f(h,d.u_pitch),u_rotate_symbol:new o.Uniform1i(h,d.u_rotate_symbol),u_aspect_ratio:new o.Uniform1f(h,d.u_aspect_ratio),u_fade_change:new o.Uniform1f(h,d.u_fade_change),u_matrix:new o.UniformMatrix4f(h,d.u_matrix),u_label_plane_matrix:new o.UniformMatrix4f(h,d.u_label_plane_matrix),u_coord_matrix:new o.UniformMatrix4f(h,d.u_coord_matrix),u_is_text:new o.Uniform1i(h,d.u_is_text),u_pitch_with_map:new o.Uniform1i(h,d.u_pitch_with_map),u_texsize:new o.Uniform2f(h,d.u_texsize),u_texture:new o.Uniform1i(h,d.u_texture),u_gamma_scale:new o.Uniform1f(h,d.u_gamma_scale),u_device_pixel_ratio:new o.Uniform1f(h,d.u_device_pixel_ratio),u_is_halo:new o.Uniform1i(h,d.u_is_halo)}},symbolTextAndIcon:function(h,d){return{u_is_size_zoom_constant:new o.Uniform1i(h,d.u_is_size_zoom_constant),u_is_size_feature_constant:new o.Uniform1i(h,d.u_is_size_feature_constant),u_size_t:new o.Uniform1f(h,d.u_size_t),u_size:new o.Uniform1f(h,d.u_size),u_camera_to_center_distance:new o.Uniform1f(h,d.u_camera_to_center_distance),u_pitch:new o.Uniform1f(h,d.u_pitch),u_rotate_symbol:new o.Uniform1i(h,d.u_rotate_symbol),u_aspect_ratio:new o.Uniform1f(h,d.u_aspect_ratio),u_fade_change:new o.Uniform1f(h,d.u_fade_change),u_matrix:new o.UniformMatrix4f(h,d.u_matrix),u_label_plane_matrix:new o.UniformMatrix4f(h,d.u_label_plane_matrix),u_coord_matrix:new o.UniformMatrix4f(h,d.u_coord_matrix),u_is_text:new o.Uniform1i(h,d.u_is_text),u_pitch_with_map:new o.Uniform1i(h,d.u_pitch_with_map),u_texsize:new o.Uniform2f(h,d.u_texsize),u_texsize_icon:new o.Uniform2f(h,d.u_texsize_icon),u_texture:new o.Uniform1i(h,d.u_texture),u_texture_icon:new o.Uniform1i(h,d.u_texture_icon),u_gamma_scale:new o.Uniform1f(h,d.u_gamma_scale),u_device_pixel_ratio:new o.Uniform1f(h,d.u_device_pixel_ratio),u_is_halo:new o.Uniform1i(h,d.u_is_halo)}},background:function(h,d){return{u_matrix:new o.UniformMatrix4f(h,d.u_matrix),u_opacity:new o.Uniform1f(h,d.u_opacity),u_color:new o.UniformColor(h,d.u_color)}},backgroundPattern:function(h,d){return{u_matrix:new o.UniformMatrix4f(h,d.u_matrix),u_opacity:new o.Uniform1f(h,d.u_opacity),u_image:new o.Uniform1i(h,d.u_image),u_pattern_tl_a:new o.Uniform2f(h,d.u_pattern_tl_a),u_pattern_br_a:new o.Uniform2f(h,d.u_pattern_br_a),u_pattern_tl_b:new o.Uniform2f(h,d.u_pattern_tl_b),u_pattern_br_b:new o.Uniform2f(h,d.u_pattern_br_b),u_texsize:new o.Uniform2f(h,d.u_texsize),u_mix:new o.Uniform1f(h,d.u_mix),u_pattern_size_a:new o.Uniform2f(h,d.u_pattern_size_a),u_pattern_size_b:new o.Uniform2f(h,d.u_pattern_size_b),u_scale_a:new o.Uniform1f(h,d.u_scale_a),u_scale_b:new o.Uniform1f(h,d.u_scale_b),u_pixel_coord_upper:new o.Uniform2f(h,d.u_pixel_coord_upper),u_pixel_coord_lower:new o.Uniform2f(h,d.u_pixel_coord_lower),u_tile_units_to_pixels:new o.Uniform1f(h,d.u_tile_units_to_pixels)}}};function Be(h,d,p,y,S,P,M){for(var N=h.context,q=N.gl,X=h.useProgram("collisionBox"),it=[],st=0,ct=0,xt=0;xt<y.length;xt++){var yt=y[xt],Ct=d.getTile(yt),gt=Ct.getBucket(p);if(gt){var It=yt.posMatrix;S[0]===0&&S[1]===0||(It=h.translatePosMatrix(yt.posMatrix,Ct,S,P));var Lt=M?gt.textCollisionBox:gt.iconCollisionBox,jt=gt.collisionCircleArray;if(jt.length>0){var ne=o.create(),Jt=It;o.mul(ne,gt.placementInvProjMatrix,h.transform.glCoordMatrix),o.mul(ne,ne,gt.placementViewportMatrix),it.push({circleArray:jt,circleOffset:ct,transform:Jt,invTransform:ne}),ct=st+=jt.length/4}Lt&&X.draw(N,q.LINES,lt.disabled,vt.disabled,h.colorModeForRenderPass(),Rt.disabled,Sl(It,h.transform,Ct),p.id,Lt.layoutVertexBuffer,Lt.indexBuffer,Lt.segments,null,h.transform.zoom,null,null,Lt.collisionVertexBuffer)}}if(M&&it.length){var ae=h.useProgram("collisionCircle"),ge=new o.StructArrayLayout2f1f2i16;ge.resize(4*st),ge._trim();for(var we=0,Te=0,je=it;Te<je.length;Te+=1)for(var an=je[Te],_n=0;_n<an.circleArray.length/4;_n++){var vn=4*_n,Ir=an.circleArray[vn+0],Qe=an.circleArray[vn+1],bn=an.circleArray[vn+2],Wn=an.circleArray[vn+3];ge.emplace(we++,Ir,Qe,bn,Wn,0),ge.emplace(we++,Ir,Qe,bn,Wn,1),ge.emplace(we++,Ir,Qe,bn,Wn,2),ge.emplace(we++,Ir,Qe,bn,Wn,3)}(!Df||Df.length<2*st)&&(Df=function(so){var eo=2*so,Yo=new o.StructArrayLayout3ui6;Yo.resize(eo),Yo._trim();for(var Ui=0;Ui<eo;Ui++){var Ri=6*Ui;Yo.uint16[Ri+0]=4*Ui+0,Yo.uint16[Ri+1]=4*Ui+1,Yo.uint16[Ri+2]=4*Ui+2,Yo.uint16[Ri+3]=4*Ui+2,Yo.uint16[Ri+4]=4*Ui+3,Yo.uint16[Ri+5]=4*Ui+0}return Yo}(st));for(var On=N.createIndexBuffer(Df,!0),Pn=N.createVertexBuffer(ge,o.collisionCircleLayout.members,!0),Hn=0,An=it;Hn<An.length;Hn+=1){var ln=An[Hn],Ro=Ap(ln.transform,ln.invTransform,h.transform);ae.draw(N,q.TRIANGLES,lt.disabled,vt.disabled,h.colorModeForRenderPass(),Rt.disabled,Ro,p.id,Pn,On,o.SegmentVector.simpleSegment(0,2*ln.circleOffset,ln.circleArray.length,ln.circleArray.length/2),null,h.transform.zoom,null,null,null)}Pn.destroy(),On.destroy()}}var dn=o.identity(new Float32Array(16));function Bi(h,d,p,y,S,P){var M=o.getAnchorAlignment(h),N=-(M.horizontalAlign-.5)*d,q=-(M.verticalAlign-.5)*p,X=o.evaluateVariableOffset(h,y);return new o.Point((N/S+X[0])*P,(q/S+X[1])*P)}function xr(h,d,p,y,S,P,M,N,q,X,it){var st=h.text.placedSymbolArray,ct=h.text.dynamicLayoutVertexArray,xt=h.icon.dynamicLayoutVertexArray,yt={};ct.clear();for(var Ct=0;Ct<st.length;Ct++){var gt=st.get(Ct),It=gt.hidden||!gt.crossTileID||h.allowVerticalPlacement&&!gt.placedOrientation?null:y[gt.crossTileID];if(It){var Lt=new o.Point(gt.anchorX,gt.anchorY),jt=xn(Lt,p?N:M),ne=pr(P.cameraToCenterDistance,jt.signedDistanceFromCamera),Jt=S.evaluateSizeForFeature(h.textSizeData,X,gt)*ne/o.ONE_EM;p&&(Jt*=h.tilePixelRatio/q);for(var ae=Bi(It.anchor,It.width,It.height,It.textOffset,It.textBoxScale,Jt),ge=p?xn(Lt.add(ae),M).point:jt.point.add(d?ae.rotate(-P.angle):ae),we=h.allowVerticalPlacement&>.placedOrientation===o.WritingMode.vertical?Math.PI/2:0,Te=0;Te<gt.numGlyphs;Te++)o.addDynamicAttributes(ct,ge,we);it&>.associatedIconIndex>=0&&(yt[gt.associatedIconIndex]={shiftedAnchor:ge,angle:we})}else ro(gt.numGlyphs,ct)}if(it){xt.clear();for(var je=h.icon.placedSymbolArray,an=0;an<je.length;an++){var _n=je.get(an);if(_n.hidden)ro(_n.numGlyphs,xt);else{var vn=yt[an];if(vn)for(var Ir=0;Ir<_n.numGlyphs;Ir++)o.addDynamicAttributes(xt,vn.shiftedAnchor,vn.angle);else ro(_n.numGlyphs,xt)}}h.icon.dynamicLayoutVertexBuffer.updateData(xt)}h.text.dynamicLayoutVertexBuffer.updateData(ct)}function to(h,d,p){return p.iconsInText&&d?"symbolTextAndIcon":h?"symbolSDF":"symbolIcon"}function ti(h,d,p,y,S,P,M,N,q,X,it,st){for(var ct=h.context,xt=ct.gl,yt=h.transform,Ct=N==="map",gt=q==="map",It=Ct&&p.layout.get("symbol-placement")!=="point",Lt=Ct&&!gt&&!It,jt=p.layout.get("symbol-sort-key").constantOr(1)!==void 0,ne=!1,Jt=h.depthModeForSublayer(0,lt.ReadOnly),ae=p.layout.get("text-variable-anchor"),ge=[],we=0,Te=y;we<Te.length;we+=1){var je=Te[we],an=d.getTile(je),_n=an.getBucket(p);if(_n){var vn=S?_n.text:_n.icon;if(vn&&vn.segments.get().length){var Ir=vn.programConfigurations.get(p.id),Qe=S||_n.sdfIcons,bn=S?_n.textSizeData:_n.iconSizeData,Wn=gt||yt.pitch!==0,On=h.useProgram(to(Qe,S,_n),Ir),Pn=o.evaluateSizeForZoom(bn,yt.zoom),Hn=void 0,An=[0,0],ln=void 0,Ro=void 0,so=null,eo=void 0;if(S)ln=an.glyphAtlasTexture,Ro=xt.LINEAR,Hn=an.glyphAtlasTexture.size,_n.iconsInText&&(An=an.imageAtlasTexture.size,so=an.imageAtlasTexture,eo=Wn||h.options.rotating||h.options.zooming||bn.kind==="composite"||bn.kind==="camera"?xt.LINEAR:xt.NEAREST);else{var Yo=p.layout.get("icon-size").constantOr(0)!==1||_n.iconsNeedLinear;ln=an.imageAtlasTexture,Ro=Qe||h.options.rotating||h.options.zooming||Yo||Wn?xt.LINEAR:xt.NEAREST,Hn=an.imageAtlasTexture.size}var Ui=oi(an,1,h.transform.zoom),Ri=Li(je.posMatrix,gt,Ct,h.transform,Ui),Ms=kr(je.posMatrix,gt,Ct,h.transform,Ui),Mi=ae&&_n.hasTextData(),ic=p.layout.get("icon-text-fit")!=="none"&&Mi&&_n.hasIconData();It&&Ii(_n,je.posMatrix,h,S,Ri,Ms,gt,X);var As=h.translatePosMatrix(je.posMatrix,an,P,M),Tl=It||S&&ae||ic?dn:Ri,Ju=h.translatePosMatrix(Ms,an,P,M,!0),$h=Qe&&p.paint.get(S?"text-halo-width":"icon-halo-width").constantOr(1)!==0,Np={program:On,buffers:vn,uniformValues:Qe?_n.iconsInText?kh(bn.kind,Pn,Lt,gt,h,As,Tl,Ju,Hn,An):El(bn.kind,Pn,Lt,gt,h,As,Tl,Ju,S,Hn,!0):ec(bn.kind,Pn,Lt,gt,h,As,Tl,Ju,S,Hn),atlasTexture:ln,atlasTextureIcon:so,atlasInterpolation:Ro,atlasInterpolationIcon:eo,isSDF:Qe,hasHalo:$h};if(jt&&_n.canOverlap){ne=!0;for(var Qu=0,jh=vn.segments.get();Qu<jh.length;Qu+=1){var Pd=jh[Qu];ge.push({segments:new o.SegmentVector([Pd]),sortKey:Pd.sortKey,state:Np})}}else ge.push({segments:vn.segments,sortKey:0,state:Np})}}}ne&&ge.sort(function(qc,qh){return qc.sortKey-qh.sortKey});for(var oc=0,jc=ge;oc<jc.length;oc+=1){var ac=jc[oc],fa=ac.state;if(ct.activeTexture.set(xt.TEXTURE0),fa.atlasTexture.bind(fa.atlasInterpolation,xt.CLAMP_TO_EDGE),fa.atlasTextureIcon&&(ct.activeTexture.set(xt.TEXTURE1),fa.atlasTextureIcon&&fa.atlasTextureIcon.bind(fa.atlasInterpolationIcon,xt.CLAMP_TO_EDGE)),fa.isSDF){var Ml=fa.uniformValues;fa.hasHalo&&(Ml.u_is_halo=1,la(fa.buffers,ac.segments,p,h,fa.program,Jt,it,st,Ml)),Ml.u_is_halo=0}la(fa.buffers,ac.segments,p,h,fa.program,Jt,it,st,fa.uniformValues)}}function la(h,d,p,y,S,P,M,N,q){var X=y.context;S.draw(X,X.gl.TRIANGLES,P,M,N,Rt.disabled,q,p.id,h.layoutVertexBuffer,h.indexBuffer,d,p.paint,y.transform.zoom,h.programConfigurations.get(p.id),h.dynamicLayoutVertexBuffer,h.opacityVertexBuffer)}function vo(h,d,p,y,S,P,M){var N,q,X,it,st,ct=h.context.gl,xt=p.paint.get("fill-pattern"),yt=xt&&xt.constantOr(1),Ct=p.getCrossfadeParameters();M?(q=yt&&!p.getPaintProperty("fill-outline-color")?"fillOutlinePattern":"fillOutline",N=ct.LINES):(q=yt?"fillPattern":"fill",N=ct.TRIANGLES);for(var gt=0,It=y;gt<It.length;gt+=1){var Lt=It[gt],jt=d.getTile(Lt);if(!yt||jt.patternsLoaded()){var ne=jt.getBucket(p);if(ne){var Jt=ne.programConfigurations.get(p.id),ae=h.useProgram(q,Jt);yt&&(h.context.activeTexture.set(ct.TEXTURE0),jt.imageAtlasTexture.bind(ct.LINEAR,ct.CLAMP_TO_EDGE),Jt.updatePaintBuffers(Ct));var ge=xt.constantOr(null);if(ge&&jt.imageAtlas){var we=jt.imageAtlas,Te=we.patternPositions[ge.to.toString()],je=we.patternPositions[ge.from.toString()];Te&&je&&Jt.setConstantPatternPositions(Te,je)}var an=h.translatePosMatrix(Lt.posMatrix,jt,p.paint.get("fill-translate"),p.paint.get("fill-translate-anchor"));if(M){it=ne.indexBuffer2,st=ne.segments2;var _n=[ct.drawingBufferWidth,ct.drawingBufferHeight];X=q==="fillOutlinePattern"&&yt?kc(an,h,Ct,jt,_n):kf(an,_n)}else it=ne.indexBuffer,st=ne.segments,X=yt?wl(an,h,Ct,jt):$s(an);ae.draw(h.context,N,S,h.stencilModeForClipping(Lt),P,Rt.disabled,X,p.id,ne.layoutVertexBuffer,it,st,p.paint,h.transform.zoom,Jt)}}}}function Eo(h,d,p,y,S,P,M){for(var N=h.context,q=N.gl,X=p.paint.get("fill-extrusion-pattern"),it=X.constantOr(1),st=p.getCrossfadeParameters(),ct=p.paint.get("fill-extrusion-opacity"),xt=0,yt=y;xt<yt.length;xt+=1){var Ct=yt[xt],gt=d.getTile(Ct),It=gt.getBucket(p);if(It){var Lt=It.programConfigurations.get(p.id),jt=h.useProgram(it?"fillExtrusionPattern":"fillExtrusion",Lt);it&&(h.context.activeTexture.set(q.TEXTURE0),gt.imageAtlasTexture.bind(q.LINEAR,q.CLAMP_TO_EDGE),Lt.updatePaintBuffers(st));var ne=X.constantOr(null);if(ne&>.imageAtlas){var Jt=gt.imageAtlas,ae=Jt.patternPositions[ne.to.toString()],ge=Jt.patternPositions[ne.from.toString()];ae&&ge&&Lt.setConstantPatternPositions(ae,ge)}var we=h.translatePosMatrix(Ct.posMatrix,gt,p.paint.get("fill-extrusion-translate"),p.paint.get("fill-extrusion-translate-anchor")),Te=p.paint.get("fill-extrusion-vertical-gradient"),je=it?qu(we,h,Te,ct,Ct,st,gt):Ag(we,h,Te,ct);jt.draw(N,N.gl.TRIANGLES,S,P,M,Rt.backCCW,je,p.id,It.layoutVertexBuffer,It.indexBuffer,It.segments,p.paint,h.transform.zoom,Lt)}}}function Ts(h,d,p,y,S,P){var M=h.context,N=M.gl,q=d.fbo;if(q){var X=h.useProgram("hillshade");M.activeTexture.set(N.TEXTURE0),N.bindTexture(N.TEXTURE_2D,q.colorAttachment.get());var it=function(st,ct,xt){var yt=xt.paint.get("hillshade-shadow-color"),Ct=xt.paint.get("hillshade-highlight-color"),gt=xt.paint.get("hillshade-accent-color"),It=xt.paint.get("hillshade-illumination-direction")*(Math.PI/180);xt.paint.get("hillshade-illumination-anchor")==="viewport"&&(It-=st.transform.angle);var Lt,jt,ne,Jt=!st.options.moving;return{u_matrix:st.transform.calculatePosMatrix(ct.tileID.toUnwrapped(),Jt),u_image:0,u_latrange:(Lt=ct.tileID,jt=Math.pow(2,Lt.canonical.z),ne=Lt.canonical.y,[new o.MercatorCoordinate(0,ne/jt).toLngLat().lat,new o.MercatorCoordinate(0,(ne+1)/jt).toLngLat().lat]),u_light:[xt.paint.get("hillshade-exaggeration"),It],u_shadow:yt,u_highlight:Ct,u_accent:gt}}(h,d,p);X.draw(M,N.TRIANGLES,y,S,P,Rt.disabled,it,p.id,h.rasterBoundsBuffer,h.quadTriangleIndexBuffer,h.rasterBoundsSegments)}}function fs(h,d,p,y,S,P){var M=h.context,N=M.gl,q=d.dem;if(q&&q.data){var X=q.dim,it=q.stride,st=q.getPixels();if(M.activeTexture.set(N.TEXTURE1),M.pixelStoreUnpackPremultiplyAlpha.set(!1),d.demTexture=d.demTexture||h.getTileTexture(it),d.demTexture){var ct=d.demTexture;ct.update(st,{premultiply:!1}),ct.bind(N.NEAREST,N.CLAMP_TO_EDGE)}else d.demTexture=new o.Texture(M,st,N.RGBA,{premultiply:!1}),d.demTexture.bind(N.NEAREST,N.CLAMP_TO_EDGE);M.activeTexture.set(N.TEXTURE0);var xt=d.fbo;if(!xt){var yt=new o.Texture(M,{width:X,height:X,data:null},N.RGBA);yt.bind(N.LINEAR,N.CLAMP_TO_EDGE),(xt=d.fbo=M.createFramebuffer(X,X,!0)).colorAttachment.set(yt.texture)}M.bindFramebuffer.set(xt.framebuffer),M.viewport.set([0,0,X,X]),h.useProgram("hillshadePrepare").draw(M,N.TRIANGLES,y,S,P,Rt.disabled,function(Ct,gt){var It=gt.stride,Lt=o.create();return o.ortho(Lt,0,o.EXTENT,-o.EXTENT,0,0,1),o.translate(Lt,Lt,[0,-o.EXTENT,0]),{u_matrix:Lt,u_image:1,u_dimension:[It,It],u_zoom:Ct.overscaledZ,u_unpack:gt.getUnpackVector()}}(d.tileID,q),p.id,h.rasterBoundsBuffer,h.quadTriangleIndexBuffer,h.rasterBoundsSegments),d.needsHillshadePrepare=!1}}function Ti(h,d,p,y,S){var P=y.paint.get("raster-fade-duration");if(P>0){var M=o.browser.now(),N=(M-h.timeAdded)/P,q=d?(M-d.timeAdded)/P:-1,X=p.getSource(),it=S.coveringZoomLevel({tileSize:X.tileSize,roundZoom:X.roundZoom}),st=!d||Math.abs(d.tileID.overscaledZ-it)>Math.abs(h.tileID.overscaledZ-it),ct=st&&h.refreshedUponExpiration?1:o.clamp(st?N:1-q,0,1);return h.refreshedUponExpiration&&N>=1&&(h.refreshedUponExpiration=!1),d?{opacity:1,mix:1-ct}:{opacity:ct,mix:0}}return{opacity:1,mix:0}}var Ws=new o.Color(1,0,0,1),Fc=new o.Color(0,1,0,1),Nh=new o.Color(0,0,1,1),Cl=new o.Color(1,0,1,1),zc=new o.Color(0,1,1,1);function Lp(h,d,p,y){$t(h,0,d+p/2,h.transform.width,p,y)}function nc(h,d,p,y){$t(h,d-p/2,0,p,h.transform.height,y)}function $t(h,d,p,y,S,P){var M=h.context,N=M.gl;N.enable(N.SCISSOR_TEST),N.scissor(d*o.browser.devicePixelRatio,p*o.browser.devicePixelRatio,y*o.browser.devicePixelRatio,S*o.browser.devicePixelRatio),M.clear({color:P}),N.disable(N.SCISSOR_TEST)}function oe(h,d,p){var y=h.context,S=y.gl,P=p.posMatrix,M=h.useProgram("debug"),N=lt.disabled,q=vt.disabled,X=h.colorModeForRenderPass();y.activeTexture.set(S.TEXTURE0),h.emptyTexture.bind(S.LINEAR,S.CLAMP_TO_EDGE),M.draw(y,S.LINE_STRIP,N,q,X,Rt.disabled,js(P,o.Color.red),"$debug",h.debugBuffer,h.tileBorderIndexBuffer,h.debugSegments);var it=d.getTileByID(p.key).latestRawTileData,st=Math.floor((it&&it.byteLength||0)/1024),ct=d.getTile(p).tileSize,xt=512/Math.min(ct,512)*(p.overscaledZ/h.transform.zoom)*.5,yt=p.canonical.toString();p.overscaledZ!==p.canonical.z&&(yt+=" => "+p.overscaledZ),function(Ct,gt){Ct.initDebugOverlayCanvas();var It=Ct.debugOverlayCanvas,Lt=Ct.context.gl,jt=Ct.debugOverlayCanvas.getContext("2d");jt.clearRect(0,0,It.width,It.height),jt.shadowColor="white",jt.shadowBlur=2,jt.lineWidth=1.5,jt.strokeStyle="white",jt.textBaseline="top",jt.font="bold 36px Open Sans, sans-serif",jt.fillText(gt,5,5),jt.strokeText(gt,5,5),Ct.debugOverlayTexture.update(It),Ct.debugOverlayTexture.bind(Lt.LINEAR,Lt.CLAMP_TO_EDGE)}(h,yt+" "+st+"kb"),M.draw(y,S.TRIANGLES,N,q,Mt.alphaBlended,Rt.disabled,js(P,o.Color.transparent,xt),"$debug",h.debugBuffer,h.quadTriangleIndexBuffer,h.debugSegments)}var Gt={symbol:function(h,d,p,y,S){if(h.renderPass==="translucent"){var P=vt.disabled,M=h.colorModeForRenderPass();p.layout.get("text-variable-anchor")&&function(N,q,X,it,st,ct,xt){for(var yt=q.transform,Ct=st==="map",gt=ct==="map",It=0,Lt=N;It<Lt.length;It+=1){var jt=Lt[It],ne=it.getTile(jt),Jt=ne.getBucket(X);if(Jt&&Jt.text&&Jt.text.segments.get().length){var ae=o.evaluateSizeForZoom(Jt.textSizeData,yt.zoom),ge=oi(ne,1,q.transform.zoom),we=Li(jt.posMatrix,gt,Ct,q.transform,ge),Te=X.layout.get("icon-text-fit")!=="none"&&Jt.hasIconData();if(ae){var je=Math.pow(2,yt.zoom-ne.tileID.overscaledZ);xr(Jt,Ct,gt,xt,o.symbolSize,yt,we,jt.posMatrix,je,ae,Te)}}}}(y,h,p,d,p.layout.get("text-rotation-alignment"),p.layout.get("text-pitch-alignment"),S),p.paint.get("icon-opacity").constantOr(1)!==0&&ti(h,d,p,y,!1,p.paint.get("icon-translate"),p.paint.get("icon-translate-anchor"),p.layout.get("icon-rotation-alignment"),p.layout.get("icon-pitch-alignment"),p.layout.get("icon-keep-upright"),P,M),p.paint.get("text-opacity").constantOr(1)!==0&&ti(h,d,p,y,!0,p.paint.get("text-translate"),p.paint.get("text-translate-anchor"),p.layout.get("text-rotation-alignment"),p.layout.get("text-pitch-alignment"),p.layout.get("text-keep-upright"),P,M),d.map.showCollisionBoxes&&(Be(h,d,p,y,p.paint.get("text-translate"),p.paint.get("text-translate-anchor"),!0),Be(h,d,p,y,p.paint.get("icon-translate"),p.paint.get("icon-translate-anchor"),!1))}},circle:function(h,d,p,y){if(h.renderPass==="translucent"){var S=p.paint.get("circle-opacity"),P=p.paint.get("circle-stroke-width"),M=p.paint.get("circle-stroke-opacity"),N=p.layout.get("circle-sort-key").constantOr(1)!==void 0;if(S.constantOr(1)!==0||P.constantOr(1)!==0&&M.constantOr(1)!==0){for(var q=h.context,X=q.gl,it=h.depthModeForSublayer(0,lt.ReadOnly),st=vt.disabled,ct=h.colorModeForRenderPass(),xt=[],yt=0;yt<y.length;yt++){var Ct=y[yt],gt=d.getTile(Ct),It=gt.getBucket(p);if(It){var Lt=It.programConfigurations.get(p.id),jt={programConfiguration:Lt,program:h.useProgram("circle",Lt),layoutVertexBuffer:It.layoutVertexBuffer,indexBuffer:It.indexBuffer,uniformValues:bd(h,Ct,gt,p)};if(N)for(var ne=0,Jt=It.segments.get();ne<Jt.length;ne+=1){var ae=Jt[ne];xt.push({segments:new o.SegmentVector([ae]),sortKey:ae.sortKey,state:jt})}else xt.push({segments:It.segments,sortKey:0,state:jt})}}N&&xt.sort(function(an,_n){return an.sortKey-_n.sortKey});for(var ge=0,we=xt;ge<we.length;ge+=1){var Te=we[ge],je=Te.state;je.program.draw(q,X.TRIANGLES,it,st,ct,Rt.disabled,je.uniformValues,p.id,je.layoutVertexBuffer,je.indexBuffer,Te.segments,p.paint,h.transform.zoom,je.programConfiguration)}}}},heatmap:function(h,d,p,y){if(p.paint.get("heatmap-opacity")!==0)if(h.renderPass==="offscreen"){var S=h.context,P=S.gl,M=vt.disabled,N=new Mt([P.ONE,P.ONE],o.Color.transparent,[!0,!0,!0,!0]);(function(xt,yt,Ct){var gt=xt.gl;xt.activeTexture.set(gt.TEXTURE1),xt.viewport.set([0,0,yt.width/4,yt.height/4]);var It=Ct.heatmapFbo;if(It)gt.bindTexture(gt.TEXTURE_2D,It.colorAttachment.get()),xt.bindFramebuffer.set(It.framebuffer);else{var Lt=gt.createTexture();gt.bindTexture(gt.TEXTURE_2D,Lt),gt.texParameteri(gt.TEXTURE_2D,gt.TEXTURE_WRAP_S,gt.CLAMP_TO_EDGE),gt.texParameteri(gt.TEXTURE_2D,gt.TEXTURE_WRAP_T,gt.CLAMP_TO_EDGE),gt.texParameteri(gt.TEXTURE_2D,gt.TEXTURE_MIN_FILTER,gt.LINEAR),gt.texParameteri(gt.TEXTURE_2D,gt.TEXTURE_MAG_FILTER,gt.LINEAR),It=Ct.heatmapFbo=xt.createFramebuffer(yt.width/4,yt.height/4,!1),function(jt,ne,Jt,ae){var ge=jt.gl;ge.texImage2D(ge.TEXTURE_2D,0,ge.RGBA,ne.width/4,ne.height/4,0,ge.RGBA,jt.extRenderToTextureHalfFloat?jt.extTextureHalfFloat.HALF_FLOAT_OES:ge.UNSIGNED_BYTE,null),ae.colorAttachment.set(Jt)}(xt,yt,Lt,It)}})(S,h,p),S.clear({color:o.Color.transparent});for(var q=0;q<y.length;q++){var X=y[q];if(!d.hasRenderableParent(X)){var it=d.getTile(X),st=it.getBucket(p);if(st){var ct=st.programConfigurations.get(p.id);h.useProgram("heatmap",ct).draw(S,P.TRIANGLES,lt.disabled,M,N,Rt.disabled,wd(X.posMatrix,it,h.transform.zoom,p.paint.get("heatmap-intensity")),p.id,st.layoutVertexBuffer,st.indexBuffer,st.segments,p.paint,h.transform.zoom,ct)}}}S.viewport.set([0,0,h.width,h.height])}else h.renderPass==="translucent"&&(h.context.setColorMode(h.colorModeForRenderPass()),function(xt,yt){var Ct=xt.context,gt=Ct.gl,It=yt.heatmapFbo;if(It){Ct.activeTexture.set(gt.TEXTURE0),gt.bindTexture(gt.TEXTURE_2D,It.colorAttachment.get()),Ct.activeTexture.set(gt.TEXTURE1);var Lt=yt.colorRampTexture;Lt||(Lt=yt.colorRampTexture=new o.Texture(Ct,yt.colorRamp,gt.RGBA)),Lt.bind(gt.LINEAR,gt.CLAMP_TO_EDGE),xt.useProgram("heatmapTexture").draw(Ct,gt.TRIANGLES,lt.disabled,vt.disabled,xt.colorModeForRenderPass(),Rt.disabled,function(jt,ne,Jt,ae){var ge=o.create();o.ortho(ge,0,jt.width,jt.height,0,0,1);var we=jt.context.gl;return{u_matrix:ge,u_world:[we.drawingBufferWidth,we.drawingBufferHeight],u_image:0,u_color_ramp:1,u_opacity:ne.paint.get("heatmap-opacity")}}(xt,yt),yt.id,xt.viewportBuffer,xt.quadTriangleIndexBuffer,xt.viewportSegments,yt.paint,xt.transform.zoom)}}(h,p))},line:function(h,d,p,y){if(h.renderPass==="translucent"){var S=p.paint.get("line-opacity"),P=p.paint.get("line-width");if(S.constantOr(1)!==0&&P.constantOr(1)!==0)for(var M=h.depthModeForSublayer(0,lt.ReadOnly),N=h.colorModeForRenderPass(),q=p.paint.get("line-dasharray"),X=p.paint.get("line-pattern"),it=X.constantOr(1),st=p.paint.get("line-gradient"),ct=p.getCrossfadeParameters(),xt=it?"linePattern":q?"lineSDF":st?"lineGradient":"line",yt=h.context,Ct=yt.gl,gt=!0,It=0,Lt=y;It<Lt.length;It+=1){var jt=Lt[It],ne=d.getTile(jt);if(!it||ne.patternsLoaded()){var Jt=ne.getBucket(p);if(Jt){var ae=Jt.programConfigurations.get(p.id),ge=h.context.program.get(),we=h.useProgram(xt,ae),Te=gt||we.program!==ge,je=X.constantOr(null);if(je&&ne.imageAtlas){var an=ne.imageAtlas,_n=an.patternPositions[je.to.toString()],vn=an.patternPositions[je.from.toString()];_n&&vn&&ae.setConstantPatternPositions(_n,vn)}var Ir=it?Gs(h,ne,p,ct):q?Lg(h,ne,p,q,ct):st?ui(h,ne,p,Jt.lineClipsArray.length):qs(h,ne,p);if(it)yt.activeTexture.set(Ct.TEXTURE0),ne.imageAtlasTexture.bind(Ct.LINEAR,Ct.CLAMP_TO_EDGE),ae.updatePaintBuffers(ct);else if(q&&(Te||h.lineAtlas.dirty))yt.activeTexture.set(Ct.TEXTURE0),h.lineAtlas.bind(yt);else if(st){var Qe=Jt.gradients[p.id],bn=Qe.texture;if(p.gradientVersion!==Qe.version){var Wn=256;if(p.stepInterpolant){var On=d.getSource().maxzoom,Pn=jt.canonical.z===On?Math.ceil(1<<h.transform.maxZoom-jt.canonical.z):1;Wn=o.clamp(o.nextPowerOfTwo(Jt.maxLineLength/o.EXTENT*1024*Pn),256,yt.maxTextureSize)}Qe.gradient=o.renderColorRamp({expression:p.gradientExpression(),evaluationKey:"lineProgress",resolution:Wn,image:Qe.gradient||void 0,clips:Jt.lineClipsArray}),Qe.texture?Qe.texture.update(Qe.gradient):Qe.texture=new o.Texture(yt,Qe.gradient,Ct.RGBA),Qe.version=p.gradientVersion,bn=Qe.texture}yt.activeTexture.set(Ct.TEXTURE0),bn.bind(p.stepInterpolant?Ct.NEAREST:Ct.LINEAR,Ct.CLAMP_TO_EDGE)}we.draw(yt,Ct.TRIANGLES,M,h.stencilModeForClipping(jt),N,Rt.disabled,Ir,p.id,Jt.layoutVertexBuffer,Jt.indexBuffer,Jt.segments,p.paint,h.transform.zoom,ae,Jt.layoutVertexBuffer2),gt=!1}}}}},fill:function(h,d,p,y){var S=p.paint.get("fill-color"),P=p.paint.get("fill-opacity");if(P.constantOr(1)!==0){var M=h.colorModeForRenderPass(),N=p.paint.get("fill-pattern"),q=h.opaquePassEnabledForLayer()&&!N.constantOr(1)&&S.constantOr(o.Color.transparent).a===1&&P.constantOr(0)===1?"opaque":"translucent";if(h.renderPass===q){var X=h.depthModeForSublayer(1,h.renderPass==="opaque"?lt.ReadWrite:lt.ReadOnly);vo(h,d,p,y,X,M,!1)}if(h.renderPass==="translucent"&&p.paint.get("fill-antialias")){var it=h.depthModeForSublayer(p.getPaintProperty("fill-outline-color")?2:0,lt.ReadOnly);vo(h,d,p,y,it,M,!0)}}},"fill-extrusion":function(h,d,p,y){var S=p.paint.get("fill-extrusion-opacity");if(S!==0&&h.renderPass==="translucent"){var P=new lt(h.context.gl.LEQUAL,lt.ReadWrite,h.depthRangeFor3D);if(S!==1||p.paint.get("fill-extrusion-pattern").constantOr(1))Eo(h,d,p,y,P,vt.disabled,Mt.disabled),Eo(h,d,p,y,P,h.stencilModeFor3D(),h.colorModeForRenderPass());else{var M=h.colorModeForRenderPass();Eo(h,d,p,y,P,vt.disabled,M)}}},hillshade:function(h,d,p,y){if(h.renderPass==="offscreen"||h.renderPass==="translucent"){for(var S=h.context,P=h.depthModeForSublayer(0,lt.ReadOnly),M=h.colorModeForRenderPass(),N=h.renderPass==="translucent"?h.stencilConfigForOverlap(y):[{},y],q=N[0],X=0,it=N[1];X<it.length;X+=1){var st=it[X],ct=d.getTile(st);ct.needsHillshadePrepare&&h.renderPass==="offscreen"?fs(h,ct,p,P,vt.disabled,M):h.renderPass==="translucent"&&Ts(h,ct,p,P,q[st.overscaledZ],M)}S.viewport.set([0,0,h.width,h.height])}},raster:function(h,d,p,y){if(h.renderPass==="translucent"&&p.paint.get("raster-opacity")!==0&&y.length)for(var S=h.context,P=S.gl,M=d.getSource(),N=h.useProgram("raster"),q=h.colorModeForRenderPass(),X=M instanceof De?[{},y]:h.stencilConfigForOverlap(y),it=X[0],st=X[1],ct=st[st.length-1].overscaledZ,xt=!h.options.moving,yt=0,Ct=st;yt<Ct.length;yt+=1){var gt=Ct[yt],It=h.depthModeForSublayer(gt.overscaledZ-ct,p.paint.get("raster-opacity")===1?lt.ReadWrite:lt.ReadOnly,P.LESS),Lt=d.getTile(gt),jt=h.transform.calculatePosMatrix(gt.toUnwrapped(),xt);Lt.registerFadeDuration(p.paint.get("raster-fade-duration"));var ne=d.findLoadedParent(gt,0),Jt=Ti(Lt,ne,d,p,h.transform),ae=void 0,ge=void 0,we=p.paint.get("raster-resampling")==="nearest"?P.NEAREST:P.LINEAR;S.activeTexture.set(P.TEXTURE0),Lt.texture.bind(we,P.CLAMP_TO_EDGE,P.LINEAR_MIPMAP_NEAREST),S.activeTexture.set(P.TEXTURE1),ne?(ne.texture.bind(we,P.CLAMP_TO_EDGE,P.LINEAR_MIPMAP_NEAREST),ae=Math.pow(2,ne.tileID.overscaledZ-Lt.tileID.overscaledZ),ge=[Lt.tileID.canonical.x*ae%1,Lt.tileID.canonical.y*ae%1]):Lt.texture.bind(we,P.CLAMP_TO_EDGE,P.LINEAR_MIPMAP_NEAREST);var Te=Rh(jt,ge||[0,0],ae||1,Jt,p);M instanceof De?N.draw(S,P.TRIANGLES,It,vt.disabled,q,Rt.disabled,Te,p.id,M.boundsBuffer,h.quadTriangleIndexBuffer,M.boundsSegments):N.draw(S,P.TRIANGLES,It,it[gt.overscaledZ],q,Rt.disabled,Te,p.id,h.rasterBoundsBuffer,h.quadTriangleIndexBuffer,h.rasterBoundsSegments)}},background:function(h,d,p){var y=p.paint.get("background-color"),S=p.paint.get("background-opacity");if(S!==0){var P=h.context,M=P.gl,N=h.transform,q=N.tileSize,X=p.paint.get("background-pattern");if(!h.isPatternMissing(X)){var it=!X&&y.a===1&&S===1&&h.opaquePassEnabledForLayer()?"opaque":"translucent";if(h.renderPass===it){var st=vt.disabled,ct=h.depthModeForSublayer(0,it==="opaque"?lt.ReadWrite:lt.ReadOnly),xt=h.colorModeForRenderPass(),yt=h.useProgram(X?"backgroundPattern":"background"),Ct=N.coveringTiles({tileSize:q});X&&(P.activeTexture.set(M.TEXTURE0),h.imageManager.bind(h.context));for(var gt=p.getCrossfadeParameters(),It=0,Lt=Ct;It<Lt.length;It+=1){var jt=Lt[It],ne=h.transform.calculatePosMatrix(jt.toUnwrapped()),Jt=X?Ut(ne,S,h,X,{tileID:jt,tileSize:q},gt):Dh(ne,S,y);yt.draw(P,M.TRIANGLES,ct,st,xt,Rt.disabled,Jt,p.id,h.tileExtentBuffer,h.quadTriangleIndexBuffer,h.tileExtentSegments)}}}}},debug:function(h,d,p){for(var y=0;y<p.length;y++)oe(h,d,p[y])},custom:function(h,d,p){var y=h.context,S=p.implementation;if(h.renderPass==="offscreen"){var P=S.prerender;P&&(h.setCustomLayerDefaults(),y.setColorMode(h.colorModeForRenderPass()),P.call(S,y.gl,h.transform.customLayerMatrix()),y.setDirty(),h.setBaseState())}else if(h.renderPass==="translucent"){h.setCustomLayerDefaults(),y.setColorMode(h.colorModeForRenderPass()),y.setStencilMode(vt.disabled);var M=S.renderingMode==="3d"?new lt(h.context.gl.LEQUAL,lt.ReadWrite,h.depthRangeFor3D):h.depthModeForSublayer(0,lt.ReadOnly);y.setDepthMode(M),S.render(y.gl,h.transform.customLayerMatrix()),y.setDirty(),h.setBaseState(),y.bindFramebuffer.set(null)}}},Le=function(h,d){this.context=new at(h),this.transform=d,this._tileTextures={},this.setup(),this.numSublayers=bt.maxUnderzooming+bt.maxOverzooming+1,this.depthEpsilon=1/Math.pow(2,16),this.crossTileSymbolIndex=new fn,this.gpuTimers={}};Le.prototype.resize=function(h,d){if(this.width=h*o.browser.devicePixelRatio,this.height=d*o.browser.devicePixelRatio,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(var p=0,y=this.style._order;p<y.length;p+=1)this.style._layers[y[p]].resize()},Le.prototype.setup=function(){var h=this.context,d=new o.StructArrayLayout2i4;d.emplaceBack(0,0),d.emplaceBack(o.EXTENT,0),d.emplaceBack(0,o.EXTENT),d.emplaceBack(o.EXTENT,o.EXTENT),this.tileExtentBuffer=h.createVertexBuffer(d,Oi.members),this.tileExtentSegments=o.SegmentVector.simpleSegment(0,0,4,2);var p=new o.StructArrayLayout2i4;p.emplaceBack(0,0),p.emplaceBack(o.EXTENT,0),p.emplaceBack(0,o.EXTENT),p.emplaceBack(o.EXTENT,o.EXTENT),this.debugBuffer=h.createVertexBuffer(p,Oi.members),this.debugSegments=o.SegmentVector.simpleSegment(0,0,4,5);var y=new o.StructArrayLayout4i8;y.emplaceBack(0,0,0,0),y.emplaceBack(o.EXTENT,0,o.EXTENT,0),y.emplaceBack(0,o.EXTENT,0,o.EXTENT),y.emplaceBack(o.EXTENT,o.EXTENT,o.EXTENT,o.EXTENT),this.rasterBoundsBuffer=h.createVertexBuffer(y,be.members),this.rasterBoundsSegments=o.SegmentVector.simpleSegment(0,0,4,2);var S=new o.StructArrayLayout2i4;S.emplaceBack(0,0),S.emplaceBack(1,0),S.emplaceBack(0,1),S.emplaceBack(1,1),this.viewportBuffer=h.createVertexBuffer(S,Oi.members),this.viewportSegments=o.SegmentVector.simpleSegment(0,0,4,2);var P=new o.StructArrayLayout1ui2;P.emplaceBack(0),P.emplaceBack(1),P.emplaceBack(3),P.emplaceBack(2),P.emplaceBack(0),this.tileBorderIndexBuffer=h.createIndexBuffer(P);var M=new o.StructArrayLayout3ui6;M.emplaceBack(0,1,2),M.emplaceBack(2,1,3),this.quadTriangleIndexBuffer=h.createIndexBuffer(M),this.emptyTexture=new o.Texture(h,{width:1,height:1,data:new Uint8Array([0,0,0,0])},h.gl.RGBA);var N=this.context.gl;this.stencilClearMode=new vt({func:N.ALWAYS,mask:0},0,255,N.ZERO,N.ZERO,N.ZERO)},Le.prototype.clearStencil=function(){var h=this.context,d=h.gl;this.nextStencilID=1,this.currentStencilSource=void 0;var p=o.create();o.ortho(p,0,this.width,this.height,0,0,1),o.scale(p,p,[d.drawingBufferWidth,d.drawingBufferHeight,0]),this.useProgram("clippingMask").draw(h,d.TRIANGLES,lt.disabled,this.stencilClearMode,Mt.disabled,Rt.disabled,cs(p),"$clipping",this.viewportBuffer,this.quadTriangleIndexBuffer,this.viewportSegments)},Le.prototype._renderTileClippingMasks=function(h,d){if(this.currentStencilSource!==h.source&&h.isTileClipped()&&d&&d.length){this.currentStencilSource=h.source;var p=this.context,y=p.gl;this.nextStencilID+d.length>256&&this.clearStencil(),p.setColorMode(Mt.disabled),p.setDepthMode(lt.disabled);var S=this.useProgram("clippingMask");this._tileClippingMaskIDs={};for(var P=0,M=d;P<M.length;P+=1){var N=M[P],q=this._tileClippingMaskIDs[N.key]=this.nextStencilID++;S.draw(p,y.TRIANGLES,lt.disabled,new vt({func:y.ALWAYS,mask:0},q,255,y.KEEP,y.KEEP,y.REPLACE),Mt.disabled,Rt.disabled,cs(N.posMatrix),"$clipping",this.tileExtentBuffer,this.quadTriangleIndexBuffer,this.tileExtentSegments)}}},Le.prototype.stencilModeFor3D=function(){this.currentStencilSource=void 0,this.nextStencilID+1>256&&this.clearStencil();var h=this.nextStencilID++,d=this.context.gl;return new vt({func:d.NOTEQUAL,mask:255},h,255,d.KEEP,d.KEEP,d.REPLACE)},Le.prototype.stencilModeForClipping=function(h){var d=this.context.gl;return new vt({func:d.EQUAL,mask:255},this._tileClippingMaskIDs[h.key],0,d.KEEP,d.KEEP,d.REPLACE)},Le.prototype.stencilConfigForOverlap=function(h){var d,p=this.context.gl,y=h.sort(function(q,X){return X.overscaledZ-q.overscaledZ}),S=y[y.length-1].overscaledZ,P=y[0].overscaledZ-S+1;if(P>1){this.currentStencilSource=void 0,this.nextStencilID+P>256&&this.clearStencil();for(var M={},N=0;N<P;N++)M[N+S]=new vt({func:p.GEQUAL,mask:255},N+this.nextStencilID,255,p.KEEP,p.KEEP,p.REPLACE);return this.nextStencilID+=P,[M,y]}return[(d={},d[S]=vt.disabled,d),y]},Le.prototype.colorModeForRenderPass=function(){var h=this.context.gl;return this._showOverdrawInspector?new Mt([h.CONSTANT_COLOR,h.ONE],new o.Color(1/8,1/8,1/8,0),[!0,!0,!0,!0]):this.renderPass==="opaque"?Mt.unblended:Mt.alphaBlended},Le.prototype.depthModeForSublayer=function(h,d,p){if(!this.opaquePassEnabledForLayer())return lt.disabled;var y=1-((1+this.currentLayer)*this.numSublayers+h)*this.depthEpsilon;return new lt(p||this.context.gl.LEQUAL,d,[y,y])},Le.prototype.opaquePassEnabledForLayer=function(){return this.currentLayer<this.opaquePassCutoff},Le.prototype.render=function(h,d){var p=this;this.style=h,this.options=d,this.lineAtlas=h.lineAtlas,this.imageManager=h.imageManager,this.glyphManager=h.glyphManager,this.symbolFadeChange=h.placement.symbolFadeChange(o.browser.now()),this.imageManager.beginFrame();var y=this.style._order,S=this.style.sourceCaches;for(var P in S){var M=S[P];M.used&&M.prepare(this.context)}var N,q,X={},it={},st={};for(var ct in S){var xt=S[ct];X[ct]=xt.getVisibleCoordinates(),it[ct]=X[ct].slice().reverse(),st[ct]=xt.getVisibleCoordinates(!0).reverse()}this.opaquePassCutoff=1/0;for(var yt=0;yt<y.length;yt++)if(this.style._layers[y[yt]].is3D()){this.opaquePassCutoff=yt;break}this.renderPass="offscreen";for(var Ct=0,gt=y;Ct<gt.length;Ct+=1){var It=this.style._layers[gt[Ct]];if(It.hasOffscreenPass()&&!It.isHidden(this.transform.zoom)){var Lt=it[It.source];(It.type==="custom"||Lt.length)&&this.renderLayer(this,S[It.source],It,Lt)}}for(this.context.bindFramebuffer.set(null),this.context.clear({color:d.showOverdrawInspector?o.Color.black:o.Color.transparent,depth:1}),this.clearStencil(),this._showOverdrawInspector=d.showOverdrawInspector,this.depthRangeFor3D=[0,1-(h._order.length+2)*this.numSublayers*this.depthEpsilon],this.renderPass="opaque",this.currentLayer=y.length-1;this.currentLayer>=0;this.currentLayer--){var jt=this.style._layers[y[this.currentLayer]],ne=S[jt.source],Jt=X[jt.source];this._renderTileClippingMasks(jt,Jt),this.renderLayer(this,ne,jt,Jt)}for(this.renderPass="translucent",this.currentLayer=0;this.currentLayer<y.length;this.currentLayer++){var ae=this.style._layers[y[this.currentLayer]],ge=S[ae.source],we=(ae.type==="symbol"?st:it)[ae.source];this._renderTileClippingMasks(ae,X[ae.source]),this.renderLayer(this,ge,ae,we)}this.options.showTileBoundaries&&(o.values(this.style._layers).forEach(function(Te){Te.source&&!Te.isHidden(p.transform.zoom)&&(Te.source!==(q&&q.id)&&(q=p.style.sourceCaches[Te.source]),(!N||N.getSource().maxzoom<q.getSource().maxzoom)&&(N=q))}),N&&Gt.debug(this,N,N.getVisibleCoordinates())),this.options.showPadding&&function(Te){var je=Te.transform.padding;Lp(Te,Te.transform.height-(je.top||0),3,Ws),Lp(Te,je.bottom||0,3,Fc),nc(Te,je.left||0,3,Nh),nc(Te,Te.transform.width-(je.right||0),3,Cl);var an=Te.transform.centerPoint;(function(_n,vn,Ir,Qe){$t(_n,vn-1,Ir-10,2,20,Qe),$t(_n,vn-10,Ir-1,20,2,Qe)})(Te,an.x,Te.transform.height-an.y,zc)}(this),this.context.setDefault()},Le.prototype.renderLayer=function(h,d,p,y){p.isHidden(this.transform.zoom)||(p.type==="background"||p.type==="custom"||y.length)&&(this.id=p.id,this.gpuTimingStart(p),Gt[p.type](h,d,p,y,this.style.placement.variableOffsets),this.gpuTimingEnd())},Le.prototype.gpuTimingStart=function(h){if(this.options.gpuTiming){var d=this.context.extTimerQuery,p=this.gpuTimers[h.id];p||(p=this.gpuTimers[h.id]={calls:0,cpuTime:0,query:d.createQueryEXT()}),p.calls++,d.beginQueryEXT(d.TIME_ELAPSED_EXT,p.query)}},Le.prototype.gpuTimingEnd=function(){if(this.options.gpuTiming){var h=this.context.extTimerQuery;h.endQueryEXT(h.TIME_ELAPSED_EXT)}},Le.prototype.collectGpuTimers=function(){var h=this.gpuTimers;return this.gpuTimers={},h},Le.prototype.queryGpuTimers=function(h){var d={};for(var p in h){var y=h[p],S=this.context.extTimerQuery,P=S.getQueryObjectEXT(y.query,S.QUERY_RESULT_EXT)/1e6;S.deleteQueryEXT(y.query),d[p]=P}return d},Le.prototype.translatePosMatrix=function(h,d,p,y,S){if(!p[0]&&!p[1])return h;var P=S?y==="map"?this.transform.angle:0:y==="viewport"?-this.transform.angle:0;if(P){var M=Math.sin(P),N=Math.cos(P);p=[p[0]*N-p[1]*M,p[0]*M+p[1]*N]}var q=[S?p[0]:oi(d,p[0],this.transform.zoom),S?p[1]:oi(d,p[1],this.transform.zoom),0],X=new Float32Array(16);return o.translate(X,h,q),X},Le.prototype.saveTileTexture=function(h){var d=this._tileTextures[h.size[0]];d?d.push(h):this._tileTextures[h.size[0]]=[h]},Le.prototype.getTileTexture=function(h){var d=this._tileTextures[h];return d&&d.length>0?d.pop():null},Le.prototype.isPatternMissing=function(h){if(!h)return!1;if(!h.from||!h.to)return!0;var d=this.imageManager.getPattern(h.from.toString()),p=this.imageManager.getPattern(h.to.toString());return!d||!p},Le.prototype.useProgram=function(h,d){this.cache=this.cache||{};var p=""+h+(d?d.cacheKey:"")+(this._showOverdrawInspector?"/overdraw":"");return this.cache[p]||(this.cache[p]=new Oh(this.context,h,di[h],d,ce[h],this._showOverdrawInspector)),this.cache[p]},Le.prototype.setCustomLayerDefaults=function(){this.context.unbindVAO(),this.context.cullFace.setDefault(),this.context.activeTexture.setDefault(),this.context.pixelStoreUnpack.setDefault(),this.context.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.context.pixelStoreUnpackFlipY.setDefault()},Le.prototype.setBaseState=function(){var h=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(h.FUNC_ADD)},Le.prototype.initDebugOverlayCanvas=function(){this.debugOverlayCanvas==null&&(this.debugOverlayCanvas=o.window.document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512,this.debugOverlayTexture=new o.Texture(this.context,this.debugOverlayCanvas,this.context.gl.RGBA))},Le.prototype.destroy=function(){this.emptyTexture.destroy(),this.debugOverlayTexture&&this.debugOverlayTexture.destroy()};var kn=function(h,d){this.points=h,this.planes=d};kn.fromInvProjectionMatrix=function(h,d,p){var y=Math.pow(2,p),S=[[-1,1,-1,1],[1,1,-1,1],[1,-1,-1,1],[-1,-1,-1,1],[-1,1,1,1],[1,1,1,1],[1,-1,1,1],[-1,-1,1,1]].map(function(M){return o.transformMat4([],M,h)}).map(function(M){return o.scale$1([],M,1/M[3]/d*y)}),P=[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]].map(function(M){var N=o.sub([],S[M[0]],S[M[1]]),q=o.sub([],S[M[2]],S[M[1]]),X=o.normalize([],o.cross([],N,q)),it=-o.dot(X,S[M[1]]);return X.concat(it)});return new kn(S,P)};var br=function(h,d){this.min=h,this.max=d,this.center=o.scale$2([],o.add([],this.min,this.max),.5)};br.prototype.quadrant=function(h){for(var d=[h%2==0,h<2],p=o.clone$2(this.min),y=o.clone$2(this.max),S=0;S<d.length;S++)p[S]=d[S]?this.min[S]:this.center[S],y[S]=d[S]?this.center[S]:this.max[S];return y[2]=this.max[2],new br(p,y)},br.prototype.distanceX=function(h){return Math.max(Math.min(this.max[0],h[0]),this.min[0])-h[0]},br.prototype.distanceY=function(h){return Math.max(Math.min(this.max[1],h[1]),this.min[1])-h[1]},br.prototype.intersects=function(h){for(var d=[[this.min[0],this.min[1],0,1],[this.max[0],this.min[1],0,1],[this.max[0],this.max[1],0,1],[this.min[0],this.max[1],0,1]],p=!0,y=0;y<h.planes.length;y++){for(var S=h.planes[y],P=0,M=0;M<d.length;M++)P+=o.dot$1(S,d[M])>=0;if(P===0)return 0;P!==d.length&&(p=!1)}if(p)return 2;for(var N=0;N<3;N++){for(var q=Number.MAX_VALUE,X=-Number.MAX_VALUE,it=0;it<h.points.length;it++){var st=h.points[it][N]-this.min[N];q=Math.min(q,st),X=Math.max(X,st)}if(X<0||q>this.max[N]-this.min[N])return 0}return 1};var Lr=function(h,d,p,y){if(h===void 0&&(h=0),d===void 0&&(d=0),p===void 0&&(p=0),y===void 0&&(y=0),isNaN(h)||h<0||isNaN(d)||d<0||isNaN(p)||p<0||isNaN(y)||y<0)throw new Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=h,this.bottom=d,this.left=p,this.right=y};Lr.prototype.interpolate=function(h,d,p){return d.top!=null&&h.top!=null&&(this.top=o.number(h.top,d.top,p)),d.bottom!=null&&h.bottom!=null&&(this.bottom=o.number(h.bottom,d.bottom,p)),d.left!=null&&h.left!=null&&(this.left=o.number(h.left,d.left,p)),d.right!=null&&h.right!=null&&(this.right=o.number(h.right,d.right,p)),this},Lr.prototype.getCenter=function(h,d){var p=o.clamp((this.left+h-this.right)/2,0,h),y=o.clamp((this.top+d-this.bottom)/2,0,d);return new o.Point(p,y)},Lr.prototype.equals=function(h){return this.top===h.top&&this.bottom===h.bottom&&this.left===h.left&&this.right===h.right},Lr.prototype.clone=function(){return new Lr(this.top,this.bottom,this.left,this.right)},Lr.prototype.toJSON=function(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}};var un=function(h,d,p,y,S){this.tileSize=512,this.maxValidLatitude=85.051129,this._renderWorldCopies=S===void 0||S,this._minZoom=h||0,this._maxZoom=d||22,this._minPitch=p==null?0:p,this._maxPitch=y==null?60:y,this.setMaxBounds(),this.width=0,this.height=0,this._center=new o.LngLat(0,0),this.zoom=0,this.angle=0,this._fov=.6435011087932844,this._pitch=0,this._unmodified=!0,this._edgeInsets=new Lr,this._posMatrixCache={},this._alignedPosMatrixCache={}},Cr={minZoom:{configurable:!0},maxZoom:{configurable:!0},minPitch:{configurable:!0},maxPitch:{configurable:!0},renderWorldCopies:{configurable:!0},worldSize:{configurable:!0},centerOffset:{configurable:!0},size:{configurable:!0},bearing:{configurable:!0},pitch:{configurable:!0},fov:{configurable:!0},zoom:{configurable:!0},center:{configurable:!0},padding:{configurable:!0},centerPoint:{configurable:!0},unmodified:{configurable:!0},point:{configurable:!0}};un.prototype.clone=function(){var h=new un(this._minZoom,this._maxZoom,this._minPitch,this.maxPitch,this._renderWorldCopies);return h.tileSize=this.tileSize,h.latRange=this.latRange,h.width=this.width,h.height=this.height,h._center=this._center,h.zoom=this.zoom,h.angle=this.angle,h._fov=this._fov,h._pitch=this._pitch,h._unmodified=this._unmodified,h._edgeInsets=this._edgeInsets.clone(),h._calcMatrices(),h},Cr.minZoom.get=function(){return this._minZoom},Cr.minZoom.set=function(h){this._minZoom!==h&&(this._minZoom=h,this.zoom=Math.max(this.zoom,h))},Cr.maxZoom.get=function(){return this._maxZoom},Cr.maxZoom.set=function(h){this._maxZoom!==h&&(this._maxZoom=h,this.zoom=Math.min(this.zoom,h))},Cr.minPitch.get=function(){return this._minPitch},Cr.minPitch.set=function(h){this._minPitch!==h&&(this._minPitch=h,this.pitch=Math.max(this.pitch,h))},Cr.maxPitch.get=function(){return this._maxPitch},Cr.maxPitch.set=function(h){this._maxPitch!==h&&(this._maxPitch=h,this.pitch=Math.min(this.pitch,h))},Cr.renderWorldCopies.get=function(){return this._renderWorldCopies},Cr.renderWorldCopies.set=function(h){h===void 0?h=!0:h===null&&(h=!1),this._renderWorldCopies=h},Cr.worldSize.get=function(){return this.tileSize*this.scale},Cr.centerOffset.get=function(){return this.centerPoint._sub(this.size._div(2))},Cr.size.get=function(){return new o.Point(this.width,this.height)},Cr.bearing.get=function(){return-this.angle/Math.PI*180},Cr.bearing.set=function(h){var d=-o.wrap(h,-180,180)*Math.PI/180;this.angle!==d&&(this._unmodified=!1,this.angle=d,this._calcMatrices(),this.rotationMatrix=o.create$2(),o.rotate(this.rotationMatrix,this.rotationMatrix,this.angle))},Cr.pitch.get=function(){return this._pitch/Math.PI*180},Cr.pitch.set=function(h){var d=o.clamp(h,this.minPitch,this.maxPitch)/180*Math.PI;this._pitch!==d&&(this._unmodified=!1,this._pitch=d,this._calcMatrices())},Cr.fov.get=function(){return this._fov/Math.PI*180},Cr.fov.set=function(h){h=Math.max(.01,Math.min(60,h)),this._fov!==h&&(this._unmodified=!1,this._fov=h/180*Math.PI,this._calcMatrices())},Cr.zoom.get=function(){return this._zoom},Cr.zoom.set=function(h){var d=Math.min(Math.max(h,this.minZoom),this.maxZoom);this._zoom!==d&&(this._unmodified=!1,this._zoom=d,this.scale=this.zoomScale(d),this.tileZoom=Math.floor(d),this.zoomFraction=d-this.tileZoom,this._constrain(),this._calcMatrices())},Cr.center.get=function(){return this._center},Cr.center.set=function(h){h.lat===this._center.lat&&h.lng===this._center.lng||(this._unmodified=!1,this._center=h,this._constrain(),this._calcMatrices())},Cr.padding.get=function(){return this._edgeInsets.toJSON()},Cr.padding.set=function(h){this._edgeInsets.equals(h)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,h,1),this._calcMatrices())},Cr.centerPoint.get=function(){return this._edgeInsets.getCenter(this.width,this.height)},un.prototype.isPaddingEqual=function(h){return this._edgeInsets.equals(h)},un.prototype.interpolatePadding=function(h,d,p){this._unmodified=!1,this._edgeInsets.interpolate(h,d,p),this._constrain(),this._calcMatrices()},un.prototype.coveringZoomLevel=function(h){var d=(h.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/h.tileSize));return Math.max(0,d)},un.prototype.getVisibleUnwrappedCoordinates=function(h){var d=[new o.UnwrappedTileID(0,h)];if(this._renderWorldCopies)for(var p=this.pointCoordinate(new o.Point(0,0)),y=this.pointCoordinate(new o.Point(this.width,0)),S=this.pointCoordinate(new o.Point(this.width,this.height)),P=this.pointCoordinate(new o.Point(0,this.height)),M=Math.floor(Math.min(p.x,y.x,S.x,P.x)),N=Math.floor(Math.max(p.x,y.x,S.x,P.x)),q=M-1;q<=N+1;q++)q!==0&&d.push(new o.UnwrappedTileID(q,h));return d},un.prototype.coveringTiles=function(h){var d=this.coveringZoomLevel(h),p=d;if(h.minzoom!==void 0&&d<h.minzoom)return[];h.maxzoom!==void 0&&d>h.maxzoom&&(d=h.maxzoom);var y=o.MercatorCoordinate.fromLngLat(this.center),S=Math.pow(2,d),P=[S*y.x,S*y.y,0],M=kn.fromInvProjectionMatrix(this.invProjMatrix,this.worldSize,d),N=h.minzoom||0;this.pitch<=60&&this._edgeInsets.top<.1&&(N=d);var q=function(Te){return{aabb:new br([Te*S,0,0],[(Te+1)*S,S,0]),zoom:0,x:0,y:0,wrap:Te,fullyVisible:!1}},X=[],it=[],st=d,ct=h.reparseOverscaled?p:d;if(this._renderWorldCopies)for(var xt=1;xt<=3;xt++)X.push(q(-xt)),X.push(q(xt));for(X.push(q(0));X.length>0;){var yt=X.pop(),Ct=yt.x,gt=yt.y,It=yt.fullyVisible;if(!It){var Lt=yt.aabb.intersects(M);if(Lt===0)continue;It=Lt===2}var jt=yt.aabb.distanceX(P),ne=yt.aabb.distanceY(P),Jt=Math.max(Math.abs(jt),Math.abs(ne));if(yt.zoom===st||Jt>3+(1<<st-yt.zoom)-2&&yt.zoom>=N)it.push({tileID:new o.OverscaledTileID(yt.zoom===st?ct:yt.zoom,yt.wrap,yt.zoom,Ct,gt),distanceSq:o.sqrLen([P[0]-.5-Ct,P[1]-.5-gt])});else for(var ae=0;ae<4;ae++){var ge=(Ct<<1)+ae%2,we=(gt<<1)+(ae>>1);X.push({aabb:yt.aabb.quadrant(ae),zoom:yt.zoom+1,x:ge,y:we,wrap:yt.wrap,fullyVisible:It})}}return it.sort(function(Te,je){return Te.distanceSq-je.distanceSq}).map(function(Te){return Te.tileID})},un.prototype.resize=function(h,d){this.width=h,this.height=d,this.pixelsToGLUnits=[2/h,-2/d],this._constrain(),this._calcMatrices()},Cr.unmodified.get=function(){return this._unmodified},un.prototype.zoomScale=function(h){return Math.pow(2,h)},un.prototype.scaleZoom=function(h){return Math.log(h)/Math.LN2},un.prototype.project=function(h){var d=o.clamp(h.lat,-this.maxValidLatitude,this.maxValidLatitude);return new o.Point(o.mercatorXfromLng(h.lng)*this.worldSize,o.mercatorYfromLat(d)*this.worldSize)},un.prototype.unproject=function(h){return new o.MercatorCoordinate(h.x/this.worldSize,h.y/this.worldSize).toLngLat()},Cr.point.get=function(){return this.project(this.center)},un.prototype.setLocationAtPoint=function(h,d){var p=this.pointCoordinate(d),y=this.pointCoordinate(this.centerPoint),S=this.locationCoordinate(h),P=new o.MercatorCoordinate(S.x-(p.x-y.x),S.y-(p.y-y.y));this.center=this.coordinateLocation(P),this._renderWorldCopies&&(this.center=this.center.wrap())},un.prototype.locationPoint=function(h){return this.coordinatePoint(this.locationCoordinate(h))},un.prototype.pointLocation=function(h){return this.coordinateLocation(this.pointCoordinate(h))},un.prototype.locationCoordinate=function(h){return o.MercatorCoordinate.fromLngLat(h)},un.prototype.coordinateLocation=function(h){return h.toLngLat()},un.prototype.pointCoordinate=function(h){var d=[h.x,h.y,0,1],p=[h.x,h.y,1,1];o.transformMat4(d,d,this.pixelMatrixInverse),o.transformMat4(p,p,this.pixelMatrixInverse);var y=d[3],S=p[3],P=d[1]/y,M=p[1]/S,N=d[2]/y,q=p[2]/S,X=N===q?0:(0-N)/(q-N);return new o.MercatorCoordinate(o.number(d[0]/y,p[0]/S,X)/this.worldSize,o.number(P,M,X)/this.worldSize)},un.prototype.coordinatePoint=function(h){var d=[h.x*this.worldSize,h.y*this.worldSize,0,1];return o.transformMat4(d,d,this.pixelMatrix),new o.Point(d[0]/d[3],d[1]/d[3])},un.prototype.getBounds=function(){return new o.LngLatBounds().extend(this.pointLocation(new o.Point(0,0))).extend(this.pointLocation(new o.Point(this.width,0))).extend(this.pointLocation(new o.Point(this.width,this.height))).extend(this.pointLocation(new o.Point(0,this.height)))},un.prototype.getMaxBounds=function(){return this.latRange&&this.latRange.length===2&&this.lngRange&&this.lngRange.length===2?new o.LngLatBounds([this.lngRange[0],this.latRange[0]],[this.lngRange[1],this.latRange[1]]):null},un.prototype.setMaxBounds=function(h){h?(this.lngRange=[h.getWest(),h.getEast()],this.latRange=[h.getSouth(),h.getNorth()],this._constrain()):(this.lngRange=null,this.latRange=[-this.maxValidLatitude,this.maxValidLatitude])},un.prototype.calculatePosMatrix=function(h,d){d===void 0&&(d=!1);var p=h.key,y=d?this._alignedPosMatrixCache:this._posMatrixCache;if(y[p])return y[p];var S=h.canonical,P=this.worldSize/this.zoomScale(S.z),M=S.x+Math.pow(2,S.z)*h.wrap,N=o.identity(new Float64Array(16));return o.translate(N,N,[M*P,S.y*P,0]),o.scale(N,N,[P/o.EXTENT,P/o.EXTENT,1]),o.multiply(N,d?this.alignedProjMatrix:this.projMatrix,N),y[p]=new Float32Array(N),y[p]},un.prototype.customLayerMatrix=function(){return this.mercatorMatrix.slice()},un.prototype._constrain=function(){if(this.center&&this.width&&this.height&&!this._constraining){this._constraining=!0;var h,d,p,y,S=-90,P=90,M=-180,N=180,q=this.size,X=this._unmodified;if(this.latRange){var it=this.latRange;S=o.mercatorYfromLat(it[1])*this.worldSize,h=(P=o.mercatorYfromLat(it[0])*this.worldSize)-S<q.y?q.y/(P-S):0}if(this.lngRange){var st=this.lngRange;M=o.mercatorXfromLng(st[0])*this.worldSize,d=(N=o.mercatorXfromLng(st[1])*this.worldSize)-M<q.x?q.x/(N-M):0}var ct=this.point,xt=Math.max(d||0,h||0);if(xt)return this.center=this.unproject(new o.Point(d?(N+M)/2:ct.x,h?(P+S)/2:ct.y)),this.zoom+=this.scaleZoom(xt),this._unmodified=X,void(this._constraining=!1);if(this.latRange){var yt=ct.y,Ct=q.y/2;yt-Ct<S&&(y=S+Ct),yt+Ct>P&&(y=P-Ct)}if(this.lngRange){var gt=ct.x,It=q.x/2;gt-It<M&&(p=M+It),gt+It>N&&(p=N-It)}p===void 0&&y===void 0||(this.center=this.unproject(new o.Point(p!==void 0?p:ct.x,y!==void 0?y:ct.y))),this._unmodified=X,this._constraining=!1}},un.prototype._calcMatrices=function(){if(this.height){var h=this.centerOffset;this.cameraToCenterDistance=.5/Math.tan(this._fov/2)*this.height;var d=Math.PI/2+this._pitch,p=this._fov*(.5+h.y/this.height),y=Math.sin(p)*this.cameraToCenterDistance/Math.sin(o.clamp(Math.PI-d-p,.01,Math.PI-.01)),S=this.point,P=S.x,M=S.y,N=1.01*(Math.cos(Math.PI/2-this._pitch)*y+this.cameraToCenterDistance),q=this.height/50,X=new Float64Array(16);o.perspective(X,this._fov,this.width/this.height,q,N),X[8]=2*-h.x/this.width,X[9]=2*h.y/this.height,o.scale(X,X,[1,-1,1]),o.translate(X,X,[0,0,-this.cameraToCenterDistance]),o.rotateX(X,X,this._pitch),o.rotateZ(X,X,this.angle),o.translate(X,X,[-P,-M,0]),this.mercatorMatrix=o.scale([],X,[this.worldSize,this.worldSize,this.worldSize]),o.scale(X,X,[1,1,o.mercatorZfromAltitude(1,this.center.lat)*this.worldSize,1]),this.projMatrix=X,this.invProjMatrix=o.invert([],this.projMatrix);var it=this.width%2/2,st=this.height%2/2,ct=Math.cos(this.angle),xt=Math.sin(this.angle),yt=P-Math.round(P)+ct*it+xt*st,Ct=M-Math.round(M)+ct*st+xt*it,gt=new Float64Array(X);if(o.translate(gt,gt,[yt>.5?yt-1:yt,Ct>.5?Ct-1:Ct,0]),this.alignedProjMatrix=gt,X=o.create(),o.scale(X,X,[this.width/2,-this.height/2,1]),o.translate(X,X,[1,-1,0]),this.labelPlaneMatrix=X,X=o.create(),o.scale(X,X,[1,-1,1]),o.translate(X,X,[-1,-1,0]),o.scale(X,X,[2/this.width,2/this.height,1]),this.glCoordMatrix=X,this.pixelMatrix=o.multiply(new Float64Array(16),this.labelPlaneMatrix,this.projMatrix),!(X=o.invert(new Float64Array(16),this.pixelMatrix)))throw new Error("failed to invert matrix");this.pixelMatrixInverse=X,this._posMatrixCache={},this._alignedPosMatrixCache={}}},un.prototype.maxPitchScaleFactor=function(){if(!this.pixelMatrixInverse)return 1;var h=this.pointCoordinate(new o.Point(0,0)),d=[h.x*this.worldSize,h.y*this.worldSize,0,1];return o.transformMat4(d,d,this.pixelMatrix)[3]/this.cameraToCenterDistance},un.prototype.getCameraPoint=function(){var h=Math.tan(this._pitch)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new o.Point(0,h))},un.prototype.getCameraQueryGeometry=function(h){var d=this.getCameraPoint();if(h.length===1)return[h[0],d];for(var p=d.x,y=d.y,S=d.x,P=d.y,M=0,N=h;M<N.length;M+=1){var q=N[M];p=Math.min(p,q.x),y=Math.min(y,q.y),S=Math.max(S,q.x),P=Math.max(P,q.y)}return[new o.Point(p,y),new o.Point(S,y),new o.Point(S,P),new o.Point(p,P),new o.Point(p,y)]},Object.defineProperties(un.prototype,Cr);var Ia=function(h){var d,p,y,S;this._hashName=h&&encodeURIComponent(h),o.bindAll(["_getCurrentHash","_onHashChange","_updateHash"],this),this._updateHash=(d=this._updateHashUnthrottled.bind(this),p=!1,y=null,S=function(){y=null,p&&(d(),y=setTimeout(S,300),p=!1)},function(){return p=!0,y||S(),y})};Ia.prototype.addTo=function(h){return this._map=h,o.window.addEventListener("hashchange",this._onHashChange,!1),this._map.on("moveend",this._updateHash),this},Ia.prototype.remove=function(){return o.window.removeEventListener("hashchange",this._onHashChange,!1),this._map.off("moveend",this._updateHash),clearTimeout(this._updateHash()),delete this._map,this},Ia.prototype.getHashString=function(h){var d=this._map.getCenter(),p=Math.round(100*this._map.getZoom())/100,y=Math.ceil((p*Math.LN2+Math.log(512/360/.5))/Math.LN10),S=Math.pow(10,y),P=Math.round(d.lng*S)/S,M=Math.round(d.lat*S)/S,N=this._map.getBearing(),q=this._map.getPitch(),X="";if(X+=h?"/"+P+"/"+M+"/"+p:p+"/"+M+"/"+P,(N||q)&&(X+="/"+Math.round(10*N)/10),q&&(X+="/"+Math.round(q)),this._hashName){var it=this._hashName,st=!1,ct=o.window.location.hash.slice(1).split("&").map(function(xt){var yt=xt.split("=")[0];return yt===it?(st=!0,yt+"="+X):xt}).filter(function(xt){return xt});return st||ct.push(it+"="+X),"#"+ct.join("&")}return"#"+X},Ia.prototype._getCurrentHash=function(){var h,d=this,p=o.window.location.hash.replace("#","");return this._hashName?(p.split("&").map(function(y){return y.split("=")}).forEach(function(y){y[0]===d._hashName&&(h=y)}),(h&&h[1]||"").split("/")):p.split("/")},Ia.prototype._onHashChange=function(){var h=this._getCurrentHash();if(h.length>=3&&!h.some(function(p){return isNaN(p)})){var d=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(h[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+h[2],+h[1]],zoom:+h[0],bearing:d,pitch:+(h[4]||0)}),!0}return!1},Ia.prototype._updateHashUnthrottled=function(){var h=o.window.location.href.replace(/(#.+)?$/,this.getHashString());try{o.window.history.replaceState(o.window.history.state,null,h)}catch{}};var Xo={linearity:.3,easing:o.bezier(0,0,.3,1)},hs=o.extend({deceleration:2500,maxSpeed:1400},Xo),Hs=o.extend({deceleration:20,maxSpeed:1400},Xo),Bc=o.extend({deceleration:1e3,maxSpeed:360},Xo),Uc=o.extend({deceleration:1e3,maxSpeed:90},Xo),Gu=function(h){this._map=h,this.clear()};function Dr(h,d){(!h.duration||h.duration<d.duration)&&(h.duration=d.duration,h.easing=d.easing)}function Xs(h,d,p){var y=p.maxSpeed,S=p.linearity,P=p.deceleration,M=o.clamp(h*S/(d/1e3),-y,y),N=Math.abs(M)/(P*S);return{easing:p.easing,duration:1e3*N,amount:M*(N/2)}}Gu.prototype.clear=function(){this._inertiaBuffer=[]},Gu.prototype.record=function(h){this._drainInertiaBuffer(),this._inertiaBuffer.push({time:o.browser.now(),settings:h})},Gu.prototype._drainInertiaBuffer=function(){for(var h=this._inertiaBuffer,d=o.browser.now();h.length>0&&d-h[0].time>160;)h.shift()},Gu.prototype._onMoveEnd=function(h){if(this._drainInertiaBuffer(),!(this._inertiaBuffer.length<2)){for(var d={zoom:0,bearing:0,pitch:0,pan:new o.Point(0,0),pinchAround:void 0,around:void 0},p=0,y=this._inertiaBuffer;p<y.length;p+=1){var S=y[p].settings;d.zoom+=S.zoomDelta||0,d.bearing+=S.bearingDelta||0,d.pitch+=S.pitchDelta||0,S.panDelta&&d.pan._add(S.panDelta),S.around&&(d.around=S.around),S.pinchAround&&(d.pinchAround=S.pinchAround)}var P=this._inertiaBuffer[this._inertiaBuffer.length-1].time-this._inertiaBuffer[0].time,M={};if(d.pan.mag()){var N=Xs(d.pan.mag(),P,o.extend({},hs,h||{}));M.offset=d.pan.mult(N.amount/d.pan.mag()),M.center=this._map.transform.center,Dr(M,N)}if(d.zoom){var q=Xs(d.zoom,P,Hs);M.zoom=this._map.transform.zoom+q.amount,Dr(M,q)}if(d.bearing){var X=Xs(d.bearing,P,Bc);M.bearing=this._map.transform.bearing+o.clamp(X.amount,-179,179),Dr(M,X)}if(d.pitch){var it=Xs(d.pitch,P,Uc);M.pitch=this._map.transform.pitch+it.amount,Dr(M,it)}if(M.zoom||M.bearing){var st=d.pinchAround===void 0?d.around:d.pinchAround;M.around=st?this._map.unproject(st):this._map.getCenter()}return this.clear(),o.extend(M,{noMoveStart:!0})}};var oo=function(h){function d(y,S,P,M){M===void 0&&(M={});var N=c.mousePos(S.getCanvasContainer(),P),q=S.unproject(N);h.call(this,y,o.extend({point:N,lngLat:q,originalEvent:P},M)),this._defaultPrevented=!1,this.target=S}h&&(d.__proto__=h),(d.prototype=Object.create(h&&h.prototype)).constructor=d;var p={defaultPrevented:{configurable:!0}};return d.prototype.preventDefault=function(){this._defaultPrevented=!0},p.defaultPrevented.get=function(){return this._defaultPrevented},Object.defineProperties(d.prototype,p),d}(o.Event),xu=function(h){function d(y,S,P){var M=y==="touchend"?P.changedTouches:P.touches,N=c.touchPos(S.getCanvasContainer(),M),q=N.map(function(st){return S.unproject(st)}),X=N.reduce(function(st,ct,xt,yt){return st.add(ct.div(yt.length))},new o.Point(0,0)),it=S.unproject(X);h.call(this,y,{points:N,point:X,lngLats:q,lngLat:it,originalEvent:P}),this._defaultPrevented=!1}h&&(d.__proto__=h),(d.prototype=Object.create(h&&h.prototype)).constructor=d;var p={defaultPrevented:{configurable:!0}};return d.prototype.preventDefault=function(){this._defaultPrevented=!0},p.defaultPrevented.get=function(){return this._defaultPrevented},Object.defineProperties(d.prototype,p),d}(o.Event),Fh=function(h){function d(y,S,P){h.call(this,y,{originalEvent:P}),this._defaultPrevented=!1}h&&(d.__proto__=h),(d.prototype=Object.create(h&&h.prototype)).constructor=d;var p={defaultPrevented:{configurable:!0}};return d.prototype.preventDefault=function(){this._defaultPrevented=!0},p.defaultPrevented.get=function(){return this._defaultPrevented},Object.defineProperties(d.prototype,p),d}(o.Event),Lo=function(h,d){this._map=h,this._clickTolerance=d.clickTolerance};Lo.prototype.reset=function(){delete this._mousedownPos},Lo.prototype.wheel=function(h){return this._firePreventable(new Fh(h.type,this._map,h))},Lo.prototype.mousedown=function(h,d){return this._mousedownPos=d,this._firePreventable(new oo(h.type,this._map,h))},Lo.prototype.mouseup=function(h){this._map.fire(new oo(h.type,this._map,h))},Lo.prototype.click=function(h,d){this._mousedownPos&&this._mousedownPos.dist(d)>=this._clickTolerance||this._map.fire(new oo(h.type,this._map,h))},Lo.prototype.dblclick=function(h){return this._firePreventable(new oo(h.type,this._map,h))},Lo.prototype.mouseover=function(h){this._map.fire(new oo(h.type,this._map,h))},Lo.prototype.mouseout=function(h){this._map.fire(new oo(h.type,this._map,h))},Lo.prototype.touchstart=function(h){return this._firePreventable(new xu(h.type,this._map,h))},Lo.prototype.touchmove=function(h){this._map.fire(new xu(h.type,this._map,h))},Lo.prototype.touchend=function(h){this._map.fire(new xu(h.type,this._map,h))},Lo.prototype.touchcancel=function(h){this._map.fire(new xu(h.type,this._map,h))},Lo.prototype._firePreventable=function(h){if(this._map.fire(h),h.defaultPrevented)return{}},Lo.prototype.isEnabled=function(){return!0},Lo.prototype.isActive=function(){return!1},Lo.prototype.enable=function(){},Lo.prototype.disable=function(){};var nn=function(h){this._map=h};nn.prototype.reset=function(){this._delayContextMenu=!1,delete this._contextMenuEvent},nn.prototype.mousemove=function(h){this._map.fire(new oo(h.type,this._map,h))},nn.prototype.mousedown=function(){this._delayContextMenu=!0},nn.prototype.mouseup=function(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new oo("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)},nn.prototype.contextmenu=function(h){this._delayContextMenu?this._contextMenuEvent=h:this._map.fire(new oo(h.type,this._map,h)),this._map.listens("contextmenu")&&h.preventDefault()},nn.prototype.isEnabled=function(){return!0},nn.prototype.isActive=function(){return!1},nn.prototype.enable=function(){},nn.prototype.disable=function(){};var Ha=function(h,d){this._map=h,this._el=h.getCanvasContainer(),this._container=h.getContainer(),this._clickTolerance=d.clickTolerance||1};function Il(h,d){for(var p={},y=0;y<h.length;y++)p[h[y].identifier]=d[y];return p}Ha.prototype.isEnabled=function(){return!!this._enabled},Ha.prototype.isActive=function(){return!!this._active},Ha.prototype.enable=function(){this.isEnabled()||(this._enabled=!0)},Ha.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},Ha.prototype.mousedown=function(h,d){this.isEnabled()&&h.shiftKey&&h.button===0&&(c.disableDrag(),this._startPos=this._lastPos=d,this._active=!0)},Ha.prototype.mousemoveWindow=function(h,d){if(this._active){var p=d;if(!(this._lastPos.equals(p)||!this._box&&p.dist(this._startPos)<this._clickTolerance)){var y=this._startPos;this._lastPos=p,this._box||(this._box=c.create("div","mapboxgl-boxzoom",this._container),this._container.classList.add("mapboxgl-crosshair"),this._fireEvent("boxzoomstart",h));var S=Math.min(y.x,p.x),P=Math.max(y.x,p.x),M=Math.min(y.y,p.y),N=Math.max(y.y,p.y);c.setTransform(this._box,"translate("+S+"px,"+M+"px)"),this._box.style.width=P-S+"px",this._box.style.height=N-M+"px"}}},Ha.prototype.mouseupWindow=function(h,d){var p=this;if(this._active&&h.button===0){var y=this._startPos,S=d;if(this.reset(),c.suppressClick(),y.x!==S.x||y.y!==S.y)return this._map.fire(new o.Event("boxzoomend",{originalEvent:h})),{cameraAnimation:function(P){return P.fitScreenCoordinates(y,S,p._map.getBearing(),{linear:!0})}};this._fireEvent("boxzoomcancel",h)}},Ha.prototype.keydown=function(h){this._active&&h.keyCode===27&&(this.reset(),this._fireEvent("boxzoomcancel",h))},Ha.prototype.blur=function(){this.reset()},Ha.prototype.reset=function(){this._active=!1,this._container.classList.remove("mapboxgl-crosshair"),this._box&&(c.remove(this._box),this._box=null),c.enableDrag(),delete this._startPos,delete this._lastPos},Ha.prototype._fireEvent=function(h,d){return this._map.fire(new o.Event(h,{originalEvent:d}))};var Vc=function(h){this.reset(),this.numTouches=h.numTouches};Vc.prototype.reset=function(){delete this.centroid,delete this.startTime,delete this.touches,this.aborted=!1},Vc.prototype.touchstart=function(h,d,p){(this.centroid||p.length>this.numTouches)&&(this.aborted=!0),this.aborted||(this.startTime===void 0&&(this.startTime=h.timeStamp),p.length===this.numTouches&&(this.centroid=function(y){for(var S=new o.Point(0,0),P=0,M=y;P<M.length;P+=1)S._add(M[P]);return S.div(y.length)}(d),this.touches=Il(p,d)))},Vc.prototype.touchmove=function(h,d,p){if(!this.aborted&&this.centroid){var y=Il(p,d);for(var S in this.touches){var P=y[S];(!P||P.dist(this.touches[S])>30)&&(this.aborted=!0)}}},Vc.prototype.touchend=function(h,d,p){if((!this.centroid||h.timeStamp-this.startTime>500)&&(this.aborted=!0),p.length===0){var y=!this.aborted&&this.centroid;if(this.reset(),y)return y}};var Wu=function(h){this.singleTap=new Vc(h),this.numTaps=h.numTaps,this.reset()};Wu.prototype.reset=function(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()},Wu.prototype.touchstart=function(h,d,p){this.singleTap.touchstart(h,d,p)},Wu.prototype.touchmove=function(h,d,p){this.singleTap.touchmove(h,d,p)},Wu.prototype.touchend=function(h,d,p){var y=this.singleTap.touchend(h,d,p);if(y){var S=h.timeStamp-this.lastTime<500,P=!this.lastTap||this.lastTap.dist(y)<30;if(S&&P||this.reset(),this.count++,this.lastTime=h.timeStamp,this.lastTap=y,this.count===this.numTaps)return this.reset(),y}};var Xa=function(){this._zoomIn=new Wu({numTouches:1,numTaps:2}),this._zoomOut=new Wu({numTouches:2,numTaps:1}),this.reset()};Xa.prototype.reset=function(){this._active=!1,this._zoomIn.reset(),this._zoomOut.reset()},Xa.prototype.touchstart=function(h,d,p){this._zoomIn.touchstart(h,d,p),this._zoomOut.touchstart(h,d,p)},Xa.prototype.touchmove=function(h,d,p){this._zoomIn.touchmove(h,d,p),this._zoomOut.touchmove(h,d,p)},Xa.prototype.touchend=function(h,d,p){var y=this,S=this._zoomIn.touchend(h,d,p),P=this._zoomOut.touchend(h,d,p);return S?(this._active=!0,h.preventDefault(),setTimeout(function(){return y.reset()},0),{cameraAnimation:function(M){return M.easeTo({duration:300,zoom:M.getZoom()+1,around:M.unproject(S)},{originalEvent:h})}}):P?(this._active=!0,h.preventDefault(),setTimeout(function(){return y.reset()},0),{cameraAnimation:function(M){return M.easeTo({duration:300,zoom:M.getZoom()-1,around:M.unproject(P)},{originalEvent:h})}}):void 0},Xa.prototype.touchcancel=function(){this.reset()},Xa.prototype.enable=function(){this._enabled=!0},Xa.prototype.disable=function(){this._enabled=!1,this.reset()},Xa.prototype.isEnabled=function(){return this._enabled},Xa.prototype.isActive=function(){return this._active};var Og={0:1,2:2},Fe=function(h){this.reset(),this._clickTolerance=h.clickTolerance||1};Fe.prototype.blur=function(){this.reset()},Fe.prototype.reset=function(){this._active=!1,this._moved=!1,delete this._lastPoint,delete this._eventButton},Fe.prototype._correctButton=function(h,d){return!1},Fe.prototype._move=function(h,d){return{}},Fe.prototype.mousedown=function(h,d){if(!this._lastPoint){var p=c.mouseButton(h);this._correctButton(h,p)&&(this._lastPoint=d,this._eventButton=p)}},Fe.prototype.mousemoveWindow=function(h,d){var p=this._lastPoint;if(p){if(h.preventDefault(),function(y,S){var P=Og[S];return y.buttons===void 0||(y.buttons&P)!==P}(h,this._eventButton))this.reset();else if(this._moved||!(d.dist(p)<this._clickTolerance))return this._moved=!0,this._lastPoint=d,this._move(p,d)}},Fe.prototype.mouseupWindow=function(h){this._lastPoint&&c.mouseButton(h)===this._eventButton&&(this._moved&&c.suppressClick(),this.reset())},Fe.prototype.enable=function(){this._enabled=!0},Fe.prototype.disable=function(){this._enabled=!1,this.reset()},Fe.prototype.isEnabled=function(){return this._enabled},Fe.prototype.isActive=function(){return this._active};var Op=function(h){function d(){h.apply(this,arguments)}return h&&(d.__proto__=h),(d.prototype=Object.create(h&&h.prototype)).constructor=d,d.prototype.mousedown=function(p,y){h.prototype.mousedown.call(this,p,y),this._lastPoint&&(this._active=!0)},d.prototype._correctButton=function(p,y){return y===0&&!p.ctrlKey},d.prototype._move=function(p,y){return{around:y,panDelta:y.sub(p)}},d}(Fe),Sd=function(h){function d(){h.apply(this,arguments)}return h&&(d.__proto__=h),(d.prototype=Object.create(h&&h.prototype)).constructor=d,d.prototype._correctButton=function(p,y){return y===0&&p.ctrlKey||y===2},d.prototype._move=function(p,y){var S=.8*(y.x-p.x);if(S)return this._active=!0,{bearingDelta:S}},d.prototype.contextmenu=function(p){p.preventDefault()},d}(Fe),zh=function(h){function d(){h.apply(this,arguments)}return h&&(d.__proto__=h),(d.prototype=Object.create(h&&h.prototype)).constructor=d,d.prototype._correctButton=function(p,y){return y===0&&p.ctrlKey||y===2},d.prototype._move=function(p,y){var S=-.5*(y.y-p.y);if(S)return this._active=!0,{pitchDelta:S}},d.prototype.contextmenu=function(p){p.preventDefault()},d}(Fe),za=function(h){this._minTouches=1,this._clickTolerance=h.clickTolerance||1,this.reset()};za.prototype.reset=function(){this._active=!1,this._touches={},this._sum=new o.Point(0,0)},za.prototype.touchstart=function(h,d,p){return this._calculateTransform(h,d,p)},za.prototype.touchmove=function(h,d,p){if(this._active&&!(p.length<this._minTouches))return h.preventDefault(),this._calculateTransform(h,d,p)},za.prototype.touchend=function(h,d,p){this._calculateTransform(h,d,p),this._active&&p.length<this._minTouches&&this.reset()},za.prototype.touchcancel=function(){this.reset()},za.prototype._calculateTransform=function(h,d,p){p.length>0&&(this._active=!0);var y=Il(p,d),S=new o.Point(0,0),P=new o.Point(0,0),M=0;for(var N in y){var q=y[N],X=this._touches[N];X&&(S._add(q),P._add(q.sub(X)),M++,y[N]=q)}if(this._touches=y,!(M<this._minTouches)&&P.mag()){var it=P.div(M);if(this._sum._add(it),!(this._sum.mag()<this._clickTolerance))return{around:S.div(M),panDelta:it}}},za.prototype.enable=function(){this._enabled=!0},za.prototype.disable=function(){this._enabled=!1,this.reset()},za.prototype.isEnabled=function(){return this._enabled},za.prototype.isActive=function(){return this._active};var Ya=function(){this.reset()};function Rg(h,d,p){for(var y=0;y<h.length;y++)if(h[y].identifier===p)return d[y]}function kg(h,d){return Math.log(h/d)/Math.LN2}Ya.prototype.reset=function(){this._active=!1,delete this._firstTwoTouches},Ya.prototype._start=function(h){},Ya.prototype._move=function(h,d,p){return{}},Ya.prototype.touchstart=function(h,d,p){this._firstTwoTouches||p.length<2||(this._firstTwoTouches=[p[0].identifier,p[1].identifier],this._start([d[0],d[1]]))},Ya.prototype.touchmove=function(h,d,p){if(this._firstTwoTouches){h.preventDefault();var y=this._firstTwoTouches,S=y[1],P=Rg(p,d,y[0]),M=Rg(p,d,S);if(P&&M){var N=this._aroundCenter?null:P.add(M).div(2);return this._move([P,M],N,h)}}},Ya.prototype.touchend=function(h,d,p){if(this._firstTwoTouches){var y=this._firstTwoTouches,S=y[1],P=Rg(p,d,y[0]),M=Rg(p,d,S);P&&M||(this._active&&c.suppressClick(),this.reset())}},Ya.prototype.touchcancel=function(){this.reset()},Ya.prototype.enable=function(h){this._enabled=!0,this._aroundCenter=!!h&&h.around==="center"},Ya.prototype.disable=function(){this._enabled=!1,this.reset()},Ya.prototype.isEnabled=function(){return this._enabled},Ya.prototype.isActive=function(){return this._active};var Ys=function(h){function d(){h.apply(this,arguments)}return h&&(d.__proto__=h),(d.prototype=Object.create(h&&h.prototype)).constructor=d,d.prototype.reset=function(){h.prototype.reset.call(this),delete this._distance,delete this._startDistance},d.prototype._start=function(p){this._startDistance=this._distance=p[0].dist(p[1])},d.prototype._move=function(p,y){var S=this._distance;if(this._distance=p[0].dist(p[1]),this._active||!(Math.abs(kg(this._distance,this._startDistance))<.1))return this._active=!0,{zoomDelta:kg(this._distance,S),pinchAround:y}},d}(Ya);function Hu(h,d){return 180*h.angleWith(d)/Math.PI}var Ed=function(h){function d(){h.apply(this,arguments)}return h&&(d.__proto__=h),(d.prototype=Object.create(h&&h.prototype)).constructor=d,d.prototype.reset=function(){h.prototype.reset.call(this),delete this._minDiameter,delete this._startVector,delete this._vector},d.prototype._start=function(p){this._startVector=this._vector=p[0].sub(p[1]),this._minDiameter=p[0].dist(p[1])},d.prototype._move=function(p,y){var S=this._vector;if(this._vector=p[0].sub(p[1]),this._active||!this._isBelowThreshold(this._vector))return this._active=!0,{bearingDelta:Hu(this._vector,S),pinchAround:y}},d.prototype._isBelowThreshold=function(p){this._minDiameter=Math.min(this._minDiameter,p.mag());var y=25/(Math.PI*this._minDiameter)*360,S=Hu(p,this._startVector);return Math.abs(S)<y},d}(Ya);function Bh(h){return Math.abs(h.y)>Math.abs(h.x)}var av=function(h){function d(){h.apply(this,arguments)}return h&&(d.__proto__=h),(d.prototype=Object.create(h&&h.prototype)).constructor=d,d.prototype.reset=function(){h.prototype.reset.call(this),this._valid=void 0,delete this._firstMove,delete this._lastPoints},d.prototype._start=function(p){this._lastPoints=p,Bh(p[0].sub(p[1]))&&(this._valid=!1)},d.prototype._move=function(p,y,S){var P=p[0].sub(this._lastPoints[0]),M=p[1].sub(this._lastPoints[1]);if(this._valid=this.gestureBeginsVertically(P,M,S.timeStamp),this._valid)return this._lastPoints=p,this._active=!0,{pitchDelta:(P.y+M.y)/2*-.5}},d.prototype.gestureBeginsVertically=function(p,y,S){if(this._valid!==void 0)return this._valid;var P=p.mag()>=2,M=y.mag()>=2;if(P||M){if(!P||!M)return this._firstMove===void 0&&(this._firstMove=S),S-this._firstMove<100&&void 0;var N=p.y>0==y.y>0;return Bh(p)&&Bh(y)&&N}},d}(Ya),Dg={panStep:100,bearingStep:15,pitchStep:10},Pl=function(){var h=Dg;this._panStep=h.panStep,this._bearingStep=h.bearingStep,this._pitchStep=h.pitchStep,this._rotationDisabled=!1};function bu(h){return h*(2-h)}Pl.prototype.blur=function(){this.reset()},Pl.prototype.reset=function(){this._active=!1},Pl.prototype.keydown=function(h){var d=this;if(!(h.altKey||h.ctrlKey||h.metaKey)){var p=0,y=0,S=0,P=0,M=0;switch(h.keyCode){case 61:case 107:case 171:case 187:p=1;break;case 189:case 109:case 173:p=-1;break;case 37:h.shiftKey?y=-1:(h.preventDefault(),P=-1);break;case 39:h.shiftKey?y=1:(h.preventDefault(),P=1);break;case 38:h.shiftKey?S=1:(h.preventDefault(),M=-1);break;case 40:h.shiftKey?S=-1:(h.preventDefault(),M=1);break;default:return}return this._rotationDisabled&&(y=0,S=0),{cameraAnimation:function(N){var q=N.getZoom();N.easeTo({duration:300,easeId:"keyboardHandler",easing:bu,zoom:p?Math.round(q)+p*(h.shiftKey?2:1):q,bearing:N.getBearing()+y*d._bearingStep,pitch:N.getPitch()+S*d._pitchStep,offset:[-P*d._panStep,-M*d._panStep],center:N.getCenter()},{originalEvent:h})}}}},Pl.prototype.enable=function(){this._enabled=!0},Pl.prototype.disable=function(){this._enabled=!1,this.reset()},Pl.prototype.isEnabled=function(){return this._enabled},Pl.prototype.isActive=function(){return this._active},Pl.prototype.disableRotation=function(){this._rotationDisabled=!0},Pl.prototype.enableRotation=function(){this._rotationDisabled=!1};var Sn=function(h,d){this._map=h,this._el=h.getCanvasContainer(),this._handler=d,this._delta=0,this._defaultZoomRate=.01,this._wheelZoomRate=1/450,o.bindAll(["_onTimeout"],this)};Sn.prototype.setZoomRate=function(h){this._defaultZoomRate=h},Sn.prototype.setWheelZoomRate=function(h){this._wheelZoomRate=h},Sn.prototype.isEnabled=function(){return!!this._enabled},Sn.prototype.isActive=function(){return!!this._active||this._finishTimeout!==void 0},Sn.prototype.isZooming=function(){return!!this._zooming},Sn.prototype.enable=function(h){this.isEnabled()||(this._enabled=!0,this._aroundCenter=h&&h.around==="center")},Sn.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},Sn.prototype.wheel=function(h){if(this.isEnabled()){var d=h.deltaMode===o.window.WheelEvent.DOM_DELTA_LINE?40*h.deltaY:h.deltaY,p=o.browser.now(),y=p-(this._lastWheelEventTime||0);this._lastWheelEventTime=p,d!==0&&d%4.000244140625==0?this._type="wheel":d!==0&&Math.abs(d)<4?this._type="trackpad":y>400?(this._type=null,this._lastValue=d,this._timeout=setTimeout(this._onTimeout,40,h)):this._type||(this._type=Math.abs(y*d)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,d+=this._lastValue)),h.shiftKey&&d&&(d/=4),this._type&&(this._lastWheelEvent=h,this._delta-=d,this._active||this._start(h)),h.preventDefault()}},Sn.prototype._onTimeout=function(h){this._type="wheel",this._delta-=this._lastValue,this._active||this._start(h)},Sn.prototype._start=function(h){if(this._delta){this._frameId&&(this._frameId=null),this._active=!0,this.isZooming()||(this._zooming=!0),this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout);var d=c.mousePos(this._el,h);this._around=o.LngLat.convert(this._aroundCenter?this._map.getCenter():this._map.unproject(d)),this._aroundPoint=this._map.transform.locationPoint(this._around),this._frameId||(this._frameId=!0,this._handler._triggerRenderFrame())}},Sn.prototype.renderFrame=function(){var h=this;if(this._frameId&&(this._frameId=null,this.isActive())){var d=this._map.transform;if(this._delta!==0){var p=this._type==="wheel"&&Math.abs(this._delta)>4.000244140625?this._wheelZoomRate:this._defaultZoomRate,y=2/(1+Math.exp(-Math.abs(this._delta*p)));this._delta<0&&y!==0&&(y=1/y);var S=typeof this._targetZoom=="number"?d.zoomScale(this._targetZoom):d.scale;this._targetZoom=Math.min(d.maxZoom,Math.max(d.minZoom,d.scaleZoom(S*y))),this._type==="wheel"&&(this._startZoom=d.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}var P,M=typeof this._targetZoom=="number"?this._targetZoom:d.zoom,N=this._startZoom,q=this._easing,X=!1;if(this._type==="wheel"&&N&&q){var it=Math.min((o.browser.now()-this._lastWheelEventTime)/200,1),st=q(it);P=o.number(N,M,st),it<1?this._frameId||(this._frameId=!0):X=!0}else P=M,X=!0;return this._active=!0,X&&(this._active=!1,this._finishTimeout=setTimeout(function(){h._zooming=!1,h._handler._triggerRenderFrame(),delete h._targetZoom,delete h._finishTimeout},200)),{noInertia:!0,needsRenderFrame:!X,zoomDelta:P-d.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}},Sn.prototype._smoothOutEasing=function(h){var d=o.ease;if(this._prevEase){var p=this._prevEase,y=(o.browser.now()-p.start)/p.duration,S=p.easing(y+.01)-p.easing(y),P=.27/Math.sqrt(S*S+1e-4)*.01,M=Math.sqrt(.0729-P*P);d=o.bezier(P,M,.25,1)}return this._prevEase={start:o.browser.now(),duration:h,easing:d},d},Sn.prototype.blur=function(){this.reset()},Sn.prototype.reset=function(){this._active=!1};var ao=function(h,d){this._clickZoom=h,this._tapZoom=d};ao.prototype.enable=function(){this._clickZoom.enable(),this._tapZoom.enable()},ao.prototype.disable=function(){this._clickZoom.disable(),this._tapZoom.disable()},ao.prototype.isEnabled=function(){return this._clickZoom.isEnabled()&&this._tapZoom.isEnabled()},ao.prototype.isActive=function(){return this._clickZoom.isActive()||this._tapZoom.isActive()};var Xu=function(){this.reset()};Xu.prototype.reset=function(){this._active=!1},Xu.prototype.blur=function(){this.reset()},Xu.prototype.dblclick=function(h,d){return h.preventDefault(),{cameraAnimation:function(p){p.easeTo({duration:300,zoom:p.getZoom()+(h.shiftKey?-1:1),around:p.unproject(d)},{originalEvent:h})}}},Xu.prototype.enable=function(){this._enabled=!0},Xu.prototype.disable=function(){this._enabled=!1,this.reset()},Xu.prototype.isEnabled=function(){return this._enabled},Xu.prototype.isActive=function(){return this._active};var Ba=function(){this._tap=new Wu({numTouches:1,numTaps:1}),this.reset()};Ba.prototype.reset=function(){this._active=!1,delete this._swipePoint,delete this._swipeTouch,delete this._tapTime,this._tap.reset()},Ba.prototype.touchstart=function(h,d,p){this._swipePoint||(this._tapTime&&h.timeStamp-this._tapTime>500&&this.reset(),this._tapTime?p.length>0&&(this._swipePoint=d[0],this._swipeTouch=p[0].identifier):this._tap.touchstart(h,d,p))},Ba.prototype.touchmove=function(h,d,p){if(this._tapTime){if(this._swipePoint){if(p[0].identifier!==this._swipeTouch)return;var y=d[0],S=y.y-this._swipePoint.y;return this._swipePoint=y,h.preventDefault(),this._active=!0,{zoomDelta:S/128}}}else this._tap.touchmove(h,d,p)},Ba.prototype.touchend=function(h,d,p){this._tapTime?this._swipePoint&&p.length===0&&this.reset():this._tap.touchend(h,d,p)&&(this._tapTime=h.timeStamp)},Ba.prototype.touchcancel=function(){this.reset()},Ba.prototype.enable=function(){this._enabled=!0},Ba.prototype.disable=function(){this._enabled=!1,this.reset()},Ba.prototype.isEnabled=function(){return this._enabled},Ba.prototype.isActive=function(){return this._active};var Nf=function(h,d,p){this._el=h,this._mousePan=d,this._touchPan=p};Nf.prototype.enable=function(h){this._inertiaOptions=h||{},this._mousePan.enable(),this._touchPan.enable(),this._el.classList.add("mapboxgl-touch-drag-pan")},Nf.prototype.disable=function(){this._mousePan.disable(),this._touchPan.disable(),this._el.classList.remove("mapboxgl-touch-drag-pan")},Nf.prototype.isEnabled=function(){return this._mousePan.isEnabled()&&this._touchPan.isEnabled()},Nf.prototype.isActive=function(){return this._mousePan.isActive()||this._touchPan.isActive()};var Ff=function(h,d,p){this._pitchWithRotate=h.pitchWithRotate,this._mouseRotate=d,this._mousePitch=p};Ff.prototype.enable=function(){this._mouseRotate.enable(),this._pitchWithRotate&&this._mousePitch.enable()},Ff.prototype.disable=function(){this._mouseRotate.disable(),this._mousePitch.disable()},Ff.prototype.isEnabled=function(){return this._mouseRotate.isEnabled()&&(!this._pitchWithRotate||this._mousePitch.isEnabled())},Ff.prototype.isActive=function(){return this._mouseRotate.isActive()||this._mousePitch.isActive()};var wu=function(h,d,p,y){this._el=h,this._touchZoom=d,this._touchRotate=p,this._tapDragZoom=y,this._rotationDisabled=!1,this._enabled=!0};wu.prototype.enable=function(h){this._touchZoom.enable(h),this._rotationDisabled||this._touchRotate.enable(h),this._tapDragZoom.enable(),this._el.classList.add("mapboxgl-touch-zoom-rotate")},wu.prototype.disable=function(){this._touchZoom.disable(),this._touchRotate.disable(),this._tapDragZoom.disable(),this._el.classList.remove("mapboxgl-touch-zoom-rotate")},wu.prototype.isEnabled=function(){return this._touchZoom.isEnabled()&&(this._rotationDisabled||this._touchRotate.isEnabled())&&this._tapDragZoom.isEnabled()},wu.prototype.isActive=function(){return this._touchZoom.isActive()||this._touchRotate.isActive()||this._tapDragZoom.isActive()},wu.prototype.disableRotation=function(){this._rotationDisabled=!0,this._touchRotate.disable()},wu.prototype.enableRotation=function(){this._rotationDisabled=!1,this._touchZoom.isEnabled()&&this._touchRotate.enable()};var ca=function(h){return h.zoom||h.drag||h.pitch||h.rotate},Uh=function(h){function d(){h.apply(this,arguments)}return h&&(d.__proto__=h),(d.prototype=Object.create(h&&h.prototype)).constructor=d,d}(o.Event);function cn(h){return h.panDelta&&h.panDelta.mag()||h.zoomDelta||h.bearingDelta||h.pitchDelta}var rn=function(h,d){this._map=h,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new Gu(h),this._bearingSnap=d.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(d),o.bindAll(["handleEvent","handleWindowEvent"],this);var p=this._el;this._listeners=[[p,"touchstart",{passive:!0}],[p,"touchmove",{passive:!1}],[p,"touchend",void 0],[p,"touchcancel",void 0],[p,"mousedown",void 0],[p,"mousemove",void 0],[p,"mouseup",void 0],[o.window.document,"mousemove",{capture:!0}],[o.window.document,"mouseup",void 0],[p,"mouseover",void 0],[p,"mouseout",void 0],[p,"dblclick",void 0],[p,"click",void 0],[p,"keydown",{capture:!1}],[p,"keyup",void 0],[p,"wheel",{passive:!1}],[p,"contextmenu",void 0],[o.window,"blur",void 0]];for(var y=0,S=this._listeners;y<S.length;y+=1){var P=S[y],M=P[0];c.addEventListener(M,P[1],M===o.window.document?this.handleWindowEvent:this.handleEvent,P[2])}};rn.prototype.destroy=function(){for(var h=0,d=this._listeners;h<d.length;h+=1){var p=d[h],y=p[0];c.removeEventListener(y,p[1],y===o.window.document?this.handleWindowEvent:this.handleEvent,p[2])}},rn.prototype._addDefaultHandlers=function(h){var d=this._map,p=d.getCanvasContainer();this._add("mapEvent",new Lo(d,h));var y=d.boxZoom=new Ha(d,h);this._add("boxZoom",y);var S=new Xa,P=new Xu;d.doubleClickZoom=new ao(P,S),this._add("tapZoom",S),this._add("clickZoom",P);var M=new Ba;this._add("tapDragZoom",M);var N=d.touchPitch=new av;this._add("touchPitch",N);var q=new Sd(h),X=new zh(h);d.dragRotate=new Ff(h,q,X),this._add("mouseRotate",q,["mousePitch"]),this._add("mousePitch",X,["mouseRotate"]);var it=new Op(h),st=new za(h);d.dragPan=new Nf(p,it,st),this._add("mousePan",it),this._add("touchPan",st,["touchZoom","touchRotate"]);var ct=new Ed,xt=new Ys;d.touchZoomRotate=new wu(p,xt,ct,M),this._add("touchRotate",ct,["touchPan","touchZoom"]),this._add("touchZoom",xt,["touchPan","touchRotate"]);var yt=d.scrollZoom=new Sn(d,this);this._add("scrollZoom",yt,["mousePan"]);var Ct=d.keyboard=new Pl;this._add("keyboard",Ct),this._add("blockableMapEvent",new nn(d));for(var gt=0,It=["boxZoom","doubleClickZoom","tapDragZoom","touchPitch","dragRotate","dragPan","touchZoomRotate","scrollZoom","keyboard"];gt<It.length;gt+=1){var Lt=It[gt];h.interactive&&h[Lt]&&d[Lt].enable(h[Lt])}},rn.prototype._add=function(h,d,p){this._handlers.push({handlerName:h,handler:d,allowed:p}),this._handlersById[h]=d},rn.prototype.stop=function(h){if(!this._updatingCamera){for(var d=0,p=this._handlers;d<p.length;d+=1)p[d].handler.reset();this._inertia.clear(),this._fireEvents({},{},h),this._changes=[]}},rn.prototype.isActive=function(){for(var h=0,d=this._handlers;h<d.length;h+=1)if(d[h].handler.isActive())return!0;return!1},rn.prototype.isZooming=function(){return!!this._eventsInProgress.zoom||this._map.scrollZoom.isZooming()},rn.prototype.isRotating=function(){return!!this._eventsInProgress.rotate},rn.prototype.isMoving=function(){return Boolean(ca(this._eventsInProgress))||this.isZooming()},rn.prototype._blockedByActive=function(h,d,p){for(var y in h)if(y!==p&&(!d||d.indexOf(y)<0))return!0;return!1},rn.prototype.handleWindowEvent=function(h){this.handleEvent(h,h.type+"Window")},rn.prototype._getMapTouches=function(h){for(var d=[],p=0,y=h;p<y.length;p+=1){var S=y[p];this._el.contains(S.target)&&d.push(S)}return d},rn.prototype.handleEvent=function(h,d){this._updatingCamera=!0;for(var p=h.type==="renderFrame"?void 0:h,y={needsRenderFrame:!1},S={},P={},M=h.touches?this._getMapTouches(h.touches):void 0,N=M?c.touchPos(this._el,M):c.mousePos(this._el,h),q=0,X=this._handlers;q<X.length;q+=1){var it=X[q],st=it.handlerName,ct=it.handler,xt=it.allowed;if(ct.isEnabled()){var yt=void 0;this._blockedByActive(P,xt,st)?ct.reset():ct[d||h.type]&&(yt=ct[d||h.type](h,N,M),this.mergeHandlerResult(y,S,yt,st,p),yt&&yt.needsRenderFrame&&this._triggerRenderFrame()),(yt||ct.isActive())&&(P[st]=ct)}}var Ct={};for(var gt in this._previousActiveHandlers)P[gt]||(Ct[gt]=p);this._previousActiveHandlers=P,(Object.keys(Ct).length||cn(y))&&(this._changes.push([y,S,Ct]),this._triggerRenderFrame()),(Object.keys(P).length||cn(y))&&this._map._stop(!0),this._updatingCamera=!1;var It=y.cameraAnimation;It&&(this._inertia.clear(),this._fireEvents({},{},!0),this._changes=[],It(this._map))},rn.prototype.mergeHandlerResult=function(h,d,p,y,S){if(p){o.extend(h,p);var P={handlerName:y,originalEvent:p.originalEvent||S};p.zoomDelta!==void 0&&(d.zoom=P),p.panDelta!==void 0&&(d.drag=P),p.pitchDelta!==void 0&&(d.pitch=P),p.bearingDelta!==void 0&&(d.rotate=P)}},rn.prototype._applyChanges=function(){for(var h={},d={},p={},y=0,S=this._changes;y<S.length;y+=1){var P=S[y],M=P[0],N=P[1],q=P[2];M.panDelta&&(h.panDelta=(h.panDelta||new o.Point(0,0))._add(M.panDelta)),M.zoomDelta&&(h.zoomDelta=(h.zoomDelta||0)+M.zoomDelta),M.bearingDelta&&(h.bearingDelta=(h.bearingDelta||0)+M.bearingDelta),M.pitchDelta&&(h.pitchDelta=(h.pitchDelta||0)+M.pitchDelta),M.around!==void 0&&(h.around=M.around),M.pinchAround!==void 0&&(h.pinchAround=M.pinchAround),M.noInertia&&(h.noInertia=M.noInertia),o.extend(d,N),o.extend(p,q)}this._updateMapTransform(h,d,p),this._changes=[]},rn.prototype._updateMapTransform=function(h,d,p){var y=this._map,S=y.transform;if(!cn(h))return this._fireEvents(d,p,!0);var P=h.panDelta,M=h.zoomDelta,N=h.bearingDelta,q=h.pitchDelta,X=h.around,it=h.pinchAround;it!==void 0&&(X=it),y._stop(!0),X=X||y.transform.centerPoint;var st=S.pointLocation(P?X.sub(P):X);N&&(S.bearing+=N),q&&(S.pitch+=q),M&&(S.zoom+=M),S.setLocationAtPoint(st,X),this._map._update(),h.noInertia||this._inertia.record(h),this._fireEvents(d,p,!0)},rn.prototype._fireEvents=function(h,d,p){var y=this,S=ca(this._eventsInProgress),P=ca(h),M={};for(var N in h)this._eventsInProgress[N]||(M[N+"start"]=h[N].originalEvent),this._eventsInProgress[N]=h[N];for(var q in!S&&P&&this._fireEvent("movestart",P.originalEvent),M)this._fireEvent(q,M[q]);for(var X in P&&this._fireEvent("move",P.originalEvent),h)this._fireEvent(X,h[X].originalEvent);var it,st={};for(var ct in this._eventsInProgress){var xt=this._eventsInProgress[ct],yt=xt.handlerName,Ct=xt.originalEvent;this._handlersById[yt].isActive()||(delete this._eventsInProgress[ct],st[ct+"end"]=it=d[yt]||Ct)}for(var gt in st)this._fireEvent(gt,st[gt]);var It=ca(this._eventsInProgress);if(p&&(S||P)&&!It){this._updatingCamera=!0;var Lt=this._inertia._onMoveEnd(this._map.dragPan._inertiaOptions),jt=function(ne){return ne!==0&&-y._bearingSnap<ne&&ne<y._bearingSnap};Lt?(jt(Lt.bearing||this._map.getBearing())&&(Lt.bearing=0),this._map.easeTo(Lt,{originalEvent:it})):(this._map.fire(new o.Event("moveend",{originalEvent:it})),jt(this._map.getBearing())&&this._map.resetNorth()),this._updatingCamera=!1}},rn.prototype._fireEvent=function(h,d){this._map.fire(new o.Event(h,d?{originalEvent:d}:{}))},rn.prototype._requestFrame=function(){var h=this;return this._map.triggerRepaint(),this._map._renderTaskQueue.add(function(d){delete h._frameId,h.handleEvent(new Uh("renderFrame",{timeStamp:d})),h._applyChanges()})},rn.prototype._triggerRenderFrame=function(){this._frameId===void 0&&(this._frameId=this._requestFrame())};var zf=function(h){function d(p,y){h.call(this),this._moving=!1,this._zooming=!1,this.transform=p,this._bearingSnap=y.bearingSnap,o.bindAll(["_renderFrameCallback"],this)}return h&&(d.__proto__=h),(d.prototype=Object.create(h&&h.prototype)).constructor=d,d.prototype.getCenter=function(){return new o.LngLat(this.transform.center.lng,this.transform.center.lat)},d.prototype.setCenter=function(p,y){return this.jumpTo({center:p},y)},d.prototype.panBy=function(p,y,S){return p=o.Point.convert(p).mult(-1),this.panTo(this.transform.center,o.extend({offset:p},y),S)},d.prototype.panTo=function(p,y,S){return this.easeTo(o.extend({center:p},y),S)},d.prototype.getZoom=function(){return this.transform.zoom},d.prototype.setZoom=function(p,y){return this.jumpTo({zoom:p},y),this},d.prototype.zoomTo=function(p,y,S){return this.easeTo(o.extend({zoom:p},y),S)},d.prototype.zoomIn=function(p,y){return this.zoomTo(this.getZoom()+1,p,y),this},d.prototype.zoomOut=function(p,y){return this.zoomTo(this.getZoom()-1,p,y),this},d.prototype.getBearing=function(){return this.transform.bearing},d.prototype.setBearing=function(p,y){return this.jumpTo({bearing:p},y),this},d.prototype.getPadding=function(){return this.transform.padding},d.prototype.setPadding=function(p,y){return this.jumpTo({padding:p},y),this},d.prototype.rotateTo=function(p,y,S){return this.easeTo(o.extend({bearing:p},y),S)},d.prototype.resetNorth=function(p,y){return this.rotateTo(0,o.extend({duration:1e3},p),y),this},d.prototype.resetNorthPitch=function(p,y){return this.easeTo(o.extend({bearing:0,pitch:0,duration:1e3},p),y),this},d.prototype.snapToNorth=function(p,y){return Math.abs(this.getBearing())<this._bearingSnap?this.resetNorth(p,y):this},d.prototype.getPitch=function(){return this.transform.pitch},d.prototype.setPitch=function(p,y){return this.jumpTo({pitch:p},y),this},d.prototype.cameraForBounds=function(p,y){p=o.LngLatBounds.convert(p);var S=y&&y.bearing||0;return this._cameraForBoxAndBearing(p.getNorthWest(),p.getSouthEast(),S,y)},d.prototype._cameraForBoxAndBearing=function(p,y,S,P){var M={top:0,bottom:0,right:0,left:0};if(typeof(P=o.extend({padding:M,offset:[0,0],maxZoom:this.transform.maxZoom},P)).padding=="number"){var N=P.padding;P.padding={top:N,bottom:N,right:N,left:N}}P.padding=o.extend(M,P.padding);var q=this.transform,X=q.padding,it=q.project(o.LngLat.convert(p)),st=q.project(o.LngLat.convert(y)),ct=it.rotate(-S*Math.PI/180),xt=st.rotate(-S*Math.PI/180),yt=new o.Point(Math.max(ct.x,xt.x),Math.max(ct.y,xt.y)),Ct=new o.Point(Math.min(ct.x,xt.x),Math.min(ct.y,xt.y)),gt=yt.sub(Ct),It=(q.width-(X.left+X.right+P.padding.left+P.padding.right))/gt.x,Lt=(q.height-(X.top+X.bottom+P.padding.top+P.padding.bottom))/gt.y;if(!(Lt<0||It<0)){var jt=Math.min(q.scaleZoom(q.scale*Math.min(It,Lt)),P.maxZoom),ne=typeof P.offset.x=="number"?new o.Point(P.offset.x,P.offset.y):o.Point.convert(P.offset),Jt=new o.Point((P.padding.left-P.padding.right)/2,(P.padding.top-P.padding.bottom)/2).rotate(S*Math.PI/180),ae=ne.add(Jt).mult(q.scale/q.zoomScale(jt));return{center:q.unproject(it.add(st).div(2).sub(ae)),zoom:jt,bearing:S}}o.warnOnce("Map cannot fit within canvas with the given bounds, padding, and/or offset.")},d.prototype.fitBounds=function(p,y,S){return this._fitInternal(this.cameraForBounds(p,y),y,S)},d.prototype.fitScreenCoordinates=function(p,y,S,P,M){return this._fitInternal(this._cameraForBoxAndBearing(this.transform.pointLocation(o.Point.convert(p)),this.transform.pointLocation(o.Point.convert(y)),S,P),P,M)},d.prototype._fitInternal=function(p,y,S){return p?(delete(y=o.extend(p,y)).padding,y.linear?this.easeTo(y,S):this.flyTo(y,S)):this},d.prototype.jumpTo=function(p,y){this.stop();var S=this.transform,P=!1,M=!1,N=!1;return"zoom"in p&&S.zoom!==+p.zoom&&(P=!0,S.zoom=+p.zoom),p.center!==void 0&&(S.center=o.LngLat.convert(p.center)),"bearing"in p&&S.bearing!==+p.bearing&&(M=!0,S.bearing=+p.bearing),"pitch"in p&&S.pitch!==+p.pitch&&(N=!0,S.pitch=+p.pitch),p.padding==null||S.isPaddingEqual(p.padding)||(S.padding=p.padding),this.fire(new o.Event("movestart",y)).fire(new o.Event("move",y)),P&&this.fire(new o.Event("zoomstart",y)).fire(new o.Event("zoom",y)).fire(new o.Event("zoomend",y)),M&&this.fire(new o.Event("rotatestart",y)).fire(new o.Event("rotate",y)).fire(new o.Event("rotateend",y)),N&&this.fire(new o.Event("pitchstart",y)).fire(new o.Event("pitch",y)).fire(new o.Event("pitchend",y)),this.fire(new o.Event("moveend",y))},d.prototype.easeTo=function(p,y){var S=this;this._stop(!1,p.easeId),((p=o.extend({offset:[0,0],duration:500,easing:o.ease},p)).animate===!1||!p.essential&&o.browser.prefersReducedMotion)&&(p.duration=0);var P=this.transform,M=this.getZoom(),N=this.getBearing(),q=this.getPitch(),X=this.getPadding(),it="zoom"in p?+p.zoom:M,st="bearing"in p?this._normalizeBearing(p.bearing,N):N,ct="pitch"in p?+p.pitch:q,xt="padding"in p?p.padding:P.padding,yt=o.Point.convert(p.offset),Ct=P.centerPoint.add(yt),gt=P.pointLocation(Ct),It=o.LngLat.convert(p.center||gt);this._normalizeCenter(It);var Lt,jt,ne=P.project(gt),Jt=P.project(It).sub(ne),ae=P.zoomScale(it-M);p.around&&(Lt=o.LngLat.convert(p.around),jt=P.locationPoint(Lt));var ge={moving:this._moving,zooming:this._zooming,rotating:this._rotating,pitching:this._pitching};return this._zooming=this._zooming||it!==M,this._rotating=this._rotating||N!==st,this._pitching=this._pitching||ct!==q,this._padding=!P.isPaddingEqual(xt),this._easeId=p.easeId,this._prepareEase(y,p.noMoveStart,ge),this._ease(function(we){if(S._zooming&&(P.zoom=o.number(M,it,we)),S._rotating&&(P.bearing=o.number(N,st,we)),S._pitching&&(P.pitch=o.number(q,ct,we)),S._padding&&(P.interpolatePadding(X,xt,we),Ct=P.centerPoint.add(yt)),Lt)P.setLocationAtPoint(Lt,jt);else{var Te=P.zoomScale(P.zoom-M),je=it>M?Math.min(2,ae):Math.max(.5,ae),an=Math.pow(je,1-we),_n=P.unproject(ne.add(Jt.mult(we*an)).mult(Te));P.setLocationAtPoint(P.renderWorldCopies?_n.wrap():_n,Ct)}S._fireMoveEvents(y)},function(we){S._afterEase(y,we)},p),this},d.prototype._prepareEase=function(p,y,S){S===void 0&&(S={}),this._moving=!0,y||S.moving||this.fire(new o.Event("movestart",p)),this._zooming&&!S.zooming&&this.fire(new o.Event("zoomstart",p)),this._rotating&&!S.rotating&&this.fire(new o.Event("rotatestart",p)),this._pitching&&!S.pitching&&this.fire(new o.Event("pitchstart",p))},d.prototype._fireMoveEvents=function(p){this.fire(new o.Event("move",p)),this._zooming&&this.fire(new o.Event("zoom",p)),this._rotating&&this.fire(new o.Event("rotate",p)),this._pitching&&this.fire(new o.Event("pitch",p))},d.prototype._afterEase=function(p,y){if(!this._easeId||!y||this._easeId!==y){delete this._easeId;var S=this._zooming,P=this._rotating,M=this._pitching;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._padding=!1,S&&this.fire(new o.Event("zoomend",p)),P&&this.fire(new o.Event("rotateend",p)),M&&this.fire(new o.Event("pitchend",p)),this.fire(new o.Event("moveend",p))}},d.prototype.flyTo=function(p,y){var S=this;if(!p.essential&&o.browser.prefersReducedMotion){var P=o.pick(p,["center","zoom","bearing","pitch","around"]);return this.jumpTo(P,y)}this.stop(),p=o.extend({offset:[0,0],speed:1.2,curve:1.42,easing:o.ease},p);var M=this.transform,N=this.getZoom(),q=this.getBearing(),X=this.getPitch(),it=this.getPadding(),st="zoom"in p?o.clamp(+p.zoom,M.minZoom,M.maxZoom):N,ct="bearing"in p?this._normalizeBearing(p.bearing,q):q,xt="pitch"in p?+p.pitch:X,yt="padding"in p?p.padding:M.padding,Ct=M.zoomScale(st-N),gt=o.Point.convert(p.offset),It=M.centerPoint.add(gt),Lt=M.pointLocation(It),jt=o.LngLat.convert(p.center||Lt);this._normalizeCenter(jt);var ne=M.project(Lt),Jt=M.project(jt).sub(ne),ae=p.curve,ge=Math.max(M.width,M.height),we=ge/Ct,Te=Jt.mag();if("minZoom"in p){var je=o.clamp(Math.min(p.minZoom,N,st),M.minZoom,M.maxZoom),an=ge/M.zoomScale(je-N);ae=Math.sqrt(an/Te*2)}var _n=ae*ae;function vn(An){var ln=(we*we-ge*ge+(An?-1:1)*_n*_n*Te*Te)/(2*(An?we:ge)*_n*Te);return Math.log(Math.sqrt(ln*ln+1)-ln)}function Ir(An){return(Math.exp(An)-Math.exp(-An))/2}function Qe(An){return(Math.exp(An)+Math.exp(-An))/2}var bn=vn(0),Wn=function(An){return Qe(bn)/Qe(bn+ae*An)},On=function(An){return ge*((Qe(bn)*(Ir(ln=bn+ae*An)/Qe(ln))-Ir(bn))/_n)/Te;var ln},Pn=(vn(1)-bn)/ae;if(Math.abs(Te)<1e-6||!isFinite(Pn)){if(Math.abs(ge-we)<1e-6)return this.easeTo(p,y);var Hn=we<ge?-1:1;Pn=Math.abs(Math.log(we/ge))/ae,On=function(){return 0},Wn=function(An){return Math.exp(Hn*ae*An)}}return p.duration="duration"in p?+p.duration:1e3*Pn/("screenSpeed"in p?+p.screenSpeed/ae:+p.speed),p.maxDuration&&p.duration>p.maxDuration&&(p.duration=0),this._zooming=!0,this._rotating=q!==ct,this._pitching=xt!==X,this._padding=!M.isPaddingEqual(yt),this._prepareEase(y,!1),this._ease(function(An){var ln=An*Pn,Ro=1/Wn(ln);M.zoom=An===1?st:N+M.scaleZoom(Ro),S._rotating&&(M.bearing=o.number(q,ct,An)),S._pitching&&(M.pitch=o.number(X,xt,An)),S._padding&&(M.interpolatePadding(it,yt,An),It=M.centerPoint.add(gt));var so=An===1?jt:M.unproject(ne.add(Jt.mult(On(ln))).mult(Ro));M.setLocationAtPoint(M.renderWorldCopies?so.wrap():so,It),S._fireMoveEvents(y)},function(){return S._afterEase(y)},p),this},d.prototype.isEasing=function(){return!!this._easeFrameId},d.prototype.stop=function(){return this._stop()},d.prototype._stop=function(p,y){if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){var S=this._onEaseEnd;delete this._onEaseEnd,S.call(this,y)}if(!p){var P=this.handlers;P&&P.stop(!1)}return this},d.prototype._ease=function(p,y,S){S.animate===!1||S.duration===0?(p(1),y()):(this._easeStart=o.browser.now(),this._easeOptions=S,this._onEaseFrame=p,this._onEaseEnd=y,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))},d.prototype._renderFrameCallback=function(){var p=Math.min((o.browser.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(p)),p<1?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},d.prototype._normalizeBearing=function(p,y){p=o.wrap(p,-180,180);var S=Math.abs(p-y);return Math.abs(p-360-y)<S&&(p-=360),Math.abs(p+360-y)<S&&(p+=360),p},d.prototype._normalizeCenter=function(p){var y=this.transform;if(y.renderWorldCopies&&!y.lngRange){var S=p.lng-y.center.lng;p.lng+=S>180?-360:S<-180?360:0}},d}(o.Evented),Pa=function(h){h===void 0&&(h={}),this.options=h,o.bindAll(["_toggleAttribution","_updateEditLink","_updateData","_updateCompact"],this)};Pa.prototype.getDefaultPosition=function(){return"bottom-right"},Pa.prototype.onAdd=function(h){var d=this.options&&this.options.compact;return this._map=h,this._container=c.create("div","mapboxgl-ctrl mapboxgl-ctrl-attrib"),this._compactButton=c.create("button","mapboxgl-ctrl-attrib-button",this._container),this._compactButton.addEventListener("click",this._toggleAttribution),this._setElementTitle(this._compactButton,"ToggleAttribution"),this._innerContainer=c.create("div","mapboxgl-ctrl-attrib-inner",this._container),this._innerContainer.setAttribute("role","list"),d&&this._container.classList.add("mapboxgl-compact"),this._updateAttributions(),this._updateEditLink(),this._map.on("styledata",this._updateData),this._map.on("sourcedata",this._updateData),this._map.on("moveend",this._updateEditLink),d===void 0&&(this._map.on("resize",this._updateCompact),this._updateCompact()),this._container},Pa.prototype.onRemove=function(){c.remove(this._container),this._map.off("styledata",this._updateData),this._map.off("sourcedata",this._updateData),this._map.off("moveend",this._updateEditLink),this._map.off("resize",this._updateCompact),this._map=void 0,this._attribHTML=void 0},Pa.prototype._setElementTitle=function(h,d){var p=this._map._getUIString("AttributionControl."+d);h.title=p,h.setAttribute("aria-label",p)},Pa.prototype._toggleAttribution=function(){this._container.classList.contains("mapboxgl-compact-show")?(this._container.classList.remove("mapboxgl-compact-show"),this._compactButton.setAttribute("aria-pressed","false")):(this._container.classList.add("mapboxgl-compact-show"),this._compactButton.setAttribute("aria-pressed","true"))},Pa.prototype._updateEditLink=function(){var h=this._editLink;h||(h=this._editLink=this._container.querySelector(".mapbox-improve-map"));var d=[{key:"owner",value:this.styleOwner},{key:"id",value:this.styleId},{key:"access_token",value:this._map._requestManager._customAccessToken||o.config.ACCESS_TOKEN}];if(h){var p=d.reduce(function(y,S,P){return S.value&&(y+=S.key+"="+S.value+(P<d.length-1?"&":"")),y},"?");h.href=o.config.FEEDBACK_URL+"/"+p+(this._map._hash?this._map._hash.getHashString(!0):""),h.rel="noopener nofollow",this._setElementTitle(h,"MapFeedback")}},Pa.prototype._updateData=function(h){!h||h.sourceDataType!=="metadata"&&h.sourceDataType!=="visibility"&&h.dataType!=="style"||(this._updateAttributions(),this._updateEditLink())},Pa.prototype._updateAttributions=function(){if(this._map.style){var h=[];if(this.options.customAttribution&&(Array.isArray(this.options.customAttribution)?h=h.concat(this.options.customAttribution.map(function(N){return typeof N!="string"?"":N})):typeof this.options.customAttribution=="string"&&h.push(this.options.customAttribution)),this._map.style.stylesheet){var d=this._map.style.stylesheet;this.styleOwner=d.owner,this.styleId=d.id}var p=this._map.style.sourceCaches;for(var y in p){var S=p[y];if(S.used){var P=S.getSource();P.attribution&&h.indexOf(P.attribution)<0&&h.push(P.attribution)}}h.sort(function(N,q){return N.length-q.length});var M=(h=h.filter(function(N,q){for(var X=q+1;X<h.length;X++)if(h[X].indexOf(N)>=0)return!1;return!0})).join(" | ");M!==this._attribHTML&&(this._attribHTML=M,h.length?(this._innerContainer.innerHTML=M,this._container.classList.remove("mapboxgl-attrib-empty")):this._container.classList.add("mapboxgl-attrib-empty"),this._editLink=null)}},Pa.prototype._updateCompact=function(){this._map.getCanvasContainer().offsetWidth<=640?this._container.classList.add("mapboxgl-compact"):this._container.classList.remove("mapboxgl-compact","mapboxgl-compact-show")};var ps=function(){o.bindAll(["_updateLogo"],this),o.bindAll(["_updateCompact"],this)};ps.prototype.onAdd=function(h){this._map=h,this._container=c.create("div","mapboxgl-ctrl");var d=c.create("a","mapboxgl-ctrl-logo");return d.target="_blank",d.rel="noopener nofollow",d.href="https://www.mapbox.com/",d.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),d.setAttribute("rel","noopener nofollow"),this._container.appendChild(d),this._container.style.display="none",this._map.on("sourcedata",this._updateLogo),this._updateLogo(),this._map.on("resize",this._updateCompact),this._updateCompact(),this._container},ps.prototype.onRemove=function(){c.remove(this._container),this._map.off("sourcedata",this._updateLogo),this._map.off("resize",this._updateCompact)},ps.prototype.getDefaultPosition=function(){return"bottom-left"},ps.prototype._updateLogo=function(h){h&&h.sourceDataType!=="metadata"||(this._container.style.display=this._logoRequired()?"block":"none")},ps.prototype._logoRequired=function(){if(this._map.style){var h=this._map.style.sourceCaches;for(var d in h)if(h[d].getSource().mapbox_logo)return!0;return!1}},ps.prototype._updateCompact=function(){var h=this._container.children;if(h.length){var d=h[0];this._map.getCanvasContainer().offsetWidth<250?d.classList.add("mapboxgl-compact"):d.classList.remove("mapboxgl-compact")}};var Ua=function(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1};Ua.prototype.add=function(h){var d=++this._id;return this._queue.push({callback:h,id:d,cancelled:!1}),d},Ua.prototype.remove=function(h){for(var d=this._currentlyRunning,p=0,y=d?this._queue.concat(d):this._queue;p<y.length;p+=1){var S=y[p];if(S.id===h)return void(S.cancelled=!0)}},Ua.prototype.run=function(h){h===void 0&&(h=0);var d=this._currentlyRunning=this._queue;this._queue=[];for(var p=0,y=d;p<y.length;p+=1){var S=y[p];if(!S.cancelled&&(S.callback(h),this._cleared))break}this._cleared=!1,this._currentlyRunning=!1},Ua.prototype.clear=function(){this._currentlyRunning&&(this._cleared=!0),this._queue=[]};var rc={"AttributionControl.ToggleAttribution":"Toggle attribution","AttributionControl.MapFeedback":"Map feedback","FullscreenControl.Enter":"Enter fullscreen","FullscreenControl.Exit":"Exit fullscreen","GeolocateControl.FindMyLocation":"Find my location","GeolocateControl.LocationNotAvailable":"Location not available","LogoControl.Title":"Mapbox logo","NavigationControl.ResetBearing":"Reset bearing to north","NavigationControl.ZoomIn":"Zoom in","NavigationControl.ZoomOut":"Zoom out","ScaleControl.Feet":"ft","ScaleControl.Meters":"m","ScaleControl.Kilometers":"km","ScaleControl.Miles":"mi","ScaleControl.NauticalMiles":"nm"},sv=o.window.HTMLImageElement,Ng=o.window.HTMLElement,ai=o.window.ImageBitmap,Oo={center:[0,0],zoom:0,bearing:0,pitch:0,minZoom:-2,maxZoom:22,minPitch:0,maxPitch:60,interactive:!0,scrollZoom:!0,boxZoom:!0,dragRotate:!0,dragPan:!0,keyboard:!0,doubleClickZoom:!0,touchZoomRotate:!0,touchPitch:!0,bearingSnap:7,clickTolerance:3,pitchWithRotate:!0,hash:!1,attributionControl:!0,failIfMajorPerformanceCaveat:!1,preserveDrawingBuffer:!1,trackResize:!0,renderWorldCopies:!0,refreshExpiredTiles:!0,maxTileCacheSize:null,localIdeographFontFamily:"sans-serif",transformRequest:null,accessToken:null,fadeDuration:300,crossSourceCollisions:!0},Rp=function(h){function d(y){var S=this;if((y=o.extend({},Oo,y)).minZoom!=null&&y.maxZoom!=null&&y.minZoom>y.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(y.minPitch!=null&&y.maxPitch!=null&&y.minPitch>y.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(y.minPitch!=null&&y.minPitch<0)throw new Error("minPitch must be greater than or equal to 0");if(y.maxPitch!=null&&y.maxPitch>60)throw new Error("maxPitch must be less than or equal to 60");var P=new un(y.minZoom,y.maxZoom,y.minPitch,y.maxPitch,y.renderWorldCopies);if(h.call(this,P,y),this._interactive=y.interactive,this._maxTileCacheSize=y.maxTileCacheSize,this._failIfMajorPerformanceCaveat=y.failIfMajorPerformanceCaveat,this._preserveDrawingBuffer=y.preserveDrawingBuffer,this._antialias=y.antialias,this._trackResize=y.trackResize,this._bearingSnap=y.bearingSnap,this._refreshExpiredTiles=y.refreshExpiredTiles,this._fadeDuration=y.fadeDuration,this._crossSourceCollisions=y.crossSourceCollisions,this._crossFadingFactor=1,this._collectResourceTiming=y.collectResourceTiming,this._renderTaskQueue=new Ua,this._controls=[],this._mapId=o.uniqueId(),this._locale=o.extend({},rc,y.locale),this._clickTolerance=y.clickTolerance,this._requestManager=new o.RequestManager(y.transformRequest,y.accessToken),typeof y.container=="string"){if(this._container=o.window.document.getElementById(y.container),!this._container)throw new Error("Container '"+y.container+"' not found.")}else{if(!(y.container instanceof Ng))throw new Error("Invalid type: 'container' must be a String or HTMLElement.");this._container=y.container}if(y.maxBounds&&this.setMaxBounds(y.maxBounds),o.bindAll(["_onWindowOnline","_onWindowResize","_onMapScroll","_contextLost","_contextRestored"],this),this._setupContainer(),this._setupPainter(),this.painter===void 0)throw new Error("Failed to initialize WebGL.");this.on("move",function(){return S._update(!1)}),this.on("moveend",function(){return S._update(!1)}),this.on("zoom",function(){return S._update(!0)}),o.window!==void 0&&(o.window.addEventListener("online",this._onWindowOnline,!1),o.window.addEventListener("resize",this._onWindowResize,!1),o.window.addEventListener("orientationchange",this._onWindowResize,!1)),this.handlers=new rn(this,y),this._hash=y.hash&&new Ia(typeof y.hash=="string"&&y.hash||void 0).addTo(this),this._hash&&this._hash._onHashChange()||(this.jumpTo({center:y.center,zoom:y.zoom,bearing:y.bearing,pitch:y.pitch}),y.bounds&&(this.resize(),this.fitBounds(y.bounds,o.extend({},y.fitBoundsOptions,{duration:0})))),this.resize(),this._localIdeographFontFamily=y.localIdeographFontFamily,y.style&&this.setStyle(y.style,{localIdeographFontFamily:y.localIdeographFontFamily}),y.attributionControl&&this.addControl(new Pa({customAttribution:y.customAttribution})),this.addControl(new ps,y.logoPosition),this.on("style.load",function(){S.transform.unmodified&&S.jumpTo(S.style.stylesheet)}),this.on("data",function(M){S._update(M.dataType==="style"),S.fire(new o.Event(M.dataType+"data",M))}),this.on("dataloading",function(M){S.fire(new o.Event(M.dataType+"dataloading",M))})}h&&(d.__proto__=h),(d.prototype=Object.create(h&&h.prototype)).constructor=d;var p={showTileBoundaries:{configurable:!0},showPadding:{configurable:!0},showCollisionBoxes:{configurable:!0},showOverdrawInspector:{configurable:!0},repaint:{configurable:!0},vertices:{configurable:!0},version:{configurable:!0}};return d.prototype._getMapId=function(){return this._mapId},d.prototype.addControl=function(y,S){if(S===void 0&&(S=y.getDefaultPosition?y.getDefaultPosition():"top-right"),!y||!y.onAdd)return this.fire(new o.ErrorEvent(new Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));var P=y.onAdd(this);this._controls.push(y);var M=this._controlPositions[S];return S.indexOf("bottom")!==-1?M.insertBefore(P,M.firstChild):M.appendChild(P),this},d.prototype.removeControl=function(y){if(!y||!y.onRemove)return this.fire(new o.ErrorEvent(new Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));var S=this._controls.indexOf(y);return S>-1&&this._controls.splice(S,1),y.onRemove(this),this},d.prototype.hasControl=function(y){return this._controls.indexOf(y)>-1},d.prototype.resize=function(y){var S=this._containerDimensions(),P=S[0],M=S[1];if(P===this.transform.width&&M===this.transform.height)return this;this._resizeCanvas(P,M),this.transform.resize(P,M),this.painter.resize(P,M);var N=!this._moving;return N&&this.fire(new o.Event("movestart",y)).fire(new o.Event("move",y)),this.fire(new o.Event("resize",y)),N&&this.fire(new o.Event("moveend",y)),this},d.prototype.getBounds=function(){return this.transform.getBounds()},d.prototype.getMaxBounds=function(){return this.transform.getMaxBounds()},d.prototype.setMaxBounds=function(y){return this.transform.setMaxBounds(o.LngLatBounds.convert(y)),this._update()},d.prototype.setMinZoom=function(y){if((y=y==null?-2:y)>=-2&&y<=this.transform.maxZoom)return this.transform.minZoom=y,this._update(),this.getZoom()<y&&this.setZoom(y),this;throw new Error("minZoom must be between -2 and the current maxZoom, inclusive")},d.prototype.getMinZoom=function(){return this.transform.minZoom},d.prototype.setMaxZoom=function(y){if((y=y==null?22:y)>=this.transform.minZoom)return this.transform.maxZoom=y,this._update(),this.getZoom()>y&&this.setZoom(y),this;throw new Error("maxZoom must be greater than the current minZoom")},d.prototype.getMaxZoom=function(){return this.transform.maxZoom},d.prototype.setMinPitch=function(y){if((y=y==null?0:y)<0)throw new Error("minPitch must be greater than or equal to 0");if(y>=0&&y<=this.transform.maxPitch)return this.transform.minPitch=y,this._update(),this.getPitch()<y&&this.setPitch(y),this;throw new Error("minPitch must be between 0 and the current maxPitch, inclusive")},d.prototype.getMinPitch=function(){return this.transform.minPitch},d.prototype.setMaxPitch=function(y){if((y=y==null?60:y)>60)throw new Error("maxPitch must be less than or equal to 60");if(y>=this.transform.minPitch)return this.transform.maxPitch=y,this._update(),this.getPitch()>y&&this.setPitch(y),this;throw new Error("maxPitch must be greater than the current minPitch")},d.prototype.getMaxPitch=function(){return this.transform.maxPitch},d.prototype.getRenderWorldCopies=function(){return this.transform.renderWorldCopies},d.prototype.setRenderWorldCopies=function(y){return this.transform.renderWorldCopies=y,this._update()},d.prototype.project=function(y){return this.transform.locationPoint(o.LngLat.convert(y))},d.prototype.unproject=function(y){return this.transform.pointLocation(o.Point.convert(y))},d.prototype.isMoving=function(){return this._moving||this.handlers.isMoving()},d.prototype.isZooming=function(){return this._zooming||this.handlers.isZooming()},d.prototype.isRotating=function(){return this._rotating||this.handlers.isRotating()},d.prototype._createDelegatedListener=function(y,S,P){var M,N=this;if(y==="mouseenter"||y==="mouseover"){var q=!1;return{layer:S,listener:P,delegates:{mousemove:function(it){var st=N.getLayer(S)?N.queryRenderedFeatures(it.point,{layers:[S]}):[];st.length?q||(q=!0,P.call(N,new oo(y,N,it.originalEvent,{features:st}))):q=!1},mouseout:function(){q=!1}}}}if(y==="mouseleave"||y==="mouseout"){var X=!1;return{layer:S,listener:P,delegates:{mousemove:function(it){(N.getLayer(S)?N.queryRenderedFeatures(it.point,{layers:[S]}):[]).length?X=!0:X&&(X=!1,P.call(N,new oo(y,N,it.originalEvent)))},mouseout:function(it){X&&(X=!1,P.call(N,new oo(y,N,it.originalEvent)))}}}}return{layer:S,listener:P,delegates:(M={},M[y]=function(it){var st=N.getLayer(S)?N.queryRenderedFeatures(it.point,{layers:[S]}):[];st.length&&(it.features=st,P.call(N,it),delete it.features)},M)}},d.prototype.on=function(y,S,P){if(P===void 0)return h.prototype.on.call(this,y,S);var M=this._createDelegatedListener(y,S,P);for(var N in this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[y]=this._delegatedListeners[y]||[],this._delegatedListeners[y].push(M),M.delegates)this.on(N,M.delegates[N]);return this},d.prototype.once=function(y,S,P){if(P===void 0)return h.prototype.once.call(this,y,S);var M=this._createDelegatedListener(y,S,P);for(var N in M.delegates)this.once(N,M.delegates[N]);return this},d.prototype.off=function(y,S,P){var M=this;return P===void 0?h.prototype.off.call(this,y,S):(this._delegatedListeners&&this._delegatedListeners[y]&&function(N){for(var q=N[y],X=0;X<q.length;X++){var it=q[X];if(it.layer===S&&it.listener===P){for(var st in it.delegates)M.off(st,it.delegates[st]);return q.splice(X,1),M}}}(this._delegatedListeners),this)},d.prototype.queryRenderedFeatures=function(y,S){if(!this.style)return[];var P;if(S!==void 0||y===void 0||y instanceof o.Point||Array.isArray(y)||(S=y,y=void 0),S=S||{},(y=y||[[0,0],[this.transform.width,this.transform.height]])instanceof o.Point||typeof y[0]=="number")P=[o.Point.convert(y)];else{var M=o.Point.convert(y[0]),N=o.Point.convert(y[1]);P=[M,new o.Point(N.x,M.y),N,new o.Point(M.x,N.y),M]}return this.style.queryRenderedFeatures(P,S,this.transform)},d.prototype.querySourceFeatures=function(y,S){return this.style.querySourceFeatures(y,S)},d.prototype.setStyle=function(y,S){return(S=o.extend({},{localIdeographFontFamily:this._localIdeographFontFamily},S)).diff!==!1&&S.localIdeographFontFamily===this._localIdeographFontFamily&&this.style&&y?(this._diffStyle(y,S),this):(this._localIdeographFontFamily=S.localIdeographFontFamily,this._updateStyle(y,S))},d.prototype._getUIString=function(y){var S=this._locale[y];if(S==null)throw new Error("Missing UI string '"+y+"'");return S},d.prototype._updateStyle=function(y,S){return this.style&&(this.style.setEventedParent(null),this.style._remove()),y?(this.style=new Ln(this,S||{}),this.style.setEventedParent(this,{style:this.style}),typeof y=="string"?this.style.loadURL(y):this.style.loadJSON(y),this):(delete this.style,this)},d.prototype._lazyInitEmptyStyle=function(){this.style||(this.style=new Ln(this,{}),this.style.setEventedParent(this,{style:this.style}),this.style.loadEmpty())},d.prototype._diffStyle=function(y,S){var P=this;if(typeof y=="string"){var M=this._requestManager.normalizeStyleURL(y),N=this._requestManager.transformRequest(M,o.ResourceType.Style);o.getJSON(N,function(q,X){q?P.fire(new o.ErrorEvent(q)):X&&P._updateDiff(X,S)})}else typeof y=="object"&&this._updateDiff(y,S)},d.prototype._updateDiff=function(y,S){try{this.style.setState(y)&&this._update(!0)}catch(P){o.warnOnce("Unable to perform style diff: "+(P.message||P.error||P)+". Rebuilding the style from scratch."),this._updateStyle(y,S)}},d.prototype.getStyle=function(){if(this.style)return this.style.serialize()},d.prototype.isStyleLoaded=function(){return this.style?this.style.loaded():o.warnOnce("There is no style added to the map.")},d.prototype.addSource=function(y,S){return this._lazyInitEmptyStyle(),this.style.addSource(y,S),this._update(!0)},d.prototype.isSourceLoaded=function(y){var S=this.style&&this.style.sourceCaches[y];if(S!==void 0)return S.loaded();this.fire(new o.ErrorEvent(new Error("There is no source with ID '"+y+"'")))},d.prototype.areTilesLoaded=function(){var y=this.style&&this.style.sourceCaches;for(var S in y){var P=y[S]._tiles;for(var M in P){var N=P[M];if(N.state!=="loaded"&&N.state!=="errored")return!1}}return!0},d.prototype.addSourceType=function(y,S,P){return this._lazyInitEmptyStyle(),this.style.addSourceType(y,S,P)},d.prototype.removeSource=function(y){return this.style.removeSource(y),this._update(!0)},d.prototype.getSource=function(y){return this.style.getSource(y)},d.prototype.addImage=function(y,S,P){P===void 0&&(P={});var M=P.pixelRatio;M===void 0&&(M=1);var N=P.sdf;N===void 0&&(N=!1);var q=P.stretchX,X=P.stretchY,it=P.content;if(this._lazyInitEmptyStyle(),S instanceof sv||ai&&S instanceof ai){var st=o.browser.getImageData(S);this.style.addImage(y,{data:new o.RGBAImage({width:st.width,height:st.height},st.data),pixelRatio:M,stretchX:q,stretchY:X,content:it,sdf:N,version:0})}else{if(S.width===void 0||S.height===void 0)return this.fire(new o.ErrorEvent(new Error("Invalid arguments to map.addImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")));var ct=S;this.style.addImage(y,{data:new o.RGBAImage({width:S.width,height:S.height},new Uint8Array(S.data)),pixelRatio:M,stretchX:q,stretchY:X,content:it,sdf:N,version:0,userImage:ct}),ct.onAdd&&ct.onAdd(this,y)}},d.prototype.updateImage=function(y,S){var P=this.style.getImage(y);if(!P)return this.fire(new o.ErrorEvent(new Error("The map has no image with that id. If you are adding a new image use `map.addImage(...)` instead.")));var M=S instanceof sv||ai&&S instanceof ai?o.browser.getImageData(S):S,N=M.width,q=M.height,X=M.data;return N===void 0||q===void 0?this.fire(new o.ErrorEvent(new Error("Invalid arguments to map.updateImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`"))):N!==P.data.width||q!==P.data.height?this.fire(new o.ErrorEvent(new Error("The width and height of the updated image must be that same as the previous version of the image"))):(P.data.replace(X,!(S instanceof sv||ai&&S instanceof ai)),void this.style.updateImage(y,P))},d.prototype.hasImage=function(y){return y?!!this.style.getImage(y):(this.fire(new o.ErrorEvent(new Error("Missing required image id"))),!1)},d.prototype.removeImage=function(y){this.style.removeImage(y)},d.prototype.loadImage=function(y,S){o.getImage(this._requestManager.transformRequest(y,o.ResourceType.Image),S)},d.prototype.listImages=function(){return this.style.listImages()},d.prototype.addLayer=function(y,S){return this._lazyInitEmptyStyle(),this.style.addLayer(y,S),this._update(!0)},d.prototype.moveLayer=function(y,S){return this.style.moveLayer(y,S),this._update(!0)},d.prototype.removeLayer=function(y){return this.style.removeLayer(y),this._update(!0)},d.prototype.getLayer=function(y){return this.style.getLayer(y)},d.prototype.setLayerZoomRange=function(y,S,P){return this.style.setLayerZoomRange(y,S,P),this._update(!0)},d.prototype.setFilter=function(y,S,P){return P===void 0&&(P={}),this.style.setFilter(y,S,P),this._update(!0)},d.prototype.getFilter=function(y){return this.style.getFilter(y)},d.prototype.setPaintProperty=function(y,S,P,M){return M===void 0&&(M={}),this.style.setPaintProperty(y,S,P,M),this._update(!0)},d.prototype.getPaintProperty=function(y,S){return this.style.getPaintProperty(y,S)},d.prototype.setLayoutProperty=function(y,S,P,M){return M===void 0&&(M={}),this.style.setLayoutProperty(y,S,P,M),this._update(!0)},d.prototype.getLayoutProperty=function(y,S){return this.style.getLayoutProperty(y,S)},d.prototype.setLight=function(y,S){return S===void 0&&(S={}),this._lazyInitEmptyStyle(),this.style.setLight(y,S),this._update(!0)},d.prototype.getLight=function(){return this.style.getLight()},d.prototype.setFeatureState=function(y,S){return this.style.setFeatureState(y,S),this._update()},d.prototype.removeFeatureState=function(y,S){return this.style.removeFeatureState(y,S),this._update()},d.prototype.getFeatureState=function(y){return this.style.getFeatureState(y)},d.prototype.getContainer=function(){return this._container},d.prototype.getCanvasContainer=function(){return this._canvasContainer},d.prototype.getCanvas=function(){return this._canvas},d.prototype._containerDimensions=function(){var y=0,S=0;return this._container&&(y=this._container.clientWidth||400,S=this._container.clientHeight||300),[y,S]},d.prototype._detectMissingCSS=function(){o.window.getComputedStyle(this._missingCSSCanary).getPropertyValue("background-color")!=="rgb(250, 128, 114)"&&o.warnOnce("This page appears to be missing CSS declarations for Mapbox GL JS, which may cause the map to display incorrectly. Please ensure your page includes mapbox-gl.css, as described in https://www.mapbox.com/mapbox-gl-js/api/.")},d.prototype._setupContainer=function(){var y=this._container;y.classList.add("mapboxgl-map"),(this._missingCSSCanary=c.create("div","mapboxgl-canary",y)).style.visibility="hidden",this._detectMissingCSS();var S=this._canvasContainer=c.create("div","mapboxgl-canvas-container",y);this._interactive&&S.classList.add("mapboxgl-interactive"),this._canvas=c.create("canvas","mapboxgl-canvas",S),this._canvas.addEventListener("webglcontextlost",this._contextLost,!1),this._canvas.addEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.setAttribute("tabindex","0"),this._canvas.setAttribute("aria-label","Map"),this._canvas.setAttribute("role","region");var P=this._containerDimensions();this._resizeCanvas(P[0],P[1]);var M=this._controlContainer=c.create("div","mapboxgl-control-container",y),N=this._controlPositions={};["top-left","top-right","bottom-left","bottom-right"].forEach(function(q){N[q]=c.create("div","mapboxgl-ctrl-"+q,M)}),this._container.addEventListener("scroll",this._onMapScroll,!1)},d.prototype._resizeCanvas=function(y,S){var P=o.browser.devicePixelRatio||1;this._canvas.width=P*y,this._canvas.height=P*S,this._canvas.style.width=y+"px",this._canvas.style.height=S+"px"},d.prototype._setupPainter=function(){var y=o.extend({},u.webGLContextAttributes,{failIfMajorPerformanceCaveat:this._failIfMajorPerformanceCaveat,preserveDrawingBuffer:this._preserveDrawingBuffer,antialias:this._antialias||!1}),S=this._canvas.getContext("webgl",y)||this._canvas.getContext("experimental-webgl",y);S?(this.painter=new Le(S,this.transform),o.webpSupported.testSupport(S)):this.fire(new o.ErrorEvent(new Error("Failed to initialize WebGL")))},d.prototype._contextLost=function(y){y.preventDefault(),this._frame&&(this._frame.cancel(),this._frame=null),this.fire(new o.Event("webglcontextlost",{originalEvent:y}))},d.prototype._contextRestored=function(y){this._setupPainter(),this.resize(),this._update(),this.fire(new o.Event("webglcontextrestored",{originalEvent:y}))},d.prototype._onMapScroll=function(y){if(y.target===this._container)return this._container.scrollTop=0,this._container.scrollLeft=0,!1},d.prototype.loaded=function(){return!this._styleDirty&&!this._sourcesDirty&&!!this.style&&this.style.loaded()},d.prototype._update=function(y){return this.style?(this._styleDirty=this._styleDirty||y,this._sourcesDirty=!0,this.triggerRepaint(),this):this},d.prototype._requestRenderFrame=function(y){return this._update(),this._renderTaskQueue.add(y)},d.prototype._cancelRenderFrame=function(y){this._renderTaskQueue.remove(y)},d.prototype._render=function(y){var S,P=this,M=0,N=this.painter.context.extTimerQuery;if(this.listens("gpu-timing-frame")&&(S=N.createQueryEXT(),N.beginQueryEXT(N.TIME_ELAPSED_EXT,S),M=o.browser.now()),this.painter.context.setDirty(),this.painter.setBaseState(),this._renderTaskQueue.run(y),!this._removed){var q=!1;if(this.style&&this._styleDirty){this._styleDirty=!1;var X=this.transform.zoom,it=o.browser.now();this.style.zoomHistory.update(X,it);var st=new o.EvaluationParameters(X,{now:it,fadeDuration:this._fadeDuration,zoomHistory:this.style.zoomHistory,transition:this.style.getTransition()}),ct=st.crossFadingFactor();ct===1&&ct===this._crossFadingFactor||(q=!0,this._crossFadingFactor=ct),this.style.update(st)}if(this.style&&this._sourcesDirty&&(this._sourcesDirty=!1,this.style._updateSources(this.transform)),this._placementDirty=this.style&&this.style._updatePlacement(this.painter.transform,this.showCollisionBoxes,this._fadeDuration,this._crossSourceCollisions),this.painter.render(this.style,{showTileBoundaries:this.showTileBoundaries,showOverdrawInspector:this._showOverdrawInspector,rotating:this.isRotating(),zooming:this.isZooming(),moving:this.isMoving(),fadeDuration:this._fadeDuration,showPadding:this.showPadding,gpuTiming:!!this.listens("gpu-timing-layer")}),this.fire(new o.Event("render")),this.loaded()&&!this._loaded&&(this._loaded=!0,this.fire(new o.Event("load"))),this.style&&(this.style.hasTransitions()||q)&&(this._styleDirty=!0),this.style&&!this._placementDirty&&this.style._releaseSymbolFadeTiles(),this.listens("gpu-timing-frame")){var xt=o.browser.now()-M;N.endQueryEXT(N.TIME_ELAPSED_EXT,S),setTimeout(function(){var gt=N.getQueryObjectEXT(S,N.QUERY_RESULT_EXT)/1e6;N.deleteQueryEXT(S),P.fire(new o.Event("gpu-timing-frame",{cpuTime:xt,gpuTime:gt}))},50)}if(this.listens("gpu-timing-layer")){var yt=this.painter.collectGpuTimers();setTimeout(function(){var gt=P.painter.queryGpuTimers(yt);P.fire(new o.Event("gpu-timing-layer",{layerTimes:gt}))},50)}var Ct=this._sourcesDirty||this._styleDirty||this._placementDirty;return Ct||this._repaint?this.triggerRepaint():!this.isMoving()&&this.loaded()&&this.fire(new o.Event("idle")),!this._loaded||this._fullyLoaded||Ct||(this._fullyLoaded=!0),this}},d.prototype.remove=function(){this._hash&&this._hash.remove();for(var y=0,S=this._controls;y<S.length;y+=1)S[y].onRemove(this);this._controls=[],this._frame&&(this._frame.cancel(),this._frame=null),this._renderTaskQueue.clear(),this.painter.destroy(),this.handlers.destroy(),delete this.handlers,this.setStyle(null),o.window!==void 0&&(o.window.removeEventListener("resize",this._onWindowResize,!1),o.window.removeEventListener("orientationchange",this._onWindowResize,!1),o.window.removeEventListener("online",this._onWindowOnline,!1));var P=this.painter.context.gl.getExtension("WEBGL_lose_context");P&&P.loseContext(),Bf(this._canvasContainer),Bf(this._controlContainer),Bf(this._missingCSSCanary),this._container.classList.remove("mapboxgl-map"),this._removed=!0,this.fire(new o.Event("remove"))},d.prototype.triggerRepaint=function(){var y=this;this.style&&!this._frame&&(this._frame=o.browser.frame(function(S){y._frame=null,y._render(S)}))},d.prototype._onWindowOnline=function(){this._update()},d.prototype._onWindowResize=function(y){this._trackResize&&this.resize({originalEvent:y})._update()},p.showTileBoundaries.get=function(){return!!this._showTileBoundaries},p.showTileBoundaries.set=function(y){this._showTileBoundaries!==y&&(this._showTileBoundaries=y,this._update())},p.showPadding.get=function(){return!!this._showPadding},p.showPadding.set=function(y){this._showPadding!==y&&(this._showPadding=y,this._update())},p.showCollisionBoxes.get=function(){return!!this._showCollisionBoxes},p.showCollisionBoxes.set=function(y){this._showCollisionBoxes!==y&&(this._showCollisionBoxes=y,y?this.style._generateCollisionBoxes():this._update())},p.showOverdrawInspector.get=function(){return!!this._showOverdrawInspector},p.showOverdrawInspector.set=function(y){this._showOverdrawInspector!==y&&(this._showOverdrawInspector=y,this._update())},p.repaint.get=function(){return!!this._repaint},p.repaint.set=function(y){this._repaint!==y&&(this._repaint=y,this.triggerRepaint())},p.vertices.get=function(){return!!this._vertices},p.vertices.set=function(y){this._vertices=y,this._update()},d.prototype._setCacheLimits=function(y,S){o.setCacheLimits(y,S)},p.version.get=function(){return o.version},Object.defineProperties(d.prototype,p),d}(zf);function Bf(h){h.parentNode&&h.parentNode.removeChild(h)}var ut={showCompass:!0,showZoom:!0,visualizePitch:!1},Zs=function(h){var d=this;this.options=o.extend({},ut,h),this._container=c.create("div","mapboxgl-ctrl mapboxgl-ctrl-group"),this._container.addEventListener("contextmenu",function(p){return p.preventDefault()}),this.options.showZoom&&(o.bindAll(["_setButtonTitle","_updateZoomButtons"],this),this._zoomInButton=this._createButton("mapboxgl-ctrl-zoom-in",function(p){return d._map.zoomIn({},{originalEvent:p})}),c.create("span","mapboxgl-ctrl-icon",this._zoomInButton).setAttribute("aria-hidden",!0),this._zoomOutButton=this._createButton("mapboxgl-ctrl-zoom-out",function(p){return d._map.zoomOut({},{originalEvent:p})}),c.create("span","mapboxgl-ctrl-icon",this._zoomOutButton).setAttribute("aria-hidden",!0)),this.options.showCompass&&(o.bindAll(["_rotateCompassArrow"],this),this._compass=this._createButton("mapboxgl-ctrl-compass",function(p){d.options.visualizePitch?d._map.resetNorthPitch({},{originalEvent:p}):d._map.resetNorth({},{originalEvent:p})}),this._compassIcon=c.create("span","mapboxgl-ctrl-icon",this._compass),this._compassIcon.setAttribute("aria-hidden",!0))};Zs.prototype._updateZoomButtons=function(){var h=this._map.getZoom(),d=h===this._map.getMaxZoom(),p=h===this._map.getMinZoom();this._zoomInButton.disabled=d,this._zoomOutButton.disabled=p,this._zoomInButton.setAttribute("aria-disabled",d.toString()),this._zoomOutButton.setAttribute("aria-disabled",p.toString())},Zs.prototype._rotateCompassArrow=function(){var h=this.options.visualizePitch?"scale("+1/Math.pow(Math.cos(this._map.transform.pitch*(Math.PI/180)),.5)+") rotateX("+this._map.transform.pitch+"deg) rotateZ("+this._map.transform.angle*(180/Math.PI)+"deg)":"rotate("+this._map.transform.angle*(180/Math.PI)+"deg)";this._compassIcon.style.transform=h},Zs.prototype.onAdd=function(h){return this._map=h,this.options.showZoom&&(this._setButtonTitle(this._zoomInButton,"ZoomIn"),this._setButtonTitle(this._zoomOutButton,"ZoomOut"),this._map.on("zoom",this._updateZoomButtons),this._updateZoomButtons()),this.options.showCompass&&(this._setButtonTitle(this._compass,"ResetBearing"),this.options.visualizePitch&&this._map.on("pitch",this._rotateCompassArrow),this._map.on("rotate",this._rotateCompassArrow),this._rotateCompassArrow(),this._handler=new Za(this._map,this._compass,this.options.visualizePitch)),this._container},Zs.prototype.onRemove=function(){c.remove(this._container),this.options.showZoom&&this._map.off("zoom",this._updateZoomButtons),this.options.showCompass&&(this.options.visualizePitch&&this._map.off("pitch",this._rotateCompassArrow),this._map.off("rotate",this._rotateCompassArrow),this._handler.off(),delete this._handler),delete this._map},Zs.prototype._createButton=function(h,d){var p=c.create("button",h,this._container);return p.type="button",p.addEventListener("click",d),p},Zs.prototype._setButtonTitle=function(h,d){var p=this._map._getUIString("NavigationControl."+d);h.title=p,h.setAttribute("aria-label",p)};var Za=function(h,d,p){p===void 0&&(p=!1),this._clickTolerance=10,this.element=d,this.mouseRotate=new Sd({clickTolerance:h.dragRotate._mouseRotate._clickTolerance}),this.map=h,p&&(this.mousePitch=new zh({clickTolerance:h.dragRotate._mousePitch._clickTolerance})),o.bindAll(["mousedown","mousemove","mouseup","touchstart","touchmove","touchend","reset"],this),c.addEventListener(d,"mousedown",this.mousedown),c.addEventListener(d,"touchstart",this.touchstart,{passive:!1}),c.addEventListener(d,"touchmove",this.touchmove),c.addEventListener(d,"touchend",this.touchend),c.addEventListener(d,"touchcancel",this.reset)};function Ka(h,d,p){if(h=new o.LngLat(h.lng,h.lat),d){var y=new o.LngLat(h.lng-360,h.lat),S=new o.LngLat(h.lng+360,h.lat),P=p.locationPoint(h).distSqr(d);p.locationPoint(y).distSqr(d)<P?h=y:p.locationPoint(S).distSqr(d)<P&&(h=S)}for(;Math.abs(h.lng-p.center.lng)>180;){var M=p.locationPoint(h);if(M.x>=0&&M.y>=0&&M.x<=p.width&&M.y<=p.height)break;h.lng>p.center.lng?h.lng-=360:h.lng+=360}return h}Za.prototype.down=function(h,d){this.mouseRotate.mousedown(h,d),this.mousePitch&&this.mousePitch.mousedown(h,d),c.disableDrag()},Za.prototype.move=function(h,d){var p=this.map,y=this.mouseRotate.mousemoveWindow(h,d);if(y&&y.bearingDelta&&p.setBearing(p.getBearing()+y.bearingDelta),this.mousePitch){var S=this.mousePitch.mousemoveWindow(h,d);S&&S.pitchDelta&&p.setPitch(p.getPitch()+S.pitchDelta)}},Za.prototype.off=function(){var h=this.element;c.removeEventListener(h,"mousedown",this.mousedown),c.removeEventListener(h,"touchstart",this.touchstart,{passive:!1}),c.removeEventListener(h,"touchmove",this.touchmove),c.removeEventListener(h,"touchend",this.touchend),c.removeEventListener(h,"touchcancel",this.reset),this.offTemp()},Za.prototype.offTemp=function(){c.enableDrag(),c.removeEventListener(o.window,"mousemove",this.mousemove),c.removeEventListener(o.window,"mouseup",this.mouseup)},Za.prototype.mousedown=function(h){this.down(o.extend({},h,{ctrlKey:!0,preventDefault:function(){return h.preventDefault()}}),c.mousePos(this.element,h)),c.addEventListener(o.window,"mousemove",this.mousemove),c.addEventListener(o.window,"mouseup",this.mouseup)},Za.prototype.mousemove=function(h){this.move(h,c.mousePos(this.element,h))},Za.prototype.mouseup=function(h){this.mouseRotate.mouseupWindow(h),this.mousePitch&&this.mousePitch.mouseupWindow(h),this.offTemp()},Za.prototype.touchstart=function(h){h.targetTouches.length!==1?this.reset():(this._startPos=this._lastPos=c.touchPos(this.element,h.targetTouches)[0],this.down({type:"mousedown",button:0,ctrlKey:!0,preventDefault:function(){return h.preventDefault()}},this._startPos))},Za.prototype.touchmove=function(h){h.targetTouches.length!==1?this.reset():(this._lastPos=c.touchPos(this.element,h.targetTouches)[0],this.move({preventDefault:function(){return h.preventDefault()}},this._lastPos))},Za.prototype.touchend=function(h){h.targetTouches.length===0&&this._startPos&&this._lastPos&&this._startPos.dist(this._lastPos)<this._clickTolerance&&this.element.click(),this.reset()},Za.prototype.reset=function(){this.mouseRotate.reset(),this.mousePitch&&this.mousePitch.reset(),delete this._startPos,delete this._lastPos,this.offTemp()};var ur={center:"translate(-50%,-50%)",top:"translate(-50%,0)","top-left":"translate(0,0)","top-right":"translate(-100%,0)",bottom:"translate(-50%,-100%)","bottom-left":"translate(0,-100%)","bottom-right":"translate(-100%,-100%)",left:"translate(0,-50%)",right:"translate(-100%,-50%)"};function Fg(h,d,p){var y=h.classList;for(var S in ur)y.remove("mapboxgl-"+p+"-anchor-"+S);y.add("mapboxgl-"+p+"-anchor-"+d)}var kp,Cd=function(h){function d(p,y){if(h.call(this),(p instanceof o.window.HTMLElement||y)&&(p=o.extend({element:p},y)),o.bindAll(["_update","_onMove","_onUp","_addDragHandler","_onMapClick","_onKeyPress"],this),this._anchor=p&&p.anchor||"center",this._color=p&&p.color||"#3FB1CE",this._scale=p&&p.scale||1,this._draggable=p&&p.draggable||!1,this._clickTolerance=p&&p.clickTolerance||0,this._isDragging=!1,this._state="inactive",this._rotation=p&&p.rotation||0,this._rotationAlignment=p&&p.rotationAlignment||"auto",this._pitchAlignment=p&&p.pitchAlignment&&p.pitchAlignment!=="auto"?p.pitchAlignment:this._rotationAlignment,p&&p.element)this._element=p.element,this._offset=o.Point.convert(p&&p.offset||[0,0]);else{this._defaultMarker=!0,this._element=c.create("div"),this._element.setAttribute("aria-label","Map marker");var S=c.createNS("http://www.w3.org/2000/svg","svg");S.setAttributeNS(null,"display","block"),S.setAttributeNS(null,"height","41px"),S.setAttributeNS(null,"width","27px"),S.setAttributeNS(null,"viewBox","0 0 27 41");var P=c.createNS("http://www.w3.org/2000/svg","g");P.setAttributeNS(null,"stroke","none"),P.setAttributeNS(null,"stroke-width","1"),P.setAttributeNS(null,"fill","none"),P.setAttributeNS(null,"fill-rule","evenodd");var M=c.createNS("http://www.w3.org/2000/svg","g");M.setAttributeNS(null,"fill-rule","nonzero");var N=c.createNS("http://www.w3.org/2000/svg","g");N.setAttributeNS(null,"transform","translate(3.0, 29.0)"),N.setAttributeNS(null,"fill","#000000");for(var q=0,X=[{rx:"10.5",ry:"5.25002273"},{rx:"10.5",ry:"5.25002273"},{rx:"9.5",ry:"4.77275007"},{rx:"8.5",ry:"4.29549936"},{rx:"7.5",ry:"3.81822308"},{rx:"6.5",ry:"3.34094679"},{rx:"5.5",ry:"2.86367051"},{rx:"4.5",ry:"2.38636864"}];q<X.length;q+=1){var it=X[q],st=c.createNS("http://www.w3.org/2000/svg","ellipse");st.setAttributeNS(null,"opacity","0.04"),st.setAttributeNS(null,"cx","10.5"),st.setAttributeNS(null,"cy","5.80029008"),st.setAttributeNS(null,"rx",it.rx),st.setAttributeNS(null,"ry",it.ry),N.appendChild(st)}var ct=c.createNS("http://www.w3.org/2000/svg","g");ct.setAttributeNS(null,"fill",this._color);var xt=c.createNS("http://www.w3.org/2000/svg","path");xt.setAttributeNS(null,"d","M27,13.5 C27,19.074644 20.250001,27.000002 14.75,34.500002 C14.016665,35.500004 12.983335,35.500004 12.25,34.500002 C6.7499993,27.000002 0,19.222562 0,13.5 C0,6.0441559 6.0441559,0 13.5,0 C20.955844,0 27,6.0441559 27,13.5 Z"),ct.appendChild(xt);var yt=c.createNS("http://www.w3.org/2000/svg","g");yt.setAttributeNS(null,"opacity","0.25"),yt.setAttributeNS(null,"fill","#000000");var Ct=c.createNS("http://www.w3.org/2000/svg","path");Ct.setAttributeNS(null,"d","M13.5,0 C6.0441559,0 0,6.0441559 0,13.5 C0,19.222562 6.7499993,27 12.25,34.5 C13,35.522727 14.016664,35.500004 14.75,34.5 C20.250001,27 27,19.074644 27,13.5 C27,6.0441559 20.955844,0 13.5,0 Z M13.5,1 C20.415404,1 26,6.584596 26,13.5 C26,15.898657 24.495584,19.181431 22.220703,22.738281 C19.945823,26.295132 16.705119,30.142167 13.943359,33.908203 C13.743445,34.180814 13.612715,34.322738 13.5,34.441406 C13.387285,34.322738 13.256555,34.180814 13.056641,33.908203 C10.284481,30.127985 7.4148684,26.314159 5.015625,22.773438 C2.6163816,19.232715 1,15.953538 1,13.5 C1,6.584596 6.584596,1 13.5,1 Z"),yt.appendChild(Ct);var gt=c.createNS("http://www.w3.org/2000/svg","g");gt.setAttributeNS(null,"transform","translate(6.0, 7.0)"),gt.setAttributeNS(null,"fill","#FFFFFF");var It=c.createNS("http://www.w3.org/2000/svg","g");It.setAttributeNS(null,"transform","translate(8.0, 8.0)");var Lt=c.createNS("http://www.w3.org/2000/svg","circle");Lt.setAttributeNS(null,"fill","#000000"),Lt.setAttributeNS(null,"opacity","0.25"),Lt.setAttributeNS(null,"cx","5.5"),Lt.setAttributeNS(null,"cy","5.5"),Lt.setAttributeNS(null,"r","5.4999962");var jt=c.createNS("http://www.w3.org/2000/svg","circle");jt.setAttributeNS(null,"fill","#FFFFFF"),jt.setAttributeNS(null,"cx","5.5"),jt.setAttributeNS(null,"cy","5.5"),jt.setAttributeNS(null,"r","5.4999962"),It.appendChild(Lt),It.appendChild(jt),M.appendChild(N),M.appendChild(ct),M.appendChild(yt),M.appendChild(gt),M.appendChild(It),S.appendChild(M),S.setAttributeNS(null,"height",41*this._scale+"px"),S.setAttributeNS(null,"width",27*this._scale+"px"),this._element.appendChild(S),this._offset=o.Point.convert(p&&p.offset||[0,-14])}this._element.classList.add("mapboxgl-marker"),this._element.addEventListener("dragstart",function(ne){ne.preventDefault()}),this._element.addEventListener("mousedown",function(ne){ne.preventDefault()}),Fg(this._element,this._anchor,"marker"),this._popup=null}return h&&(d.__proto__=h),(d.prototype=Object.create(h&&h.prototype)).constructor=d,d.prototype.addTo=function(p){return this.remove(),this._map=p,p.getCanvasContainer().appendChild(this._element),p.on("move",this._update),p.on("moveend",this._update),this.setDraggable(this._draggable),this._update(),this._map.on("click",this._onMapClick),this},d.prototype.remove=function(){return this._map&&(this._map.off("click",this._onMapClick),this._map.off("move",this._update),this._map.off("moveend",this._update),this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler),this._map.off("mouseup",this._onUp),this._map.off("touchend",this._onUp),this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),delete this._map),c.remove(this._element),this._popup&&this._popup.remove(),this},d.prototype.getLngLat=function(){return this._lngLat},d.prototype.setLngLat=function(p){return this._lngLat=o.LngLat.convert(p),this._pos=null,this._popup&&this._popup.setLngLat(this._lngLat),this._update(),this},d.prototype.getElement=function(){return this._element},d.prototype.setPopup=function(p){if(this._popup&&(this._popup.remove(),this._popup=null,this._element.removeEventListener("keypress",this._onKeyPress),this._originalTabIndex||this._element.removeAttribute("tabindex")),p){if(!("offset"in p.options)){var y=Math.sqrt(Math.pow(13.5,2)/2);p.options.offset=this._defaultMarker?{top:[0,0],"top-left":[0,0],"top-right":[0,0],bottom:[0,-38.1],"bottom-left":[y,-1*(24.6+y)],"bottom-right":[-y,-1*(24.6+y)],left:[13.5,-24.6],right:[-13.5,-24.6]}:this._offset}this._popup=p,this._lngLat&&this._popup.setLngLat(this._lngLat),this._originalTabIndex=this._element.getAttribute("tabindex"),this._originalTabIndex||this._element.setAttribute("tabindex","0"),this._element.addEventListener("keypress",this._onKeyPress)}return this},d.prototype._onKeyPress=function(p){var y=p.code,S=p.charCode||p.keyCode;y!=="Space"&&y!=="Enter"&&S!==32&&S!==13||this.togglePopup()},d.prototype._onMapClick=function(p){var y=p.originalEvent.target,S=this._element;this._popup&&(y===S||S.contains(y))&&this.togglePopup()},d.prototype.getPopup=function(){return this._popup},d.prototype.togglePopup=function(){var p=this._popup;return p?(p.isOpen()?p.remove():p.addTo(this._map),this):this},d.prototype._update=function(p){if(this._map){this._map.transform.renderWorldCopies&&(this._lngLat=Ka(this._lngLat,this._pos,this._map.transform)),this._pos=this._map.project(this._lngLat)._add(this._offset);var y="";this._rotationAlignment==="viewport"||this._rotationAlignment==="auto"?y="rotateZ("+this._rotation+"deg)":this._rotationAlignment==="map"&&(y="rotateZ("+(this._rotation-this._map.getBearing())+"deg)");var S="";this._pitchAlignment==="viewport"||this._pitchAlignment==="auto"?S="rotateX(0deg)":this._pitchAlignment==="map"&&(S="rotateX("+this._map.getPitch()+"deg)"),p&&p.type!=="moveend"||(this._pos=this._pos.round()),c.setTransform(this._element,ur[this._anchor]+" translate("+this._pos.x+"px, "+this._pos.y+"px) "+S+" "+y)}},d.prototype.getOffset=function(){return this._offset},d.prototype.setOffset=function(p){return this._offset=o.Point.convert(p),this._update(),this},d.prototype._onMove=function(p){if(!this._isDragging){var y=this._clickTolerance||this._map._clickTolerance;this._isDragging=p.point.dist(this._pointerdownPos)>=y}this._isDragging&&(this._pos=p.point.sub(this._positionDelta),this._lngLat=this._map.unproject(this._pos),this.setLngLat(this._lngLat),this._element.style.pointerEvents="none",this._state==="pending"&&(this._state="active",this.fire(new o.Event("dragstart"))),this.fire(new o.Event("drag")))},d.prototype._onUp=function(){this._element.style.pointerEvents="auto",this._positionDelta=null,this._pointerdownPos=null,this._isDragging=!1,this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),this._state==="active"&&this.fire(new o.Event("dragend")),this._state="inactive"},d.prototype._addDragHandler=function(p){this._element.contains(p.originalEvent.target)&&(p.preventDefault(),this._positionDelta=p.point.sub(this._pos).add(this._offset),this._pointerdownPos=p.point,this._state="pending",this._map.on("mousemove",this._onMove),this._map.on("touchmove",this._onMove),this._map.once("mouseup",this._onUp),this._map.once("touchend",this._onUp))},d.prototype.setDraggable=function(p){return this._draggable=!!p,this._map&&(p?(this._map.on("mousedown",this._addDragHandler),this._map.on("touchstart",this._addDragHandler)):(this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler))),this},d.prototype.isDraggable=function(){return this._draggable},d.prototype.setRotation=function(p){return this._rotation=p||0,this._update(),this},d.prototype.getRotation=function(){return this._rotation},d.prototype.setRotationAlignment=function(p){return this._rotationAlignment=p||"auto",this._update(),this},d.prototype.getRotationAlignment=function(){return this._rotationAlignment},d.prototype.setPitchAlignment=function(p){return this._pitchAlignment=p&&p!=="auto"?p:this._rotationAlignment,this._update(),this},d.prototype.getPitchAlignment=function(){return this._pitchAlignment},d}(o.Evented),$c={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0},Dp=0,Vh=!1,uv=function(h){function d(p){h.call(this),this.options=o.extend({},$c,p),o.bindAll(["_onSuccess","_onError","_onZoom","_finish","_setupUI","_updateCamera","_updateMarker"],this)}return h&&(d.__proto__=h),(d.prototype=Object.create(h&&h.prototype)).constructor=d,d.prototype.onAdd=function(p){var y;return this._map=p,this._container=c.create("div","mapboxgl-ctrl mapboxgl-ctrl-group"),y=this._setupUI,kp!==void 0?y(kp):o.window.navigator.permissions!==void 0?o.window.navigator.permissions.query({name:"geolocation"}).then(function(S){y(kp=S.state!=="denied")}):y(kp=!!o.window.navigator.geolocation),this._container},d.prototype.onRemove=function(){this._geolocationWatchID!==void 0&&(o.window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0),this.options.showUserLocation&&this._userLocationDotMarker&&this._userLocationDotMarker.remove(),this.options.showAccuracyCircle&&this._accuracyCircleMarker&&this._accuracyCircleMarker.remove(),c.remove(this._container),this._map.off("zoom",this._onZoom),this._map=void 0,Dp=0,Vh=!1},d.prototype._isOutOfMapMaxBounds=function(p){var y=this._map.getMaxBounds(),S=p.coords;return y&&(S.longitude<y.getWest()||S.longitude>y.getEast()||S.latitude<y.getSouth()||S.latitude>y.getNorth())},d.prototype._setErrorState=function(){switch(this._watchState){case"WAITING_ACTIVE":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error");break;case"ACTIVE_LOCK":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting");break;case"BACKGROUND":this._watchState="BACKGROUND_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting")}},d.prototype._onSuccess=function(p){if(this._map){if(this._isOutOfMapMaxBounds(p))return this._setErrorState(),this.fire(new o.Event("outofmaxbounds",p)),this._updateMarker(),void this._finish();if(this.options.trackUserLocation)switch(this._lastKnownPosition=p,this._watchState){case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"BACKGROUND":case"BACKGROUND_ERROR":this._watchState="BACKGROUND",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background")}this.options.showUserLocation&&this._watchState!=="OFF"&&this._updateMarker(p),this.options.trackUserLocation&&this._watchState!=="ACTIVE_LOCK"||this._updateCamera(p),this.options.showUserLocation&&this._dotElement.classList.remove("mapboxgl-user-location-dot-stale"),this.fire(new o.Event("geolocate",p)),this._finish()}},d.prototype._updateCamera=function(p){var y=new o.LngLat(p.coords.longitude,p.coords.latitude),S=p.coords.accuracy,P=this._map.getBearing(),M=o.extend({bearing:P},this.options.fitBoundsOptions);this._map.fitBounds(y.toBounds(S),M,{geolocateSource:!0})},d.prototype._updateMarker=function(p){if(p){var y=new o.LngLat(p.coords.longitude,p.coords.latitude);this._accuracyCircleMarker.setLngLat(y).addTo(this._map),this._userLocationDotMarker.setLngLat(y).addTo(this._map),this._accuracy=p.coords.accuracy,this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()},d.prototype._updateCircleRadius=function(){var p=this._map._container.clientHeight/2,y=this._map.unproject([0,p]),S=this._map.unproject([1,p]),P=y.distanceTo(S),M=Math.ceil(2*this._accuracy/P);this._circleElement.style.width=M+"px",this._circleElement.style.height=M+"px"},d.prototype._onZoom=function(){this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()},d.prototype._onError=function(p){if(this._map){if(this.options.trackUserLocation)if(p.code===1){this._watchState="OFF",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.disabled=!0;var y=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=y,this._geolocateButton.setAttribute("aria-label",y),this._geolocationWatchID!==void 0&&this._clearWatch()}else{if(p.code===3&&Vh)return;this._setErrorState()}this._watchState!=="OFF"&&this.options.showUserLocation&&this._dotElement.classList.add("mapboxgl-user-location-dot-stale"),this.fire(new o.Event("error",p)),this._finish()}},d.prototype._finish=function(){this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},d.prototype._setupUI=function(p){var y=this;if(this._container.addEventListener("contextmenu",function(M){return M.preventDefault()}),this._geolocateButton=c.create("button","mapboxgl-ctrl-geolocate",this._container),c.create("span","mapboxgl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden",!0),this._geolocateButton.type="button",p===!1){o.warnOnce("Geolocation support is not available so the GeolocateControl will be disabled.");var S=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=S,this._geolocateButton.setAttribute("aria-label",S)}else{var P=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.title=P,this._geolocateButton.setAttribute("aria-label",P)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=c.create("div","mapboxgl-user-location-dot"),this._userLocationDotMarker=new Cd(this._dotElement),this._circleElement=c.create("div","mapboxgl-user-location-accuracy-circle"),this._accuracyCircleMarker=new Cd({element:this._circleElement,pitchAlignment:"map"}),this.options.trackUserLocation&&(this._watchState="OFF"),this._map.on("zoom",this._onZoom)),this._geolocateButton.addEventListener("click",this.trigger.bind(this)),this._setup=!0,this.options.trackUserLocation&&this._map.on("movestart",function(M){M.geolocateSource||y._watchState!=="ACTIVE_LOCK"||M.originalEvent&&M.originalEvent.type==="resize"||(y._watchState="BACKGROUND",y._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background"),y._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),y.fire(new o.Event("trackuserlocationend")))})},d.prototype.trigger=function(){if(!this._setup)return o.warnOnce("Geolocate control triggered before added to a map"),!1;if(this.options.trackUserLocation){switch(this._watchState){case"OFF":this._watchState="WAITING_ACTIVE",this.fire(new o.Event("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":Dp--,Vh=!1,this._watchState="OFF",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this.fire(new o.Event("trackuserlocationend"));break;case"BACKGROUND":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._lastKnownPosition&&this._updateCamera(this._lastKnownPosition),this.fire(new o.Event("trackuserlocationstart"))}switch(this._watchState){case"WAITING_ACTIVE":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"ACTIVE_LOCK":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"ACTIVE_ERROR":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error");break;case"BACKGROUND":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background");break;case"BACKGROUND_ERROR":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background-error")}if(this._watchState==="OFF"&&this._geolocationWatchID!==void 0)this._clearWatch();else if(this._geolocationWatchID===void 0){var p;this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),++Dp>1?(p={maximumAge:6e5,timeout:0},Vh=!0):(p=this.options.positionOptions,Vh=!1),this._geolocationWatchID=o.window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,p)}}else o.window.navigator.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=setTimeout(this._finish,1e4);return!0},d.prototype._clearWatch=function(){o.window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0,this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","false"),this.options.showUserLocation&&this._updateMarker(null)},d}(o.Evented),Uf={maxWidth:100,unit:"metric"},Vf=function(h){this.options=o.extend({},Uf,h),o.bindAll(["_onMove","setUnit"],this)};function Yu(h,d,p){var y=p&&p.maxWidth||100,S=h._container.clientHeight/2,P=h.unproject([0,S]),M=h.unproject([y,S]),N=P.distanceTo(M);if(p&&p.unit==="imperial"){var q=3.2808*N;q>5280?$f(d,y,q/5280,h._getUIString("ScaleControl.Miles")):$f(d,y,q,h._getUIString("ScaleControl.Feet"))}else p&&p.unit==="nautical"?$f(d,y,N/1852,h._getUIString("ScaleControl.NauticalMiles")):N>=1e3?$f(d,y,N/1e3,h._getUIString("ScaleControl.Kilometers")):$f(d,y,N,h._getUIString("ScaleControl.Meters"))}function $f(h,d,p,y){var S,P,M,N=(S=p,(P=Math.pow(10,(""+Math.floor(S)).length-1))*(M=(M=S/P)>=10?10:M>=5?5:M>=3?3:M>=2?2:M>=1?1:function(q){var X=Math.pow(10,Math.ceil(-Math.log(q)/Math.LN10));return Math.round(q*X)/X}(M)));h.style.width=d*(N/p)+"px",h.innerHTML=N+" "+y}Vf.prototype.getDefaultPosition=function(){return"bottom-left"},Vf.prototype._onMove=function(){Yu(this._map,this._container,this.options)},Vf.prototype.onAdd=function(h){return this._map=h,this._container=c.create("div","mapboxgl-ctrl mapboxgl-ctrl-scale",h.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container},Vf.prototype.onRemove=function(){c.remove(this._container),this._map.off("move",this._onMove),this._map=void 0},Vf.prototype.setUnit=function(h){this.options.unit=h,Yu(this._map,this._container,this.options)};var Zu=function(h){this._fullscreen=!1,h&&h.container&&(h.container instanceof o.window.HTMLElement?this._container=h.container:o.warnOnce("Full screen control 'container' must be a DOM element.")),o.bindAll(["_onClickFullscreen","_changeIcon"],this),"onfullscreenchange"in o.window.document?this._fullscreenchange="fullscreenchange":"onmozfullscreenchange"in o.window.document?this._fullscreenchange="mozfullscreenchange":"onwebkitfullscreenchange"in o.window.document?this._fullscreenchange="webkitfullscreenchange":"onmsfullscreenchange"in o.window.document&&(this._fullscreenchange="MSFullscreenChange")};Zu.prototype.onAdd=function(h){return this._map=h,this._container||(this._container=this._map.getContainer()),this._controlContainer=c.create("div","mapboxgl-ctrl mapboxgl-ctrl-group"),this._checkFullscreenSupport()?this._setupUI():(this._controlContainer.style.display="none",o.warnOnce("This device does not support fullscreen mode.")),this._controlContainer},Zu.prototype.onRemove=function(){c.remove(this._controlContainer),this._map=null,o.window.document.removeEventListener(this._fullscreenchange,this._changeIcon)},Zu.prototype._checkFullscreenSupport=function(){return!!(o.window.document.fullscreenEnabled||o.window.document.mozFullScreenEnabled||o.window.document.msFullscreenEnabled||o.window.document.webkitFullscreenEnabled)},Zu.prototype._setupUI=function(){var h=this._fullscreenButton=c.create("button","mapboxgl-ctrl-fullscreen",this._controlContainer);c.create("span","mapboxgl-ctrl-icon",h).setAttribute("aria-hidden",!0),h.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),o.window.document.addEventListener(this._fullscreenchange,this._changeIcon)},Zu.prototype._updateTitle=function(){var h=this._getTitle();this._fullscreenButton.setAttribute("aria-label",h),this._fullscreenButton.title=h},Zu.prototype._getTitle=function(){return this._map._getUIString(this._isFullscreen()?"FullscreenControl.Exit":"FullscreenControl.Enter")},Zu.prototype._isFullscreen=function(){return this._fullscreen},Zu.prototype._changeIcon=function(){(o.window.document.fullscreenElement||o.window.document.mozFullScreenElement||o.window.document.webkitFullscreenElement||o.window.document.msFullscreenElement)===this._container!==this._fullscreen&&(this._fullscreen=!this._fullscreen,this._fullscreenButton.classList.toggle("mapboxgl-ctrl-shrink"),this._fullscreenButton.classList.toggle("mapboxgl-ctrl-fullscreen"),this._updateTitle())},Zu.prototype._onClickFullscreen=function(){this._isFullscreen()?o.window.document.exitFullscreen?o.window.document.exitFullscreen():o.window.document.mozCancelFullScreen?o.window.document.mozCancelFullScreen():o.window.document.msExitFullscreen?o.window.document.msExitFullscreen():o.window.document.webkitCancelFullScreen&&o.window.document.webkitCancelFullScreen():this._container.requestFullscreen?this._container.requestFullscreen():this._container.mozRequestFullScreen?this._container.mozRequestFullScreen():this._container.msRequestFullscreen?this._container.msRequestFullscreen():this._container.webkitRequestFullscreen&&this._container.webkitRequestFullscreen()};var lv={closeButton:!0,closeOnClick:!0,focusAfterOpen:!0,className:"",maxWidth:"240px"},Id=["a[href]","[tabindex]:not([tabindex='-1'])","[contenteditable]:not([contenteditable='false'])","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].join(", "),cv=function(h){function d(p){h.call(this),this.options=o.extend(Object.create(lv),p),o.bindAll(["_update","_onClose","remove","_onMouseMove","_onMouseUp","_onDrag"],this)}return h&&(d.__proto__=h),(d.prototype=Object.create(h&&h.prototype)).constructor=d,d.prototype.addTo=function(p){return this._map&&this.remove(),this._map=p,this.options.closeOnClick&&this._map.on("click",this._onClose),this.options.closeOnMove&&this._map.on("move",this._onClose),this._map.on("remove",this.remove),this._update(),this._focusFirstElement(),this._trackPointer?(this._map.on("mousemove",this._onMouseMove),this._map.on("mouseup",this._onMouseUp),this._container&&this._container.classList.add("mapboxgl-popup-track-pointer"),this._map._canvasContainer.classList.add("mapboxgl-track-pointer")):this._map.on("move",this._update),this.fire(new o.Event("open")),this},d.prototype.isOpen=function(){return!!this._map},d.prototype.remove=function(){return this._content&&c.remove(this._content),this._container&&(c.remove(this._container),delete this._container),this._map&&(this._map.off("move",this._update),this._map.off("move",this._onClose),this._map.off("click",this._onClose),this._map.off("remove",this.remove),this._map.off("mousemove",this._onMouseMove),this._map.off("mouseup",this._onMouseUp),this._map.off("drag",this._onDrag),delete this._map),this.fire(new o.Event("close")),this},d.prototype.getLngLat=function(){return this._lngLat},d.prototype.setLngLat=function(p){return this._lngLat=o.LngLat.convert(p),this._pos=null,this._trackPointer=!1,this._update(),this._map&&(this._map.on("move",this._update),this._map.off("mousemove",this._onMouseMove),this._container&&this._container.classList.remove("mapboxgl-popup-track-pointer"),this._map._canvasContainer.classList.remove("mapboxgl-track-pointer")),this},d.prototype.trackPointer=function(){return this._trackPointer=!0,this._pos=null,this._update(),this._map&&(this._map.off("move",this._update),this._map.on("mousemove",this._onMouseMove),this._map.on("drag",this._onDrag),this._container&&this._container.classList.add("mapboxgl-popup-track-pointer"),this._map._canvasContainer.classList.add("mapboxgl-track-pointer")),this},d.prototype.getElement=function(){return this._container},d.prototype.setText=function(p){return this.setDOMContent(o.window.document.createTextNode(p))},d.prototype.setHTML=function(p){var y,S=o.window.document.createDocumentFragment(),P=o.window.document.createElement("body");for(P.innerHTML=p;y=P.firstChild;)S.appendChild(y);return this.setDOMContent(S)},d.prototype.getMaxWidth=function(){return this._container&&this._container.style.maxWidth},d.prototype.setMaxWidth=function(p){return this.options.maxWidth=p,this._update(),this},d.prototype.setDOMContent=function(p){if(this._content)for(;this._content.hasChildNodes();)this._content.firstChild&&this._content.removeChild(this._content.firstChild);else this._content=c.create("div","mapboxgl-popup-content",this._container);return this._content.appendChild(p),this._createCloseButton(),this._update(),this._focusFirstElement(),this},d.prototype.addClassName=function(p){this._container&&this._container.classList.add(p)},d.prototype.removeClassName=function(p){this._container&&this._container.classList.remove(p)},d.prototype.setOffset=function(p){return this.options.offset=p,this._update(),this},d.prototype.toggleClassName=function(p){if(this._container)return this._container.classList.toggle(p)},d.prototype._createCloseButton=function(){this.options.closeButton&&(this._closeButton=c.create("button","mapboxgl-popup-close-button",this._content),this._closeButton.type="button",this._closeButton.setAttribute("aria-label","Close popup"),this._closeButton.innerHTML="×",this._closeButton.addEventListener("click",this._onClose))},d.prototype._onMouseUp=function(p){this._update(p.point)},d.prototype._onMouseMove=function(p){this._update(p.point)},d.prototype._onDrag=function(p){this._update(p.point)},d.prototype._update=function(p){var y=this;if(this._map&&(this._lngLat||this._trackPointer)&&this._content&&(this._container||(this._container=c.create("div","mapboxgl-popup",this._map.getContainer()),this._tip=c.create("div","mapboxgl-popup-tip",this._container),this._container.appendChild(this._content),this.options.className&&this.options.className.split(" ").forEach(function(st){return y._container.classList.add(st)}),this._trackPointer&&this._container.classList.add("mapboxgl-popup-track-pointer")),this.options.maxWidth&&this._container.style.maxWidth!==this.options.maxWidth&&(this._container.style.maxWidth=this.options.maxWidth),this._map.transform.renderWorldCopies&&!this._trackPointer&&(this._lngLat=Ka(this._lngLat,this._pos,this._map.transform)),!this._trackPointer||p)){var S=this._pos=this._trackPointer&&p?p:this._map.project(this._lngLat),P=this.options.anchor,M=function st(ct){if(ct){if(typeof ct=="number"){var xt=Math.round(Math.sqrt(.5*Math.pow(ct,2)));return{center:new o.Point(0,0),top:new o.Point(0,ct),"top-left":new o.Point(xt,xt),"top-right":new o.Point(-xt,xt),bottom:new o.Point(0,-ct),"bottom-left":new o.Point(xt,-xt),"bottom-right":new o.Point(-xt,-xt),left:new o.Point(ct,0),right:new o.Point(-ct,0)}}if(ct instanceof o.Point||Array.isArray(ct)){var yt=o.Point.convert(ct);return{center:yt,top:yt,"top-left":yt,"top-right":yt,bottom:yt,"bottom-left":yt,"bottom-right":yt,left:yt,right:yt}}return{center:o.Point.convert(ct.center||[0,0]),top:o.Point.convert(ct.top||[0,0]),"top-left":o.Point.convert(ct["top-left"]||[0,0]),"top-right":o.Point.convert(ct["top-right"]||[0,0]),bottom:o.Point.convert(ct.bottom||[0,0]),"bottom-left":o.Point.convert(ct["bottom-left"]||[0,0]),"bottom-right":o.Point.convert(ct["bottom-right"]||[0,0]),left:o.Point.convert(ct.left||[0,0]),right:o.Point.convert(ct.right||[0,0])}}return st(new o.Point(0,0))}(this.options.offset);if(!P){var N,q=this._container.offsetWidth,X=this._container.offsetHeight;N=S.y+M.bottom.y<X?["top"]:S.y>this._map.transform.height-X?["bottom"]:[],S.x<q/2?N.push("left"):S.x>this._map.transform.width-q/2&&N.push("right"),P=N.length===0?"bottom":N.join("-")}var it=S.add(M[P]).round();c.setTransform(this._container,ur[P]+" translate("+it.x+"px,"+it.y+"px)"),Fg(this._container,P,"popup")}},d.prototype._focusFirstElement=function(){if(this.options.focusAfterOpen&&this._container){var p=this._container.querySelector(Id);p&&p.focus()}},d.prototype._onClose=function(){this.remove()},d}(o.Evented),Ku={version:o.version,supported:u,setRTLTextPlugin:o.setRTLTextPlugin,getRTLTextPluginStatus:o.getRTLTextPluginStatus,Map:Rp,NavigationControl:Zs,GeolocateControl:uv,AttributionControl:Pa,ScaleControl:Vf,FullscreenControl:Zu,Popup:cv,Marker:Cd,Style:Ln,LngLat:o.LngLat,LngLatBounds:o.LngLatBounds,Point:o.Point,MercatorCoordinate:o.MercatorCoordinate,Evented:o.Evented,config:o.config,prewarm:function(){re().acquire(Qt)},clearPrewarmedResources:function(){var h=tn;h&&(h.isPreloaded()&&h.numActive()===1?(h.release(Qt),tn=null):console.warn("Could not clear WebWorkers since there are active Map instances that still reference it. The pre-warmed WebWorker pool can only be cleared when all map instances have been removed with map.remove()"))},get accessToken(){return o.config.ACCESS_TOKEN},set accessToken(h){o.config.ACCESS_TOKEN=h},get baseApiUrl(){return o.config.API_URL},set baseApiUrl(h){o.config.API_URL=h},get workerCount(){return me.workerCount},set workerCount(h){me.workerCount=h},get maxParallelImageRequests(){return o.config.MAX_PARALLEL_IMAGE_REQUESTS},set maxParallelImageRequests(h){o.config.MAX_PARALLEL_IMAGE_REQUESTS=h},clearStorage:function(h){o.clearTileCache(h)},workerUrl:""};return Ku}),i})})(gV);var cEt=gV.exports;function u_t(e,t){var n=e.getCenter(),r=e.getZoom(),i=e.getBearing(),a=e.getPitch();t.forEach(function(o){o.jumpTo({center:n,zoom:r,bearing:i,pitch:a})})}function l_t(){var e,t=arguments.length;if(t===1)e=arguments[0];else{e=[];for(var n=0;n<t;n++)e.push(arguments[n])}var r=[];e.forEach(function(u,c){r[c]=o.bind(null,u,e.filter(function(g,_){return _!==c}))});function i(){e.forEach(function(u,c){u.on("move",r[c])})}function a(){e.forEach(function(u,c){u.off("move",r[c])})}function o(u,c){a(),u_t(u,c),i()}return i(),function(){a(),r=[]}}var fEt=l_t,mV={exports:{}},B0=typeof Reflect=="object"?Reflect:null,vV=B0&&typeof B0.apply=="function"?B0.apply:function(t,n,r){return Function.prototype.apply.call(t,n,r)},aI;B0&&typeof B0.ownKeys=="function"?aI=B0.ownKeys:Object.getOwnPropertySymbols?aI=function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:aI=function(t){return Object.getOwnPropertyNames(t)};function c_t(e){console&&console.warn&&console.warn(e)}var yV=Number.isNaN||function(t){return t!==t};function bo(){bo.init.call(this)}mV.exports=bo;mV.exports.once=d_t;bo.EventEmitter=bo;bo.prototype._events=void 0;bo.prototype._eventsCount=0;bo.prototype._maxListeners=void 0;var _V=10;function sI(e){if(typeof e!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}Object.defineProperty(bo,"defaultMaxListeners",{enumerable:!0,get:function(){return _V},set:function(e){if(typeof e!="number"||e<0||yV(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");_V=e}});bo.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0};bo.prototype.setMaxListeners=function(t){if(typeof t!="number"||t<0||yV(t))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+t+".");return this._maxListeners=t,this};function xV(e){return e._maxListeners===void 0?bo.defaultMaxListeners:e._maxListeners}bo.prototype.getMaxListeners=function(){return xV(this)};bo.prototype.emit=function(t){for(var n=[],r=1;r<arguments.length;r++)n.push(arguments[r]);var i=t==="error",a=this._events;if(a!==void 0)i=i&&a.error===void 0;else if(!i)return!1;if(i){var o;if(n.length>0&&(o=n[0]),o instanceof Error)throw o;var u=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw u.context=o,u}var c=a[t];if(c===void 0)return!1;if(typeof c=="function")vV(c,this,n);else for(var g=c.length,_=CV(c,g),r=0;r<g;++r)vV(_[r],this,n);return!0};function bV(e,t,n,r){var i,a,o;if(sI(n),a=e._events,a===void 0?(a=e._events=Object.create(null),e._eventsCount=0):(a.newListener!==void 0&&(e.emit("newListener",t,n.listener?n.listener:n),a=e._events),o=a[t]),o===void 0)o=a[t]=n,++e._eventsCount;else if(typeof o=="function"?o=a[t]=r?[n,o]:[o,n]:r?o.unshift(n):o.push(n),i=xV(e),i>0&&o.length>i&&!o.warned){o.warned=!0;var u=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");u.name="MaxListenersExceededWarning",u.emitter=e,u.type=t,u.count=o.length,c_t(u)}return e}bo.prototype.addListener=function(t,n){return bV(this,t,n,!1)};bo.prototype.on=bo.prototype.addListener;bo.prototype.prependListener=function(t,n){return bV(this,t,n,!0)};function f_t(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function wV(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},i=f_t.bind(r);return i.listener=n,r.wrapFn=i,i}bo.prototype.once=function(t,n){return sI(n),this.on(t,wV(this,t,n)),this};bo.prototype.prependOnceListener=function(t,n){return sI(n),this.prependListener(t,wV(this,t,n)),this};bo.prototype.removeListener=function(t,n){var r,i,a,o,u;if(sI(n),i=this._events,i===void 0)return this;if(r=i[t],r===void 0)return this;if(r===n||r.listener===n)--this._eventsCount==0?this._events=Object.create(null):(delete i[t],i.removeListener&&this.emit("removeListener",t,r.listener||n));else if(typeof r!="function"){for(a=-1,o=r.length-1;o>=0;o--)if(r[o]===n||r[o].listener===n){u=r[o].listener,a=o;break}if(a<0)return this;a===0?r.shift():h_t(r,a),r.length===1&&(i[t]=r[0]),i.removeListener!==void 0&&this.emit("removeListener",t,u||n)}return this};bo.prototype.off=bo.prototype.removeListener;bo.prototype.removeAllListeners=function(t){var n,r,i;if(r=this._events,r===void 0)return this;if(r.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):r[t]!==void 0&&(--this._eventsCount==0?this._events=Object.create(null):delete r[t]),this;if(arguments.length===0){var a=Object.keys(r),o;for(i=0;i<a.length;++i)o=a[i],o!=="removeListener"&&this.removeAllListeners(o);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(n=r[t],typeof n=="function")this.removeListener(t,n);else if(n!==void 0)for(i=n.length-1;i>=0;i--)this.removeListener(t,n[i]);return this};function SV(e,t,n){var r=e._events;if(r===void 0)return[];var i=r[t];return i===void 0?[]:typeof i=="function"?n?[i.listener||i]:[i]:n?p_t(i):CV(i,i.length)}bo.prototype.listeners=function(t){return SV(this,t,!0)};bo.prototype.rawListeners=function(t){return SV(this,t,!1)};bo.listenerCount=function(e,t){return typeof e.listenerCount=="function"?e.listenerCount(t):EV.call(e,t)};bo.prototype.listenerCount=EV;function EV(e){var t=this._events;if(t!==void 0){var n=t[e];if(typeof n=="function")return 1;if(n!==void 0)return n.length}return 0}bo.prototype.eventNames=function(){return this._eventsCount>0?aI(this._events):[]};function CV(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e[r];return n}function h_t(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}function p_t(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}function d_t(e,t){return new Promise(function(n,r){function i(o){e.removeListener(t,a),r(o)}function a(){typeof e.removeListener=="function"&&e.removeListener("error",i),n([].slice.call(arguments))}IV(e,t,a,{once:!0}),t!=="error"&&g_t(e,i,{once:!0})})}function g_t(e,t,n){typeof e.on=="function"&&IV(e,"error",t,n)}function IV(e,t,n,r){if(typeof e.on=="function")r.once?e.once(t,n):e.on(t,n);else if(typeof e.addEventListener=="function")e.addEventListener(t,function i(a){r.once&&e.removeEventListener(t,i),n(a)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e)}var PV={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(Iu,function(){var n=function(L,U){var Q={drag:[],click:[],mousemove:[],mousedown:[],mouseup:[],mouseout:[],keydown:[],keyup:[],touchstart:[],touchmove:[],touchend:[],tap:[]},At={on:function(ot,ft,Ft){if(Q[ot]===void 0)throw new Error("Invalid event type: "+ot);Q[ot].push({selector:ft,fn:Ft})},render:function(ot){U.store.featureChanged(ot)}},tt=function(ot,ft){for(var Ft=Q[ot],zt=Ft.length;zt--;){var ie=Ft[zt];if(ie.selector(ft)){ie.fn.call(At,ft)||U.store.render(),U.ui.updateMapClasses();break}}};return L.start.call(At),{render:L.render,stop:function(){L.stop&&L.stop()},trash:function(){L.trash&&(L.trash(),U.store.render())},combineFeatures:function(){L.combineFeatures&&L.combineFeatures()},uncombineFeatures:function(){L.uncombineFeatures&&L.uncombineFeatures()},drag:function(ot){tt("drag",ot)},click:function(ot){tt("click",ot)},mousemove:function(ot){tt("mousemove",ot)},mousedown:function(ot){tt("mousedown",ot)},mouseup:function(ot){tt("mouseup",ot)},mouseout:function(ot){tt("mouseout",ot)},keydown:function(ot){tt("keydown",ot)},keyup:function(ot){tt("keyup",ot)},touchstart:function(ot){tt("touchstart",ot)},touchmove:function(ot){tt("touchmove",ot)},touchend:function(ot){tt("touchend",ot)},tap:function(ot){tt("tap",ot)}}},r=6378137;function i(L){var U=0;if(L&&L.length>0){U+=Math.abs(a(L[0]));for(var Q=1;Q<L.length;Q++)U-=Math.abs(a(L[Q]))}return U}function a(L){var U,Q,At,tt,ot,ft,Ft=0,zt=L.length;if(zt>2){for(ft=0;ft<zt;ft++)ft===zt-2?(At=zt-2,tt=zt-1,ot=0):ft===zt-1?(At=zt-1,tt=0,ot=1):(At=ft,tt=ft+1,ot=ft+2),U=L[At],Q=L[tt],Ft+=(o(L[ot][0])-o(U[0]))*Math.sin(o(Q[1]));Ft=Ft*r*r/2}return Ft}function o(L){return L*Math.PI/180}var u={geometry:function L(U){var Q,At=0;switch(U.type){case"Polygon":return i(U.coordinates);case"MultiPolygon":for(Q=0;Q<U.coordinates.length;Q++)At+=i(U.coordinates[Q]);return At;case"Point":case"MultiPoint":case"LineString":case"MultiLineString":return 0;case"GeometryCollection":for(Q=0;Q<U.geometries.length;Q++)At+=L(U.geometries[Q]);return At}},ring:a},c="mapboxgl-ctrl",g="mapbox-gl-draw_ctrl-draw-btn",_="mapbox-gl-draw_line",E="mapbox-gl-draw_polygon",C="mapbox-gl-draw_point",O="mapbox-gl-draw_trash",R="mapbox-gl-draw_combine",D="mapbox-gl-draw_uncombine",B="mapboxgl-ctrl-group",z="active",k="mapbox-gl-draw_boxselect",$="mapbox-gl-draw-hot",K="mapbox-gl-draw-cold",et="add",mt="move",wt="drag",Ot="pointer",Bt="none",se={POLYGON:"polygon",LINE:"line_string",POINT:"point"},_e="Feature",Ne="Polygon",He="LineString",de="Point",he="FeatureCollection",Ge="Multi",Yt="MultiPoint",te="MultiLineString",ve="MultiPolygon",Wt={DRAW_LINE_STRING:"draw_line_string",DRAW_POLYGON:"draw_polygon",DRAW_POINT:"draw_point",SIMPLE_SELECT:"simple_select",DIRECT_SELECT:"direct_select",STATIC:"static"},be="draw.create",De="draw.delete",Fn="draw.update",ar="draw.selectionchange",Jn="draw.modechange",Ar="draw.actionable",cr="draw.render",Fi="draw.combine",fr="draw.uncombine",_a="move",Is="change_coordinates",Gi="feature",jn="midpoint",bi="vertex",ni="true",Wi="false",xa=["scrollZoom","boxZoom","dragRotate","dragPan","keyboard","doubleClickZoom","touchZoomRotate"],ba={Point:0,LineString:1,Polygon:2};function ss(L,U){var Q=ba[L.geometry.type]-ba[U.geometry.type];return Q===0&&L.geometry.type===Ne?L.area-U.area:Q}function ri(L){if(this._items={},this._nums={},this._length=L?L.length:0,L)for(var U=0,Q=L.length;U<Q;U++)this.add(L[U]),L[U]!==void 0&&(typeof L[U]=="string"?this._items[L[U]]=U:this._nums[L[U]]=U)}ri.prototype.add=function(L){return this.has(L)||(this._length++,typeof L=="string"?this._items[L]=this._length:this._nums[L]=this._length),this},ri.prototype.delete=function(L){return this.has(L)===!1||(this._length--,delete this._items[L],delete this._nums[L]),this},ri.prototype.has=function(L){return(typeof L=="string"||typeof L=="number")&&(this._items[L]!==void 0||this._nums[L]!==void 0)},ri.prototype.values=function(){var L=this,U=[];return Object.keys(this._items).forEach(function(Q){U.push({k:Q,v:L._items[Q]})}),Object.keys(this._nums).forEach(function(Q){U.push({k:JSON.parse(Q),v:L._nums[Q]})}),U.sort(function(Q,At){return Q.v-At.v}).map(function(Q){return Q.k})},ri.prototype.clear=function(){return this._length=0,this._items={},this._nums={},this};var qo=[Gi,jn,bi],Et={click:function(L,U,Q){return pt(L,U,Q,Q.options.clickBuffer)},touch:function(L,U,Q){return pt(L,U,Q,Q.options.touchBuffer)}};function pt(L,U,Q,At){if(Q.map===null)return[];var tt=L?function(ie,kt){return kt===void 0&&(kt=0),[[ie.point.x-kt,ie.point.y-kt],[ie.point.x+kt,ie.point.y+kt]]}(L,At):U,ot={};Q.options.styles&&(ot.layers=Q.options.styles.map(function(ie){return ie.id}));var ft=Q.map.queryRenderedFeatures(tt,ot).filter(function(ie){return qo.indexOf(ie.properties.meta)!==-1}),Ft=new ri,zt=[];return ft.forEach(function(ie){var kt=ie.properties.id;Ft.has(kt)||(Ft.add(kt),zt.push(ie))}),function(ie){return ie.map(function(kt){return kt.geometry.type===Ne&&(kt.area=u.geometry({type:_e,property:{},geometry:kt.geometry})),kt}).sort(ss).map(function(kt){return delete kt.area,kt})}(zt)}function Ve(L,U){var Q=Et.click(L,null,U),At={mouse:Bt};return Q[0]&&(At.mouse=Q[0].properties.active===ni?mt:Ot,At.feature=Q[0].properties.meta),U.events.currentModeName().indexOf("draw")!==-1&&(At.mouse=et),U.ui.queueMapClasses(At),U.ui.updateMapClasses(),Q[0]}function We(L,U){var Q=L.x-U.x,At=L.y-U.y;return Math.sqrt(Q*Q+At*At)}function Xn(L,U,Q){Q===void 0&&(Q={});var At=Q.fineTolerance!=null?Q.fineTolerance:4,tt=Q.grossTolerance!=null?Q.grossTolerance:12,ot=Q.interval!=null?Q.interval:500;L.point=L.point||U.point,L.time=L.time||U.time;var ft=We(L.point,U.point);return ft<At||ft<tt&&U.time-L.time<ot}function Br(L,U,Q){Q===void 0&&(Q={});var At=Q.tolerance!=null?Q.tolerance:25,tt=Q.interval!=null?Q.interval:250;return L.point=L.point||U.point,L.time=L.time||U.time,We(L.point,U.point)<At&&U.time-L.time<tt}function sr(L,U){return L(U={exports:{}},U.exports),U.exports}var Ai=sr(function(L){var U=L.exports=function(Q,At){if(At||(At=16),Q===void 0&&(Q=128),Q<=0)return"0";for(var tt=Math.log(Math.pow(2,Q))/Math.log(At),ot=2;tt===1/0;ot*=2)tt=Math.log(Math.pow(2,Q/ot))/Math.log(At)*ot;var ft=tt-Math.floor(tt),Ft="";for(ot=0;ot<Math.floor(tt);ot++)Ft=Math.floor(Math.random()*At).toString(At)+Ft;if(ft){var zt=Math.pow(At,ft);Ft=Math.floor(Math.random()*zt).toString(At)+Ft}var ie=parseInt(Ft,At);return ie!==1/0&&ie>=Math.pow(2,Q)?U(Q,At):Ft};U.rack=function(Q,At,tt){var ot=function(Ft){var zt=0;do{if(zt++>10){if(!tt)throw new Error("too many ID collisions, use more bits");Q+=tt}var ie=U(Q,At)}while(Object.hasOwnProperty.call(ft,ie));return ft[ie]=Ft,ie},ft=ot.hats={};return ot.get=function(Ft){return ot.hats[Ft]},ot.set=function(Ft,zt){return ot.hats[Ft]=zt,ot},ot.bits=Q||128,ot.base=At||16,ot}}),Un=function(L,U){this.ctx=L,this.properties=U.properties||{},this.coordinates=U.geometry.coordinates,this.id=U.id||Ai(),this.type=U.geometry.type};Un.prototype.changed=function(){this.ctx.store.featureChanged(this.id)},Un.prototype.incomingCoords=function(L){this.setCoordinates(L)},Un.prototype.setCoordinates=function(L){this.coordinates=L,this.changed()},Un.prototype.getCoordinates=function(){return JSON.parse(JSON.stringify(this.coordinates))},Un.prototype.setProperty=function(L,U){this.properties[L]=U},Un.prototype.toGeoJSON=function(){return JSON.parse(JSON.stringify({id:this.id,type:_e,properties:this.properties,geometry:{coordinates:this.getCoordinates(),type:this.type}}))},Un.prototype.internal=function(L){var U={id:this.id,meta:Gi,"meta:type":this.type,active:Wi,mode:L};if(this.ctx.options.userProperties)for(var Q in this.properties)U["user_"+Q]=this.properties[Q];return{type:_e,properties:U,geometry:{coordinates:this.getCoordinates(),type:this.type}}};var no=function(L,U){Un.call(this,L,U)};(no.prototype=Object.create(Un.prototype)).isValid=function(){return typeof this.coordinates[0]=="number"&&typeof this.coordinates[1]=="number"},no.prototype.updateCoordinate=function(L,U,Q){this.coordinates=arguments.length===3?[U,Q]:[L,U],this.changed()},no.prototype.getCoordinate=function(){return this.getCoordinates()};var To=function(L,U){Un.call(this,L,U)};(To.prototype=Object.create(Un.prototype)).isValid=function(){return this.coordinates.length>1},To.prototype.addCoordinate=function(L,U,Q){this.changed();var At=parseInt(L,10);this.coordinates.splice(At,0,[U,Q])},To.prototype.getCoordinate=function(L){var U=parseInt(L,10);return JSON.parse(JSON.stringify(this.coordinates[U]))},To.prototype.removeCoordinate=function(L){this.changed(),this.coordinates.splice(parseInt(L,10),1)},To.prototype.updateCoordinate=function(L,U,Q){var At=parseInt(L,10);this.coordinates[At]=[U,Q],this.changed()};var zi=function(L,U){Un.call(this,L,U),this.coordinates=this.coordinates.map(function(Q){return Q.slice(0,-1)})};(zi.prototype=Object.create(Un.prototype)).isValid=function(){return this.coordinates.length!==0&&this.coordinates.every(function(L){return L.length>2})},zi.prototype.incomingCoords=function(L){this.coordinates=L.map(function(U){return U.slice(0,-1)}),this.changed()},zi.prototype.setCoordinates=function(L){this.coordinates=L,this.changed()},zi.prototype.addCoordinate=function(L,U,Q){this.changed();var At=L.split(".").map(function(tt){return parseInt(tt,10)});this.coordinates[At[0]].splice(At[1],0,[U,Q])},zi.prototype.removeCoordinate=function(L){this.changed();var U=L.split(".").map(function(At){return parseInt(At,10)}),Q=this.coordinates[U[0]];Q&&(Q.splice(U[1],1),Q.length<3&&this.coordinates.splice(U[0],1))},zi.prototype.getCoordinate=function(L){var U=L.split(".").map(function(At){return parseInt(At,10)}),Q=this.coordinates[U[0]];return JSON.parse(JSON.stringify(Q[U[1]]))},zi.prototype.getCoordinates=function(){return this.coordinates.map(function(L){return L.concat([L[0]])})},zi.prototype.updateCoordinate=function(L,U,Q){this.changed();var At=L.split("."),tt=parseInt(At[0],10),ot=parseInt(At[1],10);this.coordinates[tt]===void 0&&(this.coordinates[tt]=[]),this.coordinates[tt][ot]=[U,Q]};var ii={MultiPoint:no,MultiLineString:To,MultiPolygon:zi},Go=function(L,U,Q,At,tt){var ot=Q.split("."),ft=parseInt(ot[0],10),Ft=ot[1]?ot.slice(1).join("."):null;return L[ft][U](Ft,At,tt)},yr=function(L,U){if(Un.call(this,L,U),delete this.coordinates,this.model=ii[U.geometry.type],this.model===void 0)throw new TypeError(U.geometry.type+" is not a valid type");this.features=this._coordinatesToFeatures(U.geometry.coordinates)};function Rn(L){this.map=L.map,this.drawConfig=JSON.parse(JSON.stringify(L.options||{})),this._ctx=L}(yr.prototype=Object.create(Un.prototype))._coordinatesToFeatures=function(L){var U=this,Q=this.model.bind(this);return L.map(function(At){return new Q(U.ctx,{id:Ai(),type:_e,properties:{},geometry:{coordinates:At,type:U.type.replace("Multi","")}})})},yr.prototype.isValid=function(){return this.features.every(function(L){return L.isValid()})},yr.prototype.setCoordinates=function(L){this.features=this._coordinatesToFeatures(L),this.changed()},yr.prototype.getCoordinate=function(L){return Go(this.features,"getCoordinate",L)},yr.prototype.getCoordinates=function(){return JSON.parse(JSON.stringify(this.features.map(function(L){return L.type===Ne?L.getCoordinates():L.coordinates})))},yr.prototype.updateCoordinate=function(L,U,Q){Go(this.features,"updateCoordinate",L,U,Q),this.changed()},yr.prototype.addCoordinate=function(L,U,Q){Go(this.features,"addCoordinate",L,U,Q),this.changed()},yr.prototype.removeCoordinate=function(L){Go(this.features,"removeCoordinate",L),this.changed()},yr.prototype.getFeatures=function(){return this.features},Rn.prototype.setSelected=function(L){return this._ctx.store.setSelected(L)},Rn.prototype.setSelectedCoordinates=function(L){var U=this;this._ctx.store.setSelectedCoordinates(L),L.reduce(function(Q,At){return Q[At.feature_id]===void 0&&(Q[At.feature_id]=!0,U._ctx.store.get(At.feature_id).changed()),Q},{})},Rn.prototype.getSelected=function(){return this._ctx.store.getSelected()},Rn.prototype.getSelectedIds=function(){return this._ctx.store.getSelectedIds()},Rn.prototype.isSelected=function(L){return this._ctx.store.isSelected(L)},Rn.prototype.getFeature=function(L){return this._ctx.store.get(L)},Rn.prototype.select=function(L){return this._ctx.store.select(L)},Rn.prototype.deselect=function(L){return this._ctx.store.deselect(L)},Rn.prototype.deleteFeature=function(L,U){return U===void 0&&(U={}),this._ctx.store.delete(L,U)},Rn.prototype.addFeature=function(L){return this._ctx.store.add(L)},Rn.prototype.clearSelectedFeatures=function(){return this._ctx.store.clearSelected()},Rn.prototype.clearSelectedCoordinates=function(){return this._ctx.store.clearSelectedCoordinates()},Rn.prototype.setActionableState=function(L){L===void 0&&(L={});var U={trash:L.trash||!1,combineFeatures:L.combineFeatures||!1,uncombineFeatures:L.uncombineFeatures||!1};return this._ctx.events.actionable(U)},Rn.prototype.changeMode=function(L,U,Q){return U===void 0&&(U={}),Q===void 0&&(Q={}),this._ctx.events.changeMode(L,U,Q)},Rn.prototype.updateUIClasses=function(L){return this._ctx.ui.queueMapClasses(L)},Rn.prototype.activateUIButton=function(L){return this._ctx.ui.setActiveButton(L)},Rn.prototype.featuresAt=function(L,U,Q){if(Q===void 0&&(Q="click"),Q!=="click"&&Q!=="touch")throw new Error("invalid buffer type");return Et[Q](L,U,this._ctx)},Rn.prototype.newFeature=function(L){var U=L.geometry.type;return U===de?new no(this._ctx,L):U===He?new To(this._ctx,L):U===Ne?new zi(this._ctx,L):new yr(this._ctx,L)},Rn.prototype.isInstanceOf=function(L,U){if(L===de)return U instanceof no;if(L===He)return U instanceof To;if(L===Ne)return U instanceof zi;if(L==="MultiFeature")return U instanceof yr;throw new Error("Unknown feature class: "+L)},Rn.prototype.doRender=function(L){return this._ctx.store.featureChanged(L)},Rn.prototype.onSetup=function(){},Rn.prototype.onDrag=function(){},Rn.prototype.onClick=function(){},Rn.prototype.onMouseMove=function(){},Rn.prototype.onMouseDown=function(){},Rn.prototype.onMouseUp=function(){},Rn.prototype.onMouseOut=function(){},Rn.prototype.onKeyUp=function(){},Rn.prototype.onKeyDown=function(){},Rn.prototype.onTouchStart=function(){},Rn.prototype.onTouchMove=function(){},Rn.prototype.onTouchEnd=function(){},Rn.prototype.onTap=function(){},Rn.prototype.onStop=function(){},Rn.prototype.onTrash=function(){},Rn.prototype.onCombineFeature=function(){},Rn.prototype.onUncombineFeature=function(){},Rn.prototype.toDisplayFeatures=function(){throw new Error("You must overwrite toDisplayFeatures")};var yl={drag:"onDrag",click:"onClick",mousemove:"onMouseMove",mousedown:"onMouseDown",mouseup:"onMouseUp",mouseout:"onMouseOut",keyup:"onKeyUp",keydown:"onKeyDown",touchstart:"onTouchStart",touchmove:"onTouchMove",touchend:"onTouchEnd",tap:"onTap"},us=Object.keys(yl);function Vs(L){var U=Object.keys(L);return function(Q,At){At===void 0&&(At={});var tt={},ot=U.reduce(function(ft,Ft){return ft[Ft]=L[Ft],ft},new Rn(Q));return{start:function(){var ft=this;tt=ot.onSetup(At),us.forEach(function(Ft){var zt,ie=yl[Ft],kt=function(){return!1};L[ie]&&(kt=function(){return!0}),ft.on(Ft,kt,(zt=ie,function(Ie){return ot[zt](tt,Ie)}))})},stop:function(){ot.onStop(tt)},trash:function(){ot.onTrash(tt)},combineFeatures:function(){ot.onCombineFeatures(tt)},uncombineFeatures:function(){ot.onUncombineFeatures(tt)},render:function(ft,Ft){ot.toDisplayFeatures(tt,ft,Ft)}}}}function Mo(L){return[].concat(L).filter(function(U){return U!==void 0})}function qa(){var L=this;if(!(L.ctx.map&&L.ctx.map.getSource($)!==void 0))return zt();var U=L.ctx.events.currentModeName();L.ctx.ui.queueMapClasses({mode:U});var Q=[],At=[];L.isDirty?At=L.getAllIds():(Q=L.getChangedIds().filter(function(ie){return L.get(ie)!==void 0}),At=L.sources.hot.filter(function(ie){return ie.properties.id&&Q.indexOf(ie.properties.id)===-1&&L.get(ie.properties.id)!==void 0}).map(function(ie){return ie.properties.id})),L.sources.hot=[];var tt=L.sources.cold.length;L.sources.cold=L.isDirty?[]:L.sources.cold.filter(function(ie){var kt=ie.properties.id||ie.properties.parent;return Q.indexOf(kt)===-1});var ot=tt!==L.sources.cold.length||At.length>0;function ft(ie,kt){var Ie=L.get(ie).internal(U);L.ctx.events.currentModeRender(Ie,function(Pe){L.sources[kt].push(Pe)})}if(Q.forEach(function(ie){return ft(ie,"hot")}),At.forEach(function(ie){return ft(ie,"cold")}),ot&&L.ctx.map.getSource(K).setData({type:he,features:L.sources.cold}),L.ctx.map.getSource($).setData({type:he,features:L.sources.hot}),L._emitSelectionChange&&(L.ctx.map.fire(ar,{features:L.getSelected().map(function(ie){return ie.toGeoJSON()}),points:L.getSelectedCoordinates().map(function(ie){return{type:_e,properties:{},geometry:{type:de,coordinates:ie.coordinates}}})}),L._emitSelectionChange=!1),L._deletedFeaturesToEmit.length){var Ft=L._deletedFeaturesToEmit.map(function(ie){return ie.toGeoJSON()});L._deletedFeaturesToEmit=[],L.ctx.map.fire(De,{features:Ft})}function zt(){L.isDirty=!1,L.clearChangedIds()}zt(),L.ctx.map.fire(cr,{})}function Ur(L){var U,Q=this;this._features={},this._featureIds=new ri,this._selectedFeatureIds=new ri,this._selectedCoordinates=[],this._changedFeatureIds=new ri,this._deletedFeaturesToEmit=[],this._emitSelectionChange=!1,this._mapInitialConfig={},this.ctx=L,this.sources={hot:[],cold:[]},this.render=function(){U||(U=requestAnimationFrame(function(){U=null,qa.call(Q)}))},this.isDirty=!1}function Yl(L,U){var Q=L._selectedCoordinates.filter(function(At){return L._selectedFeatureIds.has(At.feature_id)});L._selectedCoordinates.length===Q.length||U.silent||(L._emitSelectionChange=!0),L._selectedCoordinates=Q}Ur.prototype.createRenderBatch=function(){var L=this,U=this.render,Q=0;return this.render=function(){Q++},function(){L.render=U,Q>0&&L.render()}},Ur.prototype.setDirty=function(){return this.isDirty=!0,this},Ur.prototype.featureChanged=function(L){return this._changedFeatureIds.add(L),this},Ur.prototype.getChangedIds=function(){return this._changedFeatureIds.values()},Ur.prototype.clearChangedIds=function(){return this._changedFeatureIds.clear(),this},Ur.prototype.getAllIds=function(){return this._featureIds.values()},Ur.prototype.add=function(L){return this.featureChanged(L.id),this._features[L.id]=L,this._featureIds.add(L.id),this},Ur.prototype.delete=function(L,U){var Q=this;return U===void 0&&(U={}),Mo(L).forEach(function(At){Q._featureIds.has(At)&&(Q._featureIds.delete(At),Q._selectedFeatureIds.delete(At),U.silent||Q._deletedFeaturesToEmit.indexOf(Q._features[At])===-1&&Q._deletedFeaturesToEmit.push(Q._features[At]),delete Q._features[At],Q.isDirty=!0)}),Yl(this,U),this},Ur.prototype.get=function(L){return this._features[L]},Ur.prototype.getAll=function(){var L=this;return Object.keys(this._features).map(function(U){return L._features[U]})},Ur.prototype.select=function(L,U){var Q=this;return U===void 0&&(U={}),Mo(L).forEach(function(At){Q._selectedFeatureIds.has(At)||(Q._selectedFeatureIds.add(At),Q._changedFeatureIds.add(At),U.silent||(Q._emitSelectionChange=!0))}),this},Ur.prototype.deselect=function(L,U){var Q=this;return U===void 0&&(U={}),Mo(L).forEach(function(At){Q._selectedFeatureIds.has(At)&&(Q._selectedFeatureIds.delete(At),Q._changedFeatureIds.add(At),U.silent||(Q._emitSelectionChange=!0))}),Yl(this,U),this},Ur.prototype.clearSelected=function(L){return L===void 0&&(L={}),this.deselect(this._selectedFeatureIds.values(),{silent:L.silent}),this},Ur.prototype.setSelected=function(L,U){var Q=this;return U===void 0&&(U={}),L=Mo(L),this.deselect(this._selectedFeatureIds.values().filter(function(At){return L.indexOf(At)===-1}),{silent:U.silent}),this.select(L.filter(function(At){return!Q._selectedFeatureIds.has(At)}),{silent:U.silent}),this},Ur.prototype.setSelectedCoordinates=function(L){return this._selectedCoordinates=L,this._emitSelectionChange=!0,this},Ur.prototype.clearSelectedCoordinates=function(){return this._selectedCoordinates=[],this._emitSelectionChange=!0,this},Ur.prototype.getSelectedIds=function(){return this._selectedFeatureIds.values()},Ur.prototype.getSelected=function(){var L=this;return this._selectedFeatureIds.values().map(function(U){return L.get(U)})},Ur.prototype.getSelectedCoordinates=function(){var L=this;return this._selectedCoordinates.map(function(U){return{coordinates:L.get(U.feature_id).getCoordinate(U.coord_path)}})},Ur.prototype.isSelected=function(L){return this._selectedFeatureIds.has(L)},Ur.prototype.setFeatureProperty=function(L,U,Q){this.get(L).setProperty(U,Q),this.featureChanged(L)},Ur.prototype.storeMapConfig=function(){var L=this;xa.forEach(function(U){L.ctx.map[U]&&(L._mapInitialConfig[U]=L.ctx.map[U].isEnabled())})},Ur.prototype.restoreMapConfig=function(){var L=this;Object.keys(this._mapInitialConfig).forEach(function(U){L._mapInitialConfig[U]?L.ctx.map[U].enable():L.ctx.map[U].disable()})},Ur.prototype.getInitialConfigValue=function(L){return this._mapInitialConfig[L]===void 0||this._mapInitialConfig[L]};var Vr=function(){for(var L=arguments,U={},Q=0;Q<arguments.length;Q++){var At=L[Q];for(var tt in At)W.call(At,tt)&&(U[tt]=At[tt])}return U},W=Object.prototype.hasOwnProperty,Y=["mode","feature","mouse"];function nt(L){var U=null,Q=null,At={onRemove:function(){return L.map.off("load",At.connect),clearInterval(Q),At.removeLayers(),L.store.restoreMapConfig(),L.ui.removeButtons(),L.events.removeEventListeners(),L.ui.clearMapClasses(),L.map=null,L.container=null,L.store=null,U&&U.parentNode&&U.parentNode.removeChild(U),U=null,this},connect:function(){L.map.off("load",At.connect),clearInterval(Q),At.addLayers(),L.store.storeMapConfig(),L.events.addEventListeners()},onAdd:function(tt){var ot=tt.fire;return tt.fire=function(ft,Ft){var zt=arguments;return ot.length===1&&arguments.length!==1&&(zt=[Vr({},{type:ft},Ft)]),ot.apply(tt,zt)},L.map=tt,L.events=function(ft){var Ft=Object.keys(ft.options.modes).reduce(function(le,Ue){return le[Ue]=Vs(ft.options.modes[Ue]),le},{}),zt={},ie={},kt={},Ie=null,Pe=null;kt.drag=function(le,Ue){Ue({point:le.point,time:new Date().getTime()})?(ft.ui.queueMapClasses({mouse:wt}),Pe.drag(le)):le.originalEvent.stopPropagation()},kt.mousedrag=function(le){kt.drag(le,function(Ue){return!Xn(zt,Ue)})},kt.touchdrag=function(le){kt.drag(le,function(Ue){return!Br(ie,Ue)})},kt.mousemove=function(le){if((le.originalEvent.buttons!==void 0?le.originalEvent.buttons:le.originalEvent.which)===1)return kt.mousedrag(le);var Ue=Ve(le,ft);le.featureTarget=Ue,Pe.mousemove(le)},kt.mousedown=function(le){zt={time:new Date().getTime(),point:le.point};var Ue=Ve(le,ft);le.featureTarget=Ue,Pe.mousedown(le)},kt.mouseup=function(le){var Ue=Ve(le,ft);le.featureTarget=Ue,Xn(zt,{point:le.point,time:new Date().getTime()})?Pe.click(le):Pe.mouseup(le)},kt.mouseout=function(le){Pe.mouseout(le)},kt.touchstart=function(le){if(le.originalEvent.preventDefault(),ft.options.touchEnabled){ie={time:new Date().getTime(),point:le.point};var Ue=Et.touch(le,null,ft)[0];le.featureTarget=Ue,Pe.touchstart(le)}},kt.touchmove=function(le){if(le.originalEvent.preventDefault(),ft.options.touchEnabled)return Pe.touchmove(le),kt.touchdrag(le)},kt.touchend=function(le){if(le.originalEvent.preventDefault(),ft.options.touchEnabled){var Ue=Et.touch(le,null,ft)[0];le.featureTarget=Ue,Br(ie,{time:new Date().getTime(),point:le.point})?Pe.tap(le):Pe.touchend(le)}};var Xe=function(le){return!(le===8||le===46||le>=48&&le<=57)};function en(le,Ue,_r){_r===void 0&&(_r={}),Pe.stop();var Yn=Ft[le];if(Yn===void 0)throw new Error(le+" is not valid");Ie=le;var $r=Yn(ft,Ue);Pe=n($r,ft),_r.silent||ft.map.fire(Jn,{mode:le}),ft.store.setDirty(),ft.store.render()}kt.keydown=function(le){(le.srcElement||le.target).classList[0]==="mapboxgl-canvas"&&(le.keyCode!==8&&le.keyCode!==46||!ft.options.controls.trash?Xe(le.keyCode)?Pe.keydown(le):le.keyCode===49&&ft.options.controls.point?en(Wt.DRAW_POINT):le.keyCode===50&&ft.options.controls.line_string?en(Wt.DRAW_LINE_STRING):le.keyCode===51&&ft.options.controls.polygon&&en(Wt.DRAW_POLYGON):(le.preventDefault(),Pe.trash()))},kt.keyup=function(le){Xe(le.keyCode)&&Pe.keyup(le)},kt.zoomend=function(){ft.store.changeZoom()},kt.data=function(le){if(le.dataType==="style"){var Ue=ft.setup,_r=ft.map,Yn=ft.options,$r=ft.store;Yn.styles.some(function(fn){return _r.getLayer(fn.id)})||(Ue.addLayers(),$r.setDirty(),$r.render())}};var dr={trash:!1,combineFeatures:!1,uncombineFeatures:!1};return{start:function(){Ie=ft.options.defaultMode,Pe=n(Ft[Ie](ft),ft)},changeMode:en,actionable:function(le){var Ue=!1;Object.keys(le).forEach(function(_r){if(dr[_r]===void 0)throw new Error("Invalid action type");dr[_r]!==le[_r]&&(Ue=!0),dr[_r]=le[_r]}),Ue&&ft.map.fire(Ar,{actions:dr})},currentModeName:function(){return Ie},currentModeRender:function(le,Ue){return Pe.render(le,Ue)},fire:function(le,Ue){kt[le]&&kt[le](Ue)},addEventListeners:function(){ft.map.on("mousemove",kt.mousemove),ft.map.on("mousedown",kt.mousedown),ft.map.on("mouseup",kt.mouseup),ft.map.on("data",kt.data),ft.map.on("touchmove",kt.touchmove),ft.map.on("touchstart",kt.touchstart),ft.map.on("touchend",kt.touchend),ft.container.addEventListener("mouseout",kt.mouseout),ft.options.keybindings&&(ft.container.addEventListener("keydown",kt.keydown),ft.container.addEventListener("keyup",kt.keyup))},removeEventListeners:function(){ft.map.off("mousemove",kt.mousemove),ft.map.off("mousedown",kt.mousedown),ft.map.off("mouseup",kt.mouseup),ft.map.off("data",kt.data),ft.map.off("touchmove",kt.touchmove),ft.map.off("touchstart",kt.touchstart),ft.map.off("touchend",kt.touchend),ft.container.removeEventListener("mouseout",kt.mouseout),ft.options.keybindings&&(ft.container.removeEventListener("keydown",kt.keydown),ft.container.removeEventListener("keyup",kt.keyup))},trash:function(le){Pe.trash(le)},combineFeatures:function(){Pe.combineFeatures()},uncombineFeatures:function(){Pe.uncombineFeatures()},getMode:function(){return Ie}}}(L),L.ui=function(ft){var Ft={},zt=null,ie={mode:null,feature:null,mouse:null},kt={mode:null,feature:null,mouse:null};function Ie(le){kt=Vr(kt,le)}function Pe(){var le,Ue;if(ft.container){var _r=[],Yn=[];Y.forEach(function($r){kt[$r]!==ie[$r]&&(_r.push($r+"-"+ie[$r]),kt[$r]!==null&&Yn.push($r+"-"+kt[$r]))}),_r.length>0&&(le=ft.container.classList).remove.apply(le,_r),Yn.length>0&&(Ue=ft.container.classList).add.apply(Ue,Yn),ie=Vr(ie,kt)}}function Xe(le,Ue){Ue===void 0&&(Ue={});var _r=document.createElement("button");return _r.className=g+" "+Ue.className,_r.setAttribute("title",Ue.title),Ue.container.appendChild(_r),_r.addEventListener("click",function(Yn){if(Yn.preventDefault(),Yn.stopPropagation(),Yn.target===zt)return en(),void Ue.onDeactivate();dr(le),Ue.onActivate()},!0),_r}function en(){zt&&(zt.classList.remove(z),zt=null)}function dr(le){en();var Ue=Ft[le];Ue&&Ue&&le!=="trash"&&(Ue.classList.add(z),zt=Ue)}return{setActiveButton:dr,queueMapClasses:Ie,updateMapClasses:Pe,clearMapClasses:function(){Ie({mode:null,feature:null,mouse:null}),Pe()},addButtons:function(){var le=ft.options.controls,Ue=document.createElement("div");return Ue.className=B+" "+c,le&&(le[se.LINE]&&(Ft[se.LINE]=Xe(se.LINE,{container:Ue,className:_,title:"LineString tool "+(ft.options.keybindings?"(l)":""),onActivate:function(){return ft.events.changeMode(Wt.DRAW_LINE_STRING)},onDeactivate:function(){return ft.events.trash()}})),le[se.POLYGON]&&(Ft[se.POLYGON]=Xe(se.POLYGON,{container:Ue,className:E,title:"Polygon tool "+(ft.options.keybindings?"(p)":""),onActivate:function(){return ft.events.changeMode(Wt.DRAW_POLYGON)},onDeactivate:function(){return ft.events.trash()}})),le[se.POINT]&&(Ft[se.POINT]=Xe(se.POINT,{container:Ue,className:C,title:"Marker tool "+(ft.options.keybindings?"(m)":""),onActivate:function(){return ft.events.changeMode(Wt.DRAW_POINT)},onDeactivate:function(){return ft.events.trash()}})),le.trash&&(Ft.trash=Xe("trash",{container:Ue,className:O,title:"Delete",onActivate:function(){ft.events.trash()}})),le.combine_features&&(Ft.combine_features=Xe("combineFeatures",{container:Ue,className:R,title:"Combine",onActivate:function(){ft.events.combineFeatures()}})),le.uncombine_features&&(Ft.uncombine_features=Xe("uncombineFeatures",{container:Ue,className:D,title:"Uncombine",onActivate:function(){ft.events.uncombineFeatures()}}))),Ue},removeButtons:function(){Object.keys(Ft).forEach(function(le){var Ue=Ft[le];Ue.parentNode&&Ue.parentNode.removeChild(Ue),delete Ft[le]})}}}(L),L.container=tt.getContainer(),L.store=new Ur(L),U=L.ui.addButtons(),L.options.boxSelect&&(tt.boxZoom.disable(),tt.dragPan.disable(),tt.dragPan.enable()),tt.loaded()?At.connect():(tt.on("load",At.connect),Q=setInterval(function(){tt.loaded()&&At.connect()},16)),L.events.start(),U},addLayers:function(){L.map.addSource(K,{data:{type:he,features:[]},type:"geojson"}),L.map.addSource($,{data:{type:he,features:[]},type:"geojson"}),L.options.styles.forEach(function(tt){L.map.addLayer(tt)}),L.store.setDirty(!0),L.store.render()},removeLayers:function(){L.options.styles.forEach(function(tt){L.map.getLayer(tt.id)&&L.map.removeLayer(tt.id)}),L.map.getSource(K)&&L.map.removeSource(K),L.map.getSource($)&&L.map.removeSource($)}};return L.setup=At,At}function lt(L){return function(U){var Q=U.featureTarget;return!!Q&&!!Q.properties&&Q.properties.meta===L}}function vt(L){return!!L.featureTarget&&!!L.featureTarget.properties&&L.featureTarget.properties.active===ni&&L.featureTarget.properties.meta===Gi}function Mt(L){return!!L.featureTarget&&!!L.featureTarget.properties&&L.featureTarget.properties.active===Wi&&L.featureTarget.properties.meta===Gi}function Rt(L){return L.featureTarget===void 0}function at(L){var U=L.featureTarget;return!!U&&!!U.properties&&U.properties.meta===bi}function bt(L){return!!L.originalEvent&&L.originalEvent.shiftKey===!0}function Vt(L){return L.keyCode===27}function pe(L){return L.keyCode===13}var ye=Qt;function Qt(L,U){this.x=L,this.y=U}function me(L,U){var Q=U.getBoundingClientRect();return new ye(L.clientX-Q.left-(U.clientLeft||0),L.clientY-Q.top-(U.clientTop||0))}function tn(L,U,Q,At){return{type:_e,properties:{meta:bi,parent:L,coord_path:Q,active:At?ni:Wi},geometry:{type:de,coordinates:U}}}function Je(L,U,Q){U===void 0&&(U={}),Q===void 0&&(Q=null);var At,tt=L.geometry,ot=tt.type,ft=tt.coordinates,Ft=L.properties&&L.properties.id,zt=[];function ie(Ie,Pe){var Xe="",en=null;Ie.forEach(function(dr,le){var Ue=Pe!=null?Pe+"."+le:String(le),_r=tn(Ft,dr,Ue,kt(Ue));if(U.midpoints&&en){var Yn=function(fn,Ea,Wo){var er=Ea.geometry.coordinates,gr=Wo.geometry.coordinates;if(er[1]>85||er[1]<-85||gr[1]>85||gr[1]<-85)return null;var Ln={lng:(er[0]+gr[0])/2,lat:(er[1]+gr[1])/2};return{type:_e,properties:{meta:jn,parent:fn,lng:Ln.lng,lat:Ln.lat,coord_path:Wo.properties.coord_path},geometry:{type:de,coordinates:[Ln.lng,Ln.lat]}}}(Ft,en,_r);Yn&&zt.push(Yn)}en=_r;var $r=JSON.stringify(dr);Xe!==$r&&zt.push(_r),le===0&&(Xe=$r)})}function kt(Ie){return!!U.selectedPaths&&U.selectedPaths.indexOf(Ie)!==-1}return ot===de?zt.push(tn(Ft,ft,Q,kt(Q))):ot===Ne?ft.forEach(function(Ie,Pe){ie(Ie,Q!==null?Q+"."+Pe:String(Pe))}):ot===He?ie(ft,Q):ot.indexOf(Ge)===0&&(At=ot.replace(Ge,""),ft.forEach(function(Ie,Pe){var Xe={type:_e,properties:L.properties,geometry:{type:At,coordinates:Ie}};zt=zt.concat(Je(Xe,U,Pe))})),zt}Qt.prototype={clone:function(){return new Qt(this.x,this.y)},add:function(L){return this.clone()._add(L)},sub:function(L){return this.clone()._sub(L)},multByPoint:function(L){return this.clone()._multByPoint(L)},divByPoint:function(L){return this.clone()._divByPoint(L)},mult:function(L){return this.clone()._mult(L)},div:function(L){return this.clone()._div(L)},rotate:function(L){return this.clone()._rotate(L)},rotateAround:function(L,U){return this.clone()._rotateAround(L,U)},matMult:function(L){return this.clone()._matMult(L)},unit:function(){return this.clone()._unit()},perp:function(){return this.clone()._perp()},round:function(){return this.clone()._round()},mag:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},equals:function(L){return this.x===L.x&&this.y===L.y},dist:function(L){return Math.sqrt(this.distSqr(L))},distSqr:function(L){var U=L.x-this.x,Q=L.y-this.y;return U*U+Q*Q},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(L){return Math.atan2(this.y-L.y,this.x-L.x)},angleWith:function(L){return this.angleWithSep(L.x,L.y)},angleWithSep:function(L,U){return Math.atan2(this.x*U-this.y*L,this.x*L+this.y*U)},_matMult:function(L){var U=L[0]*this.x+L[1]*this.y,Q=L[2]*this.x+L[3]*this.y;return this.x=U,this.y=Q,this},_add:function(L){return this.x+=L.x,this.y+=L.y,this},_sub:function(L){return this.x-=L.x,this.y-=L.y,this},_mult:function(L){return this.x*=L,this.y*=L,this},_div:function(L){return this.x/=L,this.y/=L,this},_multByPoint:function(L){return this.x*=L.x,this.y*=L.y,this},_divByPoint:function(L){return this.x/=L.x,this.y/=L.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var L=this.y;return this.y=this.x,this.x=-L,this},_rotate:function(L){var U=Math.cos(L),Q=Math.sin(L),At=U*this.x-Q*this.y,tt=Q*this.x+U*this.y;return this.x=At,this.y=tt,this},_rotateAround:function(L,U){var Q=Math.cos(L),At=Math.sin(L),tt=U.x+Q*(this.x-U.x)-At*(this.y-U.y),ot=U.y+At*(this.x-U.x)+Q*(this.y-U.y);return this.x=tt,this.y=ot,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},Qt.convert=function(L){return L instanceof Qt?L:Array.isArray(L)?new Qt(L[0],L[1]):L};var re=function(L){setTimeout(function(){L.map&&L.map.doubleClickZoom&&L._ctx&&L._ctx.store&&L._ctx.store.getInitialConfigValue&&L._ctx.store.getInitialConfigValue("doubleClickZoom")&&L.map.doubleClickZoom.enable()},0)},ze=function(L){setTimeout(function(){L.map&&L.map.doubleClickZoom&&L.map.doubleClickZoom.disable()},0)},Me=function(L){if(!L||!L.type)return null;var U=Re[L.type];if(!U)return null;if(U==="geometry")return{type:"FeatureCollection",features:[{type:"Feature",properties:{},geometry:L}]};if(U==="feature")return{type:"FeatureCollection",features:[L]};if(U==="featurecollection")return L},Re={Point:"geometry",MultiPoint:"geometry",LineString:"geometry",MultiLineString:"geometry",Polygon:"geometry",MultiPolygon:"geometry",GeometryCollection:"geometry",Feature:"feature",FeatureCollection:"featurecollection"};function Mn(L){switch(L&&L.type||null){case"FeatureCollection":return L.features=L.features.reduce(function(U,Q){return U.concat(Mn(Q))},[]),L;case"Feature":return L.geometry?Mn(L.geometry).map(function(U){var Q={type:"Feature",properties:JSON.parse(JSON.stringify(L.properties)),geometry:U};return L.id!==void 0&&(Q.id=L.id),Q}):[L];case"MultiPoint":return L.coordinates.map(function(U){return{type:"Point",coordinates:U}});case"MultiPolygon":return L.coordinates.map(function(U){return{type:"Polygon",coordinates:U}});case"MultiLineString":return L.coordinates.map(function(U){return{type:"LineString",coordinates:U}});case"GeometryCollection":return L.geometries.map(Mn).reduce(function(U,Q){return U.concat(Q)},[]);case"Point":case"Polygon":case"LineString":return[L]}}var $e=function(L){if(!L)return[];var U=Mn(Me(L)),Q=[];return U.features.forEach(function(At){At.geometry&&(Q=Q.concat(function tt(ot){return Array.isArray(ot)&&ot.length&&typeof ot[0]=="number"?[ot]:ot.reduce(function(ft,Ft){return Array.isArray(Ft)&&Array.isArray(Ft[0])?ft.concat(tt(Ft)):(ft.push(Ft),ft)},[])}(At.geometry.coordinates)))}),Q},Qn=sr(function(L){var U=L.exports=function(kt){return new Q(kt)};function Q(kt){this.value=kt}function At(kt,Ie,Pe){var Xe=[],en=[],dr=!0;return function le(Ue){var _r=Pe?tt(Ue):Ue,Yn={},$r=!0,fn={node:_r,node_:Ue,path:[].concat(Xe),parent:en[en.length-1],parents:en,key:Xe.slice(-1)[0],isRoot:Xe.length===0,level:Xe.length,circular:null,update:function(er,gr){fn.isRoot||(fn.parent.node[fn.key]=er),fn.node=er,gr&&($r=!1)},delete:function(er){delete fn.parent.node[fn.key],er&&($r=!1)},remove:function(er){Ft(fn.parent.node)?fn.parent.node.splice(fn.key,1):delete fn.parent.node[fn.key],er&&($r=!1)},keys:null,before:function(er){Yn.before=er},after:function(er){Yn.after=er},pre:function(er){Yn.pre=er},post:function(er){Yn.post=er},stop:function(){dr=!1},block:function(){$r=!1}};if(!dr)return fn;function Ea(){if(typeof fn.node=="object"&&fn.node!==null){fn.keys&&fn.node_===fn.node||(fn.keys=ot(fn.node)),fn.isLeaf=fn.keys.length==0;for(var er=0;er<en.length;er++)if(en[er].node_===Ue){fn.circular=en[er];break}}else fn.isLeaf=!0,fn.keys=null;fn.notLeaf=!fn.isLeaf,fn.notRoot=!fn.isRoot}Ea();var Wo=Ie.call(fn,fn.node);return Wo!==void 0&&fn.update&&fn.update(Wo),Yn.before&&Yn.before.call(fn,fn.node),$r&&(typeof fn.node!="object"||fn.node===null||fn.circular||(en.push(fn),Ea(),zt(fn.keys,function(er,gr){Xe.push(er),Yn.pre&&Yn.pre.call(fn,fn.node[er],er);var Ln=le(fn.node[er]);Pe&&ie.call(fn.node,er)&&(fn.node[er]=Ln.node),Ln.isLast=gr==fn.keys.length-1,Ln.isFirst=gr==0,Yn.post&&Yn.post.call(fn,Ln),Xe.pop()}),en.pop()),Yn.after&&Yn.after.call(fn,fn.node)),fn}(kt).node}function tt(kt){if(typeof kt=="object"&&kt!==null){var Ie;if(Ft(kt))Ie=[];else if(ft(kt)==="[object Date]")Ie=new Date(kt.getTime?kt.getTime():kt);else if(function(en){return ft(en)==="[object RegExp]"}(kt))Ie=new RegExp(kt);else if(function(en){return ft(en)==="[object Error]"}(kt))Ie={message:kt.message};else if(function(en){return ft(en)==="[object Boolean]"}(kt))Ie=new Boolean(kt);else if(function(en){return ft(en)==="[object Number]"}(kt))Ie=new Number(kt);else if(function(en){return ft(en)==="[object String]"}(kt))Ie=new String(kt);else if(Object.create&&Object.getPrototypeOf)Ie=Object.create(Object.getPrototypeOf(kt));else if(kt.constructor===Object)Ie={};else{var Pe=kt.constructor&&kt.constructor.prototype||kt.__proto__||{},Xe=function(){};Xe.prototype=Pe,Ie=new Xe}return zt(ot(kt),function(en){Ie[en]=kt[en]}),Ie}return kt}Q.prototype.get=function(kt){for(var Ie=this.value,Pe=0;Pe<kt.length;Pe++){var Xe=kt[Pe];if(!Ie||!ie.call(Ie,Xe)){Ie=void 0;break}Ie=Ie[Xe]}return Ie},Q.prototype.has=function(kt){for(var Ie=this.value,Pe=0;Pe<kt.length;Pe++){var Xe=kt[Pe];if(!Ie||!ie.call(Ie,Xe))return!1;Ie=Ie[Xe]}return!0},Q.prototype.set=function(kt,Ie){for(var Pe=this.value,Xe=0;Xe<kt.length-1;Xe++){var en=kt[Xe];ie.call(Pe,en)||(Pe[en]={}),Pe=Pe[en]}return Pe[kt[Xe]]=Ie,Ie},Q.prototype.map=function(kt){return At(this.value,kt,!0)},Q.prototype.forEach=function(kt){return this.value=At(this.value,kt,!1),this.value},Q.prototype.reduce=function(kt,Ie){var Pe=arguments.length===1,Xe=Pe?this.value:Ie;return this.forEach(function(en){this.isRoot&&Pe||(Xe=kt.call(this,Xe,en))}),Xe},Q.prototype.paths=function(){var kt=[];return this.forEach(function(Ie){kt.push(this.path)}),kt},Q.prototype.nodes=function(){var kt=[];return this.forEach(function(Ie){kt.push(this.node)}),kt},Q.prototype.clone=function(){var kt=[],Ie=[];return function Pe(Xe){for(var en=0;en<kt.length;en++)if(kt[en]===Xe)return Ie[en];if(typeof Xe=="object"&&Xe!==null){var dr=tt(Xe);return kt.push(Xe),Ie.push(dr),zt(ot(Xe),function(le){dr[le]=Pe(Xe[le])}),kt.pop(),Ie.pop(),dr}return Xe}(this.value)};var ot=Object.keys||function(kt){var Ie=[];for(var Pe in kt)Ie.push(Pe);return Ie};function ft(kt){return Object.prototype.toString.call(kt)}var Ft=Array.isArray||function(kt){return Object.prototype.toString.call(kt)==="[object Array]"},zt=function(kt,Ie){if(kt.forEach)return kt.forEach(Ie);for(var Pe=0;Pe<kt.length;Pe++)Ie(kt[Pe],Pe,kt)};zt(ot(Q.prototype),function(kt){U[kt]=function(Ie){var Pe=[].slice.call(arguments,1),Xe=new Q(Ie);return Xe[kt].apply(Xe,Pe)}});var ie=Object.hasOwnProperty||function(kt,Ie){return Ie in kt}}),Rr=wn;function wn(L){if(!(this instanceof wn))return new wn(L);this._bbox=L||[1/0,1/0,-1/0,-1/0],this._valid=!!L}wn.prototype.include=function(L){return this._valid=!0,this._bbox[0]=Math.min(this._bbox[0],L[0]),this._bbox[1]=Math.min(this._bbox[1],L[1]),this._bbox[2]=Math.max(this._bbox[2],L[0]),this._bbox[3]=Math.max(this._bbox[3],L[1]),this},wn.prototype.equals=function(L){var U;return U=L instanceof wn?L.bbox():L,this._bbox[0]==U[0]&&this._bbox[1]==U[1]&&this._bbox[2]==U[2]&&this._bbox[3]==U[3]},wn.prototype.center=function(L){return this._valid?[(this._bbox[0]+this._bbox[2])/2,(this._bbox[1]+this._bbox[3])/2]:null},wn.prototype.union=function(L){var U;return this._valid=!0,U=L instanceof wn?L.bbox():L,this._bbox[0]=Math.min(this._bbox[0],U[0]),this._bbox[1]=Math.min(this._bbox[1],U[1]),this._bbox[2]=Math.max(this._bbox[2],U[2]),this._bbox[3]=Math.max(this._bbox[3],U[3]),this},wn.prototype.bbox=function(){return this._valid?this._bbox:null},wn.prototype.contains=function(L){if(!L)return this._fastContains();if(!this._valid)return null;var U=L[0],Q=L[1];return this._bbox[0]<=U&&this._bbox[1]<=Q&&this._bbox[2]>=U&&this._bbox[3]>=Q},wn.prototype.intersect=function(L){return this._valid?(U=L instanceof wn?L.bbox():L,!(this._bbox[0]>U[2]||this._bbox[2]<U[0]||this._bbox[3]<U[1]||this._bbox[1]>U[3])):null;var U},wn.prototype._fastContains=function(){if(!this._valid)return new Function("return null;");var L="return "+this._bbox[0]+"<= ll[0] &&"+this._bbox[1]+"<= ll[1] &&"+this._bbox[2]+">= ll[0] &&"+this._bbox[3]+">= ll[1]";return new Function("ll",L)},wn.prototype.polygon=function(){return this._valid?{type:"Polygon",coordinates:[[[this._bbox[0],this._bbox[1]],[this._bbox[2],this._bbox[1]],[this._bbox[2],this._bbox[3]],[this._bbox[0],this._bbox[3]],[this._bbox[0],this._bbox[1]]]]}:null};var hr={features:["FeatureCollection"],coordinates:["Point","MultiPoint","LineString","MultiLineString","Polygon","MultiPolygon"],geometry:["Feature"],geometries:["GeometryCollection"]},tr=Object.keys(hr),go=function(L){return Er(L).bbox()};function Er(L){for(var U=Rr(),Q=$e(L),At=0;At<Q.length;At++)U.include(Q[At]);return U}go.polygon=function(L){return Er(L).polygon()},go.bboxify=function(L){return Qn(L).map(function(U){U&&tr.some(function(Q){return!!U[Q]&&hr[Q].indexOf(U.type)!==-1})&&(U.bbox=Er(U).bbox(),this.update(U))})};function Li(L,U){var Q=-90,At=90,tt=-90,ot=90,ft=270,Ft=-270;L.forEach(function(ie){var kt=go(ie),Ie=kt[1],Pe=kt[3],Xe=kt[0],en=kt[2];Ie>Q&&(Q=Ie),Pe<At&&(At=Pe),Pe>tt&&(tt=Pe),Ie<ot&&(ot=Ie),Xe<ft&&(ft=Xe),en>Ft&&(Ft=en)});var zt=U;return Q+zt.lat>85&&(zt.lat=85-Q),tt+zt.lat>90&&(zt.lat=90-tt),At+zt.lat<-85&&(zt.lat=-85-At),ot+zt.lat<-90&&(zt.lat=-90-ot),ft+zt.lng<=-270&&(zt.lng+=360*Math.ceil(Math.abs(zt.lng)/360)),Ft+zt.lng>=270&&(zt.lng-=360*Math.ceil(Math.abs(zt.lng)/360)),zt}function kr(L,U){var Q=Li(L.map(function(At){return At.toGeoJSON()}),U);L.forEach(function(At){var tt,ot=At.getCoordinates(),ft=function(zt){var ie={lng:zt[0]+Q.lng,lat:zt[1]+Q.lat};return[ie.lng,ie.lat]},Ft=function(zt){return zt.map(function(ie){return ft(ie)})};At.type===de?tt=ft(ot):At.type===He||At.type===Yt?tt=ot.map(ft):At.type===Ne||At.type===te?tt=ot.map(Ft):At.type===ve&&(tt=ot.map(function(zt){return zt.map(function(ie){return Ft(ie)})})),At.incomingCoords(tt)})}var xn={onSetup:function(L){var U=this,Q={dragMoveLocation:null,boxSelectStartLocation:null,boxSelectElement:void 0,boxSelecting:!1,canBoxSelect:!1,dragMoving:!1,canDragMove:!1,initiallySelectedFeatureIds:L.featureIds||[]};return this.setSelected(Q.initiallySelectedFeatureIds.filter(function(At){return U.getFeature(At)!==void 0})),this.fireActionable(),this.setActionableState({combineFeatures:!0,uncombineFeatures:!0,trash:!0}),Q},fireUpdate:function(){this.map.fire(Fn,{action:_a,features:this.getSelected().map(function(L){return L.toGeoJSON()})})},fireActionable:function(){var L=this,U=this.getSelected(),Q=U.filter(function(Ft){return L.isInstanceOf("MultiFeature",Ft)}),At=!1;if(U.length>1){At=!0;var tt=U[0].type.replace("Multi","");U.forEach(function(Ft){Ft.type.replace("Multi","")!==tt&&(At=!1)})}var ot=Q.length>0,ft=U.length>0;this.setActionableState({combineFeatures:At,uncombineFeatures:ot,trash:ft})},getUniqueIds:function(L){return L.length?L.map(function(U){return U.properties.id}).filter(function(U){return U!==void 0}).reduce(function(U,Q){return U.add(Q),U},new ri).values():[]},stopExtendedInteractions:function(L){L.boxSelectElement&&(L.boxSelectElement.parentNode&&L.boxSelectElement.parentNode.removeChild(L.boxSelectElement),L.boxSelectElement=null),this.map.dragPan.enable(),L.boxSelecting=!1,L.canBoxSelect=!1,L.dragMoving=!1,L.canDragMove=!1},onStop:function(){re(this)},onMouseMove:function(L){return this.stopExtendedInteractions(L),!0},onMouseOut:function(L){return!L.dragMoving||this.fireUpdate()}};xn.onTap=xn.onClick=function(L,U){return Rt(U)?this.clickAnywhere(L,U):lt(bi)(U)?this.clickOnVertex(L,U):function(Q){return!!Q.featureTarget&&!!Q.featureTarget.properties&&Q.featureTarget.properties.meta===Gi}(U)?this.clickOnFeature(L,U):void 0},xn.clickAnywhere=function(L){var U=this,Q=this.getSelectedIds();Q.length&&(this.clearSelectedFeatures(),Q.forEach(function(At){return U.doRender(At)})),re(this),this.stopExtendedInteractions(L)},xn.clickOnVertex=function(L,U){this.changeMode(Wt.DIRECT_SELECT,{featureId:U.featureTarget.properties.parent,coordPath:U.featureTarget.properties.coord_path,startPos:U.lngLat}),this.updateUIClasses({mouse:mt})},xn.startOnActiveFeature=function(L,U){this.stopExtendedInteractions(L),this.map.dragPan.disable(),this.doRender(U.featureTarget.properties.id),L.canDragMove=!0,L.dragMoveLocation=U.lngLat},xn.clickOnFeature=function(L,U){var Q=this;ze(this),this.stopExtendedInteractions(L);var At=bt(U),tt=this.getSelectedIds(),ot=U.featureTarget.properties.id,ft=this.isSelected(ot);if(!At&&ft&&this.getFeature(ot).type!==de)return this.changeMode(Wt.DIRECT_SELECT,{featureId:ot});ft&&At?(this.deselect(ot),this.updateUIClasses({mouse:Ot}),tt.length===1&&re(this)):!ft&&At?(this.select(ot),this.updateUIClasses({mouse:mt})):ft||At||(tt.forEach(function(Ft){return Q.doRender(Ft)}),this.setSelected(ot),this.updateUIClasses({mouse:mt})),this.doRender(ot)},xn.onMouseDown=function(L,U){return vt(U)?this.startOnActiveFeature(L,U):this.drawConfig.boxSelect&&function(Q){return!!Q.originalEvent&&!!Q.originalEvent.shiftKey&&Q.originalEvent.button===0}(U)?this.startBoxSelect(L,U):void 0},xn.startBoxSelect=function(L,U){this.stopExtendedInteractions(L),this.map.dragPan.disable(),L.boxSelectStartLocation=me(U.originalEvent,this.map.getContainer()),L.canBoxSelect=!0},xn.onTouchStart=function(L,U){if(vt(U))return this.startOnActiveFeature(L,U)},xn.onDrag=function(L,U){return L.canDragMove?this.dragMove(L,U):this.drawConfig.boxSelect&&L.canBoxSelect?this.whileBoxSelect(L,U):void 0},xn.whileBoxSelect=function(L,U){L.boxSelecting=!0,this.updateUIClasses({mouse:et}),L.boxSelectElement||(L.boxSelectElement=document.createElement("div"),L.boxSelectElement.classList.add(k),this.map.getContainer().appendChild(L.boxSelectElement));var Q=me(U.originalEvent,this.map.getContainer()),At=Math.min(L.boxSelectStartLocation.x,Q.x),tt=Math.max(L.boxSelectStartLocation.x,Q.x),ot=Math.min(L.boxSelectStartLocation.y,Q.y),ft=Math.max(L.boxSelectStartLocation.y,Q.y),Ft="translate("+At+"px, "+ot+"px)";L.boxSelectElement.style.transform=Ft,L.boxSelectElement.style.WebkitTransform=Ft,L.boxSelectElement.style.width=tt-At+"px",L.boxSelectElement.style.height=ft-ot+"px"},xn.dragMove=function(L,U){L.dragMoving=!0,U.originalEvent.stopPropagation();var Q={lng:U.lngLat.lng-L.dragMoveLocation.lng,lat:U.lngLat.lat-L.dragMoveLocation.lat};kr(this.getSelected(),Q),L.dragMoveLocation=U.lngLat},xn.onMouseUp=function(L,U){var Q=this;if(L.dragMoving)this.fireUpdate();else if(L.boxSelecting){var At=[L.boxSelectStartLocation,me(U.originalEvent,this.map.getContainer())],tt=this.featuresAt(null,At,"click"),ot=this.getUniqueIds(tt).filter(function(ft){return!Q.isSelected(ft)});ot.length&&(this.select(ot),ot.forEach(function(ft){return Q.doRender(ft)}),this.updateUIClasses({mouse:mt}))}this.stopExtendedInteractions(L)},xn.toDisplayFeatures=function(L,U,Q){U.properties.active=this.isSelected(U.properties.id)?ni:Wi,Q(U),this.fireActionable(),U.properties.active===ni&&U.geometry.type!==de&&Je(U).forEach(Q)},xn.onTrash=function(){this.deleteFeature(this.getSelectedIds()),this.fireActionable()},xn.onCombineFeatures=function(){var L=this.getSelected();if(!(L.length===0||L.length<2)){for(var U=[],Q=[],At=L[0].type.replace("Multi",""),tt=0;tt<L.length;tt++){var ot=L[tt];if(ot.type.replace("Multi","")!==At)return;ot.type.includes("Multi")?ot.getCoordinates().forEach(function(Ft){U.push(Ft)}):U.push(ot.getCoordinates()),Q.push(ot.toGeoJSON())}if(Q.length>1){var ft=this.newFeature({type:_e,properties:Q[0].properties,geometry:{type:"Multi"+At,coordinates:U}});this.addFeature(ft),this.deleteFeature(this.getSelectedIds(),{silent:!0}),this.setSelected([ft.id]),this.map.fire(Fi,{createdFeatures:[ft.toGeoJSON()],deletedFeatures:Q})}this.fireActionable()}},xn.onUncombineFeatures=function(){var L=this,U=this.getSelected();if(U.length!==0){for(var Q=[],At=[],tt=function(ft){var Ft=U[ft];L.isInstanceOf("MultiFeature",Ft)&&(Ft.getFeatures().forEach(function(zt){L.addFeature(zt),zt.properties=Ft.properties,Q.push(zt.toGeoJSON()),L.select([zt.id])}),L.deleteFeature(Ft.id,{silent:!0}),At.push(Ft.toGeoJSON()))},ot=0;ot<U.length;ot++)tt(ot);Q.length>1&&this.map.fire(fr,{createdFeatures:Q,deletedFeatures:At}),this.fireActionable()}};var pr=lt(bi),sa=lt(jn),Ii={fireUpdate:function(){this.map.fire(Fn,{action:Is,features:this.getSelected().map(function(L){return L.toGeoJSON()})})},fireActionable:function(L){this.setActionableState({combineFeatures:!1,uncombineFeatures:!1,trash:L.selectedCoordPaths.length>0})},startDragging:function(L,U){this.map.dragPan.disable(),L.canDragMove=!0,L.dragMoveLocation=U.lngLat},stopDragging:function(L){this.map.dragPan.enable(),L.dragMoving=!1,L.canDragMove=!1,L.dragMoveLocation=null},onVertex:function(L,U){this.startDragging(L,U);var Q=U.featureTarget.properties,At=L.selectedCoordPaths.indexOf(Q.coord_path);bt(U)||At!==-1?bt(U)&&At===-1&&L.selectedCoordPaths.push(Q.coord_path):L.selectedCoordPaths=[Q.coord_path];var tt=this.pathsToCoordinates(L.featureId,L.selectedCoordPaths);this.setSelectedCoordinates(tt)},onMidpoint:function(L,U){this.startDragging(L,U);var Q=U.featureTarget.properties;L.feature.addCoordinate(Q.coord_path,Q.lng,Q.lat),this.fireUpdate(),L.selectedCoordPaths=[Q.coord_path]},pathsToCoordinates:function(L,U){return U.map(function(Q){return{feature_id:L,coord_path:Q}})},onFeature:function(L,U){L.selectedCoordPaths.length===0?this.startDragging(L,U):this.stopDragging(L)},dragFeature:function(L,U,Q){kr(this.getSelected(),Q),L.dragMoveLocation=U.lngLat},dragVertex:function(L,U,Q){for(var At=L.selectedCoordPaths.map(function(Ft){return L.feature.getCoordinate(Ft)}),tt=Li(At.map(function(Ft){return{type:_e,properties:{},geometry:{type:de,coordinates:Ft}}}),Q),ot=0;ot<At.length;ot++){var ft=At[ot];L.feature.updateCoordinate(L.selectedCoordPaths[ot],ft[0]+tt.lng,ft[1]+tt.lat)}},clickNoTarget:function(){this.changeMode(Wt.SIMPLE_SELECT)},clickInactive:function(){this.changeMode(Wt.SIMPLE_SELECT)},clickActiveFeature:function(L){L.selectedCoordPaths=[],this.clearSelectedCoordinates(),L.feature.changed()},onSetup:function(L){var U=L.featureId,Q=this.getFeature(U);if(!Q)throw new Error("You must provide a featureId to enter direct_select mode");if(Q.type===de)throw new TypeError("direct_select mode doesn't handle point features");var At={featureId:U,feature:Q,dragMoveLocation:L.startPos||null,dragMoving:!1,canDragMove:!1,selectedCoordPaths:L.coordPath?[L.coordPath]:[]};return this.setSelectedCoordinates(this.pathsToCoordinates(U,At.selectedCoordPaths)),this.setSelected(U),ze(this),this.setActionableState({trash:!0}),At},onStop:function(){re(this),this.clearSelectedCoordinates()},toDisplayFeatures:function(L,U,Q){L.featureId===U.properties.id?(U.properties.active=ni,Q(U),Je(U,{map:this.map,midpoints:!0,selectedPaths:L.selectedCoordPaths}).forEach(Q)):(U.properties.active=Wi,Q(U)),this.fireActionable(L)},onTrash:function(L){L.selectedCoordPaths.sort(function(U,Q){return Q.localeCompare(U,"en",{numeric:!0})}).forEach(function(U){return L.feature.removeCoordinate(U)}),this.fireUpdate(),L.selectedCoordPaths=[],this.clearSelectedCoordinates(),this.fireActionable(L),L.feature.isValid()===!1&&(this.deleteFeature([L.featureId]),this.changeMode(Wt.SIMPLE_SELECT,{}))},onMouseMove:function(L,U){var Q=vt(U),At=pr(U),tt=L.selectedCoordPaths.length===0;return Q&&tt||At&&!tt?this.updateUIClasses({mouse:mt}):this.updateUIClasses({mouse:Bt}),this.stopDragging(L),!0},onMouseOut:function(L){return L.dragMoving&&this.fireUpdate(),!0}};Ii.onTouchStart=Ii.onMouseDown=function(L,U){return pr(U)?this.onVertex(L,U):vt(U)?this.onFeature(L,U):sa(U)?this.onMidpoint(L,U):void 0},Ii.onDrag=function(L,U){if(L.canDragMove===!0){L.dragMoving=!0,U.originalEvent.stopPropagation();var Q={lng:U.lngLat.lng-L.dragMoveLocation.lng,lat:U.lngLat.lat-L.dragMoveLocation.lat};L.selectedCoordPaths.length>0?this.dragVertex(L,U,Q):this.dragFeature(L,U,Q),L.dragMoveLocation=U.lngLat}},Ii.onClick=function(L,U){return Rt(U)?this.clickNoTarget(L,U):vt(U)?this.clickActiveFeature(L,U):Mt(U)?this.clickInactive(L,U):void this.stopDragging(L)},Ii.onTap=function(L,U){return Rt(U)?this.clickNoTarget(L,U):vt(U)?this.clickActiveFeature(L,U):Mt(U)?this.clickInactive(L,U):void 0},Ii.onTouchEnd=Ii.onMouseUp=function(L){L.dragMoving&&this.fireUpdate(),this.stopDragging(L)};var Qr={};function mo(L,U){return!!L.lngLat&&L.lngLat.lng===U[0]&&L.lngLat.lat===U[1]}Qr.onSetup=function(){var L=this.newFeature({type:_e,properties:{},geometry:{type:de,coordinates:[]}});return this.addFeature(L),this.clearSelectedFeatures(),this.updateUIClasses({mouse:et}),this.activateUIButton(se.POINT),this.setActionableState({trash:!0}),{point:L}},Qr.stopDrawingAndRemove=function(L){this.deleteFeature([L.point.id],{silent:!0}),this.changeMode(Wt.SIMPLE_SELECT)},Qr.onTap=Qr.onClick=function(L,U){this.updateUIClasses({mouse:mt}),L.point.updateCoordinate("",U.lngLat.lng,U.lngLat.lat),this.map.fire(be,{features:[L.point.toGeoJSON()]}),this.changeMode(Wt.SIMPLE_SELECT,{featureIds:[L.point.id]})},Qr.onStop=function(L){this.activateUIButton(),L.point.getCoordinate().length||this.deleteFeature([L.point.id],{silent:!0})},Qr.toDisplayFeatures=function(L,U,Q){var At=U.properties.id===L.point.id;if(U.properties.active=At?ni:Wi,!At)return Q(U)},Qr.onTrash=Qr.stopDrawingAndRemove,Qr.onKeyUp=function(L,U){if(Vt(U)||pe(U))return this.stopDrawingAndRemove(L,U)};var Ps={onSetup:function(){var L=this.newFeature({type:_e,properties:{},geometry:{type:Ne,coordinates:[[]]}});return this.addFeature(L),this.clearSelectedFeatures(),ze(this),this.updateUIClasses({mouse:et}),this.activateUIButton(se.POLYGON),this.setActionableState({trash:!0}),{polygon:L,currentVertexPosition:0}},clickAnywhere:function(L,U){if(L.currentVertexPosition>0&&mo(U,L.polygon.coordinates[0][L.currentVertexPosition-1]))return this.changeMode(Wt.SIMPLE_SELECT,{featureIds:[L.polygon.id]});this.updateUIClasses({mouse:et}),L.polygon.updateCoordinate("0."+L.currentVertexPosition,U.lngLat.lng,U.lngLat.lat),L.currentVertexPosition++,L.polygon.updateCoordinate("0."+L.currentVertexPosition,U.lngLat.lng,U.lngLat.lat)},clickOnVertex:function(L){return this.changeMode(Wt.SIMPLE_SELECT,{featureIds:[L.polygon.id]})},onMouseMove:function(L,U){L.polygon.updateCoordinate("0."+L.currentVertexPosition,U.lngLat.lng,U.lngLat.lat),at(U)&&this.updateUIClasses({mouse:Ot})}};Ps.onTap=Ps.onClick=function(L,U){return at(U)?this.clickOnVertex(L,U):this.clickAnywhere(L,U)},Ps.onKeyUp=function(L,U){Vt(U)?(this.deleteFeature([L.polygon.id],{silent:!0}),this.changeMode(Wt.SIMPLE_SELECT)):pe(U)&&this.changeMode(Wt.SIMPLE_SELECT,{featureIds:[L.polygon.id]})},Ps.onStop=function(L){this.updateUIClasses({mouse:Bt}),re(this),this.activateUIButton(),this.getFeature(L.polygon.id)!==void 0&&(L.polygon.removeCoordinate("0."+L.currentVertexPosition),L.polygon.isValid()?this.map.fire(be,{features:[L.polygon.toGeoJSON()]}):(this.deleteFeature([L.polygon.id],{silent:!0}),this.changeMode(Wt.SIMPLE_SELECT,{},{silent:!0})))},Ps.toDisplayFeatures=function(L,U,Q){var At=U.properties.id===L.polygon.id;if(U.properties.active=At?ni:Wi,!At)return Q(U);if(U.geometry.coordinates.length!==0){var tt=U.geometry.coordinates[0].length;if(!(tt<3)){if(U.properties.meta=Gi,Q(tn(L.polygon.id,U.geometry.coordinates[0][0],"0.0",!1)),tt>3){var ot=U.geometry.coordinates[0].length-3;Q(tn(L.polygon.id,U.geometry.coordinates[0][ot],"0."+ot,!1))}if(tt<=4){var ft=[[U.geometry.coordinates[0][0][0],U.geometry.coordinates[0][0][1]],[U.geometry.coordinates[0][1][0],U.geometry.coordinates[0][1][1]]];if(Q({type:_e,properties:U.properties,geometry:{coordinates:ft,type:He}}),tt===3)return}return Q(U)}}},Ps.onTrash=function(L){this.deleteFeature([L.polygon.id],{silent:!0}),this.changeMode(Wt.SIMPLE_SELECT)};var Ga={onSetup:function(L){var U,Q,At=(L=L||{}).featureId,tt="forward";if(At){if(!(U=this.getFeature(At)))throw new Error("Could not find a feature with the provided featureId");var ot=L.from;if(ot&&ot.type==="Feature"&&ot.geometry&&ot.geometry.type==="Point"&&(ot=ot.geometry),ot&&ot.type==="Point"&&ot.coordinates&&ot.coordinates.length===2&&(ot=ot.coordinates),!ot||!Array.isArray(ot))throw new Error("Please use the `from` property to indicate which point to continue the line from");var ft=U.coordinates.length-1;if(U.coordinates[ft][0]===ot[0]&&U.coordinates[ft][1]===ot[1])Q=ft+1,U.addCoordinate.apply(U,[Q].concat(U.coordinates[ft]));else{if(U.coordinates[0][0]!==ot[0]||U.coordinates[0][1]!==ot[1])throw new Error("`from` should match the point at either the start or the end of the provided LineString");tt="backwards",Q=0,U.addCoordinate.apply(U,[Q].concat(U.coordinates[0]))}}else U=this.newFeature({type:_e,properties:{},geometry:{type:He,coordinates:[]}}),Q=0,this.addFeature(U);return this.clearSelectedFeatures(),ze(this),this.updateUIClasses({mouse:et}),this.activateUIButton(se.LINE),this.setActionableState({trash:!0}),{line:U,currentVertexPosition:Q,direction:tt}},clickAnywhere:function(L,U){if(L.currentVertexPosition>0&&mo(U,L.line.coordinates[L.currentVertexPosition-1])||L.direction==="backwards"&&mo(U,L.line.coordinates[L.currentVertexPosition+1]))return this.changeMode(Wt.SIMPLE_SELECT,{featureIds:[L.line.id]});this.updateUIClasses({mouse:et}),L.line.updateCoordinate(L.currentVertexPosition,U.lngLat.lng,U.lngLat.lat),L.direction==="forward"?(L.currentVertexPosition++,L.line.updateCoordinate(L.currentVertexPosition,U.lngLat.lng,U.lngLat.lat)):L.line.addCoordinate(0,U.lngLat.lng,U.lngLat.lat)},clickOnVertex:function(L){return this.changeMode(Wt.SIMPLE_SELECT,{featureIds:[L.line.id]})},onMouseMove:function(L,U){L.line.updateCoordinate(L.currentVertexPosition,U.lngLat.lng,U.lngLat.lat),at(U)&&this.updateUIClasses({mouse:Ot})}};Ga.onTap=Ga.onClick=function(L,U){if(at(U))return this.clickOnVertex(L,U);this.clickAnywhere(L,U)},Ga.onKeyUp=function(L,U){pe(U)?this.changeMode(Wt.SIMPLE_SELECT,{featureIds:[L.line.id]}):Vt(U)&&(this.deleteFeature([L.line.id],{silent:!0}),this.changeMode(Wt.SIMPLE_SELECT))},Ga.onStop=function(L){re(this),this.activateUIButton(),this.getFeature(L.line.id)!==void 0&&(L.line.removeCoordinate(""+L.currentVertexPosition),L.line.isValid()?this.map.fire(be,{features:[L.line.toGeoJSON()]}):(this.deleteFeature([L.line.id],{silent:!0}),this.changeMode(Wt.SIMPLE_SELECT,{},{silent:!0})))},Ga.onTrash=function(L){this.deleteFeature([L.line.id],{silent:!0}),this.changeMode(Wt.SIMPLE_SELECT)},Ga.toDisplayFeatures=function(L,U,Q){var At=U.properties.id===L.line.id;if(U.properties.active=At?ni:Wi,!At)return Q(U);U.geometry.coordinates.length<2||(U.properties.meta=Gi,Q(tn(L.line.id,U.geometry.coordinates[L.direction==="forward"?U.geometry.coordinates.length-2:1],""+(L.direction==="forward"?U.geometry.coordinates.length-2:1),!1)),Q(U))};var Pi={simple_select:xn,direct_select:Ii,draw_point:Qr,draw_polygon:Ps,draw_line_string:Ga},_l={defaultMode:Wt.SIMPLE_SELECT,keybindings:!0,touchEnabled:!0,clickBuffer:2,touchBuffer:25,boxSelect:!0,displayControlsDefault:!0,styles:[{id:"gl-draw-polygon-fill-inactive",type:"fill",filter:["all",["==","active","false"],["==","$type","Polygon"],["!=","mode","static"]],paint:{"fill-color":"#3bb2d0","fill-outline-color":"#3bb2d0","fill-opacity":.1}},{id:"gl-draw-polygon-fill-active",type:"fill",filter:["all",["==","active","true"],["==","$type","Polygon"]],paint:{"fill-color":"#fbb03b","fill-outline-color":"#fbb03b","fill-opacity":.1}},{id:"gl-draw-polygon-midpoint",type:"circle",filter:["all",["==","$type","Point"],["==","meta","midpoint"]],paint:{"circle-radius":3,"circle-color":"#fbb03b"}},{id:"gl-draw-polygon-stroke-inactive",type:"line",filter:["all",["==","active","false"],["==","$type","Polygon"],["!=","mode","static"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#3bb2d0","line-width":2}},{id:"gl-draw-polygon-stroke-active",type:"line",filter:["all",["==","active","true"],["==","$type","Polygon"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#fbb03b","line-dasharray":[.2,2],"line-width":2}},{id:"gl-draw-line-inactive",type:"line",filter:["all",["==","active","false"],["==","$type","LineString"],["!=","mode","static"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#3bb2d0","line-width":2}},{id:"gl-draw-line-active",type:"line",filter:["all",["==","$type","LineString"],["==","active","true"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#fbb03b","line-dasharray":[.2,2],"line-width":2}},{id:"gl-draw-polygon-and-line-vertex-stroke-inactive",type:"circle",filter:["all",["==","meta","vertex"],["==","$type","Point"],["!=","mode","static"]],paint:{"circle-radius":5,"circle-color":"#fff"}},{id:"gl-draw-polygon-and-line-vertex-inactive",type:"circle",filter:["all",["==","meta","vertex"],["==","$type","Point"],["!=","mode","static"]],paint:{"circle-radius":3,"circle-color":"#fbb03b"}},{id:"gl-draw-point-point-stroke-inactive",type:"circle",filter:["all",["==","active","false"],["==","$type","Point"],["==","meta","feature"],["!=","mode","static"]],paint:{"circle-radius":5,"circle-opacity":1,"circle-color":"#fff"}},{id:"gl-draw-point-inactive",type:"circle",filter:["all",["==","active","false"],["==","$type","Point"],["==","meta","feature"],["!=","mode","static"]],paint:{"circle-radius":3,"circle-color":"#3bb2d0"}},{id:"gl-draw-point-stroke-active",type:"circle",filter:["all",["==","$type","Point"],["==","active","true"],["!=","meta","midpoint"]],paint:{"circle-radius":7,"circle-color":"#fff"}},{id:"gl-draw-point-active",type:"circle",filter:["all",["==","$type","Point"],["!=","meta","midpoint"],["==","active","true"]],paint:{"circle-radius":5,"circle-color":"#fbb03b"}},{id:"gl-draw-polygon-fill-static",type:"fill",filter:["all",["==","mode","static"],["==","$type","Polygon"]],paint:{"fill-color":"#404040","fill-outline-color":"#404040","fill-opacity":.1}},{id:"gl-draw-polygon-stroke-static",type:"line",filter:["all",["==","mode","static"],["==","$type","Polygon"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#404040","line-width":2}},{id:"gl-draw-line-static",type:"line",filter:["all",["==","mode","static"],["==","$type","LineString"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#404040","line-width":2}},{id:"gl-draw-point-static",type:"circle",filter:["all",["==","mode","static"],["==","$type","Point"]],paint:{"circle-radius":5,"circle-color":"#404040"}}],modes:Pi,controls:{},userProperties:!1},ro={point:!0,line_string:!0,polygon:!0,trash:!0,combine_features:!0,uncombine_features:!0},Hi={point:!1,line_string:!1,polygon:!1,trash:!1,combine_features:!1,uncombine_features:!1};function wa(L,U){return L.map(function(Q){return Q.source?Q:Vr(Q,{id:Q.id+"."+U,source:U==="hot"?$:K})})}var oi=sr(function(L,U){var Q="[object Arguments]",At="[object Map]",tt="[object Object]",ot="[object Set]",ft=/^\[object .+?Constructor\]$/,Ft=/^(?:0|[1-9]\d*)$/,zt={};zt["[object Float32Array]"]=zt["[object Float64Array]"]=zt["[object Int8Array]"]=zt["[object Int16Array]"]=zt["[object Int32Array]"]=zt["[object Uint8Array]"]=zt["[object Uint8ClampedArray]"]=zt["[object Uint16Array]"]=zt["[object Uint32Array]"]=!0,zt[Q]=zt["[object Array]"]=zt["[object ArrayBuffer]"]=zt["[object Boolean]"]=zt["[object DataView]"]=zt["[object Date]"]=zt["[object Error]"]=zt["[object Function]"]=zt[At]=zt["[object Number]"]=zt[tt]=zt["[object RegExp]"]=zt[ot]=zt["[object String]"]=zt["[object WeakMap]"]=!1;var ie=typeof Iu=="object"&&Iu&&Iu.Object===Object&&Iu,kt=typeof self=="object"&&self&&self.Object===Object&&self,Ie=ie||kt||Function("return this")(),Pe=U&&!U.nodeType&&U,Xe=Pe&&L&&!L.nodeType&&L,en=Xe&&Xe.exports===Pe,dr=en&&ie.process,le=function(){try{return dr&&dr.binding&&dr.binding("util")}catch{}}(),Ue=le&&le.isTypedArray;function _r(Ut,ce){for(var Be=-1,dn=Ut==null?0:Ut.length;++Be<dn;)if(ce(Ut[Be],Be,Ut))return!0;return!1}function Yn(Ut){var ce=-1,Be=Array(Ut.size);return Ut.forEach(function(dn,Bi){Be[++ce]=[Bi,dn]}),Be}function $r(Ut){var ce=-1,Be=Array(Ut.size);return Ut.forEach(function(dn){Be[++ce]=dn}),Be}var fn,Ea,Wo,er=Array.prototype,gr=Function.prototype,Ln=Object.prototype,Oi=Ie["__core-js_shared__"],Vu=gr.toString,mu=Ln.hasOwnProperty,Tg=(fn=/[^.]+$/.exec(Oi&&Oi.keys&&Oi.keys.IE_PROTO||""))?"Symbol(src)_1."+fn:"",Mg=Ln.toString,_d=RegExp("^"+Vu.call(mu).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ah=en?Ie.Buffer:void 0,Of=Ie.Symbol,Ao=Ie.Uint8Array,Lh=Ln.propertyIsEnumerable,Zl=er.splice,Kl=Of?Of.toStringTag:void 0,Jl=Object.getOwnPropertySymbols,Fa=Ah?Ah.isBuffer:void 0,xd=(Ea=Object.keys,Wo=Object,function(Ut){return Ea(Wo(Ut))}),So=cs(Ie,"DataView"),Ql=cs(Ie,"Map"),vu=cs(Ie,"Promise"),yu=cs(Ie,"Set"),$u=cs(Ie,"WeakMap"),io=cs(Object,"create"),tc=Gs(So),ua=Gs(Ql),Rc=Gs(vu),xl=Gs(yu),bl=Gs($u),Rf=Of?Of.prototype:void 0,jr=Rf?Rf.valueOf:void 0;function di(Ut){var ce=-1,Be=Ut==null?0:Ut.length;for(this.clear();++ce<Be;){var dn=Ut[ce];this.set(dn[0],dn[1])}}function Ho(Ut){var ce=-1,Be=Ut==null?0:Ut.length;for(this.clear();++ce<Be;){var dn=Ut[ce];this.set(dn[0],dn[1])}}function ju(Ut){var ce=-1,Be=Ut==null?0:Ut.length;for(this.clear();++ce<Be;){var dn=Ut[ce];this.set(dn[0],dn[1])}}function Oh(Ut){var ce=-1,Be=Ut==null?0:Ut.length;for(this.__data__=new ju;++ce<Be;)this.add(Ut[ce])}function _u(Ut){var ce=this.__data__=new Ho(Ut);this.size=ce.size}function Ag(Ut,ce){var Be=Ca(Ut),dn=!Be&&Dc(Ut),Bi=!Be&&!dn&&Rh(Ut),xr=!Be&&!dn&&!Bi&&kh(Ut),to=Be||dn||Bi||xr,ti=to?function(Eo,Ts){for(var fs=-1,Ti=Array(Eo);++fs<Eo;)Ti[fs]=Ts(fs);return Ti}(Ut.length,String):[],la=ti.length;for(var vo in Ut)!ce&&!mu.call(Ut,vo)||to&&(vo=="length"||Bi&&(vo=="offset"||vo=="parent")||xr&&(vo=="buffer"||vo=="byteLength"||vo=="byteOffset")||ui(vo,la))||ti.push(vo);return ti}function qu(Ut,ce){for(var Be=Ut.length;Be--;)if(Lg(Ut[Be][0],ce))return Be;return-1}function $s(Ut){return Ut==null?Ut===void 0?"[object Undefined]":"[object Null]":Kl&&Kl in Object(Ut)?function(ce){var Be=mu.call(ce,Kl),dn=ce[Kl];try{ce[Kl]=void 0;var Bi=!0}catch{}var xr=Mg.call(ce);return Bi&&(Be?ce[Kl]=dn:delete ce[Kl]),xr}(Ut):function(ce){return Mg.call(ce)}(Ut)}function wl(Ut){return El(Ut)&&$s(Ut)==Q}function kf(Ut,ce,Be,dn,Bi){return Ut===ce||(Ut==null||ce==null||!El(Ut)&&!El(ce)?Ut!=Ut&&ce!=ce:function(xr,to,ti,la,vo,Eo){var Ts=Ca(xr),fs=Ca(to),Ti=Ts?"[object Array]":qs(xr),Ws=fs?"[object Array]":qs(to),Fc=(Ti=Ti==Q?tt:Ti)==tt,Nh=(Ws=Ws==Q?tt:Ws)==tt,Cl=Ti==Ws;if(Cl&&Rh(xr)){if(!Rh(to))return!1;Ts=!0,Fc=!1}if(Cl&&!Fc)return Eo||(Eo=new _u),Ts||kh(xr)?Sl(xr,to,ti,la,vo,Eo):function(oe,Gt,Le,kn,br,Lr,un){switch(Le){case"[object DataView]":if(oe.byteLength!=Gt.byteLength||oe.byteOffset!=Gt.byteOffset)return!1;oe=oe.buffer,Gt=Gt.buffer;case"[object ArrayBuffer]":return!(oe.byteLength!=Gt.byteLength||!Lr(new Ao(oe),new Ao(Gt)));case"[object Boolean]":case"[object Date]":case"[object Number]":return Lg(+oe,+Gt);case"[object Error]":return oe.name==Gt.name&&oe.message==Gt.message;case"[object RegExp]":case"[object String]":return oe==Gt+"";case At:var Cr=Yn;case ot:var Ia=1&kn;if(Cr||(Cr=$r),oe.size!=Gt.size&&!Ia)return!1;var Xo=un.get(oe);if(Xo)return Xo==Gt;kn|=2,un.set(oe,Gt);var hs=Sl(Cr(oe),Cr(Gt),kn,br,Lr,un);return un.delete(oe),hs;case"[object Symbol]":if(jr)return jr.call(oe)==jr.call(Gt)}return!1}(xr,to,Ti,ti,la,vo,Eo);if(!(1&ti)){var zc=Fc&&mu.call(xr,"__wrapped__"),Lp=Nh&&mu.call(to,"__wrapped__");if(zc||Lp){var nc=zc?xr.value():xr,$t=Lp?to.value():to;return Eo||(Eo=new _u),vo(nc,$t,ti,la,Eo)}}return Cl?(Eo||(Eo=new _u),function(oe,Gt,Le,kn,br,Lr){var un=1&Le,Cr=Ap(oe),Ia=Cr.length,Xo=Ap(Gt).length;if(Ia!=Xo&&!un)return!1;for(var hs=Ia;hs--;){var Hs=Cr[hs];if(!(un?Hs in Gt:mu.call(Gt,Hs)))return!1}var Bc=Lr.get(oe);if(Bc&&Lr.get(Gt))return Bc==Gt;var Uc=!0;Lr.set(oe,Gt),Lr.set(Gt,oe);for(var Gu=un;++hs<Ia;){Hs=Cr[hs];var Dr=oe[Hs],Xs=Gt[Hs];if(kn)var oo=un?kn(Xs,Dr,Hs,Gt,oe,Lr):kn(Dr,Xs,Hs,oe,Gt,Lr);if(!(oo===void 0?Dr===Xs||br(Dr,Xs,Le,kn,Lr):oo)){Uc=!1;break}Gu||(Gu=Hs=="constructor")}if(Uc&&!Gu){var xu=oe.constructor,Fh=Gt.constructor;xu==Fh||!("constructor"in oe)||!("constructor"in Gt)||typeof xu=="function"&&xu instanceof xu&&typeof Fh=="function"&&Fh instanceof Fh||(Uc=!1)}return Lr.delete(oe),Lr.delete(Gt),Uc}(xr,to,ti,la,vo,Eo)):!1}(Ut,ce,Be,dn,kf,Bi))}function kc(Ut){return!(!ec(Ut)||function(ce){return!!Tg&&Tg in ce}(Ut))&&(Nc(Ut)?_d:ft).test(Gs(Ut))}function bd(Ut){if(Be=(ce=Ut)&&ce.constructor,dn=typeof Be=="function"&&Be.prototype||Ln,ce!==dn)return xd(Ut);var ce,Be,dn,Bi=[];for(var xr in Object(Ut))mu.call(Ut,xr)&&xr!="constructor"&&Bi.push(xr);return Bi}function Sl(Ut,ce,Be,dn,Bi,xr){var to=1&Be,ti=Ut.length,la=ce.length;if(ti!=la&&!(to&&la>ti))return!1;var vo=xr.get(Ut);if(vo&&xr.get(ce))return vo==ce;var Eo=-1,Ts=!0,fs=2&Be?new Oh:void 0;for(xr.set(Ut,ce),xr.set(ce,Ut);++Eo<ti;){var Ti=Ut[Eo],Ws=ce[Eo];if(dn)var Fc=to?dn(Ws,Ti,Eo,ce,Ut,xr):dn(Ti,Ws,Eo,Ut,ce,xr);if(Fc!==void 0){if(Fc)continue;Ts=!1;break}if(fs){if(!_r(ce,function(Nh,Cl){if(zc=Cl,!fs.has(zc)&&(Ti===Nh||Bi(Ti,Nh,Be,dn,xr)))return fs.push(Cl);var zc})){Ts=!1;break}}else if(Ti!==Ws&&!Bi(Ti,Ws,Be,dn,xr)){Ts=!1;break}}return xr.delete(Ut),xr.delete(ce),Ts}function Ap(Ut){return function(ce,Be,dn){var Bi=Be(ce);return Ca(ce)?Bi:function(xr,to){for(var ti=-1,la=to.length,vo=xr.length;++ti<la;)xr[vo+ti]=to[ti];return xr}(Bi,dn(ce))}(Ut,Dh,wd)}function js(Ut,ce){var Be,dn,Bi=Ut.__data__;return((dn=typeof(Be=ce))=="string"||dn=="number"||dn=="symbol"||dn=="boolean"?Be!=="__proto__":Be===null)?Bi[typeof ce=="string"?"string":"hash"]:Bi.map}function cs(Ut,ce){var Be=function(dn,Bi){return dn==null?void 0:dn[Bi]}(Ut,ce);return kc(Be)?Be:void 0}di.prototype.clear=function(){this.__data__=io?io(null):{},this.size=0},di.prototype.delete=function(Ut){var ce=this.has(Ut)&&delete this.__data__[Ut];return this.size-=ce?1:0,ce},di.prototype.get=function(Ut){var ce=this.__data__;if(io){var Be=ce[Ut];return Be==="__lodash_hash_undefined__"?void 0:Be}return mu.call(ce,Ut)?ce[Ut]:void 0},di.prototype.has=function(Ut){var ce=this.__data__;return io?ce[Ut]!==void 0:mu.call(ce,Ut)},di.prototype.set=function(Ut,ce){var Be=this.__data__;return this.size+=this.has(Ut)?0:1,Be[Ut]=io&&ce===void 0?"__lodash_hash_undefined__":ce,this},Ho.prototype.clear=function(){this.__data__=[],this.size=0},Ho.prototype.delete=function(Ut){var ce=this.__data__,Be=qu(ce,Ut);return!(Be<0)&&(Be==ce.length-1?ce.pop():Zl.call(ce,Be,1),--this.size,!0)},Ho.prototype.get=function(Ut){var ce=this.__data__,Be=qu(ce,Ut);return Be<0?void 0:ce[Be][1]},Ho.prototype.has=function(Ut){return qu(this.__data__,Ut)>-1},Ho.prototype.set=function(Ut,ce){var Be=this.__data__,dn=qu(Be,Ut);return dn<0?(++this.size,Be.push([Ut,ce])):Be[dn][1]=ce,this},ju.prototype.clear=function(){this.size=0,this.__data__={hash:new di,map:new(Ql||Ho),string:new di}},ju.prototype.delete=function(Ut){var ce=js(this,Ut).delete(Ut);return this.size-=ce?1:0,ce},ju.prototype.get=function(Ut){return js(this,Ut).get(Ut)},ju.prototype.has=function(Ut){return js(this,Ut).has(Ut)},ju.prototype.set=function(Ut,ce){var Be=js(this,Ut),dn=Be.size;return Be.set(Ut,ce),this.size+=Be.size==dn?0:1,this},Oh.prototype.add=Oh.prototype.push=function(Ut){return this.__data__.set(Ut,"__lodash_hash_undefined__"),this},Oh.prototype.has=function(Ut){return this.__data__.has(Ut)},_u.prototype.clear=function(){this.__data__=new Ho,this.size=0},_u.prototype.delete=function(Ut){var ce=this.__data__,Be=ce.delete(Ut);return this.size=ce.size,Be},_u.prototype.get=function(Ut){return this.__data__.get(Ut)},_u.prototype.has=function(Ut){return this.__data__.has(Ut)},_u.prototype.set=function(Ut,ce){var Be=this.__data__;if(Be instanceof Ho){var dn=Be.__data__;if(!Ql||dn.length<199)return dn.push([Ut,ce]),this.size=++Be.size,this;Be=this.__data__=new ju(dn)}return Be.set(Ut,ce),this.size=Be.size,this};var wd=Jl?function(Ut){return Ut==null?[]:(Ut=Object(Ut),function(ce,Be){for(var dn=-1,Bi=ce==null?0:ce.length,xr=0,to=[];++dn<Bi;){var ti=ce[dn];Be(ti,dn,ce)&&(to[xr++]=ti)}return to}(Jl(Ut),function(ce){return Lh.call(Ut,ce)}))}:function(){return[]},qs=$s;function ui(Ut,ce){return!!(ce=ce==null?9007199254740991:ce)&&(typeof Ut=="number"||Ft.test(Ut))&&Ut>-1&&Ut%1==0&&Ut<ce}function Gs(Ut){if(Ut!=null){try{return Vu.call(Ut)}catch{}try{return Ut+""}catch{}}return""}function Lg(Ut,ce){return Ut===ce||Ut!=Ut&&ce!=ce}(So&&qs(new So(new ArrayBuffer(1)))!="[object DataView]"||Ql&&qs(new Ql)!=At||vu&&qs(vu.resolve())!="[object Promise]"||yu&&qs(new yu)!=ot||$u&&qs(new $u)!="[object WeakMap]")&&(qs=function(Ut){var ce=$s(Ut),Be=ce==tt?Ut.constructor:void 0,dn=Be?Gs(Be):"";if(dn)switch(dn){case tc:return"[object DataView]";case ua:return At;case Rc:return"[object Promise]";case xl:return ot;case bl:return"[object WeakMap]"}return ce});var Dc=wl(function(){return arguments}())?wl:function(Ut){return El(Ut)&&mu.call(Ut,"callee")&&!Lh.call(Ut,"callee")},Ca=Array.isArray,Rh=Fa||function(){return!1};function Nc(Ut){if(!ec(Ut))return!1;var ce=$s(Ut);return ce=="[object Function]"||ce=="[object GeneratorFunction]"||ce=="[object AsyncFunction]"||ce=="[object Proxy]"}function Df(Ut){return typeof Ut=="number"&&Ut>-1&&Ut%1==0&&Ut<=9007199254740991}function ec(Ut){var ce=typeof Ut;return Ut!=null&&(ce=="object"||ce=="function")}function El(Ut){return Ut!=null&&typeof Ut=="object"}var kh=Ue?function(Ut){return function(ce){return Ut(ce)}}(Ue):function(Ut){return El(Ut)&&Df(Ut.length)&&!!zt[$s(Ut)]};function Dh(Ut){return(ce=Ut)!=null&&Df(ce.length)&&!Nc(ce)?Ag(Ut):bd(Ut);var ce}L.exports=function(Ut,ce){return kf(Ut,ce)}}),ls={Polygon:zi,LineString:To,Point:no,MultiPolygon:yr,MultiLineString:yr,MultiPoint:yr};function Sa(L,U){return U.modes=Wt,U.getFeatureIdsAt=function(Q){return Et.click({point:Q},null,L).map(function(At){return At.properties.id})},U.getSelectedIds=function(){return L.store.getSelectedIds()},U.getSelected=function(){return{type:he,features:L.store.getSelectedIds().map(function(Q){return L.store.get(Q)}).map(function(Q){return Q.toGeoJSON()})}},U.getSelectedPoints=function(){return{type:he,features:L.store.getSelectedCoordinates().map(function(Q){return{type:_e,properties:{},geometry:{type:de,coordinates:Q.coordinates}}})}},U.set=function(Q){if(Q.type===void 0||Q.type!==he||!Array.isArray(Q.features))throw new Error("Invalid FeatureCollection");var At=L.store.createRenderBatch(),tt=L.store.getAllIds().slice(),ot=U.add(Q),ft=new ri(ot);return(tt=tt.filter(function(Ft){return!ft.has(Ft)})).length&&U.delete(tt),At(),ot},U.add=function(Q){var At=JSON.parse(JSON.stringify(Me(Q))).features.map(function(tt){if(tt.id=tt.id||Ai(),tt.geometry===null)throw new Error("Invalid geometry: null");if(L.store.get(tt.id)===void 0||L.store.get(tt.id).type!==tt.geometry.type){var ot=ls[tt.geometry.type];if(ot===void 0)throw new Error("Invalid geometry type: "+tt.geometry.type+".");var ft=new ot(L,tt);L.store.add(ft)}else{var Ft=L.store.get(tt.id);Ft.properties=tt.properties,oi(Ft.getCoordinates(),tt.geometry.coordinates)||Ft.incomingCoords(tt.geometry.coordinates)}return tt.id});return L.store.render(),At},U.get=function(Q){var At=L.store.get(Q);if(At)return At.toGeoJSON()},U.getAll=function(){return{type:he,features:L.store.getAll().map(function(Q){return Q.toGeoJSON()})}},U.delete=function(Q){return L.store.delete(Q,{silent:!0}),U.getMode()!==Wt.DIRECT_SELECT||L.store.getSelectedIds().length?L.store.render():L.events.changeMode(Wt.SIMPLE_SELECT,void 0,{silent:!0}),U},U.deleteAll=function(){return L.store.delete(L.store.getAllIds(),{silent:!0}),U.getMode()===Wt.DIRECT_SELECT?L.events.changeMode(Wt.SIMPLE_SELECT,void 0,{silent:!0}):L.store.render(),U},U.changeMode=function(Q,At){return At===void 0&&(At={}),Q===Wt.SIMPLE_SELECT&&U.getMode()===Wt.SIMPLE_SELECT?(tt=At.featureIds||[],ot=L.store.getSelectedIds(),tt.length===ot.length&&JSON.stringify(tt.map(function(ft){return ft}).sort())===JSON.stringify(ot.map(function(ft){return ft}).sort())||(L.store.setSelected(At.featureIds,{silent:!0}),L.store.render()),U):(Q===Wt.DIRECT_SELECT&&U.getMode()===Wt.DIRECT_SELECT&&At.featureId===L.store.getSelectedIds()[0]||L.events.changeMode(Q,At,{silent:!0}),U);var tt,ot},U.getMode=function(){return L.events.getMode()},U.trash=function(){return L.events.trash({silent:!0}),U},U.combineFeatures=function(){return L.events.combineFeatures({silent:!0}),U},U.uncombineFeatures=function(){return L.events.uncombineFeatures({silent:!0}),U},U.setFeatureProperty=function(Q,At,tt){return L.store.setFeatureProperty(Q,At,tt),U},U}var Oc=function(L,U){var Q={options:L=function(tt){tt===void 0&&(tt={});var ot=Vr(tt);return tt.controls||(ot.controls={}),tt.displayControlsDefault===!1?ot.controls=Vr(Hi,tt.controls):ot.controls=Vr(ro,tt.controls),(ot=Vr(_l,ot)).styles=wa(ot.styles,"cold").concat(wa(ot.styles,"hot")),ot}(L)};U=Sa(Q,U),Q.api=U;var At=nt(Q);return U.onAdd=At.onAdd,U.onRemove=At.onRemove,U.types=se,U.options=L,U};function Wa(L){Oc(L,this)}return Wa.modes=Pi,Wa})})(PV);var hEt=PV.exports,fl=63710088e-1,wR={meters:fl,metres:fl,millimeters:fl*1e3,millimetres:fl*1e3,centimeters:fl*100,centimetres:fl*100,kilometers:fl/1e3,kilometres:fl/1e3,miles:fl/1609.344,nauticalmiles:fl/1852,inches:fl*39.37,yards:fl/1.0936,feet:fl*3.28084,radians:1,degrees:fl/111325},m_t={meters:1,metres:1,millimeters:1e3,millimetres:1e3,centimeters:100,centimetres:100,kilometers:1/1e3,kilometres:1/1e3,miles:1/1609.344,nauticalmiles:1/1852,inches:39.37,yards:1/1.0936,feet:3.28084,radians:1/fl,degrees:1/111325},SR={meters:1,metres:1,millimeters:1e6,millimetres:1e6,centimeters:1e4,centimetres:1e4,kilometers:1e-6,kilometres:1e-6,acres:247105e-9,miles:386e-9,yards:1.195990046,feet:10.763910417,inches:1550.003100006};function id(e,t,n){if(n=n||{},!mp(n))throw new Error("options is invalid");var r=n.bbox,i=n.id;if(e===void 0)throw new Error("geometry is required");if(t&&t.constructor!==Object)throw new Error("properties must be an Object");r&&qb(r),i&&PR(i);var a={type:"Feature"};return i&&(a.id=i),r&&(a.bbox=r),a.properties=t||{},a.geometry=e,a}function v_t(e,t,n){if(n=n||{},!mp(n))throw new Error("options is invalid");var r=n.bbox;if(!e)throw new Error("type is required");if(!t)throw new Error("coordinates is required");if(!Array.isArray(t))throw new Error("coordinates must be an Array");r&&qb(r);var i;switch(e){case"Point":i=U0(t).geometry;break;case"LineString":i=$0(t).geometry;break;case"Polygon":i=V0(t).geometry;break;case"MultiPoint":i=ER(t).geometry;break;case"MultiLineString":i=TV(t).geometry;break;case"MultiPolygon":i=MV(t).geometry;break;default:throw new Error(e+" is invalid")}return r&&(i.bbox=r),i}function U0(e,t,n){if(!e)throw new Error("coordinates is required");if(!Array.isArray(e))throw new Error("coordinates must be an Array");if(e.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!su(e[0])||!su(e[1]))throw new Error("coordinates must contain numbers");return id({type:"Point",coordinates:e},t,n)}function y_t(e,t,n){if(!e)throw new Error("coordinates is required");if(!Array.isArray(e))throw new Error("coordinates must be an Array");return fg(e.map(function(r){return U0(r,t)}),n)}function V0(e,t,n){if(!e)throw new Error("coordinates is required");for(var r=0;r<e.length;r++){var i=e[r];if(i.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");for(var a=0;a<i[i.length-1].length;a++){if(r===0&&a===0&&!su(i[0][0])||!su(i[0][1]))throw new Error("coordinates must contain numbers");if(i[i.length-1][a]!==i[0][a])throw new Error("First and last Position are not equivalent.")}}return id({type:"Polygon",coordinates:e},t,n)}function __t(e,t,n){if(!e)throw new Error("coordinates is required");if(!Array.isArray(e))throw new Error("coordinates must be an Array");return fg(e.map(function(r){return V0(r,t)}),n)}function $0(e,t,n){if(!e)throw new Error("coordinates is required");if(e.length<2)throw new Error("coordinates must be an array of two or more positions");if(!su(e[0][1])||!su(e[0][1]))throw new Error("coordinates must contain numbers");return id({type:"LineString",coordinates:e},t,n)}function x_t(e,t,n){if(!e)throw new Error("coordinates is required");if(!Array.isArray(e))throw new Error("coordinates must be an Array");return fg(e.map(function(r){return $0(r,t)}),n)}function fg(e,t){if(t=t||{},!mp(t))throw new Error("options is invalid");var n=t.bbox,r=t.id;if(!e)throw new Error("No features passed");if(!Array.isArray(e))throw new Error("features must be an Array");n&&qb(n),r&&PR(r);var i={type:"FeatureCollection"};return r&&(i.id=r),n&&(i.bbox=n),i.features=e,i}function TV(e,t,n){if(!e)throw new Error("coordinates is required");return id({type:"MultiLineString",coordinates:e},t,n)}function ER(e,t,n){if(!e)throw new Error("coordinates is required");return id({type:"MultiPoint",coordinates:e},t,n)}function MV(e,t,n){if(!e)throw new Error("coordinates is required");return id({type:"MultiPolygon",coordinates:e},t,n)}function b_t(e,t,n){if(!e)throw new Error("geometries is required");if(!Array.isArray(e))throw new Error("geometries must be an Array");return id({type:"GeometryCollection",geometries:e},t,n)}function w_t(e,t){if(e==null||isNaN(e))throw new Error("num is required");if(t&&!(t>=0))throw new Error("precision must be a positive number");var n=Math.pow(10,t||0);return Math.round(e*n)/n}function CR(e,t){if(e==null)throw new Error("radians is required");if(t&&typeof t!="string")throw new Error("units must be a string");var n=wR[t||"kilometers"];if(!n)throw new Error(t+" units is invalid");return e*n}function IR(e,t){if(e==null)throw new Error("distance is required");if(t&&typeof t!="string")throw new Error("units must be a string");var n=wR[t||"kilometers"];if(!n)throw new Error(t+" units is invalid");return e/n}function S_t(e,t){return AV(IR(e,t))}function E_t(e){if(e==null)throw new Error("bearing is required");var t=e%360;return t<0&&(t+=360),t}function AV(e){if(e==null)throw new Error("radians is required");var t=e%(2*Math.PI);return t*180/Math.PI}function jb(e){if(e==null)throw new Error("degrees is required");var t=e%360;return t*Math.PI/180}function C_t(e,t,n){if(e==null)throw new Error("length is required");if(!(e>=0))throw new Error("length must be a positive number");return CR(IR(e,t),n||"kilometers")}function I_t(e,t,n){if(e==null)throw new Error("area is required");if(!(e>=0))throw new Error("area must be a positive number");var r=SR[t||"meters"];if(!r)throw new Error("invalid original units");var i=SR[n||"kilometers"];if(!i)throw new Error("invalid final units");return e/r*i}function su(e){return!isNaN(e)&&e!==null&&!Array.isArray(e)}function mp(e){return!!e&&e.constructor===Object}function qb(e){if(!e)throw new Error("bbox is required");if(!Array.isArray(e))throw new Error("bbox must be an Array");if(e.length!==4&&e.length!==6)throw new Error("bbox must be an Array of 4 or 6 numbers");e.forEach(function(t){if(!su(t))throw new Error("bbox must only contain numbers")})}function PR(e){if(!e)throw new Error("id is required");if(["string","number"].indexOf(typeof e)===-1)throw new Error("id must be a number or a string")}function P_t(){throw new Error("method has been renamed to `radiansToDegrees`")}function T_t(){throw new Error("method has been renamed to `degreesToRadians`")}function M_t(){throw new Error("method has been renamed to `lengthToDegrees`")}function A_t(){throw new Error("method has been renamed to `lengthToRadians`")}function L_t(){throw new Error("method has been renamed to `radiansToLength`")}function O_t(){throw new Error("method has been renamed to `bearingToAzimuth`")}function R_t(){throw new Error("method has been renamed to `convertLength`")}Object.freeze({earthRadius:fl,factors:wR,unitsFactors:m_t,areaFactors:SR,feature:id,geometry:v_t,point:U0,points:y_t,polygon:V0,polygons:__t,lineString:$0,lineStrings:x_t,featureCollection:fg,multiLineString:TV,multiPoint:ER,multiPolygon:MV,geometryCollection:b_t,round:w_t,radiansToLength:CR,lengthToRadians:IR,lengthToDegrees:S_t,bearingToAzimuth:E_t,radiansToDegrees:AV,degreesToRadians:jb,convertLength:C_t,convertArea:I_t,isNumber:su,isObject:mp,validateBBox:qb,validateId:PR,radians2degrees:P_t,degrees2radians:T_t,distanceToDegrees:M_t,distanceToRadians:A_t,radiansToDistance:L_t,bearingToAngle:O_t,convertDistance:R_t});function j0(e,t,n){if(e!==null)for(var r,i,a,o,u,c,g,_=0,E=0,C,O=e.type,R=O==="FeatureCollection",D=O==="Feature",B=R?e.features.length:1,z=0;z<B;z++){g=R?e.features[z].geometry:D?e.geometry:e,C=g?g.type==="GeometryCollection":!1,u=C?g.geometries.length:1;for(var k=0;k<u;k++){var $=0,K=0;if(o=C?g.geometries[k]:g,o!==null){c=o.coordinates;var et=o.type;switch(_=n&&(et==="Polygon"||et==="MultiPolygon")?1:0,et){case null:break;case"Point":t(c,E,z,$,K),E++,$++;break;case"LineString":case"MultiPoint":for(r=0;r<c.length;r++)t(c[r],E,z,$,K),E++,et==="MultiPoint"&&$++;et==="LineString"&&$++;break;case"Polygon":case"MultiLineString":for(r=0;r<c.length;r++){for(i=0;i<c[r].length-_;i++)t(c[r][i],E,z,$,K),E++;et==="MultiLineString"&&$++,et==="Polygon"&&K++}et==="Polygon"&&$++;break;case"MultiPolygon":for(r=0;r<c.length;r++){for(et==="MultiPolygon"&&(K=0),i=0;i<c[r].length;i++){for(a=0;a<c[r][i].length-_;a++)t(c[r][i][a],E,z,$,K),E++;K++}$++}break;case"GeometryCollection":for(r=0;r<o.geometries.length;r++)j0(o.geometries[r],t,n);break;default:throw new Error("Unknown Geometry Type")}}}}}function LV(e,t,n,r){var i=n;return j0(e,function(a,o,u,c,g){o===0&&n===void 0?i=a:i=t(i,a,o,u,c,g)},r),i}function OV(e,t){var n;switch(e.type){case"FeatureCollection":for(n=0;n<e.features.length;n++)t(e.features[n].properties,n);break;case"Feature":t(e.properties,0);break}}function k_t(e,t,n){var r=n;return OV(e,function(i,a){a===0&&n===void 0?r=i:r=t(r,i,a)}),r}function uI(e,t){if(e.type==="Feature")t(e,0);else if(e.type==="FeatureCollection")for(var n=0;n<e.features.length;n++)t(e.features[n],n)}function D_t(e,t,n){var r=n;return uI(e,function(i,a){a===0&&n===void 0?r=i:r=t(r,i,a)}),r}function N_t(e){var t=[];return j0(e,function(n){t.push(n)}),t}function TR(e,t){var n,r,i,a,o,u,c,g,_,E,C=0,O=e.type==="FeatureCollection",R=e.type==="Feature",D=O?e.features.length:1;for(n=0;n<D;n++){for(u=O?e.features[n].geometry:R?e.geometry:e,g=O?e.features[n].properties:R?e.properties:{},_=O?e.features[n].bbox:R?e.bbox:void 0,E=O?e.features[n].id:R?e.id:void 0,c=u?u.type==="GeometryCollection":!1,o=c?u.geometries.length:1,i=0;i<o;i++){if(a=c?u.geometries[i]:u,a===null){t(null,C,g,_,E);continue}switch(a.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":{t(a,C,g,_,E);break}case"GeometryCollection":{for(r=0;r<a.geometries.length;r++)t(a.geometries[r],C,g,_,E);break}default:throw new Error("Unknown Geometry Type")}}C++}}function F_t(e,t,n){var r=n;return TR(e,function(i,a,o,u,c){a===0&&n===void 0?r=i:r=t(r,i,a,o,u,c)}),r}function lI(e,t){TR(e,function(n,r,i,a,o){var u=n===null?null:n.type;switch(u){case null:case"Point":case"LineString":case"Polygon":t(id(n,i,{bbox:a,id:o}),r,0);return}var c;switch(u){case"MultiPoint":c="Point";break;case"MultiLineString":c="LineString";break;case"MultiPolygon":c="Polygon";break}n.coordinates.forEach(function(g,_){var E={type:c,coordinates:g};t(id(E,i),r,_)})})}function z_t(e,t,n){var r=n;return lI(e,function(i,a,o){a===0&&o===0&&n===void 0?r=i:r=t(r,i,a,o)}),r}function RV(e,t){lI(e,function(n,r,i){var a=0;if(!!n.geometry){var o=n.geometry.type;o==="Point"||o==="MultiPoint"||LV(n,function(u,c,g,_,E,C){var O=$0([u,c],n.properties);return t(O,r,i,C,a),a++,c})}})}function kV(e,t,n){var r=n,i=!1;return RV(e,function(a,o,u,c,g){i===!1&&n===void 0?r=a:r=t(r,a,o,u,c,g),i=!0}),r}function DV(e,t){if(!e)throw new Error("geojson is required");lI(e,function(n,r,i){if(n.geometry!==null){var a=n.geometry.type,o=n.geometry.coordinates;switch(a){case"LineString":t(n,r,i,0,0);break;case"Polygon":for(var u=0;u<o.length;u++)t($0(o[u],n.properties),r,i,u);break}}})}function B_t(e,t,n){var r=n;return DV(e,function(i,a,o,u){a===0&&n===void 0?r=i:r=t(r,i,a,o,u)}),r}Object.freeze({coordEach:j0,coordReduce:LV,propEach:OV,propReduce:k_t,featureEach:uI,featureReduce:D_t,coordAll:N_t,geomEach:TR,geomReduce:F_t,flattenEach:lI,flattenReduce:z_t,segmentEach:RV,segmentReduce:kV,lineEach:DV,lineReduce:B_t});function U_t(e){var t=[1/0,1/0,-1/0,-1/0];return j0(e,function(n){t[0]>n[0]&&(t[0]=n[0]),t[1]>n[1]&&(t[1]=n[1]),t[2]<n[0]&&(t[2]=n[0]),t[3]<n[1]&&(t[3]=n[1])}),t}function cI(e){if(!e)throw new Error("obj is required");var t=MR(e);if(t.length>1&&su(t[0])&&su(t[1]))return t;throw new Error("Coordinate is not a valid Point")}function MR(e){if(!e)throw new Error("obj is required");var t;if(e.length?t=e:e.coordinates?t=e.coordinates:e.geometry&&e.geometry.coordinates&&(t=e.geometry.coordinates),t)return AR(t),t;throw new Error("No valid coordinates")}function AR(e){if(e.length>1&&su(e[0])&&su(e[1]))return!0;if(Array.isArray(e[0])&&e[0].length)return AR(e[0]);throw new Error("coordinates must only contain numbers")}function V_t(e,t,n){if(!t||!n)throw new Error("type and name required");if(!e||e.type!==t)throw new Error("Invalid input to "+n+": must be a "+t+", given "+e.type)}function $_t(e,t,n){if(!e)throw new Error("No feature passed");if(!n)throw new Error(".featureOf() requires a name");if(!e||e.type!=="Feature"||!e.geometry)throw new Error("Invalid input to "+n+", Feature with geometry required");if(!e.geometry||e.geometry.type!==t)throw new Error("Invalid input to "+n+": must be a "+t+", given "+e.geometry.type)}function j_t(e,t,n){if(!e)throw new Error("No featureCollection passed");if(!n)throw new Error(".collectionOf() requires a name");if(!e||e.type!=="FeatureCollection")throw new Error("Invalid input to "+n+", FeatureCollection required");for(var r=0;r<e.features.length;r++){var i=e.features[r];if(!i||i.type!=="Feature"||!i.geometry)throw new Error("Invalid input to "+n+", Feature with geometry required");if(!i.geometry||i.geometry.type!==t)throw new Error("Invalid input to "+n+": must be a "+t+", given "+i.geometry.type)}}function q_t(e){if(!e)throw new Error("geojson is required");if(e.geometry!==void 0)return e.geometry;if(e.coordinates||e.geometries)return e;throw new Error("geojson must be a valid Feature or Geometry Object")}function G_t(){throw new Error("invariant.getGeomType has been deprecated in v5.0 in favor of invariant.getType")}function W_t(e,t){if(!e)throw new Error((t||"geojson")+" is required");if(e.geometry&&e.geometry.type)return e.geometry.type;if(e.type)return e.type;throw new Error((t||"geojson")+" is invalid")}Object.freeze({getCoord:cI,getCoords:MR,containsNumber:AR,geojsonType:V_t,featureOf:$_t,collectionOf:j_t,getGeom:q_t,getGeomType:G_t,getType:W_t});var H_t=NV;function NV(e,t,n,r,i){for(n=n||0,r=r||e.length-1,i=i||X_t;r>n;){if(r-n>600){var a=r-n+1,o=t-n+1,u=Math.log(a),c=.5*Math.exp(2*u/3),g=.5*Math.sqrt(u*c*(a-c)/a)*(o-a/2<0?-1:1),_=Math.max(n,Math.floor(t-o*c/a+g)),E=Math.min(r,Math.floor(t+(a-o)*c/a+g));NV(e,t,_,E,i)}var C=e[t],O=n,R=r;for(Gb(e,n,t),i(e[r],C)>0&&Gb(e,n,r);O<R;){for(Gb(e,O,R),O++,R--;i(e[O],C)<0;)O++;for(;i(e[R],C)>0;)R--}i(e[n],C)===0?Gb(e,n,R):(R++,Gb(e,R,r)),R<=t&&(n=R+1),t<=R&&(r=R-1)}}function Gb(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function X_t(e,t){return e<t?-1:e>t?1:0}var FV=fI;function fI(e,t){if(!(this instanceof fI))return new fI(e,t);this._maxEntries=Math.max(4,e||9),this._minEntries=Math.max(2,Math.ceil(this._maxEntries*.4)),t&&this._initFormat(t),this.clear()}fI.prototype={all:function(){return this._all(this.data,[])},search:function(e){var t=this.data,n=[],r=this.toBBox;if(!pI(e,t))return n;for(var i=[],a,o,u,c;t;){for(a=0,o=t.children.length;a<o;a++)u=t.children[a],c=t.leaf?r(u):u,pI(e,c)&&(t.leaf?n.push(u):OR(e,c)?this._all(u,n):i.push(u));t=i.pop()}return n},collides:function(e){var t=this.data,n=this.toBBox;if(!pI(e,t))return!1;for(var r=[],i,a,o,u;t;){for(i=0,a=t.children.length;i<a;i++)if(o=t.children[i],u=t.leaf?n(o):o,pI(e,u)){if(t.leaf||OR(e,u))return!0;r.push(o)}t=r.pop()}return!1},load:function(e){if(!(e&&e.length))return this;if(e.length<this._minEntries){for(var t=0,n=e.length;t<n;t++)this.insert(e[t]);return this}var r=this._build(e.slice(),0,e.length-1,0);if(!this.data.children.length)this.data=r;else if(this.data.height===r.height)this._splitRoot(this.data,r);else{if(this.data.height<r.height){var i=this.data;this.data=r,r=i}this._insert(r,this.data.height-r.height-1,!0)}return this},insert:function(e){return e&&this._insert(e,this.data.height-1),this},clear:function(){return this.data=G0([]),this},remove:function(e,t){if(!e)return this;for(var n=this.data,r=this.toBBox(e),i=[],a=[],o,u,c,g;n||i.length;){if(n||(n=i.pop(),u=i[i.length-1],o=a.pop(),g=!0),n.leaf&&(c=Y_t(e,n.children,t),c!==-1))return n.children.splice(c,1),i.push(n),this._condense(i),this;!g&&!n.leaf&&OR(n,r)?(i.push(n),a.push(o),o=0,u=n,n=n.children[0]):u?(o++,n=u.children[o],g=!1):n=null}return this},toBBox:function(e){return e},compareMinX:zV,compareMinY:BV,toJSON:function(){return this.data},fromJSON:function(e){return this.data=e,this},_all:function(e,t){for(var n=[];e;)e.leaf?t.push.apply(t,e.children):n.push.apply(n,e.children),e=n.pop();return t},_build:function(e,t,n,r){var i=n-t+1,a=this._maxEntries,o;if(i<=a)return o=G0(e.slice(t,n+1)),q0(o,this.toBBox),o;r||(r=Math.ceil(Math.log(i)/Math.log(a)),a=Math.ceil(i/Math.pow(a,r-1))),o=G0([]),o.leaf=!1,o.height=r;var u=Math.ceil(i/a),c=u*Math.ceil(Math.sqrt(a)),g,_,E,C;for(UV(e,t,n,c,this.compareMinX),g=t;g<=n;g+=c)for(E=Math.min(g+c-1,n),UV(e,g,E,u,this.compareMinY),_=g;_<=E;_+=u)C=Math.min(_+u-1,E),o.children.push(this._build(e,_,C,r-1));return q0(o,this.toBBox),o},_chooseSubtree:function(e,t,n,r){for(var i,a,o,u,c,g,_,E;r.push(t),!(t.leaf||r.length-1===n);){for(_=E=1/0,i=0,a=t.children.length;i<a;i++)o=t.children[i],c=LR(o),g=Z_t(e,o)-c,g<E?(E=g,_=c<_?c:_,u=o):g===E&&c<_&&(_=c,u=o);t=u||t.children[0]}return t},_insert:function(e,t,n){var r=this.toBBox,i=n?e:r(e),a=[],o=this._chooseSubtree(i,this.data,t,a);for(o.children.push(e),Hb(o,i);t>=0&&a[t].children.length>this._maxEntries;)this._split(a,t),t--;this._adjustParentBBoxes(i,a,t)},_split:function(e,t){var n=e[t],r=n.children.length,i=this._minEntries;this._chooseSplitAxis(n,i,r);var a=this._chooseSplitIndex(n,i,r),o=G0(n.children.splice(a,n.children.length-a));o.height=n.height,o.leaf=n.leaf,q0(n,this.toBBox),q0(o,this.toBBox),t?e[t-1].children.push(o):this._splitRoot(n,o)},_splitRoot:function(e,t){this.data=G0([e,t]),this.data.height=e.height+1,this.data.leaf=!1,q0(this.data,this.toBBox)},_chooseSplitIndex:function(e,t,n){var r,i,a,o,u,c,g,_;for(c=g=1/0,r=t;r<=n-t;r++)i=Wb(e,0,r,this.toBBox),a=Wb(e,r,n,this.toBBox),o=K_t(i,a),u=LR(i)+LR(a),o<c?(c=o,_=r,g=u<g?u:g):o===c&&u<g&&(g=u,_=r);return _},_chooseSplitAxis:function(e,t,n){var r=e.leaf?this.compareMinX:zV,i=e.leaf?this.compareMinY:BV,a=this._allDistMargin(e,t,n,r),o=this._allDistMargin(e,t,n,i);a<o&&e.children.sort(r)},_allDistMargin:function(e,t,n,r){e.children.sort(r);var i=this.toBBox,a=Wb(e,0,t,i),o=Wb(e,n-t,n,i),u=hI(a)+hI(o),c,g;for(c=t;c<n-t;c++)g=e.children[c],Hb(a,e.leaf?i(g):g),u+=hI(a);for(c=n-t-1;c>=t;c--)g=e.children[c],Hb(o,e.leaf?i(g):g),u+=hI(o);return u},_adjustParentBBoxes:function(e,t,n){for(var r=n;r>=0;r--)Hb(t[r],e)},_condense:function(e){for(var t=e.length-1,n;t>=0;t--)e[t].children.length===0?t>0?(n=e[t-1].children,n.splice(n.indexOf(e[t]),1)):this.clear():q0(e[t],this.toBBox)},_initFormat:function(e){var t=["return a"," - b",";"];this.compareMinX=new Function("a","b",t.join(e[0])),this.compareMinY=new Function("a","b",t.join(e[1])),this.toBBox=new Function("a","return {minX: a"+e[0]+", minY: a"+e[1]+", maxX: a"+e[2]+", maxY: a"+e[3]+"};")}};function Y_t(e,t,n){if(!n)return t.indexOf(e);for(var r=0;r<t.length;r++)if(n(e,t[r]))return r;return-1}function q0(e,t){Wb(e,0,e.children.length,t,e)}function Wb(e,t,n,r,i){i||(i=G0(null)),i.minX=1/0,i.minY=1/0,i.maxX=-1/0,i.maxY=-1/0;for(var a=t,o;a<n;a++)o=e.children[a],Hb(i,e.leaf?r(o):o);return i}function Hb(e,t){return e.minX=Math.min(e.minX,t.minX),e.minY=Math.min(e.minY,t.minY),e.maxX=Math.max(e.maxX,t.maxX),e.maxY=Math.max(e.maxY,t.maxY),e}function zV(e,t){return e.minX-t.minX}function BV(e,t){return e.minY-t.minY}function LR(e){return(e.maxX-e.minX)*(e.maxY-e.minY)}function hI(e){return e.maxX-e.minX+(e.maxY-e.minY)}function Z_t(e,t){return(Math.max(t.maxX,e.maxX)-Math.min(t.minX,e.minX))*(Math.max(t.maxY,e.maxY)-Math.min(t.minY,e.minY))}function K_t(e,t){var n=Math.max(e.minX,t.minX),r=Math.max(e.minY,t.minY),i=Math.min(e.maxX,t.maxX),a=Math.min(e.maxY,t.maxY);return Math.max(0,i-n)*Math.max(0,a-r)}function OR(e,t){return e.minX<=t.minX&&e.minY<=t.minY&&t.maxX<=e.maxX&&t.maxY<=e.maxY}function pI(e,t){return t.minX<=e.maxX&&t.minY<=e.maxY&&t.maxX>=e.minX&&t.maxY>=e.minY}function G0(e){return{children:e,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function UV(e,t,n,r,i){for(var a=[t,n],o;a.length;)n=a.pop(),t=a.pop(),!(n-t<=r)&&(o=t+Math.ceil((n-t)/r/2)*r,H_t(e,o,t,n,i),a.push(t,o,o,n))}function hg(e,t){return t={exports:{}},e(t,t.exports),t.exports}var dI=J_t,VV=+(Math.pow(2,27)+1);function J_t(e,t,n){var r=e*t,i=VV*e,a=i-e,o=i-a,u=e-o,c=VV*t,g=c-t,_=c-g,E=t-_,C=r-o*_,O=C-u*_,R=O-o*E,D=u*E-R;return n?(n[0]=D,n[1]=r,n):[D,r]}var Q_t=e0t;function t0t(e,t){var n=e+t,r=n-e,i=n-r,a=t-r,o=e-i,u=o+a;return u?[u,n]:[n]}function e0t(e,t){var n=e.length|0,r=t.length|0;if(n===1&&r===1)return t0t(e[0],t[0]);var i=n+r,a=new Array(i),o=0,u=0,c=0,g=Math.abs,_=e[u],E=g(_),C=t[c],O=g(C),R,D;E<O?(D=_,u+=1,u<n&&(_=e[u],E=g(_))):(D=C,c+=1,c<r&&(C=t[c],O=g(C))),u<n&&E<O||c>=r?(R=_,u+=1,u<n&&(_=e[u],E=g(_))):(R=C,c+=1,c<r&&(C=t[c],O=g(C)));for(var B=R+D,z=B-R,k=D-z,$=k,K=B,et,mt,wt,Ot,Bt;u<n&&c<r;)E<O?(R=_,u+=1,u<n&&(_=e[u],E=g(_))):(R=C,c+=1,c<r&&(C=t[c],O=g(C))),D=$,B=R+D,z=B-R,k=D-z,k&&(a[o++]=k),et=K+B,mt=et-K,wt=et-mt,Ot=B-mt,Bt=K-wt,$=Bt+Ot,K=et;for(;u<n;)R=_,D=$,B=R+D,z=B-R,k=D-z,k&&(a[o++]=k),et=K+B,mt=et-K,wt=et-mt,Ot=B-mt,Bt=K-wt,$=Bt+Ot,K=et,u+=1,u<n&&(_=e[u]);for(;c<r;)R=C,D=$,B=R+D,z=B-R,k=D-z,k&&(a[o++]=k),et=K+B,mt=et-K,wt=et-mt,Ot=B-mt,Bt=K-wt,$=Bt+Ot,K=et,c+=1,c<r&&(C=t[c]);return $&&(a[o++]=$),K&&(a[o++]=K),o||(a[o++]=0),a.length=o,a}var n0t=r0t;function r0t(e,t,n){var r=e+t,i=r-e,a=r-i,o=t-i,u=e-a;return n?(n[0]=u+o,n[1]=r,n):[u+o,r]}var i0t=o0t;function o0t(e,t){var n=e.length;if(n===1){var r=dI(e[0],t);return r[0]?r:[r[1]]}var i=new Array(2*n),a=[.1,.1],o=[.1,.1],u=0;dI(e[0],t,a),a[0]&&(i[u++]=a[0]);for(var c=1;c<n;++c){dI(e[c],t,o);var g=a[1];n0t(g,o[0],a),a[0]&&(i[u++]=a[0]);var _=o[1],E=a[1],C=_+E,O=C-_,R=E-O;a[1]=C,R&&(i[u++]=R)}return a[1]&&(i[u++]=a[1]),u===0&&(i[u++]=0),i.length=u,i}var a0t=u0t;function s0t(e,t){var n=e+t,r=n-e,i=n-r,a=t-r,o=e-i,u=o+a;return u?[u,n]:[n]}function u0t(e,t){var n=e.length|0,r=t.length|0;if(n===1&&r===1)return s0t(e[0],-t[0]);var i=n+r,a=new Array(i),o=0,u=0,c=0,g=Math.abs,_=e[u],E=g(_),C=-t[c],O=g(C),R,D;E<O?(D=_,u+=1,u<n&&(_=e[u],E=g(_))):(D=C,c+=1,c<r&&(C=-t[c],O=g(C))),u<n&&E<O||c>=r?(R=_,u+=1,u<n&&(_=e[u],E=g(_))):(R=C,c+=1,c<r&&(C=-t[c],O=g(C)));for(var B=R+D,z=B-R,k=D-z,$=k,K=B,et,mt,wt,Ot,Bt;u<n&&c<r;)E<O?(R=_,u+=1,u<n&&(_=e[u],E=g(_))):(R=C,c+=1,c<r&&(C=-t[c],O=g(C))),D=$,B=R+D,z=B-R,k=D-z,k&&(a[o++]=k),et=K+B,mt=et-K,wt=et-mt,Ot=B-mt,Bt=K-wt,$=Bt+Ot,K=et;for(;u<n;)R=_,D=$,B=R+D,z=B-R,k=D-z,k&&(a[o++]=k),et=K+B,mt=et-K,wt=et-mt,Ot=B-mt,Bt=K-wt,$=Bt+Ot,K=et,u+=1,u<n&&(_=e[u]);for(;c<r;)R=C,D=$,B=R+D,z=B-R,k=D-z,k&&(a[o++]=k),et=K+B,mt=et-K,wt=et-mt,Ot=B-mt,Bt=K-wt,$=Bt+Ot,K=et,c+=1,c<r&&(C=-t[c]);return $&&(a[o++]=$),K&&(a[o++]=K),o||(a[o++]=0),a.length=o,a}var $V=hg(function(e){var t=5,n=11102230246251565e-32,r=(3+16*n)*n,i=(7+56*n)*n;function a(B,z){for(var k=new Array(B.length-1),$=1;$<B.length;++$)for(var K=k[$-1]=new Array(B.length-1),et=0,mt=0;et<B.length;++et)et!==z&&(K[mt++]=B[$][et]);return k}function o(B){for(var z=new Array(B),k=0;k<B;++k){z[k]=new Array(B);for(var $=0;$<B;++$)z[k][$]=["m",$,"[",B-k-1,"]"].join("")}return z}function u(B){return B&1?"-":""}function c(B){if(B.length===1)return B[0];if(B.length===2)return["sum(",B[0],",",B[1],")"].join("");var z=B.length>>1;return["sum(",c(B.slice(0,z)),",",c(B.slice(z)),")"].join("")}function g(B){if(B.length===2)return[["sum(prod(",B[0][0],",",B[1][1],"),prod(-",B[0][1],",",B[1][0],"))"].join("")];for(var z=[],k=0;k<B.length;++k)z.push(["scale(",c(g(a(B,k))),",",u(k),B[0][k],")"].join(""));return z}function _(B){for(var z=[],k=[],$=o(B),K=[],et=0;et<B;++et)(et&1)==0?z.push.apply(z,g(a($,et))):k.push.apply(k,g(a($,et))),K.push("m"+et);var mt=c(z),wt=c(k),Ot="orientation"+B+"Exact",Bt=["function ",Ot,"(",K.join(),"){var p=",mt,",n=",wt,",d=sub(p,n);return d[d.length-1];};return ",Ot].join(""),se=new Function("sum","prod","scale","sub",Bt);return se(Q_t,dI,i0t,a0t)}var E=_(3),C=_(4),O=[function(){return 0},function(){return 0},function(z,k){return k[0]-z[0]},function(z,k,$){var K=(z[1]-$[1])*(k[0]-$[0]),et=(z[0]-$[0])*(k[1]-$[1]),mt=K-et,wt;if(K>0){if(et<=0)return mt;wt=K+et}else if(K<0){if(et>=0)return mt;wt=-(K+et)}else return mt;var Ot=r*wt;return mt>=Ot||mt<=-Ot?mt:E(z,k,$)},function(z,k,$,K){var et=z[0]-K[0],mt=k[0]-K[0],wt=$[0]-K[0],Ot=z[1]-K[1],Bt=k[1]-K[1],se=$[1]-K[1],_e=z[2]-K[2],Ne=k[2]-K[2],He=$[2]-K[2],de=mt*se,he=wt*Bt,Ge=wt*Ot,Yt=et*se,te=et*Bt,ve=mt*Ot,Wt=_e*(de-he)+Ne*(Ge-Yt)+He*(te-ve),be=(Math.abs(de)+Math.abs(he))*Math.abs(_e)+(Math.abs(Ge)+Math.abs(Yt))*Math.abs(Ne)+(Math.abs(te)+Math.abs(ve))*Math.abs(He),De=i*be;return Wt>De||-Wt>De?Wt:C(z,k,$,K)}];function R(B){var z=O[B.length];return z||(z=O[B.length]=_(B.length)),z.apply(void 0,B)}function D(){for(;O.length<=t;)O.push(_(O.length));for(var B=[],z=["slow"],k=0;k<=t;++k)B.push("a"+k),z.push("o"+k);for(var $=["function getOrientation(",B.join(),"){switch(arguments.length){case 0:case 1:return 0;"],k=2;k<=t;++k)$.push("case ",k,":return o",k,"(",B.slice(0,k).join(),");");$.push("}var s=new Array(arguments.length);for(var i=0;i<arguments.length;++i){s[i]=arguments[i]};return slow(s);}return getOrientation"),z.push($.join(""));var K=Function.apply(void 0,z);e.exports=K.apply(void 0,[R].concat(O));for(var k=0;k<=t;++k)e.exports[k]=O[k]}D()}),l0t=c0t,jV=$V[3];function c0t(e){var t=e.length;if(t<3){for(var g=new Array(t),n=0;n<t;++n)g[n]=n;return t===2&&e[0][0]===e[1][0]&&e[0][1]===e[1][1]?[0]:g}for(var r=new Array(t),n=0;n<t;++n)r[n]=n;r.sort(function(O,R){var D=e[O][0]-e[R][0];return D||e[O][1]-e[R][1]});for(var i=[r[0],r[1]],a=[r[0],r[1]],n=2;n<t;++n){for(var o=r[n],u=e[o],c=i.length;c>1&&jV(e[i[c-2]],e[i[c-1]],u)<=0;)c-=1,i.pop();for(i.push(o),c=a.length;c>1&&jV(e[a[c-2]],e[a[c-1]],u)>=0;)c-=1,a.pop();a.push(o)}for(var g=new Array(a.length+i.length-2),_=0,n=0,E=i.length;n<E;++n)g[_++]=i[n];for(var C=a.length-2;C>0;--C)g[_++]=a[C];return g}var qV=Xb,f0t=Xb;function Xb(e,t){if(!(this instanceof Xb))return new Xb(e,t);if(this.data=e||[],this.length=this.data.length,this.compare=t||h0t,this.length>0)for(var n=(this.length>>1)-1;n>=0;n--)this._down(n)}function h0t(e,t){return e<t?-1:e>t?1:0}Xb.prototype={push:function(e){this.data.push(e),this.length++,this._up(this.length-1)},pop:function(){if(this.length!==0){var e=this.data[0];return this.length--,this.length>0&&(this.data[0]=this.data[this.length],this._down(0)),this.data.pop(),e}},peek:function(){return this.data[0]},_up:function(e){for(var t=this.data,n=this.compare,r=t[e];e>0;){var i=e-1>>1,a=t[i];if(n(r,a)>=0)break;t[e]=a,e=i}t[e]=r},_down:function(e){for(var t=this.data,n=this.compare,r=this.length>>1,i=t[e];e<r;){var a=(e<<1)+1,o=a+1,u=t[a];if(o<this.length&&n(t[o],u)<0&&(a=o,u=t[o]),n(u,i)>=0)break;t[e]=u,e=a}t[e]=i}};qV.default=f0t;var p0t=function(e,t){for(var n=e[0],r=e[1],i=!1,a=0,o=t.length-1;a<t.length;o=a++){var u=t[a][0],c=t[a][1],g=t[o][0],_=t[o][1],E=c>r!=_>r&&n<(g-u)*(r-c)/(_-c)+u;E&&(i=!i)}return i},gI=$V[3],d0t=GV,g0t=GV;function GV(e,t,n){t=Math.max(0,t===void 0?2:t),n=n||0;for(var r=x0t(e),i=FV(16,["[0]","[1]","[0]","[1]"]).load(e),a=[],o=0,u;o<r.length;o++){var c=r[o];i.remove(c),u=XV(c,u),a.push(u)}var g=FV(16);for(o=0;o<a.length;o++)g.insert(RR(a[o]));for(var _=t*t,E=n*n;a.length;){var C=a.shift(),O=C.p,R=C.next.p,D=kR(O,R);if(!(D<E)){var B=D/_;c=m0t(i,C.prev.p,O,R,C.next.next.p,B,g),c&&Math.min(kR(c,O),kR(c,R))<=B&&(a.push(C),a.push(XV(c,C)),i.remove(c),g.remove(C),g.insert(RR(C)),g.insert(RR(C.next)))}}C=u;var z=[];do z.push(C.p),C=C.next;while(C!==u);return z.push(C.p),z}function m0t(e,t,n,r,i,a,o){for(var u=new qV(null,v0t),c=e.data;c;){for(var g=0;g<c.children.length;g++){var _=c.children[g],E=c.leaf?DR(_,n,r):y0t(n,r,_);E>a||u.push({node:_,dist:E})}for(;u.length&&!u.peek().node.children;){var C=u.pop(),O=C.node,R=DR(O,t,n),D=DR(O,r,i);if(C.dist<R&&C.dist<D&&HV(n,O,o)&&HV(r,O,o))return O}c=u.pop(),c&&(c=c.node)}return null}function v0t(e,t){return e.dist-t.dist}function y0t(e,t,n){if(WV(e,n)||WV(t,n))return 0;var r=mI(e[0],e[1],t[0],t[1],n.minX,n.minY,n.maxX,n.minY);if(r===0)return 0;var i=mI(e[0],e[1],t[0],t[1],n.minX,n.minY,n.minX,n.maxY);if(i===0)return 0;var a=mI(e[0],e[1],t[0],t[1],n.maxX,n.minY,n.maxX,n.maxY);if(a===0)return 0;var o=mI(e[0],e[1],t[0],t[1],n.minX,n.maxY,n.maxX,n.maxY);return o===0?0:Math.min(r,i,a,o)}function WV(e,t){return e[0]>=t.minX&&e[0]<=t.maxX&&e[1]>=t.minY&&e[1]<=t.maxY}function HV(e,t,n){for(var r=Math.min(e[0],t[0]),i=Math.min(e[1],t[1]),a=Math.max(e[0],t[0]),o=Math.max(e[1],t[1]),u=n.search({minX:r,minY:i,maxX:a,maxY:o}),c=0;c<u.length;c++)if(_0t(u[c].p,u[c].next.p,e,t))return!1;return!0}function _0t(e,t,n,r){return e!==r&&t!==n&&gI(e,t,n)>0!=gI(e,t,r)>0&&gI(n,r,e)>0!=gI(n,r,t)>0}function RR(e){var t=e.p,n=e.next.p;return e.minX=Math.min(t[0],n[0]),e.minY=Math.min(t[1],n[1]),e.maxX=Math.max(t[0],n[0]),e.maxY=Math.max(t[1],n[1]),e}function x0t(e){for(var t=e[0],n=e[0],r=e[0],i=e[0],a=0;a<e.length;a++){var o=e[a];o[0]<t[0]&&(t=o),o[0]>r[0]&&(r=o),o[1]<n[1]&&(n=o),o[1]>i[1]&&(i=o)}var u=[t,n,r,i],c=u.slice();for(a=0;a<e.length;a++)p0t(e[a],u)||c.push(e[a]);var g=l0t(c),_=[];for(a=0;a<g.length;a++)_.push(c[g[a]]);return _}function XV(e,t){var n={p:e,prev:null,next:null,minX:0,minY:0,maxX:0,maxY:0};return t?(n.next=t.next,n.prev=t,t.next.prev=n,t.next=n):(n.prev=n,n.next=n),n}function kR(e,t){var n=e[0]-t[0],r=e[1]-t[1];return n*n+r*r}function DR(e,t,n){var r=t[0],i=t[1],a=n[0]-r,o=n[1]-i;if(a!==0||o!==0){var u=((e[0]-r)*a+(e[1]-i)*o)/(a*a+o*o);u>1?(r=n[0],i=n[1]):u>0&&(r+=a*u,i+=o*u)}return a=e[0]-r,o=e[1]-i,a*a+o*o}function mI(e,t,n,r,i,a,o,u){var c=n-e,g=r-t,_=o-i,E=u-a,C=e-i,O=t-a,R=c*c+g*g,D=c*_+g*E,B=_*_+E*E,z=c*C+g*O,k=_*C+E*O,$=R*B-D*D,K,et,mt,wt,Ot=$,Bt=$;$===0?(et=0,Ot=1,wt=k,Bt=B):(et=D*k-B*z,wt=R*k-D*z,et<0?(et=0,wt=k,Bt=B):et>Ot&&(et=Ot,wt=k+D,Bt=B)),wt<0?(wt=0,-z<0?et=0:-z>R?et=Ot:(et=-z,Ot=R)):wt>Bt&&(wt=Bt,-z+D<0?et=0:-z+D>R?et=Ot:(et=-z+D,Ot=R)),K=et===0?0:et/Ot,mt=wt===0?0:wt/Bt;var se=(1-K)*e+K*n,_e=(1-K)*t+K*r,Ne=(1-mt)*i+mt*o,He=(1-mt)*a+mt*u,de=Ne-se,he=He-_e;return de*de+he*he}d0t.default=g0t;function YV(e,t,n){if(n=n||{},typeof n!="object")throw new Error("options is invalid");var r=n.ignoreBoundary;if(!e)throw new Error("point is required");if(!t)throw new Error("polygon is required");var i=cI(e),a=MR(t),o=t.geometry?t.geometry.type:t.type,u=t.bbox;if(u&&b0t(i,u)===!1)return!1;o==="Polygon"&&(a=[a]);for(var c=0,g=!1;c<a.length&&!g;c++)if(ZV(i,a[c][0],r)){for(var _=!1,E=1;E<a[c].length&&!_;)ZV(i,a[c][E],!r)&&(_=!0),E++;_||(g=!0)}return g}function ZV(e,t,n){var r=!1;t[0][0]===t[t.length-1][0]&&t[0][1]===t[t.length-1][1]&&(t=t.slice(0,t.length-1));for(var i=0,a=t.length-1;i<t.length;a=i++){var o=t[i][0],u=t[i][1],c=t[a][0],g=t[a][1],_=e[1]*(o-c)+u*(c-e[0])+g*(e[0]-o)==0&&(o-e[0])*(c-e[0])<=0&&(u-e[1])*(g-e[1])<=0;if(_)return!n;var E=u>e[1]!=g>e[1]&&e[0]<(c-o)*(e[1]-u)/(g-u)+o;E&&(r=!r)}return r}function b0t(e,t){return t[0]<=e[0]&&t[1]<=e[1]&&t[2]>=e[0]&&t[3]>=e[1]}function w0t(e,t,n){if(n=n||{},!mp(n))throw new Error("options is invalid");var r=n.units,i=cI(e),a=cI(t),o=jb(a[1]-i[1]),u=jb(a[0]-i[0]),c=jb(i[1]),g=jb(a[1]),_=Math.pow(Math.sin(o/2),2)+Math.pow(Math.sin(u/2),2)*Math.cos(c)*Math.cos(g);return CR(2*Math.atan2(Math.sqrt(_),Math.sqrt(1-_)),r)}function S0t(e){if(!e)throw new Error("geojson is required");switch(e.type){case"Feature":return KV(e);case"FeatureCollection":return E0t(e);case"Point":case"LineString":case"Polygon":case"MultiPoint":case"MultiLineString":case"MultiPolygon":case"GeometryCollection":return NR(e);default:throw new Error("unknown GeoJSON type")}}function KV(e){var t={type:"Feature"};return Object.keys(e).forEach(function(n){switch(n){case"type":case"properties":case"geometry":return;default:t[n]=e[n]}}),t.properties=JV(e.properties),t.geometry=NR(e.geometry),t}function JV(e){var t={};return e&&Object.keys(e).forEach(function(n){var r=e[n];typeof r=="object"?r===null?t[n]=null:r.length?t[n]=r.map(function(i){return i}):t[n]=JV(r):t[n]=r}),t}function E0t(e){var t={type:"FeatureCollection"};return Object.keys(e).forEach(function(n){switch(n){case"type":case"features":return;default:t[n]=e[n]}}),t.features=e.features.map(function(n){return KV(n)}),t}function NR(e){var t={type:e.type};return e.bbox&&(t.bbox=e.bbox),e.type==="GeometryCollection"?(t.geometries=e.geometries.map(function(n){return NR(n)}),t):(t.coordinates=QV(e.coordinates),t)}function QV(e){return typeof e[0]!="object"?e.slice():e.map(function(t){return QV(t)})}function C0t(e){qb(e);var t=Number(e[0]),n=Number(e[1]),r=Number(e[2]),i=Number(e[3]);if(e.length===6)throw new Error("@turf/bbox-polygon does not support BBox with 6 positions");var a=[t,n],o=[t,i],u=[r,i],c=[r,n];return V0([[a,c,u,o,a]])}function I0t(e){return C0t(U_t(e))}var P0t=vI,T0t=vI;function vI(e,t,n){n=n||2;var r=t&&t.length,i=r?t[0]*n:e.length,a=t8(e,0,i,n,!0),o=[];if(!a)return o;var u,c,g,_,E,C,O;if(r&&(a=R0t(e,t,a,n)),e.length>80*n){u=g=e[0],c=_=e[1];for(var R=n;R<i;R+=n)E=e[R],C=e[R+1],E<u&&(u=E),C<c&&(c=C),E>g&&(g=E),C>_&&(_=C);O=Math.max(g-u,_-c),O=O!==0?1/O:0}return Zb(a,o,n,u,c,O),o}function t8(e,t,n,r,i){var a,o;if(i===BR(e,t,n,r)>0)for(a=t;a<n;a+=r)o=r8(a,e[a],e[a+1],o);else for(a=n-r;a>=t;a-=r)o=r8(a,e[a],e[a+1],o);return o&&dy(o,o.next)&&(Jb(o),o=o.next),o}function Yb(e,t){if(!e)return e;t||(t=e);var n=e,r;do if(r=!1,!n.steiner&&(dy(n,n.next)||zl(n.prev,n,n.next)===0)){if(Jb(n),n=t=n.prev,n===n.next)break;r=!0}else n=n.next;while(r||n!==t);return t}function Zb(e,t,n,r,i,a,o){if(!!e){!o&&a&&F0t(e,r,i,a);for(var u=e,c,g;e.prev!==e.next;){if(c=e.prev,g=e.next,a?A0t(e,r,i,a):M0t(e)){t.push(c.i/n),t.push(e.i/n),t.push(g.i/n),Jb(e),e=g.next,u=g.next;continue}if(e=g,e===u){o?o===1?(e=L0t(e,t,n),Zb(e,t,n,r,i,a,2)):o===2&&O0t(e,t,n,r,i,a):Zb(Yb(e),t,n,r,i,a,1);break}}}}function M0t(e){var t=e.prev,n=e,r=e.next;if(zl(t,n,r)>=0)return!1;for(var i=e.next.next;i!==e.prev;){if(yI(t.x,t.y,n.x,n.y,r.x,r.y,i.x,i.y)&&zl(i.prev,i,i.next)>=0)return!1;i=i.next}return!0}function A0t(e,t,n,r){var i=e.prev,a=e,o=e.next;if(zl(i,a,o)>=0)return!1;for(var u=i.x<a.x?i.x<o.x?i.x:o.x:a.x<o.x?a.x:o.x,c=i.y<a.y?i.y<o.y?i.y:o.y:a.y<o.y?a.y:o.y,g=i.x>a.x?i.x>o.x?i.x:o.x:a.x>o.x?a.x:o.x,_=i.y>a.y?i.y>o.y?i.y:o.y:a.y>o.y?a.y:o.y,E=FR(u,c,t,n,r),C=FR(g,_,t,n,r),O=e.nextZ;O&&O.z<=C;){if(O!==e.prev&&O!==e.next&&yI(i.x,i.y,a.x,a.y,o.x,o.y,O.x,O.y)&&zl(O.prev,O,O.next)>=0)return!1;O=O.nextZ}for(O=e.prevZ;O&&O.z>=E;){if(O!==e.prev&&O!==e.next&&yI(i.x,i.y,a.x,a.y,o.x,o.y,O.x,O.y)&&zl(O.prev,O,O.next)>=0)return!1;O=O.prevZ}return!0}function L0t(e,t,n){var r=e;do{var i=r.prev,a=r.next.next;!dy(i,a)&&e8(i,r,r.next,a)&&Kb(i,a)&&Kb(a,i)&&(t.push(i.i/n),t.push(r.i/n),t.push(a.i/n),Jb(r),Jb(r.next),r=e=a),r=r.next}while(r!==e);return r}function O0t(e,t,n,r,i,a){var o=e;do{for(var u=o.next.next;u!==o.prev;){if(o.i!==u.i&&U0t(o,u)){var c=n8(o,u);o=Yb(o,o.next),c=Yb(c,c.next),Zb(o,t,n,r,i,a),Zb(c,t,n,r,i,a);return}u=u.next}o=o.next}while(o!==e)}function R0t(e,t,n,r){var i=[],a,o,u,c,g;for(a=0,o=t.length;a<o;a++)u=t[a]*r,c=a<o-1?t[a+1]*r:e.length,g=t8(e,u,c,r,!1),g===g.next&&(g.steiner=!0),i.push(B0t(g));for(i.sort(k0t),a=0;a<i.length;a++)D0t(i[a],n),n=Yb(n,n.next);return n}function k0t(e,t){return e.x-t.x}function D0t(e,t){if(t=N0t(e,t),t){var n=n8(t,e);Yb(n,n.next)}}function N0t(e,t){var n=t,r=e.x,i=e.y,a=-1/0,o;do{if(i<=n.y&&i>=n.next.y&&n.next.y!==n.y){var u=n.x+(i-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(u<=r&&u>a){if(a=u,u===r){if(i===n.y)return n;if(i===n.next.y)return n.next}o=n.x<n.next.x?n:n.next}}n=n.next}while(n!==t);if(!o)return null;if(r===a)return o.prev;var c=o,g=o.x,_=o.y,E=1/0,C;for(n=o.next;n!==c;)r>=n.x&&n.x>=g&&r!==n.x&&yI(i<_?r:a,i,g,_,i<_?a:r,i,n.x,n.y)&&(C=Math.abs(i-n.y)/(r-n.x),(C<E||C===E&&n.x>o.x)&&Kb(n,e)&&(o=n,E=C)),n=n.next;return o}function F0t(e,t,n,r){var i=e;do i.z===null&&(i.z=FR(i.x,i.y,t,n,r)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next;while(i!==e);i.prevZ.nextZ=null,i.prevZ=null,z0t(i)}function z0t(e){var t,n,r,i,a,o,u,c,g=1;do{for(n=e,e=null,a=null,o=0;n;){for(o++,r=n,u=0,t=0;t<g&&(u++,r=r.nextZ,!!r);t++);for(c=g;u>0||c>0&&r;)u!==0&&(c===0||!r||n.z<=r.z)?(i=n,n=n.nextZ,u--):(i=r,r=r.nextZ,c--),a?a.nextZ=i:e=i,i.prevZ=a,a=i;n=r}a.nextZ=null,g*=2}while(o>1);return e}function FR(e,t,n,r,i){return e=32767*(e-n)*i,t=32767*(t-r)*i,e=(e|e<<8)&16711935,e=(e|e<<4)&252645135,e=(e|e<<2)&858993459,e=(e|e<<1)&1431655765,t=(t|t<<8)&16711935,t=(t|t<<4)&252645135,t=(t|t<<2)&858993459,t=(t|t<<1)&1431655765,e|t<<1}function B0t(e){var t=e,n=e;do t.x<n.x&&(n=t),t=t.next;while(t!==e);return n}function yI(e,t,n,r,i,a,o,u){return(i-o)*(t-u)-(e-o)*(a-u)>=0&&(e-o)*(r-u)-(n-o)*(t-u)>=0&&(n-o)*(a-u)-(i-o)*(r-u)>=0}function U0t(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!V0t(e,t)&&Kb(e,t)&&Kb(t,e)&&$0t(e,t)}function zl(e,t,n){return(t.y-e.y)*(n.x-t.x)-(t.x-e.x)*(n.y-t.y)}function dy(e,t){return e.x===t.x&&e.y===t.y}function e8(e,t,n,r){return dy(e,t)&&dy(n,r)||dy(e,r)&&dy(n,t)?!0:zl(e,t,n)>0!=zl(e,t,r)>0&&zl(n,r,e)>0!=zl(n,r,t)>0}function V0t(e,t){var n=e;do{if(n.i!==e.i&&n.next.i!==e.i&&n.i!==t.i&&n.next.i!==t.i&&e8(n,n.next,e,t))return!0;n=n.next}while(n!==e);return!1}function Kb(e,t){return zl(e.prev,e,e.next)<0?zl(e,t,e.next)>=0&&zl(e,e.prev,t)>=0:zl(e,t,e.prev)<0||zl(e,e.next,t)<0}function $0t(e,t){var n=e,r=!1,i=(e.x+t.x)/2,a=(e.y+t.y)/2;do n.y>a!=n.next.y>a&&n.next.y!==n.y&&i<(n.next.x-n.x)*(a-n.y)/(n.next.y-n.y)+n.x&&(r=!r),n=n.next;while(n!==e);return r}function n8(e,t){var n=new zR(e.i,e.x,e.y),r=new zR(t.i,t.x,t.y),i=e.next,a=t.prev;return e.next=t,t.prev=e,n.next=i,i.prev=n,r.next=n,n.prev=r,a.next=r,r.prev=a,r}function r8(e,t,n,r){var i=new zR(e,t,n);return r?(i.next=r.next,i.prev=r,r.next.prev=i,r.next=i):(i.prev=i,i.next=i),i}function Jb(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function zR(e,t,n){this.i=e,this.x=t,this.y=n,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}vI.deviation=function(e,t,n,r){var i=t&&t.length,a=i?t[0]*n:e.length,o=Math.abs(BR(e,0,a,n));if(i)for(var u=0,c=t.length;u<c;u++){var g=t[u]*n,_=u<c-1?t[u+1]*n:e.length;o-=Math.abs(BR(e,g,_,n))}var E=0;for(u=0;u<r.length;u+=3){var C=r[u]*n,O=r[u+1]*n,R=r[u+2]*n;E+=Math.abs((e[C]-e[R])*(e[O+1]-e[C+1])-(e[C]-e[O])*(e[R+1]-e[C+1]))}return o===0&&E===0?0:Math.abs((E-o)/o)};function BR(e,t,n,r){for(var i=0,a=t,o=n-r;a<n;a+=r)i+=(e[o]-e[a])*(e[a+1]+e[o+1]),o=a;return i}vI.flatten=function(e){for(var t=e[0][0].length,n={vertices:[],holes:[],dimensions:t},r=0,i=0;i<e.length;i++){for(var a=0;a<e[i].length;a++)for(var o=0;o<t;o++)n.vertices.push(e[i][a][o]);i>0&&(r+=e[i-1].length,n.holes.push(r))}return n};P0t.default=T0t;function j0t(e,t){return i8(e,"mercator",t)}function q0t(e,t){return i8(e,"wgs84",t)}function i8(e,t,n){if(n=n||{},!mp(n))throw new Error("options is invalid");var r=n.mutate;if(!e)throw new Error("geojson is required");return Array.isArray(e)&&su(e[0])?e=t==="mercator"?o8(e):a8(e):(r!==!0&&(e=S0t(e)),j0(e,function(i){var a=t==="mercator"?o8(i):a8(i);i[0]=a[0],i[1]=a[1]})),e}function o8(e){var t=Math.PI/180,n=6378137,r=20037508342789244e-9,i=Math.abs(e[0])<=180?e[0]:e[0]-G0t(e[0])*360,a=[n*i*t,n*Math.log(Math.tan(Math.PI*.25+.5*e[1]*t))];return a[0]>r&&(a[0]=r),a[0]<-r&&(a[0]=-r),a[1]>r&&(a[1]=r),a[1]<-r&&(a[1]=-r),a}function a8(e){var t=180/Math.PI,n=6378137;return[e[0]*t/n,(Math.PI*.5-2*Math.atan(Math.exp(-e[1]/n)))*t]}function G0t(e){return e<0?-1:e>0?1:0}Object.freeze({toMercator:j0t,toWgs84:q0t});function pEt(e,t){if(t=t||{},!mp(t))throw new Error("options is invalid");if(!e)throw new Error("geojson is required");return kV(e,function(n,r){var i=r.geometry.coordinates;return n+w0t(i[0],i[1],t)},0)}Number.prototype.modulo=function(e){return(this%e+e)%e};UR.polyline=UR;UR.polygon=W0t;function UR(e,t,n){var r=e.length,i=W0(e[0],t),a=[],o,u,c,g,_;for(n||(n=[]),o=1;o<r;o++){for(u=e[o-1],c=e[o],g=_=W0(c,t);;)if(i|g){if(i&g)break;i?(u=VR(u,c,i,t),i=W0(u,t)):(c=VR(u,c,g,t),g=W0(c,t))}else{a.push(u),g!==_?(a.push(c),o<r-1&&(n.push(a),a=[])):o===r-1&&a.push(c);break}i=_}return a.length&&n.push(a),n}function W0t(e,t){var n,r,i,a,o,u,c;for(r=1;r<=8;r*=2){for(n=[],i=e[e.length-1],a=!(W0(i,t)&r),o=0;o<e.length;o++)u=e[o],c=!(W0(u,t)&r),c!==a&&n.push(VR(i,u,r,t)),c&&n.push(u),i=u,a=c;if(e=n,!e.length)break}return n}function VR(e,t,n,r){return n&8?[e[0]+(t[0]-e[0])*(r[3]-e[1])/(t[1]-e[1]),r[3]]:n&4?[e[0]+(t[0]-e[0])*(r[1]-e[1])/(t[1]-e[1]),r[1]]:n&2?[r[2],e[1]+(t[1]-e[1])*(r[2]-e[0])/(t[0]-e[0])]:n&1?[r[0],e[1]+(t[1]-e[1])*(r[0]-e[0])/(t[0]-e[0])]:null}function W0(e,t){var n=0;return e[0]<t[0]?n|=1:e[0]>t[2]&&(n|=2),e[1]<t[1]?n|=4:e[1]>t[3]&&(n|=8),n}function H0t(e,t,n){var r=t[0]-e[0],i=t[1]-e[1],a=n[0]-t[0],o=n[1]-t[1];return Math.sign(r*o-a*i)}function X0t(e,t){var n=e.geometry.coordinates.map(function(o){return o[0]}),r=e.geometry.coordinates.map(function(o){return o[1]}),i=t.geometry.coordinates.map(function(o){return o[0]}),a=t.geometry.coordinates.map(function(o){return o[1]});return Math.max(null,n)===Math.max(null,i)&&Math.max(null,r)===Math.max(null,a)&&Math.min(null,n)===Math.min(null,i)&&Math.min(null,r)===Math.min(null,a)}function s8(e,t){return t.geometry.coordinates[0].every(function(n){return YV(U0(n),e)})}function Y0t(e,t){return e[0]===t[0]&&e[1]===t[1]}var pf=function(){this.edges=[],this.polygon=void 0,this.envelope=void 0},u8={length:{configurable:!0}};pf.prototype.push=function(t){this[this.edges.length]=t,this.edges.push(t),this.polygon=this.envelope=void 0};pf.prototype.get=function(t){return this.edges[t]};u8.length.get=function(){return this.edges.length};pf.prototype.forEach=function(t){this.edges.forEach(t)};pf.prototype.map=function(t){return this.edges.map(t)};pf.prototype.some=function(t){return this.edges.some(t)};pf.prototype.isValid=function(){return!0};pf.prototype.isHole=function(){var t=this,n=this.edges.reduce(function(o,u,c){return u.from.coordinates[1]>t.edges[o].from.coordinates[1]&&(o=c),o},0),r=(n===0?this.length:n)-1,i=(n+1)%this.length,a=H0t(this.edges[r].from.coordinates,this.edges[n].from.coordinates,this.edges[i].from.coordinates);return a===0?this.edges[r].from.coordinates[0]>this.edges[i].from.coordinates[0]:a>0};pf.prototype.toMultiPoint=function(){return ER(this.edges.map(function(t){return t.from.coordinates}))};pf.prototype.toPolygon=function(){if(this.polygon)return this.polygon;var t=this.edges.map(function(n){return n.from.coordinates});return t.push(this.edges[0].from.coordinates),this.polygon=V0([t])};pf.prototype.getEnvelope=function(){return this.envelope?this.envelope:this.envelope=I0t(this.toPolygon())};pf.findEdgeRingContaining=function(t,n){var r=t.getEnvelope(),i,a;return n.forEach(function(o){var u=o.getEnvelope();if(a&&(i=a.getEnvelope()),!X0t(u,r)&&s8(u,r)){var c=t.map(function(g){return g.from.coordinates}).find(function(g){return!o.some(function(_){return Y0t(g,_.from.coordinates)})});c&&o.inside(U0(c))&&(!a||s8(i,u))&&(a=o)}}),a};pf.prototype.inside=function(t){return YV(t,this.toPolygon())};Object.defineProperties(pf.prototype,u8);var $R=hg(function(e,t){t=e.exports=typeof Object.keys=="function"?Object.keys:n,t.shim=n;function n(r){var i=[];for(var a in r)i.push(a);return i}});$R.shim;var _I=hg(function(e,t){var n=function(){return Object.prototype.toString.call(arguments)}()=="[object Arguments]";t=e.exports=n?r:i,t.supported=r;function r(a){return Object.prototype.toString.call(a)=="[object Arguments]"}t.unsupported=i;function i(a){return a&&typeof a=="object"&&typeof a.length=="number"&&Object.prototype.hasOwnProperty.call(a,"callee")&&!Object.prototype.propertyIsEnumerable.call(a,"callee")||!1}});_I.supported;_I.unsupported;hg(function(e){var t=Array.prototype.slice,n=e.exports=function(o,u,c){return c||(c={}),o===u?!0:o instanceof Date&&u instanceof Date?o.getTime()===u.getTime():!o||!u||typeof o!="object"&&typeof u!="object"?c.strict?o===u:o==u:a(o,u,c)};function r(o){return o==null}function i(o){return!(!o||typeof o!="object"||typeof o.length!="number"||typeof o.copy!="function"||typeof o.slice!="function"||o.length>0&&typeof o[0]!="number")}function a(o,u,c){var g,_;if(r(o)||r(u)||o.prototype!==u.prototype)return!1;if(_I(o))return _I(u)?(o=t.call(o),u=t.call(u),n(o,u,c)):!1;if(i(o)){if(!i(u)||o.length!==u.length)return!1;for(g=0;g<o.length;g++)if(o[g]!==u[g])return!1;return!0}try{var E=$R(o),C=$R(u)}catch{return!1}if(E.length!=C.length)return!1;for(E.sort(),C.sort(),g=E.length-1;g>=0;g--)if(E[g]!=C[g])return!1;for(g=E.length-1;g>=0;g--)if(_=E[g],!n(o[_],u[_],c))return!1;return typeof o==typeof u}});var Z0t=hg(function(e){function t(n,r,i,a){this.dataset=[],this.epsilon=1,this.minPts=2,this.distance=this._euclideanDistance,this.clusters=[],this.noise=[],this._visited=[],this._assigned=[],this._datasetLength=0,this._init(n,r,i,a)}t.prototype.run=function(n,r,i,a){this._init(n,r,i,a);for(var o=0;o<this._datasetLength;o++)if(this._visited[o]!==1){this._visited[o]=1;var u=this._regionQuery(o);if(u.length<this.minPts)this.noise.push(o);else{var c=this.clusters.length;this.clusters.push([]),this._addToCluster(o,c),this._expandCluster(c,u)}}return this.clusters},t.prototype._init=function(n,r,i,a){if(n){if(!(n instanceof Array))throw Error("Dataset must be of type array, "+typeof n+" given");this.dataset=n,this.clusters=[],this.noise=[],this._datasetLength=n.length,this._visited=new Array(this._datasetLength),this._assigned=new Array(this._datasetLength)}r&&(this.epsilon=r),i&&(this.minPts=i),a&&(this.distance=a)},t.prototype._expandCluster=function(n,r){for(var i=0;i<r.length;i++){var a=r[i];if(this._visited[a]!==1){this._visited[a]=1;var o=this._regionQuery(a);o.length>=this.minPts&&(r=this._mergeArrays(r,o))}this._assigned[a]!==1&&this._addToCluster(a,n)}},t.prototype._addToCluster=function(n,r){this.clusters[r].push(n),this._assigned[n]=1},t.prototype._regionQuery=function(n){for(var r=[],i=0;i<this._datasetLength;i++){var a=this.distance(this.dataset[n],this.dataset[i]);a<this.epsilon&&r.push(i)}return r},t.prototype._mergeArrays=function(n,r){for(var i=r.length,a=0;a<i;a++){var o=r[a];n.indexOf(o)<0&&n.push(o)}return n},t.prototype._euclideanDistance=function(n,r){for(var i=0,a=Math.min(n.length,r.length);a--;)i+=(n[a]-r[a])*(n[a]-r[a]);return Math.sqrt(i)},e.exports&&(e.exports=t)}),K0t=hg(function(e){function t(n,r,i){this.k=3,this.dataset=[],this.assignments=[],this.centroids=[],this.init(n,r,i)}t.prototype.init=function(n,r,i){this.assignments=[],this.centroids=[],typeof n!="undefined"&&(this.dataset=n),typeof r!="undefined"&&(this.k=r),typeof i!="undefined"&&(this.distance=i)},t.prototype.run=function(n,r){this.init(n,r);for(var i=this.dataset.length,a=0;a<this.k;a++)this.centroids[a]=this.randomCentroid();for(var o=!0;o;){o=this.assign();for(var u=0;u<this.k;u++){for(var c=new Array(C),g=0,_=0;_<C;_++)c[_]=0;for(var E=0;E<i;E++){var C=this.dataset[E].length;if(u===this.assignments[E]){for(var _=0;_<C;_++)c[_]+=this.dataset[E][_];g++}}if(g>0){for(var _=0;_<C;_++)c[_]/=g;this.centroids[u]=c}else this.centroids[u]=this.randomCentroid(),o=!0}}return this.getClusters()},t.prototype.randomCentroid=function(){var n=this.dataset.length-1,r,i;do i=Math.round(Math.random()*n),r=this.dataset[i];while(this.centroids.indexOf(r)>=0);return r},t.prototype.assign=function(){for(var n=!1,r=this.dataset.length,i,a=0;a<r;a++)i=this.argmin(this.dataset[a],this.centroids,this.distance),i!=this.assignments[a]&&(this.assignments[a]=i,n=!0);return n},t.prototype.getClusters=function(){for(var n=new Array(this.k),r,i=0;i<this.assignments.length;i++)r=this.assignments[i],typeof n[r]=="undefined"&&(n[r]=[]),n[r].push(i);return n},t.prototype.argmin=function(n,r,i){for(var a=Number.MAX_VALUE,o=0,u=r.length,c,g=0;g<u;g++)c=i(n,r[g]),c<a&&(a=c,o=g);return o},t.prototype.distance=function(n,r){for(var i=0,a=Math.min(n.length,r.length);a--;){var o=n[a]-r[a];i+=o*o}return Math.sqrt(i)},e.exports&&(e.exports=t)}),l8=hg(function(e){function t(n,r,i){this._queue=[],this._priorities=[],this._sorting="desc",this._init(n,r,i)}t.prototype.insert=function(n,r){for(var i=this._queue.length,a=i;a--;){var o=this._priorities[a];this._sorting==="desc"?r>o&&(i=a):r<o&&(i=a)}this._insertAt(n,r,i)},t.prototype.remove=function(n){for(var r=this._queue.length;r--;){var i=this._queue[r];if(n===i){this._queue.splice(r,1),this._priorities.splice(r,1);break}}},t.prototype.forEach=function(n){this._queue.forEach(n)},t.prototype.getElements=function(){return this._queue},t.prototype.getElementPriority=function(n){return this._priorities[n]},t.prototype.getPriorities=function(){return this._priorities},t.prototype.getElementsWithPriorities=function(){for(var n=[],r=0,i=this._queue.length;r<i;r++)n.push([this._queue[r],this._priorities[r]]);return n},t.prototype._init=function(n,r,i){if(n&&r){if(this._queue=[],this._priorities=[],n.length!==r.length)throw new Error("Arrays must have the same length");for(var a=0;a<n.length;a++)this.insert(n[a],r[a])}i&&(this._sorting=i)},t.prototype._insertAt=function(n,r,i){this._queue.length===i?(this._queue.push(n),this._priorities.push(r)):(this._queue.splice(i,0,n),this._priorities.splice(i,0,r))},e.exports&&(e.exports=t)}),J0t=hg(function(e){if(e.exports)var t=l8;function n(r,i,a,o){this.epsilon=1,this.minPts=1,this.distance=this._euclideanDistance,this._reachability=[],this._processed=[],this._coreDistance=0,this._orderedList=[],this._init(r,i,a,o)}n.prototype.run=function(r,i,a,o){this._init(r,i,a,o);for(var u=0,c=this.dataset.length;u<c;u++)if(this._processed[u]!==1){this._processed[u]=1,this.clusters.push([u]);var g=this.clusters.length-1;this._orderedList.push(u);var _=new t(null,null,"asc"),E=this._regionQuery(u);this._distanceToCore(u)!==void 0&&(this._updateQueue(u,E,_),this._expandCluster(g,_))}return this.clusters},n.prototype.getReachabilityPlot=function(){for(var r=[],i=0,a=this._orderedList.length;i<a;i++){var o=this._orderedList[i],u=this._reachability[o];r.push([o,u])}return r},n.prototype._init=function(r,i,a,o){if(r){if(!(r instanceof Array))throw Error("Dataset must be of type array, "+typeof r+" given");this.dataset=r,this.clusters=[],this._reachability=new Array(this.dataset.length),this._processed=new Array(this.dataset.length),this._coreDistance=0,this._orderedList=[]}i&&(this.epsilon=i),a&&(this.minPts=a),o&&(this.distance=o)},n.prototype._updateQueue=function(r,i,a){var o=this;this._coreDistance=this._distanceToCore(r),i.forEach(function(u){if(o._processed[u]===void 0){var c=o.distance(o.dataset[r],o.dataset[u]),g=Math.max(o._coreDistance,c);o._reachability[u]===void 0?(o._reachability[u]=g,a.insert(u,g)):g<o._reachability[u]&&(o._reachability[u]=g,a.remove(u),a.insert(u,g))}})},n.prototype._expandCluster=function(r,i){for(var a=i.getElements(),o=0,u=a.length;o<u;o++){var c=a[o];if(this._processed[c]===void 0){var g=this._regionQuery(c);this._processed[c]=1,this.clusters[r].push(c),this._orderedList.push(c),this._distanceToCore(c)!==void 0&&(this._updateQueue(c,g,i),this._expandCluster(r,i))}}},n.prototype._distanceToCore=function(r){for(var i=this.epsilon,a=0;a<i;a++){var o=this._regionQuery(r,a);if(o.length>=this.minPts)return a}},n.prototype._regionQuery=function(r,i){i=i||this.epsilon;for(var a=[],o=0,u=this.dataset.length;o<u;o++)this.distance(this.dataset[r],this.dataset[o])<i&&a.push(o);return a},n.prototype._euclideanDistance=function(r,i){for(var a=0,o=Math.min(r.length,i.length);o--;)a+=(r[o]-i[o])*(r[o]-i[o]);return Math.sqrt(a)},e.exports&&(e.exports=n)}),xI=hg(function(e){e.exports&&(e.exports={DBSCAN:Z0t,KMEANS:K0t,OPTICS:J0t,PriorityQueue:l8})});xI.DBSCAN;xI.KMEANS;xI.OPTICS;xI.PriorityQueue;function bI(){this._=null}function wI(e){e.U=e.C=e.L=e.R=e.P=e.N=null}bI.prototype={constructor:bI,insert:function(e,t){var n,r,i;if(e){if(t.P=e,t.N=e.N,e.N&&(e.N.P=t),e.N=t,e.R){for(e=e.R;e.L;)e=e.L;e.L=t}else e.R=t;n=e}else this._?(e=c8(this._),t.P=null,t.N=e,e.P=e.L=t,n=e):(t.P=t.N=null,this._=t,n=null);for(t.L=t.R=null,t.U=n,t.C=!0,e=t;n&&n.C;)r=n.U,n===r.L?(i=r.R,i&&i.C?(n.C=i.C=!1,r.C=!0,e=r):(e===n.R&&(Qb(this,n),e=n,n=e.U),n.C=!1,r.C=!0,tw(this,r))):(i=r.L,i&&i.C?(n.C=i.C=!1,r.C=!0,e=r):(e===n.L&&(tw(this,n),e=n,n=e.U),n.C=!1,r.C=!0,Qb(this,r))),n=e.U;this._.C=!1},remove:function(e){e.N&&(e.N.P=e.P),e.P&&(e.P.N=e.N),e.N=e.P=null;var t=e.U,n,r=e.L,i=e.R,a,o;if(r?i?a=c8(i):a=r:a=i,t?t.L===e?t.L=a:t.R=a:this._=a,r&&i?(o=a.C,a.C=e.C,a.L=r,r.U=a,a!==i?(t=a.U,a.U=e.U,e=a.R,t.L=e,a.R=i,i.U=a):(a.U=t,t=a,e=a.R)):(o=e.C,e=a),e&&(e.U=t),!o){if(e&&e.C){e.C=!1;return}do{if(e===this._)break;if(e===t.L){if(n=t.R,n.C&&(n.C=!1,t.C=!0,Qb(this,t),n=t.R),n.L&&n.L.C||n.R&&n.R.C){(!n.R||!n.R.C)&&(n.L.C=!1,n.C=!0,tw(this,n),n=t.R),n.C=t.C,t.C=n.R.C=!1,Qb(this,t),e=this._;break}}else if(n=t.L,n.C&&(n.C=!1,t.C=!0,tw(this,t),n=t.L),n.L&&n.L.C||n.R&&n.R.C){(!n.L||!n.L.C)&&(n.R.C=!1,n.C=!0,Qb(this,n),n=t.L),n.C=t.C,t.C=n.L.C=!1,tw(this,t),e=this._;break}n.C=!0,e=t,t=t.U}while(!e.C);e&&(e.C=!1)}}};function Qb(e,t){var n=t,r=t.R,i=n.U;i?i.L===n?i.L=r:i.R=r:e._=r,r.U=i,n.U=r,n.R=r.L,n.R&&(n.R.U=n),r.L=n}function tw(e,t){var n=t,r=t.L,i=n.U;i?i.L===n?i.L=r:i.R=r:e._=r,r.U=i,n.U=r,n.L=r.R,n.L&&(n.L.U=n),r.R=n}function c8(e){for(;e.L;)e=e.L;return e}function ew(e,t,n,r){var i=[null,null],a=hl.push(i)-1;return i.left=e,i.right=t,n&&SI(i,e,t,n),r&&SI(i,t,e,r),df[e.index].halfedges.push(a),df[t.index].halfedges.push(a),i}function nw(e,t,n){var r=[t,n];return r.left=e,r}function SI(e,t,n,r){!e[0]&&!e[1]?(e[0]=r,e.left=t,e.right=n):e.left===n?e[1]=r:e[0]=r}function Q0t(e,t,n,r,i){var a=e[0],o=e[1],u=a[0],c=a[1],g=o[0],_=o[1],E=0,C=1,O=g-u,R=_-c,D;if(D=t-u,!(!O&&D>0)){if(D/=O,O<0){if(D<E)return;D<C&&(C=D)}else if(O>0){if(D>C)return;D>E&&(E=D)}if(D=r-u,!(!O&&D<0)){if(D/=O,O<0){if(D>C)return;D>E&&(E=D)}else if(O>0){if(D<E)return;D<C&&(C=D)}if(D=n-c,!(!R&&D>0)){if(D/=R,R<0){if(D<E)return;D<C&&(C=D)}else if(R>0){if(D>C)return;D>E&&(E=D)}if(D=i-c,!(!R&&D<0)){if(D/=R,R<0){if(D>C)return;D>E&&(E=D)}else if(R>0){if(D<E)return;D<C&&(C=D)}return!(E>0)&&!(C<1)||(E>0&&(e[0]=[u+E*O,c+E*R]),C<1&&(e[1]=[u+C*O,c+C*R])),!0}}}}}function txt(e,t,n,r,i){var a=e[1];if(a)return!0;var o=e[0],u=e.left,c=e.right,g=u[0],_=u[1],E=c[0],C=c[1],O=(g+E)/2,R=(_+C)/2,D,B;if(C===_){if(O<t||O>=r)return;if(g>E){if(!o)o=[O,n];else if(o[1]>=i)return;a=[O,i]}else{if(!o)o=[O,i];else if(o[1]<n)return;a=[O,n]}}else if(D=(g-E)/(C-_),B=R-D*O,D<-1||D>1)if(g>E){if(!o)o=[(n-B)/D,n];else if(o[1]>=i)return;a=[(i-B)/D,i]}else{if(!o)o=[(i-B)/D,i];else if(o[1]<n)return;a=[(n-B)/D,n]}else if(_<C){if(!o)o=[t,D*t+B];else if(o[0]>=r)return;a=[r,D*r+B]}else{if(!o)o=[r,D*r+B];else if(o[0]<t)return;a=[t,D*t+B]}return e[0]=o,e[1]=a,!0}function ext(e,t,n,r){for(var i=hl.length,a;i--;)(!txt(a=hl[i],e,t,n,r)||!Q0t(a,e,t,n,r)||!(Math.abs(a[0][0]-a[1][0])>ga||Math.abs(a[0][1]-a[1][1])>ga))&&delete hl[i]}function nxt(e){return df[e.index]={site:e,halfedges:[]}}function rxt(e,t){var n=e.site,r=t.left,i=t.right;return n===i&&(i=r,r=n),i?Math.atan2(i[1]-r[1],i[0]-r[0]):(n===r?(r=t[1],i=t[0]):(r=t[0],i=t[1]),Math.atan2(r[0]-i[0],i[1]-r[1]))}function f8(e,t){return t[+(t.left!==e.site)]}function ixt(e,t){return t[+(t.left===e.site)]}function oxt(){for(var e=0,t=df.length,n,r,i,a;e<t;++e)if((n=df[e])&&(a=(r=n.halfedges).length)){var o=new Array(a),u=new Array(a);for(i=0;i<a;++i)o[i]=i,u[i]=rxt(n,hl[r[i]]);for(o.sort(function(c,g){return u[g]-u[c]}),i=0;i<a;++i)u[i]=r[o[i]];for(i=0;i<a;++i)r[i]=u[i]}}function axt(e,t,n,r){var i=df.length,a,o,u,c,g,_,E,C,O,R,D,B,z=!0;for(a=0;a<i;++a)if(o=df[a]){for(u=o.site,g=o.halfedges,c=g.length;c--;)hl[g[c]]||g.splice(c,1);for(c=0,_=g.length;c<_;)R=ixt(o,hl[g[c]]),D=R[0],B=R[1],E=f8(o,hl[g[++c%_]]),C=E[0],O=E[1],(Math.abs(D-C)>ga||Math.abs(B-O)>ga)&&(g.splice(c,0,hl.push(nw(u,R,Math.abs(D-e)<ga&&r-B>ga?[e,Math.abs(C-e)<ga?O:r]:Math.abs(B-r)<ga&&n-D>ga?[Math.abs(O-r)<ga?C:n,r]:Math.abs(D-n)<ga&&B-t>ga?[n,Math.abs(C-n)<ga?O:t]:Math.abs(B-t)<ga&&D-e>ga?[Math.abs(O-t)<ga?C:e,t]:null))-1),++_);_&&(z=!1)}if(z){var k,$,K,et=1/0;for(a=0,z=null;a<i;++a)(o=df[a])&&(u=o.site,k=u[0]-e,$=u[1]-t,K=k*k+$*$,K<et&&(et=K,z=o));if(z){var mt=[e,t],wt=[e,r],Ot=[n,r],Bt=[n,t];z.halfedges.push(hl.push(nw(u=z.site,mt,wt))-1,hl.push(nw(u,wt,Ot))-1,hl.push(nw(u,Ot,Bt))-1,hl.push(nw(u,Bt,mt))-1)}}for(a=0;a<i;++a)(o=df[a])&&(o.halfedges.length||delete df[a])}var h8=[],jR;function sxt(){wI(this),this.x=this.y=this.arc=this.site=this.cy=null}function H0(e){var t=e.P,n=e.N;if(!(!t||!n)){var r=t.site,i=e.site,a=n.site;if(r!==a){var o=i[0],u=i[1],c=r[0]-o,g=r[1]-u,_=a[0]-o,E=a[1]-u,C=2*(c*E-g*_);if(!(C>=-hxt)){var O=c*c+g*g,R=_*_+E*E,D=(E*O-g*R)/C,B=(c*R-_*O)/C,z=h8.pop()||new sxt;z.arc=e,z.site=i,z.x=D+o,z.y=(z.cy=B+u)+Math.sqrt(D*D+B*B),e.circle=z;for(var k=null,$=rw._;$;)if(z.y<$.y||z.y===$.y&&z.x<=$.x)if($.L)$=$.L;else{k=$.P;break}else if($.R)$=$.R;else{k=$;break}rw.insert(k,z),k||(jR=z)}}}}function X0(e){var t=e.circle;t&&(t.P||(jR=t.N),rw.remove(t),h8.push(t),wI(t),e.circle=null)}var p8=[];function uxt(){wI(this),this.edge=this.site=this.circle=null}function d8(e){var t=p8.pop()||new uxt;return t.site=e,t}function qR(e){X0(e),Y0.remove(e),p8.push(e),wI(e)}function lxt(e){var t=e.circle,n=t.x,r=t.cy,i=[n,r],a=e.P,o=e.N,u=[e];qR(e);for(var c=a;c.circle&&Math.abs(n-c.circle.x)<ga&&Math.abs(r-c.circle.cy)<ga;)a=c.P,u.unshift(c),qR(c),c=a;u.unshift(c),X0(c);for(var g=o;g.circle&&Math.abs(n-g.circle.x)<ga&&Math.abs(r-g.circle.cy)<ga;)o=g.N,u.push(g),qR(g),g=o;u.push(g),X0(g);var _=u.length,E;for(E=1;E<_;++E)g=u[E],c=u[E-1],SI(g.edge,c.site,g.site,i);c=u[0],g=u[_-1],g.edge=ew(c.site,g.site,null,i),H0(c),H0(g)}function cxt(e){for(var t=e[0],n=e[1],r,i,a,o,u=Y0._;u;)if(a=g8(u,n)-t,a>ga)u=u.L;else if(o=t-fxt(u,n),o>ga){if(!u.R){r=u;break}u=u.R}else{a>-ga?(r=u.P,i=u):o>-ga?(r=u,i=u.N):r=i=u;break}nxt(e);var c=d8(e);if(Y0.insert(r,c),!(!r&&!i)){if(r===i){X0(r),i=d8(r.site),Y0.insert(c,i),c.edge=i.edge=ew(r.site,c.site),H0(r),H0(i);return}if(!i){c.edge=ew(r.site,c.site);return}X0(r),X0(i);var g=r.site,_=g[0],E=g[1],C=e[0]-_,O=e[1]-E,R=i.site,D=R[0]-_,B=R[1]-E,z=2*(C*B-O*D),k=C*C+O*O,$=D*D+B*B,K=[(B*k-O*$)/z+_,(C*$-D*k)/z+E];SI(i.edge,g,R,K),c.edge=ew(g,e,null,K),i.edge=ew(e,R,null,K),H0(r),H0(i)}}function g8(e,t){var n=e.site,r=n[0],i=n[1],a=i-t;if(!a)return r;var o=e.P;if(!o)return-1/0;n=o.site;var u=n[0],c=n[1],g=c-t;if(!g)return u;var _=u-r,E=1/a-1/g,C=_/g;return E?(-C+Math.sqrt(C*C-2*E*(_*_/(-2*g)-c+g/2+i-a/2)))/E+r:(r+u)/2}function fxt(e,t){var n=e.N;if(n)return g8(n,t);var r=e.site;return r[1]===t?r[0]:1/0}var ga=1e-6,hxt=1e-12,Y0,df,rw,hl;function pxt(e,t,n){return(e[0]-n[0])*(t[1]-e[1])-(e[0]-t[0])*(n[1]-e[1])}function dxt(e,t){return t[1]-e[1]||t[0]-e[0]}function m8(e,t){var n=e.sort(dxt).pop(),r,i,a;for(hl=[],df=new Array(e.length),Y0=new bI,rw=new bI;;)if(a=jR,n&&(!a||n[1]<a.y||n[1]===a.y&&n[0]<a.x))(n[0]!==r||n[1]!==i)&&(cxt(n),r=n[0],i=n[1]),n=e.pop();else if(a)lxt(a.arc);else break;if(oxt(),t){var o=+t[0][0],u=+t[0][1],c=+t[1][0],g=+t[1][1];ext(o,u,c,g),axt(o,u,c,g)}this.edges=hl,this.cells=df,Y0=rw=hl=df=null}m8.prototype={constructor:m8,polygons:function(){var e=this.edges;return this.cells.map(function(t){var n=t.halfedges.map(function(r){return f8(t,e[r])});return n.data=t.site.data,n})},triangles:function(){var e=[],t=this.edges;return this.cells.forEach(function(n,r){if(!!(u=(a=n.halfedges).length))for(var i=n.site,a,o=-1,u,c,g=t[a[u-1]],_=g.left===i?g.right:g.left;++o<u;)c=_,g=t[a[o]],_=g.left===i?g.right:g.left,c&&_&&r<c.index&&r<_.index&&pxt(i,c,_)<0&&e.push([i.data,c.data,_.data])}),e},links:function(){return this.edges.filter(function(e){return e.right}).map(function(e){return{source:e.left.data,target:e.right.data}})},find:function(e,t,n){for(var r=this,i,a=r._found||0,o=r.cells.length,u;!(u=r.cells[a]);)if(++a>=o)return null;var c=e-u.site[0],g=t-u.site[1],_=c*c+g*g;do u=r.cells[i=a],a=null,u.halfedges.forEach(function(E){var C=r.edges[E],O=C.left;if(!((O===u.site||!O)&&!(O=C.right))){var R=e-O[0],D=t-O[1],B=R*R+D*D;B<_&&(_=B,a=O.index)}});while(a!==null);return r._found=i,n==null||_<=n*n?u.site:null}};function EI(e){if(mp(e)&&(e=e.bbox),e&&!Array.isArray(e))throw new Error("bbox is invalid");return e?bxt(e):[_xt(),xxt()]}function gxt(e,t){if(t=t||{},!mp(t))throw new Error("options is invalid");var n=t.bbox;e==null&&(e=1);for(var r=[],i=0;i<e;i++)r.push(U0(EI(n)));return fg(r)}function mxt(e,t){if(t=t||{},!mp(t))throw new Error("options is invalid");var n=t.bbox,r=t.num_vertices,i=t.max_radial_length;e==null&&(e=1),su(r)||(r=10),su(i)||(i=10);for(var a=[],o=0;o<e;o++){var u=[],c=Array.apply(null,new Array(r+1)).map(Math.random);c.forEach(g),c.forEach(_),u[u.length-1]=u[0],u=u.map(yxt(EI(n))),a.push(V0([u]))}function g(E,C,O){O[C]=C>0?E+O[C-1]:E}function _(E){E=E*2*Math.PI/c[c.length-1];var C=Math.random();u.push([C*i*Math.sin(E),C*i*Math.cos(E)])}return fg(a)}function vxt(e,t){if(t=t||{},!mp(t))throw new Error("options is invalid");var n=t.bbox,r=t.num_vertices,i=t.max_length,a=t.max_rotation;e==null&&(e=1),(!su(r)||r<2)&&(r=10),su(i)||(i=1e-4),su(a)||(a=Math.PI/8);for(var o=[],u=0;u<e;u++){for(var c=EI(n),g=[c],_=0;_<r-1;_++){var E=_===0?Math.random()*2*Math.PI:Math.tan((g[_][1]-g[_-1][1])/(g[_][0]-g[_-1][0])),C=E+(Math.random()-.5)*a*2,O=Math.random()*i;g.push([g[_][0]+O*Math.cos(C),g[_][1]+O*Math.sin(C)])}o.push($0(g))}return fg(o)}function yxt(e){return function(t){return[t[0]+e[0],t[1]+e[1]]}}function v8(){return Math.random()-.5}function _xt(){return v8()*360}function xxt(){return v8()*180}function bxt(e){return[Math.random()*(e[2]-e[0])+e[0],Math.random()*(e[3]-e[1])+e[1]]}Object.freeze({randomPosition:EI,randomPoint:gxt,randomPolygon:mxt,randomLineString:vxt});function wxt(e,t){if(!e)throw new Error("geojson is required");if(e.type!=="FeatureCollection")throw new Error("geojson must be a FeatureCollection");if(t==null)throw new Error("filter is required");var n=[];return uI(e,function(r){GR(r.properties,t)&&n.push(r)}),fg(n)}function y8(e,t,n){if(!e)throw new Error("geojson is required");if(e.type!=="FeatureCollection")throw new Error("geojson must be a FeatureCollection");if(t==null)throw new Error("property is required");for(var r=_8(e,t),i=Object.keys(r),a=0;a<i.length;a++){for(var o=i[a],u=r[o],c=[],g=0;g<u.length;g++)c.push(e.features[u[g]]);n(fg(c),o,a)}}function Sxt(e,t,n,r){var i=r;return y8(e,t,function(a,o,u){u===0&&r===void 0?i=a:i=n(i,a,o,u)}),i}function _8(e,t){var n={};return uI(e,function(r,i){var a=r.properties||{};if(a.hasOwnProperty(t)){var o=a[t];n.hasOwnProperty(o)?n[o].push(i):n[o]=[i]}}),n}function GR(e,t){if(e===void 0)return!1;var n=typeof t;if(n==="number"||n==="string")return e.hasOwnProperty(t);if(Array.isArray(t)){for(var r=0;r<t.length;r++)if(!GR(e,t[r]))return!1;return!0}else return x8(e,t)}function x8(e,t){for(var n=Object.keys(t),r=0;r<n.length;r++){var i=n[r];if(e[i]!==t[i])return!1}return!0}function Ext(e,t){if(!t)return{};if(!t.length)return{};for(var n={},r=0;r<t.length;r++){var i=t[r];e.hasOwnProperty(i)&&(n[i]=e[i])}return n}Object.freeze({getCluster:wxt,clusterEach:y8,clusterReduce:Sxt,createBins:_8,applyFilter:GR,propertiesContainsFilter:x8,filterProperties:Ext});"fill"in Array.prototype||Object.defineProperty(Array.prototype,"fill",{configurable:!0,value:function(t){if(this===void 0||this===null)throw new TypeError(this+" is not an object");var n=Object(this),r=Math.max(Math.min(n.length,9007199254740991),0)||0,i=1 in arguments&&parseInt(Number(arguments[1]),10)||0;i=i<0?Math.max(r+i,0):Math.min(i,r);var a=2 in arguments&&arguments[2]!==void 0?parseInt(Number(arguments[2]),10)||0:r;for(a=a<0?Math.max(r+arguments[2],0):Math.min(a,r);i<a;)n[i]=t,++i;return n},writable:!0});Number.isFinite=Number.isFinite||function(e){return typeof e=="number"&&isFinite(e)};Number.isInteger=Number.isInteger||function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e};Number.parseFloat=Number.parseFloat||parseFloat;Number.isNaN=Number.isNaN||function(e){return e!==e};Math.trunc=Math.trunc||function(e){return e<0?Math.ceil(e):Math.floor(e)};var gy=function(){};gy.prototype.interfaces_=function(){return[]};gy.prototype.getClass=function(){return gy};gy.prototype.equalsWithTolerance=function(t,n,r){return Math.abs(t-n)<=r};var wo=function(){},Kn=function(){},b8={MAX_VALUE:{configurable:!0}};Kn.isNaN=function(t){return Number.isNaN(t)};Kn.doubleToLongBits=function(t){return t};Kn.longBitsToDouble=function(t){return t};Kn.isInfinite=function(t){return!Number.isFinite(t)};b8.MAX_VALUE.get=function(){return Number.MAX_VALUE};Object.defineProperties(Kn,b8);var wc=function(){},CI=function(){},Z0=function(){};function Sc(){}var Xt=function e(){if(this.x=null,this.y=null,this.z=null,arguments.length===0)this.x=0,this.y=0,this.z=e.NULL_ORDINATE;else if(arguments.length===1){var t=arguments[0];this.x=t.x,this.y=t.y,this.z=t.z}else arguments.length===2?(this.x=arguments[0],this.y=arguments[1],this.z=e.NULL_ORDINATE):arguments.length===3&&(this.x=arguments[0],this.y=arguments[1],this.z=arguments[2])},my={DimensionalComparator:{configurable:!0},serialVersionUID:{configurable:!0},NULL_ORDINATE:{configurable:!0},X:{configurable:!0},Y:{configurable:!0},Z:{configurable:!0}};Xt.prototype.setOrdinate=function(t,n){switch(t){case Xt.X:this.x=n;break;case Xt.Y:this.y=n;break;case Xt.Z:this.z=n;break;default:throw new wo}};Xt.prototype.equals2D=function(){if(arguments.length===1){var t=arguments[0];return!(this.x!==t.x||this.y!==t.y)}else if(arguments.length===2){var n=arguments[0],r=arguments[1];return!(!gy.equalsWithTolerance(this.x,n.x,r)||!gy.equalsWithTolerance(this.y,n.y,r))}};Xt.prototype.getOrdinate=function(t){switch(t){case Xt.X:return this.x;case Xt.Y:return this.y;case Xt.Z:return this.z}throw new wo};Xt.prototype.equals3D=function(t){return this.x===t.x&&this.y===t.y&&(this.z===t.z||Kn.isNaN(this.z))&&Kn.isNaN(t.z)};Xt.prototype.equals=function(t){return t instanceof Xt?this.equals2D(t):!1};Xt.prototype.equalInZ=function(t,n){return gy.equalsWithTolerance(this.z,t.z,n)};Xt.prototype.compareTo=function(t){var n=t;return this.x<n.x?-1:this.x>n.x?1:this.y<n.y?-1:this.y>n.y?1:0};Xt.prototype.clone=function(){};Xt.prototype.copy=function(){return new Xt(this)};Xt.prototype.toString=function(){return"("+this.x+", "+this.y+", "+this.z+")"};Xt.prototype.distance3D=function(t){var n=this.x-t.x,r=this.y-t.y,i=this.z-t.z;return Math.sqrt(n*n+r*r+i*i)};Xt.prototype.distance=function(t){var n=this.x-t.x,r=this.y-t.y;return Math.sqrt(n*n+r*r)};Xt.prototype.hashCode=function(){var t=17;return t=37*t+Xt.hashCode(this.x),t=37*t+Xt.hashCode(this.y),t};Xt.prototype.setCoordinate=function(t){this.x=t.x,this.y=t.y,this.z=t.z};Xt.prototype.interfaces_=function(){return[wc,CI,Sc]};Xt.prototype.getClass=function(){return Xt};Xt.hashCode=function(){if(arguments.length===1){var t=arguments[0],n=Kn.doubleToLongBits(t);return Math.trunc((n^n)>>>32)}};my.DimensionalComparator.get=function(){return pg};my.serialVersionUID.get=function(){return 6683108902428367e3};my.NULL_ORDINATE.get=function(){return Kn.NaN};my.X.get=function(){return 0};my.Y.get=function(){return 1};my.Z.get=function(){return 2};Object.defineProperties(Xt,my);var pg=function(t){if(this._dimensionsToTest=2,arguments.length!==0){if(arguments.length===1){var n=arguments[0];if(n!==2&&n!==3)throw new wo;this._dimensionsToTest=n}}};pg.prototype.compare=function(t,n){var r=t,i=n,a=pg.compare(r.x,i.x);if(a!==0)return a;var o=pg.compare(r.y,i.y);if(o!==0)return o;if(this._dimensionsToTest<=2)return 0;var u=pg.compare(r.z,i.z);return u};pg.prototype.interfaces_=function(){return[Z0]};pg.prototype.getClass=function(){return pg};pg.compare=function(t,n){return t<n?-1:t>n?1:Kn.isNaN(t)?Kn.isNaN(n)?0:-1:Kn.isNaN(n)?1:0};var K0=function(){};K0.prototype.create=function(){};K0.prototype.interfaces_=function(){return[]};K0.prototype.getClass=function(){return K0};var Kt=function(){},iw={INTERIOR:{configurable:!0},BOUNDARY:{configurable:!0},EXTERIOR:{configurable:!0},NONE:{configurable:!0}};Kt.prototype.interfaces_=function(){return[]};Kt.prototype.getClass=function(){return Kt};Kt.toLocationSymbol=function(t){switch(t){case Kt.EXTERIOR:return"e";case Kt.BOUNDARY:return"b";case Kt.INTERIOR:return"i";case Kt.NONE:return"-"}throw new wo};iw.INTERIOR.get=function(){return 0};iw.BOUNDARY.get=function(){return 1};iw.EXTERIOR.get=function(){return 2};iw.NONE.get=function(){return-1};Object.defineProperties(Kt,iw);var $n=function(e,t){return e.interfaces_&&e.interfaces_().indexOf(t)>-1},Bl=function(){},w8={LOG_10:{configurable:!0}};Bl.prototype.interfaces_=function(){return[]};Bl.prototype.getClass=function(){return Bl};Bl.log10=function(t){var n=Math.log(t);return Kn.isInfinite(n)||Kn.isNaN(n)?n:n/Bl.LOG_10};Bl.min=function(t,n,r,i){var a=t;return n<a&&(a=n),r<a&&(a=r),i<a&&(a=i),a};Bl.clamp=function(){if(typeof arguments[2]=="number"&&typeof arguments[0]=="number"&&typeof arguments[1]=="number"){var t=arguments[0],n=arguments[1],r=arguments[2];return t<n?n:t>r?r:t}else if(Number.isInteger(arguments[2])&&Number.isInteger(arguments[0])&&Number.isInteger(arguments[1])){var i=arguments[0],a=arguments[1],o=arguments[2];return i<a?a:i>o?o:i}};Bl.wrap=function(t,n){return t<0?n- -t%n:t%n};Bl.max=function(){if(arguments.length===3){var t=arguments[0],n=arguments[1],r=arguments[2],i=t;return n>i&&(i=n),r>i&&(i=r),i}else if(arguments.length===4){var a=arguments[0],o=arguments[1],u=arguments[2],c=arguments[3],g=a;return o>g&&(g=o),u>g&&(g=u),c>g&&(g=c),g}};Bl.average=function(t,n){return(t+n)/2};w8.LOG_10.get=function(){return Math.log(10)};Object.defineProperties(Bl,w8);var dh=function(t){this.str=t};dh.prototype.append=function(t){this.str+=t};dh.prototype.setCharAt=function(t,n){this.str=this.str.substr(0,t)+n+this.str.substr(t+1)};dh.prototype.toString=function(t){return this.str};var gh=function(t){this.value=t};gh.prototype.intValue=function(){return this.value};gh.prototype.compareTo=function(t){return this.value<t?-1:this.value>t?1:0};gh.isNaN=function(t){return Number.isNaN(t)};var ow=function(){};ow.isWhitespace=function(t){return t<=32&&t>=0||t===127};ow.toUpperCase=function(t){return t.toUpperCase()};var ue=function e(){if(this._hi=0,this._lo=0,arguments.length===0)this.init(0);else if(arguments.length===1){if(typeof arguments[0]=="number"){var t=arguments[0];this.init(t)}else if(arguments[0]instanceof e){var n=arguments[0];this.init(n)}else if(typeof arguments[0]=="string"){var r=arguments[0];e.call(this,e.parse(r))}}else if(arguments.length===2){var i=arguments[0],a=arguments[1];this.init(i,a)}},gf={PI:{configurable:!0},TWO_PI:{configurable:!0},PI_2:{configurable:!0},E:{configurable:!0},NaN:{configurable:!0},EPS:{configurable:!0},SPLIT:{configurable:!0},MAX_PRINT_DIGITS:{configurable:!0},TEN:{configurable:!0},ONE:{configurable:!0},SCI_NOT_EXPONENT_CHAR:{configurable:!0},SCI_NOT_ZERO:{configurable:!0}};ue.prototype.le=function(t){return(this._hi<t._hi||this._hi===t._hi)&&this._lo<=t._lo};ue.prototype.extractSignificantDigits=function(t,n){var r=this.abs(),i=ue.magnitude(r._hi),a=ue.TEN.pow(i);r=r.divide(a),r.gt(ue.TEN)?(r=r.divide(ue.TEN),i+=1):r.lt(ue.ONE)&&(r=r.multiply(ue.TEN),i-=1);for(var o=i+1,u=new dh,c=ue.MAX_PRINT_DIGITS-1,g=0;g<=c;g++){t&&g===o&&u.append(".");var _=Math.trunc(r._hi);if(_<0)break;var E=!1,C=0;_>9?(E=!0,C="9"):C="0"+_,u.append(C),r=r.subtract(ue.valueOf(_)).multiply(ue.TEN),E&&r.selfAdd(ue.TEN);var O=!0,R=ue.magnitude(r._hi);if(R<0&&Math.abs(R)>=c-g&&(O=!1),!O)break}return n[0]=i,u.toString()};ue.prototype.sqr=function(){return this.multiply(this)};ue.prototype.doubleValue=function(){return this._hi+this._lo};ue.prototype.subtract=function(){if(arguments[0]instanceof ue){var t=arguments[0];return this.add(t.negate())}else if(typeof arguments[0]=="number"){var n=arguments[0];return this.add(-n)}};ue.prototype.equals=function(){if(arguments.length===1){var t=arguments[0];return this._hi===t._hi&&this._lo===t._lo}};ue.prototype.isZero=function(){return this._hi===0&&this._lo===0};ue.prototype.selfSubtract=function(){if(arguments[0]instanceof ue){var t=arguments[0];return this.isNaN()?this:this.selfAdd(-t._hi,-t._lo)}else if(typeof arguments[0]=="number"){var n=arguments[0];return this.isNaN()?this:this.selfAdd(-n,0)}};ue.prototype.getSpecialNumberString=function(){return this.isZero()?"0.0":this.isNaN()?"NaN ":null};ue.prototype.min=function(t){return this.le(t)?this:t};ue.prototype.selfDivide=function(){if(arguments.length===1){if(arguments[0]instanceof ue){var t=arguments[0];return this.selfDivide(t._hi,t._lo)}else if(typeof arguments[0]=="number"){var n=arguments[0];return this.selfDivide(n,0)}}else if(arguments.length===2){var r=arguments[0],i=arguments[1],a=null,o=null,u=null,c=null,g=null,_=null,E=null,C=null;return g=this._hi/r,_=ue.SPLIT*g,a=_-g,C=ue.SPLIT*r,a=_-a,o=g-a,u=C-r,E=g*r,u=C-u,c=r-u,C=a*u-E+a*c+o*u+o*c,_=(this._hi-E-C+this._lo-g*i)/r,C=g+_,this._hi=C,this._lo=g-C+_,this}};ue.prototype.dump=function(){return"DD<"+this._hi+", "+this._lo+">"};ue.prototype.divide=function(){if(arguments[0]instanceof ue){var t=arguments[0],n=null,r=null,i=null,a=null,o=null,u=null,c=null,g=null;o=this._hi/t._hi,u=ue.SPLIT*o,n=u-o,g=ue.SPLIT*t._hi,n=u-n,r=o-n,i=g-t._hi,c=o*t._hi,i=g-i,a=t._hi-i,g=n*i-c+n*a+r*i+r*a,u=(this._hi-c-g+this._lo-o*t._lo)/t._hi,g=o+u;var _=g,E=o-g+u;return new ue(_,E)}else if(typeof arguments[0]=="number"){var C=arguments[0];return Kn.isNaN(C)?ue.createNaN():ue.copy(this).selfDivide(C,0)}};ue.prototype.ge=function(t){return(this._hi>t._hi||this._hi===t._hi)&&this._lo>=t._lo};ue.prototype.pow=function(t){if(t===0)return ue.valueOf(1);var n=new ue(this),r=ue.valueOf(1),i=Math.abs(t);if(i>1)for(;i>0;)i%2==1&&r.selfMultiply(n),i/=2,i>0&&(n=n.sqr());else r=n;return t<0?r.reciprocal():r};ue.prototype.ceil=function(){if(this.isNaN())return ue.NaN;var t=Math.ceil(this._hi),n=0;return t===this._hi&&(n=Math.ceil(this._lo)),new ue(t,n)};ue.prototype.compareTo=function(t){var n=t;return this._hi<n._hi?-1:this._hi>n._hi?1:this._lo<n._lo?-1:this._lo>n._lo?1:0};ue.prototype.rint=function(){if(this.isNaN())return this;var t=this.add(.5);return t.floor()};ue.prototype.setValue=function(){if(arguments[0]instanceof ue){var t=arguments[0];return this.init(t),this}else if(typeof arguments[0]=="number"){var n=arguments[0];return this.init(n),this}};ue.prototype.max=function(t){return this.ge(t)?this:t};ue.prototype.sqrt=function(){if(this.isZero())return ue.valueOf(0);if(this.isNegative())return ue.NaN;var t=1/Math.sqrt(this._hi),n=this._hi*t,r=ue.valueOf(n),i=this.subtract(r.sqr()),a=i._hi*(t*.5);return r.add(a)};ue.prototype.selfAdd=function(){if(arguments.length===1){if(arguments[0]instanceof ue){var t=arguments[0];return this.selfAdd(t._hi,t._lo)}else if(typeof arguments[0]=="number"){var n=arguments[0],r=null,i=null,a=null,o=null,u=null,c=null;return a=this._hi+n,u=a-this._hi,o=a-u,o=n-u+(this._hi-o),c=o+this._lo,r=a+c,i=c+(a-r),this._hi=r+i,this._lo=i+(r-this._hi),this}}else if(arguments.length===2){var g=arguments[0],_=arguments[1],E=null,C=null,O=null,R=null,D=null,B=null,z=null,k=null;D=this._hi+g,O=this._lo+_,z=D-this._hi,k=O-this._lo,B=D-z,R=O-k,B=g-z+(this._hi-B),R=_-k+(this._lo-R),z=B+O,E=D+z,C=z+(D-E),z=R+C;var $=E+z,K=z+(E-$);return this._hi=$,this._lo=K,this}};ue.prototype.selfMultiply=function(){if(arguments.length===1){if(arguments[0]instanceof ue){var t=arguments[0];return this.selfMultiply(t._hi,t._lo)}else if(typeof arguments[0]=="number"){var n=arguments[0];return this.selfMultiply(n,0)}}else if(arguments.length===2){var r=arguments[0],i=arguments[1],a=null,o=null,u=null,c=null,g=null,_=null;g=ue.SPLIT*this._hi,a=g-this._hi,_=ue.SPLIT*r,a=g-a,o=this._hi-a,u=_-r,g=this._hi*r,u=_-u,c=r-u,_=a*u-g+a*c+o*u+o*c+(this._hi*i+this._lo*r);var E=g+_;a=g-E;var C=_+a;return this._hi=E,this._lo=C,this}};ue.prototype.selfSqr=function(){return this.selfMultiply(this)};ue.prototype.floor=function(){if(this.isNaN())return ue.NaN;var t=Math.floor(this._hi),n=0;return t===this._hi&&(n=Math.floor(this._lo)),new ue(t,n)};ue.prototype.negate=function(){return this.isNaN()?this:new ue(-this._hi,-this._lo)};ue.prototype.clone=function(){};ue.prototype.multiply=function(){if(arguments[0]instanceof ue){var t=arguments[0];return t.isNaN()?ue.createNaN():ue.copy(this).selfMultiply(t)}else if(typeof arguments[0]=="number"){var n=arguments[0];return Kn.isNaN(n)?ue.createNaN():ue.copy(this).selfMultiply(n,0)}};ue.prototype.isNaN=function(){return Kn.isNaN(this._hi)};ue.prototype.intValue=function(){return Math.trunc(this._hi)};ue.prototype.toString=function(){var t=ue.magnitude(this._hi);return t>=-3&&t<=20?this.toStandardNotation():this.toSciNotation()};ue.prototype.toStandardNotation=function(){var t=this.getSpecialNumberString();if(t!==null)return t;var n=new Array(1).fill(null),r=this.extractSignificantDigits(!0,n),i=n[0]+1,a=r;if(r.charAt(0)===".")a="0"+r;else if(i<0)a="0."+ue.stringOfChar("0",-i)+r;else if(r.indexOf(".")===-1){var o=i-r.length,u=ue.stringOfChar("0",o);a=r+u+".0"}return this.isNegative()?"-"+a:a};ue.prototype.reciprocal=function(){var t=null,n=null,r=null,i=null,a=null,o=null,u=null,c=null;a=1/this._hi,o=ue.SPLIT*a,t=o-a,c=ue.SPLIT*this._hi,t=o-t,n=a-t,r=c-this._hi,u=a*this._hi,r=c-r,i=this._hi-r,c=t*r-u+t*i+n*r+n*i,o=(1-u-c-a*this._lo)/this._hi;var g=a+o,_=a-g+o;return new ue(g,_)};ue.prototype.toSciNotation=function(){if(this.isZero())return ue.SCI_NOT_ZERO;var t=this.getSpecialNumberString();if(t!==null)return t;var n=new Array(1).fill(null),r=this.extractSignificantDigits(!1,n),i=ue.SCI_NOT_EXPONENT_CHAR+n[0];if(r.charAt(0)==="0")throw new Error("Found leading zero: "+r);var a="";r.length>1&&(a=r.substring(1));var o=r.charAt(0)+"."+a;return this.isNegative()?"-"+o+i:o+i};ue.prototype.abs=function(){return this.isNaN()?ue.NaN:this.isNegative()?this.negate():new ue(this)};ue.prototype.isPositive=function(){return(this._hi>0||this._hi===0)&&this._lo>0};ue.prototype.lt=function(t){return(this._hi<t._hi||this._hi===t._hi)&&this._lo<t._lo};ue.prototype.add=function(){if(arguments[0]instanceof ue){var t=arguments[0];return ue.copy(this).selfAdd(t)}else if(typeof arguments[0]=="number"){var n=arguments[0];return ue.copy(this).selfAdd(n)}};ue.prototype.init=function(){if(arguments.length===1){if(typeof arguments[0]=="number"){var t=arguments[0];this._hi=t,this._lo=0}else if(arguments[0]instanceof ue){var n=arguments[0];this._hi=n._hi,this._lo=n._lo}}else if(arguments.length===2){var r=arguments[0],i=arguments[1];this._hi=r,this._lo=i}};ue.prototype.gt=function(t){return(this._hi>t._hi||this._hi===t._hi)&&this._lo>t._lo};ue.prototype.isNegative=function(){return(this._hi<0||this._hi===0)&&this._lo<0};ue.prototype.trunc=function(){return this.isNaN()?ue.NaN:this.isPositive()?this.floor():this.ceil()};ue.prototype.signum=function(){return this._hi>0?1:this._hi<0?-1:this._lo>0?1:this._lo<0?-1:0};ue.prototype.interfaces_=function(){return[Sc,wc,CI]};ue.prototype.getClass=function(){return ue};ue.sqr=function(t){return ue.valueOf(t).selfMultiply(t)};ue.valueOf=function(){if(typeof arguments[0]=="string"){var t=arguments[0];return ue.parse(t)}else if(typeof arguments[0]=="number"){var n=arguments[0];return new ue(n)}};ue.sqrt=function(t){return ue.valueOf(t).sqrt()};ue.parse=function(t){for(var n=0,r=t.length;ow.isWhitespace(t.charAt(n));)n++;var i=!1;if(n<r){var a=t.charAt(n);(a==="-"||a==="+")&&(n++,a==="-"&&(i=!0))}for(var o=new ue,u=0,c=0,g=0;!(n>=r);){var _=t.charAt(n);if(n++,ow.isDigit(_)){var E=_-"0";o.selfMultiply(ue.TEN),o.selfAdd(E),u++;continue}if(_==="."){c=u;continue}if(_==="e"||_==="E"){var C=t.substring(n);try{g=gh.parseInt(C)}catch(z){throw z instanceof Error?new Error("Invalid exponent "+C+" in string "+t):z}finally{}break}throw new Error("Unexpected character '"+_+"' at position "+n+" in string "+t)}var O=o,R=u-c-g;if(R===0)O=o;else if(R>0){var D=ue.TEN.pow(R);O=o.divide(D)}else if(R<0){var B=ue.TEN.pow(-R);O=o.multiply(B)}return i?O.negate():O};ue.createNaN=function(){return new ue(Kn.NaN,Kn.NaN)};ue.copy=function(t){return new ue(t)};ue.magnitude=function(t){var n=Math.abs(t),r=Math.log(n)/Math.log(10),i=Math.trunc(Math.floor(r)),a=Math.pow(10,i);return a*10<=n&&(i+=1),i};ue.stringOfChar=function(t,n){for(var r=new dh,i=0;i<n;i++)r.append(t);return r.toString()};gf.PI.get=function(){return new ue(3.141592653589793,12246467991473532e-32)};gf.TWO_PI.get=function(){return new ue(6.283185307179586,24492935982947064e-32)};gf.PI_2.get=function(){return new ue(1.5707963267948966,6123233995736766e-32)};gf.E.get=function(){return new ue(2.718281828459045,14456468917292502e-32)};gf.NaN.get=function(){return new ue(Kn.NaN,Kn.NaN)};gf.EPS.get=function(){return 123259516440783e-46};gf.SPLIT.get=function(){return 134217729};gf.MAX_PRINT_DIGITS.get=function(){return 32};gf.TEN.get=function(){return ue.valueOf(10)};gf.ONE.get=function(){return ue.valueOf(1)};gf.SCI_NOT_EXPONENT_CHAR.get=function(){return"E"};gf.SCI_NOT_ZERO.get=function(){return"0.0E0"};Object.defineProperties(ue,gf);var Ru=function(){},S8={DP_SAFE_EPSILON:{configurable:!0}};Ru.prototype.interfaces_=function(){return[]};Ru.prototype.getClass=function(){return Ru};Ru.orientationIndex=function(t,n,r){var i=Ru.orientationIndexFilter(t,n,r);if(i<=1)return i;var a=ue.valueOf(n.x).selfAdd(-t.x),o=ue.valueOf(n.y).selfAdd(-t.y),u=ue.valueOf(r.x).selfAdd(-n.x),c=ue.valueOf(r.y).selfAdd(-n.y);return a.selfMultiply(c).selfSubtract(o.selfMultiply(u)).signum()};Ru.signOfDet2x2=function(t,n,r,i){var a=t.multiply(i).selfSubtract(n.multiply(r));return a.signum()};Ru.intersection=function(t,n,r,i){var a=ue.valueOf(i.y).selfSubtract(r.y).selfMultiply(ue.valueOf(n.x).selfSubtract(t.x)),o=ue.valueOf(i.x).selfSubtract(r.x).selfMultiply(ue.valueOf(n.y).selfSubtract(t.y)),u=a.subtract(o),c=ue.valueOf(i.x).selfSubtract(r.x).selfMultiply(ue.valueOf(t.y).selfSubtract(r.y)),g=ue.valueOf(i.y).selfSubtract(r.y).selfMultiply(ue.valueOf(t.x).selfSubtract(r.x)),_=c.subtract(g),E=_.selfDivide(u).doubleValue(),C=ue.valueOf(t.x).selfAdd(ue.valueOf(n.x).selfSubtract(t.x).selfMultiply(E)).doubleValue(),O=ue.valueOf(n.x).selfSubtract(t.x).selfMultiply(ue.valueOf(t.y).selfSubtract(r.y)),R=ue.valueOf(n.y).selfSubtract(t.y).selfMultiply(ue.valueOf(t.x).selfSubtract(r.x)),D=O.subtract(R),B=D.selfDivide(u).doubleValue(),z=ue.valueOf(r.y).selfAdd(ue.valueOf(i.y).selfSubtract(r.y).selfMultiply(B)).doubleValue();return new Xt(C,z)};Ru.orientationIndexFilter=function(t,n,r){var i=null,a=(t.x-r.x)*(n.y-r.y),o=(t.y-r.y)*(n.x-r.x),u=a-o;if(a>0){if(o<=0)return Ru.signum(u);i=a+o}else if(a<0){if(o>=0)return Ru.signum(u);i=-a-o}else return Ru.signum(u);var c=Ru.DP_SAFE_EPSILON*i;return u>=c||-u>=c?Ru.signum(u):2};Ru.signum=function(t){return t>0?1:t<0?-1:0};S8.DP_SAFE_EPSILON.get=function(){return 1e-15};Object.defineProperties(Ru,S8);var Jr=function(){},aw={X:{configurable:!0},Y:{configurable:!0},Z:{configurable:!0},M:{configurable:!0}};aw.X.get=function(){return 0};aw.Y.get=function(){return 1};aw.Z.get=function(){return 2};aw.M.get=function(){return 3};Jr.prototype.setOrdinate=function(t,n,r){};Jr.prototype.size=function(){};Jr.prototype.getOrdinate=function(t,n){};Jr.prototype.getCoordinate=function(){};Jr.prototype.getCoordinateCopy=function(t){};Jr.prototype.getDimension=function(){};Jr.prototype.getX=function(t){};Jr.prototype.clone=function(){};Jr.prototype.expandEnvelope=function(t){};Jr.prototype.copy=function(){};Jr.prototype.getY=function(t){};Jr.prototype.toCoordinateArray=function(){};Jr.prototype.interfaces_=function(){return[CI]};Jr.prototype.getClass=function(){return Jr};Object.defineProperties(Jr,aw);var E8=function(){},J0=function(e){function t(){e.call(this,"Projective point not representable on the Cartesian plane.")}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(E8),xs=function(){};xs.arraycopy=function(t,n,r,i,a){for(var o=0,u=n;u<n+a;u++)r[i+o]=t[u],o++};xs.getProperty=function(t){return{"line.separator":` `}[t]};var mf=function e(){if(this.x=null,this.y=null,this.w=null,arguments.length===0)this.x=0,this.y=0,this.w=1;else if(arguments.length===1){var t=arguments[0];this.x=t.x,this.y=t.y,this.w=1}else if(arguments.length===2){if(typeof arguments[0]=="number"&&typeof arguments[1]=="number"){var n=arguments[0],r=arguments[1];this.x=n,this.y=r,this.w=1}else if(arguments[0]instanceof e&&arguments[1]instanceof e){var i=arguments[0],a=arguments[1];this.x=i.y*a.w-a.y*i.w,this.y=a.x*i.w-i.x*a.w,this.w=i.x*a.y-a.x*i.y}else if(arguments[0]instanceof Xt&&arguments[1]instanceof Xt){var o=arguments[0],u=arguments[1];this.x=o.y-u.y,this.y=u.x-o.x,this.w=o.x*u.y-u.x*o.y}}else if(arguments.length===3){var c=arguments[0],g=arguments[1],_=arguments[2];this.x=c,this.y=g,this.w=_}else if(arguments.length===4){var E=arguments[0],C=arguments[1],O=arguments[2],R=arguments[3],D=E.y-C.y,B=C.x-E.x,z=E.x*C.y-C.x*E.y,k=O.y-R.y,$=R.x-O.x,K=O.x*R.y-R.x*O.y;this.x=B*K-$*z,this.y=k*z-D*K,this.w=D*$-k*B}};mf.prototype.getY=function(){var t=this.y/this.w;if(Kn.isNaN(t)||Kn.isInfinite(t))throw new J0;return t};mf.prototype.getX=function(){var t=this.x/this.w;if(Kn.isNaN(t)||Kn.isInfinite(t))throw new J0;return t};mf.prototype.getCoordinate=function(){var t=new Xt;return t.x=this.getX(),t.y=this.getY(),t};mf.prototype.interfaces_=function(){return[]};mf.prototype.getClass=function(){return mf};mf.intersection=function(t,n,r,i){var a=t.y-n.y,o=n.x-t.x,u=t.x*n.y-n.x*t.y,c=r.y-i.y,g=i.x-r.x,_=r.x*i.y-i.x*r.y,E=o*_-g*u,C=c*u-a*_,O=a*g-c*o,R=E/O,D=C/O;if(Kn.isNaN(R)||Kn.isInfinite(R)||Kn.isNaN(D)||Kn.isInfinite(D))throw new J0;return new Xt(R,D)};var In=function e(){if(this._minx=null,this._maxx=null,this._miny=null,this._maxy=null,arguments.length===0)this.init();else if(arguments.length===1){if(arguments[0]instanceof Xt){var t=arguments[0];this.init(t.x,t.x,t.y,t.y)}else if(arguments[0]instanceof e){var n=arguments[0];this.init(n)}}else if(arguments.length===2){var r=arguments[0],i=arguments[1];this.init(r.x,i.x,r.y,i.y)}else if(arguments.length===4){var a=arguments[0],o=arguments[1],u=arguments[2],c=arguments[3];this.init(a,o,u,c)}},C8={serialVersionUID:{configurable:!0}};In.prototype.getArea=function(){return this.getWidth()*this.getHeight()};In.prototype.equals=function(t){if(!(t instanceof In))return!1;var n=t;return this.isNull()?n.isNull():this._maxx===n.getMaxX()&&this._maxy===n.getMaxY()&&this._minx===n.getMinX()&&this._miny===n.getMinY()};In.prototype.intersection=function(t){if(this.isNull()||t.isNull()||!this.intersects(t))return new In;var n=this._minx>t._minx?this._minx:t._minx,r=this._miny>t._miny?this._miny:t._miny,i=this._maxx<t._maxx?this._maxx:t._maxx,a=this._maxy<t._maxy?this._maxy:t._maxy;return new In(n,i,r,a)};In.prototype.isNull=function(){return this._maxx<this._minx};In.prototype.getMaxX=function(){return this._maxx};In.prototype.covers=function(){if(arguments.length===1){if(arguments[0]instanceof Xt){var t=arguments[0];return this.covers(t.x,t.y)}else if(arguments[0]instanceof In){var n=arguments[0];return this.isNull()||n.isNull()?!1:n.getMinX()>=this._minx&&n.getMaxX()<=this._maxx&&n.getMinY()>=this._miny&&n.getMaxY()<=this._maxy}}else if(arguments.length===2){var r=arguments[0],i=arguments[1];return this.isNull()?!1:r>=this._minx&&r<=this._maxx&&i>=this._miny&&i<=this._maxy}};In.prototype.intersects=function(){if(arguments.length===1){if(arguments[0]instanceof In){var t=arguments[0];return this.isNull()||t.isNull()?!1:!(t._minx>this._maxx||t._maxx<this._minx||t._miny>this._maxy||t._maxy<this._miny)}else if(arguments[0]instanceof Xt){var n=arguments[0];return this.intersects(n.x,n.y)}}else if(arguments.length===2){var r=arguments[0],i=arguments[1];return this.isNull()?!1:!(r>this._maxx||r<this._minx||i>this._maxy||i<this._miny)}};In.prototype.getMinY=function(){return this._miny};In.prototype.getMinX=function(){return this._minx};In.prototype.expandToInclude=function(){if(arguments.length===1){if(arguments[0]instanceof Xt){var t=arguments[0];this.expandToInclude(t.x,t.y)}else if(arguments[0]instanceof In){var n=arguments[0];if(n.isNull())return null;this.isNull()?(this._minx=n.getMinX(),this._maxx=n.getMaxX(),this._miny=n.getMinY(),this._maxy=n.getMaxY()):(n._minx<this._minx&&(this._minx=n._minx),n._maxx>this._maxx&&(this._maxx=n._maxx),n._miny<this._miny&&(this._miny=n._miny),n._maxy>this._maxy&&(this._maxy=n._maxy))}}else if(arguments.length===2){var r=arguments[0],i=arguments[1];this.isNull()?(this._minx=r,this._maxx=r,this._miny=i,this._maxy=i):(r<this._minx&&(this._minx=r),r>this._maxx&&(this._maxx=r),i<this._miny&&(this._miny=i),i>this._maxy&&(this._maxy=i))}};In.prototype.minExtent=function(){if(this.isNull())return 0;var t=this.getWidth(),n=this.getHeight();return t<n?t:n};In.prototype.getWidth=function(){return this.isNull()?0:this._maxx-this._minx};In.prototype.compareTo=function(t){var n=t;return this.isNull()?n.isNull()?0:-1:n.isNull()?1:this._minx<n._minx?-1:this._minx>n._minx?1:this._miny<n._miny?-1:this._miny>n._miny?1:this._maxx<n._maxx?-1:this._maxx>n._maxx?1:this._maxy<n._maxy?-1:this._maxy>n._maxy?1:0};In.prototype.translate=function(t,n){if(this.isNull())return null;this.init(this.getMinX()+t,this.getMaxX()+t,this.getMinY()+n,this.getMaxY()+n)};In.prototype.toString=function(){return"Env["+this._minx+" : "+this._maxx+", "+this._miny+" : "+this._maxy+"]"};In.prototype.setToNull=function(){this._minx=0,this._maxx=-1,this._miny=0,this._maxy=-1};In.prototype.getHeight=function(){return this.isNull()?0:this._maxy-this._miny};In.prototype.maxExtent=function(){if(this.isNull())return 0;var t=this.getWidth(),n=this.getHeight();return t>n?t:n};In.prototype.expandBy=function(){if(arguments.length===1){var t=arguments[0];this.expandBy(t,t)}else if(arguments.length===2){var n=arguments[0],r=arguments[1];if(this.isNull())return null;this._minx-=n,this._maxx+=n,this._miny-=r,this._maxy+=r,(this._minx>this._maxx||this._miny>this._maxy)&&this.setToNull()}};In.prototype.contains=function(){if(arguments.length===1){if(arguments[0]instanceof In){var t=arguments[0];return this.covers(t)}else if(arguments[0]instanceof Xt){var n=arguments[0];return this.covers(n)}}else if(arguments.length===2){var r=arguments[0],i=arguments[1];return this.covers(r,i)}};In.prototype.centre=function(){return this.isNull()?null:new Xt((this.getMinX()+this.getMaxX())/2,(this.getMinY()+this.getMaxY())/2)};In.prototype.init=function(){if(arguments.length===0)this.setToNull();else if(arguments.length===1){if(arguments[0]instanceof Xt){var t=arguments[0];this.init(t.x,t.x,t.y,t.y)}else if(arguments[0]instanceof In){var n=arguments[0];this._minx=n._minx,this._maxx=n._maxx,this._miny=n._miny,this._maxy=n._maxy}}else if(arguments.length===2){var r=arguments[0],i=arguments[1];this.init(r.x,i.x,r.y,i.y)}else if(arguments.length===4){var a=arguments[0],o=arguments[1],u=arguments[2],c=arguments[3];a<o?(this._minx=a,this._maxx=o):(this._minx=o,this._maxx=a),u<c?(this._miny=u,this._maxy=c):(this._miny=c,this._maxy=u)}};In.prototype.getMaxY=function(){return this._maxy};In.prototype.distance=function(t){if(this.intersects(t))return 0;var n=0;this._maxx<t._minx?n=t._minx-this._maxx:this._minx>t._maxx&&(n=this._minx-t._maxx);var r=0;return this._maxy<t._miny?r=t._miny-this._maxy:this._miny>t._maxy&&(r=this._miny-t._maxy),n===0?r:r===0?n:Math.sqrt(n*n+r*r)};In.prototype.hashCode=function(){var t=17;return t=37*t+Xt.hashCode(this._minx),t=37*t+Xt.hashCode(this._maxx),t=37*t+Xt.hashCode(this._miny),t=37*t+Xt.hashCode(this._maxy),t};In.prototype.interfaces_=function(){return[wc,Sc]};In.prototype.getClass=function(){return In};In.intersects=function(){if(arguments.length===3){var t=arguments[0],n=arguments[1],r=arguments[2];return r.x>=(t.x<n.x?t.x:n.x)&&r.x<=(t.x>n.x?t.x:n.x)&&r.y>=(t.y<n.y?t.y:n.y)&&r.y<=(t.y>n.y?t.y:n.y)}else if(arguments.length===4){var i=arguments[0],a=arguments[1],o=arguments[2],u=arguments[3],c=Math.min(o.x,u.x),g=Math.max(o.x,u.x),_=Math.min(i.x,a.x),E=Math.max(i.x,a.x);return!(_>g||E<c||(c=Math.min(o.y,u.y),g=Math.max(o.y,u.y),_=Math.min(i.y,a.y),E=Math.max(i.y,a.y),_>g)||E<c)}};C8.serialVersionUID.get=function(){return 5873921885273102e3};Object.defineProperties(In,C8);var mh={typeStr:/^\s*(\w+)\s*\(\s*(.*)\s*\)\s*$/,emptyTypeStr:/^\s*(\w+)\s*EMPTY\s*$/,spaces:/\s+/,parenComma:/\)\s*,\s*\(/,doubleParenComma:/\)\s*\)\s*,\s*\(\s*\(/,trimParens:/^\s*\(?(.*?)\)?\s*$/},II=function(t){this.geometryFactory=t||new Fr};II.prototype.read=function(t){var n,r,i;t=t.replace(/[\n\r]/g," ");var a=mh.typeStr.exec(t);if(t.search("EMPTY")!==-1&&(a=mh.emptyTypeStr.exec(t),a[2]=void 0),a&&(r=a[1].toLowerCase(),i=a[2],Q0[r]&&(n=Q0[r].apply(this,[i]))),n===void 0)throw new Error("Could not parse WKT "+t);return n};II.prototype.write=function(t){return this.extractGeometry(t)};II.prototype.extractGeometry=function(t){var n=t.getGeometryType().toLowerCase();if(!od[n])return null;var r=n.toUpperCase(),i;return t.isEmpty()?i=r+" EMPTY":i=r+"("+od[n].apply(this,[t])+")",i};var od={coordinate:function(t){return t.x+" "+t.y},point:function(t){return od.coordinate.call(this,t._coordinates._coordinates[0])},multipoint:function(t){for(var n=this,r=[],i=0,a=t._geometries.length;i<a;++i)r.push("("+od.point.apply(n,[t._geometries[i]])+")");return r.join(",")},linestring:function(t){for(var n=this,r=[],i=0,a=t._points._coordinates.length;i<a;++i)r.push(od.coordinate.apply(n,[t._points._coordinates[i]]));return r.join(",")},linearring:function(t){for(var n=this,r=[],i=0,a=t._points._coordinates.length;i<a;++i)r.push(od.coordinate.apply(n,[t._points._coordinates[i]]));return r.join(",")},multilinestring:function(t){for(var n=this,r=[],i=0,a=t._geometries.length;i<a;++i)r.push("("+od.linestring.apply(n,[t._geometries[i]])+")");return r.join(",")},polygon:function(t){var n=this,r=[];r.push("("+od.linestring.apply(this,[t._shell])+")");for(var i=0,a=t._holes.length;i<a;++i)r.push("("+od.linestring.apply(n,[t._holes[i]])+")");return r.join(",")},multipolygon:function(t){for(var n=this,r=[],i=0,a=t._geometries.length;i<a;++i)r.push("("+od.polygon.apply(n,[t._geometries[i]])+")");return r.join(",")},geometrycollection:function(t){for(var n=this,r=[],i=0,a=t._geometries.length;i<a;++i)r.push(n.extractGeometry(t._geometries[i]));return r.join(",")}},Q0={point:function(t){if(t===void 0)return this.geometryFactory.createPoint();var n=t.trim().split(mh.spaces);return this.geometryFactory.createPoint(new Xt(Number.parseFloat(n[0]),Number.parseFloat(n[1])))},multipoint:function(t){var n=this;if(t===void 0)return this.geometryFactory.createMultiPoint();for(var r,i=t.trim().split(","),a=[],o=0,u=i.length;o<u;++o)r=i[o].replace(mh.trimParens,"$1"),a.push(Q0.point.apply(n,[r]));return this.geometryFactory.createMultiPoint(a)},linestring:function(t){if(t===void 0)return this.geometryFactory.createLineString();for(var n=t.trim().split(","),r=[],i,a=0,o=n.length;a<o;++a)i=n[a].trim().split(mh.spaces),r.push(new Xt(Number.parseFloat(i[0]),Number.parseFloat(i[1])));return this.geometryFactory.createLineString(r)},linearring:function(t){if(t===void 0)return this.geometryFactory.createLinearRing();for(var n=t.trim().split(","),r=[],i,a=0,o=n.length;a<o;++a)i=n[a].trim().split(mh.spaces),r.push(new Xt(Number.parseFloat(i[0]),Number.parseFloat(i[1])));return this.geometryFactory.createLinearRing(r)},multilinestring:function(t){var n=this;if(t===void 0)return this.geometryFactory.createMultiLineString();for(var r,i=t.trim().split(mh.parenComma),a=[],o=0,u=i.length;o<u;++o)r=i[o].replace(mh.trimParens,"$1"),a.push(Q0.linestring.apply(n,[r]));return this.geometryFactory.createMultiLineString(a)},polygon:function(t){var n=this;if(t===void 0)return this.geometryFactory.createPolygon();for(var r,i,a,o=t.trim().split(mh.parenComma),u,c=[],g=0,_=o.length;g<_;++g)r=o[g].replace(mh.trimParens,"$1"),i=Q0.linestring.apply(n,[r]),a=n.geometryFactory.createLinearRing(i._points),g===0?u=a:c.push(a);return this.geometryFactory.createPolygon(u,c)},multipolygon:function(t){var n=this;if(t===void 0)return this.geometryFactory.createMultiPolygon();for(var r,i=t.trim().split(mh.doubleParenComma),a=[],o=0,u=i.length;o<u;++o)r=i[o].replace(mh.trimParens,"$1"),a.push(Q0.polygon.apply(n,[r]));return this.geometryFactory.createMultiPolygon(a)},geometrycollection:function(t){var n=this;if(t===void 0)return this.geometryFactory.createGeometryCollection();t=t.replace(/,\s*([A-Za-z])/g,"|$1");for(var r=t.trim().split("|"),i=[],a=0,o=r.length;a<o;++a)i.push(n.read(r[a]));return this.geometryFactory.createGeometryCollection(i)}},vf=function(t){this.parser=new II(t)};vf.prototype.write=function(t){return this.parser.write(t)};vf.toLineString=function(t,n){if(arguments.length!==2)throw new Error("Not implemented");return"LINESTRING ( "+t.x+" "+t.y+", "+n.x+" "+n.y+" )"};var ad=function(e){function t(n){e.call(this,n),this.name="RuntimeException",this.message=n,this.stack=new e().stack}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t}(Error),PI=function(e){function t(){if(e.call(this),arguments.length===0)e.call(this);else if(arguments.length===1){var n=arguments[0];e.call(this,n)}}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(ad),lr=function(){};lr.prototype.interfaces_=function(){return[]};lr.prototype.getClass=function(){return lr};lr.shouldNeverReachHere=function(){if(arguments.length===0)lr.shouldNeverReachHere(null);else if(arguments.length===1){var t=arguments[0];throw new PI("Should never reach here"+(t!==null?": "+t:""))}};lr.isTrue=function(){var t,n;if(arguments.length===1)t=arguments[0],lr.isTrue(t,null);else if(arguments.length===2&&(t=arguments[0],n=arguments[1],!t))throw n===null?new PI:new PI(n)};lr.equals=function(){var t,n,r;if(arguments.length===2)t=arguments[0],n=arguments[1],lr.equals(t,n,null);else if(arguments.length===3&&(t=arguments[0],n=arguments[1],r=arguments[2],!n.equals(t)))throw new PI("Expected "+t+" but encountered "+n+(r!==null?": "+r:""))};var Io=function(){this._result=null,this._inputLines=Array(2).fill().map(function(){return Array(2)}),this._intPt=new Array(2).fill(null),this._intLineIndex=null,this._isProper=null,this._pa=null,this._pb=null,this._precisionModel=null,this._intPt[0]=new Xt,this._intPt[1]=new Xt,this._pa=this._intPt[0],this._pb=this._intPt[1],this._result=0},vy={DONT_INTERSECT:{configurable:!0},DO_INTERSECT:{configurable:!0},COLLINEAR:{configurable:!0},NO_INTERSECTION:{configurable:!0},POINT_INTERSECTION:{configurable:!0},COLLINEAR_INTERSECTION:{configurable:!0}};Io.prototype.getIndexAlongSegment=function(t,n){return this.computeIntLineIndex(),this._intLineIndex[t][n]};Io.prototype.getTopologySummary=function(){var t=new dh;return this.isEndPoint()&&t.append(" endpoint"),this._isProper&&t.append(" proper"),this.isCollinear()&&t.append(" collinear"),t.toString()};Io.prototype.computeIntersection=function(t,n,r,i){this._inputLines[0][0]=t,this._inputLines[0][1]=n,this._inputLines[1][0]=r,this._inputLines[1][1]=i,this._result=this.computeIntersect(t,n,r,i)};Io.prototype.getIntersectionNum=function(){return this._result};Io.prototype.computeIntLineIndex=function(){if(arguments.length===0)this._intLineIndex===null&&(this._intLineIndex=Array(2).fill().map(function(){return Array(2)}),this.computeIntLineIndex(0),this.computeIntLineIndex(1));else if(arguments.length===1){var t=arguments[0],n=this.getEdgeDistance(t,0),r=this.getEdgeDistance(t,1);n>r?(this._intLineIndex[t][0]=0,this._intLineIndex[t][1]=1):(this._intLineIndex[t][0]=1,this._intLineIndex[t][1]=0)}};Io.prototype.isProper=function(){return this.hasIntersection()&&this._isProper};Io.prototype.setPrecisionModel=function(t){this._precisionModel=t};Io.prototype.isInteriorIntersection=function(){var t=this;if(arguments.length===0)return!!(this.isInteriorIntersection(0)||this.isInteriorIntersection(1));if(arguments.length===1){for(var n=arguments[0],r=0;r<this._result;r++)if(!(t._intPt[r].equals2D(t._inputLines[n][0])||t._intPt[r].equals2D(t._inputLines[n][1])))return!0;return!1}};Io.prototype.getIntersection=function(t){return this._intPt[t]};Io.prototype.isEndPoint=function(){return this.hasIntersection()&&!this._isProper};Io.prototype.hasIntersection=function(){return this._result!==Io.NO_INTERSECTION};Io.prototype.getEdgeDistance=function(t,n){var r=Io.computeEdgeDistance(this._intPt[n],this._inputLines[t][0],this._inputLines[t][1]);return r};Io.prototype.isCollinear=function(){return this._result===Io.COLLINEAR_INTERSECTION};Io.prototype.toString=function(){return vf.toLineString(this._inputLines[0][0],this._inputLines[0][1])+" - "+vf.toLineString(this._inputLines[1][0],this._inputLines[1][1])+this.getTopologySummary()};Io.prototype.getEndpoint=function(t,n){return this._inputLines[t][n]};Io.prototype.isIntersection=function(t){for(var n=this,r=0;r<this._result;r++)if(n._intPt[r].equals2D(t))return!0;return!1};Io.prototype.getIntersectionAlongSegment=function(t,n){return this.computeIntLineIndex(),this._intPt[this._intLineIndex[t][n]]};Io.prototype.interfaces_=function(){return[]};Io.prototype.getClass=function(){return Io};Io.computeEdgeDistance=function(t,n,r){var i=Math.abs(r.x-n.x),a=Math.abs(r.y-n.y),o=-1;if(t.equals(n))o=0;else if(t.equals(r))i>a?o=i:o=a;else{var u=Math.abs(t.x-n.x),c=Math.abs(t.y-n.y);i>a?o=u:o=c,o===0&&!t.equals(n)&&(o=Math.max(u,c))}return lr.isTrue(!(o===0&&!t.equals(n)),"Bad distance calculation"),o};Io.nonRobustComputeEdgeDistance=function(t,n,r){var i=t.x-n.x,a=t.y-n.y,o=Math.sqrt(i*i+a*a);return lr.isTrue(!(o===0&&!t.equals(n)),"Invalid distance calculation"),o};vy.DONT_INTERSECT.get=function(){return 0};vy.DO_INTERSECT.get=function(){return 1};vy.COLLINEAR.get=function(){return 2};vy.NO_INTERSECTION.get=function(){return 0};vy.POINT_INTERSECTION.get=function(){return 1};vy.COLLINEAR_INTERSECTION.get=function(){return 2};Object.defineProperties(Io,vy);var $m=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.isInSegmentEnvelopes=function(r){var i=new In(this._inputLines[0][0],this._inputLines[0][1]),a=new In(this._inputLines[1][0],this._inputLines[1][1]);return i.contains(r)&&a.contains(r)},t.prototype.computeIntersection=function(){if(arguments.length===3){var r=arguments[0],i=arguments[1],a=arguments[2];if(this._isProper=!1,In.intersects(i,a,r)&&on.orientationIndex(i,a,r)===0&&on.orientationIndex(a,i,r)===0)return this._isProper=!0,(r.equals(i)||r.equals(a))&&(this._isProper=!1),this._result=e.POINT_INTERSECTION,null;this._result=e.NO_INTERSECTION}else return e.prototype.computeIntersection.apply(this,arguments)},t.prototype.normalizeToMinimum=function(r,i,a,o,u){u.x=this.smallestInAbsValue(r.x,i.x,a.x,o.x),u.y=this.smallestInAbsValue(r.y,i.y,a.y,o.y),r.x-=u.x,r.y-=u.y,i.x-=u.x,i.y-=u.y,a.x-=u.x,a.y-=u.y,o.x-=u.x,o.y-=u.y},t.prototype.safeHCoordinateIntersection=function(r,i,a,o){var u=null;try{u=mf.intersection(r,i,a,o)}catch(c){if(c instanceof J0)u=t.nearestEndpoint(r,i,a,o);else throw c}finally{}return u},t.prototype.intersection=function(r,i,a,o){var u=this.intersectionWithNormalization(r,i,a,o);return this.isInSegmentEnvelopes(u)||(u=new Xt(t.nearestEndpoint(r,i,a,o))),this._precisionModel!==null&&this._precisionModel.makePrecise(u),u},t.prototype.smallestInAbsValue=function(r,i,a,o){var u=r,c=Math.abs(u);return Math.abs(i)<c&&(u=i,c=Math.abs(i)),Math.abs(a)<c&&(u=a,c=Math.abs(a)),Math.abs(o)<c&&(u=o),u},t.prototype.checkDD=function(r,i,a,o,u){var c=Ru.intersection(r,i,a,o),g=this.isInSegmentEnvelopes(c);xs.out.println("DD in env = "+g+" --------------------- "+c),u.distance(c)>1e-4&&xs.out.println("Distance = "+u.distance(c))},t.prototype.intersectionWithNormalization=function(r,i,a,o){var u=new Xt(r),c=new Xt(i),g=new Xt(a),_=new Xt(o),E=new Xt;this.normalizeToEnvCentre(u,c,g,_,E);var C=this.safeHCoordinateIntersection(u,c,g,_);return C.x+=E.x,C.y+=E.y,C},t.prototype.computeCollinearIntersection=function(r,i,a,o){var u=In.intersects(r,i,a),c=In.intersects(r,i,o),g=In.intersects(a,o,r),_=In.intersects(a,o,i);return u&&c?(this._intPt[0]=a,this._intPt[1]=o,e.COLLINEAR_INTERSECTION):g&&_?(this._intPt[0]=r,this._intPt[1]=i,e.COLLINEAR_INTERSECTION):u&&g?(this._intPt[0]=a,this._intPt[1]=r,a.equals(r)&&!c&&!_?e.POINT_INTERSECTION:e.COLLINEAR_INTERSECTION):u&&_?(this._intPt[0]=a,this._intPt[1]=i,a.equals(i)&&!c&&!g?e.POINT_INTERSECTION:e.COLLINEAR_INTERSECTION):c&&g?(this._intPt[0]=o,this._intPt[1]=r,o.equals(r)&&!u&&!_?e.POINT_INTERSECTION:e.COLLINEAR_INTERSECTION):c&&_?(this._intPt[0]=o,this._intPt[1]=i,o.equals(i)&&!u&&!g?e.POINT_INTERSECTION:e.COLLINEAR_INTERSECTION):e.NO_INTERSECTION},t.prototype.normalizeToEnvCentre=function(r,i,a,o,u){var c=r.x<i.x?r.x:i.x,g=r.y<i.y?r.y:i.y,_=r.x>i.x?r.x:i.x,E=r.y>i.y?r.y:i.y,C=a.x<o.x?a.x:o.x,O=a.y<o.y?a.y:o.y,R=a.x>o.x?a.x:o.x,D=a.y>o.y?a.y:o.y,B=c>C?c:C,z=_<R?_:R,k=g>O?g:O,$=E<D?E:D,K=(B+z)/2,et=(k+$)/2;u.x=K,u.y=et,r.x-=u.x,r.y-=u.y,i.x-=u.x,i.y-=u.y,a.x-=u.x,a.y-=u.y,o.x-=u.x,o.y-=u.y},t.prototype.computeIntersect=function(r,i,a,o){if(this._isProper=!1,!In.intersects(r,i,a,o))return e.NO_INTERSECTION;var u=on.orientationIndex(r,i,a),c=on.orientationIndex(r,i,o);if(u>0&&c>0||u<0&&c<0)return e.NO_INTERSECTION;var g=on.orientationIndex(a,o,r),_=on.orientationIndex(a,o,i);if(g>0&&_>0||g<0&&_<0)return e.NO_INTERSECTION;var E=u===0&&c===0&&g===0&&_===0;return E?this.computeCollinearIntersection(r,i,a,o):(u===0||c===0||g===0||_===0?(this._isProper=!1,r.equals2D(a)||r.equals2D(o)?this._intPt[0]=r:i.equals2D(a)||i.equals2D(o)?this._intPt[0]=i:u===0?this._intPt[0]=new Xt(a):c===0?this._intPt[0]=new Xt(o):g===0?this._intPt[0]=new Xt(r):_===0&&(this._intPt[0]=new Xt(i))):(this._isProper=!0,this._intPt[0]=this.intersection(r,i,a,o)),e.POINT_INTERSECTION)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t.nearestEndpoint=function(r,i,a,o){var u=r,c=on.distancePointLine(r,a,o),g=on.distancePointLine(i,a,o);return g<c&&(c=g,u=i),g=on.distancePointLine(a,r,i),g<c&&(c=g,u=a),g=on.distancePointLine(o,r,i),g<c&&(c=g,u=o),u},t}(Io),yy=function(){};yy.prototype.interfaces_=function(){return[]};yy.prototype.getClass=function(){return yy};yy.orientationIndex=function(t,n,r){var i=n.x-t.x,a=n.y-t.y,o=r.x-n.x,u=r.y-n.y;return yy.signOfDet2x2(i,a,o,u)};yy.signOfDet2x2=function(t,n,r,i){var a=null,o=null,u=null;if(a=1,t===0||i===0)return n===0||r===0?0:n>0?r>0?-a:a:r>0?a:-a;if(n===0||r===0)return i>0?t>0?a:-a:t>0?-a:a;if(n>0?i>0?n<=i||(a=-a,o=t,t=r,r=o,o=n,n=i,i=o):n<=-i?(a=-a,r=-r,i=-i):(o=t,t=-r,r=o,o=n,n=-i,i=o):i>0?-n<=i?(a=-a,t=-t,n=-n):(o=-t,t=r,r=o,o=-n,n=i,i=o):n>=i?(t=-t,n=-n,r=-r,i=-i):(a=-a,o=-t,t=-r,r=o,o=-n,n=-i,i=o),t>0)if(r>0){if(!(t<=r))return a}else return a;else{if(r>0)return-a;if(t>=r)a=-a,t=-t,r=-r;else return-a}for(;;){if(u=Math.floor(r/t),r=r-u*t,i=i-u*n,i<0)return-a;if(i>n)return a;if(t>r+r){if(n<i+i)return a}else{if(n>i+i)return-a;r=t-r,i=n-i,a=-a}if(i===0)return r===0?0:-a;if(r===0||(u=Math.floor(t/r),t=t-u*r,n=n-u*i,n<0))return a;if(n>i)return-a;if(r>t+t){if(i<n+n)return-a}else{if(i>n+n)return a;t=r-t,n=i-n,a=-a}if(n===0)return t===0?0:a;if(t===0)return-a}};var vh=function(){this._p=null,this._crossingCount=0,this._isPointOnSegment=!1;var t=arguments[0];this._p=t};vh.prototype.countSegment=function(t,n){if(t.x<this._p.x&&n.x<this._p.x)return null;if(this._p.x===n.x&&this._p.y===n.y)return this._isPointOnSegment=!0,null;if(t.y===this._p.y&&n.y===this._p.y){var r=t.x,i=n.x;return r>i&&(r=n.x,i=t.x),this._p.x>=r&&this._p.x<=i&&(this._isPointOnSegment=!0),null}if(t.y>this._p.y&&n.y<=this._p.y||n.y>this._p.y&&t.y<=this._p.y){var a=t.x-this._p.x,o=t.y-this._p.y,u=n.x-this._p.x,c=n.y-this._p.y,g=yy.signOfDet2x2(a,o,u,c);if(g===0)return this._isPointOnSegment=!0,null;c<o&&(g=-g),g>0&&this._crossingCount++}};vh.prototype.isPointInPolygon=function(){return this.getLocation()!==Kt.EXTERIOR};vh.prototype.getLocation=function(){return this._isPointOnSegment?Kt.BOUNDARY:this._crossingCount%2==1?Kt.INTERIOR:Kt.EXTERIOR};vh.prototype.isOnSegment=function(){return this._isPointOnSegment};vh.prototype.interfaces_=function(){return[]};vh.prototype.getClass=function(){return vh};vh.locatePointInRing=function(){if(arguments[0]instanceof Xt&&$n(arguments[1],Jr)){for(var t=arguments[0],n=arguments[1],r=new vh(t),i=new Xt,a=new Xt,o=1;o<n.size();o++)if(n.getCoordinate(o,i),n.getCoordinate(o-1,a),r.countSegment(i,a),r.isOnSegment())return r.getLocation();return r.getLocation()}else if(arguments[0]instanceof Xt&&arguments[1]instanceof Array){for(var u=arguments[0],c=arguments[1],g=new vh(u),_=1;_<c.length;_++){var E=c[_],C=c[_-1];if(g.countSegment(E,C),g.isOnSegment())return g.getLocation()}return g.getLocation()}};var on=function(){},_y={CLOCKWISE:{configurable:!0},RIGHT:{configurable:!0},COUNTERCLOCKWISE:{configurable:!0},LEFT:{configurable:!0},COLLINEAR:{configurable:!0},STRAIGHT:{configurable:!0}};on.prototype.interfaces_=function(){return[]};on.prototype.getClass=function(){return on};on.orientationIndex=function(t,n,r){return Ru.orientationIndex(t,n,r)};on.signedArea=function(){if(arguments[0]instanceof Array){var t=arguments[0];if(t.length<3)return 0;for(var n=0,r=t[0].x,i=1;i<t.length-1;i++){var a=t[i].x-r,o=t[i+1].y,u=t[i-1].y;n+=a*(u-o)}return n/2}else if($n(arguments[0],Jr)){var c=arguments[0],g=c.size();if(g<3)return 0;var _=new Xt,E=new Xt,C=new Xt;c.getCoordinate(0,E),c.getCoordinate(1,C);var O=E.x;C.x-=O;for(var R=0,D=1;D<g-1;D++)_.y=E.y,E.x=C.x,E.y=C.y,c.getCoordinate(D+1,C),C.x-=O,R+=E.x*(_.y-C.y);return R/2}};on.distanceLineLine=function(t,n,r,i){if(t.equals(n))return on.distancePointLine(t,r,i);if(r.equals(i))return on.distancePointLine(i,t,n);var a=!1;if(!In.intersects(t,n,r,i))a=!0;else{var o=(n.x-t.x)*(i.y-r.y)-(n.y-t.y)*(i.x-r.x);if(o===0)a=!0;else{var u=(t.y-r.y)*(i.x-r.x)-(t.x-r.x)*(i.y-r.y),c=(t.y-r.y)*(n.x-t.x)-(t.x-r.x)*(n.y-t.y),g=c/o,_=u/o;(_<0||_>1||g<0||g>1)&&(a=!0)}}return a?Bl.min(on.distancePointLine(t,r,i),on.distancePointLine(n,r,i),on.distancePointLine(r,t,n),on.distancePointLine(i,t,n)):0};on.isPointInRing=function(t,n){return on.locatePointInRing(t,n)!==Kt.EXTERIOR};on.computeLength=function(t){var n=t.size();if(n<=1)return 0;var r=0,i=new Xt;t.getCoordinate(0,i);for(var a=i.x,o=i.y,u=1;u<n;u++){t.getCoordinate(u,i);var c=i.x,g=i.y,_=c-a,E=g-o;r+=Math.sqrt(_*_+E*E),a=c,o=g}return r};on.isCCW=function(t){var n=t.length-1;if(n<3)throw new wo;for(var r=t[0],i=0,a=1;a<=n;a++){var o=t[a];o.y>r.y&&(r=o,i=a)}var u=i;do u=u-1,u<0&&(u=n);while(t[u].equals2D(r)&&u!==i);var c=i;do c=(c+1)%n;while(t[c].equals2D(r)&&c!==i);var g=t[u],_=t[c];if(g.equals2D(r)||_.equals2D(r)||g.equals2D(_))return!1;var E=on.computeOrientation(g,r,_),C=!1;return E===0?C=g.x>_.x:C=E>0,C};on.locatePointInRing=function(t,n){return vh.locatePointInRing(t,n)};on.distancePointLinePerpendicular=function(t,n,r){var i=(r.x-n.x)*(r.x-n.x)+(r.y-n.y)*(r.y-n.y),a=((n.y-t.y)*(r.x-n.x)-(n.x-t.x)*(r.y-n.y))/i;return Math.abs(a)*Math.sqrt(i)};on.computeOrientation=function(t,n,r){return on.orientationIndex(t,n,r)};on.distancePointLine=function(){if(arguments.length===2){var t=arguments[0],n=arguments[1];if(n.length===0)throw new wo;for(var r=t.distance(n[0]),i=0;i<n.length-1;i++){var a=on.distancePointLine(t,n[i],n[i+1]);a<r&&(r=a)}return r}else if(arguments.length===3){var o=arguments[0],u=arguments[1],c=arguments[2];if(u.x===c.x&&u.y===c.y)return o.distance(u);var g=(c.x-u.x)*(c.x-u.x)+(c.y-u.y)*(c.y-u.y),_=((o.x-u.x)*(c.x-u.x)+(o.y-u.y)*(c.y-u.y))/g;if(_<=0)return o.distance(u);if(_>=1)return o.distance(c);var E=((u.y-o.y)*(c.x-u.x)-(u.x-o.x)*(c.y-u.y))/g;return Math.abs(E)*Math.sqrt(g)}};on.isOnLine=function(t,n){for(var r=new $m,i=1;i<n.length;i++){var a=n[i-1],o=n[i];if(r.computeIntersection(t,a,o),r.hasIntersection())return!0}return!1};_y.CLOCKWISE.get=function(){return-1};_y.RIGHT.get=function(){return on.CLOCKWISE};_y.COUNTERCLOCKWISE.get=function(){return 1};_y.LEFT.get=function(){return on.COUNTERCLOCKWISE};_y.COLLINEAR.get=function(){return 0};_y.STRAIGHT.get=function(){return on.COLLINEAR};Object.defineProperties(on,_y);var sd=function(){};sd.prototype.filter=function(t){};sd.prototype.interfaces_=function(){return[]};sd.prototype.getClass=function(){return sd};var Bn=function(){var t=arguments[0];this._envelope=null,this._factory=null,this._SRID=null,this._userData=null,this._factory=t,this._SRID=t.getSRID()},vp={serialVersionUID:{configurable:!0},SORTINDEX_POINT:{configurable:!0},SORTINDEX_MULTIPOINT:{configurable:!0},SORTINDEX_LINESTRING:{configurable:!0},SORTINDEX_LINEARRING:{configurable:!0},SORTINDEX_MULTILINESTRING:{configurable:!0},SORTINDEX_POLYGON:{configurable:!0},SORTINDEX_MULTIPOLYGON:{configurable:!0},SORTINDEX_GEOMETRYCOLLECTION:{configurable:!0},geometryChangedFilter:{configurable:!0}};Bn.prototype.isGeometryCollection=function(){return this.getSortIndex()===Bn.SORTINDEX_GEOMETRYCOLLECTION};Bn.prototype.getFactory=function(){return this._factory};Bn.prototype.getGeometryN=function(t){return this};Bn.prototype.getArea=function(){return 0};Bn.prototype.isRectangle=function(){return!1};Bn.prototype.equals=function(){if(arguments[0]instanceof Bn){var t=arguments[0];return t===null?!1:this.equalsTopo(t)}else if(arguments[0]instanceof Object){var n=arguments[0];if(!(n instanceof Bn))return!1;var r=n;return this.equalsExact(r)}};Bn.prototype.equalsExact=function(t){return this===t||this.equalsExact(t,0)};Bn.prototype.geometryChanged=function(){this.apply(Bn.geometryChangedFilter)};Bn.prototype.geometryChangedAction=function(){this._envelope=null};Bn.prototype.equalsNorm=function(t){return t===null?!1:this.norm().equalsExact(t.norm())};Bn.prototype.getLength=function(){return 0};Bn.prototype.getNumGeometries=function(){return 1};Bn.prototype.compareTo=function(){if(arguments.length===1){var t=arguments[0],n=t;return this.getSortIndex()!==n.getSortIndex()?this.getSortIndex()-n.getSortIndex():this.isEmpty()&&n.isEmpty()?0:this.isEmpty()?-1:n.isEmpty()?1:this.compareToSameClass(t)}else if(arguments.length===2){var r=arguments[0],i=arguments[1];return this.getSortIndex()!==r.getSortIndex()?this.getSortIndex()-r.getSortIndex():this.isEmpty()&&r.isEmpty()?0:this.isEmpty()?-1:r.isEmpty()?1:this.compareToSameClass(r,i)}};Bn.prototype.getUserData=function(){return this._userData};Bn.prototype.getSRID=function(){return this._SRID};Bn.prototype.getEnvelope=function(){return this.getFactory().toGeometry(this.getEnvelopeInternal())};Bn.prototype.checkNotGeometryCollection=function(t){if(t.getSortIndex()===Bn.SORTINDEX_GEOMETRYCOLLECTION)throw new wo};Bn.prototype.equal=function(t,n,r){return r===0?t.equals(n):t.distance(n)<=r};Bn.prototype.norm=function(){var t=this.copy();return t.normalize(),t};Bn.prototype.getPrecisionModel=function(){return this._factory.getPrecisionModel()};Bn.prototype.getEnvelopeInternal=function(){return this._envelope===null&&(this._envelope=this.computeEnvelopeInternal()),new In(this._envelope)};Bn.prototype.setSRID=function(t){this._SRID=t};Bn.prototype.setUserData=function(t){this._userData=t};Bn.prototype.compare=function(t,n){for(var r=t.iterator(),i=n.iterator();r.hasNext()&&i.hasNext();){var a=r.next(),o=i.next(),u=a.compareTo(o);if(u!==0)return u}return r.hasNext()?1:i.hasNext()?-1:0};Bn.prototype.hashCode=function(){return this.getEnvelopeInternal().hashCode()};Bn.prototype.isGeometryCollectionOrDerived=function(){return this.getSortIndex()===Bn.SORTINDEX_GEOMETRYCOLLECTION||this.getSortIndex()===Bn.SORTINDEX_MULTIPOINT||this.getSortIndex()===Bn.SORTINDEX_MULTILINESTRING||this.getSortIndex()===Bn.SORTINDEX_MULTIPOLYGON};Bn.prototype.interfaces_=function(){return[CI,wc,Sc]};Bn.prototype.getClass=function(){return Bn};Bn.hasNonEmptyElements=function(t){for(var n=0;n<t.length;n++)if(!t[n].isEmpty())return!0;return!1};Bn.hasNullElements=function(t){for(var n=0;n<t.length;n++)if(t[n]===null)return!0;return!1};vp.serialVersionUID.get=function(){return 8763622679187377e3};vp.SORTINDEX_POINT.get=function(){return 0};vp.SORTINDEX_MULTIPOINT.get=function(){return 1};vp.SORTINDEX_LINESTRING.get=function(){return 2};vp.SORTINDEX_LINEARRING.get=function(){return 3};vp.SORTINDEX_MULTILINESTRING.get=function(){return 4};vp.SORTINDEX_POLYGON.get=function(){return 5};vp.SORTINDEX_MULTIPOLYGON.get=function(){return 6};vp.SORTINDEX_GEOMETRYCOLLECTION.get=function(){return 7};vp.geometryChangedFilter.get=function(){return WR};Object.defineProperties(Bn,vp);var WR=function(){};WR.interfaces_=function(){return[sd]};WR.filter=function(t){t.geometryChangedAction()};var yp=function(){};yp.prototype.filter=function(t){};yp.prototype.interfaces_=function(){return[]};yp.prototype.getClass=function(){return yp};var Ec=function(){},ud={Mod2BoundaryNodeRule:{configurable:!0},EndPointBoundaryNodeRule:{configurable:!0},MultiValentEndPointBoundaryNodeRule:{configurable:!0},MonoValentEndPointBoundaryNodeRule:{configurable:!0},MOD2_BOUNDARY_RULE:{configurable:!0},ENDPOINT_BOUNDARY_RULE:{configurable:!0},MULTIVALENT_ENDPOINT_BOUNDARY_RULE:{configurable:!0},MONOVALENT_ENDPOINT_BOUNDARY_RULE:{configurable:!0},OGC_SFS_BOUNDARY_RULE:{configurable:!0}};Ec.prototype.isInBoundary=function(t){};Ec.prototype.interfaces_=function(){return[]};Ec.prototype.getClass=function(){return Ec};ud.Mod2BoundaryNodeRule.get=function(){return tx};ud.EndPointBoundaryNodeRule.get=function(){return ex};ud.MultiValentEndPointBoundaryNodeRule.get=function(){return nx};ud.MonoValentEndPointBoundaryNodeRule.get=function(){return rx};ud.MOD2_BOUNDARY_RULE.get=function(){return new tx};ud.ENDPOINT_BOUNDARY_RULE.get=function(){return new ex};ud.MULTIVALENT_ENDPOINT_BOUNDARY_RULE.get=function(){return new nx};ud.MONOVALENT_ENDPOINT_BOUNDARY_RULE.get=function(){return new rx};ud.OGC_SFS_BOUNDARY_RULE.get=function(){return Ec.MOD2_BOUNDARY_RULE};Object.defineProperties(Ec,ud);var tx=function(){};tx.prototype.isInBoundary=function(t){return t%2==1};tx.prototype.interfaces_=function(){return[Ec]};tx.prototype.getClass=function(){return tx};var ex=function(){};ex.prototype.isInBoundary=function(t){return t>0};ex.prototype.interfaces_=function(){return[Ec]};ex.prototype.getClass=function(){return ex};var nx=function(){};nx.prototype.isInBoundary=function(t){return t>1};nx.prototype.interfaces_=function(){return[Ec]};nx.prototype.getClass=function(){return nx};var rx=function(){};rx.prototype.isInBoundary=function(t){return t===1};rx.prototype.interfaces_=function(){return[Ec]};rx.prototype.getClass=function(){return rx};var ka=function(){};ka.prototype.add=function(){};ka.prototype.addAll=function(){};ka.prototype.isEmpty=function(){};ka.prototype.iterator=function(){};ka.prototype.size=function(){};ka.prototype.toArray=function(){};ka.prototype.remove=function(){};var Cxt=function(e){function t(r){e.call(this),this.message=r||""}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={name:{configurable:!0}};return n.name.get=function(){return"IndexOutOfBoundsException"},Object.defineProperties(t,n),t}(Error),ix=function(){};ix.prototype.hasNext=function(){};ix.prototype.next=function(){};ix.prototype.remove=function(){};var yf=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.get=function(){},t.prototype.set=function(){},t.prototype.isEmpty=function(){},t}(ka);function ox(e){this.message=e||""}ox.prototype=new Error;ox.prototype.name="NoSuchElementException";var Ke=function(e){function t(){e.call(this),this.array_=[],arguments[0]instanceof ka&&this.addAll(arguments[0])}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.ensureCapacity=function(){},t.prototype.interfaces_=function(){return[e,ka]},t.prototype.add=function(r){return arguments.length===1?this.array_.push(r):this.array_.splice(arguments[0],arguments[1]),!0},t.prototype.clear=function(){this.array_=[]},t.prototype.addAll=function(r){for(var i=this,a=r.iterator();a.hasNext();)i.add(a.next());return!0},t.prototype.set=function(r,i){var a=this.array_[r];return this.array_[r]=i,a},t.prototype.iterator=function(){return new Ixt(this)},t.prototype.get=function(r){if(r<0||r>=this.size())throw new Cxt;return this.array_[r]},t.prototype.isEmpty=function(){return this.array_.length===0},t.prototype.size=function(){return this.array_.length},t.prototype.toArray=function(){for(var r=this,i=[],a=0,o=this.array_.length;a<o;a++)i.push(r.array_[a]);return i},t.prototype.remove=function(r){for(var i=this,a=!1,o=0,u=this.array_.length;o<u;o++)if(i.array_[o]===r){i.array_.splice(o,1),a=!0;break}return a},t}(yf),Ixt=function(e){function t(n){e.call(this),this.arrayList_=n,this.position_=0}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.next=function(){if(this.position_===this.arrayList_.size())throw new ox;return this.arrayList_.get(this.position_++)},t.prototype.hasNext=function(){return this.position_<this.arrayList_.size()},t.prototype.set=function(r){return this.arrayList_.set(this.position_-1,r)},t.prototype.remove=function(){this.arrayList_.remove(this.arrayList_.get(this.position_))},t}(ix),sw=function(e){function t(){if(e.call(this),arguments.length!==0){if(arguments.length===1){var r=arguments[0];this.ensureCapacity(r.length),this.add(r,!0)}else if(arguments.length===2){var i=arguments[0],a=arguments[1];this.ensureCapacity(i.length),this.add(i,a)}}}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={coordArrayType:{configurable:!0}};return n.coordArrayType.get=function(){return new Array(0).fill(null)},t.prototype.getCoordinate=function(i){return this.get(i)},t.prototype.addAll=function(){var i=this;if(arguments.length===2){for(var a=arguments[0],o=arguments[1],u=!1,c=a.iterator();c.hasNext();)i.add(c.next(),o),u=!0;return u}else return e.prototype.addAll.apply(this,arguments)},t.prototype.clone=function(){for(var i=this,a=e.prototype.clone.call(this),o=0;o<this.size();o++)a.add(o,i.get(o).copy());return a},t.prototype.toCoordinateArray=function(){return this.toArray(t.coordArrayType)},t.prototype.add=function(){var i=this;if(arguments.length===1){var a=arguments[0];e.prototype.add.call(this,a)}else if(arguments.length===2){if(arguments[0]instanceof Array&&typeof arguments[1]=="boolean"){var o=arguments[0],u=arguments[1];return this.add(o,u,!0),!0}else if(arguments[0]instanceof Xt&&typeof arguments[1]=="boolean"){var c=arguments[0],g=arguments[1];if(!g&&this.size()>=1){var _=this.get(this.size()-1);if(_.equals2D(c))return null}e.prototype.add.call(this,c)}else if(arguments[0]instanceof Object&&typeof arguments[1]=="boolean"){var E=arguments[0],C=arguments[1];return this.add(E,C),!0}}else if(arguments.length===3){if(typeof arguments[2]=="boolean"&&arguments[0]instanceof Array&&typeof arguments[1]=="boolean"){var O=arguments[0],R=arguments[1],D=arguments[2];if(D)for(var B=0;B<O.length;B++)i.add(O[B],R);else for(var z=O.length-1;z>=0;z--)i.add(O[z],R);return!0}else if(typeof arguments[2]=="boolean"&&Number.isInteger(arguments[0])&&arguments[1]instanceof Xt){var k=arguments[0],$=arguments[1],K=arguments[2];if(!K){var et=this.size();if(et>0){if(k>0){var mt=this.get(k-1);if(mt.equals2D($))return null}if(k<et){var wt=this.get(k);if(wt.equals2D($))return null}}}e.prototype.add.call(this,k,$)}}else if(arguments.length===4){var Ot=arguments[0],Bt=arguments[1],se=arguments[2],_e=arguments[3],Ne=1;se>_e&&(Ne=-1);for(var He=se;He!==_e;He+=Ne)i.add(Ot[He],Bt);return!0}},t.prototype.closeRing=function(){this.size()>0&&this.add(new Xt(this.get(0)),!1)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},Object.defineProperties(t,n),t}(Ke),Mr=function(){},TI={ForwardComparator:{configurable:!0},BidirectionalComparator:{configurable:!0},coordArrayType:{configurable:!0}};TI.ForwardComparator.get=function(){return uw};TI.BidirectionalComparator.get=function(){return ax};TI.coordArrayType.get=function(){return new Array(0).fill(null)};Mr.prototype.interfaces_=function(){return[]};Mr.prototype.getClass=function(){return Mr};Mr.isRing=function(t){return!(t.length<4||!t[0].equals2D(t[t.length-1]))};Mr.ptNotInList=function(t,n){for(var r=0;r<t.length;r++){var i=t[r];if(Mr.indexOf(i,n)<0)return i}return null};Mr.scroll=function(t,n){var r=Mr.indexOf(n,t);if(r<0)return null;var i=new Array(t.length).fill(null);xs.arraycopy(t,r,i,0,t.length-r),xs.arraycopy(t,0,i,t.length-r,r),xs.arraycopy(i,0,t,0,t.length)};Mr.equals=function(){if(arguments.length===2){var t=arguments[0],n=arguments[1];if(t===n)return!0;if(t===null||n===null||t.length!==n.length)return!1;for(var r=0;r<t.length;r++)if(!t[r].equals(n[r]))return!1;return!0}else if(arguments.length===3){var i=arguments[0],a=arguments[1],o=arguments[2];if(i===a)return!0;if(i===null||a===null||i.length!==a.length)return!1;for(var u=0;u<i.length;u++)if(o.compare(i[u],a[u])!==0)return!1;return!0}};Mr.intersection=function(t,n){for(var r=new sw,i=0;i<t.length;i++)n.intersects(t[i])&&r.add(t[i],!0);return r.toCoordinateArray()};Mr.hasRepeatedPoints=function(t){for(var n=1;n<t.length;n++)if(t[n-1].equals(t[n]))return!0;return!1};Mr.removeRepeatedPoints=function(t){if(!Mr.hasRepeatedPoints(t))return t;var n=new sw(t,!1);return n.toCoordinateArray()};Mr.reverse=function(t){for(var n=t.length-1,r=Math.trunc(n/2),i=0;i<=r;i++){var a=t[i];t[i]=t[n-i],t[n-i]=a}};Mr.removeNull=function(t){for(var n=0,r=0;r<t.length;r++)t[r]!==null&&n++;var i=new Array(n).fill(null);if(n===0)return i;for(var a=0,o=0;o<t.length;o++)t[o]!==null&&(i[a++]=t[o]);return i};Mr.copyDeep=function(){if(arguments.length===1){for(var t=arguments[0],n=new Array(t.length).fill(null),r=0;r<t.length;r++)n[r]=new Xt(t[r]);return n}else if(arguments.length===5)for(var i=arguments[0],a=arguments[1],o=arguments[2],u=arguments[3],c=arguments[4],g=0;g<c;g++)o[u+g]=new Xt(i[a+g])};Mr.isEqualReversed=function(t,n){for(var r=0;r<t.length;r++){var i=t[r],a=n[t.length-r-1];if(i.compareTo(a)!==0)return!1}return!0};Mr.envelope=function(t){for(var n=new In,r=0;r<t.length;r++)n.expandToInclude(t[r]);return n};Mr.toCoordinateArray=function(t){return t.toArray(Mr.coordArrayType)};Mr.atLeastNCoordinatesOrNothing=function(t,n){return n.length>=t?n:[]};Mr.indexOf=function(t,n){for(var r=0;r<n.length;r++)if(t.equals(n[r]))return r;return-1};Mr.increasingDirection=function(t){for(var n=0;n<Math.trunc(t.length/2);n++){var r=t.length-1-n,i=t[n].compareTo(t[r]);if(i!==0)return i}return 1};Mr.compare=function(t,n){for(var r=0;r<t.length&&r<n.length;){var i=t[r].compareTo(n[r]);if(i!==0)return i;r++}return r<n.length?-1:r<t.length?1:0};Mr.minCoordinate=function(t){for(var n=null,r=0;r<t.length;r++)(n===null||n.compareTo(t[r])>0)&&(n=t[r]);return n};Mr.extract=function(t,n,r){n=Bl.clamp(n,0,t.length),r=Bl.clamp(r,-1,t.length);var i=r-n+1;r<0&&(i=0),n>=t.length&&(i=0),r<n&&(i=0);var a=new Array(i).fill(null);if(i===0)return a;for(var o=0,u=n;u<=r;u++)a[o++]=t[u];return a};Object.defineProperties(Mr,TI);var uw=function(){};uw.prototype.compare=function(t,n){var r=t,i=n;return Mr.compare(r,i)};uw.prototype.interfaces_=function(){return[Z0]};uw.prototype.getClass=function(){return uw};var ax=function(){};ax.prototype.compare=function(t,n){var r=t,i=n;if(r.length<i.length)return-1;if(r.length>i.length)return 1;if(r.length===0)return 0;var a=Mr.compare(r,i),o=Mr.isEqualReversed(r,i);return o?0:a};ax.prototype.OLDcompare=function(t,n){var r=t,i=n;if(r.length<i.length)return-1;if(r.length>i.length)return 1;if(r.length===0)return 0;for(var a=Mr.increasingDirection(r),o=Mr.increasingDirection(i),u=a>0?0:r.length-1,c=o>0?0:r.length-1,g=0;g<r.length;g++){var _=r[u].compareTo(i[c]);if(_!==0)return _;u+=a,c+=o}return 0};ax.prototype.interfaces_=function(){return[Z0]};ax.prototype.getClass=function(){return ax};var xy=function(){};xy.prototype.get=function(){};xy.prototype.put=function(){};xy.prototype.size=function(){};xy.prototype.values=function(){};xy.prototype.entrySet=function(){};var Pxt=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t}(xy);function lw(e){this.message=e||""}lw.prototype=new Error;lw.prototype.name="OperationNotSupported";function MI(){}MI.prototype=new ka;MI.prototype.contains=function(){};var HR=function(e){function t(){e.call(this),this.array_=[],arguments[0]instanceof ka&&this.addAll(arguments[0])}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.contains=function(r){for(var i=this,a=0,o=this.array_.length;a<o;a++){var u=i.array_[a];if(u===r)return!0}return!1},t.prototype.add=function(r){return this.contains(r)?!1:(this.array_.push(r),!0)},t.prototype.addAll=function(r){for(var i=this,a=r.iterator();a.hasNext();)i.add(a.next());return!0},t.prototype.remove=function(r){throw new Error},t.prototype.size=function(){return this.array_.length},t.prototype.isEmpty=function(){return this.array_.length===0},t.prototype.toArray=function(){for(var r=this,i=[],a=0,o=this.array_.length;a<o;a++)i.push(r.array_[a]);return i},t.prototype.iterator=function(){return new Txt(this)},t}(MI),Txt=function(e){function t(n){e.call(this),this.hashSet_=n,this.position_=0}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.next=function(){if(this.position_===this.hashSet_.size())throw new ox;return this.hashSet_.array_[this.position_++]},t.prototype.hasNext=function(){return this.position_<this.hashSet_.size()},t.prototype.remove=function(){throw new lw},t}(ix),ld=0,jm=1;function I8(e){return e===null?ld:e.color}function Ji(e){return e===null?null:e.parent}function cd(e,t){e!==null&&(e.color=t)}function XR(e){return e===null?null:e.left}function P8(e){return e===null?null:e.right}function Ns(){this.root_=null,this.size_=0}Ns.prototype=new Pxt;Ns.prototype.get=function(e){for(var t=this.root_;t!==null;){var n=e.compareTo(t.key);if(n<0)t=t.left;else if(n>0)t=t.right;else return t.value}return null};Ns.prototype.put=function(e,t){if(this.root_===null)return this.root_={key:e,value:t,left:null,right:null,parent:null,color:ld,getValue:function(){return this.value},getKey:function(){return this.key}},this.size_=1,null;var n=this.root_,r,i;do if(r=n,i=e.compareTo(n.key),i<0)n=n.left;else if(i>0)n=n.right;else{var a=n.value;return n.value=t,a}while(n!==null);var o={key:e,left:null,right:null,value:t,parent:r,color:ld,getValue:function(){return this.value},getKey:function(){return this.key}};return i<0?r.left=o:r.right=o,this.fixAfterInsertion(o),this.size_++,null};Ns.prototype.fixAfterInsertion=function(e){var t=this;for(e.color=jm;e!=null&&e!==this.root_&&e.parent.color===jm;)if(Ji(e)===XR(Ji(Ji(e)))){var n=P8(Ji(Ji(e)));I8(n)===jm?(cd(Ji(e),ld),cd(n,ld),cd(Ji(Ji(e)),jm),e=Ji(Ji(e))):(e===P8(Ji(e))&&(e=Ji(e),t.rotateLeft(e)),cd(Ji(e),ld),cd(Ji(Ji(e)),jm),t.rotateRight(Ji(Ji(e))))}else{var r=XR(Ji(Ji(e)));I8(r)===jm?(cd(Ji(e),ld),cd(r,ld),cd(Ji(Ji(e)),jm),e=Ji(Ji(e))):(e===XR(Ji(e))&&(e=Ji(e),t.rotateRight(e)),cd(Ji(e),ld),cd(Ji(Ji(e)),jm),t.rotateLeft(Ji(Ji(e))))}this.root_.color=ld};Ns.prototype.values=function(){var e=new Ke,t=this.getFirstEntry();if(t!==null)for(e.add(t.value);(t=Ns.successor(t))!==null;)e.add(t.value);return e};Ns.prototype.entrySet=function(){var e=new HR,t=this.getFirstEntry();if(t!==null)for(e.add(t);(t=Ns.successor(t))!==null;)e.add(t);return e};Ns.prototype.rotateLeft=function(e){if(e!=null){var t=e.right;e.right=t.left,t.left!=null&&(t.left.parent=e),t.parent=e.parent,e.parent===null?this.root_=t:e.parent.left===e?e.parent.left=t:e.parent.right=t,t.left=e,e.parent=t}};Ns.prototype.rotateRight=function(e){if(e!=null){var t=e.left;e.left=t.right,t.right!=null&&(t.right.parent=e),t.parent=e.parent,e.parent===null?this.root_=t:e.parent.right===e?e.parent.right=t:e.parent.left=t,t.right=e,e.parent=t}};Ns.prototype.getFirstEntry=function(){var e=this.root_;if(e!=null)for(;e.left!=null;)e=e.left;return e};Ns.successor=function(e){if(e===null)return null;if(e.right!==null){for(var t=e.right;t.left!==null;)t=t.left;return t}else{for(var n=e.parent,r=e;n!==null&&r===n.right;)r=n,n=n.parent;return n}};Ns.prototype.size=function(){return this.size_};var cw=function(){};cw.prototype.interfaces_=function(){return[]};cw.prototype.getClass=function(){return cw};function T8(){}T8.prototype=new MI;function yh(){this.array_=[],arguments[0]instanceof ka&&this.addAll(arguments[0])}yh.prototype=new T8;yh.prototype.contains=function(e){for(var t=this,n=0,r=this.array_.length;n<r;n++){var i=t.array_[n];if(i.compareTo(e)===0)return!0}return!1};yh.prototype.add=function(e){var t=this;if(this.contains(e))return!1;for(var n=0,r=this.array_.length;n<r;n++){var i=t.array_[n];if(i.compareTo(e)===1)return t.array_.splice(n,0,e),!0}return this.array_.push(e),!0};yh.prototype.addAll=function(e){for(var t=this,n=e.iterator();n.hasNext();)t.add(n.next());return!0};yh.prototype.remove=function(e){throw new lw};yh.prototype.size=function(){return this.array_.length};yh.prototype.isEmpty=function(){return this.array_.length===0};yh.prototype.toArray=function(){for(var e=this,t=[],n=0,r=this.array_.length;n<r;n++)t.push(e.array_[n]);return t};yh.prototype.iterator=function(){return new AI(this)};var AI=function(e){this.treeSet_=e,this.position_=0};AI.prototype.next=function(){if(this.position_===this.treeSet_.size())throw new ox;return this.treeSet_.array_[this.position_++]};AI.prototype.hasNext=function(){return this.position_<this.treeSet_.size()};AI.prototype.remove=function(){throw new lw};var qm=function(){};qm.sort=function(){var t=arguments[0],n,r,i,a;if(arguments.length===1)a=function(u,c){return u.compareTo(c)},t.sort(a);else if(arguments.length===2)i=arguments[1],a=function(u,c){return i.compare(u,c)},t.sort(a);else if(arguments.length===3){r=t.slice(arguments[1],arguments[2]),r.sort();var o=t.slice(0,arguments[1]).concat(r,t.slice(arguments[2],t.length));for(t.splice(0,t.length),n=0;n<o.length;n++)t.push(o[n])}else if(arguments.length===4)for(r=t.slice(arguments[1],arguments[2]),i=arguments[3],a=function(u,c){return i.compare(u,c)},r.sort(a),o=t.slice(0,arguments[1]).concat(r,t.slice(arguments[2],t.length)),t.splice(0,t.length),n=0;n<o.length;n++)t.push(o[n])};qm.asList=function(t){for(var n=new Ke,r=0,i=t.length;r<i;r++)n.add(t[r]);return n};var fi=function(){},_f={P:{configurable:!0},L:{configurable:!0},A:{configurable:!0},FALSE:{configurable:!0},TRUE:{configurable:!0},DONTCARE:{configurable:!0},SYM_FALSE:{configurable:!0},SYM_TRUE:{configurable:!0},SYM_DONTCARE:{configurable:!0},SYM_P:{configurable:!0},SYM_L:{configurable:!0},SYM_A:{configurable:!0}};_f.P.get=function(){return 0};_f.L.get=function(){return 1};_f.A.get=function(){return 2};_f.FALSE.get=function(){return-1};_f.TRUE.get=function(){return-2};_f.DONTCARE.get=function(){return-3};_f.SYM_FALSE.get=function(){return"F"};_f.SYM_TRUE.get=function(){return"T"};_f.SYM_DONTCARE.get=function(){return"*"};_f.SYM_P.get=function(){return"0"};_f.SYM_L.get=function(){return"1"};_f.SYM_A.get=function(){return"2"};fi.prototype.interfaces_=function(){return[]};fi.prototype.getClass=function(){return fi};fi.toDimensionSymbol=function(t){switch(t){case fi.FALSE:return fi.SYM_FALSE;case fi.TRUE:return fi.SYM_TRUE;case fi.DONTCARE:return fi.SYM_DONTCARE;case fi.P:return fi.SYM_P;case fi.L:return fi.SYM_L;case fi.A:return fi.SYM_A}throw new wo};fi.toDimensionValue=function(t){switch(ow.toUpperCase(t)){case fi.SYM_FALSE:return fi.FALSE;case fi.SYM_TRUE:return fi.TRUE;case fi.SYM_DONTCARE:return fi.DONTCARE;case fi.SYM_P:return fi.P;case fi.SYM_L:return fi.L;case fi.SYM_A:return fi.A}throw new wo};Object.defineProperties(fi,_f);var _h=function(){};_h.prototype.filter=function(t){};_h.prototype.interfaces_=function(){return[]};_h.prototype.getClass=function(){return _h};var xf=function(){};xf.prototype.filter=function(t,n){};xf.prototype.isDone=function(){};xf.prototype.isGeometryChanged=function(){};xf.prototype.interfaces_=function(){return[]};xf.prototype.getClass=function(){return xf};var uu=function(e){function t(r,i){if(e.call(this,i),this._geometries=r||[],e.hasNullElements(this._geometries))throw new wo}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={serialVersionUID:{configurable:!0}};return t.prototype.computeEnvelopeInternal=function(){for(var i=this,a=new In,o=0;o<this._geometries.length;o++)a.expandToInclude(i._geometries[o].getEnvelopeInternal());return a},t.prototype.getGeometryN=function(i){return this._geometries[i]},t.prototype.getSortIndex=function(){return e.SORTINDEX_GEOMETRYCOLLECTION},t.prototype.getCoordinates=function(){for(var i=this,a=new Array(this.getNumPoints()).fill(null),o=-1,u=0;u<this._geometries.length;u++)for(var c=i._geometries[u].getCoordinates(),g=0;g<c.length;g++)o++,a[o]=c[g];return a},t.prototype.getArea=function(){for(var i=this,a=0,o=0;o<this._geometries.length;o++)a+=i._geometries[o].getArea();return a},t.prototype.equalsExact=function(){var i=this;if(arguments.length===2){var a=arguments[0],o=arguments[1];if(!this.isEquivalentClass(a))return!1;var u=a;if(this._geometries.length!==u._geometries.length)return!1;for(var c=0;c<this._geometries.length;c++)if(!i._geometries[c].equalsExact(u._geometries[c],o))return!1;return!0}else return e.prototype.equalsExact.apply(this,arguments)},t.prototype.normalize=function(){for(var i=this,a=0;a<this._geometries.length;a++)i._geometries[a].normalize();qm.sort(this._geometries)},t.prototype.getCoordinate=function(){return this.isEmpty()?null:this._geometries[0].getCoordinate()},t.prototype.getBoundaryDimension=function(){for(var i=this,a=fi.FALSE,o=0;o<this._geometries.length;o++)a=Math.max(a,i._geometries[o].getBoundaryDimension());return a},t.prototype.getDimension=function(){for(var i=this,a=fi.FALSE,o=0;o<this._geometries.length;o++)a=Math.max(a,i._geometries[o].getDimension());return a},t.prototype.getLength=function(){for(var i=this,a=0,o=0;o<this._geometries.length;o++)a+=i._geometries[o].getLength();return a},t.prototype.getNumPoints=function(){for(var i=this,a=0,o=0;o<this._geometries.length;o++)a+=i._geometries[o].getNumPoints();return a},t.prototype.getNumGeometries=function(){return this._geometries.length},t.prototype.reverse=function(){for(var i=this,a=this._geometries.length,o=new Array(a).fill(null),u=0;u<this._geometries.length;u++)o[u]=i._geometries[u].reverse();return this.getFactory().createGeometryCollection(o)},t.prototype.compareToSameClass=function(){var i=this;if(arguments.length===1){var a=arguments[0],o=new yh(qm.asList(this._geometries)),u=new yh(qm.asList(a._geometries));return this.compare(o,u)}else if(arguments.length===2){for(var c=arguments[0],g=arguments[1],_=c,E=this.getNumGeometries(),C=_.getNumGeometries(),O=0;O<E&&O<C;){var R=i.getGeometryN(O),D=_.getGeometryN(O),B=R.compareToSameClass(D,g);if(B!==0)return B;O++}return O<E?1:O<C?-1:0}},t.prototype.apply=function(){var i=this;if($n(arguments[0],yp))for(var a=arguments[0],o=0;o<this._geometries.length;o++)i._geometries[o].apply(a);else if($n(arguments[0],xf)){var u=arguments[0];if(this._geometries.length===0)return null;for(var c=0;c<this._geometries.length&&(i._geometries[c].apply(u),!u.isDone());c++);u.isGeometryChanged()&&this.geometryChanged()}else if($n(arguments[0],_h)){var g=arguments[0];g.filter(this);for(var _=0;_<this._geometries.length;_++)i._geometries[_].apply(g)}else if($n(arguments[0],sd)){var E=arguments[0];E.filter(this);for(var C=0;C<this._geometries.length;C++)i._geometries[C].apply(E)}},t.prototype.getBoundary=function(){return this.checkNotGeometryCollection(this),lr.shouldNeverReachHere(),null},t.prototype.clone=function(){var i=this,a=e.prototype.clone.call(this);a._geometries=new Array(this._geometries.length).fill(null);for(var o=0;o<this._geometries.length;o++)a._geometries[o]=i._geometries[o].clone();return a},t.prototype.getGeometryType=function(){return"GeometryCollection"},t.prototype.copy=function(){for(var i=this,a=new Array(this._geometries.length).fill(null),o=0;o<a.length;o++)a[o]=i._geometries[o].copy();return new t(a,this._factory)},t.prototype.isEmpty=function(){for(var i=this,a=0;a<this._geometries.length;a++)if(!i._geometries[a].isEmpty())return!1;return!0},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},n.serialVersionUID.get=function(){return-5694727726395021e3},Object.defineProperties(t,n),t}(Bn),Gm=function(e){function t(){e.apply(this,arguments)}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={serialVersionUID:{configurable:!0}};return t.prototype.getSortIndex=function(){return Bn.SORTINDEX_MULTILINESTRING},t.prototype.equalsExact=function(){if(arguments.length===2){var i=arguments[0],a=arguments[1];return this.isEquivalentClass(i)?e.prototype.equalsExact.call(this,i,a):!1}else return e.prototype.equalsExact.apply(this,arguments)},t.prototype.getBoundaryDimension=function(){return this.isClosed()?fi.FALSE:0},t.prototype.isClosed=function(){var i=this;if(this.isEmpty())return!1;for(var a=0;a<this._geometries.length;a++)if(!i._geometries[a].isClosed())return!1;return!0},t.prototype.getDimension=function(){return 1},t.prototype.reverse=function(){for(var i=this,a=this._geometries.length,o=new Array(a).fill(null),u=0;u<this._geometries.length;u++)o[a-1-u]=i._geometries[u].reverse();return this.getFactory().createMultiLineString(o)},t.prototype.getBoundary=function(){return new Cc(this).getBoundary()},t.prototype.getGeometryType=function(){return"MultiLineString"},t.prototype.copy=function(){for(var i=this,a=new Array(this._geometries.length).fill(null),o=0;o<a.length;o++)a[o]=i._geometries[o].copy();return new t(a,this._factory)},t.prototype.interfaces_=function(){return[cw]},t.prototype.getClass=function(){return t},n.serialVersionUID.get=function(){return 8166665132445434e3},Object.defineProperties(t,n),t}(uu),Cc=function(){if(this._geom=null,this._geomFact=null,this._bnRule=null,this._endpointMap=null,arguments.length===1){var t=arguments[0],n=Ec.MOD2_BOUNDARY_RULE;this._geom=t,this._geomFact=t.getFactory(),this._bnRule=n}else if(arguments.length===2){var r=arguments[0],i=arguments[1];this._geom=r,this._geomFact=r.getFactory(),this._bnRule=i}};Cc.prototype.boundaryMultiLineString=function(t){if(this._geom.isEmpty())return this.getEmptyMultiPoint();var n=this.computeBoundaryCoordinates(t);return n.length===1?this._geomFact.createPoint(n[0]):this._geomFact.createMultiPointFromCoords(n)};Cc.prototype.getBoundary=function(){return this._geom instanceof Uo?this.boundaryLineString(this._geom):this._geom instanceof Gm?this.boundaryMultiLineString(this._geom):this._geom.getBoundary()};Cc.prototype.boundaryLineString=function(t){if(this._geom.isEmpty())return this.getEmptyMultiPoint();if(t.isClosed()){var n=this._bnRule.isInBoundary(2);return n?t.getStartPoint():this._geomFact.createMultiPoint()}return this._geomFact.createMultiPoint([t.getStartPoint(),t.getEndPoint()])};Cc.prototype.getEmptyMultiPoint=function(){return this._geomFact.createMultiPoint()};Cc.prototype.computeBoundaryCoordinates=function(t){var n=this,r=new Ke;this._endpointMap=new Ns;for(var i=0;i<t.getNumGeometries();i++){var a=t.getGeometryN(i);a.getNumPoints()!==0&&(n.addEndpoint(a.getCoordinateN(0)),n.addEndpoint(a.getCoordinateN(a.getNumPoints()-1)))}for(var o=this._endpointMap.entrySet().iterator();o.hasNext();){var u=o.next(),c=u.getValue(),g=c.count;n._bnRule.isInBoundary(g)&&r.add(u.getKey())}return Mr.toCoordinateArray(r)};Cc.prototype.addEndpoint=function(t){var n=this._endpointMap.get(t);n===null&&(n=new LI,this._endpointMap.put(t,n)),n.count++};Cc.prototype.interfaces_=function(){return[]};Cc.prototype.getClass=function(){return Cc};Cc.getBoundary=function(){if(arguments.length===1){var t=arguments[0],n=new Cc(t);return n.getBoundary()}else if(arguments.length===2){var r=arguments[0],i=arguments[1],a=new Cc(r,i);return a.getBoundary()}};var LI=function(){this.count=null};LI.prototype.interfaces_=function(){return[]};LI.prototype.getClass=function(){return LI};function Mxt(){}function Axt(){}var Lxt=function(){};function Oxt(){}function Rxt(){}function kxt(){}var Ic=function(){},YR={NEWLINE:{configurable:!0},SIMPLE_ORDINATE_FORMAT:{configurable:!0}};Ic.prototype.interfaces_=function(){return[]};Ic.prototype.getClass=function(){return Ic};Ic.chars=function(t,n){for(var r=new Array(n).fill(null),i=0;i<n;i++)r[i]=t;return String(r)};Ic.getStackTrace=function(){if(arguments.length===1){var t=arguments[0],n=new Oxt,r=new Mxt;return t.printStackTrace(r),n.toString()}else if(arguments.length===2){var i=arguments[0],a=arguments[1],o="";new Axt(Ic.getStackTrace(i));for(var u=new kxt,c=0;c<a;c++)try{o+=u.readLine()+Ic.NEWLINE}catch(g){if(g instanceof Rxt)lr.shouldNeverReachHere();else throw g}finally{}return o}};Ic.split=function(t,n){for(var r=n.length,i=new Ke,a=""+t,o=a.indexOf(n);o>=0;){var u=a.substring(0,o);i.add(u),a=a.substring(o+r),o=a.indexOf(n)}a.length>0&&i.add(a);for(var c=new Array(i.size()).fill(null),g=0;g<c.length;g++)c[g]=i.get(g);return c};Ic.toString=function(){if(arguments.length===1){var t=arguments[0];return Ic.SIMPLE_ORDINATE_FORMAT.format(t)}};Ic.spaces=function(t){return Ic.chars(" ",t)};YR.NEWLINE.get=function(){return xs.getProperty("line.separator")};YR.SIMPLE_ORDINATE_FORMAT.get=function(){return new Lxt};Object.defineProperties(Ic,YR);var na=function(){};na.prototype.interfaces_=function(){return[]};na.prototype.getClass=function(){return na};na.copyCoord=function(t,n,r,i){for(var a=Math.min(t.getDimension(),r.getDimension()),o=0;o<a;o++)r.setOrdinate(i,o,t.getOrdinate(n,o))};na.isRing=function(t){var n=t.size();return n===0?!0:n<=3?!1:t.getOrdinate(0,Jr.X)===t.getOrdinate(n-1,Jr.X)&&t.getOrdinate(0,Jr.Y)===t.getOrdinate(n-1,Jr.Y)};na.isEqual=function(t,n){var r=t.size(),i=n.size();if(r!==i)return!1;for(var a=Math.min(t.getDimension(),n.getDimension()),o=0;o<r;o++)for(var u=0;u<a;u++){var c=t.getOrdinate(o,u),g=n.getOrdinate(o,u);if(t.getOrdinate(o,u)!==n.getOrdinate(o,u)&&!(Kn.isNaN(c)&&Kn.isNaN(g)))return!1}return!0};na.extend=function(t,n,r){var i=t.create(r,n.getDimension()),a=n.size();if(na.copy(n,0,i,0,a),a>0)for(var o=a;o<r;o++)na.copy(n,a-1,i,o,1);return i};na.reverse=function(t){for(var n=t.size()-1,r=Math.trunc(n/2),i=0;i<=r;i++)na.swap(t,i,n-i)};na.swap=function(t,n,r){if(n===r)return null;for(var i=0;i<t.getDimension();i++){var a=t.getOrdinate(n,i);t.setOrdinate(n,i,t.getOrdinate(r,i)),t.setOrdinate(r,i,a)}};na.copy=function(t,n,r,i,a){for(var o=0;o<a;o++)na.copyCoord(t,n+o,r,i+o)};na.toString=function(){if(arguments.length===1){var t=arguments[0],n=t.size();if(n===0)return"()";var r=t.getDimension(),i=new dh;i.append("(");for(var a=0;a<n;a++){a>0&&i.append(" ");for(var o=0;o<r;o++)o>0&&i.append(","),i.append(Ic.toString(t.getOrdinate(a,o)))}return i.append(")"),i.toString()}};na.ensureValidRing=function(t,n){var r=n.size();if(r===0)return n;if(r<=3)return na.createClosedRing(t,n,4);var i=n.getOrdinate(0,Jr.X)===n.getOrdinate(r-1,Jr.X)&&n.getOrdinate(0,Jr.Y)===n.getOrdinate(r-1,Jr.Y);return i?n:na.createClosedRing(t,n,r+1)};na.createClosedRing=function(t,n,r){var i=t.create(r,n.getDimension()),a=n.size();na.copy(n,0,i,0,a);for(var o=a;o<r;o++)na.copy(n,0,i,o,1);return i};var Uo=function(e){function t(r,i){e.call(this,i),this._points=null,this.init(r)}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={serialVersionUID:{configurable:!0}};return t.prototype.computeEnvelopeInternal=function(){return this.isEmpty()?new In:this._points.expandEnvelope(new In)},t.prototype.isRing=function(){return this.isClosed()&&this.isSimple()},t.prototype.getSortIndex=function(){return e.SORTINDEX_LINESTRING},t.prototype.getCoordinates=function(){return this._points.toCoordinateArray()},t.prototype.equalsExact=function(){var i=this;if(arguments.length===2){var a=arguments[0],o=arguments[1];if(!this.isEquivalentClass(a))return!1;var u=a;if(this._points.size()!==u._points.size())return!1;for(var c=0;c<this._points.size();c++)if(!i.equal(i._points.getCoordinate(c),u._points.getCoordinate(c),o))return!1;return!0}else return e.prototype.equalsExact.apply(this,arguments)},t.prototype.normalize=function(){for(var i=this,a=0;a<Math.trunc(this._points.size()/2);a++){var o=i._points.size()-1-a;if(!i._points.getCoordinate(a).equals(i._points.getCoordinate(o)))return i._points.getCoordinate(a).compareTo(i._points.getCoordinate(o))>0&&na.reverse(i._points),null}},t.prototype.getCoordinate=function(){return this.isEmpty()?null:this._points.getCoordinate(0)},t.prototype.getBoundaryDimension=function(){return this.isClosed()?fi.FALSE:0},t.prototype.isClosed=function(){return this.isEmpty()?!1:this.getCoordinateN(0).equals2D(this.getCoordinateN(this.getNumPoints()-1))},t.prototype.getEndPoint=function(){return this.isEmpty()?null:this.getPointN(this.getNumPoints()-1)},t.prototype.getDimension=function(){return 1},t.prototype.getLength=function(){return on.computeLength(this._points)},t.prototype.getNumPoints=function(){return this._points.size()},t.prototype.reverse=function(){var i=this._points.copy();na.reverse(i);var a=this.getFactory().createLineString(i);return a},t.prototype.compareToSameClass=function(){var i=this;if(arguments.length===1){for(var a=arguments[0],o=a,u=0,c=0;u<this._points.size()&&c<o._points.size();){var g=i._points.getCoordinate(u).compareTo(o._points.getCoordinate(c));if(g!==0)return g;u++,c++}return u<this._points.size()?1:c<o._points.size()?-1:0}else if(arguments.length===2){var _=arguments[0],E=arguments[1],C=_;return E.compare(this._points,C._points)}},t.prototype.apply=function(){var i=this;if($n(arguments[0],yp))for(var a=arguments[0],o=0;o<this._points.size();o++)a.filter(i._points.getCoordinate(o));else if($n(arguments[0],xf)){var u=arguments[0];if(this._points.size()===0)return null;for(var c=0;c<this._points.size()&&(u.filter(i._points,c),!u.isDone());c++);u.isGeometryChanged()&&this.geometryChanged()}else if($n(arguments[0],_h)){var g=arguments[0];g.filter(this)}else if($n(arguments[0],sd)){var _=arguments[0];_.filter(this)}},t.prototype.getBoundary=function(){return new Cc(this).getBoundary()},t.prototype.isEquivalentClass=function(i){return i instanceof t},t.prototype.clone=function(){var i=e.prototype.clone.call(this);return i._points=this._points.clone(),i},t.prototype.getCoordinateN=function(i){return this._points.getCoordinate(i)},t.prototype.getGeometryType=function(){return"LineString"},t.prototype.copy=function(){return new t(this._points.copy(),this._factory)},t.prototype.getCoordinateSequence=function(){return this._points},t.prototype.isEmpty=function(){return this._points.size()===0},t.prototype.init=function(i){if(i===null&&(i=this.getFactory().getCoordinateSequenceFactory().create([])),i.size()===1)throw new wo("Invalid number of points in LineString (found "+i.size()+" - must be 0 or >= 2)");this._points=i},t.prototype.isCoordinate=function(i){for(var a=this,o=0;o<this._points.size();o++)if(a._points.getCoordinate(o).equals(i))return!0;return!1},t.prototype.getStartPoint=function(){return this.isEmpty()?null:this.getPointN(0)},t.prototype.getPointN=function(i){return this.getFactory().createPoint(this._points.getCoordinate(i))},t.prototype.interfaces_=function(){return[cw]},t.prototype.getClass=function(){return t},n.serialVersionUID.get=function(){return 3110669828065365500},Object.defineProperties(t,n),t}(Bn),fw=function(){};fw.prototype.interfaces_=function(){return[]};fw.prototype.getClass=function(){return fw};var pl=function(e){function t(r,i){e.call(this,i),this._coordinates=r||null,this.init(this._coordinates)}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={serialVersionUID:{configurable:!0}};return t.prototype.computeEnvelopeInternal=function(){if(this.isEmpty())return new In;var i=new In;return i.expandToInclude(this._coordinates.getX(0),this._coordinates.getY(0)),i},t.prototype.getSortIndex=function(){return e.SORTINDEX_POINT},t.prototype.getCoordinates=function(){return this.isEmpty()?[]:[this.getCoordinate()]},t.prototype.equalsExact=function(){if(arguments.length===2){var i=arguments[0],a=arguments[1];return this.isEquivalentClass(i)?this.isEmpty()&&i.isEmpty()?!0:this.isEmpty()!==i.isEmpty()?!1:this.equal(i.getCoordinate(),this.getCoordinate(),a):!1}else return e.prototype.equalsExact.apply(this,arguments)},t.prototype.normalize=function(){},t.prototype.getCoordinate=function(){return this._coordinates.size()!==0?this._coordinates.getCoordinate(0):null},t.prototype.getBoundaryDimension=function(){return fi.FALSE},t.prototype.getDimension=function(){return 0},t.prototype.getNumPoints=function(){return this.isEmpty()?0:1},t.prototype.reverse=function(){return this.copy()},t.prototype.getX=function(){if(this.getCoordinate()===null)throw new Error("getX called on empty Point");return this.getCoordinate().x},t.prototype.compareToSameClass=function(){if(arguments.length===1){var i=arguments[0],a=i;return this.getCoordinate().compareTo(a.getCoordinate())}else if(arguments.length===2){var o=arguments[0],u=arguments[1],c=o;return u.compare(this._coordinates,c._coordinates)}},t.prototype.apply=function(){if($n(arguments[0],yp)){var i=arguments[0];if(this.isEmpty())return null;i.filter(this.getCoordinate())}else if($n(arguments[0],xf)){var a=arguments[0];if(this.isEmpty())return null;a.filter(this._coordinates,0),a.isGeometryChanged()&&this.geometryChanged()}else if($n(arguments[0],_h)){var o=arguments[0];o.filter(this)}else if($n(arguments[0],sd)){var u=arguments[0];u.filter(this)}},t.prototype.getBoundary=function(){return this.getFactory().createGeometryCollection(null)},t.prototype.clone=function(){var i=e.prototype.clone.call(this);return i._coordinates=this._coordinates.clone(),i},t.prototype.getGeometryType=function(){return"Point"},t.prototype.copy=function(){return new t(this._coordinates.copy(),this._factory)},t.prototype.getCoordinateSequence=function(){return this._coordinates},t.prototype.getY=function(){if(this.getCoordinate()===null)throw new Error("getY called on empty Point");return this.getCoordinate().y},t.prototype.isEmpty=function(){return this._coordinates.size()===0},t.prototype.init=function(i){i===null&&(i=this.getFactory().getCoordinateSequenceFactory().create([])),lr.isTrue(i.size()<=1),this._coordinates=i},t.prototype.isSimple=function(){return!0},t.prototype.interfaces_=function(){return[fw]},t.prototype.getClass=function(){return t},n.serialVersionUID.get=function(){return 4902022702746615e3},Object.defineProperties(t,n),t}(Bn),dg=function(){};dg.prototype.interfaces_=function(){return[]};dg.prototype.getClass=function(){return dg};var Da=function(e){function t(r,i,a){if(e.call(this,a),this._shell=null,this._holes=null,r===null&&(r=this.getFactory().createLinearRing()),i===null&&(i=[]),e.hasNullElements(i))throw new wo;if(r.isEmpty()&&e.hasNonEmptyElements(i))throw new wo;this._shell=r,this._holes=i}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={serialVersionUID:{configurable:!0}};return t.prototype.computeEnvelopeInternal=function(){return this._shell.getEnvelopeInternal()},t.prototype.getSortIndex=function(){return e.SORTINDEX_POLYGON},t.prototype.getCoordinates=function(){var i=this;if(this.isEmpty())return[];for(var a=new Array(this.getNumPoints()).fill(null),o=-1,u=this._shell.getCoordinates(),c=0;c<u.length;c++)o++,a[o]=u[c];for(var g=0;g<this._holes.length;g++)for(var _=i._holes[g].getCoordinates(),E=0;E<_.length;E++)o++,a[o]=_[E];return a},t.prototype.getArea=function(){var i=this,a=0;a+=Math.abs(on.signedArea(this._shell.getCoordinateSequence()));for(var o=0;o<this._holes.length;o++)a-=Math.abs(on.signedArea(i._holes[o].getCoordinateSequence()));return a},t.prototype.isRectangle=function(){if(this.getNumInteriorRing()!==0||this._shell===null||this._shell.getNumPoints()!==5)return!1;for(var i=this._shell.getCoordinateSequence(),a=this.getEnvelopeInternal(),o=0;o<5;o++){var u=i.getX(o);if(!(u===a.getMinX()||u===a.getMaxX()))return!1;var c=i.getY(o);if(!(c===a.getMinY()||c===a.getMaxY()))return!1}for(var g=i.getX(0),_=i.getY(0),E=1;E<=4;E++){var C=i.getX(E),O=i.getY(E),R=C!==g,D=O!==_;if(R===D)return!1;g=C,_=O}return!0},t.prototype.equalsExact=function(){var i=this;if(arguments.length===2){var a=arguments[0],o=arguments[1];if(!this.isEquivalentClass(a))return!1;var u=a,c=this._shell,g=u._shell;if(!c.equalsExact(g,o)||this._holes.length!==u._holes.length)return!1;for(var _=0;_<this._holes.length;_++)if(!i._holes[_].equalsExact(u._holes[_],o))return!1;return!0}else return e.prototype.equalsExact.apply(this,arguments)},t.prototype.normalize=function(){var i=this;if(arguments.length===0){this.normalize(this._shell,!0);for(var a=0;a<this._holes.length;a++)i.normalize(i._holes[a],!1);qm.sort(this._holes)}else if(arguments.length===2){var o=arguments[0],u=arguments[1];if(o.isEmpty())return null;var c=new Array(o.getCoordinates().length-1).fill(null);xs.arraycopy(o.getCoordinates(),0,c,0,c.length);var g=Mr.minCoordinate(o.getCoordinates());Mr.scroll(c,g),xs.arraycopy(c,0,o.getCoordinates(),0,c.length),o.getCoordinates()[c.length]=c[0],on.isCCW(o.getCoordinates())===u&&Mr.reverse(o.getCoordinates())}},t.prototype.getCoordinate=function(){return this._shell.getCoordinate()},t.prototype.getNumInteriorRing=function(){return this._holes.length},t.prototype.getBoundaryDimension=function(){return 1},t.prototype.getDimension=function(){return 2},t.prototype.getLength=function(){var i=this,a=0;a+=this._shell.getLength();for(var o=0;o<this._holes.length;o++)a+=i._holes[o].getLength();return a},t.prototype.getNumPoints=function(){for(var i=this,a=this._shell.getNumPoints(),o=0;o<this._holes.length;o++)a+=i._holes[o].getNumPoints();return a},t.prototype.reverse=function(){var i=this,a=this.copy();a._shell=this._shell.copy().reverse(),a._holes=new Array(this._holes.length).fill(null);for(var o=0;o<this._holes.length;o++)a._holes[o]=i._holes[o].copy().reverse();return a},t.prototype.convexHull=function(){return this.getExteriorRing().convexHull()},t.prototype.compareToSameClass=function(){var i=this;if(arguments.length===1){var a=arguments[0],o=this._shell,u=a._shell;return o.compareToSameClass(u)}else if(arguments.length===2){var c=arguments[0],g=arguments[1],_=c,E=this._shell,C=_._shell,O=E.compareToSameClass(C,g);if(O!==0)return O;for(var R=this.getNumInteriorRing(),D=_.getNumInteriorRing(),B=0;B<R&&B<D;){var z=i.getInteriorRingN(B),k=_.getInteriorRingN(B),$=z.compareToSameClass(k,g);if($!==0)return $;B++}return B<R?1:B<D?-1:0}},t.prototype.apply=function(i){var a=this;if($n(i,yp)){this._shell.apply(i);for(var o=0;o<this._holes.length;o++)a._holes[o].apply(i)}else if($n(i,xf)){if(this._shell.apply(i),!i.isDone())for(var u=0;u<this._holes.length&&(a._holes[u].apply(i),!i.isDone());u++);i.isGeometryChanged()&&this.geometryChanged()}else if($n(i,_h))i.filter(this);else if($n(i,sd)){i.filter(this),this._shell.apply(i);for(var c=0;c<this._holes.length;c++)a._holes[c].apply(i)}},t.prototype.getBoundary=function(){var i=this;if(this.isEmpty())return this.getFactory().createMultiLineString();var a=new Array(this._holes.length+1).fill(null);a[0]=this._shell;for(var o=0;o<this._holes.length;o++)a[o+1]=i._holes[o];return a.length<=1?this.getFactory().createLinearRing(a[0].getCoordinateSequence()):this.getFactory().createMultiLineString(a)},t.prototype.clone=function(){var i=this,a=e.prototype.clone.call(this);a._shell=this._shell.clone(),a._holes=new Array(this._holes.length).fill(null);for(var o=0;o<this._holes.length;o++)a._holes[o]=i._holes[o].clone();return a},t.prototype.getGeometryType=function(){return"Polygon"},t.prototype.copy=function(){for(var i=this,a=this._shell.copy(),o=new Array(this._holes.length).fill(null),u=0;u<o.length;u++)o[u]=i._holes[u].copy();return new t(a,o,this._factory)},t.prototype.getExteriorRing=function(){return this._shell},t.prototype.isEmpty=function(){return this._shell.isEmpty()},t.prototype.getInteriorRingN=function(i){return this._holes[i]},t.prototype.interfaces_=function(){return[dg]},t.prototype.getClass=function(){return t},n.serialVersionUID.get=function(){return-3494792200821764600},Object.defineProperties(t,n),t}(Bn),sx=function(e){function t(){e.apply(this,arguments)}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={serialVersionUID:{configurable:!0}};return t.prototype.getSortIndex=function(){return Bn.SORTINDEX_MULTIPOINT},t.prototype.isValid=function(){return!0},t.prototype.equalsExact=function(){if(arguments.length===2){var i=arguments[0],a=arguments[1];return this.isEquivalentClass(i)?e.prototype.equalsExact.call(this,i,a):!1}else return e.prototype.equalsExact.apply(this,arguments)},t.prototype.getCoordinate=function(){if(arguments.length===1){var i=arguments[0];return this._geometries[i].getCoordinate()}else return e.prototype.getCoordinate.apply(this,arguments)},t.prototype.getBoundaryDimension=function(){return fi.FALSE},t.prototype.getDimension=function(){return 0},t.prototype.getBoundary=function(){return this.getFactory().createGeometryCollection(null)},t.prototype.getGeometryType=function(){return"MultiPoint"},t.prototype.copy=function(){for(var i=this,a=new Array(this._geometries.length).fill(null),o=0;o<a.length;o++)a[o]=i._geometries[o].copy();return new t(a,this._factory)},t.prototype.interfaces_=function(){return[fw]},t.prototype.getClass=function(){return t},n.serialVersionUID.get=function(){return-8048474874175356e3},Object.defineProperties(t,n),t}(uu),_p=function(e){function t(r,i){r instanceof Xt&&i instanceof Fr&&(r=i.getCoordinateSequenceFactory().create(r)),e.call(this,r,i),this.validateConstruction()}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={MINIMUM_VALID_SIZE:{configurable:!0},serialVersionUID:{configurable:!0}};return t.prototype.getSortIndex=function(){return Bn.SORTINDEX_LINEARRING},t.prototype.getBoundaryDimension=function(){return fi.FALSE},t.prototype.isClosed=function(){return this.isEmpty()?!0:e.prototype.isClosed.call(this)},t.prototype.reverse=function(){var i=this._points.copy();na.reverse(i);var a=this.getFactory().createLinearRing(i);return a},t.prototype.validateConstruction=function(){if(!this.isEmpty()&&!e.prototype.isClosed.call(this))throw new wo;if(this.getCoordinateSequence().size()>=1&&this.getCoordinateSequence().size()<t.MINIMUM_VALID_SIZE)throw new wo("Invalid number of points in LinearRing (found "+this.getCoordinateSequence().size()+" - must be 0 or >= 4)")},t.prototype.getGeometryType=function(){return"LinearRing"},t.prototype.copy=function(){return new t(this._points.copy(),this._factory)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},n.MINIMUM_VALID_SIZE.get=function(){return 4},n.serialVersionUID.get=function(){return-4261142084085851600},Object.defineProperties(t,n),t}(Uo),xp=function(e){function t(){e.apply(this,arguments)}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={serialVersionUID:{configurable:!0}};return t.prototype.getSortIndex=function(){return Bn.SORTINDEX_MULTIPOLYGON},t.prototype.equalsExact=function(){if(arguments.length===2){var i=arguments[0],a=arguments[1];return this.isEquivalentClass(i)?e.prototype.equalsExact.call(this,i,a):!1}else return e.prototype.equalsExact.apply(this,arguments)},t.prototype.getBoundaryDimension=function(){return 1},t.prototype.getDimension=function(){return 2},t.prototype.reverse=function(){for(var i=this,a=this._geometries.length,o=new Array(a).fill(null),u=0;u<this._geometries.length;u++)o[u]=i._geometries[u].reverse();return this.getFactory().createMultiPolygon(o)},t.prototype.getBoundary=function(){var i=this;if(this.isEmpty())return this.getFactory().createMultiLineString();for(var a=new Ke,o=0;o<this._geometries.length;o++)for(var u=i._geometries[o],c=u.getBoundary(),g=0;g<c.getNumGeometries();g++)a.add(c.getGeometryN(g));var _=new Array(a.size()).fill(null);return this.getFactory().createMultiLineString(a.toArray(_))},t.prototype.getGeometryType=function(){return"MultiPolygon"},t.prototype.copy=function(){for(var i=this,a=new Array(this._geometries.length).fill(null),o=0;o<a.length;o++)a[o]=i._geometries[o].copy();return new t(a,this._factory)},t.prototype.interfaces_=function(){return[dg]},t.prototype.getClass=function(){return t},n.serialVersionUID.get=function(){return-551033529766975900},Object.defineProperties(t,n),t}(uu),Pc=function(t){this._factory=t||null,this._isUserDataCopied=!1},OI={NoOpGeometryOperation:{configurable:!0},CoordinateOperation:{configurable:!0},CoordinateSequenceOperation:{configurable:!0}};Pc.prototype.setCopyUserData=function(t){this._isUserDataCopied=t};Pc.prototype.edit=function(t,n){if(t===null)return null;var r=this.editInternal(t,n);return this._isUserDataCopied&&r.setUserData(t.getUserData()),r};Pc.prototype.editInternal=function(t,n){return this._factory===null&&(this._factory=t.getFactory()),t instanceof uu?this.editGeometryCollection(t,n):t instanceof Da?this.editPolygon(t,n):t instanceof pl?n.edit(t,this._factory):t instanceof Uo?n.edit(t,this._factory):(lr.shouldNeverReachHere("Unsupported Geometry class: "+t.getClass().getName()),null)};Pc.prototype.editGeometryCollection=function(t,n){for(var r=this,i=n.edit(t,this._factory),a=new Ke,o=0;o<i.getNumGeometries();o++){var u=r.edit(i.getGeometryN(o),n);u===null||u.isEmpty()||a.add(u)}return i.getClass()===sx?this._factory.createMultiPoint(a.toArray([])):i.getClass()===Gm?this._factory.createMultiLineString(a.toArray([])):i.getClass()===xp?this._factory.createMultiPolygon(a.toArray([])):this._factory.createGeometryCollection(a.toArray([]))};Pc.prototype.editPolygon=function(t,n){var r=this,i=n.edit(t,this._factory);if(i===null&&(i=this._factory.createPolygon(null)),i.isEmpty())return i;var a=this.edit(i.getExteriorRing(),n);if(a===null||a.isEmpty())return this._factory.createPolygon();for(var o=new Ke,u=0;u<i.getNumInteriorRing();u++){var c=r.edit(i.getInteriorRingN(u),n);c===null||c.isEmpty()||o.add(c)}return this._factory.createPolygon(a,o.toArray([]))};Pc.prototype.interfaces_=function(){return[]};Pc.prototype.getClass=function(){return Pc};Pc.GeometryEditorOperation=function(){};OI.NoOpGeometryOperation.get=function(){return hw};OI.CoordinateOperation.get=function(){return pw};OI.CoordinateSequenceOperation.get=function(){return dw};Object.defineProperties(Pc,OI);var hw=function(){};hw.prototype.edit=function(t,n){return t};hw.prototype.interfaces_=function(){return[Pc.GeometryEditorOperation]};hw.prototype.getClass=function(){return hw};var pw=function(){};pw.prototype.edit=function(t,n){var r=this.editCoordinates(t.getCoordinates(),t);return r===null?t:t instanceof _p?n.createLinearRing(r):t instanceof Uo?n.createLineString(r):t instanceof pl?r.length>0?n.createPoint(r[0]):n.createPoint():t};pw.prototype.interfaces_=function(){return[Pc.GeometryEditorOperation]};pw.prototype.getClass=function(){return pw};var dw=function(){};dw.prototype.edit=function(t,n){return t instanceof _p?n.createLinearRing(this.edit(t.getCoordinateSequence(),t)):t instanceof Uo?n.createLineString(this.edit(t.getCoordinateSequence(),t)):t instanceof pl?n.createPoint(this.edit(t.getCoordinateSequence(),t)):t};dw.prototype.interfaces_=function(){return[Pc.GeometryEditorOperation]};dw.prototype.getClass=function(){return dw};var ra=function(){var t=this;if(this._dimension=3,this._coordinates=null,arguments.length===1){if(arguments[0]instanceof Array)this._coordinates=arguments[0],this._dimension=3;else if(Number.isInteger(arguments[0])){var n=arguments[0];this._coordinates=new Array(n).fill(null);for(var r=0;r<n;r++)t._coordinates[r]=new Xt}else if($n(arguments[0],Jr)){var i=arguments[0];if(i===null)return this._coordinates=new Array(0).fill(null),null;this._dimension=i.getDimension(),this._coordinates=new Array(i.size()).fill(null);for(var a=0;a<this._coordinates.length;a++)t._coordinates[a]=i.getCoordinateCopy(a)}}else if(arguments.length===2){if(arguments[0]instanceof Array&&Number.isInteger(arguments[1])){var o=arguments[0],u=arguments[1];this._coordinates=o,this._dimension=u,o===null&&(this._coordinates=new Array(0).fill(null))}else if(Number.isInteger(arguments[0])&&Number.isInteger(arguments[1])){var c=arguments[0],g=arguments[1];this._coordinates=new Array(c).fill(null),this._dimension=g;for(var _=0;_<c;_++)t._coordinates[_]=new Xt}}},M8={serialVersionUID:{configurable:!0}};ra.prototype.setOrdinate=function(t,n,r){switch(n){case Jr.X:this._coordinates[t].x=r;break;case Jr.Y:this._coordinates[t].y=r;break;case Jr.Z:this._coordinates[t].z=r;break;default:throw new wo}};ra.prototype.size=function(){return this._coordinates.length};ra.prototype.getOrdinate=function(t,n){switch(n){case Jr.X:return this._coordinates[t].x;case Jr.Y:return this._coordinates[t].y;case Jr.Z:return this._coordinates[t].z}return Kn.NaN};ra.prototype.getCoordinate=function(){if(arguments.length===1){var t=arguments[0];return this._coordinates[t]}else if(arguments.length===2){var n=arguments[0],r=arguments[1];r.x=this._coordinates[n].x,r.y=this._coordinates[n].y,r.z=this._coordinates[n].z}};ra.prototype.getCoordinateCopy=function(t){return new Xt(this._coordinates[t])};ra.prototype.getDimension=function(){return this._dimension};ra.prototype.getX=function(t){return this._coordinates[t].x};ra.prototype.clone=function(){for(var t=this,n=new Array(this.size()).fill(null),r=0;r<this._coordinates.length;r++)n[r]=t._coordinates[r].clone();return new ra(n,this._dimension)};ra.prototype.expandEnvelope=function(t){for(var n=this,r=0;r<this._coordinates.length;r++)t.expandToInclude(n._coordinates[r]);return t};ra.prototype.copy=function(){for(var t=this,n=new Array(this.size()).fill(null),r=0;r<this._coordinates.length;r++)n[r]=t._coordinates[r].copy();return new ra(n,this._dimension)};ra.prototype.toString=function(){var t=this;if(this._coordinates.length>0){var n=new dh(17*this._coordinates.length);n.append("("),n.append(this._coordinates[0]);for(var r=1;r<this._coordinates.length;r++)n.append(", "),n.append(t._coordinates[r]);return n.append(")"),n.toString()}else return"()"};ra.prototype.getY=function(t){return this._coordinates[t].y};ra.prototype.toCoordinateArray=function(){return this._coordinates};ra.prototype.interfaces_=function(){return[Jr,Sc]};ra.prototype.getClass=function(){return ra};M8.serialVersionUID.get=function(){return-915438501601840600};Object.defineProperties(ra,M8);var bp=function(){},ZR={serialVersionUID:{configurable:!0},instanceObject:{configurable:!0}};bp.prototype.readResolve=function(){return bp.instance()};bp.prototype.create=function(){if(arguments.length===1){if(arguments[0]instanceof Array){var t=arguments[0];return new ra(t)}else if($n(arguments[0],Jr)){var n=arguments[0];return new ra(n)}}else if(arguments.length===2){var r=arguments[0],i=arguments[1];return i>3&&(i=3),i<2?new ra(r):new ra(r,i)}};bp.prototype.interfaces_=function(){return[K0,Sc]};bp.prototype.getClass=function(){return bp};bp.instance=function(){return bp.instanceObject};ZR.serialVersionUID.get=function(){return-4099577099607551500};ZR.instanceObject.get=function(){return new bp};Object.defineProperties(bp,ZR);var A8=function(e){function t(){e.call(this),this.map_=new Map}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.get=function(r){return this.map_.get(r)||null},t.prototype.put=function(r,i){return this.map_.set(r,i),i},t.prototype.values=function(){for(var r=new Ke,i=this.map_.values(),a=i.next();!a.done;)r.add(a.value),a=i.next();return r},t.prototype.entrySet=function(){var r=new HR;return this.map_.entries().forEach(function(i){return r.add(i)}),r},t.prototype.size=function(){return this.map_.size()},t}(xy),xi=function e(){if(this._modelType=null,this._scale=null,arguments.length===0)this._modelType=e.FLOATING;else if(arguments.length===1){if(arguments[0]instanceof xh){var t=arguments[0];this._modelType=t,t===e.FIXED&&this.setScale(1)}else if(typeof arguments[0]=="number"){var n=arguments[0];this._modelType=e.FIXED,this.setScale(n)}else if(arguments[0]instanceof e){var r=arguments[0];this._modelType=r._modelType,this._scale=r._scale}}},KR={serialVersionUID:{configurable:!0},maximumPreciseValue:{configurable:!0}};xi.prototype.equals=function(t){if(!(t instanceof xi))return!1;var n=t;return this._modelType===n._modelType&&this._scale===n._scale};xi.prototype.compareTo=function(t){var n=t,r=this.getMaximumSignificantDigits(),i=n.getMaximumSignificantDigits();return new gh(r).compareTo(new gh(i))};xi.prototype.getScale=function(){return this._scale};xi.prototype.isFloating=function(){return this._modelType===xi.FLOATING||this._modelType===xi.FLOATING_SINGLE};xi.prototype.getType=function(){return this._modelType};xi.prototype.toString=function(){var t="UNKNOWN";return this._modelType===xi.FLOATING?t="Floating":this._modelType===xi.FLOATING_SINGLE?t="Floating-Single":this._modelType===xi.FIXED&&(t="Fixed (Scale="+this.getScale()+")"),t};xi.prototype.makePrecise=function(){if(typeof arguments[0]=="number"){var t=arguments[0];if(Kn.isNaN(t))return t;if(this._modelType===xi.FLOATING_SINGLE){var n=t;return n}return this._modelType===xi.FIXED?Math.round(t*this._scale)/this._scale:t}else if(arguments[0]instanceof Xt){var r=arguments[0];if(this._modelType===xi.FLOATING)return null;r.x=this.makePrecise(r.x),r.y=this.makePrecise(r.y)}};xi.prototype.getMaximumSignificantDigits=function(){var t=16;return this._modelType===xi.FLOATING?t=16:this._modelType===xi.FLOATING_SINGLE?t=6:this._modelType===xi.FIXED&&(t=1+Math.trunc(Math.ceil(Math.log(this.getScale())/Math.log(10)))),t};xi.prototype.setScale=function(t){this._scale=Math.abs(t)};xi.prototype.interfaces_=function(){return[Sc,wc]};xi.prototype.getClass=function(){return xi};xi.mostPrecise=function(t,n){return t.compareTo(n)>=0?t:n};KR.serialVersionUID.get=function(){return 7777263578777804e3};KR.maximumPreciseValue.get=function(){return 9007199254740992};Object.defineProperties(xi,KR);var xh=function e(t){this._name=t||null,e.nameToTypeMap.put(t,this)},JR={serialVersionUID:{configurable:!0},nameToTypeMap:{configurable:!0}};xh.prototype.readResolve=function(){return xh.nameToTypeMap.get(this._name)};xh.prototype.toString=function(){return this._name};xh.prototype.interfaces_=function(){return[Sc]};xh.prototype.getClass=function(){return xh};JR.serialVersionUID.get=function(){return-552860263173159e4};JR.nameToTypeMap.get=function(){return new A8};Object.defineProperties(xh,JR);xi.Type=xh;xi.FIXED=new xh("FIXED");xi.FLOATING=new xh("FLOATING");xi.FLOATING_SINGLE=new xh("FLOATING SINGLE");var Fr=function e(){this._precisionModel=new xi,this._SRID=0,this._coordinateSequenceFactory=e.getDefaultCoordinateSequenceFactory(),arguments.length===0||(arguments.length===1?$n(arguments[0],K0)?this._coordinateSequenceFactory=arguments[0]:arguments[0]instanceof xi&&(this._precisionModel=arguments[0]):arguments.length===2?(this._precisionModel=arguments[0],this._SRID=arguments[1]):arguments.length===3&&(this._precisionModel=arguments[0],this._SRID=arguments[1],this._coordinateSequenceFactory=arguments[2]))},L8={serialVersionUID:{configurable:!0}};Fr.prototype.toGeometry=function(t){return t.isNull()?this.createPoint(null):t.getMinX()===t.getMaxX()&&t.getMinY()===t.getMaxY()?this.createPoint(new Xt(t.getMinX(),t.getMinY())):t.getMinX()===t.getMaxX()||t.getMinY()===t.getMaxY()?this.createLineString([new Xt(t.getMinX(),t.getMinY()),new Xt(t.getMaxX(),t.getMaxY())]):this.createPolygon(this.createLinearRing([new Xt(t.getMinX(),t.getMinY()),new Xt(t.getMinX(),t.getMaxY()),new Xt(t.getMaxX(),t.getMaxY()),new Xt(t.getMaxX(),t.getMinY()),new Xt(t.getMinX(),t.getMinY())]),null)};Fr.prototype.createLineString=function(t){if(t){if(t instanceof Array)return new Uo(this.getCoordinateSequenceFactory().create(t),this);if($n(t,Jr))return new Uo(t,this)}else return new Uo(this.getCoordinateSequenceFactory().create([]),this)};Fr.prototype.createMultiLineString=function(){if(arguments.length===0)return new Gm(null,this);if(arguments.length===1){var t=arguments[0];return new Gm(t,this)}};Fr.prototype.buildGeometry=function(t){for(var n=null,r=!1,i=!1,a=t.iterator();a.hasNext();){var o=a.next(),u=o.getClass();n===null&&(n=u),u!==n&&(r=!0),o.isGeometryCollectionOrDerived()&&(i=!0)}if(n===null)return this.createGeometryCollection();if(r||i)return this.createGeometryCollection(Fr.toGeometryArray(t));var c=t.iterator().next(),g=t.size()>1;if(g){if(c instanceof Da)return this.createMultiPolygon(Fr.toPolygonArray(t));if(c instanceof Uo)return this.createMultiLineString(Fr.toLineStringArray(t));if(c instanceof pl)return this.createMultiPoint(Fr.toPointArray(t));lr.shouldNeverReachHere("Unhandled class: "+c.getClass().getName())}return c};Fr.prototype.createMultiPointFromCoords=function(t){return this.createMultiPoint(t!==null?this.getCoordinateSequenceFactory().create(t):null)};Fr.prototype.createPoint=function(){if(arguments.length===0)return this.createPoint(this.getCoordinateSequenceFactory().create([]));if(arguments.length===1){if(arguments[0]instanceof Xt){var t=arguments[0];return this.createPoint(t!==null?this.getCoordinateSequenceFactory().create([t]):null)}else if($n(arguments[0],Jr)){var n=arguments[0];return new pl(n,this)}}};Fr.prototype.getCoordinateSequenceFactory=function(){return this._coordinateSequenceFactory};Fr.prototype.createPolygon=function(){if(arguments.length===0)return new Da(null,null,this);if(arguments.length===1){if($n(arguments[0],Jr)){var t=arguments[0];return this.createPolygon(this.createLinearRing(t))}else if(arguments[0]instanceof Array){var n=arguments[0];return this.createPolygon(this.createLinearRing(n))}else if(arguments[0]instanceof _p){var r=arguments[0];return this.createPolygon(r,null)}}else if(arguments.length===2){var i=arguments[0],a=arguments[1];return new Da(i,a,this)}};Fr.prototype.getSRID=function(){return this._SRID};Fr.prototype.createGeometryCollection=function(){if(arguments.length===0)return new uu(null,this);if(arguments.length===1){var t=arguments[0];return new uu(t,this)}};Fr.prototype.createGeometry=function(t){var n=new Pc(this);return n.edit(t,{edit:function(){if(arguments.length===2){var r=arguments[0];return this._coordinateSequenceFactory.create(r)}}})};Fr.prototype.getPrecisionModel=function(){return this._precisionModel};Fr.prototype.createLinearRing=function(){if(arguments.length===0)return this.createLinearRing(this.getCoordinateSequenceFactory().create([]));if(arguments.length===1){if(arguments[0]instanceof Array){var t=arguments[0];return this.createLinearRing(t!==null?this.getCoordinateSequenceFactory().create(t):null)}else if($n(arguments[0],Jr)){var n=arguments[0];return new _p(n,this)}}};Fr.prototype.createMultiPolygon=function(){if(arguments.length===0)return new xp(null,this);if(arguments.length===1){var t=arguments[0];return new xp(t,this)}};Fr.prototype.createMultiPoint=function(){var t=this;if(arguments.length===0)return new sx(null,this);if(arguments.length===1){if(arguments[0]instanceof Array){var n=arguments[0];return new sx(n,this)}else if(arguments[0]instanceof Array){var r=arguments[0];return this.createMultiPoint(r!==null?this.getCoordinateSequenceFactory().create(r):null)}else if($n(arguments[0],Jr)){var i=arguments[0];if(i===null)return this.createMultiPoint(new Array(0).fill(null));for(var a=new Array(i.size()).fill(null),o=0;o<i.size();o++){var u=t.getCoordinateSequenceFactory().create(1,i.getDimension());na.copy(i,o,u,0,1),a[o]=t.createPoint(u)}return this.createMultiPoint(a)}}};Fr.prototype.interfaces_=function(){return[Sc]};Fr.prototype.getClass=function(){return Fr};Fr.toMultiPolygonArray=function(t){var n=new Array(t.size()).fill(null);return t.toArray(n)};Fr.toGeometryArray=function(t){if(t===null)return null;var n=new Array(t.size()).fill(null);return t.toArray(n)};Fr.getDefaultCoordinateSequenceFactory=function(){return bp.instance()};Fr.toMultiLineStringArray=function(t){var n=new Array(t.size()).fill(null);return t.toArray(n)};Fr.toLineStringArray=function(t){var n=new Array(t.size()).fill(null);return t.toArray(n)};Fr.toMultiPointArray=function(t){var n=new Array(t.size()).fill(null);return t.toArray(n)};Fr.toLinearRingArray=function(t){var n=new Array(t.size()).fill(null);return t.toArray(n)};Fr.toPointArray=function(t){var n=new Array(t.size()).fill(null);return t.toArray(n)};Fr.toPolygonArray=function(t){var n=new Array(t.size()).fill(null);return t.toArray(n)};Fr.createPointFromInternalCoord=function(t,n){return n.getPrecisionModel().makePrecise(t),n.getFactory().createPoint(t)};L8.serialVersionUID.get=function(){return-6820524753094096e3};Object.defineProperties(Fr,L8);var ke=function(){},RI={ON:{configurable:!0},LEFT:{configurable:!0},RIGHT:{configurable:!0}};ke.prototype.interfaces_=function(){return[]};ke.prototype.getClass=function(){return ke};ke.opposite=function(t){return t===ke.LEFT?ke.RIGHT:t===ke.RIGHT?ke.LEFT:t};RI.ON.get=function(){return 0};RI.LEFT.get=function(){return 1};RI.RIGHT.get=function(){return 2};Object.defineProperties(ke,RI);function kI(e){this.message=e||""}kI.prototype=new Error;kI.prototype.name="EmptyStackException";function bh(){this.array_=[]}bh.prototype=new yf;bh.prototype.add=function(e){return this.array_.push(e),!0};bh.prototype.get=function(e){if(e<0||e>=this.size())throw new Error;return this.array_[e]};bh.prototype.push=function(e){return this.array_.push(e),e};bh.prototype.pop=function(e){if(this.array_.length===0)throw new kI;return this.array_.pop()};bh.prototype.peek=function(){if(this.array_.length===0)throw new kI;return this.array_[this.array_.length-1]};bh.prototype.empty=function(){return this.array_.length===0};bh.prototype.isEmpty=function(){return this.empty()};bh.prototype.search=function(e){return this.array_.indexOf(e)};bh.prototype.size=function(){return this.array_.length};bh.prototype.toArray=function(){for(var e=this,t=[],n=0,r=this.array_.length;n<r;n++)t.push(e.array_[n]);return t};var wh=function(){this._minIndex=-1,this._minCoord=null,this._minDe=null,this._orientedDe=null};wh.prototype.getCoordinate=function(){return this._minCoord};wh.prototype.getRightmostSide=function(t,n){var r=this.getRightmostSideOfSegment(t,n);return r<0&&(r=this.getRightmostSideOfSegment(t,n-1)),r<0&&(this._minCoord=null,this.checkForRightmostCoordinate(t)),r};wh.prototype.findRightmostEdgeAtVertex=function(){var t=this._minDe.getEdge().getCoordinates();lr.isTrue(this._minIndex>0&&this._minIndex<t.length,"rightmost point expected to be interior vertex of edge");var n=t[this._minIndex-1],r=t[this._minIndex+1],i=on.computeOrientation(this._minCoord,r,n),a=!1;(n.y<this._minCoord.y&&r.y<this._minCoord.y&&i===on.COUNTERCLOCKWISE||n.y>this._minCoord.y&&r.y>this._minCoord.y&&i===on.CLOCKWISE)&&(a=!0),a&&(this._minIndex=this._minIndex-1)};wh.prototype.getRightmostSideOfSegment=function(t,n){var r=t.getEdge(),i=r.getCoordinates();if(n<0||n+1>=i.length||i[n].y===i[n+1].y)return-1;var a=ke.LEFT;return i[n].y<i[n+1].y&&(a=ke.RIGHT),a};wh.prototype.getEdge=function(){return this._orientedDe};wh.prototype.checkForRightmostCoordinate=function(t){for(var n=this,r=t.getEdge().getCoordinates(),i=0;i<r.length-1;i++)(n._minCoord===null||r[i].x>n._minCoord.x)&&(n._minDe=t,n._minIndex=i,n._minCoord=r[i])};wh.prototype.findRightmostEdgeAtNode=function(){var t=this._minDe.getNode(),n=t.getEdges();this._minDe=n.getRightmostEdge(),this._minDe.isForward()||(this._minDe=this._minDe.getSym(),this._minIndex=this._minDe.getEdge().getCoordinates().length-1)};wh.prototype.findEdge=function(t){for(var n=this,r=t.iterator();r.hasNext();){var i=r.next();!i.isForward()||n.checkForRightmostCoordinate(i)}lr.isTrue(this._minIndex!==0||this._minCoord.equals(this._minDe.getCoordinate()),"inconsistency in rightmost processing"),this._minIndex===0?this.findRightmostEdgeAtNode():this.findRightmostEdgeAtVertex(),this._orientedDe=this._minDe;var a=this.getRightmostSide(this._minDe,this._minIndex);a===ke.LEFT&&(this._orientedDe=this._minDe.getSym())};wh.prototype.interfaces_=function(){return[]};wh.prototype.getClass=function(){return wh};var fd=function(e){function t(n,r){e.call(this,t.msgWithCoord(n,r)),this.pt=r?new Xt(r):null,this.name="TopologyException"}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getCoordinate=function(){return this.pt},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t.msgWithCoord=function(r,i){return i?r:r+" [ "+i+" ]"},t}(ad),DI=function(){this.array_=[]};DI.prototype.addLast=function(t){this.array_.push(t)};DI.prototype.removeFirst=function(){return this.array_.shift()};DI.prototype.isEmpty=function(){return this.array_.length===0};var lu=function(){this._finder=null,this._dirEdgeList=new Ke,this._nodes=new Ke,this._rightMostCoord=null,this._env=null,this._finder=new wh};lu.prototype.clearVisitedEdges=function(){for(var t=this._dirEdgeList.iterator();t.hasNext();){var n=t.next();n.setVisited(!1)}};lu.prototype.getRightmostCoordinate=function(){return this._rightMostCoord};lu.prototype.computeNodeDepth=function(t){for(var n=this,r=null,i=t.getEdges().iterator();i.hasNext();){var a=i.next();if(a.isVisited()||a.getSym().isVisited()){r=a;break}}if(r===null)throw new fd("unable to find edge to compute depths at "+t.getCoordinate());t.getEdges().computeDepths(r);for(var o=t.getEdges().iterator();o.hasNext();){var u=o.next();u.setVisited(!0),n.copySymDepths(u)}};lu.prototype.computeDepth=function(t){this.clearVisitedEdges();var n=this._finder.getEdge();n.setEdgeDepths(ke.RIGHT,t),this.copySymDepths(n),this.computeDepths(n)};lu.prototype.create=function(t){this.addReachable(t),this._finder.findEdge(this._dirEdgeList),this._rightMostCoord=this._finder.getCoordinate()};lu.prototype.findResultEdges=function(){for(var t=this._dirEdgeList.iterator();t.hasNext();){var n=t.next();n.getDepth(ke.RIGHT)>=1&&n.getDepth(ke.LEFT)<=0&&!n.isInteriorAreaEdge()&&n.setInResult(!0)}};lu.prototype.computeDepths=function(t){var n=this,r=new HR,i=new DI,a=t.getNode();for(i.addLast(a),r.add(a),t.setVisited(!0);!i.isEmpty();){var o=i.removeFirst();r.add(o),n.computeNodeDepth(o);for(var u=o.getEdges().iterator();u.hasNext();){var c=u.next(),g=c.getSym();if(!g.isVisited()){var _=g.getNode();r.contains(_)||(i.addLast(_),r.add(_))}}}};lu.prototype.compareTo=function(t){var n=t;return this._rightMostCoord.x<n._rightMostCoord.x?-1:this._rightMostCoord.x>n._rightMostCoord.x?1:0};lu.prototype.getEnvelope=function(){if(this._env===null){for(var t=new In,n=this._dirEdgeList.iterator();n.hasNext();)for(var r=n.next(),i=r.getEdge().getCoordinates(),a=0;a<i.length-1;a++)t.expandToInclude(i[a]);this._env=t}return this._env};lu.prototype.addReachable=function(t){var n=this,r=new bh;for(r.add(t);!r.empty();){var i=r.pop();n.add(i,r)}};lu.prototype.copySymDepths=function(t){var n=t.getSym();n.setDepth(ke.LEFT,t.getDepth(ke.RIGHT)),n.setDepth(ke.RIGHT,t.getDepth(ke.LEFT))};lu.prototype.add=function(t,n){var r=this;t.setVisited(!0),this._nodes.add(t);for(var i=t.getEdges().iterator();i.hasNext();){var a=i.next();r._dirEdgeList.add(a);var o=a.getSym(),u=o.getNode();u.isVisited()||n.push(u)}};lu.prototype.getNodes=function(){return this._nodes};lu.prototype.getDirectedEdges=function(){return this._dirEdgeList};lu.prototype.interfaces_=function(){return[wc]};lu.prototype.getClass=function(){return lu};var Qi=function e(){var t=this;if(this.location=null,arguments.length===1){if(arguments[0]instanceof Array){var n=arguments[0];this.init(n.length)}else if(Number.isInteger(arguments[0])){var r=arguments[0];this.init(1),this.location[ke.ON]=r}else if(arguments[0]instanceof e){var i=arguments[0];if(this.init(i.location.length),i!==null)for(var a=0;a<this.location.length;a++)t.location[a]=i.location[a]}}else if(arguments.length===3){var o=arguments[0],u=arguments[1],c=arguments[2];this.init(3),this.location[ke.ON]=o,this.location[ke.LEFT]=u,this.location[ke.RIGHT]=c}};Qi.prototype.setAllLocations=function(t){for(var n=this,r=0;r<this.location.length;r++)n.location[r]=t};Qi.prototype.isNull=function(){for(var t=this,n=0;n<this.location.length;n++)if(t.location[n]!==Kt.NONE)return!1;return!0};Qi.prototype.setAllLocationsIfNull=function(t){for(var n=this,r=0;r<this.location.length;r++)n.location[r]===Kt.NONE&&(n.location[r]=t)};Qi.prototype.isLine=function(){return this.location.length===1};Qi.prototype.merge=function(t){var n=this;if(t.location.length>this.location.length){var r=new Array(3).fill(null);r[ke.ON]=this.location[ke.ON],r[ke.LEFT]=Kt.NONE,r[ke.RIGHT]=Kt.NONE,this.location=r}for(var i=0;i<this.location.length;i++)n.location[i]===Kt.NONE&&i<t.location.length&&(n.location[i]=t.location[i])};Qi.prototype.getLocations=function(){return this.location};Qi.prototype.flip=function(){if(this.location.length<=1)return null;var t=this.location[ke.LEFT];this.location[ke.LEFT]=this.location[ke.RIGHT],this.location[ke.RIGHT]=t};Qi.prototype.toString=function(){var t=new dh;return this.location.length>1&&t.append(Kt.toLocationSymbol(this.location[ke.LEFT])),t.append(Kt.toLocationSymbol(this.location[ke.ON])),this.location.length>1&&t.append(Kt.toLocationSymbol(this.location[ke.RIGHT])),t.toString()};Qi.prototype.setLocations=function(t,n,r){this.location[ke.ON]=t,this.location[ke.LEFT]=n,this.location[ke.RIGHT]=r};Qi.prototype.get=function(t){return t<this.location.length?this.location[t]:Kt.NONE};Qi.prototype.isArea=function(){return this.location.length>1};Qi.prototype.isAnyNull=function(){for(var t=this,n=0;n<this.location.length;n++)if(t.location[n]===Kt.NONE)return!0;return!1};Qi.prototype.setLocation=function(){if(arguments.length===1){var t=arguments[0];this.setLocation(ke.ON,t)}else if(arguments.length===2){var n=arguments[0],r=arguments[1];this.location[n]=r}};Qi.prototype.init=function(t){this.location=new Array(t).fill(null),this.setAllLocations(Kt.NONE)};Qi.prototype.isEqualOnSide=function(t,n){return this.location[n]===t.location[n]};Qi.prototype.allPositionsEqual=function(t){for(var n=this,r=0;r<this.location.length;r++)if(n.location[r]!==t)return!1;return!0};Qi.prototype.interfaces_=function(){return[]};Qi.prototype.getClass=function(){return Qi};var Ci=function e(){if(this.elt=new Array(2).fill(null),arguments.length===1){if(Number.isInteger(arguments[0])){var t=arguments[0];this.elt[0]=new Qi(t),this.elt[1]=new Qi(t)}else if(arguments[0]instanceof e){var n=arguments[0];this.elt[0]=new Qi(n.elt[0]),this.elt[1]=new Qi(n.elt[1])}}else if(arguments.length===2){var r=arguments[0],i=arguments[1];this.elt[0]=new Qi(Kt.NONE),this.elt[1]=new Qi(Kt.NONE),this.elt[r].setLocation(i)}else if(arguments.length===3){var a=arguments[0],o=arguments[1],u=arguments[2];this.elt[0]=new Qi(a,o,u),this.elt[1]=new Qi(a,o,u)}else if(arguments.length===4){var c=arguments[0],g=arguments[1],_=arguments[2],E=arguments[3];this.elt[0]=new Qi(Kt.NONE,Kt.NONE,Kt.NONE),this.elt[1]=new Qi(Kt.NONE,Kt.NONE,Kt.NONE),this.elt[c].setLocations(g,_,E)}};Ci.prototype.getGeometryCount=function(){var t=0;return this.elt[0].isNull()||t++,this.elt[1].isNull()||t++,t};Ci.prototype.setAllLocations=function(t,n){this.elt[t].setAllLocations(n)};Ci.prototype.isNull=function(t){return this.elt[t].isNull()};Ci.prototype.setAllLocationsIfNull=function(){if(arguments.length===1){var t=arguments[0];this.setAllLocationsIfNull(0,t),this.setAllLocationsIfNull(1,t)}else if(arguments.length===2){var n=arguments[0],r=arguments[1];this.elt[n].setAllLocationsIfNull(r)}};Ci.prototype.isLine=function(t){return this.elt[t].isLine()};Ci.prototype.merge=function(t){for(var n=this,r=0;r<2;r++)n.elt[r]===null&&t.elt[r]!==null?n.elt[r]=new Qi(t.elt[r]):n.elt[r].merge(t.elt[r])};Ci.prototype.flip=function(){this.elt[0].flip(),this.elt[1].flip()};Ci.prototype.getLocation=function(){if(arguments.length===1){var t=arguments[0];return this.elt[t].get(ke.ON)}else if(arguments.length===2){var n=arguments[0],r=arguments[1];return this.elt[n].get(r)}};Ci.prototype.toString=function(){var t=new dh;return this.elt[0]!==null&&(t.append("A:"),t.append(this.elt[0].toString())),this.elt[1]!==null&&(t.append(" B:"),t.append(this.elt[1].toString())),t.toString()};Ci.prototype.isArea=function(){if(arguments.length===0)return this.elt[0].isArea()||this.elt[1].isArea();if(arguments.length===1){var t=arguments[0];return this.elt[t].isArea()}};Ci.prototype.isAnyNull=function(t){return this.elt[t].isAnyNull()};Ci.prototype.setLocation=function(){if(arguments.length===2){var t=arguments[0],n=arguments[1];this.elt[t].setLocation(ke.ON,n)}else if(arguments.length===3){var r=arguments[0],i=arguments[1],a=arguments[2];this.elt[r].setLocation(i,a)}};Ci.prototype.isEqualOnSide=function(t,n){return this.elt[0].isEqualOnSide(t.elt[0],n)&&this.elt[1].isEqualOnSide(t.elt[1],n)};Ci.prototype.allPositionsEqual=function(t,n){return this.elt[t].allPositionsEqual(n)};Ci.prototype.toLine=function(t){this.elt[t].isArea()&&(this.elt[t]=new Qi(this.elt[t].location[0]))};Ci.prototype.interfaces_=function(){return[]};Ci.prototype.getClass=function(){return Ci};Ci.toLineLabel=function(t){for(var n=new Ci(Kt.NONE),r=0;r<2;r++)n.setLocation(r,t.getLocation(r));return n};var ma=function(){this._startDe=null,this._maxNodeDegree=-1,this._edges=new Ke,this._pts=new Ke,this._label=new Ci(Kt.NONE),this._ring=null,this._isHole=null,this._shell=null,this._holes=new Ke,this._geometryFactory=null;var t=arguments[0],n=arguments[1];this._geometryFactory=n,this.computePoints(t),this.computeRing()};ma.prototype.computeRing=function(){var t=this;if(this._ring!==null)return null;for(var n=new Array(this._pts.size()).fill(null),r=0;r<this._pts.size();r++)n[r]=t._pts.get(r);this._ring=this._geometryFactory.createLinearRing(n),this._isHole=on.isCCW(this._ring.getCoordinates())};ma.prototype.isIsolated=function(){return this._label.getGeometryCount()===1};ma.prototype.computePoints=function(t){var n=this;this._startDe=t;var r=t,i=!0;do{if(r===null)throw new fd("Found null DirectedEdge");if(r.getEdgeRing()===n)throw new fd("Directed Edge visited twice during ring-building at "+r.getCoordinate());n._edges.add(r);var a=r.getLabel();lr.isTrue(a.isArea()),n.mergeLabel(a),n.addPoints(r.getEdge(),r.isForward(),i),i=!1,n.setEdgeRing(r,n),r=n.getNext(r)}while(r!==this._startDe)};ma.prototype.getLinearRing=function(){return this._ring};ma.prototype.getCoordinate=function(t){return this._pts.get(t)};ma.prototype.computeMaxNodeDegree=function(){var t=this;this._maxNodeDegree=0;var n=this._startDe;do{var r=n.getNode(),i=r.getEdges().getOutgoingDegree(t);i>t._maxNodeDegree&&(t._maxNodeDegree=i),n=t.getNext(n)}while(n!==this._startDe);this._maxNodeDegree*=2};ma.prototype.addPoints=function(t,n,r){var i=this,a=t.getCoordinates();if(n){var o=1;r&&(o=0);for(var u=o;u<a.length;u++)i._pts.add(a[u])}else{var c=a.length-2;r&&(c=a.length-1);for(var g=c;g>=0;g--)i._pts.add(a[g])}};ma.prototype.isHole=function(){return this._isHole};ma.prototype.setInResult=function(){var t=this._startDe;do t.getEdge().setInResult(!0),t=t.getNext();while(t!==this._startDe)};ma.prototype.containsPoint=function(t){var n=this.getLinearRing(),r=n.getEnvelopeInternal();if(!r.contains(t)||!on.isPointInRing(t,n.getCoordinates()))return!1;for(var i=this._holes.iterator();i.hasNext();){var a=i.next();if(a.containsPoint(t))return!1}return!0};ma.prototype.addHole=function(t){this._holes.add(t)};ma.prototype.isShell=function(){return this._shell===null};ma.prototype.getLabel=function(){return this._label};ma.prototype.getEdges=function(){return this._edges};ma.prototype.getMaxNodeDegree=function(){return this._maxNodeDegree<0&&this.computeMaxNodeDegree(),this._maxNodeDegree};ma.prototype.getShell=function(){return this._shell};ma.prototype.mergeLabel=function(){if(arguments.length===1){var t=arguments[0];this.mergeLabel(t,0),this.mergeLabel(t,1)}else if(arguments.length===2){var n=arguments[0],r=arguments[1],i=n.getLocation(r,ke.RIGHT);if(i===Kt.NONE)return null;if(this._label.getLocation(r)===Kt.NONE)return this._label.setLocation(r,i),null}};ma.prototype.setShell=function(t){this._shell=t,t!==null&&t.addHole(this)};ma.prototype.toPolygon=function(t){for(var n=this,r=new Array(this._holes.size()).fill(null),i=0;i<this._holes.size();i++)r[i]=n._holes.get(i).getLinearRing();var a=t.createPolygon(this.getLinearRing(),r);return a};ma.prototype.interfaces_=function(){return[]};ma.prototype.getClass=function(){return ma};var Dxt=function(e){function t(){var n=arguments[0],r=arguments[1];e.call(this,n,r)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.setEdgeRing=function(r,i){r.setMinEdgeRing(i)},t.prototype.getNext=function(r){return r.getNextMin()},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(ma),Nxt=function(e){function t(){var n=arguments[0],r=arguments[1];e.call(this,n,r)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.buildMinimalRings=function(){var r=this,i=new Ke,a=this._startDe;do{if(a.getMinEdgeRing()===null){var o=new Dxt(a,r._geometryFactory);i.add(o)}a=a.getNext()}while(a!==this._startDe);return i},t.prototype.setEdgeRing=function(r,i){r.setEdgeRing(i)},t.prototype.linkDirectedEdgesForMinimalEdgeRings=function(){var r=this,i=this._startDe;do{var a=i.getNode();a.getEdges().linkMinimalDirectedEdges(r),i=i.getNext()}while(i!==this._startDe)},t.prototype.getNext=function(r){return r.getNext()},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(ma),Ul=function(){if(this._label=null,this._isInResult=!1,this._isCovered=!1,this._isCoveredSet=!1,this._isVisited=!1,arguments.length!==0){if(arguments.length===1){var t=arguments[0];this._label=t}}};Ul.prototype.setVisited=function(t){this._isVisited=t};Ul.prototype.setInResult=function(t){this._isInResult=t};Ul.prototype.isCovered=function(){return this._isCovered};Ul.prototype.isCoveredSet=function(){return this._isCoveredSet};Ul.prototype.setLabel=function(t){this._label=t};Ul.prototype.getLabel=function(){return this._label};Ul.prototype.setCovered=function(t){this._isCovered=t,this._isCoveredSet=!0};Ul.prototype.updateIM=function(t){lr.isTrue(this._label.getGeometryCount()>=2,"found partial label"),this.computeIM(t)};Ul.prototype.isInResult=function(){return this._isInResult};Ul.prototype.isVisited=function(){return this._isVisited};Ul.prototype.interfaces_=function(){return[]};Ul.prototype.getClass=function(){return Ul};var NI=function(e){function t(){e.call(this),this._coord=null,this._edges=null;var n=arguments[0],r=arguments[1];this._coord=n,this._edges=r,this._label=new Ci(0,Kt.NONE)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.isIncidentEdgeInResult=function(){for(var r=this.getEdges().getEdges().iterator();r.hasNext();){var i=r.next();if(i.getEdge().isInResult())return!0}return!1},t.prototype.isIsolated=function(){return this._label.getGeometryCount()===1},t.prototype.getCoordinate=function(){return this._coord},t.prototype.print=function(r){r.println("node "+this._coord+" lbl: "+this._label)},t.prototype.computeIM=function(r){},t.prototype.computeMergedLocation=function(r,i){var a=Kt.NONE;if(a=this._label.getLocation(i),!r.isNull(i)){var o=r.getLocation(i);a!==Kt.BOUNDARY&&(a=o)}return a},t.prototype.setLabel=function(){if(arguments.length===2){var r=arguments[0],i=arguments[1];this._label===null?this._label=new Ci(r,i):this._label.setLocation(r,i)}else return e.prototype.setLabel.apply(this,arguments)},t.prototype.getEdges=function(){return this._edges},t.prototype.mergeLabel=function(){var r=this;if(arguments[0]instanceof t){var i=arguments[0];this.mergeLabel(i._label)}else if(arguments[0]instanceof Ci)for(var a=arguments[0],o=0;o<2;o++){var u=r.computeMergedLocation(a,o),c=r._label.getLocation(o);c===Kt.NONE&&r._label.setLocation(o,u)}},t.prototype.add=function(r){this._edges.insert(r),r.setNode(this)},t.prototype.setLabelBoundary=function(r){if(this._label===null)return null;var i=Kt.NONE;this._label!==null&&(i=this._label.getLocation(r));var a=null;switch(i){case Kt.BOUNDARY:a=Kt.INTERIOR;break;case Kt.INTERIOR:a=Kt.BOUNDARY;break;default:a=Kt.BOUNDARY;break}this._label.setLocation(r,a)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(Ul),Sh=function(){this.nodeMap=new Ns,this.nodeFact=null;var t=arguments[0];this.nodeFact=t};Sh.prototype.find=function(t){return this.nodeMap.get(t)};Sh.prototype.addNode=function(){if(arguments[0]instanceof Xt){var t=arguments[0],n=this.nodeMap.get(t);return n===null&&(n=this.nodeFact.createNode(t),this.nodeMap.put(t,n)),n}else if(arguments[0]instanceof NI){var r=arguments[0],i=this.nodeMap.get(r.getCoordinate());return i===null?(this.nodeMap.put(r.getCoordinate(),r),r):(i.mergeLabel(r),i)}};Sh.prototype.print=function(t){for(var n=this.iterator();n.hasNext();){var r=n.next();r.print(t)}};Sh.prototype.iterator=function(){return this.nodeMap.values().iterator()};Sh.prototype.values=function(){return this.nodeMap.values()};Sh.prototype.getBoundaryNodes=function(t){for(var n=new Ke,r=this.iterator();r.hasNext();){var i=r.next();i.getLabel().getLocation(t)===Kt.BOUNDARY&&n.add(i)}return n};Sh.prototype.add=function(t){var n=t.getCoordinate(),r=this.addNode(n);r.add(t)};Sh.prototype.interfaces_=function(){return[]};Sh.prototype.getClass=function(){return Sh};var Ni=function(){},gw={NE:{configurable:!0},NW:{configurable:!0},SW:{configurable:!0},SE:{configurable:!0}};Ni.prototype.interfaces_=function(){return[]};Ni.prototype.getClass=function(){return Ni};Ni.isNorthern=function(t){return t===Ni.NE||t===Ni.NW};Ni.isOpposite=function(t,n){if(t===n)return!1;var r=(t-n+4)%4;return r===2};Ni.commonHalfPlane=function(t,n){if(t===n)return t;var r=(t-n+4)%4;if(r===2)return-1;var i=t<n?t:n,a=t>n?t:n;return i===0&&a===3?3:i};Ni.isInHalfPlane=function(t,n){return n===Ni.SE?t===Ni.SE||t===Ni.SW:t===n||t===n+1};Ni.quadrant=function(){if(typeof arguments[0]=="number"&&typeof arguments[1]=="number"){var t=arguments[0],n=arguments[1];if(t===0&&n===0)throw new wo;return t>=0?n>=0?Ni.NE:Ni.SE:n>=0?Ni.NW:Ni.SW}else if(arguments[0]instanceof Xt&&arguments[1]instanceof Xt){var r=arguments[0],i=arguments[1];if(i.x===r.x&&i.y===r.y)throw new wo;return i.x>=r.x?i.y>=r.y?Ni.NE:Ni.SE:i.y>=r.y?Ni.NW:Ni.SW}};gw.NE.get=function(){return 0};gw.NW.get=function(){return 1};gw.SW.get=function(){return 2};gw.SE.get=function(){return 3};Object.defineProperties(Ni,gw);var Fs=function(){if(this._edge=null,this._label=null,this._node=null,this._p0=null,this._p1=null,this._dx=null,this._dy=null,this._quadrant=null,arguments.length===1){var t=arguments[0];this._edge=t}else if(arguments.length===3){var n=arguments[0],r=arguments[1],i=arguments[2],a=null;this._edge=n,this.init(r,i),this._label=a}else if(arguments.length===4){var o=arguments[0],u=arguments[1],c=arguments[2],g=arguments[3];this._edge=o,this.init(u,c),this._label=g}};Fs.prototype.compareDirection=function(t){return this._dx===t._dx&&this._dy===t._dy?0:this._quadrant>t._quadrant?1:this._quadrant<t._quadrant?-1:on.computeOrientation(t._p0,t._p1,this._p1)};Fs.prototype.getDy=function(){return this._dy};Fs.prototype.getCoordinate=function(){return this._p0};Fs.prototype.setNode=function(t){this._node=t};Fs.prototype.print=function(t){var n=Math.atan2(this._dy,this._dx),r=this.getClass().getName(),i=r.lastIndexOf("."),a=r.substring(i+1);t.print(" "+a+": "+this._p0+" - "+this._p1+" "+this._quadrant+":"+n+" "+this._label)};Fs.prototype.compareTo=function(t){var n=t;return this.compareDirection(n)};Fs.prototype.getDirectedCoordinate=function(){return this._p1};Fs.prototype.getDx=function(){return this._dx};Fs.prototype.getLabel=function(){return this._label};Fs.prototype.getEdge=function(){return this._edge};Fs.prototype.getQuadrant=function(){return this._quadrant};Fs.prototype.getNode=function(){return this._node};Fs.prototype.toString=function(){var t=Math.atan2(this._dy,this._dx),n=this.getClass().getName(),r=n.lastIndexOf("."),i=n.substring(r+1);return" "+i+": "+this._p0+" - "+this._p1+" "+this._quadrant+":"+t+" "+this._label};Fs.prototype.computeLabel=function(t){};Fs.prototype.init=function(t,n){this._p0=t,this._p1=n,this._dx=n.x-t.x,this._dy=n.y-t.y,this._quadrant=Ni.quadrant(this._dx,this._dy),lr.isTrue(!(this._dx===0&&this._dy===0),"EdgeEnd with identical endpoints found")};Fs.prototype.interfaces_=function(){return[wc]};Fs.prototype.getClass=function(){return Fs};var QR=function(e){function t(){var n=arguments[0],r=arguments[1];if(e.call(this,n),this._isForward=null,this._isInResult=!1,this._isVisited=!1,this._sym=null,this._next=null,this._nextMin=null,this._edgeRing=null,this._minEdgeRing=null,this._depth=[0,-999,-999],this._isForward=r,r)this.init(n.getCoordinate(0),n.getCoordinate(1));else{var i=n.getNumPoints()-1;this.init(n.getCoordinate(i),n.getCoordinate(i-1))}this.computeDirectedLabel()}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getNextMin=function(){return this._nextMin},t.prototype.getDepth=function(r){return this._depth[r]},t.prototype.setVisited=function(r){this._isVisited=r},t.prototype.computeDirectedLabel=function(){this._label=new Ci(this._edge.getLabel()),this._isForward||this._label.flip()},t.prototype.getNext=function(){return this._next},t.prototype.setDepth=function(r,i){if(this._depth[r]!==-999&&this._depth[r]!==i)throw new fd("assigned depths do not match",this.getCoordinate());this._depth[r]=i},t.prototype.isInteriorAreaEdge=function(){for(var r=this,i=!0,a=0;a<2;a++)r._label.isArea(a)&&r._label.getLocation(a,ke.LEFT)===Kt.INTERIOR&&r._label.getLocation(a,ke.RIGHT)===Kt.INTERIOR||(i=!1);return i},t.prototype.setNextMin=function(r){this._nextMin=r},t.prototype.print=function(r){e.prototype.print.call(this,r),r.print(" "+this._depth[ke.LEFT]+"/"+this._depth[ke.RIGHT]),r.print(" ("+this.getDepthDelta()+")"),this._isInResult&&r.print(" inResult")},t.prototype.setMinEdgeRing=function(r){this._minEdgeRing=r},t.prototype.isLineEdge=function(){var r=this._label.isLine(0)||this._label.isLine(1),i=!this._label.isArea(0)||this._label.allPositionsEqual(0,Kt.EXTERIOR),a=!this._label.isArea(1)||this._label.allPositionsEqual(1,Kt.EXTERIOR);return r&&i&&a},t.prototype.setEdgeRing=function(r){this._edgeRing=r},t.prototype.getMinEdgeRing=function(){return this._minEdgeRing},t.prototype.getDepthDelta=function(){var r=this._edge.getDepthDelta();return this._isForward||(r=-r),r},t.prototype.setInResult=function(r){this._isInResult=r},t.prototype.getSym=function(){return this._sym},t.prototype.isForward=function(){return this._isForward},t.prototype.getEdge=function(){return this._edge},t.prototype.printEdge=function(r){this.print(r),r.print(" "),this._isForward?this._edge.print(r):this._edge.printReverse(r)},t.prototype.setSym=function(r){this._sym=r},t.prototype.setVisitedEdge=function(r){this.setVisited(r),this._sym.setVisited(r)},t.prototype.setEdgeDepths=function(r,i){var a=this.getEdge().getDepthDelta();this._isForward||(a=-a);var o=1;r===ke.LEFT&&(o=-1);var u=ke.opposite(r),c=a*o,g=i+c;this.setDepth(r,i),this.setDepth(u,g)},t.prototype.getEdgeRing=function(){return this._edgeRing},t.prototype.isInResult=function(){return this._isInResult},t.prototype.setNext=function(r){this._next=r},t.prototype.isVisited=function(){return this._isVisited},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t.depthFactor=function(r,i){return r===Kt.EXTERIOR&&i===Kt.INTERIOR?1:r===Kt.INTERIOR&&i===Kt.EXTERIOR?-1:0},t}(Fs),ux=function(){};ux.prototype.createNode=function(t){return new NI(t,null)};ux.prototype.interfaces_=function(){return[]};ux.prototype.getClass=function(){return ux};var Po=function(){if(this._edges=new Ke,this._nodes=null,this._edgeEndList=new Ke,arguments.length===0)this._nodes=new Sh(new ux);else if(arguments.length===1){var t=arguments[0];this._nodes=new Sh(t)}};Po.prototype.printEdges=function(t){var n=this;t.println("Edges:");for(var r=0;r<this._edges.size();r++){t.println("edge "+r+":");var i=n._edges.get(r);i.print(t),i.eiList.print(t)}};Po.prototype.find=function(t){return this._nodes.find(t)};Po.prototype.addNode=function(){if(arguments[0]instanceof NI){var t=arguments[0];return this._nodes.addNode(t)}else if(arguments[0]instanceof Xt){var n=arguments[0];return this._nodes.addNode(n)}};Po.prototype.getNodeIterator=function(){return this._nodes.iterator()};Po.prototype.linkResultDirectedEdges=function(){for(var t=this._nodes.iterator();t.hasNext();){var n=t.next();n.getEdges().linkResultDirectedEdges()}};Po.prototype.debugPrintln=function(t){xs.out.println(t)};Po.prototype.isBoundaryNode=function(t,n){var r=this._nodes.find(n);if(r===null)return!1;var i=r.getLabel();return i!==null&&i.getLocation(t)===Kt.BOUNDARY};Po.prototype.linkAllDirectedEdges=function(){for(var t=this._nodes.iterator();t.hasNext();){var n=t.next();n.getEdges().linkAllDirectedEdges()}};Po.prototype.matchInSameDirection=function(t,n,r,i){return t.equals(r)?on.computeOrientation(t,n,i)===on.COLLINEAR&&Ni.quadrant(t,n)===Ni.quadrant(r,i):!1};Po.prototype.getEdgeEnds=function(){return this._edgeEndList};Po.prototype.debugPrint=function(t){xs.out.print(t)};Po.prototype.getEdgeIterator=function(){return this._edges.iterator()};Po.prototype.findEdgeInSameDirection=function(t,n){for(var r=this,i=0;i<this._edges.size();i++){var a=r._edges.get(i),o=a.getCoordinates();if(r.matchInSameDirection(t,n,o[0],o[1])||r.matchInSameDirection(t,n,o[o.length-1],o[o.length-2]))return a}return null};Po.prototype.insertEdge=function(t){this._edges.add(t)};Po.prototype.findEdgeEnd=function(t){for(var n=this.getEdgeEnds().iterator();n.hasNext();){var r=n.next();if(r.getEdge()===t)return r}return null};Po.prototype.addEdges=function(t){for(var n=this,r=t.iterator();r.hasNext();){var i=r.next();n._edges.add(i);var a=new QR(i,!0),o=new QR(i,!1);a.setSym(o),o.setSym(a),n.add(a),n.add(o)}};Po.prototype.add=function(t){this._nodes.add(t),this._edgeEndList.add(t)};Po.prototype.getNodes=function(){return this._nodes.values()};Po.prototype.findEdge=function(t,n){for(var r=this,i=0;i<this._edges.size();i++){var a=r._edges.get(i),o=a.getCoordinates();if(t.equals(o[0])&&n.equals(o[1]))return a}return null};Po.prototype.interfaces_=function(){return[]};Po.prototype.getClass=function(){return Po};Po.linkResultDirectedEdges=function(t){for(var n=t.iterator();n.hasNext();){var r=n.next();r.getEdges().linkResultDirectedEdges()}};var dl=function(){this._geometryFactory=null,this._shellList=new Ke;var t=arguments[0];this._geometryFactory=t};dl.prototype.sortShellsAndHoles=function(t,n,r){for(var i=t.iterator();i.hasNext();){var a=i.next();a.isHole()?r.add(a):n.add(a)}};dl.prototype.computePolygons=function(t){for(var n=this,r=new Ke,i=t.iterator();i.hasNext();){var a=i.next(),o=a.toPolygon(n._geometryFactory);r.add(o)}return r};dl.prototype.placeFreeHoles=function(t,n){for(var r=this,i=n.iterator();i.hasNext();){var a=i.next();if(a.getShell()===null){var o=r.findEdgeRingContaining(a,t);if(o===null)throw new fd("unable to assign hole to a shell",a.getCoordinate(0));a.setShell(o)}}};dl.prototype.buildMinimalEdgeRings=function(t,n,r){for(var i=this,a=new Ke,o=t.iterator();o.hasNext();){var u=o.next();if(u.getMaxNodeDegree()>2){u.linkDirectedEdgesForMinimalEdgeRings();var c=u.buildMinimalRings(),g=i.findShell(c);g!==null?(i.placePolygonHoles(g,c),n.add(g)):r.addAll(c)}else a.add(u)}return a};dl.prototype.containsPoint=function(t){for(var n=this._shellList.iterator();n.hasNext();){var r=n.next();if(r.containsPoint(t))return!0}return!1};dl.prototype.buildMaximalEdgeRings=function(t){for(var n=this,r=new Ke,i=t.iterator();i.hasNext();){var a=i.next();if(a.isInResult()&&a.getLabel().isArea()&&a.getEdgeRing()===null){var o=new Nxt(a,n._geometryFactory);r.add(o),o.setInResult()}}return r};dl.prototype.placePolygonHoles=function(t,n){for(var r=n.iterator();r.hasNext();){var i=r.next();i.isHole()&&i.setShell(t)}};dl.prototype.getPolygons=function(){var t=this.computePolygons(this._shellList);return t};dl.prototype.findEdgeRingContaining=function(t,n){for(var r=t.getLinearRing(),i=r.getEnvelopeInternal(),a=r.getCoordinateN(0),o=null,u=null,c=n.iterator();c.hasNext();){var g=c.next(),_=g.getLinearRing(),E=_.getEnvelopeInternal();o!==null&&(u=o.getLinearRing().getEnvelopeInternal());var C=!1;E.contains(i)&&on.isPointInRing(a,_.getCoordinates())&&(C=!0),C&&(o===null||u.contains(E))&&(o=g)}return o};dl.prototype.findShell=function(t){for(var n=0,r=null,i=t.iterator();i.hasNext();){var a=i.next();a.isHole()||(r=a,n++)}return lr.isTrue(n<=1,"found two shells in MinimalEdgeRing list"),r};dl.prototype.add=function(){if(arguments.length===1){var t=arguments[0];this.add(t.getEdgeEnds(),t.getNodes())}else if(arguments.length===2){var n=arguments[0],r=arguments[1];Po.linkResultDirectedEdges(r);var i=this.buildMaximalEdgeRings(n),a=new Ke,o=this.buildMinimalEdgeRings(i,this._shellList,a);this.sortShellsAndHoles(o,this._shellList,a),this.placeFreeHoles(this._shellList,a)}};dl.prototype.interfaces_=function(){return[]};dl.prototype.getClass=function(){return dl};var lx=function(){};lx.prototype.getBounds=function(){};lx.prototype.interfaces_=function(){return[]};lx.prototype.getClass=function(){return lx};var bf=function(){this._bounds=null,this._item=null;var t=arguments[0],n=arguments[1];this._bounds=t,this._item=n};bf.prototype.getItem=function(){return this._item};bf.prototype.getBounds=function(){return this._bounds};bf.prototype.interfaces_=function(){return[lx,Sc]};bf.prototype.getClass=function(){return bf};var hd=function(){this._size=null,this._items=null,this._size=0,this._items=new Ke,this._items.add(null)};hd.prototype.poll=function(){if(this.isEmpty())return null;var t=this._items.get(1);return this._items.set(1,this._items.get(this._size)),this._size-=1,this.reorder(1),t};hd.prototype.size=function(){return this._size};hd.prototype.reorder=function(t){for(var n=this,r=null,i=this._items.get(t);t*2<=this._size&&(r=t*2,r!==n._size&&n._items.get(r+1).compareTo(n._items.get(r))<0&&r++,n._items.get(r).compareTo(i)<0);t=r)n._items.set(t,n._items.get(r));this._items.set(t,i)};hd.prototype.clear=function(){this._size=0,this._items.clear()};hd.prototype.isEmpty=function(){return this._size===0};hd.prototype.add=function(t){var n=this;this._items.add(null),this._size+=1;var r=this._size;for(this._items.set(0,t);t.compareTo(this._items.get(Math.trunc(r/2)))<0;r/=2)n._items.set(r,n._items.get(Math.trunc(r/2)));this._items.set(r,t)};hd.prototype.interfaces_=function(){return[]};hd.prototype.getClass=function(){return hd};var gg=function(){};gg.prototype.visitItem=function(t){};gg.prototype.interfaces_=function(){return[]};gg.prototype.getClass=function(){return gg};var by=function(){};by.prototype.insert=function(t,n){};by.prototype.remove=function(t,n){};by.prototype.query=function(){};by.prototype.interfaces_=function(){return[]};by.prototype.getClass=function(){return by};var Na=function(){if(this._childBoundables=new Ke,this._bounds=null,this._level=null,arguments.length!==0){if(arguments.length===1){var t=arguments[0];this._level=t}}},O8={serialVersionUID:{configurable:!0}};Na.prototype.getLevel=function(){return this._level};Na.prototype.size=function(){return this._childBoundables.size()};Na.prototype.getChildBoundables=function(){return this._childBoundables};Na.prototype.addChildBoundable=function(t){lr.isTrue(this._bounds===null),this._childBoundables.add(t)};Na.prototype.isEmpty=function(){return this._childBoundables.isEmpty()};Na.prototype.getBounds=function(){return this._bounds===null&&(this._bounds=this.computeBounds()),this._bounds};Na.prototype.interfaces_=function(){return[lx,Sc]};Na.prototype.getClass=function(){return Na};O8.serialVersionUID.get=function(){return 6493722185909574e3};Object.defineProperties(Na,O8);var wf=function(){};wf.reverseOrder=function(){return{compare:function(n,r){return r.compareTo(n)}}};wf.min=function(t){return wf.sort(t),t.get(0)};wf.sort=function(t,n){var r=t.toArray();n?qm.sort(r,n):qm.sort(r);for(var i=t.iterator(),a=0,o=r.length;a<o;a++)i.next(),i.set(r[a])};wf.singletonList=function(t){var n=new Ke;return n.add(t),n};var va=function(){this._boundable1=null,this._boundable2=null,this._distance=null,this._itemDistance=null;var t=arguments[0],n=arguments[1],r=arguments[2];this._boundable1=t,this._boundable2=n,this._itemDistance=r,this._distance=this.distance()};va.prototype.expandToQueue=function(t,n){var r=va.isComposite(this._boundable1),i=va.isComposite(this._boundable2);if(r&&i)return va.area(this._boundable1)>va.area(this._boundable2)?(this.expand(this._boundable1,this._boundable2,t,n),null):(this.expand(this._boundable2,this._boundable1,t,n),null);if(r)return this.expand(this._boundable1,this._boundable2,t,n),null;if(i)return this.expand(this._boundable2,this._boundable1,t,n),null;throw new wo};va.prototype.isLeaves=function(){return!(va.isComposite(this._boundable1)||va.isComposite(this._boundable2))};va.prototype.compareTo=function(t){var n=t;return this._distance<n._distance?-1:this._distance>n._distance?1:0};va.prototype.expand=function(t,n,r,i){for(var a=this,o=t.getChildBoundables(),u=o.iterator();u.hasNext();){var c=u.next(),g=new va(c,n,a._itemDistance);g.getDistance()<i&&r.add(g)}};va.prototype.getBoundable=function(t){return t===0?this._boundable1:this._boundable2};va.prototype.getDistance=function(){return this._distance};va.prototype.distance=function(){return this.isLeaves()?this._itemDistance.distance(this._boundable1,this._boundable2):this._boundable1.getBounds().distance(this._boundable2.getBounds())};va.prototype.interfaces_=function(){return[wc]};va.prototype.getClass=function(){return va};va.area=function(t){return t.getBounds().getArea()};va.isComposite=function(t){return t instanceof Na};var is=function e(){if(this._root=null,this._built=!1,this._itemBoundables=new Ke,this._nodeCapacity=null,arguments.length===0){var t=e.DEFAULT_NODE_CAPACITY;this._nodeCapacity=t}else if(arguments.length===1){var n=arguments[0];lr.isTrue(n>1,"Node capacity must be greater than 1"),this._nodeCapacity=n}},FI={IntersectsOp:{configurable:!0},serialVersionUID:{configurable:!0},DEFAULT_NODE_CAPACITY:{configurable:!0}};is.prototype.getNodeCapacity=function(){return this._nodeCapacity};is.prototype.lastNode=function(t){return t.get(t.size()-1)};is.prototype.size=function(){var t=this;if(arguments.length===0)return this.isEmpty()?0:(this.build(),this.size(this._root));if(arguments.length===1){for(var n=arguments[0],r=0,i=n.getChildBoundables().iterator();i.hasNext();){var a=i.next();a instanceof Na?r+=t.size(a):a instanceof bf&&(r+=1)}return r}};is.prototype.removeItem=function(t,n){for(var r=null,i=t.getChildBoundables().iterator();i.hasNext();){var a=i.next();a instanceof bf&&a.getItem()===n&&(r=a)}return r!==null?(t.getChildBoundables().remove(r),!0):!1};is.prototype.itemsTree=function(){var t=this;if(arguments.length===0){this.build();var n=this.itemsTree(this._root);return n===null?new Ke:n}else if(arguments.length===1){for(var r=arguments[0],i=new Ke,a=r.getChildBoundables().iterator();a.hasNext();){var o=a.next();if(o instanceof Na){var u=t.itemsTree(o);u!==null&&i.add(u)}else o instanceof bf?i.add(o.getItem()):lr.shouldNeverReachHere()}return i.size()<=0?null:i}};is.prototype.insert=function(t,n){lr.isTrue(!this._built,"Cannot insert items into an STR packed R-tree after it has been built."),this._itemBoundables.add(new bf(t,n))};is.prototype.boundablesAtLevel=function(){var t=this;if(arguments.length===1){var n=arguments[0],r=new Ke;return this.boundablesAtLevel(n,this._root,r),r}else if(arguments.length===3){var i=arguments[0],a=arguments[1],o=arguments[2];if(lr.isTrue(i>-2),a.getLevel()===i)return o.add(a),null;for(var u=a.getChildBoundables().iterator();u.hasNext();){var c=u.next();c instanceof Na?t.boundablesAtLevel(i,c,o):(lr.isTrue(c instanceof bf),i===-1&&o.add(c))}return null}};is.prototype.query=function(){var t=this;if(arguments.length===1){var n=arguments[0];this.build();var r=new Ke;return this.isEmpty()||this.getIntersectsOp().intersects(this._root.getBounds(),n)&&this.query(n,this._root,r),r}else if(arguments.length===2){var i=arguments[0],a=arguments[1];if(this.build(),this.isEmpty())return null;this.getIntersectsOp().intersects(this._root.getBounds(),i)&&this.query(i,this._root,a)}else if(arguments.length===3){if($n(arguments[2],gg)&&arguments[0]instanceof Object&&arguments[1]instanceof Na)for(var o=arguments[0],u=arguments[1],c=arguments[2],g=u.getChildBoundables(),_=0;_<g.size();_++){var E=g.get(_);!t.getIntersectsOp().intersects(E.getBounds(),o)||(E instanceof Na?t.query(o,E,c):E instanceof bf?c.visitItem(E.getItem()):lr.shouldNeverReachHere())}else if($n(arguments[2],yf)&&arguments[0]instanceof Object&&arguments[1]instanceof Na)for(var C=arguments[0],O=arguments[1],R=arguments[2],D=O.getChildBoundables(),B=0;B<D.size();B++){var z=D.get(B);!t.getIntersectsOp().intersects(z.getBounds(),C)||(z instanceof Na?t.query(C,z,R):z instanceof bf?R.add(z.getItem()):lr.shouldNeverReachHere())}}};is.prototype.build=function(){if(this._built)return null;this._root=this._itemBoundables.isEmpty()?this.createNode(0):this.createHigherLevels(this._itemBoundables,-1),this._itemBoundables=null,this._built=!0};is.prototype.getRoot=function(){return this.build(),this._root};is.prototype.remove=function(){var t=this;if(arguments.length===2){var n=arguments[0],r=arguments[1];return this.build(),this.getIntersectsOp().intersects(this._root.getBounds(),n)?this.remove(n,this._root,r):!1}else if(arguments.length===3){var i=arguments[0],a=arguments[1],o=arguments[2],u=this.removeItem(a,o);if(u)return!0;for(var c=null,g=a.getChildBoundables().iterator();g.hasNext();){var _=g.next();if(!!t.getIntersectsOp().intersects(_.getBounds(),i)&&_ instanceof Na&&(u=t.remove(i,_,o),u)){c=_;break}}return c!==null&&c.getChildBoundables().isEmpty()&&a.getChildBoundables().remove(c),u}};is.prototype.createHigherLevels=function(t,n){lr.isTrue(!t.isEmpty());var r=this.createParentBoundables(t,n+1);return r.size()===1?r.get(0):this.createHigherLevels(r,n+1)};is.prototype.depth=function(){var t=this;if(arguments.length===0)return this.isEmpty()?0:(this.build(),this.depth(this._root));if(arguments.length===1){for(var n=arguments[0],r=0,i=n.getChildBoundables().iterator();i.hasNext();){var a=i.next();if(a instanceof Na){var o=t.depth(a);o>r&&(r=o)}}return r+1}};is.prototype.createParentBoundables=function(t,n){var r=this;lr.isTrue(!t.isEmpty());var i=new Ke;i.add(this.createNode(n));var a=new Ke(t);wf.sort(a,this.getComparator());for(var o=a.iterator();o.hasNext();){var u=o.next();r.lastNode(i).getChildBoundables().size()===r.getNodeCapacity()&&i.add(r.createNode(n)),r.lastNode(i).addChildBoundable(u)}return i};is.prototype.isEmpty=function(){return this._built?this._root.isEmpty():this._itemBoundables.isEmpty()};is.prototype.interfaces_=function(){return[Sc]};is.prototype.getClass=function(){return is};is.compareDoubles=function(t,n){return t>n?1:t<n?-1:0};FI.IntersectsOp.get=function(){return Fxt};FI.serialVersionUID.get=function(){return-3886435814360241e3};FI.DEFAULT_NODE_CAPACITY.get=function(){return 10};Object.defineProperties(is,FI);var Fxt=function(){},cx=function(){};cx.prototype.distance=function(t,n){};cx.prototype.interfaces_=function(){return[]};cx.prototype.getClass=function(){return cx};var R8=function(e){function t(r){r=r||t.DEFAULT_NODE_CAPACITY,e.call(this,r)}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={STRtreeNode:{configurable:!0},serialVersionUID:{configurable:!0},xComparator:{configurable:!0},yComparator:{configurable:!0},intersectsOp:{configurable:!0},DEFAULT_NODE_CAPACITY:{configurable:!0}};return t.prototype.createParentBoundablesFromVerticalSlices=function(i,a){var o=this;lr.isTrue(i.length>0);for(var u=new Ke,c=0;c<i.length;c++)u.addAll(o.createParentBoundablesFromVerticalSlice(i[c],a));return u},t.prototype.createNode=function(i){return new k8(i)},t.prototype.size=function(){return arguments.length===0?e.prototype.size.call(this):e.prototype.size.apply(this,arguments)},t.prototype.insert=function(){if(arguments.length===2){var i=arguments[0],a=arguments[1];if(i.isNull())return null;e.prototype.insert.call(this,i,a)}else return e.prototype.insert.apply(this,arguments)},t.prototype.getIntersectsOp=function(){return t.intersectsOp},t.prototype.verticalSlices=function(i,a){for(var o=Math.trunc(Math.ceil(i.size()/a)),u=new Array(a).fill(null),c=i.iterator(),g=0;g<a;g++){u[g]=new Ke;for(var _=0;c.hasNext()&&_<o;){var E=c.next();u[g].add(E),_++}}return u},t.prototype.query=function(){if(arguments.length===1){var i=arguments[0];return e.prototype.query.call(this,i)}else if(arguments.length===2){var a=arguments[0],o=arguments[1];e.prototype.query.call(this,a,o)}else if(arguments.length===3){if($n(arguments[2],gg)&&arguments[0]instanceof Object&&arguments[1]instanceof Na){var u=arguments[0],c=arguments[1],g=arguments[2];e.prototype.query.call(this,u,c,g)}else if($n(arguments[2],yf)&&arguments[0]instanceof Object&&arguments[1]instanceof Na){var _=arguments[0],E=arguments[1],C=arguments[2];e.prototype.query.call(this,_,E,C)}}},t.prototype.getComparator=function(){return t.yComparator},t.prototype.createParentBoundablesFromVerticalSlice=function(i,a){return e.prototype.createParentBoundables.call(this,i,a)},t.prototype.remove=function(){if(arguments.length===2){var i=arguments[0],a=arguments[1];return e.prototype.remove.call(this,i,a)}else return e.prototype.remove.apply(this,arguments)},t.prototype.depth=function(){return arguments.length===0?e.prototype.depth.call(this):e.prototype.depth.apply(this,arguments)},t.prototype.createParentBoundables=function(i,a){lr.isTrue(!i.isEmpty());var o=Math.trunc(Math.ceil(i.size()/this.getNodeCapacity())),u=new Ke(i);wf.sort(u,t.xComparator);var c=this.verticalSlices(u,Math.trunc(Math.ceil(Math.sqrt(o))));return this.createParentBoundablesFromVerticalSlices(c,a)},t.prototype.nearestNeighbour=function(){if(arguments.length===1){if($n(arguments[0],cx)){var i=arguments[0],a=new va(this.getRoot(),this.getRoot(),i);return this.nearestNeighbour(a)}else if(arguments[0]instanceof va){var o=arguments[0];return this.nearestNeighbour(o,Kn.POSITIVE_INFINITY)}}else if(arguments.length===2){if(arguments[0]instanceof t&&$n(arguments[1],cx)){var u=arguments[0],c=arguments[1],g=new va(this.getRoot(),u.getRoot(),c);return this.nearestNeighbour(g)}else if(arguments[0]instanceof va&&typeof arguments[1]=="number"){var _=arguments[0],E=arguments[1],C=E,O=null,R=new hd;for(R.add(_);!R.isEmpty()&&C>0;){var D=R.poll(),B=D.getDistance();if(B>=C)break;D.isLeaves()?(C=B,O=D):D.expandToQueue(R,C)}return[O.getBoundable(0).getItem(),O.getBoundable(1).getItem()]}}else if(arguments.length===3){var z=arguments[0],k=arguments[1],$=arguments[2],K=new bf(z,k),et=new va(this.getRoot(),K,$);return this.nearestNeighbour(et)[0]}},t.prototype.interfaces_=function(){return[by,Sc]},t.prototype.getClass=function(){return t},t.centreX=function(i){return t.avg(i.getMinX(),i.getMaxX())},t.avg=function(i,a){return(i+a)/2},t.centreY=function(i){return t.avg(i.getMinY(),i.getMaxY())},n.STRtreeNode.get=function(){return k8},n.serialVersionUID.get=function(){return 259274702368956900},n.xComparator.get=function(){return{interfaces_:function(){return[Z0]},compare:function(r,i){return e.compareDoubles(t.centreX(r.getBounds()),t.centreX(i.getBounds()))}}},n.yComparator.get=function(){return{interfaces_:function(){return[Z0]},compare:function(r,i){return e.compareDoubles(t.centreY(r.getBounds()),t.centreY(i.getBounds()))}}},n.intersectsOp.get=function(){return{interfaces_:function(){return[e.IntersectsOp]},intersects:function(r,i){return r.intersects(i)}}},n.DEFAULT_NODE_CAPACITY.get=function(){return 10},Object.defineProperties(t,n),t}(is),k8=function(e){function t(){var n=arguments[0];e.call(this,n)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.computeBounds=function(){for(var r=null,i=this.getChildBoundables().iterator();i.hasNext();){var a=i.next();r===null?r=new In(a.getBounds()):r.expandToInclude(a.getBounds())}return r},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(Na),ku=function(){};ku.prototype.interfaces_=function(){return[]};ku.prototype.getClass=function(){return ku};ku.relativeSign=function(t,n){return t<n?-1:t>n?1:0};ku.compare=function(t,n,r){if(n.equals2D(r))return 0;var i=ku.relativeSign(n.x,r.x),a=ku.relativeSign(n.y,r.y);switch(t){case 0:return ku.compareValue(i,a);case 1:return ku.compareValue(a,i);case 2:return ku.compareValue(a,-i);case 3:return ku.compareValue(-i,a);case 4:return ku.compareValue(-i,-a);case 5:return ku.compareValue(-a,-i);case 6:return ku.compareValue(-a,i);case 7:return ku.compareValue(i,-a)}return lr.shouldNeverReachHere("invalid octant value"),0};ku.compareValue=function(t,n){return t<0?-1:t>0?1:n<0?-1:n>0?1:0};var mg=function(){this._segString=null,this.coord=null,this.segmentIndex=null,this._segmentOctant=null,this._isInterior=null;var t=arguments[0],n=arguments[1],r=arguments[2],i=arguments[3];this._segString=t,this.coord=new Xt(n),this.segmentIndex=r,this._segmentOctant=i,this._isInterior=!n.equals2D(t.getCoordinate(r))};mg.prototype.getCoordinate=function(){return this.coord};mg.prototype.print=function(t){t.print(this.coord),t.print(" seg # = "+this.segmentIndex)};mg.prototype.compareTo=function(t){var n=t;return this.segmentIndex<n.segmentIndex?-1:this.segmentIndex>n.segmentIndex?1:this.coord.equals2D(n.coord)?0:ku.compare(this._segmentOctant,this.coord,n.coord)};mg.prototype.isEndPoint=function(t){return this.segmentIndex===0&&!this._isInterior||this.segmentIndex===t};mg.prototype.isInterior=function(){return this._isInterior};mg.prototype.interfaces_=function(){return[wc]};mg.prototype.getClass=function(){return mg};var cu=function(){this._nodeMap=new Ns,this._edge=null;var t=arguments[0];this._edge=t};cu.prototype.getSplitCoordinates=function(){var t=this,n=new sw;this.addEndpoints();for(var r=this.iterator(),i=r.next();r.hasNext();){var a=r.next();t.addEdgeCoordinates(i,a,n),i=a}return n.toCoordinateArray()};cu.prototype.addCollapsedNodes=function(){var t=this,n=new Ke;this.findCollapsesFromInsertedNodes(n),this.findCollapsesFromExistingVertices(n);for(var r=n.iterator();r.hasNext();){var i=r.next().intValue();t.add(t._edge.getCoordinate(i),i)}};cu.prototype.print=function(t){t.println("Intersections:");for(var n=this.iterator();n.hasNext();){var r=n.next();r.print(t)}};cu.prototype.findCollapsesFromExistingVertices=function(t){for(var n=this,r=0;r<this._edge.size()-2;r++){var i=n._edge.getCoordinate(r),a=n._edge.getCoordinate(r+2);i.equals2D(a)&&t.add(new gh(r+1))}};cu.prototype.addEdgeCoordinates=function(t,n,r){var i=this,a=this._edge.getCoordinate(n.segmentIndex),o=n.isInterior()||!n.coord.equals2D(a);r.add(new Xt(t.coord),!1);for(var u=t.segmentIndex+1;u<=n.segmentIndex;u++)r.add(i._edge.getCoordinate(u));o&&r.add(new Xt(n.coord))};cu.prototype.iterator=function(){return this._nodeMap.values().iterator()};cu.prototype.addSplitEdges=function(t){var n=this;this.addEndpoints(),this.addCollapsedNodes();for(var r=this.iterator(),i=r.next();r.hasNext();){var a=r.next(),o=n.createSplitEdge(i,a);t.add(o),i=a}};cu.prototype.findCollapseIndex=function(t,n,r){if(!t.coord.equals2D(n.coord))return!1;var i=n.segmentIndex-t.segmentIndex;return n.isInterior()||i--,i===1?(r[0]=t.segmentIndex+1,!0):!1};cu.prototype.findCollapsesFromInsertedNodes=function(t){for(var n=this,r=new Array(1).fill(null),i=this.iterator(),a=i.next();i.hasNext();){var o=i.next(),u=n.findCollapseIndex(a,o,r);u&&t.add(new gh(r[0])),a=o}};cu.prototype.getEdge=function(){return this._edge};cu.prototype.addEndpoints=function(){var t=this._edge.size()-1;this.add(this._edge.getCoordinate(0),0),this.add(this._edge.getCoordinate(t),t)};cu.prototype.createSplitEdge=function(t,n){var r=this,i=n.segmentIndex-t.segmentIndex+2,a=this._edge.getCoordinate(n.segmentIndex),o=n.isInterior()||!n.coord.equals2D(a);o||i--;var u=new Array(i).fill(null),c=0;u[c++]=new Xt(t.coord);for(var g=t.segmentIndex+1;g<=n.segmentIndex;g++)u[c++]=r._edge.getCoordinate(g);return o&&(u[c]=new Xt(n.coord)),new ia(u,this._edge.getData())};cu.prototype.add=function(t,n){var r=new mg(this._edge,t,n,this._edge.getSegmentOctant(n)),i=this._nodeMap.get(r);return i!==null?(lr.isTrue(i.coord.equals2D(t),"Found equal nodes with different coordinates"),i):(this._nodeMap.put(r,r),r)};cu.prototype.checkSplitEdgesCorrectness=function(t){var n=this._edge.getCoordinates(),r=t.get(0),i=r.getCoordinate(0);if(!i.equals2D(n[0]))throw new ad("bad split edge start point at "+i);var a=t.get(t.size()-1),o=a.getCoordinates(),u=o[o.length-1];if(!u.equals2D(n[n.length-1]))throw new ad("bad split edge end point at "+u)};cu.prototype.interfaces_=function(){return[]};cu.prototype.getClass=function(){return cu};var wy=function(){};wy.prototype.interfaces_=function(){return[]};wy.prototype.getClass=function(){return wy};wy.octant=function(){if(typeof arguments[0]=="number"&&typeof arguments[1]=="number"){var t=arguments[0],n=arguments[1];if(t===0&&n===0)throw new wo;var r=Math.abs(t),i=Math.abs(n);return t>=0?n>=0?r>=i?0:1:r>=i?7:6:n>=0?r>=i?3:2:r>=i?4:5}else if(arguments[0]instanceof Xt&&arguments[1]instanceof Xt){var a=arguments[0],o=arguments[1],u=o.x-a.x,c=o.y-a.y;if(u===0&&c===0)throw new wo;return wy.octant(u,c)}};var wp=function(){};wp.prototype.getCoordinates=function(){};wp.prototype.size=function(){};wp.prototype.getCoordinate=function(t){};wp.prototype.isClosed=function(){};wp.prototype.setData=function(t){};wp.prototype.getData=function(){};wp.prototype.interfaces_=function(){return[]};wp.prototype.getClass=function(){return wp};var mw=function(){};mw.prototype.addIntersection=function(t,n){};mw.prototype.interfaces_=function(){return[wp]};mw.prototype.getClass=function(){return mw};var ia=function(){this._nodeList=new cu(this),this._pts=null,this._data=null;var t=arguments[0],n=arguments[1];this._pts=t,this._data=n};ia.prototype.getCoordinates=function(){return this._pts};ia.prototype.size=function(){return this._pts.length};ia.prototype.getCoordinate=function(t){return this._pts[t]};ia.prototype.isClosed=function(){return this._pts[0].equals(this._pts[this._pts.length-1])};ia.prototype.getSegmentOctant=function(t){return t===this._pts.length-1?-1:this.safeOctant(this.getCoordinate(t),this.getCoordinate(t+1))};ia.prototype.setData=function(t){this._data=t};ia.prototype.safeOctant=function(t,n){return t.equals2D(n)?0:wy.octant(t,n)};ia.prototype.getData=function(){return this._data};ia.prototype.addIntersection=function(){if(arguments.length===2){var t=arguments[0],n=arguments[1];this.addIntersectionNode(t,n)}else if(arguments.length===4){var r=arguments[0],i=arguments[1],a=arguments[3],o=new Xt(r.getIntersection(a));this.addIntersection(o,i)}};ia.prototype.toString=function(){return vf.toLineString(new ra(this._pts))};ia.prototype.getNodeList=function(){return this._nodeList};ia.prototype.addIntersectionNode=function(t,n){var r=n,i=r+1;if(i<this._pts.length){var a=this._pts[i];t.equals2D(a)&&(r=i)}var o=this._nodeList.add(t,r);return o};ia.prototype.addIntersections=function(t,n,r){for(var i=this,a=0;a<t.getIntersectionNum();a++)i.addIntersection(t,n,r,a)};ia.prototype.interfaces_=function(){return[mw]};ia.prototype.getClass=function(){return ia};ia.getNodedSubstrings=function(){if(arguments.length===1){var t=arguments[0],n=new Ke;return ia.getNodedSubstrings(t,n),n}else if(arguments.length===2)for(var r=arguments[0],i=arguments[1],a=r.iterator();a.hasNext();){var o=a.next();o.getNodeList().addSplitEdges(i)}};var Tn=function(){if(this.p0=null,this.p1=null,arguments.length===0)this.p0=new Xt,this.p1=new Xt;else if(arguments.length===1){var t=arguments[0];this.p0=new Xt(t.p0),this.p1=new Xt(t.p1)}else if(arguments.length===2)this.p0=arguments[0],this.p1=arguments[1];else if(arguments.length===4){var n=arguments[0],r=arguments[1],i=arguments[2],a=arguments[3];this.p0=new Xt(n,r),this.p1=new Xt(i,a)}},D8={serialVersionUID:{configurable:!0}};Tn.prototype.minX=function(){return Math.min(this.p0.x,this.p1.x)};Tn.prototype.orientationIndex=function(){if(arguments[0]instanceof Tn){var t=arguments[0],n=on.orientationIndex(this.p0,this.p1,t.p0),r=on.orientationIndex(this.p0,this.p1,t.p1);return n>=0&&r>=0||n<=0&&r<=0?Math.max(n,r):0}else if(arguments[0]instanceof Xt){var i=arguments[0];return on.orientationIndex(this.p0,this.p1,i)}};Tn.prototype.toGeometry=function(t){return t.createLineString([this.p0,this.p1])};Tn.prototype.isVertical=function(){return this.p0.x===this.p1.x};Tn.prototype.equals=function(t){if(!(t instanceof Tn))return!1;var n=t;return this.p0.equals(n.p0)&&this.p1.equals(n.p1)};Tn.prototype.intersection=function(t){var n=new $m;return n.computeIntersection(this.p0,this.p1,t.p0,t.p1),n.hasIntersection()?n.getIntersection(0):null};Tn.prototype.project=function(){if(arguments[0]instanceof Xt){var t=arguments[0];if(t.equals(this.p0)||t.equals(this.p1))return new Xt(t);var n=this.projectionFactor(t),r=new Xt;return r.x=this.p0.x+n*(this.p1.x-this.p0.x),r.y=this.p0.y+n*(this.p1.y-this.p0.y),r}else if(arguments[0]instanceof Tn){var i=arguments[0],a=this.projectionFactor(i.p0),o=this.projectionFactor(i.p1);if(a>=1&&o>=1||a<=0&&o<=0)return null;var u=this.project(i.p0);a<0&&(u=this.p0),a>1&&(u=this.p1);var c=this.project(i.p1);return o<0&&(c=this.p0),o>1&&(c=this.p1),new Tn(u,c)}};Tn.prototype.normalize=function(){this.p1.compareTo(this.p0)<0&&this.reverse()};Tn.prototype.angle=function(){return Math.atan2(this.p1.y-this.p0.y,this.p1.x-this.p0.x)};Tn.prototype.getCoordinate=function(t){return t===0?this.p0:this.p1};Tn.prototype.distancePerpendicular=function(t){return on.distancePointLinePerpendicular(t,this.p0,this.p1)};Tn.prototype.minY=function(){return Math.min(this.p0.y,this.p1.y)};Tn.prototype.midPoint=function(){return Tn.midPoint(this.p0,this.p1)};Tn.prototype.projectionFactor=function(t){if(t.equals(this.p0))return 0;if(t.equals(this.p1))return 1;var n=this.p1.x-this.p0.x,r=this.p1.y-this.p0.y,i=n*n+r*r;if(i<=0)return Kn.NaN;var a=((t.x-this.p0.x)*n+(t.y-this.p0.y)*r)/i;return a};Tn.prototype.closestPoints=function(t){var n=this.intersection(t);if(n!==null)return[n,n];var r=new Array(2).fill(null),i=Kn.MAX_VALUE,a=null,o=this.closestPoint(t.p0);i=o.distance(t.p0),r[0]=o,r[1]=t.p0;var u=this.closestPoint(t.p1);a=u.distance(t.p1),a<i&&(i=a,r[0]=u,r[1]=t.p1);var c=t.closestPoint(this.p0);a=c.distance(this.p0),a<i&&(i=a,r[0]=this.p0,r[1]=c);var g=t.closestPoint(this.p1);return a=g.distance(this.p1),a<i&&(i=a,r[0]=this.p1,r[1]=g),r};Tn.prototype.closestPoint=function(t){var n=this.projectionFactor(t);if(n>0&&n<1)return this.project(t);var r=this.p0.distance(t),i=this.p1.distance(t);return r<i?this.p0:this.p1};Tn.prototype.maxX=function(){return Math.max(this.p0.x,this.p1.x)};Tn.prototype.getLength=function(){return this.p0.distance(this.p1)};Tn.prototype.compareTo=function(t){var n=t,r=this.p0.compareTo(n.p0);return r!==0?r:this.p1.compareTo(n.p1)};Tn.prototype.reverse=function(){var t=this.p0;this.p0=this.p1,this.p1=t};Tn.prototype.equalsTopo=function(t){return this.p0.equals(t.p0)&&(this.p1.equals(t.p1)||this.p0.equals(t.p1))&&this.p1.equals(t.p0)};Tn.prototype.lineIntersection=function(t){try{var n=mf.intersection(this.p0,this.p1,t.p0,t.p1);return n}catch(r){if(!(r instanceof J0))throw r}finally{}return null};Tn.prototype.maxY=function(){return Math.max(this.p0.y,this.p1.y)};Tn.prototype.pointAlongOffset=function(t,n){var r=this.p0.x+t*(this.p1.x-this.p0.x),i=this.p0.y+t*(this.p1.y-this.p0.y),a=this.p1.x-this.p0.x,o=this.p1.y-this.p0.y,u=Math.sqrt(a*a+o*o),c=0,g=0;if(n!==0){if(u<=0)throw new Error("Cannot compute offset from zero-length line segment");c=n*a/u,g=n*o/u}var _=r-g,E=i+c,C=new Xt(_,E);return C};Tn.prototype.setCoordinates=function(){if(arguments.length===1){var t=arguments[0];this.setCoordinates(t.p0,t.p1)}else if(arguments.length===2){var n=arguments[0],r=arguments[1];this.p0.x=n.x,this.p0.y=n.y,this.p1.x=r.x,this.p1.y=r.y}};Tn.prototype.segmentFraction=function(t){var n=this.projectionFactor(t);return n<0?n=0:(n>1||Kn.isNaN(n))&&(n=1),n};Tn.prototype.toString=function(){return"LINESTRING( "+this.p0.x+" "+this.p0.y+", "+this.p1.x+" "+this.p1.y+")"};Tn.prototype.isHorizontal=function(){return this.p0.y===this.p1.y};Tn.prototype.distance=function(){if(arguments[0]instanceof Tn){var t=arguments[0];return on.distanceLineLine(this.p0,this.p1,t.p0,t.p1)}else if(arguments[0]instanceof Xt){var n=arguments[0];return on.distancePointLine(n,this.p0,this.p1)}};Tn.prototype.pointAlong=function(t){var n=new Xt;return n.x=this.p0.x+t*(this.p1.x-this.p0.x),n.y=this.p0.y+t*(this.p1.y-this.p0.y),n};Tn.prototype.hashCode=function(){var t=Kn.doubleToLongBits(this.p0.x);t^=Kn.doubleToLongBits(this.p0.y)*31;var n=Math.trunc(t)^Math.trunc(t>>32),r=Kn.doubleToLongBits(this.p1.x);r^=Kn.doubleToLongBits(this.p1.y)*31;var i=Math.trunc(r)^Math.trunc(r>>32);return n^i};Tn.prototype.interfaces_=function(){return[wc,Sc]};Tn.prototype.getClass=function(){return Tn};Tn.midPoint=function(t,n){return new Xt((t.x+n.x)/2,(t.y+n.y)/2)};D8.serialVersionUID.get=function(){return 3252005833466256400};Object.defineProperties(Tn,D8);var vw=function(){this.tempEnv1=new In,this.tempEnv2=new In,this._overlapSeg1=new Tn,this._overlapSeg2=new Tn};vw.prototype.overlap=function(){if(arguments.length!==2){if(arguments.length===4){var t=arguments[0],n=arguments[1],r=arguments[2],i=arguments[3];t.getLineSegment(n,this._overlapSeg1),r.getLineSegment(i,this._overlapSeg2),this.overlap(this._overlapSeg1,this._overlapSeg2)}}};vw.prototype.interfaces_=function(){return[]};vw.prototype.getClass=function(){return vw};var gl=function(){this._pts=null,this._start=null,this._end=null,this._env=null,this._context=null,this._id=null;var t=arguments[0],n=arguments[1],r=arguments[2],i=arguments[3];this._pts=t,this._start=n,this._end=r,this._context=i};gl.prototype.getLineSegment=function(t,n){n.p0=this._pts[t],n.p1=this._pts[t+1]};gl.prototype.computeSelect=function(t,n,r,i){var a=this._pts[n],o=this._pts[r];if(i.tempEnv1.init(a,o),r-n==1)return i.select(this,n),null;if(!t.intersects(i.tempEnv1))return null;var u=Math.trunc((n+r)/2);n<u&&this.computeSelect(t,n,u,i),u<r&&this.computeSelect(t,u,r,i)};gl.prototype.getCoordinates=function(){for(var t=this,n=new Array(this._end-this._start+1).fill(null),r=0,i=this._start;i<=this._end;i++)n[r++]=t._pts[i];return n};gl.prototype.computeOverlaps=function(t,n){this.computeOverlapsInternal(this._start,this._end,t,t._start,t._end,n)};gl.prototype.setId=function(t){this._id=t};gl.prototype.select=function(t,n){this.computeSelect(t,this._start,this._end,n)};gl.prototype.getEnvelope=function(){if(this._env===null){var t=this._pts[this._start],n=this._pts[this._end];this._env=new In(t,n)}return this._env};gl.prototype.getEndIndex=function(){return this._end};gl.prototype.getStartIndex=function(){return this._start};gl.prototype.getContext=function(){return this._context};gl.prototype.getId=function(){return this._id};gl.prototype.computeOverlapsInternal=function(t,n,r,i,a,o){var u=this._pts[t],c=this._pts[n],g=r._pts[i],_=r._pts[a];if(n-t==1&&a-i==1)return o.overlap(this,t,r,i),null;if(o.tempEnv1.init(u,c),o.tempEnv2.init(g,_),!o.tempEnv1.intersects(o.tempEnv2))return null;var E=Math.trunc((t+n)/2),C=Math.trunc((i+a)/2);t<E&&(i<C&&this.computeOverlapsInternal(t,E,r,i,C,o),C<a&&this.computeOverlapsInternal(t,E,r,C,a,o)),E<n&&(i<C&&this.computeOverlapsInternal(E,n,r,i,C,o),C<a&&this.computeOverlapsInternal(E,n,r,C,a,o))};gl.prototype.interfaces_=function(){return[]};gl.prototype.getClass=function(){return gl};var Eh=function(){};Eh.prototype.interfaces_=function(){return[]};Eh.prototype.getClass=function(){return Eh};Eh.getChainStartIndices=function(t){var n=0,r=new Ke;r.add(new gh(n));do{var i=Eh.findChainEnd(t,n);r.add(new gh(i)),n=i}while(n<t.length-1);var a=Eh.toIntArray(r);return a};Eh.findChainEnd=function(t,n){for(var r=n;r<t.length-1&&t[r].equals2D(t[r+1]);)r++;if(r>=t.length-1)return t.length-1;for(var i=Ni.quadrant(t[r],t[r+1]),a=n+1;a<t.length;){if(!t[a-1].equals2D(t[a])){var o=Ni.quadrant(t[a-1],t[a]);if(o!==i)break}a++}return a-1};Eh.getChains=function(){if(arguments.length===1){var t=arguments[0];return Eh.getChains(t,null)}else if(arguments.length===2){for(var n=arguments[0],r=arguments[1],i=new Ke,a=Eh.getChainStartIndices(n),o=0;o<a.length-1;o++){var u=new gl(n,a[o],a[o+1],r);i.add(u)}return i}};Eh.toIntArray=function(t){for(var n=new Array(t.size()).fill(null),r=0;r<n.length;r++)n[r]=t.get(r).intValue();return n};var Wm=function(){};Wm.prototype.computeNodes=function(t){};Wm.prototype.getNodedSubstrings=function(){};Wm.prototype.interfaces_=function(){return[]};Wm.prototype.getClass=function(){return Wm};var yw=function(){if(this._segInt=null,arguments.length!==0){if(arguments.length===1){var t=arguments[0];this.setSegmentIntersector(t)}}};yw.prototype.setSegmentIntersector=function(t){this._segInt=t};yw.prototype.interfaces_=function(){return[Wm]};yw.prototype.getClass=function(){return yw};var tk=function(e){function t(r){r?e.call(this,r):e.call(this),this._monoChains=new Ke,this._index=new R8,this._idCounter=0,this._nodedSegStrings=null,this._nOverlaps=0}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={SegmentOverlapAction:{configurable:!0}};return t.prototype.getMonotoneChains=function(){return this._monoChains},t.prototype.getNodedSubstrings=function(){return ia.getNodedSubstrings(this._nodedSegStrings)},t.prototype.getIndex=function(){return this._index},t.prototype.add=function(i){for(var a=this,o=Eh.getChains(i.getCoordinates(),i),u=o.iterator();u.hasNext();){var c=u.next();c.setId(a._idCounter++),a._index.insert(c.getEnvelope(),c),a._monoChains.add(c)}},t.prototype.computeNodes=function(i){var a=this;this._nodedSegStrings=i;for(var o=i.iterator();o.hasNext();)a.add(o.next());this.intersectChains()},t.prototype.intersectChains=function(){for(var i=this,a=new N8(this._segInt),o=this._monoChains.iterator();o.hasNext();)for(var u=o.next(),c=i._index.query(u.getEnvelope()),g=c.iterator();g.hasNext();){var _=g.next();if(_.getId()>u.getId()&&(u.computeOverlaps(_,a),i._nOverlaps++),i._segInt.isDone())return null}},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},n.SegmentOverlapAction.get=function(){return N8},Object.defineProperties(t,n),t}(yw),N8=function(e){function t(){e.call(this),this._si=null;var n=arguments[0];this._si=n}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.overlap=function(){if(arguments.length===4){var r=arguments[0],i=arguments[1],a=arguments[2],o=arguments[3],u=r.getContext(),c=a.getContext();this._si.processIntersections(u,i,c,o)}else return e.prototype.overlap.apply(this,arguments)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(vw),hi=function e(){if(this._quadrantSegments=e.DEFAULT_QUADRANT_SEGMENTS,this._endCapStyle=e.CAP_ROUND,this._joinStyle=e.JOIN_ROUND,this._mitreLimit=e.DEFAULT_MITRE_LIMIT,this._isSingleSided=!1,this._simplifyFactor=e.DEFAULT_SIMPLIFY_FACTOR,arguments.length!==0){if(arguments.length===1){var t=arguments[0];this.setQuadrantSegments(t)}else if(arguments.length===2){var n=arguments[0],r=arguments[1];this.setQuadrantSegments(n),this.setEndCapStyle(r)}else if(arguments.length===4){var i=arguments[0],a=arguments[1],o=arguments[2],u=arguments[3];this.setQuadrantSegments(i),this.setEndCapStyle(a),this.setJoinStyle(o),this.setMitreLimit(u)}}},pd={CAP_ROUND:{configurable:!0},CAP_FLAT:{configurable:!0},CAP_SQUARE:{configurable:!0},JOIN_ROUND:{configurable:!0},JOIN_MITRE:{configurable:!0},JOIN_BEVEL:{configurable:!0},DEFAULT_QUADRANT_SEGMENTS:{configurable:!0},DEFAULT_MITRE_LIMIT:{configurable:!0},DEFAULT_SIMPLIFY_FACTOR:{configurable:!0}};hi.prototype.getEndCapStyle=function(){return this._endCapStyle};hi.prototype.isSingleSided=function(){return this._isSingleSided};hi.prototype.setQuadrantSegments=function(t){this._quadrantSegments=t,this._quadrantSegments===0&&(this._joinStyle=hi.JOIN_BEVEL),this._quadrantSegments<0&&(this._joinStyle=hi.JOIN_MITRE,this._mitreLimit=Math.abs(this._quadrantSegments)),t<=0&&(this._quadrantSegments=1),this._joinStyle!==hi.JOIN_ROUND&&(this._quadrantSegments=hi.DEFAULT_QUADRANT_SEGMENTS)};hi.prototype.getJoinStyle=function(){return this._joinStyle};hi.prototype.setJoinStyle=function(t){this._joinStyle=t};hi.prototype.setSimplifyFactor=function(t){this._simplifyFactor=t<0?0:t};hi.prototype.getSimplifyFactor=function(){return this._simplifyFactor};hi.prototype.getQuadrantSegments=function(){return this._quadrantSegments};hi.prototype.setEndCapStyle=function(t){this._endCapStyle=t};hi.prototype.getMitreLimit=function(){return this._mitreLimit};hi.prototype.setMitreLimit=function(t){this._mitreLimit=t};hi.prototype.setSingleSided=function(t){this._isSingleSided=t};hi.prototype.interfaces_=function(){return[]};hi.prototype.getClass=function(){return hi};hi.bufferDistanceError=function(t){var n=Math.PI/2/t;return 1-Math.cos(n/2)};pd.CAP_ROUND.get=function(){return 1};pd.CAP_FLAT.get=function(){return 2};pd.CAP_SQUARE.get=function(){return 3};pd.JOIN_ROUND.get=function(){return 1};pd.JOIN_MITRE.get=function(){return 2};pd.JOIN_BEVEL.get=function(){return 3};pd.DEFAULT_QUADRANT_SEGMENTS.get=function(){return 8};pd.DEFAULT_MITRE_LIMIT.get=function(){return 5};pd.DEFAULT_SIMPLIFY_FACTOR.get=function(){return .01};Object.defineProperties(hi,pd);var Vo=function(t){this._distanceTol=null,this._isDeleted=null,this._angleOrientation=on.COUNTERCLOCKWISE,this._inputLine=t||null},_w={INIT:{configurable:!0},DELETE:{configurable:!0},KEEP:{configurable:!0},NUM_PTS_TO_CHECK:{configurable:!0}};Vo.prototype.isDeletable=function(t,n,r,i){var a=this._inputLine[t],o=this._inputLine[n],u=this._inputLine[r];return!this.isConcave(a,o,u)||!this.isShallow(a,o,u,i)?!1:this.isShallowSampled(a,o,t,r,i)};Vo.prototype.deleteShallowConcavities=function(){for(var t=this,n=1,r=this.findNextNonDeletedIndex(n),i=this.findNextNonDeletedIndex(r),a=!1;i<this._inputLine.length;){var o=!1;t.isDeletable(n,r,i,t._distanceTol)&&(t._isDeleted[r]=Vo.DELETE,o=!0,a=!0),o?n=i:n=r,r=t.findNextNonDeletedIndex(n),i=t.findNextNonDeletedIndex(r)}return a};Vo.prototype.isShallowConcavity=function(t,n,r,i){var a=on.computeOrientation(t,n,r),o=a===this._angleOrientation;if(!o)return!1;var u=on.distancePointLine(n,t,r);return u<i};Vo.prototype.isShallowSampled=function(t,n,r,i,a){var o=this,u=Math.trunc((i-r)/Vo.NUM_PTS_TO_CHECK);u<=0&&(u=1);for(var c=r;c<i;c+=u)if(!o.isShallow(t,n,o._inputLine[c],a))return!1;return!0};Vo.prototype.isConcave=function(t,n,r){var i=on.computeOrientation(t,n,r),a=i===this._angleOrientation;return a};Vo.prototype.simplify=function(t){var n=this;this._distanceTol=Math.abs(t),t<0&&(this._angleOrientation=on.CLOCKWISE),this._isDeleted=new Array(this._inputLine.length).fill(null);var r=!1;do r=n.deleteShallowConcavities();while(r);return this.collapseLine()};Vo.prototype.findNextNonDeletedIndex=function(t){for(var n=t+1;n<this._inputLine.length&&this._isDeleted[n]===Vo.DELETE;)n++;return n};Vo.prototype.isShallow=function(t,n,r,i){var a=on.distancePointLine(n,t,r);return a<i};Vo.prototype.collapseLine=function(){for(var t=this,n=new sw,r=0;r<this._inputLine.length;r++)t._isDeleted[r]!==Vo.DELETE&&n.add(t._inputLine[r]);return n.toCoordinateArray()};Vo.prototype.interfaces_=function(){return[]};Vo.prototype.getClass=function(){return Vo};Vo.simplify=function(t,n){var r=new Vo(t);return r.simplify(n)};_w.INIT.get=function(){return 0};_w.DELETE.get=function(){return 1};_w.KEEP.get=function(){return 1};_w.NUM_PTS_TO_CHECK.get=function(){return 10};Object.defineProperties(Vo,_w);var Vl=function(){this._ptList=null,this._precisionModel=null,this._minimimVertexDistance=0,this._ptList=new Ke},F8={COORDINATE_ARRAY_TYPE:{configurable:!0}};Vl.prototype.getCoordinates=function(){var t=this._ptList.toArray(Vl.COORDINATE_ARRAY_TYPE);return t};Vl.prototype.setPrecisionModel=function(t){this._precisionModel=t};Vl.prototype.addPt=function(t){var n=new Xt(t);if(this._precisionModel.makePrecise(n),this.isRedundant(n))return null;this._ptList.add(n)};Vl.prototype.revere=function(){};Vl.prototype.addPts=function(t,n){var r=this;if(n)for(var i=0;i<t.length;i++)r.addPt(t[i]);else for(var a=t.length-1;a>=0;a--)r.addPt(t[a])};Vl.prototype.isRedundant=function(t){if(this._ptList.size()<1)return!1;var n=this._ptList.get(this._ptList.size()-1),r=t.distance(n);return r<this._minimimVertexDistance};Vl.prototype.toString=function(){var t=new Fr,n=t.createLineString(this.getCoordinates());return n.toString()};Vl.prototype.closeRing=function(){if(this._ptList.size()<1)return null;var t=new Xt(this._ptList.get(0)),n=this._ptList.get(this._ptList.size()-1);if(t.equals(n))return null;this._ptList.add(t)};Vl.prototype.setMinimumVertexDistance=function(t){this._minimimVertexDistance=t};Vl.prototype.interfaces_=function(){return[]};Vl.prototype.getClass=function(){return Vl};F8.COORDINATE_ARRAY_TYPE.get=function(){return new Array(0).fill(null)};Object.defineProperties(Vl,F8);var Xr=function(){},Sy={PI_TIMES_2:{configurable:!0},PI_OVER_2:{configurable:!0},PI_OVER_4:{configurable:!0},COUNTERCLOCKWISE:{configurable:!0},CLOCKWISE:{configurable:!0},NONE:{configurable:!0}};Xr.prototype.interfaces_=function(){return[]};Xr.prototype.getClass=function(){return Xr};Xr.toDegrees=function(t){return t*180/Math.PI};Xr.normalize=function(t){for(;t>Math.PI;)t-=Xr.PI_TIMES_2;for(;t<=-Math.PI;)t+=Xr.PI_TIMES_2;return t};Xr.angle=function(){if(arguments.length===1){var t=arguments[0];return Math.atan2(t.y,t.x)}else if(arguments.length===2){var n=arguments[0],r=arguments[1],i=r.x-n.x,a=r.y-n.y;return Math.atan2(a,i)}};Xr.isAcute=function(t,n,r){var i=t.x-n.x,a=t.y-n.y,o=r.x-n.x,u=r.y-n.y,c=i*o+a*u;return c>0};Xr.isObtuse=function(t,n,r){var i=t.x-n.x,a=t.y-n.y,o=r.x-n.x,u=r.y-n.y,c=i*o+a*u;return c<0};Xr.interiorAngle=function(t,n,r){var i=Xr.angle(n,t),a=Xr.angle(n,r);return Math.abs(a-i)};Xr.normalizePositive=function(t){if(t<0){for(;t<0;)t+=Xr.PI_TIMES_2;t>=Xr.PI_TIMES_2&&(t=0)}else{for(;t>=Xr.PI_TIMES_2;)t-=Xr.PI_TIMES_2;t<0&&(t=0)}return t};Xr.angleBetween=function(t,n,r){var i=Xr.angle(n,t),a=Xr.angle(n,r);return Xr.diff(i,a)};Xr.diff=function(t,n){var r=null;return t<n?r=n-t:r=t-n,r>Math.PI&&(r=2*Math.PI-r),r};Xr.toRadians=function(t){return t*Math.PI/180};Xr.getTurn=function(t,n){var r=Math.sin(n-t);return r>0?Xr.COUNTERCLOCKWISE:r<0?Xr.CLOCKWISE:Xr.NONE};Xr.angleBetweenOriented=function(t,n,r){var i=Xr.angle(n,t),a=Xr.angle(n,r),o=a-i;return o<=-Math.PI?o+Xr.PI_TIMES_2:o>Math.PI?o-Xr.PI_TIMES_2:o};Sy.PI_TIMES_2.get=function(){return 2*Math.PI};Sy.PI_OVER_2.get=function(){return Math.PI/2};Sy.PI_OVER_4.get=function(){return Math.PI/4};Sy.COUNTERCLOCKWISE.get=function(){return on.COUNTERCLOCKWISE};Sy.CLOCKWISE.get=function(){return on.CLOCKWISE};Sy.NONE.get=function(){return on.COLLINEAR};Object.defineProperties(Xr,Sy);var po=function e(){this._maxCurveSegmentError=0,this._filletAngleQuantum=null,this._closingSegLengthFactor=1,this._segList=null,this._distance=0,this._precisionModel=null,this._bufParams=null,this._li=null,this._s0=null,this._s1=null,this._s2=null,this._seg0=new Tn,this._seg1=new Tn,this._offset0=new Tn,this._offset1=new Tn,this._side=0,this._hasNarrowConcaveAngle=!1;var t=arguments[0],n=arguments[1],r=arguments[2];this._precisionModel=t,this._bufParams=n,this._li=new $m,this._filletAngleQuantum=Math.PI/2/n.getQuadrantSegments(),n.getQuadrantSegments()>=8&&n.getJoinStyle()===hi.JOIN_ROUND&&(this._closingSegLengthFactor=e.MAX_CLOSING_SEG_LEN_FACTOR),this.init(r)},xw={OFFSET_SEGMENT_SEPARATION_FACTOR:{configurable:!0},INSIDE_TURN_VERTEX_SNAP_DISTANCE_FACTOR:{configurable:!0},CURVE_VERTEX_SNAP_DISTANCE_FACTOR:{configurable:!0},MAX_CLOSING_SEG_LEN_FACTOR:{configurable:!0}};po.prototype.addNextSegment=function(t,n){if(this._s0=this._s1,this._s1=this._s2,this._s2=t,this._seg0.setCoordinates(this._s0,this._s1),this.computeOffsetSegment(this._seg0,this._side,this._distance,this._offset0),this._seg1.setCoordinates(this._s1,this._s2),this.computeOffsetSegment(this._seg1,this._side,this._distance,this._offset1),this._s1.equals(this._s2))return null;var r=on.computeOrientation(this._s0,this._s1,this._s2),i=r===on.CLOCKWISE&&this._side===ke.LEFT||r===on.COUNTERCLOCKWISE&&this._side===ke.RIGHT;r===0?this.addCollinear(n):i?this.addOutsideTurn(r,n):this.addInsideTurn(r,n)};po.prototype.addLineEndCap=function(t,n){var r=new Tn(t,n),i=new Tn;this.computeOffsetSegment(r,ke.LEFT,this._distance,i);var a=new Tn;this.computeOffsetSegment(r,ke.RIGHT,this._distance,a);var o=n.x-t.x,u=n.y-t.y,c=Math.atan2(u,o);switch(this._bufParams.getEndCapStyle()){case hi.CAP_ROUND:this._segList.addPt(i.p1),this.addFilletArc(n,c+Math.PI/2,c-Math.PI/2,on.CLOCKWISE,this._distance),this._segList.addPt(a.p1);break;case hi.CAP_FLAT:this._segList.addPt(i.p1),this._segList.addPt(a.p1);break;case hi.CAP_SQUARE:var g=new Xt;g.x=Math.abs(this._distance)*Math.cos(c),g.y=Math.abs(this._distance)*Math.sin(c);var _=new Xt(i.p1.x+g.x,i.p1.y+g.y),E=new Xt(a.p1.x+g.x,a.p1.y+g.y);this._segList.addPt(_),this._segList.addPt(E);break}};po.prototype.getCoordinates=function(){var t=this._segList.getCoordinates();return t};po.prototype.addMitreJoin=function(t,n,r,i){var a=!0,o=null;try{o=mf.intersection(n.p0,n.p1,r.p0,r.p1);var u=i<=0?1:o.distance(t)/Math.abs(i);u>this._bufParams.getMitreLimit()&&(a=!1)}catch(c){if(c instanceof J0)o=new Xt(0,0),a=!1;else throw c}finally{}a?this._segList.addPt(o):this.addLimitedMitreJoin(n,r,i,this._bufParams.getMitreLimit())};po.prototype.addFilletCorner=function(t,n,r,i,a){var o=n.x-t.x,u=n.y-t.y,c=Math.atan2(u,o),g=r.x-t.x,_=r.y-t.y,E=Math.atan2(_,g);i===on.CLOCKWISE?c<=E&&(c+=2*Math.PI):c>=E&&(c-=2*Math.PI),this._segList.addPt(n),this.addFilletArc(t,c,E,i,a),this._segList.addPt(r)};po.prototype.addOutsideTurn=function(t,n){if(this._offset0.p1.distance(this._offset1.p0)<this._distance*po.OFFSET_SEGMENT_SEPARATION_FACTOR)return this._segList.addPt(this._offset0.p1),null;this._bufParams.getJoinStyle()===hi.JOIN_MITRE?this.addMitreJoin(this._s1,this._offset0,this._offset1,this._distance):this._bufParams.getJoinStyle()===hi.JOIN_BEVEL?this.addBevelJoin(this._offset0,this._offset1):(n&&this._segList.addPt(this._offset0.p1),this.addFilletCorner(this._s1,this._offset0.p1,this._offset1.p0,t,this._distance),this._segList.addPt(this._offset1.p0))};po.prototype.createSquare=function(t){this._segList.addPt(new Xt(t.x+this._distance,t.y+this._distance)),this._segList.addPt(new Xt(t.x+this._distance,t.y-this._distance)),this._segList.addPt(new Xt(t.x-this._distance,t.y-this._distance)),this._segList.addPt(new Xt(t.x-this._distance,t.y+this._distance)),this._segList.closeRing()};po.prototype.addSegments=function(t,n){this._segList.addPts(t,n)};po.prototype.addFirstSegment=function(){this._segList.addPt(this._offset1.p0)};po.prototype.addLastSegment=function(){this._segList.addPt(this._offset1.p1)};po.prototype.initSideSegments=function(t,n,r){this._s1=t,this._s2=n,this._side=r,this._seg1.setCoordinates(t,n),this.computeOffsetSegment(this._seg1,r,this._distance,this._offset1)};po.prototype.addLimitedMitreJoin=function(t,n,r,i){var a=this._seg0.p1,o=Xr.angle(a,this._seg0.p0),u=Xr.angleBetweenOriented(this._seg0.p0,a,this._seg1.p1),c=u/2,g=Xr.normalize(o+c),_=Xr.normalize(g+Math.PI),E=i*r,C=E*Math.abs(Math.sin(c)),O=r-C,R=a.x+E*Math.cos(_),D=a.y+E*Math.sin(_),B=new Xt(R,D),z=new Tn(a,B),k=z.pointAlongOffset(1,O),$=z.pointAlongOffset(1,-O);this._side===ke.LEFT?(this._segList.addPt(k),this._segList.addPt($)):(this._segList.addPt($),this._segList.addPt(k))};po.prototype.computeOffsetSegment=function(t,n,r,i){var a=n===ke.LEFT?1:-1,o=t.p1.x-t.p0.x,u=t.p1.y-t.p0.y,c=Math.sqrt(o*o+u*u),g=a*r*o/c,_=a*r*u/c;i.p0.x=t.p0.x-_,i.p0.y=t.p0.y+g,i.p1.x=t.p1.x-_,i.p1.y=t.p1.y+g};po.prototype.addFilletArc=function(t,n,r,i,a){var o=this,u=i===on.CLOCKWISE?-1:1,c=Math.abs(n-r),g=Math.trunc(c/this._filletAngleQuantum+.5);if(g<1)return null;for(var _=0,E=c/g,C=_,O=new Xt;C<c;){var R=n+u*C;O.x=t.x+a*Math.cos(R),O.y=t.y+a*Math.sin(R),o._segList.addPt(O),C+=E}};po.prototype.addInsideTurn=function(t,n){if(this._li.computeIntersection(this._offset0.p0,this._offset0.p1,this._offset1.p0,this._offset1.p1),this._li.hasIntersection())this._segList.addPt(this._li.getIntersection(0));else if(this._hasNarrowConcaveAngle=!0,this._offset0.p1.distance(this._offset1.p0)<this._distance*po.INSIDE_TURN_VERTEX_SNAP_DISTANCE_FACTOR)this._segList.addPt(this._offset0.p1);else{if(this._segList.addPt(this._offset0.p1),this._closingSegLengthFactor>0){var r=new Xt((this._closingSegLengthFactor*this._offset0.p1.x+this._s1.x)/(this._closingSegLengthFactor+1),(this._closingSegLengthFactor*this._offset0.p1.y+this._s1.y)/(this._closingSegLengthFactor+1));this._segList.addPt(r);var i=new Xt((this._closingSegLengthFactor*this._offset1.p0.x+this._s1.x)/(this._closingSegLengthFactor+1),(this._closingSegLengthFactor*this._offset1.p0.y+this._s1.y)/(this._closingSegLengthFactor+1));this._segList.addPt(i)}else this._segList.addPt(this._s1);this._segList.addPt(this._offset1.p0)}};po.prototype.createCircle=function(t){var n=new Xt(t.x+this._distance,t.y);this._segList.addPt(n),this.addFilletArc(t,0,2*Math.PI,-1,this._distance),this._segList.closeRing()};po.prototype.addBevelJoin=function(t,n){this._segList.addPt(t.p1),this._segList.addPt(n.p0)};po.prototype.init=function(t){this._distance=t,this._maxCurveSegmentError=t*(1-Math.cos(this._filletAngleQuantum/2)),this._segList=new Vl,this._segList.setPrecisionModel(this._precisionModel),this._segList.setMinimumVertexDistance(t*po.CURVE_VERTEX_SNAP_DISTANCE_FACTOR)};po.prototype.addCollinear=function(t){this._li.computeIntersection(this._s0,this._s1,this._s1,this._s2);var n=this._li.getIntersectionNum();n>=2&&(this._bufParams.getJoinStyle()===hi.JOIN_BEVEL||this._bufParams.getJoinStyle()===hi.JOIN_MITRE?(t&&this._segList.addPt(this._offset0.p1),this._segList.addPt(this._offset1.p0)):this.addFilletCorner(this._s1,this._offset0.p1,this._offset1.p0,on.CLOCKWISE,this._distance))};po.prototype.closeRing=function(){this._segList.closeRing()};po.prototype.hasNarrowConcaveAngle=function(){return this._hasNarrowConcaveAngle};po.prototype.interfaces_=function(){return[]};po.prototype.getClass=function(){return po};xw.OFFSET_SEGMENT_SEPARATION_FACTOR.get=function(){return .001};xw.INSIDE_TURN_VERTEX_SNAP_DISTANCE_FACTOR.get=function(){return .001};xw.CURVE_VERTEX_SNAP_DISTANCE_FACTOR.get=function(){return 1e-6};xw.MAX_CLOSING_SEG_LEN_FACTOR.get=function(){return 80};Object.defineProperties(po,xw);var Du=function(){this._distance=0,this._precisionModel=null,this._bufParams=null;var t=arguments[0],n=arguments[1];this._precisionModel=t,this._bufParams=n};Du.prototype.getOffsetCurve=function(t,n){if(this._distance=n,n===0)return null;var r=n<0,i=Math.abs(n),a=this.getSegGen(i);t.length<=1?this.computePointCurve(t[0],a):this.computeOffsetCurve(t,r,a);var o=a.getCoordinates();return r&&Mr.reverse(o),o};Du.prototype.computeSingleSidedBufferCurve=function(t,n,r){var i=this.simplifyTolerance(this._distance);if(n){r.addSegments(t,!0);var a=Vo.simplify(t,-i),o=a.length-1;r.initSideSegments(a[o],a[o-1],ke.LEFT),r.addFirstSegment();for(var u=o-2;u>=0;u--)r.addNextSegment(a[u],!0)}else{r.addSegments(t,!1);var c=Vo.simplify(t,i),g=c.length-1;r.initSideSegments(c[0],c[1],ke.LEFT),r.addFirstSegment();for(var _=2;_<=g;_++)r.addNextSegment(c[_],!0)}r.addLastSegment(),r.closeRing()};Du.prototype.computeRingBufferCurve=function(t,n,r){var i=this.simplifyTolerance(this._distance);n===ke.RIGHT&&(i=-i);var a=Vo.simplify(t,i),o=a.length-1;r.initSideSegments(a[o-1],a[0],n);for(var u=1;u<=o;u++){var c=u!==1;r.addNextSegment(a[u],c)}r.closeRing()};Du.prototype.computeLineBufferCurve=function(t,n){var r=this.simplifyTolerance(this._distance),i=Vo.simplify(t,r),a=i.length-1;n.initSideSegments(i[0],i[1],ke.LEFT);for(var o=2;o<=a;o++)n.addNextSegment(i[o],!0);n.addLastSegment(),n.addLineEndCap(i[a-1],i[a]);var u=Vo.simplify(t,-r),c=u.length-1;n.initSideSegments(u[c],u[c-1],ke.LEFT);for(var g=c-2;g>=0;g--)n.addNextSegment(u[g],!0);n.addLastSegment(),n.addLineEndCap(u[1],u[0]),n.closeRing()};Du.prototype.computePointCurve=function(t,n){switch(this._bufParams.getEndCapStyle()){case hi.CAP_ROUND:n.createCircle(t);break;case hi.CAP_SQUARE:n.createSquare(t);break}};Du.prototype.getLineCurve=function(t,n){if(this._distance=n,n<0&&!this._bufParams.isSingleSided()||n===0)return null;var r=Math.abs(n),i=this.getSegGen(r);if(t.length<=1)this.computePointCurve(t[0],i);else if(this._bufParams.isSingleSided()){var a=n<0;this.computeSingleSidedBufferCurve(t,a,i)}else this.computeLineBufferCurve(t,i);var o=i.getCoordinates();return o};Du.prototype.getBufferParameters=function(){return this._bufParams};Du.prototype.simplifyTolerance=function(t){return t*this._bufParams.getSimplifyFactor()};Du.prototype.getRingCurve=function(t,n,r){if(this._distance=r,t.length<=2)return this.getLineCurve(t,r);if(r===0)return Du.copyCoordinates(t);var i=this.getSegGen(r);return this.computeRingBufferCurve(t,n,i),i.getCoordinates()};Du.prototype.computeOffsetCurve=function(t,n,r){var i=this.simplifyTolerance(this._distance);if(n){var a=Vo.simplify(t,-i),o=a.length-1;r.initSideSegments(a[o],a[o-1],ke.LEFT),r.addFirstSegment();for(var u=o-2;u>=0;u--)r.addNextSegment(a[u],!0)}else{var c=Vo.simplify(t,i),g=c.length-1;r.initSideSegments(c[0],c[1],ke.LEFT),r.addFirstSegment();for(var _=2;_<=g;_++)r.addNextSegment(c[_],!0)}r.addLastSegment()};Du.prototype.getSegGen=function(t){return new po(this._precisionModel,this._bufParams,t)};Du.prototype.interfaces_=function(){return[]};Du.prototype.getClass=function(){return Du};Du.copyCoordinates=function(t){for(var n=new Array(t.length).fill(null),r=0;r<n.length;r++)n[r]=new Xt(t[r]);return n};var Ey=function(){this._subgraphs=null,this._seg=new Tn,this._cga=new on;var t=arguments[0];this._subgraphs=t},z8={DepthSegment:{configurable:!0}};Ey.prototype.findStabbedSegments=function(){var t=this;if(arguments.length===1){for(var n=arguments[0],r=new Ke,i=this._subgraphs.iterator();i.hasNext();){var a=i.next(),o=a.getEnvelope();n.y<o.getMinY()||n.y>o.getMaxY()||t.findStabbedSegments(n,a.getDirectedEdges(),r)}return r}else if(arguments.length===3){if($n(arguments[2],yf)&&arguments[0]instanceof Xt&&arguments[1]instanceof QR)for(var u=arguments[0],c=arguments[1],g=arguments[2],_=c.getEdge().getCoordinates(),E=0;E<_.length-1;E++){t._seg.p0=_[E],t._seg.p1=_[E+1],t._seg.p0.y>t._seg.p1.y&&t._seg.reverse();var C=Math.max(t._seg.p0.x,t._seg.p1.x);if(!(C<u.x)&&!t._seg.isHorizontal()&&!(u.y<t._seg.p0.y||u.y>t._seg.p1.y)&&on.computeOrientation(t._seg.p0,t._seg.p1,u)!==on.RIGHT){var O=c.getDepth(ke.LEFT);t._seg.p0.equals(_[E])||(O=c.getDepth(ke.RIGHT));var R=new Hm(t._seg,O);g.add(R)}}else if($n(arguments[2],yf)&&arguments[0]instanceof Xt&&$n(arguments[1],yf))for(var D=arguments[0],B=arguments[1],z=arguments[2],k=B.iterator();k.hasNext();){var $=k.next();!$.isForward()||t.findStabbedSegments(D,$,z)}}};Ey.prototype.getDepth=function(t){var n=this.findStabbedSegments(t);if(n.size()===0)return 0;var r=wf.min(n);return r._leftDepth};Ey.prototype.interfaces_=function(){return[]};Ey.prototype.getClass=function(){return Ey};z8.DepthSegment.get=function(){return Hm};Object.defineProperties(Ey,z8);var Hm=function(){this._upwardSeg=null,this._leftDepth=null;var t=arguments[0],n=arguments[1];this._upwardSeg=new Tn(t),this._leftDepth=n};Hm.prototype.compareTo=function(t){var n=t;if(this._upwardSeg.minX()>=n._upwardSeg.maxX())return 1;if(this._upwardSeg.maxX()<=n._upwardSeg.minX())return-1;var r=this._upwardSeg.orientationIndex(n._upwardSeg);return r!==0||(r=-1*n._upwardSeg.orientationIndex(this._upwardSeg),r!==0)?r:this._upwardSeg.compareTo(n._upwardSeg)};Hm.prototype.compareX=function(t,n){var r=t.p0.compareTo(n.p0);return r!==0?r:t.p1.compareTo(n.p1)};Hm.prototype.toString=function(){return this._upwardSeg.toString()};Hm.prototype.interfaces_=function(){return[wc]};Hm.prototype.getClass=function(){return Hm};var pi=function(t,n,r){this.p0=t||null,this.p1=n||null,this.p2=r||null};pi.prototype.area=function(){return pi.area(this.p0,this.p1,this.p2)};pi.prototype.signedArea=function(){return pi.signedArea(this.p0,this.p1,this.p2)};pi.prototype.interpolateZ=function(t){if(t===null)throw new wo;return pi.interpolateZ(t,this.p0,this.p1,this.p2)};pi.prototype.longestSideLength=function(){return pi.longestSideLength(this.p0,this.p1,this.p2)};pi.prototype.isAcute=function(){return pi.isAcute(this.p0,this.p1,this.p2)};pi.prototype.circumcentre=function(){return pi.circumcentre(this.p0,this.p1,this.p2)};pi.prototype.area3D=function(){return pi.area3D(this.p0,this.p1,this.p2)};pi.prototype.centroid=function(){return pi.centroid(this.p0,this.p1,this.p2)};pi.prototype.inCentre=function(){return pi.inCentre(this.p0,this.p1,this.p2)};pi.prototype.interfaces_=function(){return[]};pi.prototype.getClass=function(){return pi};pi.area=function(t,n,r){return Math.abs(((r.x-t.x)*(n.y-t.y)-(n.x-t.x)*(r.y-t.y))/2)};pi.signedArea=function(t,n,r){return((r.x-t.x)*(n.y-t.y)-(n.x-t.x)*(r.y-t.y))/2};pi.det=function(t,n,r,i){return t*i-n*r};pi.interpolateZ=function(t,n,r,i){var a=n.x,o=n.y,u=r.x-a,c=i.x-a,g=r.y-o,_=i.y-o,E=u*_-c*g,C=t.x-a,O=t.y-o,R=(_*C-c*O)/E,D=(-g*C+u*O)/E,B=n.z+R*(r.z-n.z)+D*(i.z-n.z);return B};pi.longestSideLength=function(t,n,r){var i=t.distance(n),a=n.distance(r),o=r.distance(t),u=i;return a>u&&(u=a),o>u&&(u=o),u};pi.isAcute=function(t,n,r){return!(!Xr.isAcute(t,n,r)||!Xr.isAcute(n,r,t)||!Xr.isAcute(r,t,n))};pi.circumcentre=function(t,n,r){var i=r.x,a=r.y,o=t.x-i,u=t.y-a,c=n.x-i,g=n.y-a,_=2*pi.det(o,u,c,g),E=pi.det(u,o*o+u*u,g,c*c+g*g),C=pi.det(o,o*o+u*u,c,c*c+g*g),O=i-E/_,R=a+C/_;return new Xt(O,R)};pi.perpendicularBisector=function(t,n){var r=n.x-t.x,i=n.y-t.y,a=new mf(t.x+r/2,t.y+i/2,1),o=new mf(t.x-i+r/2,t.y+r+i/2,1);return new mf(a,o)};pi.angleBisector=function(t,n,r){var i=n.distance(t),a=n.distance(r),o=i/(i+a),u=r.x-t.x,c=r.y-t.y,g=new Xt(t.x+o*u,t.y+o*c);return g};pi.area3D=function(t,n,r){var i=n.x-t.x,a=n.y-t.y,o=n.z-t.z,u=r.x-t.x,c=r.y-t.y,g=r.z-t.z,_=a*g-o*c,E=o*u-i*g,C=i*c-a*u,O=_*_+E*E+C*C,R=Math.sqrt(O)/2;return R};pi.centroid=function(t,n,r){var i=(t.x+n.x+r.x)/3,a=(t.y+n.y+r.y)/3;return new Xt(i,a)};pi.inCentre=function(t,n,r){var i=n.distance(r),a=t.distance(r),o=t.distance(n),u=i+a+o,c=(i*t.x+a*n.x+o*r.x)/u,g=(i*t.y+a*n.y+o*r.y)/u;return new Xt(c,g)};var Tc=function(){this._inputGeom=null,this._distance=null,this._curveBuilder=null,this._curveList=new Ke;var t=arguments[0],n=arguments[1],r=arguments[2];this._inputGeom=t,this._distance=n,this._curveBuilder=r};Tc.prototype.addPoint=function(t){if(this._distance<=0)return null;var n=t.getCoordinates(),r=this._curveBuilder.getLineCurve(n,this._distance);this.addCurve(r,Kt.EXTERIOR,Kt.INTERIOR)};Tc.prototype.addPolygon=function(t){var n=this,r=this._distance,i=ke.LEFT;this._distance<0&&(r=-this._distance,i=ke.RIGHT);var a=t.getExteriorRing(),o=Mr.removeRepeatedPoints(a.getCoordinates());if(this._distance<0&&this.isErodedCompletely(a,this._distance)||this._distance<=0&&o.length<3)return null;this.addPolygonRing(o,r,i,Kt.EXTERIOR,Kt.INTERIOR);for(var u=0;u<t.getNumInteriorRing();u++){var c=t.getInteriorRingN(u),g=Mr.removeRepeatedPoints(c.getCoordinates());n._distance>0&&n.isErodedCompletely(c,-n._distance)||n.addPolygonRing(g,r,ke.opposite(i),Kt.INTERIOR,Kt.EXTERIOR)}};Tc.prototype.isTriangleErodedCompletely=function(t,n){var r=new pi(t[0],t[1],t[2]),i=r.inCentre(),a=on.distancePointLine(i,r.p0,r.p1);return a<Math.abs(n)};Tc.prototype.addLineString=function(t){if(this._distance<=0&&!this._curveBuilder.getBufferParameters().isSingleSided())return null;var n=Mr.removeRepeatedPoints(t.getCoordinates()),r=this._curveBuilder.getLineCurve(n,this._distance);this.addCurve(r,Kt.EXTERIOR,Kt.INTERIOR)};Tc.prototype.addCurve=function(t,n,r){if(t===null||t.length<2)return null;var i=new ia(t,new Ci(0,Kt.BOUNDARY,n,r));this._curveList.add(i)};Tc.prototype.getCurves=function(){return this.add(this._inputGeom),this._curveList};Tc.prototype.addPolygonRing=function(t,n,r,i,a){if(n===0&&t.length<_p.MINIMUM_VALID_SIZE)return null;var o=i,u=a;t.length>=_p.MINIMUM_VALID_SIZE&&on.isCCW(t)&&(o=a,u=i,r=ke.opposite(r));var c=this._curveBuilder.getRingCurve(t,r,n);this.addCurve(c,o,u)};Tc.prototype.add=function(t){if(t.isEmpty())return null;t instanceof Da?this.addPolygon(t):t instanceof Uo?this.addLineString(t):t instanceof pl?this.addPoint(t):t instanceof sx?this.addCollection(t):t instanceof Gm?this.addCollection(t):t instanceof xp?this.addCollection(t):t instanceof uu&&this.addCollection(t)};Tc.prototype.isErodedCompletely=function(t,n){var r=t.getCoordinates();if(r.length<4)return n<0;if(r.length===4)return this.isTriangleErodedCompletely(r,n);var i=t.getEnvelopeInternal(),a=Math.min(i.getHeight(),i.getWidth());return n<0&&2*Math.abs(n)>a};Tc.prototype.addCollection=function(t){for(var n=this,r=0;r<t.getNumGeometries();r++){var i=t.getGeometryN(r);n.add(i)}};Tc.prototype.interfaces_=function(){return[]};Tc.prototype.getClass=function(){return Tc};var fx=function(){};fx.prototype.locate=function(t){};fx.prototype.interfaces_=function(){return[]};fx.prototype.getClass=function(){return fx};var Sp=function(){this._parent=null,this._atStart=null,this._max=null,this._index=null,this._subcollectionIterator=null;var t=arguments[0];this._parent=t,this._atStart=!0,this._index=0,this._max=t.getNumGeometries()};Sp.prototype.next=function(){if(this._atStart)return this._atStart=!1,Sp.isAtomic(this._parent)&&this._index++,this._parent;if(this._subcollectionIterator!==null){if(this._subcollectionIterator.hasNext())return this._subcollectionIterator.next();this._subcollectionIterator=null}if(this._index>=this._max)throw new ox;var t=this._parent.getGeometryN(this._index++);return t instanceof uu?(this._subcollectionIterator=new Sp(t),this._subcollectionIterator.next()):t};Sp.prototype.remove=function(){throw new Error(this.getClass().getName())};Sp.prototype.hasNext=function(){if(this._atStart)return!0;if(this._subcollectionIterator!==null){if(this._subcollectionIterator.hasNext())return!0;this._subcollectionIterator=null}return!(this._index>=this._max)};Sp.prototype.interfaces_=function(){return[ix]};Sp.prototype.getClass=function(){return Sp};Sp.isAtomic=function(t){return!(t instanceof uu)};var $l=function(){this._geom=null;var t=arguments[0];this._geom=t};$l.prototype.locate=function(t){return $l.locate(t,this._geom)};$l.prototype.interfaces_=function(){return[fx]};$l.prototype.getClass=function(){return $l};$l.isPointInRing=function(t,n){return n.getEnvelopeInternal().intersects(t)?on.isPointInRing(t,n.getCoordinates()):!1};$l.containsPointInPolygon=function(t,n){if(n.isEmpty())return!1;var r=n.getExteriorRing();if(!$l.isPointInRing(t,r))return!1;for(var i=0;i<n.getNumInteriorRing();i++){var a=n.getInteriorRingN(i);if($l.isPointInRing(t,a))return!1}return!0};$l.containsPoint=function(t,n){if(n instanceof Da)return $l.containsPointInPolygon(t,n);if(n instanceof uu)for(var r=new Sp(n);r.hasNext();){var i=r.next();if(i!==n&&$l.containsPoint(t,i))return!0}return!1};$l.locate=function(t,n){return n.isEmpty()?Kt.EXTERIOR:$l.containsPoint(t,n)?Kt.INTERIOR:Kt.EXTERIOR};var zs=function(){this._edgeMap=new Ns,this._edgeList=null,this._ptInAreaLocation=[Kt.NONE,Kt.NONE]};zs.prototype.getNextCW=function(t){this.getEdges();var n=this._edgeList.indexOf(t),r=n-1;return n===0&&(r=this._edgeList.size()-1),this._edgeList.get(r)};zs.prototype.propagateSideLabels=function(t){for(var n=Kt.NONE,r=this.iterator();r.hasNext();){var i=r.next(),a=i.getLabel();a.isArea(t)&&a.getLocation(t,ke.LEFT)!==Kt.NONE&&(n=a.getLocation(t,ke.LEFT))}if(n===Kt.NONE)return null;for(var o=n,u=this.iterator();u.hasNext();){var c=u.next(),g=c.getLabel();if(g.getLocation(t,ke.ON)===Kt.NONE&&g.setLocation(t,ke.ON,o),g.isArea(t)){var _=g.getLocation(t,ke.LEFT),E=g.getLocation(t,ke.RIGHT);if(E!==Kt.NONE){if(E!==o)throw new fd("side location conflict",c.getCoordinate());_===Kt.NONE&&lr.shouldNeverReachHere("found single null side (at "+c.getCoordinate()+")"),o=_}else lr.isTrue(g.getLocation(t,ke.LEFT)===Kt.NONE,"found single null side"),g.setLocation(t,ke.RIGHT,o),g.setLocation(t,ke.LEFT,o)}}};zs.prototype.getCoordinate=function(){var t=this.iterator();if(!t.hasNext())return null;var n=t.next();return n.getCoordinate()};zs.prototype.print=function(t){xs.out.println("EdgeEndStar: "+this.getCoordinate());for(var n=this.iterator();n.hasNext();){var r=n.next();r.print(t)}};zs.prototype.isAreaLabelsConsistent=function(t){return this.computeEdgeEndLabels(t.getBoundaryNodeRule()),this.checkAreaLabelsConsistent(0)};zs.prototype.checkAreaLabelsConsistent=function(t){var n=this.getEdges();if(n.size()<=0)return!0;var r=n.size()-1,i=n.get(r).getLabel(),a=i.getLocation(t,ke.LEFT);lr.isTrue(a!==Kt.NONE,"Found unlabelled area edge");for(var o=a,u=this.iterator();u.hasNext();){var c=u.next(),g=c.getLabel();lr.isTrue(g.isArea(t),"Found non-area edge");var _=g.getLocation(t,ke.LEFT),E=g.getLocation(t,ke.RIGHT);if(_===E||E!==o)return!1;o=_}return!0};zs.prototype.findIndex=function(t){var n=this;this.iterator();for(var r=0;r<this._edgeList.size();r++){var i=n._edgeList.get(r);if(i===t)return r}return-1};zs.prototype.iterator=function(){return this.getEdges().iterator()};zs.prototype.getEdges=function(){return this._edgeList===null&&(this._edgeList=new Ke(this._edgeMap.values())),this._edgeList};zs.prototype.getLocation=function(t,n,r){return this._ptInAreaLocation[t]===Kt.NONE&&(this._ptInAreaLocation[t]=$l.locate(n,r[t].getGeometry())),this._ptInAreaLocation[t]};zs.prototype.toString=function(){var t=new dh;t.append("EdgeEndStar: "+this.getCoordinate()),t.append(` `);for(var n=this.iterator();n.hasNext();){var r=n.next();t.append(r),t.append(` `)}return t.toString()};zs.prototype.computeEdgeEndLabels=function(t){for(var n=this.iterator();n.hasNext();){var r=n.next();r.computeLabel(t)}};zs.prototype.computeLabelling=function(t){var n=this;this.computeEdgeEndLabels(t[0].getBoundaryNodeRule()),this.propagateSideLabels(0),this.propagateSideLabels(1);for(var r=[!1,!1],i=this.iterator();i.hasNext();)for(var a=i.next(),o=a.getLabel(),u=0;u<2;u++)o.isLine(u)&&o.getLocation(u)===Kt.BOUNDARY&&(r[u]=!0);for(var c=this.iterator();c.hasNext();)for(var g=c.next(),_=g.getLabel(),E=0;E<2;E++)if(_.isAnyNull(E)){var C=Kt.NONE;if(r[E])C=Kt.EXTERIOR;else{var O=g.getCoordinate();C=n.getLocation(E,O,t)}_.setAllLocationsIfNull(E,C)}};zs.prototype.getDegree=function(){return this._edgeMap.size()};zs.prototype.insertEdgeEnd=function(t,n){this._edgeMap.put(t,n),this._edgeList=null};zs.prototype.interfaces_=function(){return[]};zs.prototype.getClass=function(){return zs};var zxt=function(e){function t(){e.call(this),this._resultAreaEdgeList=null,this._label=null,this._SCANNING_FOR_INCOMING=1,this._LINKING_TO_OUTGOING=2}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.linkResultDirectedEdges=function(){var r=this;this.getResultAreaEdges();for(var i=null,a=null,o=this._SCANNING_FOR_INCOMING,u=0;u<this._resultAreaEdgeList.size();u++){var c=r._resultAreaEdgeList.get(u),g=c.getSym();if(!!c.getLabel().isArea())switch(i===null&&c.isInResult()&&(i=c),o){case r._SCANNING_FOR_INCOMING:if(!g.isInResult())continue;a=g,o=r._LINKING_TO_OUTGOING;break;case r._LINKING_TO_OUTGOING:if(!c.isInResult())continue;a.setNext(c),o=r._SCANNING_FOR_INCOMING;break}}if(o===this._LINKING_TO_OUTGOING){if(i===null)throw new fd("no outgoing dirEdge found",this.getCoordinate());lr.isTrue(i.isInResult(),"unable to link last incoming dirEdge"),a.setNext(i)}},t.prototype.insert=function(r){var i=r;this.insertEdgeEnd(i,i)},t.prototype.getRightmostEdge=function(){var r=this.getEdges(),i=r.size();if(i<1)return null;var a=r.get(0);if(i===1)return a;var o=r.get(i-1),u=a.getQuadrant(),c=o.getQuadrant();return Ni.isNorthern(u)&&Ni.isNorthern(c)?a:!Ni.isNorthern(u)&&!Ni.isNorthern(c)?o:a.getDy()!==0?a:o.getDy()!==0?o:(lr.shouldNeverReachHere("found two horizontal edges incident on node"),null)},t.prototype.print=function(r){xs.out.println("DirectedEdgeStar: "+this.getCoordinate());for(var i=this.iterator();i.hasNext();){var a=i.next();r.print("out "),a.print(r),r.println(),r.print("in "),a.getSym().print(r),r.println()}},t.prototype.getResultAreaEdges=function(){var r=this;if(this._resultAreaEdgeList!==null)return this._resultAreaEdgeList;this._resultAreaEdgeList=new Ke;for(var i=this.iterator();i.hasNext();){var a=i.next();(a.isInResult()||a.getSym().isInResult())&&r._resultAreaEdgeList.add(a)}return this._resultAreaEdgeList},t.prototype.updateLabelling=function(r){for(var i=this.iterator();i.hasNext();){var a=i.next(),o=a.getLabel();o.setAllLocationsIfNull(0,r.getLocation(0)),o.setAllLocationsIfNull(1,r.getLocation(1))}},t.prototype.linkAllDirectedEdges=function(){var r=this;this.getEdges();for(var i=null,a=null,o=this._edgeList.size()-1;o>=0;o--){var u=r._edgeList.get(o),c=u.getSym();a===null&&(a=c),i!==null&&c.setNext(i),i=u}a.setNext(i)},t.prototype.computeDepths=function(){var r=this;if(arguments.length===1){var i=arguments[0],a=this.findIndex(i),o=i.getDepth(ke.LEFT),u=i.getDepth(ke.RIGHT),c=this.computeDepths(a+1,this._edgeList.size(),o),g=this.computeDepths(0,a,c);if(g!==u)throw new fd("depth mismatch at "+i.getCoordinate())}else if(arguments.length===3){for(var _=arguments[0],E=arguments[1],C=arguments[2],O=C,R=_;R<E;R++){var D=r._edgeList.get(R);D.setEdgeDepths(ke.RIGHT,O),O=D.getDepth(ke.LEFT)}return O}},t.prototype.mergeSymLabels=function(){for(var r=this.iterator();r.hasNext();){var i=r.next(),a=i.getLabel();a.merge(i.getSym().getLabel())}},t.prototype.linkMinimalDirectedEdges=function(r){for(var i=this,a=null,o=null,u=this._SCANNING_FOR_INCOMING,c=this._resultAreaEdgeList.size()-1;c>=0;c--){var g=i._resultAreaEdgeList.get(c),_=g.getSym();switch(a===null&&g.getEdgeRing()===r&&(a=g),u){case i._SCANNING_FOR_INCOMING:if(_.getEdgeRing()!==r)continue;o=_,u=i._LINKING_TO_OUTGOING;break;case i._LINKING_TO_OUTGOING:if(g.getEdgeRing()!==r)continue;o.setNextMin(g),u=i._SCANNING_FOR_INCOMING;break}}u===this._LINKING_TO_OUTGOING&&(lr.isTrue(a!==null,"found null for first outgoing dirEdge"),lr.isTrue(a.getEdgeRing()===r,"unable to link last incoming dirEdge"),o.setNextMin(a))},t.prototype.getOutgoingDegree=function(){if(arguments.length===0){for(var r=0,i=this.iterator();i.hasNext();){var a=i.next();a.isInResult()&&r++}return r}else if(arguments.length===1){for(var o=arguments[0],u=0,c=this.iterator();c.hasNext();){var g=c.next();g.getEdgeRing()===o&&u++}return u}},t.prototype.getLabel=function(){return this._label},t.prototype.findCoveredLineEdges=function(){for(var r=Kt.NONE,i=this.iterator();i.hasNext();){var a=i.next(),o=a.getSym();if(!a.isLineEdge()){if(a.isInResult()){r=Kt.INTERIOR;break}if(o.isInResult()){r=Kt.EXTERIOR;break}}}if(r===Kt.NONE)return null;for(var u=r,c=this.iterator();c.hasNext();){var g=c.next(),_=g.getSym();g.isLineEdge()?g.getEdge().setCovered(u===Kt.INTERIOR):(g.isInResult()&&(u=Kt.EXTERIOR),_.isInResult()&&(u=Kt.INTERIOR))}},t.prototype.computeLabelling=function(r){var i=this;e.prototype.computeLabelling.call(this,r),this._label=new Ci(Kt.NONE);for(var a=this.iterator();a.hasNext();)for(var o=a.next(),u=o.getEdge(),c=u.getLabel(),g=0;g<2;g++){var _=c.getLocation(g);(_===Kt.INTERIOR||_===Kt.BOUNDARY)&&i._label.setLocation(g,Kt.INTERIOR)}},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(zs),B8=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.createNode=function(r){return new NI(r,new zxt)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(ux),vg=function e(){this._pts=null,this._orientation=null;var t=arguments[0];this._pts=t,this._orientation=e.orientation(t)};vg.prototype.compareTo=function(t){var n=t,r=vg.compareOriented(this._pts,this._orientation,n._pts,n._orientation);return r};vg.prototype.interfaces_=function(){return[wc]};vg.prototype.getClass=function(){return vg};vg.orientation=function(t){return Mr.increasingDirection(t)===1};vg.compareOriented=function(t,n,r,i){for(var a=n?1:-1,o=i?1:-1,u=n?t.length:-1,c=i?r.length:-1,g=n?0:t.length-1,_=i?0:r.length-1;;){var E=t[g].compareTo(r[_]);if(E!==0)return E;g+=a,_+=o;var C=g===u,O=_===c;if(C&&!O)return-1;if(!C&&O)return 1;if(C&&O)return 0}};var Sf=function(){this._edges=new Ke,this._ocaMap=new Ns};Sf.prototype.print=function(t){var n=this;t.print("MULTILINESTRING ( ");for(var r=0;r<this._edges.size();r++){var i=n._edges.get(r);r>0&&t.print(","),t.print("(");for(var a=i.getCoordinates(),o=0;o<a.length;o++)o>0&&t.print(","),t.print(a[o].x+" "+a[o].y);t.println(")")}t.print(") ")};Sf.prototype.addAll=function(t){for(var n=this,r=t.iterator();r.hasNext();)n.add(r.next())};Sf.prototype.findEdgeIndex=function(t){for(var n=this,r=0;r<this._edges.size();r++)if(n._edges.get(r).equals(t))return r;return-1};Sf.prototype.iterator=function(){return this._edges.iterator()};Sf.prototype.getEdges=function(){return this._edges};Sf.prototype.get=function(t){return this._edges.get(t)};Sf.prototype.findEqualEdge=function(t){var n=new vg(t.getCoordinates()),r=this._ocaMap.get(n);return r};Sf.prototype.add=function(t){this._edges.add(t);var n=new vg(t.getCoordinates());this._ocaMap.put(n,t)};Sf.prototype.interfaces_=function(){return[]};Sf.prototype.getClass=function(){return Sf};var Xm=function(){};Xm.prototype.processIntersections=function(t,n,r,i){};Xm.prototype.isDone=function(){};Xm.prototype.interfaces_=function(){return[]};Xm.prototype.getClass=function(){return Xm};var jl=function(){this._hasIntersection=!1,this._hasProper=!1,this._hasProperInterior=!1,this._hasInterior=!1,this._properIntersectionPoint=null,this._li=null,this._isSelfIntersection=null,this.numIntersections=0,this.numInteriorIntersections=0,this.numProperIntersections=0,this.numTests=0;var t=arguments[0];this._li=t};jl.prototype.isTrivialIntersection=function(t,n,r,i){if(t===r&&this._li.getIntersectionNum()===1){if(jl.isAdjacentSegments(n,i))return!0;if(t.isClosed()){var a=t.size()-1;if(n===0&&i===a||i===0&&n===a)return!0}}return!1};jl.prototype.getProperIntersectionPoint=function(){return this._properIntersectionPoint};jl.prototype.hasProperInteriorIntersection=function(){return this._hasProperInterior};jl.prototype.getLineIntersector=function(){return this._li};jl.prototype.hasProperIntersection=function(){return this._hasProper};jl.prototype.processIntersections=function(t,n,r,i){if(t===r&&n===i)return null;this.numTests++;var a=t.getCoordinates()[n],o=t.getCoordinates()[n+1],u=r.getCoordinates()[i],c=r.getCoordinates()[i+1];this._li.computeIntersection(a,o,u,c),this._li.hasIntersection()&&(this.numIntersections++,this._li.isInteriorIntersection()&&(this.numInteriorIntersections++,this._hasInterior=!0),this.isTrivialIntersection(t,n,r,i)||(this._hasIntersection=!0,t.addIntersections(this._li,n,0),r.addIntersections(this._li,i,1),this._li.isProper()&&(this.numProperIntersections++,this._hasProper=!0,this._hasProperInterior=!0)))};jl.prototype.hasIntersection=function(){return this._hasIntersection};jl.prototype.isDone=function(){return!1};jl.prototype.hasInteriorIntersection=function(){return this._hasInterior};jl.prototype.interfaces_=function(){return[Xm]};jl.prototype.getClass=function(){return jl};jl.isAdjacentSegments=function(t,n){return Math.abs(t-n)===1};var Ch=function(){this.coord=null,this.segmentIndex=null,this.dist=null;var t=arguments[0],n=arguments[1],r=arguments[2];this.coord=new Xt(t),this.segmentIndex=n,this.dist=r};Ch.prototype.getSegmentIndex=function(){return this.segmentIndex};Ch.prototype.getCoordinate=function(){return this.coord};Ch.prototype.print=function(t){t.print(this.coord),t.print(" seg # = "+this.segmentIndex),t.println(" dist = "+this.dist)};Ch.prototype.compareTo=function(t){var n=t;return this.compare(n.segmentIndex,n.dist)};Ch.prototype.isEndPoint=function(t){return this.segmentIndex===0&&this.dist===0||this.segmentIndex===t};Ch.prototype.toString=function(){return this.coord+" seg # = "+this.segmentIndex+" dist = "+this.dist};Ch.prototype.getDistance=function(){return this.dist};Ch.prototype.compare=function(t,n){return this.segmentIndex<t?-1:this.segmentIndex>t?1:this.dist<n?-1:this.dist>n?1:0};Ch.prototype.interfaces_=function(){return[wc]};Ch.prototype.getClass=function(){return Ch};var Ep=function(){this._nodeMap=new Ns,this.edge=null;var t=arguments[0];this.edge=t};Ep.prototype.print=function(t){t.println("Intersections:");for(var n=this.iterator();n.hasNext();){var r=n.next();r.print(t)}};Ep.prototype.iterator=function(){return this._nodeMap.values().iterator()};Ep.prototype.addSplitEdges=function(t){var n=this;this.addEndpoints();for(var r=this.iterator(),i=r.next();r.hasNext();){var a=r.next(),o=n.createSplitEdge(i,a);t.add(o),i=a}};Ep.prototype.addEndpoints=function(){var t=this.edge.pts.length-1;this.add(this.edge.pts[0],0,0),this.add(this.edge.pts[t],t,0)};Ep.prototype.createSplitEdge=function(t,n){var r=this,i=n.segmentIndex-t.segmentIndex+2,a=this.edge.pts[n.segmentIndex],o=n.dist>0||!n.coord.equals2D(a);o||i--;var u=new Array(i).fill(null),c=0;u[c++]=new Xt(t.coord);for(var g=t.segmentIndex+1;g<=n.segmentIndex;g++)u[c++]=r.edge.pts[g];return o&&(u[c]=n.coord),new zI(u,new Ci(this.edge._label))};Ep.prototype.add=function(t,n,r){var i=new Ch(t,n,r),a=this._nodeMap.get(i);return a!==null?a:(this._nodeMap.put(i,i),i)};Ep.prototype.isIntersection=function(t){for(var n=this.iterator();n.hasNext();){var r=n.next();if(r.coord.equals(t))return!0}return!1};Ep.prototype.interfaces_=function(){return[]};Ep.prototype.getClass=function(){return Ep};var Ym=function(){};Ym.prototype.getChainStartIndices=function(t){var n=this,r=0,i=new Ke;i.add(new gh(r));do{var a=n.findChainEnd(t,r);i.add(new gh(a)),r=a}while(r<t.length-1);var o=Ym.toIntArray(i);return o};Ym.prototype.findChainEnd=function(t,n){for(var r=Ni.quadrant(t[n],t[n+1]),i=n+1;i<t.length;){var a=Ni.quadrant(t[i-1],t[i]);if(a!==r)break;i++}return i-1};Ym.prototype.interfaces_=function(){return[]};Ym.prototype.getClass=function(){return Ym};Ym.toIntArray=function(t){for(var n=new Array(t.size()).fill(null),r=0;r<n.length;r++)n[r]=t.get(r).intValue();return n};var dd=function(){this.e=null,this.pts=null,this.startIndex=null,this.env1=new In,this.env2=new In;var t=arguments[0];this.e=t,this.pts=t.getCoordinates();var n=new Ym;this.startIndex=n.getChainStartIndices(this.pts)};dd.prototype.getCoordinates=function(){return this.pts};dd.prototype.getMaxX=function(t){var n=this.pts[this.startIndex[t]].x,r=this.pts[this.startIndex[t+1]].x;return n>r?n:r};dd.prototype.getMinX=function(t){var n=this.pts[this.startIndex[t]].x,r=this.pts[this.startIndex[t+1]].x;return n<r?n:r};dd.prototype.computeIntersectsForChain=function(){if(arguments.length===4){var t=arguments[0],n=arguments[1],r=arguments[2],i=arguments[3];this.computeIntersectsForChain(this.startIndex[t],this.startIndex[t+1],n,n.startIndex[r],n.startIndex[r+1],i)}else if(arguments.length===6){var a=arguments[0],o=arguments[1],u=arguments[2],c=arguments[3],g=arguments[4],_=arguments[5],E=this.pts[a],C=this.pts[o],O=u.pts[c],R=u.pts[g];if(o-a==1&&g-c==1)return _.addIntersections(this.e,a,u.e,c),null;if(this.env1.init(E,C),this.env2.init(O,R),!this.env1.intersects(this.env2))return null;var D=Math.trunc((a+o)/2),B=Math.trunc((c+g)/2);a<D&&(c<B&&this.computeIntersectsForChain(a,D,u,c,B,_),B<g&&this.computeIntersectsForChain(a,D,u,B,g,_)),D<o&&(c<B&&this.computeIntersectsForChain(D,o,u,c,B,_),B<g&&this.computeIntersectsForChain(D,o,u,B,g,_))}};dd.prototype.getStartIndexes=function(){return this.startIndex};dd.prototype.computeIntersects=function(t,n){for(var r=this,i=0;i<this.startIndex.length-1;i++)for(var a=0;a<t.startIndex.length-1;a++)r.computeIntersectsForChain(i,t,a,n)};dd.prototype.interfaces_=function(){return[]};dd.prototype.getClass=function(){return dd};var bs=function e(){var t=this;this._depth=Array(2).fill().map(function(){return Array(3)});for(var n=0;n<2;n++)for(var r=0;r<3;r++)t._depth[n][r]=e.NULL_VALUE},U8={NULL_VALUE:{configurable:!0}};bs.prototype.getDepth=function(t,n){return this._depth[t][n]};bs.prototype.setDepth=function(t,n,r){this._depth[t][n]=r};bs.prototype.isNull=function(){var t=this;if(arguments.length===0){for(var n=0;n<2;n++)for(var r=0;r<3;r++)if(t._depth[n][r]!==bs.NULL_VALUE)return!1;return!0}else if(arguments.length===1){var i=arguments[0];return this._depth[i][1]===bs.NULL_VALUE}else if(arguments.length===2){var a=arguments[0],o=arguments[1];return this._depth[a][o]===bs.NULL_VALUE}};bs.prototype.normalize=function(){for(var t=this,n=0;n<2;n++)if(!t.isNull(n)){var r=t._depth[n][1];t._depth[n][2]<r&&(r=t._depth[n][2]),r<0&&(r=0);for(var i=1;i<3;i++){var a=0;t._depth[n][i]>r&&(a=1),t._depth[n][i]=a}}};bs.prototype.getDelta=function(t){return this._depth[t][ke.RIGHT]-this._depth[t][ke.LEFT]};bs.prototype.getLocation=function(t,n){return this._depth[t][n]<=0?Kt.EXTERIOR:Kt.INTERIOR};bs.prototype.toString=function(){return"A: "+this._depth[0][1]+","+this._depth[0][2]+" B: "+this._depth[1][1]+","+this._depth[1][2]};bs.prototype.add=function(){var t=this;if(arguments.length===1)for(var n=arguments[0],r=0;r<2;r++)for(var i=1;i<3;i++){var a=n.getLocation(r,i);(a===Kt.EXTERIOR||a===Kt.INTERIOR)&&(t.isNull(r,i)?t._depth[r][i]=bs.depthAtLocation(a):t._depth[r][i]+=bs.depthAtLocation(a))}else if(arguments.length===3){var o=arguments[0],u=arguments[1],c=arguments[2];c===Kt.INTERIOR&&this._depth[o][u]++}};bs.prototype.interfaces_=function(){return[]};bs.prototype.getClass=function(){return bs};bs.depthAtLocation=function(t){return t===Kt.EXTERIOR?0:t===Kt.INTERIOR?1:bs.NULL_VALUE};U8.NULL_VALUE.get=function(){return-1};Object.defineProperties(bs,U8);var zI=function(e){function t(){if(e.call(this),this.pts=null,this._env=null,this.eiList=new Ep(this),this._name=null,this._mce=null,this._isIsolated=!0,this._depth=new bs,this._depthDelta=0,arguments.length===1){var n=arguments[0];t.call(this,n,null)}else if(arguments.length===2){var r=arguments[0],i=arguments[1];this.pts=r,this._label=i}}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getDepth=function(){return this._depth},t.prototype.getCollapsedEdge=function(){var r=new Array(2).fill(null);r[0]=this.pts[0],r[1]=this.pts[1];var i=new t(r,Ci.toLineLabel(this._label));return i},t.prototype.isIsolated=function(){return this._isIsolated},t.prototype.getCoordinates=function(){return this.pts},t.prototype.setIsolated=function(r){this._isIsolated=r},t.prototype.setName=function(r){this._name=r},t.prototype.equals=function(r){var i=this;if(!(r instanceof t))return!1;var a=r;if(this.pts.length!==a.pts.length)return!1;for(var o=!0,u=!0,c=this.pts.length,g=0;g<this.pts.length;g++)if(i.pts[g].equals2D(a.pts[g])||(o=!1),i.pts[g].equals2D(a.pts[--c])||(u=!1),!o&&!u)return!1;return!0},t.prototype.getCoordinate=function(){if(arguments.length===0)return this.pts.length>0?this.pts[0]:null;if(arguments.length===1){var r=arguments[0];return this.pts[r]}},t.prototype.print=function(r){var i=this;r.print("edge "+this._name+": "),r.print("LINESTRING (");for(var a=0;a<this.pts.length;a++)a>0&&r.print(","),r.print(i.pts[a].x+" "+i.pts[a].y);r.print(") "+this._label+" "+this._depthDelta)},t.prototype.computeIM=function(r){t.updateIM(this._label,r)},t.prototype.isCollapsed=function(){return!this._label.isArea()||this.pts.length!==3?!1:!!this.pts[0].equals(this.pts[2])},t.prototype.isClosed=function(){return this.pts[0].equals(this.pts[this.pts.length-1])},t.prototype.getMaximumSegmentIndex=function(){return this.pts.length-1},t.prototype.getDepthDelta=function(){return this._depthDelta},t.prototype.getNumPoints=function(){return this.pts.length},t.prototype.printReverse=function(r){var i=this;r.print("edge "+this._name+": ");for(var a=this.pts.length-1;a>=0;a--)r.print(i.pts[a]+" ");r.println("")},t.prototype.getMonotoneChainEdge=function(){return this._mce===null&&(this._mce=new dd(this)),this._mce},t.prototype.getEnvelope=function(){var r=this;if(this._env===null){this._env=new In;for(var i=0;i<this.pts.length;i++)r._env.expandToInclude(r.pts[i])}return this._env},t.prototype.addIntersection=function(r,i,a,o){var u=new Xt(r.getIntersection(o)),c=i,g=r.getEdgeDistance(a,o),_=c+1;if(_<this.pts.length){var E=this.pts[_];u.equals2D(E)&&(c=_,g=0)}this.eiList.add(u,c,g)},t.prototype.toString=function(){var r=this,i=new dh;i.append("edge "+this._name+": "),i.append("LINESTRING (");for(var a=0;a<this.pts.length;a++)a>0&&i.append(","),i.append(r.pts[a].x+" "+r.pts[a].y);return i.append(") "+this._label+" "+this._depthDelta),i.toString()},t.prototype.isPointwiseEqual=function(r){var i=this;if(this.pts.length!==r.pts.length)return!1;for(var a=0;a<this.pts.length;a++)if(!i.pts[a].equals2D(r.pts[a]))return!1;return!0},t.prototype.setDepthDelta=function(r){this._depthDelta=r},t.prototype.getEdgeIntersectionList=function(){return this.eiList},t.prototype.addIntersections=function(r,i,a){for(var o=this,u=0;u<r.getIntersectionNum();u++)o.addIntersection(r,i,a,u)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t.updateIM=function(){if(arguments.length===2){var r=arguments[0],i=arguments[1];i.setAtLeastIfValid(r.getLocation(0,ke.ON),r.getLocation(1,ke.ON),1),r.isArea()&&(i.setAtLeastIfValid(r.getLocation(0,ke.LEFT),r.getLocation(1,ke.LEFT),2),i.setAtLeastIfValid(r.getLocation(0,ke.RIGHT),r.getLocation(1,ke.RIGHT),2))}else return e.prototype.updateIM.apply(this,arguments)},t}(Ul),fu=function(t){this._workingPrecisionModel=null,this._workingNoder=null,this._geomFact=null,this._graph=null,this._edgeList=new Sf,this._bufParams=t||null};fu.prototype.setWorkingPrecisionModel=function(t){this._workingPrecisionModel=t};fu.prototype.insertUniqueEdge=function(t){var n=this._edgeList.findEqualEdge(t);if(n!==null){var r=n.getLabel(),i=t.getLabel();n.isPointwiseEqual(t)||(i=new Ci(t.getLabel()),i.flip()),r.merge(i);var a=fu.depthDelta(i),o=n.getDepthDelta(),u=o+a;n.setDepthDelta(u)}else this._edgeList.add(t),t.setDepthDelta(fu.depthDelta(t.getLabel()))};fu.prototype.buildSubgraphs=function(t,n){for(var r=new Ke,i=t.iterator();i.hasNext();){var a=i.next(),o=a.getRightmostCoordinate(),u=new Ey(r),c=u.getDepth(o);a.computeDepth(c),a.findResultEdges(),r.add(a),n.add(a.getDirectedEdges(),a.getNodes())}};fu.prototype.createSubgraphs=function(t){for(var n=new Ke,r=t.getNodes().iterator();r.hasNext();){var i=r.next();if(!i.isVisited()){var a=new lu;a.create(i),n.add(a)}}return wf.sort(n,wf.reverseOrder()),n};fu.prototype.createEmptyResultGeometry=function(){var t=this._geomFact.createPolygon();return t};fu.prototype.getNoder=function(t){if(this._workingNoder!==null)return this._workingNoder;var n=new tk,r=new $m;return r.setPrecisionModel(t),n.setSegmentIntersector(new jl(r)),n};fu.prototype.buffer=function(t,n){var r=this._workingPrecisionModel;r===null&&(r=t.getPrecisionModel()),this._geomFact=t.getFactory();var i=new Du(r,this._bufParams),a=new Tc(t,n,i),o=a.getCurves();if(o.size()<=0)return this.createEmptyResultGeometry();this.computeNodedEdges(o,r),this._graph=new Po(new B8),this._graph.addEdges(this._edgeList.getEdges());var u=this.createSubgraphs(this._graph),c=new dl(this._geomFact);this.buildSubgraphs(u,c);var g=c.getPolygons();if(g.size()<=0)return this.createEmptyResultGeometry();var _=this._geomFact.buildGeometry(g);return _};fu.prototype.computeNodedEdges=function(t,n){var r=this,i=this.getNoder(n);i.computeNodes(t);for(var a=i.getNodedSubstrings(),o=a.iterator();o.hasNext();){var u=o.next(),c=u.getCoordinates();if(!(c.length===2&&c[0].equals2D(c[1]))){var g=u.getData(),_=new zI(u.getCoordinates(),new Ci(g));r.insertUniqueEdge(_)}}};fu.prototype.setNoder=function(t){this._workingNoder=t};fu.prototype.interfaces_=function(){return[]};fu.prototype.getClass=function(){return fu};fu.depthDelta=function(t){var n=t.getLocation(0,ke.LEFT),r=t.getLocation(0,ke.RIGHT);return n===Kt.INTERIOR&&r===Kt.EXTERIOR?1:n===Kt.EXTERIOR&&r===Kt.INTERIOR?-1:0};fu.convertSegStrings=function(t){for(var n=new Fr,r=new Ke;t.hasNext();){var i=t.next(),a=n.createLineString(i.getCoordinates());r.add(a)}return n.buildGeometry(r)};var yg=function(){if(this._noder=null,this._scaleFactor=null,this._offsetX=null,this._offsetY=null,this._isScaled=!1,arguments.length===2){var t=arguments[0],n=arguments[1];this._noder=t,this._scaleFactor=n,this._offsetX=0,this._offsetY=0,this._isScaled=!this.isIntegerPrecision()}else if(arguments.length===4){var r=arguments[0],i=arguments[1],a=arguments[2],o=arguments[3];this._noder=r,this._scaleFactor=i,this._offsetX=a,this._offsetY=o,this._isScaled=!this.isIntegerPrecision()}};yg.prototype.rescale=function(){var t=this;if($n(arguments[0],ka))for(var n=arguments[0],r=n.iterator();r.hasNext();){var i=r.next();t.rescale(i.getCoordinates())}else if(arguments[0]instanceof Array){for(var a=arguments[0],o=0;o<a.length;o++)a[o].x=a[o].x/t._scaleFactor+t._offsetX,a[o].y=a[o].y/t._scaleFactor+t._offsetY;a.length===2&&a[0].equals2D(a[1])&&xs.out.println(a)}};yg.prototype.scale=function(){var t=this;if($n(arguments[0],ka)){for(var n=arguments[0],r=new Ke,i=n.iterator();i.hasNext();){var a=i.next();r.add(new ia(t.scale(a.getCoordinates()),a.getData()))}return r}else if(arguments[0]instanceof Array){for(var o=arguments[0],u=new Array(o.length).fill(null),c=0;c<o.length;c++)u[c]=new Xt(Math.round((o[c].x-t._offsetX)*t._scaleFactor),Math.round((o[c].y-t._offsetY)*t._scaleFactor),o[c].z);var g=Mr.removeRepeatedPoints(u);return g}};yg.prototype.isIntegerPrecision=function(){return this._scaleFactor===1};yg.prototype.getNodedSubstrings=function(){var t=this._noder.getNodedSubstrings();return this._isScaled&&this.rescale(t),t};yg.prototype.computeNodes=function(t){var n=t;this._isScaled&&(n=this.scale(t)),this._noder.computeNodes(n)};yg.prototype.interfaces_=function(){return[Wm]};yg.prototype.getClass=function(){return yg};var Ih=function(){this._li=new $m,this._segStrings=null;var t=arguments[0];this._segStrings=t},V8={fact:{configurable:!0}};Ih.prototype.checkEndPtVertexIntersections=function(){var t=this;if(arguments.length===0)for(var n=this._segStrings.iterator();n.hasNext();){var r=n.next(),i=r.getCoordinates();t.checkEndPtVertexIntersections(i[0],t._segStrings),t.checkEndPtVertexIntersections(i[i.length-1],t._segStrings)}else if(arguments.length===2){for(var a=arguments[0],o=arguments[1],u=o.iterator();u.hasNext();)for(var c=u.next(),g=c.getCoordinates(),_=1;_<g.length-1;_++)if(g[_].equals(a))throw new ad("found endpt/interior pt intersection at index "+_+" :pt "+a)}};Ih.prototype.checkInteriorIntersections=function(){var t=this;if(arguments.length===0)for(var n=this._segStrings.iterator();n.hasNext();)for(var r=n.next(),i=this._segStrings.iterator();i.hasNext();){var a=i.next();t.checkInteriorIntersections(r,a)}else if(arguments.length===2)for(var o=arguments[0],u=arguments[1],c=o.getCoordinates(),g=u.getCoordinates(),_=0;_<c.length-1;_++)for(var E=0;E<g.length-1;E++)t.checkInteriorIntersections(o,_,u,E);else if(arguments.length===4){var C=arguments[0],O=arguments[1],R=arguments[2],D=arguments[3];if(C===R&&O===D)return null;var B=C.getCoordinates()[O],z=C.getCoordinates()[O+1],k=R.getCoordinates()[D],$=R.getCoordinates()[D+1];if(this._li.computeIntersection(B,z,k,$),this._li.hasIntersection()&&(this._li.isProper()||this.hasInteriorIntersection(this._li,B,z)||this.hasInteriorIntersection(this._li,k,$)))throw new ad("found non-noded intersection at "+B+"-"+z+" and "+k+"-"+$)}};Ih.prototype.checkValid=function(){this.checkEndPtVertexIntersections(),this.checkInteriorIntersections(),this.checkCollapses()};Ih.prototype.checkCollapses=function(){var t=this;if(arguments.length===0)for(var n=this._segStrings.iterator();n.hasNext();){var r=n.next();t.checkCollapses(r)}else if(arguments.length===1)for(var i=arguments[0],a=i.getCoordinates(),o=0;o<a.length-2;o++)t.checkCollapse(a[o],a[o+1],a[o+2])};Ih.prototype.hasInteriorIntersection=function(t,n,r){for(var i=0;i<t.getIntersectionNum();i++){var a=t.getIntersection(i);if(!(a.equals(n)||a.equals(r)))return!0}return!1};Ih.prototype.checkCollapse=function(t,n,r){if(t.equals(r))throw new ad("found non-noded collapse at "+Ih.fact.createLineString([t,n,r]))};Ih.prototype.interfaces_=function(){return[]};Ih.prototype.getClass=function(){return Ih};V8.fact.get=function(){return new Fr};Object.defineProperties(Ih,V8);var Nu=function(){this._li=null,this._pt=null,this._originalPt=null,this._ptScaled=null,this._p0Scaled=null,this._p1Scaled=null,this._scaleFactor=null,this._minx=null,this._maxx=null,this._miny=null,this._maxy=null,this._corner=new Array(4).fill(null),this._safeEnv=null;var t=arguments[0],n=arguments[1],r=arguments[2];if(this._originalPt=t,this._pt=t,this._scaleFactor=n,this._li=r,n<=0)throw new wo;n!==1&&(this._pt=new Xt(this.scale(t.x),this.scale(t.y)),this._p0Scaled=new Xt,this._p1Scaled=new Xt),this.initCorners(this._pt)},$8={SAFE_ENV_EXPANSION_FACTOR:{configurable:!0}};Nu.prototype.intersectsScaled=function(t,n){var r=Math.min(t.x,n.x),i=Math.max(t.x,n.x),a=Math.min(t.y,n.y),o=Math.max(t.y,n.y),u=this._maxx<r||this._minx>i||this._maxy<a||this._miny>o;if(u)return!1;var c=this.intersectsToleranceSquare(t,n);return lr.isTrue(!(u&&c),"Found bad envelope test"),c};Nu.prototype.initCorners=function(t){var n=.5;this._minx=t.x-n,this._maxx=t.x+n,this._miny=t.y-n,this._maxy=t.y+n,this._corner[0]=new Xt(this._maxx,this._maxy),this._corner[1]=new Xt(this._minx,this._maxy),this._corner[2]=new Xt(this._minx,this._miny),this._corner[3]=new Xt(this._maxx,this._miny)};Nu.prototype.intersects=function(t,n){return this._scaleFactor===1?this.intersectsScaled(t,n):(this.copyScaled(t,this._p0Scaled),this.copyScaled(n,this._p1Scaled),this.intersectsScaled(this._p0Scaled,this._p1Scaled))};Nu.prototype.scale=function(t){return Math.round(t*this._scaleFactor)};Nu.prototype.getCoordinate=function(){return this._originalPt};Nu.prototype.copyScaled=function(t,n){n.x=this.scale(t.x),n.y=this.scale(t.y)};Nu.prototype.getSafeEnvelope=function(){if(this._safeEnv===null){var t=Nu.SAFE_ENV_EXPANSION_FACTOR/this._scaleFactor;this._safeEnv=new In(this._originalPt.x-t,this._originalPt.x+t,this._originalPt.y-t,this._originalPt.y+t)}return this._safeEnv};Nu.prototype.intersectsPixelClosure=function(t,n){return this._li.computeIntersection(t,n,this._corner[0],this._corner[1]),!!(this._li.hasIntersection()||(this._li.computeIntersection(t,n,this._corner[1],this._corner[2]),this._li.hasIntersection())||(this._li.computeIntersection(t,n,this._corner[2],this._corner[3]),this._li.hasIntersection())||(this._li.computeIntersection(t,n,this._corner[3],this._corner[0]),this._li.hasIntersection()))};Nu.prototype.intersectsToleranceSquare=function(t,n){var r=!1,i=!1;return this._li.computeIntersection(t,n,this._corner[0],this._corner[1]),!!(this._li.isProper()||(this._li.computeIntersection(t,n,this._corner[1],this._corner[2]),this._li.isProper())||(this._li.hasIntersection()&&(r=!0),this._li.computeIntersection(t,n,this._corner[2],this._corner[3]),this._li.isProper())||(this._li.hasIntersection()&&(i=!0),this._li.computeIntersection(t,n,this._corner[3],this._corner[0]),this._li.isProper())||r&&i||t.equals(this._pt)||n.equals(this._pt))};Nu.prototype.addSnappedNode=function(t,n){var r=t.getCoordinate(n),i=t.getCoordinate(n+1);return this.intersects(r,i)?(t.addIntersection(this.getCoordinate(),n),!0):!1};Nu.prototype.interfaces_=function(){return[]};Nu.prototype.getClass=function(){return Nu};$8.SAFE_ENV_EXPANSION_FACTOR.get=function(){return .75};Object.defineProperties(Nu,$8);var bw=function(){this.tempEnv1=new In,this.selectedSegment=new Tn};bw.prototype.select=function(){if(arguments.length!==1){if(arguments.length===2){var t=arguments[0],n=arguments[1];t.getLineSegment(n,this.selectedSegment),this.select(this.selectedSegment)}}};bw.prototype.interfaces_=function(){return[]};bw.prototype.getClass=function(){return bw};var hx=function(){this._index=null;var t=arguments[0];this._index=t},j8={HotPixelSnapAction:{configurable:!0}};hx.prototype.snap=function(){if(arguments.length===1){var t=arguments[0];return this.snap(t,null,-1)}else if(arguments.length===3){var n=arguments[0],r=arguments[1],i=arguments[2],a=n.getSafeEnvelope(),o=new q8(n,r,i);return this._index.query(a,{interfaces_:function(){return[gg]},visitItem:function(u){var c=u;c.select(a,o)}}),o.isNodeAdded()}};hx.prototype.interfaces_=function(){return[]};hx.prototype.getClass=function(){return hx};j8.HotPixelSnapAction.get=function(){return q8};Object.defineProperties(hx,j8);var q8=function(e){function t(){e.call(this),this._hotPixel=null,this._parentEdge=null,this._hotPixelVertexIndex=null,this._isNodeAdded=!1;var n=arguments[0],r=arguments[1],i=arguments[2];this._hotPixel=n,this._parentEdge=r,this._hotPixelVertexIndex=i}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.isNodeAdded=function(){return this._isNodeAdded},t.prototype.select=function(){if(arguments.length===2){var r=arguments[0],i=arguments[1],a=r.getContext();if(this._parentEdge!==null&&a===this._parentEdge&&i===this._hotPixelVertexIndex)return null;this._isNodeAdded=this._hotPixel.addSnappedNode(a,i)}else return e.prototype.select.apply(this,arguments)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(bw),Cy=function(){this._li=null,this._interiorIntersections=null;var t=arguments[0];this._li=t,this._interiorIntersections=new Ke};Cy.prototype.processIntersections=function(t,n,r,i){var a=this;if(t===r&&n===i)return null;var o=t.getCoordinates()[n],u=t.getCoordinates()[n+1],c=r.getCoordinates()[i],g=r.getCoordinates()[i+1];if(this._li.computeIntersection(o,u,c,g),this._li.hasIntersection()&&this._li.isInteriorIntersection()){for(var _=0;_<this._li.getIntersectionNum();_++)a._interiorIntersections.add(a._li.getIntersection(_));t.addIntersections(this._li,n,0),r.addIntersections(this._li,i,1)}};Cy.prototype.isDone=function(){return!1};Cy.prototype.getInteriorIntersections=function(){return this._interiorIntersections};Cy.prototype.interfaces_=function(){return[Xm]};Cy.prototype.getClass=function(){return Cy};var Cp=function(){this._pm=null,this._li=null,this._scaleFactor=null,this._noder=null,this._pointSnapper=null,this._nodedSegStrings=null;var t=arguments[0];this._pm=t,this._li=new $m,this._li.setPrecisionModel(t),this._scaleFactor=t.getScale()};Cp.prototype.checkCorrectness=function(t){var n=ia.getNodedSubstrings(t),r=new Ih(n);try{r.checkValid()}catch(i){if(i instanceof E8)i.printStackTrace();else throw i}finally{}};Cp.prototype.getNodedSubstrings=function(){return ia.getNodedSubstrings(this._nodedSegStrings)};Cp.prototype.snapRound=function(t,n){var r=this.findInteriorIntersections(t,n);this.computeIntersectionSnaps(r),this.computeVertexSnaps(t)};Cp.prototype.findInteriorIntersections=function(t,n){var r=new Cy(n);return this._noder.setSegmentIntersector(r),this._noder.computeNodes(t),r.getInteriorIntersections()};Cp.prototype.computeVertexSnaps=function(){var t=this;if($n(arguments[0],ka))for(var n=arguments[0],r=n.iterator();r.hasNext();){var i=r.next();t.computeVertexSnaps(i)}else if(arguments[0]instanceof ia)for(var a=arguments[0],o=a.getCoordinates(),u=0;u<o.length;u++){var c=new Nu(o[u],t._scaleFactor,t._li),g=t._pointSnapper.snap(c,a,u);g&&a.addIntersection(o[u],u)}};Cp.prototype.computeNodes=function(t){this._nodedSegStrings=t,this._noder=new tk,this._pointSnapper=new hx(this._noder.getIndex()),this.snapRound(t,this._li)};Cp.prototype.computeIntersectionSnaps=function(t){for(var n=this,r=t.iterator();r.hasNext();){var i=r.next(),a=new Nu(i,n._scaleFactor,n._li);n._pointSnapper.snap(a)}};Cp.prototype.interfaces_=function(){return[Wm]};Cp.prototype.getClass=function(){return Cp};var Bs=function(){if(this._argGeom=null,this._distance=null,this._bufParams=new hi,this._resultGeometry=null,this._saveException=null,arguments.length===1){var t=arguments[0];this._argGeom=t}else if(arguments.length===2){var n=arguments[0],r=arguments[1];this._argGeom=n,this._bufParams=r}},px={CAP_ROUND:{configurable:!0},CAP_BUTT:{configurable:!0},CAP_FLAT:{configurable:!0},CAP_SQUARE:{configurable:!0},MAX_PRECISION_DIGITS:{configurable:!0}};Bs.prototype.bufferFixedPrecision=function(t){var n=new yg(new Cp(new xi(1)),t.getScale()),r=new fu(this._bufParams);r.setWorkingPrecisionModel(t),r.setNoder(n),this._resultGeometry=r.buffer(this._argGeom,this._distance)};Bs.prototype.bufferReducedPrecision=function(){var t=this;if(arguments.length===0){for(var n=Bs.MAX_PRECISION_DIGITS;n>=0;n--){try{t.bufferReducedPrecision(n)}catch(o){if(o instanceof fd)t._saveException=o;else throw o}finally{}if(t._resultGeometry!==null)return null}throw this._saveException}else if(arguments.length===1){var r=arguments[0],i=Bs.precisionScaleFactor(this._argGeom,this._distance,r),a=new xi(i);this.bufferFixedPrecision(a)}};Bs.prototype.computeGeometry=function(){if(this.bufferOriginalPrecision(),this._resultGeometry!==null)return null;var t=this._argGeom.getFactory().getPrecisionModel();t.getType()===xi.FIXED?this.bufferFixedPrecision(t):this.bufferReducedPrecision()};Bs.prototype.setQuadrantSegments=function(t){this._bufParams.setQuadrantSegments(t)};Bs.prototype.bufferOriginalPrecision=function(){try{var t=new fu(this._bufParams);this._resultGeometry=t.buffer(this._argGeom,this._distance)}catch(n){if(n instanceof ad)this._saveException=n;else throw n}finally{}};Bs.prototype.getResultGeometry=function(t){return this._distance=t,this.computeGeometry(),this._resultGeometry};Bs.prototype.setEndCapStyle=function(t){this._bufParams.setEndCapStyle(t)};Bs.prototype.interfaces_=function(){return[]};Bs.prototype.getClass=function(){return Bs};Bs.bufferOp=function(){if(arguments.length===2){var t=arguments[0],n=arguments[1],r=new Bs(t),i=r.getResultGeometry(n);return i}else if(arguments.length===3){if(Number.isInteger(arguments[2])&&arguments[0]instanceof Bn&&typeof arguments[1]=="number"){var a=arguments[0],o=arguments[1],u=arguments[2],c=new Bs(a);c.setQuadrantSegments(u);var g=c.getResultGeometry(o);return g}else if(arguments[2]instanceof hi&&arguments[0]instanceof Bn&&typeof arguments[1]=="number"){var _=arguments[0],E=arguments[1],C=arguments[2],O=new Bs(_,C),R=O.getResultGeometry(E);return R}}else if(arguments.length===4){var D=arguments[0],B=arguments[1],z=arguments[2],k=arguments[3],$=new Bs(D);$.setQuadrantSegments(z),$.setEndCapStyle(k);var K=$.getResultGeometry(B);return K}};Bs.precisionScaleFactor=function(t,n,r){var i=t.getEnvelopeInternal(),a=Bl.max(Math.abs(i.getMaxX()),Math.abs(i.getMaxY()),Math.abs(i.getMinX()),Math.abs(i.getMinY())),o=n>0?n:0,u=a+2*o,c=Math.trunc(Math.log(u)/Math.log(10)+1),g=r-c,_=Math.pow(10,g);return _};px.CAP_ROUND.get=function(){return hi.CAP_ROUND};px.CAP_BUTT.get=function(){return hi.CAP_FLAT};px.CAP_FLAT.get=function(){return hi.CAP_FLAT};px.CAP_SQUARE.get=function(){return hi.CAP_SQUARE};px.MAX_PRECISION_DIGITS.get=function(){return 12};Object.defineProperties(Bs,px);var hu=function(){this._pt=[new Xt,new Xt],this._distance=Kn.NaN,this._isNull=!0};hu.prototype.getCoordinates=function(){return this._pt};hu.prototype.getCoordinate=function(t){return this._pt[t]};hu.prototype.setMinimum=function(){if(arguments.length===1){var t=arguments[0];this.setMinimum(t._pt[0],t._pt[1])}else if(arguments.length===2){var n=arguments[0],r=arguments[1];if(this._isNull)return this.initialize(n,r),null;var i=n.distance(r);i<this._distance&&this.initialize(n,r,i)}};hu.prototype.initialize=function(){if(arguments.length===0)this._isNull=!0;else if(arguments.length===2){var t=arguments[0],n=arguments[1];this._pt[0].setCoordinate(t),this._pt[1].setCoordinate(n),this._distance=t.distance(n),this._isNull=!1}else if(arguments.length===3){var r=arguments[0],i=arguments[1],a=arguments[2];this._pt[0].setCoordinate(r),this._pt[1].setCoordinate(i),this._distance=a,this._isNull=!1}};hu.prototype.getDistance=function(){return this._distance};hu.prototype.setMaximum=function(){if(arguments.length===1){var t=arguments[0];this.setMaximum(t._pt[0],t._pt[1])}else if(arguments.length===2){var n=arguments[0],r=arguments[1];if(this._isNull)return this.initialize(n,r),null;var i=n.distance(r);i>this._distance&&this.initialize(n,r,i)}};hu.prototype.interfaces_=function(){return[]};hu.prototype.getClass=function(){return hu};var Ip=function(){};Ip.prototype.interfaces_=function(){return[]};Ip.prototype.getClass=function(){return Ip};Ip.computeDistance=function(){if(arguments[2]instanceof hu&&arguments[0]instanceof Uo&&arguments[1]instanceof Xt)for(var t=arguments[0],n=arguments[1],r=arguments[2],i=t.getCoordinates(),a=new Tn,o=0;o<i.length-1;o++){a.setCoordinates(i[o],i[o+1]);var u=a.closestPoint(n);r.setMinimum(u,n)}else if(arguments[2]instanceof hu&&arguments[0]instanceof Da&&arguments[1]instanceof Xt){var c=arguments[0],g=arguments[1],_=arguments[2];Ip.computeDistance(c.getExteriorRing(),g,_);for(var E=0;E<c.getNumInteriorRing();E++)Ip.computeDistance(c.getInteriorRingN(E),g,_)}else if(arguments[2]instanceof hu&&arguments[0]instanceof Bn&&arguments[1]instanceof Xt){var C=arguments[0],O=arguments[1],R=arguments[2];if(C instanceof Uo)Ip.computeDistance(C,O,R);else if(C instanceof Da)Ip.computeDistance(C,O,R);else if(C instanceof uu)for(var D=C,B=0;B<D.getNumGeometries();B++){var z=D.getGeometryN(B);Ip.computeDistance(z,O,R)}else R.setMinimum(C.getCoordinate(),O)}else if(arguments[2]instanceof hu&&arguments[0]instanceof Tn&&arguments[1]instanceof Xt){var k=arguments[0],$=arguments[1],K=arguments[2],et=k.closestPoint($);K.setMinimum(et,$)}};var Zm=function(t){this._maxPtDist=new hu,this._inputGeom=t||null},ek={MaxPointDistanceFilter:{configurable:!0},MaxMidpointDistanceFilter:{configurable:!0}};Zm.prototype.computeMaxMidpointDistance=function(t){var n=new _g(this._inputGeom);t.apply(n),this._maxPtDist.setMaximum(n.getMaxPointDistance())};Zm.prototype.computeMaxVertexDistance=function(t){var n=new Iy(this._inputGeom);t.apply(n),this._maxPtDist.setMaximum(n.getMaxPointDistance())};Zm.prototype.findDistance=function(t){return this.computeMaxVertexDistance(t),this.computeMaxMidpointDistance(t),this._maxPtDist.getDistance()};Zm.prototype.getDistancePoints=function(){return this._maxPtDist};Zm.prototype.interfaces_=function(){return[]};Zm.prototype.getClass=function(){return Zm};ek.MaxPointDistanceFilter.get=function(){return Iy};ek.MaxMidpointDistanceFilter.get=function(){return _g};Object.defineProperties(Zm,ek);var Iy=function(t){this._maxPtDist=new hu,this._minPtDist=new hu,this._geom=t||null};Iy.prototype.filter=function(t){this._minPtDist.initialize(),Ip.computeDistance(this._geom,t,this._minPtDist),this._maxPtDist.setMaximum(this._minPtDist)};Iy.prototype.getMaxPointDistance=function(){return this._maxPtDist};Iy.prototype.interfaces_=function(){return[yp]};Iy.prototype.getClass=function(){return Iy};var _g=function(t){this._maxPtDist=new hu,this._minPtDist=new hu,this._geom=t||null};_g.prototype.filter=function(t,n){if(n===0)return null;var r=t.getCoordinate(n-1),i=t.getCoordinate(n),a=new Xt((r.x+i.x)/2,(r.y+i.y)/2);this._minPtDist.initialize(),Ip.computeDistance(this._geom,a,this._minPtDist),this._maxPtDist.setMaximum(this._minPtDist)};_g.prototype.isDone=function(){return!1};_g.prototype.isGeometryChanged=function(){return!1};_g.prototype.getMaxPointDistance=function(){return this._maxPtDist};_g.prototype.interfaces_=function(){return[xf]};_g.prototype.getClass=function(){return _g};var gd=function(t){this._comps=t||null};gd.prototype.filter=function(t){t instanceof Da&&this._comps.add(t)};gd.prototype.interfaces_=function(){return[_h]};gd.prototype.getClass=function(){return gd};gd.getPolygons=function(){if(arguments.length===1){var t=arguments[0];return gd.getPolygons(t,new Ke)}else if(arguments.length===2){var n=arguments[0],r=arguments[1];return n instanceof Da?r.add(n):n instanceof uu&&n.apply(new gd(r)),r}};var ws=function(){if(this._lines=null,this._isForcedToLineString=!1,arguments.length===1){var t=arguments[0];this._lines=t}else if(arguments.length===2){var n=arguments[0],r=arguments[1];this._lines=n,this._isForcedToLineString=r}};ws.prototype.filter=function(t){if(this._isForcedToLineString&&t instanceof _p){var n=t.getFactory().createLineString(t.getCoordinateSequence());return this._lines.add(n),null}t instanceof Uo&&this._lines.add(t)};ws.prototype.setForceToLineString=function(t){this._isForcedToLineString=t};ws.prototype.interfaces_=function(){return[sd]};ws.prototype.getClass=function(){return ws};ws.getGeometry=function(){if(arguments.length===1){var t=arguments[0];return t.getFactory().buildGeometry(ws.getLines(t))}else if(arguments.length===2){var n=arguments[0],r=arguments[1];return n.getFactory().buildGeometry(ws.getLines(n,r))}};ws.getLines=function(){if(arguments.length===1){var t=arguments[0];return ws.getLines(t,!1)}else if(arguments.length===2){if($n(arguments[0],ka)&&$n(arguments[1],ka)){for(var n=arguments[0],r=arguments[1],i=n.iterator();i.hasNext();){var a=i.next();ws.getLines(a,r)}return r}else if(arguments[0]instanceof Bn&&typeof arguments[1]=="boolean"){var o=arguments[0],u=arguments[1],c=new Ke;return o.apply(new ws(c,u)),c}else if(arguments[0]instanceof Bn&&$n(arguments[1],ka)){var g=arguments[0],_=arguments[1];return g instanceof Uo?_.add(g):g.apply(new ws(_)),_}}else if(arguments.length===3){if(typeof arguments[2]=="boolean"&&$n(arguments[0],ka)&&$n(arguments[1],ka)){for(var E=arguments[0],C=arguments[1],O=arguments[2],R=E.iterator();R.hasNext();){var D=R.next();ws.getLines(D,C,O)}return C}else if(typeof arguments[2]=="boolean"&&arguments[0]instanceof Bn&&$n(arguments[1],ka)){var B=arguments[0],z=arguments[1],k=arguments[2];return B.apply(new ws(z,k)),z}}};var Ef=function(){if(this._boundaryRule=Ec.OGC_SFS_BOUNDARY_RULE,this._isIn=null,this._numBoundaries=null,arguments.length!==0){if(arguments.length===1){var t=arguments[0];if(t===null)throw new wo;this._boundaryRule=t}}};Ef.prototype.locateInternal=function(){var t=this;if(arguments[0]instanceof Xt&&arguments[1]instanceof Da){var n=arguments[0],r=arguments[1];if(r.isEmpty())return Kt.EXTERIOR;var i=r.getExteriorRing(),a=this.locateInPolygonRing(n,i);if(a===Kt.EXTERIOR)return Kt.EXTERIOR;if(a===Kt.BOUNDARY)return Kt.BOUNDARY;for(var o=0;o<r.getNumInteriorRing();o++){var u=r.getInteriorRingN(o),c=t.locateInPolygonRing(n,u);if(c===Kt.INTERIOR)return Kt.EXTERIOR;if(c===Kt.BOUNDARY)return Kt.BOUNDARY}return Kt.INTERIOR}else if(arguments[0]instanceof Xt&&arguments[1]instanceof Uo){var g=arguments[0],_=arguments[1];if(!_.getEnvelopeInternal().intersects(g))return Kt.EXTERIOR;var E=_.getCoordinates();return!_.isClosed()&&(g.equals(E[0])||g.equals(E[E.length-1]))?Kt.BOUNDARY:on.isOnLine(g,E)?Kt.INTERIOR:Kt.EXTERIOR}else if(arguments[0]instanceof Xt&&arguments[1]instanceof pl){var C=arguments[0],O=arguments[1],R=O.getCoordinate();return R.equals2D(C)?Kt.INTERIOR:Kt.EXTERIOR}};Ef.prototype.locateInPolygonRing=function(t,n){return n.getEnvelopeInternal().intersects(t)?on.locatePointInRing(t,n.getCoordinates()):Kt.EXTERIOR};Ef.prototype.intersects=function(t,n){return this.locate(t,n)!==Kt.EXTERIOR};Ef.prototype.updateLocationInfo=function(t){t===Kt.INTERIOR&&(this._isIn=!0),t===Kt.BOUNDARY&&this._numBoundaries++};Ef.prototype.computeLocation=function(t,n){var r=this;if(n instanceof pl&&this.updateLocationInfo(this.locateInternal(t,n)),n instanceof Uo)this.updateLocationInfo(this.locateInternal(t,n));else if(n instanceof Da)this.updateLocationInfo(this.locateInternal(t,n));else if(n instanceof Gm)for(var i=n,a=0;a<i.getNumGeometries();a++){var o=i.getGeometryN(a);r.updateLocationInfo(r.locateInternal(t,o))}else if(n instanceof xp)for(var u=n,c=0;c<u.getNumGeometries();c++){var g=u.getGeometryN(c);r.updateLocationInfo(r.locateInternal(t,g))}else if(n instanceof uu)for(var _=new Sp(n);_.hasNext();){var E=_.next();E!==n&&r.computeLocation(t,E)}};Ef.prototype.locate=function(t,n){return n.isEmpty()?Kt.EXTERIOR:n instanceof Uo?this.locateInternal(t,n):n instanceof Da?this.locateInternal(t,n):(this._isIn=!1,this._numBoundaries=0,this.computeLocation(t,n),this._boundaryRule.isInBoundary(this._numBoundaries)?Kt.BOUNDARY:this._numBoundaries>0||this._isIn?Kt.INTERIOR:Kt.EXTERIOR)};Ef.prototype.interfaces_=function(){return[]};Ef.prototype.getClass=function(){return Ef};var pu=function e(){if(this._component=null,this._segIndex=null,this._pt=null,arguments.length===2){var t=arguments[0],n=arguments[1];e.call(this,t,e.INSIDE_AREA,n)}else if(arguments.length===3){var r=arguments[0],i=arguments[1],a=arguments[2];this._component=r,this._segIndex=i,this._pt=a}},G8={INSIDE_AREA:{configurable:!0}};pu.prototype.isInsideArea=function(){return this._segIndex===pu.INSIDE_AREA};pu.prototype.getCoordinate=function(){return this._pt};pu.prototype.getGeometryComponent=function(){return this._component};pu.prototype.getSegmentIndex=function(){return this._segIndex};pu.prototype.interfaces_=function(){return[]};pu.prototype.getClass=function(){return pu};G8.INSIDE_AREA.get=function(){return-1};Object.defineProperties(pu,G8);var xg=function(t){this._pts=t||null};xg.prototype.filter=function(t){t instanceof pl&&this._pts.add(t)};xg.prototype.interfaces_=function(){return[_h]};xg.prototype.getClass=function(){return xg};xg.getPoints=function(){if(arguments.length===1){var t=arguments[0];return t instanceof pl?wf.singletonList(t):xg.getPoints(t,new Ke)}else if(arguments.length===2){var n=arguments[0],r=arguments[1];return n instanceof pl?r.add(n):n instanceof uu&&n.apply(new xg(r)),r}};var Py=function(){this._locations=null;var t=arguments[0];this._locations=t};Py.prototype.filter=function(t){(t instanceof pl||t instanceof Uo||t instanceof Da)&&this._locations.add(new pu(t,0,t.getCoordinate()))};Py.prototype.interfaces_=function(){return[_h]};Py.prototype.getClass=function(){return Py};Py.getLocations=function(t){var n=new Ke;return t.apply(new Py(n)),n};var Ss=function(){if(this._geom=null,this._terminateDistance=0,this._ptLocator=new Ef,this._minDistanceLocation=null,this._minDistance=Kn.MAX_VALUE,arguments.length===2){var t=arguments[0],n=arguments[1];this._geom=[t,n],this._terminateDistance=0}else if(arguments.length===3){var r=arguments[0],i=arguments[1],a=arguments[2];this._geom=new Array(2).fill(null),this._geom[0]=r,this._geom[1]=i,this._terminateDistance=a}};Ss.prototype.computeContainmentDistance=function(){var t=this;if(arguments.length===0){var n=new Array(2).fill(null);if(this.computeContainmentDistance(0,n),this._minDistance<=this._terminateDistance)return null;this.computeContainmentDistance(1,n)}else if(arguments.length===2){var r=arguments[0],i=arguments[1],a=1-r,o=gd.getPolygons(this._geom[r]);if(o.size()>0){var u=Py.getLocations(this._geom[a]);if(this.computeContainmentDistance(u,o,i),this._minDistance<=this._terminateDistance)return this._minDistanceLocation[a]=i[0],this._minDistanceLocation[r]=i[1],null}}else if(arguments.length===3){if(arguments[2]instanceof Array&&$n(arguments[0],yf)&&$n(arguments[1],yf)){for(var c=arguments[0],g=arguments[1],_=arguments[2],E=0;E<c.size();E++)for(var C=c.get(E),O=0;O<g.size();O++)if(t.computeContainmentDistance(C,g.get(O),_),t._minDistance<=t._terminateDistance)return null}else if(arguments[2]instanceof Array&&arguments[0]instanceof pu&&arguments[1]instanceof Da){var R=arguments[0],D=arguments[1],B=arguments[2],z=R.getCoordinate();if(Kt.EXTERIOR!==this._ptLocator.locate(z,D))return this._minDistance=0,B[0]=R,B[1]=new pu(D,z),null}}};Ss.prototype.computeMinDistanceLinesPoints=function(t,n,r){for(var i=this,a=0;a<t.size();a++)for(var o=t.get(a),u=0;u<n.size();u++){var c=n.get(u);if(i.computeMinDistance(o,c,r),i._minDistance<=i._terminateDistance)return null}};Ss.prototype.computeFacetDistance=function(){var t=new Array(2).fill(null),n=ws.getLines(this._geom[0]),r=ws.getLines(this._geom[1]),i=xg.getPoints(this._geom[0]),a=xg.getPoints(this._geom[1]);if(this.computeMinDistanceLines(n,r,t),this.updateMinDistance(t,!1),this._minDistance<=this._terminateDistance||(t[0]=null,t[1]=null,this.computeMinDistanceLinesPoints(n,a,t),this.updateMinDistance(t,!1),this._minDistance<=this._terminateDistance)||(t[0]=null,t[1]=null,this.computeMinDistanceLinesPoints(r,i,t),this.updateMinDistance(t,!0),this._minDistance<=this._terminateDistance))return null;t[0]=null,t[1]=null,this.computeMinDistancePoints(i,a,t),this.updateMinDistance(t,!1)};Ss.prototype.nearestLocations=function(){return this.computeMinDistance(),this._minDistanceLocation};Ss.prototype.updateMinDistance=function(t,n){if(t[0]===null)return null;n?(this._minDistanceLocation[0]=t[1],this._minDistanceLocation[1]=t[0]):(this._minDistanceLocation[0]=t[0],this._minDistanceLocation[1]=t[1])};Ss.prototype.nearestPoints=function(){this.computeMinDistance();var t=[this._minDistanceLocation[0].getCoordinate(),this._minDistanceLocation[1].getCoordinate()];return t};Ss.prototype.computeMinDistance=function(){var t=this;if(arguments.length===0){if(this._minDistanceLocation!==null||(this._minDistanceLocation=new Array(2).fill(null),this.computeContainmentDistance(),this._minDistance<=this._terminateDistance))return null;this.computeFacetDistance()}else if(arguments.length===3){if(arguments[2]instanceof Array&&arguments[0]instanceof Uo&&arguments[1]instanceof pl){var n=arguments[0],r=arguments[1],i=arguments[2];if(n.getEnvelopeInternal().distance(r.getEnvelopeInternal())>this._minDistance)return null;for(var a=n.getCoordinates(),o=r.getCoordinate(),u=0;u<a.length-1;u++){var c=on.distancePointLine(o,a[u],a[u+1]);if(c<t._minDistance){t._minDistance=c;var g=new Tn(a[u],a[u+1]),_=g.closestPoint(o);i[0]=new pu(n,u,_),i[1]=new pu(r,0,o)}if(t._minDistance<=t._terminateDistance)return null}}else if(arguments[2]instanceof Array&&arguments[0]instanceof Uo&&arguments[1]instanceof Uo){var E=arguments[0],C=arguments[1],O=arguments[2];if(E.getEnvelopeInternal().distance(C.getEnvelopeInternal())>this._minDistance)return null;for(var R=E.getCoordinates(),D=C.getCoordinates(),B=0;B<R.length-1;B++)for(var z=0;z<D.length-1;z++){var k=on.distanceLineLine(R[B],R[B+1],D[z],D[z+1]);if(k<t._minDistance){t._minDistance=k;var $=new Tn(R[B],R[B+1]),K=new Tn(D[z],D[z+1]),et=$.closestPoints(K);O[0]=new pu(E,B,et[0]),O[1]=new pu(C,z,et[1])}if(t._minDistance<=t._terminateDistance)return null}}}};Ss.prototype.computeMinDistancePoints=function(t,n,r){for(var i=this,a=0;a<t.size();a++)for(var o=t.get(a),u=0;u<n.size();u++){var c=n.get(u),g=o.getCoordinate().distance(c.getCoordinate());if(g<i._minDistance&&(i._minDistance=g,r[0]=new pu(o,0,o.getCoordinate()),r[1]=new pu(c,0,c.getCoordinate())),i._minDistance<=i._terminateDistance)return null}};Ss.prototype.distance=function(){if(this._geom[0]===null||this._geom[1]===null)throw new wo;return this._geom[0].isEmpty()||this._geom[1].isEmpty()?0:(this.computeMinDistance(),this._minDistance)};Ss.prototype.computeMinDistanceLines=function(t,n,r){for(var i=this,a=0;a<t.size();a++)for(var o=t.get(a),u=0;u<n.size();u++){var c=n.get(u);if(i.computeMinDistance(o,c,r),i._minDistance<=i._terminateDistance)return null}};Ss.prototype.interfaces_=function(){return[]};Ss.prototype.getClass=function(){return Ss};Ss.distance=function(t,n){var r=new Ss(t,n);return r.distance()};Ss.isWithinDistance=function(t,n,r){var i=new Ss(t,n,r);return i.distance()<=r};Ss.nearestPoints=function(t,n){var r=new Ss(t,n);return r.nearestPoints()};var Us=function(){this._pt=[new Xt,new Xt],this._distance=Kn.NaN,this._isNull=!0};Us.prototype.getCoordinates=function(){return this._pt};Us.prototype.getCoordinate=function(t){return this._pt[t]};Us.prototype.setMinimum=function(){if(arguments.length===1){var t=arguments[0];this.setMinimum(t._pt[0],t._pt[1])}else if(arguments.length===2){var n=arguments[0],r=arguments[1];if(this._isNull)return this.initialize(n,r),null;var i=n.distance(r);i<this._distance&&this.initialize(n,r,i)}};Us.prototype.initialize=function(){if(arguments.length===0)this._isNull=!0;else if(arguments.length===2){var t=arguments[0],n=arguments[1];this._pt[0].setCoordinate(t),this._pt[1].setCoordinate(n),this._distance=t.distance(n),this._isNull=!1}else if(arguments.length===3){var r=arguments[0],i=arguments[1],a=arguments[2];this._pt[0].setCoordinate(r),this._pt[1].setCoordinate(i),this._distance=a,this._isNull=!1}};Us.prototype.toString=function(){return vf.toLineString(this._pt[0],this._pt[1])};Us.prototype.getDistance=function(){return this._distance};Us.prototype.setMaximum=function(){if(arguments.length===1){var t=arguments[0];this.setMaximum(t._pt[0],t._pt[1])}else if(arguments.length===2){var n=arguments[0],r=arguments[1];if(this._isNull)return this.initialize(n,r),null;var i=n.distance(r);i>this._distance&&this.initialize(n,r,i)}};Us.prototype.interfaces_=function(){return[]};Us.prototype.getClass=function(){return Us};var Ph=function(){};Ph.prototype.interfaces_=function(){return[]};Ph.prototype.getClass=function(){return Ph};Ph.computeDistance=function(){if(arguments[2]instanceof Us&&arguments[0]instanceof Uo&&arguments[1]instanceof Xt)for(var t=arguments[0],n=arguments[1],r=arguments[2],i=new Tn,a=t.getCoordinates(),o=0;o<a.length-1;o++){i.setCoordinates(a[o],a[o+1]);var u=i.closestPoint(n);r.setMinimum(u,n)}else if(arguments[2]instanceof Us&&arguments[0]instanceof Da&&arguments[1]instanceof Xt){var c=arguments[0],g=arguments[1],_=arguments[2];Ph.computeDistance(c.getExteriorRing(),g,_);for(var E=0;E<c.getNumInteriorRing();E++)Ph.computeDistance(c.getInteriorRingN(E),g,_)}else if(arguments[2]instanceof Us&&arguments[0]instanceof Bn&&arguments[1]instanceof Xt){var C=arguments[0],O=arguments[1],R=arguments[2];if(C instanceof Uo)Ph.computeDistance(C,O,R);else if(C instanceof Da)Ph.computeDistance(C,O,R);else if(C instanceof uu)for(var D=C,B=0;B<D.getNumGeometries();B++){var z=D.getGeometryN(B);Ph.computeDistance(z,O,R)}else R.setMinimum(C.getCoordinate(),O)}else if(arguments[2]instanceof Us&&arguments[0]instanceof Tn&&arguments[1]instanceof Xt){var k=arguments[0],$=arguments[1],K=arguments[2],et=k.closestPoint($);K.setMinimum(et,$)}};var Mc=function(){this._g0=null,this._g1=null,this._ptDist=new Us,this._densifyFrac=0;var t=arguments[0],n=arguments[1];this._g0=t,this._g1=n},nk={MaxPointDistanceFilter:{configurable:!0},MaxDensifiedByFractionDistanceFilter:{configurable:!0}};Mc.prototype.getCoordinates=function(){return this._ptDist.getCoordinates()};Mc.prototype.setDensifyFraction=function(t){if(t>1||t<=0)throw new wo;this._densifyFrac=t};Mc.prototype.compute=function(t,n){this.computeOrientedDistance(t,n,this._ptDist),this.computeOrientedDistance(n,t,this._ptDist)};Mc.prototype.distance=function(){return this.compute(this._g0,this._g1),this._ptDist.getDistance()};Mc.prototype.computeOrientedDistance=function(t,n,r){var i=new Ty(n);if(t.apply(i),r.setMaximum(i.getMaxPointDistance()),this._densifyFrac>0){var a=new bg(n,this._densifyFrac);t.apply(a),r.setMaximum(a.getMaxPointDistance())}};Mc.prototype.orientedDistance=function(){return this.computeOrientedDistance(this._g0,this._g1,this._ptDist),this._ptDist.getDistance()};Mc.prototype.interfaces_=function(){return[]};Mc.prototype.getClass=function(){return Mc};Mc.distance=function(){if(arguments.length===2){var t=arguments[0],n=arguments[1],r=new Mc(t,n);return r.distance()}else if(arguments.length===3){var i=arguments[0],a=arguments[1],o=arguments[2],u=new Mc(i,a);return u.setDensifyFraction(o),u.distance()}};nk.MaxPointDistanceFilter.get=function(){return Ty};nk.MaxDensifiedByFractionDistanceFilter.get=function(){return bg};Object.defineProperties(Mc,nk);var Ty=function(){this._maxPtDist=new Us,this._minPtDist=new Us,this._euclideanDist=new Ph,this._geom=null;var t=arguments[0];this._geom=t};Ty.prototype.filter=function(t){this._minPtDist.initialize(),Ph.computeDistance(this._geom,t,this._minPtDist),this._maxPtDist.setMaximum(this._minPtDist)};Ty.prototype.getMaxPointDistance=function(){return this._maxPtDist};Ty.prototype.interfaces_=function(){return[yp]};Ty.prototype.getClass=function(){return Ty};var bg=function(){this._maxPtDist=new Us,this._minPtDist=new Us,this._geom=null,this._numSubSegs=0;var t=arguments[0],n=arguments[1];this._geom=t,this._numSubSegs=Math.trunc(Math.round(1/n))};bg.prototype.filter=function(t,n){var r=this;if(n===0)return null;for(var i=t.getCoordinate(n-1),a=t.getCoordinate(n),o=(a.x-i.x)/this._numSubSegs,u=(a.y-i.y)/this._numSubSegs,c=0;c<this._numSubSegs;c++){var g=i.x+c*o,_=i.y+c*u,E=new Xt(g,_);r._minPtDist.initialize(),Ph.computeDistance(r._geom,E,r._minPtDist),r._maxPtDist.setMaximum(r._minPtDist)}};bg.prototype.isDone=function(){return!1};bg.prototype.isGeometryChanged=function(){return!1};bg.prototype.getMaxPointDistance=function(){return this._maxPtDist};bg.prototype.interfaces_=function(){return[xf]};bg.prototype.getClass=function(){return bg};var ml=function(t,n,r){this._minValidDistance=null,this._maxValidDistance=null,this._minDistanceFound=null,this._maxDistanceFound=null,this._isValid=!0,this._errMsg=null,this._errorLocation=null,this._errorIndicator=null,this._input=t||null,this._bufDistance=n||null,this._result=r||null},rk={VERBOSE:{configurable:!0},MAX_DISTANCE_DIFF_FRAC:{configurable:!0}};ml.prototype.checkMaximumDistance=function(t,n,r){var i=new Mc(n,t);if(i.setDensifyFraction(.25),this._maxDistanceFound=i.orientedDistance(),this._maxDistanceFound>r){this._isValid=!1;var a=i.getCoordinates();this._errorLocation=a[1],this._errorIndicator=t.getFactory().createLineString(a),this._errMsg="Distance between buffer curve and input is too large ("+this._maxDistanceFound+" at "+vf.toLineString(a[0],a[1])+")"}};ml.prototype.isValid=function(){var t=Math.abs(this._bufDistance),n=ml.MAX_DISTANCE_DIFF_FRAC*t;return this._minValidDistance=t-n,this._maxValidDistance=t+n,this._input.isEmpty()||this._result.isEmpty()?!0:(this._bufDistance>0?this.checkPositiveValid():this.checkNegativeValid(),ml.VERBOSE&&xs.out.println("Min Dist= "+this._minDistanceFound+" err= "+(1-this._minDistanceFound/this._bufDistance)+" Max Dist= "+this._maxDistanceFound+" err= "+(this._maxDistanceFound/this._bufDistance-1)),this._isValid)};ml.prototype.checkNegativeValid=function(){if(!(this._input instanceof Da||this._input instanceof xp||this._input instanceof uu))return null;var t=this.getPolygonLines(this._input);if(this.checkMinimumDistance(t,this._result,this._minValidDistance),!this._isValid)return null;this.checkMaximumDistance(t,this._result,this._maxValidDistance)};ml.prototype.getErrorIndicator=function(){return this._errorIndicator};ml.prototype.checkMinimumDistance=function(t,n,r){var i=new Ss(t,n,r);if(this._minDistanceFound=i.distance(),this._minDistanceFound<r){this._isValid=!1;var a=i.nearestPoints();this._errorLocation=i.nearestPoints()[1],this._errorIndicator=t.getFactory().createLineString(a),this._errMsg="Distance between buffer curve and input is too small ("+this._minDistanceFound+" at "+vf.toLineString(a[0],a[1])+" )"}};ml.prototype.checkPositiveValid=function(){var t=this._result.getBoundary();if(this.checkMinimumDistance(this._input,t,this._minValidDistance),!this._isValid)return null;this.checkMaximumDistance(this._input,t,this._maxValidDistance)};ml.prototype.getErrorLocation=function(){return this._errorLocation};ml.prototype.getPolygonLines=function(t){for(var n=new Ke,r=new ws(n),i=gd.getPolygons(t),a=i.iterator();a.hasNext();){var o=a.next();o.apply(r)}return t.getFactory().buildGeometry(n)};ml.prototype.getErrorMessage=function(){return this._errMsg};ml.prototype.interfaces_=function(){return[]};ml.prototype.getClass=function(){return ml};rk.VERBOSE.get=function(){return!1};rk.MAX_DISTANCE_DIFF_FRAC.get=function(){return .012};Object.defineProperties(ml,rk);var Es=function(t,n,r){this._isValid=!0,this._errorMsg=null,this._errorLocation=null,this._errorIndicator=null,this._input=t||null,this._distance=n||null,this._result=r||null},ik={VERBOSE:{configurable:!0},MAX_ENV_DIFF_FRAC:{configurable:!0}};Es.prototype.isValid=function(){return this.checkPolygonal(),this._isValid?(this.checkExpectedEmpty(),this._isValid?(this.checkEnvelope(),this._isValid?(this.checkArea(),this._isValid?(this.checkDistance(),this._isValid):this._isValid):this._isValid):this._isValid):this._isValid};Es.prototype.checkEnvelope=function(){if(this._distance<0)return null;var t=this._distance*Es.MAX_ENV_DIFF_FRAC;t===0&&(t=.001);var n=new In(this._input.getEnvelopeInternal());n.expandBy(this._distance);var r=new In(this._result.getEnvelopeInternal());r.expandBy(t),r.contains(n)||(this._isValid=!1,this._errorMsg="Buffer envelope is incorrect",this._errorIndicator=this._input.getFactory().toGeometry(r)),this.report("Envelope")};Es.prototype.checkDistance=function(){var t=new ml(this._input,this._distance,this._result);t.isValid()||(this._isValid=!1,this._errorMsg=t.getErrorMessage(),this._errorLocation=t.getErrorLocation(),this._errorIndicator=t.getErrorIndicator()),this.report("Distance")};Es.prototype.checkArea=function(){var t=this._input.getArea(),n=this._result.getArea();this._distance>0&&t>n&&(this._isValid=!1,this._errorMsg="Area of positive buffer is smaller than input",this._errorIndicator=this._result),this._distance<0&&t<n&&(this._isValid=!1,this._errorMsg="Area of negative buffer is larger than input",this._errorIndicator=this._result),this.report("Area")};Es.prototype.checkPolygonal=function(){this._result instanceof Da||this._result instanceof xp||(this._isValid=!1),this._errorMsg="Result is not polygonal",this._errorIndicator=this._result,this.report("Polygonal")};Es.prototype.getErrorIndicator=function(){return this._errorIndicator};Es.prototype.getErrorLocation=function(){return this._errorLocation};Es.prototype.checkExpectedEmpty=function(){if(this._input.getDimension()>=2||this._distance>0)return null;this._result.isEmpty()||(this._isValid=!1,this._errorMsg="Result is non-empty",this._errorIndicator=this._result),this.report("ExpectedEmpty")};Es.prototype.report=function(t){if(!Es.VERBOSE)return null;xs.out.println("Check "+t+": "+(this._isValid?"passed":"FAILED"))};Es.prototype.getErrorMessage=function(){return this._errorMsg};Es.prototype.interfaces_=function(){return[]};Es.prototype.getClass=function(){return Es};Es.isValidMsg=function(t,n,r){var i=new Es(t,n,r);return i.isValid()?null:i.getErrorMessage()};Es.isValid=function(t,n,r){var i=new Es(t,n,r);return!!i.isValid()};ik.VERBOSE.get=function(){return!1};ik.MAX_ENV_DIFF_FRAC.get=function(){return .012};Object.defineProperties(Es,ik);var Th=function(){this._pts=null,this._data=null;var t=arguments[0],n=arguments[1];this._pts=t,this._data=n};Th.prototype.getCoordinates=function(){return this._pts};Th.prototype.size=function(){return this._pts.length};Th.prototype.getCoordinate=function(t){return this._pts[t]};Th.prototype.isClosed=function(){return this._pts[0].equals(this._pts[this._pts.length-1])};Th.prototype.getSegmentOctant=function(t){return t===this._pts.length-1?-1:wy.octant(this.getCoordinate(t),this.getCoordinate(t+1))};Th.prototype.setData=function(t){this._data=t};Th.prototype.getData=function(){return this._data};Th.prototype.toString=function(){return vf.toLineString(new ra(this._pts))};Th.prototype.interfaces_=function(){return[wp]};Th.prototype.getClass=function(){return Th};var os=function(){this._findAllIntersections=!1,this._isCheckEndSegmentsOnly=!1,this._li=null,this._interiorIntersection=null,this._intSegments=null,this._intersections=new Ke,this._intersectionCount=0,this._keepIntersections=!0;var t=arguments[0];this._li=t,this._interiorIntersection=null};os.prototype.getInteriorIntersection=function(){return this._interiorIntersection};os.prototype.setCheckEndSegmentsOnly=function(t){this._isCheckEndSegmentsOnly=t};os.prototype.getIntersectionSegments=function(){return this._intSegments};os.prototype.count=function(){return this._intersectionCount};os.prototype.getIntersections=function(){return this._intersections};os.prototype.setFindAllIntersections=function(t){this._findAllIntersections=t};os.prototype.setKeepIntersections=function(t){this._keepIntersections=t};os.prototype.processIntersections=function(t,n,r,i){if(!this._findAllIntersections&&this.hasIntersection()||t===r&&n===i)return null;if(this._isCheckEndSegmentsOnly){var a=this.isEndSegment(t,n)||this.isEndSegment(r,i);if(!a)return null}var o=t.getCoordinates()[n],u=t.getCoordinates()[n+1],c=r.getCoordinates()[i],g=r.getCoordinates()[i+1];this._li.computeIntersection(o,u,c,g),this._li.hasIntersection()&&this._li.isInteriorIntersection()&&(this._intSegments=new Array(4).fill(null),this._intSegments[0]=o,this._intSegments[1]=u,this._intSegments[2]=c,this._intSegments[3]=g,this._interiorIntersection=this._li.getIntersection(0),this._keepIntersections&&this._intersections.add(this._interiorIntersection),this._intersectionCount++)};os.prototype.isEndSegment=function(t,n){return n===0||n>=t.size()-2};os.prototype.hasIntersection=function(){return this._interiorIntersection!==null};os.prototype.isDone=function(){return this._findAllIntersections?!1:this._interiorIntersection!==null};os.prototype.interfaces_=function(){return[Xm]};os.prototype.getClass=function(){return os};os.createAllIntersectionsFinder=function(t){var n=new os(t);return n.setFindAllIntersections(!0),n};os.createAnyIntersectionFinder=function(t){return new os(t)};os.createIntersectionCounter=function(t){var n=new os(t);return n.setFindAllIntersections(!0),n.setKeepIntersections(!1),n};var Cf=function(){this._li=new $m,this._segStrings=null,this._findAllIntersections=!1,this._segInt=null,this._isValid=!0;var t=arguments[0];this._segStrings=t};Cf.prototype.execute=function(){if(this._segInt!==null)return null;this.checkInteriorIntersections()};Cf.prototype.getIntersections=function(){return this._segInt.getIntersections()};Cf.prototype.isValid=function(){return this.execute(),this._isValid};Cf.prototype.setFindAllIntersections=function(t){this._findAllIntersections=t};Cf.prototype.checkInteriorIntersections=function(){this._isValid=!0,this._segInt=new os(this._li),this._segInt.setFindAllIntersections(this._findAllIntersections);var t=new tk;if(t.setSegmentIntersector(this._segInt),t.computeNodes(this._segStrings),this._segInt.hasIntersection())return this._isValid=!1,null};Cf.prototype.checkValid=function(){if(this.execute(),!this._isValid)throw new fd(this.getErrorMessage(),this._segInt.getInteriorIntersection())};Cf.prototype.getErrorMessage=function(){if(this._isValid)return"no intersections found";var t=this._segInt.getIntersectionSegments();return"found non-noded intersection between "+vf.toLineString(t[0],t[1])+" and "+vf.toLineString(t[2],t[3])};Cf.prototype.interfaces_=function(){return[]};Cf.prototype.getClass=function(){return Cf};Cf.computeIntersections=function(t){var n=new Cf(t);return n.setFindAllIntersections(!0),n.isValid(),n.getIntersections()};var Km=function e(){this._nv=null;var t=arguments[0];this._nv=new Cf(e.toSegmentStrings(t))};Km.prototype.checkValid=function(){this._nv.checkValid()};Km.prototype.interfaces_=function(){return[]};Km.prototype.getClass=function(){return Km};Km.toSegmentStrings=function(t){for(var n=new Ke,r=t.iterator();r.hasNext();){var i=r.next();n.add(new Th(i.getCoordinates(),i))}return n};Km.checkValid=function(t){var n=new Km(t);n.checkValid()};var My=function(t){this._mapOp=t};My.prototype.map=function(t){for(var n=this,r=new Ke,i=0;i<t.getNumGeometries();i++){var a=n._mapOp.map(t.getGeometryN(i));a.isEmpty()||r.add(a)}return t.getFactory().createGeometryCollection(Fr.toGeometryArray(r))};My.prototype.interfaces_=function(){return[]};My.prototype.getClass=function(){return My};My.map=function(t,n){var r=new My(n);return r.map(t)};var Mh=function(){this._op=null,this._geometryFactory=null,this._ptLocator=null,this._lineEdgesList=new Ke,this._resultLineList=new Ke;var t=arguments[0],n=arguments[1],r=arguments[2];this._op=t,this._geometryFactory=n,this._ptLocator=r};Mh.prototype.collectLines=function(t){for(var n=this,r=this._op.getGraph().getEdgeEnds().iterator();r.hasNext();){var i=r.next();n.collectLineEdge(i,t,n._lineEdgesList),n.collectBoundaryTouchEdge(i,t,n._lineEdgesList)}};Mh.prototype.labelIsolatedLine=function(t,n){var r=this._ptLocator.locate(t.getCoordinate(),this._op.getArgGeometry(n));t.getLabel().setLocation(n,r)};Mh.prototype.build=function(t){return this.findCoveredLineEdges(),this.collectLines(t),this.buildLines(t),this._resultLineList};Mh.prototype.collectLineEdge=function(t,n,r){var i=t.getLabel(),a=t.getEdge();t.isLineEdge()&&!t.isVisited()&&or.isResultOfOp(i,n)&&!a.isCovered()&&(r.add(a),t.setVisitedEdge(!0))};Mh.prototype.findCoveredLineEdges=function(){for(var t=this,n=this._op.getGraph().getNodes().iterator();n.hasNext();){var r=n.next();r.getEdges().findCoveredLineEdges()}for(var i=this._op.getGraph().getEdgeEnds().iterator();i.hasNext();){var a=i.next(),o=a.getEdge();if(a.isLineEdge()&&!o.isCoveredSet()){var u=t._op.isCoveredByA(a.getCoordinate());o.setCovered(u)}}};Mh.prototype.labelIsolatedLines=function(t){for(var n=this,r=t.iterator();r.hasNext();){var i=r.next(),a=i.getLabel();i.isIsolated()&&(a.isNull(0)?n.labelIsolatedLine(i,0):n.labelIsolatedLine(i,1))}};Mh.prototype.buildLines=function(t){for(var n=this,r=this._lineEdgesList.iterator();r.hasNext();){var i=r.next(),a=n._geometryFactory.createLineString(i.getCoordinates());n._resultLineList.add(a),i.setInResult(!0)}};Mh.prototype.collectBoundaryTouchEdge=function(t,n,r){var i=t.getLabel();if(t.isLineEdge()||t.isVisited()||t.isInteriorAreaEdge()||t.getEdge().isInResult())return null;lr.isTrue(!(t.isInResult()||t.getSym().isInResult())||!t.getEdge().isInResult()),or.isResultOfOp(i,n)&&n===or.INTERSECTION&&(r.add(t.getEdge()),t.setVisitedEdge(!0))};Mh.prototype.interfaces_=function(){return[]};Mh.prototype.getClass=function(){return Mh};var Ay=function(){this._op=null,this._geometryFactory=null,this._resultPointList=new Ke;var t=arguments[0],n=arguments[1];this._op=t,this._geometryFactory=n};Ay.prototype.filterCoveredNodeToPoint=function(t){var n=t.getCoordinate();if(!this._op.isCoveredByLA(n)){var r=this._geometryFactory.createPoint(n);this._resultPointList.add(r)}};Ay.prototype.extractNonCoveredResultNodes=function(t){for(var n=this,r=this._op.getGraph().getNodes().iterator();r.hasNext();){var i=r.next();if(!i.isInResult()&&!i.isIncidentEdgeInResult()&&(i.getEdges().getDegree()===0||t===or.INTERSECTION)){var a=i.getLabel();or.isResultOfOp(a,t)&&n.filterCoveredNodeToPoint(i)}}};Ay.prototype.build=function(t){return this.extractNonCoveredResultNodes(t),this._resultPointList};Ay.prototype.interfaces_=function(){return[]};Ay.prototype.getClass=function(){return Ay};var Fu=function(){this._inputGeom=null,this._factory=null,this._pruneEmptyGeometry=!0,this._preserveGeometryCollectionType=!0,this._preserveCollections=!1,this._preserveType=!1};Fu.prototype.transformPoint=function(t,n){return this._factory.createPoint(this.transformCoordinates(t.getCoordinateSequence(),t))};Fu.prototype.transformPolygon=function(t,n){var r=this,i=!0,a=this.transformLinearRing(t.getExteriorRing(),t);(a===null||!(a instanceof _p)||a.isEmpty())&&(i=!1);for(var o=new Ke,u=0;u<t.getNumInteriorRing();u++){var c=r.transformLinearRing(t.getInteriorRingN(u),t);c===null||c.isEmpty()||(c instanceof _p||(i=!1),o.add(c))}if(i)return this._factory.createPolygon(a,o.toArray([]));var g=new Ke;return a!==null&&g.add(a),g.addAll(o),this._factory.buildGeometry(g)};Fu.prototype.createCoordinateSequence=function(t){return this._factory.getCoordinateSequenceFactory().create(t)};Fu.prototype.getInputGeometry=function(){return this._inputGeom};Fu.prototype.transformMultiLineString=function(t,n){for(var r=this,i=new Ke,a=0;a<t.getNumGeometries();a++){var o=r.transformLineString(t.getGeometryN(a),t);o!==null&&(o.isEmpty()||i.add(o))}return this._factory.buildGeometry(i)};Fu.prototype.transformCoordinates=function(t,n){return this.copy(t)};Fu.prototype.transformLineString=function(t,n){return this._factory.createLineString(this.transformCoordinates(t.getCoordinateSequence(),t))};Fu.prototype.transformMultiPoint=function(t,n){for(var r=this,i=new Ke,a=0;a<t.getNumGeometries();a++){var o=r.transformPoint(t.getGeometryN(a),t);o!==null&&(o.isEmpty()||i.add(o))}return this._factory.buildGeometry(i)};Fu.prototype.transformMultiPolygon=function(t,n){for(var r=this,i=new Ke,a=0;a<t.getNumGeometries();a++){var o=r.transformPolygon(t.getGeometryN(a),t);o!==null&&(o.isEmpty()||i.add(o))}return this._factory.buildGeometry(i)};Fu.prototype.copy=function(t){return t.copy()};Fu.prototype.transformGeometryCollection=function(t,n){for(var r=this,i=new Ke,a=0;a<t.getNumGeometries();a++){var o=r.transform(t.getGeometryN(a));o!==null&&(r._pruneEmptyGeometry&&o.isEmpty()||i.add(o))}return this._preserveGeometryCollectionType?this._factory.createGeometryCollection(Fr.toGeometryArray(i)):this._factory.buildGeometry(i)};Fu.prototype.transform=function(t){if(this._inputGeom=t,this._factory=t.getFactory(),t instanceof pl)return this.transformPoint(t,null);if(t instanceof sx)return this.transformMultiPoint(t,null);if(t instanceof _p)return this.transformLinearRing(t,null);if(t instanceof Uo)return this.transformLineString(t,null);if(t instanceof Gm)return this.transformMultiLineString(t,null);if(t instanceof Da)return this.transformPolygon(t,null);if(t instanceof xp)return this.transformMultiPolygon(t,null);if(t instanceof uu)return this.transformGeometryCollection(t,null);throw new wo("Unknown Geometry subtype: "+t.getClass().getName())};Fu.prototype.transformLinearRing=function(t,n){var r=this.transformCoordinates(t.getCoordinateSequence(),t);if(r===null)return this._factory.createLinearRing(null);var i=r.size();return i>0&&i<4&&!this._preserveType?this._factory.createLineString(r):this._factory.createLinearRing(r)};Fu.prototype.interfaces_=function(){return[]};Fu.prototype.getClass=function(){return Fu};var Pp=function e(){if(this._snapTolerance=0,this._srcPts=null,this._seg=new Tn,this._allowSnappingToSourceVertices=!1,this._isClosed=!1,arguments[0]instanceof Uo&&typeof arguments[1]=="number"){var t=arguments[0],n=arguments[1];e.call(this,t.getCoordinates(),n)}else if(arguments[0]instanceof Array&&typeof arguments[1]=="number"){var r=arguments[0],i=arguments[1];this._srcPts=r,this._isClosed=e.isClosed(r),this._snapTolerance=i}};Pp.prototype.snapVertices=function(t,n){for(var r=this,i=this._isClosed?t.size()-1:t.size(),a=0;a<i;a++){var o=t.get(a),u=r.findSnapForVertex(o,n);u!==null&&(t.set(a,new Xt(u)),a===0&&r._isClosed&&t.set(t.size()-1,new Xt(u)))}};Pp.prototype.findSnapForVertex=function(t,n){for(var r=this,i=0;i<n.length;i++){if(t.equals2D(n[i]))return null;if(t.distance(n[i])<r._snapTolerance)return n[i]}return null};Pp.prototype.snapTo=function(t){var n=new sw(this._srcPts);this.snapVertices(n,t),this.snapSegments(n,t);var r=n.toCoordinateArray();return r};Pp.prototype.snapSegments=function(t,n){var r=this;if(n.length===0)return null;var i=n.length;n[0].equals2D(n[n.length-1])&&(i=n.length-1);for(var a=0;a<i;a++){var o=n[a],u=r.findSegmentIndexToSnap(o,t);u>=0&&t.add(u+1,new Xt(o),!1)}};Pp.prototype.findSegmentIndexToSnap=function(t,n){for(var r=this,i=Kn.MAX_VALUE,a=-1,o=0;o<n.size()-1;o++){if(r._seg.p0=n.get(o),r._seg.p1=n.get(o+1),r._seg.p0.equals2D(t)||r._seg.p1.equals2D(t)){if(r._allowSnappingToSourceVertices)continue;return-1}var u=r._seg.distance(t);u<r._snapTolerance&&u<i&&(i=u,a=o)}return a};Pp.prototype.setAllowSnappingToSourceVertices=function(t){this._allowSnappingToSourceVertices=t};Pp.prototype.interfaces_=function(){return[]};Pp.prototype.getClass=function(){return Pp};Pp.isClosed=function(t){return t.length<=1?!1:t[0].equals2D(t[t.length-1])};var oa=function(t){this._srcGeom=t||null},W8={SNAP_PRECISION_FACTOR:{configurable:!0}};oa.prototype.snapTo=function(t,n){var r=this.extractTargetCoordinates(t),i=new H8(n,r);return i.transform(this._srcGeom)};oa.prototype.snapToSelf=function(t,n){var r=this.extractTargetCoordinates(this._srcGeom),i=new H8(t,r,!0),a=i.transform(this._srcGeom),o=a;return n&&$n(o,dg)&&(o=a.buffer(0)),o};oa.prototype.computeSnapTolerance=function(t){var n=this.computeMinimumSegmentLength(t),r=n/10;return r};oa.prototype.extractTargetCoordinates=function(t){for(var n=new yh,r=t.getCoordinates(),i=0;i<r.length;i++)n.add(r[i]);return n.toArray(new Array(0).fill(null))};oa.prototype.computeMinimumSegmentLength=function(t){for(var n=Kn.MAX_VALUE,r=0;r<t.length-1;r++){var i=t[r].distance(t[r+1]);i<n&&(n=i)}return n};oa.prototype.interfaces_=function(){return[]};oa.prototype.getClass=function(){return oa};oa.snap=function(t,n,r){var i=new Array(2).fill(null),a=new oa(t);i[0]=a.snapTo(n,r);var o=new oa(n);return i[1]=o.snapTo(i[0],r),i};oa.computeOverlaySnapTolerance=function(){if(arguments.length===1){var t=arguments[0],n=oa.computeSizeBasedSnapTolerance(t),r=t.getPrecisionModel();if(r.getType()===xi.FIXED){var i=1/r.getScale()*2/1.415;i>n&&(n=i)}return n}else if(arguments.length===2){var a=arguments[0],o=arguments[1];return Math.min(oa.computeOverlaySnapTolerance(a),oa.computeOverlaySnapTolerance(o))}};oa.computeSizeBasedSnapTolerance=function(t){var n=t.getEnvelopeInternal(),r=Math.min(n.getHeight(),n.getWidth()),i=r*oa.SNAP_PRECISION_FACTOR;return i};oa.snapToSelf=function(t,n,r){var i=new oa(t);return i.snapToSelf(n,r)};W8.SNAP_PRECISION_FACTOR.get=function(){return 1e-9};Object.defineProperties(oa,W8);var H8=function(e){function t(n,r,i){e.call(this),this._snapTolerance=n||null,this._snapPts=r||null,this._isSelfSnap=i!==void 0?i:!1}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.snapLine=function(r,i){var a=new Pp(r,this._snapTolerance);return a.setAllowSnappingToSourceVertices(this._isSelfSnap),a.snapTo(i)},t.prototype.transformCoordinates=function(r,i){var a=r.toCoordinateArray(),o=this.snapLine(a,this._snapPts);return this._factory.getCoordinateSequenceFactory().create(o)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(Fu),du=function(){this._isFirst=!0,this._commonMantissaBitsCount=53,this._commonBits=0,this._commonSignExp=null};du.prototype.getCommon=function(){return Kn.longBitsToDouble(this._commonBits)};du.prototype.add=function(t){var n=Kn.doubleToLongBits(t);if(this._isFirst)return this._commonBits=n,this._commonSignExp=du.signExpBits(this._commonBits),this._isFirst=!1,null;var r=du.signExpBits(n);if(r!==this._commonSignExp)return this._commonBits=0,null;this._commonMantissaBitsCount=du.numCommonMostSigMantissaBits(this._commonBits,n),this._commonBits=du.zeroLowerBits(this._commonBits,64-(12+this._commonMantissaBitsCount))};du.prototype.toString=function(){if(arguments.length===1){var t=arguments[0],n=Kn.longBitsToDouble(t),r=Kn.toBinaryString(t),i="0000000000000000000000000000000000000000000000000000000000000000"+r,a=i.substring(i.length-64),o=a.substring(0,1)+" "+a.substring(1,12)+"(exp) "+a.substring(12)+" [ "+n+" ]";return o}};du.prototype.interfaces_=function(){return[]};du.prototype.getClass=function(){return du};du.getBit=function(t,n){var r=1<<n;return(t&r)!=0?1:0};du.signExpBits=function(t){return t>>52};du.zeroLowerBits=function(t,n){var r=(1<<n)-1,i=~r,a=t&i;return a};du.numCommonMostSigMantissaBits=function(t,n){for(var r=0,i=52;i>=0;i--){if(du.getBit(t,i)!==du.getBit(n,i))return r;r++}return 52};var wg=function(){this._commonCoord=null,this._ccFilter=new Ly},ok={CommonCoordinateFilter:{configurable:!0},Translater:{configurable:!0}};wg.prototype.addCommonBits=function(t){var n=new Sg(this._commonCoord);t.apply(n),t.geometryChanged()};wg.prototype.removeCommonBits=function(t){if(this._commonCoord.x===0&&this._commonCoord.y===0)return t;var n=new Xt(this._commonCoord);n.x=-n.x,n.y=-n.y;var r=new Sg(n);return t.apply(r),t.geometryChanged(),t};wg.prototype.getCommonCoordinate=function(){return this._commonCoord};wg.prototype.add=function(t){t.apply(this._ccFilter),this._commonCoord=this._ccFilter.getCommonCoordinate()};wg.prototype.interfaces_=function(){return[]};wg.prototype.getClass=function(){return wg};ok.CommonCoordinateFilter.get=function(){return Ly};ok.Translater.get=function(){return Sg};Object.defineProperties(wg,ok);var Ly=function(){this._commonBitsX=new du,this._commonBitsY=new du};Ly.prototype.filter=function(t){this._commonBitsX.add(t.x),this._commonBitsY.add(t.y)};Ly.prototype.getCommonCoordinate=function(){return new Xt(this._commonBitsX.getCommon(),this._commonBitsY.getCommon())};Ly.prototype.interfaces_=function(){return[yp]};Ly.prototype.getClass=function(){return Ly};var Sg=function(){this.trans=null;var t=arguments[0];this.trans=t};Sg.prototype.filter=function(t,n){var r=t.getOrdinate(n,0)+this.trans.x,i=t.getOrdinate(n,1)+this.trans.y;t.setOrdinate(n,0,r),t.setOrdinate(n,1,i)};Sg.prototype.isDone=function(){return!1};Sg.prototype.isGeometryChanged=function(){return!0};Sg.prototype.interfaces_=function(){return[xf]};Sg.prototype.getClass=function(){return Sg};var as=function(t,n){this._geom=new Array(2).fill(null),this._snapTolerance=null,this._cbr=null,this._geom[0]=t,this._geom[1]=n,this.computeSnapTolerance()};as.prototype.selfSnap=function(t){var n=new oa(t),r=n.snapTo(t,this._snapTolerance);return r};as.prototype.removeCommonBits=function(t){this._cbr=new wg,this._cbr.add(t[0]),this._cbr.add(t[1]);var n=new Array(2).fill(null);return n[0]=this._cbr.removeCommonBits(t[0].copy()),n[1]=this._cbr.removeCommonBits(t[1].copy()),n};as.prototype.prepareResult=function(t){return this._cbr.addCommonBits(t),t};as.prototype.getResultGeometry=function(t){var n=this.snap(this._geom),r=or.overlayOp(n[0],n[1],t);return this.prepareResult(r)};as.prototype.checkValid=function(t){t.isValid()||xs.out.println("Snapped geometry is invalid")};as.prototype.computeSnapTolerance=function(){this._snapTolerance=oa.computeOverlaySnapTolerance(this._geom[0],this._geom[1])};as.prototype.snap=function(t){var n=this.removeCommonBits(t),r=oa.snap(n[0],n[1],this._snapTolerance);return r};as.prototype.interfaces_=function(){return[]};as.prototype.getClass=function(){return as};as.overlayOp=function(t,n,r){var i=new as(t,n);return i.getResultGeometry(r)};as.union=function(t,n){return as.overlayOp(t,n,or.UNION)};as.intersection=function(t,n){return as.overlayOp(t,n,or.INTERSECTION)};as.symDifference=function(t,n){return as.overlayOp(t,n,or.SYMDIFFERENCE)};as.difference=function(t,n){return as.overlayOp(t,n,or.DIFFERENCE)};var gu=function(t,n){this._geom=new Array(2).fill(null),this._geom[0]=t,this._geom[1]=n};gu.prototype.getResultGeometry=function(t){var n=null,r=!1,i=null;try{n=or.overlayOp(this._geom[0],this._geom[1],t);var a=!0;a&&(r=!0)}catch(o){if(o instanceof ad)i=o;else throw o}finally{}if(!r)try{n=as.overlayOp(this._geom[0],this._geom[1],t)}catch(o){throw o instanceof ad?i:o}finally{}return n};gu.prototype.interfaces_=function(){return[]};gu.prototype.getClass=function(){return gu};gu.overlayOp=function(t,n,r){var i=new gu(t,n);return i.getResultGeometry(r)};gu.union=function(t,n){return gu.overlayOp(t,n,or.UNION)};gu.intersection=function(t,n){return gu.overlayOp(t,n,or.INTERSECTION)};gu.symDifference=function(t,n){return gu.overlayOp(t,n,or.SYMDIFFERENCE)};gu.difference=function(t,n){return gu.overlayOp(t,n,or.DIFFERENCE)};var ww=function(){this.mce=null,this.chainIndex=null;var t=arguments[0],n=arguments[1];this.mce=t,this.chainIndex=n};ww.prototype.computeIntersections=function(t,n){this.mce.computeIntersectsForChain(this.chainIndex,t.mce,t.chainIndex,n)};ww.prototype.interfaces_=function(){return[]};ww.prototype.getClass=function(){return ww};var vl=function e(){if(this._label=null,this._xValue=null,this._eventType=null,this._insertEvent=null,this._deleteEventIndex=null,this._obj=null,arguments.length===2){var t=arguments[0],n=arguments[1];this._eventType=e.DELETE,this._xValue=t,this._insertEvent=n}else if(arguments.length===3){var r=arguments[0],i=arguments[1],a=arguments[2];this._eventType=e.INSERT,this._label=r,this._xValue=i,this._obj=a}},ak={INSERT:{configurable:!0},DELETE:{configurable:!0}};vl.prototype.isDelete=function(){return this._eventType===vl.DELETE};vl.prototype.setDeleteEventIndex=function(t){this._deleteEventIndex=t};vl.prototype.getObject=function(){return this._obj};vl.prototype.compareTo=function(t){var n=t;return this._xValue<n._xValue?-1:this._xValue>n._xValue?1:this._eventType<n._eventType?-1:this._eventType>n._eventType?1:0};vl.prototype.getInsertEvent=function(){return this._insertEvent};vl.prototype.isInsert=function(){return this._eventType===vl.INSERT};vl.prototype.isSameLabel=function(t){return this._label===null?!1:this._label===t._label};vl.prototype.getDeleteEventIndex=function(){return this._deleteEventIndex};vl.prototype.interfaces_=function(){return[wc]};vl.prototype.getClass=function(){return vl};ak.INSERT.get=function(){return 1};ak.DELETE.get=function(){return 2};Object.defineProperties(vl,ak);var BI=function(){};BI.prototype.interfaces_=function(){return[]};BI.prototype.getClass=function(){return BI};var Cs=function(){this._hasIntersection=!1,this._hasProper=!1,this._hasProperInterior=!1,this._properIntersectionPoint=null,this._li=null,this._includeProper=null,this._recordIsolated=null,this._isSelfIntersection=null,this._numIntersections=0,this.numTests=0,this._bdyNodes=null,this._isDone=!1,this._isDoneWhenProperInt=!1;var t=arguments[0],n=arguments[1],r=arguments[2];this._li=t,this._includeProper=n,this._recordIsolated=r};Cs.prototype.isTrivialIntersection=function(t,n,r,i){if(t===r&&this._li.getIntersectionNum()===1){if(Cs.isAdjacentSegments(n,i))return!0;if(t.isClosed()){var a=t.getNumPoints()-1;if(n===0&&i===a||i===0&&n===a)return!0}}return!1};Cs.prototype.getProperIntersectionPoint=function(){return this._properIntersectionPoint};Cs.prototype.setIsDoneIfProperInt=function(t){this._isDoneWhenProperInt=t};Cs.prototype.hasProperInteriorIntersection=function(){return this._hasProperInterior};Cs.prototype.isBoundaryPointInternal=function(t,n){for(var r=n.iterator();r.hasNext();){var i=r.next(),a=i.getCoordinate();if(t.isIntersection(a))return!0}return!1};Cs.prototype.hasProperIntersection=function(){return this._hasProper};Cs.prototype.hasIntersection=function(){return this._hasIntersection};Cs.prototype.isDone=function(){return this._isDone};Cs.prototype.isBoundaryPoint=function(t,n){return n===null?!1:!!(this.isBoundaryPointInternal(t,n[0])||this.isBoundaryPointInternal(t,n[1]))};Cs.prototype.setBoundaryNodes=function(t,n){this._bdyNodes=new Array(2).fill(null),this._bdyNodes[0]=t,this._bdyNodes[1]=n};Cs.prototype.addIntersections=function(t,n,r,i){if(t===r&&n===i)return null;this.numTests++;var a=t.getCoordinates()[n],o=t.getCoordinates()[n+1],u=r.getCoordinates()[i],c=r.getCoordinates()[i+1];this._li.computeIntersection(a,o,u,c),this._li.hasIntersection()&&(this._recordIsolated&&(t.setIsolated(!1),r.setIsolated(!1)),this._numIntersections++,this.isTrivialIntersection(t,n,r,i)||(this._hasIntersection=!0,(this._includeProper||!this._li.isProper())&&(t.addIntersections(this._li,n,0),r.addIntersections(this._li,i,1)),this._li.isProper()&&(this._properIntersectionPoint=this._li.getIntersection(0).copy(),this._hasProper=!0,this._isDoneWhenProperInt&&(this._isDone=!0),this.isBoundaryPoint(this._li,this._bdyNodes)||(this._hasProperInterior=!0))))};Cs.prototype.interfaces_=function(){return[]};Cs.prototype.getClass=function(){return Cs};Cs.isAdjacentSegments=function(t,n){return Math.abs(t-n)===1};var Bxt=function(e){function t(){e.call(this),this.events=new Ke,this.nOverlaps=null}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.prepareEvents=function(){var r=this;wf.sort(this.events);for(var i=0;i<this.events.size();i++){var a=r.events.get(i);a.isDelete()&&a.getInsertEvent().setDeleteEventIndex(i)}},t.prototype.computeIntersections=function(){var r=this;if(arguments.length===1){var i=arguments[0];this.nOverlaps=0,this.prepareEvents();for(var a=0;a<this.events.size();a++){var o=r.events.get(a);if(o.isInsert()&&r.processOverlaps(a,o.getDeleteEventIndex(),o,i),i.isDone())break}}else if(arguments.length===3){if(arguments[2]instanceof Cs&&$n(arguments[0],yf)&&$n(arguments[1],yf)){var u=arguments[0],c=arguments[1],g=arguments[2];this.addEdges(u,u),this.addEdges(c,c),this.computeIntersections(g)}else if(typeof arguments[2]=="boolean"&&$n(arguments[0],yf)&&arguments[1]instanceof Cs){var _=arguments[0],E=arguments[1],C=arguments[2];C?this.addEdges(_,null):this.addEdges(_),this.computeIntersections(E)}}},t.prototype.addEdge=function(r,i){for(var a=this,o=r.getMonotoneChainEdge(),u=o.getStartIndexes(),c=0;c<u.length-1;c++){var g=new ww(o,c),_=new vl(i,o.getMinX(c),g);a.events.add(_),a.events.add(new vl(o.getMaxX(c),_))}},t.prototype.processOverlaps=function(r,i,a,o){for(var u=this,c=a.getObject(),g=r;g<i;g++){var _=u.events.get(g);if(_.isInsert()){var E=_.getObject();a.isSameLabel(_)||(c.computeIntersections(E,o),u.nOverlaps++)}}},t.prototype.addEdges=function(){var r=this;if(arguments.length===1)for(var i=arguments[0],a=i.iterator();a.hasNext();){var o=a.next();r.addEdge(o,o)}else if(arguments.length===2)for(var u=arguments[0],c=arguments[1],g=u.iterator();g.hasNext();){var _=g.next();r.addEdge(_,c)}},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(BI),Tp=function(){this._min=Kn.POSITIVE_INFINITY,this._max=Kn.NEGATIVE_INFINITY},X8={NodeComparator:{configurable:!0}};Tp.prototype.getMin=function(){return this._min};Tp.prototype.intersects=function(t,n){return!(this._min>n||this._max<t)};Tp.prototype.getMax=function(){return this._max};Tp.prototype.toString=function(){return vf.toLineString(new Xt(this._min,0),new Xt(this._max,0))};Tp.prototype.interfaces_=function(){return[]};Tp.prototype.getClass=function(){return Tp};X8.NodeComparator.get=function(){return Sw};Object.defineProperties(Tp,X8);var Sw=function(){};Sw.prototype.compare=function(t,n){var r=t,i=n,a=(r._min+r._max)/2,o=(i._min+i._max)/2;return a<o?-1:a>o?1:0};Sw.prototype.interfaces_=function(){return[Z0]};Sw.prototype.getClass=function(){return Sw};var Uxt=function(e){function t(){e.call(this),this._item=null;var n=arguments[0],r=arguments[1],i=arguments[2];this._min=n,this._max=r,this._item=i}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.query=function(r,i,a){if(!this.intersects(r,i))return null;a.visitItem(this._item)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(Tp),Vxt=function(e){function t(){e.call(this),this._node1=null,this._node2=null;var n=arguments[0],r=arguments[1];this._node1=n,this._node2=r,this.buildExtent(this._node1,this._node2)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.buildExtent=function(r,i){this._min=Math.min(r._min,i._min),this._max=Math.max(r._max,i._max)},t.prototype.query=function(r,i,a){if(!this.intersects(r,i))return null;this._node1!==null&&this._node1.query(r,i,a),this._node2!==null&&this._node2.query(r,i,a)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(Tp),Mp=function(){this._leaves=new Ke,this._root=null,this._level=0};Mp.prototype.buildTree=function(){var t=this;wf.sort(this._leaves,new Tp.NodeComparator);for(var n=this._leaves,r=null,i=new Ke;;){if(t.buildLevel(n,i),i.size()===1)return i.get(0);r=n,n=i,i=r}};Mp.prototype.insert=function(t,n,r){if(this._root!==null)throw new Error("Index cannot be added to once it has been queried");this._leaves.add(new Uxt(t,n,r))};Mp.prototype.query=function(t,n,r){this.init(),this._root.query(t,n,r)};Mp.prototype.buildRoot=function(){if(this._root!==null)return null;this._root=this.buildTree()};Mp.prototype.printNode=function(t){xs.out.println(vf.toLineString(new Xt(t._min,this._level),new Xt(t._max,this._level)))};Mp.prototype.init=function(){if(this._root!==null)return null;this.buildRoot()};Mp.prototype.buildLevel=function(t,n){this._level++,n.clear();for(var r=0;r<t.size();r+=2){var i=t.get(r),a=r+1<t.size()?t.get(r):null;if(a===null)n.add(i);else{var o=new Vxt(t.get(r),t.get(r+1));n.add(o)}}};Mp.prototype.interfaces_=function(){return[]};Mp.prototype.getClass=function(){return Mp};var dx=function(){this._items=new Ke};dx.prototype.visitItem=function(t){this._items.add(t)};dx.prototype.getItems=function(){return this._items};dx.prototype.interfaces_=function(){return[gg]};dx.prototype.getClass=function(){return dx};var gx=function(){this._index=null;var t=arguments[0];if(!$n(t,dg))throw new wo;this._index=new Jm(t)},sk={SegmentVisitor:{configurable:!0},IntervalIndexedGeometry:{configurable:!0}};gx.prototype.locate=function(t){var n=new vh(t),r=new mx(n);return this._index.query(t.y,t.y,r),n.getLocation()};gx.prototype.interfaces_=function(){return[fx]};gx.prototype.getClass=function(){return gx};sk.SegmentVisitor.get=function(){return mx};sk.IntervalIndexedGeometry.get=function(){return Jm};Object.defineProperties(gx,sk);var mx=function(){this._counter=null;var t=arguments[0];this._counter=t};mx.prototype.visitItem=function(t){var n=t;this._counter.countSegment(n.getCoordinate(0),n.getCoordinate(1))};mx.prototype.interfaces_=function(){return[gg]};mx.prototype.getClass=function(){return mx};var Jm=function(){this._index=new Mp;var t=arguments[0];this.init(t)};Jm.prototype.init=function(t){for(var n=this,r=ws.getLines(t),i=r.iterator();i.hasNext();){var a=i.next(),o=a.getCoordinates();n.addLine(o)}};Jm.prototype.addLine=function(t){for(var n=this,r=1;r<t.length;r++){var i=new Tn(t[r-1],t[r]),a=Math.min(i.p0.y,i.p1.y),o=Math.max(i.p0.y,i.p1.y);n._index.insert(a,o,i)}};Jm.prototype.query=function(){if(arguments.length===2){var t=arguments[0],n=arguments[1],r=new dx;return this._index.query(t,n,r),r.getItems()}else if(arguments.length===3){var i=arguments[0],a=arguments[1],o=arguments[2];this._index.query(i,a,o)}};Jm.prototype.interfaces_=function(){return[]};Jm.prototype.getClass=function(){return Jm};var Ew=function(e){function t(){if(e.call(this),this._parentGeom=null,this._lineEdgeMap=new A8,this._boundaryNodeRule=null,this._useBoundaryDeterminationRule=!0,this._argIndex=null,this._boundaryNodes=null,this._hasTooFewPoints=!1,this._invalidPoint=null,this._areaPtLocator=null,this._ptLocator=new Ef,arguments.length===2){var n=arguments[0],r=arguments[1],i=Ec.OGC_SFS_BOUNDARY_RULE;this._argIndex=n,this._parentGeom=r,this._boundaryNodeRule=i,r!==null&&this.add(r)}else if(arguments.length===3){var a=arguments[0],o=arguments[1],u=arguments[2];this._argIndex=a,this._parentGeom=o,this._boundaryNodeRule=u,o!==null&&this.add(o)}}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.insertBoundaryPoint=function(r,i){var a=this._nodes.addNode(i),o=a.getLabel(),u=1,c=Kt.NONE;c=o.getLocation(r,ke.ON),c===Kt.BOUNDARY&&u++;var g=t.determineBoundary(this._boundaryNodeRule,u);o.setLocation(r,g)},t.prototype.computeSelfNodes=function(){if(arguments.length===2){var r=arguments[0],i=arguments[1];return this.computeSelfNodes(r,i,!1)}else if(arguments.length===3){var a=arguments[0],o=arguments[1],u=arguments[2],c=new Cs(a,!0,!1);c.setIsDoneIfProperInt(u);var g=this.createEdgeSetIntersector(),_=this._parentGeom instanceof _p||this._parentGeom instanceof Da||this._parentGeom instanceof xp,E=o||!_;return g.computeIntersections(this._edges,c,E),this.addSelfIntersectionNodes(this._argIndex),c}},t.prototype.computeSplitEdges=function(r){for(var i=this._edges.iterator();i.hasNext();){var a=i.next();a.eiList.addSplitEdges(r)}},t.prototype.computeEdgeIntersections=function(r,i,a){var o=new Cs(i,a,!0);o.setBoundaryNodes(this.getBoundaryNodes(),r.getBoundaryNodes());var u=this.createEdgeSetIntersector();return u.computeIntersections(this._edges,r._edges,o),o},t.prototype.getGeometry=function(){return this._parentGeom},t.prototype.getBoundaryNodeRule=function(){return this._boundaryNodeRule},t.prototype.hasTooFewPoints=function(){return this._hasTooFewPoints},t.prototype.addPoint=function(){if(arguments[0]instanceof pl){var r=arguments[0],i=r.getCoordinate();this.insertPoint(this._argIndex,i,Kt.INTERIOR)}else if(arguments[0]instanceof Xt){var a=arguments[0];this.insertPoint(this._argIndex,a,Kt.INTERIOR)}},t.prototype.addPolygon=function(r){var i=this;this.addPolygonRing(r.getExteriorRing(),Kt.EXTERIOR,Kt.INTERIOR);for(var a=0;a<r.getNumInteriorRing();a++){var o=r.getInteriorRingN(a);i.addPolygonRing(o,Kt.INTERIOR,Kt.EXTERIOR)}},t.prototype.addEdge=function(r){this.insertEdge(r);var i=r.getCoordinates();this.insertPoint(this._argIndex,i[0],Kt.BOUNDARY),this.insertPoint(this._argIndex,i[i.length-1],Kt.BOUNDARY)},t.prototype.addLineString=function(r){var i=Mr.removeRepeatedPoints(r.getCoordinates());if(i.length<2)return this._hasTooFewPoints=!0,this._invalidPoint=i[0],null;var a=new zI(i,new Ci(this._argIndex,Kt.INTERIOR));this._lineEdgeMap.put(r,a),this.insertEdge(a),lr.isTrue(i.length>=2,"found LineString with single point"),this.insertBoundaryPoint(this._argIndex,i[0]),this.insertBoundaryPoint(this._argIndex,i[i.length-1])},t.prototype.getInvalidPoint=function(){return this._invalidPoint},t.prototype.getBoundaryPoints=function(){for(var r=this.getBoundaryNodes(),i=new Array(r.size()).fill(null),a=0,o=r.iterator();o.hasNext();){var u=o.next();i[a++]=u.getCoordinate().copy()}return i},t.prototype.getBoundaryNodes=function(){return this._boundaryNodes===null&&(this._boundaryNodes=this._nodes.getBoundaryNodes(this._argIndex)),this._boundaryNodes},t.prototype.addSelfIntersectionNode=function(r,i,a){if(this.isBoundaryNode(r,i))return null;a===Kt.BOUNDARY&&this._useBoundaryDeterminationRule?this.insertBoundaryPoint(r,i):this.insertPoint(r,i,a)},t.prototype.addPolygonRing=function(r,i,a){if(r.isEmpty())return null;var o=Mr.removeRepeatedPoints(r.getCoordinates());if(o.length<4)return this._hasTooFewPoints=!0,this._invalidPoint=o[0],null;var u=i,c=a;on.isCCW(o)&&(u=a,c=i);var g=new zI(o,new Ci(this._argIndex,Kt.BOUNDARY,u,c));this._lineEdgeMap.put(r,g),this.insertEdge(g),this.insertPoint(this._argIndex,o[0],Kt.BOUNDARY)},t.prototype.insertPoint=function(r,i,a){var o=this._nodes.addNode(i),u=o.getLabel();u===null?o._label=new Ci(r,a):u.setLocation(r,a)},t.prototype.createEdgeSetIntersector=function(){return new Bxt},t.prototype.addSelfIntersectionNodes=function(r){for(var i=this,a=this._edges.iterator();a.hasNext();)for(var o=a.next(),u=o.getLabel().getLocation(r),c=o.eiList.iterator();c.hasNext();){var g=c.next();i.addSelfIntersectionNode(r,g.coord,u)}},t.prototype.add=function(){if(arguments.length===1){var r=arguments[0];if(r.isEmpty())return null;if(r instanceof xp&&(this._useBoundaryDeterminationRule=!1),r instanceof Da)this.addPolygon(r);else if(r instanceof Uo)this.addLineString(r);else if(r instanceof pl)this.addPoint(r);else if(r instanceof sx)this.addCollection(r);else if(r instanceof Gm)this.addCollection(r);else if(r instanceof xp)this.addCollection(r);else if(r instanceof uu)this.addCollection(r);else throw new Error(r.getClass().getName())}else return e.prototype.add.apply(this,arguments)},t.prototype.addCollection=function(r){for(var i=this,a=0;a<r.getNumGeometries();a++){var o=r.getGeometryN(a);i.add(o)}},t.prototype.locate=function(r){return $n(this._parentGeom,dg)&&this._parentGeom.getNumGeometries()>50?(this._areaPtLocator===null&&(this._areaPtLocator=new gx(this._parentGeom)),this._areaPtLocator.locate(r)):this._ptLocator.locate(r,this._parentGeom)},t.prototype.findEdge=function(){if(arguments.length===1){var r=arguments[0];return this._lineEdgeMap.get(r)}else return e.prototype.findEdge.apply(this,arguments)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t.determineBoundary=function(r,i){return r.isInBoundary(i)?Kt.BOUNDARY:Kt.INTERIOR},t}(Po),vx=function(){if(this._li=new $m,this._resultPrecisionModel=null,this._arg=null,arguments.length===1){var t=arguments[0];this.setComputationPrecision(t.getPrecisionModel()),this._arg=new Array(1).fill(null),this._arg[0]=new Ew(0,t)}else if(arguments.length===2){var n=arguments[0],r=arguments[1],i=Ec.OGC_SFS_BOUNDARY_RULE;n.getPrecisionModel().compareTo(r.getPrecisionModel())>=0?this.setComputationPrecision(n.getPrecisionModel()):this.setComputationPrecision(r.getPrecisionModel()),this._arg=new Array(2).fill(null),this._arg[0]=new Ew(0,n,i),this._arg[1]=new Ew(1,r,i)}else if(arguments.length===3){var a=arguments[0],o=arguments[1],u=arguments[2];a.getPrecisionModel().compareTo(o.getPrecisionModel())>=0?this.setComputationPrecision(a.getPrecisionModel()):this.setComputationPrecision(o.getPrecisionModel()),this._arg=new Array(2).fill(null),this._arg[0]=new Ew(0,a,u),this._arg[1]=new Ew(1,o,u)}};vx.prototype.getArgGeometry=function(t){return this._arg[t].getGeometry()};vx.prototype.setComputationPrecision=function(t){this._resultPrecisionModel=t,this._li.setPrecisionModel(this._resultPrecisionModel)};vx.prototype.interfaces_=function(){return[]};vx.prototype.getClass=function(){return vx};var Qm=function(){};Qm.prototype.interfaces_=function(){return[]};Qm.prototype.getClass=function(){return Qm};Qm.map=function(){if(arguments[0]instanceof Bn&&$n(arguments[1],Qm.MapOp)){for(var t=arguments[0],n=arguments[1],r=new Ke,i=0;i<t.getNumGeometries();i++){var a=n.map(t.getGeometryN(i));a!==null&&r.add(a)}return t.getFactory().buildGeometry(r)}else if($n(arguments[0],ka)&&$n(arguments[1],Qm.MapOp)){for(var o=arguments[0],u=arguments[1],c=new Ke,g=o.iterator();g.hasNext();){var _=g.next(),E=u.map(_);E!==null&&c.add(E)}return c}};Qm.MapOp=function(){};var or=function(e){function t(){var n=arguments[0],r=arguments[1];e.call(this,n,r),this._ptLocator=new Ef,this._geomFact=null,this._resultGeom=null,this._graph=null,this._edgeList=new Sf,this._resultPolyList=new Ke,this._resultLineList=new Ke,this._resultPointList=new Ke,this._graph=new Po(new B8),this._geomFact=n.getFactory()}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.insertUniqueEdge=function(r){var i=this._edgeList.findEqualEdge(r);if(i!==null){var a=i.getLabel(),o=r.getLabel();i.isPointwiseEqual(r)||(o=new Ci(r.getLabel()),o.flip());var u=i.getDepth();u.isNull()&&u.add(a),u.add(o),a.merge(o)}else this._edgeList.add(r)},t.prototype.getGraph=function(){return this._graph},t.prototype.cancelDuplicateResultEdges=function(){for(var r=this._graph.getEdgeEnds().iterator();r.hasNext();){var i=r.next(),a=i.getSym();i.isInResult()&&a.isInResult()&&(i.setInResult(!1),a.setInResult(!1))}},t.prototype.isCoveredByLA=function(r){return!!(this.isCovered(r,this._resultLineList)||this.isCovered(r,this._resultPolyList))},t.prototype.computeGeometry=function(r,i,a,o){var u=new Ke;return u.addAll(r),u.addAll(i),u.addAll(a),u.isEmpty()?t.createEmptyResult(o,this._arg[0].getGeometry(),this._arg[1].getGeometry(),this._geomFact):this._geomFact.buildGeometry(u)},t.prototype.mergeSymLabels=function(){for(var r=this._graph.getNodes().iterator();r.hasNext();){var i=r.next();i.getEdges().mergeSymLabels()}},t.prototype.isCovered=function(r,i){for(var a=this,o=i.iterator();o.hasNext();){var u=o.next(),c=a._ptLocator.locate(r,u);if(c!==Kt.EXTERIOR)return!0}return!1},t.prototype.replaceCollapsedEdges=function(){for(var r=new Ke,i=this._edgeList.iterator();i.hasNext();){var a=i.next();a.isCollapsed()&&(i.remove(),r.add(a.getCollapsedEdge()))}this._edgeList.addAll(r)},t.prototype.updateNodeLabelling=function(){for(var r=this._graph.getNodes().iterator();r.hasNext();){var i=r.next(),a=i.getEdges().getLabel();i.getLabel().merge(a)}},t.prototype.getResultGeometry=function(r){return this.computeOverlay(r),this._resultGeom},t.prototype.insertUniqueEdges=function(r){for(var i=this,a=r.iterator();a.hasNext();){var o=a.next();i.insertUniqueEdge(o)}},t.prototype.computeOverlay=function(r){this.copyPoints(0),this.copyPoints(1),this._arg[0].computeSelfNodes(this._li,!1),this._arg[1].computeSelfNodes(this._li,!1),this._arg[0].computeEdgeIntersections(this._arg[1],this._li,!0);var i=new Ke;this._arg[0].computeSplitEdges(i),this._arg[1].computeSplitEdges(i),this.insertUniqueEdges(i),this.computeLabelsFromDepths(),this.replaceCollapsedEdges(),Km.checkValid(this._edgeList.getEdges()),this._graph.addEdges(this._edgeList.getEdges()),this.computeLabelling(),this.labelIncompleteNodes(),this.findResultAreaEdges(r),this.cancelDuplicateResultEdges();var a=new dl(this._geomFact);a.add(this._graph),this._resultPolyList=a.getPolygons();var o=new Mh(this,this._geomFact,this._ptLocator);this._resultLineList=o.build(r);var u=new Ay(this,this._geomFact,this._ptLocator);this._resultPointList=u.build(r),this._resultGeom=this.computeGeometry(this._resultPointList,this._resultLineList,this._resultPolyList,r)},t.prototype.labelIncompleteNode=function(r,i){var a=this._ptLocator.locate(r.getCoordinate(),this._arg[i].getGeometry());r.getLabel().setLocation(i,a)},t.prototype.copyPoints=function(r){for(var i=this,a=this._arg[r].getNodeIterator();a.hasNext();){var o=a.next(),u=i._graph.addNode(o.getCoordinate());u.setLabel(r,o.getLabel().getLocation(r))}},t.prototype.findResultAreaEdges=function(r){for(var i=this._graph.getEdgeEnds().iterator();i.hasNext();){var a=i.next(),o=a.getLabel();o.isArea()&&!a.isInteriorAreaEdge()&&t.isResultOfOp(o.getLocation(0,ke.RIGHT),o.getLocation(1,ke.RIGHT),r)&&a.setInResult(!0)}},t.prototype.computeLabelsFromDepths=function(){for(var r=this._edgeList.iterator();r.hasNext();){var i=r.next(),a=i.getLabel(),o=i.getDepth();if(!o.isNull()){o.normalize();for(var u=0;u<2;u++)!a.isNull(u)&&a.isArea()&&!o.isNull(u)&&(o.getDelta(u)===0?a.toLine(u):(lr.isTrue(!o.isNull(u,ke.LEFT),"depth of LEFT side has not been initialized"),a.setLocation(u,ke.LEFT,o.getLocation(u,ke.LEFT)),lr.isTrue(!o.isNull(u,ke.RIGHT),"depth of RIGHT side has not been initialized"),a.setLocation(u,ke.RIGHT,o.getLocation(u,ke.RIGHT))))}}},t.prototype.computeLabelling=function(){for(var r=this,i=this._graph.getNodes().iterator();i.hasNext();){var a=i.next();a.getEdges().computeLabelling(r._arg)}this.mergeSymLabels(),this.updateNodeLabelling()},t.prototype.labelIncompleteNodes=function(){for(var r=this,i=this._graph.getNodes().iterator();i.hasNext();){var a=i.next(),o=a.getLabel();a.isIsolated()&&(o.isNull(0)?r.labelIncompleteNode(a,0):r.labelIncompleteNode(a,1)),a.getEdges().updateLabelling(o)}},t.prototype.isCoveredByA=function(r){return!!this.isCovered(r,this._resultPolyList)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(vx);or.overlayOp=function(e,t,n){var r=new or(e,t),i=r.getResultGeometry(n);return i};or.intersection=function(e,t){if(e.isEmpty()||t.isEmpty())return or.createEmptyResult(or.INTERSECTION,e,t,e.getFactory());if(e.isGeometryCollection()){var n=t;return My.map(e,{interfaces_:function(){return[Qm.MapOp]},map:function(r){return r.intersection(n)}})}return e.checkNotGeometryCollection(e),e.checkNotGeometryCollection(t),gu.overlayOp(e,t,or.INTERSECTION)};or.symDifference=function(e,t){if(e.isEmpty()||t.isEmpty()){if(e.isEmpty()&&t.isEmpty())return or.createEmptyResult(or.SYMDIFFERENCE,e,t,e.getFactory());if(e.isEmpty())return t.copy();if(t.isEmpty())return e.copy()}return e.checkNotGeometryCollection(e),e.checkNotGeometryCollection(t),gu.overlayOp(e,t,or.SYMDIFFERENCE)};or.resultDimension=function(e,t,n){var r=t.getDimension(),i=n.getDimension(),a=-1;switch(e){case or.INTERSECTION:a=Math.min(r,i);break;case or.UNION:a=Math.max(r,i);break;case or.DIFFERENCE:a=r;break;case or.SYMDIFFERENCE:a=Math.max(r,i);break}return a};or.createEmptyResult=function(e,t,n,r){var i=null;switch(or.resultDimension(e,t,n)){case-1:i=r.createGeometryCollection(new Array(0).fill(null));break;case 0:i=r.createPoint();break;case 1:i=r.createLineString();break;case 2:i=r.createPolygon();break}return i};or.difference=function(e,t){return e.isEmpty()?or.createEmptyResult(or.DIFFERENCE,e,t,e.getFactory()):t.isEmpty()?e.copy():(e.checkNotGeometryCollection(e),e.checkNotGeometryCollection(t),gu.overlayOp(e,t,or.DIFFERENCE))};or.isResultOfOp=function(){if(arguments.length===2){var e=arguments[0],t=arguments[1],n=e.getLocation(0),r=e.getLocation(1);return or.isResultOfOp(n,r,t)}else if(arguments.length===3){var i=arguments[0],a=arguments[1],o=arguments[2];switch(i===Kt.BOUNDARY&&(i=Kt.INTERIOR),a===Kt.BOUNDARY&&(a=Kt.INTERIOR),o){case or.INTERSECTION:return i===Kt.INTERIOR&&a===Kt.INTERIOR;case or.UNION:return i===Kt.INTERIOR||a===Kt.INTERIOR;case or.DIFFERENCE:return i===Kt.INTERIOR&&a!==Kt.INTERIOR;case or.SYMDIFFERENCE:return i===Kt.INTERIOR&&a!==Kt.INTERIOR||i!==Kt.INTERIOR&&a===Kt.INTERIOR}return!1}};or.INTERSECTION=1;or.UNION=2;or.DIFFERENCE=3;or.SYMDIFFERENCE=4;var Eg=function(){this._g=null,this._boundaryDistanceTolerance=null,this._linework=null,this._ptLocator=new Ef,this._seg=new Tn;var t=arguments[0],n=arguments[1];this._g=t,this._boundaryDistanceTolerance=n,this._linework=this.extractLinework(t)};Eg.prototype.isWithinToleranceOfBoundary=function(t){for(var n=this,r=0;r<this._linework.getNumGeometries();r++)for(var i=n._linework.getGeometryN(r),a=i.getCoordinateSequence(),o=0;o<a.size()-1;o++){a.getCoordinate(o,n._seg.p0),a.getCoordinate(o+1,n._seg.p1);var u=n._seg.distance(t);if(u<=n._boundaryDistanceTolerance)return!0}return!1};Eg.prototype.getLocation=function(t){return this.isWithinToleranceOfBoundary(t)?Kt.BOUNDARY:this._ptLocator.locate(t,this._g)};Eg.prototype.extractLinework=function(t){var n=new yx;t.apply(n);var r=n.getLinework(),i=Fr.toLineStringArray(r);return t.getFactory().createMultiLineString(i)};Eg.prototype.interfaces_=function(){return[]};Eg.prototype.getClass=function(){return Eg};var yx=function(){this._linework=null,this._linework=new Ke};yx.prototype.getLinework=function(){return this._linework};yx.prototype.filter=function(t){var n=this;if(t instanceof Da){var r=t;this._linework.add(r.getExteriorRing());for(var i=0;i<r.getNumInteriorRing();i++)n._linework.add(r.getInteriorRingN(i))}};yx.prototype.interfaces_=function(){return[_h]};yx.prototype.getClass=function(){return yx};var tv=function(){this._g=null,this._doLeft=!0,this._doRight=!0;var t=arguments[0];this._g=t};tv.prototype.extractPoints=function(t,n,r){for(var i=this,a=t.getCoordinates(),o=0;o<a.length-1;o++)i.computeOffsetPoints(a[o],a[o+1],n,r)};tv.prototype.setSidesToGenerate=function(t,n){this._doLeft=t,this._doRight=n};tv.prototype.getPoints=function(t){for(var n=this,r=new Ke,i=ws.getLines(this._g),a=i.iterator();a.hasNext();){var o=a.next();n.extractPoints(o,t,r)}return r};tv.prototype.computeOffsetPoints=function(t,n,r,i){var a=n.x-t.x,o=n.y-t.y,u=Math.sqrt(a*a+o*o),c=r*a/u,g=r*o/u,_=(n.x+t.x)/2,E=(n.y+t.y)/2;if(this._doLeft){var C=new Xt(_-g,E+c);i.add(C)}if(this._doRight){var O=new Xt(_+g,E-c);i.add(O)}};tv.prototype.interfaces_=function(){return[]};tv.prototype.getClass=function(){return tv};var ql=function e(){this._geom=null,this._locFinder=null,this._location=new Array(3).fill(null),this._invalidLocation=null,this._boundaryDistanceTolerance=e.TOLERANCE,this._testCoords=new Ke;var t=arguments[0],n=arguments[1],r=arguments[2];this._boundaryDistanceTolerance=e.computeBoundaryDistanceTolerance(t,n),this._geom=[t,n,r],this._locFinder=[new Eg(this._geom[0],this._boundaryDistanceTolerance),new Eg(this._geom[1],this._boundaryDistanceTolerance),new Eg(this._geom[2],this._boundaryDistanceTolerance)]},Y8={TOLERANCE:{configurable:!0}};ql.prototype.reportResult=function(t,n,r){xs.out.println("Overlay result invalid - A:"+Kt.toLocationSymbol(n[0])+" B:"+Kt.toLocationSymbol(n[1])+" expected:"+(r?"i":"e")+" actual:"+Kt.toLocationSymbol(n[2]))};ql.prototype.isValid=function(t){this.addTestPts(this._geom[0]),this.addTestPts(this._geom[1]);var n=this.checkValid(t);return n};ql.prototype.checkValid=function(){var t=this;if(arguments.length===1){for(var n=arguments[0],r=0;r<this._testCoords.size();r++){var i=t._testCoords.get(r);if(!t.checkValid(n,i))return t._invalidLocation=i,!1}return!0}else if(arguments.length===2){var a=arguments[0],o=arguments[1];return this._location[0]=this._locFinder[0].getLocation(o),this._location[1]=this._locFinder[1].getLocation(o),this._location[2]=this._locFinder[2].getLocation(o),ql.hasLocation(this._location,Kt.BOUNDARY)?!0:this.isValidResult(a,this._location)}};ql.prototype.addTestPts=function(t){var n=new tv(t);this._testCoords.addAll(n.getPoints(5*this._boundaryDistanceTolerance))};ql.prototype.isValidResult=function(t,n){var r=or.isResultOfOp(n[0],n[1],t),i=n[2]===Kt.INTERIOR,a=!(r^i);return a||this.reportResult(t,n,r),a};ql.prototype.getInvalidLocation=function(){return this._invalidLocation};ql.prototype.interfaces_=function(){return[]};ql.prototype.getClass=function(){return ql};ql.hasLocation=function(t,n){for(var r=0;r<3;r++)if(t[r]===n)return!0;return!1};ql.computeBoundaryDistanceTolerance=function(t,n){return Math.min(oa.computeSizeBasedSnapTolerance(t),oa.computeSizeBasedSnapTolerance(n))};ql.isValid=function(t,n,r,i){var a=new ql(t,n,i);return a.isValid(r)};Y8.TOLERANCE.get=function(){return 1e-6};Object.defineProperties(ql,Y8);var Gl=function e(t){this._geomFactory=null,this._skipEmpty=!1,this._inputGeoms=null,this._geomFactory=e.extractFactory(t),this._inputGeoms=t};Gl.prototype.extractElements=function(t,n){var r=this;if(t===null)return null;for(var i=0;i<t.getNumGeometries();i++){var a=t.getGeometryN(i);r._skipEmpty&&a.isEmpty()||n.add(a)}};Gl.prototype.combine=function(){for(var t=this,n=new Ke,r=this._inputGeoms.iterator();r.hasNext();){var i=r.next();t.extractElements(i,n)}return n.size()===0?this._geomFactory!==null?this._geomFactory.createGeometryCollection(null):null:this._geomFactory.buildGeometry(n)};Gl.prototype.interfaces_=function(){return[]};Gl.prototype.getClass=function(){return Gl};Gl.combine=function(){if(arguments.length===1){var t=arguments[0],n=new Gl(t);return n.combine()}else if(arguments.length===2){var r=arguments[0],i=arguments[1],a=new Gl(Gl.createList(r,i));return a.combine()}else if(arguments.length===3){var o=arguments[0],u=arguments[1],c=arguments[2],g=new Gl(Gl.createList(o,u,c));return g.combine()}};Gl.extractFactory=function(t){return t.isEmpty()?null:t.iterator().next().getFactory()};Gl.createList=function(){if(arguments.length===2){var t=arguments[0],n=arguments[1],r=new Ke;return r.add(t),r.add(n),r}else if(arguments.length===3){var i=arguments[0],a=arguments[1],o=arguments[2],u=new Ke;return u.add(i),u.add(a),u.add(o),u}};var ya=function(){this._inputPolys=null,this._geomFactory=null;var t=arguments[0];this._inputPolys=t,this._inputPolys===null&&(this._inputPolys=new Ke)},Z8={STRTREE_NODE_CAPACITY:{configurable:!0}};ya.prototype.reduceToGeometries=function(t){for(var n=this,r=new Ke,i=t.iterator();i.hasNext();){var a=i.next(),o=null;$n(a,yf)?o=n.unionTree(a):a instanceof Bn&&(o=a),r.add(o)}return r};ya.prototype.extractByEnvelope=function(t,n,r){for(var i=new Ke,a=0;a<n.getNumGeometries();a++){var o=n.getGeometryN(a);o.getEnvelopeInternal().intersects(t)?i.add(o):r.add(o)}return this._geomFactory.buildGeometry(i)};ya.prototype.unionOptimized=function(t,n){var r=t.getEnvelopeInternal(),i=n.getEnvelopeInternal();if(!r.intersects(i)){var a=Gl.combine(t,n);return a}if(t.getNumGeometries()<=1&&n.getNumGeometries()<=1)return this.unionActual(t,n);var o=r.intersection(i);return this.unionUsingEnvelopeIntersection(t,n,o)};ya.prototype.union=function(){if(this._inputPolys===null)throw new Error("union() method cannot be called twice");if(this._inputPolys.isEmpty())return null;this._geomFactory=this._inputPolys.iterator().next().getFactory();for(var t=new R8(ya.STRTREE_NODE_CAPACITY),n=this._inputPolys.iterator();n.hasNext();){var r=n.next();t.insert(r.getEnvelopeInternal(),r)}this._inputPolys=null;var i=t.itemsTree(),a=this.unionTree(i);return a};ya.prototype.binaryUnion=function(){if(arguments.length===1){var t=arguments[0];return this.binaryUnion(t,0,t.size())}else if(arguments.length===3){var n=arguments[0],r=arguments[1],i=arguments[2];if(i-r<=1){var a=ya.getGeometry(n,r);return this.unionSafe(a,null)}else{if(i-r==2)return this.unionSafe(ya.getGeometry(n,r),ya.getGeometry(n,r+1));var o=Math.trunc((i+r)/2),u=this.binaryUnion(n,r,o),c=this.binaryUnion(n,o,i);return this.unionSafe(u,c)}}};ya.prototype.repeatedUnion=function(t){for(var n=null,r=t.iterator();r.hasNext();){var i=r.next();n===null?n=i.copy():n=n.union(i)}return n};ya.prototype.unionSafe=function(t,n){return t===null&&n===null?null:t===null?n.copy():n===null?t.copy():this.unionOptimized(t,n)};ya.prototype.unionActual=function(t,n){return ya.restrictToPolygons(t.union(n))};ya.prototype.unionTree=function(t){var n=this.reduceToGeometries(t),r=this.binaryUnion(n);return r};ya.prototype.unionUsingEnvelopeIntersection=function(t,n,r){var i=new Ke,a=this.extractByEnvelope(r,t,i),o=this.extractByEnvelope(r,n,i),u=this.unionActual(a,o);i.add(u);var c=Gl.combine(i);return c};ya.prototype.bufferUnion=function(){if(arguments.length===1){var t=arguments[0],n=t.get(0).getFactory(),r=n.buildGeometry(t),i=r.buffer(0);return i}else if(arguments.length===2){var a=arguments[0],o=arguments[1],u=a.getFactory(),c=u.createGeometryCollection([a,o]),g=c.buffer(0);return g}};ya.prototype.interfaces_=function(){return[]};ya.prototype.getClass=function(){return ya};ya.restrictToPolygons=function(t){if($n(t,dg))return t;var n=gd.getPolygons(t);return n.size()===1?n.get(0):t.getFactory().createMultiPolygon(Fr.toPolygonArray(n))};ya.getGeometry=function(t,n){return n>=t.size()?null:t.get(n)};ya.union=function(t){var n=new ya(t);return n.union()};Z8.STRTREE_NODE_CAPACITY.get=function(){return 4};Object.defineProperties(ya,Z8);var UI=function(){};UI.prototype.interfaces_=function(){return[]};UI.prototype.getClass=function(){return UI};UI.union=function(t,n){if(t.isEmpty()||n.isEmpty()){if(t.isEmpty()&&n.isEmpty())return or.createEmptyResult(or.UNION,t,n,t.getFactory());if(t.isEmpty())return n.copy();if(n.isEmpty())return t.copy()}return t.checkNotGeometryCollection(t),t.checkNotGeometryCollection(n),gu.overlayOp(t,n,or.UNION)};var ev=function(){return new VI};function VI(){this.reset()}VI.prototype={constructor:VI,reset:function(){this.s=this.t=0},add:function(e){K8($I,e,this.t),K8(this,$I.s,this.s),this.s?this.t+=$I.t:this.s=$I.t},valueOf:function(){return this.s}};var $I=new VI;function K8(e,t,n){var r=e.s=t+n,i=r-t,a=r-i;e.t=t-a+(n-i)}var uk=Math.PI,J8=uk*2;ev();ev();ev();function Q8(e,t){return[e>uk?e-J8:e<-uk?e+J8:e,t]}Q8.invert=Q8;var t$=function(e,t){return e<t?-1:e>t?1:e>=t?0:NaN},$xt=function(e){return e.length===1&&(e=jxt(e)),{left:function(t,n,r,i){for(r==null&&(r=0),i==null&&(i=t.length);r<i;){var a=r+i>>>1;e(t[a],n)<0?r=a+1:i=a}return r},right:function(t,n,r,i){for(r==null&&(r=0),i==null&&(i=t.length);r<i;){var a=r+i>>>1;e(t[a],n)>0?i=a:r=a+1}return r}}};function jxt(e){return function(t,n){return t$(e(t),n)}}$xt(t$);ev();ev();ev();ev();ev();function e$(){}e$.prototype={constructor:e$,point:function(e,t){this.stream.point(e,t)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};function qxt(e,t,n,r){for(var i=-1,a=e==null?0:e.length;++i<a;){var o=e[i];t(r,o,n(o),e)}return r}var Gxt=qxt,Wxt=F4,Hxt=Pm;function Xxt(e,t){return e&&Wxt(e,t,Hxt)}var Yxt=Xxt,Zxt=Yv;function Kxt(e,t){return function(n,r){if(n==null)return n;if(!Zxt(n))return e(n,r);for(var i=n.length,a=t?i:-1,o=Object(n);(t?a--:++a<i)&&r(o[a],a,o)!==!1;);return n}}var Jxt=Kxt,Qxt=Yxt,t1t=Jxt,e1t=t1t(Qxt),n1t=e1t,r1t=n1t;function i1t(e,t,n,r){return r1t(e,function(i,a,o){t(r,i,n(i),o)}),r}var o1t=i1t,a1t=Gxt,s1t=o1t,u1t=B2,l1t=oh;function c1t(e,t){return function(n,r){var i=l1t(n)?a1t:s1t,a=t?t():{};return i(n,e,u1t(r),a)}}var f1t=c1t,h1t=N2,p1t=f1t,d1t=Object.prototype,g1t=d1t.hasOwnProperty,m1t=p1t(function(e,t,n){g1t.call(e,n)?e[n].push(t):h1t(e,n,[t])}),dEt=m1t,v1t=$C,y1t=m6,_1t=g0;function x1t(e,t,n){for(var r=-1,i=t.length,a={};++r<i;){var o=t[r],u=v1t(e,o);n(u,o)&&y1t(a,_1t(o,e),u)}return a}var b1t=x1t,w1t=VC,S1t=B2,E1t=b1t,C1t=yO;function I1t(e,t){if(e==null)return{};var n=w1t(C1t(e),function(r){return[r]});return t=S1t(t),E1t(e,n,function(r,i){return t(r,i[0])})}var gEt=I1t;function P1t(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}var T1t=P1t;function M1t(e,t,n){var r=-1,i=e.length;t<0&&(t=-t>i?0:i+t),n=n>i?i:n,n<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var a=Array(i);++r<i;)a[r]=e[r+t];return a}var A1t=M1t,L1t=$C,O1t=A1t;function R1t(e,t){return t.length<2?e:L1t(e,O1t(t,0,-1))}var k1t=R1t,D1t=g0,N1t=T1t,F1t=k1t,z1t=m0;function B1t(e,t){return t=D1t(t,e),e=F1t(e,t),e==null||delete e[z1t(N1t(t))]}var U1t=B1t,V1t=dO;function $1t(e){return V1t(e)?void 0:e}var j1t=$1t,n$=a0,q1t=IC,G1t=oh,r$=n$?n$.isConcatSpreadable:void 0;function W1t(e){return G1t(e)||q1t(e)||!!(r$&&e&&e[r$])}var H1t=W1t,X1t=$A,Y1t=H1t;function i$(e,t,n,r,i){var a=-1,o=e.length;for(n||(n=Y1t),i||(i=[]);++a<o;){var u=e[a];t>0&&n(u)?t>1?i$(u,t-1,n,r,i):X1t(i,u):r||(i[i.length]=u)}return i}var Z1t=i$,K1t=Z1t;function J1t(e){var t=e==null?0:e.length;return t?K1t(e,1):[]}var Q1t=J1t,tbt=Q1t,ebt=J4,nbt=t6;function rbt(e){return nbt(ebt(e,void 0,tbt),e+"")}var ibt=rbt,obt=VC,abt=T6,sbt=U1t,ubt=g0,lbt=Nm,cbt=j1t,fbt=ibt,hbt=yO,pbt=1,dbt=2,gbt=4,mbt=fbt(function(e,t){var n={};if(e==null)return n;var r=!1;t=obt(t,function(a){return a=ubt(a,e),r||(r=a.length>1),a}),lbt(e,hbt(e),n),r&&(n=abt(n,pbt|dbt|gbt,cbt));for(var i=t.length;i--;)sbt(n,t[i]);return n}),mEt=mbt,vbt="Expected a function";function ybt(e,t,n){if(typeof e!="function")throw new TypeError(vbt);return setTimeout(function(){e.apply(void 0,n)},t)}var _bt=ybt,xbt=_bt,bbt=mO,wbt=bbt(function(e,t){return xbt(e,1,t)}),vEt=wbt,_x={};/** * @license React * react-dom-server-legacy.browser.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var o$=Pr.exports;function zr(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var Ac=Object.prototype.hasOwnProperty,Sbt=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,a$={},s$={};function u$(e){return Ac.call(s$,e)?!0:Ac.call(a$,e)?!1:Sbt.test(e)?s$[e]=!0:(a$[e]=!0,!1)}function Wl(e,t,n,r,i,a,o){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=a,this.removeEmptyString=o}var zu={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){zu[e]=new Wl(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];zu[t]=new Wl(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){zu[e]=new Wl(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){zu[e]=new Wl(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){zu[e]=new Wl(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){zu[e]=new Wl(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){zu[e]=new Wl(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){zu[e]=new Wl(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){zu[e]=new Wl(e,5,!1,e.toLowerCase(),null,!1,!1)});var lk=/[\-:]([a-z])/g;function ck(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(lk,ck);zu[t]=new Wl(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(lk,ck);zu[t]=new Wl(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(lk,ck);zu[t]=new Wl(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){zu[e]=new Wl(e,1,!1,e.toLowerCase(),null,!1,!1)});zu.xlinkHref=new Wl("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){zu[e]=new Wl(e,1,!1,e.toLowerCase(),null,!0,!0)});var jI={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Ebt=["Webkit","ms","Moz","O"];Object.keys(jI).forEach(function(e){Ebt.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),jI[t]=jI[e]})});var Cbt=/["'&<>]/;function Hl(e){if(typeof e=="boolean"||typeof e=="number")return""+e;e=""+e;var t=Cbt.exec(e);if(t){var n="",r,i=0;for(r=t.index;r<e.length;r++){switch(e.charCodeAt(r)){case 34:t=""";break;case 38:t="&";break;case 39:t="'";break;case 60:t="<";break;case 62:t=">";break;default:continue}i!==r&&(n+=e.substring(i,r)),i=r+1,n+=t}e=i!==r?n+e.substring(i,r):n}return e}var Ibt=/([A-Z])/g,Pbt=/^ms-/,fk=Array.isArray;function Cg(e,t){return{insertionMode:e,selectedValue:t}}function Tbt(e,t,n){switch(t){case"select":return Cg(1,n.value!=null?n.value:n.defaultValue);case"svg":return Cg(2,null);case"math":return Cg(3,null);case"foreignObject":return Cg(1,null);case"table":return Cg(4,null);case"thead":case"tbody":case"tfoot":return Cg(5,null);case"colgroup":return Cg(7,null);case"tr":return Cg(6,null)}return 4<=e.insertionMode||e.insertionMode===0?Cg(1,null):e}var l$=new Map;function c$(e,t,n){if(typeof n!="object")throw Error(zr(62));t=!0;for(var r in n)if(Ac.call(n,r)){var i=n[r];if(i!=null&&typeof i!="boolean"&&i!==""){if(r.indexOf("--")===0){var a=Hl(r);i=Hl((""+i).trim())}else{a=r;var o=l$.get(a);o!==void 0||(o=Hl(a.replace(Ibt,"-$1").toLowerCase().replace(Pbt,"-ms-")),l$.set(a,o)),a=o,i=typeof i=="number"?i===0||Ac.call(jI,r)?""+i:i+"px":Hl((""+i).trim())}t?(t=!1,e.push(' style="',a,":",i)):e.push(";",a,":",i)}}t||e.push('"')}function If(e,t,n,r){switch(n){case"style":c$(e,t,r);return;case"defaultValue":case"defaultChecked":case"innerHTML":case"suppressContentEditableWarning":case"suppressHydrationWarning":return}if(!(2<n.length)||n[0]!=="o"&&n[0]!=="O"||n[1]!=="n"&&n[1]!=="N"){if(t=zu.hasOwnProperty(n)?zu[n]:null,t!==null){switch(typeof r){case"function":case"symbol":return;case"boolean":if(!t.acceptsBooleans)return}switch(n=t.attributeName,t.type){case 3:r&&e.push(" ",n,'=""');break;case 4:r===!0?e.push(" ",n,'=""'):r!==!1&&e.push(" ",n,'="',Hl(r),'"');break;case 5:isNaN(r)||e.push(" ",n,'="',Hl(r),'"');break;case 6:!isNaN(r)&&1<=r&&e.push(" ",n,'="',Hl(r),'"');break;default:t.sanitizeURL&&(r=""+r),e.push(" ",n,'="',Hl(r),'"')}}else if(u$(n)){switch(typeof r){case"function":case"symbol":return;case"boolean":if(t=n.toLowerCase().slice(0,5),t!=="data-"&&t!=="aria-")return}e.push(" ",n,'="',Hl(r),'"')}}}function qI(e,t,n){if(t!=null){if(n!=null)throw Error(zr(60));if(typeof t!="object"||!("__html"in t))throw Error(zr(61));t=t.__html,t!=null&&e.push(""+t)}}function Mbt(e){var t="";return o$.Children.forEach(e,function(n){n!=null&&(t+=n)}),t}function hk(e,t,n,r){e.push(md(n));var i=n=null,a;for(a in t)if(Ac.call(t,a)){var o=t[a];if(o!=null)switch(a){case"children":n=o;break;case"dangerouslySetInnerHTML":i=o;break;default:If(e,r,a,o)}}return e.push(">"),qI(e,i,n),typeof n=="string"?(e.push(Hl(n)),null):n}var Abt=/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/,f$=new Map;function md(e){var t=f$.get(e);if(t===void 0){if(!Abt.test(e))throw Error(zr(65,e));t="<"+e,f$.set(e,t)}return t}function Lbt(e,t,n,r,i){switch(t){case"select":e.push(md("select"));var a=null,o=null;for(_ in n)if(Ac.call(n,_)){var u=n[_];if(u!=null)switch(_){case"children":a=u;break;case"dangerouslySetInnerHTML":o=u;break;case"defaultValue":case"value":break;default:If(e,r,_,u)}}return e.push(">"),qI(e,o,a),a;case"option":o=i.selectedValue,e.push(md("option"));var c=u=null,g=null,_=null;for(a in n)if(Ac.call(n,a)){var E=n[a];if(E!=null)switch(a){case"children":u=E;break;case"selected":g=E;break;case"dangerouslySetInnerHTML":_=E;break;case"value":c=E;default:If(e,r,a,E)}}if(o!=null)if(n=c!==null?""+c:Mbt(u),fk(o)){for(r=0;r<o.length;r++)if(""+o[r]===n){e.push(' selected=""');break}}else""+o===n&&e.push(' selected=""');else g&&e.push(' selected=""');return e.push(">"),qI(e,_,u),u;case"textarea":e.push(md("textarea")),_=o=a=null;for(u in n)if(Ac.call(n,u)&&(c=n[u],c!=null))switch(u){case"children":_=c;break;case"value":a=c;break;case"defaultValue":o=c;break;case"dangerouslySetInnerHTML":throw Error(zr(91));default:If(e,r,u,c)}if(a===null&&o!==null&&(a=o),e.push(">"),_!=null){if(a!=null)throw Error(zr(92));if(fk(_)&&1<_.length)throw Error(zr(93));a=""+_}return typeof a=="string"&&a[0]===` `&&e.push(` `),a!==null&&e.push(Hl(""+a)),null;case"input":e.push(md("input")),c=_=u=a=null;for(o in n)if(Ac.call(n,o)&&(g=n[o],g!=null))switch(o){case"children":case"dangerouslySetInnerHTML":throw Error(zr(399,"input"));case"defaultChecked":c=g;break;case"defaultValue":u=g;break;case"checked":_=g;break;case"value":a=g;break;default:If(e,r,o,g)}return _!==null?If(e,r,"checked",_):c!==null&&If(e,r,"checked",c),a!==null?If(e,r,"value",a):u!==null&&If(e,r,"value",u),e.push("/>"),null;case"menuitem":e.push(md("menuitem"));for(var C in n)if(Ac.call(n,C)&&(a=n[C],a!=null))switch(C){case"children":case"dangerouslySetInnerHTML":throw Error(zr(400));default:If(e,r,C,a)}return e.push(">"),null;case"title":e.push(md("title")),a=null;for(E in n)if(Ac.call(n,E)&&(o=n[E],o!=null))switch(E){case"children":a=o;break;case"dangerouslySetInnerHTML":throw Error(zr(434));default:If(e,r,E,o)}return e.push(">"),a;case"listing":case"pre":e.push(md(t)),o=a=null;for(c in n)if(Ac.call(n,c)&&(u=n[c],u!=null))switch(c){case"children":a=u;break;case"dangerouslySetInnerHTML":o=u;break;default:If(e,r,c,u)}if(e.push(">"),o!=null){if(a!=null)throw Error(zr(60));if(typeof o!="object"||!("__html"in o))throw Error(zr(61));n=o.__html,n!=null&&(typeof n=="string"&&0<n.length&&n[0]===` `?e.push(` `,n):e.push(""+n))}return typeof a=="string"&&a[0]===` `&&e.push(` `),a;case"area":case"base":case"br":case"col":case"embed":case"hr":case"img":case"keygen":case"link":case"meta":case"param":case"source":case"track":case"wbr":e.push(md(t));for(var O in n)if(Ac.call(n,O)&&(a=n[O],a!=null))switch(O){case"children":case"dangerouslySetInnerHTML":throw Error(zr(399,t));default:If(e,r,O,a)}return e.push("/>"),null;case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return hk(e,n,t,r);case"html":return i.insertionMode===0&&e.push("<!DOCTYPE html>"),hk(e,n,t,r);default:if(t.indexOf("-")===-1&&typeof n.is!="string")return hk(e,n,t,r);e.push(md(t)),o=a=null;for(g in n)if(Ac.call(n,g)&&(u=n[g],u!=null))switch(g){case"children":a=u;break;case"dangerouslySetInnerHTML":o=u;break;case"style":c$(e,r,u);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":break;default:u$(g)&&typeof u!="function"&&typeof u!="symbol"&&e.push(" ",g,'="',Hl(u),'"')}return e.push(">"),qI(e,o,a),a}}function h$(e,t,n){if(e.push('<!--$?--><template id="'),n===null)throw Error(zr(395));return e.push(n),e.push('"></template>')}function Obt(e,t,n,r){switch(n.insertionMode){case 0:case 1:return e.push('<div hidden id="'),e.push(t.segmentPrefix),t=r.toString(16),e.push(t),e.push('">');case 2:return e.push('<svg aria-hidden="true" style="display:none" id="'),e.push(t.segmentPrefix),t=r.toString(16),e.push(t),e.push('">');case 3:return e.push('<math aria-hidden="true" style="display:none" id="'),e.push(t.segmentPrefix),t=r.toString(16),e.push(t),e.push('">');case 4:return e.push('<table hidden id="'),e.push(t.segmentPrefix),t=r.toString(16),e.push(t),e.push('">');case 5:return e.push('<table hidden><tbody id="'),e.push(t.segmentPrefix),t=r.toString(16),e.push(t),e.push('">');case 6:return e.push('<table hidden><tr id="'),e.push(t.segmentPrefix),t=r.toString(16),e.push(t),e.push('">');case 7:return e.push('<table hidden><colgroup id="'),e.push(t.segmentPrefix),t=r.toString(16),e.push(t),e.push('">');default:throw Error(zr(397))}}function Rbt(e,t){switch(t.insertionMode){case 0:case 1:return e.push("</div>");case 2:return e.push("</svg>");case 3:return e.push("</math>");case 4:return e.push("</table>");case 5:return e.push("</tbody></table>");case 6:return e.push("</tr></table>");case 7:return e.push("</colgroup></table>");default:throw Error(zr(397))}}var kbt=/[<\u2028\u2029]/g;function pk(e){return JSON.stringify(e).replace(kbt,function(t){switch(t){case"<":return"\\u003c";case"\u2028":return"\\u2028";case"\u2029":return"\\u2029";default:throw Error("escapeJSStringsForInstructionScripts encountered a match it does not know how to replace. this means the match regex and the replacement characters are no longer in sync. This is a bug in React")}})}function Dbt(e,t){return t=t===void 0?"":t,{bootstrapChunks:[],startInlineScript:"<script>",placeholderPrefix:t+"P:",segmentPrefix:t+"S:",boundaryPrefix:t+"B:",idPrefix:t,nextSuspenseID:0,sentCompleteSegmentFunction:!1,sentCompleteBoundaryFunction:!1,sentClientRenderFunction:!1,generateStaticMarkup:e}}function p$(e,t,n,r){return n.generateStaticMarkup?(e.push(Hl(t)),!1):(t===""?e=r:(r&&e.push("<!-- -->"),e.push(Hl(t)),e=!0),e)}var Cw=Object.assign,Nbt=Symbol.for("react.element"),d$=Symbol.for("react.portal"),g$=Symbol.for("react.fragment"),m$=Symbol.for("react.strict_mode"),v$=Symbol.for("react.profiler"),y$=Symbol.for("react.provider"),_$=Symbol.for("react.context"),x$=Symbol.for("react.forward_ref"),b$=Symbol.for("react.suspense"),w$=Symbol.for("react.suspense_list"),S$=Symbol.for("react.memo"),dk=Symbol.for("react.lazy"),Fbt=Symbol.for("react.scope"),zbt=Symbol.for("react.debug_trace_mode"),Bbt=Symbol.for("react.legacy_hidden"),Ubt=Symbol.for("react.default_value"),E$=Symbol.iterator;function gk(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case g$:return"Fragment";case d$:return"Portal";case v$:return"Profiler";case m$:return"StrictMode";case b$:return"Suspense";case w$:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case _$:return(e.displayName||"Context")+".Consumer";case y$:return(e._context.displayName||"Context")+".Provider";case x$:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case S$:return t=e.displayName||null,t!==null?t:gk(e.type)||"Memo";case dk:t=e._payload,e=e._init;try{return gk(e(t))}catch{}}return null}var C$={};function I$(e,t){if(e=e.contextTypes,!e)return C$;var n={},r;for(r in e)n[r]=t[r];return n}var Oy=null;function GI(e,t){if(e!==t){e.context._currentValue2=e.parentValue,e=e.parent;var n=t.parent;if(e===null){if(n!==null)throw Error(zr(401))}else{if(n===null)throw Error(zr(401));GI(e,n)}t.context._currentValue2=t.value}}function P$(e){e.context._currentValue2=e.parentValue,e=e.parent,e!==null&&P$(e)}function T$(e){var t=e.parent;t!==null&&T$(t),e.context._currentValue2=e.value}function M$(e,t){if(e.context._currentValue2=e.parentValue,e=e.parent,e===null)throw Error(zr(402));e.depth===t.depth?GI(e,t):M$(e,t)}function A$(e,t){var n=t.parent;if(n===null)throw Error(zr(402));e.depth===n.depth?GI(e,n):A$(e,n),t.context._currentValue2=t.value}function WI(e){var t=Oy;t!==e&&(t===null?T$(e):e===null?P$(t):t.depth===e.depth?GI(t,e):t.depth>e.depth?M$(t,e):A$(t,e),Oy=e)}var L$={isMounted:function(){return!1},enqueueSetState:function(e,t){e=e._reactInternals,e.queue!==null&&e.queue.push(t)},enqueueReplaceState:function(e,t){e=e._reactInternals,e.replace=!0,e.queue=[t]},enqueueForceUpdate:function(){}};function O$(e,t,n,r){var i=e.state!==void 0?e.state:null;e.updater=L$,e.props=n,e.state=i;var a={queue:[],replace:!1};e._reactInternals=a;var o=t.contextType;if(e.context=typeof o=="object"&&o!==null?o._currentValue2:r,o=t.getDerivedStateFromProps,typeof o=="function"&&(o=o(n,i),i=o==null?i:Cw({},i,o),e.state=i),typeof t.getDerivedStateFromProps!="function"&&typeof e.getSnapshotBeforeUpdate!="function"&&(typeof e.UNSAFE_componentWillMount=="function"||typeof e.componentWillMount=="function"))if(t=e.state,typeof e.componentWillMount=="function"&&e.componentWillMount(),typeof e.UNSAFE_componentWillMount=="function"&&e.UNSAFE_componentWillMount(),t!==e.state&&L$.enqueueReplaceState(e,e.state,null),a.queue!==null&&0<a.queue.length)if(t=a.queue,o=a.replace,a.queue=null,a.replace=!1,o&&t.length===1)e.state=t[0];else{for(a=o?t[0]:e.state,i=!0,o=o?1:0;o<t.length;o++){var u=t[o];u=typeof u=="function"?u.call(e,a,n,r):u,u!=null&&(i?(i=!1,a=Cw({},a,u)):Cw(a,u))}e.state=a}else a.queue=null}var Vbt={id:1,overflow:""};function mk(e,t,n){var r=e.id;e=e.overflow;var i=32-HI(r)-1;r&=~(1<<i),n+=1;var a=32-HI(t)+i;if(30<a){var o=i-i%5;return a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,{id:1<<32-HI(t)+i|n<<i|r,overflow:a+e}}return{id:1<<a|n<<i|r,overflow:e}}var HI=Math.clz32?Math.clz32:qbt,$bt=Math.log,jbt=Math.LN2;function qbt(e){return e>>>=0,e===0?32:31-($bt(e)/jbt|0)|0}function Gbt(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var Wbt=typeof Object.is=="function"?Object.is:Gbt,Ig=null,vk=null,XI=null,$o=null,Iw=!1,YI=!1,Pw=0,nv=null,ZI=0;function Ry(){if(Ig===null)throw Error(zr(321));return Ig}function R$(){if(0<ZI)throw Error(zr(312));return{memoizedState:null,queue:null,next:null}}function yk(){return $o===null?XI===null?(Iw=!1,XI=$o=R$()):(Iw=!0,$o=XI):$o.next===null?(Iw=!1,$o=$o.next=R$()):(Iw=!0,$o=$o.next),$o}function _k(){vk=Ig=null,YI=!1,XI=null,ZI=0,$o=nv=null}function k$(e,t){return typeof t=="function"?t(e):t}function D$(e,t,n){if(Ig=Ry(),$o=yk(),Iw){var r=$o.queue;if(t=r.dispatch,nv!==null&&(n=nv.get(r),n!==void 0)){nv.delete(r),r=$o.memoizedState;do r=e(r,n.action),n=n.next;while(n!==null);return $o.memoizedState=r,[r,t]}return[$o.memoizedState,t]}return e=e===k$?typeof t=="function"?t():t:n!==void 0?n(t):t,$o.memoizedState=e,e=$o.queue={last:null,dispatch:null},e=e.dispatch=Hbt.bind(null,Ig,e),[$o.memoizedState,e]}function N$(e,t){if(Ig=Ry(),$o=yk(),t=t===void 0?null:t,$o!==null){var n=$o.memoizedState;if(n!==null&&t!==null){var r=n[1];t:if(r===null)r=!1;else{for(var i=0;i<r.length&&i<t.length;i++)if(!Wbt(t[i],r[i])){r=!1;break t}r=!0}if(r)return n[0]}}return e=e(),$o.memoizedState=[e,t],e}function Hbt(e,t,n){if(25<=ZI)throw Error(zr(301));if(e===Ig)if(YI=!0,e={action:n,next:null},nv===null&&(nv=new Map),n=nv.get(t),n===void 0)nv.set(t,e);else{for(t=n;t.next!==null;)t=t.next;t.next=e}}function Xbt(){throw Error(zr(394))}function KI(){}var F$={readContext:function(e){return e._currentValue2},useContext:function(e){return Ry(),e._currentValue2},useMemo:N$,useReducer:D$,useRef:function(e){Ig=Ry(),$o=yk();var t=$o.memoizedState;return t===null?(e={current:e},$o.memoizedState=e):t},useState:function(e){return D$(k$,e)},useInsertionEffect:KI,useLayoutEffect:function(){},useCallback:function(e,t){return N$(function(){return e},t)},useImperativeHandle:KI,useEffect:KI,useDebugValue:KI,useDeferredValue:function(e){return Ry(),e},useTransition:function(){return Ry(),[!1,Xbt]},useId:function(){var e=vk.treeContext,t=e.overflow;e=e.id,e=(e&~(1<<32-HI(e)-1)).toString(32)+t;var n=JI;if(n===null)throw Error(zr(404));return t=Pw++,e=":"+n.idPrefix+"R"+e,0<t&&(e+="H"+t.toString(32)),e+":"},useMutableSource:function(e,t){return Ry(),t(e._source)},useSyncExternalStore:function(e,t,n){if(n===void 0)throw Error(zr(407));return n()}},JI=null,xk=o$.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentDispatcher;function Ybt(e){return console.error(e),null}function Tw(){}function Zbt(e,t,n,r,i,a,o,u,c){var g=[],_=new Set;return t={destination:null,responseState:t,progressiveChunkSize:r===void 0?12800:r,status:0,fatalError:null,nextSegmentId:0,allPendingTasks:0,pendingRootTasks:0,completedRootSegment:null,abortableTasks:_,pingedTasks:g,clientRenderedBoundaries:[],completedBoundaries:[],partialBoundaries:[],onError:i===void 0?Ybt:i,onAllReady:a===void 0?Tw:a,onShellReady:o===void 0?Tw:o,onShellError:u===void 0?Tw:u,onFatalError:c===void 0?Tw:c},n=QI(t,0,null,n,!1,!1),n.parentFlushed=!0,e=bk(t,e,null,n,_,C$,null,Vbt),g.push(e),t}function bk(e,t,n,r,i,a,o,u){e.allPendingTasks++,n===null?e.pendingRootTasks++:n.pendingTasks++;var c={node:t,ping:function(){var g=e.pingedTasks;g.push(c),g.length===1&&q$(e)},blockedBoundary:n,blockedSegment:r,abortSet:i,legacyContext:a,context:o,treeContext:u};return i.add(c),c}function QI(e,t,n,r,i,a){return{status:0,id:-1,index:t,parentFlushed:!1,chunks:[],children:[],formatContext:r,boundary:n,lastPushedText:i,textEmbedded:a}}function Mw(e,t){if(e=e.onError(t),e!=null&&typeof e!="string")throw Error('onError returned something with a type other than "string". onError should return a string and may return null or undefined but must not return anything else. It received something of type "'+typeof e+'" instead');return e}function tP(e,t){var n=e.onShellError;n(t),n=e.onFatalError,n(t),e.destination!==null?(e.status=2,e.destination.destroy(t)):(e.status=1,e.fatalError=t)}function z$(e,t,n,r,i){for(Ig={},vk=t,Pw=0,e=n(r,i);YI;)YI=!1,Pw=0,ZI+=1,$o=null,e=n(r,i);return _k(),e}function B$(e,t,n,r){var i=n.render(),a=r.childContextTypes;if(a!=null){var o=t.legacyContext;if(typeof n.getChildContext!="function")r=o;else{n=n.getChildContext();for(var u in n)if(!(u in a))throw Error(zr(108,gk(r)||"Unknown",u));r=Cw({},o,n)}t.legacyContext=r,Pf(e,t,i),t.legacyContext=o}else Pf(e,t,i)}function U$(e,t){if(e&&e.defaultProps){t=Cw({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function wk(e,t,n,r,i){if(typeof n=="function")if(n.prototype&&n.prototype.isReactComponent){i=I$(n,t.legacyContext);var a=n.contextType;a=new n(r,typeof a=="object"&&a!==null?a._currentValue2:i),O$(a,n,r,i),B$(e,t,a,n)}else{a=I$(n,t.legacyContext),i=z$(e,t,n,r,a);var o=Pw!==0;if(typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0)O$(i,n,r,a),B$(e,t,i,n);else if(o){r=t.treeContext,t.treeContext=mk(r,1,0);try{Pf(e,t,i)}finally{t.treeContext=r}}else Pf(e,t,i)}else if(typeof n=="string"){switch(i=t.blockedSegment,a=Lbt(i.chunks,n,r,e.responseState,i.formatContext),i.lastPushedText=!1,o=i.formatContext,i.formatContext=Tbt(o,n,r),Sk(e,t,a),i.formatContext=o,n){case"area":case"base":case"br":case"col":case"embed":case"hr":case"img":case"input":case"keygen":case"link":case"meta":case"param":case"source":case"track":case"wbr":break;default:i.chunks.push("</",n,">")}i.lastPushedText=!1}else{switch(n){case Bbt:case zbt:case m$:case v$:case g$:Pf(e,t,r.children);return;case w$:Pf(e,t,r.children);return;case Fbt:throw Error(zr(343));case b$:t:{n=t.blockedBoundary,i=t.blockedSegment,a=r.fallback,r=r.children,o=new Set;var u={id:null,rootSegmentID:-1,parentFlushed:!1,pendingTasks:0,forceClientRender:!1,completedSegments:[],byteSize:0,fallbackAbortableTasks:o,errorDigest:null},c=QI(e,i.chunks.length,u,i.formatContext,!1,!1);i.children.push(c),i.lastPushedText=!1;var g=QI(e,0,null,i.formatContext,!1,!1);g.parentFlushed=!0,t.blockedBoundary=u,t.blockedSegment=g;try{if(Sk(e,t,r),e.responseState.generateStaticMarkup||g.lastPushedText&&g.textEmbedded&&g.chunks.push("<!-- -->"),g.status=1,eP(u,g),u.pendingTasks===0)break t}catch(_){g.status=4,u.forceClientRender=!0,u.errorDigest=Mw(e,_)}finally{t.blockedBoundary=n,t.blockedSegment=i}t=bk(e,a,n,c,o,t.legacyContext,t.context,t.treeContext),e.pingedTasks.push(t)}return}if(typeof n=="object"&&n!==null)switch(n.$$typeof){case x$:if(r=z$(e,t,n.render,r,i),Pw!==0){n=t.treeContext,t.treeContext=mk(n,1,0);try{Pf(e,t,r)}finally{t.treeContext=n}}else Pf(e,t,r);return;case S$:n=n.type,r=U$(n,r),wk(e,t,n,r,i);return;case y$:if(i=r.children,n=n._context,r=r.value,a=n._currentValue2,n._currentValue2=r,o=Oy,Oy=r={parent:o,depth:o===null?0:o.depth+1,context:n,parentValue:a,value:r},t.context=r,Pf(e,t,i),e=Oy,e===null)throw Error(zr(403));r=e.parentValue,e.context._currentValue2=r===Ubt?e.context._defaultValue:r,e=Oy=e.parent,t.context=e;return;case _$:r=r.children,r=r(n._currentValue2),Pf(e,t,r);return;case dk:i=n._init,n=i(n._payload),r=U$(n,r),wk(e,t,n,r,void 0);return}throw Error(zr(130,n==null?n:typeof n,""))}}function Pf(e,t,n){if(t.node=n,typeof n=="object"&&n!==null){switch(n.$$typeof){case Nbt:wk(e,t,n.type,n.props,n.ref);return;case d$:throw Error(zr(257));case dk:var r=n._init;n=r(n._payload),Pf(e,t,n);return}if(fk(n)){V$(e,t,n);return}if(n===null||typeof n!="object"?r=null:(r=E$&&n[E$]||n["@@iterator"],r=typeof r=="function"?r:null),r&&(r=r.call(n))){if(n=r.next(),!n.done){var i=[];do i.push(n.value),n=r.next();while(!n.done);V$(e,t,i)}return}throw e=Object.prototype.toString.call(n),Error(zr(31,e==="[object Object]"?"object with keys {"+Object.keys(n).join(", ")+"}":e))}typeof n=="string"?(r=t.blockedSegment,r.lastPushedText=p$(t.blockedSegment.chunks,n,e.responseState,r.lastPushedText)):typeof n=="number"&&(r=t.blockedSegment,r.lastPushedText=p$(t.blockedSegment.chunks,""+n,e.responseState,r.lastPushedText))}function V$(e,t,n){for(var r=n.length,i=0;i<r;i++){var a=t.treeContext;t.treeContext=mk(a,r,i);try{Sk(e,t,n[i])}finally{t.treeContext=a}}}function Sk(e,t,n){var r=t.blockedSegment.formatContext,i=t.legacyContext,a=t.context;try{return Pf(e,t,n)}catch(c){if(_k(),typeof c=="object"&&c!==null&&typeof c.then=="function"){n=c;var o=t.blockedSegment,u=QI(e,o.chunks.length,null,o.formatContext,o.lastPushedText,!0);o.children.push(u),o.lastPushedText=!1,e=bk(e,t.node,t.blockedBoundary,u,t.abortSet,t.legacyContext,t.context,t.treeContext).ping,n.then(e,e),t.blockedSegment.formatContext=r,t.legacyContext=i,t.context=a,WI(a)}else throw t.blockedSegment.formatContext=r,t.legacyContext=i,t.context=a,WI(a),c}}function Kbt(e){var t=e.blockedBoundary;e=e.blockedSegment,e.status=3,j$(this,t,e)}function $$(e,t,n){var r=e.blockedBoundary;e.blockedSegment.status=3,r===null?(t.allPendingTasks--,t.status!==2&&(t.status=2,t.destination!==null&&t.destination.push(null))):(r.pendingTasks--,r.forceClientRender||(r.forceClientRender=!0,e=n===void 0?Error(zr(432)):n,r.errorDigest=t.onError(e),r.parentFlushed&&t.clientRenderedBoundaries.push(r)),r.fallbackAbortableTasks.forEach(function(i){return $$(i,t,n)}),r.fallbackAbortableTasks.clear(),t.allPendingTasks--,t.allPendingTasks===0&&(r=t.onAllReady,r()))}function eP(e,t){if(t.chunks.length===0&&t.children.length===1&&t.children[0].boundary===null){var n=t.children[0];n.id=t.id,n.parentFlushed=!0,n.status===1&&eP(e,n)}else e.completedSegments.push(t)}function j$(e,t,n){if(t===null){if(n.parentFlushed){if(e.completedRootSegment!==null)throw Error(zr(389));e.completedRootSegment=n}e.pendingRootTasks--,e.pendingRootTasks===0&&(e.onShellError=Tw,t=e.onShellReady,t())}else t.pendingTasks--,t.forceClientRender||(t.pendingTasks===0?(n.parentFlushed&&n.status===1&&eP(t,n),t.parentFlushed&&e.completedBoundaries.push(t),t.fallbackAbortableTasks.forEach(Kbt,e),t.fallbackAbortableTasks.clear()):n.parentFlushed&&n.status===1&&(eP(t,n),t.completedSegments.length===1&&t.parentFlushed&&e.partialBoundaries.push(t)));e.allPendingTasks--,e.allPendingTasks===0&&(e=e.onAllReady,e())}function q$(e){if(e.status!==2){var t=Oy,n=xk.current;xk.current=F$;var r=JI;JI=e.responseState;try{var i=e.pingedTasks,a;for(a=0;a<i.length;a++){var o=i[a],u=e,c=o.blockedSegment;if(c.status===0){WI(o.context);try{Pf(u,o,o.node),u.responseState.generateStaticMarkup||c.lastPushedText&&c.textEmbedded&&c.chunks.push("<!-- -->"),o.abortSet.delete(o),c.status=1,j$(u,o.blockedBoundary,c)}catch(R){if(_k(),typeof R=="object"&&R!==null&&typeof R.then=="function"){var g=o.ping;R.then(g,g)}else{o.abortSet.delete(o),c.status=4;var _=o.blockedBoundary,E=R,C=Mw(u,E);if(_===null?tP(u,E):(_.pendingTasks--,_.forceClientRender||(_.forceClientRender=!0,_.errorDigest=C,_.parentFlushed&&u.clientRenderedBoundaries.push(_))),u.allPendingTasks--,u.allPendingTasks===0){var O=u.onAllReady;O()}}}finally{}}}i.splice(0,a),e.destination!==null&&Ek(e,e.destination)}catch(R){Mw(e,R),tP(e,R)}finally{JI=r,xk.current=n,n===F$&&WI(t)}}}function nP(e,t,n){switch(n.parentFlushed=!0,n.status){case 0:var r=n.id=e.nextSegmentId++;return n.lastPushedText=!1,n.textEmbedded=!1,e=e.responseState,t.push('<template id="'),t.push(e.placeholderPrefix),e=r.toString(16),t.push(e),t.push('"></template>');case 1:n.status=2;var i=!0;r=n.chunks;var a=0;n=n.children;for(var o=0;o<n.length;o++){for(i=n[o];a<i.index;a++)t.push(r[a]);i=rP(e,t,i)}for(;a<r.length-1;a++)t.push(r[a]);return a<r.length&&(i=t.push(r[a])),i;default:throw Error(zr(390))}}function rP(e,t,n){var r=n.boundary;if(r===null)return nP(e,t,n);if(r.parentFlushed=!0,r.forceClientRender)return e.responseState.generateStaticMarkup||(r=r.errorDigest,t.push("<!--$!-->"),t.push("<template"),r&&(t.push(' data-dgst="'),r=Hl(r),t.push(r),t.push('"')),t.push("></template>")),nP(e,t,n),e=e.responseState.generateStaticMarkup?!0:t.push("<!--/$-->"),e;if(0<r.pendingTasks){r.rootSegmentID=e.nextSegmentId++,0<r.completedSegments.length&&e.partialBoundaries.push(r);var i=e.responseState,a=i.nextSuspenseID++;return i=i.boundaryPrefix+a.toString(16),r=r.id=i,h$(t,e.responseState,r),nP(e,t,n),t.push("<!--/$-->")}if(r.byteSize>e.progressiveChunkSize)return r.rootSegmentID=e.nextSegmentId++,e.completedBoundaries.push(r),h$(t,e.responseState,r.id),nP(e,t,n),t.push("<!--/$-->");if(e.responseState.generateStaticMarkup||t.push("<!--$-->"),n=r.completedSegments,n.length!==1)throw Error(zr(391));return rP(e,t,n[0]),e=e.responseState.generateStaticMarkup?!0:t.push("<!--/$-->"),e}function G$(e,t,n){return Obt(t,e.responseState,n.formatContext,n.id),rP(e,t,n),Rbt(t,n.formatContext)}function W$(e,t,n){for(var r=n.completedSegments,i=0;i<r.length;i++)H$(e,t,n,r[i]);if(r.length=0,e=e.responseState,r=n.id,n=n.rootSegmentID,t.push(e.startInlineScript),e.sentCompleteBoundaryFunction?t.push('$RC("'):(e.sentCompleteBoundaryFunction=!0,t.push('function $RC(a,b){a=document.getElementById(a);b=document.getElementById(b);b.parentNode.removeChild(b);if(a){a=a.previousSibling;var f=a.parentNode,c=a.nextSibling,e=0;do{if(c&&8===c.nodeType){var d=c.data;if("/$"===d)if(0===e)break;else e--;else"$"!==d&&"$?"!==d&&"$!"!==d||e++}d=c.nextSibling;f.removeChild(c);c=d}while(c);for(;b.firstChild;)f.insertBefore(b.firstChild,c);a.data="$";a._reactRetry&&a._reactRetry()}};$RC("')),r===null)throw Error(zr(395));return n=n.toString(16),t.push(r),t.push('","'),t.push(e.segmentPrefix),t.push(n),t.push('")<\/script>')}function H$(e,t,n,r){if(r.status===2)return!0;var i=r.id;if(i===-1){if((r.id=n.rootSegmentID)===-1)throw Error(zr(392));return G$(e,t,r)}return G$(e,t,r),e=e.responseState,t.push(e.startInlineScript),e.sentCompleteSegmentFunction?t.push('$RS("'):(e.sentCompleteSegmentFunction=!0,t.push('function $RS(a,b){a=document.getElementById(a);b=document.getElementById(b);for(a.parentNode.removeChild(a);a.firstChild;)b.parentNode.insertBefore(a.firstChild,b);b.parentNode.removeChild(b)};$RS("')),t.push(e.segmentPrefix),i=i.toString(16),t.push(i),t.push('","'),t.push(e.placeholderPrefix),t.push(i),t.push('")<\/script>')}function Ek(e,t){try{var n=e.completedRootSegment;if(n!==null&&e.pendingRootTasks===0){rP(e,t,n),e.completedRootSegment=null;var r=e.responseState.bootstrapChunks;for(n=0;n<r.length-1;n++)t.push(r[n]);n<r.length&&t.push(r[n])}var i=e.clientRenderedBoundaries,a;for(a=0;a<i.length;a++){var o=i[a];r=t;var u=e.responseState,c=o.id,g=o.errorDigest,_=o.errorMessage,E=o.errorComponentStack;if(r.push(u.startInlineScript),u.sentClientRenderFunction?r.push('$RX("'):(u.sentClientRenderFunction=!0,r.push('function $RX(b,c,d,e){var a=document.getElementById(b);a&&(b=a.previousSibling,b.data="$!",a=a.dataset,c&&(a.dgst=c),d&&(a.msg=d),e&&(a.stck=e),b._reactRetry&&b._reactRetry())};$RX("')),c===null)throw Error(zr(395));if(r.push(c),r.push('"'),g||_||E){r.push(",");var C=pk(g||"");r.push(C)}if(_||E){r.push(",");var O=pk(_||"");r.push(O)}if(E){r.push(",");var R=pk(E);r.push(R)}if(!r.push(")<\/script>")){e.destination=null,a++,i.splice(0,a);return}}i.splice(0,a);var D=e.completedBoundaries;for(a=0;a<D.length;a++)if(!W$(e,t,D[a])){e.destination=null,a++,D.splice(0,a);return}D.splice(0,a);var B=e.partialBoundaries;for(a=0;a<B.length;a++){var z=B[a];t:{i=e,o=t;var k=z.completedSegments;for(u=0;u<k.length;u++)if(!H$(i,o,z,k[u])){u++,k.splice(0,u);var $=!1;break t}k.splice(0,u),$=!0}if(!$){e.destination=null,a++,B.splice(0,a);return}}B.splice(0,a);var K=e.completedBoundaries;for(a=0;a<K.length;a++)if(!W$(e,t,K[a])){e.destination=null,a++,K.splice(0,a);return}K.splice(0,a)}finally{e.allPendingTasks===0&&e.pingedTasks.length===0&&e.clientRenderedBoundaries.length===0&&e.completedBoundaries.length===0&&t.push(null)}}function Jbt(e,t){try{var n=e.abortableTasks;n.forEach(function(r){return $$(r,e,t)}),n.clear(),e.destination!==null&&Ek(e,e.destination)}catch(r){Mw(e,r),tP(e,r)}}function Qbt(){}function X$(e,t,n,r){var i=!1,a=null,o="",u={push:function(g){return g!==null&&(o+=g),!0},destroy:function(g){i=!0,a=g}},c=!1;if(e=Zbt(e,Dbt(n,t?t.identifierPrefix:void 0),{insertionMode:1,selectedValue:null},1/0,Qbt,void 0,function(){c=!0},void 0,void 0),q$(e),Jbt(e,r),e.status===1)e.status=2,u.destroy(e.fatalError);else if(e.status!==2&&e.destination===null){e.destination=u;try{Ek(e,u)}catch(g){Mw(e,g),tP(e,g)}}if(i)throw a;if(!c)throw Error(zr(426));return o}_x.renderToNodeStream=function(){throw Error(zr(207))};_x.renderToStaticMarkup=function(e,t){return X$(e,t,!0,'The server used "renderToStaticMarkup" which does not support Suspense. If you intended to have the server wait for the suspended component please switch to "renderToReadableStream" which supports Suspense on the server')};_x.renderToStaticNodeStream=function(){throw Error(zr(208))};_x.renderToString=function(e,t){return X$(e,t,!1,'The server used "renderToString" which does not support Suspense. If you intended for this Suspense boundary to render the fallback content on the server consider throwing an Error somewhere within the Suspense boundary. If you intended to have the server wait for the suspended component please switch to "renderToReadableStream" which supports Suspense on the server')};_x.version="18.2.0";var Ck={};/** * @license React * react-dom-server.browser.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var Y$=Pr.exports;function ei(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var Tf=null,Mf=0;function Nn(e,t){if(t.length!==0)if(512<t.length)0<Mf&&(e.enqueue(new Uint8Array(Tf.buffer,0,Mf)),Tf=new Uint8Array(512),Mf=0),e.enqueue(t);else{var n=Tf.length-Mf;n<t.length&&(n===0?e.enqueue(Tf):(Tf.set(t.subarray(0,n),Mf),e.enqueue(Tf),t=t.subarray(n)),Tf=new Uint8Array(512),Mf=0),Tf.set(t,Mf),Mf+=t.length}}function aa(e,t){return Nn(e,t),!0}function Z$(e){Tf&&0<Mf&&(e.enqueue(new Uint8Array(Tf.buffer,0,Mf)),Tf=null,Mf=0)}var K$=new TextEncoder;function si(e){return K$.encode(e)}function gn(e){return K$.encode(e)}function J$(e,t){typeof e.error=="function"?e.error(t):e.close()}var Lc=Object.prototype.hasOwnProperty,twt=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,Q$={},tj={};function ej(e){return Lc.call(tj,e)?!0:Lc.call(Q$,e)?!1:twt.test(e)?tj[e]=!0:(Q$[e]=!0,!1)}function Xl(e,t,n,r,i,a,o){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=a,this.removeEmptyString=o}var Bu={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Bu[e]=new Xl(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Bu[t]=new Xl(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Bu[e]=new Xl(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Bu[e]=new Xl(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Bu[e]=new Xl(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Bu[e]=new Xl(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Bu[e]=new Xl(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Bu[e]=new Xl(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Bu[e]=new Xl(e,5,!1,e.toLowerCase(),null,!1,!1)});var Ik=/[\-:]([a-z])/g;function Pk(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(Ik,Pk);Bu[t]=new Xl(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(Ik,Pk);Bu[t]=new Xl(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(Ik,Pk);Bu[t]=new Xl(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Bu[e]=new Xl(e,1,!1,e.toLowerCase(),null,!1,!1)});Bu.xlinkHref=new Xl("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Bu[e]=new Xl(e,1,!1,e.toLowerCase(),null,!0,!0)});var iP={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},ewt=["Webkit","ms","Moz","O"];Object.keys(iP).forEach(function(e){ewt.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),iP[t]=iP[e]})});var nwt=/["'&<>]/;function Uu(e){if(typeof e=="boolean"||typeof e=="number")return""+e;e=""+e;var t=nwt.exec(e);if(t){var n="",r,i=0;for(r=t.index;r<e.length;r++){switch(e.charCodeAt(r)){case 34:t=""";break;case 38:t="&";break;case 39:t="'";break;case 60:t="<";break;case 62:t=">";break;default:continue}i!==r&&(n+=e.substring(i,r)),i=r+1,n+=t}e=i!==r?n+e.substring(i,r):n}return e}var rwt=/([A-Z])/g,iwt=/^ms-/,Tk=Array.isArray,owt=gn("<script>"),awt=gn("<\/script>"),swt=gn('<script src="'),uwt=gn('<script type="module" src="'),nj=gn('" async=""><\/script>'),lwt=/(<\/|<)(s)(cript)/gi;function cwt(e,t,n,r){return""+t+(n==="s"?"\\u0073":"\\u0053")+r}function fwt(e,t,n,r,i){e=e===void 0?"":e,t=t===void 0?owt:gn('<script nonce="'+Uu(t)+'">');var a=[];if(n!==void 0&&a.push(t,si((""+n).replace(lwt,cwt)),awt),r!==void 0)for(n=0;n<r.length;n++)a.push(swt,si(Uu(r[n])),nj);if(i!==void 0)for(r=0;r<i.length;r++)a.push(uwt,si(Uu(i[r])),nj);return{bootstrapChunks:a,startInlineScript:t,placeholderPrefix:gn(e+"P:"),segmentPrefix:gn(e+"S:"),boundaryPrefix:e+"B:",idPrefix:e,nextSuspenseID:0,sentCompleteSegmentFunction:!1,sentCompleteBoundaryFunction:!1,sentClientRenderFunction:!1}}function vd(e,t){return{insertionMode:e,selectedValue:t}}function hwt(e){return vd(e==="http://www.w3.org/2000/svg"?2:e==="http://www.w3.org/1998/Math/MathML"?3:0,null)}function pwt(e,t,n){switch(t){case"select":return vd(1,n.value!=null?n.value:n.defaultValue);case"svg":return vd(2,null);case"math":return vd(3,null);case"foreignObject":return vd(1,null);case"table":return vd(4,null);case"thead":case"tbody":case"tfoot":return vd(5,null);case"colgroup":return vd(7,null);case"tr":return vd(6,null)}return 4<=e.insertionMode||e.insertionMode===0?vd(1,null):e}var Mk=gn("<!-- -->");function rj(e,t,n,r){return t===""?r:(r&&e.push(Mk),e.push(si(Uu(t))),!0)}var ij=new Map,dwt=gn(' style="'),oj=gn(":"),gwt=gn(";");function aj(e,t,n){if(typeof n!="object")throw Error(ei(62));t=!0;for(var r in n)if(Lc.call(n,r)){var i=n[r];if(i!=null&&typeof i!="boolean"&&i!==""){if(r.indexOf("--")===0){var a=si(Uu(r));i=si(Uu((""+i).trim()))}else{a=r;var o=ij.get(a);o!==void 0||(o=gn(Uu(a.replace(rwt,"-$1").toLowerCase().replace(iwt,"-ms-"))),ij.set(a,o)),a=o,i=typeof i=="number"?i===0||Lc.call(iP,r)?si(""+i):si(i+"px"):si(Uu((""+i).trim()))}t?(t=!1,e.push(dwt,a,oj,i)):e.push(gwt,a,oj,i)}}t||e.push(ky)}var rv=gn(" "),xx=gn('="'),ky=gn('"'),sj=gn('=""');function Af(e,t,n,r){switch(n){case"style":aj(e,t,r);return;case"defaultValue":case"defaultChecked":case"innerHTML":case"suppressContentEditableWarning":case"suppressHydrationWarning":return}if(!(2<n.length)||n[0]!=="o"&&n[0]!=="O"||n[1]!=="n"&&n[1]!=="N"){if(t=Bu.hasOwnProperty(n)?Bu[n]:null,t!==null){switch(typeof r){case"function":case"symbol":return;case"boolean":if(!t.acceptsBooleans)return}switch(n=si(t.attributeName),t.type){case 3:r&&e.push(rv,n,sj);break;case 4:r===!0?e.push(rv,n,sj):r!==!1&&e.push(rv,n,xx,si(Uu(r)),ky);break;case 5:isNaN(r)||e.push(rv,n,xx,si(Uu(r)),ky);break;case 6:!isNaN(r)&&1<=r&&e.push(rv,n,xx,si(Uu(r)),ky);break;default:t.sanitizeURL&&(r=""+r),e.push(rv,n,xx,si(Uu(r)),ky)}}else if(ej(n)){switch(typeof r){case"function":case"symbol":return;case"boolean":if(t=n.toLowerCase().slice(0,5),t!=="data-"&&t!=="aria-")return}e.push(rv,si(n),xx,si(Uu(r)),ky)}}}var iv=gn(">"),uj=gn("/>");function oP(e,t,n){if(t!=null){if(n!=null)throw Error(ei(60));if(typeof t!="object"||!("__html"in t))throw Error(ei(61));t=t.__html,t!=null&&e.push(si(""+t))}}function mwt(e){var t="";return Y$.Children.forEach(e,function(n){n!=null&&(t+=n)}),t}var Ak=gn(' selected=""');function Lk(e,t,n,r){e.push(yd(n));var i=n=null,a;for(a in t)if(Lc.call(t,a)){var o=t[a];if(o!=null)switch(a){case"children":n=o;break;case"dangerouslySetInnerHTML":i=o;break;default:Af(e,r,a,o)}}return e.push(iv),oP(e,i,n),typeof n=="string"?(e.push(si(Uu(n))),null):n}var Ok=gn(` `),vwt=/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/,lj=new Map;function yd(e){var t=lj.get(e);if(t===void 0){if(!vwt.test(e))throw Error(ei(65,e));t=gn("<"+e),lj.set(e,t)}return t}var ywt=gn("<!DOCTYPE html>");function _wt(e,t,n,r,i){switch(t){case"select":e.push(yd("select"));var a=null,o=null;for(_ in n)if(Lc.call(n,_)){var u=n[_];if(u!=null)switch(_){case"children":a=u;break;case"dangerouslySetInnerHTML":o=u;break;case"defaultValue":case"value":break;default:Af(e,r,_,u)}}return e.push(iv),oP(e,o,a),a;case"option":o=i.selectedValue,e.push(yd("option"));var c=u=null,g=null,_=null;for(a in n)if(Lc.call(n,a)){var E=n[a];if(E!=null)switch(a){case"children":u=E;break;case"selected":g=E;break;case"dangerouslySetInnerHTML":_=E;break;case"value":c=E;default:Af(e,r,a,E)}}if(o!=null)if(n=c!==null?""+c:mwt(u),Tk(o)){for(r=0;r<o.length;r++)if(""+o[r]===n){e.push(Ak);break}}else""+o===n&&e.push(Ak);else g&&e.push(Ak);return e.push(iv),oP(e,_,u),u;case"textarea":e.push(yd("textarea")),_=o=a=null;for(u in n)if(Lc.call(n,u)&&(c=n[u],c!=null))switch(u){case"children":_=c;break;case"value":a=c;break;case"defaultValue":o=c;break;case"dangerouslySetInnerHTML":throw Error(ei(91));default:Af(e,r,u,c)}if(a===null&&o!==null&&(a=o),e.push(iv),_!=null){if(a!=null)throw Error(ei(92));if(Tk(_)&&1<_.length)throw Error(ei(93));a=""+_}return typeof a=="string"&&a[0]===` `&&e.push(Ok),a!==null&&e.push(si(Uu(""+a))),null;case"input":e.push(yd("input")),c=_=u=a=null;for(o in n)if(Lc.call(n,o)&&(g=n[o],g!=null))switch(o){case"children":case"dangerouslySetInnerHTML":throw Error(ei(399,"input"));case"defaultChecked":c=g;break;case"defaultValue":u=g;break;case"checked":_=g;break;case"value":a=g;break;default:Af(e,r,o,g)}return _!==null?Af(e,r,"checked",_):c!==null&&Af(e,r,"checked",c),a!==null?Af(e,r,"value",a):u!==null&&Af(e,r,"value",u),e.push(uj),null;case"menuitem":e.push(yd("menuitem"));for(var C in n)if(Lc.call(n,C)&&(a=n[C],a!=null))switch(C){case"children":case"dangerouslySetInnerHTML":throw Error(ei(400));default:Af(e,r,C,a)}return e.push(iv),null;case"title":e.push(yd("title")),a=null;for(E in n)if(Lc.call(n,E)&&(o=n[E],o!=null))switch(E){case"children":a=o;break;case"dangerouslySetInnerHTML":throw Error(ei(434));default:Af(e,r,E,o)}return e.push(iv),a;case"listing":case"pre":e.push(yd(t)),o=a=null;for(c in n)if(Lc.call(n,c)&&(u=n[c],u!=null))switch(c){case"children":a=u;break;case"dangerouslySetInnerHTML":o=u;break;default:Af(e,r,c,u)}if(e.push(iv),o!=null){if(a!=null)throw Error(ei(60));if(typeof o!="object"||!("__html"in o))throw Error(ei(61));n=o.__html,n!=null&&(typeof n=="string"&&0<n.length&&n[0]===` `?e.push(Ok,si(n)):e.push(si(""+n)))}return typeof a=="string"&&a[0]===` `&&e.push(Ok),a;case"area":case"base":case"br":case"col":case"embed":case"hr":case"img":case"keygen":case"link":case"meta":case"param":case"source":case"track":case"wbr":e.push(yd(t));for(var O in n)if(Lc.call(n,O)&&(a=n[O],a!=null))switch(O){case"children":case"dangerouslySetInnerHTML":throw Error(ei(399,t));default:Af(e,r,O,a)}return e.push(uj),null;case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return Lk(e,n,t,r);case"html":return i.insertionMode===0&&e.push(ywt),Lk(e,n,t,r);default:if(t.indexOf("-")===-1&&typeof n.is!="string")return Lk(e,n,t,r);e.push(yd(t)),o=a=null;for(g in n)if(Lc.call(n,g)&&(u=n[g],u!=null))switch(g){case"children":a=u;break;case"dangerouslySetInnerHTML":o=u;break;case"style":aj(e,r,u);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":break;default:ej(g)&&typeof u!="function"&&typeof u!="symbol"&&e.push(rv,si(g),xx,si(Uu(u)),ky)}return e.push(iv),oP(e,o,a),a}}var xwt=gn("</"),bwt=gn(">"),wwt=gn('<template id="'),Swt=gn('"></template>'),Ewt=gn("<!--$-->"),Cwt=gn('<!--$?--><template id="'),Iwt=gn('"></template>'),Pwt=gn("<!--$!-->"),Twt=gn("<!--/$-->"),Mwt=gn("<template"),Awt=gn('"'),Lwt=gn(' data-dgst="');gn(' data-msg="');gn(' data-stck="');var Owt=gn("></template>");function cj(e,t,n){if(Nn(e,Cwt),n===null)throw Error(ei(395));return Nn(e,n),aa(e,Iwt)}var Rwt=gn('<div hidden id="'),kwt=gn('">'),Dwt=gn("</div>"),Nwt=gn('<svg aria-hidden="true" style="display:none" id="'),Fwt=gn('">'),zwt=gn("</svg>"),Bwt=gn('<math aria-hidden="true" style="display:none" id="'),Uwt=gn('">'),Vwt=gn("</math>"),$wt=gn('<table hidden id="'),jwt=gn('">'),qwt=gn("</table>"),Gwt=gn('<table hidden><tbody id="'),Wwt=gn('">'),Hwt=gn("</tbody></table>"),Xwt=gn('<table hidden><tr id="'),Ywt=gn('">'),Zwt=gn("</tr></table>"),Kwt=gn('<table hidden><colgroup id="'),Jwt=gn('">'),Qwt=gn("</colgroup></table>");function tSt(e,t,n,r){switch(n.insertionMode){case 0:case 1:return Nn(e,Rwt),Nn(e,t.segmentPrefix),Nn(e,si(r.toString(16))),aa(e,kwt);case 2:return Nn(e,Nwt),Nn(e,t.segmentPrefix),Nn(e,si(r.toString(16))),aa(e,Fwt);case 3:return Nn(e,Bwt),Nn(e,t.segmentPrefix),Nn(e,si(r.toString(16))),aa(e,Uwt);case 4:return Nn(e,$wt),Nn(e,t.segmentPrefix),Nn(e,si(r.toString(16))),aa(e,jwt);case 5:return Nn(e,Gwt),Nn(e,t.segmentPrefix),Nn(e,si(r.toString(16))),aa(e,Wwt);case 6:return Nn(e,Xwt),Nn(e,t.segmentPrefix),Nn(e,si(r.toString(16))),aa(e,Ywt);case 7:return Nn(e,Kwt),Nn(e,t.segmentPrefix),Nn(e,si(r.toString(16))),aa(e,Jwt);default:throw Error(ei(397))}}function eSt(e,t){switch(t.insertionMode){case 0:case 1:return aa(e,Dwt);case 2:return aa(e,zwt);case 3:return aa(e,Vwt);case 4:return aa(e,qwt);case 5:return aa(e,Hwt);case 6:return aa(e,Zwt);case 7:return aa(e,Qwt);default:throw Error(ei(397))}}var nSt=gn('function $RS(a,b){a=document.getElementById(a);b=document.getElementById(b);for(a.parentNode.removeChild(a);a.firstChild;)b.parentNode.insertBefore(a.firstChild,b);b.parentNode.removeChild(b)};$RS("'),rSt=gn('$RS("'),iSt=gn('","'),oSt=gn('")<\/script>'),aSt=gn('function $RC(a,b){a=document.getElementById(a);b=document.getElementById(b);b.parentNode.removeChild(b);if(a){a=a.previousSibling;var f=a.parentNode,c=a.nextSibling,e=0;do{if(c&&8===c.nodeType){var d=c.data;if("/$"===d)if(0===e)break;else e--;else"$"!==d&&"$?"!==d&&"$!"!==d||e++}d=c.nextSibling;f.removeChild(c);c=d}while(c);for(;b.firstChild;)f.insertBefore(b.firstChild,c);a.data="$";a._reactRetry&&a._reactRetry()}};$RC("'),sSt=gn('$RC("'),uSt=gn('","'),lSt=gn('")<\/script>'),cSt=gn('function $RX(b,c,d,e){var a=document.getElementById(b);a&&(b=a.previousSibling,b.data="$!",a=a.dataset,c&&(a.dgst=c),d&&(a.msg=d),e&&(a.stck=e),b._reactRetry&&b._reactRetry())};$RX("'),fSt=gn('$RX("'),hSt=gn('"'),pSt=gn(")<\/script>"),Rk=gn(","),dSt=/[<\u2028\u2029]/g;function kk(e){return JSON.stringify(e).replace(dSt,function(t){switch(t){case"<":return"\\u003c";case"\u2028":return"\\u2028";case"\u2029":return"\\u2029";default:throw Error("escapeJSStringsForInstructionScripts encountered a match it does not know how to replace. this means the match regex and the replacement characters are no longer in sync. This is a bug in React")}})}var Aw=Object.assign,gSt=Symbol.for("react.element"),fj=Symbol.for("react.portal"),hj=Symbol.for("react.fragment"),pj=Symbol.for("react.strict_mode"),dj=Symbol.for("react.profiler"),gj=Symbol.for("react.provider"),mj=Symbol.for("react.context"),vj=Symbol.for("react.forward_ref"),yj=Symbol.for("react.suspense"),_j=Symbol.for("react.suspense_list"),xj=Symbol.for("react.memo"),Dk=Symbol.for("react.lazy"),mSt=Symbol.for("react.scope"),vSt=Symbol.for("react.debug_trace_mode"),ySt=Symbol.for("react.legacy_hidden"),_St=Symbol.for("react.default_value"),bj=Symbol.iterator;function Nk(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case hj:return"Fragment";case fj:return"Portal";case dj:return"Profiler";case pj:return"StrictMode";case yj:return"Suspense";case _j:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case mj:return(e.displayName||"Context")+".Consumer";case gj:return(e._context.displayName||"Context")+".Provider";case vj:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case xj:return t=e.displayName||null,t!==null?t:Nk(e.type)||"Memo";case Dk:t=e._payload,e=e._init;try{return Nk(e(t))}catch{}}return null}var wj={};function Sj(e,t){if(e=e.contextTypes,!e)return wj;var n={},r;for(r in e)n[r]=t[r];return n}var Dy=null;function aP(e,t){if(e!==t){e.context._currentValue=e.parentValue,e=e.parent;var n=t.parent;if(e===null){if(n!==null)throw Error(ei(401))}else{if(n===null)throw Error(ei(401));aP(e,n)}t.context._currentValue=t.value}}function Ej(e){e.context._currentValue=e.parentValue,e=e.parent,e!==null&&Ej(e)}function Cj(e){var t=e.parent;t!==null&&Cj(t),e.context._currentValue=e.value}function Ij(e,t){if(e.context._currentValue=e.parentValue,e=e.parent,e===null)throw Error(ei(402));e.depth===t.depth?aP(e,t):Ij(e,t)}function Pj(e,t){var n=t.parent;if(n===null)throw Error(ei(402));e.depth===n.depth?aP(e,n):Pj(e,n),t.context._currentValue=t.value}function sP(e){var t=Dy;t!==e&&(t===null?Cj(e):e===null?Ej(t):t.depth===e.depth?aP(t,e):t.depth>e.depth?Ij(t,e):Pj(t,e),Dy=e)}var Tj={isMounted:function(){return!1},enqueueSetState:function(e,t){e=e._reactInternals,e.queue!==null&&e.queue.push(t)},enqueueReplaceState:function(e,t){e=e._reactInternals,e.replace=!0,e.queue=[t]},enqueueForceUpdate:function(){}};function Mj(e,t,n,r){var i=e.state!==void 0?e.state:null;e.updater=Tj,e.props=n,e.state=i;var a={queue:[],replace:!1};e._reactInternals=a;var o=t.contextType;if(e.context=typeof o=="object"&&o!==null?o._currentValue:r,o=t.getDerivedStateFromProps,typeof o=="function"&&(o=o(n,i),i=o==null?i:Aw({},i,o),e.state=i),typeof t.getDerivedStateFromProps!="function"&&typeof e.getSnapshotBeforeUpdate!="function"&&(typeof e.UNSAFE_componentWillMount=="function"||typeof e.componentWillMount=="function"))if(t=e.state,typeof e.componentWillMount=="function"&&e.componentWillMount(),typeof e.UNSAFE_componentWillMount=="function"&&e.UNSAFE_componentWillMount(),t!==e.state&&Tj.enqueueReplaceState(e,e.state,null),a.queue!==null&&0<a.queue.length)if(t=a.queue,o=a.replace,a.queue=null,a.replace=!1,o&&t.length===1)e.state=t[0];else{for(a=o?t[0]:e.state,i=!0,o=o?1:0;o<t.length;o++){var u=t[o];u=typeof u=="function"?u.call(e,a,n,r):u,u!=null&&(i?(i=!1,a=Aw({},a,u)):Aw(a,u))}e.state=a}else a.queue=null}var xSt={id:1,overflow:""};function Fk(e,t,n){var r=e.id;e=e.overflow;var i=32-uP(r)-1;r&=~(1<<i),n+=1;var a=32-uP(t)+i;if(30<a){var o=i-i%5;return a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,{id:1<<32-uP(t)+i|n<<i|r,overflow:a+e}}return{id:1<<a|n<<i|r,overflow:e}}var uP=Math.clz32?Math.clz32:SSt,bSt=Math.log,wSt=Math.LN2;function SSt(e){return e>>>=0,e===0?32:31-(bSt(e)/wSt|0)|0}function ESt(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var CSt=typeof Object.is=="function"?Object.is:ESt,Pg=null,zk=null,lP=null,jo=null,Lw=!1,cP=!1,Ow=0,ov=null,fP=0;function Ny(){if(Pg===null)throw Error(ei(321));return Pg}function Aj(){if(0<fP)throw Error(ei(312));return{memoizedState:null,queue:null,next:null}}function Bk(){return jo===null?lP===null?(Lw=!1,lP=jo=Aj()):(Lw=!0,jo=lP):jo.next===null?(Lw=!1,jo=jo.next=Aj()):(Lw=!0,jo=jo.next),jo}function Uk(){zk=Pg=null,cP=!1,lP=null,fP=0,jo=ov=null}function Lj(e,t){return typeof t=="function"?t(e):t}function Oj(e,t,n){if(Pg=Ny(),jo=Bk(),Lw){var r=jo.queue;if(t=r.dispatch,ov!==null&&(n=ov.get(r),n!==void 0)){ov.delete(r),r=jo.memoizedState;do r=e(r,n.action),n=n.next;while(n!==null);return jo.memoizedState=r,[r,t]}return[jo.memoizedState,t]}return e=e===Lj?typeof t=="function"?t():t:n!==void 0?n(t):t,jo.memoizedState=e,e=jo.queue={last:null,dispatch:null},e=e.dispatch=ISt.bind(null,Pg,e),[jo.memoizedState,e]}function Rj(e,t){if(Pg=Ny(),jo=Bk(),t=t===void 0?null:t,jo!==null){var n=jo.memoizedState;if(n!==null&&t!==null){var r=n[1];t:if(r===null)r=!1;else{for(var i=0;i<r.length&&i<t.length;i++)if(!CSt(t[i],r[i])){r=!1;break t}r=!0}if(r)return n[0]}}return e=e(),jo.memoizedState=[e,t],e}function ISt(e,t,n){if(25<=fP)throw Error(ei(301));if(e===Pg)if(cP=!0,e={action:n,next:null},ov===null&&(ov=new Map),n=ov.get(t),n===void 0)ov.set(t,e);else{for(t=n;t.next!==null;)t=t.next;t.next=e}}function PSt(){throw Error(ei(394))}function hP(){}var kj={readContext:function(e){return e._currentValue},useContext:function(e){return Ny(),e._currentValue},useMemo:Rj,useReducer:Oj,useRef:function(e){Pg=Ny(),jo=Bk();var t=jo.memoizedState;return t===null?(e={current:e},jo.memoizedState=e):t},useState:function(e){return Oj(Lj,e)},useInsertionEffect:hP,useLayoutEffect:function(){},useCallback:function(e,t){return Rj(function(){return e},t)},useImperativeHandle:hP,useEffect:hP,useDebugValue:hP,useDeferredValue:function(e){return Ny(),e},useTransition:function(){return Ny(),[!1,PSt]},useId:function(){var e=zk.treeContext,t=e.overflow;e=e.id,e=(e&~(1<<32-uP(e)-1)).toString(32)+t;var n=pP;if(n===null)throw Error(ei(404));return t=Ow++,e=":"+n.idPrefix+"R"+e,0<t&&(e+="H"+t.toString(32)),e+":"},useMutableSource:function(e,t){return Ny(),t(e._source)},useSyncExternalStore:function(e,t,n){if(n===void 0)throw Error(ei(407));return n()}},pP=null,Vk=Y$.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentDispatcher;function TSt(e){return console.error(e),null}function Rw(){}function MSt(e,t,n,r,i,a,o,u,c){var g=[],_=new Set;return t={destination:null,responseState:t,progressiveChunkSize:r===void 0?12800:r,status:0,fatalError:null,nextSegmentId:0,allPendingTasks:0,pendingRootTasks:0,completedRootSegment:null,abortableTasks:_,pingedTasks:g,clientRenderedBoundaries:[],completedBoundaries:[],partialBoundaries:[],onError:i===void 0?TSt:i,onAllReady:a===void 0?Rw:a,onShellReady:o===void 0?Rw:o,onShellError:u===void 0?Rw:u,onFatalError:c===void 0?Rw:c},n=dP(t,0,null,n,!1,!1),n.parentFlushed=!0,e=$k(t,e,null,n,_,wj,null,xSt),g.push(e),t}function $k(e,t,n,r,i,a,o,u){e.allPendingTasks++,n===null?e.pendingRootTasks++:n.pendingTasks++;var c={node:t,ping:function(){var g=e.pingedTasks;g.push(c),g.length===1&&Vj(e)},blockedBoundary:n,blockedSegment:r,abortSet:i,legacyContext:a,context:o,treeContext:u};return i.add(c),c}function dP(e,t,n,r,i,a){return{status:0,id:-1,index:t,parentFlushed:!1,chunks:[],children:[],formatContext:r,boundary:n,lastPushedText:i,textEmbedded:a}}function kw(e,t){if(e=e.onError(t),e!=null&&typeof e!="string")throw Error('onError returned something with a type other than "string". onError should return a string and may return null or undefined but must not return anything else. It received something of type "'+typeof e+'" instead');return e}function gP(e,t){var n=e.onShellError;n(t),n=e.onFatalError,n(t),e.destination!==null?(e.status=2,J$(e.destination,t)):(e.status=1,e.fatalError=t)}function Dj(e,t,n,r,i){for(Pg={},zk=t,Ow=0,e=n(r,i);cP;)cP=!1,Ow=0,fP+=1,jo=null,e=n(r,i);return Uk(),e}function Nj(e,t,n,r){var i=n.render(),a=r.childContextTypes;if(a!=null){var o=t.legacyContext;if(typeof n.getChildContext!="function")r=o;else{n=n.getChildContext();for(var u in n)if(!(u in a))throw Error(ei(108,Nk(r)||"Unknown",u));r=Aw({},o,n)}t.legacyContext=r,Lf(e,t,i),t.legacyContext=o}else Lf(e,t,i)}function Fj(e,t){if(e&&e.defaultProps){t=Aw({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function jk(e,t,n,r,i){if(typeof n=="function")if(n.prototype&&n.prototype.isReactComponent){i=Sj(n,t.legacyContext);var a=n.contextType;a=new n(r,typeof a=="object"&&a!==null?a._currentValue:i),Mj(a,n,r,i),Nj(e,t,a,n)}else{a=Sj(n,t.legacyContext),i=Dj(e,t,n,r,a);var o=Ow!==0;if(typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0)Mj(i,n,r,a),Nj(e,t,i,n);else if(o){r=t.treeContext,t.treeContext=Fk(r,1,0);try{Lf(e,t,i)}finally{t.treeContext=r}}else Lf(e,t,i)}else if(typeof n=="string"){switch(i=t.blockedSegment,a=_wt(i.chunks,n,r,e.responseState,i.formatContext),i.lastPushedText=!1,o=i.formatContext,i.formatContext=pwt(o,n,r),qk(e,t,a),i.formatContext=o,n){case"area":case"base":case"br":case"col":case"embed":case"hr":case"img":case"input":case"keygen":case"link":case"meta":case"param":case"source":case"track":case"wbr":break;default:i.chunks.push(xwt,si(n),bwt)}i.lastPushedText=!1}else{switch(n){case ySt:case vSt:case pj:case dj:case hj:Lf(e,t,r.children);return;case _j:Lf(e,t,r.children);return;case mSt:throw Error(ei(343));case yj:t:{n=t.blockedBoundary,i=t.blockedSegment,a=r.fallback,r=r.children,o=new Set;var u={id:null,rootSegmentID:-1,parentFlushed:!1,pendingTasks:0,forceClientRender:!1,completedSegments:[],byteSize:0,fallbackAbortableTasks:o,errorDigest:null},c=dP(e,i.chunks.length,u,i.formatContext,!1,!1);i.children.push(c),i.lastPushedText=!1;var g=dP(e,0,null,i.formatContext,!1,!1);g.parentFlushed=!0,t.blockedBoundary=u,t.blockedSegment=g;try{if(qk(e,t,r),g.lastPushedText&&g.textEmbedded&&g.chunks.push(Mk),g.status=1,mP(u,g),u.pendingTasks===0)break t}catch(_){g.status=4,u.forceClientRender=!0,u.errorDigest=kw(e,_)}finally{t.blockedBoundary=n,t.blockedSegment=i}t=$k(e,a,n,c,o,t.legacyContext,t.context,t.treeContext),e.pingedTasks.push(t)}return}if(typeof n=="object"&&n!==null)switch(n.$$typeof){case vj:if(r=Dj(e,t,n.render,r,i),Ow!==0){n=t.treeContext,t.treeContext=Fk(n,1,0);try{Lf(e,t,r)}finally{t.treeContext=n}}else Lf(e,t,r);return;case xj:n=n.type,r=Fj(n,r),jk(e,t,n,r,i);return;case gj:if(i=r.children,n=n._context,r=r.value,a=n._currentValue,n._currentValue=r,o=Dy,Dy=r={parent:o,depth:o===null?0:o.depth+1,context:n,parentValue:a,value:r},t.context=r,Lf(e,t,i),e=Dy,e===null)throw Error(ei(403));r=e.parentValue,e.context._currentValue=r===_St?e.context._defaultValue:r,e=Dy=e.parent,t.context=e;return;case mj:r=r.children,r=r(n._currentValue),Lf(e,t,r);return;case Dk:i=n._init,n=i(n._payload),r=Fj(n,r),jk(e,t,n,r,void 0);return}throw Error(ei(130,n==null?n:typeof n,""))}}function Lf(e,t,n){if(t.node=n,typeof n=="object"&&n!==null){switch(n.$$typeof){case gSt:jk(e,t,n.type,n.props,n.ref);return;case fj:throw Error(ei(257));case Dk:var r=n._init;n=r(n._payload),Lf(e,t,n);return}if(Tk(n)){zj(e,t,n);return}if(n===null||typeof n!="object"?r=null:(r=bj&&n[bj]||n["@@iterator"],r=typeof r=="function"?r:null),r&&(r=r.call(n))){if(n=r.next(),!n.done){var i=[];do i.push(n.value),n=r.next();while(!n.done);zj(e,t,i)}return}throw e=Object.prototype.toString.call(n),Error(ei(31,e==="[object Object]"?"object with keys {"+Object.keys(n).join(", ")+"}":e))}typeof n=="string"?(r=t.blockedSegment,r.lastPushedText=rj(t.blockedSegment.chunks,n,e.responseState,r.lastPushedText)):typeof n=="number"&&(r=t.blockedSegment,r.lastPushedText=rj(t.blockedSegment.chunks,""+n,e.responseState,r.lastPushedText))}function zj(e,t,n){for(var r=n.length,i=0;i<r;i++){var a=t.treeContext;t.treeContext=Fk(a,r,i);try{qk(e,t,n[i])}finally{t.treeContext=a}}}function qk(e,t,n){var r=t.blockedSegment.formatContext,i=t.legacyContext,a=t.context;try{return Lf(e,t,n)}catch(c){if(Uk(),typeof c=="object"&&c!==null&&typeof c.then=="function"){n=c;var o=t.blockedSegment,u=dP(e,o.chunks.length,null,o.formatContext,o.lastPushedText,!0);o.children.push(u),o.lastPushedText=!1,e=$k(e,t.node,t.blockedBoundary,u,t.abortSet,t.legacyContext,t.context,t.treeContext).ping,n.then(e,e),t.blockedSegment.formatContext=r,t.legacyContext=i,t.context=a,sP(a)}else throw t.blockedSegment.formatContext=r,t.legacyContext=i,t.context=a,sP(a),c}}function ASt(e){var t=e.blockedBoundary;e=e.blockedSegment,e.status=3,Uj(this,t,e)}function Bj(e,t,n){var r=e.blockedBoundary;e.blockedSegment.status=3,r===null?(t.allPendingTasks--,t.status!==2&&(t.status=2,t.destination!==null&&t.destination.close())):(r.pendingTasks--,r.forceClientRender||(r.forceClientRender=!0,e=n===void 0?Error(ei(432)):n,r.errorDigest=t.onError(e),r.parentFlushed&&t.clientRenderedBoundaries.push(r)),r.fallbackAbortableTasks.forEach(function(i){return Bj(i,t,n)}),r.fallbackAbortableTasks.clear(),t.allPendingTasks--,t.allPendingTasks===0&&(r=t.onAllReady,r()))}function mP(e,t){if(t.chunks.length===0&&t.children.length===1&&t.children[0].boundary===null){var n=t.children[0];n.id=t.id,n.parentFlushed=!0,n.status===1&&mP(e,n)}else e.completedSegments.push(t)}function Uj(e,t,n){if(t===null){if(n.parentFlushed){if(e.completedRootSegment!==null)throw Error(ei(389));e.completedRootSegment=n}e.pendingRootTasks--,e.pendingRootTasks===0&&(e.onShellError=Rw,t=e.onShellReady,t())}else t.pendingTasks--,t.forceClientRender||(t.pendingTasks===0?(n.parentFlushed&&n.status===1&&mP(t,n),t.parentFlushed&&e.completedBoundaries.push(t),t.fallbackAbortableTasks.forEach(ASt,e),t.fallbackAbortableTasks.clear()):n.parentFlushed&&n.status===1&&(mP(t,n),t.completedSegments.length===1&&t.parentFlushed&&e.partialBoundaries.push(t)));e.allPendingTasks--,e.allPendingTasks===0&&(e=e.onAllReady,e())}function Vj(e){if(e.status!==2){var t=Dy,n=Vk.current;Vk.current=kj;var r=pP;pP=e.responseState;try{var i=e.pingedTasks,a;for(a=0;a<i.length;a++){var o=i[a],u=e,c=o.blockedSegment;if(c.status===0){sP(o.context);try{Lf(u,o,o.node),c.lastPushedText&&c.textEmbedded&&c.chunks.push(Mk),o.abortSet.delete(o),c.status=1,Uj(u,o.blockedBoundary,c)}catch(R){if(Uk(),typeof R=="object"&&R!==null&&typeof R.then=="function"){var g=o.ping;R.then(g,g)}else{o.abortSet.delete(o),c.status=4;var _=o.blockedBoundary,E=R,C=kw(u,E);if(_===null?gP(u,E):(_.pendingTasks--,_.forceClientRender||(_.forceClientRender=!0,_.errorDigest=C,_.parentFlushed&&u.clientRenderedBoundaries.push(_))),u.allPendingTasks--,u.allPendingTasks===0){var O=u.onAllReady;O()}}}finally{}}}i.splice(0,a),e.destination!==null&&Gk(e,e.destination)}catch(R){kw(e,R),gP(e,R)}finally{pP=r,Vk.current=n,n===kj&&sP(t)}}}function vP(e,t,n){switch(n.parentFlushed=!0,n.status){case 0:var r=n.id=e.nextSegmentId++;return n.lastPushedText=!1,n.textEmbedded=!1,e=e.responseState,Nn(t,wwt),Nn(t,e.placeholderPrefix),e=si(r.toString(16)),Nn(t,e),aa(t,Swt);case 1:n.status=2;var i=!0;r=n.chunks;var a=0;n=n.children;for(var o=0;o<n.length;o++){for(i=n[o];a<i.index;a++)Nn(t,r[a]);i=yP(e,t,i)}for(;a<r.length-1;a++)Nn(t,r[a]);return a<r.length&&(i=aa(t,r[a])),i;default:throw Error(ei(390))}}function yP(e,t,n){var r=n.boundary;if(r===null)return vP(e,t,n);if(r.parentFlushed=!0,r.forceClientRender)r=r.errorDigest,aa(t,Pwt),Nn(t,Mwt),r&&(Nn(t,Lwt),Nn(t,si(Uu(r))),Nn(t,Awt)),aa(t,Owt),vP(e,t,n);else if(0<r.pendingTasks){r.rootSegmentID=e.nextSegmentId++,0<r.completedSegments.length&&e.partialBoundaries.push(r);var i=e.responseState,a=i.nextSuspenseID++;i=gn(i.boundaryPrefix+a.toString(16)),r=r.id=i,cj(t,e.responseState,r),vP(e,t,n)}else if(r.byteSize>e.progressiveChunkSize)r.rootSegmentID=e.nextSegmentId++,e.completedBoundaries.push(r),cj(t,e.responseState,r.id),vP(e,t,n);else{if(aa(t,Ewt),n=r.completedSegments,n.length!==1)throw Error(ei(391));yP(e,t,n[0])}return aa(t,Twt)}function $j(e,t,n){return tSt(t,e.responseState,n.formatContext,n.id),yP(e,t,n),eSt(t,n.formatContext)}function jj(e,t,n){for(var r=n.completedSegments,i=0;i<r.length;i++)qj(e,t,n,r[i]);if(r.length=0,e=e.responseState,r=n.id,n=n.rootSegmentID,Nn(t,e.startInlineScript),e.sentCompleteBoundaryFunction?Nn(t,sSt):(e.sentCompleteBoundaryFunction=!0,Nn(t,aSt)),r===null)throw Error(ei(395));return n=si(n.toString(16)),Nn(t,r),Nn(t,uSt),Nn(t,e.segmentPrefix),Nn(t,n),aa(t,lSt)}function qj(e,t,n,r){if(r.status===2)return!0;var i=r.id;if(i===-1){if((r.id=n.rootSegmentID)===-1)throw Error(ei(392));return $j(e,t,r)}return $j(e,t,r),e=e.responseState,Nn(t,e.startInlineScript),e.sentCompleteSegmentFunction?Nn(t,rSt):(e.sentCompleteSegmentFunction=!0,Nn(t,nSt)),Nn(t,e.segmentPrefix),i=si(i.toString(16)),Nn(t,i),Nn(t,iSt),Nn(t,e.placeholderPrefix),Nn(t,i),aa(t,oSt)}function Gk(e,t){Tf=new Uint8Array(512),Mf=0;try{var n=e.completedRootSegment;if(n!==null&&e.pendingRootTasks===0){yP(e,t,n),e.completedRootSegment=null;var r=e.responseState.bootstrapChunks;for(n=0;n<r.length-1;n++)Nn(t,r[n]);n<r.length&&aa(t,r[n])}var i=e.clientRenderedBoundaries,a;for(a=0;a<i.length;a++){var o=i[a];r=t;var u=e.responseState,c=o.id,g=o.errorDigest,_=o.errorMessage,E=o.errorComponentStack;if(Nn(r,u.startInlineScript),u.sentClientRenderFunction?Nn(r,fSt):(u.sentClientRenderFunction=!0,Nn(r,cSt)),c===null)throw Error(ei(395));Nn(r,c),Nn(r,hSt),(g||_||E)&&(Nn(r,Rk),Nn(r,si(kk(g||"")))),(_||E)&&(Nn(r,Rk),Nn(r,si(kk(_||"")))),E&&(Nn(r,Rk),Nn(r,si(kk(E)))),!aa(r,pSt)}i.splice(0,a);var C=e.completedBoundaries;for(a=0;a<C.length;a++)!jj(e,t,C[a]);C.splice(0,a),Z$(t),Tf=new Uint8Array(512),Mf=0;var O=e.partialBoundaries;for(a=0;a<O.length;a++){var R=O[a];t:{i=e,o=t;var D=R.completedSegments;for(u=0;u<D.length;u++)if(!qj(i,o,R,D[u])){u++,D.splice(0,u);var B=!1;break t}D.splice(0,u),B=!0}if(!B){e.destination=null,a++,O.splice(0,a);return}}O.splice(0,a);var z=e.completedBoundaries;for(a=0;a<z.length;a++)!jj(e,t,z[a]);z.splice(0,a)}finally{Z$(t),e.allPendingTasks===0&&e.pingedTasks.length===0&&e.clientRenderedBoundaries.length===0&&e.completedBoundaries.length===0&&t.close()}}function Gj(e,t){try{var n=e.abortableTasks;n.forEach(function(r){return Bj(r,e,t)}),n.clear(),e.destination!==null&&Gk(e,e.destination)}catch(r){kw(e,r),gP(e,r)}}Ck.renderToReadableStream=function(e,t){return new Promise(function(n,r){var i,a,o=new Promise(function(_,E){a=_,i=E}),u=MSt(e,fwt(t?t.identifierPrefix:void 0,t?t.nonce:void 0,t?t.bootstrapScriptContent:void 0,t?t.bootstrapScripts:void 0,t?t.bootstrapModules:void 0),hwt(t?t.namespaceURI:void 0),t?t.progressiveChunkSize:void 0,t?t.onError:void 0,a,function(){var _=new ReadableStream({type:"bytes",pull:function(E){if(u.status===1)u.status=2,J$(E,u.fatalError);else if(u.status!==2&&u.destination===null){u.destination=E;try{Gk(u,E)}catch(C){kw(u,C),gP(u,C)}}},cancel:function(){Gj(u)}},{highWaterMark:0});_.allReady=o,n(_)},function(_){o.catch(function(){}),r(_)},i);if(t&&t.signal){var c=t.signal,g=function(){Gj(u,c.reason),c.removeEventListener("abort",g)};c.addEventListener("abort",g)}Vj(u)})};Ck.version="18.2.0";var bx,Wj;bx=_x,Wj=Ck;bx.version;var yEt=bx.renderToString;bx.renderToStaticMarkup;bx.renderToNodeStream;bx.renderToStaticNodeStream;Wj.renderToReadableStream;function _Et(e,t){if(t=t||{},!OSt(t))throw new Error("options is invalid");var n=t.bbox,r=t.id;if(!e)throw new Error("No features passed");if(!Array.isArray(e))throw new Error("features must be an Array");n&&RSt(n),r&&kSt(r);var i={type:"FeatureCollection"};return r&&(i.id=r),n&&(i.bbox=n),i.features=e,i}function LSt(e){return!isNaN(e)&&e!==null&&!Array.isArray(e)}function OSt(e){return!!e&&e.constructor===Object}function RSt(e){if(!e)throw new Error("bbox is required");if(!Array.isArray(e))throw new Error("bbox must be an Array");if(e.length!==4&&e.length!==6)throw new Error("bbox must be an Array of 4 or 6 numbers");e.forEach(function(t){if(!LSt(t))throw new Error("bbox must only contain numbers")})}function kSt(e){if(!e)throw new Error("id is required");if(["string","number"].indexOf(typeof e)===-1)throw new Error("id must be a number or a string")}function Hj(e,t,n){if(e!==null)for(var r,i,a,o,u,c,g,_=0,E=0,C,O=e.type,R=O==="FeatureCollection",D=O==="Feature",B=R?e.features.length:1,z=0;z<B;z++){g=R?e.features[z].geometry:D?e.geometry:e,C=g?g.type==="GeometryCollection":!1,u=C?g.geometries.length:1;for(var k=0;k<u;k++){var $=0,K=0;if(o=C?g.geometries[k]:g,o!==null){c=o.coordinates;var et=o.type;switch(_=n&&(et==="Polygon"||et==="MultiPolygon")?1:0,et){case null:break;case"Point":if(t(c,E,z,$,K)===!1)return!1;E++,$++;break;case"LineString":case"MultiPoint":for(r=0;r<c.length;r++){if(t(c[r],E,z,$,K)===!1)return!1;E++,et==="MultiPoint"&&$++}et==="LineString"&&$++;break;case"Polygon":case"MultiLineString":for(r=0;r<c.length;r++){for(i=0;i<c[r].length-_;i++){if(t(c[r][i],E,z,$,K)===!1)return!1;E++}et==="MultiLineString"&&$++,et==="Polygon"&&K++}et==="Polygon"&&$++;break;case"MultiPolygon":for(r=0;r<c.length;r++){for(et==="MultiPolygon"&&(K=0),i=0;i<c[r].length;i++){for(a=0;a<c[r][i].length-_;a++){if(t(c[r][i][a],E,z,$,K)===!1)return!1;E++}K++}$++}break;case"GeometryCollection":for(r=0;r<o.geometries.length;r++)if(Hj(o.geometries[r],t,n)===!1)return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function xEt(e){var t=[1/0,1/0,-1/0,-1/0];return Hj(e,function(n){t[0]>n[0]&&(t[0]=n[0]),t[1]>n[1]&&(t[1]=n[1]),t[2]<n[0]&&(t[2]=n[0]),t[3]<n[1]&&(t[3]=n[1])}),t}function Xj(e){return function(t){var n=t.dispatch,r=t.getState;return function(i){return function(a){return typeof a=="function"?a(n,r,e):i(a)}}}}var DSt=Xj();DSt.withExtraArgument=Xj;export{$St as $,gpt as A,aEt as B,b2 as C,uEt as D,Xvt as E,BSt as F,$gt as G,mV as H,fEt as I,pEt as J,cEt as K,ogt as L,hEt as M,gEt as N,dEt as O,xz as P,mEt as Q,vr as R,lEt as S,sEt as T,vEt as U,yEt as V,xEt as W,_Et as X,jSt as Y,VSt as Z,ZW as _,GSt as a,DSt as a0,QW as a1,dW as a2,USt as a3,WSt as b,CJ as c,gL as d,YSt as e,ZSt as f,wtt as g,nEt as h,HSt as i,r0 as j,zSt as k,tEt as l,XSt as m,QSt as n,JSt as o,R4 as p,qSt as q,Pr as r,Xtt as s,Wtt as t,KSt as u,eEt as v,rEt as w,iEt as x,oEt as y,FSt as z};