diff --git "a/keplergl.min.js" "b/keplergl.min.js" new file mode 100644--- /dev/null +++ "b/keplergl.min.js" @@ -0,0 +1,385 @@ +!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react"),require("styled-components"),require("react-dom"),require("redux"),require("react-redux")):"function"==typeof define&&define.amd?define(["react","styled-components","react-dom","redux","react-redux"],t):"object"==typeof exports?exports.KeplerGl=t(require("react"),require("styled-components"),require("react-dom"),require("redux"),require("react-redux")):e.KeplerGl=t(e.React,e.styled,e.ReactDOM,e.Redux,e.ReactRedux)}(this,(function(e,t,n,r,i){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=1193)}([function(t,n){t.exports=e},function(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n.d(t,"a",(function(){return r}))},function(e,t,n){e.exports=n(1286)()},function(e,t){e.exports=function(e){return e&&e.__esModule?e:{default:e}},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){"use strict";var r,i,o,a,s,l,u,c,d;n.d(t,"e",(function(){return r})),n.d(t,"i",(function(){return i})),n.d(t,"f",(function(){return o})),n.d(t,"b",(function(){return a})),n.d(t,"g",(function(){return s})),n.d(t,"c",(function(){return l})),n.d(t,"d",(function(){return u})),n.d(t,"h",(function(){return c})),n.d(t,"a",(function(){return d})),function(e){e[e.V1=0]="V1",e[e.V2=1]="V2",e[e.V3=2]="V3",e[e.V4=3]="V4",e[e.V5=4]="V5"}(r||(r={})),function(e){e[e.Sparse=0]="Sparse",e[e.Dense=1]="Dense"}(i||(i={})),function(e){e[e.HALF=0]="HALF",e[e.SINGLE=1]="SINGLE",e[e.DOUBLE=2]="DOUBLE"}(o||(o={})),function(e){e[e.DAY=0]="DAY",e[e.MILLISECOND=1]="MILLISECOND"}(a||(a={})),function(e){e[e.SECOND=0]="SECOND",e[e.MILLISECOND=1]="MILLISECOND",e[e.MICROSECOND=2]="MICROSECOND",e[e.NANOSECOND=3]="NANOSECOND"}(s||(s={})),function(e){e[e.YEAR_MONTH=0]="YEAR_MONTH",e[e.DAY_TIME=1]="DAY_TIME",e[e.MONTH_DAY_NANO=2]="MONTH_DAY_NANO"}(l||(l={})),function(e){e[e.NONE=0]="NONE",e[e.Schema=1]="Schema",e[e.DictionaryBatch=2]="DictionaryBatch",e[e.RecordBatch=3]="RecordBatch",e[e.Tensor=4]="Tensor",e[e.SparseTensor=5]="SparseTensor"}(u||(u={})),function(e){e[e.NONE=0]="NONE",e[e.Null=1]="Null",e[e.Int=2]="Int",e[e.Float=3]="Float",e[e.Binary=4]="Binary",e[e.Utf8=5]="Utf8",e[e.Bool=6]="Bool",e[e.Decimal=7]="Decimal",e[e.Date=8]="Date",e[e.Time=9]="Time",e[e.Timestamp=10]="Timestamp",e[e.Interval=11]="Interval",e[e.List=12]="List",e[e.Struct=13]="Struct",e[e.Union=14]="Union",e[e.FixedSizeBinary=15]="FixedSizeBinary",e[e.FixedSizeList=16]="FixedSizeList",e[e.Map=17]="Map",e[e.Dictionary=-1]="Dictionary",e[e.Int8=-2]="Int8",e[e.Int16=-3]="Int16",e[e.Int32=-4]="Int32",e[e.Int64=-5]="Int64",e[e.Uint8=-6]="Uint8",e[e.Uint16=-7]="Uint16",e[e.Uint32=-8]="Uint32",e[e.Uint64=-9]="Uint64",e[e.Float16=-10]="Float16",e[e.Float32=-11]="Float32",e[e.Float64=-12]="Float64",e[e.DateDay=-13]="DateDay",e[e.DateMillisecond=-14]="DateMillisecond",e[e.TimestampSecond=-15]="TimestampSecond",e[e.TimestampMillisecond=-16]="TimestampMillisecond",e[e.TimestampMicrosecond=-17]="TimestampMicrosecond",e[e.TimestampNanosecond=-18]="TimestampNanosecond",e[e.TimeSecond=-19]="TimeSecond",e[e.TimeMillisecond=-20]="TimeMillisecond",e[e.TimeMicrosecond=-21]="TimeMicrosecond",e[e.TimeNanosecond=-22]="TimeNanosecond",e[e.DenseUnion=-23]="DenseUnion",e[e.SparseUnion=-24]="SparseUnion",e[e.IntervalDayTime=-25]="IntervalDayTime",e[e.IntervalYearMonth=-26]="IntervalYearMonth"}(c||(c={})),function(e){e[e.OFFSET=0]="OFFSET",e[e.DATA=1]="DATA",e[e.VALIDITY=2]="VALIDITY",e[e.TYPE=3]="TYPE"}(d||(d={}))},function(e,t,n){var r=n(71).default;function i(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return i=function(){return e},e}e.exports=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{default:e};var t=i();if(t&&t.has(e))return t.get(e);var n={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var s=o?Object.getOwnPropertyDescriptor(e,a):null;s&&(s.get||s.set)?Object.defineProperty(n,a,s):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){function n(e,t){for(var n=0;ne[Symbol.toStringTag]="Null")(O.prototype);class S extends E{constructor(e,t){super(),this.isSigned=e,this.bitWidth=t}get typeId(){return M.h.Int}get ArrayType(){switch(this.bitWidth){case 8:return this.isSigned?Int8Array:Uint8Array;case 16:return this.isSigned?Int16Array:Uint16Array;case 32:return this.isSigned?Int32Array:Uint32Array;case 64:return this.isSigned?BigInt64Array:BigUint64Array}throw new Error(`Unrecognized ${this[Symbol.toStringTag]} type`)}toString(){return`${this.isSigned?"I":"Ui"}nt${this.bitWidth}`}}o=Symbol.toStringTag,S[o]=(e=>(e.isSigned=null,e.bitWidth=null,e[Symbol.toStringTag]="Int"))(S.prototype);class T extends S{constructor(){super(!0,8)}get ArrayType(){return Int8Array}}class C extends S{constructor(){super(!0,16)}get ArrayType(){return Int16Array}}class L extends S{constructor(){super(!0,32)}get ArrayType(){return Int32Array}}class P extends S{constructor(){super(!0,64)}get ArrayType(){return BigInt64Array}}class I extends S{constructor(){super(!1,8)}get ArrayType(){return Uint8Array}}class D extends S{constructor(){super(!1,16)}get ArrayType(){return Uint16Array}}class k extends S{constructor(){super(!1,32)}get ArrayType(){return Uint32Array}}class R extends S{constructor(){super(!1,64)}get ArrayType(){return BigUint64Array}}Object.defineProperty(T.prototype,"ArrayType",{value:Int8Array}),Object.defineProperty(C.prototype,"ArrayType",{value:Int16Array}),Object.defineProperty(L.prototype,"ArrayType",{value:Int32Array}),Object.defineProperty(P.prototype,"ArrayType",{value:BigInt64Array}),Object.defineProperty(I.prototype,"ArrayType",{value:Uint8Array}),Object.defineProperty(D.prototype,"ArrayType",{value:Uint16Array}),Object.defineProperty(k.prototype,"ArrayType",{value:Uint32Array}),Object.defineProperty(R.prototype,"ArrayType",{value:BigUint64Array});class j extends E{constructor(e){super(),this.precision=e}get typeId(){return M.h.Float}get ArrayType(){switch(this.precision){case M.f.HALF:return Uint16Array;case M.f.SINGLE:return Float32Array;case M.f.DOUBLE:return Float64Array}throw new Error(`Unrecognized ${this[Symbol.toStringTag]} type`)}toString(){return"Float"+(this.precision<<5||16)}}a=Symbol.toStringTag,j[a]=(e=>(e.precision=null,e[Symbol.toStringTag]="Float"))(j.prototype);class F extends j{constructor(){super(M.f.HALF)}}class N extends j{constructor(){super(M.f.SINGLE)}}class B extends j{constructor(){super(M.f.DOUBLE)}}Object.defineProperty(F.prototype,"ArrayType",{value:Uint16Array}),Object.defineProperty(N.prototype,"ArrayType",{value:Float32Array}),Object.defineProperty(B.prototype,"ArrayType",{value:Float64Array});class z extends E{constructor(){super()}get typeId(){return M.h.Binary}toString(){return"Binary"}}s=Symbol.toStringTag,z[s]=(e=>(e.ArrayType=Uint8Array,e[Symbol.toStringTag]="Binary"))(z.prototype);class U extends E{constructor(){super()}get typeId(){return M.h.Utf8}toString(){return"Utf8"}}l=Symbol.toStringTag,U[l]=(e=>(e.ArrayType=Uint8Array,e[Symbol.toStringTag]="Utf8"))(U.prototype);class H extends E{constructor(){super()}get typeId(){return M.h.Bool}toString(){return"Bool"}}u=Symbol.toStringTag,H[u]=(e=>(e.ArrayType=Uint8Array,e[Symbol.toStringTag]="Bool"))(H.prototype);class V extends E{constructor(e,t,n=128){super(),this.scale=e,this.precision=t,this.bitWidth=n}get typeId(){return M.h.Decimal}toString(){return`Decimal[${this.precision}e${this.scale>0?"+":""}${this.scale}]`}}c=Symbol.toStringTag,V[c]=(e=>(e.scale=null,e.precision=null,e.ArrayType=Uint32Array,e[Symbol.toStringTag]="Decimal"))(V.prototype);class G extends E{constructor(e){super(),this.unit=e}get typeId(){return M.h.Date}toString(){return`Date${32*(this.unit+1)}<${M.b[this.unit]}>`}}d=Symbol.toStringTag,G[d]=(e=>(e.unit=null,e.ArrayType=Int32Array,e[Symbol.toStringTag]="Date"))(G.prototype);class Y extends G{constructor(){super(M.b.DAY)}}class W extends G{constructor(){super(M.b.MILLISECOND)}}class q extends E{constructor(e,t){super(),this.unit=e,this.bitWidth=t}get typeId(){return M.h.Time}toString(){return`Time${this.bitWidth}<${M.g[this.unit]}>`}get ArrayType(){switch(this.bitWidth){case 32:return Int32Array;case 64:return BigInt64Array}throw new Error(`Unrecognized ${this[Symbol.toStringTag]} type`)}}f=Symbol.toStringTag,q[f]=(e=>(e.unit=null,e.bitWidth=null,e[Symbol.toStringTag]="Time"))(q.prototype);class X extends q{constructor(){super(M.g.SECOND,32)}}class Z extends q{constructor(){super(M.g.MILLISECOND,32)}}class K extends q{constructor(){super(M.g.MICROSECOND,64)}}class Q extends q{constructor(){super(M.g.NANOSECOND,64)}}class J extends E{constructor(e,t){super(),this.unit=e,this.timezone=t}get typeId(){return M.h.Timestamp}toString(){return`Timestamp<${M.g[this.unit]}${this.timezone?", "+this.timezone:""}>`}}h=Symbol.toStringTag,J[h]=(e=>(e.unit=null,e.timezone=null,e.ArrayType=Int32Array,e[Symbol.toStringTag]="Timestamp"))(J.prototype);class $ extends J{constructor(e){super(M.g.SECOND,e)}}class ee extends J{constructor(e){super(M.g.MILLISECOND,e)}}class te extends J{constructor(e){super(M.g.MICROSECOND,e)}}class ne extends J{constructor(e){super(M.g.NANOSECOND,e)}}class re extends E{constructor(e){super(),this.unit=e}get typeId(){return M.h.Interval}toString(){return`Interval<${M.c[this.unit]}>`}}p=Symbol.toStringTag,re[p]=(e=>(e.unit=null,e.ArrayType=Int32Array,e[Symbol.toStringTag]="Interval"))(re.prototype);class ie extends re{constructor(){super(M.c.DAY_TIME)}}class oe extends re{constructor(){super(M.c.YEAR_MONTH)}}class ae extends E{constructor(e){super(),this.children=[e]}get typeId(){return M.h.List}toString(){return`List<${this.valueType}>`}get valueType(){return this.children[0].type}get valueField(){return this.children[0]}get ArrayType(){return this.valueType.ArrayType}}A=Symbol.toStringTag,ae[A]=(e=>(e.children=null,e[Symbol.toStringTag]="List"))(ae.prototype);class se extends E{constructor(e){super(),this.children=e}get typeId(){return M.h.Struct}toString(){return`Struct<{${this.children.map(e=>`${e.name}:${e.type}`).join(", ")}}>`}}g=Symbol.toStringTag,se[g]=(e=>(e.children=null,e[Symbol.toStringTag]="Struct"))(se.prototype);class le extends E{constructor(e,t,n){super(),this.mode=e,this.children=n,this.typeIds=t=Int32Array.from(t),this.typeIdToChildIndex=t.reduce((e,t,n)=>(e[t]=n)&&e||e,Object.create(null))}get typeId(){return M.h.Union}toString(){return`${this[Symbol.toStringTag]}<${this.children.map(e=>""+e.type).join(" | ")}>`}}m=Symbol.toStringTag,le[m]=(e=>(e.mode=null,e.typeIds=null,e.children=null,e.typeIdToChildIndex=null,e.ArrayType=Int8Array,e[Symbol.toStringTag]="Union"))(le.prototype);class ue extends le{constructor(e,t){super(M.i.Dense,e,t)}}class ce extends le{constructor(e,t){super(M.i.Sparse,e,t)}}class de extends E{constructor(e){super(),this.byteWidth=e}get typeId(){return M.h.FixedSizeBinary}toString(){return`FixedSizeBinary[${this.byteWidth}]`}}y=Symbol.toStringTag,de[y]=(e=>(e.byteWidth=null,e.ArrayType=Uint8Array,e[Symbol.toStringTag]="FixedSizeBinary"))(de.prototype);class fe extends E{constructor(e,t){super(),this.listSize=e,this.children=[t]}get typeId(){return M.h.FixedSizeList}get valueType(){return this.children[0].type}get valueField(){return this.children[0]}get ArrayType(){return this.valueType.ArrayType}toString(){return`FixedSizeList[${this.listSize}]<${this.valueType}>`}}v=Symbol.toStringTag,fe[v]=(e=>(e.children=null,e.listSize=null,e[Symbol.toStringTag]="FixedSizeList"))(fe.prototype);class he extends E{constructor(e,t=!1){super(),this.children=[e],this.keysSorted=t}get typeId(){return M.h.Map}get keyType(){return this.children[0].type.children[0].type}get valueType(){return this.children[0].type.children[1].type}get childType(){return this.children[0].type}toString(){return`Map<{${this.children[0].type.children.map(e=>`${e.name}:${e.type}`).join(", ")}}>`}}b=Symbol.toStringTag,he[b]=(e=>(e.children=null,e.keysSorted=null,e[Symbol.toStringTag]="Map_"))(he.prototype);const pe=(Ae=-1,()=>++Ae);var Ae;class ge extends E{constructor(e,t,n,r){super(),this.indices=t,this.dictionary=e,this.isOrdered=r||!1,this.id=null==n?pe():Object(x.a)(n)}get typeId(){return M.h.Dictionary}get children(){return this.dictionary.children}get valueType(){return this.dictionary}get ArrayType(){return this.dictionary.ArrayType}toString(){return`Dictionary<${this.indices}, ${this.dictionary}>`}}function me(e){const t=e;switch(e.typeId){case M.h.Decimal:return e.bitWidth/32;case M.h.Timestamp:return 2;case M.h.Date:case M.h.Interval:return 1+t.unit;case M.h.FixedSizeList:return t.listSize;case M.h.FixedSizeBinary:return t.byteWidth;default:return 1}}_=Symbol.toStringTag,ge[_]=(e=>(e.id=null,e.indices=null,e.isOrdered=null,e.dictionary=null,e[Symbol.toStringTag]="Dictionary"))(ge.prototype)},function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,n){e.exports=t},function(e,t){e.exports=function(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){"use strict";function r(e,t,n){return function(r,i){void 0===i&&(i=n);var o=e(r)+i;return t(o)}}function i(e){return function(t){return new Date(e(t).getTime()-1)}}function o(e,t){return function(n){return[e(n),t(n)]}}function a(e){if(e instanceof Date)return e.getFullYear();if("number"==typeof e)return e;var t=parseInt(e,10);if("string"==typeof e&&!isNaN(t))return t;throw new Error("Failed to get year from date: ".concat(e,"."))}function s(e){if(e instanceof Date)return e.getMonth();throw new Error("Failed to get month from date: ".concat(e,"."))}function l(e){if(e instanceof Date)return e.getMonth()+1;throw new Error("Failed to get human-readable month from date: ".concat(e,"."))}function u(e){if(e instanceof Date)return e.getDate();throw new Error("Failed to get year from date: ".concat(e,"."))}function c(e){if(e instanceof Date)return e.getHours();if("string"==typeof e){var t=e.split(":");if(t.length>=2){var n=t[0];if(n){var r=parseInt(n,10);if(!isNaN(r))return r}}}throw new Error("Failed to get hours from date: ".concat(e,"."))}function d(e){if(e instanceof Date)return e.getMinutes();if("string"==typeof e){var t=e.split(":");if(t.length>=2){var n=t[1]||"0",r=parseInt(n,10);if(!isNaN(r))return r}}throw new Error("Failed to get minutes from date: ".concat(e,"."))}function f(e){if(e instanceof Date)return e.getSeconds();if("string"==typeof e){var t=e.split(":");if(t.length>=2){var n=t[2]||"0",r=parseInt(n,10);if(!isNaN(r))return r}}throw new Error("Failed to get seconds from date: ".concat(e,"."))}function h(e){if(e instanceof Date)return e.getMilliseconds();if("string"==typeof e){var t=e.split(":");if(t.length>=2){var n=(t[2]||"0").split(".")[1]||"0",r=parseInt(n,10);if(!isNaN(r))return r}}throw new Error("Failed to get seconds from date: ".concat(e,"."))}function p(e){var t=a(e),n=t+(1-t)%100,r=new Date;return r.setFullYear(n,0,1),r.setHours(0,0,0,0),r}n.d(t,"K",(function(){return a})),n.d(t,"s",(function(){return s})),n.d(t,"u",(function(){return l})),n.d(t,"d",(function(){return u})),n.d(t,"l",(function(){return c})),n.d(t,"r",(function(){return d})),n.d(t,"J",(function(){return f})),n.d(t,"q",(function(){return h})),n.d(t,"c",(function(){return p})),n.d(t,"C",(function(){return A})),n.d(t,"x",(function(){return g})),n.d(t,"a",(function(){return m})),n.d(t,"B",(function(){return y})),n.d(t,"b",(function(){return v})),n.d(t,"k",(function(){return b})),n.d(t,"E",(function(){return _})),n.d(t,"y",(function(){return w})),n.d(t,"i",(function(){return x})),n.d(t,"D",(function(){return M})),n.d(t,"j",(function(){return E})),n.d(t,"N",(function(){return O})),n.d(t,"I",(function(){return S})),n.d(t,"A",(function(){return T})),n.d(t,"L",(function(){return C})),n.d(t,"H",(function(){return L})),n.d(t,"M",(function(){return P})),n.d(t,"w",(function(){return D})),n.d(t,"G",(function(){return k})),n.d(t,"z",(function(){return R})),n.d(t,"t",(function(){return j})),n.d(t,"F",(function(){return F})),n.d(t,"v",(function(){return N})),n.d(t,"g",(function(){return z})),n.d(t,"e",(function(){return U})),n.d(t,"f",(function(){return H})),n.d(t,"h",(function(){return V})),n.d(t,"m",(function(){return Y})),n.d(t,"n",(function(){return W})),n.d(t,"p",(function(){return q})),n.d(t,"o",(function(){return X}));var A=r(a,p,-100),g=r(a,p,100),m=i(g),y=r(a,m,-100),v=(r(a,m,100),o(p,m));function b(e){var t=a(e),n=t+(1-t)%10,r=new Date;return r.setFullYear(n,0,1),r.setHours(0,0,0,0),r}var _=r(a,b,-10),w=r(a,b,10),x=i(w),M=r(a,x,-10),E=(r(a,x,10),o(b,x));function O(e){var t=a(e),n=new Date;return n.setFullYear(t,0,1),n.setHours(0,0,0,0),n}var S=r(a,O,-1),T=r(a,O,1),C=i(T),L=r(a,C,-1),P=(r(a,C,1),o(O,C));function I(e,t){return function(n,r){void 0===r&&(r=t);var i=a(n),o=s(n)+r,l=new Date;return l.setFullYear(i,o,1),l.setHours(0,0,0,0),e(l)}}function D(e){var t=a(e),n=s(e),r=new Date;return r.setFullYear(t,n,1),r.setHours(0,0,0,0),r}var k=I(D,-1),R=I(D,1),j=i(R),F=I(j,-1),N=(I(j,1),o(D,j));function B(e,t){return function(n,r){void 0===r&&(r=t);var i=a(n),o=s(n),l=u(n)+r,c=new Date;return c.setFullYear(i,o,l),c.setHours(0,0,0,0),e(c)}}function z(e){var t=a(e),n=s(e),r=u(e),i=new Date;return i.setFullYear(t,n,r),i.setHours(0,0,0,0),i}B(z,-1);var U=i(B(z,1)),H=(B(U,-1),B(U,1),o(z,U));function V(e){return u(j(e))}function G(e,t){void 0===t&&(t=2);var n="".concat(e);return n.length>=t?e:"0000".concat(n).slice(-t)}function Y(e){var t=G(c(e)),n=G(d(e));return"".concat(t,":").concat(n)}function W(e){var t=G(c(e)),n=G(d(e)),r=G(f(e));return"".concat(t,":").concat(n,":").concat(r)}function q(e){var t=G(a(e),4),n=G(l(e));return"".concat(t,"-").concat(n)}function X(e){var t=G(a(e),4),n=G(l(e)),r=G(u(e));return"".concat(t,"-").concat(n,"-").concat(r)}},function(e,t,n){"use strict";n.d(t,"k",(function(){return r})),n.d(t,"i",(function(){return o})),n.d(t,"j",(function(){return a})),n.d(t,"g",(function(){return s})),n.d(t,"b",(function(){return l})),n.d(t,"a",(function(){return u})),n.d(t,"f",(function(){return B})),n.d(t,"n",(function(){return N})),n.d(t,"l",(function(){return z})),n.d(t,"o",(function(){return U})),n.d(t,"c",(function(){return J})),n.d(t,"m",(function(){return ee})),n.d(t,"h",(function(){return $})),n.d(t,"e",(function(){return V})),n.d(t,"d",(function(){return G}));const r=new(n(1803).a)({id:"luma.gl"});function i(e,t){if(!e)throw new Error(t||"luma.gl: assertion failed.")}function o(e){return"undefined"!=typeof WebGLRenderingContext&&e instanceof WebGLRenderingContext||("undefined"!=typeof WebGL2RenderingContext&&e instanceof WebGL2RenderingContext||Boolean(e&&Number.isFinite(e._version)))}function a(e){return"undefined"!=typeof WebGL2RenderingContext&&e instanceof WebGL2RenderingContext||Boolean(e&&2===e._version)}function s(e){return a(e)?e:null}function l(e){return i(o(e),"Invalid WebGLRenderingContext"),e}function u(e){return i(a(e),"Requires WebGL2"),e}const c={};function d(e,t){var n;c[e]=!0,void 0!==t&&(n=t,globalThis.console&&globalThis.console.error&&globalThis.console.error(n))}const f=function e(t){const n=t.gl;this.ext=t,this.isAlive=!0,this.hasBeenBound=!1,this.elementArrayBuffer=null,this.attribs=new Array(t.maxVertexAttribs);for(let t=0;t{var e;e="OESVertexArrayObject emulation library context restored",globalThis.console&&globalThis.console.log&&globalThis.console.log(e),t.reset_()},!0),this.reset_()};h.prototype.VERTEX_ARRAY_BINDING_OES=34229,h.prototype.reset_=function(){if(void 0!==this.vertexArrayObjects)for(let e=0;ea(e)?void 0:0,A={3074:e=>a(e)?void 0:36064,35723:e=>a(e)?void 0:4352,35977:p,32937:p,36795:(e,t)=>{const n=a(e)?e.getExtension("EXT_disjoint_timer_query_webgl2"):e.getExtension("EXT_disjoint_timer_query");return n&&n.GPU_DISJOINT_EXT?t(n.GPU_DISJOINT_EXT):0},37445:(e,t)=>{const n=e.getExtension("WEBGL_debug_renderer_info");return t(n&&n.UNMASKED_VENDOR_WEBGL||7936)},37446:(e,t)=>{const n=e.getExtension("WEBGL_debug_renderer_info");return t(n&&n.UNMASKED_RENDERER_WEBGL||7937)},34047:(e,t)=>{const n=e.luma.extensions.EXT_texture_filter_anisotropic;return n?t(n.MAX_TEXTURE_MAX_ANISOTROPY_EXT):1},32883:p,35071:p,37447:p,36063:(e,t)=>{if(!a(e)){const n=e.getExtension("WEBGL_draw_buffers");return n?t(n.MAX_COLOR_ATTACHMENTS_WEBGL):0}},35379:p,35374:p,35377:p,34852:e=>{if(!a(e)){const t=e.getExtension("WEBGL_draw_buffers");return t?t.MAX_DRAW_BUFFERS_WEBGL:0}},36203:e=>e.getExtension("OES_element_index")?2147483647:65535,33001:e=>e.getExtension("OES_element_index")?16777216:65535,33e3:e=>16777216,37157:p,35373:p,35657:p,36183:p,37137:p,34045:p,35978:p,35979:p,35968:p,35376:p,35375:p,35659:p,37154:p,35371:p,35658:p,35076:p,35077:p,35380:p};const g={OES_vertex_array_object:{meta:{suffix:"OES"},createVertexArray:()=>{i(!1,"VertexArray requires WebGL2 or OES_vertex_array_object extension")},deleteVertexArray:()=>{},bindVertexArray:()=>{},isVertexArray:()=>!1},ANGLE_instanced_arrays:{meta:{suffix:"ANGLE"},vertexAttribDivisor(e,t){i(0===t,"WebGL instanced rendering not supported")},drawElementsInstanced:()=>{},drawArraysInstanced:()=>{}},WEBGL_draw_buffers:{meta:{suffix:"WEBGL"},drawBuffers:()=>{i(!1)}},EXT_disjoint_timer_query:{meta:{suffix:"EXT"},createQuery:()=>{i(!1)},deleteQuery:()=>{i(!1)},beginQuery:()=>{i(!1)},endQuery:()=>{},getQuery(e,t){return this.getQueryObject(e,t)},getQueryParameter(e,t){return this.getQueryObject(e,t)},getQueryObject:()=>{}}},m={readBuffer:(e,t,n)=>{a(e)&&t(n)},getVertexAttrib:(e,t,n,r)=>{const{webgl2:i,ext:o}=function(e,t){return{webgl2:a(e),ext:e.getExtension(t)}}(e,"ANGLE_instanced_arrays");let s;switch(r){case 35069:s=!!i&&void 0;break;case 35070:s=i||o?void 0:0}return void 0!==s?s:t(n,r)},getProgramParameter:(e,t,n,r)=>{if(!a(e))switch(r){case 35967:return 35981;case 35971:case 35382:return 0}return t(n,r)},getInternalformatParameter:(e,t,n,r,i)=>{if(!a(e))switch(i){case 32937:return new Int32Array([0])}return e.getInternalformatParameter(n,r,i)},getTexParameter(e,t,n,r){switch(r){case 34046:const{extensions:t}=e.luma,n=t.EXT_texture_filter_anisotropic;r=n&&n.TEXTURE_MAX_ANISOTROPY_EXT||34046}return t(n,r)},getParameter:function(e,t,n){const r=A[n],i="function"==typeof r?r(e,t,n):r;return void 0!==i?i:t(n)},hint:(e,t,n,r)=>t(n,r)};function y(e,t){let{extension:n,target:r,target2:o}=t;const a=g[n];i(a);const{meta:s={}}=a,{suffix:l=""}=s,u=e.getExtension(n);for(const t of Object.keys(a)){const n="".concat(t).concat(l);let i=null;"meta"===t||"function"==typeof e[t]||(u&&"function"==typeof u[n]?i=function(){return u[n](...arguments)}:"function"==typeof a[t]&&(i=a[t].bind(r))),i&&(r[t]=i,o[t]=i)}}globalThis.polyfillContext=function(e){e.luma=e.luma||{};const{luma:t}=e;return t.polyfilled||(!function(e){if("function"==typeof e.createVertexArray)return;const t=e.getSupportedExtensions;e.getSupportedExtensions=function(){const e=t.call(this)||[];return e.indexOf("OES_vertex_array_object")<0&&e.push("OES_vertex_array_object"),e};const n=e.getExtension;e.getExtension=function(t){const r=n.call(this,t);return r||("OES_vertex_array_object"!==t?null:(e.__OESVertexArrayObject||(this.__OESVertexArrayObject=new h(this)),this.__OESVertexArrayObject))}}(e),function(e){e.luma.extensions={};const t=e.getSupportedExtensions()||[];for(const n of t)e.luma[n]=e.getExtension(n)}(e),function(e,t){for(const n of Object.getOwnPropertyNames(t))"overrides"!==n&&y(e,{extension:n,target:e.luma,target2:e})}(e,g),function(e,t){let{target:n,target2:r}=t;Object.keys(m).forEach(t=>{if("function"==typeof m[t]){const i=e[t]?e[t].bind(e):()=>{},o=m[t].bind(null,e,i);n[t]=o,r[t]=o}})}(e,{target:t,target2:e}),t.polyfilled=!0),e};const v={3042:!1,32773:new Float32Array([0,0,0,0]),32777:32774,34877:32774,32969:1,32968:0,32971:1,32970:0,3106:new Float32Array([0,0,0,0]),3107:[!0,!0,!0,!0],2884:!1,2885:1029,2929:!1,2931:1,2932:513,2928:new Float32Array([0,1]),2930:!0,3024:!0,36006:null,2886:2305,33170:4352,2849:1,32823:!1,32824:0,10752:0,32938:1,32939:!1,3089:!1,3088:new Int32Array([0,0,1024,1024]),2960:!1,2961:0,2968:4294967295,36005:4294967295,2962:519,2967:0,2963:4294967295,34816:519,36003:0,36004:4294967295,2964:7680,2965:7680,2966:7680,34817:7680,34818:7680,34819:7680,2978:[0,0,1024,1024],3333:4,3317:4,37440:!1,37441:!1,37443:37444,35723:4352,36010:null,35977:!1,3330:0,3332:0,3331:0,3314:0,32878:0,3316:0,3315:0,32877:0},b=(e,t,n)=>t?e.enable(n):e.disable(n),_=(e,t,n)=>e.hint(n,t),w=(e,t,n)=>e.pixelStorei(n,t);function x(e){return Array.isArray(e)||ArrayBuffer.isView(e)}const M={3042:b,32773:(e,t)=>e.blendColor(...t),32777:"blendEquation",34877:"blendEquation",32969:"blendFunc",32968:"blendFunc",32971:"blendFunc",32970:"blendFunc",3106:(e,t)=>e.clearColor(...t),3107:(e,t)=>e.colorMask(...t),2884:b,2885:(e,t)=>e.cullFace(t),2929:b,2931:(e,t)=>e.clearDepth(t),2932:(e,t)=>e.depthFunc(t),2928:(e,t)=>e.depthRange(...t),2930:(e,t)=>e.depthMask(t),3024:b,35723:_,36006:(e,t)=>{const n=a(e)?36009:36160;return e.bindFramebuffer(n,t)},2886:(e,t)=>e.frontFace(t),33170:_,2849:(e,t)=>e.lineWidth(t),32823:b,32824:"polygonOffset",10752:"polygonOffset",35977:b,32938:"sampleCoverage",32939:"sampleCoverage",3089:b,3088:(e,t)=>e.scissor(...t),2960:b,2961:(e,t)=>e.clearStencil(t),2968:(e,t)=>e.stencilMaskSeparate(1028,t),36005:(e,t)=>e.stencilMaskSeparate(1029,t),2962:"stencilFuncFront",2967:"stencilFuncFront",2963:"stencilFuncFront",34816:"stencilFuncBack",36003:"stencilFuncBack",36004:"stencilFuncBack",2964:"stencilOpFront",2965:"stencilOpFront",2966:"stencilOpFront",34817:"stencilOpBack",34818:"stencilOpBack",34819:"stencilOpBack",2978:(e,t)=>e.viewport(...t),3333:w,3317:w,37440:w,37441:w,37443:w,3330:w,3332:w,3331:w,36010:(e,t)=>e.bindFramebuffer(36008,t),3314:w,32878:w,3316:w,3315:w,32877:w,framebuffer:(e,t)=>{const n=t&&"handle"in t?t.handle:t;return e.bindFramebuffer(36160,n)},blend:(e,t)=>t?e.enable(3042):e.disable(3042),blendColor:(e,t)=>e.blendColor(...t),blendEquation:(e,t)=>{t=x(t)?t:[t,t],e.blendEquationSeparate(...t)},blendFunc:(e,t)=>{t=x(t)&&2===t.length?[...t,...t]:t,e.blendFuncSeparate(...t)},clearColor:(e,t)=>e.clearColor(...t),clearDepth:(e,t)=>e.clearDepth(t),clearStencil:(e,t)=>e.clearStencil(t),colorMask:(e,t)=>e.colorMask(...t),cull:(e,t)=>t?e.enable(2884):e.disable(2884),cullFace:(e,t)=>e.cullFace(t),depthTest:(e,t)=>t?e.enable(2929):e.disable(2929),depthFunc:(e,t)=>e.depthFunc(t),depthMask:(e,t)=>e.depthMask(t),depthRange:(e,t)=>e.depthRange(...t),dither:(e,t)=>t?e.enable(3024):e.disable(3024),derivativeHint:(e,t)=>{e.hint(35723,t)},frontFace:(e,t)=>e.frontFace(t),mipmapHint:(e,t)=>e.hint(33170,t),lineWidth:(e,t)=>e.lineWidth(t),polygonOffsetFill:(e,t)=>t?e.enable(32823):e.disable(32823),polygonOffset:(e,t)=>e.polygonOffset(...t),sampleCoverage:(e,t)=>e.sampleCoverage(...t),scissorTest:(e,t)=>t?e.enable(3089):e.disable(3089),scissor:(e,t)=>e.scissor(...t),stencilTest:(e,t)=>t?e.enable(2960):e.disable(2960),stencilMask:(e,t)=>{t=x(t)?t:[t,t];const[n,r]=t;e.stencilMaskSeparate(1028,n),e.stencilMaskSeparate(1029,r)},stencilFunc:(e,t)=>{t=x(t)&&3===t.length?[...t,...t]:t;const[n,r,i,o,a,s]=t;e.stencilFuncSeparate(1028,n,r,i),e.stencilFuncSeparate(1029,o,a,s)},stencilOp:(e,t)=>{t=x(t)&&3===t.length?[...t,...t]:t;const[n,r,i,o,a,s]=t;e.stencilOpSeparate(1028,n,r,i),e.stencilOpSeparate(1029,o,a,s)},viewport:(e,t)=>e.viewport(...t)};function E(e,t,n){return void 0!==t[e]?t[e]:n[e]}const O={blendEquation:(e,t,n)=>e.blendEquationSeparate(E(32777,t,n),E(34877,t,n)),blendFunc:(e,t,n)=>e.blendFuncSeparate(E(32969,t,n),E(32968,t,n),E(32971,t,n),E(32970,t,n)),polygonOffset:(e,t,n)=>e.polygonOffset(E(32824,t,n),E(10752,t,n)),sampleCoverage:(e,t,n)=>e.sampleCoverage(E(32938,t,n),E(32939,t,n)),stencilFuncFront:(e,t,n)=>e.stencilFuncSeparate(1028,E(2962,t,n),E(2967,t,n),E(2963,t,n)),stencilFuncBack:(e,t,n)=>e.stencilFuncSeparate(1029,E(34816,t,n),E(36003,t,n),E(36004,t,n)),stencilOpFront:(e,t,n)=>e.stencilOpSeparate(1028,E(2964,t,n),E(2965,t,n),E(2966,t,n)),stencilOpBack:(e,t,n)=>e.stencilOpSeparate(1029,E(34817,t,n),E(34818,t,n),E(34819,t,n))},S={enable:(e,t)=>e({[t]:!0}),disable:(e,t)=>e({[t]:!1}),pixelStorei:(e,t,n)=>e({[t]:n}),hint:(e,t,n)=>e({[t]:n}),bindFramebuffer:(e,t,n)=>{switch(t){case 36160:return e({36006:n,36010:n});case 36009:return e({36006:n});case 36008:return e({36010:n});default:return null}},blendColor:(e,t,n,r,i)=>e({32773:new Float32Array([t,n,r,i])}),blendEquation:(e,t)=>e({32777:t,34877:t}),blendEquationSeparate:(e,t,n)=>e({32777:t,34877:n}),blendFunc:(e,t,n)=>e({32969:t,32968:n,32971:t,32970:n}),blendFuncSeparate:(e,t,n,r,i)=>e({32969:t,32968:n,32971:r,32970:i}),clearColor:(e,t,n,r,i)=>e({3106:new Float32Array([t,n,r,i])}),clearDepth:(e,t)=>e({2931:t}),clearStencil:(e,t)=>e({2961:t}),colorMask:(e,t,n,r,i)=>e({3107:[t,n,r,i]}),cullFace:(e,t)=>e({2885:t}),depthFunc:(e,t)=>e({2932:t}),depthRange:(e,t,n)=>e({2928:new Float32Array([t,n])}),depthMask:(e,t)=>e({2930:t}),frontFace:(e,t)=>e({2886:t}),lineWidth:(e,t)=>e({2849:t}),polygonOffset:(e,t,n)=>e({32824:t,10752:n}),sampleCoverage:(e,t,n)=>e({32938:t,32939:n}),scissor:(e,t,n,r,i)=>e({3088:new Int32Array([t,n,r,i])}),stencilMask:(e,t)=>e({2968:t,36005:t}),stencilMaskSeparate:(e,t,n)=>e({[1028===t?2968:36005]:n}),stencilFunc:(e,t,n,r)=>e({2962:t,2967:n,2963:r,34816:t,36003:n,36004:r}),stencilFuncSeparate:(e,t,n,r,i)=>e({[1028===t?2962:34816]:n,[1028===t?2967:36003]:r,[1028===t?2963:36004]:i}),stencilOp:(e,t,n,r)=>e({2964:t,2965:n,2966:r,34817:t,34818:n,34819:r}),stencilOpSeparate:(e,t,n,r,i)=>e({[1028===t?2964:34817]:n,[1028===t?2965:34818]:r,[1028===t?2966:34819]:i}),viewport:(e,t,n,r,i)=>e({2978:[t,n,r,i]})},T=(e,t)=>e.isEnabled(t),C={3042:T,2884:T,2929:T,3024:T,32823:T,32926:T,32928:T,3089:T,2960:T,35977:T};function L(e){for(const t in e)return!1;return!0}function P(e,t){if(e===t)return!0;const n=Array.isArray(e)||ArrayBuffer.isView(e),r=Array.isArray(t)||ArrayBuffer.isView(t);if(n&&r&&e.length===t.length){for(let n=0;n{})}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.gl=e,this.program=null,this.stateStack=[],this.enable=!0,this.cache=t?B(e):Object.assign({},v),this.log=n,this._updateCache=this._updateCache.bind(this),Object.seal(this)}push(){this.stateStack.push({})}pop(){i(this.stateStack.length>0);const e=this.stateStack[this.stateStack.length-1];N(this.gl,e),this.stateStack.pop()}_updateCache(e){let t,n=!1;const r=this.stateStack.length>0&&this.stateStack[this.stateStack.length-1];for(const o in e){i(void 0!==o);const a=e[o],s=this.cache[o];P(a,s)||(n=!0,t=s,r&&!(o in r)&&(r[o]=s),this.cache[o]=a)}return{valueChanged:n,oldValue:t}}}function j(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{enable:n=!0,copyState:r}=t;if(i(void 0!==r),!e.state){const{polyfillContext:t}=globalThis;t&&t(e),e.state=new R(e,{copyState:r}),k(e);for(const t in S){D(e,t,S[t])}I(e,"getParameter"),I(e,"isEnabled")}return e.state.enable=n,e}function F(e){i(e.state),e.state.pop()}function N(e,t){if(i(o(e),"setParameters requires a WebGL context"),L(t))return;const n={};for(const r in t){const i=Number(r),o=M[r];o&&("string"==typeof o?n[o]=!0:o(e,t[r],i))}const r=e.state&&e.state.cache;if(r)for(const i in n){(0,O[i])(e,t,r)}}function B(e,t){if("number"==typeof(t=t||v)){const n=t,r=C[n];return r?r(e,n):e.getParameter(n)}const n=Array.isArray(t)?t:Object.keys(t),r={};for(const t of n){const n=C[t];r[t]=n?n(e,Number(t)):e.getParameter(Number(t))}return r}function z(e){N(e,v)}function U(e,t,n){if(L(t))return n(e);const{nocatch:r=!0}=t;let i;if(function(e){e.state||j(e,{copyState:!1}),e.state.push()}(e),N(e,t),r)i=n(e),F(e);else try{i=n(e)}finally{F(e)}return i}var H=n(428);function V(e){const{luma:t}=e;if(e.canvas&&t){const n=t.canvasSizeInfo,r="clientWidth"in n?n.clientWidth:e.canvas.clientWidth;return r?e.drawingBufferWidth/r:1}return 1}function G(e,t){let n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];const r=V(e),i=e.drawingBufferWidth,o=e.drawingBufferHeight;return W(t,r,i,o,n)}function Y(e){const t="undefined"==typeof window?1:window.devicePixelRatio||1;return Number.isFinite(e)?e<=0?1:e:e?t:1}function W(e,t,n,r,i){const o=q(e[0],t,n);let a=X(e[1],t,r,i),s=q(e[0]+1,t,n);const l=s===n-1?s:s-1;let u;return s=X(e[1]+1,t,r,i),i?(s=0===s?s:s+1,u=a,a=s):u=s===r-1?s:s-1,{x:o,y:a,width:Math.max(l-o+1,1),height:Math.max(u-a+1,1)}}function q(e,t,n){return Math.min(Math.round(e*t),n-1)}function X(e,t,n,r){return r?Math.max(0,n-1-Math.round(e*t)):Math.min(Math.round(e*t),n-1)}const Z=Object(H.a)(),K=Z&&"undefined"!=typeof document,Q={webgl2:!0,webgl1:!0,throwOnError:!0,manageState:!0,canvas:null,debug:!1,width:800,height:600};function J(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};i(Z,"createGLContext only available in the browser.\nCreate your own headless context or use 'createHeadlessContext' from @luma.gl/test-utils"),e=Object.assign({},Q,e);const{width:t,height:n}=e;function r(t){if(e.throwOnError)throw new Error(t);return console.error(t),null}let o;e.onError=r;const{canvas:a}=e,s=ne({canvas:a,width:t,height:n,onError:r});return o=te(s,e),o?(o=$(o,e),re(o),o):null}function $(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!e||e._instrumented)return e;e._version=e._version||ie(e),e.luma=e.luma||{},e.luma.canvasSizeInfo=e.luma.canvasSizeInfo||{},t=Object.assign({},Q,t);const{manageState:n,debug:i}=t;return n&&j(e,{copyState:!1,log:function(){for(var e=arguments.length,t=new Array(e),n=0;n1&&void 0!==arguments[1]?arguments[1]:{};if(e.canvas){return void oe(e,Y(t.useDevicePixels),t)}const n=e.getExtension("STACKGL_resize_drawingbuffer");n&&"width"in t&&"height"in t&&n.resize(t.width,t.height)}function te(e,t){const{onError:n}=t;let r=null;const i=e=>r=e.statusMessage||r;e.addEventListener("webglcontextcreationerror",i,!1);const{webgl1:o=!0,webgl2:a=!0}=t;let s=null;return a&&(s=s||e.getContext("webgl2",t),s=s||e.getContext("experimental-webgl2",t)),o&&(s=s||e.getContext("webgl",t),s=s||e.getContext("experimental-webgl",t)),e.removeEventListener("webglcontextcreationerror",i,!1),s?(t.onContextLost&&e.addEventListener("webglcontextlost",t.onContextLost,!1),t.onContextRestored&&e.addEventListener("webglcontextrestored",t.onContextRestored,!1),s):n("Failed to create ".concat(a&&!o?"WebGL2":"WebGL"," context: ").concat(r||"Unknown error"))}function ne(e){let t,{canvas:n,width:r=800,height:i=600,onError:o}=e;if("string"==typeof n){K&&"complete"===document.readyState||o("createGLContext called on canvas '".concat(n,"' before page was loaded")),t=document.getElementById(n)}else n?t=n:(t=document.createElement("canvas"),t.id="lumagl-canvas",t.style.width=Number.isFinite(r)?"".concat(r,"px"):"100%",t.style.height=Number.isFinite(i)?"".concat(i,"px"):"100%",document.body.insertBefore(t,document.body.firstChild));return t}function re(e){const t=a(e)?"WebGL2":"WebGL1",n=function(e){const t=e.getParameter(7936),n=e.getParameter(7937),r=e.getExtension("WEBGL_debug_renderer_info");return{vendor:r&&e.getParameter(r.UNMASKED_VENDOR_WEBGL||7936)||t,renderer:r&&e.getParameter(r.UNMASKED_RENDERER_WEBGL||7937)||n,vendorMasked:t,rendererMasked:n,version:e.getParameter(7938),shadingLanguageVersion:e.getParameter(35724)}}(e),i=n?"(".concat(n.vendor,",").concat(n.renderer,")"):"",o=e.debug?" debug":"";r.info(1,"".concat(t).concat(o," context ").concat(i))()}function ie(e){return"undefined"!=typeof WebGL2RenderingContext&&e instanceof WebGL2RenderingContext?2:1}function oe(e,t,n){let i="width"in n?n.width:e.canvas.clientWidth,o="height"in n?n.height:e.canvas.clientHeight;i&&o||(r.log(1,"Canvas clientWidth/clientHeight is 0")(),t=1,i=e.canvas.width||1,o=e.canvas.height||1),e.luma=e.luma||{},e.luma.canvasSizeInfo=e.luma.canvasSizeInfo||{};const a=e.luma.canvasSizeInfo;if(a.clientWidth!==i||a.clientHeight!==o||a.devicePixelRatio!==t){let n=t;const a=Math.floor(i*n),s=Math.floor(o*n);e.canvas.width=a,e.canvas.height=s,e.drawingBufferWidth===a&&e.drawingBufferHeight===s||(r.warn("Device pixel ratio clamped")(),n=Math.min(e.drawingBufferWidth/i,e.drawingBufferHeight/o),e.canvas.width=Math.floor(i*n),e.canvas.height=Math.floor(o*n)),Object.assign(e.luma.canvasSizeInfo,{clientWidth:i,clientHeight:o,devicePixelRatio:t})}}},function(e,t,n){"use strict";n.r(t),n.d(t,"earthRadius",(function(){return r})),n.d(t,"factors",(function(){return i})),n.d(t,"unitsFactors",(function(){return o})),n.d(t,"areaFactors",(function(){return a})),n.d(t,"feature",(function(){return s})),n.d(t,"geometry",(function(){return l})),n.d(t,"point",(function(){return u})),n.d(t,"points",(function(){return c})),n.d(t,"polygon",(function(){return d})),n.d(t,"polygons",(function(){return f})),n.d(t,"lineString",(function(){return h})),n.d(t,"lineStrings",(function(){return p})),n.d(t,"featureCollection",(function(){return A})),n.d(t,"multiLineString",(function(){return g})),n.d(t,"multiPoint",(function(){return m})),n.d(t,"multiPolygon",(function(){return y})),n.d(t,"geometryCollection",(function(){return v})),n.d(t,"round",(function(){return b})),n.d(t,"radiansToLength",(function(){return _})),n.d(t,"lengthToRadians",(function(){return w})),n.d(t,"lengthToDegrees",(function(){return x})),n.d(t,"bearingToAzimuth",(function(){return M})),n.d(t,"radiansToDegrees",(function(){return E})),n.d(t,"degreesToRadians",(function(){return O})),n.d(t,"convertLength",(function(){return S})),n.d(t,"convertArea",(function(){return T})),n.d(t,"isNumber",(function(){return C})),n.d(t,"isObject",(function(){return L})),n.d(t,"validateBBox",(function(){return P})),n.d(t,"validateId",(function(){return I}));var r=6371008.8,i={centimeters:100*r,centimetres:100*r,degrees:r/111325,feet:3.28084*r,inches:39.37*r,kilometers:r/1e3,kilometres:r/1e3,meters:r,metres:r,miles:r/1609.344,millimeters:1e3*r,millimetres:1e3*r,nauticalmiles:r/1852,radians:1,yards:1.0936*r},o={centimeters:100,centimetres:100,degrees:1/111325,feet:3.28084,inches:39.37,kilometers:.001,kilometres:.001,meters:1,metres:1,miles:1/1609.344,millimeters:1e3,millimetres:1e3,nauticalmiles:1/1852,radians:1/r,yards:1.0936133},a={acres:247105e-9,centimeters:1e4,centimetres:1e4,feet:10.763910417,hectares:1e-4,inches:1550.003100006,kilometers:1e-6,kilometres:1e-6,meters:1,metres:1,miles:386e-9,millimeters:1e6,millimetres:1e6,yards:1.195990046};function s(e,t,n){void 0===n&&(n={});var r={type:"Feature"};return(0===n.id||n.id)&&(r.id=n.id),n.bbox&&(r.bbox=n.bbox),r.properties=t||{},r.geometry=e,r}function l(e,t,n){switch(void 0===n&&(n={}),e){case"Point":return u(t).geometry;case"LineString":return h(t).geometry;case"Polygon":return d(t).geometry;case"MultiPoint":return m(t).geometry;case"MultiLineString":return g(t).geometry;case"MultiPolygon":return y(t).geometry;default:throw new Error(e+" is invalid")}}function u(e,t,n){if(void 0===n&&(n={}),!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(!C(e[0])||!C(e[1]))throw new Error("coordinates must contain numbers");return s({type:"Point",coordinates:e},t,n)}function c(e,t,n){return void 0===n&&(n={}),A(e.map((function(e){return u(e,t)})),n)}function d(e,t,n){void 0===n&&(n={});for(var r=0,i=e;r=0))throw new Error("precision must be a positive number");var n=Math.pow(10,t||0);return Math.round(e*n)/n}function _(e,t){void 0===t&&(t="kilometers");var n=i[t];if(!n)throw new Error(t+" units is invalid");return e*n}function w(e,t){void 0===t&&(t="kilometers");var n=i[t];if(!n)throw new Error(t+" units is invalid");return e/n}function x(e,t){return E(w(e,t))}function M(e){var t=e%360;return t<0&&(t+=360),t}function E(e){return 180*(e%(2*Math.PI))/Math.PI}function O(e){return e%360*Math.PI/180}function S(e,t,n){if(void 0===t&&(t="kilometers"),void 0===n&&(n="kilometers"),!(e>=0))throw new Error("length must be a positive number");return _(w(e,t),n)}function T(e,t,n){if(void 0===t&&(t="meters"),void 0===n&&(n="kilometers"),!(e>=0))throw new Error("area must be a positive number");var r=a[t];if(!r)throw new Error("invalid original units");var i=a[n];if(!i)throw new Error("invalid final units");return e/r*i}function C(e){return!isNaN(e)&&null!==e&&!Array.isArray(e)}function L(e){return!!e&&e.constructor===Object}function P(e){if(!e)throw new Error("bbox is required");if(!Array.isArray(e))throw new Error("bbox must be an Array");if(4!==e.length&&6!==e.length)throw new Error("bbox must be an Array of 4 or 6 numbers");e.forEach((function(e){if(!C(e))throw new Error("bbox must only contain numbers")}))}function I(e){if(!e)throw new Error("id is required");if(-1===["string","number"].indexOf(typeof e))throw new Error("id must be a number or a string")}},function(e,t,n){(function(e){e.exports=function(){"use strict";var t,r;function i(){return t.apply(null,arguments)}function o(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function a(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function s(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function l(e){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(e).length;var t;for(t in e)if(s(e,t))return!1;return!0}function u(e){return void 0===e}function c(e){return"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e)}function d(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function f(e,t){var n,r=[];for(n=0;n>>0;for(t=0;t0)for(n=0;n=0?n?"+":"":"-")+Math.pow(10,Math.max(0,i)).toString().substr(1)+r}i.suppressDeprecationWarnings=!1,i.deprecationHandler=null,E=Object.keys?Object.keys:function(e){var t,n=[];for(t in e)s(e,t)&&n.push(t);return n};var I=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,D=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,k={},R={};function j(e,t,n,r){var i=r;"string"==typeof r&&(i=function(){return this[r]()}),e&&(R[e]=i),t&&(R[t[0]]=function(){return P(i.apply(this,arguments),t[1],t[2])}),n&&(R[n]=function(){return this.localeData().ordinal(i.apply(this,arguments),e)})}function F(e,t){return e.isValid()?(t=N(t,e.localeData()),k[t]=k[t]||function(e){var t,n,r,i=e.match(I);for(t=0,n=i.length;t=0&&D.test(e);)e=e.replace(D,r),D.lastIndex=0,n-=1;return e}var B={};function z(e,t){var n=e.toLowerCase();B[n]=B[n+"s"]=B[t]=e}function U(e){return"string"==typeof e?B[e]||B[e.toLowerCase()]:void 0}function H(e){var t,n,r={};for(n in e)s(e,n)&&(t=U(n))&&(r[t]=e[n]);return r}var V={};function G(e,t){V[e]=t}function Y(e){return e%4==0&&e%100!=0||e%400==0}function W(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function q(e){var t=+e,n=0;return 0!==t&&isFinite(t)&&(n=W(t)),n}function X(e,t){return function(n){return null!=n?(K(this,e,n),i.updateOffset(this,t),this):Z(this,e)}}function Z(e,t){return e.isValid()?e._d["get"+(e._isUTC?"UTC":"")+t]():NaN}function K(e,t,n){e.isValid()&&!isNaN(n)&&("FullYear"===t&&Y(e.year())&&1===e.month()&&29===e.date()?(n=q(n),e._d["set"+(e._isUTC?"UTC":"")+t](n,e.month(),we(n,e.month()))):e._d["set"+(e._isUTC?"UTC":"")+t](n))}var Q,J=/\d/,$=/\d\d/,ee=/\d{3}/,te=/\d{4}/,ne=/[+-]?\d{6}/,re=/\d\d?/,ie=/\d\d\d\d?/,oe=/\d\d\d\d\d\d?/,ae=/\d{1,3}/,se=/\d{1,4}/,le=/[+-]?\d{1,6}/,ue=/\d+/,ce=/[+-]?\d+/,de=/Z|[+-]\d\d:?\d\d/gi,fe=/Z|[+-]\d\d(?::?\d\d)?/gi,he=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i;function pe(e,t,n){Q[e]=T(t)?t:function(e,r){return e&&n?n:t}}function Ae(e,t){return s(Q,e)?Q[e](t._strict,t._locale):new RegExp(ge(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,(function(e,t,n,r,i){return t||n||r||i}))))}function ge(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}Q={};var me,ye={};function ve(e,t){var n,r=t;for("string"==typeof e&&(e=[e]),c(t)&&(r=function(e,n){n[t]=q(e)}),n=0;n68?1900:2e3)};var De=X("FullYear",!0);function ke(e,t,n,r,i,o,a){var s;return e<100&&e>=0?(s=new Date(e+400,t,n,r,i,o,a),isFinite(s.getFullYear())&&s.setFullYear(e)):s=new Date(e,t,n,r,i,o,a),s}function Re(e){var t,n;return e<100&&e>=0?((n=Array.prototype.slice.call(arguments))[0]=e+400,t=new Date(Date.UTC.apply(null,n)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function je(e,t,n){var r=7+t-n;return-(7+Re(e,0,r).getUTCDay()-t)%7+r-1}function Fe(e,t,n,r,i){var o,a,s=1+7*(t-1)+(7+n-r)%7+je(e,r,i);return s<=0?a=Ie(o=e-1)+s:s>Ie(e)?(o=e+1,a=s-Ie(e)):(o=e,a=s),{year:o,dayOfYear:a}}function Ne(e,t,n){var r,i,o=je(e.year(),t,n),a=Math.floor((e.dayOfYear()-o-1)/7)+1;return a<1?r=a+Be(i=e.year()-1,t,n):a>Be(e.year(),t,n)?(r=a-Be(e.year(),t,n),i=e.year()+1):(i=e.year(),r=a),{week:r,year:i}}function Be(e,t,n){var r=je(e,t,n),i=je(e+1,t,n);return(Ie(e)-r+i)/7}function ze(e,t){return e.slice(t,7).concat(e.slice(0,t))}j("w",["ww",2],"wo","week"),j("W",["WW",2],"Wo","isoWeek"),z("week","w"),z("isoWeek","W"),G("week",5),G("isoWeek",5),pe("w",re),pe("ww",re,$),pe("W",re),pe("WW",re,$),be(["w","ww","W","WW"],(function(e,t,n,r){t[r.substr(0,1)]=q(e)})),j("d",0,"do","day"),j("dd",0,0,(function(e){return this.localeData().weekdaysMin(this,e)})),j("ddd",0,0,(function(e){return this.localeData().weekdaysShort(this,e)})),j("dddd",0,0,(function(e){return this.localeData().weekdays(this,e)})),j("e",0,0,"weekday"),j("E",0,0,"isoWeekday"),z("day","d"),z("weekday","e"),z("isoWeekday","E"),G("day",11),G("weekday",11),G("isoWeekday",11),pe("d",re),pe("e",re),pe("E",re),pe("dd",(function(e,t){return t.weekdaysMinRegex(e)})),pe("ddd",(function(e,t){return t.weekdaysShortRegex(e)})),pe("dddd",(function(e,t){return t.weekdaysRegex(e)})),be(["dd","ddd","dddd"],(function(e,t,n,r){var i=n._locale.weekdaysParse(e,r,n._strict);null!=i?t.d=i:A(n).invalidWeekday=e})),be(["d","e","E"],(function(e,t,n,r){t[r]=q(e)}));var Ue="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),He="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Ve="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),Ge=he,Ye=he,We=he;function qe(e,t,n){var r,i,o,a=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],r=0;r<7;++r)o=p([2e3,1]).day(r),this._minWeekdaysParse[r]=this.weekdaysMin(o,"").toLocaleLowerCase(),this._shortWeekdaysParse[r]=this.weekdaysShort(o,"").toLocaleLowerCase(),this._weekdaysParse[r]=this.weekdays(o,"").toLocaleLowerCase();return n?"dddd"===t?-1!==(i=me.call(this._weekdaysParse,a))?i:null:"ddd"===t?-1!==(i=me.call(this._shortWeekdaysParse,a))?i:null:-1!==(i=me.call(this._minWeekdaysParse,a))?i:null:"dddd"===t?-1!==(i=me.call(this._weekdaysParse,a))||-1!==(i=me.call(this._shortWeekdaysParse,a))||-1!==(i=me.call(this._minWeekdaysParse,a))?i:null:"ddd"===t?-1!==(i=me.call(this._shortWeekdaysParse,a))||-1!==(i=me.call(this._weekdaysParse,a))||-1!==(i=me.call(this._minWeekdaysParse,a))?i:null:-1!==(i=me.call(this._minWeekdaysParse,a))||-1!==(i=me.call(this._weekdaysParse,a))||-1!==(i=me.call(this._shortWeekdaysParse,a))?i:null}function Xe(){function e(e,t){return t.length-e.length}var t,n,r,i,o,a=[],s=[],l=[],u=[];for(t=0;t<7;t++)n=p([2e3,1]).day(t),r=ge(this.weekdaysMin(n,"")),i=ge(this.weekdaysShort(n,"")),o=ge(this.weekdays(n,"")),a.push(r),s.push(i),l.push(o),u.push(r),u.push(i),u.push(o);a.sort(e),s.sort(e),l.sort(e),u.sort(e),this._weekdaysRegex=new RegExp("^("+u.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+s.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+a.join("|")+")","i")}function Ze(){return this.hours()%12||12}function Ke(e,t){j(e,0,0,(function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)}))}function Qe(e,t){return t._meridiemParse}j("H",["HH",2],0,"hour"),j("h",["hh",2],0,Ze),j("k",["kk",2],0,(function(){return this.hours()||24})),j("hmm",0,0,(function(){return""+Ze.apply(this)+P(this.minutes(),2)})),j("hmmss",0,0,(function(){return""+Ze.apply(this)+P(this.minutes(),2)+P(this.seconds(),2)})),j("Hmm",0,0,(function(){return""+this.hours()+P(this.minutes(),2)})),j("Hmmss",0,0,(function(){return""+this.hours()+P(this.minutes(),2)+P(this.seconds(),2)})),Ke("a",!0),Ke("A",!1),z("hour","h"),G("hour",13),pe("a",Qe),pe("A",Qe),pe("H",re),pe("h",re),pe("k",re),pe("HH",re,$),pe("hh",re,$),pe("kk",re,$),pe("hmm",ie),pe("hmmss",oe),pe("Hmm",ie),pe("Hmmss",oe),ve(["H","HH"],3),ve(["k","kk"],(function(e,t,n){var r=q(e);t[3]=24===r?0:r})),ve(["a","A"],(function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e})),ve(["h","hh"],(function(e,t,n){t[3]=q(e),A(n).bigHour=!0})),ve("hmm",(function(e,t,n){var r=e.length-2;t[3]=q(e.substr(0,r)),t[4]=q(e.substr(r)),A(n).bigHour=!0})),ve("hmmss",(function(e,t,n){var r=e.length-4,i=e.length-2;t[3]=q(e.substr(0,r)),t[4]=q(e.substr(r,2)),t[5]=q(e.substr(i)),A(n).bigHour=!0})),ve("Hmm",(function(e,t,n){var r=e.length-2;t[3]=q(e.substr(0,r)),t[4]=q(e.substr(r))})),ve("Hmmss",(function(e,t,n){var r=e.length-4,i=e.length-2;t[3]=q(e.substr(0,r)),t[4]=q(e.substr(r,2)),t[5]=q(e.substr(i))}));var Je,$e=X("Hours",!0),et={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:/\d{1,2}/,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:xe,monthsShort:Me,week:{dow:0,doy:6},weekdays:Ue,weekdaysMin:Ve,weekdaysShort:He,meridiemParse:/[ap]\.?m?\.?/i},tt={},nt={};function rt(e,t){var n,r=Math.min(e.length,t.length);for(n=0;n0;){if(r=ot(i.slice(0,t).join("-")))return r;if(n&&n.length>=t&&rt(i,n)>=t-1)break;t--}o++}return Je}(e)}function ut(e){var t,n=e._a;return n&&-2===A(e).overflow&&(t=n[1]<0||n[1]>11?1:n[2]<1||n[2]>we(n[0],n[1])?2:n[3]<0||n[3]>24||24===n[3]&&(0!==n[4]||0!==n[5]||0!==n[6])?3:n[4]<0||n[4]>59?4:n[5]<0||n[5]>59?5:n[6]<0||n[6]>999?6:-1,A(e)._overflowDayOfYear&&(t<0||t>2)&&(t=2),A(e)._overflowWeeks&&-1===t&&(t=7),A(e)._overflowWeekday&&-1===t&&(t=8),A(e).overflow=t),e}var ct=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,dt=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,ft=/Z|[+-]\d\d(?::?\d\d)?/,ht=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],pt=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],At=/^\/?Date\((-?\d+)/i,gt=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,mt={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function yt(e){var t,n,r,i,o,a,s=e._i,l=ct.exec(s)||dt.exec(s);if(l){for(A(e).iso=!0,t=0,n=ht.length;t7)&&(l=!0)):(o=e._locale._week.dow,a=e._locale._week.doy,u=Ne(Ot(),o,a),n=_t(t.gg,e._a[0],u.year),r=_t(t.w,u.week),null!=t.d?((i=t.d)<0||i>6)&&(l=!0):null!=t.e?(i=t.e+o,(t.e<0||t.e>6)&&(l=!0)):i=o),r<1||r>Be(n,o,a)?A(e)._overflowWeeks=!0:null!=l?A(e)._overflowWeekday=!0:(s=Fe(n,r,i,o,a),e._a[0]=s.year,e._dayOfYear=s.dayOfYear)}(e),null!=e._dayOfYear&&(a=_t(e._a[0],r[0]),(e._dayOfYear>Ie(a)||0===e._dayOfYear)&&(A(e)._overflowDayOfYear=!0),n=Re(a,0,e._dayOfYear),e._a[1]=n.getUTCMonth(),e._a[2]=n.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=s[t]=r[t];for(;t<7;t++)e._a[t]=s[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[3]&&0===e._a[4]&&0===e._a[5]&&0===e._a[6]&&(e._nextDay=!0,e._a[3]=0),e._d=(e._useUTC?Re:ke).apply(null,s),o=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[3]=24),e._w&&void 0!==e._w.d&&e._w.d!==o&&(A(e).weekdayMismatch=!0)}}function xt(e){if(e._f!==i.ISO_8601)if(e._f!==i.RFC_2822){e._a=[],A(e).empty=!0;var t,n,r,o,a,s,l=""+e._i,u=l.length,c=0;for(r=N(e._f,e._locale).match(I)||[],t=0;t0&&A(e).unusedInput.push(a),l=l.slice(l.indexOf(n)+n.length),c+=n.length),R[o]?(n?A(e).empty=!1:A(e).unusedTokens.push(o),_e(o,n,e)):e._strict&&!n&&A(e).unusedTokens.push(o);A(e).charsLeftOver=u-c,l.length>0&&A(e).unusedInput.push(l),e._a[3]<=12&&!0===A(e).bigHour&&e._a[3]>0&&(A(e).bigHour=void 0),A(e).parsedDateParts=e._a.slice(0),A(e).meridiem=e._meridiem,e._a[3]=function(e,t,n){var r;return null==n?t:null!=e.meridiemHour?e.meridiemHour(t,n):null!=e.isPM?((r=e.isPM(n))&&t<12&&(t+=12),r||12!==t||(t=0),t):t}(e._locale,e._a[3],e._meridiem),null!==(s=A(e).era)&&(e._a[0]=e._locale.erasConvertYear(s,e._a[0])),wt(e),ut(e)}else bt(e);else yt(e)}function Mt(e){var t=e._i,n=e._f;return e._locale=e._locale||lt(e._l),null===t||void 0===n&&""===t?m({nullInput:!0}):("string"==typeof t&&(e._i=t=e._locale.preparse(t)),w(t)?new _(ut(t)):(d(t)?e._d=t:o(n)?function(e){var t,n,r,i,o,a,s=!1;if(0===e._f.length)return A(e).invalidFormat=!0,void(e._d=new Date(NaN));for(i=0;ithis?this:e:m()}));function Ct(e,t){var n,r;if(1===t.length&&o(t[0])&&(t=t[0]),!t.length)return Ot();for(n=t[0],r=1;r=0?new Date(e+400,t,n)-126227808e5:new Date(e,t,n).valueOf()}function on(e,t,n){return e<100&&e>=0?Date.UTC(e+400,t,n)-126227808e5:Date.UTC(e,t,n)}function an(e,t){return t.erasAbbrRegex(e)}function sn(){var e,t,n=[],r=[],i=[],o=[],a=this.eras();for(e=0,t=a.length;e(o=Be(e,r,i))&&(t=o),cn.call(this,e,t,n,r,i))}function cn(e,t,n,r,i){var o=Fe(e,t,n,r,i),a=Re(o.year,0,o.dayOfYear);return this.year(a.getUTCFullYear()),this.month(a.getUTCMonth()),this.date(a.getUTCDate()),this}j("N",0,0,"eraAbbr"),j("NN",0,0,"eraAbbr"),j("NNN",0,0,"eraAbbr"),j("NNNN",0,0,"eraName"),j("NNNNN",0,0,"eraNarrow"),j("y",["y",1],"yo","eraYear"),j("y",["yy",2],0,"eraYear"),j("y",["yyy",3],0,"eraYear"),j("y",["yyyy",4],0,"eraYear"),pe("N",an),pe("NN",an),pe("NNN",an),pe("NNNN",(function(e,t){return t.erasNameRegex(e)})),pe("NNNNN",(function(e,t){return t.erasNarrowRegex(e)})),ve(["N","NN","NNN","NNNN","NNNNN"],(function(e,t,n,r){var i=n._locale.erasParse(e,r,n._strict);i?A(n).era=i:A(n).invalidEra=e})),pe("y",ue),pe("yy",ue),pe("yyy",ue),pe("yyyy",ue),pe("yo",(function(e,t){return t._eraYearOrdinalRegex||ue})),ve(["y","yy","yyy","yyyy"],0),ve(["yo"],(function(e,t,n,r){var i;n._locale._eraYearOrdinalRegex&&(i=e.match(n._locale._eraYearOrdinalRegex)),n._locale.eraYearOrdinalParse?t[0]=n._locale.eraYearOrdinalParse(e,i):t[0]=parseInt(e,10)})),j(0,["gg",2],0,(function(){return this.weekYear()%100})),j(0,["GG",2],0,(function(){return this.isoWeekYear()%100})),ln("gggg","weekYear"),ln("ggggg","weekYear"),ln("GGGG","isoWeekYear"),ln("GGGGG","isoWeekYear"),z("weekYear","gg"),z("isoWeekYear","GG"),G("weekYear",1),G("isoWeekYear",1),pe("G",ce),pe("g",ce),pe("GG",re,$),pe("gg",re,$),pe("GGGG",se,te),pe("gggg",se,te),pe("GGGGG",le,ne),pe("ggggg",le,ne),be(["gggg","ggggg","GGGG","GGGGG"],(function(e,t,n,r){t[r.substr(0,2)]=q(e)})),be(["gg","GG"],(function(e,t,n,r){t[r]=i.parseTwoDigitYear(e)})),j("Q",0,"Qo","quarter"),z("quarter","Q"),G("quarter",7),pe("Q",J),ve("Q",(function(e,t){t[1]=3*(q(e)-1)})),j("D",["DD",2],"Do","date"),z("date","D"),G("date",9),pe("D",re),pe("DD",re,$),pe("Do",(function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient})),ve(["D","DD"],2),ve("Do",(function(e,t){t[2]=q(e.match(re)[0])}));var dn=X("Date",!0);j("DDD",["DDDD",3],"DDDo","dayOfYear"),z("dayOfYear","DDD"),G("dayOfYear",4),pe("DDD",ae),pe("DDDD",ee),ve(["DDD","DDDD"],(function(e,t,n){n._dayOfYear=q(e)})),j("m",["mm",2],0,"minute"),z("minute","m"),G("minute",14),pe("m",re),pe("mm",re,$),ve(["m","mm"],4);var fn=X("Minutes",!1);j("s",["ss",2],0,"second"),z("second","s"),G("second",15),pe("s",re),pe("ss",re,$),ve(["s","ss"],5);var hn,pn,An=X("Seconds",!1);for(j("S",0,0,(function(){return~~(this.millisecond()/100)})),j(0,["SS",2],0,(function(){return~~(this.millisecond()/10)})),j(0,["SSS",3],0,"millisecond"),j(0,["SSSS",4],0,(function(){return 10*this.millisecond()})),j(0,["SSSSS",5],0,(function(){return 100*this.millisecond()})),j(0,["SSSSSS",6],0,(function(){return 1e3*this.millisecond()})),j(0,["SSSSSSS",7],0,(function(){return 1e4*this.millisecond()})),j(0,["SSSSSSSS",8],0,(function(){return 1e5*this.millisecond()})),j(0,["SSSSSSSSS",9],0,(function(){return 1e6*this.millisecond()})),z("millisecond","ms"),G("millisecond",16),pe("S",ae,J),pe("SS",ae,$),pe("SSS",ae,ee),hn="SSSS";hn.length<=9;hn+="S")pe(hn,ue);function gn(e,t){t[6]=q(1e3*("0."+e))}for(hn="S";hn.length<=9;hn+="S")ve(hn,gn);pn=X("Milliseconds",!1),j("z",0,0,"zoneAbbr"),j("zz",0,0,"zoneName");var mn=_.prototype;function yn(e){return e}mn.add=qt,mn.calendar=function(e,t){1===arguments.length&&(arguments[0]?Kt(arguments[0])?(e=arguments[0],t=void 0):Qt(arguments[0])&&(t=arguments[0],e=void 0):(e=void 0,t=void 0));var n=e||Ot(),r=Ft(n,this).startOf("day"),o=i.calendarFormat(this,r)||"sameElse",a=t&&(T(t[o])?t[o].call(this,n):t[o]);return this.format(a||this.localeData().calendar(o,this,Ot(n)))},mn.clone=function(){return new _(this)},mn.diff=function(e,t,n){var r,i,o;if(!this.isValid())return NaN;if(!(r=Ft(e,this)).isValid())return NaN;switch(i=6e4*(r.utcOffset()-this.utcOffset()),t=U(t)){case"year":o=Jt(this,r)/12;break;case"month":o=Jt(this,r);break;case"quarter":o=Jt(this,r)/3;break;case"second":o=(this-r)/1e3;break;case"minute":o=(this-r)/6e4;break;case"hour":o=(this-r)/36e5;break;case"day":o=(this-r-i)/864e5;break;case"week":o=(this-r-i)/6048e5;break;default:o=this-r}return n?o:W(o)},mn.endOf=function(e){var t,n;if(void 0===(e=U(e))||"millisecond"===e||!this.isValid())return this;switch(n=this._isUTC?on:rn,e){case"year":t=n(this.year()+1,0,1)-1;break;case"quarter":t=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=n(this.year(),this.month()+1,1)-1;break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=n(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=36e5-nn(t+(this._isUTC?0:6e4*this.utcOffset()),36e5)-1;break;case"minute":t=this._d.valueOf(),t+=6e4-nn(t,6e4)-1;break;case"second":t=this._d.valueOf(),t+=1e3-nn(t,1e3)-1}return this._d.setTime(t),i.updateOffset(this,!0),this},mn.format=function(e){e||(e=this.isUtc()?i.defaultFormatUtc:i.defaultFormat);var t=F(this,e);return this.localeData().postformat(t)},mn.from=function(e,t){return this.isValid()&&(w(e)&&e.isValid()||Ot(e).isValid())?Ht({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},mn.fromNow=function(e){return this.from(Ot(),e)},mn.to=function(e,t){return this.isValid()&&(w(e)&&e.isValid()||Ot(e).isValid())?Ht({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},mn.toNow=function(e){return this.to(Ot(),e)},mn.get=function(e){return T(this[e=U(e)])?this[e]():this},mn.invalidAt=function(){return A(this).overflow},mn.isAfter=function(e,t){var n=w(e)?e:Ot(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=U(t)||"millisecond")?this.valueOf()>n.valueOf():n.valueOf()9999?F(n,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):T(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",F(n,"Z")):F(n,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")},mn.inspect=function(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e,t,n,r="moment",i="";return this.isLocal()||(r=0===this.utcOffset()?"moment.utc":"moment.parseZone",i="Z"),e="["+r+'("]',t=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",n=i+'[")]',this.format(e+t+"-MM-DD[T]HH:mm:ss.SSS"+n)},"undefined"!=typeof Symbol&&null!=Symbol.for&&(mn[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),mn.toJSON=function(){return this.isValid()?this.toISOString():null},mn.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},mn.unix=function(){return Math.floor(this.valueOf()/1e3)},mn.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},mn.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},mn.eraName=function(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;ethis.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},mn.isLocal=function(){return!!this.isValid()&&!this._isUTC},mn.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},mn.isUtc=Bt,mn.isUTC=Bt,mn.zoneAbbr=function(){return this._isUTC?"UTC":""},mn.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},mn.dates=M("dates accessor is deprecated. Use date instead.",dn),mn.months=M("months accessor is deprecated. Use month instead",Le),mn.years=M("years accessor is deprecated. Use year instead",De),mn.zone=M("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",(function(e,t){return null!=e?("string"!=typeof e&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()})),mn.isDSTShifted=M("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",(function(){if(!u(this._isDSTShifted))return this._isDSTShifted;var e,t={};return b(t,this),(t=Mt(t))._a?(e=t._isUTC?p(t._a):Ot(t._a),this._isDSTShifted=this.isValid()&&function(e,t,n){var r,i=Math.min(e.length,t.length),o=Math.abs(e.length-t.length),a=0;for(r=0;r0):this._isDSTShifted=!1,this._isDSTShifted}));var vn=L.prototype;function bn(e,t,n,r){var i=lt(),o=p().set(r,t);return i[n](o,e)}function _n(e,t,n){if(c(e)&&(t=e,e=void 0),e=e||"",null!=t)return bn(e,t,n,"month");var r,i=[];for(r=0;r<12;r++)i[r]=bn(e,r,n,"month");return i}function wn(e,t,n,r){"boolean"==typeof e?(c(t)&&(n=t,t=void 0),t=t||""):(n=t=e,e=!1,c(t)&&(n=t,t=void 0),t=t||"");var i,o=lt(),a=e?o._week.dow:0,s=[];if(null!=n)return bn(t,(n+a)%7,r,"day");for(i=0;i<7;i++)s[i]=bn(t,(i+a)%7,r,"day");return s}vn.calendar=function(e,t,n){var r=this._calendar[e]||this._calendar.sameElse;return T(r)?r.call(t,n):r},vn.longDateFormat=function(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.match(I).map((function(e){return"MMMM"===e||"MM"===e||"DD"===e||"dddd"===e?e.slice(1):e})).join(""),this._longDateFormat[e])},vn.invalidDate=function(){return this._invalidDate},vn.ordinal=function(e){return this._ordinal.replace("%d",e)},vn.preparse=yn,vn.postformat=yn,vn.relativeTime=function(e,t,n,r){var i=this._relativeTime[n];return T(i)?i(e,t,n,r):i.replace(/%d/i,e)},vn.pastFuture=function(e,t){var n=this._relativeTime[e>0?"future":"past"];return T(n)?n(t):n.replace(/%s/i,t)},vn.set=function(e){var t,n;for(n in e)s(e,n)&&(T(t=e[n])?this[n]=t:this["_"+n]=t);this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)},vn.eras=function(e,t){var n,r,o,a=this._eras||lt("en")._eras;for(n=0,r=a.length;n=0)return l[r]},vn.erasConvertYear=function(e,t){var n=e.since<=e.until?1:-1;return void 0===t?i(e.since).year():i(e.since).year()+(t-e.offset)*n},vn.erasAbbrRegex=function(e){return s(this,"_erasAbbrRegex")||sn.call(this),e?this._erasAbbrRegex:this._erasRegex},vn.erasNameRegex=function(e){return s(this,"_erasNameRegex")||sn.call(this),e?this._erasNameRegex:this._erasRegex},vn.erasNarrowRegex=function(e){return s(this,"_erasNarrowRegex")||sn.call(this),e?this._erasNarrowRegex:this._erasRegex},vn.months=function(e,t){return e?o(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||Ee).test(t)?"format":"standalone"][e.month()]:o(this._months)?this._months:this._months.standalone},vn.monthsShort=function(e,t){return e?o(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[Ee.test(t)?"format":"standalone"][e.month()]:o(this._monthsShort)?this._monthsShort:this._monthsShort.standalone},vn.monthsParse=function(e,t,n){var r,i,o;if(this._monthsParseExact)return Te.call(this,e,t,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),r=0;r<12;r++){if(i=p([2e3,r]),n&&!this._longMonthsParse[r]&&(this._longMonthsParse[r]=new RegExp("^"+this.months(i,"").replace(".","")+"$","i"),this._shortMonthsParse[r]=new RegExp("^"+this.monthsShort(i,"").replace(".","")+"$","i")),n||this._monthsParse[r]||(o="^"+this.months(i,"")+"|^"+this.monthsShort(i,""),this._monthsParse[r]=new RegExp(o.replace(".",""),"i")),n&&"MMMM"===t&&this._longMonthsParse[r].test(e))return r;if(n&&"MMM"===t&&this._shortMonthsParse[r].test(e))return r;if(!n&&this._monthsParse[r].test(e))return r}},vn.monthsRegex=function(e){return this._monthsParseExact?(s(this,"_monthsRegex")||Pe.call(this),e?this._monthsStrictRegex:this._monthsRegex):(s(this,"_monthsRegex")||(this._monthsRegex=Se),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)},vn.monthsShortRegex=function(e){return this._monthsParseExact?(s(this,"_monthsRegex")||Pe.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(s(this,"_monthsShortRegex")||(this._monthsShortRegex=Oe),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)},vn.week=function(e){return Ne(e,this._week.dow,this._week.doy).week},vn.firstDayOfYear=function(){return this._week.doy},vn.firstDayOfWeek=function(){return this._week.dow},vn.weekdays=function(e,t){var n=o(this._weekdays)?this._weekdays:this._weekdays[e&&!0!==e&&this._weekdays.isFormat.test(t)?"format":"standalone"];return!0===e?ze(n,this._week.dow):e?n[e.day()]:n},vn.weekdaysMin=function(e){return!0===e?ze(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin},vn.weekdaysShort=function(e){return!0===e?ze(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort},vn.weekdaysParse=function(e,t,n){var r,i,o;if(this._weekdaysParseExact)return qe.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++){if(i=p([2e3,1]).day(r),n&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=new RegExp("^"+this.weekdays(i,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[r]=new RegExp("^"+this.weekdaysShort(i,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[r]=new RegExp("^"+this.weekdaysMin(i,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[r]||(o="^"+this.weekdays(i,"")+"|^"+this.weekdaysShort(i,"")+"|^"+this.weekdaysMin(i,""),this._weekdaysParse[r]=new RegExp(o.replace(".",""),"i")),n&&"dddd"===t&&this._fullWeekdaysParse[r].test(e))return r;if(n&&"ddd"===t&&this._shortWeekdaysParse[r].test(e))return r;if(n&&"dd"===t&&this._minWeekdaysParse[r].test(e))return r;if(!n&&this._weekdaysParse[r].test(e))return r}},vn.weekdaysRegex=function(e){return this._weekdaysParseExact?(s(this,"_weekdaysRegex")||Xe.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(s(this,"_weekdaysRegex")||(this._weekdaysRegex=Ge),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)},vn.weekdaysShortRegex=function(e){return this._weekdaysParseExact?(s(this,"_weekdaysRegex")||Xe.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(s(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=Ye),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)},vn.weekdaysMinRegex=function(e){return this._weekdaysParseExact?(s(this,"_weekdaysRegex")||Xe.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(s(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=We),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)},vn.isPM=function(e){return"p"===(e+"").toLowerCase().charAt(0)},vn.meridiem=function(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"},at("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10;return e+(1===q(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")}}),i.lang=M("moment.lang is deprecated. Use moment.locale instead.",at),i.langData=M("moment.langData is deprecated. Use moment.localeData instead.",lt);var xn=Math.abs;function Mn(e,t,n,r){var i=Ht(t,n);return e._milliseconds+=r*i._milliseconds,e._days+=r*i._days,e._months+=r*i._months,e._bubble()}function En(e){return e<0?Math.floor(e):Math.ceil(e)}function On(e){return 4800*e/146097}function Sn(e){return 146097*e/4800}function Tn(e){return function(){return this.as(e)}}var Cn=Tn("ms"),Ln=Tn("s"),Pn=Tn("m"),In=Tn("h"),Dn=Tn("d"),kn=Tn("w"),Rn=Tn("M"),jn=Tn("Q"),Fn=Tn("y");function Nn(e){return function(){return this.isValid()?this._data[e]:NaN}}var Bn=Nn("milliseconds"),zn=Nn("seconds"),Un=Nn("minutes"),Hn=Nn("hours"),Vn=Nn("days"),Gn=Nn("months"),Yn=Nn("years"),Wn=Math.round,qn={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function Xn(e,t,n,r,i){return i.relativeTime(t||1,!!n,e,r)}var Zn=Math.abs;function Kn(e){return(e>0)-(e<0)||+e}function Qn(){if(!this.isValid())return this.localeData().invalidDate();var e,t,n,r,i,o,a,s,l=Zn(this._milliseconds)/1e3,u=Zn(this._days),c=Zn(this._months),d=this.asSeconds();return d?(e=W(l/60),t=W(e/60),l%=60,e%=60,n=W(c/12),c%=12,r=l?l.toFixed(3).replace(/\.?0+$/,""):"",i=d<0?"-":"",o=Kn(this._months)!==Kn(d)?"-":"",a=Kn(this._days)!==Kn(d)?"-":"",s=Kn(this._milliseconds)!==Kn(d)?"-":"",i+"P"+(n?o+n+"Y":"")+(c?o+c+"M":"")+(u?a+u+"D":"")+(t||e||l?"T":"")+(t?s+t+"H":"")+(e?s+e+"M":"")+(l?s+r+"S":"")):"P0D"}var Jn=Pt.prototype;return Jn.isValid=function(){return this._isValid},Jn.abs=function(){var e=this._data;return this._milliseconds=xn(this._milliseconds),this._days=xn(this._days),this._months=xn(this._months),e.milliseconds=xn(e.milliseconds),e.seconds=xn(e.seconds),e.minutes=xn(e.minutes),e.hours=xn(e.hours),e.months=xn(e.months),e.years=xn(e.years),this},Jn.add=function(e,t){return Mn(this,e,t,1)},Jn.subtract=function(e,t){return Mn(this,e,t,-1)},Jn.as=function(e){if(!this.isValid())return NaN;var t,n,r=this._milliseconds;if("month"===(e=U(e))||"quarter"===e||"year"===e)switch(t=this._days+r/864e5,n=this._months+On(t),e){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(t=this._days+Math.round(Sn(this._months)),e){case"week":return t/7+r/6048e5;case"day":return t+r/864e5;case"hour":return 24*t+r/36e5;case"minute":return 1440*t+r/6e4;case"second":return 86400*t+r/1e3;case"millisecond":return Math.floor(864e5*t)+r;default:throw new Error("Unknown unit "+e)}},Jn.asMilliseconds=Cn,Jn.asSeconds=Ln,Jn.asMinutes=Pn,Jn.asHours=In,Jn.asDays=Dn,Jn.asWeeks=kn,Jn.asMonths=Rn,Jn.asQuarters=jn,Jn.asYears=Fn,Jn.valueOf=function(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*q(this._months/12):NaN},Jn._bubble=function(){var e,t,n,r,i,o=this._milliseconds,a=this._days,s=this._months,l=this._data;return o>=0&&a>=0&&s>=0||o<=0&&a<=0&&s<=0||(o+=864e5*En(Sn(s)+a),a=0,s=0),l.milliseconds=o%1e3,e=W(o/1e3),l.seconds=e%60,t=W(e/60),l.minutes=t%60,n=W(t/60),l.hours=n%24,a+=W(n/24),i=W(On(a)),s+=i,a-=En(Sn(i)),r=W(s/12),s%=12,l.days=a,l.months=s,l.years=r,this},Jn.clone=function(){return Ht(this)},Jn.get=function(e){return e=U(e),this.isValid()?this[e+"s"]():NaN},Jn.milliseconds=Bn,Jn.seconds=zn,Jn.minutes=Un,Jn.hours=Hn,Jn.days=Vn,Jn.weeks=function(){return W(this.days()/7)},Jn.months=Gn,Jn.years=Yn,Jn.humanize=function(e,t){if(!this.isValid())return this.localeData().invalidDate();var n,r,i=!1,o=qn;return"object"==typeof e&&(t=e,e=!1),"boolean"==typeof e&&(i=e),"object"==typeof t&&(o=Object.assign({},qn,t),null!=t.s&&null==t.ss&&(o.ss=t.s-1)),n=this.localeData(),r=function(e,t,n,r){var i=Ht(e).abs(),o=Wn(i.as("s")),a=Wn(i.as("m")),s=Wn(i.as("h")),l=Wn(i.as("d")),u=Wn(i.as("M")),c=Wn(i.as("w")),d=Wn(i.as("y")),f=o<=n.ss&&["s",o]||o0,f[4]=r,Xn.apply(null,f)}(this,!i,o,n),i&&(r=n.pastFuture(+this,r)),n.postformat(r)},Jn.toISOString=Qn,Jn.toString=Qn,Jn.toJSON=Qn,Jn.locale=$t,Jn.localeData=tn,Jn.toIsoString=M("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Qn),Jn.lang=en,j("X",0,0,"unix"),j("x",0,0,"valueOf"),pe("x",ce),pe("X",/[+-]?\d+(\.\d{1,3})?/),ve("X",(function(e,t,n){n._d=new Date(1e3*parseFloat(e))})),ve("x",(function(e,t,n){n._d=new Date(q(e))})), +//! moment.js +i.version="2.29.1",t=Ot,i.fn=mn,i.min=function(){var e=[].slice.call(arguments,0);return Ct("isBefore",e)},i.max=function(){var e=[].slice.call(arguments,0);return Ct("isAfter",e)},i.now=function(){return Date.now?Date.now():+new Date},i.utc=p,i.unix=function(e){return Ot(1e3*e)},i.months=function(e,t){return _n(e,t,"months")},i.isDate=d,i.locale=at,i.invalid=m,i.duration=Ht,i.isMoment=w,i.weekdays=function(e,t,n){return wn(e,t,n,"weekdays")},i.parseZone=function(){return Ot.apply(null,arguments).parseZone()},i.localeData=lt,i.isDuration=It,i.monthsShort=function(e,t){return _n(e,t,"monthsShort")},i.weekdaysMin=function(e,t,n){return wn(e,t,n,"weekdaysMin")},i.defineLocale=st,i.updateLocale=function(e,t){if(null!=t){var n,r,i=et;null!=tt[e]&&null!=tt[e].parentLocale?tt[e].set(C(tt[e]._config,t)):(null!=(r=ot(e))&&(i=r._config),t=C(i,t),null==r&&(t.abbr=e),(n=new L(t)).parentLocale=tt[e],tt[e]=n),at(e)}else null!=tt[e]&&(null!=tt[e].parentLocale?(tt[e]=tt[e].parentLocale,e===at()&&at(e)):null!=tt[e]&&delete tt[e]);return tt[e]},i.locales=function(){return E(tt)},i.weekdaysShort=function(e,t,n){return wn(e,t,n,"weekdaysShort")},i.normalizeUnits=U,i.relativeTimeRounding=function(e){return void 0===e?Wn:"function"==typeof e&&(Wn=e,!0)},i.relativeTimeThreshold=function(e,t){return void 0!==qn[e]&&(void 0===t?qn[e]:(qn[e]=t,"s"===e&&(qn.ss=t-1),!0))},i.calendarFormat=function(e,t){var n=e.diff(t,"days",!0);return n<-6?"sameElse":n<-1?"lastWeek":n<0?"lastDay":n<1?"sameDay":n<2?"nextDay":n<7?"nextWeek":"sameElse"},i.prototype=mn,i.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},i}()}).call(this,n(219)(e))},function(e,t,n){(function(n){var r,i,o,a,s,l,u,c,d,f,h,p,A,g,m,y,v,b,_,w,x,M,E,O,S,T,C,L,P,I,D,k;!function(R){var j="object"==typeof n?n:"object"==typeof self?self:"object"==typeof this?this:{};function F(e,t){return e!==j&&("function"==typeof Object.create?Object.defineProperty(e,"__esModule",{value:!0}):e.__esModule=!0),function(n,r){return e[n]=t?t(n,r):r}}void 0===(r=function(e){!function(e){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])};i=function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)},o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},l=function(e,t){return function(n,r){t(n,r,e)}},u=function(e,t,n,r,i,o){function a(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var s,l=r.kind,u="getter"===l?"get":"setter"===l?"set":"value",c=!t&&e?r.static?e:e.prototype:null,d=t||(c?Object.getOwnPropertyDescriptor(c,r.name):{}),f=!1,h=n.length-1;h>=0;h--){var p={};for(var A in r)p[A]="access"===A?{}:r[A];for(var A in r.access)p.access[A]=r.access[A];p.addInitializer=function(e){if(f)throw new TypeError("Cannot add initializers after decoration has completed");o.push(a(e||null))};var g=(0,n[h])("accessor"===l?{get:d.get,set:d.set}:d[u],p);if("accessor"===l){if(void 0===g)continue;if(null===g||"object"!=typeof g)throw new TypeError("Object expected");(s=a(g.get))&&(d.get=s),(s=a(g.set))&&(d.set=s),(s=a(g.init))&&i.unshift(s)}else(s=a(g))&&("field"===l?i.unshift(s):d[u]=s)}c&&Object.defineProperty(c,r.name,d),f=!0},c=function(e,t,n){for(var r=arguments.length>2,i=0;i0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},y=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},v=function(){for(var e=[],t=0;t1||s(e,t)}))})}function s(e,t){try{(n=i[e](t)).value instanceof w?Promise.resolve(n.value.v).then(l,u):c(o[0][2],n)}catch(e){c(o[0][3],e)}var n}function l(e){s("next",e)}function u(e){s("throw",e)}function c(e,t){e(t),o.shift(),o.length&&s(o[0][0],o[0][1])}},M=function(e){var t,n;return t={},r("next"),r("throw",(function(e){throw e})),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,i){t[r]=e[r]?function(t){return(n=!n)?{value:w(e[r](t)),done:!1}:i?i(t):t}:i}},E=function(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=m(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,i){(function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)})(r,i,(t=e[n](t)).done,t.value)}))}}},O=function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e};var n=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t};S=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&I(t,e,r);return n(t,e),t},T=function(e){return e&&e.__esModule?e:{default:e}},C=function(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)},L=function(e,t,n,r,i){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?i.call(e,n):i?i.value=n:t.set(e,n),n},P=function(e,t){if(null===t||"object"!=typeof t&&"function"!=typeof t)throw new TypeError("Cannot use 'in' operator on non-object");return"function"==typeof e?t===e:e.has(t)},D=function(e,t,n){if(null!=t){if("object"!=typeof t&&"function"!=typeof t)throw new TypeError("Object expected.");var r;if(n){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");r=t[Symbol.asyncDispose]}if(void 0===r){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");r=t[Symbol.dispose]}if("function"!=typeof r)throw new TypeError("Object not disposable.");e.stack.push({value:t,dispose:r,async:n})}else n&&e.stack.push({async:!0});return t};var r="function"==typeof SuppressedError?SuppressedError:function(e,t,n){var r=new Error(n);return r.name="SuppressedError",r.error=e,r.suppressed=t,r};k=function(e){function t(t){e.error=e.hasError?new r(t,e.error,"An error was suppressed during disposal."):t,e.hasError=!0}return function n(){for(;e.stack.length;){var r=e.stack.pop();try{var i=r.dispose&&r.dispose.call(r.value);if(r.async)return Promise.resolve(i).then(n,(function(e){return t(e),n()}))}catch(e){t(e)}}if(e.hasError)throw e.error}()},e("__extends",i),e("__assign",o),e("__rest",a),e("__decorate",s),e("__param",l),e("__esDecorate",u),e("__runInitializers",c),e("__propKey",d),e("__setFunctionName",f),e("__metadata",h),e("__awaiter",p),e("__generator",A),e("__exportStar",g),e("__createBinding",I),e("__values",m),e("__read",y),e("__spread",v),e("__spreadArrays",b),e("__spreadArray",_),e("__await",w),e("__asyncGenerator",x),e("__asyncDelegator",M),e("__asyncValues",E),e("__makeTemplateObject",O),e("__importStar",S),e("__importDefault",T),e("__classPrivateFieldGet",C),e("__classPrivateFieldSet",L),e("__classPrivateFieldIn",P),e("__addDisposableResource",D),e("__disposeResources",k)}(F(j,F(e)))}.apply(t,[t]))||(e.exports=r)}()}).call(this,n(68))},function(e,t,n){"use strict";var r=n(3);Object.defineProperty(t,"__esModule",{value:!0});var i={KeyEvent:!0};Object.defineProperty(t,"KeyEvent",{enumerable:!0,get:function(){return c.default}});var o=n(1227);Object.keys(o).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===o[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return o[e]}}))}));var a=n(708);Object.keys(a).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===a[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return a[e]}}))}));var s=n(709);Object.keys(s).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===s[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return s[e]}}))}));var l=n(710);Object.keys(l).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===l[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return l[e]}}))}));var u=n(1229);Object.keys(u).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===u[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return u[e]}}))}));var c=r(n(1230)),d=n(711);Object.keys(d).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===d[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return d[e]}}))}));var f=n(1231);Object.keys(f).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===f[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return f[e]}}))}));var h=n(1232);Object.keys(h).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===h[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return h[e]}}))}));var p=n(1233);Object.keys(p).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===p[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return p[e]}}))}))},function(e,t,n){"use strict";n.r(t),n.d(t,"CSS",(function(){return C})),n.d(t,"add",(function(){return x})),n.d(t,"canUseDOM",(function(){return o})),n.d(t,"findFirstFocusableNode",(function(){return P})),n.d(t,"getEventCoordinates",(function(){return T})),n.d(t,"getOwnerDocument",(function(){return f})),n.d(t,"getWindow",(function(){return l})),n.d(t,"hasViewportRelativeCoordinates",(function(){return E})),n.d(t,"isDocument",(function(){return u})),n.d(t,"isHTMLElement",(function(){return c})),n.d(t,"isKeyboardEvent",(function(){return O})),n.d(t,"isNode",(function(){return s})),n.d(t,"isSVGElement",(function(){return d})),n.d(t,"isTouchEvent",(function(){return S})),n.d(t,"isWindow",(function(){return a})),n.d(t,"subtract",(function(){return M})),n.d(t,"useCombinedRefs",(function(){return i})),n.d(t,"useEvent",(function(){return p})),n.d(t,"useInterval",(function(){return A})),n.d(t,"useIsomorphicLayoutEffect",(function(){return h})),n.d(t,"useLatestValue",(function(){return g})),n.d(t,"useLazyMemo",(function(){return m})),n.d(t,"useNodeRef",(function(){return y})),n.d(t,"usePrevious",(function(){return v})),n.d(t,"useUniqueId",(function(){return _}));var r=n(0);function i(){for(var e=arguments.length,t=new Array(e),n=0;ne=>{t.forEach(t=>t(e))},t)}const o="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement;function a(e){const t=Object.prototype.toString.call(e);return"[object Window]"===t||"[object global]"===t}function s(e){return"nodeType"in e}function l(e){var t,n;return e?a(e)?e:s(e)&&null!=(t=null==(n=e.ownerDocument)?void 0:n.defaultView)?t:window:window}function u(e){const{Document:t}=l(e);return e instanceof t}function c(e){return!a(e)&&e instanceof l(e).HTMLElement}function d(e){return e instanceof l(e).SVGElement}function f(e){return e?a(e)?e.document:s(e)?u(e)?e:c(e)?e.ownerDocument:document:document:document}const h=o?r.useLayoutEffect:r.useEffect;function p(e){const t=Object(r.useRef)(e);return h(()=>{t.current=e}),Object(r.useCallback)((function(){for(var e=arguments.length,n=new Array(e),r=0;r{e.current=setInterval(t,n)},[]),Object(r.useCallback)(()=>{null!==e.current&&(clearInterval(e.current),e.current=null)},[])]}function g(e,t){void 0===t&&(t=[e]);const n=Object(r.useRef)(e);return h(()=>{n.current!==e&&(n.current=e)},t),n}function m(e,t){const n=Object(r.useRef)();return Object(r.useMemo)(()=>{const t=e(n.current);return n.current=t,t},[...t])}function y(e){const t=p(e),n=Object(r.useRef)(null),i=Object(r.useCallback)(e=>{e!==n.current&&(null==t||t(e,n.current)),n.current=e},[]);return[n,i]}function v(e){const t=Object(r.useRef)();return Object(r.useEffect)(()=>{t.current=e},[e]),t.current}let b={};function _(e,t){return Object(r.useMemo)(()=>{if(t)return t;const n=null==b[e]?0:b[e]+1;return b[e]=n,e+"-"+n},[e,t])}function w(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i{const r=Object.entries(n);for(const[n,i]of r){const r=t[n];null!=r&&(t[n]=r+e*i)}return t},{...t})}}const x=w(1),M=w(-1);function E(e){return"clientX"in e&&"clientY"in e}function O(e){if(!e)return!1;const{KeyboardEvent:t}=l(e.target);return t&&e instanceof t}function S(e){if(!e)return!1;const{TouchEvent:t}=l(e.target);return t&&e instanceof t}function T(e){if(S(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return E(e)?{x:e.clientX,y:e.clientY}:null}const C=Object.freeze({Translate:{toString(e){if(!e)return;const{x:t,y:n}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:t,scaleY:n}=e;return"scaleX("+t+") scaleY("+n+")"}},Transform:{toString(e){if(e)return[C.Translate.toString(e),C.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:r}=e;return t+" "+n+"ms "+r}}}),L="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function P(e){return e.matches(L)?e:e.querySelector(L)}},function(e,t,n){"use strict";var r=n(6),i=n(3);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=i(n(33)),a=i(n(72)),s=i(n(7)),l=i(n(8)),u=i(n(10)),c=i(n(11)),d=i(n(9)),f=i(n(4)),h=r(n(0));function p(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=(0,d.default)(e);if(t){var i=(0,d.default)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return(0,c.default)(this,n)}}var A=function(){},g=function(e){(0,u.default)(n,e);var t=p(n);function n(){return(0,s.default)(this,n),t.apply(this,arguments)}return(0,l.default)(n,[{key:"render",value:function(){var e=this.props,t=e.height,n=e.width,r=e.viewBox,i=e.style,s=e.children,l=e.predefinedClassName,u=e.className,c=e.colors,d=e.totalColor,f=(0,a.default)(e,["height","width","viewBox","style","children","predefinedClassName","className","colors","totalColor"]),p=t,g=n||p,m=Array.isArray(c)&&d&&function(e,t){return new Array(e).fill(1).reduce((function(e,n,r){return"".concat(e,".cr").concat(r+1," {fill:").concat(t[r%t.length],";}")}),"")}(d,c);return h.default.createElement("svg",(0,o.default)({viewBox:r,width:g,height:p,style:i,className:"".concat(l," ").concat(u),onClick:A},f),m?h.default.createElement("style",{type:"text/css"},m):null,s)}}]),n}(h.Component);t.default=g,(0,f.default)(g,"displayName","Base Icon"),(0,f.default)(g,"defaultProps",{height:null,width:null,viewBox:"0 0 64 64",predefinedClassName:"",className:"",style:{fill:"currentColor"}})},function(e,t,n){"use strict";var r=n(6),i=n(3);Object.defineProperty(t,"__esModule",{value:!0});var o={hexToRgb:!0,isHexColor:!0,rgbToHex:!0,getColorGroupByName:!0,reverseColorRange:!0,createLinearGradient:!0,colorMaybeToRGB:!0,isRgbColor:!0,normalizeColor:!0,errorNotification:!0,createNotification:!0,exportImageError:!0,successNotification:!0,setStyleSheetBaseHref:!0,domtoimage:!0,getFrequency:!0,getMode:!0,aggregate:!0,getTimelineFromAnimationConfig:!0,getTimelineFromFilter:!0,SAMPLE_TIMELINE:!0,TIMELINE_MODES:!0,datasetColorMaker:!0,findDefaultColorField:!0,ACCEPTED_ANALYZER_TYPES:!0,validateInputData:!0,getSampleForTypeAnalyze:!0,getFieldsFromData:!0,renameDuplicateFields:!0,analyzerTypeToFieldType:!0,getFormatLabels:!0,getFieldFormatLabels:!0,getFormatValue:!0,exportMapToHTML:!0,DEFAULT_IMAGE_NAME:!0,DEFAULT_HTML_NAME:!0,DEFAULT_JSON_NAME:!0,DEFAULT_DATA_NAME:!0,DEFAULT_EXPORT_JSON_SETTINGS:!0,isMSEdge:!0,getScaleFromImageSize:!0,calculateExportImageSize:!0,convertToPng:!0,dataURItoBlob:!0,downloadFile:!0,exportImage:!0,exportToJsonString:!0,getMapJSON:!0,exportJson:!0,exportHtml:!0,exportMap:!0,exporters:!0,setLayerBlending:!0,flattenMessages:!0,mergeMessages:!0,validateToken:!0,getDefaultLayerGroupVisibility:!0,editTopMapStyle:!0,editBottomMapStyle:!0,isValidStyleUrl:!0,getStyleDownloadUrl:!0,getStyleImageIcon:!0,scaleMapStyleByResolution:!0,mergeLayerGroupVisibility:!0,isValidMapInfo:!0,snapToMarks:!0,computeDeckEffects:!0,fixEffectOrder:!0,reorderEffectOrder:!0,validateEffectParameters:!0,transformRequest:!0,isStyleUsingMapboxTiles:!0,createDataContainer:!0,createIndexedDataContainer:!0,getSampleContainerData:!0,DataForm:!0,ArrowDataContainer:!0,arrowDataTypeToFieldType:!0,arrowDataTypeToAnalyzerDataType:!0,getQuantileDomain:!0,getOrdinalDomain:!0,getLinearDomain:!0,getLogDomain:!0,DataRow:!0,getCentroid:!0,idToPolygonGeo:!0,h3IsValid:!0,getHexFields:!0};Object.defineProperty(t,"hexToRgb",{enumerable:!0,get:function(){return a.hexToRgb}}),Object.defineProperty(t,"isHexColor",{enumerable:!0,get:function(){return a.isHexColor}}),Object.defineProperty(t,"rgbToHex",{enumerable:!0,get:function(){return a.rgbToHex}}),Object.defineProperty(t,"getColorGroupByName",{enumerable:!0,get:function(){return a.getColorGroupByName}}),Object.defineProperty(t,"reverseColorRange",{enumerable:!0,get:function(){return a.reverseColorRange}}),Object.defineProperty(t,"createLinearGradient",{enumerable:!0,get:function(){return a.createLinearGradient}}),Object.defineProperty(t,"colorMaybeToRGB",{enumerable:!0,get:function(){return a.colorMaybeToRGB}}),Object.defineProperty(t,"isRgbColor",{enumerable:!0,get:function(){return a.isRgbColor}}),Object.defineProperty(t,"normalizeColor",{enumerable:!0,get:function(){return a.normalizeColor}}),Object.defineProperty(t,"errorNotification",{enumerable:!0,get:function(){return s.errorNotification}}),Object.defineProperty(t,"createNotification",{enumerable:!0,get:function(){return s.createNotification}}),Object.defineProperty(t,"exportImageError",{enumerable:!0,get:function(){return s.exportImageError}}),Object.defineProperty(t,"successNotification",{enumerable:!0,get:function(){return s.successNotification}}),Object.defineProperty(t,"setStyleSheetBaseHref",{enumerable:!0,get:function(){return l.setStyleSheetBaseHref}}),Object.defineProperty(t,"domtoimage",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(t,"getFrequency",{enumerable:!0,get:function(){return c.getFrequency}}),Object.defineProperty(t,"getMode",{enumerable:!0,get:function(){return c.getMode}}),Object.defineProperty(t,"aggregate",{enumerable:!0,get:function(){return c.aggregate}}),Object.defineProperty(t,"getTimelineFromAnimationConfig",{enumerable:!0,get:function(){return f.getTimelineFromAnimationConfig}}),Object.defineProperty(t,"getTimelineFromFilter",{enumerable:!0,get:function(){return f.getTimelineFromFilter}}),Object.defineProperty(t,"SAMPLE_TIMELINE",{enumerable:!0,get:function(){return f.SAMPLE_TIMELINE}}),Object.defineProperty(t,"TIMELINE_MODES",{enumerable:!0,get:function(){return f.TIMELINE_MODES}}),Object.defineProperty(t,"datasetColorMaker",{enumerable:!0,get:function(){return h.datasetColorMaker}}),Object.defineProperty(t,"findDefaultColorField",{enumerable:!0,get:function(){return h.findDefaultColorField}}),Object.defineProperty(t,"ACCEPTED_ANALYZER_TYPES",{enumerable:!0,get:function(){return h.ACCEPTED_ANALYZER_TYPES}}),Object.defineProperty(t,"validateInputData",{enumerable:!0,get:function(){return h.validateInputData}}),Object.defineProperty(t,"getSampleForTypeAnalyze",{enumerable:!0,get:function(){return h.getSampleForTypeAnalyze}}),Object.defineProperty(t,"getFieldsFromData",{enumerable:!0,get:function(){return h.getFieldsFromData}}),Object.defineProperty(t,"renameDuplicateFields",{enumerable:!0,get:function(){return h.renameDuplicateFields}}),Object.defineProperty(t,"analyzerTypeToFieldType",{enumerable:!0,get:function(){return h.analyzerTypeToFieldType}}),Object.defineProperty(t,"getFormatLabels",{enumerable:!0,get:function(){return h.getFormatLabels}}),Object.defineProperty(t,"getFieldFormatLabels",{enumerable:!0,get:function(){return h.getFieldFormatLabels}}),Object.defineProperty(t,"getFormatValue",{enumerable:!0,get:function(){return p.getFormatValue}}),Object.defineProperty(t,"exportMapToHTML",{enumerable:!0,get:function(){return A.exportMapToHTML}}),Object.defineProperty(t,"DEFAULT_IMAGE_NAME",{enumerable:!0,get:function(){return g.DEFAULT_IMAGE_NAME}}),Object.defineProperty(t,"DEFAULT_HTML_NAME",{enumerable:!0,get:function(){return g.DEFAULT_HTML_NAME}}),Object.defineProperty(t,"DEFAULT_JSON_NAME",{enumerable:!0,get:function(){return g.DEFAULT_JSON_NAME}}),Object.defineProperty(t,"DEFAULT_DATA_NAME",{enumerable:!0,get:function(){return g.DEFAULT_DATA_NAME}}),Object.defineProperty(t,"DEFAULT_EXPORT_JSON_SETTINGS",{enumerable:!0,get:function(){return g.DEFAULT_EXPORT_JSON_SETTINGS}}),Object.defineProperty(t,"isMSEdge",{enumerable:!0,get:function(){return g.isMSEdge}}),Object.defineProperty(t,"getScaleFromImageSize",{enumerable:!0,get:function(){return g.getScaleFromImageSize}}),Object.defineProperty(t,"calculateExportImageSize",{enumerable:!0,get:function(){return g.calculateExportImageSize}}),Object.defineProperty(t,"convertToPng",{enumerable:!0,get:function(){return g.convertToPng}}),Object.defineProperty(t,"dataURItoBlob",{enumerable:!0,get:function(){return g.dataURItoBlob}}),Object.defineProperty(t,"downloadFile",{enumerable:!0,get:function(){return g.downloadFile}}),Object.defineProperty(t,"exportImage",{enumerable:!0,get:function(){return g.exportImage}}),Object.defineProperty(t,"exportToJsonString",{enumerable:!0,get:function(){return g.exportToJsonString}}),Object.defineProperty(t,"getMapJSON",{enumerable:!0,get:function(){return g.getMapJSON}}),Object.defineProperty(t,"exportJson",{enumerable:!0,get:function(){return g.exportJson}}),Object.defineProperty(t,"exportHtml",{enumerable:!0,get:function(){return g.exportHtml}}),Object.defineProperty(t,"exportMap",{enumerable:!0,get:function(){return g.exportMap}}),Object.defineProperty(t,"exporters",{enumerable:!0,get:function(){return g.default}}),Object.defineProperty(t,"setLayerBlending",{enumerable:!0,get:function(){return m.setLayerBlending}}),Object.defineProperty(t,"flattenMessages",{enumerable:!0,get:function(){return y.flattenMessages}}),Object.defineProperty(t,"mergeMessages",{enumerable:!0,get:function(){return y.mergeMessages}}),Object.defineProperty(t,"validateToken",{enumerable:!0,get:function(){return _.validateToken}}),Object.defineProperty(t,"getDefaultLayerGroupVisibility",{enumerable:!0,get:function(){return w.getDefaultLayerGroupVisibility}}),Object.defineProperty(t,"editTopMapStyle",{enumerable:!0,get:function(){return w.editTopMapStyle}}),Object.defineProperty(t,"editBottomMapStyle",{enumerable:!0,get:function(){return w.editBottomMapStyle}}),Object.defineProperty(t,"isValidStyleUrl",{enumerable:!0,get:function(){return w.isValidStyleUrl}}),Object.defineProperty(t,"getStyleDownloadUrl",{enumerable:!0,get:function(){return w.getStyleDownloadUrl}}),Object.defineProperty(t,"getStyleImageIcon",{enumerable:!0,get:function(){return w.getStyleImageIcon}}),Object.defineProperty(t,"scaleMapStyleByResolution",{enumerable:!0,get:function(){return w.scaleMapStyleByResolution}}),Object.defineProperty(t,"mergeLayerGroupVisibility",{enumerable:!0,get:function(){return w.mergeLayerGroupVisibility}}),Object.defineProperty(t,"isValidMapInfo",{enumerable:!0,get:function(){return x.isValidMapInfo}}),Object.defineProperty(t,"snapToMarks",{enumerable:!0,get:function(){return O.snapToMarks}}),Object.defineProperty(t,"computeDeckEffects",{enumerable:!0,get:function(){return S.computeDeckEffects}}),Object.defineProperty(t,"fixEffectOrder",{enumerable:!0,get:function(){return S.fixEffectOrder}}),Object.defineProperty(t,"reorderEffectOrder",{enumerable:!0,get:function(){return S.reorderEffectOrder}}),Object.defineProperty(t,"validateEffectParameters",{enumerable:!0,get:function(){return S.validateEffectParameters}}),Object.defineProperty(t,"transformRequest",{enumerable:!0,get:function(){return T.transformRequest}}),Object.defineProperty(t,"isStyleUsingMapboxTiles",{enumerable:!0,get:function(){return T.isStyleUsingMapboxTiles}}),Object.defineProperty(t,"createDataContainer",{enumerable:!0,get:function(){return L.createDataContainer}}),Object.defineProperty(t,"createIndexedDataContainer",{enumerable:!0,get:function(){return L.createIndexedDataContainer}}),Object.defineProperty(t,"getSampleContainerData",{enumerable:!0,get:function(){return L.getSampleData}}),Object.defineProperty(t,"DataForm",{enumerable:!0,get:function(){return L.DataForm}}),Object.defineProperty(t,"ArrowDataContainer",{enumerable:!0,get:function(){return P.ArrowDataContainer}}),Object.defineProperty(t,"arrowDataTypeToFieldType",{enumerable:!0,get:function(){return P.arrowDataTypeToFieldType}}),Object.defineProperty(t,"arrowDataTypeToAnalyzerDataType",{enumerable:!0,get:function(){return P.arrowDataTypeToAnalyzerDataType}}),Object.defineProperty(t,"getQuantileDomain",{enumerable:!0,get:function(){return D.getQuantileDomain}}),Object.defineProperty(t,"getOrdinalDomain",{enumerable:!0,get:function(){return D.getOrdinalDomain}}),Object.defineProperty(t,"getLinearDomain",{enumerable:!0,get:function(){return D.getLinearDomain}}),Object.defineProperty(t,"getLogDomain",{enumerable:!0,get:function(){return D.getLogDomain}}),Object.defineProperty(t,"DataRow",{enumerable:!0,get:function(){return k.DataRow}}),Object.defineProperty(t,"getCentroid",{enumerable:!0,get:function(){return R.getCentroid}}),Object.defineProperty(t,"idToPolygonGeo",{enumerable:!0,get:function(){return R.idToPolygonGeo}}),Object.defineProperty(t,"h3IsValid",{enumerable:!0,get:function(){return R.h3IsValid}}),Object.defineProperty(t,"getHexFields",{enumerable:!0,get:function(){return R.getHexFields}});var a=n(713),s=n(1234),l=n(714),u=i(n(715)),c=n(1238),d=n(334);Object.keys(d).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(o,e)||e in t&&t[e]===d[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return d[e]}}))}));var f=n(1246),h=n(1247),p=n(855),A=n(856),g=r(n(1249)),m=n(1250),y=n(1251),v=n(1252);Object.keys(v).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(o,e)||e in t&&t[e]===v[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return v[e]}}))}));var b=n(1254);Object.keys(b).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(o,e)||e in t&&t[e]===b[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return b[e]}}))}));var _=n(1256),w=n(1257),x=n(1258),M=n(220);Object.keys(M).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(o,e)||e in t&&t[e]===M[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return M[e]}}))}));var E=n(1259);Object.keys(E).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(o,e)||e in t&&t[e]===E[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return E[e]}}))}));var O=n(854),S=n(1260),T=n(1261),C=n(1262);Object.keys(C).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(o,e)||e in t&&t[e]===C[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return C[e]}}))}));var L=n(1263),P=n(861),I=n(1266);Object.keys(I).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(o,e)||e in t&&t[e]===I[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return I[e]}}))}));var D=n(862),k=n(445),R=n(864)},function(e,t,n){"use strict";n.r(t),n.d(t,"VERSION",(function(){return r.a})),n.d(t,"COORDINATE_SYSTEM",(function(){return i.a})),n.d(t,"OPERATION",(function(){return i.c})),n.d(t,"UNIT",(function(){return i.e})),n.d(t,"LightingEffect",(function(){return o.a})),n.d(t,"AmbientLight",(function(){return a.a})),n.d(t,"DirectionalLight",(function(){return s.a})),n.d(t,"PointLight",(function(){return A})),n.d(t,"_CameraLight",(function(){return m})),n.d(t,"_SunLight",(function(){return O})),n.d(t,"PostProcessEffect",(function(){return D})),n.d(t,"_LayersPass",(function(){return R.a})),n.d(t,"_PickLayersPass",(function(){return j.a})),n.d(t,"Deck",(function(){return F.a})),n.d(t,"LayerManager",(function(){return N.a})),n.d(t,"AttributeManager",(function(){return B.a})),n.d(t,"Layer",(function(){return z.a})),n.d(t,"CompositeLayer",(function(){return U.a})),n.d(t,"DeckRenderer",(function(){return H.a})),n.d(t,"Viewport",(function(){return V.a})),n.d(t,"WebMercatorViewport",(function(){return G.a})),n.d(t,"_GlobeViewport",(function(){return Y.a})),n.d(t,"OrbitViewport",(function(){return K})),n.d(t,"OrthographicViewport",(function(){return Q.a})),n.d(t,"FirstPersonViewport",(function(){return ne})),n.d(t,"picking",(function(){return re.a})),n.d(t,"project",(function(){return ie.a})),n.d(t,"project32",(function(){return oe.a})),n.d(t,"gouraudLighting",(function(){return ae.a})),n.d(t,"phongLighting",(function(){return ae.b})),n.d(t,"shadow",(function(){return se.a})),n.d(t,"View",(function(){return le.a})),n.d(t,"MapView",(function(){return ue.a})),n.d(t,"FirstPersonView",(function(){return ge})),n.d(t,"OrbitView",(function(){return ve})),n.d(t,"OrthographicView",(function(){return we})),n.d(t,"_GlobeView",(function(){return Oe})),n.d(t,"Controller",(function(){return ce.a})),n.d(t,"MapController",(function(){return xe.b})),n.d(t,"_GlobeController",(function(){return Ee})),n.d(t,"FirstPersonController",(function(){return Ae})),n.d(t,"OrbitController",(function(){return ye})),n.d(t,"OrthographicController",(function(){return _e})),n.d(t,"LayerExtension",(function(){return Se.a})),n.d(t,"TRANSITION_EVENTS",(function(){return Te.a})),n.d(t,"TransitionInterpolator",(function(){return Ce.a})),n.d(t,"LinearInterpolator",(function(){return he.a})),n.d(t,"FlyToInterpolator",(function(){return Ie})),n.d(t,"log",(function(){return De.a})),n.d(t,"assert",(function(){return ke.a})),n.d(t,"createIterable",(function(){return Re.a})),n.d(t,"fp64LowPart",(function(){return fe.b})),n.d(t,"Tesselator",(function(){return je.a})),n.d(t,"_fillArray",(function(){return Fe.a})),n.d(t,"_flatten",(function(){return Fe.b})),n.d(t,"_count",(function(){return Ne.a})),n.d(t,"_deepEqual",(function(){return Be.a})),n.d(t,"_memoize",(function(){return ze.a})),n.d(t,"_mergeShaders",(function(){return Ue.a})),n.d(t,"_compareProps",(function(){return He.a}));var r=n(529),i=n(39),o=n(425),a=n(503),s=n(307),l=n(1),u=n(432);const c=[255,255,255],d=1,f=[0,0,1],h=[0,0,1];let p=0;class A{constructor(e={}){Object(l.a)(this,"id",void 0),Object(l.a)(this,"color",void 0),Object(l.a)(this,"intensity",void 0),Object(l.a)(this,"type","point"),Object(l.a)(this,"position",void 0),Object(l.a)(this,"attenuation",void 0),Object(l.a)(this,"projectedLight",void 0);const{color:t=c}=e,{intensity:n=d}=e,{position:r=h}=e;this.id=e.id||"point-".concat(p++),this.color=t,this.intensity=n,this.type="point",this.position=r,this.attenuation=function(e){if(e.attenuation)return e.attenuation;if("intensity"in e)return[0,0,e.intensity||0];return f}(e),this.projectedLight={...this}}getProjectedLight({layer:e}){const{projectedLight:t}=this,n=e.context.viewport,{coordinateSystem:r,coordinateOrigin:o}=e.props,a=Object(u.b)(this.position,{viewport:n,coordinateSystem:r,coordinateOrigin:o,fromCoordinateSystem:n.isGeospatial?i.a.LNGLAT:i.a.CARTESIAN,fromCoordinateOrigin:[0,0,0]});return t.color=this.color,t.intensity=this.intensity,t.position=a,t}}var g=n(369);class m extends A{getProjectedLight({layer:e}){const{projectedLight:t}=this,n=e.context.viewport,{coordinateSystem:r,coordinateOrigin:i,modelMatrix:o}=e.props,{project_uCameraPosition:a}=Object(g.b)({viewport:n,modelMatrix:o,coordinateSystem:r,coordinateOrigin:i});return t.color=this.color,t.intensity=this.intensity,t.position=a,t}}const y=Math.PI/180,v=23.4397*y;function b(e,t,n){const r=y*-n,i=y*t,o=function(e){return function(e){return("number"==typeof e?e:e.getTime())/864e5-.5+2440588}(e)-2451545}(e),a=function(e){const t=function(e){const t=e,n=y*(1.9148*Math.sin(t)+.02*Math.sin(2*t)+3e-4*Math.sin(3*t));return t+n+102.9372*y+Math.PI}((n=e,y*(357.5291+.98560028*n)));var n;return{declination:x(t,0),rightAscension:w(t,0)}}(o),s=function(e,t){return y*(280.147+360.9856235*e)-t}(o,r)-a.rightAscension;return{azimuth:M(s,i,a.declination),altitude:E(s,i,a.declination)}}function _(e,t,n){const{azimuth:r,altitude:i}=b(e,t,n);return[Math.sin(r)*Math.cos(i),Math.cos(r)*Math.cos(i),-Math.sin(i)]}function w(e,t){const n=e;return Math.atan2(Math.sin(n)*Math.cos(v)-Math.tan(t)*Math.sin(v),Math.cos(n))}function x(e,t){const n=e;return Math.asin(Math.sin(t)*Math.cos(v)+Math.cos(t)*Math.sin(v)*Math.sin(n))}function M(e,t,n){const r=e,i=t,o=n;return Math.atan2(Math.sin(r),Math.cos(r)*Math.sin(i)-Math.tan(o)*Math.cos(i))}function E(e,t,n){const r=e,i=t,o=n;return Math.asin(Math.sin(i)*Math.sin(o)+Math.cos(i)*Math.cos(o)*Math.cos(r))}class O extends s.a{constructor(e){super(e),Object(l.a)(this,"timestamp",void 0),this.timestamp=e.timestamp}getProjectedLight({layer:e}){const{viewport:t}=e.context;if(t.resolution&&t.resolution>0){const[e,t,n]=_(this.timestamp,0,0);this.direction=[e,-n,t]}else{const{latitude:e,longitude:n}=t;this.direction=_(this.timestamp,e,n)}return this}}var S=n(1839),T=n(17),C=n(555),L=n(542);class P extends L.a{constructor(e,t){super(e,t),Object(l.a)(this,"model",void 0);const{module:n,fs:r,id:i}=t;this.model=new S.a(e,{id:i,fs:r,modules:[n]})}render(e){const t=this.gl;Object(T.n)(t,{viewport:[0,0,t.drawingBufferWidth,t.drawingBufferHeight]}),Object(T.o)(t,{framebuffer:e.outputBuffer,clearColor:[0,0,0,0]},()=>this._renderPass(t,e))}delete(){this.model.delete(),this.model=null}_renderPass(e,t){const{inputBuffer:n}=t;Object(C.a)(e,{color:!0}),this.model.draw({moduleSettings:t.moduleSettings,uniforms:{texture:n,texSize:[n.width,n.height]},parameters:{depthWrite:!1,depthTest:!1}})}}var I=n(426);class D{constructor(e,t={}){Object(l.a)(this,"id",void 0),Object(l.a)(this,"props",void 0),Object(l.a)(this,"module",void 0),Object(l.a)(this,"passes",void 0),this.id="".concat(e.name,"-pass"),this.props=t,Object(I.b)(e),this.module=e}setProps(e){this.props=e}preRender(){}postRender(e,t){const n=this.passes||function(e,t,n){if(!t.passes){const r=k(t);return[new P(e,{id:n,module:t,fs:r})]}return t.passes.map((r,i)=>{const o=k(t,r),a="".concat(n,"-").concat(i);return new P(e,{id:a,module:t,fs:o})})}(e,this.module,this.id);this.passes=n;const{target:r}=t;let i=t.inputBuffer,o=t.swapBuffer;for(let e=0;e"uniform sampler2D texture;\nuniform vec2 texSize;\n\nvarying vec2 position;\nvarying vec2 coordinate;\nvarying vec2 uv;\n\nvoid main() {\n vec2 texCoord = coordinate;\n\n gl_FragColor = texture2D(texture, texCoord);\n gl_FragColor = ".concat(e,"(gl_FragColor, texSize, texCoord);\n}\n"))("string"==typeof t.filter?t.filter:"".concat(e.name,"_filterColor"))}if(t.sampler){return(e=>"uniform sampler2D texture;\nuniform vec2 texSize;\n\nvarying vec2 position;\nvarying vec2 coordinate;\nvarying vec2 uv;\n\nvoid main() {\n vec2 texCoord = coordinate;\n\n gl_FragColor = ".concat(e,"(texture, texSize, texCoord);\n}\n"))("string"==typeof t.sampler?t.sampler:"".concat(e.name,"_sampleColor"))}return null}var R=n(263),j=n(352),F=n(1125),N=n(525),B=n(520),z=n(519),U=n(665),H=n(530),V=n(130),G=n(351),Y=n(508),W=n(217),q=n(47);const X=Math.PI/180;function Z({height:e,focalDistance:t,orbitAxis:n,rotationX:r,rotationOrbit:i,zoom:o}){const a="Z"===n?[0,0,1]:[0,1,0],s="Z"===n?[0,-t,0]:[0,0,t],l=(new W.a).lookAt({eye:s,up:a});l.rotateX(r*X),"Z"===n?l.rotateZ(i*X):l.rotateY(i*X);const u=Math.pow(2,o)/e;return l.scale(u),l}class K extends V.a{constructor(e){const{height:t,projectionMatrix:n,fovy:r=50,orbitAxis:i="Z",target:o=[0,0,0],rotationX:a=0,rotationOrbit:s=0,zoom:u=0}=e,c=n?n[5]/2:Object(q.fovyToAltitude)(r);super({...e,longitude:void 0,viewMatrix:Z({height:t||1,focalDistance:c,orbitAxis:i,rotationX:a,rotationOrbit:s,zoom:u}),fovy:r,focalDistance:c,position:o,zoom:u}),Object(l.a)(this,"projectedCenter",void 0),this.projectedCenter=this.project(this.center)}unproject(e,{topLeft:t=!0}={}){const[n,r,i=this.projectedCenter[2]]=e,o=t?r:this.height-r,[a,s,l]=Object(q.pixelsToWorld)([n,o,i],this.pixelUnprojectionMatrix);return[a,s,l]}panByPosition(e,t){const n=this.project(e),r=[this.width/2+n[0]-t[0],this.height/2+n[1]-t[1],this.projectedCenter[2]];return{target:this.unproject(r)}}}var Q=n(509),J=n(246),$=n(52),ee=n(163);class te{constructor({phi:e=0,theta:t=0,radius:n=1,bearing:r,pitch:i,altitude:o,radiusScale:a=6371e3}={}){Object(l.a)(this,"phi",void 0),Object(l.a)(this,"theta",void 0),Object(l.a)(this,"radius",void 0),Object(l.a)(this,"radiusScale",void 0),this.phi=e,this.theta=t,this.radius=n||o||1,this.radiusScale=a||1,void 0!==r&&(this.bearing=r),void 0!==i&&(this.pitch=i),this.check()}toString(){return this.formatString($.b)}formatString({printTypes:e=!1}){const t=$.e;return"".concat(e?"Spherical":"","[rho:").concat(t(this.radius),",theta:").concat(t(this.theta),",phi:").concat(t(this.phi),"]")}equals(e){return Object($.d)(this.radius,e.radius)&&Object($.d)(this.theta,e.theta)&&Object($.d)(this.phi,e.phi)}exactEquals(e){return this.radius===e.radius&&this.theta===e.theta&&this.phi===e.phi}get bearing(){return 180-Object($.c)(this.phi)}set bearing(e){this.phi=Math.PI-Object($.h)(e)}get pitch(){return Object($.c)(this.theta)}set pitch(e){this.theta=Object($.h)(e)}get longitude(){return Object($.c)(this.phi)}get latitude(){return Object($.c)(this.theta)}get lng(){return Object($.c)(this.phi)}get lat(){return Object($.c)(this.theta)}get z(){return(this.radius-1)*this.radiusScale}set(e,t,n){return this.radius=e,this.phi=t,this.theta=n,this.check()}clone(){return(new te).copy(this)}copy(e){return this.radius=e.radius,this.phi=e.phi,this.theta=e.theta,this.check()}fromLngLatZ([e,t,n]){return this.radius=1+n/this.radiusScale,this.phi=Object($.h)(t),this.theta=Object($.h)(e),this.check()}fromVector3(e){return this.radius=ee.c(e),this.radius>0&&(this.theta=Math.atan2(e[0],e[1]),this.phi=Math.acos(Object($.a)(e[2]/this.radius,-1,1))),this.check()}toVector3(){return new J.a(0,0,this.radius).rotateX({radians:this.theta}).rotateZ({radians:this.phi})}makeSafe(){return this.phi=Math.max(1e-6,Math.min(Math.PI-1e-6,this.phi)),this}check(){if(!(Number.isFinite(this.phi)&&Number.isFinite(this.theta)&&this.radius>0))throw new Error("SphericalCoordinates: some fields set to invalid numbers");return this}}class ne extends V.a{constructor(e){const{longitude:t,latitude:n,modelMatrix:r,bearing:i=0,pitch:o=0,up:a=[0,0,1]}=e,s=new te({bearing:i,pitch:-90===o?1e-4:90+o}).toVector3().normalize(),u=r?new W.a(r).transformAsVector(s):s,c=Number.isFinite(n)?Object(q.getMeterZoom)({latitude:n}):0,d=Math.pow(2,c),f=(new W.a).lookAt({eye:[0,0,0],center:u,up:a}).scale(d);super({...e,zoom:c,viewMatrix:f}),Object(l.a)(this,"longitude",void 0),Object(l.a)(this,"latitude",void 0),this.latitude=n,this.longitude=t}}var re=n(879),ie=n(308),oe=n(880),ae=n(415),se=n(368),le=n(174),ue=n(504),ce=n(172),de=n(370),fe=n(91),he=n(147);class pe extends de.a{constructor(e){const{width:t,height:n,position:r=[0,0,0],bearing:i=0,pitch:o=0,longitude:a=null,latitude:s=null,maxPitch:l=90,minPitch:u=-90,startRotatePos:c,startBearing:d,startPitch:f,startZoomPosition:h}=e;super({width:t,height:n,position:r,bearing:i,pitch:o,longitude:a,latitude:s,maxPitch:l,minPitch:u},{startRotatePos:c,startBearing:d,startPitch:f,startZoomPosition:h})}panStart(){return this}pan(){return this}panEnd(){return this}rotateStart({pos:e}){return this._getUpdatedState({startRotatePos:e,startBearing:this.getViewportProps().bearing,startPitch:this.getViewportProps().pitch})}rotate({pos:e,deltaAngleX:t=0,deltaAngleY:n=0}){const{startRotatePos:r,startBearing:i,startPitch:o}=this.getState(),{width:a,height:s}=this.getViewportProps();if(!r||void 0===i||void 0===o)return this;let l;if(e){l={bearing:i-180*((e[0]-r[0])/a),pitch:o-90*((e[1]-r[1])/s)}}else l={bearing:i-t,pitch:o-n};return this._getUpdatedState(l)}rotateEnd(){return this._getUpdatedState({startRotatePos:null,startBearing:null,startPitch:null})}zoomStart(){return this._getUpdatedState({startZoomPosition:this.getViewportProps().position})}zoom({scale:e}){let{startZoomPosition:t}=this.getState();t||(t=this.getViewportProps().position);const n=this.getDirection();return this._move(n,20*Math.log2(e),t)}zoomEnd(){return this._getUpdatedState({startZoomPosition:null})}moveLeft(e=20){const t=this.getDirection(!0);return this._move(t.rotateZ({radians:Math.PI/2}),e)}moveRight(e=20){const t=this.getDirection(!0);return this._move(t.rotateZ({radians:-Math.PI/2}),e)}moveUp(e=20){const t=this.getDirection(!0);return this._move(t,e)}moveDown(e=20){const t=this.getDirection(!0);return this._move(t.negate(),e)}rotateLeft(e=15){return this._getUpdatedState({bearing:this.getViewportProps().bearing-e})}rotateRight(e=15){return this._getUpdatedState({bearing:this.getViewportProps().bearing+e})}rotateUp(e=10){return this._getUpdatedState({pitch:this.getViewportProps().pitch+e})}rotateDown(e=10){return this._getUpdatedState({pitch:this.getViewportProps().pitch-e})}zoomIn(e=2){return this.zoom({scale:e})}zoomOut(e=2){return this.zoom({scale:1/e})}shortestPathFrom(e){const t=e.getViewportProps(),n={...this.getViewportProps()},{bearing:r,longitude:i}=n;return Math.abs(r-t.bearing)>180&&(n.bearing=r<0?r+360:r-360),null!==i&&null!==t.longitude&&Math.abs(i-t.longitude)>180&&(n.longitude=i<0?i+360:i-360),n}_move(e,t,n=this.getViewportProps().position){const r=e.scale(t);return this._getUpdatedState({position:new J.a(n).add(r)})}getDirection(e=!1){return new te({bearing:this.getViewportProps().bearing,pitch:e?90:90+this.getViewportProps().pitch}).toVector3().normalize()}_getUpdatedState(e){return new pe({...this.getViewportProps(),...this.getState(),...e})}applyConstraints(e){const{pitch:t,maxPitch:n,minPitch:r,longitude:i,bearing:o}=e;return e.pitch=Object($.a)(t,r,n),null!==i&&(i<-180||i>180)&&(e.longitude=Object(fe.f)(i+180,360)-180),(o<-180||o>180)&&(e.bearing=Object(fe.f)(o+180,360)-180),e}}class Ae extends ce.a{constructor(...e){super(...e),Object(l.a)(this,"ControllerState",pe),Object(l.a)(this,"transition",{transitionDuration:300,transitionInterpolator:new he.a(["position","pitch","bearing"])})}}class ge extends le.a{get ViewportType(){return ne}get ControllerType(){return Ae}}Object(l.a)(ge,"displayName","FirstPersonView");class me extends de.a{constructor(e){const{width:t,height:n,rotationX:r=0,rotationOrbit:i=0,target:o=[0,0,0],zoom:a=0,minRotationX:s=-90,maxRotationX:u=90,minZoom:c=-1/0,maxZoom:d=1/0,startPanPosition:f,startRotatePos:h,startRotationX:p,startRotationOrbit:A,startZoomPosition:g,startZoom:m}=e;super({width:t,height:n,rotationX:r,rotationOrbit:i,target:o,zoom:a,minRotationX:s,maxRotationX:u,minZoom:c,maxZoom:d},{startPanPosition:f,startRotatePos:h,startRotationX:p,startRotationOrbit:A,startZoomPosition:g,startZoom:m}),Object(l.a)(this,"makeViewport",void 0),this.makeViewport=e.makeViewport}panStart({pos:e}){return this._getUpdatedState({startPanPosition:this._unproject(e)})}pan({pos:e,startPosition:t}){const n=this.getState().startPanPosition||t;if(!n)return this;const r=this.makeViewport(this.getViewportProps()).panByPosition(n,e);return this._getUpdatedState(r)}panEnd(){return this._getUpdatedState({startPanPosition:null})}rotateStart({pos:e}){return this._getUpdatedState({startRotatePos:e,startRotationX:this.getViewportProps().rotationX,startRotationOrbit:this.getViewportProps().rotationOrbit})}rotate({pos:e,deltaAngleX:t=0,deltaAngleY:n=0}){const{startRotatePos:r,startRotationX:i,startRotationOrbit:o}=this.getState(),{width:a,height:s}=this.getViewportProps();if(!r||void 0===i||void 0===o)return this;let l;if(e){let t=(e[0]-r[0])/a;const n=(e[1]-r[1])/s;(i<-90||i>90)&&(t*=-1),l={rotationX:i+180*n,rotationOrbit:o+180*t}}else l={rotationX:i+n,rotationOrbit:o+t};return this._getUpdatedState(l)}rotateEnd(){return this._getUpdatedState({startRotationX:null,startRotationOrbit:null})}shortestPathFrom(e){const t=e.getViewportProps(),n={...this.getViewportProps()},{rotationOrbit:r}=n;return Math.abs(r-t.rotationOrbit)>180&&(n.rotationOrbit=r<0?r+360:r-360),n}zoomStart({pos:e}){return this._getUpdatedState({startZoomPosition:this._unproject(e),startZoom:this.getViewportProps().zoom})}zoom({pos:e,startPos:t,scale:n}){let{startZoom:r,startZoomPosition:i}=this.getState();if(i||(r=this.getViewportProps().zoom,i=this._unproject(t)||this._unproject(e)),!i)return this;const o=this._calculateNewZoom({scale:n,startZoom:r}),a=this.makeViewport({...this.getViewportProps(),zoom:o});return this._getUpdatedState({zoom:o,...a.panByPosition(i,e)})}zoomEnd(){return this._getUpdatedState({startZoomPosition:null,startZoom:null})}zoomIn(e=2){return this._getUpdatedState({zoom:this._calculateNewZoom({scale:e})})}zoomOut(e=2){return this._getUpdatedState({zoom:this._calculateNewZoom({scale:1/e})})}moveLeft(e=50){return this._panFromCenter([-e,0])}moveRight(e=50){return this._panFromCenter([e,0])}moveUp(e=50){return this._panFromCenter([0,-e])}moveDown(e=50){return this._panFromCenter([0,e])}rotateLeft(e=15){return this._getUpdatedState({rotationOrbit:this.getViewportProps().rotationOrbit-e})}rotateRight(e=15){return this._getUpdatedState({rotationOrbit:this.getViewportProps().rotationOrbit+e})}rotateUp(e=10){return this._getUpdatedState({rotationX:this.getViewportProps().rotationX-e})}rotateDown(e=10){return this._getUpdatedState({rotationX:this.getViewportProps().rotationX+e})}_unproject(e){const t=this.makeViewport(this.getViewportProps());return e&&t.unproject(e)}_calculateNewZoom({scale:e,startZoom:t}){const{maxZoom:n,minZoom:r}=this.getViewportProps();void 0===t&&(t=this.getViewportProps().zoom);const i=t+Math.log2(e);return Object($.a)(i,r,n)}_panFromCenter(e){const{width:t,height:n,target:r}=this.getViewportProps();return this.pan({startPosition:r,pos:[t/2+e[0],n/2+e[1]]})}_getUpdatedState(e){return new this.constructor({makeViewport:this.makeViewport,...this.getViewportProps(),...this.getState(),...e})}applyConstraints(e){const{maxZoom:t,minZoom:n,zoom:r,maxRotationX:i,minRotationX:o,rotationOrbit:a}=e;return e.zoom=Array.isArray(r)?[Object($.a)(r[0],n,t),Object($.a)(r[1],n,t)]:Object($.a)(r,n,t),e.rotationX=Object($.a)(e.rotationX,o,i),(a<-180||a>180)&&(e.rotationOrbit=Object(fe.f)(a+180,360)-180),e}}class ye extends ce.a{constructor(...e){super(...e),Object(l.a)(this,"ControllerState",me),Object(l.a)(this,"transition",{transitionDuration:300,transitionInterpolator:new he.a({transitionProps:{compare:["target","zoom","rotationX","rotationOrbit"],required:["target","zoom"]}})})}}class ve extends le.a{constructor(e={}){super(e),this.props.orbitAxis=e.orbitAxis||"Z"}get ViewportType(){return K}get ControllerType(){return ye}}Object(l.a)(ve,"displayName","OrbitView");class be extends me{constructor(e){super(e),Object(l.a)(this,"zoomAxis",void 0),this.zoomAxis=e.zoomAxis||"all"}_calculateNewZoom({scale:e,startZoom:t}){const{maxZoom:n,minZoom:r}=this.getViewportProps();void 0===t&&(t=this.getViewportProps().zoom);let i=Math.log2(e);if(Array.isArray(t)){let[e,o]=t;switch(this.zoomAxis){case"X":e=Object($.a)(e+i,r,n);break;case"Y":o=Object($.a)(o+i,r,n);break;default:let t=Math.min(e+i,o+i);tn&&(i+=n-t),e+=i,o+=i}return[e,o]}return Object($.a)(t+i,r,n)}}class _e extends ce.a{constructor(...e){super(...e),Object(l.a)(this,"ControllerState",be),Object(l.a)(this,"transition",{transitionDuration:300,transitionInterpolator:new he.a(["target","zoom"])}),Object(l.a)(this,"dragMode","pan")}_onPanRotate(){return!1}}class we extends le.a{get ViewportType(){return Q.a}get ControllerType(){return _e}}Object(l.a)(we,"displayName","OrthographicView");var xe=n(353);class Me extends xe.a{applyConstraints(e){const{maxZoom:t,minZoom:n,zoom:r}=e;e.zoom=Object($.a)(r,n,t);const{longitude:i,latitude:o}=e;return(i<-180||i>180)&&(e.longitude=Object(fe.f)(i+180,360)-180),e.latitude=Object($.a)(o,-89,89),e}}class Ee extends ce.a{constructor(...e){super(...e),Object(l.a)(this,"ControllerState",Me),Object(l.a)(this,"transition",{transitionDuration:300,transitionInterpolator:new he.a(["longitude","latitude","zoom"])}),Object(l.a)(this,"dragMode","pan")}setProps(e){super.setProps(e),this.dragRotate=!1,this.touchRotate=!1}}class Oe extends le.a{get ViewportType(){return Y.a}get ControllerType(){return Ee}}Object(l.a)(Oe,"displayName","GlobeView");var Se=n(666),Te=n(505),Ce=n(354);const Le={bearing:0,pitch:0,position:[0,0,0]},Pe={speed:1.2,curve:1.414};class Ie extends Ce.a{constructor(e={}){super({compare:["longitude","latitude","zoom","bearing","pitch","position"],extract:["width","height","longitude","latitude","zoom","bearing","pitch","position"],required:["width","height","latitude","longitude","zoom"]}),Object(l.a)(this,"opts",void 0),this.opts={...Pe,...e}}interpolateProps(e,t,n){const r=Object(q.flyToViewport)(e,t,n,this.opts);for(const i in Le)r[i]=Object($.g)(e[i]||Le[i],t[i]||Le[i],n);return r}getDuration(e,t){let{transitionDuration:n}=t;return"auto"===n&&(n=Object(q.getFlyToDuration)(e,t,this.opts)),n}}var De=n(54),ke=n(85),Re=n(150),je=n(881),Fe=n(184),Ne=n(506),Be=n(122),ze=n(186),Ue=n(507),He=n(422)},function(e,t,n){"use strict";n.r(t),n.d(t,"memcpy",(function(){return s})),n.d(t,"joinUint8Arrays",(function(){return l})),n.d(t,"toArrayBufferView",(function(){return u})),n.d(t,"toInt8Array",(function(){return c})),n.d(t,"toInt16Array",(function(){return d})),n.d(t,"toInt32Array",(function(){return f})),n.d(t,"toBigInt64Array",(function(){return h})),n.d(t,"toUint8Array",(function(){return p})),n.d(t,"toUint16Array",(function(){return A})),n.d(t,"toUint32Array",(function(){return g})),n.d(t,"toBigUint64Array",(function(){return m})),n.d(t,"toFloat32Array",(function(){return y})),n.d(t,"toFloat64Array",(function(){return v})),n.d(t,"toUint8ClampedArray",(function(){return b})),n.d(t,"toArrayBufferViewIterator",(function(){return w})),n.d(t,"toInt8ArrayIterator",(function(){return x})),n.d(t,"toInt16ArrayIterator",(function(){return M})),n.d(t,"toInt32ArrayIterator",(function(){return E})),n.d(t,"toUint8ArrayIterator",(function(){return O})),n.d(t,"toUint16ArrayIterator",(function(){return S})),n.d(t,"toUint32ArrayIterator",(function(){return T})),n.d(t,"toFloat32ArrayIterator",(function(){return C})),n.d(t,"toFloat64ArrayIterator",(function(){return L})),n.d(t,"toUint8ClampedArrayIterator",(function(){return P})),n.d(t,"toArrayBufferViewAsyncIterator",(function(){return I})),n.d(t,"toInt8ArrayAsyncIterator",(function(){return D})),n.d(t,"toInt16ArrayAsyncIterator",(function(){return k})),n.d(t,"toInt32ArrayAsyncIterator",(function(){return R})),n.d(t,"toUint8ArrayAsyncIterator",(function(){return j})),n.d(t,"toUint16ArrayAsyncIterator",(function(){return F})),n.d(t,"toUint32ArrayAsyncIterator",(function(){return N})),n.d(t,"toFloat32ArrayAsyncIterator",(function(){return B})),n.d(t,"toFloat64ArrayAsyncIterator",(function(){return z})),n.d(t,"toUint8ClampedArrayAsyncIterator",(function(){return U})),n.d(t,"rebaseValueOffsets",(function(){return H})),n.d(t,"compareArrayLike",(function(){return V}));var r=n(20),i=n(161),o=n(55);const a="undefined"!=typeof SharedArrayBuffer?SharedArrayBuffer:ArrayBuffer;function s(e,t,n=0,r=t.byteLength){const i=e.byteLength,o=new Uint8Array(e.buffer,e.byteOffset,i),a=new Uint8Array(t.buffer,t.byteOffset,Math.min(r,i));return o.set(a,n),e}function l(e,t){const n=function(e){const t=e[0]?[e[0]]:[];let n,r,i,o;for(let a,s,l=0,u=0,c=e.length;++le+t.byteLength,0);let i,o,a,l=0,u=-1;const c=Math.min(t||Number.POSITIVE_INFINITY,r);for(const e=n.length;++uu(Int8Array,e),d=e=>u(Int16Array,e),f=e=>u(Int32Array,e),h=e=>u(BigInt64Array,e),p=e=>u(Uint8Array,e),A=e=>u(Uint16Array,e),g=e=>u(Uint32Array,e),m=e=>u(BigUint64Array,e),y=e=>u(Float32Array,e),v=e=>u(Float64Array,e),b=e=>u(Uint8ClampedArray,e),_=e=>(e.next(),e);function*w(e,t){const n=function*(e){yield e},r="string"==typeof t||ArrayBuffer.isView(t)||t instanceof ArrayBuffer||t instanceof a?n(t):Object(o.f)(t)?t:n(t);return yield*_(function*(t){let n=null;do{n=t.next(yield u(e,n))}while(!n.done)}(r[Symbol.iterator]())),new e}const x=e=>w(Int8Array,e),M=e=>w(Int16Array,e),E=e=>w(Int32Array,e),O=e=>w(Uint8Array,e),S=e=>w(Uint16Array,e),T=e=>w(Uint32Array,e),C=e=>w(Float32Array,e),L=e=>w(Float64Array,e),P=e=>w(Uint8ClampedArray,e);function I(e,t){return Object(r.__asyncGenerator)(this,arguments,(function*(){if(Object(o.i)(t))return yield Object(r.__await)(yield Object(r.__await)(yield*Object(r.__asyncDelegator)(Object(r.__asyncValues)(I(e,yield Object(r.__await)(t))))));const n=function(e){return Object(r.__asyncGenerator)(this,arguments,(function*(){yield yield Object(r.__await)(yield Object(r.__await)(e))}))},i="string"==typeof t||ArrayBuffer.isView(t)||t instanceof ArrayBuffer||t instanceof a?n(t):Object(o.f)(t)?function(e){return Object(r.__asyncGenerator)(this,arguments,(function*(){yield Object(r.__await)(yield*Object(r.__asyncDelegator)(Object(r.__asyncValues)(_(function*(e){let t=null;do{t=e.next(yield null==t?void 0:t.value)}while(!t.done)}(e[Symbol.iterator]())))))}))}(t):Object(o.b)(t)?t:n(t);return yield Object(r.__await)(yield*Object(r.__asyncDelegator)(Object(r.__asyncValues)(_(function(t){return Object(r.__asyncGenerator)(this,arguments,(function*(){let n=null;do{n=yield Object(r.__await)(t.next(yield yield Object(r.__await)(u(e,n))))}while(!n.done)}))}(i[Symbol.asyncIterator]()))))),yield Object(r.__await)(new e)}))}const D=e=>I(Int8Array,e),k=e=>I(Int16Array,e),R=e=>I(Int32Array,e),j=e=>I(Uint8Array,e),F=e=>I(Uint16Array,e),N=e=>I(Uint32Array,e),B=e=>I(Float32Array,e),z=e=>I(Float64Array,e),U=e=>I(Uint8ClampedArray,e);function H(e,t,n){if(0!==e){n=n.slice(0,t+1);for(let r=-1;++r<=t;)n[r]+=e}return n}function V(e,t){let n=0;const r=e.length;if(r!==t.length)return!1;if(r>0)do{if(e[n]!==t[n])return!1}while(++n1?t-1:0),a=1;a1?0:e<-1?d:Math.acos(e)}function A(e){return e>=1?f:e<=-1?-f:Math.asin(e)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ByteBuffer=t.Builder=t.Encoding=t.isLittleEndian=t.float64=t.float32=t.int32=t.SIZE_PREFIX_LENGTH=t.FILE_IDENTIFIER_LENGTH=t.SIZEOF_INT=t.SIZEOF_SHORT=void 0;var r=n(333);Object.defineProperty(t,"SIZEOF_SHORT",{enumerable:!0,get:function(){return r.SIZEOF_SHORT}});var i=n(333);Object.defineProperty(t,"SIZEOF_INT",{enumerable:!0,get:function(){return i.SIZEOF_INT}});var o=n(333);Object.defineProperty(t,"FILE_IDENTIFIER_LENGTH",{enumerable:!0,get:function(){return o.FILE_IDENTIFIER_LENGTH}});var a=n(333);Object.defineProperty(t,"SIZE_PREFIX_LENGTH",{enumerable:!0,get:function(){return a.SIZE_PREFIX_LENGTH}});var s=n(701);Object.defineProperty(t,"int32",{enumerable:!0,get:function(){return s.int32}}),Object.defineProperty(t,"float32",{enumerable:!0,get:function(){return s.float32}}),Object.defineProperty(t,"float64",{enumerable:!0,get:function(){return s.float64}}),Object.defineProperty(t,"isLittleEndian",{enumerable:!0,get:function(){return s.isLittleEndian}});var l=n(702);Object.defineProperty(t,"Encoding",{enumerable:!0,get:function(){return l.Encoding}});var u=n(1224);Object.defineProperty(t,"Builder",{enumerable:!0,get:function(){return u.Builder}});var c=n(703);Object.defineProperty(t,"ByteBuffer",{enumerable:!0,get:function(){return c.ByteBuffer}})},function(e,t,n){"use strict";n.d(t,"b",(function(){return r})),n.d(t,"a",(function(){return i})),n.d(t,"c",(function(){return o}));var r=1e-6,i="undefined"!=typeof Float32Array?Float32Array:Array,o=Math.random;Math.PI;Math.hypot||(Math.hypot=function(){for(var e=0,t=arguments.length;t--;)e+=arguments[t]*arguments[t];return Math.sqrt(e)})},function(e,t){function n(){return e.exports=n=Object.assign||function(e){for(var t=1;t=2&&!Array.isArray(e[0])&&!Array.isArray(e[1]))return e;throw new Error("coord must be GeoJSON Point or an Array of numbers")}function o(e){if(Array.isArray(e))return e;if("Feature"===e.type){if(null!==e.geometry)return e.geometry.coordinates}else if(e.coordinates)return e.coordinates;throw new Error("coords must be GeoJSON Feature, Geometry Object or an Array")}function a(e){if(e.length>1&&Object(r.isNumber)(e[0])&&Object(r.isNumber)(e[1]))return!0;if(Array.isArray(e[0])&&e[0].length)return a(e[0]);throw new Error("coordinates must only contain numbers")}function s(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 l(e,t,n){if(!e)throw new Error("No feature passed");if(!n)throw new Error(".featureOf() requires a name");if(!e||"Feature"!==e.type||!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 u(e,t,n){if(!e)throw new Error("No featureCollection passed");if(!n)throw new Error(".collectionOf() requires a name");if(!e||"FeatureCollection"!==e.type)throw new Error("Invalid input to "+n+", FeatureCollection required");for(var r=0,i=e.features;r0&&void 0!==arguments[0]?arguments[0]:{};const{id:t=Object(O.c)("truncated-code-geometry")}=e,{indices:n,attributes:r}=function(e){const{bottomRadius:t=0,topRadius:n=0,height:r=1,nradial:i=10,nvertical:o=10,verticalAxis:a="y",topCap:s=!1,bottomCap:l=!1}=e,u=(s?2:0)+(l?2:0),c=(i+1)*(o+1+u),d=Math.atan2(t-n,r),f=Math.sin,h=Math.cos,p=Math.PI,A=h(d),g=f(d),m=s?-2:0,y=o+(l?2:0),v=i+1,b=new Uint16Array(i*(o+u)*6),_=S[a],w=new Float32Array(3*c),x=new Float32Array(3*c),M=new Float32Array(2*c);let E=0,O=0;for(let e=m;e<=y;e++){let a,s=e/o,l=r*s;e<0?(l=0,s=1,a=t):e>o?(l=r,s=1,a=n):a=t+e/o*(n-t),-2!==e&&e!==o+2||(a=0,s=0),l-=r/2;for(let t=0;to?0:n*A,x[E+_[1]]=e<0?-1:e>o?1:g,x[E+_[2]]=e<0||e>o?0:r*A,M[O+0]=t/i,M[O+1]=s,O+=2,E+=3}}for(let e=0;e0&&void 0!==arguments[0]?arguments[0]:{};const{id:t=Object(O.c)("cone-geometry"),radius:n=1,cap:r=!0}=e;super({...e,id:t,topRadius:0,topCap:Boolean(r),bottomCap:Boolean(r),bottomRadius:n})}}var L=n(1801);class P extends T{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{id:t=Object(O.c)("cylinder-geometry"),radius:n=1}=e;super({...e,id:t,bottomRadius:n,topRadius:n})}}var I=n(1840);const D=[-1,0,0,0,1,0,0,0,-1,0,0,1,0,-1,0,1,0,0],k=[3,4,5,3,5,1,3,1,0,3,0,4,4,0,2,4,2,5,2,0,1,5,2,1];class R extends M.a{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{id:t=Object(O.c)("ico-sphere-geometry")}=e,{indices:n,attributes:r}=function(e){const{iterations:t=0}=e,n=Math.PI,r=2*n,i=[...D];let o=[...k];i.push(),o.push();const a=(()=>{const e={};return(t,n)=>{const r=(t*=3)>(n*=3)?t:n,o="".concat(t=0;e-=3){const t=o[e+0],a=o[e+1],u=o[e+2],c=3*t,d=3*a,f=3*u,h=2*t,p=2*a,A=2*u,g=i[c+0],m=i[c+1],y=i[c+2],v=Math.acos(y/Math.sqrt(g*g+m*m+y*y)),b=Math.atan2(m,g)+n,_=v/n,w=1-b/r,x=i[d+0],M=i[d+1],E=i[d+2],O=Math.acos(E/Math.sqrt(x*x+M*M+E*E)),S=Math.atan2(M,x)+n,T=O/n,C=1-S/r,L=i[f+0],P=i[f+1],D=i[f+2],k=Math.acos(D/Math.sqrt(L*L+P*P+D*D)),R=Math.atan2(P,L)+n,j=k/n,F=1-R/r,N=[L-x,P-M,D-E],B=[g-x,m-M,y-E],z=new I.a(N).cross(B).normalize();let U;(0===w||0===C||0===F)&&(0===w||w>.5)&&(0===C||C>.5)&&(0===F||F>.5)&&(i.push(i[c+0],i[c+1],i[c+2]),U=i.length/3-1,o.push(U),l[2*U+0]=1,l[2*U+1]=_,s[3*U+0]=z.x,s[3*U+1]=z.y,s[3*U+2]=z.z,i.push(i[d+0],i[d+1],i[d+2]),U=i.length/3-1,o.push(U),l[2*U+0]=1,l[2*U+1]=T,s[3*U+0]=z.x,s[3*U+1]=z.y,s[3*U+2]=z.z,i.push(i[f+0],i[f+1],i[f+2]),U=i.length/3-1,o.push(U),l[2*U+0]=1,l[2*U+1]=j,s[3*U+0]=z.x,s[3*U+1]=z.y,s[3*U+2]=z.z),s[c+0]=s[d+0]=s[f+0]=z.x,s[c+1]=s[d+1]=s[f+1]=z.y,s[c+2]=s[d+2]=s[f+2]=z.z,l[h+0]=w,l[h+1]=_,l[p+0]=C,l[p+1]=T,l[A+0]=F,l[A+1]=j}return{indices:{size:1,value:new Uint16Array(o)},attributes:{POSITION:{size:3,value:new Float32Array(i)},NORMAL:{size:3,value:new Float32Array(s)},TEXCOORD_0:{size:2,value:new Float32Array(l)}}}}(e);super({...e,id:t,indices:n,attributes:{...r,...e.attributes}})}}class j extends M.a{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{id:t=Object(O.c)("plane-geometry")}=e,{indices:n,attributes:r}=function(e){const{type:t="x,y",offset:n=0,flipCull:r=!1,unpack:i=!1}=e,o=t.split(",");let a=e["".concat(o[0],"len")]||1;const s=e["".concat(o[1],"len")]||1,l=e["n".concat(o[0])]||1,u=e["n".concat(o[1])]||1,c=(l+1)*(u+1),d=new Float32Array(3*c),f=new Float32Array(3*c),h=new Float32Array(2*c);r&&(a=-a);let p=0,A=0;for(let e=0;e<=u;e++)for(let i=0;i<=l;i++){const o=i/l,c=e/u;switch(h[p+0]=r?1-o:o,h[p+1]=c,t){case"x,y":d[A+0]=a*o-.5*a,d[A+1]=s*c-.5*s,d[A+2]=n,f[A+0]=0,f[A+1]=0,f[A+2]=r?1:-1;break;case"x,z":d[A+0]=a*o-.5*a,d[A+1]=n,d[A+2]=s*c-.5*s,f[A+0]=0,f[A+1]=r?1:-1,f[A+2]=0;break;case"y,z":d[A+0]=n,d[A+1]=a*o-.5*a,d[A+2]=s*c-.5*s,f[A+0]=r?1:-1,f[A+1]=0,f[A+2]=0;break;default:throw new Error("PlaneGeometry: unknown type")}p+=2,A+=3}const g=l+1,m=new Uint16Array(l*u*6);for(let e=0;e0&&void 0!==arguments[0]?arguments[0]:{};const{id:t=Object(O.c)("sphere-geometry")}=e,{indices:n,attributes:r}=function(e){const{nlat:t=10,nlong:n=10}=e;let{radius:r=1}=e;const i=Math.PI-0,o=2*Math.PI-0,a=(t+1)*(n+1);if("number"==typeof r){const e=r;r=(t,n,r,i,o)=>e}const s=new Float32Array(3*a),l=new Float32Array(3*a),u=new Float32Array(2*a),c=new(a>65535?Uint32Array:Uint16Array)(t*n*6);for(let e=0;e<=t;e++)for(let a=0;a<=n;a++){const c=a/n,d=e/t,f=a+e*(n+1),h=2*f,p=3*f,A=o*c,g=i*d,m=Math.sin(A),y=Math.cos(A),v=Math.sin(g),b=Math.cos(g),_=y*v,w=b,x=m*v,M=r(_,w,x,c,d);s[p+0]=M*_,s[p+1]=M*w,s[p+2]=M*x,l[p+0]=_,l[p+1]=w,l[p+2]=x,u[h+0]=c,u[h+1]=1-d}const d=n+1;for(let e=0;ee+t.byteLength,e)}get nullCount(){let e,t=this._nullCount;return t<=-1&&(e=this.nullBitmap)&&(this._nullCount=t=this.length-Object(a.popcnt_bit_range)(e,this.offset,this.offset+this.length)),t}constructor(e,t,n,r,i,a=[],s){let l;this.type=e,this.children=a,this.dictionary=s,this.offset=Math.floor(Math.max(t||0,0)),this.length=Math.floor(Math.max(n||0,0)),this._nullCount=Math.floor(Math.max(r||0,-1)),i instanceof u?(this.stride=i.stride,this.values=i.values,this.typeIds=i.typeIds,this.nullBitmap=i.nullBitmap,this.valueOffsets=i.valueOffsets):(this.stride=Object(o.S)(e),i&&((l=i[0])&&(this.valueOffsets=l),(l=i[1])&&(this.values=l),(l=i[2])&&(this.nullBitmap=l),(l=i[3])&&(this.typeIds=l))),this.nullable=0!==this._nullCount&&this.nullBitmap&&this.nullBitmap.byteLength>0}getValid(e){if(this.nullable&&this.nullCount>0){const t=this.offset+e;return 0!=(this.nullBitmap[t>>3]&1<>3){const{nullBitmap:e}=this._changeLengthAndBackfillNullBitmap(this.length);Object.assign(this,{nullBitmap:e,_nullCount:0})}const{nullBitmap:n,offset:r}=this,i=r+e>>3,o=(r+e)%8,a=n[i]>>o&1;return t?0===a&&(n[i]|=1<>3).fill(255,0,t>>3);r[t>>3]=(1<0&&r.set(Object(a.truncateBitmap)(this.offset,t,this.nullBitmap),0);const o=this.buffers;return o[i.a.VALIDITY]=r,this.clone(this.type,0,e,n+(e-t),o)}_sliceBuffers(e,t,n,r){let o;const{buffers:a}=this;return(o=a[i.a.TYPE])&&(a[i.a.TYPE]=o.subarray(e,e+t)),(o=a[i.a.OFFSET])&&(a[i.a.OFFSET]=o.subarray(e,e+t+1))||(o=a[i.a.DATA])&&(a[i.a.DATA]=6===r?o:o.subarray(n*e,n*(e+t))),a}_sliceChildren(e,t,n){return e.map(e=>e.slice(t,n))}}u.prototype.children=Object.freeze([]);class c extends s.a{visit(e){return this.getVisitFn(e.type).call(this,e)}visitNull(e){const{type:t,offset:n=0,length:r=0}=e;return new u(t,n,r,0)}visitBool(e){const{type:t,offset:n=0}=e,r=Object(l.toUint8Array)(e.nullBitmap),i=Object(l.toArrayBufferView)(t.ArrayType,e.data),{length:o=i.length>>3,nullCount:a=(e.nullBitmap?-1:0)}=e;return new u(t,n,o,a,[void 0,i,r])}visitInt(e){const{type:t,offset:n=0}=e,r=Object(l.toUint8Array)(e.nullBitmap),i=Object(l.toArrayBufferView)(t.ArrayType,e.data),{length:o=i.length,nullCount:a=(e.nullBitmap?-1:0)}=e;return new u(t,n,o,a,[void 0,i,r])}visitFloat(e){const{type:t,offset:n=0}=e,r=Object(l.toUint8Array)(e.nullBitmap),i=Object(l.toArrayBufferView)(t.ArrayType,e.data),{length:o=i.length,nullCount:a=(e.nullBitmap?-1:0)}=e;return new u(t,n,o,a,[void 0,i,r])}visitUtf8(e){const{type:t,offset:n=0}=e,r=Object(l.toUint8Array)(e.data),i=Object(l.toUint8Array)(e.nullBitmap),o=Object(l.toInt32Array)(e.valueOffsets),{length:a=o.length-1,nullCount:s=(e.nullBitmap?-1:0)}=e;return new u(t,n,a,s,[o,r,i])}visitBinary(e){const{type:t,offset:n=0}=e,r=Object(l.toUint8Array)(e.data),i=Object(l.toUint8Array)(e.nullBitmap),o=Object(l.toInt32Array)(e.valueOffsets),{length:a=o.length-1,nullCount:s=(e.nullBitmap?-1:0)}=e;return new u(t,n,a,s,[o,r,i])}visitFixedSizeBinary(e){const{type:t,offset:n=0}=e,r=Object(l.toUint8Array)(e.nullBitmap),i=Object(l.toArrayBufferView)(t.ArrayType,e.data),{length:a=i.length/Object(o.S)(t),nullCount:s=(e.nullBitmap?-1:0)}=e;return new u(t,n,a,s,[void 0,i,r])}visitDate(e){const{type:t,offset:n=0}=e,r=Object(l.toUint8Array)(e.nullBitmap),i=Object(l.toArrayBufferView)(t.ArrayType,e.data),{length:a=i.length/Object(o.S)(t),nullCount:s=(e.nullBitmap?-1:0)}=e;return new u(t,n,a,s,[void 0,i,r])}visitTimestamp(e){const{type:t,offset:n=0}=e,r=Object(l.toUint8Array)(e.nullBitmap),i=Object(l.toArrayBufferView)(t.ArrayType,e.data),{length:a=i.length/Object(o.S)(t),nullCount:s=(e.nullBitmap?-1:0)}=e;return new u(t,n,a,s,[void 0,i,r])}visitTime(e){const{type:t,offset:n=0}=e,r=Object(l.toUint8Array)(e.nullBitmap),i=Object(l.toArrayBufferView)(t.ArrayType,e.data),{length:a=i.length/Object(o.S)(t),nullCount:s=(e.nullBitmap?-1:0)}=e;return new u(t,n,a,s,[void 0,i,r])}visitDecimal(e){const{type:t,offset:n=0}=e,r=Object(l.toUint8Array)(e.nullBitmap),i=Object(l.toArrayBufferView)(t.ArrayType,e.data),{length:a=i.length/Object(o.S)(t),nullCount:s=(e.nullBitmap?-1:0)}=e;return new u(t,n,a,s,[void 0,i,r])}visitList(e){const{type:t,offset:n=0,child:r}=e,i=Object(l.toUint8Array)(e.nullBitmap),o=Object(l.toInt32Array)(e.valueOffsets),{length:a=o.length-1,nullCount:s=(e.nullBitmap?-1:0)}=e;return new u(t,n,a,s,[o,void 0,i],[r])}visitStruct(e){const{type:t,offset:n=0,children:r=[]}=e,i=Object(l.toUint8Array)(e.nullBitmap),{length:o=r.reduce((e,{length:t})=>Math.max(e,t),0),nullCount:a=(e.nullBitmap?-1:0)}=e;return new u(t,n,o,a,[void 0,void 0,i],r)}visitUnion(e){const{type:t,offset:n=0,children:r=[]}=e,i=Object(l.toUint8Array)(e.nullBitmap),a=Object(l.toArrayBufferView)(t.ArrayType,e.typeIds),{length:s=a.length,nullCount:c=(e.nullBitmap?-1:0)}=e;if(o.c.isSparseUnion(t))return new u(t,n,s,c,[void 0,void 0,i,a],r);const d=Object(l.toInt32Array)(e.valueOffsets);return new u(t,n,s,c,[d,void 0,i,a],r)}visitDictionary(e){const{type:t,offset:n=0}=e,i=Object(l.toUint8Array)(e.nullBitmap),o=Object(l.toArrayBufferView)(t.indices.ArrayType,e.data),{dictionary:a=new r.a([(new c).visit({type:t.dictionary})])}=e,{length:s=o.length,nullCount:d=(e.nullBitmap?-1:0)}=e;return new u(t,n,s,d,[void 0,o,i],[],a)}visitInterval(e){const{type:t,offset:n=0}=e,r=Object(l.toUint8Array)(e.nullBitmap),i=Object(l.toArrayBufferView)(t.ArrayType,e.data),{length:a=i.length/Object(o.S)(t),nullCount:s=(e.nullBitmap?-1:0)}=e;return new u(t,n,a,s,[void 0,i,r])}visitFixedSizeList(e){const{type:t,offset:n=0,child:r=(new c).visit({type:t.valueType})}=e,i=Object(l.toUint8Array)(e.nullBitmap),{length:a=r.length/Object(o.S)(t),nullCount:s=(e.nullBitmap?-1:0)}=e;return new u(t,n,a,s,[void 0,void 0,i],[r])}visitMap(e){const{type:t,offset:n=0,child:r=(new c).visit({type:t.childType})}=e,i=Object(l.toUint8Array)(e.nullBitmap),o=Object(l.toInt32Array)(e.valueOffsets),{length:a=o.length-1,nullCount:s=(e.nullBitmap?-1:0)}=e;return new u(t,n,a,s,[o,void 0,i],[r])}}function d(e){return(new c).visit(e)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),n.d(t,"d",(function(){return o})),n.d(t,"e",(function(){return a})),n.d(t,"b",(function(){return s})),n.d(t,"c",(function(){return l}));var r=n(54);const i={DEFAULT:-1,LNGLAT:1,METER_OFFSETS:2,LNGLAT_OFFSETS:3,CARTESIAN:0};Object.defineProperty(i,"IDENTITY",{get:()=>(r.a.deprecated("COORDINATE_SYSTEM.IDENTITY","COORDINATE_SYSTEM.CARTESIAN")(),0)});const o={WEB_MERCATOR:1,GLOBE:2,WEB_MERCATOR_AUTO_OFFSET:4,IDENTITY:0},a={common:0,meters:1,pixels:2},s={click:{handler:"onClick"},panstart:{handler:"onDragStart"},panmove:{handler:"onDrag"},panend:{handler:"onDragEnd"}},l={DRAW:"draw",MASK:"mask",TERRAIN:"terrain"}},function(e,t,n){var r=n(698),i=n(1214),o=n(562),a=n(699);e.exports=function(e,t){return r(e)||i(e,t)||o(e,t)||a()},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){"use strict";n.d(t,"b",(function(){return i})),n.d(t,"a",(function(){return o}));var r=n(12);class i{constructor(e=[],t,n){this.fields=e||[],this.metadata=t||new Map,n||(n=s(e)),this.dictionaries=n}get[Symbol.toStringTag](){return"Schema"}get names(){return this.fields.map(e=>e.name)}toString(){return`Schema<{ ${this.fields.map((e,t)=>`${t}: ${e}`).join(", ")} }>`}select(e){const t=new Set(e),n=this.fields.filter(e=>t.has(e.name));return new i(n,this.metadata)}selectAt(e){const t=e.map(e=>this.fields[e]).filter(Boolean);return new i(t,this.metadata)}assign(...e){const t=e[0]instanceof i?e[0]:Array.isArray(e[0])?new i(e[0]):new i(e),n=[...this.fields],r=a(a(new Map,this.metadata),t.metadata),o=t.fields.filter(e=>{const t=n.findIndex(t=>t.name===e.name);return!~t||(n[t]=e.clone({metadata:a(a(new Map,n[t].metadata),e.metadata)}))&&!1}),l=s(o,new Map);return new i([...n,...o],r,new Map([...this.dictionaries,...l]))}}i.prototype.fields=null,i.prototype.metadata=null,i.prototype.dictionaries=null;class o{static new(...e){let[t,n,r,i]=e;return e[0]&&"object"==typeof e[0]&&(({name:t}=e[0]),void 0===n&&(n=e[0].type),void 0===r&&(r=e[0].nullable),void 0===i&&(i=e[0].metadata)),new o(""+t,n,r,i)}constructor(e,t,n=!1,r){this.name=e,this.type=t,this.nullable=n,this.metadata=r||new Map}get typeId(){return this.type.typeId}get[Symbol.toStringTag](){return"Field"}toString(){return`${this.name}: ${this.type}`}clone(...e){let[t,n,r,i]=e;return e[0]&&"object"==typeof e[0]?({name:t=this.name,type:n=this.type,nullable:r=this.nullable,metadata:i=this.metadata}=e[0]):[t=this.name,n=this.type,r=this.nullable,i=this.metadata]=e,o.new(t,n,r,i)}}function a(e,t){return new Map([...e||new Map,...t||new Map])}function s(e,t=new Map){for(let n=-1,i=e.length;++n0&&s(i.children,t)}return t}o.prototype.type=null,o.prototype.name=null,o.prototype.nullable=null,o.prototype.metadata=null},function(e,t,n){"use strict";n.d(t,"b",(function(){return r})),n.d(t,"a",(function(){return i})),n.d(t,"c",(function(){return o}));var r=1e-6,i="undefined"!=typeof Float32Array?Float32Array:Array,o=Math.random;Math.PI;Math.hypot||(Math.hypot=function(){for(var e=0,t=arguments.length;t--;)e+=arguments[t]*arguments[t];return Math.sqrt(e)})},function(e,t,n){"use strict";var r=n(3);Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"Base",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(t,"IconWrapper",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(t,"Add",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(t,"AnchorWindow",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(t,"ArrowDown",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(t,"ArrowDownAlt",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(t,"ArrowDownSolid",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(t,"ArrowLeft",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(t,"ArrowRight",{enumerable:!0,get:function(){return c.default}}),Object.defineProperty(t,"ArrowUpSolid",{enumerable:!0,get:function(){return d.default}}),Object.defineProperty(t,"ArrowUpAlt",{enumerable:!0,get:function(){return f.default}}),Object.defineProperty(t,"ArrowUp",{enumerable:!0,get:function(){return h.default}}),Object.defineProperty(t,"Bug",{enumerable:!0,get:function(){return p.default}}),Object.defineProperty(t,"Cancel",{enumerable:!0,get:function(){return A.default}}),Object.defineProperty(t,"Checkmark",{enumerable:!0,get:function(){return g.default}}),Object.defineProperty(t,"Clipboard",{enumerable:!0,get:function(){return m.default}}),Object.defineProperty(t,"Clock",{enumerable:!0,get:function(){return y.default}}),Object.defineProperty(t,"Close",{enumerable:!0,get:function(){return v.default}}),Object.defineProperty(t,"Copy",{enumerable:!0,get:function(){return b.default}}),Object.defineProperty(t,"Cube3d",{enumerable:!0,get:function(){return _.default}}),Object.defineProperty(t,"DataTable",{enumerable:!0,get:function(){return w.default}}),Object.defineProperty(t,"Db",{enumerable:!0,get:function(){return x.default}}),Object.defineProperty(t,"Delete",{enumerable:!0,get:function(){return M.default}}),Object.defineProperty(t,"Docs",{enumerable:!0,get:function(){return E.default}}),Object.defineProperty(t,"DragNDrop",{enumerable:!0,get:function(){return O.default}}),Object.defineProperty(t,"Email",{enumerable:!0,get:function(){return S.default}}),Object.defineProperty(t,"Expand",{enumerable:!0,get:function(){return T.default}}),Object.defineProperty(t,"EyeSeen",{enumerable:!0,get:function(){return C.default}}),Object.defineProperty(t,"EyeUnseen",{enumerable:!0,get:function(){return L.default}}),Object.defineProperty(t,"File",{enumerable:!0,get:function(){return P.default}}),Object.defineProperty(t,"Files",{enumerable:!0,get:function(){return I.default}}),Object.defineProperty(t,"FileType",{enumerable:!0,get:function(){return D.default}}),Object.defineProperty(t,"FilterFunnel",{enumerable:!0,get:function(){return k.default}}),Object.defineProperty(t,"FreeWindow",{enumerable:!0,get:function(){return R.default}}),Object.defineProperty(t,"Gear",{enumerable:!0,get:function(){return j.default}}),Object.defineProperty(t,"Hash",{enumerable:!0,get:function(){return F.default}}),Object.defineProperty(t,"Histogram",{enumerable:!0,get:function(){return N.default}}),Object.defineProperty(t,"Info",{enumerable:!0,get:function(){return B.default}}),Object.defineProperty(t,"Layers",{enumerable:!0,get:function(){return z.default}}),Object.defineProperty(t,"LeftArrow",{enumerable:!0,get:function(){return U.default}}),Object.defineProperty(t,"Legend",{enumerable:!0,get:function(){return H.default}}),Object.defineProperty(t,"LineChart",{enumerable:!0,get:function(){return V.default}}),Object.defineProperty(t,"Logout",{enumerable:!0,get:function(){return G.default}}),Object.defineProperty(t,"Login",{enumerable:!0,get:function(){return Y.default}}),Object.defineProperty(t,"Map",{enumerable:!0,get:function(){return W.default}}),Object.defineProperty(t,"MapIcon",{enumerable:!0,get:function(){return q.default}}),Object.defineProperty(t,"Minus",{enumerable:!0,get:function(){return X.default}}),Object.defineProperty(t,"Pause",{enumerable:!0,get:function(){return Z.default}}),Object.defineProperty(t,"Picture",{enumerable:!0,get:function(){return K.default}}),Object.defineProperty(t,"Play",{enumerable:!0,get:function(){return Q.default}}),Object.defineProperty(t,"Reduce",{enumerable:!0,get:function(){return J.default}}),Object.defineProperty(t,"Reset",{enumerable:!0,get:function(){return $.default}}),Object.defineProperty(t,"Rocket",{enumerable:!0,get:function(){return ee.default}}),Object.defineProperty(t,"Save",{enumerable:!0,get:function(){return te.default}}),Object.defineProperty(t,"Save2",{enumerable:!0,get:function(){return ne.default}}),Object.defineProperty(t,"Share",{enumerable:!0,get:function(){return re.default}}),Object.defineProperty(t,"SquareSelect",{enumerable:!0,get:function(){return ie.default}}),Object.defineProperty(t,"Settings",{enumerable:!0,get:function(){return oe.default}}),Object.defineProperty(t,"Search",{enumerable:!0,get:function(){return ae.default}}),Object.defineProperty(t,"Split",{enumerable:!0,get:function(){return se.default}}),Object.defineProperty(t,"Trash",{enumerable:!0,get:function(){return le.default}}),Object.defineProperty(t,"VertDots",{enumerable:!0,get:function(){return ue.default}}),Object.defineProperty(t,"VertThreeDots",{enumerable:!0,get:function(){return ce.default}}),Object.defineProperty(t,"CodeAlt",{enumerable:!0,get:function(){return de.default}}),Object.defineProperty(t,"Warning",{enumerable:!0,get:function(){return fe.default}}),Object.defineProperty(t,"WarningSign",{enumerable:!0,get:function(){return he.default}}),Object.defineProperty(t,"DrawPolygon",{enumerable:!0,get:function(){return pe.default}}),Object.defineProperty(t,"Polygon",{enumerable:!0,get:function(){return Ae.default}}),Object.defineProperty(t,"Rectangle",{enumerable:!0,get:function(){return ge.default}}),Object.defineProperty(t,"OrderByList",{enumerable:!0,get:function(){return me.default}}),Object.defineProperty(t,"OrderByDataset",{enumerable:!0,get:function(){return ye.default}}),Object.defineProperty(t,"Messages",{enumerable:!0,get:function(){return ve.default}}),Object.defineProperty(t,"Crosshairs",{enumerable:!0,get:function(){return be.default}}),Object.defineProperty(t,"CursorClick",{enumerable:!0,get:function(){return _e.default}}),Object.defineProperty(t,"CursorPoint",{enumerable:!0,get:function(){return we.default}}),Object.defineProperty(t,"Pin",{enumerable:!0,get:function(){return xe.default}}),Object.defineProperty(t,"Calendar",{enumerable:!0,get:function(){return Me.default}}),Object.defineProperty(t,"LocationMarker",{enumerable:!0,get:function(){return Ee.default}}),Object.defineProperty(t,"Globe",{enumerable:!0,get:function(){return Oe.default}}),Object.defineProperty(t,"Sun",{enumerable:!0,get:function(){return Se.default}}),Object.defineProperty(t,"Sunrise",{enumerable:!0,get:function(){return Te.default}}),Object.defineProperty(t,"Sunset",{enumerable:!0,get:function(){return Ce.default}}),Object.defineProperty(t,"Moon",{enumerable:!0,get:function(){return Le.default}}),Object.defineProperty(t,"ArrowDownSmall",{enumerable:!0,get:function(){return Pe.default}}),Object.defineProperty(t,"MagicWand",{enumerable:!0,get:function(){return Ie.default}}),Object.defineProperty(t,"LightAndShadowEffectIcon",{enumerable:!0,get:function(){return De.default}}),Object.defineProperty(t,"InkEffectIcon",{enumerable:!0,get:function(){return ke.default}}),Object.defineProperty(t,"BrightnessContrastEffectIcon",{enumerable:!0,get:function(){return Re.default}}),Object.defineProperty(t,"HueSaturationEffectIcon",{enumerable:!0,get:function(){return je.default}}),Object.defineProperty(t,"VibranceEffectIcon",{enumerable:!0,get:function(){return Fe.default}}),Object.defineProperty(t,"SepiaEffectIcon",{enumerable:!0,get:function(){return Ne.default}}),Object.defineProperty(t,"DotScreenEffectIcon",{enumerable:!0,get:function(){return Be.default}}),Object.defineProperty(t,"ColorHalftoneEffectIcon",{enumerable:!0,get:function(){return ze.default}}),Object.defineProperty(t,"NoiseEffectIcon",{enumerable:!0,get:function(){return Ue.default}}),Object.defineProperty(t,"TriangleBlurEffectIcon",{enumerable:!0,get:function(){return He.default}}),Object.defineProperty(t,"ZoomBlurEffectIcon",{enumerable:!0,get:function(){return Ve.default}}),Object.defineProperty(t,"TiltShiftEffectIcon",{enumerable:!0,get:function(){return Ge.default}}),Object.defineProperty(t,"EdgeWorkEffectIcon",{enumerable:!0,get:function(){return Ye.default}}),Object.defineProperty(t,"VignetteEffectIcon",{enumerable:!0,get:function(){return We.default}}),Object.defineProperty(t,"MagnifyEffectIcon",{enumerable:!0,get:function(){return qe.default}}),Object.defineProperty(t,"HexagonalPixelateEffectIcon",{enumerable:!0,get:function(){return Xe.default}});var i=r(n(23)),o=r(n(1434)),a=r(n(1435)),s=r(n(1436)),l=r(n(1437)),u=r(n(1438)),c=r(n(1439)),d=r(n(1440)),f=r(n(1441)),h=r(n(1442)),p=r(n(1443)),A=r(n(1444)),g=r(n(1445)),m=r(n(1446)),y=r(n(1447)),v=r(n(1448)),b=r(n(1449)),_=r(n(1450)),w=r(n(1451)),x=r(n(1452)),M=r(n(950)),E=r(n(1453)),O=r(n(1454)),S=r(n(1455)),T=r(n(1456)),C=r(n(1457)),L=r(n(1458)),P=r(n(1459)),I=r(n(1460)),D=r(n(1461)),k=r(n(1462)),R=r(n(1463)),j=r(n(1464)),F=r(n(1465)),N=r(n(1466)),B=r(n(1467)),z=r(n(1468)),U=r(n(1469)),H=r(n(1470)),V=r(n(1471)),G=r(n(1472)),Y=r(n(1473)),W=r(n(1474)),q=r(n(1475)),X=r(n(1476)),Z=r(n(1477)),K=r(n(1478)),Q=r(n(1479)),J=r(n(1480)),$=r(n(1481)),ee=r(n(1482)),te=r(n(1483)),ne=r(n(1484)),re=r(n(1485)),ie=r(n(1486)),oe=r(n(1487)),ae=r(n(1488)),se=r(n(1489)),le=r(n(1490)),ue=r(n(1491)),ce=r(n(1492)),de=r(n(1493)),fe=r(n(1494)),he=r(n(1495)),pe=r(n(1496)),Ae=r(n(1497)),ge=r(n(1498)),me=r(n(951)),ye=r(n(952)),ve=r(n(1499)),be=r(n(1500)),_e=r(n(1501)),we=r(n(1502)),xe=r(n(1503)),Me=r(n(1504)),Ee=r(n(1505)),Oe=r(n(1506)),Se=r(n(1507)),Te=r(n(1508)),Ce=r(n(1509)),Le=r(n(1510)),Pe=r(n(1511)),Ie=r(n(1512)),De=r(n(1513)),ke=r(n(1514)),Re=r(n(1515)),je=r(n(1516)),Fe=r(n(1517)),Ne=r(n(1518)),Be=r(n(1519)),ze=r(n(1520)),Ue=r(n(1521)),He=r(n(1522)),Ve=r(n(1523)),Ge=r(n(1524)),Ye=r(n(1525)),We=r(n(1526)),qe=r(n(1527)),Xe=r(n(1528))},function(e,t,n){var r=n(1201),i=n(694),o=n(562),a=n(1202);e.exports=function(e){return r(e)||i(e)||o(e)||a()},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),n.d(t,"e",(function(){return o})),n.d(t,"b",(function(){return a})),n.d(t,"d",(function(){return s})),n.d(t,"c",(function(){return l})),n.d(t,"g",(function(){return u})),n.d(t,"h",(function(){return c})),n.d(t,"i",(function(){return d})),n.d(t,"j",(function(){return f})),n.d(t,"f",(function(){return A}));var r=n(32);function i(e,t,n){return e[0]=t[0]+n[0],e[1]=t[1]+n[1],e}function o(e,t,n){return e[0]=t[0]*n,e[1]=t[1]*n,e}function a(e){var t=e[0],n=e[1];return Math.hypot(t,n)}function s(e,t){return e[0]=-t[0],e[1]=-t[1],e}function l(e,t,n,r){var i=t[0],o=t[1];return e[0]=i+r*(n[0]-i),e[1]=o+r*(n[1]-o),e}function u(e,t,n){var r=t[0],i=t[1];return e[0]=n[0]*r+n[2]*i,e[1]=n[1]*r+n[3]*i,e}function c(e,t,n){var r=t[0],i=t[1];return e[0]=n[0]*r+n[2]*i+n[4],e[1]=n[1]*r+n[3]*i+n[5],e}function d(e,t,n){var r=t[0],i=t[1];return e[0]=n[0]*r+n[3]*i+n[6],e[1]=n[1]*r+n[4]*i+n[7],e}function f(e,t,n){var r=t[0],i=t[1];return e[0]=n[0]*r+n[4]*i+n[12],e[1]=n[1]*r+n[5]*i+n[13],e}var h,p,A=function(e,t,n){return e[0]=t[0]-n[0],e[1]=t[1]-n[1],e};h=new r.a(2),r.a!=Float32Array&&(h[0]=0,h[1]=0),p=h},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var r={};n.r(r),n.d(r,"filename",(function(){return o})),n.d(r,"dirname",(function(){return a})),n.d(r,"join",(function(){return s})),n.d(r,"resolve",(function(){return l}));var i=n(1149);function o(e){const t=e?e.lastIndexOf("/"):-1;return t>=0?e.substr(t+1):""}function a(e){const t=e?e.lastIndexOf("/"):-1;return t>=0?e.substr(0,t):""}function s(){for(var e=arguments.length,t=new Array(e),n=0;n(n&&(e=e.replace(new RegExp("^"+r),"")),n!==t.length-1&&(e=e.replace(new RegExp(r+"$"),"")),e))).join(r)}function l(){const e=[];for(let t=0;t=-1&&!r;o--){let a;o>=0?a=e[o]:(void 0===t&&(t=Object(i.a)()),a=t),0!==a.length&&(n=`${a}/${n}`,r=a.charCodeAt(0)===u)}return n=c(n,!r),r?"/"+n:n.length>0?n:"."}const u=47;function c(e,t){let n,r="",i=-1,o=0,a=!1;for(let s=0;s<=e.length;++s){if(s2){const e=r.length-1;let t=e;for(;t>=0&&r.charCodeAt(t)!==u;--t);if(t!==e){r=-1===t?"":r.slice(0,t),i=s,o=0,a=!1;continue}}else if(2===r.length||1===r.length){r="",i=s,o=0,a=!1;continue}t&&(r.length>0?r+="/..":r="..",a=!0)}else{const t=e.slice(i+1,s);r.length>0?r+="/"+t:r=t,a=!1}i=s,o=0}else 46===n&&-1!==o?++o:o=-1}return r}},function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return X})),n.d(t,"WebMercatorViewport",(function(){return X})),n.d(t,"getBounds",(function(){return W})),n.d(t,"fitBounds",(function(){return G})),n.d(t,"normalizeViewportProps",(function(){return Z})),n.d(t,"flyToViewport",(function(){return J})),n.d(t,"getFlyToDuration",(function(){return $})),n.d(t,"MAX_LATITUDE",(function(){return S})),n.d(t,"lngLatToWorld",(function(){return P})),n.d(t,"worldToLngLat",(function(){return I})),n.d(t,"worldToPixels",(function(){return H})),n.d(t,"pixelsToWorld",(function(){return V})),n.d(t,"zoomToScale",(function(){return C})),n.d(t,"scaleToZoom",(function(){return L})),n.d(t,"altitudeToFovy",(function(){return z})),n.d(t,"fovyToAltitude",(function(){return U})),n.d(t,"getMeterZoom",(function(){return D})),n.d(t,"unitsPerMeter",(function(){return k})),n.d(t,"getDistanceScales",(function(){return R})),n.d(t,"addMetersToLngLat",(function(){return j})),n.d(t,"getViewMatrix",(function(){return F})),n.d(t,"getProjectionMatrix",(function(){return B})),n.d(t,"getProjectionParameters",(function(){return N}));var r=n(1),i=1e-6,o="undefined"!=typeof Float32Array?Float32Array:Array;Math.random;Math.PI;Math.hypot||(Math.hypot=function(){for(var e=0,t=arguments.length;t--;)e+=arguments[t]*arguments[t];return Math.sqrt(e)});var a,s;a=new o(4),o!=Float32Array&&(a[0]=0,a[1]=0,a[2]=0,a[3]=0),s=a;function l(e,t){const n=function(e,t,n){var r=t[0],i=t[1],o=t[2],a=t[3];return e[0]=n[0]*r+n[4]*i+n[8]*o+n[12]*a,e[1]=n[1]*r+n[5]*i+n[9]*o+n[13]*a,e[2]=n[2]*r+n[6]*i+n[10]*o+n[14]*a,e[3]=n[3]*r+n[7]*i+n[11]*o+n[15]*a,e}([],t,e);return function(e,t,n){e[0]=t[0]*n,e[1]=t[1]*n,e[2]=t[2]*n,e[3]=t[3]*n}(n,n,1/n[3]),n}function u(e,t){const n=e%t;return n<0?t+n:n}function c(e,t,n){return en?n:e}const d=Math.log2||function(e){return Math.log(e)*Math.LOG2E};function f(e,t,n){var r=t[0],i=t[1],o=t[2],a=t[3],s=t[4],l=t[5],u=t[6],c=t[7],d=t[8],f=t[9],h=t[10],p=t[11],A=t[12],g=t[13],m=t[14],y=t[15],v=n[0],b=n[1],_=n[2],w=n[3];return e[0]=v*r+b*s+_*d+w*A,e[1]=v*i+b*l+_*f+w*g,e[2]=v*o+b*u+_*h+w*m,e[3]=v*a+b*c+_*p+w*y,v=n[4],b=n[5],_=n[6],w=n[7],e[4]=v*r+b*s+_*d+w*A,e[5]=v*i+b*l+_*f+w*g,e[6]=v*o+b*u+_*h+w*m,e[7]=v*a+b*c+_*p+w*y,v=n[8],b=n[9],_=n[10],w=n[11],e[8]=v*r+b*s+_*d+w*A,e[9]=v*i+b*l+_*f+w*g,e[10]=v*o+b*u+_*h+w*m,e[11]=v*a+b*c+_*p+w*y,v=n[12],b=n[13],_=n[14],w=n[15],e[12]=v*r+b*s+_*d+w*A,e[13]=v*i+b*l+_*f+w*g,e[14]=v*o+b*u+_*h+w*m,e[15]=v*a+b*c+_*p+w*y,e}function h(e,t,n){var r,i,o,a,s,l,u,c,d,f,h,p,A=n[0],g=n[1],m=n[2];return t===e?(e[12]=t[0]*A+t[4]*g+t[8]*m+t[12],e[13]=t[1]*A+t[5]*g+t[9]*m+t[13],e[14]=t[2]*A+t[6]*g+t[10]*m+t[14],e[15]=t[3]*A+t[7]*g+t[11]*m+t[15]):(r=t[0],i=t[1],o=t[2],a=t[3],s=t[4],l=t[5],u=t[6],c=t[7],d=t[8],f=t[9],h=t[10],p=t[11],e[0]=r,e[1]=i,e[2]=o,e[3]=a,e[4]=s,e[5]=l,e[6]=u,e[7]=c,e[8]=d,e[9]=f,e[10]=h,e[11]=p,e[12]=r*A+s*g+d*m+t[12],e[13]=i*A+l*g+f*m+t[13],e[14]=o*A+u*g+h*m+t[14],e[15]=a*A+c*g+p*m+t[15]),e}function p(e,t,n){var r=n[0],i=n[1],o=n[2];return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e[3]=t[3]*r,e[4]=t[4]*i,e[5]=t[5]*i,e[6]=t[6]*i,e[7]=t[7]*i,e[8]=t[8]*o,e[9]=t[9]*o,e[10]=t[10]*o,e[11]=t[11]*o,e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}var A=function(e,t,n,r,i){var o,a=1/Math.tan(t/2);return e[0]=a/n,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=a,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[11]=-1,e[12]=0,e[13]=0,e[15]=0,null!=i&&i!==1/0?(o=1/(r-i),e[10]=(i+r)*o,e[14]=2*i*r*o):(e[10]=-1,e[14]=-2*r),e};function g(e,t){var n=e[0],r=e[1],o=e[2],a=e[3],s=e[4],l=e[5],u=e[6],c=e[7],d=e[8],f=e[9],h=e[10],p=e[11],A=e[12],g=e[13],m=e[14],y=e[15],v=t[0],b=t[1],_=t[2],w=t[3],x=t[4],M=t[5],E=t[6],O=t[7],S=t[8],T=t[9],C=t[10],L=t[11],P=t[12],I=t[13],D=t[14],k=t[15];return Math.abs(n-v)<=i*Math.max(1,Math.abs(n),Math.abs(v))&&Math.abs(r-b)<=i*Math.max(1,Math.abs(r),Math.abs(b))&&Math.abs(o-_)<=i*Math.max(1,Math.abs(o),Math.abs(_))&&Math.abs(a-w)<=i*Math.max(1,Math.abs(a),Math.abs(w))&&Math.abs(s-x)<=i*Math.max(1,Math.abs(s),Math.abs(x))&&Math.abs(l-M)<=i*Math.max(1,Math.abs(l),Math.abs(M))&&Math.abs(u-E)<=i*Math.max(1,Math.abs(u),Math.abs(E))&&Math.abs(c-O)<=i*Math.max(1,Math.abs(c),Math.abs(O))&&Math.abs(d-S)<=i*Math.max(1,Math.abs(d),Math.abs(S))&&Math.abs(f-T)<=i*Math.max(1,Math.abs(f),Math.abs(T))&&Math.abs(h-C)<=i*Math.max(1,Math.abs(h),Math.abs(C))&&Math.abs(p-L)<=i*Math.max(1,Math.abs(p),Math.abs(L))&&Math.abs(A-P)<=i*Math.max(1,Math.abs(A),Math.abs(P))&&Math.abs(g-I)<=i*Math.max(1,Math.abs(g),Math.abs(I))&&Math.abs(m-D)<=i*Math.max(1,Math.abs(m),Math.abs(D))&&Math.abs(y-k)<=i*Math.max(1,Math.abs(y),Math.abs(k))}function m(e,t,n){return e[0]=t[0]+n[0],e[1]=t[1]+n[1],e}function y(e){var t=e[0],n=e[1];return Math.hypot(t,n)}function v(e,t,n,r){var i=t[0],o=t[1];return e[0]=i+r*(n[0]-i),e[1]=o+r*(n[1]-o),e}var b=function(e,t,n){return e[0]=t[0]-n[0],e[1]=t[1]-n[1],e};!function(){var e=function(){var e=new o(2);return o!=Float32Array&&(e[0]=0,e[1]=0),e}()}();var _=function(e,t,n){return e[0]=t[0]*n[0],e[1]=t[1]*n[1],e[2]=t[2]*n[2],e};!function(){var e=function(){var e=new o(3);return o!=Float32Array&&(e[0]=0,e[1]=0,e[2]=0),e}()}();function w(e,t){if(!e)throw new Error(t||"@math.gl/web-mercator: assertion failed.")}const x=Math.PI,M=x/4,E=x/180,O=180/x,S=85.051129,T=1.5;function C(e){return Math.pow(2,e)}function L(e){return d(e)}function P(e){const[t,n]=e;w(Number.isFinite(t)),w(Number.isFinite(n)&&n>=-90&&n<=90,"invalid latitude");const r=n*E;return[512*(t*E+x)/(2*x),512*(x+Math.log(Math.tan(M+.5*r)))/(2*x)]}function I(e){const[t,n]=e,r=t/512*(2*x)-x,i=2*(Math.atan(Math.exp(n/512*(2*x)-x))-M);return[r*O,i*O]}function D(e){const{latitude:t}=e;w(Number.isFinite(t));return L(4003e4*Math.cos(t*E))-9}function k(e){return 512/4003e4/Math.cos(e*E)}function R(e){const{latitude:t,longitude:n,highPrecision:r=!1}=e;w(Number.isFinite(t)&&Number.isFinite(n));const i=Math.cos(t*E),o=512/360/i,a=512/4003e4/i,s={unitsPerMeter:[a,a,a],metersPerUnit:[1/a,1/a,1/a],unitsPerDegree:[512/360,o,a],degreesPerUnit:[.703125,1/o,1/a]};if(r){const e=E*Math.tan(t*E)/i,n=512/360*e/2,r=512/4003e4*e,l=r/o*a;s.unitsPerDegree2=[0,n,r],s.unitsPerMeter2=[l,0,l]}return s}function j(e,t){const[n,r,i]=e,[o,a,s]=t,{unitsPerMeter:l,unitsPerMeter2:u}=R({longitude:n,latitude:r,highPrecision:!0}),c=P(e);c[0]+=o*(l[0]+u[0]*a),c[1]+=a*(l[1]+u[1]*a);const d=I(c),f=(i||0)+(s||0);return Number.isFinite(i)||Number.isFinite(s)?[d[0],d[1],f]:d}function F(e){const{height:t,pitch:n,bearing:r,altitude:i,scale:o,center:a}=e,s=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];h(s,s,[0,0,-i]),function(e,t,n){var r=Math.sin(n),i=Math.cos(n),o=t[4],a=t[5],s=t[6],l=t[7],u=t[8],c=t[9],d=t[10],f=t[11];t!==e&&(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[4]=o*i+u*r,e[5]=a*i+c*r,e[6]=s*i+d*r,e[7]=l*i+f*r,e[8]=u*i-o*r,e[9]=c*i-a*r,e[10]=d*i-s*r,e[11]=f*i-l*r}(s,s,-n*E),function(e,t,n){var r=Math.sin(n),i=Math.cos(n),o=t[0],a=t[1],s=t[2],l=t[3],u=t[4],c=t[5],d=t[6],f=t[7];t!==e&&(e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[0]=o*i+u*r,e[1]=a*i+c*r,e[2]=s*i+d*r,e[3]=l*i+f*r,e[4]=u*i-o*r,e[5]=c*i-a*r,e[6]=d*i-s*r,e[7]=f*i-l*r}(s,s,r*E);const l=o/t;return p(s,s,[l,l,l]),a&&h(s,s,function(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e}([],a)),s}function N(e){const{width:t,height:n,altitude:r,pitch:i=0,offset:o,center:a,scale:s,nearZMultiplier:l=1,farZMultiplier:u=1}=e;let{fovy:d=z(T)}=e;void 0!==r&&(d=z(r));const f=d*E,h=i*E,p=U(d);let A=p;a&&(A+=a[2]*s/Math.cos(h)/n);const g=f*(.5+(o?o[1]:0)/n),m=Math.sin(g)*A/Math.sin(c(Math.PI/2-h-g,.01,Math.PI-.01)),y=Math.sin(h)*m+A,v=10*A;return{fov:f,aspect:t/n,focalDistance:p,near:l,far:Math.min(y*u,v)}}function B(e){const{fov:t,aspect:n,near:r,far:i}=N(e);return A([],t,n,r,i)}function z(e){return 2*Math.atan(.5/e)*O}function U(e){return.5/Math.tan(.5*e*E)}function H(e,t){const[n,r,i=0]=e;return w(Number.isFinite(n)&&Number.isFinite(r)&&Number.isFinite(i)),l(t,[n,r,i,1])}function V(e,t,n=0){const[r,i,o]=e;if(w(Number.isFinite(r)&&Number.isFinite(i),"invalid pixel coordinate"),Number.isFinite(o)){return l(t,[r,i,o,1])}const a=l(t,[r,i,0,1]),s=l(t,[r,i,1,1]),u=a[2],c=s[2];return v([],a,s,u===c?0:((n||0)-u)/(c-u))}function G(e){const{width:t,height:n,bounds:r,minExtent:i=0,maxZoom:o=24,offset:a=[0,0]}=e,[[s,l],[u,f]]=r,h=function(e=0){if("number"==typeof e)return{top:e,bottom:e,left:e,right:e};return w(Number.isFinite(e.top)&&Number.isFinite(e.bottom)&&Number.isFinite(e.left)&&Number.isFinite(e.right)),e}(e.padding),p=P([s,c(f,-S,S)]),A=P([u,c(l,-S,S)]),g=[Math.max(Math.abs(A[0]-p[0]),i),Math.max(Math.abs(A[1]-p[1]),i)],m=[t-h.left-h.right-2*Math.abs(a[0]),n-h.top-h.bottom-2*Math.abs(a[1])];w(m[0]>0&&m[1]>0);const y=m[0]/g[0],v=m[1]/g[1],b=(h.right-h.left)/2/y,_=(h.top-h.bottom)/2/v,x=I([(A[0]+p[0])/2+b,(A[1]+p[1])/2+_]),M=Math.min(o,d(Math.abs(Math.min(y,v))));return w(Number.isFinite(M)),{longitude:x[0],latitude:x[1],zoom:M}}const Y=Math.PI/180;function W(e,t=0){const{width:n,height:r,unproject:i}=e,o={targetZ:t},a=i([0,r],o),s=i([n,r],o);let l,u;return(e.fovy?.5*e.fovy*Y:Math.atan(.5/e.altitude))>(90-e.pitch)*Y-.01?(l=q(e,0,t),u=q(e,n,t)):(l=i([0,0],o),u=i([n,0],o)),[a,s,u,l]}function q(e,t,n){const{pixelUnprojectionMatrix:r}=e,i=l(r,[t,0,1,1]),o=l(r,[t,e.height,1,1]),a=I(v([],i,o,(n*e.distanceScales.unitsPerMeter[2]-i[2])/(o[2]-i[2])));return a.push(n),a}class X{constructor(e={width:1,height:1}){Object(r.a)(this,"latitude",void 0),Object(r.a)(this,"longitude",void 0),Object(r.a)(this,"zoom",void 0),Object(r.a)(this,"pitch",void 0),Object(r.a)(this,"bearing",void 0),Object(r.a)(this,"altitude",void 0),Object(r.a)(this,"fovy",void 0),Object(r.a)(this,"meterOffset",void 0),Object(r.a)(this,"center",void 0),Object(r.a)(this,"width",void 0),Object(r.a)(this,"height",void 0),Object(r.a)(this,"scale",void 0),Object(r.a)(this,"distanceScales",void 0),Object(r.a)(this,"viewMatrix",void 0),Object(r.a)(this,"projectionMatrix",void 0),Object(r.a)(this,"viewProjectionMatrix",void 0),Object(r.a)(this,"pixelProjectionMatrix",void 0),Object(r.a)(this,"pixelUnprojectionMatrix",void 0),Object(r.a)(this,"equals",e=>e instanceof X&&(e.width===this.width&&e.height===this.height&&g(e.projectionMatrix,this.projectionMatrix)&&g(e.viewMatrix,this.viewMatrix))),Object(r.a)(this,"project",(e,t={})=>{const{topLeft:n=!0}=t,r=H(this.projectPosition(e),this.pixelProjectionMatrix),[i,o]=r,a=n?o:this.height-o;return 2===e.length?[i,a]:[i,a,r[2]]}),Object(r.a)(this,"unproject",(e,t={})=>{const{topLeft:n=!0,targetZ:r}=t,[i,o,a]=e,s=n?o:this.height-o,l=r&&r*this.distanceScales.unitsPerMeter[2],u=V([i,s,a],this.pixelUnprojectionMatrix,l),[c,d,f]=this.unprojectPosition(u);return Number.isFinite(a)?[c,d,f]:Number.isFinite(r)?[c,d,r]:[c,d]}),Object(r.a)(this,"projectPosition",e=>{const[t,n]=P(e);return[t,n,(e[2]||0)*this.distanceScales.unitsPerMeter[2]]}),Object(r.a)(this,"unprojectPosition",e=>{const[t,n]=I(e);return[t,n,(e[2]||0)*this.distanceScales.metersPerUnit[2]]});let{width:t,height:n,altitude:i=null,fovy:o=null}=e;const{latitude:a=0,longitude:s=0,zoom:l=0,pitch:u=0,bearing:c=0,position:d=null,nearZMultiplier:f=.02,farZMultiplier:h=1.01}=e;t=t||1,n=n||1,null===o&&null===i?(i=T,o=z(i)):null===o?o=z(i):null===i&&(i=U(o));const p=C(l);i=Math.max(.75,i);const A=R({longitude:s,latitude:a}),m=P([s,a]);m.push(0),d&&function(e,t,n){e[0]=t[0]+n[0],e[1]=t[1]+n[1],e[2]=t[2]+n[2]}(m,m,_([],d,A.unitsPerMeter)),this.projectionMatrix=B({width:t,height:n,scale:p,center:m,pitch:u,fovy:o,nearZMultiplier:f,farZMultiplier:h}),this.viewMatrix=F({height:n,scale:p,center:m,pitch:u,bearing:c,altitude:i}),this.width=t,this.height=n,this.scale=p,this.latitude=a,this.longitude=s,this.zoom=l,this.pitch=u,this.bearing=c,this.altitude=i,this.fovy=o,this.center=m,this.meterOffset=d||[0,0,0],this.distanceScales=A,this._initMatrices(),Object.freeze(this)}_initMatrices(){const{width:e,height:t,projectionMatrix:n,viewMatrix:r}=this,i=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];f(i,i,n),f(i,i,r),this.viewProjectionMatrix=i;const o=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];p(o,o,[e/2,-t/2,1]),h(o,o,[1,-1,0]),f(o,o,i);const a=function(e,t){var n=t[0],r=t[1],i=t[2],o=t[3],a=t[4],s=t[5],l=t[6],u=t[7],c=t[8],d=t[9],f=t[10],h=t[11],p=t[12],A=t[13],g=t[14],m=t[15],y=n*s-r*a,v=n*l-i*a,b=n*u-o*a,_=r*l-i*s,w=r*u-o*s,x=i*u-o*l,M=c*A-d*p,E=c*g-f*p,O=c*m-h*p,S=d*g-f*A,T=d*m-h*A,C=f*m-h*g,L=y*C-v*T+b*S+_*O-w*E+x*M;return L?(L=1/L,e[0]=(s*C-l*T+u*S)*L,e[1]=(i*T-r*C-o*S)*L,e[2]=(A*x-g*w+m*_)*L,e[3]=(f*w-d*x-h*_)*L,e[4]=(l*O-a*C-u*E)*L,e[5]=(n*C-i*O+o*E)*L,e[6]=(g*b-p*x-m*v)*L,e[7]=(c*x-f*b+h*v)*L,e[8]=(a*T-s*O+u*M)*L,e[9]=(r*O-n*T-o*M)*L,e[10]=(p*w-A*b+m*y)*L,e[11]=(d*b-c*w-h*y)*L,e[12]=(s*E-a*S-l*M)*L,e[13]=(n*S-r*E+i*M)*L,e[14]=(A*v-p*_-g*y)*L,e[15]=(c*_-d*v+f*y)*L,e):null}([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],o);if(!a)throw new Error("Pixel project matrix not invertible");this.pixelProjectionMatrix=o,this.pixelUnprojectionMatrix=a}projectFlat(e){return P(e)}unprojectFlat(e){return I(e)}getMapCenterByLngLatPosition({lngLat:e,pos:t}){const n=V(t,this.pixelUnprojectionMatrix),r=m([],P(e),function(e,t){return e[0]=-t[0],e[1]=-t[1],e}([],n));return I(m([],this.center,r))}fitBounds(e,t={}){const{width:n,height:r}=this,{longitude:i,latitude:o,zoom:a}=G(Object.assign({width:n,height:r,bounds:e},t));return new X({width:n,height:r,longitude:i,latitude:o,zoom:a})}getBounds(e){const t=this.getBoundingRegion(e),n=Math.min(...t.map(e=>e[0])),r=Math.max(...t.map(e=>e[0]));return[[n,Math.min(...t.map(e=>e[1]))],[r,Math.max(...t.map(e=>e[1]))]]}getBoundingRegion(e={}){return W(this,e.z||0)}getLocationAtPoint({lngLat:e,pos:t}){return this.getMapCenterByLngLatPosition({lngLat:e,pos:t})}}function Z(e){const{width:t,height:n,pitch:r=0}=e;let{longitude:i,latitude:o,zoom:a,bearing:s=0}=e;(i<-180||i>180)&&(i=u(i+180,360)-180),(s<-180||s>180)&&(s=u(s+180,360)-180);const l=d(n/512);if(a<=l)a=l,o=0;else{const e=n/2/Math.pow(2,a),t=I([0,e])[1];if(ot&&(o=t)}}return{width:t,height:n,longitude:i,latitude:o,zoom:a,pitch:r,bearing:s}}const K=["longitude","latitude","zoom"],Q={curve:1.414,speed:1.2};function J(e,t,n,r){const{startZoom:i,startCenterXY:o,uDelta:a,w0:s,u1:l,S:u,rho:c,rho2:d,r0:f}=ee(e,t,r);if(l<.01){const r={};for(const i of K){const o=e[i],a=t[i];r[i]=(h=n)*a+(1-h)*o}return r}var h;const p=n*u,A=Math.cosh(f)/Math.cosh(f+c*p),g=s*((Math.cosh(f)*Math.tanh(f+c*p)-Math.sinh(f))/d)/l,y=i+L(1/A),v=function(e,t,n){return e[0]=t[0]*n,e[1]=t[1]*n,e}([],a,g);m(v,v,o);const b=I(v);return{longitude:b[0],latitude:b[1],zoom:y}}function $(e,t,n){const r={...Q,...n},{screenSpeed:i,speed:o,maxDuration:a}=r,{S:s,rho:l}=ee(e,t,r),u=1e3*s;let c;return c=Number.isFinite(i)?u/(i/l):u/o,Number.isFinite(a)&&c>a?0:c}function ee(e,t,n){const r=(n=Object.assign({},Q,n)).curve,i=e.zoom,o=[e.longitude,e.latitude],a=C(i),s=t.zoom,l=[t.longitude,t.latitude],u=C(s-i),c=P(o),d=P(l),f=b([],d,c),h=Math.max(e.width,e.height),p=h/u,A=y(f)*a,g=Math.max(A,.01),m=r*r,v=(p*p-h*h+m*m*g*g)/(2*h*m*g),_=(p*p-h*h-m*m*g*g)/(2*p*m*g),w=Math.log(Math.sqrt(v*v+1)-v),x=Math.log(Math.sqrt(_*_+1)-_);return{startZoom:i,startCenterXY:c,uDelta:f,w0:h,u1:A,S:(x-w)/r,rho:r,rho2:m,r0:w,r1:x}}},function(e,t,n){"use strict";n.d(t,"f",(function(){return o})),n.d(t,"h",(function(){return a})),n.d(t,"g",(function(){return s})),n.d(t,"d",(function(){return l})),n.d(t,"a",(function(){return u})),n.d(t,"e",(function(){return c})),n.d(t,"j",(function(){return d})),n.d(t,"b",(function(){return f})),n.d(t,"c",(function(){return h})),n.d(t,"i",(function(){return p})),n.d(t,"k",(function(){return A}));const r=e=>"boolean"==typeof e,i=e=>"function"==typeof e,o=e=>null!==e&&"object"==typeof e,a=e=>o(e)&&e.constructor==={}.constructor,s=e=>o(e)&&i(e.then),l=e=>Boolean(e)&&"function"==typeof e[Symbol.iterator],u=e=>e&&"function"==typeof e[Symbol.asyncIterator],c=e=>e&&i(e.next),d=e=>"undefined"!=typeof Response&&e instanceof Response||e&&e.arrayBuffer&&e.text&&e.json,f=e=>"undefined"!=typeof Blob&&e instanceof Blob,h=e=>e&&"object"==typeof e&&e.isBuffer,p=e=>(e=>"undefined"!=typeof ReadableStream&&e instanceof ReadableStream||o(e)&&i(e.tee)&&i(e.cancel)&&i(e.getReader))(e)||(e=>o(e)&&i(e.read)&&i(e.pipe)&&r(e.readable))(e),A=e=>(e=>o(e)&&i(e.abort)&&i(e.getWriter))(e)||(e=>o(e)&&i(e.end)&&i(e.write)&&r(e.writable))(e)},function(e,t,n){"use strict";n.d(t,"c",(function(){return i})),n.d(t,"i",(function(){return o})),n.d(t,"g",(function(){return a})),n.d(t,"a",(function(){return s})),n.d(t,"l",(function(){return l})),n.d(t,"m",(function(){return u})),n.d(t,"f",(function(){return c})),n.d(t,"d",(function(){return d})),n.d(t,"j",(function(){return f})),n.d(t,"t",(function(){return h})),n.d(t,"s",(function(){return p})),n.d(t,"u",(function(){return A})),n.d(t,"n",(function(){return g})),n.d(t,"o",(function(){return m})),n.d(t,"p",(function(){return y})),n.d(t,"b",(function(){return v})),n.d(t,"r",(function(){return _})),n.d(t,"k",(function(){return w})),n.d(t,"e",(function(){return x})),n.d(t,"h",(function(){return M})),n.d(t,"q",(function(){return E}));var r=n(32);function i(){var e=new r.a(3);return r.a!=Float32Array&&(e[0]=0,e[1]=0,e[2]=0),e}function o(e){var t=e[0],n=e[1],r=e[2];return Math.hypot(t,n,r)}function a(e,t,n){var i=new r.a(3);return i[0]=e,i[1]=t,i[2]=n,i}function s(e,t,n){return e[0]=t[0]+n[0],e[1]=t[1]+n[1],e[2]=t[2]+n[2],e}function l(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e}function u(e,t){var n=t[0],r=t[1],i=t[2],o=n*n+r*r+i*i;return o>0&&(o=1/Math.sqrt(o)),e[0]=t[0]*o,e[1]=t[1]*o,e[2]=t[2]*o,e}function c(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function d(e,t,n){var r=t[0],i=t[1],o=t[2],a=n[0],s=n[1],l=n[2];return e[0]=i*l-o*s,e[1]=o*a-r*l,e[2]=r*s-i*a,e}function f(e,t,n,r){var i=t[0],o=t[1],a=t[2];return e[0]=i+r*(n[0]-i),e[1]=o+r*(n[1]-o),e[2]=a+r*(n[2]-a),e}function h(e,t,n){var r=t[0],i=t[1],o=t[2],a=n[3]*r+n[7]*i+n[11]*o+n[15];return a=a||1,e[0]=(n[0]*r+n[4]*i+n[8]*o+n[12])/a,e[1]=(n[1]*r+n[5]*i+n[9]*o+n[13])/a,e[2]=(n[2]*r+n[6]*i+n[10]*o+n[14])/a,e}function p(e,t,n){var r=t[0],i=t[1],o=t[2];return e[0]=r*n[0]+i*n[3]+o*n[6],e[1]=r*n[1]+i*n[4]+o*n[7],e[2]=r*n[2]+i*n[5]+o*n[8],e}function A(e,t,n){var r=n[0],i=n[1],o=n[2],a=n[3],s=t[0],l=t[1],u=t[2],c=i*u-o*l,d=o*s-r*u,f=r*l-i*s,h=i*f-o*d,p=o*c-r*f,A=r*d-i*c,g=2*a;return c*=g,d*=g,f*=g,h*=2,p*=2,A*=2,e[0]=s+c+h,e[1]=l+d+p,e[2]=u+f+A,e}function g(e,t,n,r){var i=[],o=[];return i[0]=t[0]-n[0],i[1]=t[1]-n[1],i[2]=t[2]-n[2],o[0]=i[0],o[1]=i[1]*Math.cos(r)-i[2]*Math.sin(r),o[2]=i[1]*Math.sin(r)+i[2]*Math.cos(r),e[0]=o[0]+n[0],e[1]=o[1]+n[1],e[2]=o[2]+n[2],e}function m(e,t,n,r){var i=[],o=[];return i[0]=t[0]-n[0],i[1]=t[1]-n[1],i[2]=t[2]-n[2],o[0]=i[2]*Math.sin(r)+i[0]*Math.cos(r),o[1]=i[1],o[2]=i[2]*Math.cos(r)-i[0]*Math.sin(r),e[0]=o[0]+n[0],e[1]=o[1]+n[1],e[2]=o[2]+n[2],e}function y(e,t,n,r){var i=[],o=[];return i[0]=t[0]-n[0],i[1]=t[1]-n[1],i[2]=t[2]-n[2],o[0]=i[0]*Math.cos(r)-i[1]*Math.sin(r),o[1]=i[0]*Math.sin(r)+i[1]*Math.cos(r),o[2]=i[2],e[0]=o[0]+n[0],e[1]=o[1]+n[1],e[2]=o[2]+n[2],e}function v(e,t){var n=e[0],r=e[1],i=e[2],o=t[0],a=t[1],s=t[2],l=Math.sqrt(n*n+r*r+i*i)*Math.sqrt(o*o+a*a+s*s),u=l&&c(e,t)/l;return Math.acos(Math.min(Math.max(u,-1),1))}var b,_=function(e,t,n){return e[0]=t[0]-n[0],e[1]=t[1]-n[1],e[2]=t[2]-n[2],e},w=function(e,t,n){return e[0]=t[0]*n[0],e[1]=t[1]*n[1],e[2]=t[2]*n[2],e},x=function(e,t){var n=t[0]-e[0],r=t[1]-e[1],i=t[2]-e[2];return Math.hypot(n,r,i)},M=o,E=function(e){var t=e[0],n=e[1],r=e[2];return t*t+n*n+r*r};b=i()},function(e,t,n){"use strict";n.d(t,"f",(function(){return r})),n.d(t,"d",(function(){return i})),n.d(t,"g",(function(){return o})),n.d(t,"e",(function(){return a})),n.d(t,"a",(function(){return s})),n.d(t,"b",(function(){return l})),n.d(t,"c",(function(){return u}));const r={NO_STATE:"Awaiting state",MATCHED:"Matched. State transferred from previous layer",INITIALIZED:"Initialized",AWAITING_GC:"Discarded. Awaiting garbage collection",AWAITING_FINALIZATION:"No longer matched. Awaiting garbage collection",FINALIZED:"Finalized! Awaiting garbage collection"},i=Symbol.for("component"),o=Symbol.for("propTypes"),a=Symbol.for("deprecatedProps"),s=Symbol.for("asyncPropDefaults"),l=Symbol.for("asyncPropOriginal"),u=Symbol.for("asyncPropResolved")},function(e,t,n){"use strict";var r,i=n(3)(n(71)); +/*! + Copyright (c) 2017 Jed Watson. + Licensed under the MIT License (MIT), see + http://jedwatson.github.io/classnames +*/ +!function(){var o={}.hasOwnProperty;function a(){for(var e=[],t=0;te*i,t)}function u(e,t){return h(e,e=>e*r,t)}function c(e,t,n){return h(e,e=>Math.max(t,Math.min(n,e)))}function d(e,t,n){return s(e)?e.map((e,r)=>d(e,t[r],n)):n*t+(1-n)*e}function f(e,t,n){const r=o.EPSILON;n&&(o.EPSILON=n);try{if(e===t)return!0;if(s(e)&&s(t)){if(e.length!==t.length)return!1;for(let n=0;n"number"==typeof e,i=e=>"boolean"==typeof e,o=e=>"function"==typeof e,a=e=>null!=e&&Object(e)===e,s=e=>a(e)&&o(e.then),l=e=>a(e)&&o(e[Symbol.iterator]),u=e=>a(e)&&o(e[Symbol.asyncIterator]),c=e=>a(e)&&a(e.schema),d=e=>a(e)&&"done"in e&&"value"in e,f=e=>a(e)&&o(e.stat)&&r(e.fd),h=e=>a(e)&&g(e.body),p=e=>"_getDOMStream"in e&&"_getNodeStream"in e,A=e=>a(e)&&o(e.abort)&&o(e.getWriter)&&!p(e),g=e=>a(e)&&o(e.cancel)&&o(e.getReader)&&!p(e),m=e=>a(e)&&o(e.end)&&o(e.write)&&i(e.writable)&&!p(e),y=e=>a(e)&&o(e.read)&&o(e.pipe)&&i(e.readable)&&!p(e),v=e=>a(e)&&o(e.clear)&&o(e.bytes)&&o(e.position)&&o(e.setPosition)&&o(e.capacity)&&o(e.getBufferIdentifier)&&o(e.createLong)},function(e,t,n){"use strict";t.a=function(e){return function(){return e}}},function(e,t,n){"use strict";n.d(t,"f",(function(){return A})),n.d(t,"d",(function(){return g})),n.d(t,"e",(function(){return m})),n.d(t,"i",(function(){return y})),n.d(t,"g",(function(){return v})),n.d(t,"h",(function(){return b})),n.d(t,"b",(function(){return M})),n.d(t,"c",(function(){return E})),n.d(t,"a",(function(){return O}));var r=n(1);let i,o,a,s,l,u,c,d,f=function(e){return e[e.NONE=0]="NONE",e[e.Null=1]="Null",e[e.Int=2]="Int",e[e.Float=3]="Float",e[e.Binary=4]="Binary",e[e.Utf8=5]="Utf8",e[e.Bool=6]="Bool",e[e.Decimal=7]="Decimal",e[e.Date=8]="Date",e[e.Time=9]="Time",e[e.Timestamp=10]="Timestamp",e[e.Interval=11]="Interval",e[e.List=12]="List",e[e.Struct=13]="Struct",e[e.Union=14]="Union",e[e.FixedSizeBinary=15]="FixedSizeBinary",e[e.FixedSizeList=16]="FixedSizeList",e[e.Map=17]="Map",e[e.Dictionary=-1]="Dictionary",e[e.Int8=-2]="Int8",e[e.Int16=-3]="Int16",e[e.Int32=-4]="Int32",e[e.Int64=-5]="Int64",e[e.Uint8=-6]="Uint8",e[e.Uint16=-7]="Uint16",e[e.Uint32=-8]="Uint32",e[e.Uint64=-9]="Uint64",e[e.Float16=-10]="Float16",e[e.Float32=-11]="Float32",e[e.Float64=-12]="Float64",e[e.DateDay=-13]="DateDay",e[e.DateMillisecond=-14]="DateMillisecond",e[e.TimestampSecond=-15]="TimestampSecond",e[e.TimestampMillisecond=-16]="TimestampMillisecond",e[e.TimestampMicrosecond=-17]="TimestampMicrosecond",e[e.TimestampNanosecond=-18]="TimestampNanosecond",e[e.TimeSecond=-19]="TimeSecond",e[e.TimeMillisecond=-20]="TimeMillisecond",e[e.TimeMicrosecond=-21]="TimeMicrosecond",e[e.TimeNanosecond=-22]="TimeNanosecond",e[e.DenseUnion=-23]="DenseUnion",e[e.SparseUnion=-24]="SparseUnion",e[e.IntervalDayTime=-25]="IntervalDayTime",e[e.IntervalYearMonth=-26]="IntervalYearMonth",e}({});class h{static isNull(e){return e&&e.typeId===f.Null}static isInt(e){return e&&e.typeId===f.Int}static isFloat(e){return e&&e.typeId===f.Float}static isBinary(e){return e&&e.typeId===f.Binary}static isUtf8(e){return e&&e.typeId===f.Utf8}static isBool(e){return e&&e.typeId===f.Bool}static isDecimal(e){return e&&e.typeId===f.Decimal}static isDate(e){return e&&e.typeId===f.Date}static isTime(e){return e&&e.typeId===f.Time}static isTimestamp(e){return e&&e.typeId===f.Timestamp}static isInterval(e){return e&&e.typeId===f.Interval}static isList(e){return e&&e.typeId===f.List}static isStruct(e){return e&&e.typeId===f.Struct}static isUnion(e){return e&&e.typeId===f.Union}static isFixedSizeBinary(e){return e&&e.typeId===f.FixedSizeBinary}static isFixedSizeList(e){return e&&e.typeId===f.FixedSizeList}static isMap(e){return e&&e.typeId===f.Map}static isDictionary(e){return e&&e.typeId===f.Dictionary}get typeId(){return f.NONE}compareTo(e){return this===e}}Symbol.toStringTag;Symbol.toStringTag;i=Symbol.toStringTag;class p extends h{constructor(e,t){super(),Object(r.a)(this,"isSigned",void 0),Object(r.a)(this,"bitWidth",void 0),this.isSigned=e,this.bitWidth=t}get typeId(){return f.Int}get[i](){return"Int"}toString(){return"".concat(this.isSigned?"I":"Ui","nt").concat(this.bitWidth)}}class A extends p{constructor(){super(!0,8)}}class g extends p{constructor(){super(!0,16)}}class m extends p{constructor(){super(!0,32)}}class y extends p{constructor(){super(!1,8)}}class v extends p{constructor(){super(!1,16)}}class b extends p{constructor(){super(!1,32)}}const _=32,w=64;o=Symbol.toStringTag;class x extends h{constructor(e){super(),Object(r.a)(this,"precision",void 0),this.precision=e}get typeId(){return f.Float}get[o](){return"Float"}toString(){return"Float".concat(this.precision)}}class M extends x{constructor(){super(_)}}class E extends x{constructor(){super(w)}}Symbol.toStringTag;Symbol.toStringTag;a=Symbol.toStringTag;s=Symbol.toStringTag;l=Symbol.toStringTag;u=Symbol.toStringTag;c=Symbol.toStringTag;class O extends h{constructor(e,t){super(),Object(r.a)(this,"listSize",void 0),Object(r.a)(this,"children",void 0),this.listSize=e,this.children=[t]}get typeId(){return f.FixedSizeList}get valueType(){return this.children[0].type}get valueField(){return this.children[0]}get[c](){return"FixedSizeList"}toString(){return"FixedSizeList[".concat(this.listSize,"]<").concat(this.valueType,">")}}d=Symbol.toStringTag},function(e,t){e.exports=n},function(e,t,n){"use strict";n.d(t,"a",(function(){return g})),n.d(t,"b",(function(){return y}));var r,i=n(5),o=n(230),a=n(12),s=n(38),l=n(88),u=n(117),c=n(66),d=n(311),f=n(362),h=n(312);const p={},A={};class g{constructor(e){var t,n,r;const i=e[0]instanceof g?e.flatMap(e=>e.data):e;if(0===i.length||i.some(e=>!(e instanceof s.a)))throw new TypeError("Vector constructor expects an Array of Data instances.");const o=null===(t=i[0])||void 0===t?void 0:t.type;switch(i.length){case 0:this._offsets=[0];break;case 1:{const{get:e,set:t,indexOf:n,byteLength:r}=p[o.typeId],a=i[0];this.isValid=e=>Object(l.d)(a,e),this.get=t=>e(a,t),this.set=(e,n)=>t(a,e,n),this.indexOf=e=>n(a,e),this.getByteLength=e=>r(a,e),this._offsets=[0,a.length];break}default:Object.setPrototypeOf(this,A[o.typeId]),this._offsets=Object(l.c)(i)}this.data=i,this.type=o,this.stride=Object(a.S)(o),this.numChildren=null!==(r=null===(n=o.children)||void 0===n?void 0:n.length)&&void 0!==r?r:0,this.length=this._offsets.at(-1)}get byteLength(){return-1===this._byteLength&&(this._byteLength=this.data.reduce((e,t)=>e+t.byteLength,0)),this._byteLength}get nullCount(){return-1===this._nullCount&&(this._nullCount=Object(l.b)(this.data)),this._nullCount}get ArrayType(){return this.type.ArrayType}get[Symbol.toStringTag](){return`${this.VectorName}<${this.type[Symbol.toStringTag]}>`}get VectorName(){return i.h[this.type.typeId]+"Vector"}isValid(e){return!1}get(e){return null}set(e,t){}indexOf(e,t){return-1}includes(e,t){return this.indexOf(e,t)>0}getByteLength(e){return 0}[Symbol.iterator](){return f.a.visit(this)}concat(...e){return new g(this.data.concat(e.flatMap(e=>e.data).flat(Number.POSITIVE_INFINITY)))}slice(e,t){return new g(Object(o.clampRange)(this,e,t,({data:e,_offsets:t},n,r)=>Object(l.e)(e,t,n,r)))}toJSON(){return[...this]}toArray(){const{type:e,data:t,length:n,stride:r,ArrayType:o}=this;switch(e.typeId){case i.h.Int:case i.h.Float:case i.h.Decimal:case i.h.Time:case i.h.Timestamp:switch(t.length){case 0:return new o;case 1:return t[0].values.subarray(0,n*r);default:return t.reduce((e,{values:t,length:n})=>(e.array.set(t.subarray(0,n*r),e.offset),e.offset+=n*r,e),{array:new o(n*r),offset:0}).array}}return[...this]}toString(){return`[${[...this].join(",")}]`}getChild(e){var t;return this.getChildAt(null===(t=this.type.children)||void 0===t?void 0:t.findIndex(t=>t.name===e))}getChildAt(e){return e>-1&&et[e])):null}get isMemoized(){return!!a.c.isDictionary(this.type)&&this.data[0].dictionary.isMemoized}memoize(){if(a.c.isDictionary(this.type)){const e=new m(this.data[0].dictionary),t=this.data.map(t=>{const n=t.clone();return n.dictionary=e,n});return new g(t)}return new m(this)}unmemoize(){if(a.c.isDictionary(this.type)&&this.isMemoized){const e=this.data[0].dictionary.unmemoize(),t=this.data.map(t=>{const n=t.clone();return n.dictionary=e,n});return new g(t)}return this}}r=Symbol.toStringTag,g[r]=(e=>{e.type=a.c.prototype,e.data=[],e.length=0,e.stride=1,e.numChildren=0,e._nullCount=-1,e._byteLength=-1,e._offsets=new Uint32Array([0]),e[Symbol.isConcatSpreadable]=!0;const t=Object.keys(i.h).map(e=>i.h[e]).filter(e=>"number"==typeof e&&e!==i.h.NONE);for(const n of t){const t=u.a.getVisitFnByTypeId(n),r=c.a.getVisitFnByTypeId(n),i=d.a.getVisitFnByTypeId(n),o=h.a.getVisitFnByTypeId(n);p[n]={get:t,set:r,indexOf:i,byteLength:o},A[n]=Object.create(e,{isValid:{value:Object(l.f)(l.d)},get:{value:Object(l.f)(u.a.getVisitFnByTypeId(n))},set:{value:Object(l.g)(c.a.getVisitFnByTypeId(n))},indexOf:{value:Object(l.h)(d.a.getVisitFnByTypeId(n))},getByteLength:{value:Object(l.f)(h.a.getVisitFnByTypeId(n))}})}return"Vector"})(g.prototype);class m extends g{constructor(e){super(e.data);const t=this.get,n=this.set,r=this.slice,i=new Array(this.length);Object.defineProperty(this,"get",{value(e){const n=i[e];if(void 0!==n)return n;const r=t.call(this,e);return i[e]=r,r}}),Object.defineProperty(this,"set",{value(e,t){n.call(this,e,t),i[e]=t}}),Object.defineProperty(this,"slice",{value:(e,t)=>new m(r.call(this,e,t))}),Object.defineProperty(this,"isMemoized",{value:!0}),Object.defineProperty(this,"unmemoize",{value:()=>new g(this.data)}),Object.defineProperty(this,"memoize",{value:()=>this})}}function y(e){if(e){if(e instanceof s.a)return new g([e]);if(e instanceof g)return new g(e.data);if(e.type instanceof a.c)return new g([Object(s.b)(e)]);if(Array.isArray(e))return new g(e.flatMap(e=>{return(t=e)instanceof s.a?[t]:t instanceof g?t.data:y(t).data;var t}));if(ArrayBuffer.isView(e)){e instanceof DataView&&(e=new Uint8Array(e.buffer));const t={offset:0,length:e.length,nullCount:0,data:e};if(e instanceof Int8Array)return new g([Object(s.b)(Object.assign(Object.assign({},t),{type:new a.t}))]);if(e instanceof Int16Array)return new g([Object(s.b)(Object.assign(Object.assign({},t),{type:new a.q}))]);if(e instanceof Int32Array)return new g([Object(s.b)(Object.assign(Object.assign({},t),{type:new a.r}))]);if(e instanceof BigInt64Array)return new g([Object(s.b)(Object.assign(Object.assign({},t),{type:new a.s}))]);if(e instanceof Uint8Array||e instanceof Uint8ClampedArray)return new g([Object(s.b)(Object.assign(Object.assign({},t),{type:new a.P}))]);if(e instanceof Uint16Array)return new g([Object(s.b)(Object.assign(Object.assign({},t),{type:new a.M}))]);if(e instanceof Uint32Array)return new g([Object(s.b)(Object.assign(Object.assign({},t),{type:new a.N}))]);if(e instanceof BigUint64Array)return new g([Object(s.b)(Object.assign(Object.assign({},t),{type:new a.O}))]);if(e instanceof Float32Array)return new g([Object(s.b)(Object.assign(Object.assign({},t),{type:new a.n}))]);if(e instanceof Float64Array)return new g([Object(s.b)(Object.assign(Object.assign({},t),{type:new a.o}))]);throw new Error("Unrecognized input")}}throw new Error("Unrecognized input")}},function(e,t,n){"use strict";function r(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return c})),n.d(t,"b",(function(){return d})),n.d(t,"c",(function(){return f}));var r=n(59),i=n(38),o=n(228),a=n(12),s=n(236);function l(e){if(!e||e.length<=0)return function(e){return!0};let t="";const n=e.filter(e=>e==e);return n.length>0&&(t=`\n switch (x) {${n.map(e=>`\n case ${function(e){if("bigint"!=typeof e)return Object(s.a)(e);return Object(s.a)(e)+"n"}(e)}:`).join("")}\n return false;\n }`),e.length!==n.length&&(t="if (x !== x) return false;\n"+t),new Function("x",t+"\nreturn true;")}var u=n(137);class c{static throughNode(e){throw new Error('"throughNode" not available in this environment')}static throughDOM(e){throw new Error('"throughDOM" not available in this environment')}constructor({type:e,nullValues:t}){this.length=0,this.finished=!1,this.type=e,this.children=[],this.nullValues=t,this.stride=Object(a.S)(e),this._nulls=new u.a,t&&t.length>0&&(this._isValid=l(t))}toVector(){return new r.a([this.flush()])}get ArrayType(){return this.type.ArrayType}get nullCount(){return this._nulls.numInvalid}get numChildren(){return this.children.length}get byteLength(){let e=0;const{_offsets:t,_values:n,_nulls:r,_typeIds:i,children:o}=this;return t&&(e+=t.byteLength),n&&(e+=n.byteLength),r&&(e+=r.byteLength),i&&(e+=i.byteLength),o.reduce((e,t)=>e+t.byteLength,e)}get reservedLength(){return this._nulls.reservedLength}get reservedByteLength(){let e=0;return this._offsets&&(e+=this._offsets.reservedByteLength),this._values&&(e+=this._values.reservedByteLength),this._nulls&&(e+=this._nulls.reservedByteLength),this._typeIds&&(e+=this._typeIds.reservedByteLength),this.children.reduce((e,t)=>e+t.reservedByteLength,e)}get valueOffsets(){return this._offsets?this._offsets.buffer:null}get values(){return this._values?this._values.buffer:null}get nullBitmap(){return this._nulls?this._nulls.buffer:null}get typeIds(){return this._typeIds?this._typeIds.buffer:null}append(e){return this.set(this.length,e)}isValid(e){return this._isValid(e)}set(e,t){return this.setValid(e,this.isValid(t))&&this.setValue(e,t),this}setValue(e,t){this._setValue(this,e,t)}setValid(e,t){return this.length=this._nulls.set(e,+t).length,t}addChild(e,t=""+this.numChildren){throw new Error(`Cannot append children to non-nested type "${this.type}"`)}getChildAt(e){return this.children[e]||null}flush(){let e,t,n,r;const{type:o,length:a,nullCount:s,_typeIds:l,_offsets:u,_values:c,_nulls:d}=this;(t=null==l?void 0:l.flush(a))?r=null==u?void 0:u.flush(a):e=(r=null==u?void 0:u.flush(a))?null==c?void 0:c.flush(u.last()):null==c?void 0:c.flush(a),s>0&&(n=null==d?void 0:d.flush(a));const f=this.children.map(e=>e.flush());return this.clear(),Object(i.b)({type:o,length:a,nullCount:s,children:f,child:f[0],data:e,typeIds:t,nullBitmap:n,valueOffsets:r})}finish(){this.finished=!0;for(const e of this.children)e.finish();return this}clear(){var e,t,n,r;this.length=0,null===(e=this._nulls)||void 0===e||e.clear(),null===(t=this._values)||void 0===t||t.clear(),null===(n=this._offsets)||void 0===n||n.clear(),null===(r=this._typeIds)||void 0===r||r.clear();for(const e of this.children)e.clear();return this}}c.prototype.length=1,c.prototype.stride=1,c.prototype.children=null,c.prototype.finished=!1,c.prototype.nullValues=null,c.prototype._isValid=()=>!0;class d extends c{constructor(e){super(e),this._values=new u.c(new this.ArrayType(0),this.stride)}setValue(e,t){const n=this._values;return n.reserve(e-n.length+1),super.setValue(e,t)}}class f extends c{constructor(e){super(e),this._pendingLength=0,this._offsets=new u.d}setValue(e,t){const n=this._pending||(this._pending=new Map),r=n.get(e);r&&(this._pendingLength-=r.length),this._pendingLength+=t instanceof o.a?t[o.b].length:t.length,n.set(e,t)}setValid(e,t){return!!super.setValid(e,t)||((this._pending||(this._pending=new Map)).set(e,void 0),!1)}clear(){return this._pendingLength=0,this._pending=void 0,super.clear()}flush(){return this._flush(),super.flush()}finish(){return this._flush(),super.finish()}_flush(){const e=this._pending,t=this._pendingLength;return this._pendingLength=0,this._pending=void 0,e&&e.size>0&&this._flushPending(e,t),this}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return o})),n.d(t,"c",(function(){return s}));var r=n(118);function i(e){if(!Number.isFinite(e))throw new Error("Invalid number ".concat(e));return e}function o(e,t,n=""){if(r.b.debug&&!function(e,t){if(e.length!==t)return!1;for(let t=0;tu||h>c||p>d)return l=i,u=n,c=h,d=p,void(a=0);var A=Object(r.lineString)([l,i],e.properties);if(!1===t(A,n,o,p,a))return!1;a++,l=i}))&&void 0}}}))}function g(e,t,n){var r=n,i=!1;return A(e,(function(e,o,a,s,l){r=!1===i&&void 0===n?e:t(r,e,o,a,s,l),i=!0})),r}function m(e,t){if(!e)throw new Error("geojson is required");h(e,(function(e,n,i){if(null!==e.geometry){var o=e.geometry.type,a=e.geometry.coordinates;switch(o){case"LineString":if(!1===t(e,n,i,0,0))return!1;break;case"Polygon":for(var s=0;s{if(t.setValid(n,null!=r))return e(t,n,r)}}const c=(e,t,n)=>{e[t]=Math.trunc(n%4294967296),e[t+1]=Math.trunc(n/4294967296)},d=(e,t,n,r)=>{if(n+1{e[t]=n},h=({values:e},t,n)=>{e[t]=n},p=({values:e},t,n)=>{e[t]=Object(a.float64ToUint16)(n)},A=({values:e},t,n)=>{((e,t,n)=>{e[t]=Math.trunc(n/864e5)})(e,t,n.valueOf())},g=({values:e},t,n)=>{c(e,2*t,n.valueOf())},m=({stride:e,values:t},n,r)=>{t.set(r.subarray(0,e),e*n)},y=(e,t,n)=>{e.type.unit===s.b.DAY?A(e,t,n):g(e,t,n)},v=({values:e},t,n)=>c(e,2*t,n/1e3),b=({values:e},t,n)=>c(e,2*t,n),_=({values:e},t,n)=>((e,t,n)=>{e[t]=Math.trunc(1e3*n%4294967296),e[t+1]=Math.trunc(1e3*n/4294967296)})(e,2*t,n),w=({values:e},t,n)=>((e,t,n)=>{e[t]=Math.trunc(1e6*n%4294967296),e[t+1]=Math.trunc(1e6*n/4294967296)})(e,2*t,n),x=(e,t,n)=>{switch(e.type.unit){case s.g.SECOND:return v(e,t,n);case s.g.MILLISECOND:return b(e,t,n);case s.g.MICROSECOND:return _(e,t,n);case s.g.NANOSECOND:return w(e,t,n)}},M=({values:e},t,n)=>{e[t]=n},E=({values:e},t,n)=>{e[t]=n},O=({values:e},t,n)=>{e[t]=n},S=({values:e},t,n)=>{e[t]=n},T=(e,t,n)=>{switch(e.type.unit){case s.g.SECOND:return M(e,t,n);case s.g.MILLISECOND:return E(e,t,n);case s.g.MICROSECOND:return O(e,t,n);case s.g.NANOSECOND:return S(e,t,n)}},C=({values:e,stride:t},n,r)=>{e.set(r.subarray(0,t),t*n)},L=(e,t,n)=>{const r=e.type.typeIdToChildIndex[e.typeIds[t]],i=e.children[r];R.visit(i,e.valueOffsets[t],n)},P=(e,t,n)=>{const r=e.type.typeIdToChildIndex[e.typeIds[t]],i=e.children[r];R.visit(i,t,n)},I=(e,t,n)=>{e.type.unit===s.c.DAY_TIME?D(e,t,n):k(e,t,n)},D=({values:e},t,n)=>{e.set(n.subarray(0,2),2*t)},k=({values:e},t,n)=>{e[t]=12*n[0]+n[1]%12};l.prototype.visitBool=u(({offset:e,values:t},n,r)=>{const i=e+n;r?t[i>>3]|=1<>3]&=~(1<{switch(e.type.precision){case s.f.HALF:return p(e,t,n);case s.f.SINGLE:case s.f.DOUBLE:return h(e,t,n)}}),l.prototype.visitFloat16=u(p),l.prototype.visitFloat32=u(h),l.prototype.visitFloat64=u(h),l.prototype.visitUtf8=u(({values:e,valueOffsets:t},n,r)=>{d(e,t,n,Object(o.b)(r))}),l.prototype.visitBinary=u(({values:e,valueOffsets:t},n,r)=>d(e,t,n,r)),l.prototype.visitFixedSizeBinary=u(m),l.prototype.visitDate=u(y),l.prototype.visitDateDay=u(A),l.prototype.visitDateMillisecond=u(g),l.prototype.visitTimestamp=u(x),l.prototype.visitTimestampSecond=u(v),l.prototype.visitTimestampMillisecond=u(b),l.prototype.visitTimestampMicrosecond=u(_),l.prototype.visitTimestampNanosecond=u(w),l.prototype.visitTime=u(T),l.prototype.visitTimeSecond=u(M),l.prototype.visitTimeMillisecond=u(E),l.prototype.visitTimeMicrosecond=u(O),l.prototype.visitTimeNanosecond=u(S),l.prototype.visitDecimal=u(C),l.prototype.visitList=u((e,t,n)=>{const r=e.children[0],i=e.valueOffsets,o=R.getVisitFn(r);if(Array.isArray(n))for(let e=-1,a=i[t],s=i[t+1];a{const i=e.type.children.map(e=>R.getVisitFn(e.type)),o=n instanceof Map?(a=t,s=n,(e,t,n,r)=>t&&e(t,a,s.get(n.name))):n instanceof r.a?((e,t)=>(n,r,i,o)=>r&&n(r,e,t.get(o)))(t,n):Array.isArray(n)?((e,t)=>(n,r,i,o)=>r&&n(r,e,t[o]))(t,n):((e,t)=>(n,r,i,o)=>r&&n(r,e,t[i.name]))(t,n);var a,s;e.type.children.forEach((t,n)=>o(i[n],e.children[n],t,n))}),l.prototype.visitUnion=u((e,t,n)=>{e.type.mode===s.i.Dense?L(e,t,n):P(e,t,n)}),l.prototype.visitDenseUnion=u(L),l.prototype.visitSparseUnion=u(P),l.prototype.visitDictionary=u((e,t,n)=>{var r;null===(r=e.dictionary)||void 0===r||r.set(e.values[t],n)}),l.prototype.visitInterval=u(I),l.prototype.visitIntervalDayTime=u(D),l.prototype.visitIntervalYearMonth=u(k),l.prototype.visitFixedSizeList=u((e,t,n)=>{const{stride:r}=e,i=e.children[0],o=R.getVisitFn(i);if(Array.isArray(n))for(let e=-1,a=t*r;++e{const r=e.children[0],{valueOffsets:i}=e,o=R.getVisitFn(r);let{[t]:a,[t+1]:s}=i;const l=n instanceof Map?n.entries():Object.entries(n);for(const e of l)if(o(r,a,e),++a>=s)break});const R=new l},function(e,t,n){"use strict";n.d(t,"b",(function(){return i})),n.d(t,"g",(function(){return o})),n.d(t,"c",(function(){return a})),n.d(t,"l",(function(){return s})),n.d(t,"a",(function(){return l})),n.d(t,"k",(function(){return u})),n.d(t,"h",(function(){return c})),n.d(t,"m",(function(){return d})),n.d(t,"j",(function(){return f})),n.d(t,"d",(function(){return h})),n.d(t,"i",(function(){return p})),n.d(t,"n",(function(){return A})),n.d(t,"o",(function(){return g})),n.d(t,"f",(function(){return m})),n.d(t,"e",(function(){return y}));var r=n(32);function i(e){var t=new r.a(4);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}function o(e,t,n,i){var o=new r.a(4);return o[0]=e,o[1]=t,o[2]=n,o[3]=i,o}function a(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}function s(e,t,n,r,i){return e[0]=t,e[1]=n,e[2]=r,e[3]=i,e}function l(e,t,n){return e[0]=t[0]+n[0],e[1]=t[1]+n[1],e[2]=t[2]+n[2],e[3]=t[3]+n[3],e}function u(e,t,n){return e[0]=t[0]*n,e[1]=t[1]*n,e[2]=t[2]*n,e[3]=t[3]*n,e}function c(e){var t=e[0],n=e[1],r=e[2],i=e[3];return Math.hypot(t,n,r,i)}function d(e){var t=e[0],n=e[1],r=e[2],i=e[3];return t*t+n*n+r*r+i*i}function f(e,t){var n=t[0],r=t[1],i=t[2],o=t[3],a=n*n+r*r+i*i+o*o;return a>0&&(a=1/Math.sqrt(a)),e[0]=n*a,e[1]=r*a,e[2]=i*a,e[3]=o*a,e}function h(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]*t[3]}function p(e,t,n,r){var i=t[0],o=t[1],a=t[2],s=t[3];return e[0]=i+r*(n[0]-i),e[1]=o+r*(n[1]-o),e[2]=a+r*(n[2]-a),e[3]=s+r*(n[3]-s),e}function A(e,t,n){var r=t[0],i=t[1],o=t[2],a=t[3];return e[0]=n[0]*r+n[4]*i+n[8]*o+n[12]*a,e[1]=n[1]*r+n[5]*i+n[9]*o+n[13]*a,e[2]=n[2]*r+n[6]*i+n[10]*o+n[14]*a,e[3]=n[3]*r+n[7]*i+n[11]*o+n[15]*a,e}function g(e,t,n){var r=t[0],i=t[1],o=t[2],a=n[0],s=n[1],l=n[2],u=n[3],c=u*r+s*o-l*i,d=u*i+l*r-a*o,f=u*o+a*i-s*r,h=-a*r-s*i-l*o;return e[0]=c*u+h*-a+d*-l-f*-s,e[1]=d*u+h*-s+f*-a-c*-l,e[2]=f*u+h*-l+c*-s-d*-a,e[3]=t[3],e}function m(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]}function y(e,t){var n=e[0],i=e[1],o=e[2],a=e[3],s=t[0],l=t[1],u=t[2],c=t[3];return Math.abs(n-s)<=r.b*Math.max(1,Math.abs(n),Math.abs(s))&&Math.abs(i-l)<=r.b*Math.max(1,Math.abs(i),Math.abs(l))&&Math.abs(o-u)<=r.b*Math.max(1,Math.abs(o),Math.abs(u))&&Math.abs(a-c)<=r.b*Math.max(1,Math.abs(a),Math.abs(c))}var v,b;v=new r.a(4),r.a!=Float32Array&&(v[0]=0,v[1]=0,v[2]=0,v[3]=0),b=v},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){"use strict";n.r(t);var r=n(1133);n.d(t,"ArcLayer",(function(){return r.a}));var i=n(1131);n.d(t,"BitmapLayer",(function(){return i.a}));var o=n(361);n.d(t,"IconLayer",(function(){return o.a}));var a=n(1134);n.d(t,"LineLayer",(function(){return a.a}));var s=n(1135);n.d(t,"PointCloudLayer",(function(){return s.a}));var l=n(526);n.d(t,"ScatterplotLayer",(function(){return l.a}));var u=n(524);n.d(t,"ColumnLayer",(function(){return u.a}));var c=n(886);n.d(t,"GridCellLayer",(function(){return c.a}));var d=n(360);n.d(t,"PathLayer",(function(){return d.a}));var f=n(887);n.d(t,"PolygonLayer",(function(){return f.a}));var h=n(1129);n.d(t,"GeoJsonLayer",(function(){return h.a}));var p=n(522);n.d(t,"TextLayer",(function(){return p.a}));var A=n(359);n.d(t,"SolidPolygonLayer",(function(){return A.a}));var g=n(531);n.d(t,"_MultiIconLayer",(function(){return g.a}));var m=n(527);n.d(t,"_TextBackgroundLayer",(function(){return m.a}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=new Date,i=new Date;function o(e,t,n,a){function s(t){return e(t=0===arguments.length?new Date:new Date(+t)),t}return s.floor=function(t){return e(t=new Date(+t)),t},s.ceil=function(n){return e(n=new Date(n-1)),t(n,1),e(n),n},s.round=function(e){var t=s(e),n=s.ceil(e);return e-t0))return a;do{a.push(o=new Date(+n)),t(n,i),e(n)}while(o=t)for(;e(t),!n(t);)t.setTime(t-1)}),(function(e,r){if(e>=e)if(r<0)for(;++r<=0;)for(;t(e,-1),!n(e););else for(;--r>=0;)for(;t(e,1),!n(e););}))},n&&(s.count=function(t,o){return r.setTime(+t),i.setTime(+o),e(r),e(i),Math.floor(n(r,i))},s.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?s.filter(a?function(t){return a(t)%e==0}:function(t){return s.count(0,t)%e==0}):s:null}),s}},function(e,t){function n(t){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?(e.exports=n=function(e){return typeof e},e.exports.default=e.exports,e.exports.__esModule=!0):(e.exports=n=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.default=e.exports,e.exports.__esModule=!0),n(t)}e.exports=n,e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){var r=n(1215);e.exports=function(e,t){if(null==e)return{};var n,i,o=r(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){(function(t){var n;n="undefined"!=typeof window?window:void 0!==t?t:"undefined"!=typeof self?self:{},e.exports=n}).call(this,n(68))},function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var r=n(435),i=n(188),o=n(110),a=n(131),s=n(544);class l{constructor(e){this.gltf=void 0,this.sourceBuffers=void 0,this.byteLength=void 0,this.gltf={json:(null==e?void 0:e.json)||{asset:{version:"2.0",generator:"loaders.gl"},buffers:[],extensions:{},extensionsRequired:[],extensionsUsed:[]},buffers:(null==e?void 0:e.buffers)||[],images:(null==e?void 0:e.images)||[]},this.sourceBuffers=[],this.byteLength=0,this.gltf.buffers&&this.gltf.buffers[0]&&(this.byteLength=this.gltf.buffers[0].byteLength,this.sourceBuffers=[this.gltf.buffers[0]])}get json(){return this.gltf.json}getApplicationData(e){return this.json[e]}getExtraData(e){return(this.json.extras||{})[e]}hasExtension(e){const t=this.getUsedExtensions().find(t=>t===e),n=this.getRequiredExtensions().find(t=>t===e);return"string"==typeof t||"string"==typeof n}getExtension(e){const t=this.getUsedExtensions().find(t=>t===e),n=this.json.extensions||{};return t?n[e]:null}getRequiredExtension(e){return this.getRequiredExtensions().find(t=>t===e)?this.getExtension(e):null}getRequiredExtensions(){return this.json.extensionsRequired||[]}getUsedExtensions(){return this.json.extensionsUsed||[]}getRemovedExtensions(){return this.json.extensionsRemoved||[]}getObjectExtension(e,t){return(e.extensions||{})[t]}getScene(e){return this.getObject("scenes",e)}getNode(e){return this.getObject("nodes",e)}getSkin(e){return this.getObject("skins",e)}getMesh(e){return this.getObject("meshes",e)}getMaterial(e){return this.getObject("materials",e)}getAccessor(e){return this.getObject("accessors",e)}getTexture(e){return this.getObject("textures",e)}getSampler(e){return this.getObject("samplers",e)}getImage(e){return this.getObject("images",e)}getBufferView(e){return this.getObject("bufferViews",e)}getBuffer(e){return this.getObject("buffers",e)}getObject(e,t){if("object"==typeof t)return t;const n=this.json[e]&&this.json[e][t];if(!n)throw new Error(`glTF file error: Could not find ${e}[${t}]`);return n}getTypedArrayForBufferView(e){const t=(e=this.getBufferView(e)).buffer,n=this.gltf.buffers[t];Object(o.a)(n);const r=(e.byteOffset||0)+n.byteOffset;return new Uint8Array(n.arrayBuffer,r,e.byteLength)}getTypedArrayForAccessor(e){const t=this.getAccessor(e);return Object(s.a)(this.gltf.json,this.gltf.buffers,t)}getTypedArrayForImageData(e){e=this.getAccessor(e);const t=this.getBufferView(e.bufferView),n=this.getBuffer(t.buffer).data,r=t.byteOffset||0;return new Uint8Array(n,r,t.byteLength)}addApplicationData(e,t){return this.json[e]=t,this}addExtraData(e,t){return this.json.extras=this.json.extras||{},this.json.extras[e]=t,this}addObjectExtension(e,t,n){return e.extensions=e.extensions||{},e.extensions[t]=n,this.registerUsedExtension(t),this}setObjectExtension(e,t,n){(e.extensions||{})[t]=n}removeObjectExtension(e,t){const n=(null==e?void 0:e.extensions)||{};if(n[t]){this.json.extensionsRemoved=this.json.extensionsRemoved||[];const e=this.json.extensionsRemoved;e.includes(t)||e.push(t)}delete n[t]}addExtension(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object(o.a)(t),this.json.extensions=this.json.extensions||{},this.json.extensions[e]=t,this.registerUsedExtension(e),t}addRequiredExtension(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object(o.a)(t),this.addExtension(e,t),this.registerRequiredExtension(e),t}registerUsedExtension(e){this.json.extensionsUsed=this.json.extensionsUsed||[],this.json.extensionsUsed.find(t=>t===e)||this.json.extensionsUsed.push(e)}registerRequiredExtension(e){this.registerUsedExtension(e),this.json.extensionsRequired=this.json.extensionsRequired||[],this.json.extensionsRequired.find(t=>t===e)||this.json.extensionsRequired.push(e)}removeExtension(e){var t;if(null!==(t=this.json.extensions)&&void 0!==t&&t[e]){this.json.extensionsRemoved=this.json.extensionsRemoved||[];const t=this.json.extensionsRemoved;t.includes(e)||t.push(e)}this.json.extensions&&delete this.json.extensions[e],this.json.extensionsRequired&&this._removeStringFromArray(this.json.extensionsRequired,e),this.json.extensionsUsed&&this._removeStringFromArray(this.json.extensionsUsed,e)}setDefaultScene(e){this.json.scene=e}addScene(e){const{nodeIndices:t}=e;return this.json.scenes=this.json.scenes||[],this.json.scenes.push({nodes:t}),this.json.scenes.length-1}addNode(e){const{meshIndex:t,matrix:n}=e;this.json.nodes=this.json.nodes||[];const r={mesh:t};return n&&(r.matrix=n),this.json.nodes.push(r),this.json.nodes.length-1}addMesh(e){const{attributes:t,indices:n,material:r,mode:i=4}=e,o={primitives:[{attributes:this._addAttributes(t),mode:i}]};if(n){const e=this._addIndices(n);o.primitives[0].indices=e}return Number.isFinite(r)&&(o.primitives[0].material=r),this.json.meshes=this.json.meshes||[],this.json.meshes.push(o),this.json.meshes.length-1}addPointCloud(e){const t={primitives:[{attributes:this._addAttributes(e),mode:0}]};return this.json.meshes=this.json.meshes||[],this.json.meshes.push(t),this.json.meshes.length-1}addImage(e,t){const n=Object(r.a)(e),i=t||(null==n?void 0:n.mimeType),o={bufferView:this.addBufferView(e),mimeType:i};return this.json.images=this.json.images||[],this.json.images.push(o),this.json.images.length-1}addBufferView(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.byteLength;const r=e.byteLength;Object(o.a)(Number.isFinite(r)),this.sourceBuffers=this.sourceBuffers||[],this.sourceBuffers.push(e);const a={buffer:t,byteOffset:n,byteLength:r};return this.byteLength+=Object(i.b)(r,4),this.json.bufferViews=this.json.bufferViews||[],this.json.bufferViews.push(a),this.json.bufferViews.length-1}addAccessor(e,t){const n={bufferView:e,type:Object(a.b)(t.size),componentType:t.componentType,count:t.count,max:t.max,min:t.min};return this.json.accessors=this.json.accessors||[],this.json.accessors.push(n),this.json.accessors.length-1}addBinaryBuffer(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{size:3};const n=this.addBufferView(e);let r={min:t.min,max:t.max};r.min&&r.max||(r=this._getAccessorMinMax(e,t.size));const i={size:t.size,componentType:Object(a.c)(e),count:Math.round(e.length/t.size),min:r.min,max:r.max};return this.addAccessor(n,Object.assign(i,t))}addTexture(e){const{imageIndex:t}=e,n={source:t};return this.json.textures=this.json.textures||[],this.json.textures.push(n),this.json.textures.length-1}addMaterial(e){return this.json.materials=this.json.materials||[],this.json.materials.push(e),this.json.materials.length-1}createBinaryChunk(){var e,t;this.gltf.buffers=[];const n=this.byteLength,r=new ArrayBuffer(n),o=new Uint8Array(r);let a=0;for(const e of this.sourceBuffers||[])a=Object(i.a)(e,o,a);null!==(e=this.json)&&void 0!==e&&null!==(t=e.buffers)&&void 0!==t&&t[0]?this.json.buffers[0].byteLength=n:this.json.buffers=[{byteLength:n}],this.gltf.binary=r,this.sourceBuffers=[r]}_removeStringFromArray(e,t){let n=!0;for(;n;){const r=e.indexOf(t);r>-1?e.splice(r,1):n=!1}}_addAttributes(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t={};for(const n in e){const r=e[n],i=this._getGltfAttributeName(n),o=this.addBinaryBuffer(r.value,r);t[i]=o}return t}_addIndices(e){return this.addBinaryBuffer(e,{size:1})}_getGltfAttributeName(e){switch(e.toLowerCase()){case"position":case"positions":case"vertices":return"POSITION";case"normal":case"normals":return"NORMAL";case"color":case"colors":return"COLOR_0";case"texcoord":case"texcoords":return"TEXCOORD_0";default:return e}}_getAccessorMinMax(e,t){const n={min:null,max:null};if(e.length0)}function u(e){return"object"!=typeof e||"length"in e?e:Array.from(e)}function c(...e){const t="function"==typeof e[e.length-1]&&function(e){return t=>e(...t)}(e.pop()),n=(e=e.map(u)).map(s),r=e.length-1,i=new Array(r+1).fill(0),o=[];if(r<0||n.some(l))return o;for(;;){o.push(i.map((t,n)=>e[n][t]));let a=r;for(;++i[a]===n[a];){if(0===a)return t?o.map(t):o;i[a--]=0}}}function d(e,t){var n=0,r=0;return Float64Array.from(e,void 0===t?e=>n+=+e||0:i=>n+=+t(i,r++,e)||0)}var f=function(e,t){return te?1:t>=e?0:NaN};function h(e,t){let n,r=0,i=0,o=0;if(void 0===t)for(let t of e)null!=t&&(t=+t)>=t&&(n=t-i,i+=n/++r,o+=n*(t-i));else{let a=-1;for(let s of e)null!=(s=t(s,++a,e))&&(s=+s)>=s&&(n=s-i,i+=n/++r,o+=n*(s-i))}if(r>1)return o/(r-1)}function p(e,t){const n=h(e,t);return n?Math.sqrt(n):n}var A=n(364);class g{constructor(){this._partials=new Float64Array(32),this._n=0}add(e){const t=this._partials;let n=0;for(let r=0;r0){for(o=e[--i];i>0&&(t=o,n=e[--i],o=t+n,r=n-(o-t),!r););i>0&&(r<0&&e[i-1]<0||r>0&&e[i-1]>0)&&(n=2*r,t=o+n,n==t-o&&(o=t))}return o}}function m(e,t){const n=new g;if(void 0===t)for(let t of e)(t=+t)&&n.add(t);else{let r=-1;for(let i of e)(i=+t(i,++r,e))&&n.add(i)}return+n}function y(e,t){const n=new g;let r=-1;return Float64Array.from(e,void 0===t?e=>n.add(+e||0):i=>n.add(+t(i,++r,e)||0))}class v extends Map{constructor(e,t=M){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:t}}),null!=e)for(const[t,n]of e)this.set(t,n)}get(e){return super.get(_(this,e))}has(e){return super.has(_(this,e))}set(e,t){return super.set(w(this,e),t)}delete(e){return super.delete(x(this,e))}}class b extends Set{constructor(e,t=M){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:t}}),null!=e)for(const t of e)this.add(t)}has(e){return super.has(_(this,e))}add(e){return super.add(w(this,e))}delete(e){return super.delete(x(this,e))}}function _({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function w({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function x({_intern:e,_key:t},n){const r=t(n);return e.has(r)&&(n=e.get(n),e.delete(r)),n}function M(e){return null!==e&&"object"==typeof e?e.valueOf():e}var E=function(e){return e};function O(e,...t){return D(e,E,E,t)}function S(e,...t){return D(e,Array.from,E,t)}function T(e,t,...n){return D(e,E,t,n)}function C(e,t,...n){return D(e,Array.from,t,n)}function L(e,...t){return D(e,E,I,t)}function P(e,...t){return D(e,Array.from,I,t)}function I(e){if(1!==e.length)throw new Error("duplicate key");return e[0]}function D(e,t,n,r){return function e(i,o){if(o>=r.length)return n(i);const a=new v,s=r[o++];let l=-1;for(const e of i){const t=s(e,++l,i),n=a.get(t);n?n.push(e):a.set(t,[e])}for(const[t,n]of a)a.set(t,e(n,o));return t(a)}(e,0)}var k=function(e,t){return Array.from(t,t=>e[t])};function R(e,...t){if("function"!=typeof e[Symbol.iterator])throw new TypeError("values is not iterable");e=Array.from(e);let[n=i.a]=t;if(1===n.length||t.length>1){const r=Uint32Array.from(e,(e,t)=>t);return t.length>1?(t=t.map(t=>e.map(t)),r.sort((e,n)=>{for(const r of t){const t=Object(i.a)(r[e],r[n]);if(t)return t}})):(n=e.map(n),r.sort((e,t)=>Object(i.a)(n[e],n[t]))),k(e,r)}return e.sort(n)}function j(e,t,n){return(1===t.length?R(T(e,t,n),([e,t],[n,r])=>Object(i.a)(t,r)||Object(i.a)(e,n)):R(O(e,n),([e,n],[r,o])=>t(n,o)||Object(i.a)(e,r))).map(([e])=>e)}var F=Array.prototype,N=F.slice,B=(F.map,function(e){return function(){return e}}),z=n(148);function U(e,t,n){let r;for(;;){const i=Object(z.b)(e,t,n);if(i===r||0===i||!isFinite(i))return[e,t];i>0?(e=Math.floor(e/i)*i,t=Math.ceil(t/i)*i):i<0&&(e=Math.ceil(e*i)/i,t=Math.floor(t*i)/i),r=i}}var H=n(500),V=function(){var e=E,t=A.a,n=H.a;function i(i){Array.isArray(i)||(i=Array.from(i));var o,a,s=i.length,l=new Array(s);for(o=0;o=d)if(e>=d&&t===A.a){const e=Object(z.b)(c,d,n);isFinite(e)&&(e>0?d=(Math.floor(d/e)+1)*e:e<0&&(d=(Math.ceil(d*-e)+1)/-e))}else f.pop()}for(var h=f.length;f[0]<=c;)f.shift(),--h;for(;f[h-1]>d;)f.pop(),--h;var p,g=new Array(h+1);for(o=0;o<=h;++o)(p=g[o]=[]).x0=o>0?f[o-1]:c,p.x1=o=t)&&(n=t,r=i);else for(let o of e)null!=(o=t(o,++i,e))&&(n=o)&&(n=o,r=i);return r}function Z(e,t){let n=0,r=0;if(void 0===t)for(let t of e)null!=t&&(t=+t)>=t&&(++n,r+=t);else{let i=-1;for(let o of e)null!=(o=t(o,++i,e))&&(o=+o)>=o&&(++n,r+=o)}if(n)return r/n}var K=function(e,t){return Object(G.a)(e,.5,t)},Q=n(716),J=n(305);function $(e,t){let n,r=-1,i=-1;if(void 0===t)for(const t of e)++i,null!=t&&(n>t||void 0===n&&t>=t)&&(n=t,r=i);else for(let o of e)null!=(o=t(o,++i,e))&&(n>o||void 0===n&&o>=o)&&(n=o,r=i);return r}function ee(e,t=te){const n=[];let r,i=!1;for(const o of e)i&&n.push(t(r,o)),r=o,i=!0;return n}function te(e,t){return[e,t]}var ne=n(499),re=n(659);function ie(e,t=i.a){let n,r=!1;if(1===t.length){let o;for(const a of e){const e=t(a);(r?Object(i.a)(e,o)<0:0===Object(i.a)(e,e))&&(n=a,o=e,r=!0)}}else for(const i of e)(r?t(i,n)<0:0===t(i,i))&&(n=i,r=!0);return n}function oe(e,t=i.a){if(1===t.length)return $(e,t);let n,r=-1,o=-1;for(const i of e)++o,(r<0?0===t(i,i):t(i,n)<0)&&(n=i,r=o);return r}function ae(e,t=i.a){let n,r=!1;if(1===t.length){let o;for(const a of e){const e=t(a);(r?Object(i.a)(e,o)>0:0===Object(i.a)(e,e))&&(n=a,o=e,r=!0)}}else for(const i of e)(r?t(i,n)>0:0===t(i,i))&&(n=i,r=!0);return n}function se(e,t=i.a){if(1===t.length)return X(e,t);let n,r=-1,o=-1;for(const i of e)++o,(r<0?0===t(i,i):t(i,n)>0)&&(n=i,r=o);return r}function le(e,t){const n=oe(e,t);return n<0?void 0:n}var ue=ce(Math.random);function ce(e){return function(t,n=0,r=t.length){let i=r-(n=+n);for(;i;){const r=e()*i--|0,o=t[i+n];t[i+n]=t[r+n],t[r+n]=o}return t}}var de=n(717),fe=function(e){if(!(i=e.length))return[];for(var t=-1,n=Object(J.a)(e,he),r=new Array(n);++tt(n,r,e))}function ve(e,t,n){if("function"!=typeof t)throw new TypeError("reducer is not a function");const r=e[Symbol.iterator]();let i,o,a=-1;if(arguments.length<3){if(({done:i,value:n}=r.next()),i)return;++a}for(;({done:i,value:o}=r.next()),!i;)n=t(n,o,++a,e);return n}function be(e){if("function"!=typeof e[Symbol.iterator])throw new TypeError("values is not iterable");return Array.from(e).reverse()}function _e(e,...t){e=new Set(e);for(const n of t)for(const t of n)e.delete(t);return e}function we(e,t){const n=t[Symbol.iterator](),r=new Set;for(const t of e){if(r.has(t))return!1;let e,i;for(;({value:e,done:i}=n.next())&&!i;){if(Object.is(t,e))return!1;r.add(e)}}return!0}function xe(e){return e instanceof Set?e:new Set(e)}function Me(e,...t){e=new Set(e),t=t.map(xe);e:for(const n of e)for(const r of t)if(!r.has(n)){e.delete(n);continue e}return e}function Ee(e,t){const n=e[Symbol.iterator](),r=new Set;for(const e of t){if(r.has(e))continue;let t,i;for(;({value:t,done:i}=n.next());){if(i)return!1;if(r.add(t),Object.is(e,t))break}}return!0}function Oe(e,t){return Ee(t,e)}function Se(...e){const t=new Set;for(const n of e)for(const e of n)t.add(e);return t}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return o})),n.d(t,"c",(function(){return a}));var r=n(99);function i(e){return e instanceof Object(r.a)(e).Element||e instanceof Element}function o(e){return e instanceof Object(r.a)(e).HTMLElement||e instanceof HTMLElement}function a(e){return"undefined"!=typeof ShadowRoot&&(e instanceof Object(r.a)(e).ShadowRoot||e instanceof ShadowRoot)}},function(e,t,n){"use strict";n.d(t,"c",(function(){return u})),n.d(t,"a",(function(){return h})),n.d(t,"d",(function(){return p})),n.d(t,"b",(function(){return A}));var r=n(295),i=n(1161),o=n(176),a=n(1827);var s=n(313),l=[0,1];function u(e){return e}function c(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:(n=isNaN(t)?NaN:.5,function(){return n});var n}function d(e,t,n){var r=e[0],i=e[1],o=t[0],a=t[1];return it&&(n=e,e=t,t=n),m=function(n){return Math.max(e,Math.min(t,n))}),r=i>2?f:d,c=h=null,v}function v(t){return isNaN(t=+t)?n:(c||(c=r(p.map(e),A,g)))(e(m(t)))}return v.invert=function(n){return m(t((h||(h=r(A,p.map(e),o.a)))(n)))},v.domain=function(e){return arguments.length?(p=Array.from(e,s.a),y()):p.slice()},v.range=function(e){return arguments.length?(A=Array.from(e),y()):A.slice()},v.rangeRound=function(e){return A=Array.from(e),g=a.a,y()},v.clamp=function(e){return arguments.length?(m=!!e||u,y()):m!==u},v.interpolate=function(e){return arguments.length?(g=e,y()):g},v.unknown=function(e){return arguments.length?(n=e,v):n},function(n,r){return e=n,t=r,y()}}function A(){return p()(u,u)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return i})),n.d(t,"c",(function(){return o}));let r=function(e){return e[e.Point=1]="Point",e[e.LineString=2]="LineString",e[e.Polygon=3]="Polygon",e[e.MultiPoint=4]="MultiPoint",e[e.MultiLineString=5]="MultiLineString",e[e.MultiPolygon=6]="MultiPolygon",e[e.GeometryCollection=7]="GeometryCollection",e}({});function i(e){const t=new DataView(e);let n=0;const r=t.getUint8(n);if(n+=1,r>1)return!1;const i=1===r,o=t.getUint32(n,i);n+=4;const a=7&o;if(0===a||a>7)return!1;const s=o-a;if(0===s||1e3===s||2e3===s||3e3===s)return!0;if(0!=(536870911&s))return!1;if(536870912&s){const e=t.getUint32(n,i);if(n+=4,e>1e4)return!1}return!0}function o(e,t){const n=Object.assign(t||{},{type:"wkb",geometryType:1,dimensions:2,coordinates:"xy",littleEndian:!0,byteOffset:0});n.littleEndian=1===e.getUint8(n.byteOffset),n.byteOffset++;const r=e.getUint32(n.byteOffset,n.littleEndian);n.byteOffset+=4,n.geometryType=7&r;const i=(r-n.geometryType)/1e3;switch(i){case 0:break;case 1:n.type="iso-wkb",n.dimensions=3,n.coordinates="xyz";break;case 2:n.type="iso-wkb",n.dimensions=3,n.coordinates="xym";break;case 3:n.type="iso-wkb",n.dimensions=4,n.coordinates="xyzm";break;default:throw new Error("WKB: Unsupported iso-wkb type: "+i)}const o=2147483648&r,a=1073741824&r,s=536870912&r;return o&&a?(n.type="ewkb",n.dimensions=4,n.coordinates="xyzm"):o?(n.type="ewkb",n.dimensions=3,n.coordinates="xyz"):a&&(n.type="ewkb",n.dimensions=3,n.coordinates="xym"),s&&(n.type="ewkb",n.srid=e.getUint32(n.byteOffset,n.littleEndian),n.byteOffset+=4),n}},function(e,t,n){"use strict";n.r(t),n.d(t,"FormattedDateTimeRange",(function(){return Jt})),n.d(t,"FormattedMessage",(function(){return Kt})),n.d(t,"FormattedPlural",(function(){return qt})),n.d(t,"FormattedRelativeTime",(function(){return Yt})),n.d(t,"IntlContext",(function(){return et})),n.d(t,"IntlProvider",(function(){return Nt})),n.d(t,"RawIntlProvider",(function(){return $e})),n.d(t,"createIntl",(function(){return Ft})),n.d(t,"injectIntl",(function(){return tt})),n.d(t,"useIntl",(function(){return nt})),n.d(t,"createIntlCache",(function(){return Ve})),n.d(t,"UnsupportedFormatterError",(function(){return Re})),n.d(t,"InvalidConfigError",(function(){return je})),n.d(t,"MissingDataError",(function(){return Fe})),n.d(t,"MessageFormatError",(function(){return Be})),n.d(t,"MissingTranslationError",(function(){return ze})),n.d(t,"ReactIntlErrorCode",(function(){return Ie})),n.d(t,"ReactIntlError",(function(){return ke})),n.d(t,"defineMessages",(function(){return $t})),n.d(t,"defineMessage",(function(){return en})),n.d(t,"FormattedDate",(function(){return tn})),n.d(t,"FormattedTime",(function(){return nn})),n.d(t,"FormattedNumber",(function(){return rn})),n.d(t,"FormattedList",(function(){return on})),n.d(t,"FormattedDisplayName",(function(){return an})),n.d(t,"FormattedDateParts",(function(){return sn})),n.d(t,"FormattedTimeParts",(function(){return ln})),n.d(t,"FormattedNumberParts",(function(){return rt})),n.d(t,"FormattedListParts",(function(){return it}));var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var o=function(){return(o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n1)throw new RangeError("integer-width stems only accept a single optional option");i.options[0].replace(I,(function(e,n,r,i,o,a){if(n)t.minimumIntegerDigits=r.length;else{if(i&&o)throw new Error("We currently do not support maximum integer digits");if(a)throw new Error("We currently do not support exact integer digits")}return""}));continue}if(D.test(i.stem))t.minimumIntegerDigits=i.stem.length;else if(L.test(i.stem)){if(i.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");i.stem.replace(L,(function(e,n,r,i,o,a){return"*"===r?t.minimumFractionDigits=n.length:i&&"#"===i[0]?t.maximumFractionDigits=i.length:o&&a?(t.minimumFractionDigits=o.length,t.maximumFractionDigits=o.length+a.length):(t.minimumFractionDigits=n.length,t.maximumFractionDigits=n.length),""}));var a=i.options[0];"w"===a?t=o(o({},t),{trailingZeroDisplay:"stripIfInteger"}):a&&(t=o(o({},t),k(a)))}else if(P.test(i.stem))t=o(o({},t),k(i.stem));else{var s=R(i.stem);s&&(t=o(o({},t),s));var l=j(i.stem);l&&(t=o(o({},t),l))}}return t}var B,z={"001":["H","h"],AC:["H","h","hb","hB"],AD:["H","hB"],AE:["h","hB","hb","H"],AF:["H","hb","hB","h"],AG:["h","hb","H","hB"],AI:["H","h","hb","hB"],AL:["h","H","hB"],AM:["H","hB"],AO:["H","hB"],AR:["H","h","hB","hb"],AS:["h","H"],AT:["H","hB"],AU:["h","hb","H","hB"],AW:["H","hB"],AX:["H"],AZ:["H","hB","h"],BA:["H","hB","h"],BB:["h","hb","H","hB"],BD:["h","hB","H"],BE:["H","hB"],BF:["H","hB"],BG:["H","hB","h"],BH:["h","hB","hb","H"],BJ:["H","hB"],BL:["H","hB"],BM:["h","hb","H","hB"],BN:["hb","hB","h","H"],BO:["H","hB","h","hb"],BQ:["H"],BR:["H","hB"],BS:["h","hb","H","hB"],BT:["h","H"],BW:["H","h","hb","hB"],BZ:["H","h","hb","hB"],CA:["h","hb","H","hB"],CC:["H","h","hb","hB"],CD:["hB","H"],CF:["H","h","hB"],CG:["H","hB"],CH:["H","hB","h"],CI:["H","hB"],CK:["H","h","hb","hB"],CL:["H","h","hB","hb"],CM:["H","h","hB"],CN:["H","hB","hb","h"],CO:["h","H","hB","hb"],CP:["H"],CR:["H","h","hB","hb"],CU:["H","h","hB","hb"],CV:["H","hB"],CX:["H","h","hb","hB"],CY:["h","H","hb","hB"],CZ:["H"],DE:["H","hB"],DG:["H","h","hb","hB"],DJ:["h","H"],DK:["H"],DM:["h","hb","H","hB"],DO:["h","H","hB","hb"],DZ:["h","hB","hb","H"],EA:["H","h","hB","hb"],EC:["H","hB","h","hb"],EE:["H","hB"],EG:["h","hB","hb","H"],EH:["h","hB","hb","H"],ER:["h","H"],ES:["H","hB","h","hb"],ET:["hB","hb","h","H"],FI:["H"],FJ:["h","hb","H","hB"],FK:["H","h","hb","hB"],FM:["h","hb","H","hB"],FR:["H","hB"],GA:["H","hB"],GB:["H","h","hb","hB"],GD:["h","hb","H","hB"],GE:["H","hB","h"],GF:["H","hB"],GG:["H","h","hb","hB"],GH:["h","H"],GI:["H","h","hb","hB"],GM:["h","hb","H","hB"],GN:["H","hB"],GP:["H","hB"],GQ:["H","hB","h","hb"],GR:["h","H","hb","hB"],GT:["H","h","hB","hb"],GU:["h","hb","H","hB"],GW:["H","hB"],GY:["h","hb","H","hB"],HK:["h","hB","hb","H"],HN:["H","h","hB","hb"],HR:["H","hB"],IC:["H","h","hB","hb"],ID:["H"],IE:["H","h","hb","hB"],IL:["H","hB"],IM:["H","h","hb","hB"],IN:["h","H"],IO:["H","h","hb","hB"],IQ:["h","hB","hb","H"],IR:["hB","H"],IS:["H"],IT:["H","hB"],JE:["H","h","hb","hB"],JM:["h","hb","H","hB"],JO:["h","hB","hb","H"],JP:["H","h","K"],KE:["hB","hb","H","h"],KG:["H","h","hB","hb"],KH:["hB","h","H","hb"],KI:["h","hb","H","hB"],KM:["H","h","hB","hb"],KN:["h","hb","H","hB"],KP:["h","H","hB","hb"],KR:["h","H","hB","hb"],KW:["h","hB","hb","H"],KY:["h","hb","H","hB"],KZ:["H","hB"],LA:["H","hb","hB","h"],LB:["h","hB","hb","H"],LC:["h","hb","H","hB"],LI:["H","hB","h"],LK:["H","h","hB","hb"],LR:["h","hb","H","hB"],LS:["h","H"],LT:["H","h","hb","hB"],LU:["H","h","hB"],LV:["H","hB","hb","h"],LY:["h","hB","hb","H"],MA:["H","h","hB","hb"],MC:["H","hB"],MD:["H","hB"],ME:["H","hB","h"],MF:["H","hB"],MH:["h","hb","H","hB"],MK:["H","h","hb","hB"],ML:["H"],MM:["hB","hb","H","h"],MN:["H","h","hb","hB"],MO:["h","hB","hb","H"],MP:["h","hb","H","hB"],MQ:["H","hB"],MR:["h","hB","hb","H"],MS:["H","h","hb","hB"],MW:["h","hb","H","hB"],MX:["H","h","hB","hb"],MY:["hb","hB","h","H"],MZ:["H","hB"],NA:["h","H","hB","hb"],NC:["H","hB"],NE:["H"],NF:["H","h","hb","hB"],NG:["H","h","hb","hB"],NI:["H","h","hB","hb"],NL:["H","hB"],NP:["H","h","hB"],NR:["H","h","hb","hB"],NU:["H","h","hb","hB"],NZ:["h","hb","H","hB"],OM:["h","hB","hb","H"],PA:["h","H","hB","hb"],PE:["H","hB","h","hb"],PF:["H","h","hB"],PG:["h","H"],PH:["h","hB","hb","H"],PK:["h","hB","H"],PM:["H","hB"],PN:["H","h","hb","hB"],PR:["h","H","hB","hb"],PS:["h","hB","hb","H"],PT:["H","hB"],PW:["h","H"],PY:["H","h","hB","hb"],QA:["h","hB","hb","H"],RE:["H","hB"],RO:["H","hB"],RS:["H","hB","h"],RU:["H"],SA:["h","hB","hb","H"],SB:["h","hb","H","hB"],SC:["H","h","hB"],SD:["h","hB","hb","H"],SE:["H"],SG:["h","hb","H","hB"],SH:["H","h","hb","hB"],SI:["H","hB"],SJ:["H"],SK:["H"],SL:["h","hb","H","hB"],SM:["H","h","hB"],SN:["H","h","hB"],SO:["h","H"],SR:["H","hB"],SS:["h","hb","H","hB"],ST:["H","hB"],SV:["H","h","hB","hb"],SX:["H","h","hb","hB"],SY:["h","hB","hb","H"],SZ:["h","hb","H","hB"],TA:["H","h","hb","hB"],TC:["h","hb","H","hB"],TD:["h","H","hB"],TF:["H","h","hB"],TG:["H","hB"],TL:["H","hB","hb","h"],TN:["h","hB","hb","H"],TO:["h","H"],TR:["H","hB"],TT:["h","hb","H","hB"],TW:["hB","hb","h","H"],TZ:["hB","hb","H","h"],UA:["H","hB","h"],UG:["hB","hb","H","h"],UM:["h","hb","H","hB"],US:["h","hb","H","hB"],UY:["H","h","hB","hb"],UZ:["H","hB","h"],VA:["H","h","hB"],VC:["h","hb","H","hB"],VE:["h","H","hB","hb"],VG:["h","hb","H","hB"],VI:["h","hb","H","hB"],VU:["h","H"],WF:["H","hB"],WS:["h","H"],XK:["H","hB","h"],YE:["h","hB","hb","H"],YT:["H","hB"],ZA:["H","h","hb","hB"],ZM:["h","hb","H","hB"],"af-ZA":["H","h","hB","hb"],"ar-001":["h","hB","hb","H"],"ca-ES":["H","h","hB"],"en-001":["h","hb","H","hB"],"es-BO":["H","h","hB","hb"],"es-BR":["H","h","hB","hb"],"es-EC":["H","h","hB","hb"],"es-ES":["H","h","hB","hb"],"es-GQ":["H","h","hB","hb"],"es-PE":["H","h","hB","hb"],"fr-CA":["H","h","hB"],"gl-ES":["H","h","hB"],"gu-IN":["hB","hb","h","H"],"hi-IN":["hB","h","H"],"it-CH":["H","h","hB"],"it-IT":["H","h","hB"],"kn-IN":["hB","h","H"],"ml-IN":["hB","h","H"],"mr-IN":["hB","hb","h","H"],"pa-IN":["hB","hb","h","H"],"ta-IN":["hB","h","hb","H"],"te-IN":["hB","h","H"],"zu-ZA":["H","hB","hb","h"]};function U(e){var t=e.hourCycle;if(void 0===t&&e.hourCycles&&e.hourCycles.length&&(t=e.hourCycles[0]),t)switch(t){case"h24":return"k";case"h23":return"H";case"h12":return"h";case"h11":return"K";default:throw new Error("Invalid hourCycle")}var n,r=e.language;return"root"!==r&&(n=e.maximize().region),(z[n||""]||z[r||""]||z["".concat(r,"-001")]||z["001"])[0]}var H=new RegExp("^".concat(O.source,"*")),V=new RegExp("".concat(O.source,"*$"));function G(e,t){return{start:e,end:t}}var Y=!!String.prototype.startsWith&&"_a".startsWith("a",1),W=!!String.fromCodePoint,q=!!Object.fromEntries,X=!!String.prototype.codePointAt,Z=!!String.prototype.trimStart,K=!!String.prototype.trimEnd,Q=!!Number.isSafeInteger?Number.isSafeInteger:function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e&&Math.abs(e)<=9007199254740991},J=!0;try{J="a"===(null===(B=ae("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu").exec("a"))||void 0===B?void 0:B[0])}catch(e){J=!1}var $,ee=Y?function(e,t,n){return e.startsWith(t,n)}:function(e,t,n){return e.slice(n,n+t.length)===t},te=W?String.fromCodePoint:function(){for(var e=[],t=0;to;){if((n=e[o++])>1114111)throw RangeError(n+" is not a valid code point");r+=n<65536?String.fromCharCode(n):String.fromCharCode(55296+((n-=65536)>>10),n%1024+56320)}return r},ne=q?Object.fromEntries:function(e){for(var t={},n=0,r=e;n=n)){var r,i=e.charCodeAt(t);return i<55296||i>56319||t+1===n||(r=e.charCodeAt(t+1))<56320||r>57343?i:r-56320+(i-55296<<10)+65536}},ie=Z?function(e){return e.trimStart()}:function(e){return e.replace(H,"")},oe=K?function(e){return e.trimEnd()}:function(e){return e.replace(V,"")};function ae(e,t){return new RegExp(e,t)}if(J){var se=ae("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");$=function(e,t){var n;return se.lastIndex=t,null!==(n=se.exec(e)[1])&&void 0!==n?n:""}}else $=function(e,t){for(var n=[];;){var r=re(e,t);if(void 0===r||ce(r)||de(r))break;n.push(r),t+=r>=65536?2:1}return te.apply(void 0,n)};var le=function(){function e(e,t){void 0===t&&(t={}),this.message=e,this.position={offset:0,line:1,column:1},this.ignoreTag=!!t.ignoreTag,this.locale=t.locale,this.requiresOtherClause=!!t.requiresOtherClause,this.shouldParseSkeletons=!!t.shouldParseSkeletons}return e.prototype.parse=function(){if(0!==this.offset())throw Error("parser can only be used once");return this.parseMessage(0,"",!1)},e.prototype.parseMessage=function(e,t,n){for(var r=[];!this.isEOF();){var i=this.char();if(123===i){if((o=this.parseArgument(e,n)).err)return o;r.push(o.val)}else{if(125===i&&e>0)break;if(35!==i||"plural"!==t&&"selectordinal"!==t){if(60===i&&!this.ignoreTag&&47===this.peek()){if(n)break;return this.error(d.UNMATCHED_CLOSING_TAG,G(this.clonePosition(),this.clonePosition()))}if(60===i&&!this.ignoreTag&&ue(this.peek()||0)){if((o=this.parseTag(e,t)).err)return o;r.push(o.val)}else{var o;if((o=this.parseLiteral(e,t)).err)return o;r.push(o.val)}}else{var a=this.clonePosition();this.bump(),r.push({type:f.pound,location:G(a,this.clonePosition())})}}}return{val:r,err:null}},e.prototype.parseTag=function(e,t){var n=this.clonePosition();this.bump();var r=this.parseTagName();if(this.bumpSpace(),this.bumpIf("/>"))return{val:{type:f.literal,value:"<".concat(r,"/>"),location:G(n,this.clonePosition())},err:null};if(this.bumpIf(">")){var i=this.parseMessage(e+1,t,!0);if(i.err)return i;var o=i.val,a=this.clonePosition();if(this.bumpIf("")?{val:{type:f.tag,value:r,children:o,location:G(n,this.clonePosition())},err:null}:this.error(d.INVALID_TAG,G(a,this.clonePosition())))}return this.error(d.UNCLOSED_TAG,G(n,this.clonePosition()))}return this.error(d.INVALID_TAG,G(n,this.clonePosition()))},e.prototype.parseTagName=function(){var e,t=this.offset();for(this.bump();!this.isEOF()&&(45===(e=this.char())||46===e||e>=48&&e<=57||95===e||e>=97&&e<=122||e>=65&&e<=90||183==e||e>=192&&e<=214||e>=216&&e<=246||e>=248&&e<=893||e>=895&&e<=8191||e>=8204&&e<=8205||e>=8255&&e<=8256||e>=8304&&e<=8591||e>=11264&&e<=12271||e>=12289&&e<=55295||e>=63744&&e<=64975||e>=65008&&e<=65533||e>=65536&&e<=983039);)this.bump();return this.message.slice(t,this.offset())},e.prototype.parseLiteral=function(e,t){for(var n=this.clonePosition(),r="";;){var i=this.tryParseQuote(t);if(i)r+=i;else{var o=this.tryParseUnquoted(e,t);if(o)r+=o;else{var a=this.tryParseLeftAngleBracket();if(!a)break;r+=a}}}var s=G(n,this.clonePosition());return{val:{type:f.literal,value:r,location:s},err:null}},e.prototype.tryParseLeftAngleBracket=function(){return this.isEOF()||60!==this.char()||!this.ignoreTag&&(ue(e=this.peek()||0)||47===e)?null:(this.bump(),"<");var e},e.prototype.tryParseQuote=function(e){if(this.isEOF()||39!==this.char())return null;switch(this.peek()){case 39:return this.bump(),this.bump(),"'";case 123:case 60:case 62:case 125:break;case 35:if("plural"===e||"selectordinal"===e)break;return null;default:return null}this.bump();var t=[this.char()];for(this.bump();!this.isEOF();){var n=this.char();if(39===n){if(39!==this.peek()){this.bump();break}t.push(39),this.bump()}else t.push(n);this.bump()}return te.apply(void 0,t)},e.prototype.tryParseUnquoted=function(e,t){if(this.isEOF())return null;var n=this.char();return 60===n||123===n||35===n&&("plural"===t||"selectordinal"===t)||125===n&&e>0?null:(this.bump(),te(n))},e.prototype.parseArgument=function(e,t){var n=this.clonePosition();if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(d.EXPECT_ARGUMENT_CLOSING_BRACE,G(n,this.clonePosition()));if(125===this.char())return this.bump(),this.error(d.EMPTY_ARGUMENT,G(n,this.clonePosition()));var r=this.parseIdentifierIfPossible().value;if(!r)return this.error(d.MALFORMED_ARGUMENT,G(n,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(d.EXPECT_ARGUMENT_CLOSING_BRACE,G(n,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:f.argument,value:r,location:G(n,this.clonePosition())},err:null};case 44:return this.bump(),this.bumpSpace(),this.isEOF()?this.error(d.EXPECT_ARGUMENT_CLOSING_BRACE,G(n,this.clonePosition())):this.parseArgumentOptions(e,t,r,n);default:return this.error(d.MALFORMED_ARGUMENT,G(n,this.clonePosition()))}},e.prototype.parseIdentifierIfPossible=function(){var e=this.clonePosition(),t=this.offset(),n=$(this.message,t),r=t+n.length;return this.bumpTo(r),{value:n,location:G(e,this.clonePosition())}},e.prototype.parseArgumentOptions=function(e,t,n,r){var i,a=this.clonePosition(),s=this.parseIdentifierIfPossible().value,l=this.clonePosition();switch(s){case"":return this.error(d.EXPECT_ARGUMENT_TYPE,G(a,l));case"number":case"date":case"time":this.bumpSpace();var u=null;if(this.bumpIf(",")){this.bumpSpace();var c=this.clonePosition();if((_=this.parseSimpleArgStyleIfPossible()).err)return _;if(0===(m=oe(_.val)).length)return this.error(d.EXPECT_ARGUMENT_STYLE,G(this.clonePosition(),this.clonePosition()));u={style:m,styleLocation:G(c,this.clonePosition())}}if((w=this.tryParseArgumentClose(r)).err)return w;var p=G(r,this.clonePosition());if(u&&ee(null==u?void 0:u.style,"::",0)){var A=ie(u.style.slice(2));if("number"===s)return(_=this.parseNumberSkeletonFromString(A,u.styleLocation)).err?_:{val:{type:f.number,value:n,location:p,style:_.val},err:null};if(0===A.length)return this.error(d.EXPECT_DATE_TIME_SKELETON,p);var g=A;this.locale&&(g=function(e,t){for(var n="",r=0;r>1),l=U(t);for("H"!=l&&"k"!=l||(s=0);s-- >0;)n+="a";for(;a-- >0;)n=l+n}else n+="J"===i?"H":i}return n}(A,this.locale));var m={type:h.dateTime,pattern:g,location:u.styleLocation,parsedOptions:this.shouldParseSkeletons?T(g):{}};return{val:{type:"date"===s?f.date:f.time,value:n,location:p,style:m},err:null}}return{val:{type:"number"===s?f.number:"date"===s?f.date:f.time,value:n,location:p,style:null!==(i=null==u?void 0:u.style)&&void 0!==i?i:null},err:null};case"plural":case"selectordinal":case"select":var y=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(d.EXPECT_SELECT_ARGUMENT_OPTIONS,G(y,o({},y)));this.bumpSpace();var v=this.parseIdentifierIfPossible(),b=0;if("select"!==s&&"offset"===v.value){if(!this.bumpIf(":"))return this.error(d.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,G(this.clonePosition(),this.clonePosition()));var _;if(this.bumpSpace(),(_=this.tryParseDecimalInteger(d.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,d.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE)).err)return _;this.bumpSpace(),v=this.parseIdentifierIfPossible(),b=_.val}var w,x=this.tryParsePluralOrSelectOptions(e,s,t,v);if(x.err)return x;if((w=this.tryParseArgumentClose(r)).err)return w;var M=G(r,this.clonePosition());return"select"===s?{val:{type:f.select,value:n,options:ne(x.val),location:M},err:null}:{val:{type:f.plural,value:n,options:ne(x.val),offset:b,pluralType:"plural"===s?"cardinal":"ordinal",location:M},err:null};default:return this.error(d.INVALID_ARGUMENT_TYPE,G(a,l))}},e.prototype.tryParseArgumentClose=function(e){return this.isEOF()||125!==this.char()?this.error(d.EXPECT_ARGUMENT_CLOSING_BRACE,G(e,this.clonePosition())):(this.bump(),{val:!0,err:null})},e.prototype.parseSimpleArgStyleIfPossible=function(){for(var e=0,t=this.clonePosition();!this.isEOF();){switch(this.char()){case 39:this.bump();var n=this.clonePosition();if(!this.bumpUntil("'"))return this.error(d.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE,G(n,this.clonePosition()));this.bump();break;case 123:e+=1,this.bump();break;case 125:if(!(e>0))return{val:this.message.slice(t.offset,this.offset()),err:null};e-=1;break;default:this.bump()}}return{val:this.message.slice(t.offset,this.offset()),err:null}},e.prototype.parseNumberSkeletonFromString=function(e,t){var n=[];try{n=function(e){if(0===e.length)throw new Error("Number skeleton cannot be empty");for(var t=[],n=0,r=e.split(C).filter((function(e){return e.length>0}));n=48&&a<=57))break;i=!0,o=10*o+(a-48),this.bump()}var s=G(r,this.clonePosition());return i?Q(o*=n)?{val:o,err:null}:this.error(t,s):this.error(e,s)},e.prototype.offset=function(){return this.position.offset},e.prototype.isEOF=function(){return this.offset()===this.message.length},e.prototype.clonePosition=function(){return{offset:this.position.offset,line:this.position.line,column:this.position.column}},e.prototype.char=function(){var e=this.position.offset;if(e>=this.message.length)throw Error("out of bound");var t=re(this.message,e);if(void 0===t)throw Error("Offset ".concat(e," is at invalid UTF-16 code unit boundary"));return t},e.prototype.error=function(e,t){return{val:null,err:{kind:e,message:this.message,location:t}}},e.prototype.bump=function(){if(!this.isEOF()){var e=this.char();10===e?(this.position.line+=1,this.position.column=1,this.position.offset+=1):(this.position.column+=1,this.position.offset+=e<65536?1:2)}},e.prototype.bumpIf=function(e){if(ee(this.message,e,this.offset())){for(var t=0;t=0?(this.bumpTo(n),!0):(this.bumpTo(this.message.length),!1)},e.prototype.bumpTo=function(e){if(this.offset()>e)throw Error("targetOffset ".concat(e," must be greater than or equal to the current offset ").concat(this.offset()));for(e=Math.min(e,this.message.length);;){var t=this.offset();if(t===e)break;if(t>e)throw Error("targetOffset ".concat(e," is at invalid UTF-16 code unit boundary"));if(this.bump(),this.isEOF())break}},e.prototype.bumpSpace=function(){for(;!this.isEOF()&&ce(this.char());)this.bump()},e.prototype.peek=function(){if(this.isEOF())return null;var e=this.char(),t=this.offset(),n=this.message.charCodeAt(t+(e>=65536?2:1));return null!=n?n:null},e}();function ue(e){return e>=97&&e<=122||e>=65&&e<=90}function ce(e){return e>=9&&e<=13||32===e||133===e||e>=8206&&e<=8207||8232===e||8233===e}function de(e){return e>=33&&e<=35||36===e||e>=37&&e<=39||40===e||41===e||42===e||43===e||44===e||45===e||e>=46&&e<=47||e>=58&&e<=59||e>=60&&e<=62||e>=63&&e<=64||91===e||92===e||93===e||94===e||96===e||123===e||124===e||125===e||126===e||161===e||e>=162&&e<=165||166===e||167===e||169===e||171===e||172===e||174===e||176===e||177===e||182===e||187===e||191===e||215===e||247===e||e>=8208&&e<=8213||e>=8214&&e<=8215||8216===e||8217===e||8218===e||e>=8219&&e<=8220||8221===e||8222===e||8223===e||e>=8224&&e<=8231||e>=8240&&e<=8248||8249===e||8250===e||e>=8251&&e<=8254||e>=8257&&e<=8259||8260===e||8261===e||8262===e||e>=8263&&e<=8273||8274===e||8275===e||e>=8277&&e<=8286||e>=8592&&e<=8596||e>=8597&&e<=8601||e>=8602&&e<=8603||e>=8604&&e<=8607||8608===e||e>=8609&&e<=8610||8611===e||e>=8612&&e<=8613||8614===e||e>=8615&&e<=8621||8622===e||e>=8623&&e<=8653||e>=8654&&e<=8655||e>=8656&&e<=8657||8658===e||8659===e||8660===e||e>=8661&&e<=8691||e>=8692&&e<=8959||e>=8960&&e<=8967||8968===e||8969===e||8970===e||8971===e||e>=8972&&e<=8991||e>=8992&&e<=8993||e>=8994&&e<=9e3||9001===e||9002===e||e>=9003&&e<=9083||9084===e||e>=9085&&e<=9114||e>=9115&&e<=9139||e>=9140&&e<=9179||e>=9180&&e<=9185||e>=9186&&e<=9254||e>=9255&&e<=9279||e>=9280&&e<=9290||e>=9291&&e<=9311||e>=9472&&e<=9654||9655===e||e>=9656&&e<=9664||9665===e||e>=9666&&e<=9719||e>=9720&&e<=9727||e>=9728&&e<=9838||9839===e||e>=9840&&e<=10087||10088===e||10089===e||10090===e||10091===e||10092===e||10093===e||10094===e||10095===e||10096===e||10097===e||10098===e||10099===e||10100===e||10101===e||e>=10132&&e<=10175||e>=10176&&e<=10180||10181===e||10182===e||e>=10183&&e<=10213||10214===e||10215===e||10216===e||10217===e||10218===e||10219===e||10220===e||10221===e||10222===e||10223===e||e>=10224&&e<=10239||e>=10240&&e<=10495||e>=10496&&e<=10626||10627===e||10628===e||10629===e||10630===e||10631===e||10632===e||10633===e||10634===e||10635===e||10636===e||10637===e||10638===e||10639===e||10640===e||10641===e||10642===e||10643===e||10644===e||10645===e||10646===e||10647===e||10648===e||e>=10649&&e<=10711||10712===e||10713===e||10714===e||10715===e||e>=10716&&e<=10747||10748===e||10749===e||e>=10750&&e<=11007||e>=11008&&e<=11055||e>=11056&&e<=11076||e>=11077&&e<=11078||e>=11079&&e<=11084||e>=11085&&e<=11123||e>=11124&&e<=11125||e>=11126&&e<=11157||11158===e||e>=11159&&e<=11263||e>=11776&&e<=11777||11778===e||11779===e||11780===e||11781===e||e>=11782&&e<=11784||11785===e||11786===e||11787===e||11788===e||11789===e||e>=11790&&e<=11798||11799===e||e>=11800&&e<=11801||11802===e||11803===e||11804===e||11805===e||e>=11806&&e<=11807||11808===e||11809===e||11810===e||11811===e||11812===e||11813===e||11814===e||11815===e||11816===e||11817===e||e>=11818&&e<=11822||11823===e||e>=11824&&e<=11833||e>=11834&&e<=11835||e>=11836&&e<=11839||11840===e||11841===e||11842===e||e>=11843&&e<=11855||e>=11856&&e<=11857||11858===e||e>=11859&&e<=11903||e>=12289&&e<=12291||12296===e||12297===e||12298===e||12299===e||12300===e||12301===e||12302===e||12303===e||12304===e||12305===e||e>=12306&&e<=12307||12308===e||12309===e||12310===e||12311===e||12312===e||12313===e||12314===e||12315===e||12316===e||12317===e||e>=12318&&e<=12319||12320===e||12336===e||64830===e||64831===e||e>=65093&&e<=65094}function fe(e,t){void 0===t&&(t={}),t=o({shouldParseSkeletons:!0,requiresOtherClause:!0},t);var n=new le(e,t).parse();if(n.err){var r=SyntaxError(d[n.err.kind]);throw r.location=n.err.location,r.originalMessage=n.err.message,r}return(null==t?void 0:t.captureLocation)||function e(t){t.forEach((function(t){if(delete t.location,b(t)||_(t))for(var n in t.options)delete t.options[n].location,e(t.options[n].value);else m(t)&&M(t.style)||(y(t)||v(t))&&E(t.style)?delete t.style.location:x(t)&&e(t.children)}))}(n.val),n.val}function he(e,t){var n=t&&t.cache?t.cache:_e,r=t&&t.serializer?t.serializer:ye;return(t&&t.strategy?t.strategy:me)(e,{cache:n,serializer:r})}function pe(e,t,n,r){var i=function(e){return null==e||"number"==typeof e||"boolean"==typeof e}(r)?r:n(r),o=t.get(i);return void 0===o&&(o=e.call(this,r),t.set(i,o)),o}function Ae(e,t,n){var r=Array.prototype.slice.call(arguments,3),i=n(r),o=t.get(i);return void 0===o&&(o=e.apply(this,r),t.set(i,o)),o}function ge(e,t,n,r,i){return n.bind(t,e,r,i)}function me(e,t){return ge(e,this,1===e.length?pe:Ae,t.cache.create(),t.serializer)}var ye=function(){return JSON.stringify(arguments)};function ve(){this.cache=Object.create(null)}ve.prototype.get=function(e){return this.cache[e]},ve.prototype.set=function(e,t){this.cache[e]=t};var be,_e={create:function(){return new ve}},we={variadic:function(e,t){return ge(e,this,Ae,t.cache.create(),t.serializer)},monadic:function(e,t){return ge(e,this,pe,t.cache.create(),t.serializer)}};!function(e){e.MISSING_VALUE="MISSING_VALUE",e.INVALID_VALUE="INVALID_VALUE",e.MISSING_INTL_API="MISSING_INTL_API"}(be||(be={}));var xe,Me=function(e){function t(t,n,r){var i=e.call(this,t)||this;return i.code=n,i.originalMessage=r,i}return i(t,e),t.prototype.toString=function(){return"[formatjs Error: ".concat(this.code,"] ").concat(this.message)},t}(Error),Ee=function(e){function t(t,n,r,i){return e.call(this,'Invalid values for "'.concat(t,'": "').concat(n,'". Options are "').concat(Object.keys(r).join('", "'),'"'),be.INVALID_VALUE,i)||this}return i(t,e),t}(Me),Oe=function(e){function t(t,n,r){return e.call(this,'Value for "'.concat(t,'" must be of type ').concat(n),be.INVALID_VALUE,r)||this}return i(t,e),t}(Me),Se=function(e){function t(t,n){return e.call(this,'The intl string context variable "'.concat(t,'" was not provided to the string "').concat(n,'"'),be.MISSING_VALUE,n)||this}return i(t,e),t}(Me);function Te(e){return"function"==typeof e}function Ce(e,t,n,r,i,o,a){if(1===e.length&&A(e[0]))return[{type:xe.literal,value:e[0].value}];for(var s=[],l=0,u=e;l0?new Intl.Locale(t[0]):new Intl.Locale("string"==typeof e?e:e[0])}},e.__parse=fe,e.formats={number:{integer:{maximumFractionDigits:0},currency:{style:"currency"},percent:{style:"percent"}},date:{short:{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},long:{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{short:{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},long:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}},e}();!function(e){e.FORMAT_ERROR="FORMAT_ERROR",e.UNSUPPORTED_FORMATTER="UNSUPPORTED_FORMATTER",e.INVALID_CONFIG="INVALID_CONFIG",e.MISSING_DATA="MISSING_DATA",e.MISSING_TRANSLATION="MISSING_TRANSLATION"}(Ie||(Ie={}));var ke=function(e){function t(n,r,i){var o=this,a=i?i instanceof Error?i:new Error(String(i)):void 0;return(o=e.call(this,"[@formatjs/intl Error ".concat(n,"] ").concat(r,"\n").concat(a?"\n".concat(a.message,"\n").concat(a.stack):""))||this).code=n,"function"==typeof Error.captureStackTrace&&Error.captureStackTrace(o,t),o}return i(t,e),t}(Error),Re=function(e){function t(t,n){return e.call(this,Ie.UNSUPPORTED_FORMATTER,t,n)||this}return i(t,e),t}(ke),je=function(e){function t(t,n){return e.call(this,Ie.INVALID_CONFIG,t,n)||this}return i(t,e),t}(ke),Fe=function(e){function t(t,n){return e.call(this,Ie.MISSING_DATA,t,n)||this}return i(t,e),t}(ke),Ne=function(e){function t(t,n,r){var i=e.call(this,Ie.FORMAT_ERROR,"".concat(t,"\nLocale: ").concat(n,"\n"),r)||this;return i.locale=n,i}return i(t,e),t}(ke),Be=function(e){function t(t,n,r,i){var o=e.call(this,"".concat(t,"\nMessageID: ").concat(null==r?void 0:r.id,"\nDefault Message: ").concat(null==r?void 0:r.defaultMessage,"\nDescription: ").concat(null==r?void 0:r.description,"\n"),n,i)||this;return o.descriptor=r,o.locale=n,o}return i(t,e),t}(Ne),ze=function(e){function t(t,n){var r=e.call(this,Ie.MISSING_TRANSLATION,'Missing message: "'.concat(t.id,'" for locale "').concat(n,'", using ').concat(t.defaultMessage?"default message (".concat("string"==typeof t.defaultMessage?t.defaultMessage:t.defaultMessage.map((function(e){var t;return null!==(t=e.value)&&void 0!==t?t:JSON.stringify(e)})).join(),")"):"id"," as fallback."))||this;return r.descriptor=t,r}return i(t,e),t}(ke);function Ue(e,t,n){return void 0===n&&(n={}),t.reduce((function(t,r){return r in e?t[r]=e[r]:r in n&&(t[r]=n[r]),t}),{})}var He={formats:{},messages:{},timeZone:void 0,defaultLocale:"en",defaultFormats:{},fallbackOnEmptyString:!0,onError:function(e){0},onWarn:function(e){0}};function Ve(){return{dateTime:{},number:{},message:{},relativeTime:{},pluralRules:{},list:{},displayNames:{}}}function Ge(e){return{create:function(){return{get:function(t){return e[t]},set:function(t,n){e[t]=n}}}}}function Ye(e,t,n,r){var i,o=e&&e[t];if(o&&(i=o[n]),i)return i;r(new Re("No ".concat(t," format named: ").concat(n)))}function We(e){p(e,"[React Intl] Could not find required `intl` object. needs to exist in the component ancestry.")}var qe=o(o({},He),{textComponent:l.Fragment});function Xe(e,t){if(e===t)return!0;if(!e||!t)return!1;var n=Object.keys(e),r=Object.keys(t),i=n.length;if(r.length!==i)return!1;for(var o=0;o-1}var Vt=function(e){var t=nt(),n=t.formatRelativeTime,r=t.textComponent,i=e.children,o=n(e.value||0,e.unit,a(e,["children","value","unit"]));return"function"==typeof i?i(o):r?l.createElement(r,null,o):l.createElement(l.Fragment,null,o)},Gt=function(e){var t=e.value,n=e.unit,r=e.updateIntervalInSeconds,i=a(e,["value","unit","updateIntervalInSeconds"]);p(!r||!(!r||!Ht(n)),"Cannot schedule update with unit longer than hour");var s,u=l.useState(),c=u[0],d=u[1],f=l.useState(0),h=f[0],A=f[1],g=l.useState(0),m=g[0],y=g[1];n===c&&t===h||(A(t||0),d(n),y(Ht(n)?function(e,t){if(!e)return 0;switch(t){case"second":return e;case"minute":return 60*e;default:return 3600*e}}(t,n):0)),l.useEffect((function(){function e(){clearTimeout(s)}if(e(),!r||!Ht(n))return e;var t=m-r,i=Bt(t);if("day"===i)return e;var o=zt(i),a=t-t%o,l=a>=m?a-o:a,u=Math.abs(l-m);return m!==l&&(s=setTimeout((function(){return y(l)}),1e3*u)),e}),[m,r,n]);var v=t||0,b=n;if(Ht(n)&&"number"==typeof m&&r){var _=zt(b=Bt(m));v=Math.round(m/_)}return l.createElement(Vt,o({value:v,unit:b},i))};Gt.displayName="FormattedRelativeTime",Gt.defaultProps={value:0,unit:"second"};var Yt=Gt,Wt=function(e){var t=nt(),n=t.formatPlural,r=t.textComponent,i=e.value,o=e.other,a=e.children,s=e[n(i,e)]||o;return"function"==typeof a?a(s):r?l.createElement(r,null,s):s};Wt.defaultProps={type:"cardinal"},Wt.displayName="FormattedPlural";var qt=Wt;function Xt(e){var t=nt(),n=t.formatMessage,r=t.textComponent,i=void 0===r?l.Fragment:r,o=e.id,a=e.description,s=e.defaultMessage,u=e.values,c=e.children,d=e.tagName,f=void 0===d?i:d,h=n({id:o,description:a,defaultMessage:s},u,{ignoreTag:e.ignoreTag});return"function"==typeof c?c(Array.isArray(h)?h:[h]):f?l.createElement(f,null,l.Children.toArray(h)):l.createElement(l.Fragment,null,h)}Xt.displayName="FormattedMessage";var Zt=l.memo(Xt,(function(e,t){var n=e.values,r=a(e,["values"]),i=t.values,o=a(t,["values"]);return Xe(i,n)&&Xe(r,o)}));Zt.displayName="MemoizedFormattedMessage";var Kt=Zt,Qt=function(e){var t=nt(),n=e.from,r=e.to,i=e.children,o=a(e,["from","to","children"]),s=t.formatDateTimeRange(n,r,o);if("function"==typeof i)return i(s);var u=t.textComponent||l.Fragment;return l.createElement(u,null,s)};Qt.displayName="FormattedDateTimeRange";var Jt=Qt;function $t(e){return e}function en(e){return e}var tn=at("formatDate"),nn=at("formatTime"),rn=at("formatNumber"),on=at("formatList"),an=at("formatDisplayName"),sn=ot("formatDate"),ln=ot("formatTime")},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(5),i=n(12);class o{visitMany(e,...t){return e.map((e,n)=>this.visit(e,...t.map(e=>e[n])))}visit(...e){return this.getVisitFn(e[0],!1).apply(this,e)}getVisitFn(e,t=!0){return function(e,t,n=!0){if("number"==typeof t)return a(e,t,n);if("string"==typeof t&&t in r.h)return a(e,r.h[t],n);if(t&&t instanceof i.c)return a(e,s(t),n);if((null==t?void 0:t.type)&&t.type instanceof i.c)return a(e,s(t.type),n);return a(e,r.h.NONE,n)}(this,e,t)}getVisitFnByTypeId(e,t=!0){return a(this,e,t)}visitNull(e,...t){return null}visitBool(e,...t){return null}visitInt(e,...t){return null}visitFloat(e,...t){return null}visitUtf8(e,...t){return null}visitBinary(e,...t){return null}visitFixedSizeBinary(e,...t){return null}visitDate(e,...t){return null}visitTimestamp(e,...t){return null}visitTime(e,...t){return null}visitDecimal(e,...t){return null}visitList(e,...t){return null}visitStruct(e,...t){return null}visitUnion(e,...t){return null}visitDictionary(e,...t){return null}visitInterval(e,...t){return null}visitFixedSizeList(e,...t){return null}visitMap(e,...t){return null}}function a(e,t,n=!0){let i=null;switch(t){case r.h.Null:i=e.visitNull;break;case r.h.Bool:i=e.visitBool;break;case r.h.Int:i=e.visitInt;break;case r.h.Int8:i=e.visitInt8||e.visitInt;break;case r.h.Int16:i=e.visitInt16||e.visitInt;break;case r.h.Int32:i=e.visitInt32||e.visitInt;break;case r.h.Int64:i=e.visitInt64||e.visitInt;break;case r.h.Uint8:i=e.visitUint8||e.visitInt;break;case r.h.Uint16:i=e.visitUint16||e.visitInt;break;case r.h.Uint32:i=e.visitUint32||e.visitInt;break;case r.h.Uint64:i=e.visitUint64||e.visitInt;break;case r.h.Float:i=e.visitFloat;break;case r.h.Float16:i=e.visitFloat16||e.visitFloat;break;case r.h.Float32:i=e.visitFloat32||e.visitFloat;break;case r.h.Float64:i=e.visitFloat64||e.visitFloat;break;case r.h.Utf8:i=e.visitUtf8;break;case r.h.Binary:i=e.visitBinary;break;case r.h.FixedSizeBinary:i=e.visitFixedSizeBinary;break;case r.h.Date:i=e.visitDate;break;case r.h.DateDay:i=e.visitDateDay||e.visitDate;break;case r.h.DateMillisecond:i=e.visitDateMillisecond||e.visitDate;break;case r.h.Timestamp:i=e.visitTimestamp;break;case r.h.TimestampSecond:i=e.visitTimestampSecond||e.visitTimestamp;break;case r.h.TimestampMillisecond:i=e.visitTimestampMillisecond||e.visitTimestamp;break;case r.h.TimestampMicrosecond:i=e.visitTimestampMicrosecond||e.visitTimestamp;break;case r.h.TimestampNanosecond:i=e.visitTimestampNanosecond||e.visitTimestamp;break;case r.h.Time:i=e.visitTime;break;case r.h.TimeSecond:i=e.visitTimeSecond||e.visitTime;break;case r.h.TimeMillisecond:i=e.visitTimeMillisecond||e.visitTime;break;case r.h.TimeMicrosecond:i=e.visitTimeMicrosecond||e.visitTime;break;case r.h.TimeNanosecond:i=e.visitTimeNanosecond||e.visitTime;break;case r.h.Decimal:i=e.visitDecimal;break;case r.h.List:i=e.visitList;break;case r.h.Struct:i=e.visitStruct;break;case r.h.Union:i=e.visitUnion;break;case r.h.DenseUnion:i=e.visitDenseUnion||e.visitUnion;break;case r.h.SparseUnion:i=e.visitSparseUnion||e.visitUnion;break;case r.h.Dictionary:i=e.visitDictionary;break;case r.h.Interval:i=e.visitInterval;break;case r.h.IntervalDayTime:i=e.visitIntervalDayTime||e.visitInterval;break;case r.h.IntervalYearMonth:i=e.visitIntervalYearMonth||e.visitInterval;break;case r.h.FixedSizeList:i=e.visitFixedSizeList;break;case r.h.Map:i=e.visitMap}if("function"==typeof i)return i;if(!n)return()=>null;throw new Error(`Unrecognized type '${r.h[t]}'`)}function s(e){switch(e.typeId){case r.h.Null:return r.h.Null;case r.h.Int:{const{bitWidth:t,isSigned:n}=e;switch(t){case 8:return n?r.h.Int8:r.h.Uint8;case 16:return n?r.h.Int16:r.h.Uint16;case 32:return n?r.h.Int32:r.h.Uint32;case 64:return n?r.h.Int64:r.h.Uint64}return r.h.Int}case r.h.Float:switch(e.precision){case r.f.HALF:return r.h.Float16;case r.f.SINGLE:return r.h.Float32;case r.f.DOUBLE:return r.h.Float64}return r.h.Float;case r.h.Binary:return r.h.Binary;case r.h.Utf8:return r.h.Utf8;case r.h.Bool:return r.h.Bool;case r.h.Decimal:return r.h.Decimal;case r.h.Time:switch(e.unit){case r.g.SECOND:return r.h.TimeSecond;case r.g.MILLISECOND:return r.h.TimeMillisecond;case r.g.MICROSECOND:return r.h.TimeMicrosecond;case r.g.NANOSECOND:return r.h.TimeNanosecond}return r.h.Time;case r.h.Timestamp:switch(e.unit){case r.g.SECOND:return r.h.TimestampSecond;case r.g.MILLISECOND:return r.h.TimestampMillisecond;case r.g.MICROSECOND:return r.h.TimestampMicrosecond;case r.g.NANOSECOND:return r.h.TimestampNanosecond}return r.h.Timestamp;case r.h.Date:switch(e.unit){case r.b.DAY:return r.h.DateDay;case r.b.MILLISECOND:return r.h.DateMillisecond}return r.h.Date;case r.h.Interval:switch(e.unit){case r.c.DAY_TIME:return r.h.IntervalDayTime;case r.c.YEAR_MONTH:return r.h.IntervalYearMonth}return r.h.Interval;case r.h.Map:return r.h.Map;case r.h.List:return r.h.List;case r.h.Struct:return r.h.Struct;case r.h.Union:switch(e.mode){case r.i.Dense:return r.h.DenseUnion;case r.i.Sparse:return r.h.SparseUnion}return r.h.Union;case r.h.FixedSizeBinary:return r.h.FixedSizeBinary;case r.h.FixedSizeList:return r.h.FixedSizeList;case r.h.Dictionary:return r.h.Dictionary}throw new Error(`Unrecognized type '${r.h[e.typeId]}'`)}o.prototype.visitInt8=null,o.prototype.visitInt16=null,o.prototype.visitInt32=null,o.prototype.visitInt64=null,o.prototype.visitUint8=null,o.prototype.visitUint16=null,o.prototype.visitUint32=null,o.prototype.visitUint64=null,o.prototype.visitFloat16=null,o.prototype.visitFloat32=null,o.prototype.visitFloat64=null,o.prototype.visitDateDay=null,o.prototype.visitDateMillisecond=null,o.prototype.visitTimestampSecond=null,o.prototype.visitTimestampMillisecond=null,o.prototype.visitTimestampMicrosecond=null,o.prototype.visitTimestampNanosecond=null,o.prototype.visitTimeSecond=null,o.prototype.visitTimeMillisecond=null,o.prototype.visitTimeMicrosecond=null,o.prototype.visitTimeNanosecond=null,o.prototype.visitDenseUnion=null,o.prototype.visitSparseUnion=null,o.prototype.visitIntervalDayTime=null,o.prototype.visitIntervalYearMonth=null},function(e,t,n){"use strict";t.a=function(e,t){return et?1:e>=t?0:NaN}},function(e,t,n){"use strict";n.d(t,"d",(function(){return r})),n.d(t,"c",(function(){return i})),n.d(t,"b",(function(){return o})),n.d(t,"a",(function(){return a})),n.d(t,"e",(function(){return s}));var r=1e3,i=6e4,o=36e5,a=864e5,s=6048e5},function(e,t,n){"use strict";n.d(t,"c",(function(){return o})),n.d(t,"a",(function(){return a})),n.d(t,"d",(function(){return s})),n.d(t,"b",(function(){return l}));var r=n(20),i=n(125);const o=Object.freeze({done:!0,value:void 0});class a{constructor(e){this._json=e}get schema(){return this._json.schema}get batches(){return this._json.batches||[]}get dictionaries(){return this._json.dictionaries||[]}}class s{tee(){return this._getDOMStream().tee()}pipe(e,t){return this._getNodeStream().pipe(e,t)}pipeTo(e,t){return this._getDOMStream().pipeTo(e,t)}pipeThrough(e,t){return this._getDOMStream().pipeThrough(e,t)}_getDOMStream(){return this._DOMStream||(this._DOMStream=this.toDOMStream())}_getNodeStream(){return this._nodeStream||(this._nodeStream=this.toNodeStream())}}class l extends s{constructor(){super(),this._values=[],this.resolvers=[],this._closedPromise=new Promise(e=>this._closedPromiseResolve=e)}get closed(){return this._closedPromise}cancel(e){return Object(r.__awaiter)(this,void 0,void 0,(function*(){yield this.return(e)}))}write(e){this._ensureOpen()&&(this.resolvers.length<=0?this._values.push(e):this.resolvers.shift().resolve({done:!1,value:e}))}abort(e){this._closedPromiseResolve&&(this.resolvers.length<=0?this._error={error:e}:this.resolvers.shift().reject({done:!0,value:e}))}close(){if(this._closedPromiseResolve){const{resolvers:e}=this;for(;e.length>0;)e.shift().resolve(o);this._closedPromiseResolve(),this._closedPromiseResolve=void 0}}[Symbol.asyncIterator](){return this}toDOMStream(e){return i.a.toDOMStream(this._closedPromiseResolve||this._error?this:this._values,e)}toNodeStream(e){return i.a.toNodeStream(this._closedPromiseResolve||this._error?this:this._values,e)}throw(e){return Object(r.__awaiter)(this,void 0,void 0,(function*(){return yield this.abort(e),o}))}return(e){return Object(r.__awaiter)(this,void 0,void 0,(function*(){return yield this.close(),o}))}read(e){return Object(r.__awaiter)(this,void 0,void 0,(function*(){return(yield this.next(e,"read")).value}))}peek(e){return Object(r.__awaiter)(this,void 0,void 0,(function*(){return(yield this.next(e,"peek")).value}))}next(...e){return this._values.length>0?Promise.resolve({done:!1,value:this._values.shift()}):this._error?Promise.reject({done:!0,value:this._error.error}):this._closedPromiseResolve?new Promise((e,t)=>{this.resolvers.push({resolve:e,reject:t})}):Promise.resolve(o)}_ensureOpen(){if(this._closedPromiseResolve)return!0;throw new Error("AsyncQueue is closed")}}},,function(e,t,n){"use strict";function r(e,t){if(!e)throw new Error(t||"deck.gl: assertion failed.")}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";function r(e){var t,n,i="";if("string"==typeof e||"number"==typeof e)i+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;tObject(o.b)({type:e.type,nullCount:0}))})]=e,!(this.data instanceof o.a))throw new TypeError("RecordBatch constructor expects a [Schema, Data] pair.");[this.schema,this.data]=g(this.schema,this.data.children);break;case 1:{const[t]=e,{fields:n,children:r,length:i}=Object.keys(t).reduce((e,n,r)=>(e.children[r]=t[n],e.length=Math.max(e.length,t[n].length),e.fields[r]=l.a.new({name:n,type:t[n].type,nullable:!0}),e),{length:0,fields:new Array,children:new Array}),a=new l.b(n),s=Object(o.b)({type:new u.B(n),length:i,children:r,nullCount:0});[this.schema,this.data]=g(a,s.children,i);break}default:throw new TypeError("RecordBatch constructor expects an Object mapping names to child Data, or a [Schema, Data] pair.")}}get dictionaries(){return this._dictionaries||(this._dictionaries=function e(t,n,r=new Map){for(let i=-1,o=t.length;++i0&&e(o.children,a.children,r)}return r}(this.schema.fields,this.data.children))}get numCols(){return this.schema.fields.length}get numRows(){return this.data.length}get nullCount(){return this.data.nullCount}isValid(e){return this.data.getValid(e)}get(e){return c.a.visit(this.data,e)}set(e,t){return d.a.visit(this.data,e,t)}indexOf(e,t){return f.a.visit(this.data,e,t)}getByteLength(e){return p.a.visit(this.data,e)}[Symbol.iterator](){return h.a.visit(new s.a([this.data]))}toArray(){return[...this]}concat(...e){return new a.a(this.schema,[this,...e])}slice(e,t){const[n]=new s.a([this.data]).slice(e,t).data;return new A(this.schema,n)}getChild(e){var t;return this.getChildAt(null===(t=this.schema.fields)||void 0===t?void 0:t.findIndex(t=>t.name===e))}getChildAt(e){return e>-1&&et.name===e),t)}setChildAt(e,t){let n=this.schema,r=this.data;if(e>-1&&ee.name===t);~e&&(r[e]=this.data.children[e])}return new A(t,Object(o.b)({type:n,length:this.numRows,children:r}))}selectAt(e){const t=this.schema.selectAt(e),n=e.map(e=>this.data.children[e]).filter(Boolean),r=Object(o.b)({type:new u.B(t.fields),length:this.numRows,children:n});return new A(t,r)}}function g(e,t,n=t.reduce((e,t)=>Math.max(e,t.length),0)){var r;const i=[...e.fields],a=[...t],s=(n+63&-64)>>3;for(const[l,u]of e.fields.entries()){const e=t[l];e&&e.length===n||(i[l]=u.clone({nullable:!0}),a[l]=null!==(r=null==e?void 0:e._changeLengthAndBackfillNullBitmap(n))&&void 0!==r?r:Object(o.b)({type:u.type,length:n,nullCount:n,nullBitmap:new Uint8Array(s)}))}return[e.assign(i),Object(o.b)({type:new u.B(i),length:n,children:a})]}r=Symbol.toStringTag,A[r]=((i=A.prototype)._nullCount=-1,i[Symbol.isConcatSpreadable]=!0,"RecordBatch");class m extends A{constructor(e){const t=e.fields.map(e=>Object(o.b)({type:e.type}));super(e,Object(o.b)({type:new u.B(e.fields),nullCount:0,children:t}))}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return i})),n.d(t,"c",(function(){return o})),n.d(t,"e",(function(){return a})),n.d(t,"d",(function(){return l})),n.d(t,"f",(function(){return u})),n.d(t,"g",(function(){return c})),n.d(t,"h",(function(){return d}));class r{constructor(e=0,t){this.numChunks=e,this.getChunkIterator=t,this.chunkIndex=0,this.chunkIterator=this.getChunkIterator(0)}next(){for(;this.chunkIndexe+t.nullCount,0)}function o(e){return e.reduce((e,t,n)=>(e[n+1]=e[n]+t.length,e),new Uint32Array(e.length+1))}function a(e,t,n,r){const i=[];for(let o=-1,a=e.length;++o=r)break;if(n>=s+l)continue;if(s>=n&&s+l<=r){i.push(a);continue}const u=Math.max(0,n-s),c=Math.min(r-s,l);i.push(a.slice(u,c-u))}return 0===i.length&&i.push(e[0].slice(0,0)),i}function s(e,t,n,r){let i=0,o=0,a=t.length-1;do{if(i>=a-1)return n3&&void 0!==arguments[3]?arguments[3]:1;const i=a[t],o=s[n],u=l[n],c=r*i,d=c*u;let f=e.buffer,h=e.byteOffset;if(h%u!=0){f=new Uint8Array(f).slice(h,h+d).buffer,h=0}return new o(f,h,c)}function f(e,t,n){var r,i;const o="TEXCOORD_"+(t.texCoord||0),a=n.attributes[o],s=e.getTypedArrayForAccessor(a),l=e.gltf.json,u=t.index,c=null===(r=l.textures)||void 0===r||null===(i=r[u])||void 0===i?void 0:i.source;if(void 0!==c){var d,f,h;const n=null===(d=l.images)||void 0===d||null===(f=d[c])||void 0===f?void 0:f.mimeType,r=null===(h=e.gltf.images)||void 0===h?void 0:h[c];if(r&&void 0!==r.width){const e=[];for(let i=0;it===e);-1===t&&(t=i.push(e)-1),a.push(t)}const s=new Uint32Array(a),l=e.gltf.buffers.push({arrayBuffer:s.buffer,byteOffset:s.byteOffset,byteLength:s.byteLength})-1,u=e.addBufferView(s,l,0),c=e.addAccessor(u,{size:1,componentType:Object(r.c)(s),count:s.length});o.attributes[t]=c}function p(e,t,n,r){let o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[0];const a={r:{offset:0,shift:0},g:{offset:1,shift:8},b:{offset:2,shift:16},a:{offset:3,shift:24}},s=n[r],l=n[r+1];let u=1;!t||-1===t.indexOf("image/jpeg")&&-1===t.indexOf("image/png")||(u=4);const c=A(s,l,e,u);let d=0;for(const t of o){const n="number"==typeof t?Object.values(a)[t]:a[t],r=c+n.offset,o=Object(i.a)(e);if(o.data.length<=r)throw new Error(`${o.data.length} <= ${r}`);d|=o.data[r]<3&&void 0!==arguments[3]?arguments[3]:1;const i=n.width,a=o(e)*(i-1),s=Math.round(a),l=n.height,u=o(t)*(l-1),c=Math.round(u),d=n.components?n.components:r,f=(c*i+s)*d;return f}function g(e,t,n,r,i){const o=[];for(let a=0;ar)break;const l=t/i,u=s/i;o.push(e.slice(l,l+u))}return o}function m(e,t,n){const r=[];for(let i=0;i0)return super.write(e)}toString(e=!1){return e?Object(o.a)(this.toUint8Array(!0)):this.toUint8Array(!1).then(o.a)}toUint8Array(e=!1){return e?Object(s.joinUint8Arrays)(this._values)[0]:(()=>Object(r.__awaiter)(this,void 0,void 0,(function*(){var e,t,n,i;const o=[];let a=0;try{for(var l,u=!0,c=Object(r.__asyncValues)(this);!(e=(l=yield c.next()).done);u=!0){i=l.value,u=!1;const e=i;o.push(e),a+=e.byteLength}}catch(e){t={error:e}}finally{try{u||e||!(n=c.return)||(yield n.call(c))}finally{if(t)throw t.error}}return Object(s.joinUint8Arrays)(o,a)[0]})))()}}class c{constructor(e){e&&(this.source=new f(i.a.fromIterable(e)))}[Symbol.iterator](){return this}next(e){return this.source.next(e)}throw(e){return this.source.throw(e)}return(e){return this.source.return(e)}peek(e){return this.source.peek(e)}read(e){return this.source.read(e)}}class d{constructor(e){e instanceof d?this.source=e.source:e instanceof u?this.source=new h(i.a.fromAsyncIterable(e)):Object(l.k)(e)?this.source=new h(i.a.fromNodeStream(e)):Object(l.j)(e)?this.source=new h(i.a.fromDOMStream(e)):Object(l.c)(e)?this.source=new h(i.a.fromDOMStream(e.body)):Object(l.f)(e)?this.source=new h(i.a.fromIterable(e)):(Object(l.i)(e)||Object(l.b)(e))&&(this.source=new h(i.a.fromAsyncIterable(e)))}[Symbol.asyncIterator](){return this}next(e){return this.source.next(e)}throw(e){return this.source.throw(e)}return(e){return this.source.return(e)}get closed(){return this.source.closed}cancel(e){return this.source.cancel(e)}peek(e){return this.source.peek(e)}read(e){return this.source.read(e)}}class f{constructor(e){this.source=e}cancel(e){this.return(e)}peek(e){return this.next(e,"peek").value}read(e){return this.next(e,"read").value}next(e,t="read"){return this.source.next({cmd:t,size:e})}throw(e){return Object.create(this.source.throw&&this.source.throw(e)||a.c)}return(e){return Object.create(this.source.return&&this.source.return(e)||a.c)}}class h{constructor(e){this.source=e,this._closedPromise=new Promise(e=>this._closedPromiseResolve=e)}cancel(e){return Object(r.__awaiter)(this,void 0,void 0,(function*(){yield this.return(e)}))}get closed(){return this._closedPromise}read(e){return Object(r.__awaiter)(this,void 0,void 0,(function*(){return(yield this.next(e,"read")).value}))}peek(e){return Object(r.__awaiter)(this,void 0,void 0,(function*(){return(yield this.next(e,"peek")).value}))}next(e,t="read"){return Object(r.__awaiter)(this,void 0,void 0,(function*(){return yield this.source.next({cmd:t,size:e})}))}throw(e){return Object(r.__awaiter)(this,void 0,void 0,(function*(){const t=this.source.throw&&(yield this.source.throw(e))||a.c;return this._closedPromiseResolve&&this._closedPromiseResolve(),this._closedPromiseResolve=void 0,Object.create(t)}))}return(e){return Object(r.__awaiter)(this,void 0,void 0,(function*(){const t=this.source.return&&(yield this.source.return(e))||a.c;return this._closedPromiseResolve&&this._closedPromiseResolve(),this._closedPromiseResolve=void 0,Object.create(t)}))}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o})),n.d(t,"f",(function(){return a})),n.d(t,"c",(function(){return s})),n.d(t,"d",(function(){return l})),n.d(t,"b",(function(){return d})),n.d(t,"g",(function(){return h})),n.d(t,"e",(function(){return p}));var r=n(187),i=n(246);function o(){return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}function a(e,t){const n=e%t;return n<0?t+n:n}function s(e){return[e[12],e[13],e[14]]}function l(e){return{left:c(e[3]+e[0],e[7]+e[4],e[11]+e[8],e[15]+e[12]),right:c(e[3]-e[0],e[7]-e[4],e[11]-e[8],e[15]-e[12]),bottom:c(e[3]+e[1],e[7]+e[5],e[11]+e[9],e[15]+e[13]),top:c(e[3]-e[1],e[7]-e[5],e[11]-e[9],e[15]-e[13]),near:c(e[3]+e[2],e[7]+e[6],e[11]+e[10],e[15]+e[14]),far:c(e[3]-e[2],e[7]-e[6],e[11]-e[10],e[15]-e[14])}}const u=new i.a;function c(e,t,n,r){u.set(e,t,n);const o=u.len();return{distance:r/o,normal:new i.a(-e/o,-t/o,-n/o)}}function d(e){return e-Math.fround(e)}let f;function h(e,t){const{size:n=1,startIndex:i=0}=t,o=void 0!==t.endIndex?t.endIndex:e.length,a=(o-i)/n;f=r.a.allocate(f,a,{type:Float32Array,size:2*n});let s=i,l=0;for(;s0&&i[e]&&i[e].call(null,t,n,o)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getIntermediatePosition=function(e,t){return[(e[0]+t[0])/2,(e[1]+t[1])/2]},t.GeoJsonEditMode=void 0;var r=u(n(1361)),i=u(n(581)),o=u(n(1362)),a=u(n(1800)),s=n(119),l=n(194);function u(e){return e&&e.__esModule?e:{default:e}}function c(e){return function(e){if(Array.isArray(e))return f(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||d(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function d(e,t){if(e){if("string"==typeof e)return f(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?f(e,t):void 0}}function f(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=e.length?{done:!0}:{done:!1,value:e[t++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,i,o=!0,a=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return o=e.done,e},e:function(e){a=!0,i=e},f:function(){try{o||null==r.return||r.return()}finally{if(a)throw i}}}}(r);try{for(s.s();!(n=s.n()).done;){var u=n.value,c=u.properties,f=u.geometry;i=i.addFeature({type:"Feature",properties:c,geometry:f}),a.push(o+a.length)}}catch(e){s.e(e)}finally{s.f()}return{updatedData:i.getObject(),editType:"addFeature",editContext:{featureIndexes:a}}}},{key:"getAddFeatureOrBooleanPolygonAction",value:function(e,t){var n=e,a=this.getSelectedFeature(t),s=t.modeConfig;if(s&&s.booleanOperation){if(!a||"Polygon"!==a.geometry.type&&"MultiPolygon"!==a.geometry.type)return console.warn("booleanOperation only supported for single Polygon or MultiPolygon selection"),null;var u,c="Feature"===n.type?n:{type:"Feature",geometry:n};if("union"===s.booleanOperation)u=(0,r.default)(a,c);else if("difference"===s.booleanOperation)u=(0,i.default)(a,c);else{if("intersection"!==s.booleanOperation)return console.warn("Invalid booleanOperation ".concat(s.booleanOperation)),null;u=(0,o.default)(a,c)}if(!u)return console.warn("Canceling edit. Boolean operation erased entire polygon."),null;var d=t.selectedIndexes[0];return{updatedData:new l.ImmutableFeatureCollection(t.data).replaceGeometry(d,u.geometry).getObject(),editType:"unionGeometry",editContext:{featureIndexes:[d]}}}return this.getAddFeatureAction(e,t.data)}},{key:"createTentativeFeature",value:function(e){return null}},{key:"handleClick",value:function(e,t){}},{key:"handlePointerMove",value:function(e,t){var n=this.createTentativeFeature(t);n&&t.onEdit({updatedData:t.data,editType:"updateTentativeFeature",editContext:{feature:n}})}},{key:"handleStartDragging",value:function(e,t){}},{key:"handleStopDragging",value:function(e,t){}},{key:"handleDragging",value:function(e,t){}},{key:"handleKeyUp",value:function(e,t){"Escape"===e.key&&(this.resetClickSequence(),t.onEdit({updatedData:t.data,editType:"cancelFeature",editContext:{}}))}}])&&h(t.prototype,n),u&&h(t,u),e}();t.GeoJsonEditMode=g},function(e,t,n){"use strict";n.r(t);var r=n(35),i=n(18);t.default=function(e,t,n){void 0===n&&(n={});var o=Object(r.getCoord)(e),a=Object(r.getCoord)(t),s=Object(i.degreesToRadians)(a[1]-o[1]),l=Object(i.degreesToRadians)(a[0]-o[0]),u=Object(i.degreesToRadians)(o[1]),c=Object(i.degreesToRadians)(a[1]),d=Math.pow(Math.sin(s/2),2)+Math.pow(Math.sin(l/2),2)*Math.cos(u)*Math.cos(c);return Object(i.radiansToLength)(2*Math.atan2(Math.sqrt(d),Math.sqrt(1-d)),n.units)}},function(e,t,n){"use strict";var r=n(549),i="object"==typeof self&&self&&self.Object===Object&&self,o=r.a||i||Function("return this")();t.a=o},function(e,t,n){"use strict";n.d(t,"a",(function(){return f}));var r=n(115),i=n(177),o=n(151),a=n(17),s=n(28),l=n(429);const u={offset:"accessor.offset",stride:"accessor.stride",type:"accessor.type",size:"accessor.size",divisor:"accessor.divisor",normalized:"accessor.normalized",integer:"accessor.integer",instanced:"accessor.divisor",isInstanced:"accessor.divisor"},c={removedProps:{},replacedProps:{bytes:"byteLength"},deprecatedProps:u},d={removedProps:u};class f extends r.a{get[Symbol.toStringTag](){return"Buffer"}constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};super(e,t),this.stubRemovedMethods("Buffer","v6.0",["layout","setLayout","getIndexedParameter"]),this.target=t.target||(this.gl.webgl2?36662:34962),this.initialize(t),Object.seal(this)}getElementCount(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.accessor;return Math.round(this.byteLength/i.a.getBytesPerElement(e))}getVertexCount(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.accessor;return Math.round(this.byteLength/i.a.getBytesPerVertex(e))}initialize(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return ArrayBuffer.isView(e)&&(e={data:e}),Number.isFinite(e)&&(e={byteLength:e}),e=Object(l.a)("Buffer",e,c),this.usage=e.usage||35044,this.debugData=null,this.setAccessor(Object.assign({},e,e.accessor)),e.data?this._setData(e.data,e.offset,e.byteLength):this._setByteLength(e.byteLength||0),this}setProps(e){return"accessor"in(e=Object(l.a)("Buffer",e,d))&&this.setAccessor(e.accessor),this}setAccessor(e){return delete(e=Object.assign({},e)).buffer,this.accessor=new i.a(e),this}reallocate(e){return e>this.byteLength?(this._setByteLength(e),!0):(this.bytesUsed=e,!1)}setData(e){return this.initialize(e)}subData(e){ArrayBuffer.isView(e)&&(e={data:e});const{data:t,offset:n=0,srcOffset:r=0}=e,i=e.byteLength||e.length;Object(s.a)(t);const o=this.gl.webgl2?36663:this.target;return this.gl.bindBuffer(o,this.handle),0!==r||void 0!==i?(Object(a.a)(this.gl),this.gl.bufferSubData(this.target,n,t,r,i)):this.gl.bufferSubData(o,n,t),this.gl.bindBuffer(o,null),this.debugData=null,this._inferType(t),this}copyData(e){let{sourceBuffer:t,readOffset:n=0,writeOffset:r=0,size:i}=e;const{gl:o}=this;return Object(a.a)(o),o.bindBuffer(36662,t.handle),o.bindBuffer(36663,this.handle),o.copyBufferSubData(36662,36663,n,r,i),o.bindBuffer(36662,null),o.bindBuffer(36663,null),this.debugData=null,this}getData(){let{dstData:e=null,srcByteOffset:t=0,dstOffset:n=0,length:r=0}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Object(a.a)(this.gl);const i=Object(o.c)(this.accessor.type||5126,{clamped:!1}),l=this._getAvailableElementCount(t),u=n;let c,d;e?(d=e.length,c=d-u):(c=Math.min(l,r||l),d=u+c);const f=Math.min(l,c);return r=r||f,Object(s.a)(r<=f),e=e||new i(d),this.gl.bindBuffer(36662,this.handle),this.gl.getBufferSubData(36662,t,e,n,r),this.gl.bindBuffer(36662,null),e}bind(){let{target:e=this.target,index:t=this.accessor&&this.accessor.index,offset:n=0,size:r}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return 35345===e||35982===e?void 0!==r?this.gl.bindBufferRange(e,t,this.handle,n,r):(Object(s.a)(0===n),this.gl.bindBufferBase(e,t,this.handle)):this.gl.bindBuffer(e,this.handle),this}unbind(){let{target:e=this.target,index:t=this.accessor&&this.accessor.index}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return 35345===e||35982===e?this.gl.bindBufferBase(e,t,null):this.gl.bindBuffer(e,null),this}getDebugData(){return this.debugData?{data:this.debugData,changed:!1}:(this.debugData=this.getData({length:Math.min(10,this.byteLength)}),{data:this.debugData,changed:!0})}invalidateDebugData(){this.debugData=null}_setData(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.byteLength+t;Object(s.a)(ArrayBuffer.isView(e)),this._trackDeallocatedMemory();const r=this._getTarget();this.gl.bindBuffer(r,this.handle),this.gl.bufferData(r,n,this.usage),this.gl.bufferSubData(r,t,e),this.gl.bindBuffer(r,null),this.debugData=e.slice(0,10),this.bytesUsed=n,this._trackAllocatedMemory(n);const a=Object(o.b)(e);return Object(s.a)(a),this.setAccessor(new i.a(this.accessor,{type:a})),this}_setByteLength(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.usage;Object(s.a)(e>=0),this._trackDeallocatedMemory();let n=e;0===e&&(n=new Float32Array(0));const r=this._getTarget();return this.gl.bindBuffer(r,this.handle),this.gl.bufferData(r,n,t),this.gl.bindBuffer(r,null),this.usage=t,this.debugData=null,this.bytesUsed=e,this._trackAllocatedMemory(e),this}_getTarget(){return this.gl.webgl2?36663:this.target}_getAvailableElementCount(e){const t=e/Object(o.c)(this.accessor.type||5126,{clamped:!1}).BYTES_PER_ELEMENT;return this.getElementCount()-t}_inferType(e){this.accessor.type||this.setAccessor(new i.a(this.accessor,{type:Object(o.b)(e)}))}_createHandle(){return this.gl.createBuffer()}_deleteHandle(){this.gl.deleteBuffer(this.handle),this._trackDeallocatedMemory()}_getParameter(e){this.gl.bindBuffer(this.target,this.handle);const t=this.gl.getBufferParameter(this.target,e);return this.gl.bindBuffer(this.target,null),t}get type(){return a.k.deprecated("Buffer.type","Buffer.accessor.type")(),this.accessor.type}get bytes(){return a.k.deprecated("Buffer.bytes","Buffer.byteLength")(),this.byteLength}setByteLength(e){return a.k.deprecated("setByteLength","reallocate")(),this.reallocate(e)}updateAccessor(e){return a.k.deprecated("updateAccessor(...)","setAccessor(new Accessor(buffer.accessor, ...)")(),this.accessor=new i.a(this.accessor,e),this}}},function(e,t,n){"use strict";function r(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r3?t.i-4:t.i:Array.isArray(e)?1:h(e)?2:p(e)?3:0}function u(e,t){return 2===l(e)?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function c(e,t){return 2===l(e)?e.get(t):e[t]}function d(e,t,n){var r=l(e);2===r?e.set(t,n):3===r?(e.delete(t),e.add(n)):e[t]=n}function f(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function h(e){return V&&e instanceof Map}function p(e){return G&&e instanceof Set}function A(e){return e.o||e.t}function g(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=Q(e);delete t[X];for(var n=K(t),r=0;r1&&(e.set=e.add=e.clear=e.delete=y),Object.freeze(e),t&&s(e,(function(e,t){return m(t,!0)}),!0)),e}function y(){r(2)}function v(e){return null==e||"object"!=typeof e||Object.isFrozen(e)}function b(e){var t=J[e];return t||r(18,e),t}function _(e,t){J[e]||(J[e]=t)}function w(){return U}function x(e,t){t&&(b("Patches"),e.u=[],e.s=[],e.v=t)}function M(e){E(e),e.p.forEach(S),e.p=null}function E(e){e===U&&(U=e.l)}function O(e){return U={p:[],l:U,h:e,m:!0,_:0}}function S(e){var t=e[X];0===t.i||1===t.i?t.j():t.O=!0}function T(e,t){t._=t.p.length;var n=t.p[0],i=void 0!==e&&e!==n;return t.h.g||b("ES5").S(t,e,i),i?(n[X].P&&(M(t),r(4)),o(e)&&(e=C(t,e),t.l||P(t,e)),t.u&&b("Patches").M(n[X].t,e,t.u,t.s)):e=C(t,n,[]),M(t),t.u&&t.v(t.u,t.s),e!==W?e:void 0}function C(e,t,n){if(v(t))return t;var r=t[X];if(!r)return s(t,(function(i,o){return L(e,r,t,i,o,n)}),!0),t;if(r.A!==e)return t;if(!r.P)return P(e,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var i=4===r.i||5===r.i?r.o=g(r.k):r.o;s(3===r.i?new Set(i):i,(function(t,o){return L(e,r,i,t,o,n)})),P(e,i,!1),n&&e.u&&b("Patches").R(r,n,e.u,e.s)}return r.o}function L(e,t,n,r,a,s){if(i(a)){var l=C(e,a,s&&t&&3!==t.i&&!u(t.D,r)?s.concat(r):void 0);if(d(n,r,l),!i(l))return;e.m=!1}if(o(a)&&!v(a)){if(!e.h.F&&e._<1)return;C(e,a),t&&t.A.l||P(e,a)}}function P(e,t,n){void 0===n&&(n=!1),e.h.F&&e.m&&m(t,n)}function I(e,t){var n=e[X];return(n?A(n):e)[t]}function D(e,t){if(t in e)for(var n=Object.getPrototypeOf(e);n;){var r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Object.getPrototypeOf(n)}}function k(e){e.P||(e.P=!0,e.l&&k(e.l))}function R(e){e.o||(e.o=g(e.t))}function j(e,t,n){var r=h(t)?b("MapSet").N(t,n):p(t)?b("MapSet").T(t,n):e.g?function(e,t){var n=Array.isArray(e),r={i:n?1:0,A:t?t.A:w(),P:!1,I:!1,D:{},l:t,t:e,k:null,o:null,j:null,C:!1},i=r,o=$;n&&(i=[r],o=ee);var a=Proxy.revocable(i,o),s=a.revoke,l=a.proxy;return r.k=l,r.j=s,l}(t,n):b("ES5").J(t,n);return(n?n.A:w()).p.push(r),r}function F(e){return i(e)||r(22,e),function e(t){if(!o(t))return t;var n,r=t[X],i=l(t);if(r){if(!r.P&&(r.i<4||!b("ES5").K(r)))return r.t;r.I=!0,n=N(t,i),r.I=!1}else n=N(t,i);return s(n,(function(t,i){r&&c(r.t,t)===i||d(n,t,e(i))})),3===i?new Set(n):n}(e)}function N(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return g(e)}function B(){function e(e,t){var n=o[e];return n?n.enumerable=t:o[e]=n={configurable:!0,enumerable:t,get:function(){var t=this[X];return $.get(t,e)},set:function(t){var n=this[X];$.set(n,e,t)}},n}function t(e){for(var t=e.length-1;t>=0;t--){var i=e[t][X];if(!i.P)switch(i.i){case 5:r(i)&&k(i);break;case 4:n(i)&&k(i)}}}function n(e){for(var t=e.t,n=e.k,r=K(n),i=r.length-1;i>=0;i--){var o=r[i];if(o!==X){var a=t[o];if(void 0===a&&!u(t,o))return!0;var s=n[o],l=s&&s[X];if(l?l.t!==a:!f(s,a))return!0}}var c=!!t[X];return r.length!==K(t).length+(c?0:1)}function r(e){var t=e.k;if(t.length!==e.t.length)return!0;var n=Object.getOwnPropertyDescriptor(t,t.length-1);if(n&&!n.get)return!0;for(var r=0;r1?r-1:0),o=1;o1?r-1:0),o=1;o=0;n--){var r=t[n];if(0===r.path.length&&"replace"===r.op){e=r.value;break}}n>-1&&(t=t.slice(n+1));var o=b("Patches").$;return i(e)?o(e,t):this.produce(e,(function(e){return o(e,t)}))},e}()),ne=te.produce;te.produceWithPatches.bind(te),te.setAutoFreeze.bind(te),te.setUseProxies.bind(te),te.applyPatches.bind(te),te.createDraft.bind(te),te.finishDraft.bind(te);t.b=ne},function(e,t,n){"use strict";n.d(t,"e",(function(){return i})),n.d(t,"d",(function(){return o})),n.d(t,"a",(function(){return a})),n.d(t,"b",(function(){return s})),n.d(t,"c",(function(){return l})),n.d(t,"i",(function(){return u})),n.d(t,"f",(function(){return c})),n.d(t,"g",(function(){return d})),n.d(t,"h",(function(){return f}));var r=n(61);class i extends r.b{setValue(e,t){this._values.set(e,t)}}class o extends i{}class a extends i{}class s extends i{}class l extends i{}class u extends i{}class c extends i{}class d extends i{}class f extends i{}},function(e,t,n){"use strict";function r(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(31);class i{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsInt(e,t){return(t||new i).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsInt(e,t){return e.setPosition(e.position()+r.SIZE_PREFIX_LENGTH),(t||new i).__init(e.readInt32(e.position())+e.position(),e)}bitWidth(){const e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt32(this.bb_pos+e):0}isSigned(){const e=this.bb.__offset(this.bb_pos,6);return!!e&&!!this.bb.readInt8(this.bb_pos+e)}static startInt(e){e.startObject(2)}static addBitWidth(e,t){e.addFieldInt32(0,t,0)}static addIsSigned(e,t){e.addFieldInt8(1,+t,0)}static endInt(e){return e.endObject()}static createInt(e,t,n){return i.startInt(e),i.addBitWidth(e,t),i.addIsSigned(e,n),i.endInt(e)}}},function(e,t,n){"use strict";e.exports=function(e,t,n,r,i,o,a,s){if(!e){var l;if(void 0===t)l=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var u=[n,r,i,o,a,s],c=0;(l=new Error(t.replace(/%s/g,(function(){return u[c++]})))).name="Invariant Violation"}throw l.framesToPop=1,l}}},function(e,t,n){"use strict";function r(e,t,n,r){return 0!=(n&1<>r}function o(e,t,n){return n?!!(e[t>>3]|=1<>3]&=~(1<0||n.byteLength>3):s(new l(n,e,t,null,r)).subarray(0,i)),o}return n}function s(e){const t=[];let n=0,r=0,i=0;for(const o of e)o&&(i|=1<0)&&(t[n++]=i);const o=new Uint8Array(t.length+7&-8);return o.set(t),o}n.r(t),n.d(t,"getBool",(function(){return r})),n.d(t,"getBit",(function(){return i})),n.d(t,"setBool",(function(){return o})),n.d(t,"truncateBitmap",(function(){return a})),n.d(t,"packBools",(function(){return s})),n.d(t,"BitIterator",(function(){return l})),n.d(t,"popcnt_bit_range",(function(){return u})),n.d(t,"popcnt_array",(function(){return c})),n.d(t,"popcnt_uint32",(function(){return d}));class l{constructor(e,t,n,r,i){this.bytes=e,this.length=n,this.context=r,this.get=i,this.bit=t%8,this.byteIndex=t>>3,this.byte=e[this.byteIndex++],this.index=0}next(){return this.index>3<<3,o=t+(t%8==0?0:8-t%8);return u(e,t,o)+u(e,r,n)+c(e,o>>3,r-o>>3)}function c(e,t,n){let r=0,i=Math.trunc(t);const o=new DataView(e.buffer,e.byteOffset,e.byteLength),a=void 0===n?e.byteLength:i+n;for(;a-i>=4;)r+=d(o.getUint32(i)),i+=4;for(;a-i>=2;)r+=d(o.getUint16(i)),i+=2;for(;a-i>=1;)r+=d(o.getUint8(i)),i+=1;return r}function d(e){let t=Math.trunc(e);return t-=t>>>1&1431655765,t=(858993459&t)+(t>>>2&858993459),16843009*(t+(t>>>4)&252645135)>>>24}},function(e,t,n){"use strict";n.d(t,"d",(function(){return Z})),n.d(t,"e",(function(){return K})),n.d(t,"b",(function(){return Q})),n.d(t,"a",(function(){return J})),n.d(t,"c",(function(){return $}));var r=n(31),i=n(142),o=n(100),a=n(155),s=n(213),l=n(132),u=n(156),c=n(533),d=n(53),f=n(124),h=n(378),p=n(242),A=n(192),g=n(243),m=n(208),y=n(209),v=n(244),b=n(178),_=n(238),w=n(239),x=n(240),M=n(424),E=n(377);class O{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsMessage(e,t){return(t||new O).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsMessage(e,t){return e.setPosition(e.position()+r.SIZE_PREFIX_LENGTH),(t||new O).__init(e.readInt32(e.position())+e.position(),e)}version(){const e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt16(this.bb_pos+e):E.a.V1}headerType(){const e=this.bb.__offset(this.bb_pos,6);return e?this.bb.readUint8(this.bb_pos+e):M.a.NONE}header(e){const t=this.bb.__offset(this.bb_pos,8);return t?this.bb.__union(e,this.bb_pos+t):null}bodyLength(){const e=this.bb.__offset(this.bb_pos,10);return e?this.bb.readInt64(this.bb_pos+e):BigInt("0")}customMetadata(e,t){const n=this.bb.__offset(this.bb_pos,12);return n?(t||new f.a).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+n)+4*e),this.bb):null}customMetadataLength(){const e=this.bb.__offset(this.bb_pos,12);return e?this.bb.__vector_len(this.bb_pos+e):0}static startMessage(e){e.startObject(5)}static addVersion(e,t){e.addFieldInt16(0,t,E.a.V1)}static addHeaderType(e,t){e.addFieldInt8(1,t,M.a.NONE)}static addHeader(e,t){e.addFieldOffset(2,t,0)}static addBodyLength(e,t){e.addFieldInt64(3,t,BigInt("0"))}static addCustomMetadata(e,t){e.addFieldOffset(4,t,0)}static createCustomMetadataVector(e,t){e.startVector(4,t.length,4);for(let n=t.length-1;n>=0;n--)e.addOffset(t[n]);return e.endVector()}static startCustomMetadataVector(e,t){e.startVector(4,t,4)}static endMessage(e){return e.endObject()}static finishMessageBuffer(e,t){e.finish(t)}static finishSizePrefixedMessageBuffer(e,t){e.finish(t,void 0,!0)}static createMessage(e,t,n,r,i,o){return O.startMessage(e),O.addVersion(e,t),O.addHeaderType(e,n),O.addHeader(e,r),O.addBodyLength(e,i),O.addCustomMetadata(e,o),O.endMessage(e)}}var S=n(41),T=n(26),C=n(153),L=n(5),P=n(80),I=n(379),D=n(380),k=n(382),R=n(381),j=n(383),F=n(384),N=n(275);class B extends P.a{visit(e,t){return null==e||null==t?void 0:super.visit(e,t)}visitNull(e,t){return I.a.startNull(t),I.a.endNull(t)}visitInt(e,t){return o.a.startInt(t),o.a.addBitWidth(t,e.bitWidth),o.a.addIsSigned(t,e.isSigned),o.a.endInt(t)}visitFloat(e,t){return p.a.startFloatingPoint(t),p.a.addPrecision(t,e.precision),p.a.endFloatingPoint(t)}visitBinary(e,t){return D.a.startBinary(t),D.a.endBinary(t)}visitBool(e,t){return k.a.startBool(t),k.a.endBool(t)}visitUtf8(e,t){return R.a.startUtf8(t),R.a.endUtf8(t)}visitDecimal(e,t){return A.a.startDecimal(t),A.a.addScale(t,e.scale),A.a.addPrecision(t,e.precision),A.a.addBitWidth(t,e.bitWidth),A.a.endDecimal(t)}visitDate(e,t){return g.a.startDate(t),g.a.addUnit(t,e.unit),g.a.endDate(t)}visitTime(e,t){return m.a.startTime(t),m.a.addUnit(t,e.unit),m.a.addBitWidth(t,e.bitWidth),m.a.endTime(t)}visitTimestamp(e,t){const n=e.timezone&&t.createString(e.timezone)||void 0;return y.a.startTimestamp(t),y.a.addUnit(t,e.unit),void 0!==n&&y.a.addTimezone(t,n),y.a.endTimestamp(t)}visitInterval(e,t){return v.a.startInterval(t),v.a.addUnit(t,e.unit),v.a.endInterval(t)}visitList(e,t){return j.a.startList(t),j.a.endList(t)}visitStruct(e,t){return F.a.startStruct_(t),F.a.endStruct_(t)}visitUnion(e,t){b.a.startTypeIdsVector(t,e.typeIds.length);const n=b.a.createTypeIdsVector(t,e.typeIds);return b.a.startUnion(t),b.a.addMode(t,e.mode),b.a.addTypeIds(t,n),b.a.endUnion(t)}visitDictionary(e,t){const n=this.visit(e.indices,t);return N.a.startDictionaryEncoding(t),N.a.addId(t,BigInt(e.id)),N.a.addIsOrdered(t,e.isOrdered),void 0!==n&&N.a.addIndexType(t,n),N.a.endDictionaryEncoding(t)}visitFixedSizeBinary(e,t){return _.a.startFixedSizeBinary(t),_.a.addByteWidth(t,e.byteWidth),_.a.endFixedSizeBinary(t)}visitFixedSizeList(e,t){return w.a.startFixedSizeList(t),w.a.addListSize(t,e.listSize),w.a.endFixedSizeList(t)}visitMap(e,t){return x.a.startMap(t),x.a.addKeysSorted(t,e.keysSorted),x.a.endMap(t)}}const z=new B;var U=n(12);function H(e){return new K(e.count,function e(t){return(t||[]).reduce((t,n)=>{return[...t,new $(n.count,(r=n.VALIDITY,(r||[]).reduce((e,t)=>e+ +(0===t),0))),...e(n.children)];var r},[])}(e.columns),function e(t,n=[]){for(let r=-1,i=(t||[]).length;++rS.a.fromJSON(e,t))}function G(e){return new Map(Object.entries(e||{}))}function Y(e){return new U.p(e.isSigned,e.bitWidth)}function W(e,t){const n=e.type.name;switch(n){case"NONE":case"null":return new U.z;case"binary":return new U.a;case"utf8":return new U.R;case"bool":return new U.b;case"list":return new U.x((t||[])[0]);case"struct":case"struct_":return new U.B(t||[])}switch(n){case"int":{const t=e.type;return new U.p(t.isSigned,t.bitWidth)}case"floatingpoint":{const t=e.type;return new U.l(L.f[t.precision])}case"decimal":{const t=e.type;return new U.g(t.scale,t.precision,t.bitWidth)}case"date":{const t=e.type;return new U.f(L.b[t.unit])}case"time":{const t=e.type;return new U.C(L.g[t.unit],t.bitWidth)}case"timestamp":{const t=e.type;return new U.H(L.g[t.unit],t.timezone)}case"interval":{const t=e.type;return new U.u(L.c[t.unit])}case"union":{const n=e.type;return new U.Q(L.i[n.mode],n.typeIds||[],t||[])}case"fixedsizebinary":{const t=e.type;return new U.j(t.byteWidth)}case"fixedsizelist":{const n=e.type;return new U.k(n.listSize,(t||[])[0])}case"map":{const n=e.type;return new U.y((t||[])[0],n.keysSorted)}}throw new Error(`Unrecognized type: "${n}"`)}var q=r.Builder,X=r.ByteBuffer;class Z{static fromJSON(e,t){const n=new Z(0,L.e.V4,t);return n._createHeader=function(e,t){return()=>{switch(t){case L.d.Schema:return S.b.fromJSON(e);case L.d.RecordBatch:return K.fromJSON(e);case L.d.DictionaryBatch:return Q.fromJSON(e)}throw new Error(`Unrecognized Message type: { name: ${L.d[t]}, type: ${t} }`)}}(e,t),n}static decode(e){e=new X(Object(T.toUint8Array)(e));const t=O.getRootAsMessage(e),n=t.bodyLength(),r=t.version(),o=t.headerType(),l=new Z(n,r,o);return l._createHeader=function(e,t){return()=>{switch(t){case L.d.Schema:return S.b.decode(e.header(new i.a));case L.d.RecordBatch:return K.decode(e.header(new a.a),e.version());case L.d.DictionaryBatch:return Q.decode(e.header(new s.a),e.version())}throw new Error(`Unrecognized Message type: { name: ${L.d[t]}, type: ${t} }`)}}(t,o),l}static encode(e){const t=new q;let n=-1;return e.isSchema()?n=S.b.encode(t,e.header()):e.isRecordBatch()?n=K.encode(t,e.header()):e.isDictionaryBatch()&&(n=Q.encode(t,e.header())),O.startMessage(t),O.addVersion(t,L.e.V4),O.addHeader(t,n),O.addHeaderType(t,e.headerType),O.addBodyLength(t,BigInt(e.bodyLength)),O.finishMessageBuffer(t,O.endMessage(t)),t.asUint8Array()}static from(e,t=0){if(e instanceof S.b)return new Z(0,L.e.V4,L.d.Schema,e);if(e instanceof K)return new Z(t,L.e.V4,L.d.RecordBatch,e);if(e instanceof Q)return new Z(t,L.e.V4,L.d.DictionaryBatch,e);throw new Error("Unrecognized Message header: "+e)}get type(){return this.headerType}get version(){return this._version}get headerType(){return this._headerType}get bodyLength(){return this._bodyLength}header(){return this._createHeader()}isSchema(){return this.headerType===L.d.Schema}isRecordBatch(){return this.headerType===L.d.RecordBatch}isDictionaryBatch(){return this.headerType===L.d.DictionaryBatch}constructor(e,t,n,r){this._version=t,this._headerType=n,this.body=new Uint8Array(0),r&&(this._createHeader=()=>r),this._bodyLength=Object(C.a)(e)}}class K{get nodes(){return this._nodes}get length(){return this._length}get buffers(){return this._buffers}constructor(e,t,n){this._nodes=t,this._buffers=n,this._length=Object(C.a)(e)}}class Q{get id(){return this._id}get data(){return this._data}get isDelta(){return this._isDelta}get length(){return this.data.length}get nodes(){return this.data.nodes}get buffers(){return this.data.buffers}constructor(e,t,n=!1){this._data=e,this._isDelta=n,this._id=Object(C.a)(t)}}class J{constructor(e,t){this.offset=Object(C.a)(e),this.length=Object(C.a)(t)}}class ${constructor(e,t){this.length=Object(C.a)(e),this.nullCount=Object(C.a)(t)}}function ee(e,t){const n=[];for(let r,i=-1,o=-1,a=e.childrenLength();++iS.a.encode(e,t)),l=u.a.createChildrenVector(e,s),c=t.metadata&&t.metadata.size>0?u.a.createCustomMetadataVector(e,[...t.metadata].map(([t,n])=>{const r=e.createString(""+t),i=e.createString(""+n);return f.a.startKeyValue(e),f.a.addKey(e,r),f.a.addValue(e,i),f.a.endKeyValue(e)})):-1;t.name&&(n=e.createString(t.name));u.a.startField(e),u.a.addType(e,r),u.a.addTypeType(e,a),u.a.addChildren(e,l),u.a.addNullable(e,!!t.nullable),-1!==n&&u.a.addName(e,n);-1!==i&&u.a.addDictionary(e,i);-1!==c&&u.a.addCustomMetadata(e,c);return u.a.endField(e)},S.a.decode=function(e,t){let n,r,i,o,a,s;t&&(s=e.dictionary())?t.has(n=Object(C.a)(s.id()))?(o=(o=s.indexType())?ne(o):new U.r,a=new U.i(t.get(n),o,n,s.isOrdered()),r=new S.a(e.name(),a,e.nullable(),te(e))):(o=(o=s.indexType())?ne(o):new U.r,t.set(n,i=re(e,ee(e,t))),a=new U.i(i,o,n,s.isOrdered()),r=new S.a(e.name(),a,e.nullable(),te(e))):(i=re(e,ee(e,t)),r=new S.a(e.name(),i,e.nullable(),te(e)));return r||null},S.a.fromJSON=function(e,t){let n,r,i,o,a,s;return t&&(o=e.dictionary)?t.has(n=o.id)?(r=(r=o.indexType)?Y(r):new U.r,s=new U.i(t.get(n),r,n,o.isOrdered),i=new S.a(e.name,s,e.nullable,G(e.customMetadata))):(r=(r=o.indexType)?Y(r):new U.r,t.set(n,a=W(e,V(e,t))),s=new U.i(a,r,n,o.isOrdered),i=new S.a(e.name,s,e.nullable,G(e.customMetadata))):(a=W(e,V(e,t)),i=new S.a(e.name,a,e.nullable,G(e.customMetadata))),i||null},S.b.encode=function(e,t){const n=t.fields.map(t=>S.a.encode(e,t));i.a.startFieldsVector(e,n.length);const r=i.a.createFieldsVector(e,n),o=t.metadata&&t.metadata.size>0?i.a.createCustomMetadataVector(e,[...t.metadata].map(([t,n])=>{const r=e.createString(""+t),i=e.createString(""+n);return f.a.startKeyValue(e),f.a.addKey(e,r),f.a.addValue(e,i),f.a.endKeyValue(e)})):-1;i.a.startSchema(e),i.a.addFields(e,r),i.a.addEndianness(e,ie?h.a.Little:h.a.Big),-1!==o&&i.a.addCustomMetadata(e,o);return i.a.endSchema(e)},S.b.decode=function(e,t=new Map){const n=function(e,t){const n=[];for(let r,i=-1,o=-1,a=e.fieldsLength();++iS.a.fromJSON(e,t))}(e,t),G(e.customMetadata),t)},K.encode=function(e,t){const n=t.nodes||[],r=t.buffers||[];a.a.startNodesVector(e,n.length);for(const t of n.slice().reverse())$.encode(e,t);const i=e.endVector();a.a.startBuffersVector(e,r.length);for(const t of r.slice().reverse())J.encode(e,t);const o=e.endVector();return a.a.startRecordBatch(e),a.a.addLength(e,BigInt(t.length)),a.a.addNodes(e,i),a.a.addBuffers(e,o),a.a.endRecordBatch(e)},K.decode=function(e,t=L.e.V4){if(null!==e.compression())throw new Error("Record batch compression not implemented");return new K(e.length(),function(e){const t=[];for(let n,r=-1,i=-1,o=e.nodesLength();++r{const e=new ArrayBuffer(2);return new DataView(e).setInt16(0,256,!0),256===new Int16Array(e)[0]})()},function(e,t,n){"use strict";(function(e,r){n.d(t,"a",(function(){return i})),n.d(t,"c",(function(){return o})),n.d(t,"b",(function(){return a}));"undefined"!=typeof self&&self,"undefined"!=typeof window&&window,"undefined"!=typeof document&&document;const i="object"!=typeof r||"[object process]"!==String(r)||r.browser,o="function"==typeof importScripts,a="undefined"!=typeof window&&void 0!==window.orientation,s=void 0!==r&&r.version&&/v([0-9]*)/.exec(r.version);s&&parseFloat(s[1])}).call(this,n(68),n(113))},function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return o}));var r=n(52);function i(e){if(!Number.isFinite(e))throw new Error("Invalid number ".concat(e));return e}function o(e,t,n=""){if(r.b.debug&&!function(e,t){if(e.length!==t)return!1;for(let t=0;t`Expected ${i.d[e]} Message in stream, but was null or length 0.`,h=e=>`Header pointer of flatbuffer-encoded ${i.d[e]} Message is null or length 0.`,p=(e,t)=>`Expected to read ${e} metadata bytes, but only read ${t}.`,A=(e,t)=>`Expected to read ${e} bytes for message body, but only read ${t}.`;class g{constructor(e){this.source=e instanceof c.c?e:new c.c(e)}[Symbol.iterator](){return this}next(){let e;return(e=this.readMetadataLength()).done||-1===e.value&&(e=this.readMetadataLength()).done||(e=this.readMetadata(e.value)).done?d.c:e}throw(e){return this.source.throw(e)}return(e){return this.source.return(e)}readMessage(e){let t;if((t=this.next()).done)return null;if(null!=e&&t.value.headerType!==e)throw new Error(f(e));return t.value}readMessageBody(e){if(e<=0)return new Uint8Array(0);const t=Object(u.toUint8Array)(this.source.read(e));if(t.byteLength[...t,...n.VALIDITY&&[n.VALIDITY]||[],...n.TYPE&&[n.TYPE]||[],...n.OFFSET&&[n.OFFSET]||[],...n.DATA&&[n.DATA]||[],...e(n.children)],[])}(this._body)}readMessage(e){let t;if((t=this.next()).done)return null;if(null!=e&&t.value.headerType!==e)throw new Error(f(e));return t.value}readSchema(){const e=i.d.Schema,t=this.readMessage(e),n=null==t?void 0:t.header();if(!t||!n)throw new Error(h(e));return n}}const v=4,b=new Uint8Array("ARROW1".length);for(let e=0;e<"ARROW1".length;e+=1)b[e]="ARROW1".codePointAt(e);function _(e,t=0){for(let n=-1,r=b.length;++n>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?w(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?w(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=d.exec(e))?new E(t[1],t[2],t[3],1):(t=f.exec(e))?new E(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=h.exec(e))?w(t[1],t[2],t[3],t[4]):(t=p.exec(e))?w(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=A.exec(e))?C(t[1],t[2]/100,t[3]/100,1):(t=g.exec(e))?C(t[1],t[2]/100,t[3]/100,t[4]):m.hasOwnProperty(e)?_(m[e]):"transparent"===e?new E(NaN,NaN,NaN,0):null}function _(e){return new E(e>>16&255,e>>8&255,255&e,1)}function w(e,t,n,r){return r<=0&&(e=t=n=NaN),new E(e,t,n,r)}function x(e){return e instanceof i||(e=b(e)),e?new E((e=e.rgb()).r,e.g,e.b,e.opacity):new E}function M(e,t,n,r){return 1===arguments.length?x(e):new E(e,t,n,null==r?1:r)}function E(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function O(){return"#"+T(this.r)+T(this.g)+T(this.b)}function S(){var e=this.opacity;return(1===(e=isNaN(e)?1:Math.max(0,Math.min(1,e)))?"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))+(1===e?")":", "+e+")")}function T(e){return((e=Math.max(0,Math.min(255,Math.round(e)||0)))<16?"0":"")+e.toString(16)}function C(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new I(e,t,n,r)}function L(e){if(e instanceof I)return new I(e.h,e.s,e.l,e.opacity);if(e instanceof i||(e=b(e)),!e)return new I;if(e instanceof I)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,o=Math.min(t,n,r),a=Math.max(t,n,r),s=NaN,l=a-o,u=(a+o)/2;return l?(s=t===a?(n-r)/l+6*(n0&&u<1?0:s,new I(s,l,u,e.opacity)}function P(e,t,n,r){return 1===arguments.length?L(e):new I(e,t,n,null==r?1:r)}function I(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function D(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}Object(r.a)(i,b,{copy:function(e){return Object.assign(new this.constructor,this,e)},displayable:function(){return this.rgb().displayable()},hex:y,formatHex:y,formatHsl:function(){return L(this).formatHsl()},formatRgb:v,toString:v}),Object(r.a)(E,M,Object(r.b)(i,{brighter:function(e){return e=null==e?a:Math.pow(a,e),new E(this.r*e,this.g*e,this.b*e,this.opacity)},darker:function(e){return e=null==e?o:Math.pow(o,e),new E(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:O,formatHex:O,formatRgb:S,toString:S})),Object(r.a)(I,P,Object(r.b)(i,{brighter:function(e){return e=null==e?a:Math.pow(a,e),new I(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=null==e?o:Math.pow(o,e),new I(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=this.h%360+360*(this.h<0),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 E(D(e>=240?e-240:e+120,i,r),D(e,i,r),D(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(1===(e=isNaN(e)?1:Math.max(0,Math.min(1,e)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===e?")":", "+e+")")}}))},function(e,t,n){"use strict";function r(e,t){if(!e)throw new Error(t||"assert failed: gltf")}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.r(t),n.d(t,"AutoScrollActivator",(function(){return we})),n.d(t,"DndContext",(function(){return Je})),n.d(t,"DragOverlay",(function(){return At})),n.d(t,"KeyboardCode",(function(){return ae})),n.d(t,"KeyboardSensor",(function(){return de})),n.d(t,"MeasuringFrequency",(function(){return Se})),n.d(t,"MeasuringStrategy",(function(){return Oe})),n.d(t,"MouseSensor",(function(){return ve})),n.d(t,"PointerSensor",(function(){return ge})),n.d(t,"TouchSensor",(function(){return _e})),n.d(t,"TraversalOrder",(function(){return xe})),n.d(t,"applyModifiers",(function(){return Ze})),n.d(t,"closestCenter",(function(){return T})),n.d(t,"closestCorners",(function(){return C})),n.d(t,"defaultAnnouncements",(function(){return p})),n.d(t,"defaultCoordinates",(function(){return b})),n.d(t,"defaultDropAnimation",(function(){return ft})),n.d(t,"defaultDropAnimationSideEffects",(function(){return dt})),n.d(t,"defaultScreenReaderInstructions",(function(){return h})),n.d(t,"getClientRect",(function(){return B})),n.d(t,"getFirstCollision",(function(){return O})),n.d(t,"getScrollableAncestors",(function(){return U})),n.d(t,"pointerWithin",(function(){return D})),n.d(t,"rectIntersection",(function(){return P})),n.d(t,"useDndContext",(function(){return nt})),n.d(t,"useDndMonitor",(function(){return f})),n.d(t,"useDraggable",(function(){return tt})),n.d(t,"useDroppable",(function(){return it})),n.d(t,"useSensor",(function(){return y})),n.d(t,"useSensors",(function(){return v}));var r=n(0),i=n.n(r),o=n(58),a=n(22);const s={display:"none"};function l(e){let{id:t,value:n}=e;return i.a.createElement("div",{id:t,style:s},n)}const u={position:"fixed",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};function c(e){let{id:t,announcement:n}=e;return i.a.createElement("div",{id:t,style:u,role:"status","aria-live":"assertive","aria-atomic":!0},n)}const d=Object(r.createContext)(null);function f(e){const t=Object(r.useContext)(d);Object(r.useEffect)(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of ");return t(e)},[e,t])}const h={draggable:"\n To pick up a draggable item, press the space bar.\n While dragging, use the arrow keys to move the item.\n Press space again to drop the item in its new position, or press escape to cancel.\n "},p={onDragStart(e){let{active:t}=e;return"Picked up draggable item "+t.id+"."},onDragOver(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was moved over droppable area "+n.id+".":"Draggable item "+t.id+" is no longer over a droppable area."},onDragEnd(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was dropped over droppable area "+n.id:"Draggable item "+t.id+" was dropped."},onDragCancel(e){let{active:t}=e;return"Dragging was cancelled. Draggable item "+t.id+" was dropped."}};function A(e){let{announcements:t=p,container:n,hiddenTextDescribedById:s,screenReaderInstructions:u=h}=e;const{announce:d,announcement:A}=function(){const[e,t]=Object(r.useState)("");return{announce:Object(r.useCallback)(e=>{null!=e&&t(e)},[]),announcement:e}}(),g=Object(a.useUniqueId)("DndLiveRegion"),[m,y]=Object(r.useState)(!1);if(Object(r.useEffect)(()=>{y(!0)},[]),f(Object(r.useMemo)(()=>({onDragStart(e){let{active:n}=e;d(t.onDragStart({active:n}))},onDragMove(e){let{active:n,over:r}=e;t.onDragMove&&d(t.onDragMove({active:n,over:r}))},onDragOver(e){let{active:n,over:r}=e;d(t.onDragOver({active:n,over:r}))},onDragEnd(e){let{active:n,over:r}=e;d(t.onDragEnd({active:n,over:r}))},onDragCancel(e){let{active:n,over:r}=e;d(t.onDragCancel({active:n,over:r}))}}),[d,t])),!m)return null;const v=i.a.createElement(i.a.Fragment,null,i.a.createElement(l,{id:s,value:u.draggable}),i.a.createElement(c,{id:g,announcement:A}));return n?Object(o.createPortal)(v,n):v}var g;function m(){}function y(e,t){return Object(r.useMemo)(()=>({sensor:e,options:null!=t?t:{}}),[e,t])}function v(){for(var e=arguments.length,t=new Array(e),n=0;n[...t].filter(e=>null!=e),[...t])}!function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"}(g||(g={}));const b=Object.freeze({x:0,y:0});function _(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function w(e,t){const n=Object(a.getEventCoordinates)(e);if(!n)return"0 0";return(n.x-t.left)/t.width*100+"% "+(n.y-t.top)/t.height*100+"%"}function x(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return n-r}function M(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return r-n}function E(e){let{left:t,top:n,height:r,width:i}=e;return[{x:t,y:n},{x:t+i,y:n},{x:t,y:n+r},{x:t+i,y:n+r}]}function O(e,t){if(!e||0===e.length)return null;const[n]=e;return t?n[t]:n}function S(e,t,n){return void 0===t&&(t=e.left),void 0===n&&(n=e.top),{x:t+.5*e.width,y:n+.5*e.height}}const T=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const i=S(t,t.left,t.top),o=[];for(const e of r){const{id:t}=e,r=n.get(t);if(r){const n=_(S(r),i);o.push({id:t,data:{droppableContainer:e,value:n}})}}return o.sort(x)},C=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const i=E(t),o=[];for(const e of r){const{id:t}=e,r=n.get(t);if(r){const n=E(r),a=i.reduce((e,t,r)=>e+_(n[r],t),0),s=Number((a/4).toFixed(4));o.push({id:t,data:{droppableContainer:e,value:s}})}}return o.sort(x)};function L(e,t){const n=Math.max(t.top,e.top),r=Math.max(t.left,e.left),i=Math.min(t.left+t.width,e.left+e.width),o=Math.min(t.top+t.height,e.top+e.height),a=i-r,s=o-n;if(r{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const i=[];for(const e of r){const{id:r}=e,o=n.get(r);if(o){const n=L(o,t);n>0&&i.push({id:r,data:{droppableContainer:e,value:n}})}}return i.sort(M)};function I(e,t){const{top:n,left:r,bottom:i,right:o}=t;return n<=e.y&&e.y<=i&&r<=e.x&&e.x<=o}const D=e=>{let{droppableContainers:t,droppableRects:n,pointerCoordinates:r}=e;if(!r)return[];const i=[];for(const e of t){const{id:t}=e,o=n.get(t);if(o&&I(r,o)){const n=E(o).reduce((e,t)=>e+_(r,t),0),a=Number((n/4).toFixed(4));i.push({id:t,data:{droppableContainer:e,value:a}})}}return i.sort(x)};function k(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:b}function R(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i({...t,top:t.top+e*n.y,bottom:t.bottom+e*n.y,left:t.left+e*n.x,right:t.right+e*n.x}),{...t})}}const j=R(1);function F(e){if(e.startsWith("matrix3d(")){const t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}if(e.startsWith("matrix(")){const t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}const N={ignoreTransform:!1};function B(e,t){void 0===t&&(t=N);let n=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:t,transformOrigin:r}=Object(a.getWindow)(e).getComputedStyle(e);t&&(n=function(e,t,n){const r=F(t);if(!r)return e;const{scaleX:i,scaleY:o,x:a,y:s}=r,l=e.left-a-(1-i)*parseFloat(n),u=e.top-s-(1-o)*parseFloat(n.slice(n.indexOf(" ")+1)),c=i?e.width/i:e.width,d=o?e.height/o:e.height;return{width:c,height:d,top:u,right:l+c,bottom:u+d,left:l}}(n,t,r))}const{top:r,left:i,width:o,height:s,bottom:l,right:u}=n;return{top:r,left:i,width:o,height:s,bottom:l,right:u}}function z(e){return B(e,{ignoreTransform:!0})}function U(e,t){const n=[];return e?function r(i){if(null!=t&&n.length>=t)return n;if(!i)return n;if(Object(a.isDocument)(i)&&null!=i.scrollingElement&&!n.includes(i.scrollingElement))return n.push(i.scrollingElement),n;if(!Object(a.isHTMLElement)(i)||Object(a.isSVGElement)(i))return n;if(n.includes(i))return n;const o=Object(a.getWindow)(e).getComputedStyle(i);return i!==e&&function(e,t){void 0===t&&(t=Object(a.getWindow)(e).getComputedStyle(e));const n=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(e=>{const r=t[e];return"string"==typeof r&&n.test(r)})}(i,o)&&n.push(i),function(e,t){return void 0===t&&(t=Object(a.getWindow)(e).getComputedStyle(e)),"fixed"===t.position}(i,o)?n:r(i.parentNode)}(e):n}function H(e){const[t]=U(e,1);return null!=t?t:null}function V(e){return a.canUseDOM&&e?Object(a.isWindow)(e)?e:Object(a.isNode)(e)?Object(a.isDocument)(e)||e===Object(a.getOwnerDocument)(e).scrollingElement?window:Object(a.isHTMLElement)(e)?e:null:null:null}function G(e){return Object(a.isWindow)(e)?e.scrollX:e.scrollLeft}function Y(e){return Object(a.isWindow)(e)?e.scrollY:e.scrollTop}function W(e){return{x:G(e),y:Y(e)}}var q;function X(e){return!(!a.canUseDOM||!e)&&e===document.scrollingElement}function Z(e){const t={x:0,y:0},n=X(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},r={x:e.scrollWidth-n.width,y:e.scrollHeight-n.height};return{isTop:e.scrollTop<=t.y,isLeft:e.scrollLeft<=t.x,isBottom:e.scrollTop>=r.y,isRight:e.scrollLeft>=r.x,maxScroll:r,minScroll:t}}!function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"}(q||(q={}));const K={x:.2,y:.2};function Q(e,t,n,r,i){let{top:o,left:a,right:s,bottom:l}=n;void 0===r&&(r=10),void 0===i&&(i=K);const{isTop:u,isBottom:c,isLeft:d,isRight:f}=Z(e),h={x:0,y:0},p={x:0,y:0},A=t.height*i.y,g=t.width*i.x;return!u&&o<=t.top+A?(h.y=q.Backward,p.y=r*Math.abs((t.top+A-o)/A)):!c&&l>=t.bottom-A&&(h.y=q.Forward,p.y=r*Math.abs((t.bottom-A-l)/A)),!f&&s>=t.right-g?(h.x=q.Forward,p.x=r*Math.abs((t.right-g-s)/g)):!d&&a<=t.left+g&&(h.x=q.Backward,p.x=r*Math.abs((t.left+g-a)/g)),{direction:h,speed:p}}function J(e){if(e===document.scrollingElement){const{innerWidth:e,innerHeight:t}=window;return{top:0,left:0,right:e,bottom:t,width:e,height:t}}const{top:t,left:n,right:r,bottom:i}=e.getBoundingClientRect();return{top:t,left:n,right:r,bottom:i,width:e.clientWidth,height:e.clientHeight}}function $(e){return e.reduce((e,t)=>Object(a.add)(e,W(t)),b)}function ee(e,t){if(void 0===t&&(t=B),!e)return;const{top:n,left:r,bottom:i,right:o}=t(e);H(e)&&(i<=0||o<=0||n>=window.innerHeight||r>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const te=[["x",["left","right"],function(e){return e.reduce((e,t)=>e+G(t),0)}],["y",["top","bottom"],function(e){return e.reduce((e,t)=>e+Y(t),0)}]];class ne{constructor(e,t){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const n=U(t),r=$(n);this.rect={...e},this.width=e.width,this.height=e.height;for(const[e,t,i]of te)for(const o of t)Object.defineProperty(this,o,{get:()=>{const t=i(n),a=r[e]-t;return this.rect[o]+a},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class re{constructor(e){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(e=>{var t;return null==(t=this.target)?void 0:t.removeEventListener(...e)})},this.target=e}add(e,t,n){var r;null==(r=this.target)||r.addEventListener(e,t,n),this.listeners.push([e,t,n])}}function ie(e,t){const n=Math.abs(e.x),r=Math.abs(e.y);return"number"==typeof t?Math.sqrt(n**2+r**2)>t:"x"in t&&"y"in t?n>t.x&&r>t.y:"x"in t?n>t.x:"y"in t&&r>t.y}var oe,ae;function se(e){e.preventDefault()}function le(e){e.stopPropagation()}!function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"}(oe||(oe={})),function(e){e.Space="Space",e.Down="ArrowDown",e.Right="ArrowRight",e.Left="ArrowLeft",e.Up="ArrowUp",e.Esc="Escape",e.Enter="Enter"}(ae||(ae={}));const ue={start:[ae.Space,ae.Enter],cancel:[ae.Esc],end:[ae.Space,ae.Enter]},ce=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case ae.Right:return{...n,x:n.x+25};case ae.Left:return{...n,x:n.x-25};case ae.Down:return{...n,y:n.y+25};case ae.Up:return{...n,y:n.y-25}}};class de{constructor(e){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=e;const{event:{target:t}}=e;this.props=e,this.listeners=new re(Object(a.getOwnerDocument)(t)),this.windowListeners=new re(Object(a.getWindow)(t)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(oe.Resize,this.handleCancel),this.windowListeners.add(oe.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(oe.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:e,onStart:t}=this.props,n=e.node.current;n&&ee(n),t(b)}handleKeyDown(e){if(Object(a.isKeyboardEvent)(e)){const{active:t,context:n,options:r}=this.props,{keyboardCodes:i=ue,coordinateGetter:o=ce,scrollBehavior:s="smooth"}=r,{code:l}=e;if(i.end.includes(l))return void this.handleEnd(e);if(i.cancel.includes(l))return void this.handleCancel(e);const{collisionRect:u}=n.current,c=u?{x:u.left,y:u.top}:b;this.referenceCoordinates||(this.referenceCoordinates=c);const d=o(e,{active:t,context:n.current,currentCoordinates:c});if(d){const t=Object(a.subtract)(d,c),r={x:0,y:0},{scrollableAncestors:i}=n.current;for(const n of i){const i=e.code,{isTop:o,isRight:a,isLeft:l,isBottom:u,maxScroll:c,minScroll:f}=Z(n),h=J(n),p={x:Math.min(i===ae.Right?h.right-h.width/2:h.right,Math.max(i===ae.Right?h.left:h.left+h.width/2,d.x)),y:Math.min(i===ae.Down?h.bottom-h.height/2:h.bottom,Math.max(i===ae.Down?h.top:h.top+h.height/2,d.y))},A=i===ae.Right&&!a||i===ae.Left&&!l,g=i===ae.Down&&!u||i===ae.Up&&!o;if(A&&p.x!==d.x){const e=n.scrollLeft+t.x,o=i===ae.Right&&e<=c.x||i===ae.Left&&e>=f.x;if(o&&!t.y)return void n.scrollTo({left:e,behavior:s});r.x=o?n.scrollLeft-e:i===ae.Right?n.scrollLeft-c.x:n.scrollLeft-f.x,r.x&&n.scrollBy({left:-r.x,behavior:s});break}if(g&&p.y!==d.y){const e=n.scrollTop+t.y,o=i===ae.Down&&e<=c.y||i===ae.Up&&e>=f.y;if(o&&!t.x)return void n.scrollTo({top:e,behavior:s});r.y=o?n.scrollTop-e:i===ae.Down?n.scrollTop-c.y:n.scrollTop-f.y,r.y&&n.scrollBy({top:-r.y,behavior:s});break}}this.handleMove(e,Object(a.add)(Object(a.subtract)(d,this.referenceCoordinates),r))}}}handleMove(e,t){const{onMove:n}=this.props;e.preventDefault(),n(t)}handleEnd(e){const{onEnd:t}=this.props;e.preventDefault(),this.detach(),t()}handleCancel(e){const{onCancel:t}=this.props;e.preventDefault(),this.detach(),t()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}function fe(e){return Boolean(e&&"distance"in e)}function he(e){return Boolean(e&&"delay"in e)}de.activators=[{eventName:"onKeyDown",handler:(e,t,n)=>{let{keyboardCodes:r=ue,onActivation:i}=t,{active:o}=n;const{code:a}=e.nativeEvent;if(r.start.includes(a)){const t=o.activatorNode.current;return(!t||e.target===t)&&(e.preventDefault(),null==i||i({event:e.nativeEvent}),!0)}return!1}}];class pe{constructor(e,t,n){var r;void 0===n&&(n=function(e){const{EventTarget:t}=Object(a.getWindow)(e);return e instanceof t?e:Object(a.getOwnerDocument)(e)}(e.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=e,this.events=t;const{event:i}=e,{target:o}=i;this.props=e,this.events=t,this.document=Object(a.getOwnerDocument)(o),this.documentListeners=new re(this.document),this.listeners=new re(n),this.windowListeners=new re(Object(a.getWindow)(o)),this.initialCoordinates=null!=(r=Object(a.getEventCoordinates)(i))?r:b,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:e,props:{options:{activationConstraint:t}}}=this;if(this.listeners.add(e.move.name,this.handleMove,{passive:!1}),this.listeners.add(e.end.name,this.handleEnd),this.windowListeners.add(oe.Resize,this.handleCancel),this.windowListeners.add(oe.DragStart,se),this.windowListeners.add(oe.VisibilityChange,this.handleCancel),this.windowListeners.add(oe.ContextMenu,se),this.documentListeners.add(oe.Keydown,this.handleKeydown),t){if(fe(t))return;if(he(t))return void(this.timeoutId=setTimeout(this.handleStart,t.delay))}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),null!==this.timeoutId&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handleStart(){const{initialCoordinates:e}=this,{onStart:t}=this.props;e&&(this.activated=!0,this.documentListeners.add(oe.Click,le,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(oe.SelectionChange,this.removeTextSelection),t(e))}handleMove(e){var t;const{activated:n,initialCoordinates:r,props:i}=this,{onMove:o,options:{activationConstraint:s}}=i;if(!r)return;const l=null!=(t=Object(a.getEventCoordinates)(e))?t:b,u=Object(a.subtract)(r,l);if(!n&&s){if(he(s))return ie(u,s.tolerance)?this.handleCancel():void 0;if(fe(s))return null!=s.tolerance&&ie(u,s.tolerance)?this.handleCancel():ie(u,s.distance)?this.handleStart():void 0}e.cancelable&&e.preventDefault(),o(l)}handleEnd(){const{onEnd:e}=this.props;this.detach(),e()}handleCancel(){const{onCancel:e}=this.props;this.detach(),e()}handleKeydown(e){e.code===ae.Esc&&this.handleCancel()}removeTextSelection(){var e;null==(e=this.document.getSelection())||e.removeAllRanges()}}const Ae={move:{name:"pointermove"},end:{name:"pointerup"}};class ge extends pe{constructor(e){const{event:t}=e,n=Object(a.getOwnerDocument)(t.target);super(e,Ae,n)}}ge.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return!(!n.isPrimary||0!==n.button)&&(null==r||r({event:n}),!0)}}];const me={move:{name:"mousemove"},end:{name:"mouseup"}};var ye;!function(e){e[e.RightClick=2]="RightClick"}(ye||(ye={}));class ve extends pe{constructor(e){super(e,me,Object(a.getOwnerDocument)(e.event.target))}}ve.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return n.button!==ye.RightClick&&(null==r||r({event:n}),!0)}}];const be={move:{name:"touchmove"},end:{name:"touchend"}};class _e extends pe{constructor(e){super(e,be)}static setup(){return window.addEventListener(be.move.name,e,{capture:!1,passive:!1}),function(){window.removeEventListener(be.move.name,e)};function e(){}}}var we,xe;function Me(e){let{acceleration:t,activator:n=we.Pointer,canScroll:i,draggingRect:o,enabled:s,interval:l=5,order:u=xe.TreeOrder,pointerCoordinates:c,scrollableAncestors:d,scrollableAncestorRects:f,delta:h,threshold:p}=e;const A=function(e){let{delta:t,disabled:n}=e;const r=Object(a.usePrevious)(t);return Object(a.useLazyMemo)(e=>{if(n||!r||!e)return Ee;const i=Math.sign(t.x-r.x),o=Math.sign(t.y-r.y);return{x:{[q.Backward]:e.x[q.Backward]||-1===i,[q.Forward]:e.x[q.Forward]||1===i},y:{[q.Backward]:e.y[q.Backward]||-1===o,[q.Forward]:e.y[q.Forward]||1===o}}},[n,t,r])}({delta:h,disabled:!s}),[g,m]=Object(a.useInterval)(),y=Object(r.useRef)({x:0,y:0}),v=Object(r.useRef)({x:0,y:0}),b=Object(r.useMemo)(()=>{switch(n){case we.Pointer:return c?{top:c.y,bottom:c.y,left:c.x,right:c.x}:null;case we.DraggableRect:return o}},[n,o,c]),_=Object(r.useRef)(null),w=Object(r.useCallback)(()=>{const e=_.current;if(!e)return;const t=y.current.x*v.current.x,n=y.current.y*v.current.y;e.scrollBy(t,n)},[]),x=Object(r.useMemo)(()=>u===xe.TreeOrder?[...d].reverse():d,[u,d]);Object(r.useEffect)(()=>{if(s&&d.length&&b){for(const e of x){if(!1===(null==i?void 0:i(e)))continue;const n=d.indexOf(e),r=f[n];if(!r)continue;const{direction:o,speed:a}=Q(e,r,b,t,p);for(const e of["x","y"])A[e][o[e]]||(a[e]=0,o[e]=0);if(a.x>0||a.y>0)return m(),_.current=e,g(w,l),y.current=a,void(v.current=o)}y.current={x:0,y:0},v.current={x:0,y:0},m()}else m()},[t,w,i,m,s,l,JSON.stringify(b),JSON.stringify(A),g,d,x,f,JSON.stringify(p)])}_e.activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;const{touches:i}=n;return!(i.length>1)&&(null==r||r({event:n}),!0)}}],function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"}(we||(we={})),function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"}(xe||(xe={}));const Ee={x:{[q.Backward]:!1,[q.Forward]:!1},y:{[q.Backward]:!1,[q.Forward]:!1}};var Oe,Se;!function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"}(Oe||(Oe={})),function(e){e.Optimized="optimized"}(Se||(Se={}));const Te=new Map;function Ce(e,t){return Object(a.useLazyMemo)(n=>e?n||("function"==typeof t?t(e):e):null,[t,e])}function Le(e){let{callback:t,disabled:n}=e;const i=Object(a.useEvent)(t),o=Object(r.useMemo)(()=>{if(n||"undefined"==typeof window||void 0===window.ResizeObserver)return;const{ResizeObserver:e}=window;return new e(i)},[n]);return Object(r.useEffect)(()=>()=>null==o?void 0:o.disconnect(),[o]),o}function Pe(e){return new ne(B(e),e)}function Ie(e,t,n){void 0===t&&(t=Pe);const[i,o]=Object(r.useReducer)((function(r){if(!e)return null;var i;if(!1===e.isConnected)return null!=(i=null!=r?r:n)?i:null;const o=t(e);if(JSON.stringify(r)===JSON.stringify(o))return r;return o}),null),s=function(e){let{callback:t,disabled:n}=e;const i=Object(a.useEvent)(t),o=Object(r.useMemo)(()=>{if(n||"undefined"==typeof window||void 0===window.MutationObserver)return;const{MutationObserver:e}=window;return new e(i)},[i,n]);return Object(r.useEffect)(()=>()=>null==o?void 0:o.disconnect(),[o]),o}({callback(t){if(e)for(const n of t){const{type:t,target:r}=n;if("childList"===t&&r instanceof HTMLElement&&r.contains(e)){o();break}}}}),l=Le({callback:o});return Object(a.useIsomorphicLayoutEffect)(()=>{o(),e?(null==l||l.observe(e),null==s||s.observe(document.body,{childList:!0,subtree:!0})):(null==l||l.disconnect(),null==s||s.disconnect())},[e]),i}const De=[];function ke(e,t){void 0===t&&(t=[]);const n=Object(r.useRef)(null);return Object(r.useEffect)(()=>{n.current=null},t),Object(r.useEffect)(()=>{const t=e!==b;t&&!n.current&&(n.current=e),!t&&n.current&&(n.current=null)},[e]),n.current?Object(a.subtract)(e,n.current):b}function Re(e){return Object(r.useMemo)(()=>e?function(e){const t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}(e):null,[e])}const je=[];function Fe(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return Object(a.isHTMLElement)(t)?t:e}const Ne=[{sensor:ge,options:{}},{sensor:de,options:{}}],Be={current:{}},ze={draggable:{measure:z},droppable:{measure:z,strategy:Oe.WhileDragging,frequency:Se.Optimized},dragOverlay:{measure:B}};class Ue extends Map{get(e){var t;return null!=e&&null!=(t=super.get(e))?t:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(e=>{let{disabled:t}=e;return!t})}getNodeFor(e){var t,n;return null!=(t=null==(n=this.get(e))?void 0:n.node.current)?t:void 0}}const He={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new Ue,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:m},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:ze,measureDroppableContainers:m,windowRect:null,measuringScheduled:!1},Ve={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:m,draggableNodes:new Map,over:null,measureDroppableContainers:m},Ge=Object(r.createContext)(Ve),Ye=Object(r.createContext)(He);function We(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new Ue}}}function qe(e,t){switch(t.type){case g.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case g.DragMove:return e.draggable.active?{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}}:e;case g.DragEnd:case g.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case g.RegisterDroppable:{const{element:n}=t,{id:r}=n,i=new Ue(e.droppable.containers);return i.set(r,n),{...e,droppable:{...e.droppable,containers:i}}}case g.SetDroppableDisabled:{const{id:n,key:r,disabled:i}=t,o=e.droppable.containers.get(n);if(!o||r!==o.key)return e;const a=new Ue(e.droppable.containers);return a.set(n,{...o,disabled:i}),{...e,droppable:{...e.droppable,containers:a}}}case g.UnregisterDroppable:{const{id:n,key:r}=t,i=e.droppable.containers.get(n);if(!i||r!==i.key)return e;const o=new Ue(e.droppable.containers);return o.delete(n),{...e,droppable:{...e.droppable,containers:o}}}default:return e}}function Xe(e){let{disabled:t}=e;const{active:n,activatorEvent:i,draggableNodes:o}=Object(r.useContext)(Ge),s=Object(a.usePrevious)(i),l=Object(a.usePrevious)(null==n?void 0:n.id);return Object(r.useEffect)(()=>{if(!t&&!i&&s&&null!=l){if(!Object(a.isKeyboardEvent)(s))return;if(document.activeElement===s.target)return;const e=o.get(l);if(!e)return;const{activatorNode:t,node:n}=e;if(!t.current&&!n.current)return;requestAnimationFrame(()=>{for(const e of[t.current,n.current]){if(!e)continue;const t=Object(a.findFirstFocusableNode)(e);if(t){t.focus();break}}})}},[i,t,o,l,s]),null}function Ze(e,t){let{transform:n,...r}=t;return null!=e&&e.length?e.reduce((e,t)=>t({transform:e,...r}),n):n}const Ke=Object(r.createContext)({...b,scaleX:1,scaleY:1});var Qe;!function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"}(Qe||(Qe={}));const Je=Object(r.memo)((function(e){var t,n,s,l;let{id:u,accessibility:c,autoScroll:f=!0,children:h,sensors:p=Ne,collisionDetection:m=P,measuring:y,modifiers:v,..._}=e;const w=Object(r.useReducer)(qe,void 0,We),[x,M]=w,[E,S]=function(){const[e]=Object(r.useState)(()=>new Set),t=Object(r.useCallback)(t=>(e.add(t),()=>e.delete(t)),[e]);return[Object(r.useCallback)(t=>{let{type:n,event:r}=t;e.forEach(e=>{var t;return null==(t=e[n])?void 0:t.call(e,r)})},[e]),t]}(),[T,C]=Object(r.useState)(Qe.Uninitialized),L=T===Qe.Initialized,{draggable:{active:I,nodes:D,translate:R},droppable:{containers:F}}=x,N=I?D.get(I):null,z=Object(r.useRef)({initial:null,translated:null}),G=Object(r.useMemo)(()=>{var e;return null!=I?{id:I,data:null!=(e=null==N?void 0:N.data)?e:Be,rect:z}:null},[I,N]),Y=Object(r.useRef)(null),[q,Z]=Object(r.useState)(null),[K,Q]=Object(r.useState)(null),J=Object(a.useLatestValue)(_,Object.values(_)),ee=Object(a.useUniqueId)("DndDescribedBy",u),te=Object(r.useMemo)(()=>F.getEnabled(),[F]),re=(ie=y,Object(r.useMemo)(()=>({draggable:{...ze.draggable,...null==ie?void 0:ie.draggable},droppable:{...ze.droppable,...null==ie?void 0:ie.droppable},dragOverlay:{...ze.dragOverlay,...null==ie?void 0:ie.dragOverlay}}),[null==ie?void 0:ie.draggable,null==ie?void 0:ie.droppable,null==ie?void 0:ie.dragOverlay]));var ie;const{droppableRects:oe,measureDroppableContainers:ae,measuringScheduled:se}=function(e,t){let{dragging:n,dependencies:i,config:o}=t;const[s,l]=Object(r.useState)(null),{frequency:u,measure:c,strategy:d}=o,f=Object(r.useRef)(e),h=function(){switch(d){case Oe.Always:return!1;case Oe.BeforeDragging:return n;default:return!n}}(),p=Object(a.useLatestValue)(h),A=Object(r.useCallback)((function(e){void 0===e&&(e=[]),p.current||l(t=>null===t?e:t.concat(e.filter(e=>!t.includes(e))))}),[p]),g=Object(r.useRef)(null),m=Object(a.useLazyMemo)(t=>{if(h&&!n)return Te;if(!t||t===Te||f.current!==e||null!=s){const t=new Map;for(let n of e){if(!n)continue;if(s&&s.length>0&&!s.includes(n.id)&&n.rect.current){t.set(n.id,n.rect.current);continue}const e=n.node.current,r=e?new ne(c(e),e):null;n.rect.current=r,r&&t.set(n.id,r)}return t}return t},[e,s,n,h,c]);return Object(r.useEffect)(()=>{f.current=e},[e]),Object(r.useEffect)(()=>{h||A()},[n,h]),Object(r.useEffect)(()=>{s&&s.length>0&&l(null)},[JSON.stringify(s)]),Object(r.useEffect)(()=>{h||"number"!=typeof u||null!==g.current||(g.current=setTimeout(()=>{A(),g.current=null},u))},[u,h,A,...i]),{droppableRects:m,measureDroppableContainers:A,measuringScheduled:null!=s}}(te,{dragging:L,dependencies:[R.x,R.y],config:re.droppable}),le=function(e,t){const n=null!==t?e.get(t):void 0,r=n?n.node.current:null;return Object(a.useLazyMemo)(e=>{var n;return null===t?null:null!=(n=null!=r?r:e)?n:null},[r,t])}(D,I),ue=Object(r.useMemo)(()=>K?Object(a.getEventCoordinates)(K):null,[K]),ce=function(){const e=!1===(null==q?void 0:q.autoScrollEnabled),t="object"==typeof f?!1===f.enabled:!1===f,n=L&&!e&&!t;if("object"==typeof f)return{...f,enabled:n};return{enabled:n}}(),de=function(e,t){return Ce(e,t)}(le,re.draggable.measure);!function(e){let{activeNode:t,measure:n,initialRect:i,config:o=!0}=e;const s=Object(r.useRef)(!1),{x:l,y:u}="boolean"==typeof o?{x:o,y:o}:o;Object(a.useIsomorphicLayoutEffect)(()=>{if(!l&&!u||!t)return void(s.current=!1);if(s.current||!i)return;const e=null==t?void 0:t.node.current;if(!e||!1===e.isConnected)return;const r=k(n(e),i);if(l||(r.x=0),u||(r.y=0),s.current=!0,Math.abs(r.x)>0||Math.abs(r.y)>0){const t=H(e);t&&t.scrollBy({top:r.y,left:r.x})}},[t,l,u,i,n])}({activeNode:I?D.get(I):null,config:ce.layoutShiftCompensation,initialRect:de,measure:re.draggable.measure});const fe=Ie(le,re.draggable.measure,de),he=Ie(le?le.parentElement:null),pe=Object(r.useRef)({activatorEvent:null,active:null,activeNode:le,collisionRect:null,collisions:null,droppableRects:oe,draggableNodes:D,draggingNode:null,draggingNodeRect:null,droppableContainers:F,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),Ae=F.getNodeFor(null==(t=pe.current.over)?void 0:t.id),ge=function(e){let{measure:t}=e;const[n,i]=Object(r.useState)(null),o=Le({callback:Object(r.useCallback)(e=>{for(const{target:n}of e)if(Object(a.isHTMLElement)(n)){i(e=>{const r=t(n);return e?{...e,width:r.width,height:r.height}:r});break}},[t])}),s=Object(r.useCallback)(e=>{const n=Fe(e);null==o||o.disconnect(),n&&(null==o||o.observe(n)),i(n?t(n):null)},[t,o]),[l,u]=Object(a.useNodeRef)(s);return Object(r.useMemo)(()=>({nodeRef:l,rect:n,setRef:u}),[n,l,u])}({measure:re.dragOverlay.measure}),me=null!=(n=ge.nodeRef.current)?n:le,ye=L?null!=(s=ge.rect)?s:fe:null,ve=Boolean(ge.nodeRef.current&&ge.rect),be=k(_e=ve?null:fe,Ce(_e));var _e;const we=Re(me?Object(a.getWindow)(me):null),xe=function(e){const t=Object(r.useRef)(e),n=Object(a.useLazyMemo)(n=>e?n&&n!==De&&e&&t.current&&e.parentNode===t.current.parentNode?n:U(e):De,[e]);return Object(r.useEffect)(()=>{t.current=e},[e]),n}(L?null!=Ae?Ae:le:null),Ee=function(e,t){void 0===t&&(t=B);const[n]=e,i=Re(n?Object(a.getWindow)(n):null),[o,s]=Object(r.useReducer)((function(){if(!e.length)return je;return e.map(e=>X(e)?i:new ne(t(e),e))}),je),l=Le({callback:s});return e.length>0&&o===je&&s(),Object(a.useIsomorphicLayoutEffect)(()=>{e.length?e.forEach(e=>null==l?void 0:l.observe(e)):(null==l||l.disconnect(),s())},[e]),o}(xe),Se=Ze(v,{transform:{x:R.x-be.x,y:R.y-be.y,scaleX:1,scaleY:1},activatorEvent:K,active:G,activeNodeRect:fe,containerNodeRect:he,draggingNodeRect:ye,over:pe.current.over,overlayNodeRect:ge.rect,scrollableAncestors:xe,scrollableAncestorRects:Ee,windowRect:we}),Pe=ue?Object(a.add)(ue,R):null,Ue=function(e){const[t,n]=Object(r.useState)(null),i=Object(r.useRef)(e),o=Object(r.useCallback)(e=>{const t=V(e.target);t&&n(e=>e?(e.set(t,W(t)),new Map(e)):null)},[]);return Object(r.useEffect)(()=>{const t=i.current;if(e!==t){r(t);const a=e.map(e=>{const t=V(e);return t?(t.addEventListener("scroll",o,{passive:!0}),[t,W(t)]):null}).filter(e=>null!=e);n(a.length?new Map(a):null),i.current=e}return()=>{r(e),r(t)};function r(e){e.forEach(e=>{const t=V(e);null==t||t.removeEventListener("scroll",o)})}},[o,e]),Object(r.useMemo)(()=>e.length?t?Array.from(t.values()).reduce((e,t)=>Object(a.add)(e,t),b):$(e):b,[e,t])}(xe),He=ke(Ue),Ve=ke(Ue,[fe]),Je=Object(a.add)(Se,He),$e=ye?j(ye,Se):null,et=G&&$e?m({active:G,collisionRect:$e,droppableRects:oe,droppableContainers:te,pointerCoordinates:Pe}):null,tt=O(et,"id"),[nt,rt]=Object(r.useState)(null),it=function(e,t,n){return{...e,scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1}}(ve?Se:Object(a.add)(Se,Ve),null!=(l=null==nt?void 0:nt.rect)?l:null,fe),ot=Object(r.useCallback)((e,t)=>{let{sensor:n,options:r}=t;if(null==Y.current)return;const i=D.get(Y.current);if(!i)return;const a=e.nativeEvent,s=new n({active:Y.current,activeNode:i,event:a,options:r,context:pe,onStart(e){const t=Y.current;if(null==t)return;const n=D.get(t);if(!n)return;const{onDragStart:r}=J.current,i={active:{id:t,data:n.data,rect:z}};Object(o.unstable_batchedUpdates)(()=>{null==r||r(i),C(Qe.Initializing),M({type:g.DragStart,initialCoordinates:e,active:t}),E({type:"onDragStart",event:i})})},onMove(e){M({type:g.DragMove,coordinates:e})},onEnd:l(g.DragEnd),onCancel:l(g.DragCancel)});function l(e){return async function(){const{active:t,collisions:n,over:r,scrollAdjustedTranslate:i}=pe.current;let s=null;if(t&&i){const{cancelDrop:o}=J.current;if(s={activatorEvent:a,active:t,collisions:n,delta:i,over:r},e===g.DragEnd&&"function"==typeof o){await Promise.resolve(o(s))&&(e=g.DragCancel)}}Y.current=null,Object(o.unstable_batchedUpdates)(()=>{M({type:e}),C(Qe.Uninitialized),rt(null),Z(null),Q(null);const t=e===g.DragEnd?"onDragEnd":"onDragCancel";if(s){const e=J.current[t];null==e||e(s),E({type:t,event:s})}})}}Object(o.unstable_batchedUpdates)(()=>{Z(s),Q(e.nativeEvent)})},[D]),at=function(e,t){return Object(r.useMemo)(()=>e.reduce((e,n)=>{const{sensor:r}=n;return[...e,...r.activators.map(e=>({eventName:e.eventName,handler:t(e.handler,n)}))]},[]),[e,t])}(p,Object(r.useCallback)((e,t)=>(n,r)=>{const i=n.nativeEvent,o=D.get(r);if(null!==Y.current||!o||i.dndKit||i.defaultPrevented)return;const a={active:o};!0===e(n,t.options,a)&&(i.dndKit={capturedBy:t.sensor},Y.current=r,ot(n,t))},[D,ot]));!function(e){Object(r.useEffect)(()=>{if(!a.canUseDOM)return;const t=e.map(e=>{let{sensor:t}=e;return null==t.setup?void 0:t.setup()});return()=>{for(const e of t)null==e||e()}},e.map(e=>{let{sensor:t}=e;return t}))}(p),Object(a.useIsomorphicLayoutEffect)(()=>{fe&&T===Qe.Initializing&&C(Qe.Initialized)},[fe,T]),Object(r.useEffect)(()=>{const{onDragMove:e}=J.current,{active:t,activatorEvent:n,collisions:r,over:i}=pe.current;if(!t||!n)return;const a={active:t,activatorEvent:n,collisions:r,delta:{x:Je.x,y:Je.y},over:i};Object(o.unstable_batchedUpdates)(()=>{null==e||e(a),E({type:"onDragMove",event:a})})},[Je.x,Je.y]),Object(r.useEffect)(()=>{const{active:e,activatorEvent:t,collisions:n,droppableContainers:r,scrollAdjustedTranslate:i}=pe.current;if(!e||null==Y.current||!t||!i)return;const{onDragOver:a}=J.current,s=r.get(tt),l=s&&s.rect.current?{id:s.id,rect:s.rect.current,data:s.data,disabled:s.disabled}:null,u={active:e,activatorEvent:t,collisions:n,delta:{x:i.x,y:i.y},over:l};Object(o.unstable_batchedUpdates)(()=>{rt(l),null==a||a(u),E({type:"onDragOver",event:u})})},[tt]),Object(a.useIsomorphicLayoutEffect)(()=>{pe.current={activatorEvent:K,active:G,activeNode:le,collisionRect:$e,collisions:et,droppableRects:oe,draggableNodes:D,draggingNode:me,draggingNodeRect:ye,droppableContainers:F,over:nt,scrollableAncestors:xe,scrollAdjustedTranslate:Je},z.current={initial:ye,translated:$e}},[G,le,et,$e,D,me,ye,oe,F,nt,xe,Je]),Me({...ce,delta:R,draggingRect:$e,pointerCoordinates:Pe,scrollableAncestors:xe,scrollableAncestorRects:Ee});const st=Object(r.useMemo)(()=>({active:G,activeNode:le,activeNodeRect:fe,activatorEvent:K,collisions:et,containerNodeRect:he,dragOverlay:ge,draggableNodes:D,droppableContainers:F,droppableRects:oe,over:nt,measureDroppableContainers:ae,scrollableAncestors:xe,scrollableAncestorRects:Ee,measuringConfiguration:re,measuringScheduled:se,windowRect:we}),[G,le,fe,K,et,he,ge,D,F,oe,nt,ae,xe,Ee,re,se,we]),lt=Object(r.useMemo)(()=>({activatorEvent:K,activators:at,active:G,activeNodeRect:fe,ariaDescribedById:{draggable:ee},dispatch:M,draggableNodes:D,over:nt,measureDroppableContainers:ae}),[K,at,G,fe,M,ee,D,nt,ae]);return i.a.createElement(d.Provider,{value:S},i.a.createElement(Ge.Provider,{value:lt},i.a.createElement(Ye.Provider,{value:st},i.a.createElement(Ke.Provider,{value:it},h)),i.a.createElement(Xe,{disabled:!1===(null==c?void 0:c.restoreFocus)})),i.a.createElement(A,{...c,hiddenTextDescribedById:ee}))})),$e=Object(r.createContext)(null),et="button";function tt(e){let{id:t,data:n,disabled:i=!1,attributes:o}=e;const s=Object(a.useUniqueId)("Droppable"),{activators:l,activatorEvent:u,active:c,activeNodeRect:d,ariaDescribedById:f,draggableNodes:h,over:p}=Object(r.useContext)(Ge),{role:A=et,roleDescription:g="draggable",tabIndex:m=0}=null!=o?o:{},y=(null==c?void 0:c.id)===t,v=Object(r.useContext)(y?Ke:$e),[b,_]=Object(a.useNodeRef)(),[w,x]=Object(a.useNodeRef)(),M=function(e,t){return Object(r.useMemo)(()=>e.reduce((e,n)=>{let{eventName:r,handler:i}=n;return e[r]=e=>{i(e,t)},e},{}),[e,t])}(l,t),E=Object(a.useLatestValue)(n);Object(a.useIsomorphicLayoutEffect)(()=>(h.set(t,{id:t,key:s,node:b,activatorNode:w,data:E}),()=>{const e=h.get(t);e&&e.key===s&&h.delete(t)}),[h,t]);return{active:c,activatorEvent:u,activeNodeRect:d,attributes:Object(r.useMemo)(()=>({role:A,tabIndex:m,"aria-disabled":i,"aria-pressed":!(!y||A!==et)||void 0,"aria-roledescription":g,"aria-describedby":f.draggable}),[i,A,m,y,g,f.draggable]),isDragging:y,listeners:i?void 0:M,node:b,over:p,setNodeRef:_,setActivatorNodeRef:x,transform:v}}function nt(){return Object(r.useContext)(Ye)}const rt={timeout:25};function it(e){let{data:t,disabled:n=!1,id:i,resizeObserverConfig:o}=e;const s=Object(a.useUniqueId)("Droppable"),{active:l,dispatch:u,over:c,measureDroppableContainers:d}=Object(r.useContext)(Ge),f=Object(r.useRef)({disabled:n}),h=Object(r.useRef)(!1),p=Object(r.useRef)(null),A=Object(r.useRef)(null),{disabled:m,updateMeasurementsFor:y,timeout:v}={...rt,...o},b=Object(a.useLatestValue)(null!=y?y:i),_=Le({callback:Object(r.useCallback)(()=>{h.current?(null!=A.current&&clearTimeout(A.current),A.current=setTimeout(()=>{d(Array.isArray(b.current)?b.current:[b.current]),A.current=null},v)):h.current=!0},[v]),disabled:m||!l}),w=Object(r.useCallback)((e,t)=>{_&&(t&&(_.unobserve(t),h.current=!1),e&&_.observe(e))},[_]),[x,M]=Object(a.useNodeRef)(w),E=Object(a.useLatestValue)(t);return Object(r.useEffect)(()=>{_&&x.current&&(_.disconnect(),h.current=!1,_.observe(x.current))},[x,_]),Object(a.useIsomorphicLayoutEffect)(()=>(u({type:g.RegisterDroppable,element:{id:i,key:s,disabled:n,node:x,rect:p,data:E}}),()=>u({type:g.UnregisterDroppable,key:s,id:i})),[i]),Object(r.useEffect)(()=>{n!==f.current.disabled&&(u({type:g.SetDroppableDisabled,id:i,key:s,disabled:n}),f.current.disabled=n)},[i,s,n,u]),{active:l,rect:p,isOver:(null==c?void 0:c.id)===i,node:x,over:c,setNodeRef:M}}function ot(e){let{animation:t,children:n}=e;const[o,s]=Object(r.useState)(null),[l,u]=Object(r.useState)(null),c=Object(a.usePrevious)(n);return n||o||!c||s(c),Object(a.useIsomorphicLayoutEffect)(()=>{if(!l)return;const e=null==o?void 0:o.key,n=null==o?void 0:o.props.id;null!=e&&null!=n?Promise.resolve(t(n,l)).then(()=>{s(null)}):s(null)},[t,o,l]),i.a.createElement(i.a.Fragment,null,n,o?Object(r.cloneElement)(o,{ref:u}):null)}const at={x:0,y:0,scaleX:1,scaleY:1};function st(e){let{children:t}=e;return i.a.createElement(Ge.Provider,{value:Ve},i.a.createElement(Ke.Provider,{value:at},t))}const lt={position:"fixed",touchAction:"none"},ut=e=>Object(a.isKeyboardEvent)(e)?"transform 250ms ease":void 0,ct=Object(r.forwardRef)((e,t)=>{let{as:n,activatorEvent:r,adjustScale:o,children:s,className:l,rect:u,style:c,transform:d,transition:f=ut}=e;if(!u)return null;const h=o?d:{...d,scaleX:1,scaleY:1},p={...lt,width:u.width,height:u.height,top:u.top,left:u.left,transform:a.CSS.Transform.toString(h),transformOrigin:o&&r?w(r,u):void 0,transition:"function"==typeof f?f(r):f,...c};return i.a.createElement(n,{className:l,style:p,ref:t},s)}),dt=e=>t=>{let{active:n,dragOverlay:r}=t;const i={},{styles:o,className:a}=e;if(null!=o&&o.active)for(const[e,t]of Object.entries(o.active))void 0!==t&&(i[e]=n.node.style.getPropertyValue(e),n.node.style.setProperty(e,t));if(null!=o&&o.dragOverlay)for(const[e,t]of Object.entries(o.dragOverlay))void 0!==t&&r.node.style.setProperty(e,t);return null!=a&&a.active&&n.node.classList.add(a.active),null!=a&&a.dragOverlay&&r.node.classList.add(a.dragOverlay),function(){for(const[e,t]of Object.entries(i))n.node.style.setProperty(e,t);null!=a&&a.active&&n.node.classList.remove(a.active)}},ft={duration:250,easing:"ease",keyframes:e=>{let{transform:{initial:t,final:n}}=e;return[{transform:a.CSS.Transform.toString(t)},{transform:a.CSS.Transform.toString(n)}]},sideEffects:dt({styles:{active:{opacity:"0"}}})};function ht(e){let{config:t,draggableNodes:n,droppableContainers:r,measuringConfiguration:i}=e;return Object(a.useEvent)((e,o)=>{if(null===t)return;const s=n.get(e);if(!s)return;const l=s.node.current;if(!l)return;const u=Fe(o);if(!u)return;const{transform:c}=Object(a.getWindow)(o).getComputedStyle(o),d=F(c);if(!d)return;const f="function"==typeof t?t:function(e){const{duration:t,easing:n,sideEffects:r,keyframes:i}={...ft,...e};return e=>{let{active:o,dragOverlay:a,transform:s,...l}=e;if(!t)return;const u=a.rect.left-o.rect.left,c=a.rect.top-o.rect.top,d={scaleX:1!==s.scaleX?o.rect.width*s.scaleX/a.rect.width:1,scaleY:1!==s.scaleY?o.rect.height*s.scaleY/a.rect.height:1},f={x:s.x-u,y:s.y-c,...d},h=i({...l,active:o,dragOverlay:a,transform:{initial:s,final:f}}),[p]=h,A=h[h.length-1];if(JSON.stringify(p)===JSON.stringify(A))return;const g=null==r?void 0:r({active:o,dragOverlay:a,...l}),m=a.node.animate(h,{duration:t,easing:n,fill:"forwards"});return new Promise(e=>{m.onfinish=()=>{null==g||g(),e()}})}}(t);return ee(l,i.draggable.measure),f({active:{id:e,data:s.data,node:l,rect:i.draggable.measure(l)},draggableNodes:n,dragOverlay:{node:o,rect:i.dragOverlay.measure(u)},droppableContainers:r,measuringConfiguration:i,transform:d})})}let pt=0;const At=i.a.memo(e=>{let{adjustScale:t=!1,children:n,dropAnimation:o,style:a,transition:s,modifiers:l,wrapperElement:u="div",className:c,zIndex:d=999}=e;const{activatorEvent:f,active:h,activeNodeRect:p,containerNodeRect:A,draggableNodes:g,droppableContainers:m,dragOverlay:y,over:v,measuringConfiguration:b,scrollableAncestors:_,scrollableAncestorRects:w,windowRect:x}=nt(),M=Object(r.useContext)(Ke),E=(O=null==h?void 0:h.id,Object(r.useMemo)(()=>{if(null!=O)return pt++,pt},[O]));var O;const S=Ze(l,{activatorEvent:f,active:h,activeNodeRect:p,containerNodeRect:A,draggingNodeRect:y.rect,over:v,overlayNodeRect:y.rect,scrollableAncestors:_,scrollableAncestorRects:w,transform:M,windowRect:x}),T=Ce(p),C=ht({config:o,draggableNodes:g,droppableContainers:m,measuringConfiguration:b}),L=T?y.setRef:void 0;return i.a.createElement(st,null,i.a.createElement(ot,{animation:C},h&&E?i.a.createElement(ct,{key:E,id:h.id,ref:L,as:u,activatorEvent:f,adjustScale:t,className:c,transition:s,rect:T,style:{zIndex:d,...a},transform:S},n):null))})},,function(e,t){var n,r,i=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(e){if(n===setTimeout)return setTimeout(e,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:o}catch(e){n=o}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(e){r=a}}();var l,u=[],c=!1,d=-1;function f(){c&&l&&(c=!1,l.length?u=l.concat(u):d=-1,u.length&&h())}function h(){if(!c){var e=s(f);c=!0;for(var t=u.length;t;){for(l=u,u=[];++d1)for(var n=1;n1&&void 0!==arguments[1]?arguments[1]:r,n=null,o=null;return function(){return i(t,n,arguments)||(o=e.apply(null,arguments)),n=arguments,o}}function a(e){var t=Array.isArray(e[0])?e[0]:e;if(!t.every((function(e){return"function"==typeof e}))){var n=t.map((function(e){return typeof e})).join(", ");throw new Error("Selector creators expect all input-selectors to be functions, instead received the following types: ["+n+"]")}return t}function s(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r1&&void 0!==arguments[1]?arguments[1]:l;if("object"!=typeof e)throw new Error("createStructuredSelector expects first argument to be an object where each property is a selector, instead received a "+typeof e);var n=Object.keys(e);return t(n.map((function(t){return e[t]})),(function(){for(var e=arguments.length,t=Array(e),r=0;r1&&void 0!==arguments[1]?arguments[1]:{};Object(r.b)(e);const{id:n,userData:i={}}=t;this.gl=e,this.gl2=e,this.id=n||Object(s.c)(this[Symbol.toStringTag]),this.userData=i,this._bound=!1,this._handle=t.handle,void 0===this._handle&&(this._handle=this._createHandle()),this.byteLength=0,this._addStats()}toString(){return"".concat(this[Symbol.toStringTag]||this.constructor.name,"(").concat(this.id,")")}get handle(){return this._handle}delete(){let{deleteChildren:e=!1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=this._handle&&this._deleteHandle(this._handle);return this._handle&&this._removeStats(),this._handle=null,t&&e&&t.filter(Boolean).forEach(e=>e.delete()),this}bind(){let e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.handle;return"function"!=typeof t?(this._bindHandle(t),this):(this._bound?e=t():(this._bindHandle(this.handle),this._bound=!0,e=t(),this._bound=!1,this._bindHandle(null)),e)}unbind(){this.bind(null)}getParameter(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e=Object(o.b)(this.gl,e),Object(a.a)(e);const n=(this.constructor.PARAMETERS||{})[e];if(n){const e=Object(r.j)(this.gl);if(!((!("webgl2"in n)||e)&&(!("extension"in n)||this.gl.getExtension(n.extension)))){const t=n.webgl1,r="webgl2"in n?n.webgl2:n.webgl1;return e?r:t}}return this._getParameter(e,t)}getParameters(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{parameters:t,keys:n}=e,i=this.constructor.PARAMETERS||{},a=Object(r.j)(this.gl),s={},l=t||Object.keys(i);for(const t of l){const r=i[t];if(r&&(!("webgl2"in r)||a)&&(!("extension"in r)||this.gl.getExtension(r.extension))){const i=n?Object(o.a)(this.gl,t):t;s[i]=this.getParameter(t,e),n&&"GLenum"===r.type&&(s[i]=Object(o.a)(this.gl,s[i]))}}return s}setParameter(e,t){e=Object(o.b)(this.gl,e),Object(a.a)(e);const n=(this.constructor.PARAMETERS||{})[e];if(n){const e=Object(r.j)(this.gl);if(!((!("webgl2"in n)||e)&&(!("extension"in n)||this.gl.getExtension(n.extension))))throw new Error("Parameter not available on this platform");"GLenum"===n.type&&(t=Object(o.b)(t))}return this._setParameter(e,t),this}setParameters(e){for(const t in e)this.setParameter(t,e[t]);return this}stubRemovedMethods(e,t,n){return Object(l.a)(this,e,t,n)}initialize(e){}_createHandle(){throw new Error(u)}_deleteHandle(){throw new Error(u)}_bindHandle(e){throw new Error(u)}_getOptsFromHandle(){throw new Error(u)}_getParameter(e,t){throw new Error(u)}_setParameter(e,t){throw new Error(u)}_context(){return this.gl.luma=this.gl.luma||{},this.gl.luma}_addStats(){const e=this[Symbol.toStringTag],t=i.a.get("Resource Counts");t.get("Resources Created").incrementCount(),t.get("".concat(e,"s Created")).incrementCount(),t.get("".concat(e,"s Active")).incrementCount()}_removeStats(){const e=this[Symbol.toStringTag];i.a.get("Resource Counts").get("".concat(e,"s Active")).decrementCount()}_trackAllocatedMemory(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this[Symbol.toStringTag];this._trackAllocatedMemoryForContext(e,t),this._trackAllocatedMemoryForContext(e,t,this.gl.canvas&&this.gl.canvas.id),this.byteLength=e}_trackAllocatedMemoryForContext(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this[Symbol.toStringTag],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";const r=i.a.get("Memory Usage".concat(n));r.get("GPU Memory").addCount(e),r.get("".concat(t," Memory")).addCount(e)}_trackDeallocatedMemory(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this[Symbol.toStringTag];this._trackDeallocatedMemoryForContext(e),this._trackDeallocatedMemoryForContext(e,this.gl.canvas&&this.gl.canvas.id),this.byteLength=0}_trackDeallocatedMemoryForContext(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this[Symbol.toStringTag],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";const n=i.a.get("Memory Usage".concat(t));n.get("GPU Memory").subtractCount(this.byteLength),n.get("".concat(e," Memory")).subtractCount(this.byteLength)}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));const r="4.1.0-alpha.4"},function(e,t,n){"use strict";n.d(t,"a",(function(){return I}));var r=n(363),i=n(59),o=n(80),a=n(228),s=n(347),l=n(161),u=n(231),c=n(5);class d extends o.a{}function f(e){return(t,n)=>t.getValid(n)?e(t,n):null}const h=(e,t)=>4294967296*e[t+1]+(e[t]>>>0),p=e=>new Date(e),A=(e,t,n)=>{if(n+1>=t.length)return null;const r=t[n],i=t[n+1];return e.subarray(r,i)},g=({values:e},t)=>((e,t)=>p(((e,t)=>864e5*e[t])(e,t)))(e,t),m=({values:e},t)=>((e,t)=>p(h(e,t)))(e,2*t),y=({stride:e,values:t},n)=>t[e*n],v=({values:e},t)=>e[t],b=({values:e},t)=>1e3*h(e,2*t),_=({values:e},t)=>h(e,2*t),w=({values:e},t)=>((e,t)=>e[t+1]/1e3*4294967296+(e[t]>>>0)/1e3)(e,2*t),x=({values:e},t)=>((e,t)=>e[t+1]/1e6*4294967296+(e[t]>>>0)/1e6)(e,2*t),M=({values:e},t)=>e[t],E=({values:e},t)=>e[t],O=({values:e},t)=>e[t],S=({values:e},t)=>e[t],T=(e,t)=>{const n=e.type.typeIdToChildIndex[e.typeIds[t]],r=e.children[n];return I.visit(r,e.valueOffsets[t])},C=(e,t)=>{const n=e.type.typeIdToChildIndex[e.typeIds[t]],r=e.children[n];return I.visit(r,t)},L=({values:e},t)=>e.subarray(2*t,2*(t+1)),P=({values:e},t)=>{const n=e[t],r=new Int32Array(2);return r[0]=Math.trunc(n/12),r[1]=Math.trunc(n%12),r};d.prototype.visitNull=f((e,t)=>null),d.prototype.visitBool=f(({offset:e,values:t},n)=>{const r=e+n;return 0!=(t[r>>3]&1<e[t]),d.prototype.visitInt8=f(y),d.prototype.visitInt16=f(y),d.prototype.visitInt32=f(y),d.prototype.visitInt64=f(v),d.prototype.visitUint8=f(y),d.prototype.visitUint16=f(y),d.prototype.visitUint32=f(y),d.prototype.visitUint64=f(v),d.prototype.visitFloat=f(({type:e,values:t},n)=>e.precision!==c.f.HALF?t[n]:Object(u.uint16ToFloat64)(t[n])),d.prototype.visitFloat16=f(({stride:e,values:t},n)=>Object(u.uint16ToFloat64)(t[e*n])),d.prototype.visitFloat32=f(y),d.prototype.visitFloat64=f(y),d.prototype.visitUtf8=f(({values:e,valueOffsets:t},n)=>{const r=A(e,t,n);return null!==r?Object(l.a)(r):null}),d.prototype.visitBinary=f(({values:e,valueOffsets:t},n)=>A(e,t,n)),d.prototype.visitFixedSizeBinary=f(({stride:e,values:t},n)=>t.subarray(e*n,e*(n+1))),d.prototype.visitDate=f((e,t)=>e.type.unit===c.b.DAY?g(e,t):m(e,t)),d.prototype.visitDateDay=f(g),d.prototype.visitDateMillisecond=f(m),d.prototype.visitTimestamp=f((e,t)=>{switch(e.type.unit){case c.g.SECOND:return b(e,t);case c.g.MILLISECOND:return _(e,t);case c.g.MICROSECOND:return w(e,t);case c.g.NANOSECOND:return x(e,t)}}),d.prototype.visitTimestampSecond=f(b),d.prototype.visitTimestampMillisecond=f(_),d.prototype.visitTimestampMicrosecond=f(w),d.prototype.visitTimestampNanosecond=f(x),d.prototype.visitTime=f((e,t)=>{switch(e.type.unit){case c.g.SECOND:return M(e,t);case c.g.MILLISECOND:return E(e,t);case c.g.MICROSECOND:return O(e,t);case c.g.NANOSECOND:return S(e,t)}}),d.prototype.visitTimeSecond=f(M),d.prototype.visitTimeMillisecond=f(E),d.prototype.visitTimeMicrosecond=f(O),d.prototype.visitTimeNanosecond=f(S),d.prototype.visitDecimal=f(({values:e,stride:t},n)=>r.BN.decimal(e.subarray(t*n,t*(n+1)))),d.prototype.visitList=f((e,t)=>{const{valueOffsets:n,stride:r,children:o}=e,{[t*r]:a,[t*r+1]:s}=n,l=o[0].slice(a,s-a);return new i.a([l])}),d.prototype.visitStruct=f((e,t)=>new s.a(e,t)),d.prototype.visitUnion=f((e,t)=>e.type.mode===c.i.Dense?T(e,t):C(e,t)),d.prototype.visitDenseUnion=f(T),d.prototype.visitSparseUnion=f(C),d.prototype.visitDictionary=f((e,t)=>{var n;return null===(n=e.dictionary)||void 0===n?void 0:n.get(e.values[t])}),d.prototype.visitInterval=f((e,t)=>e.type.unit===c.c.DAY_TIME?L(e,t):P(e,t)),d.prototype.visitIntervalDayTime=f(L),d.prototype.visitIntervalYearMonth=f(P),d.prototype.visitFixedSizeList=f((e,t)=>{const{stride:n,children:r}=e,o=r[0].slice(t*n,n);return new i.a([o])}),d.prototype.visitMap=f((e,t)=>{const{valueOffsets:n,children:r}=e,{[t]:i,[t+1]:o}=n,s=r[0];return new a.a(s.slice(i,o-i))});const I=new d},function(e,t,n){"use strict";n.d(t,"b",(function(){return o})),n.d(t,"e",(function(){return a})),n.d(t,"f",(function(){return s})),n.d(t,"h",(function(){return u})),n.d(t,"g",(function(){return c})),n.d(t,"c",(function(){return d})),n.d(t,"a",(function(){return f})),n.d(t,"d",(function(){return h}));n(139);const r=1/Math.PI*180,i=1/180*Math.PI,o={};function a(e,{precision:t=o.precision||4}={}){return e=function(e){return Math.round(e/o.EPSILON)*o.EPSILON}(e),"".concat(parseFloat(e.toPrecision(t)))}function s(e){return Array.isArray(e)||ArrayBuffer.isView(e)&&!(e instanceof DataView)}function l(e,t,n){if(s(e)){n=n||((r=e).clone?r.clone():new Array(r.length));for(let r=0;re*i,t)}(e)}function c(e){return d(e)}function d(e,t){return l(e,e=>e*r,t)}function f(e,t,n){return l(e,e=>Math.max(t,Math.min(n,e)))}function h(e,t,n){const r=o.EPSILON;n&&(o.EPSILON=n);try{if(e===t)return!0;if(s(e)&&s(t)){if(e.length!==t.length)return!1;for(let n=0;n1&&void 0!==arguments[1]?arguments[1]:[255,0,0,255];if(!Array.isArray(e))return t;return[255*e[0],255*e[1],255*e[2],255*e[3]]},t.recursivelyTraverseNestedArrays=function e(t,n,r){if(!Array.isArray(t[0]))return!0;for(var i=0;i1&&p.length){var A,g;o?(A=h.map((function(e){return o.project(e)})),g=o.project(p)):(A=h,g=p);for(var m=1;mb&&(f=Math.sqrt(Math.min(_,w))),(null==n||n>f)&&(M>b?w<_?(r=0,i=1):(i=0,r=1):(r=Math.sqrt(w-x)/Math.sqrt(b),i=Math.sqrt(_-x)/Math.sqrt(b)),n=f,d=m)}var E=A[d-1][0]-A[d][0],O=A[d-1][1]-A[d][1];a=A[d-1][0]-E*r,u=A[d-1][1]-O*r}var S={x:a,y:u,idx:d-1,to:r,from:i};if(o){var T=o.unproject([S.x,S.y]);S={x:T[0],y:T[1],idx:d-1,to:r,from:i}}c=(0,s.point)([S.x,S.y],{dist:Math.abs(S.from-S.to),index:S.idx})})),c},t.getPickedEditHandle=function(e){var t=m(e);return t.length?t[0]:null},t.getPickedSnapSourceEditHandle=function(e){return m(e).find((function(e){return"snap-source"===e.properties.editHandleType}))},t.getNonGuidePicks=function(e){return e&&e.filter((function(e){return!e.isGuide}))},t.getPickedExistingEditHandle=function(e){return m(e).find((function(e){var t=e.properties;return t.featureIndex>=0&&"existing"===t.editHandleType}))},t.getPickedIntermediateEditHandle=function(e){return m(e).find((function(e){var t=e.properties;return t.featureIndex>=0&&"intermediate"===t.editHandleType}))},t.getPickedEditHandles=m,t.getEditHandlesForGeometry=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"existing",r=[];switch(e.type){case"Point":r=[{type:"Feature",properties:{guideType:"editHandle",editHandleType:n,positionIndexes:[],featureIndex:t},geometry:{type:"Point",coordinates:e.coordinates}}];break;case"MultiPoint":case"LineString":r=r.concat(y(e.coordinates,[],t,n));break;case"Polygon":case"MultiLineString":for(var i=0;ie.length)&&(t=e.length);for(var n=0,r=new Array(t);n3&&void 0!==arguments[3]?arguments[3]:"existing",i=[],o=0;oo(function*(e){let t,n,r,o,a=!1,s=[],l=0;({cmd:r,size:o}=yield null);const u=Object(i.toUint8ArrayIterator)(e)[Symbol.iterator]();try{do{if(({done:t,value:n}=Number.isNaN(o-l)?u.next():u.next(o-l)),!t&&n.byteLength>0&&(s.push(n),l+=n.byteLength),t||o<=l)do{({cmd:r,size:o}=yield"peek"===r?Object(i.joinUint8Arrays)(s,o)[0]:([n,s,l]=Object(i.joinUint8Arrays)(s,o),n))}while(oo(function(e){return Object(r.__asyncGenerator)(this,arguments,(function*(){let t,n,o,a,s=!1,l=[],u=0;({cmd:o,size:a}=yield yield Object(r.__await)(null));const c=Object(i.toUint8ArrayAsyncIterator)(e)[Symbol.asyncIterator]();try{do{if(({done:t,value:n}=Number.isNaN(a-u)?yield Object(r.__await)(c.next()):yield Object(r.__await)(c.next(a-u))),!t&&n.byteLength>0&&(l.push(n),u+=n.byteLength),t||a<=u)do{({cmd:o,size:a}=yield yield Object(r.__await)("peek"===o?Object(i.joinUint8Arrays)(l,a)[0]:([n,l,u]=Object(i.joinUint8Arrays)(l,a),n)))}while(ao(function(e){return Object(r.__asyncGenerator)(this,arguments,(function*(){let t,n,o,s=!1,l=!1,u=[],c=0;({cmd:n,size:o}=yield yield Object(r.__await)(null));const d=new a(e);try{do{if(({done:s,value:t}=Number.isNaN(o-c)?yield Object(r.__await)(d.read()):yield Object(r.__await)(d.read(o-c))),!s&&t.byteLength>0&&(u.push(Object(i.toUint8Array)(t)),c+=t.byteLength),s||o<=c)do{({cmd:n,size:o}=yield yield Object(r.__await)("peek"===n?Object(i.joinUint8Arrays)(u,o)[0]:([t,u,c]=Object(i.joinUint8Arrays)(u,o),t)))}while(oo(function(e){return Object(r.__asyncGenerator)(this,arguments,(function*(){const t=[];let n,o,a,l="error",u=!1,c=null,d=0,f=[];if(({cmd:n,size:o}=yield yield Object(r.__await)(null)),e.isTTY)return yield yield Object(r.__await)(new Uint8Array(0)),yield Object(r.__await)(null);try{t[0]=s(e,"end"),t[1]=s(e,"error");do{if(t[2]=s(e,"readable"),[l,c]=yield Object(r.__await)(Promise.race(t.map(e=>e[2]))),"error"===l)break;if((u="end"===l)||(Number.isFinite(o-d)?(a=Object(i.toUint8Array)(e.read(o-d)),a.byteLength0&&(f.push(a),d+=a.byteLength)),u||o<=d)do{({cmd:n,size:o}=yield yield Object(r.__await)("peek"===n?Object(i.joinUint8Arrays)(f,o)[0]:([a,f,d]=Object(i.joinUint8Arrays)(f,o),a)))}while(o{for(const[n,r]of t)e.off(n,r);try{const t=e.destroy;t&&t.call(e,n),n=void 0}catch(e){n=e||n}finally{null!=n?i(n):r()}})}(t,"error"===l?c:null))}return yield Object(r.__await)(null)}))}(e)),toDOMStream(e,t){throw new Error('"toDOMStream" not available in this environment')},toNodeStream(e,t){throw new Error('"toNodeStream" not available in this environment')}};const o=e=>(e.next(),e);class a{constructor(e){this.source=e,this.reader=null,this.reader=this.source.getReader(),this.reader.closed.catch(()=>{})}get closed(){return this.reader?this.reader.closed.catch(()=>{}):Promise.resolve()}releaseLock(){this.reader&&this.reader.releaseLock(),this.reader=null}cancel(e){return Object(r.__awaiter)(this,void 0,void 0,(function*(){const{reader:t,source:n}=this;t&&(yield t.cancel(e).catch(()=>{})),n&&n.locked&&this.releaseLock()}))}read(e){return Object(r.__awaiter)(this,void 0,void 0,(function*(){if(0===e)return{done:null==this.reader,value:new Uint8Array(0)};const t=yield this.reader.read();return!t.done&&(t.value=Object(i.toUint8Array)(t)),t}))}}const s=(e,t)=>{const n=e=>r([t,e]);let r;return[t,n,new Promise(i=>(r=i)&&e.once(t,n))]}},function(e,t,n){"use strict";var r=n(6);Object.defineProperty(t,"__esModule",{value:!0});var i={VisStateActions:!0,MapStateActions:!0,UIStateActions:!0,MapStyleActions:!0,ProviderActionTypes:!0,ProviderActions:!0,_actionFor:!0,forwardTo:!0,getActionForwardAddress:!0,isForwardAction:!0,unwrap:!0,wrapTo:!0,ActionTypes:!0,ACTION_PREFIX:!0};Object.defineProperty(t,"ProviderActionTypes",{enumerable:!0,get:function(){return u.ActionTypes}}),Object.defineProperty(t,"_actionFor",{enumerable:!0,get:function(){return d._actionFor}}),Object.defineProperty(t,"forwardTo",{enumerable:!0,get:function(){return d.forwardTo}}),Object.defineProperty(t,"getActionForwardAddress",{enumerable:!0,get:function(){return d.getActionForwardAddress}}),Object.defineProperty(t,"isForwardAction",{enumerable:!0,get:function(){return d.isForwardAction}}),Object.defineProperty(t,"unwrap",{enumerable:!0,get:function(){return d.unwrap}}),Object.defineProperty(t,"wrapTo",{enumerable:!0,get:function(){return d.wrapTo}}),Object.defineProperty(t,"ActionTypes",{enumerable:!0,get:function(){return h.default}}),Object.defineProperty(t,"ACTION_PREFIX",{enumerable:!0,get:function(){return h.ACTION_PREFIX}}),t.ProviderActions=t.MapStyleActions=t.UIStateActions=t.MapStateActions=t.VisStateActions=void 0;var o=r(n(1203));t.VisStateActions=o,Object.keys(o).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===o[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return o[e]}}))}));var a=r(n(1204));t.MapStateActions=a,Object.keys(a).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===a[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return a[e]}}))}));var s=r(n(1205));t.UIStateActions=s,Object.keys(s).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===s[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return s[e]}}))}));var l=r(n(1206));t.MapStyleActions=l,Object.keys(l).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===l[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return l[e]}}))}));var u=r(n(1207));t.ProviderActions=u,Object.keys(u).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===u[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return u[e]}}))}));var c=n(1208);Object.keys(c).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===c[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return c[e]}}))}));var d=n(1209);Object.keys(d).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===d[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return d[e]}}))}));var f=n(1211);Object.keys(f).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===f[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return f[e]}}))}));var h=r(n(247))},function(e,t,n){var r=n(1280);function i(t,n,o){return"undefined"!=typeof Reflect&&Reflect.get?(e.exports=i=Reflect.get,e.exports.default=e.exports,e.exports.__esModule=!0):(e.exports=i=function(e,t,n){var i=r(e,t);if(i){var o=Object.getOwnPropertyDescriptor(i,t);return o.get?o.get.call(n):o.value}},e.exports.default=e.exports,e.exports.__esModule=!0),i(t,n,o||t)}e.exports=i,e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){"use strict";var r=n(3),i=n(6);Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.StyledDropdownSelect=void 0;var o,a,s,l,u=r(n(33)),c=r(n(44)),d=r(n(7)),f=r(n(8)),h=r(n(13)),p=r(n(10)),A=r(n(11)),g=r(n(9)),m=r(n(4)),y=r(n(15)),v=i(n(0)),b=r(n(51)),_=r(n(1530)),w=r(n(14)),x=r(n(456)),M=r(n(604)),E=r(n(605)),O=n(43),S=i(n(223)),T=r(n(407)),C=n(24),L=n(79),P=n(36);function I(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=(0,g.default)(e);if(t){var i=(0,g.default)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return(0,A.default)(this,n)}}var D=w.default.div.attrs((function(e){return{className:(0,b.default)("item-selector__dropdown",e.className)}}))(o||(o=(0,y.default)(["\n ",";\n\n height: ",";\n\n .list__item__anchor {\n ",";\n }\n"])),(function(e){return"secondary"===e.inputTheme?e.theme.secondaryInput:"light"===e.inputTheme?e.theme.inputLT:e.theme.input}),(function(e){return"small"===e.size?e.theme.inputBoxHeightSmall:e.theme.inputBoxHeight}),(function(e){return e.theme.dropdownListAnchor}));t.StyledDropdownSelect=D;var k=w.default.span(a||(a=(0,y.default)(["\n color: ",";\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n\n .list__item {\n ",";\n }\n\n .list__item__anchor {\n ",";\n }\n"])),(function(e){return e.hasPlaceholder&&"light"===e.inputTheme?e.theme.selectColorPlaceHolderLT:e.hasPlaceholder?e.theme.selectColorPlaceHolder:"light"===e.inputTheme?e.theme.selectColorLT:e.theme.selectColor}),(function(e){return"light"===e.inputTheme?e.theme.dropdownListItemLT:e.theme.dropdownListItem}),(function(e){return"light"===e.inputTheme?e.theme.dropdownListAnchorLT:e.theme.dropdownListAnchor})),R=w.default.div(s||(s=(0,y.default)(["\n margin-right: 6px;\n display: flex;\n color: ",";\n\n :hover {\n color: ",";\n }\n"])),(function(e){return e.theme.subtextColor}),(function(e){return e.theme.textColor})),j=w.default.div(l||(l=(0,y.default)(["\n border: 0;\n width: 100%;\n left: 0;\n z-index: ",";\n width: ","px;\n"])),(function(e){return e.theme.dropdownWrapperZ}),(function(e){return e.width})),F=function(e){(0,p.default)(n,e);var t=I(n);function n(){var e;(0,d.default)(this,n);for(var r=arguments.length,i=new Array(r),o=0;o0;){if((o=Object(r.b)(u,c,n))===i)return a[s]=u,a[l]=c,t(a);if(o>0)u=Math.floor(u/o)*o,c=Math.ceil(c/o)*o;else{if(!(o<0))break;u=Math.ceil(u*o)/o,c=Math.floor(c*o)/o}i=o}return e},e}function l(){var e=Object(i.b)();return e.copy=function(){return Object(i.a)(e,l())},o.b.apply(e,arguments),s(e)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return g}));var r=n(1),i=n(54),o=n(91),a=n(217),s=n(52),l=n(246),u=n(34),c=n(47),d=n(39);const f=Math.PI/180,h=Object(o.a)(),p=[0,0,0],A={unitsPerMeter:[1,1,1],metersPerUnit:[1,1,1]};class g{constructor(e={}){Object(r.a)(this,"id",void 0),Object(r.a)(this,"x",void 0),Object(r.a)(this,"y",void 0),Object(r.a)(this,"width",void 0),Object(r.a)(this,"height",void 0),Object(r.a)(this,"padding",void 0),Object(r.a)(this,"isGeospatial",void 0),Object(r.a)(this,"zoom",void 0),Object(r.a)(this,"focalDistance",void 0),Object(r.a)(this,"position",void 0),Object(r.a)(this,"modelMatrix",void 0),Object(r.a)(this,"distanceScales",void 0),Object(r.a)(this,"scale",void 0),Object(r.a)(this,"center",void 0),Object(r.a)(this,"cameraPosition",void 0),Object(r.a)(this,"projectionMatrix",void 0),Object(r.a)(this,"viewMatrix",void 0),Object(r.a)(this,"viewMatrixUncentered",void 0),Object(r.a)(this,"viewMatrixInverse",void 0),Object(r.a)(this,"viewProjectionMatrix",void 0),Object(r.a)(this,"pixelProjectionMatrix",void 0),Object(r.a)(this,"pixelUnprojectionMatrix",void 0),Object(r.a)(this,"resolution",void 0),Object(r.a)(this,"_frustumPlanes",{}),this.id=e.id||this.constructor.displayName||"viewport",this.x=e.x||0,this.y=e.y||0,this.width=e.width||1,this.height=e.height||1,this.zoom=e.zoom||0,this.padding=e.padding,this.distanceScales=e.distanceScales||A,this.focalDistance=e.focalDistance||1,this.position=e.position||p,this.modelMatrix=e.modelMatrix||null;const{longitude:t,latitude:n}=e;this.isGeospatial=Number.isFinite(n)&&Number.isFinite(t),this._initProps(e),this._initMatrices(e),this.equals=this.equals.bind(this),this.project=this.project.bind(this),this.unproject=this.unproject.bind(this),this.projectPosition=this.projectPosition.bind(this),this.unprojectPosition=this.unprojectPosition.bind(this),this.projectFlat=this.projectFlat.bind(this),this.unprojectFlat=this.unprojectFlat.bind(this)}get subViewports(){return null}get metersPerPixel(){return this.distanceScales.metersPerUnit[2]/this.scale}get projectionMode(){return this.isGeospatial?this.zoom<12?d.d.WEB_MERCATOR:d.d.WEB_MERCATOR_AUTO_OFFSET:d.d.IDENTITY}equals(e){return e instanceof g&&(this===e||e.width===this.width&&e.height===this.height&&e.scale===this.scale&&Object(s.d)(e.projectionMatrix,this.projectionMatrix)&&Object(s.d)(e.viewMatrix,this.viewMatrix))}project(e,{topLeft:t=!0}={}){const n=this.projectPosition(e),r=Object(c.worldToPixels)(n,this.pixelProjectionMatrix),[i,o]=r,a=t?o:this.height-o;return 2===e.length?[i,a]:[i,a,r[2]]}unproject(e,{topLeft:t=!0,targetZ:n}={}){const[r,i,o]=e,a=t?i:this.height-i,s=n&&n*this.distanceScales.unitsPerMeter[2],l=Object(c.pixelsToWorld)([r,a,o],this.pixelUnprojectionMatrix,s),[u,d,f]=this.unprojectPosition(l);return Number.isFinite(o)?[u,d,f]:Number.isFinite(n)?[u,d,n]:[u,d]}projectPosition(e){const[t,n]=this.projectFlat(e);return[t,n,(e[2]||0)*this.distanceScales.unitsPerMeter[2]]}unprojectPosition(e){const[t,n]=this.unprojectFlat(e);return[t,n,(e[2]||0)*this.distanceScales.metersPerUnit[2]]}projectFlat(e){if(this.isGeospatial){const t=Object(c.lngLatToWorld)(e);return t[1]=Object(s.a)(t[1],-318,830),t}return e}unprojectFlat(e){return this.isGeospatial?Object(c.worldToLngLat)(e):e}getBounds(e={}){const t={targetZ:e.z||0},n=this.unproject([0,0],t),r=this.unproject([this.width,0],t),i=this.unproject([0,this.height],t),o=this.unproject([this.width,this.height],t);return[Math.min(n[0],r[0],i[0],o[0]),Math.min(n[1],r[1],i[1],o[1]),Math.max(n[0],r[0],i[0],o[0]),Math.max(n[1],r[1],i[1],o[1])]}getDistanceScales(e){return e?Object(c.getDistanceScales)({longitude:e[0],latitude:e[1],highPrecision:!0}):this.distanceScales}containsPixel({x:e,y:t,width:n=1,height:r=1}){return e=0&&d<=t.byteLength);return{ArrayType:n,length:s,byteLength:d,componentByteSize:i.a[e.componentType],numberOfComponentsInElement:i.b[e.type]}}function p(e){let{images:t,bufferViews:n}=e;t=t||[],n=n||[];const r=t.map(e=>e.bufferView);n=n.filter(e=>!r.includes(e));const i=n.reduce((e,t)=>e+t.byteLength,0),o=t.reduce((e,t)=>{const{width:n,height:r}=t.image;return e+n*r},0);return i+Math.ceil(4*o*1.33)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));class r{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}offset(){return this.bb.readInt64(this.bb_pos)}length(){return this.bb.readInt64(this.bb_pos+8)}static sizeOf(){return 16}static createBuffer(e,t,n){return e.prep(8,16),e.writeInt64(BigInt(null!=n?n:0)),e.writeInt64(BigInt(null!=t?t:0)),e.offset()}}},function(e,t,n){"use strict";function r(e){const{source:t,target:n,start:r=0,size:i,getData:o}=e,a=e.end||n.length,s=t.length,l=a-r;if(s>l)return void n.set(t.subarray(0,l),r);if(n.set(t,r),!o)return;let u=s;for(;ue},spring:{stiffness:.05,damping:.5}};function o(e,t){if(!e)return null;Number.isFinite(e)&&(e={type:"interpolation",duration:e});const n=e.type||"interpolation";return{...i[n],...t,...e,type:n}}function a(e,t){const n=t.getBuffer();return n?[n,{divisor:0,size:t.size,normalized:t.settings.normalized}]:t.value}function s(e){switch(e){case 1:return"float";case 2:return"vec2";case 3:return"vec3";case 4:return"vec4";default:throw new Error('No defined attribute type for size "'.concat(e,'"'))}}function l(e){e.push(e.shift())}function u(e,t){const{doublePrecision:n,settings:r,value:i,size:o}=e,a=n&&i instanceof Float64Array?2:1;return(r.noAlloc?i.length:t*o)*a}function c({buffer:e,numInstances:t,attribute:n,fromLength:i,fromStartIndices:o,getData:a=(e=>e)}){const s=n.doublePrecision&&n.value instanceof Float64Array?2:1,l=n.size*s,c=n.byteOffset,d=n.startIndices,f=o&&d,h=u(n,t),p=n.isConstant;if(!f&&i>=h)return;const A=p?n.value:n.getBuffer().getData({srcByteOffset:c});if(n.settings.normalized&&!p){const e=a;a=(t,r)=>n.normalizeConstant(e(t,r))}const g=p?(e,t)=>a(A,t):(e,t)=>a(A.subarray(e,e+l),t),m=e.getData({length:i}),y=new Float32Array(h);!function({source:e,target:t,size:n,getData:i,sourceStartIndices:o,targetStartIndices:a}){if(!Array.isArray(a))return r({source:e,target:t,size:n,getData:i}),t;let s=0,l=0;const u=i&&((e,t)=>i(e+l,t)),c=Math.min(o.length,a.length);for(let i=1;iMath.max(e,t.length),0)};let a=0,s=0,u=-1;const d=t.length;let h,p=[];for(;o.numBatches-- >0;){for(s=Number.POSITIVE_INFINITY,u=-1;++u0&&(r[a++]=Object(i.b)({type:new l.B(n),length:s,nullCount:0,children:p.slice()})))}return[e=e.assign(n),r.map(t=>new c.a(e,t))]}(e,t.map(e=>e.data.concat()))}function f(e,t,n,r,o){var a;const s=(t+63&-64)>>3;for(let l=-1,u=r.length;++l=t)c===t?n[l]=u:(n[l]=u.slice(0,t),o.numBatches=Math.max(o.numBatches,r[l].unshift(u.slice(t,c-t))));else{const r=e[l];e[l]=r.clone({nullable:!0}),n[l]=null!==(a=null==u?void 0:u._changeLengthAndBackfillNullBitmap(t))&&void 0!==a?a:Object(i.b)({type:r.type,length:t,nullCount:t,nullBitmap:new Uint8Array(s)})}}return n}var h,p,A=n(88),g=n(117),m=n(66),y=n(311),v=n(362),b=n(312),_=n(230);class w{constructor(...e){var t,n;if(0===e.length)return this.batches=[],this.schema=new s.b([]),this._offsets=[0],this;let r,o;e[0]instanceof s.b&&(r=e.shift()),e.at(-1)instanceof Uint32Array&&(o=e.pop());const f=e=>{if(e){if(e instanceof c.a)return[e];if(e instanceof w)return e.batches;if(e instanceof i.a){if(e.type instanceof l.B)return[new c.a(new s.b(e.type.children),e)]}else{if(Array.isArray(e))return e.flatMap(e=>f(e));if("function"==typeof e[Symbol.iterator])return[...e].flatMap(e=>f(e));if("object"==typeof e){const t=Object.keys(e),n=t.map(t=>new a.a([e[t]])),r=new s.b(t.map((e,t)=>new s.a(String(e),n[t].type))),[,i]=d(r,n);return 0===i.length?[new c.a(e)]:i}}}return[]},h=e.flatMap(e=>f(e));if(r=null!==(n=null!=r?r:null===(t=h[0])||void 0===t?void 0:t.schema)&&void 0!==n?n:new s.b([]),!(r instanceof s.b))throw new TypeError("Table constructor expects a [Schema, RecordBatch[]] pair.");for(const e of h){if(!(e instanceof c.a))throw new TypeError("Table constructor expects a [Schema, RecordBatch[]] pair.");if(!Object(u.b)(r,e.schema))throw new TypeError("Table and inner RecordBatch schemas must be equivalent.")}this.schema=r,this.batches=h,this._offsets=null!=o?o:Object(A.c)(this.data)}get data(){return this.batches.map(({data:e})=>e)}get numCols(){return this.schema.fields.length}get numRows(){return this.data.reduce((e,t)=>e+t.length,0)}get nullCount(){return-1===this._nullCount&&(this._nullCount=Object(A.b)(this.data)),this._nullCount}isValid(e){return!1}get(e){return null}set(e,t){}indexOf(e,t){return-1}getByteLength(e){return 0}[Symbol.iterator](){return this.batches.length>0?v.a.visit(new a.a(this.data)):new Array(0)[Symbol.iterator]()}toArray(){return[...this]}toString(){return`[\n ${this.toArray().join(",\n ")}\n]`}concat(...e){const t=this.schema,n=this.data.concat(e.flatMap(({data:e})=>e));return new w(t,n.map(e=>new c.a(t,e)))}slice(e,t){const n=this.schema;[e,t]=Object(_.clampRange)({length:this.numRows},e,t);const r=Object(A.e)(this.data,this._offsets,e,t);return new w(n,r.map(e=>new c.a(n,e)))}getChild(e){return this.getChildAt(this.schema.fields.findIndex(t=>t.name===e))}getChildAt(e){if(e>-1&&et.children[e]);if(0===t.length){const{type:n}=this.schema.fields[e],r=Object(i.b)({type:n,length:0,nullCount:0});t.push(r._changeLengthAndBackfillNullBitmap(this.numRows))}return new a.a(t)}return null}setChild(e,t){var n;return this.setChildAt(null===(n=this.schema.fields)||void 0===n?void 0:n.findIndex(t=>t.name===e),t)}setChildAt(e,t){let n=this.schema,r=[...this.batches];if(e>-1&&ethis.getChildAt(t));[o[e],u[e]]=[s,t],[n,r]=d(n,u)}return new w(n,r)}select(e){const t=this.schema.fields.reduce((e,t,n)=>e.set(t.name,n),new Map);return this.selectAt(e.map(e=>t.get(e)).filter(e=>e>-1))}selectAt(e){const t=this.schema.selectAt(e),n=this.batches.map(t=>t.selectAt(e));return new w(t,n)}assign(e){const t=this.schema.fields,[n,r]=e.schema.fields.reduce((e,n,r)=>{const[i,o]=e,a=t.findIndex(e=>e.name===n.name);return~a?o[a]=r:i.push(r),e},[[],[]]),i=this.schema.assign(e.schema),o=[...t.map((e,t)=>[t,r[t]]).map(([t,n])=>void 0===n?this.getChildAt(t):e.getChildAt(n)),...n.map(t=>e.getChildAt(t))].filter(Boolean);return new w(...d(i,o))}}function x(e){const t={},n=Object.entries(e);for(const[e,r]of n)t[e]=Object(a.b)(r);return new w(t)}function M(e){const t={},n=Object.entries(e);for(const[e,r]of n)t[e]=Object(o.e)(r);return new w(t)}h=Symbol.toStringTag,w[h]=((p=w.prototype).schema=null,p.batches=[],p._offsets=new Uint32Array([0]),p._nullCount=-1,p[Symbol.isConcatSpreadable]=!0,p.isValid=Object(A.f)(A.d),p.get=Object(A.f)(g.a.getVisitFn(r.h.Struct)),p.set=Object(A.g)(m.a.getVisitFn(r.h.Struct)),p.indexOf=Object(A.h)(y.a.getVisitFn(r.h.Struct)),p.getByteLength=Object(A.f)(b.a.getVisitFn(r.h.Struct)),"Table")},function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return o}));var r=n(212);function i(e){var t;if(!e)return!1;Array.isArray(e)&&(e=e[0]);return Array.isArray(null===(t=e)||void 0===t?void 0:t.extensions)}function o(e){var t,n;let o;return Object(r.a)(e,"null loader"),Object(r.a)(i(e),"invalid loader"),Array.isArray(e)&&(o=e[1],e=e[0],e={...e,options:{...e.options,...o}}),(null!==(t=e)&&void 0!==t&&t.parseTextSync||null!==(n=e)&&void 0!==n&&n.parseText)&&(e.text=!0),e.text||(e.binary=!0),e}},function(e,t,n){"use strict";n.d(t,"b",(function(){return o})),n.d(t,"c",(function(){return a})),n.d(t,"a",(function(){return s})),n.d(t,"d",(function(){return l}));var r=n(26);const i=(e,t)=>(Math.ceil(e)*t+63&-64||64)/t;class o{constructor(e,t=1){this.buffer=e,this.stride=t,this.BYTES_PER_ELEMENT=e.BYTES_PER_ELEMENT,this.ArrayType=e.constructor,this._resize(this.length=Math.ceil(e.length/t))}get byteLength(){return Math.ceil(this.length*this.stride)*this.BYTES_PER_ELEMENT}get reservedLength(){return this.buffer.length/this.stride}get reservedByteLength(){return this.buffer.byteLength}set(e,t){return this}append(e){return this.set(this.length,e)}reserve(e){if(e>0){this.length+=e;const t=this.stride,n=this.length*t,r=this.buffer.length;n>=r&&this._resize(i(0===r?1*n:2*n,this.BYTES_PER_ELEMENT))}return this}flush(e=this.length){e=i(e*this.stride,this.BYTES_PER_ELEMENT);const t=((e,t=0)=>e.length>=t?e.subarray(0,t):Object(r.memcpy)(new e.constructor(t),e,0))(this.buffer,e);return this.clear(),t}clear(){return this.length=0,this._resize(0),this}_resize(e){return this.buffer=Object(r.memcpy)(new this.ArrayType(e),this.buffer)}}o.prototype.offset=0;class a extends o{last(){return this.get(this.length-1)}get(e){return this.buffer[e]}set(e,t){return this.reserve(e-this.length+1),this.buffer[e*this.stride]=t,this}}class s extends a{constructor(e=new Uint8Array(0)){super(e,1/8),this.numValid=0}get numInvalid(){return this.length-this.numValid}get(e){return this.buffer[e>>3]>>e%8&1}set(e,t){const{buffer:n}=this.reserve(e-this.length+1),r=e>>3,i=e%8,o=n[r]>>i&1;return t?0===o&&(n[r]|=1<this.length&&this.set(e-1,0),super.flush(e+1)}}},function(e,t,n){"use strict";n.d(t,"c",(function(){return o})),n.d(t,"b",(function(){return a})),n.d(t,"a",(function(){return s}));var r=n(28);const i={};function o(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"id";i[e]=i[e]||1;const t=i[e]++;return"".concat(e,"-").concat(t)}function a(e){return Object(r.a)("number"==typeof e,"Input must be a number"),e&&0==(e&e-1)}function s(e){let t=!0;for(const n in e){t=!1;break}return t}},function(e,t,n){"use strict";function r(e,t){if(!e)throw new Error("math.gl assertion ".concat(t))}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"c",(function(){return l})),n.d(t,"b",(function(){return u})),n.d(t,"a",(function(){return c}));var r=n(48);const i=/^data:([-\w.]+\/[-\w.+]+)(;|,)/,o=/^([-\w.]+\/[-\w.+]+)/;function a(e){const t=i.exec(e);return t?t[1]:""}var s=n(314);function l(e){if(Object(r.j)(e)){return e.url}if(Object(r.b)(e)){return e.name||""}return"string"==typeof e?e:""}function u(e){if(Object(r.j)(e)){const t=e,n=t.headers.get("content-type")||"",r=Object(s.b)(t.url);return function(e){const t=o.exec(e);return t?t[1]:e}(n)||a(r)}if(Object(r.b)(e)){return e.type||""}return"string"==typeof e?a(e):""}function c(e){if(Object(r.j)(e)){return e.headers["content-length"]||-1}if(Object(r.b)(e)){return e.size}return"string"==typeof e?e.length:e instanceof ArrayBuffer||ArrayBuffer.isView(e)?e.byteLength:-1}},function(e,t,n){"use strict";n.d(t,"b",(function(){return i})),n.d(t,"a",(function(){return o}));var r=n(28);function i(e,t){if("string"!=typeof t)return t;const n=Number(t);if(!isNaN(n))return n;const i=e[t=t.replace(/^.*\./,"")];return Object(r.a)(void 0!==i,"Accessing undefined constant GL.".concat(t)),i}function o(e,t){t=Number(t);for(const n in e)if(e[n]===t)return"GL.".concat(n);return String(t)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(31),i=n(378),o=n(156),a=n(124);class s{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsSchema(e,t){return(t||new s).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsSchema(e,t){return e.setPosition(e.position()+r.SIZE_PREFIX_LENGTH),(t||new s).__init(e.readInt32(e.position())+e.position(),e)}endianness(){const e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt16(this.bb_pos+e):i.a.Little}fields(e,t){const n=this.bb.__offset(this.bb_pos,6);return n?(t||new o.a).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+n)+4*e),this.bb):null}fieldsLength(){const e=this.bb.__offset(this.bb_pos,6);return e?this.bb.__vector_len(this.bb_pos+e):0}customMetadata(e,t){const n=this.bb.__offset(this.bb_pos,8);return n?(t||new a.a).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+n)+4*e),this.bb):null}customMetadataLength(){const e=this.bb.__offset(this.bb_pos,8);return e?this.bb.__vector_len(this.bb_pos+e):0}features(e){const t=this.bb.__offset(this.bb_pos,10);return t?this.bb.readInt64(this.bb.__vector(this.bb_pos+t)+8*e):BigInt(0)}featuresLength(){const e=this.bb.__offset(this.bb_pos,10);return e?this.bb.__vector_len(this.bb_pos+e):0}static startSchema(e){e.startObject(4)}static addEndianness(e,t){e.addFieldInt16(0,t,i.a.Little)}static addFields(e,t){e.addFieldOffset(1,t,0)}static createFieldsVector(e,t){e.startVector(4,t.length,4);for(let n=t.length-1;n>=0;n--)e.addOffset(t[n]);return e.endVector()}static startFieldsVector(e,t){e.startVector(4,t,4)}static addCustomMetadata(e,t){e.addFieldOffset(2,t,0)}static createCustomMetadataVector(e,t){e.startVector(4,t.length,4);for(let n=t.length-1;n>=0;n--)e.addOffset(t[n]);return e.endVector()}static startCustomMetadataVector(e,t){e.startVector(4,t,4)}static addFeatures(e,t){e.addFieldOffset(3,t,0)}static createFeaturesVector(e,t){e.startVector(8,t.length,8);for(let n=t.length-1;n>=0;n--)e.addInt64(t[n]);return e.endVector()}static startFeaturesVector(e,t){e.startVector(8,t,8)}static endSchema(e){return e.endObject()}static finishSchemaBuffer(e,t){e.finish(t)}static finishSizePrefixedSchemaBuffer(e,t){e.finish(t,void 0,!0)}static createSchema(e,t,n,r,i){return s.startSchema(e),s.addEndianness(e,t),s.addFields(e,n),s.addCustomMetadata(e,r),s.addFeatures(e,i),s.endSchema(e)}}},function(e,t){e.exports=console},function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return o}));var r=n(18),i=n(35);function o(e,t,n){if(void 0===n&&(n={}),!0===n.final)return function(e,t){var n=o(t,e);return n=(n+180)%360}(e,t);var a=Object(i.getCoord)(e),s=Object(i.getCoord)(t),l=Object(r.degreesToRadians)(a[0]),u=Object(r.degreesToRadians)(s[0]),c=Object(r.degreesToRadians)(a[1]),d=Object(r.degreesToRadians)(s[1]),f=Math.sin(u-l)*Math.cos(d),h=Math.cos(c)*Math.sin(d)-Math.sin(c)*Math.cos(d)*Math.cos(u-l);return Object(r.radiansToDegrees)(Math.atan2(f,h))}},function(e,t,n){"use strict";function r(){var e=this.constructor.getDerivedStateFromProps(this.props,this.state);null!=e&&this.setState(e)}function i(e){this.setState(function(t){var n=this.constructor.getDerivedStateFromProps(e,t);return null!=n?n:null}.bind(this))}function o(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}}function a(e){var t=e.prototype;if(!t||!t.isReactComponent)throw new Error("Can only polyfill class components");if("function"!=typeof e.getDerivedStateFromProps&&"function"!=typeof t.getSnapshotBeforeUpdate)return e;var n=null,a=null,s=null;if("function"==typeof t.componentWillMount?n="componentWillMount":"function"==typeof t.UNSAFE_componentWillMount&&(n="UNSAFE_componentWillMount"),"function"==typeof t.componentWillReceiveProps?a="componentWillReceiveProps":"function"==typeof t.UNSAFE_componentWillReceiveProps&&(a="UNSAFE_componentWillReceiveProps"),"function"==typeof t.componentWillUpdate?s="componentWillUpdate":"function"==typeof t.UNSAFE_componentWillUpdate&&(s="UNSAFE_componentWillUpdate"),null!==n||null!==a||null!==s){var l=e.displayName||e.name,u="function"==typeof e.getDerivedStateFromProps?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error("Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n"+l+" uses "+u+" but also contains the following legacy lifecycles:"+(null!==n?"\n "+n:"")+(null!==a?"\n "+a:"")+(null!==s?"\n "+s:"")+"\n\nThe above lifecycles should be removed. Learn more about this warning here:\nhttps://fb.me/react-async-component-lifecycle-hooks")}if("function"==typeof e.getDerivedStateFromProps&&(t.componentWillMount=r,t.componentWillReceiveProps=i),"function"==typeof t.getSnapshotBeforeUpdate){if("function"!=typeof t.componentDidUpdate)throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");t.componentWillUpdate=o;var c=t.componentDidUpdate;t.componentDidUpdate=function(e,t,n){var r=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:n;c.call(this,e,t,r)}}return e}n.r(t),n.d(t,"polyfill",(function(){return a})),r.__suppressDeprecationWarning=!0,i.__suppressDeprecationWarning=!0,o.__suppressDeprecationWarning=!0},function(e,t,n){"use strict";n.d(t,"d",(function(){return M})),n.d(t,"e",(function(){return E})),n.d(t,"b",(function(){return O})),n.d(t,"c",(function(){return S})),n.d(t,"a",(function(){return T}));var r=n(20),i=n(38),o=n(59),a=n(12),s=n(5),l=n(215),u=n(125),c=n(90),d=n(274),f=n(41),h=n(80),p=n(102),A=n(161),g=n(319),m=n(26);class y extends h.a{constructor(e,t,n,r){super(),this.nodesIndex=-1,this.buffersIndex=-1,this.bytes=e,this.nodes=t,this.buffers=n,this.dictionaries=r}visit(e){return super.visit(e instanceof f.a?e.type:e)}visitNull(e,{length:t}=this.nextFieldNode()){return Object(i.b)({type:e,length:t})}visitBool(e,{length:t,nullCount:n}=this.nextFieldNode()){return Object(i.b)({type:e,length:t,nullCount:n,nullBitmap:this.readNullBitmap(e,n),data:this.readData(e)})}visitInt(e,{length:t,nullCount:n}=this.nextFieldNode()){return Object(i.b)({type:e,length:t,nullCount:n,nullBitmap:this.readNullBitmap(e,n),data:this.readData(e)})}visitFloat(e,{length:t,nullCount:n}=this.nextFieldNode()){return Object(i.b)({type:e,length:t,nullCount:n,nullBitmap:this.readNullBitmap(e,n),data:this.readData(e)})}visitUtf8(e,{length:t,nullCount:n}=this.nextFieldNode()){return Object(i.b)({type:e,length:t,nullCount:n,nullBitmap:this.readNullBitmap(e,n),valueOffsets:this.readOffsets(e),data:this.readData(e)})}visitBinary(e,{length:t,nullCount:n}=this.nextFieldNode()){return Object(i.b)({type:e,length:t,nullCount:n,nullBitmap:this.readNullBitmap(e,n),valueOffsets:this.readOffsets(e),data:this.readData(e)})}visitFixedSizeBinary(e,{length:t,nullCount:n}=this.nextFieldNode()){return Object(i.b)({type:e,length:t,nullCount:n,nullBitmap:this.readNullBitmap(e,n),data:this.readData(e)})}visitDate(e,{length:t,nullCount:n}=this.nextFieldNode()){return Object(i.b)({type:e,length:t,nullCount:n,nullBitmap:this.readNullBitmap(e,n),data:this.readData(e)})}visitTimestamp(e,{length:t,nullCount:n}=this.nextFieldNode()){return Object(i.b)({type:e,length:t,nullCount:n,nullBitmap:this.readNullBitmap(e,n),data:this.readData(e)})}visitTime(e,{length:t,nullCount:n}=this.nextFieldNode()){return Object(i.b)({type:e,length:t,nullCount:n,nullBitmap:this.readNullBitmap(e,n),data:this.readData(e)})}visitDecimal(e,{length:t,nullCount:n}=this.nextFieldNode()){return Object(i.b)({type:e,length:t,nullCount:n,nullBitmap:this.readNullBitmap(e,n),data:this.readData(e)})}visitList(e,{length:t,nullCount:n}=this.nextFieldNode()){return Object(i.b)({type:e,length:t,nullCount:n,nullBitmap:this.readNullBitmap(e,n),valueOffsets:this.readOffsets(e),child:this.visit(e.children[0])})}visitStruct(e,{length:t,nullCount:n}=this.nextFieldNode()){return Object(i.b)({type:e,length:t,nullCount:n,nullBitmap:this.readNullBitmap(e,n),children:this.visitMany(e.children)})}visitUnion(e){return e.mode===s.i.Sparse?this.visitSparseUnion(e):this.visitDenseUnion(e)}visitDenseUnion(e,{length:t,nullCount:n}=this.nextFieldNode()){return Object(i.b)({type:e,length:t,nullCount:n,nullBitmap:this.readNullBitmap(e,n),typeIds:this.readTypeIds(e),valueOffsets:this.readOffsets(e),children:this.visitMany(e.children)})}visitSparseUnion(e,{length:t,nullCount:n}=this.nextFieldNode()){return Object(i.b)({type:e,length:t,nullCount:n,nullBitmap:this.readNullBitmap(e,n),typeIds:this.readTypeIds(e),children:this.visitMany(e.children)})}visitDictionary(e,{length:t,nullCount:n}=this.nextFieldNode()){return Object(i.b)({type:e,length:t,nullCount:n,nullBitmap:this.readNullBitmap(e,n),data:this.readData(e.indices),dictionary:this.readDictionary(e)})}visitInterval(e,{length:t,nullCount:n}=this.nextFieldNode()){return Object(i.b)({type:e,length:t,nullCount:n,nullBitmap:this.readNullBitmap(e,n),data:this.readData(e)})}visitFixedSizeList(e,{length:t,nullCount:n}=this.nextFieldNode()){return Object(i.b)({type:e,length:t,nullCount:n,nullBitmap:this.readNullBitmap(e,n),child:this.visit(e.children[0])})}visitMap(e,{length:t,nullCount:n}=this.nextFieldNode()){return Object(i.b)({type:e,length:t,nullCount:n,nullBitmap:this.readNullBitmap(e,n),valueOffsets:this.readOffsets(e),child:this.visit(e.children[0])})}nextFieldNode(){return this.nodes[++this.nodesIndex]}nextBufferRange(){return this.buffers[++this.buffersIndex]}readNullBitmap(e,t,n=this.nextBufferRange()){return t>0&&this.readData(e,n)||new Uint8Array(0)}readOffsets(e,t){return this.readData(e,t)}readTypeIds(e,t){return this.readData(e,t)}readData(e,{length:t,offset:n}=this.nextBufferRange()){return this.bytes.subarray(n,n+t)}readDictionary(e){return this.dictionaries.get(e.id)}}class v extends y{constructor(e,t,n,r){super(new Uint8Array(0),t,n,r),this.sources=e}readNullBitmap(e,t,{offset:n}=this.nextBufferRange()){return t<=0?new Uint8Array(0):Object(p.packBools)(this.sources[n])}readOffsets(e,{offset:t}=this.nextBufferRange()){return Object(m.toArrayBufferView)(Uint8Array,Object(m.toArrayBufferView)(Int32Array,this.sources[t]))}readTypeIds(e,{offset:t}=this.nextBufferRange()){return Object(m.toArrayBufferView)(Uint8Array,Object(m.toArrayBufferView)(e.ArrayType,this.sources[t]))}readData(e,{offset:t}=this.nextBufferRange()){const{sources:n}=this;return a.c.isTimestamp(e)||(a.c.isInt(e)||a.c.isTime(e))&&64===e.bitWidth||a.c.isDate(e)&&e.unit===s.b.MILLISECOND?Object(m.toArrayBufferView)(Uint8Array,g.Int64.convertArray(n[t])):a.c.isDecimal(e)?Object(m.toArrayBufferView)(Uint8Array,g.Int128.convertArray(n[t])):a.c.isBinary(e)||a.c.isFixedSizeBinary(e)?function(e){const t=e.join(""),n=new Uint8Array(t.length/2);for(let e=0;e>1]=Number.parseInt(t.slice(e,e+2),16);return n}(n[t]):a.c.isBool(e)?Object(p.packBools)(n[t]):a.c.isUtf8(e)?Object(A.b)(n[t].join("")):Object(m.toArrayBufferView)(Uint8Array,Object(m.toArrayBufferView)(e.ArrayType,n[t].map(e=>+e)))}}var b=n(87),_=n(83),w=n(108),x=n(55);class M extends _.d{constructor(e){super(),this._impl=e}get closed(){return this._impl.closed}get schema(){return this._impl.schema}get autoDestroy(){return this._impl.autoDestroy}get dictionaries(){return this._impl.dictionaries}get numDictionaries(){return this._impl.numDictionaries}get numRecordBatches(){return this._impl.numRecordBatches}get footer(){return this._impl.isFile()?this._impl.footer:null}isSync(){return this._impl.isSync()}isAsync(){return this._impl.isAsync()}isFile(){return this._impl.isFile()}isStream(){return this._impl.isStream()}next(){return this._impl.next()}throw(e){return this._impl.throw(e)}return(e){return this._impl.return(e)}cancel(){return this._impl.cancel()}reset(e){return this._impl.reset(e),this._DOMStream=void 0,this._nodeStream=void 0,this}open(e){const t=this._impl.open(e);return Object(x.i)(t)?t.then(()=>this):this}readRecordBatch(e){return this._impl.isFile()?this._impl.readRecordBatch(e):null}[Symbol.iterator](){return this._impl[Symbol.iterator]()}[Symbol.asyncIterator](){return this._impl[Symbol.asyncIterator]()}toDOMStream(){return u.a.toDOMStream(this.isSync()?{[Symbol.iterator]:()=>this}:{[Symbol.asyncIterator]:()=>this})}toNodeStream(){return u.a.toNodeStream(this.isSync()?{[Symbol.iterator]:()=>this}:{[Symbol.asyncIterator]:()=>this},{objectMode:!0})}static throughNode(e){throw new Error('"throughNode" not available in this environment')}static throughDOM(e,t){throw new Error('"throughDOM" not available in this environment')}static from(e){return e instanceof M?e:Object(x.a)(e)?function(e){return new E(new k(e))}(e):Object(x.d)(e)?function(e){return Object(r.__awaiter)(this,void 0,void 0,(function*(){const{size:t}=yield e.stat(),n=new d.a(e,t);return t>=w.h&&Object(w.e)(yield n.readAt(0,w.g+7&-8))?new T(new D(n)):new O(new P(n))}))}(e):Object(x.i)(e)?(()=>Object(r.__awaiter)(this,void 0,void 0,(function*(){return yield M.from(yield e)})))():Object(x.c)(e)||Object(x.j)(e)||Object(x.k)(e)||Object(x.b)(e)?function(e){return Object(r.__awaiter)(this,void 0,void 0,(function*(){const t=yield e.peek(w.g+7&-8);return t&&t.byteLength>=4?Object(w.e)(t)?new S(new I(yield e.read())):new O(new P(e)):new O(new P(function(){return Object(r.__asyncGenerator)(this,arguments,(function*(){}))}()))}))}(new c.b(e)):function(e){const t=e.peek(w.g+7&-8);return t&&t.byteLength>=4?Object(w.e)(t)?new S(new I(e.read())):new E(new L(e)):new E(new L(function*(){}()))}(new c.c(e))}static readAll(e){return e instanceof M?e.isSync()?j(e):F(e):Object(x.a)(e)||ArrayBuffer.isView(e)||Object(x.f)(e)||Object(x.g)(e)?j(e):F(e)}}class E extends M{constructor(e){super(e),this._impl=e}readAll(){return[...this]}[Symbol.iterator](){return this._impl[Symbol.iterator]()}[Symbol.asyncIterator](){return Object(r.__asyncGenerator)(this,arguments,(function*(){yield Object(r.__await)(yield*Object(r.__asyncDelegator)(Object(r.__asyncValues)(this[Symbol.iterator]())))}))}}class O extends M{constructor(e){super(e),this._impl=e}readAll(){var e,t,n,i;return Object(r.__awaiter)(this,void 0,void 0,(function*(){const o=new Array;try{for(var a,s=!0,l=Object(r.__asyncValues)(this);a=yield l.next(),!(e=a.done);s=!0){i=a.value,s=!1;const e=i;o.push(e)}}catch(e){t={error:e}}finally{try{s||e||!(n=l.return)||(yield n.call(l))}finally{if(t)throw t.error}}return o}))}[Symbol.iterator](){throw new Error("AsyncRecordBatchStreamReader is not Iterable")}[Symbol.asyncIterator](){return this._impl[Symbol.asyncIterator]()}}class S extends E{constructor(e){super(e),this._impl=e}}class T extends O{constructor(e){super(e),this._impl=e}}class C{get numDictionaries(){return this._dictionaryIndex}get numRecordBatches(){return this._recordBatchIndex}constructor(e=new Map){this.closed=!1,this.autoDestroy=!0,this._dictionaryIndex=0,this._recordBatchIndex=0,this.dictionaries=e}isSync(){return!1}isAsync(){return!1}isFile(){return!1}isStream(){return!1}reset(e){return this._dictionaryIndex=0,this._recordBatchIndex=0,this.schema=e,this.dictionaries=new Map,this}_loadRecordBatch(e,t){const n=this._loadVectors(e,t,this.schema.fields),r=Object(i.b)({type:new a.B(this.schema.fields),length:e.length,children:n});return new b.a(this.schema,r)}_loadDictionaryBatch(e,t){const{id:n,isDelta:r}=e,{dictionaries:i,schema:a}=this,s=i.get(n);if(r||!s){const i=a.dictionaries.get(n),l=this._loadVectors(e.data,t,[i]);return(s&&r?s.concat(new o.a(l)):new o.a(l)).memoize()}return s.memoize()}_loadVectors(e,t,n){return new y(t,e.nodes,e.buffers,this.dictionaries).visitMany(n)}}class L extends C{constructor(e,t){super(t),this._reader=Object(x.a)(e)?new w.b(this._handle=e):new w.d(this._handle=e)}isSync(){return!0}isStream(){return!0}[Symbol.iterator](){return this}cancel(){!this.closed&&(this.closed=!0)&&(this.reset()._reader.return(),this._reader=null,this.dictionaries=null)}open(e){return this.closed||(this.autoDestroy=R(this,e),this.schema||(this.schema=this._reader.readSchema())||this.cancel()),this}throw(e){return!this.closed&&this.autoDestroy&&(this.closed=!0)?this.reset()._reader.throw(e):_.c}return(e){return!this.closed&&this.autoDestroy&&(this.closed=!0)?this.reset()._reader.return(e):_.c}next(){if(this.closed)return _.c;let e;const{_reader:t}=this;for(;e=this._readNextMessageAndValidate();)if(e.isSchema())this.reset(e.header());else{if(e.isRecordBatch()){this._recordBatchIndex++;const n=e.header(),r=t.readMessageBody(e.bodyLength);return{done:!1,value:this._loadRecordBatch(n,r)}}if(e.isDictionaryBatch()){this._dictionaryIndex++;const n=e.header(),r=t.readMessageBody(e.bodyLength),i=this._loadDictionaryBatch(n,r);this.dictionaries.set(n.id,i)}}return this.schema&&0===this._recordBatchIndex?(this._recordBatchIndex++,{done:!1,value:new b.b(this.schema)}):this.return()}_readNextMessageAndValidate(e){return this._reader.readMessage(e)}}class P extends C{constructor(e,t){super(t),this._reader=new w.a(this._handle=e)}isAsync(){return!0}isStream(){return!0}[Symbol.asyncIterator](){return this}cancel(){return Object(r.__awaiter)(this,void 0,void 0,(function*(){!this.closed&&(this.closed=!0)&&(yield this.reset()._reader.return(),this._reader=null,this.dictionaries=null)}))}open(e){return Object(r.__awaiter)(this,void 0,void 0,(function*(){return this.closed||(this.autoDestroy=R(this,e),this.schema||(this.schema=yield this._reader.readSchema())||(yield this.cancel())),this}))}throw(e){return Object(r.__awaiter)(this,void 0,void 0,(function*(){return!this.closed&&this.autoDestroy&&(this.closed=!0)?yield this.reset()._reader.throw(e):_.c}))}return(e){return Object(r.__awaiter)(this,void 0,void 0,(function*(){return!this.closed&&this.autoDestroy&&(this.closed=!0)?yield this.reset()._reader.return(e):_.c}))}next(){return Object(r.__awaiter)(this,void 0,void 0,(function*(){if(this.closed)return _.c;let e;const{_reader:t}=this;for(;e=yield this._readNextMessageAndValidate();)if(e.isSchema())yield this.reset(e.header());else{if(e.isRecordBatch()){this._recordBatchIndex++;const n=e.header(),r=yield t.readMessageBody(e.bodyLength);return{done:!1,value:this._loadRecordBatch(n,r)}}if(e.isDictionaryBatch()){this._dictionaryIndex++;const n=e.header(),r=yield t.readMessageBody(e.bodyLength),i=this._loadDictionaryBatch(n,r);this.dictionaries.set(n.id,i)}}return this.schema&&0===this._recordBatchIndex?(this._recordBatchIndex++,{done:!1,value:new b.b(this.schema)}):yield this.return()}))}_readNextMessageAndValidate(e){return Object(r.__awaiter)(this,void 0,void 0,(function*(){return yield this._reader.readMessage(e)}))}}class I extends L{get footer(){return this._footer}get numDictionaries(){return this._footer?this._footer.numDictionaries:0}get numRecordBatches(){return this._footer?this._footer.numRecordBatches:0}constructor(e,t){super(e instanceof d.b?e:new d.b(e),t)}isSync(){return!0}isFile(){return!0}open(e){if(!this.closed&&!this._footer){this.schema=(this._footer=this._readFooter()).schema;for(const e of this._footer.dictionaryBatches())e&&this._readDictionaryBatch(this._dictionaryIndex++)}return super.open(e)}readRecordBatch(e){var t;if(this.closed)return null;this._footer||this.open();const n=null===(t=this._footer)||void 0===t?void 0:t.getRecordBatch(e);if(n&&this._handle.seek(n.offset)){const e=this._reader.readMessage(s.d.RecordBatch);if(null==e?void 0:e.isRecordBatch()){const t=e.header(),n=this._reader.readMessageBody(e.bodyLength);return this._loadRecordBatch(t,n)}}return null}_readDictionaryBatch(e){var t;const n=null===(t=this._footer)||void 0===t?void 0:t.getDictionaryBatch(e);if(n&&this._handle.seek(n.offset)){const e=this._reader.readMessage(s.d.DictionaryBatch);if(null==e?void 0:e.isDictionaryBatch()){const t=e.header(),n=this._reader.readMessageBody(e.bodyLength),r=this._loadDictionaryBatch(t,n);this.dictionaries.set(t.id,r)}}}_readFooter(){const{_handle:e}=this,t=e.size-w.f,n=e.readInt32(t),r=e.readAt(t-n,n);return l.b.decode(r)}_readNextMessageAndValidate(e){var t;if(this._footer||this.open(),this._footer&&this._recordBatchIndexsuper.open}});return Object(r.__awaiter)(this,void 0,void 0,(function*(){if(!this.closed&&!this._footer){this.schema=(this._footer=yield this._readFooter()).schema;for(const e of this._footer.dictionaryBatches())e&&(yield this._readDictionaryBatch(this._dictionaryIndex++))}return yield t.open.call(this,e)}))}readRecordBatch(e){var t;return Object(r.__awaiter)(this,void 0,void 0,(function*(){if(this.closed)return null;this._footer||(yield this.open());const n=null===(t=this._footer)||void 0===t?void 0:t.getRecordBatch(e);if(n&&(yield this._handle.seek(n.offset))){const e=yield this._reader.readMessage(s.d.RecordBatch);if(null==e?void 0:e.isRecordBatch()){const t=e.header(),n=yield this._reader.readMessageBody(e.bodyLength);return this._loadRecordBatch(t,n)}}return null}))}_readDictionaryBatch(e){var t;return Object(r.__awaiter)(this,void 0,void 0,(function*(){const n=null===(t=this._footer)||void 0===t?void 0:t.getDictionaryBatch(e);if(n&&(yield this._handle.seek(n.offset))){const e=yield this._reader.readMessage(s.d.DictionaryBatch);if(null==e?void 0:e.isDictionaryBatch()){const t=e.header(),n=yield this._reader.readMessageBody(e.bodyLength),r=this._loadDictionaryBatch(t,n);this.dictionaries.set(t.id,r)}}}))}_readFooter(){return Object(r.__awaiter)(this,void 0,void 0,(function*(){const{_handle:e}=this;e._pending&&(yield e._pending);const t=e.size-w.f,n=yield e.readInt32(t),r=yield e.readAt(t-n,n);return l.b.decode(r)}))}_readNextMessageAndValidate(e){return Object(r.__awaiter)(this,void 0,void 0,(function*(){if(this._footer||(yield this.open()),this._footer&&this._recordBatchIndex=0?(l>=r?10:l>=i?5:l>=o?2:1)*Math.pow(10,s):-Math.pow(10,-s)/(l>=r?10:l>=i?5:l>=o?2:1)}function s(e,t,n){var a=Math.abs(t-e)/Math.max(0,n),s=Math.pow(10,Math.floor(Math.log(a)/Math.LN10)),l=a/s;return l>=r?s*=10:l>=i?s*=5:l>=o&&(s*=2),t0)return[e];if((r=t0){let n=Math.round(e/s),r=Math.round(t/s);for(n*st&&--r,o=new Array(i=r-n+1);++lt&&--r,o=new Array(i=r-n+1);++l0&&(i.length=e.length,o=i):o=r,(t>0||Number.isFinite(n))&&(o=(Array.isArray(o)?o:Array.from(o)).slice(t,n),a.index=t-1),{iterable:o,objectInfo:a}}function a(e){return e&&e[Symbol.asyncIterator]}function s(e,t){const{size:n,stride:r,offset:i,startIndices:o,nested:a}=t,s=e.BYTES_PER_ELEMENT,l=r?r/s:n,u=i?i/s:0,c=Math.floor((e.length-u)/l);return(t,{index:r,target:i})=>{if(!o){const t=r*l+u;for(let r=0;r1&&void 0!==arguments[1]?arguments[1]:{};switch(e){case 5126:return Float32Array;case 5123:case 33635:case 32819:case 32820:return Uint16Array;case 5125:return Uint32Array;case 5121:return t?Uint8ClampedArray:Uint8Array;case 5120:return Int8Array;case 5122:return Int16Array;case 5124:return Int32Array;default:throw new Error("Failed to deduce typed array type from GL constant")}}function o(e){let{data:t,width:n,height:r,bytesPerPixel:i=4,temp:o}=e;const a=n*i;o=o||new Uint8Array(a);for(let e=0;e0){let i=!0;for(let o=0;ot[2]&&(n|=2),e[1]t[3]&&(n|=8),n}function d(e,t){const{size:n=2,broken:r=!1,gridResolution:i=10,gridOffset:o=[0,0],startIndex:d=0,endIndex:f=e.length}=t||{},h=(f-d)/n;let p=[];const m=[p],y=l(e,0,n,d);let v,b;const _=A(y,i,o,[]),w=[];a(p,y);for(let t=1;tn&&(p=[],m.push(p),a(p,y)),b=c(v,_)}a(p,v),s(y,v)}return r?m:m[0]}function f(e,t){for(let n=0;n=0?(a(h,m)&&A.push(v),M+=y):A.length&&(A[A.length-1]=0),s(b,m),_=y,w=v;return[x?{pos:f,types:t&&p}:null,M?{pos:h,types:t&&A}:null]}function A(e,t,n,r){const i=Math.floor((e[0]-n[0])/t)*t+n[0],o=Math.floor((e[1]-n[1])/t)*t+n[1];return r[0]=i,r[1]=o,r[2]=i+t,r[3]=o+t,r}function g(e,t,n){8&n?(e[1]+=t,e[3]+=t):4&n?(e[1]-=t,e[3]-=t):2&n?(e[0]+=t,e[2]+=t):1&n&&(e[0]-=t,e[2]-=t)}function m(e,t,n,r){let i=1/0,o=-1/0,a=1/0,s=-1/0;for(let r=0;ro?t:o,a=ns?n:s}return r[0][0]=i,r[0][1]=a,r[1][0]=o,r[1][1]=s,r}function y(e,t){const{size:n=2,startIndex:r=0,endIndex:i=e.length,normalize:o=!0}=t||{},a=e.slice(r,i);w(a,n,0,i-r);const s=d(a,{size:n,broken:!0,gridResolution:360,gridOffset:[-180,-180]});if(o)for(const e of s)x(e,n);return s}function v(e,t=null,n){const{size:r=2,normalize:i=!0,edgeTypes:o=!1}=n||{};t=t||[];const a=[],s=[];let l=0,u=0;for(let i=0;i<=t.length;i++){const o=t[i]||e.length,c=u,d=b(e,r,l,o);for(let t=d;ti&&(i=t,o=a-1)}return o}function _(e,t,n,r,i=85.051129){const o=e[n],s=e[r-t];if(Math.abs(o-s)>180){const r=l(e,0,t,n);r[0]+=360*Math.round((s-o)/360),a(e,r),r[1]=Math.sign(r[1])*i,a(e,r),r[0]=o,a(e,r)}}function w(e,t,n,r){let i,o=e[0];for(let a=n;a180||t<-180)&&(i-=360*Math.round(t/360)),e[a]=o=i}}function x(e,t){let n;const r=e.length/t;for(let i=0;iNumber.MAX_SAFE_INTEGER))throw new TypeError(e+" is not safe to convert to a number.");return Number(e)}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";function r(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}n.d(t,"b",(function(){return r})),t.a=function(e,t,n){e.prototype=t.prototype=n,n.constructor=e}},function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r,i,o=n(31);!function(e){e[e.BUFFER=0]="BUFFER"}(r||(r={})),function(e){e[e.LZ4_FRAME=0]="LZ4_FRAME",e[e.ZSTD=1]="ZSTD"}(i||(i={}));class a{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsBodyCompression(e,t){return(t||new a).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsBodyCompression(e,t){return e.setPosition(e.position()+o.SIZE_PREFIX_LENGTH),(t||new a).__init(e.readInt32(e.position())+e.position(),e)}codec(){const e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt8(this.bb_pos+e):i.LZ4_FRAME}method(){const e=this.bb.__offset(this.bb_pos,6);return e?this.bb.readInt8(this.bb_pos+e):r.BUFFER}static startBodyCompression(e){e.startObject(2)}static addCodec(e,t){e.addFieldInt8(0,t,i.LZ4_FRAME)}static addMethod(e,t){e.addFieldInt8(1,t,r.BUFFER)}static endBodyCompression(e){return e.endObject()}static createBodyCompression(e,t,n){return a.startBodyCompression(e),a.addCodec(e,t),a.addMethod(e,n),a.endBodyCompression(e)}}var s=n(132),l=n(533);class u{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsRecordBatch(e,t){return(t||new u).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsRecordBatch(e,t){return e.setPosition(e.position()+o.SIZE_PREFIX_LENGTH),(t||new u).__init(e.readInt32(e.position())+e.position(),e)}length(){const e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt64(this.bb_pos+e):BigInt("0")}nodes(e,t){const n=this.bb.__offset(this.bb_pos,6);return n?(t||new l.a).__init(this.bb.__vector(this.bb_pos+n)+16*e,this.bb):null}nodesLength(){const e=this.bb.__offset(this.bb_pos,6);return e?this.bb.__vector_len(this.bb_pos+e):0}buffers(e,t){const n=this.bb.__offset(this.bb_pos,8);return n?(t||new s.a).__init(this.bb.__vector(this.bb_pos+n)+16*e,this.bb):null}buffersLength(){const e=this.bb.__offset(this.bb_pos,8);return e?this.bb.__vector_len(this.bb_pos+e):0}compression(e){const t=this.bb.__offset(this.bb_pos,10);return t?(e||new a).__init(this.bb.__indirect(this.bb_pos+t),this.bb):null}static startRecordBatch(e){e.startObject(4)}static addLength(e,t){e.addFieldInt64(0,t,BigInt("0"))}static addNodes(e,t){e.addFieldOffset(1,t,0)}static startNodesVector(e,t){e.startVector(16,t,8)}static addBuffers(e,t){e.addFieldOffset(2,t,0)}static startBuffersVector(e,t){e.startVector(16,t,8)}static addCompression(e,t){e.addFieldOffset(3,t,0)}static endRecordBatch(e){return e.endObject()}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(31),i=n(275),o=n(124),a=n(53);class s{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsField(e,t){return(t||new s).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsField(e,t){return e.setPosition(e.position()+r.SIZE_PREFIX_LENGTH),(t||new s).__init(e.readInt32(e.position())+e.position(),e)}name(e){const t=this.bb.__offset(this.bb_pos,4);return t?this.bb.__string(this.bb_pos+t,e):null}nullable(){const e=this.bb.__offset(this.bb_pos,6);return!!e&&!!this.bb.readInt8(this.bb_pos+e)}typeType(){const e=this.bb.__offset(this.bb_pos,8);return e?this.bb.readUint8(this.bb_pos+e):a.a.NONE}type(e){const t=this.bb.__offset(this.bb_pos,10);return t?this.bb.__union(e,this.bb_pos+t):null}dictionary(e){const t=this.bb.__offset(this.bb_pos,12);return t?(e||new i.a).__init(this.bb.__indirect(this.bb_pos+t),this.bb):null}children(e,t){const n=this.bb.__offset(this.bb_pos,14);return n?(t||new s).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+n)+4*e),this.bb):null}childrenLength(){const e=this.bb.__offset(this.bb_pos,14);return e?this.bb.__vector_len(this.bb_pos+e):0}customMetadata(e,t){const n=this.bb.__offset(this.bb_pos,16);return n?(t||new o.a).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+n)+4*e),this.bb):null}customMetadataLength(){const e=this.bb.__offset(this.bb_pos,16);return e?this.bb.__vector_len(this.bb_pos+e):0}static startField(e){e.startObject(7)}static addName(e,t){e.addFieldOffset(0,t,0)}static addNullable(e,t){e.addFieldInt8(1,+t,0)}static addTypeType(e,t){e.addFieldInt8(2,t,a.a.NONE)}static addType(e,t){e.addFieldOffset(3,t,0)}static addDictionary(e,t){e.addFieldOffset(4,t,0)}static addChildren(e,t){e.addFieldOffset(5,t,0)}static createChildrenVector(e,t){e.startVector(4,t.length,4);for(let n=t.length-1;n>=0;n--)e.addOffset(t[n]);return e.endVector()}static startChildrenVector(e,t){e.startVector(4,t,4)}static addCustomMetadata(e,t){e.addFieldOffset(6,t,0)}static createCustomMetadataVector(e,t){e.startVector(4,t.length,4);for(let n=t.length-1;n>=0;n--)e.addOffset(t[n]);return e.endVector()}static startCustomMetadataVector(e,t){e.startVector(4,t,4)}static endField(e){return e.endObject()}}},function(e,t,n){"use strict";n.r(t),n.d(t,"create",(function(){return o})),n.d(t,"creator",(function(){return r.a})),n.d(t,"local",(function(){return s})),n.d(t,"matcher",(function(){return u.b})),n.d(t,"namespace",(function(){return c.a})),n.d(t,"namespaces",(function(){return d.a})),n.d(t,"pointer",(function(){return f.a})),n.d(t,"pointers",(function(){return p})),n.d(t,"select",(function(){return i.a})),n.d(t,"selectAll",(function(){return m})),n.d(t,"selection",(function(){return g.b})),n.d(t,"selector",(function(){return y.a})),n.d(t,"selectorAll",(function(){return v.a})),n.d(t,"style",(function(){return b.b})),n.d(t,"window",(function(){return _.a}));var r=n(266),i=n(515),o=function(e){return Object(i.a)(Object(r.a)(e).call(document.documentElement))},a=0;function s(){return new l}function l(){this._="@"+(++a).toString(36)}l.prototype=s.prototype={constructor:l,get:function(e){for(var t=this._;!(t in e);)if(!(e=e.parentNode))return;return e[t]},set:function(e,t){return e[this._]=t},remove:function(e){return this._ in e&&delete e[this._]},toString:function(){return this._}};var u=n(265),c=n(357),d=n(270),f=n(518),h=n(547),p=function(e,t){return e.target&&(e=Object(h.a)(e),void 0===t&&(t=e.currentTarget),e=e.touches||[e]),Array.from(e,e=>Object(f.a)(e,t))},A=n(373),g=n(207),m=function(e){return"string"==typeof e?new g.a([document.querySelectorAll(e)],[document.documentElement]):new g.a([null==e?[]:Object(A.a)(e)],g.c)},y=n(356),v=n(516),b=n(517),_=n(358)},function(e,t,n){"use strict";n.d(t,"c",(function(){return I})),n.d(t,"e",(function(){return D})),n.d(t,"d",(function(){return k})),n.d(t,"b",(function(){return j})),n.d(t,"a",(function(){return F}));var r=n(20),i=n(41),o=n(12),a=n(38),s=n(59),l=n(80),u=n(348),c=n(489),d=n(258),f=n(492),h=n(495),p=n(491),A=n(496),g=n(201),m=n(260),y=n(98),v=n(493),b=n(497),_=n(488),w=n(494),x=n(170),M=n(171),E=n(259),O=n(490);class S extends l.a{visitNull(){return _.a}visitBool(){return c.a}visitInt(){return y.e}visitInt8(){return y.d}visitInt16(){return y.a}visitInt32(){return y.b}visitInt64(){return y.c}visitUint8(){return y.i}visitUint16(){return y.f}visitUint32(){return y.g}visitUint64(){return y.h}visitFloat(){return g.d}visitFloat16(){return g.a}visitFloat32(){return g.b}visitFloat64(){return g.c}visitUtf8(){return O.a}visitBinary(){return u.a}visitFixedSizeBinary(){return p.a}visitDate(){return d.a}visitDateDay(){return d.b}visitDateMillisecond(){return d.c}visitTimestamp(){return x.a}visitTimestampSecond(){return x.e}visitTimestampMillisecond(){return x.c}visitTimestampMicrosecond(){return x.b}visitTimestampNanosecond(){return x.d}visitTime(){return M.a}visitTimeSecond(){return M.e}visitTimeMillisecond(){return M.c}visitTimeMicrosecond(){return M.b}visitTimeNanosecond(){return M.d}visitDecimal(){return f.a}visitList(){return v.a}visitStruct(){return w.a}visitUnion(){return E.c}visitDenseUnion(){return E.a}visitSparseUnion(){return E.b}visitDictionary(){return h.a}visitInterval(){return m.a}visitIntervalDayTime(){return m.b}visitIntervalYearMonth(){return m.c}visitFixedSizeList(){return A.a}visitMap(){return b.a}}const T=new S;var C=n(135),L=n(87),P=n(191);function I(e){const t=e.type,n=new(T.getVisitFn(t)())(e);if(t.children&&t.children.length>0){const r=e.children||[],i={nullValues:e.nullValues},o=Array.isArray(r)?(e,t)=>r[t]||i:({name:e})=>r[e]||i;for(const[e,r]of t.children.entries()){const{type:t}=r,i=o(r,e);n.children.push(I(Object.assign(Object.assign({},i),{type:t})))}}return n}function D(e,t){if(e instanceof a.a||e instanceof s.a||e.type instanceof o.c||ArrayBuffer.isView(e))return Object(s.b)(e);const n=[...j({type:null!=t?t:R(e),nullValues:[null]})(e)],r=1===n.length?n[0]:n.reduce((e,t)=>e.concat(t));return o.c.isDictionary(r.type)?r.memoize():r}function k(e){const t=D(e),n=new L.a(new i.b(t.type.children),t.data[0]);return new C.a(n)}function R(e){if(0===e.length)return new o.z;let t=0,n=0,r=0,a=0,s=0,l=0,u=0,c=0;for(const i of e){if(null!=i){switch(typeof i){case"bigint":++l;continue;case"boolean":++u;continue;case"number":++a;continue;case"string":++s;continue;case"object":Array.isArray(i)?++n:"[object Date]"===Object.prototype.toString.call(i)?++c:++r;continue}throw new TypeError("Unable to infer Vector type from input values, explicit type declaration expected.")}++t}if(a+t===e.length)return new o.o;if(s+t===e.length)return new o.i(new o.R,new o.r);if(l+t===e.length)return new o.s;if(u+t===e.length)return new o.b;if(c+t===e.length)return new o.e;if(n+t===e.length){const t=e,n=R(t[t.findIndex(e=>null!=e)]);if(t.every(e=>null==e||Object(P.c)(n,R(e))))return new o.x(new i.a("",n,!0))}else if(r+t===e.length){const t=new Map;for(const n of e)for(const e of Object.keys(n))t.has(e)||null==n[e]||t.set(e,new i.a(e,R([n[e]]),!0));return new o.B([...t.values()])}throw new TypeError("Unable to infer Vector type from input values, explicit type declaration expected.")}function j(e){const{queueingStrategy:t="count"}=e,{highWaterMark:n=("bytes"!==t?Number.POSITIVE_INFINITY:Math.pow(2,14))}=e,r="bytes"!==t?"length":"byteLength";return function*(t){let i=0;const o=I(e);for(const e of t)o.append(e)[r]>=n&&++i&&(yield o.toVector());(o.finish().length>0||0===i)&&(yield o.toVector())}}function F(e){const{queueingStrategy:t="count"}=e,{highWaterMark:n=("bytes"!==t?Number.POSITIVE_INFINITY:Math.pow(2,14))}=e,i="bytes"!==t?"length":"byteLength";return function(t){return Object(r.__asyncGenerator)(this,arguments,(function*(){var o,a,s,l;let u=0;const c=I(e);try{for(var d,f=!0,h=Object(r.__asyncValues)(t);!(o=(d=yield Object(r.__await)(h.next())).done);f=!0){l=d.value,f=!1;const e=l;c.append(e)[i]>=n&&++u&&(yield yield Object(r.__await)(c.toVector()))}}catch(e){a={error:e}}finally{try{f||o||!(s=h.return)||(yield Object(r.__await)(s.call(h)))}finally{if(a)throw a.error}}(c.finish().length>0||0===u)&&(yield yield Object(r.__await)(c.toVector()))}))}}},function(e,t){e.exports=r},function(e,t,n){"use strict";n.r(t),n.d(t,"arc",(function(){return r.a})),n.d(t,"area",(function(){return i.a})),n.d(t,"line",(function(){return o.a})),n.d(t,"pie",(function(){return a.a})),n.d(t,"areaRadial",(function(){return h})),n.d(t,"radialArea",(function(){return h})),n.d(t,"lineRadial",(function(){return f})),n.d(t,"radialLine",(function(){return f})),n.d(t,"pointRadial",(function(){return p.a})),n.d(t,"linkHorizontal",(function(){return A.a})),n.d(t,"linkVertical",(function(){return A.c})),n.d(t,"linkRadial",(function(){return A.b})),n.d(t,"symbol",(function(){return j})),n.d(t,"symbols",(function(){return R})),n.d(t,"symbolCircle",(function(){return y})),n.d(t,"symbolCross",(function(){return v})),n.d(t,"symbolDiamond",(function(){return w})),n.d(t,"symbolSquare",(function(){return S})),n.d(t,"symbolStar",(function(){return O})),n.d(t,"symbolTriangle",(function(){return C})),n.d(t,"symbolWye",(function(){return D})),n.d(t,"curveBasisClosed",(function(){return H})),n.d(t,"curveBasisOpen",(function(){return G})),n.d(t,"curveBasis",(function(){return z})),n.d(t,"curveBundle",(function(){return W})),n.d(t,"curveCardinalClosed",(function(){return Q})),n.d(t,"curveCardinalOpen",(function(){return $})),n.d(t,"curveCardinal",(function(){return Z})),n.d(t,"curveCatmullRomClosed",(function(){return ie})),n.d(t,"curveCatmullRomOpen",(function(){return ae})),n.d(t,"curveCatmullRom",(function(){return ne})),n.d(t,"curveLinearClosed",(function(){return le})),n.d(t,"curveLinear",(function(){return s.a})),n.d(t,"curveMonotoneX",(function(){return ge})),n.d(t,"curveMonotoneY",(function(){return me})),n.d(t,"curveNatural",(function(){return be})),n.d(t,"curveStep",(function(){return we})),n.d(t,"curveStepAfter",(function(){return Me})),n.d(t,"curveStepBefore",(function(){return xe})),n.d(t,"stack",(function(){return Ce})),n.d(t,"stackOffsetExpand",(function(){return Le})),n.d(t,"stackOffsetDiverging",(function(){return Pe})),n.d(t,"stackOffsetNone",(function(){return Oe})),n.d(t,"stackOffsetSilhouette",(function(){return Ie})),n.d(t,"stackOffsetWiggle",(function(){return De})),n.d(t,"stackOrderAppearance",(function(){return ke})),n.d(t,"stackOrderAscending",(function(){return je})),n.d(t,"stackOrderDescending",(function(){return Ne})),n.d(t,"stackOrderInsideOut",(function(){return Be})),n.d(t,"stackOrderNone",(function(){return Se})),n.d(t,"stackOrderReverse",(function(){return ze}));var r=n(899),i=n(514),o=n(355),a=n(1137),s=n(264),l=c(s.a);function u(e){this._curve=e}function c(e){function t(t){return new u(e(t))}return t._curve=e,t}function d(e){var t=e.curve;return e.angle=e.x,delete e.x,e.radius=e.y,delete e.y,e.curve=function(e){return arguments.length?t(c(e)):t()._curve},e}u.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(e,t){this._curve.point(t*Math.sin(e),t*-Math.cos(e))}};var f=function(){return d(Object(o.a)().curve(l))},h=function(){var e=Object(i.a)().curve(l),t=e.curve,n=e.lineX0,r=e.lineX1,o=e.lineY0,a=e.lineY1;return e.angle=e.x,delete e.x,e.startAngle=e.x0,delete e.x0,e.endAngle=e.x1,delete e.x1,e.radius=e.y,delete e.y,e.innerRadius=e.y0,delete e.y0,e.outerRadius=e.y1,delete e.y1,e.lineStartAngle=function(){return d(n())},delete e.lineX0,e.lineEndAngle=function(){return d(r())},delete e.lineX1,e.lineInnerRadius=function(){return d(o())},delete e.lineY0,e.lineOuterRadius=function(){return d(a())},delete e.lineY1,e.curve=function(e){return arguments.length?t(c(e)):t()._curve},e},p=n(315),A=n(452),g=n(558),m=n(30),y={draw:function(e,t){var n=Math.sqrt(t/m.j);e.moveTo(n,0),e.arc(0,0,n,0,m.m)}},v={draw:function(e,t){var n=Math.sqrt(t/5)/2;e.moveTo(-3*n,-n),e.lineTo(-n,-n),e.lineTo(-n,-3*n),e.lineTo(n,-3*n),e.lineTo(n,-n),e.lineTo(3*n,-n),e.lineTo(3*n,n),e.lineTo(n,n),e.lineTo(n,3*n),e.lineTo(-n,3*n),e.lineTo(-n,n),e.lineTo(-3*n,n),e.closePath()}},b=Math.sqrt(1/3),_=2*b,w={draw:function(e,t){var n=Math.sqrt(t/_),r=n*b;e.moveTo(0,-n),e.lineTo(r,0),e.lineTo(0,n),e.lineTo(-r,0),e.closePath()}},x=Math.sin(m.j/10)/Math.sin(7*m.j/10),M=Math.sin(m.m/10)*x,E=-Math.cos(m.m/10)*x,O={draw:function(e,t){var n=Math.sqrt(.8908130915292852*t),r=M*n,i=E*n;e.moveTo(0,-n),e.lineTo(r,i);for(var o=1;o<5;++o){var a=m.m*o/5,s=Math.cos(a),l=Math.sin(a);e.lineTo(l*n,-s*n),e.lineTo(s*r-l*i,l*r+s*i)}e.closePath()}},S={draw:function(e,t){var n=Math.sqrt(t),r=-n/2;e.rect(r,r,n,n)}},T=Math.sqrt(3),C={draw:function(e,t){var n=-Math.sqrt(t/(3*T));e.moveTo(0,2*n),e.lineTo(-T*n,-n),e.lineTo(T*n,-n),e.closePath()}},L=Math.sqrt(3)/2,P=1/Math.sqrt(12),I=3*(P/2+1),D={draw:function(e,t){var n=Math.sqrt(t/I),r=n/2,i=n*P,o=r,a=n*P+n,s=-o,l=a;e.moveTo(r,i),e.lineTo(o,a),e.lineTo(s,l),e.lineTo(-.5*r-L*i,L*r+-.5*i),e.lineTo(-.5*o-L*a,L*o+-.5*a),e.lineTo(-.5*s-L*l,L*s+-.5*l),e.lineTo(-.5*r+L*i,-.5*i-L*r),e.lineTo(-.5*o+L*a,-.5*a-L*o),e.lineTo(-.5*s+L*l,-.5*l-L*s),e.closePath()}},k=n(56),R=[y,v,w,S,O,C,D],j=function(){var e=Object(k.a)(y),t=Object(k.a)(64),n=null;function r(){var r;if(n||(n=r=Object(g.a)()),e.apply(this,arguments).draw(n,+t.apply(this,arguments)),r)return n=null,r+""||null}return r.type=function(t){return arguments.length?(e="function"==typeof t?t:Object(k.a)(t),r):e},r.size=function(e){return arguments.length?(t="function"==typeof e?e:Object(k.a)(+e),r):t},r.context=function(e){return arguments.length?(n=null==e?null:e,r):n},r},F=function(){};function N(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function B(e){this._context=e}B.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:N(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:N(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};var z=function(e){return new B(e)};function U(e){this._context=e}U.prototype={areaStart:F,areaEnd:F,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4)}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:N(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};var H=function(e){return new U(e)};function V(e){this._context=e}V.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+e)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:N(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};var G=function(e){return new V(e)};function Y(e,t){this._basis=new B(e),this._beta=t}Y.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var e=this._x,t=this._y,n=e.length-1;if(n>0)for(var r,i=e[0],o=t[0],a=e[n]-i,s=t[n]-o,l=-1;++l<=n;)r=l/n,this._basis.point(this._beta*e[l]+(1-this._beta)*(i+r*a),this._beta*t[l]+(1-this._beta)*(o+r*s));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};var W=function e(t){function n(e){return 1===t?new B(e):new Y(e,t)}return n.beta=function(t){return e(+t)},n}(.85);function q(e,t,n){e._context.bezierCurveTo(e._x1+e._k*(e._x2-e._x0),e._y1+e._k*(e._y2-e._y0),e._x2+e._k*(e._x1-t),e._y2+e._k*(e._y1-n),e._x2,e._y2)}function X(e,t){this._context=e,this._k=(1-t)/6}X.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:q(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2,this._x1=e,this._y1=t;break;case 2:this._point=3;default:q(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var Z=function e(t){function n(e){return new X(e,t)}return n.tension=function(t){return e(+t)},n}(0);function K(e,t){this._context=e,this._k=(1-t)/6}K.prototype={areaStart:F,areaEnd:F,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:q(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var Q=function e(t){function n(e){return new K(e,t)}return n.tension=function(t){return e(+t)},n}(0);function J(e,t){this._context=e,this._k=(1-t)/6}J.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:q(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var $=function e(t){function n(e){return new J(e,t)}return n.tension=function(t){return e(+t)},n}(0);function ee(e,t,n){var r=e._x1,i=e._y1,o=e._x2,a=e._y2;if(e._l01_a>m.f){var s=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,l=3*e._l01_a*(e._l01_a+e._l12_a);r=(r*s-e._x0*e._l12_2a+e._x2*e._l01_2a)/l,i=(i*s-e._y0*e._l12_2a+e._y2*e._l01_2a)/l}if(e._l23_a>m.f){var u=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,c=3*e._l23_a*(e._l23_a+e._l12_a);o=(o*u+e._x1*e._l23_2a-t*e._l12_2a)/c,a=(a*u+e._y1*e._l23_2a-n*e._l12_2a)/c}e._context.bezierCurveTo(r,i,o,a,e._x2,e._y2)}function te(e,t){this._context=e,this._alpha=t}te.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3;default:ee(this,e,t)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var ne=function e(t){function n(e){return t?new te(e,t):new X(e,0)}return n.alpha=function(t){return e(+t)},n}(.5);function re(e,t){this._context=e,this._alpha=t}re.prototype={areaStart:F,areaEnd:F,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:ee(this,e,t)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var ie=function e(t){function n(e){return t?new re(e,t):new K(e,0)}return n.alpha=function(t){return e(+t)},n}(.5);function oe(e,t){this._context=e,this._alpha=t}oe.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:ee(this,e,t)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var ae=function e(t){function n(e){return t?new oe(e,t):new J(e,0)}return n.alpha=function(t){return e(+t)},n}(.5);function se(e){this._context=e}se.prototype={areaStart:F,areaEnd:F,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};var le=function(e){return new se(e)};function ue(e){return e<0?-1:1}function ce(e,t,n){var r=e._x1-e._x0,i=t-e._x1,o=(e._y1-e._y0)/(r||i<0&&-0),a=(n-e._y1)/(i||r<0&&-0),s=(o*i+a*r)/(r+i);return(ue(o)+ue(a))*Math.min(Math.abs(o),Math.abs(a),.5*Math.abs(s))||0}function de(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function fe(e,t,n){var r=e._x0,i=e._y0,o=e._x1,a=e._y1,s=(o-r)/3;e._context.bezierCurveTo(r+s,i+s*t,o-s,a-s*n,o,a)}function he(e){this._context=e}function pe(e){this._context=new Ae(e)}function Ae(e){this._context=e}function ge(e){return new he(e)}function me(e){return new pe(e)}function ye(e){this._context=e}function ve(e){var t,n,r=e.length-1,i=new Array(r),o=new Array(r),a=new Array(r);for(i[0]=0,o[0]=2,a[0]=e[0]+2*e[1],t=1;t=0;--t)i[t]=(a[t]-i[t+1])/o[t];for(o[r-1]=(e[r]+i[r-1])/2,t=0;t=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}}this._x=e,this._y=t}};var we=function(e){return new _e(e,.5)};function xe(e){return new _e(e,0)}function Me(e){return new _e(e,1)}var Ee=n(433),Oe=function(e,t){if((i=e.length)>1)for(var n,r,i,o=1,a=e[t[0]],s=a.length;o=0;)n[t]=t;return n};function Te(e,t){return e[t]}var Ce=function(){var e=Object(k.a)([]),t=Se,n=Oe,r=Te;function i(i){var o,a,s=e.apply(this,arguments),l=i.length,u=s.length,c=new Array(u);for(o=0;o0){for(var n,r,i,o=0,a=e[0].length;o0)for(var n,r,i,o,a,s,l=0,u=e[t[0]].length;l0?(r[0]=o,r[1]=o+=i):i<0?(r[1]=a,r[0]=a+=i):(r[0]=0,r[1]=i)},Ie=function(e,t){if((n=e.length)>0){for(var n,r=0,i=e[t[0]],o=i.length;r0&&(r=(n=e[t[0]]).length)>0){for(var n,r,i,o=0,a=1;ao&&(o=t,r=n);return r}var je=function(e){var t=e.map(Fe);return Se(e).sort((function(e,n){return t[e]-t[n]}))};function Fe(e){for(var t,n=0,r=-1,i=e.length;++rr.decode(e),o=new TextEncoder,a=e=>o.encode(e)},function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));var r=n(17),i=n(115),o=n(96),a=n(245),s=n(28),l=n(138);const u=[9729,9728],c=globalThis.WebGLBuffer||function(){};class d extends i.a{get[Symbol.toStringTag](){return"Texture"}static isSupported(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{format:n,linearFiltering:r}=t;let i=!0;return n&&(i=i&&Object(a.d)(e,n),i=i&&(!r||Object(a.e)(e,n))),i}constructor(e,t){const{id:n=Object(l.c)("texture"),handle:r,target:i}=t;super(e,{id:n,handle:r}),this.target=i,this.textureUnit=void 0,this.loaded=!1,this.width=void 0,this.height=void 0,this.depth=void 0,this.format=void 0,this.type=void 0,this.dataFormat=void 0,this.border=void 0,this.textureUnit=void 0,this.mipmaps=void 0}toString(){return"Texture(".concat(this.id,",").concat(this.width,"x").concat(this.height,")")}initialize(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.data;if(t instanceof Promise)return t.then(t=>this.initialize(Object.assign({},e,{pixels:t,data:t}))),this;const n="undefined"!=typeof HTMLVideoElement&&t instanceof HTMLVideoElement;if(n&&t.readyStatethis.initialize(e)),this;const{pixels:i=null,format:o=6408,border:a=0,recreate:s=!1,parameters:l={},pixelStore:u={},textureUnit:c}=e;t||(t=i);let{width:d,height:f,dataFormat:h,type:p,compressed:A=!1,mipmaps:g=!0}=e;const{depth:m=0}=e;return({width:d,height:f,compressed:A,dataFormat:h,type:p}=this._deduceParameters({format:o,type:p,dataFormat:h,compressed:A,data:t,width:d,height:f})),this.width=d,this.height=f,this.depth=m,this.format=o,this.type=p,this.dataFormat=h,this.border=a,this.textureUnit=c,Number.isFinite(this.textureUnit)&&(this.gl.activeTexture(33984+this.textureUnit),this.gl.bindTexture(this.target,this.handle)),g&&this._isNPOT()&&(r.k.warn("texture: ".concat(this," is Non-Power-Of-Two, disabling mipmaping"))(),g=!1,this._updateForNPOT(l)),this.mipmaps=g,this.setImageData({data:t,width:d,height:f,depth:m,format:o,type:p,dataFormat:h,border:a,mipmaps:g,parameters:u,compressed:A}),g&&this.generateMipmap(),this.setParameters(l),s&&(this.data=t),n&&(this._video={video:t,parameters:l,lastTime:t.readyState>=HTMLVideoElement.HAVE_CURRENT_DATA?t.currentTime:-1}),this}update(){if(this._video){const{video:e,parameters:t,lastTime:n}=this._video;if(n===e.currentTime||e.readyState0&&void 0!==arguments[0]?arguments[0]:{};return this._isNPOT()?(r.k.warn("texture: ".concat(this," is Non-Power-Of-Two, disabling mipmaping"))(),this):(this.mipmaps=!0,this.gl.bindTexture(this.target,this.handle),Object(r.o)(this.gl,e,()=>{this.gl.generateMipmap(this.target)}),this.gl.bindTexture(this.target,null),this)}setImageData(e){this._trackDeallocatedMemory("Texture");const{target:t=this.target,pixels:n=null,level:i=0,format:o=this.format,border:l=this.border,offset:u=0,parameters:c={}}=e;let{data:d=null,type:f=this.type,width:h=this.width,height:p=this.height,dataFormat:A=this.dataFormat,compressed:g=!1}=e;d||(d=n),({type:f,dataFormat:A,compressed:g,width:h,height:p}=this._deduceParameters({format:o,type:f,dataFormat:A,compressed:g,data:d,width:h,height:p}));const{gl:m}=this;m.bindTexture(this.target,this.handle);let y,v=null;({data:d,dataType:v}=this._getDataType({data:d,compressed:g}));let b=0;if(Object(r.o)(this.gl,c,()=>{switch(v){case"null":m.texImage2D(t,i,o,h,p,l,A,f,d);break;case"typed-array":m.texImage2D(t,i,o,h,p,l,A,f,d,u);break;case"buffer":y=Object(r.a)(m),y.bindBuffer(35052,d.handle||d),y.texImage2D(t,i,o,h,p,l,A,f,u),y.bindBuffer(35052,null);break;case"browser-object":Object(r.j)(m)?m.texImage2D(t,i,o,h,p,l,A,f,d):m.texImage2D(t,i,o,A,f,d);break;case"compressed":for(const[e,n]of d.entries())m.compressedTexImage2D(t,e,n.format,n.width,n.height,l,n.data),b+=n.levelSize;break;default:Object(s.a)(!1,"Unknown image data type")}}),"compressed"===v)this._trackAllocatedMemory(b,"Texture");else if(d&&d.byteLength)this._trackAllocatedMemory(d.byteLength,"Texture");else{const e=a.a[this.dataFormat]||4,t=a.c[this.type]||1;this._trackAllocatedMemory(this.width*this.height*e*t,"Texture")}return this.loaded=!0,this}setSubImageData(e){let{target:t=this.target,pixels:n=null,data:i=null,x:a=0,y:l=0,width:u=this.width,height:d=this.height,level:f=0,format:h=this.format,type:p=this.type,dataFormat:A=this.dataFormat,compressed:g=!1,offset:m=0,border:y=this.border,parameters:v={}}=e;if(({type:p,dataFormat:A,compressed:g,width:u,height:d}=this._deduceParameters({format:h,type:p,dataFormat:A,compressed:g,data:i,width:u,height:d})),Object(s.a)(0===this.depth,"texSubImage not supported for 3D textures"),i||(i=n),i&&i.data){const e=i;i=e.data,u=e.shape[0],d=e.shape[1]}i instanceof o.a&&(i=i.handle),this.gl.bindTexture(this.target,this.handle),Object(r.o)(this.gl,v,()=>{if(g)this.gl.compressedTexSubImage2D(t,f,a,l,u,d,h,i);else if(null===i)this.gl.texSubImage2D(t,f,a,l,u,d,A,p,null);else if(ArrayBuffer.isView(i))this.gl.texSubImage2D(t,f,a,l,u,d,A,p,i,m);else if(i instanceof c){const e=Object(r.a)(this.gl);e.bindBuffer(35052,i),e.texSubImage2D(t,f,a,l,u,d,A,p,m),e.bindBuffer(35052,null)}else if(Object(r.j)(this.gl)){Object(r.a)(this.gl).texSubImage2D(t,f,a,l,u,d,A,p,i)}else this.gl.texSubImage2D(t,f,a,l,A,p,i)}),this.gl.bindTexture(this.target,null)}copyFramebuffer(){return r.k.error("Texture.copyFramebuffer({...}) is no logner supported, use copyToTexture(source, target, opts})")(),null}getActiveUnit(){return this.gl.getParameter(34016)-33984}bind(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.textureUnit;const{gl:t}=this;return void 0!==e&&(this.textureUnit=e,t.activeTexture(33984+e)),t.bindTexture(this.target,this.handle),e}unbind(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.textureUnit;const{gl:t}=this;return void 0!==e&&(this.textureUnit=e,t.activeTexture(33984+e)),t.bindTexture(this.target,null),e}_getDataType(e){let{data:t,compressed:n=!1}=e;return n?{data:t,dataType:"compressed"}:null===t?{data:t,dataType:"null"}:ArrayBuffer.isView(t)?{data:t,dataType:"typed-array"}:t instanceof o.a?{data:t.handle,dataType:"buffer"}:t instanceof c?{data:t,dataType:"buffer"}:{data:t,dataType:"browser-object"}}_deduceParameters(e){const{format:t,data:n}=e;let{width:r,height:i,dataFormat:o,type:s,compressed:l}=e;const u=a.b[t];return o=o||u&&u.dataFormat,s=s||u&&u.types[0],l=l||u&&u.compressed,({width:r,height:i}=this._deduceImageSize(n,r,i)),{dataFormat:o,type:s,compressed:l,width:r,height:i,format:t,data:n}}_deduceImageSize(e,t,n){let r;return r="undefined"!=typeof ImageData&&e instanceof ImageData?{width:e.width,height:e.height}:"undefined"!=typeof HTMLImageElement&&e instanceof HTMLImageElement?{width:e.naturalWidth,height:e.naturalHeight}:"undefined"!=typeof HTMLCanvasElement&&e instanceof HTMLCanvasElement||"undefined"!=typeof ImageBitmap&&e instanceof ImageBitmap?{width:e.width,height:e.height}:"undefined"!=typeof HTMLVideoElement&&e instanceof HTMLVideoElement?{width:e.videoWidth,height:e.videoHeight}:e?{width:t,height:n}:{width:t>=0?t:1,height:n>=0?n:1},Object(s.a)(r,"Could not deduced texture size"),Object(s.a)(void 0===t||r.width===t,"Deduced texture width does not match supplied width"),Object(s.a)(void 0===n||r.height===n,"Deduced texture height does not match supplied height"),r}_createHandle(){return this.gl.createTexture()}_deleteHandle(){this.gl.deleteTexture(this.handle),this._trackDeallocatedMemory("Texture")}_getParameter(e){switch(e){case 4096:return this.width;case 4097:return this.height;default:this.gl.bindTexture(this.target,this.handle);const t=this.gl.getTexParameter(this.target,e);return this.gl.bindTexture(this.target,null),t}}_setParameter(e,t){switch(this.gl.bindTexture(this.target,this.handle),t=this._getNPOTParam(e,t),e){case 33082:case 33083:this.gl.texParameterf(this.handle,e,t);break;case 4096:case 4097:Object(s.a)(!1);break;default:this.gl.texParameteri(this.target,e,t)}return this.gl.bindTexture(this.target,null),this}_isNPOT(){return!Object(r.j)(this.gl)&&(!(!this.width||!this.height)&&(!Object(l.b)(this.width)||!Object(l.b)(this.height)))}_updateForNPOT(e){void 0===e[this.gl.TEXTURE_MIN_FILTER]&&(e[this.gl.TEXTURE_MIN_FILTER]=this.gl.LINEAR),void 0===e[this.gl.TEXTURE_WRAP_S]&&(e[this.gl.TEXTURE_WRAP_S]=this.gl.CLAMP_TO_EDGE),void 0===e[this.gl.TEXTURE_WRAP_T]&&(e[this.gl.TEXTURE_WRAP_T]=this.gl.CLAMP_TO_EDGE)}_getNPOTParam(e,t){if(this._isNPOT())switch(e){case 10241:-1===u.indexOf(t)&&(t=9729);break;case 10242:case 10243:33071!==t&&(t=33071)}return t}}},function(e,t,n){"use strict";n.d(t,"c",(function(){return i})),n.d(t,"b",(function(){return o})),n.d(t,"h",(function(){return a})),n.d(t,"g",(function(){return s})),n.d(t,"i",(function(){return l})),n.d(t,"d",(function(){return u})),n.d(t,"e",(function(){return c})),n.d(t,"f",(function(){return d})),n.d(t,"a",(function(){return f}));var r=n(42);function i(e){var t=e[0],n=e[1],r=e[2];return Math.hypot(t,n,r)}function o(e,t,n){var r=t[0],i=t[1],o=t[2],a=n[0],s=n[1],l=n[2];return e[0]=i*l-o*s,e[1]=o*a-r*l,e[2]=r*s-i*a,e}function a(e,t,n){var r=t[0],i=t[1],o=t[2],a=n[3]*r+n[7]*i+n[11]*o+n[15];return a=a||1,e[0]=(n[0]*r+n[4]*i+n[8]*o+n[12])/a,e[1]=(n[1]*r+n[5]*i+n[9]*o+n[13])/a,e[2]=(n[2]*r+n[6]*i+n[10]*o+n[14])/a,e}function s(e,t,n){var r=t[0],i=t[1],o=t[2];return e[0]=r*n[0]+i*n[3]+o*n[6],e[1]=r*n[1]+i*n[4]+o*n[7],e[2]=r*n[2]+i*n[5]+o*n[8],e}function l(e,t,n){var r=n[0],i=n[1],o=n[2],a=n[3],s=t[0],l=t[1],u=t[2],c=i*u-o*l,d=o*s-r*u,f=r*l-i*s,h=i*f-o*d,p=o*c-r*f,A=r*d-i*c,g=2*a;return c*=g,d*=g,f*=g,h*=2,p*=2,A*=2,e[0]=s+c+h,e[1]=l+d+p,e[2]=u+f+A,e}function u(e,t,n,r){var i=[],o=[];return i[0]=t[0]-n[0],i[1]=t[1]-n[1],i[2]=t[2]-n[2],o[0]=i[0],o[1]=i[1]*Math.cos(r)-i[2]*Math.sin(r),o[2]=i[1]*Math.sin(r)+i[2]*Math.cos(r),e[0]=o[0]+n[0],e[1]=o[1]+n[1],e[2]=o[2]+n[2],e}function c(e,t,n,r){var i=[],o=[];return i[0]=t[0]-n[0],i[1]=t[1]-n[1],i[2]=t[2]-n[2],o[0]=i[2]*Math.sin(r)+i[0]*Math.cos(r),o[1]=i[1],o[2]=i[2]*Math.cos(r)-i[0]*Math.sin(r),e[0]=o[0]+n[0],e[1]=o[1]+n[1],e[2]=o[2]+n[2],e}function d(e,t,n,r){var i=[],o=[];return i[0]=t[0]-n[0],i[1]=t[1]-n[1],i[2]=t[2]-n[2],o[0]=i[0]*Math.cos(r)-i[1]*Math.sin(r),o[1]=i[0]*Math.sin(r)+i[1]*Math.cos(r),o[2]=i[2],e[0]=o[0]+n[0],e[1]=o[1]+n[1],e[2]=o[2]+n[2],e}function f(e,t){var n=e[0],r=e[1],i=e[2],o=t[0],a=t[1],s=t[2],l=Math.sqrt(n*n+r*r+i*i)*Math.sqrt(o*o+a*a+s*s),u=l&&function(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}(e,t)/l;return Math.acos(Math.min(Math.max(u,-1),1))}var h,p;h=new r.a(3),r.a!=Float32Array&&(h[0]=0,h[1]=0,h[2]=0),p=h},function(e,t,n){"use strict";n.r(t),n.d(t,"UNITS",(function(){return h})),n.d(t,"h3IndexToSplitLong",(function(){return g})),n.d(t,"splitLongToh3Index",(function(){return y})),n.d(t,"h3IsValid",(function(){return I})),n.d(t,"h3IsPentagon",(function(){return D})),n.d(t,"h3IsResClassIII",(function(){return k})),n.d(t,"h3GetBaseCell",(function(){return R})),n.d(t,"h3GetFaces",(function(){return j})),n.d(t,"h3GetResolution",(function(){return F})),n.d(t,"geoToH3",(function(){return N})),n.d(t,"h3ToGeo",(function(){return B})),n.d(t,"h3ToGeoBoundary",(function(){return z})),n.d(t,"h3ToParent",(function(){return U})),n.d(t,"h3ToChildren",(function(){return H})),n.d(t,"h3ToCenterChild",(function(){return V})),n.d(t,"kRing",(function(){return G})),n.d(t,"kRingDistances",(function(){return Y})),n.d(t,"hexRing",(function(){return W})),n.d(t,"polyfill",(function(){return q})),n.d(t,"h3SetToMultiPolygon",(function(){return X})),n.d(t,"compact",(function(){return Z})),n.d(t,"uncompact",(function(){return K})),n.d(t,"h3IndexesAreNeighbors",(function(){return Q})),n.d(t,"getH3UnidirectionalEdge",(function(){return J})),n.d(t,"getOriginH3IndexFromUnidirectionalEdge",(function(){return $})),n.d(t,"getDestinationH3IndexFromUnidirectionalEdge",(function(){return ee})),n.d(t,"h3UnidirectionalEdgeIsValid",(function(){return te})),n.d(t,"getH3IndexesFromUnidirectionalEdge",(function(){return ne})),n.d(t,"getH3UnidirectionalEdgesFromHexagon",(function(){return re})),n.d(t,"getH3UnidirectionalEdgeBoundary",(function(){return ie})),n.d(t,"h3Distance",(function(){return oe})),n.d(t,"h3Line",(function(){return ae})),n.d(t,"experimentalH3ToLocalIj",(function(){return se})),n.d(t,"experimentalLocalIjToH3",(function(){return le})),n.d(t,"pointDist",(function(){return ue})),n.d(t,"cellArea",(function(){return ce})),n.d(t,"exactEdgeLength",(function(){return de})),n.d(t,"hexArea",(function(){return fe})),n.d(t,"edgeLength",(function(){return he})),n.d(t,"numHexagons",(function(){return pe})),n.d(t,"getRes0Indexes",(function(){return Ae})),n.d(t,"getPentagonIndexes",(function(){return ge})),n.d(t,"degsToRads",(function(){return me})),n.d(t,"radsToDegs",(function(){return ye}));var r=function(e){var t,n=void 0!==(e=e||{})?e:{},r={};for(t in n)n.hasOwnProperty(t)&&(r[t]=n[t]);var i,o=[],a="";document.currentScript&&(a=document.currentScript.src),a=0!==a.indexOf("blob:")?a.substr(0,a.lastIndexOf("/")+1):"",i=function(e,t,n){var r=new XMLHttpRequest;r.open("GET",e,!0),r.responseType="arraybuffer",r.onload=function(){if(200==r.status||0==r.status&&r.response)t(r.response);else{var i=Z(e);i?t(i.buffer):n()}},r.onerror=n,r.send(null)};var s=n.print||console.log.bind(console),l=n.printErr||console.warn.bind(console);for(t in r)r.hasOwnProperty(t)&&(n[t]=r[t]);r=null,n.arguments&&(o=n.arguments);var u=0,c=function(){return u};var d=!1;function f(e){var t,r=n["_"+e];return t="Cannot call unknown function "+e+", make sure it is exported",r||le("Assertion failed: "+t),r}function h(e,t,n,r,i){var o={string:function(e){var t=0;if(null!=e&&0!==e){var n=1+(e.length<<2);(function(e,t,n){(function(e,t,n,r){if(!(r>0))return 0;for(var i=n,o=n+r-1,a=0;a=55296&&s<=57343){var l=e.charCodeAt(++a);s=65536+((1023&s)<<10)|1023&l}if(s<=127){if(n>=o)break;t[n++]=s}else if(s<=2047){if(n+1>=o)break;t[n++]=192|s>>6,t[n++]=128|63&s}else if(s<=65535){if(n+2>=o)break;t[n++]=224|s>>12,t[n++]=128|s>>6&63,t[n++]=128|63&s}else{if(n+3>=o)break;t[n++]=240|s>>18,t[n++]=128|s>>12&63,t[n++]=128|s>>6&63,t[n++]=128|63&s}}t[n]=0})(e,y,t,n)})(e,t=ee(n),n)}return t},array:function(e){var t=ee(e.length);return function(e,t){m.set(e,t)}(e,t),t}};var a=f(e),s=[],l=0;if(r)for(var u=0;u=r);)++i;if(i-t>16&&e.subarray&&p)return p.decode(e.subarray(t,i));for(var o="";t>10,56320|1023&u)}}else o+=String.fromCharCode((31&a)<<6|s)}else o+=String.fromCharCode(a)}return o}(y,e,t):""}var g,m,y,v,b,_,w;"undefined"!=typeof TextDecoder&&new TextDecoder("utf-16le");function x(e,t){return e%t>0&&(e+=t-e%t),e}function M(e){g=e,n.HEAP8=m=new Int8Array(e),n.HEAP16=v=new Int16Array(e),n.HEAP32=b=new Int32Array(e),n.HEAPU8=y=new Uint8Array(e),n.HEAPU16=new Uint16Array(e),n.HEAPU32=new Uint32Array(e),n.HEAPF32=_=new Float32Array(e),n.HEAPF64=w=new Float64Array(e)}var E=n.TOTAL_MEMORY||33554432;function O(e){for(;e.length>0;){var t=e.shift();if("function"!=typeof t){var r=t.func;"number"==typeof r?void 0===t.arg?n.dynCall_v(r):n.dynCall_vi(r,t.arg):r(void 0===t.arg?null:t.arg)}else t()}}E=(g=n.buffer?n.buffer:new ArrayBuffer(E)).byteLength,M(g),b[6004]=5266928;var S=[],T=[],C=[],L=[];var P=Math.abs,I=Math.ceil,D=Math.floor,k=Math.min,R=0,j=null,F=null;n.preloadedImages={},n.preloadedAudios={};var N,B,z=null,U="data:application/octet-stream;base64,";function H(e){return String.prototype.startsWith?e.startsWith(U):0===e.indexOf(U)}z="data:application/octet-stream;base64,AAAAAAAAAAACAAAAAwAAAAEAAAAFAAAABAAAAAYAAAAAAAAAAAAAAAAAAAABAAAAAgAAAAMAAAAEAAAABQAAAAYAAAABAAAABAAAAAMAAAAGAAAABQAAAAIAAAAAAAAAAgAAAAMAAAABAAAABAAAAAYAAAAAAAAABQAAAAMAAAAGAAAABAAAAAUAAAAAAAAAAQAAAAIAAAAEAAAABQAAAAYAAAAAAAAAAgAAAAMAAAABAAAABQAAAAIAAAAAAAAAAQAAAAMAAAAGAAAABAAAAAYAAAAAAAAABQAAAAIAAAABAAAABAAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAQAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAgAAAAMAAAAAAAAAAAAAAAIAAAAAAAAAAQAAAAMAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAEAAAABgAAAAAAAAAFAAAAAAAAAAAAAAAEAAAABQAAAAAAAAAAAAAAAAAAAAIAAAAAAAAABgAAAAAAAAAGAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAACAAAAAwAAAAQAAAAFAAAABgAAAAEAAAACAAAAAwAAAAQAAAAFAAAABgAAAAAAAAACAAAAAwAAAAQAAAAFAAAABgAAAAAAAAABAAAAAwAAAAQAAAAFAAAABgAAAAAAAAABAAAAAgAAAAQAAAAFAAAABgAAAAAAAAABAAAAAgAAAAMAAAAFAAAABgAAAAAAAAABAAAAAgAAAAMAAAAEAAAABgAAAAAAAAABAAAAAgAAAAMAAAAEAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAADAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAACAAAAAgAAAAAAAAAAAAAABgAAAAAAAAADAAAAAgAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAUAAAAEAAAAAAAAAAEAAAAAAAAAAAAAAAUAAAAFAAAAAAAAAAAAAAAAAAAABgAAAAAAAAAEAAAAAAAAAAYAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAUAAAACAAAABAAAAAMAAAAIAAAAAQAAAAcAAAAGAAAACQAAAAAAAAADAAAAAgAAAAIAAAAGAAAACgAAAAsAAAAAAAAAAQAAAAUAAAADAAAADQAAAAEAAAAHAAAABAAAAAwAAAAAAAAABAAAAH8AAAAPAAAACAAAAAMAAAAAAAAADAAAAAUAAAACAAAAEgAAAAoAAAAIAAAAAAAAABAAAAAGAAAADgAAAAsAAAARAAAAAQAAAAkAAAACAAAABwAAABUAAAAJAAAAEwAAAAMAAAANAAAAAQAAAAgAAAAFAAAAFgAAABAAAAAEAAAAAAAAAA8AAAAJAAAAEwAAAA4AAAAUAAAAAQAAAAcAAAAGAAAACgAAAAsAAAAYAAAAFwAAAAUAAAACAAAAEgAAAAsAAAARAAAAFwAAABkAAAACAAAABgAAAAoAAAAMAAAAHAAAAA0AAAAaAAAABAAAAA8AAAADAAAADQAAABoAAAAVAAAAHQAAAAMAAAAMAAAABwAAAA4AAAB/AAAAEQAAABsAAAAJAAAAFAAAAAYAAAAPAAAAFgAAABwAAAAfAAAABAAAAAgAAAAMAAAAEAAAABIAAAAhAAAAHgAAAAgAAAAFAAAAFgAAABEAAAALAAAADgAAAAYAAAAjAAAAGQAAABsAAAASAAAAGAAAAB4AAAAgAAAABQAAAAoAAAAQAAAAEwAAACIAAAAUAAAAJAAAAAcAAAAVAAAACQAAABQAAAAOAAAAEwAAAAkAAAAoAAAAGwAAACQAAAAVAAAAJgAAABMAAAAiAAAADQAAAB0AAAAHAAAAFgAAABAAAAApAAAAIQAAAA8AAAAIAAAAHwAAABcAAAAYAAAACwAAAAoAAAAnAAAAJQAAABkAAAAYAAAAfwAAACAAAAAlAAAACgAAABcAAAASAAAAGQAAABcAAAARAAAACwAAAC0AAAAnAAAAIwAAABoAAAAqAAAAHQAAACsAAAAMAAAAHAAAAA0AAAAbAAAAKAAAACMAAAAuAAAADgAAABQAAAARAAAAHAAAAB8AAAAqAAAALAAAAAwAAAAPAAAAGgAAAB0AAAArAAAAJgAAAC8AAAANAAAAGgAAABUAAAAeAAAAIAAAADAAAAAyAAAAEAAAABIAAAAhAAAAHwAAACkAAAAsAAAANQAAAA8AAAAWAAAAHAAAACAAAAAeAAAAGAAAABIAAAA0AAAAMgAAACUAAAAhAAAAHgAAADEAAAAwAAAAFgAAABAAAAApAAAAIgAAABMAAAAmAAAAFQAAADYAAAAkAAAAMwAAACMAAAAuAAAALQAAADgAAAARAAAAGwAAABkAAAAkAAAAFAAAACIAAAATAAAANwAAACgAAAA2AAAAJQAAACcAAAA0AAAAOQAAABgAAAAXAAAAIAAAACYAAAB/AAAAIgAAADMAAAAdAAAALwAAABUAAAAnAAAAJQAAABkAAAAXAAAAOwAAADkAAAAtAAAAKAAAABsAAAAkAAAAFAAAADwAAAAuAAAANwAAACkAAAAxAAAANQAAAD0AAAAWAAAAIQAAAB8AAAAqAAAAOgAAACsAAAA+AAAAHAAAACwAAAAaAAAAKwAAAD4AAAAvAAAAQAAAABoAAAAqAAAAHQAAACwAAAA1AAAAOgAAAEEAAAAcAAAAHwAAACoAAAAtAAAAJwAAACMAAAAZAAAAPwAAADsAAAA4AAAALgAAADwAAAA4AAAARAAAABsAAAAoAAAAIwAAAC8AAAAmAAAAKwAAAB0AAABFAAAAMwAAAEAAAAAwAAAAMQAAAB4AAAAhAAAAQwAAAEIAAAAyAAAAMQAAAH8AAAA9AAAAQgAAACEAAAAwAAAAKQAAADIAAAAwAAAAIAAAAB4AAABGAAAAQwAAADQAAAAzAAAARQAAADYAAABHAAAAJgAAAC8AAAAiAAAANAAAADkAAABGAAAASgAAACAAAAAlAAAAMgAAADUAAAA9AAAAQQAAAEsAAAAfAAAAKQAAACwAAAA2AAAARwAAADcAAABJAAAAIgAAADMAAAAkAAAANwAAACgAAAA2AAAAJAAAAEgAAAA8AAAASQAAADgAAABEAAAAPwAAAE0AAAAjAAAALgAAAC0AAAA5AAAAOwAAAEoAAABOAAAAJQAAACcAAAA0AAAAOgAAAH8AAAA+AAAATAAAACwAAABBAAAAKgAAADsAAAA/AAAATgAAAE8AAAAnAAAALQAAADkAAAA8AAAASAAAAEQAAABQAAAAKAAAADcAAAAuAAAAPQAAADUAAAAxAAAAKQAAAFEAAABLAAAAQgAAAD4AAAArAAAAOgAAACoAAABSAAAAQAAAAEwAAAA/AAAAfwAAADgAAAAtAAAATwAAADsAAABNAAAAQAAAAC8AAAA+AAAAKwAAAFQAAABFAAAAUgAAAEEAAAA6AAAANQAAACwAAABWAAAATAAAAEsAAABCAAAAQwAAAFEAAABVAAAAMQAAADAAAAA9AAAAQwAAAEIAAAAyAAAAMAAAAFcAAABVAAAARgAAAEQAAAA4AAAAPAAAAC4AAABaAAAATQAAAFAAAABFAAAAMwAAAEAAAAAvAAAAWQAAAEcAAABUAAAARgAAAEMAAAA0AAAAMgAAAFMAAABXAAAASgAAAEcAAABZAAAASQAAAFsAAAAzAAAARQAAADYAAABIAAAAfwAAAEkAAAA3AAAAUAAAADwAAABYAAAASQAAAFsAAABIAAAAWAAAADYAAABHAAAANwAAAEoAAABOAAAAUwAAAFwAAAA0AAAAOQAAAEYAAABLAAAAQQAAAD0AAAA1AAAAXgAAAFYAAABRAAAATAAAAFYAAABSAAAAYAAAADoAAABBAAAAPgAAAE0AAAA/AAAARAAAADgAAABdAAAATwAAAFoAAABOAAAASgAAADsAAAA5AAAAXwAAAFwAAABPAAAATwAAAE4AAAA/AAAAOwAAAF0AAABfAAAATQAAAFAAAABEAAAASAAAADwAAABjAAAAWgAAAFgAAABRAAAAVQAAAF4AAABlAAAAPQAAAEIAAABLAAAAUgAAAGAAAABUAAAAYgAAAD4AAABMAAAAQAAAAFMAAAB/AAAASgAAAEYAAABkAAAAVwAAAFwAAABUAAAARQAAAFIAAABAAAAAYQAAAFkAAABiAAAAVQAAAFcAAABlAAAAZgAAAEIAAABDAAAAUQAAAFYAAABMAAAASwAAAEEAAABoAAAAYAAAAF4AAABXAAAAUwAAAGYAAABkAAAAQwAAAEYAAABVAAAAWAAAAEgAAABbAAAASQAAAGMAAABQAAAAaQAAAFkAAABhAAAAWwAAAGcAAABFAAAAVAAAAEcAAABaAAAATQAAAFAAAABEAAAAagAAAF0AAABjAAAAWwAAAEkAAABZAAAARwAAAGkAAABYAAAAZwAAAFwAAABTAAAATgAAAEoAAABsAAAAZAAAAF8AAABdAAAATwAAAFoAAABNAAAAbQAAAF8AAABqAAAAXgAAAFYAAABRAAAASwAAAGsAAABoAAAAZQAAAF8AAABcAAAATwAAAE4AAABtAAAAbAAAAF0AAABgAAAAaAAAAGIAAABuAAAATAAAAFYAAABSAAAAYQAAAH8AAABiAAAAVAAAAGcAAABZAAAAbwAAAGIAAABuAAAAYQAAAG8AAABSAAAAYAAAAFQAAABjAAAAUAAAAGkAAABYAAAAagAAAFoAAABxAAAAZAAAAGYAAABTAAAAVwAAAGwAAAByAAAAXAAAAGUAAABmAAAAawAAAHAAAABRAAAAVQAAAF4AAABmAAAAZQAAAFcAAABVAAAAcgAAAHAAAABkAAAAZwAAAFsAAABhAAAAWQAAAHQAAABpAAAAbwAAAGgAAABrAAAAbgAAAHMAAABWAAAAXgAAAGAAAABpAAAAWAAAAGcAAABbAAAAcQAAAGMAAAB0AAAAagAAAF0AAABjAAAAWgAAAHUAAABtAAAAcQAAAGsAAAB/AAAAZQAAAF4AAABzAAAAaAAAAHAAAABsAAAAZAAAAF8AAABcAAAAdgAAAHIAAABtAAAAbQAAAGwAAABdAAAAXwAAAHUAAAB2AAAAagAAAG4AAABiAAAAaAAAAGAAAAB3AAAAbwAAAHMAAABvAAAAYQAAAG4AAABiAAAAdAAAAGcAAAB3AAAAcAAAAGsAAABmAAAAZQAAAHgAAABzAAAAcgAAAHEAAABjAAAAdAAAAGkAAAB1AAAAagAAAHkAAAByAAAAcAAAAGQAAABmAAAAdgAAAHgAAABsAAAAcwAAAG4AAABrAAAAaAAAAHgAAAB3AAAAcAAAAHQAAABnAAAAdwAAAG8AAABxAAAAaQAAAHkAAAB1AAAAfwAAAG0AAAB2AAAAcQAAAHkAAABqAAAAdgAAAHgAAABsAAAAcgAAAHUAAAB5AAAAbQAAAHcAAABvAAAAcwAAAG4AAAB5AAAAdAAAAHgAAAB4AAAAcwAAAHIAAABwAAAAeQAAAHcAAAB2AAAAeQAAAHQAAAB4AAAAdwAAAHUAAABxAAAAdgAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAEAAAAFAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAABAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAIAAAAFAAAAAQAAAAAAAAD/////AQAAAAAAAAADAAAABAAAAAIAAAAAAAAAAAAAAAEAAAAAAAAAAQAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAwAAAAUAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAUAAAABAAAAAAAAAAAAAAABAAAAAwAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAMAAAAAAAAAAAAAAAEAAAAAAAAAAwAAAAMAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAMAAAAFAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAABAAAAAAAAAAEAAAAAAAAA/////wMAAAAAAAAABQAAAAIAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAQAAAAFAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAwAAAAMAAAADAAAAAwAAAAAAAAADAAAAAAAAAAAAAAAAAAAAAwAAAAUAAAAFAAAAAAAAAAAAAAADAAAAAwAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAAMAAAADAAAAAAAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAAUAAAAFAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAABAAAAAAAAAAEAAAAAAAAAAwAAAAMAAAADAAAAAAAAAAMAAAAAAAAAAAAAAP////8DAAAAAAAAAAUAAAACAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAAAAAAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAMAAAAAAAAAAAAAAAAAAAADAAAAAwAAAAAAAAAAAAAAAQAAAAAAAAABAAAAAAAAAAEAAAAAAAAAAAAAAAEAAAADAAAAAAAAAAAAAAABAAAAAAAAAAMAAAADAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAwAAAAMAAAADAAAAAwAAAAAAAAADAAAAAAAAAAAAAAABAAAAAwAAAAAAAAAAAAAAAQAAAAAAAAADAAAAAwAAAAMAAAADAAAAAAAAAAMAAAAAAAAAAAAAAAMAAAAAAAAAAwAAAAAAAAADAAAAAAAAAAAAAAAAAAAAAwAAAAAAAAAAAAAAAwAAAAAAAAADAAAAAAAAAAAAAAAAAAAAAwAAAAMAAAAAAAAA/////wMAAAAAAAAABQAAAAIAAAAAAAAAAAAAAAMAAAAAAAAAAAAAAAMAAAADAAAAAAAAAAAAAAADAAAAAAAAAAAAAAADAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAADAAAABQAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAAUAAAAFAAAAAAAAAAAAAAADAAAAAwAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAADAAAAAAAAAAAAAAABAAAAAAAAAAAAAAADAAAAAAAAAAAAAAADAAAAAwAAAAAAAAAAAAAAAAAAAAMAAAAAAAAAAwAAAAAAAAAAAAAAAwAAAAMAAAADAAAAAAAAAAMAAAAAAAAAAAAAAAMAAAADAAAAAwAAAAAAAAADAAAAAAAAAAAAAAD/////AwAAAAAAAAAFAAAAAgAAAAAAAAAAAAAAAAAAAAAAAAADAAAAAAAAAAAAAAADAAAAAAAAAAMAAAAAAAAAAAAAAAAAAAADAAAAAwAAAAAAAAAAAAAAAwAAAAAAAAADAAAAAAAAAAMAAAAAAAAAAwAAAAMAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADAAAAAAAAAAMAAAAAAAAAAwAAAAAAAAAAAAAAAwAAAAAAAAAAAAAAAwAAAAMAAAAAAAAAAwAAAAMAAAADAAAAAAAAAAAAAAADAAAAAAAAAAAAAAAAAAAAAwAAAAAAAAADAAAAAAAAAAAAAAD/////AwAAAAAAAAAFAAAAAgAAAAAAAAAAAAAAAwAAAAMAAAADAAAAAwAAAAMAAAAAAAAAAAAAAAMAAAADAAAAAwAAAAMAAAADAAAAAAAAAAAAAAADAAAAAwAAAAMAAAADAAAAAAAAAAMAAAAAAAAAAwAAAAMAAAADAAAAAwAAAAAAAAADAAAAAAAAAP////8DAAAAAAAAAAUAAAACAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAAAAAAAAAMAAAAAAAAAAwAAAAMAAAADAAAAAAAAAAMAAAAAAAAAAAAAAAMAAAAAAAAAAAAAAAAAAAADAAAAAwAAAAAAAAADAAAAAAAAAAAAAAADAAAAAwAAAAAAAAAAAAAAAwAAAAMAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAAAAAAAAAMAAAADAAAAAAAAAAAAAAAAAAAAAwAAAAAAAAAAAAAAAwAAAAMAAAAAAAAAAAAAAAAAAAADAAAAAAAAAAMAAAAAAAAAAAAAAP////8DAAAAAAAAAAUAAAACAAAAAAAAAAAAAAADAAAAAwAAAAMAAAAAAAAAAAAAAAMAAAAAAAAAAwAAAAMAAAADAAAAAAAAAAAAAAADAAAAAAAAAAAAAAAAAAAAAwAAAAAAAAAAAAAAAwAAAAAAAAADAAAAAAAAAAAAAAAAAAAAAwAAAAMAAAAAAAAAAAAAAAAAAAADAAAAAAAAAAUAAAAAAAAAAAAAAAMAAAADAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAMAAAABAAAAAAAAAAEAAAAAAAAAAAAAAAEAAAADAAAAAQAAAAAAAAABAAAAAAAAAAAAAAADAAAAAAAAAAMAAAAAAAAAAwAAAAAAAAAAAAAAAwAAAAAAAAADAAAAAAAAAAMAAAAAAAAA/////wMAAAAAAAAABQAAAAIAAAAAAAAAAAAAAAAAAAADAAAAAAAAAAAAAAADAAAAAwAAAAAAAAAAAAAAAAAAAAMAAAAAAAAAAwAAAAAAAAAAAAAAAwAAAAAAAAAAAAAAAwAAAAMAAAAAAAAAAAAAAAMAAAADAAAAAwAAAAMAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAAABQAAAAAAAAAAAAAAAwAAAAMAAAADAAAAAwAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAADAAAAAwAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADAAAAAAAAAAUAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAUAAAAFAAAAAAAAAAAAAAAAAAAAAwAAAAAAAAAAAAAAAwAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAwAAAAAAAAADAAAAAAAAAAAAAAD/////AwAAAAAAAAAFAAAAAgAAAAAAAAAAAAAAAwAAAAMAAAADAAAAAAAAAAAAAAADAAAAAAAAAAUAAAAAAAAAAAAAAAUAAAAFAAAAAAAAAAAAAAAAAAAAAQAAAAMAAAABAAAAAAAAAAEAAAAAAAAAAwAAAAMAAAADAAAAAAAAAAAAAAADAAAAAAAAAAMAAAADAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAMAAAABAAAAAAAAAAEAAAAAAAAAAwAAAAMAAAADAAAAAwAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAADAAAABQAAAAEAAAAAAAAA/////wMAAAAAAAAABQAAAAIAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAUAAAAFAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAEAAAABQAAAAEAAAAAAAAAAwAAAAMAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAgAAAAUAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAMAAAABAAAAAAAAAAEAAAAAAAAABQAAAAAAAAAAAAAABQAAAAUAAAAAAAAAAAAAAP////8BAAAAAAAAAAMAAAAEAAAAAgAAAAAAAAAAAAAAAQAAAAAAAAAAAAAABQAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAUAAAAAAAAAAAAAAAUAAAAFAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAABAAAABQAAAAEAAAAAAAAAAAAAAAEAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAAAAQAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAAAAAAAAAAAAAQAAAP//////////AQAAAAEAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAABAAAAAQAAAAAAAAAAAAAAAAAAAAMAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADAAAAAQAAAAEAAAAAAAAAAAAAAAAAAAAAAAAACwAAAAIAAAAAAAAAAAAAAAEAAAACAAAABgAAAAQAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABgAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAACAAAAAAAAAAEAAAABAAAAAAAAAAAAAAAAAAAABwAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAIAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAEAAAAAAAAAAAAAAAAAAAAAAAAABgAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAoAAAACAAAAAAAAAAAAAAABAAAAAQAAAAUAAAAGAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAsAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAQAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAEAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAHAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAACwAAAAEAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAKAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADAAAAAIAAAAAAAAAAAAAAAEAAAADAAAABwAAAAYAAAABAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAHAAAAAQAAAAAAAAABAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAMAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAADAAAAAAAAAAEAAAABAAAAAAAAAAAAAAAAAAAABAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAYAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAALAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAOAAAAAgAAAAAAAAAAAAAAAQAAAAAAAAAJAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAKAAAAAQAAAAEAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAABAAAAAQAAAAAAAAAAAAAAAAAAAAwAAAABAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAHAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACwAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAoAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAANAAAAAgAAAAAAAAAAAAAAAQAAAAQAAAAIAAAACgAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAsAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAJAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAACAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAYAAAACAAAAAAAAAAAAAAABAAAACwAAAA8AAAAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAA4AAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAQAAAAAAAAABAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAABAAAAAQAAAAAAAAAAAAAAAAAAAAgAAAABAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAFAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcAAAACAAAAAAAAAAAAAAABAAAADAAAABAAAAAMAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAACgAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAkAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAANAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAA8AAAAAAAAAAQAAAAEAAAAAAAAAAAAAAAAAAAAPAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAA4AAAABAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAANAAAAAQAAAAEAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAIAAAAAAAAAAAAAAAEAAAAKAAAAEwAAAAgAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACQAAAAEAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAA4AAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAARAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAADAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAARAAAAAAAAAAEAAAABAAAAAAAAAAAAAAAAAAAADwAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAABAAAAABAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAJAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA0AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAAAgAAAAAAAAAAAAAAAQAAAA0AAAARAAAADQAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAABEAAAABAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAATAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAABMAAAAAAAAAAQAAAAEAAAAAAAAAAAAAAAAAAAARAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAADQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAABEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACQAAAAIAAAAAAAAAAAAAAAEAAAAOAAAAEgAAAA8AAAABAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAPAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEgAAAAAAAAABAAAAAQAAAAAAAAAAAAAAAAAAABIAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAATAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAEQAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAASAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAEgAAAAEAAAAAAAAAAQAAAAAAAAAAAAAAAAAAABMAAAACAAAAAAAAAAAAAAABAAAA//////////8TAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABMAAAABAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAASAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAABIAAAAAAAAAGAAAAAAAAAAhAAAAAAAAAB4AAAAAAAAAIAAAAAMAAAAxAAAAAQAAADAAAAADAAAAMgAAAAMAAAAIAAAAAAAAAAUAAAAFAAAACgAAAAUAAAAWAAAAAAAAABAAAAAAAAAAEgAAAAAAAAApAAAAAQAAACEAAAAAAAAAHgAAAAAAAAAEAAAAAAAAAAAAAAAFAAAAAgAAAAUAAAAPAAAAAQAAAAgAAAAAAAAABQAAAAUAAAAfAAAAAQAAABYAAAAAAAAAEAAAAAAAAAACAAAAAAAAAAYAAAAAAAAADgAAAAAAAAAKAAAAAAAAAAsAAAAAAAAAEQAAAAMAAAAYAAAAAQAAABcAAAADAAAAGQAAAAMAAAAAAAAAAAAAAAEAAAAFAAAACQAAAAUAAAAFAAAAAAAAAAIAAAAAAAAABgAAAAAAAAASAAAAAQAAAAoAAAAAAAAACwAAAAAAAAAEAAAAAQAAAAMAAAAFAAAABwAAAAUAAAAIAAAAAQAAAAAAAAAAAAAAAQAAAAUAAAAQAAAAAQAAAAUAAAAAAAAAAgAAAAAAAAAHAAAAAAAAABUAAAAAAAAAJgAAAAAAAAAJAAAAAAAAABMAAAAAAAAAIgAAAAMAAAAOAAAAAQAAABQAAAADAAAAJAAAAAMAAAADAAAAAAAAAA0AAAAFAAAAHQAAAAUAAAABAAAAAAAAAAcAAAAAAAAAFQAAAAAAAAAGAAAAAQAAAAkAAAAAAAAAEwAAAAAAAAAEAAAAAgAAAAwAAAAFAAAAGgAAAAUAAAAAAAAAAQAAAAMAAAAAAAAADQAAAAUAAAACAAAAAQAAAAEAAAAAAAAABwAAAAAAAAAaAAAAAAAAACoAAAAAAAAAOgAAAAAAAAAdAAAAAAAAACsAAAAAAAAAPgAAAAMAAAAmAAAAAQAAAC8AAAADAAAAQAAAAAMAAAAMAAAAAAAAABwAAAAFAAAALAAAAAUAAAANAAAAAAAAABoAAAAAAAAAKgAAAAAAAAAVAAAAAQAAAB0AAAAAAAAAKwAAAAAAAAAEAAAAAwAAAA8AAAAFAAAAHwAAAAUAAAADAAAAAQAAAAwAAAAAAAAAHAAAAAUAAAAHAAAAAQAAAA0AAAAAAAAAGgAAAAAAAAAfAAAAAAAAACkAAAAAAAAAMQAAAAAAAAAsAAAAAAAAADUAAAAAAAAAPQAAAAMAAAA6AAAAAQAAAEEAAAADAAAASwAAAAMAAAAPAAAAAAAAABYAAAAFAAAAIQAAAAUAAAAcAAAAAAAAAB8AAAAAAAAAKQAAAAAAAAAqAAAAAQAAACwAAAAAAAAANQAAAAAAAAAEAAAABAAAAAgAAAAFAAAAEAAAAAUAAAAMAAAAAQAAAA8AAAAAAAAAFgAAAAUAAAAaAAAAAQAAABwAAAAAAAAAHwAAAAAAAAAyAAAAAAAAADAAAAAAAAAAMQAAAAMAAAAgAAAAAAAAAB4AAAADAAAAIQAAAAMAAAAYAAAAAwAAABIAAAADAAAAEAAAAAMAAABGAAAAAAAAAEMAAAAAAAAAQgAAAAMAAAA0AAAAAwAAADIAAAAAAAAAMAAAAAAAAAAlAAAAAwAAACAAAAAAAAAAHgAAAAMAAABTAAAAAAAAAFcAAAADAAAAVQAAAAMAAABKAAAAAwAAAEYAAAAAAAAAQwAAAAAAAAA5AAAAAQAAADQAAAADAAAAMgAAAAAAAAAZAAAAAAAAABcAAAAAAAAAGAAAAAMAAAARAAAAAAAAAAsAAAADAAAACgAAAAMAAAAOAAAAAwAAAAYAAAADAAAAAgAAAAMAAAAtAAAAAAAAACcAAAAAAAAAJQAAAAMAAAAjAAAAAwAAABkAAAAAAAAAFwAAAAAAAAAbAAAAAwAAABEAAAAAAAAACwAAAAMAAAA/AAAAAAAAADsAAAADAAAAOQAAAAMAAAA4AAAAAwAAAC0AAAAAAAAAJwAAAAAAAAAuAAAAAwAAACMAAAADAAAAGQAAAAAAAAAkAAAAAAAAABQAAAAAAAAADgAAAAMAAAAiAAAAAAAAABMAAAADAAAACQAAAAMAAAAmAAAAAwAAABUAAAADAAAABwAAAAMAAAA3AAAAAAAAACgAAAAAAAAAGwAAAAMAAAA2AAAAAwAAACQAAAAAAAAAFAAAAAAAAAAzAAAAAwAAACIAAAAAAAAAEwAAAAMAAABIAAAAAAAAADwAAAADAAAALgAAAAMAAABJAAAAAwAAADcAAAAAAAAAKAAAAAAAAABHAAAAAwAAADYAAAADAAAAJAAAAAAAAABAAAAAAAAAAC8AAAAAAAAAJgAAAAMAAAA+AAAAAAAAACsAAAADAAAAHQAAAAMAAAA6AAAAAwAAACoAAAADAAAAGgAAAAMAAABUAAAAAAAAAEUAAAAAAAAAMwAAAAMAAABSAAAAAwAAAEAAAAAAAAAALwAAAAAAAABMAAAAAwAAAD4AAAAAAAAAKwAAAAMAAABhAAAAAAAAAFkAAAADAAAARwAAAAMAAABiAAAAAwAAAFQAAAAAAAAARQAAAAAAAABgAAAAAwAAAFIAAAADAAAAQAAAAAAAAABLAAAAAAAAAEEAAAAAAAAAOgAAAAMAAAA9AAAAAAAAADUAAAADAAAALAAAAAMAAAAxAAAAAwAAACkAAAADAAAAHwAAAAMAAABeAAAAAAAAAFYAAAAAAAAATAAAAAMAAABRAAAAAwAAAEsAAAAAAAAAQQAAAAAAAABCAAAAAwAAAD0AAAAAAAAANQAAAAMAAABrAAAAAAAAAGgAAAADAAAAYAAAAAMAAABlAAAAAwAAAF4AAAAAAAAAVgAAAAAAAABVAAAAAwAAAFEAAAADAAAASwAAAAAAAAA5AAAAAAAAADsAAAAAAAAAPwAAAAMAAABKAAAAAAAAAE4AAAADAAAATwAAAAMAAABTAAAAAwAAAFwAAAADAAAAXwAAAAMAAAAlAAAAAAAAACcAAAADAAAALQAAAAMAAAA0AAAAAAAAADkAAAAAAAAAOwAAAAAAAABGAAAAAwAAAEoAAAAAAAAATgAAAAMAAAAYAAAAAAAAABcAAAADAAAAGQAAAAMAAAAgAAAAAwAAACUAAAAAAAAAJwAAAAMAAAAyAAAAAwAAADQAAAAAAAAAOQAAAAAAAAAuAAAAAAAAADwAAAAAAAAASAAAAAMAAAA4AAAAAAAAAEQAAAADAAAAUAAAAAMAAAA/AAAAAwAAAE0AAAADAAAAWgAAAAMAAAAbAAAAAAAAACgAAAADAAAANwAAAAMAAAAjAAAAAAAAAC4AAAAAAAAAPAAAAAAAAAAtAAAAAwAAADgAAAAAAAAARAAAAAMAAAAOAAAAAAAAABQAAAADAAAAJAAAAAMAAAARAAAAAwAAABsAAAAAAAAAKAAAAAMAAAAZAAAAAwAAACMAAAAAAAAALgAAAAAAAABHAAAAAAAAAFkAAAAAAAAAYQAAAAMAAABJAAAAAAAAAFsAAAADAAAAZwAAAAMAAABIAAAAAwAAAFgAAAADAAAAaQAAAAMAAAAzAAAAAAAAAEUAAAADAAAAVAAAAAMAAAA2AAAAAAAAAEcAAAAAAAAAWQAAAAAAAAA3AAAAAwAAAEkAAAAAAAAAWwAAAAMAAAAmAAAAAAAAAC8AAAADAAAAQAAAAAMAAAAiAAAAAwAAADMAAAAAAAAARQAAAAMAAAAkAAAAAwAAADYAAAAAAAAARwAAAAAAAABgAAAAAAAAAGgAAAAAAAAAawAAAAMAAABiAAAAAAAAAG4AAAADAAAAcwAAAAMAAABhAAAAAwAAAG8AAAADAAAAdwAAAAMAAABMAAAAAAAAAFYAAAADAAAAXgAAAAMAAABSAAAAAAAAAGAAAAAAAAAAaAAAAAAAAABUAAAAAwAAAGIAAAAAAAAAbgAAAAMAAAA6AAAAAAAAAEEAAAADAAAASwAAAAMAAAA+AAAAAwAAAEwAAAAAAAAAVgAAAAMAAABAAAAAAwAAAFIAAAAAAAAAYAAAAAAAAABVAAAAAAAAAFcAAAAAAAAAUwAAAAMAAABlAAAAAAAAAGYAAAADAAAAZAAAAAMAAABrAAAAAwAAAHAAAAADAAAAcgAAAAMAAABCAAAAAAAAAEMAAAADAAAARgAAAAMAAABRAAAAAAAAAFUAAAAAAAAAVwAAAAAAAABeAAAAAwAAAGUAAAAAAAAAZgAAAAMAAAAxAAAAAAAAADAAAAADAAAAMgAAAAMAAAA9AAAAAwAAAEIAAAAAAAAAQwAAAAMAAABLAAAAAwAAAFEAAAAAAAAAVQAAAAAAAABfAAAAAAAAAFwAAAAAAAAAUwAAAAAAAABPAAAAAAAAAE4AAAAAAAAASgAAAAMAAAA/AAAAAQAAADsAAAADAAAAOQAAAAMAAABtAAAAAAAAAGwAAAAAAAAAZAAAAAUAAABdAAAAAQAAAF8AAAAAAAAAXAAAAAAAAABNAAAAAQAAAE8AAAAAAAAATgAAAAAAAAB1AAAABAAAAHYAAAAFAAAAcgAAAAUAAABqAAAAAQAAAG0AAAAAAAAAbAAAAAAAAABaAAAAAQAAAF0AAAABAAAAXwAAAAAAAABaAAAAAAAAAE0AAAAAAAAAPwAAAAAAAABQAAAAAAAAAEQAAAAAAAAAOAAAAAMAAABIAAAAAQAAADwAAAADAAAALgAAAAMAAABqAAAAAAAAAF0AAAAAAAAATwAAAAUAAABjAAAAAQAAAFoAAAAAAAAATQAAAAAAAABYAAAAAQAAAFAAAAAAAAAARAAAAAAAAAB1AAAAAwAAAG0AAAAFAAAAXwAAAAUAAABxAAAAAQAAAGoAAAAAAAAAXQAAAAAAAABpAAAAAQAAAGMAAAABAAAAWgAAAAAAAABpAAAAAAAAAFgAAAAAAAAASAAAAAAAAABnAAAAAAAAAFsAAAAAAAAASQAAAAMAAABhAAAAAQAAAFkAAAADAAAARwAAAAMAAABxAAAAAAAAAGMAAAAAAAAAUAAAAAUAAAB0AAAAAQAAAGkAAAAAAAAAWAAAAAAAAABvAAAAAQAAAGcAAAAAAAAAWwAAAAAAAAB1AAAAAgAAAGoAAAAFAAAAWgAAAAUAAAB5AAAAAQAAAHEAAAAAAAAAYwAAAAAAAAB3AAAAAQAAAHQAAAABAAAAaQAAAAAAAAB3AAAAAAAAAG8AAAAAAAAAYQAAAAAAAABzAAAAAAAAAG4AAAAAAAAAYgAAAAMAAABrAAAAAQAAAGgAAAADAAAAYAAAAAMAAAB5AAAAAAAAAHQAAAAAAAAAZwAAAAUAAAB4AAAAAQAAAHcAAAAAAAAAbwAAAAAAAABwAAAAAQAAAHMAAAAAAAAAbgAAAAAAAAB1AAAAAQAAAHEAAAAFAAAAaQAAAAUAAAB2AAAAAQAAAHkAAAAAAAAAdAAAAAAAAAByAAAAAQAAAHgAAAABAAAAdwAAAAAAAAByAAAAAAAAAHAAAAAAAAAAawAAAAAAAABkAAAAAAAAAGYAAAAAAAAAZQAAAAMAAABTAAAAAQAAAFcAAAADAAAAVQAAAAMAAAB2AAAAAAAAAHgAAAAAAAAAcwAAAAUAAABsAAAAAQAAAHIAAAAAAAAAcAAAAAAAAABcAAAAAQAAAGQAAAAAAAAAZgAAAAAAAAB1AAAAAAAAAHkAAAAFAAAAdwAAAAUAAABtAAAAAQAAAHYAAAAAAAAAeAAAAAAAAABfAAAAAQAAAGwAAAABAAAAcgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAEAAAABAAAAAAAAAAAAAAABAAAAAAAAAAEAAAABAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAB+ogX28rbpPxqumpJv+fM/165tC4ns9D+XaEnTqUsEQFrOtNlC4PA/3U+0XG6P9b9TdUUBxTTjP4PUp8ex1ty/B1rD/EN43z+lcDi6LLrZP/a45NWEHMY/oJ5ijLDZ+j/xw3rjxWPjP2B8A46ioQdAotff3wla2z+FMSpA1jj+v6b5Y1mtPbS/cIu8K0F457/2esiyJpDNv98k5Ts2NeA/pvljWa09tD88ClUJ60MDQPZ6yLImkM0/4ONKxa0UBcD2uOTVhBzGv5G7JRxGave/8cN648Vj47+HCwtkjAXIv6LX398JWtu/qyheaCAL9D9TdUUBxTTjv4gyTxslhwVAB1rD/EN4378EH/28teoFwH6iBfbytum/F6ztFYdK/r/Xrm0Liez0vwcS6wNGWeO/Ws602ULg8L9TCtRLiLT8P8pi5RexJsw/BlIKPVwR5T95Wyu0/QjnP5PjoT7YYcu/mBhKZ6zrwj8wRYS7NebuP3qW6geh+Ls/SLrixebL3r+pcyymN9XrPwmkNHp7xec/GWNMZVAA17+82s+x2BLiPwn2ytbJ9ek/LgEH1sMS1j8yp/2LhTfeP+SnWwtQBbu/d38gkp5X7z8ytsuHaADGPzUYObdf1+m/7IauECWhwz+cjSACjzniP76Z+wUhN9K/1+GEKzup67+/GYr/04baPw6idWOvsuc/ZedTWsRa5b/EJQOuRzi0v/OncYhHPes/h49PixY53j+i8wWfC03Nvw2idWOvsue/ZedTWsRa5T/EJQOuRzi0P/KncYhHPeu/iY9PixY53r+i8wWfC03NP9anWwtQBbs/d38gkp5X778ytsuHaADGvzUYObdf1+k/74auECWhw7+cjSACjzniv8CZ+wUhN9I/1uGEKzup6z+/GYr/04bavwmkNHp7xee/F2NMZVAA1z+82s+x2BLivwr2ytbJ9em/KwEH1sMS1r8yp/2LhTfev81i5RexJsy/BlIKPVwR5b95Wyu0/Qjnv5DjoT7YYcs/nBhKZ6zrwr8wRYS7Nebuv3OW6geh+Lu/SLrixebL3j+pcyymN9Xrv8rHIFfWehZAMBwUdlo0DECTUc17EOb2PxpVB1SWChdAzjbhb9pTDUDQhmdvECX5P9FlMKCC9+g/IIAzjELgE0DajDngMv8GQFhWDmDPjNs/y1guLh96EkAxPi8k7DIEQJCc4URlhRhA3eLKKLwkEECqpNAyTBD/P6xpjXcDiwVAFtl//cQm4z+Ibt3XKiYTQM7mCLUb3QdAoM1t8yVv7D8aLZv2Nk8UQEAJPV5nQwxAtSsfTCoE9z9TPjXLXIIWQBVanC5W9AtAYM3d7Adm9j++5mQz1FoWQBUThyaVBghAwH5muQsV7T89Q1qv82MUQJoWGOfNuBdAzrkClkmwDkDQjKq77t37Py+g0dtitsE/ZwAMTwVPEUBojepluNwBQGYbtuW+t9w/HNWIJs6MEkDTNuQUSlgEQKxktPP5TcQ/ixbLB8JjEUCwuWjXMQYCQAS/R09FkRdAowpiZjhhDkB7LmlczD/7P01iQmhhsAVAnrtTwDy84z/Z6jfQ2TgTQChOCXMnWwpAhrW3daoz8z/HYJvVPI4VQLT3ik5FcA5Angi7LOZd+z+NNVzDy5gXQBXdvVTFUA1AYNMgOeYe+T8+qHXGCwkXQKQTOKwa5AJA8gFVoEMW0T+FwzJyttIRQAEAAAD/////BwAAAP////8xAAAA/////1cBAAD/////YQkAAP////+nQQAA/////5HLAQD/////95AMAP/////B9lcAAAAAAAAAAAAAAAAAAgAAAP////8OAAAA/////2IAAAD/////rgIAAP/////CEgAA/////06DAAD/////IpcDAP/////uIRkA/////4LtrwAAAAAAAAAAAAAAAAAAAAAAAgAAAP//////////AQAAAAMAAAD//////////////////////////////////////////////////////////////////////////wEAAAAAAAAAAgAAAP///////////////wMAAAD//////////////////////////////////////////////////////////////////////////wEAAAAAAAAAAgAAAP///////////////wMAAAD//////////////////////////////////////////////////////////////////////////wEAAAAAAAAAAgAAAP///////////////wMAAAD//////////////////////////////////////////////////////////wIAAAD//////////wEAAAAAAAAA/////////////////////wMAAAD/////////////////////////////////////////////////////AwAAAP////////////////////8AAAAA/////////////////////wEAAAD///////////////8CAAAA////////////////////////////////AwAAAP////////////////////8AAAAA////////////////AgAAAAEAAAD/////////////////////////////////////////////////////AwAAAP////////////////////8AAAAA////////////////AgAAAAEAAAD/////////////////////////////////////////////////////AwAAAP////////////////////8AAAAA////////////////AgAAAAEAAAD/////////////////////////////////////////////////////AwAAAP////////////////////8AAAAA////////////////AgAAAAEAAAD/////////////////////////////////////////////////////AQAAAAIAAAD///////////////8AAAAA/////////////////////wMAAAD/////////////////////////////////////////////////////AQAAAAIAAAD///////////////8AAAAA/////////////////////wMAAAD/////////////////////////////////////////////////////AQAAAAIAAAD///////////////8AAAAA/////////////////////wMAAAD/////////////////////////////////////////////////////AQAAAAIAAAD///////////////8AAAAA/////////////////////wMAAAD///////////////////////////////8CAAAA////////////////AQAAAP////////////////////8AAAAA/////////////////////wMAAAD/////////////////////////////////////////////////////AwAAAP////////////////////8AAAAAAQAAAP//////////AgAAAP//////////////////////////////////////////////////////////AwAAAP///////////////wIAAAAAAAAAAQAAAP//////////////////////////////////////////////////////////////////////////AwAAAP///////////////wIAAAAAAAAAAQAAAP//////////////////////////////////////////////////////////////////////////AwAAAP///////////////wIAAAAAAAAAAQAAAP//////////////////////////////////////////////////////////////////////////AwAAAAEAAAD//////////wIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAgAAAAAAAAACAAAAAQAAAAEAAAACAAAAAgAAAAAAAAAFAAAABQAAAAAAAAACAAAAAgAAAAMAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAAAAAAAAAIAAAABAAAAAgAAAAIAAAACAAAAAAAAAAUAAAAGAAAAAAAAAAIAAAACAAAAAwAAAAIAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAIAAAAAAAAAAgAAAAEAAAADAAAAAgAAAAIAAAAAAAAABQAAAAcAAAAAAAAAAgAAAAIAAAADAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAACAAAAAgAAAAAAAAACAAAAAQAAAAQAAAACAAAAAgAAAAAAAAAFAAAACAAAAAAAAAACAAAAAgAAAAMAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAACAAAAAAAAAAIAAAABAAAAAAAAAAIAAAACAAAAAAAAAAUAAAAJAAAAAAAAAAIAAAACAAAAAwAAAAUAAAAAAAAAAAAAAAAAAAAAAAAACgAAAAIAAAACAAAAAAAAAAMAAAAOAAAAAgAAAAAAAAACAAAAAwAAAAAAAAAAAAAAAgAAAAIAAAADAAAABgAAAAAAAAAAAAAAAAAAAAAAAAALAAAAAgAAAAIAAAAAAAAAAwAAAAoAAAACAAAAAAAAAAIAAAADAAAAAQAAAAAAAAACAAAAAgAAAAMAAAAHAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAACAAAAAgAAAAAAAAADAAAACwAAAAIAAAAAAAAAAgAAAAMAAAACAAAAAAAAAAIAAAACAAAAAwAAAAgAAAAAAAAAAAAAAAAAAAAAAAAADQAAAAIAAAACAAAAAAAAAAMAAAAMAAAAAgAAAAAAAAACAAAAAwAAAAMAAAAAAAAAAgAAAAIAAAADAAAACQAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAgAAAAIAAAAAAAAAAwAAAA0AAAACAAAAAAAAAAIAAAADAAAABAAAAAAAAAACAAAAAgAAAAMAAAAKAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAACAAAAAgAAAAAAAAADAAAABgAAAAIAAAAAAAAAAgAAAAMAAAAPAAAAAAAAAAIAAAACAAAAAwAAAAsAAAAAAAAAAAAAAAAAAAAAAAAABgAAAAIAAAACAAAAAAAAAAMAAAAHAAAAAgAAAAAAAAACAAAAAwAAABAAAAAAAAAAAgAAAAIAAAADAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAHAAAAAgAAAAIAAAAAAAAAAwAAAAgAAAACAAAAAAAAAAIAAAADAAAAEQAAAAAAAAACAAAAAgAAAAMAAAANAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAACAAAAAgAAAAAAAAADAAAACQAAAAIAAAAAAAAAAgAAAAMAAAASAAAAAAAAAAIAAAACAAAAAwAAAA4AAAAAAAAAAAAAAAAAAAAAAAAACQAAAAIAAAACAAAAAAAAAAMAAAAFAAAAAgAAAAAAAAACAAAAAwAAABMAAAAAAAAAAgAAAAIAAAADAAAADwAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAgAAAAAAAAACAAAAAQAAABMAAAACAAAAAgAAAAAAAAAFAAAACgAAAAAAAAACAAAAAgAAAAMAAAAQAAAAAAAAAAAAAAAAAAAAAAAAABEAAAACAAAAAAAAAAIAAAABAAAADwAAAAIAAAACAAAAAAAAAAUAAAALAAAAAAAAAAIAAAACAAAAAwAAABEAAAAAAAAAAAAAAAAAAAAAAAAAEgAAAAIAAAAAAAAAAgAAAAEAAAAQAAAAAgAAAAIAAAAAAAAABQAAAAwAAAAAAAAAAgAAAAIAAAADAAAAEgAAAAAAAAAAAAAAAAAAAAAAAAATAAAAAgAAAAAAAAACAAAAAQAAABEAAAACAAAAAgAAAAAAAAAFAAAADQAAAAAAAAACAAAAAgAAAAMAAAATAAAAAAAAAAAAAAAAAAAAAAAAAA8AAAACAAAAAAAAAAIAAAABAAAAEgAAAAIAAAACAAAAAAAAAAUAAAAOAAAAAAAAAAIAAAACAAAAAwAAAAIAAAABAAAAAAAAAAEAAAACAAAAAAAAAAAAAAACAAAAAQAAAAAAAAABAAAAAgAAAAEAAAAAAAAAAgAAAAAAAAAFAAAABAAAAAAAAAABAAAABQAAAAAAAAAAAAAABQAAAAQAAAAAAAAAAQAAAAUAAAAEAAAAAAAAAAUAAAAAAAAAAgAAAAEAAAAAAAAAAQAAAAIAAAAAAAAAAAAAAAIAAAABAAAAAAAAAAEAAAACAAAAAQAAAAAAAAACAAAAAgAAAAAAAAABAAAAAAAAAAAAAAAFAAAABAAAAAAAAAABAAAABQAAAAAAAAAAAAAABQAAAAQAAAAAAAAAAQAAAAUAAAAEAAAAAAAAAAUAAAAFAAAAAAAAAAEAAAAAAAAAAAAAAMuhRbbsNlBBYqHW9OmHIkF9XBuqnS31QAK37uYhNMhAOSo3UUupm0DC+6pc6JxvQHV9eseEEEJAzURsCyqlFEB8BQ4NMJjnPyy3tBoS97o/xawXQznRjj89J2K2CZxhP6vX43RIIDQ/S8isgygEBz+LvFHQkmzaPjFFFO7wMq4+AADMLkTtjkIAAOgkJqxhQgAAU7B0MjRCAADwpBcVB0IAAACYP2HaQQAAAIn/Ja5BzczM4Eg6gUHNzMxMU7BTQTMzMzNfgCZBAAAAAEi3+UAAAAAAwGPNQDMzMzMzy6BAmpmZmZkxc0AzMzMzM/NFQDMzMzMzMxlAzczMzMzM7D+ygXSx2U6RQKimJOvQKnpA23hmONTHY0A/AGcxyudNQNb3K647mzZA+S56rrwWIUAm4kUQ+9UJQKre9hGzh/M/BLvoy9WG3T+LmqMf8VHGP2m3nYNV37A/gbFHcyeCmT+cBPWBckiDP61tZACjKW0/q2RbYVUYVj8uDypVyLNAP6jGS5cA5zBBwcqhBdCNGUEGEhQ/JVEDQT6WPnRbNO1AB/AWSJgT1kDfUWNCNLDAQNk+5C33OqlAchWL34QSk0DKvtDIrNV8QNF0G3kFzGVASSeWhBl6UED+/0mNGuk4QGjA/dm/1CJALPLPMql6DEDSHoDrwpP1P2jouzWST+A/egAAAAAAAABKAwAAAAAAAPoWAAAAAAAAyqAAAAAAAAB6ZQQAAAAAAErGHgAAAAAA+mvXAAAAAADK8+MFAAAAAHqqOykAAAAASqmhIAEAAAD6oGvkBwAAAMpm8T43AAAAes+ZuIIBAABKrDQMkwoAAPq1cFUFSgAAyvkUViUGAgAAAAAAAwAAAAYAAAACAAAABQAAAAEAAAAEAAAAAAAAAAAAAAAFAAAAAwAAAAEAAAAGAAAABAAAAAIAAAAAAAAAAAAAAP////8AAAAAAAAAAAAAAAAAAAAAAAAAAP////////////////////////////////////8AAAAA/////wAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAP////8AAAAAAAAAAAEAAAABAAAAAAAAAAAAAAD/////AAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAA/////wUAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAP////8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD/////////////////////////////////////AAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA/////////////////////////////////////wAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAUAAAABAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP////////////////////////////////////8AAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAABAAAAAAAAAAAAAAABAAAAAQAAAAEAAAAAAAAAAQAAAAAAAAAFAAAAAQAAAAEAAAAAAAAAAAAAAAEAAAABAAAAAAAAAAEAAAABAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEBAAAAAAABAAEAAAEBAAAAAAABAAAAAQAAAAEAAQAAAAAAAAAAAAAAAAAAAAAEAAAABAAAAAAAAAACAAAAAQAAAAMAAAAOAAAABgAAAAsAAAACAAAABwAAAAEAAAAYAAAABQAAAAoAAAABAAAABgAAAAAAAAAmAAAABwAAAAwAAAADAAAACAAAAAIAAAAxAAAACQAAAA4AAAAAAAAABQAAAAQAAAA6AAAACAAAAA0AAAAEAAAACQAAAAMAAAA/AAAACwAAAAYAAAAPAAAACgAAABAAAABIAAAADAAAAAcAAAAQAAAACwAAABEAAABTAAAACgAAAAUAAAATAAAADgAAAA8AAABhAAAADQAAAAgAAAARAAAADAAAABIAAABrAAAADgAAAAkAAAASAAAADQAAABMAAAB1AAAADwAAABMAAAARAAAAEgAAABAAAAAHAAAABwAAAAEAAAACAAAABAAAAAMAAAAAAAAAAAAAAAcAAAADAAAAAQAAAAIAAAAFAAAABAAAAAAAAAAAAAAAYWxnb3MuYwBfcG9seWZpbGxJbnRlcm5hbABhZGphY2VudEZhY2VEaXJbdG1wRmlqay5mYWNlXVtmaWprLmZhY2VdID09IEtJAGZhY2VpamsuYwBfZmFjZUlqa1BlbnRUb0dlb0JvdW5kYXJ5AGFkamFjZW50RmFjZURpcltjZW50ZXJJSksuZmFjZV1bZmFjZTJdID09IEtJAF9mYWNlSWprVG9HZW9Cb3VuZGFyeQBwb2x5Z29uLT5uZXh0ID09IE5VTEwAbGlua2VkR2VvLmMAYWRkTmV3TGlua2VkUG9seWdvbgBuZXh0ICE9IE5VTEwAbG9vcCAhPSBOVUxMAGFkZE5ld0xpbmtlZExvb3AAcG9seWdvbi0+Zmlyc3QgPT0gTlVMTABhZGRMaW5rZWRMb29wAGNvb3JkICE9IE5VTEwAYWRkTGlua2VkQ29vcmQAbG9vcC0+Zmlyc3QgPT0gTlVMTABpbm5lckxvb3BzICE9IE5VTEwAbm9ybWFsaXplTXVsdGlQb2x5Z29uAGJib3hlcyAhPSBOVUxMAGNhbmRpZGF0ZXMgIT0gTlVMTABmaW5kUG9seWdvbkZvckhvbGUAY2FuZGlkYXRlQkJveGVzICE9IE5VTEwAcmV2RGlyICE9IElOVkFMSURfRElHSVQAbG9jYWxpai5jAGgzVG9Mb2NhbElqawBiYXNlQ2VsbCAhPSBvcmlnaW5CYXNlQ2VsbAAhKG9yaWdpbk9uUGVudCAmJiBpbmRleE9uUGVudCkAcGVudGFnb25Sb3RhdGlvbnMgPj0gMABkaXJlY3Rpb25Sb3RhdGlvbnMgPj0gMABiYXNlQ2VsbCA9PSBvcmlnaW5CYXNlQ2VsbABiYXNlQ2VsbCAhPSBJTlZBTElEX0JBU0VfQ0VMTABsb2NhbElqa1RvSDMAIV9pc0Jhc2VDZWxsUGVudGFnb24oYmFzZUNlbGwpAGJhc2VDZWxsUm90YXRpb25zID49IDAAd2l0aGluUGVudGFnb25Sb3RhdGlvbnMgPj0gMABncmFwaC0+YnVja2V0cyAhPSBOVUxMAHZlcnRleEdyYXBoLmMAaW5pdFZlcnRleEdyYXBoAG5vZGUgIT0gTlVMTABhZGRWZXJ0ZXhOb2Rl";function V(e){return e}function G(e){return e.replace(/\b__Z[\w\d_]+/g,(function(e){return e===e?e:e+" ["+e+"]"}))}function Y(){var e=new Error;if(!e.stack){try{throw new Error(0)}catch(t){e=t}if(!e.stack)return"(no stack trace available)"}return e.stack.toString()}function W(){return m.length}function q(e){try{var t=new ArrayBuffer(e);if(t.byteLength!=e)return;return new Int8Array(t).set(m),$(t),M(t),1}catch(e){}}var X="function"==typeof atob?atob:function(e){var t,n,r,i,o,a,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",l="",u=0;e=e.replace(/[^A-Za-z0-9\+\/\=]/g,"");do{t=s.indexOf(e.charAt(u++))<<2|(i=s.indexOf(e.charAt(u++)))>>4,n=(15&i)<<4|(o=s.indexOf(e.charAt(u++)))>>2,r=(3&o)<<6|(a=s.indexOf(e.charAt(u++))),l+=String.fromCharCode(t),64!==o&&(l+=String.fromCharCode(n)),64!==a&&(l+=String.fromCharCode(r))}while(u>2]=e,i[s+4>>2]=t,(s=0!=(0|o))&&(i[o>>2]=0),0|ke(e,t))return L=a,0|(p=1);i[p>>2]=0;e:do{if((0|n)>=1)if(s)for(d=0,f=1,h=1,l=0,s=e;;){if(!(l|d)){if(0==(0|(s=0|k(s,t,4,p)))&0==(0|(t=0|x()))){s=2;break e}if(0|ke(s,t)){s=1;break e}}if(0==(0|(s=0|k(s,t,0|i[16+(d<<2)>>2],p)))&0==(0|(t=0|x()))){s=2;break e}if(i[(e=r+(h<<3)|0)>>2]=s,i[e+4>>2]=t,i[o+(h<<2)>>2]=f,e=(0|(l=l+1|0))==(0|f),c=6==(0|(u=d+1|0)),0|ke(s,t)){s=1;break e}if((0|(f=f+(c&e&1)|0))>(0|n)){s=0;break}d=e?c?0:u:d,h=h+1|0,l=e?0:l}else for(d=0,f=1,h=1,l=0,s=e;;){if(!(l|d)){if(0==(0|(s=0|k(s,t,4,p)))&0==(0|(t=0|x()))){s=2;break e}if(0|ke(s,t)){s=1;break e}}if(0==(0|(s=0|k(s,t,0|i[16+(d<<2)>>2],p)))&0==(0|(t=0|x()))){s=2;break e}if(i[(e=r+(h<<3)|0)>>2]=s,i[e+4>>2]=t,e=(0|(l=l+1|0))==(0|f),c=6==(0|(u=d+1|0)),0|ke(s,t)){s=1;break e}if((0|(f=f+(c&e&1)|0))>(0|n)){s=0;break}d=e?c?0:u:d,h=h+1|0,l=e?0:l}else s=0}while(0);return L=a,0|(p=s)}function D(e,t,n,r,o,a,s){n|=0,r|=0,o|=0,a|=0,s|=0;var l,u,c=0,d=0,f=0,h=0,p=0;if(u=L,L=L+16|0,l=u,0==(0|(e|=0))&0==(0|(t|=0)))L=u;else{if(c=0|xt(0|e,0|t,0|a,((0|a)<0)<<31>>31|0),x(),!(0==(0|(p=0|i[(h=d=r+(c<<3)|0)>>2]))&0==(0|(h=0|i[h+4>>2]))|(f=(0|p)==(0|e)&(0|h)==(0|t))))do{f=(0|(h=0|i[(p=d=r+((c=(c+1|0)%(0|a)|0)<<3)|0)>>2]))==(0|e)&(0|(p=0|i[p+4>>2]))==(0|t)}while(!(0==(0|h)&0==(0|p)|f));c=o+(c<<2)|0,f&&(0|i[c>>2])<=(0|s)||(i[(p=d)>>2]=e,i[p+4>>2]=t,i[c>>2]=s,(0|s)>=(0|n)||(p=s+1|0,i[l>>2]=0,D(h=0|k(e,t,2,l),0|x(),n,r,o,a,p),i[l>>2]=0,D(h=0|k(e,t,3,l),0|x(),n,r,o,a,p),i[l>>2]=0,D(h=0|k(e,t,1,l),0|x(),n,r,o,a,p),i[l>>2]=0,D(h=0|k(e,t,5,l),0|x(),n,r,o,a,p),i[l>>2]=0,D(h=0|k(e,t,4,l),0|x(),n,r,o,a,p),i[l>>2]=0,D(h=0|k(e,t,6,l),0|x(),n,r,o,a,p))),L=u}}function k(e,t,n,r){e|=0,t|=0,n|=0;var o,a,s=0,l=0,u=0,c=0,d=0,f=0,h=0;if((0|i[(r|=0)>>2])>0){s=0;do{n=0|le(n),s=s+1|0}while((0|s)<(0|i[r>>2]))}o=0|Mt(0|e,0|t,45),x(),a=127&o,l=0|Re(e,t),s=0|Mt(0|e,0|t,52),x(),s&=15;e:do{if(s)for(;;){if(f=0|Mt(0|e,0|t,0|(d=3*(15-s|0)|0)),x(),f&=7,h=0==(0|ze(s)),s=s+-1|0,c=0|Et(7,0,0|d),t&=~(0|x()),e=(d=0|Et(0|i[(h?464:48)+(28*f|0)+(n<<2)>>2],0,0|d))|e&~c,t|=0|x(),!(n=0|i[(h?672:256)+(28*f|0)+(n<<2)>>2])){n=0;break e}if(!s){u=6;break}}else u=6}while(0);6==(0|u)&&(e|=f=0|Et(0|(h=0|i[880+(28*a|0)+(n<<2)>>2]),0,45),t=0|x()|-1040385&t,n=0|i[4304+(28*a|0)+(n<<2)>>2],127==(127&h|0)&&(h=0|Et(0|i[880+(28*a|0)+20>>2],0,45),t=0|x()|-1040385&t,n=0|i[4304+(28*a|0)+20>>2],e=0|Fe(h|e,t),t=0|x(),i[r>>2]=1+(0|i[r>>2]))),u=0|Mt(0|e,0|t,45),x(),u&=127;e:do{if(0|j(u)){t:do{if(1==(0|Re(e,t))){if((0|a)!=(0|u)){if(0|z(u,0|i[7728+(28*a|0)>>2])){e=0|Be(e,t),l=1,t=0|x();break}e=0|Fe(e,t),l=1,t=0|x();break}switch(0|l){case 5:e=0|Be(e,t),t=0|x(),i[r>>2]=5+(0|i[r>>2]),l=0;break t;case 3:e=0|Fe(e,t),t=0|x(),i[r>>2]=1+(0|i[r>>2]),l=0;break t;default:return h=0,w(0|(f=0)),0|h}}else l=0}while(0);if((0|n)>0){s=0;do{e=0|je(e,t),t=0|x(),s=s+1|0}while((0|s)!=(0|n))}if((0|a)!=(0|u)){if(!(0|F(u))){if(0!=(0|l)|5!=(0|Re(e,t)))break;i[r>>2]=1+(0|i[r>>2]);break}switch(127&o){case 8:case 118:break e}3!=(0|Re(e,t))&&(i[r>>2]=1+(0|i[r>>2]))}}else if((0|n)>0){s=0;do{e=0|Fe(e,t),t=0|x(),s=s+1|0}while((0|s)!=(0|n))}}while(0);return i[r>>2]=((0|i[r>>2])+n|0)%6|0,h=e,w(0|(f=t)),0|h}function R(e,t,n,r,a,s){t|=0,n|=0,r|=0,a|=0,s|=0;var l,u,c,d,f,h,p,A,g,m=0,y=0,v=0,b=0,_=0,w=0,M=0,E=0,O=0,S=0,T=0,C=0,P=0,I=0;if(g=L,L=L+48|0,h=g+32|0,p=g+16|0,A=g,(0|(m=0|i[(e|=0)>>2]))<=0)return L=g,0|(C=0);l=e+4|0,u=h+8|0,c=p+8|0,d=A+8|0,f=((0|t)<0)<<31>>31,T=0;e:for(;;){O=(y=0|i[l>>2])+(T<<4)|0,i[h>>2]=i[O>>2],i[h+4>>2]=i[O+4>>2],i[h+8>>2]=i[O+8>>2],i[h+12>>2]=i[O+12>>2],(0|T)==(m+-1|0)?(i[p>>2]=i[y>>2],i[p+4>>2]=i[y+4>>2],i[p+8>>2]=i[y+8>>2],i[p+12>>2]=i[y+12>>2]):(O=y+(T+1<<4)|0,i[p>>2]=i[O>>2],i[p+4>>2]=i[O+4>>2],i[p+8>>2]=i[O+8>>2],i[p+12>>2]=i[O+12>>2]),O=0|W(h,p,n);t:do{if((0|O)>0){S=+(0|O),E=0;n:for(;;){I=+(O-E|0),P=+(0|E),o[A>>3]=+o[h>>3]*I/S+ +o[p>>3]*P/S,o[d>>3]=+o[u>>3]*I/S+ +o[c>>3]*P/S,y=0|xt(0|(w=0|Ue(A,n)),0|(M=0|x()),0|t,0|f),x(),b=0|i[(v=m=s+(y<<3)|0)>>2],v=0|i[v+4>>2];r:do{if(0==(0|b)&0==(0|v))C=14;else for(_=0;;){if((0|_)>(0|t)){m=1;break r}if((0|b)==(0|w)&(0|v)==(0|M)){m=7;break r}if(0==(0|(b=0|i[(v=m=s+((y=(y+1|0)%(0|t)|0)<<3)|0)>>2]))&0==(0|(v=0|i[v+4>>2]))){C=14;break}_=_+1|0}}while(0);switch(14==(0|C)&&(C=0,0==(0|w)&0==(0|M)?m=7:(i[m>>2]=w,i[m+4>>2]=M,m=0|i[r>>2],i[(_=a+(m<<3)|0)>>2]=w,i[_+4>>2]=M,i[r>>2]=m+1,m=0)),7&m){case 7:case 0:break;default:break n}if((0|O)<=(0|(E=E+1|0))){C=8;break t}}if(0|m){m=-1,C=20;break e}}else C=8}while(0);if(8==(0|C)&&(C=0),(0|(T=T+1|0))>=(0|(m=0|i[e>>2]))){m=0,C=20;break}}return 20==(0|C)?(L=g,0|m):0}function j(e){return 0|i[7728+(28*(e|=0)|0)+16>>2]}function F(e){return 4==(0|(e|=0))|117==(0|e)|0}function N(e){return 0|i[11152+(216*(0|i[(e|=0)>>2])|0)+(72*(0|i[e+4>>2])|0)+(24*(0|i[e+8>>2])|0)+(i[e+12>>2]<<3)>>2]}function B(e){return 0|i[11152+(216*(0|i[(e|=0)>>2])|0)+(72*(0|i[e+4>>2])|0)+(24*(0|i[e+8>>2])|0)+(i[e+12>>2]<<3)+4>>2]}function z(e,t){return t|=0,(0|i[7728+(28*(e|=0)|0)+20>>2])==(0|t)?0|(t=1):0|(t=(0|i[7728+(28*e|0)+24>>2])==(0|t))}function U(e,t){return 0|i[880+(28*(e|=0)|0)+((t|=0)<<2)>>2]}function H(e,t){return t|=0,(0|i[880+(28*(e|=0)|0)>>2])==(0|t)?0|(t=0):(0|i[880+(28*e|0)+4>>2])==(0|t)?0|(t=1):(0|i[880+(28*e|0)+8>>2])==(0|t)?0|(t=2):(0|i[880+(28*e|0)+12>>2])==(0|t)?0|(t=3):(0|i[880+(28*e|0)+16>>2])==(0|t)?0|(t=4):(0|i[880+(28*e|0)+20>>2])==(0|t)?0|(t=5):0|((0|i[880+(28*e|0)+24>>2])==(0|t)?6:7)}function V(e){return+o[(e|=0)+16>>3]<+o[e+24>>3]|0}function G(e,t){e|=0;var n,r,i=0;return(i=+o[(t|=0)>>3])>=+o[e+8>>3]&&i<=+o[e>>3]?(n=+o[e+16>>3],i=+o[e+24>>3],t=(r=+o[t+8>>3])>=i,e=r<=n&1,n>2]=0,d=d+4|0}while((0|d)<(0|f));return We(t,a),Ge(f=0|i[(d=a)>>2],d=0|i[d+4>>2],n),Ye(f,d,r),u=+Te(n,r+8|0),o[n>>3]=+o[e>>3],o[(d=n+8|0)>>3]=+o[e+16>>3],o[r>>3]=+o[e+8>>3],o[(f=r+8|0)>>3]=+o[e+24>>3],c=+Te(n,r),f=~~+y(+c*c/+Ot(+ +l(+(+o[d>>3]-+o[f>>3])/(+o[n>>3]-+o[r>>3])),3)/(u*(2.59807621135*u)*.8)),L=s,0|(0==(0|f)?1:f)}function W(e,t,n){e|=0,t|=0,n|=0;var r,o,a,s,l,u=0,c=0;s=L,L=L+288|0,r=s+264|0,o=s+96|0,c=(u=a=s)+96|0;do{i[u>>2]=0,u=u+4|0}while((0|u)<(0|c));return We(n,a),Ge(u=0|i[(c=a)>>2],c=0|i[c+4>>2],r),Ye(u,c,o),l=+Te(r,o+8|0),c=~~+y(+ +Te(e,t)/(2*l)),L=s,0|(0==(0|c)?1:c)}function q(e,t,n,r){t|=0,n|=0,r|=0,i[(e|=0)>>2]=t,i[e+4>>2]=n,i[e+8>>2]=r}function X(e,t){e|=0;var n,r,a,s,u=0,c=0,d=0,f=0,h=0,p=0,A=0;i[(s=(t|=0)+8|0)>>2]=0,r=+o[e>>3],f=+l(+r),a=+o[e+8>>3],f+=.5*(h=+l(+a)/.8660254037844386),f-=+(0|(u=~~f)),h-=+(0|(e=~~h));do{if(f<.5){if(f<.3333333333333333){if(i[t>>2]=u,h<.5*(f+1)){i[t+4>>2]=e;break}e=e+1|0,i[t+4>>2]=e;break}if(e=(1&!(h<(A=1-f)))+e|0,i[t+4>>2]=e,A<=h&h<2*f){u=u+1|0,i[t>>2]=u;break}i[t>>2]=u;break}if(!(f<.6666666666666666)){if(u=u+1|0,i[t>>2]=u,h<.5*f){i[t+4>>2]=e;break}e=e+1|0,i[t+4>>2]=e;break}if(h<1-f){if(i[t+4>>2]=e,2*f-1>2]=u;break}}else e=e+1|0,i[t+4>>2]=e;u=u+1|0,i[t>>2]=u}while(0);do{if(r<0){if(1&e){u=~~(+(0|u)-(2*(+((p=0|bt(0|u,((0|u)<0)<<31>>31|0,0|(p=(e+1|0)/2|0),((0|p)<0)<<31>>31|0))>>>0)+4294967296*+(0|x()))+1)),i[t>>2]=u;break}u=~~(+(0|u)-2*(+((p=0|bt(0|u,((0|u)<0)<<31>>31|0,0|(p=(0|e)/2|0),((0|p)<0)<<31>>31|0))>>>0)+4294967296*+(0|x()))),i[t>>2]=u;break}}while(0);p=t+4|0,a<0&&(u=u-((1|e<<1)/2|0)|0,i[t>>2]=u,e=0-e|0,i[p>>2]=e),c=e-u|0,(0|u)<0?(d=0-u|0,i[p>>2]=c,i[s>>2]=d,i[t>>2]=0,e=c,u=0):d=0,(0|e)<0&&(u=u-e|0,i[t>>2]=u,d=d-e|0,i[s>>2]=d,i[p>>2]=0,e=0),n=u-d|0,c=e-d|0,(0|d)<0&&(i[t>>2]=n,i[p>>2]=c,i[s>>2]=0,e=c,u=n,d=0),(0|(c=(0|d)<(0|(c=(0|e)<(0|u)?e:u))?d:c))<=0||(i[t>>2]=u-c,i[p>>2]=e-c,i[s>>2]=d-c)}function Z(e){var t,n=0,r=0,o=0,a=0,s=0;n=0|i[(e|=0)>>2],r=0|i[(t=e+4|0)>>2],(0|n)<0&&(r=r-n|0,i[t>>2]=r,i[(s=e+8|0)>>2]=(0|i[s>>2])-n,i[e>>2]=0,n=0),(0|r)<0?(n=n-r|0,i[e>>2]=n,a=(0|i[(s=e+8|0)>>2])-r|0,i[s>>2]=a,i[t>>2]=0,r=0):(s=a=e+8|0,a=0|i[a>>2]),(0|a)<0&&(n=n-a|0,i[e>>2]=n,r=r-a|0,i[t>>2]=r,i[s>>2]=0,a=0),(0|(o=(0|a)<(0|(o=(0|r)<(0|n)?r:n))?a:o))<=0||(i[e>>2]=n-o,i[t>>2]=r-o,i[s>>2]=a-o)}function K(e,t){t|=0;var n,r;r=0|i[(e|=0)+8>>2],n=+((0|i[e+4>>2])-r|0),o[t>>3]=+((0|i[e>>2])-r|0)-.5*n,o[t+8>>3]=.8660254037844386*n}function Q(e,t,n){e|=0,t|=0,i[(n|=0)>>2]=(0|i[t>>2])+(0|i[e>>2]),i[n+4>>2]=(0|i[t+4>>2])+(0|i[e+4>>2]),i[n+8>>2]=(0|i[t+8>>2])+(0|i[e+8>>2])}function J(e,t,n){e|=0,t|=0,i[(n|=0)>>2]=(0|i[e>>2])-(0|i[t>>2]),i[n+4>>2]=(0|i[e+4>>2])-(0|i[t+4>>2]),i[n+8>>2]=(0|i[e+8>>2])-(0|i[t+8>>2])}function $(e,t){t|=0;var n,r=0;r=0|v(0|i[(e|=0)>>2],t),i[e>>2]=r,n=0|v(0|i[(r=e+4|0)>>2],t),i[r>>2]=n,t=0|v(0|i[(e=e+8|0)>>2],t),i[e>>2]=t}function ee(e){var t,n,r=0,o=0,a=0,s=0,l=0;l=(0|(n=0|i[(e|=0)>>2]))<0,e=(e=(o=(0|(s=((t=(0|(a=(0|i[e+4>>2])-(l?n:0)|0))<0)?0-a|0:0)+((0|i[e+8>>2])-(l?n:0))|0))<0)?0:s)-((a=(0|(o=(0|e)<(0|(o=(0|(r=(t?0:a)-(o?s:0)|0))<(0|(s=(l?0:n)-(t?a:0)-(o?s:0)|0))?r:s))?e:o))>0)?o:0)|0,r=r-(a?o:0)|0;e:do{switch(s-(a?o:0)|0){case 0:switch(0|r){case 0:return 0|(l=0==(0|e)?0:1==(0|e)?1:7);case 1:return 0|(l=0==(0|e)?2:1==(0|e)?3:7);default:break e}case 1:switch(0|r){case 0:return 0|(l=0==(0|e)?4:1==(0|e)?5:7);case 1:if(e)break e;return 0|(e=6);default:break e}}}while(0);return 0|(l=7)}function te(e){var t,n,r=0,o=0,a=0,s=0,l=0;o=0|i[(t=(e|=0)+8|0)>>2],a=0|gt(+((3*(r=(0|i[e>>2])-o|0)|0)-(o=(0|i[(n=e+4|0)>>2])-o|0)|0)/7),i[e>>2]=a,r=0|gt(+((o<<1)+r|0)/7),i[n>>2]=r,i[t>>2]=0,o=r-a|0,(0|a)<0?(l=0-a|0,i[n>>2]=o,i[t>>2]=l,i[e>>2]=0,r=o,a=0,o=l):o=0,(0|r)<0&&(a=a-r|0,i[e>>2]=a,o=o-r|0,i[t>>2]=o,i[n>>2]=0,r=0),l=a-o|0,s=r-o|0,(0|o)<0?(i[e>>2]=l,i[n>>2]=s,i[t>>2]=0,r=s,s=l,o=0):s=a,(0|(a=(0|o)<(0|(a=(0|r)<(0|s)?r:s))?o:a))<=0||(i[e>>2]=s-a,i[n>>2]=r-a,i[t>>2]=o-a)}function ne(e){var t,n,r=0,o=0,a=0,s=0,l=0;o=0|i[(t=(e|=0)+8|0)>>2],a=0|gt(+(((r=(0|i[e>>2])-o|0)<<1)+(o=(0|i[(n=e+4|0)>>2])-o|0)|0)/7),i[e>>2]=a,r=0|gt(+((3*o|0)-r|0)/7),i[n>>2]=r,i[t>>2]=0,o=r-a|0,(0|a)<0?(l=0-a|0,i[n>>2]=o,i[t>>2]=l,i[e>>2]=0,r=o,a=0,o=l):o=0,(0|r)<0&&(a=a-r|0,i[e>>2]=a,o=o-r|0,i[t>>2]=o,i[n>>2]=0,r=0),l=a-o|0,s=r-o|0,(0|o)<0?(i[e>>2]=l,i[n>>2]=s,i[t>>2]=0,r=s,s=l,o=0):s=a,(0|(a=(0|o)<(0|(a=(0|r)<(0|s)?r:s))?o:a))<=0||(i[e>>2]=s-a,i[n>>2]=r-a,i[t>>2]=o-a)}function re(e){var t,n,r,o=0,a=0,s=0,l=0;o=0|i[(e|=0)>>2],a=0|i[(n=e+4|0)>>2],s=0|i[(r=e+8|0)>>2],l=a+(3*o|0)|0,i[e>>2]=l,a=s+(3*a|0)|0,i[n>>2]=a,o=(3*s|0)+o|0,i[r>>2]=o,s=a-l|0,(0|l)<0?(o=o-l|0,i[n>>2]=s,i[r>>2]=o,i[e>>2]=0,a=s,s=0):s=l,(0|a)<0&&(s=s-a|0,i[e>>2]=s,o=o-a|0,i[r>>2]=o,i[n>>2]=0,a=0),t=s-o|0,l=a-o|0,(0|o)<0?(i[e>>2]=t,i[n>>2]=l,i[r>>2]=0,s=t,o=0):l=a,(0|(a=(0|o)<(0|(a=(0|l)<(0|s)?l:s))?o:a))<=0||(i[e>>2]=s-a,i[n>>2]=l-a,i[r>>2]=o-a)}function ie(e){var t,n,r,o=0,a=0,s=0,l=0;l=0|i[(e|=0)>>2],s=(3*(o=0|i[(n=e+4|0)>>2])|0)+l|0,l=(a=0|i[(r=e+8|0)>>2])+(3*l|0)|0,i[e>>2]=l,i[n>>2]=s,o=(3*a|0)+o|0,i[r>>2]=o,a=s-l|0,(0|l)<0?(o=o-l|0,i[n>>2]=a,i[r>>2]=o,i[e>>2]=0,l=0):a=s,(0|a)<0&&(l=l-a|0,i[e>>2]=l,o=o-a|0,i[r>>2]=o,i[n>>2]=0,a=0),t=l-o|0,s=a-o|0,(0|o)<0?(i[e>>2]=t,i[n>>2]=s,i[r>>2]=0,l=t,o=0):s=a,(0|(a=(0|o)<(0|(a=(0|s)<(0|l)?s:l))?o:a))<=0||(i[e>>2]=l-a,i[n>>2]=s-a,i[r>>2]=o-a)}function oe(e,t){e|=0;var n,r,o,a=0,s=0,l=0;((t|=0)+-1|0)>>>0>=6||(l=(0|i[15472+(12*t|0)>>2])+(0|i[e>>2])|0,i[e>>2]=l,o=e+4|0,s=(0|i[15472+(12*t|0)+4>>2])+(0|i[o>>2])|0,i[o>>2]=s,r=e+8|0,t=(0|i[15472+(12*t|0)+8>>2])+(0|i[r>>2])|0,i[r>>2]=t,a=s-l|0,(0|l)<0?(t=t-l|0,i[o>>2]=a,i[r>>2]=t,i[e>>2]=0,s=0):(a=s,s=l),(0|a)<0&&(s=s-a|0,i[e>>2]=s,t=t-a|0,i[r>>2]=t,i[o>>2]=0,a=0),n=s-t|0,l=a-t|0,(0|t)<0?(i[e>>2]=n,i[o>>2]=l,i[r>>2]=0,s=n,t=0):l=a,(0|(a=(0|t)<(0|(a=(0|l)<(0|s)?l:s))?t:a))<=0||(i[e>>2]=s-a,i[o>>2]=l-a,i[r>>2]=t-a))}function ae(e){var t,n,r,o=0,a=0,s=0,l=0;l=0|i[(e|=0)>>2],s=(o=0|i[(n=e+4|0)>>2])+l|0,l=(a=0|i[(r=e+8|0)>>2])+l|0,i[e>>2]=l,i[n>>2]=s,o=a+o|0,i[r>>2]=o,a=s-l|0,(0|l)<0?(o=o-l|0,i[n>>2]=a,i[r>>2]=o,i[e>>2]=0,s=0):(a=s,s=l),(0|a)<0&&(s=s-a|0,i[e>>2]=s,o=o-a|0,i[r>>2]=o,i[n>>2]=0,a=0),t=s-o|0,l=a-o|0,(0|o)<0?(i[e>>2]=t,i[n>>2]=l,i[r>>2]=0,s=t,o=0):l=a,(0|(a=(0|o)<(0|(a=(0|l)<(0|s)?l:s))?o:a))<=0||(i[e>>2]=s-a,i[n>>2]=l-a,i[r>>2]=o-a)}function se(e){var t,n,r,o=0,a=0,s=0,l=0;o=0|i[(e|=0)>>2],s=0|i[(n=e+4|0)>>2],a=0|i[(r=e+8|0)>>2],l=s+o|0,i[e>>2]=l,s=a+s|0,i[n>>2]=s,o=a+o|0,i[r>>2]=o,a=s-l|0,(0|l)<0?(o=o-l|0,i[n>>2]=a,i[r>>2]=o,i[e>>2]=0,s=0):(a=s,s=l),(0|a)<0&&(s=s-a|0,i[e>>2]=s,o=o-a|0,i[r>>2]=o,i[n>>2]=0,a=0),t=s-o|0,l=a-o|0,(0|o)<0?(i[e>>2]=t,i[n>>2]=l,i[r>>2]=0,s=t,o=0):l=a,(0|(a=(0|o)<(0|(a=(0|l)<(0|s)?l:s))?o:a))<=0||(i[e>>2]=s-a,i[n>>2]=l-a,i[r>>2]=o-a)}function le(e){switch(0|(e|=0)){case 1:e=5;break;case 5:e=4;break;case 4:e=6;break;case 6:e=2;break;case 2:e=3;break;case 3:e=1}return 0|e}function ue(e){switch(0|(e|=0)){case 1:e=3;break;case 3:e=2;break;case 2:e=6;break;case 6:e=4;break;case 4:e=5;break;case 5:e=1}return 0|e}function ce(e){var t,n,r,o=0,a=0,s=0,l=0;o=0|i[(e|=0)>>2],a=0|i[(n=e+4|0)>>2],s=0|i[(r=e+8|0)>>2],l=a+(o<<1)|0,i[e>>2]=l,a=s+(a<<1)|0,i[n>>2]=a,o=(s<<1)+o|0,i[r>>2]=o,s=a-l|0,(0|l)<0?(o=o-l|0,i[n>>2]=s,i[r>>2]=o,i[e>>2]=0,a=s,s=0):s=l,(0|a)<0&&(s=s-a|0,i[e>>2]=s,o=o-a|0,i[r>>2]=o,i[n>>2]=0,a=0),t=s-o|0,l=a-o|0,(0|o)<0?(i[e>>2]=t,i[n>>2]=l,i[r>>2]=0,s=t,o=0):l=a,(0|(a=(0|o)<(0|(a=(0|l)<(0|s)?l:s))?o:a))<=0||(i[e>>2]=s-a,i[n>>2]=l-a,i[r>>2]=o-a)}function de(e){var t,n,r,o=0,a=0,s=0,l=0;l=0|i[(e|=0)>>2],s=((o=0|i[(n=e+4|0)>>2])<<1)+l|0,l=(a=0|i[(r=e+8|0)>>2])+(l<<1)|0,i[e>>2]=l,i[n>>2]=s,o=(a<<1)+o|0,i[r>>2]=o,a=s-l|0,(0|l)<0?(o=o-l|0,i[n>>2]=a,i[r>>2]=o,i[e>>2]=0,l=0):a=s,(0|a)<0&&(l=l-a|0,i[e>>2]=l,o=o-a|0,i[r>>2]=o,i[n>>2]=0,a=0),t=l-o|0,s=a-o|0,(0|o)<0?(i[e>>2]=t,i[n>>2]=s,i[r>>2]=0,l=t,o=0):s=a,(0|(a=(0|o)<(0|(a=(0|s)<(0|l)?s:l))?o:a))<=0||(i[e>>2]=l-a,i[n>>2]=s-a,i[r>>2]=o-a)}function fe(e,t){t|=0;var n,r,o,a=0,s=0,l=0;return o=(0|(r=(0|i[(e|=0)>>2])-(0|i[t>>2])|0))<0,n=(0|(s=(0|i[e+4>>2])-(0|i[t+4>>2])-(o?r:0)|0))<0,t=(t=(e=(0|(l=(o?0-r|0:0)+(0|i[e+8>>2])-(0|i[t+8>>2])+(n?0-s|0:0)|0))<0)?0:l)-((s=(0|(e=(0|t)<(0|(e=(0|(a=(n?0:s)-(e?l:0)|0))<(0|(l=(o?0:r)-(n?s:0)-(e?l:0)|0))?a:l))?t:e))>0)?e:0)|0,a=a-(s?e:0)|0,0|((0|(e=(0|(e=l-(s?e:0)|0))>-1?e:0-e|0))>(0|(t=(0|(a=(0|a)>-1?a:0-a|0))>(0|(t=(0|t)>-1?t:0-t|0))?a:t))?e:t)}function he(e,t){t|=0;var n;n=0|i[(e|=0)+8>>2],i[t>>2]=(0|i[e>>2])-n,i[t+4>>2]=(0|i[e+4>>2])-n}function pe(e,t){t|=0;var n,r,o,a=0,s=0,l=0;s=0|i[(e|=0)>>2],i[t>>2]=s,e=0|i[e+4>>2],i[(r=t+4|0)>>2]=e,i[(o=t+8|0)>>2]=0,a=e-s|0,(0|s)<0?(e=0-s|0,i[r>>2]=a,i[o>>2]=e,i[t>>2]=0,s=0):(a=e,e=0),(0|a)<0&&(s=s-a|0,i[t>>2]=s,e=e-a|0,i[o>>2]=e,i[r>>2]=0,a=0),n=s-e|0,l=a-e|0,(0|e)<0?(i[t>>2]=n,i[r>>2]=l,i[o>>2]=0,a=l,l=n,e=0):l=s,(0|(s=(0|e)<(0|(s=(0|a)<(0|l)?a:l))?e:s))<=0||(i[t>>2]=l-s,i[r>>2]=a-s,i[o>>2]=e-s)}function Ae(e){var t,n,r,o;n=(o=0|i[(t=(e|=0)+8|0)>>2])-(0|i[e>>2])|0,i[e>>2]=n,e=(0|i[(r=e+4|0)>>2])-o|0,i[r>>2]=e,i[t>>2]=0-(e+n)}function ge(e){var t,n,r=0,o=0,a=0,s=0,l=0;r=0-(o=0|i[(e|=0)>>2])|0,i[e>>2]=r,i[(t=e+8|0)>>2]=0,s=(a=0|i[(n=e+4|0)>>2])+o|0,(0|o)>0?(i[n>>2]=s,i[t>>2]=o,i[e>>2]=0,r=0,a=s):o=0,(0|a)<0?(l=r-a|0,i[e>>2]=l,o=o-a|0,i[t>>2]=o,i[n>>2]=0,s=l-o|0,r=0-o|0,(0|o)<0?(i[e>>2]=s,i[n>>2]=r,i[t>>2]=0,a=r,o=0):(a=0,s=l)):s=r,(0|(r=(0|o)<(0|(r=(0|a)<(0|s)?a:s))?o:r))<=0||(i[e>>2]=s-r,i[n>>2]=a-r,i[t>>2]=o-r)}function me(e,t,n,r){t|=0,n|=0,r|=0;var a,s=0,l=0,u=0,c=0;if(a=L,L=L+32|0,function(e,t){t|=0;var n,r,i=0;i=+o[(e=e|0)>>3],n=+d(+i),i=+f(+i),o[t+16>>3]=i,i=+o[e+8>>3],r=n*+d(+i),o[t>>3]=r,i=n*+f(+i),o[t+8>>3]=i}(e|=0,l=a),i[n>>2]=0,s=+lt(15888,l),(u=+lt(15912,l))>2]=1,s=u),(u=+lt(15936,l))>2]=2,s=u),(u=+lt(15960,l))>2]=3,s=u),(u=+lt(15984,l))>2]=4,s=u),(u=+lt(16008,l))>2]=5,s=u),(u=+lt(16032,l))>2]=6,s=u),(u=+lt(16056,l))>2]=7,s=u),(u=+lt(16080,l))>2]=8,s=u),(u=+lt(16104,l))>2]=9,s=u),(u=+lt(16128,l))>2]=10,s=u),(u=+lt(16152,l))>2]=11,s=u),(u=+lt(16176,l))>2]=12,s=u),(u=+lt(16200,l))>2]=13,s=u),(u=+lt(16224,l))>2]=14,s=u),(u=+lt(16248,l))>2]=15,s=u),(u=+lt(16272,l))>2]=16,s=u),(u=+lt(16296,l))>2]=17,s=u),(u=+lt(16320,l))>2]=18,s=u),(u=+lt(16344,l))>2]=19,s=u),(u=+p(+(1-.5*s)))<1e-16)return i[r>>2]=0,i[r+4>>2]=0,i[r+8>>2]=0,i[r+12>>2]=0,void(L=a);if(n=0|i[n>>2],s=+Oe((s=+o[16368+(24*n|0)>>3])-+Oe(+function(e,t){e|=0;var n,r,i,a,s;return a=+o[(t=t|0)>>3],r=+d(+a),i=+o[t+8>>3]-+o[e+8>>3],s=r*+f(+i),n=+o[e>>3],+ +m(+s,+(+f(+a)*+d(+n)-+d(+i)*(r*+f(+n))))}(15568+(n<<4)|0,e))),c=0|ze(t)?+Oe(s+-.3334731722518321):s,s=+h(+u)/.381966011250105,(0|t)>0){l=0;do{s*=2.6457513110645907,l=l+1|0}while((0|l)!=(0|t))}u=+d(+c)*s,o[r>>3]=u,c=+f(+c)*s,o[r+8>>3]=c,L=a}function ye(e,t,n,r,a){t|=0,n|=0,r|=0,a|=0;var s=0,c=0;if((s=+function(e){var t,n;return n=+o[(e=e|0)>>3],t=+o[e+8>>3],+ +u(+(n*n+t*t))}(e|=0))<1e-16)return t=15568+(t<<4)|0,i[a>>2]=i[t>>2],i[a+4>>2]=i[t+4>>2],i[a+8>>2]=i[t+8>>2],void(i[a+12>>2]=i[t+12>>2]);if(c=+m(+ +o[e+8>>3],+ +o[e>>3]),(0|n)>0){e=0;do{s/=2.6457513110645907,e=e+1|0}while((0|e)!=(0|n))}r?(s/=3,n=0==(0|ze(n)),s=+g(.381966011250105*(n?s:s/2.6457513110645907))):(s=+g(.381966011250105*s),0|ze(n)&&(c=+Oe(c+.3334731722518321))),function(e,t,n,r){e|=0,t=+t,r|=0;var a=0,s=0,u=0,c=0;if((n=+n)<1e-16)return i[r>>2]=i[e>>2],i[r+4>>2]=i[e+4>>2],i[r+8>>2]=i[e+8>>2],void(i[r+12>>2]=i[e+12>>2]);s=t<0?t+6.283185307179586:t,s=t>=6.283185307179586?s+-6.283185307179586:s;do{if(!(s<1e-16)){if(a=+l(+(s+-3.141592653589793))<1e-16,t=+o[e>>3],a){t-=n,o[r>>3]=t,a=r;break}if(u=+d(+n),n=+f(+n),t=u*+f(+t)+ +d(+s)*(n*+d(+t)),t=+A(+((t=t>1?1:t)<-1?-1:t)),o[r>>3]=t,+l(+(t+-1.5707963267948966))<1e-16)return o[r>>3]=1.5707963267948966,void(o[r+8>>3]=0);if(+l(+(t+1.5707963267948966))<1e-16)return o[r>>3]=-1.5707963267948966,void(o[r+8>>3]=0);if(c=+d(+t),s=n*+f(+s)/c,n=+o[e>>3],t=(u-+f(+t)*+f(+n))/+d(+n)/c,u=s>1?1:s,t=t>1?1:t,(t=+o[e+8>>3]+ +m(+(u<-1?-1:u),+(t<-1?-1:t)))>3.141592653589793)do{t+=-6.283185307179586}while(t>3.141592653589793);if(t<-3.141592653589793)do{t+=6.283185307179586}while(t<-3.141592653589793);return void(o[r+8>>3]=t)}t=+o[e>>3]+n,o[r>>3]=t,a=r}while(0);if(+l(+(t+-1.5707963267948966))<1e-16)return o[a>>3]=1.5707963267948966,void(o[r+8>>3]=0);if(+l(+(t+1.5707963267948966))<1e-16)return o[a>>3]=-1.5707963267948966,void(o[r+8>>3]=0);if((t=+o[e+8>>3])>3.141592653589793)do{t+=-6.283185307179586}while(t>3.141592653589793);if(t<-3.141592653589793)do{t+=6.283185307179586}while(t<-3.141592653589793);o[r+8>>3]=t}(15568+(t<<4)|0,+Oe(+o[16368+(24*t|0)>>3]-c),s,a)}function ve(e,t,n){t|=0,n|=0;var r,o;r=L,L=L+16|0,K((e|=0)+4|0,o=r),ye(o,0|i[e>>2],t,0,n),L=r}function be(e,t,n,r,a){e|=0,t|=0,n|=0,r|=0,a|=0;var s,l,u,c,d,f,h,p,A,g,m,y,v,b,_,w,x,E,O,S,T,C,P=0,I=0,D=0,k=0,R=0,j=0;if(C=L,L=L+272|0,k=C+240|0,O=C,S=C+224|0,T=C+208|0,m=C+176|0,y=C+160|0,v=C+192|0,b=C+144|0,_=C+128|0,w=C+112|0,x=C+96|0,E=C+80|0,i[(P=C+256|0)>>2]=t,i[k>>2]=i[e>>2],i[k+4>>2]=i[e+4>>2],i[k+8>>2]=i[e+8>>2],i[k+12>>2]=i[e+12>>2],_e(k,P,O),i[a>>2]=0,(0|(k=r+n+(5==(0|r)&1)|0))<=(0|n))L=C;else{l=S+4|0,u=m+4|0,c=n+5|0,d=16848+((s=0|i[P>>2])<<2)|0,f=16928+(s<<2)|0,h=_+8|0,p=w+8|0,A=x+8|0,g=T+4|0,D=n;e:for(;;){I=O+(((0|D)%5|0)<<4)|0,i[T>>2]=i[I>>2],i[T+4>>2]=i[I+4>>2],i[T+8>>2]=i[I+8>>2],i[T+12>>2]=i[I+12>>2];do{}while(2==(0|we(T,s,0,1)));if((0|D)>(0|n)&0!=(0|ze(t))){if(i[m>>2]=i[T>>2],i[m+4>>2]=i[T+4>>2],i[m+8>>2]=i[T+8>>2],i[m+12>>2]=i[T+12>>2],K(l,y),r=0|i[m>>2],P=0|i[17008+(80*r|0)+(i[S>>2]<<2)>>2],i[m>>2]=i[18608+(80*r|0)+(20*P|0)>>2],(0|(I=0|i[18608+(80*r|0)+(20*P|0)+16>>2]))>0){e=0;do{ae(u),e=e+1|0}while((0|e)<(0|I))}switch(I=18608+(80*r|0)+(20*P|0)+4|0,i[v>>2]=i[I>>2],i[v+4>>2]=i[I+4>>2],i[v+8>>2]=i[I+8>>2],$(v,3*(0|i[d>>2])|0),Q(u,v,u),Z(u),K(u,b),R=+(0|i[f>>2]),o[_>>3]=3*R,o[h>>3]=0,j=-1.5*R,o[w>>3]=j,o[p>>3]=2.598076211353316*R,o[x>>3]=j,o[A>>3]=-2.598076211353316*R,0|i[17008+(80*(0|i[m>>2])|0)+(i[T>>2]<<2)>>2]){case 1:e=w,r=_;break;case 3:e=x,r=w;break;case 2:e=_,r=x;break;default:e=12;break e}at(y,b,r,e,E),ye(E,0|i[m>>2],s,1,a+8+(i[a>>2]<<4)|0),i[a>>2]=1+(0|i[a>>2])}if((0|D)<(0|c)&&(K(g,m),ye(m,0|i[T>>2],s,1,a+8+(i[a>>2]<<4)|0),i[a>>2]=1+(0|i[a>>2])),i[S>>2]=i[T>>2],i[S+4>>2]=i[T+4>>2],i[S+8>>2]=i[T+8>>2],i[S+12>>2]=i[T+12>>2],(0|(D=D+1|0))>=(0|k)){e=3;break}}3!=(0|e)?12==(0|e)&&M(22474,22521,581,22531):L=C}}function _e(e,t,n){e|=0,t|=0,n|=0;var r,o=0,a=0,s=0,l=0,u=0;r=L,L=L+128|0,a=r,l=20208,u=(s=o=r+64|0)+60|0;do{i[s>>2]=i[l>>2],s=s+4|0,l=l+4|0}while((0|s)<(0|u));l=20272,u=(s=a)+60|0;do{i[s>>2]=i[l>>2],s=s+4|0,l=l+4|0}while((0|s)<(0|u));o=(u=0==(0|ze(0|i[t>>2])))?o:a,ce(a=e+4|0),de(a),0|ze(0|i[t>>2])&&(ie(a),i[t>>2]=1+(0|i[t>>2])),i[n>>2]=i[e>>2],Q(a,o,t=n+4|0),Z(t),i[n+16>>2]=i[e>>2],Q(a,o+12|0,t=n+20|0),Z(t),i[n+32>>2]=i[e>>2],Q(a,o+24|0,t=n+36|0),Z(t),i[n+48>>2]=i[e>>2],Q(a,o+36|0,t=n+52|0),Z(t),i[n+64>>2]=i[e>>2],Q(a,o+48|0,n=n+68|0),Z(n),L=r}function we(e,t,n,r){n|=0,r|=0;var o,a,s,l,u,c,d=0,f=0,h=0,p=0,A=0;if(c=L,L=L+32|0,u=c+12|0,a=c,A=(e|=0)+4|0,p=0|i[16928+((t|=0)<<2)>>2],p=(l=0!=(0|r))?3*p|0:p,d=0|i[A>>2],o=0|i[(s=e+8|0)>>2],l){if((0|(d=o+d+(r=0|i[(f=e+12|0)>>2])|0))==(0|p))return L=c,0|(A=1);h=f}else d=o+d+(r=0|i[(h=e+12|0)>>2])|0;if((0|d)<=(0|p))return L=c,0|(A=0);do{if((0|r)>0){if(r=0|i[e>>2],(0|o)>0){f=18608+(80*r|0)+60|0,r=e;break}r=18608+(80*r|0)+40|0,n?(q(u,p,0,0),J(A,u,a),se(a),Q(a,u,A),f=r,r=e):(f=r,r=e)}else f=18608+(80*(0|i[e>>2])|0)+20|0,r=e}while(0);if(i[r>>2]=i[f>>2],(0|i[(d=f+16|0)>>2])>0){r=0;do{ae(A),r=r+1|0}while((0|r)<(0|i[d>>2]))}return e=f+4|0,i[u>>2]=i[e>>2],i[u+4>>2]=i[e+4>>2],i[u+8>>2]=i[e+8>>2],t=0|i[16848+(t<<2)>>2],$(u,l?3*t|0:t),Q(A,u,A),Z(A),r=l&&((0|i[s>>2])+(0|i[A>>2])+(0|i[h>>2])|0)==(0|p)?1:2,L=c,0|(A=r)}function xe(e,t){e|=0,t|=0;var n=0;do{n=0|we(e,t,0,1)}while(2==(0|n));return 0|n}function Me(e,t,n,r,a){e|=0,t|=0,n|=0,r|=0,a|=0;var s,l,u,c,d,f,h,p,A,g,m,y,v,b,_,w,x,E,O=0,S=0,T=0,C=0,P=0;if(E=L,L=L+240|0,b=E+208|0,_=E,w=E+192|0,x=E+176|0,A=E+160|0,g=E+144|0,m=E+128|0,y=E+112|0,v=E+96|0,i[(O=E+224|0)>>2]=t,i[b>>2]=i[e>>2],i[b+4>>2]=i[e+4>>2],i[b+8>>2]=i[e+8>>2],i[b+12>>2]=i[e+12>>2],Ee(b,O,_),i[a>>2]=0,(0|(p=r+n+(6==(0|r)&1)|0))<=(0|n))L=E;else{l=n+6|0,u=16928+((s=0|i[O>>2])<<2)|0,c=g+8|0,d=m+8|0,f=y+8|0,h=w+4|0,S=0,T=n,r=-1;e:for(;;){if(e=_+((O=(0|T)%6|0)<<4)|0,i[w>>2]=i[e>>2],i[w+4>>2]=i[e+4>>2],i[w+8>>2]=i[e+8>>2],i[w+12>>2]=i[e+12>>2],e=S,S=0|we(w,s,0,1),(0|T)>(0|n)&0!=(0|ze(t))&&(1!=(0|e)&&(0|i[w>>2])!=(0|r))){switch(K(_+(((O+5|0)%6|0)<<4)+4|0,x),K(_+(O<<4)+4|0,A),C=+(0|i[u>>2]),o[g>>3]=3*C,o[c>>3]=0,P=-1.5*C,o[m>>3]=P,o[d>>3]=2.598076211353316*C,o[y>>3]=P,o[f>>3]=-2.598076211353316*C,O=0|i[b>>2],0|i[17008+(80*O|0)+(((0|r)==(0|O)?0|i[w>>2]:r)<<2)>>2]){case 1:e=m,r=g;break;case 3:e=y,r=m;break;case 2:e=g,r=y;break;default:e=8;break e}at(x,A,r,e,v),0|st(x,v)||0|st(A,v)||(ye(v,0|i[b>>2],s,1,a+8+(i[a>>2]<<4)|0),i[a>>2]=1+(0|i[a>>2]))}if((0|T)<(0|l)&&(K(h,x),ye(x,0|i[w>>2],s,1,a+8+(i[a>>2]<<4)|0),i[a>>2]=1+(0|i[a>>2])),(0|(T=T+1|0))>=(0|p)){e=3;break}r=0|i[w>>2]}3!=(0|e)?8==(0|e)&&M(22557,22521,746,22602):L=E}}function Ee(e,t,n){e|=0,t|=0,n|=0;var r,o=0,a=0,s=0,l=0,u=0;r=L,L=L+160|0,a=r,l=20336,u=(s=o=r+80|0)+72|0;do{i[s>>2]=i[l>>2],s=s+4|0,l=l+4|0}while((0|s)<(0|u));l=20416,u=(s=a)+72|0;do{i[s>>2]=i[l>>2],s=s+4|0,l=l+4|0}while((0|s)<(0|u));o=(u=0==(0|ze(0|i[t>>2])))?o:a,ce(a=e+4|0),de(a),0|ze(0|i[t>>2])&&(ie(a),i[t>>2]=1+(0|i[t>>2])),i[n>>2]=i[e>>2],Q(a,o,t=n+4|0),Z(t),i[n+16>>2]=i[e>>2],Q(a,o+12|0,t=n+20|0),Z(t),i[n+32>>2]=i[e>>2],Q(a,o+24|0,t=n+36|0),Z(t),i[n+48>>2]=i[e>>2],Q(a,o+36|0,t=n+52|0),Z(t),i[n+64>>2]=i[e>>2],Q(a,o+48|0,t=n+68|0),Z(t),i[n+80>>2]=i[e>>2],Q(a,o+60|0,n=n+84|0),Z(n),L=r}function Oe(e){var t;return t=(e=+e)<0?e+6.283185307179586:e,+(e>=6.283185307179586?t+-6.283185307179586:t)}function Se(e,t){return t|=0,+l(+(+o[(e|=0)>>3]-+o[t>>3]))<17453292519943298e-27?0|(t=+l(+(+o[e+8>>3]-+o[t+8>>3]))<17453292519943298e-27):0|(t=0)}function Te(e,t){e|=0;var n,r,i,a=0;return r=+o[(t|=0)>>3],n=+o[e>>3],a=(i=+f(.5*(r-n)))*i+(a=+f(.5*(+o[t+8>>3]-+o[e+8>>3])))*(+d(+r)*+d(+n)*a),2*+m(+ +u(+a),+ +u(+(1-a)))*6371.007180918475}function Ce(e,t,n){e|=0,n|=0;var r,i,a,s,l=0,c=0,p=0,A=0,y=0,v=0;return v=+o[(t|=0)>>3],a=+o[e>>3],y=+f(.5*(v-a)),p=+o[t+8>>3],i=+o[e+8>>3],A=+f(.5*(p-i)),r=+d(+a),s=+d(+v),A=2*+m(+ +u(+(A=y*y+A*(s*r*A))),+ +u(+(1-A))),y=+o[n>>3],v=+f(.5*(y-v)),l=+o[n+8>>3],p=+f(.5*(l-p)),c=+d(+y),p=2*+m(+ +u(+(p=v*v+p*(s*c*p))),+ +u(+(1-p))),y=+f(.5*(a-y)),l=+f(.5*(i-l)),l=2*+m(+ +u(+(l=y*y+l*(r*c*l))),+ +u(+(1-l))),4*+g(+ +u(+ +h(.5*(c=.5*(A+p+l)))*+h(.5*(c-A))*+h(.5*(c-p))*+h(.5*(c-l))))}function Le(e,t){return t=0|Mt(0|(e|=0),0|(t|=0),45),x(),127&t|0}function Pe(e,t){var n=0,r=0,i=0,o=0,a=0,s=0;if(!(!0&134217728==(-16777216&(t|=0)|0)))return 0|(t=0);if(a=0|Mt(0|(e|=0),0|t,45),x(),(a&=127)>>>0>121)return 0|(t=0);n=0|Mt(0|e,0|t,52),x(),n&=15;do{if(0|n){for(i=1,r=0;;){if(o=0|Mt(0|e,0|t,3*(15-i|0)|0),x(),0!=(0|(o&=7))&(1^r)){if(1==(0|o)&0!=(0|j(a))){s=0,r=13;break}r=1}if(7==(0|o)){s=0,r=13;break}if(!(i>>>0>>0)){r=9;break}i=i+1|0}if(9==(0|r)){if(15!=(0|n))break;return 0|(s=1)}if(13==(0|r))return 0|s}}while(0);for(;;){if(s=0|Mt(0|e,0|t,3*(14-n|0)|0),x(),!(7==(7&s|0)&!0)){s=0,r=13;break}if(!(n>>>0<14)){s=1,r=13;break}n=n+1|0}return 13==(0|r)?0|s:0}function Ie(e,t,n){n|=0;var r=0,i=0;if(r=0|Mt(0|(e|=0),0|(t|=0),52),x(),(0|(r&=15))>=(0|n)){if((0|r)!=(0|n))if(n>>>0<=15){if(e|=i=0|Et(0|n,0,52),t=0|x()|-15728641&t,(0|r)>(0|n))do{i=0|Et(7,0,3*(14-n|0)|0),n=n+1|0,e|=i,t=0|x()|t}while((0|n)<(0|r))}else t=0,e=0}else t=0,e=0;return w(0|t),0|e}function De(e,t,n,r){n|=0,r|=0;var o,a=0,s=0,l=0,u=0,c=0,d=0;if(l=0|Mt(0|(e|=0),0|(t|=0),52),x(),(0|n)<16&(0|(l&=15))<=(0|n)){if((0|l)==(0|n))return i[(n=r)>>2]=e,void(i[n+4>>2]=t);if(o=(0|(c=0|tt(7,n-l|0)))/7|0,u=0|Mt(0|e,0|t,45),x(),0|j(127&u)){e:do{if(l)for(s=1;;){if(a=0|Mt(0|e,0|t,3*(15-s|0)|0),x(),0|(a&=7))break e;if(!(s>>>0>>0)){a=0;break}s=s+1|0}else a=0}while(0);s=0==(0|a)}else s=0;if(d=0|Et(l+1|0,0,52),a=0|x()|-15728641&t,De(t=(d|e)&~(t=0|Et(7,0,0|(u=3*(14-l|0)|0))),l=a&~(0|x()),n,r),a=r+(o<<3)|0,!s)return De((d=0|Et(1,0,0|u))|t,0|x()|l,n,a),d=a+(o<<3)|0,De((c=0|Et(2,0,0|u))|t,0|x()|l,n,d),d=d+(o<<3)|0,De((c=0|Et(3,0,0|u))|t,0|x()|l,n,d),d=d+(o<<3)|0,De((c=0|Et(4,0,0|u))|t,0|x()|l,n,d),d=d+(o<<3)|0,De((c=0|Et(5,0,0|u))|t,0|x()|l,n,d),void De((c=0|Et(6,0,0|u))|t,0|x()|l,n,d+(o<<3)|0);s=a+(o<<3)|0,(0|c)>6&&(Ct(0|a,0,(d=(s>>>0>(c=a+8|0)>>>0?s:c)+-1+(0-a)|0)+8&-8|0),a=c+(d>>>3<<3)|0),De((d=0|Et(2,0,0|u))|t,0|x()|l,n,a),d=a+(o<<3)|0,De((c=0|Et(3,0,0|u))|t,0|x()|l,n,d),d=d+(o<<3)|0,De((c=0|Et(4,0,0|u))|t,0|x()|l,n,d),d=d+(o<<3)|0,De((c=0|Et(5,0,0|u))|t,0|x()|l,n,d),De((c=0|Et(6,0,0|u))|t,0|x()|l,n,d+(o<<3)|0)}}function ke(e,t){var n=0,r=0,i=0;if(i=0|Mt(0|(e|=0),0|(t|=0),45),x(),!(0|j(127&i)))return 0|(i=0);i=0|Mt(0|e,0|t,52),x(),i&=15;e:do{if(i)for(r=1;;){if(n=0|Mt(0|e,0|t,3*(15-r|0)|0),x(),0|(n&=7))break e;if(!(r>>>0>>0)){n=0;break}r=r+1|0}else n=0}while(0);return 0|(i=0==(0|n)&1)}function Re(e,t){var n=0,r=0,i=0;if(i=0|Mt(0|(e|=0),0|(t|=0),52),x(),!(i&=15))return 0|(i=0);for(r=1;;){if(n=0|Mt(0|e,0|t,3*(15-r|0)|0),x(),0|(n&=7)){r=5;break}if(!(r>>>0>>0)){n=0,r=5;break}r=r+1|0}return 5==(0|r)?0|n:0}function je(e,t){var n=0,r=0,i=0,o=0,a=0,s=0,l=0;if(l=0|Mt(0|(e|=0),0|(t|=0),52),x(),!(l&=15))return l=e,w(0|(s=t)),0|l;for(s=1,n=0;;){r=0|Et(7,0,0|(o=3*(15-s|0)|0)),i=0|x(),a=0|Mt(0|e,0|t,0|o),x(),e=(o=0|Et(0|le(7&a),0,0|o))|e&~r,t=(a=0|x())|t&~i;e:do{if(!n)if(0==(o&r|0)&0==(a&i|0))n=0;else if(r=0|Mt(0|e,0|t,52),x(),r&=15){n=1;t:for(;;){switch(a=0|Mt(0|e,0|t,3*(15-n|0)|0),x(),7&a){case 1:break t;case 0:break;default:n=1;break e}if(!(n>>>0>>0)){n=1;break e}n=n+1|0}for(n=1;;){if(i=0|Mt(0|e,0|t,0|(a=3*(15-n|0)|0)),x(),o=0|Et(7,0,0|a),t&=~(0|x()),e=e&~o|(a=0|Et(0|le(7&i),0,0|a)),t=0|t|x(),!(n>>>0>>0)){n=1;break}n=n+1|0}}else n=1}while(0);if(!(s>>>0>>0))break;s=s+1|0}return w(0|t),0|e}function Fe(e,t){var n=0,r=0,i=0,o=0,a=0;if(r=0|Mt(0|(e|=0),0|(t|=0),52),x(),!(r&=15))return r=e,w(0|(n=t)),0|r;for(n=1;a=0|Mt(0|e,0|t,0|(o=3*(15-n|0)|0)),x(),i=0|Et(7,0,0|o),t&=~(0|x()),e=(o=0|Et(0|le(7&a),0,0|o))|e&~i,t=0|x()|t,n>>>0>>0;)n=n+1|0;return w(0|t),0|e}function Ne(e,t){var n=0,r=0,i=0,o=0,a=0,s=0,l=0;if(l=0|Mt(0|(e|=0),0|(t|=0),52),x(),!(l&=15))return l=e,w(0|(s=t)),0|l;for(s=1,n=0;;){r=0|Et(7,0,0|(o=3*(15-s|0)|0)),i=0|x(),a=0|Mt(0|e,0|t,0|o),x(),e=(o=0|Et(0|ue(7&a),0,0|o))|e&~r,t=(a=0|x())|t&~i;e:do{if(!n)if(0==(o&r|0)&0==(a&i|0))n=0;else if(r=0|Mt(0|e,0|t,52),x(),r&=15){n=1;t:for(;;){switch(a=0|Mt(0|e,0|t,3*(15-n|0)|0),x(),7&a){case 1:break t;case 0:break;default:n=1;break e}if(!(n>>>0>>0)){n=1;break e}n=n+1|0}for(n=1;;){if(o=0|Et(7,0,0|(i=3*(15-n|0)|0)),a=t&~(0|x()),t=0|Mt(0|e,0|t,0|i),x(),e=e&~o|(t=0|Et(0|ue(7&t),0,0|i)),t=0|a|x(),!(n>>>0>>0)){n=1;break}n=n+1|0}}else n=1}while(0);if(!(s>>>0>>0))break;s=s+1|0}return w(0|t),0|e}function Be(e,t){var n=0,r=0,i=0,o=0,a=0;if(r=0|Mt(0|(e|=0),0|(t|=0),52),x(),!(r&=15))return r=e,w(0|(n=t)),0|r;for(n=1;o=0|Et(7,0,0|(a=3*(15-n|0)|0)),i=t&~(0|x()),t=0|Mt(0|e,0|t,0|a),x(),e=(t=0|Et(0|ue(7&t),0,0|a))|e&~o,t=0|x()|i,n>>>0>>0;)n=n+1|0;return w(0|t),0|e}function ze(e){return 0|(0|(e|=0))%2}function Ue(e,t){e|=0;var n,r;return r=L,L=L+16|0,n=r,(t|=0)>>>0<=15&&2146435072!=(2146435072&i[e+4>>2]|0)&&2146435072!=(2146435072&i[e+8+4>>2]|0)?(!function(e,t,n){var r,i;r=L,L=L+16|0,me(e|=0,t|=0,n|=0,i=r),X(i,n+4|0),L=r}(e,t,n),t=0|function(e,t){e|=0;var n,r=0,o=0,a=0,s=0,l=0,u=0,c=0,d=0;if(n=L,L=L+64|0,u=n+40|0,o=n+24|0,a=n+12|0,s=n,Et(0|(t|=0),0,52),r=134225919|x(),!t)return(0|i[e+4>>2])>2||(0|i[e+8>>2])>2||(0|i[e+12>>2])>2?(u=0,w(0|(l=0)),L=n,0|u):(Et(0|N(e),0,45),l=0|x()|r,u=-1,w(0|l),L=n,0|u);if(i[u>>2]=i[e>>2],i[u+4>>2]=i[e+4>>2],i[u+8>>2]=i[e+8>>2],i[u+12>>2]=i[e+12>>2],l=u+4|0,(0|t)>0)for(e=-1;i[o>>2]=i[l>>2],i[o+4>>2]=i[l+4>>2],i[o+8>>2]=i[l+8>>2],1&t?(te(l),i[a>>2]=i[l>>2],i[a+4>>2]=i[l+4>>2],i[a+8>>2]=i[l+8>>2],re(a)):(ne(l),i[a>>2]=i[l>>2],i[a+4>>2]=i[l+4>>2],i[a+8>>2]=i[l+8>>2],ie(a)),J(o,a,s),Z(s),c=0|Et(7,0,0|(d=3*(15-t|0)|0)),r&=~(0|x()),e=(d=0|Et(0|ee(s),0,0|d))|e&~c,r=0|x()|r,(0|t)>1;)t=t+-1|0;else e=-1;e:do{if((0|i[l>>2])<=2&&(0|i[u+8>>2])<=2&&(0|i[u+12>>2])<=2){if(t=0|Et(0|(o=0|N(u)),0,45),t|=e,e=0|x()|-1040385&r,s=0|B(u),!(0|j(o))){if((0|s)<=0)break;for(a=0;;){if(o=0|Mt(0|t,0|e,52),x(),o&=15)for(r=1;u=0|Mt(0|t,0|e,0|(d=3*(15-r|0)|0)),x(),c=0|Et(7,0,0|d),e&=~(0|x()),t=t&~c|(d=0|Et(0|le(7&u),0,0|d)),e=0|e|x(),r>>>0>>0;)r=r+1|0;if((0|(a=a+1|0))==(0|s))break e}}a=0|Mt(0|t,0|e,52),x(),a&=15;t:do{if(a){r=1;n:for(;;){switch(d=0|Mt(0|t,0|e,3*(15-r|0)|0),x(),7&d){case 1:break n;case 0:break;default:break t}if(!(r>>>0>>0))break t;r=r+1|0}if(0|z(o,0|i[u>>2]))for(r=1;c=0|Et(7,0,0|(u=3*(15-r|0)|0)),d=e&~(0|x()),e=0|Mt(0|t,0|e,0|u),x(),t=t&~c|(e=0|Et(0|ue(7&e),0,0|u)),e=0|d|x(),r>>>0>>0;)r=r+1|0;else for(r=1;u=0|Mt(0|t,0|e,0|(d=3*(15-r|0)|0)),x(),c=0|Et(7,0,0|d),e&=~(0|x()),t=t&~c|(d=0|Et(0|le(7&u),0,0|d)),e=0|e|x(),r>>>0>>0;)r=r+1|0}}while(0);if((0|s)>0){r=0;do{t=0|je(t,e),e=0|x(),r=r+1|0}while((0|r)!=(0|s))}}else t=0,e=0}while(0);return d=t,w(0|(c=e)),L=n,0|d}(n,t),e=0|x()):(e=0,t=0),w(0|e),L=r,0|t}function He(e,t,n){var r,o=0,a=0,s=0;if(r=(n|=0)+4|0,a=0|Mt(0|(e|=0),0|(t|=0),52),x(),a&=15,s=0|Mt(0|e,0|t,45),x(),o=0==(0|a),0|j(127&s)){if(o)return 0|(s=1);o=1}else{if(o)return 0|(s=0);o=0==(0|i[r>>2])&&0==(0|i[n+8>>2])?0!=(0|i[n+12>>2])&1:1}for(n=1;1&n?re(r):ie(r),s=0|Mt(0|e,0|t,3*(15-n|0)|0),x(),oe(r,7&s),n>>>0>>0;)n=n+1|0;return 0|o}function Ve(e,t,n){n|=0;var r,o,a=0,s=0,l=0,u=0,c=0,d=0;o=L,L=L+16|0,r=o,d=0|Mt(0|(e|=0),0|(t|=0),45),x(),d&=127;e:do{if(0!=(0|j(d))&&(l=0|Mt(0|e,0|t,52),x(),0!=(0|(l&=15)))){a=1;t:for(;;){switch(c=0|Mt(0|e,0|t,3*(15-a|0)|0),x(),7&c){case 5:break t;case 0:break;default:a=t;break e}if(!(a>>>0>>0)){a=t;break e}a=a+1|0}for(s=1,a=t;u=0|Et(7,0,0|(t=3*(15-s|0)|0)),c=a&~(0|x()),a=0|Mt(0|e,0|a,0|t),x(),e=e&~u|(a=0|Et(0|ue(7&a),0,0|t)),a=0|c|x(),s>>>0>>0;)s=s+1|0}else a=t}while(0);if(c=7728+(28*d|0)|0,i[n>>2]=i[c>>2],i[n+4>>2]=i[c+4>>2],i[n+8>>2]=i[c+8>>2],i[n+12>>2]=i[c+12>>2],0|He(e,a,n)){if(u=n+4|0,i[r>>2]=i[u>>2],i[r+4>>2]=i[u+4>>2],i[r+8>>2]=i[u+8>>2],l=0|Mt(0|e,0|a,52),x(),c=15&l,1&l?(ie(u),l=c+1|0):l=c,0|j(d)){e:do{if(c)for(t=1;;){if(s=0|Mt(0|e,0|a,3*(15-t|0)|0),x(),0|(s&=7)){a=s;break e}if(!(t>>>0>>0)){a=0;break}t=t+1|0}else a=0}while(0);a=4==(0|a)&1}else a=0;if(0|we(n,l,a,0)){if(0|j(d))do{}while(0!=(0|we(n,l,0,0)));(0|l)!=(0|c)&&ne(u)}else(0|l)!=(0|c)&&(i[u>>2]=i[r>>2],i[u+4>>2]=i[r+4>>2],i[u+8>>2]=i[r+8>>2]);L=o}else L=o}function Ge(e,t,n){n|=0;var r,i;r=L,L=L+16|0,Ve(e|=0,t|=0,i=r),t=0|Mt(0|e,0|t,52),x(),ve(i,15&t,n),L=r}function Ye(e,t,n){n|=0;var r,i,o=0,a=0;i=L,L=L+16|0,Ve(e|=0,t|=0,r=i),o=0|Mt(0|e,0|t,45),x(),o=0==(0|j(127&o)),a=0|Mt(0|e,0|t,52),x(),a&=15;e:do{if(!o){if(0|a)for(o=1;;){if(!(0==((0|Et(7,0,3*(15-o|0)|0))&e|0)&0==((0|x())&t|0)))break e;if(!(o>>>0>>0))break;o=o+1|0}return be(r,a,0,5,n),void(L=i)}}while(0);Me(r,a,0,6,n),L=i}function We(e,t){t|=0;var n,r=0,o=0,a=0,s=0,l=0,u=0;if(Et(0|(e|=0),0,52),n=134225919|x(),(0|e)<1){o=0,r=0;do{0|j(o)&&(Et(0|o,0,45),l=0|n|x(),i[(e=t+(r<<3)|0)>>2]=-1,i[e+4>>2]=l,r=r+1|0),o=o+1|0}while(122!=(0|o))}else{l=0,r=0;do{if(0|j(l)){for(Et(0|l,0,45),o=1,a=-1,s=0|n|x();a&=~(u=0|Et(7,0,3*(15-o|0)|0)),s&=~(0|x()),(0|o)!=(0|e);)o=o+1|0;i[(u=t+(r<<3)|0)>>2]=a,i[u+4>>2]=s,r=r+1|0}l=l+1|0}while(122!=(0|l))}}function qe(e,t,n,r){var o,a=0,s=0,l=0,u=0,c=0;if(o=L,L=L+64|0,l=o,(0|(e|=0))==(0|(n|=0))&(0|(t|=0))==(0|(r|=0))|!1|134217728!=(2013265920&t|0)|!1|134217728!=(2013265920&r|0))return L=o,0|(l=0);if(a=0|Mt(0|e,0|t,52),x(),a&=15,s=0|Mt(0|n,0|r,52),x(),(0|a)!=(15&s|0))return L=o,0|(l=0);if(s=a+-1|0,a>>>0>1&&(c=0|Ie(e,t,s),u=0|x(),(0|c)==(0|(s=0|Ie(n,r,s)))&(0|u)==(0|x()))){if(a=0|Mt(0|e,0|t,0|(s=3*(15^a)|0)),x(),a&=7,s=0|Mt(0|n,0|r,0|s),x(),0==(0|a)|0==(0|(s&=7)))return L=o,0|(c=1);if((0|i[21136+(a<<2)>>2])==(0|s))return L=o,0|(c=1);if((0|i[21168+(a<<2)>>2])==(0|s))return L=o,0|(c=1)}s=(a=l)+56|0;do{i[a>>2]=0,a=a+4|0}while((0|a)<(0|s));return P(e,t,1,l),a=(0|i[(c=l)>>2])==(0|n)&&(0|i[c+4>>2])==(0|r)||(0|i[(c=l+8|0)>>2])==(0|n)&&(0|i[c+4>>2])==(0|r)||(0|i[(c=l+16|0)>>2])==(0|n)&&(0|i[c+4>>2])==(0|r)||(0|i[(c=l+24|0)>>2])==(0|n)&&(0|i[c+4>>2])==(0|r)||(0|i[(c=l+32|0)>>2])==(0|n)&&(0|i[c+4>>2])==(0|r)||(0|i[(c=l+40|0)>>2])==(0|n)&&(0|i[c+4>>2])==(0|r)?1:1&((0|i[(a=l+48|0)>>2])==(0|n)?(0|i[a+4>>2])==(0|r):0),L=o,0|(c=a)}function Xe(e,t,n){n|=0;var r,o,a,s,l=0;if(a=L,L=L+16|0,o=a,l=0|Mt(0|(e|=0),0|(t|=0),56),x(),-1==(0|(t=0|function(e,t,n){n|=0;var r,o=0;if(o=0|ke(e=e|0,t=t|0),(n+-1|0)>>>0>5)return 0|(n=-1);if(1==(0|n)&(r=0!=(0|o)))return 0|(n=-1);return o=0|function(e,t){var n,r,o,a=0,s=0,l=0,u=0,c=0;if(o=L,L=L+32|0,r=o,Ve(e=e|0,t=t|0,n=o+16|0),l=0|Le(e,t),c=0|Re(e,t),function(e,t){e=7728+(28*(e|=0)|0)|0,i[(t|=0)>>2]=i[e>>2],i[t+4>>2]=i[e+4>>2],i[t+8>>2]=i[e+8>>2],i[t+12>>2]=i[e+12>>2]}(l,r),t=0|function(e,t){e|=0;var n=0,r=0;if((t|=0)>>>0>20)return 0|(t=-1);do{if((0|i[11152+(216*t|0)>>2])!=(0|e))if((0|i[11152+(216*t|0)+8>>2])!=(0|e))if((0|i[11152+(216*t|0)+16>>2])!=(0|e))if((0|i[11152+(216*t|0)+24>>2])!=(0|e))if((0|i[11152+(216*t|0)+32>>2])!=(0|e))if((0|i[11152+(216*t|0)+40>>2])!=(0|e))if((0|i[11152+(216*t|0)+48>>2])!=(0|e))if((0|i[11152+(216*t|0)+56>>2])!=(0|e))if((0|i[11152+(216*t|0)+64>>2])!=(0|e))if((0|i[11152+(216*t|0)+72>>2])!=(0|e))if((0|i[11152+(216*t|0)+80>>2])!=(0|e))if((0|i[11152+(216*t|0)+88>>2])!=(0|e))if((0|i[11152+(216*t|0)+96>>2])!=(0|e))if((0|i[11152+(216*t|0)+104>>2])!=(0|e))if((0|i[11152+(216*t|0)+112>>2])!=(0|e))if((0|i[11152+(216*t|0)+120>>2])!=(0|e))if((0|i[11152+(216*t|0)+128>>2])!=(0|e)){if((0|i[11152+(216*t|0)+136>>2])!=(0|e)){if((0|i[11152+(216*t|0)+144>>2])==(0|e)){e=0,n=2,r=0;break}if((0|i[11152+(216*t|0)+152>>2])==(0|e)){e=0,n=2,r=1;break}if((0|i[11152+(216*t|0)+160>>2])==(0|e)){e=0,n=2,r=2;break}if((0|i[11152+(216*t|0)+168>>2])==(0|e)){e=1,n=2,r=0;break}if((0|i[11152+(216*t|0)+176>>2])==(0|e)){e=1,n=2,r=1;break}if((0|i[11152+(216*t|0)+184>>2])==(0|e)){e=1,n=2,r=2;break}if((0|i[11152+(216*t|0)+192>>2])==(0|e)){e=2,n=2,r=0;break}if((0|i[11152+(216*t|0)+200>>2])==(0|e)){e=2,n=2,r=1;break}if((0|i[11152+(216*t|0)+208>>2])==(0|e)){e=2,n=2,r=2;break}return 0|(e=-1)}e=2,n=1,r=2}else e=2,n=1,r=1;else e=2,n=1,r=0;else e=1,n=1,r=2;else e=1,n=1,r=1;else e=1,n=1,r=0;else e=0,n=1,r=2;else e=0,n=1,r=1;else e=0,n=1,r=0;else e=2,n=0,r=2;else e=2,n=0,r=1;else e=2,n=0,r=0;else e=1,n=0,r=2;else e=1,n=0,r=1;else e=1,n=0,r=0;else e=0,n=0,r=2;else e=0,n=0,r=1;else e=0,n=0,r=0}while(0);return 0|(t=0|i[11152+(216*t|0)+(72*n|0)+(24*e|0)+(r<<3)+4>>2])}(l,0|i[n>>2]),!(0|j(l)))return L=o,0|(c=t);switch(0|l){case 4:e=0,a=14;break;case 14:e=1,a=14;break;case 24:e=2,a=14;break;case 38:e=3,a=14;break;case 49:e=4,a=14;break;case 58:e=5,a=14;break;case 63:e=6,a=14;break;case 72:e=7,a=14;break;case 83:e=8,a=14;break;case 97:e=9,a=14;break;case 107:e=10,a=14;break;case 117:e=11,a=14;break;default:u=0,s=0}14==(0|a)&&(u=0|i[22096+(24*e|0)+8>>2],s=0|i[22096+(24*e|0)+16>>2]);(0|(e=0|i[n>>2]))!=(0|i[r>>2])&&(l=0|F(l),e=0|i[n>>2],l|(0|e)==(0|s)&&(t=(t+1|0)%6|0));if(3==(0|c)&(0|e)==(0|s))return L=o,0|(c=(t+5|0)%6|0);if(!(5==(0|c)&(0|e)==(0|u)))return L=o,0|(c=t);return L=o,0|(c=(t+1|0)%6|0)}(e,t),r?0|(n=(5-o+(0|i[22384+(n<<2)>>2])|0)%5|0):0|(n=(6-o+(0|i[22416+(n<<2)>>2])|0)%6|0)}(r=(s=!0&268435456==(2013265920&t|0))?e:0,e=s?-2130706433&t|134217728:0,7&l))))return i[n>>2]=0,void(L=a);Ve(r,e,o),l=0|Mt(0|r,0|e,52),x(),l&=15,0|ke(r,e)?be(o,l,t,2,n):Me(o,l,t,2,n),L=a}function Ze(e){e|=0;var t,n,r=0;return(t=0|vt(1,12))||M(22691,22646,49,22704),0|(r=0|i[(n=e+4|0)>>2])?(i[(r=r+8|0)>>2]=t,i[n>>2]=t,0|t):(0|i[e>>2]&&M(22721,22646,61,22744),i[(r=e)>>2]=t,i[n>>2]=t,0|t)}function Ke(e,t){e|=0,t|=0;var n,r;return(r=0|mt(24))||M(22758,22646,78,22772),i[r>>2]=i[t>>2],i[r+4>>2]=i[t+4>>2],i[r+8>>2]=i[t+8>>2],i[r+12>>2]=i[t+12>>2],i[r+16>>2]=0,0|(n=0|i[(t=e+4|0)>>2])?(i[n+16>>2]=r,i[t>>2]=r,0|r):(0|i[e>>2]&&M(22787,22646,82,22772),i[e>>2]=r,i[t>>2]=r,0|r)}function Qe(e){var t,n,r=0,a=0,s=0,u=0,c=0,d=0,f=0,h=0,p=0,A=0,g=0,m=0,y=0,v=0,b=0,_=0,w=0,x=0,E=0,O=0,S=0,T=0,C=0,L=0,P=0,I=0,D=0,k=0,R=0,j=0;if(0|i[(u=(e|=0)+8|0)>>2])return 0|(j=1);if(!(s=0|i[e>>2]))return 0|(j=0);r=s,a=0;do{a=a+1|0,r=0|i[r+8>>2]}while(0!=(0|r));if(a>>>0<2)return 0|(j=0);(n=0|mt(a<<2))||M(22807,22646,317,22826),(t=0|mt(a<<5))||M(22848,22646,321,22826),i[e>>2]=0,i[(T=e+4|0)>>2]=0,i[u>>2]=0,a=0,k=0,S=0,g=0;e:for(;;){if(A=0|i[s>>2]){c=0,d=A;do{if(h=+o[d+8>>3],r=d,d=0|i[d+16>>2],f=+o[(u=(p=0==(0|d))?A:d)+8>>3],+l(+(h-f))>3.141592653589793){j=14;break}c+=(f-h)*(+o[r>>3]+ +o[u>>3])}while(!p);if(14==(0|j)){j=0,c=0,r=A;do{O=+o[r+8>>3],I=0|i[(D=r+16|0)>>2],E=+o[(I=0==(0|I)?A:I)+8>>3],c+=(+o[r>>3]+ +o[I>>3])*((E<0?E+6.283185307179586:E)-(O<0?O+6.283185307179586:O)),r=0|i[(0==(0|r)?s:D)>>2]}while(0!=(0|r))}c>0?(i[n+(k<<2)>>2]=s,k=k+1|0,u=S,r=g):j=19}else j=19;if(19==(0|j)){j=0;do{if(!a){if(g){u=T,d=g+8|0,r=s,a=e;break}if(0|i[e>>2]){j=27;break e}u=T,d=e,r=s,a=e;break}if(0|i[(r=a+8|0)>>2]){j=21;break e}if(!(a=0|vt(1,12))){j=23;break e}i[r>>2]=a,u=a+4|0,d=a,r=g}while(0);if(i[d>>2]=s,i[u>>2]=s,d=t+(S<<5)|0,p=0|i[s>>2]){for(o[(A=t+(S<<5)+8|0)>>3]=17976931348623157e292,o[(g=t+(S<<5)+24|0)>>3]=17976931348623157e292,o[d>>3]=-17976931348623157e292,o[(m=t+(S<<5)+16|0)>>3]=-17976931348623157e292,w=17976931348623157e292,x=-17976931348623157e292,u=0,y=p,h=17976931348623157e292,b=17976931348623157e292,_=-17976931348623157e292,f=-17976931348623157e292;c=+o[y>>3],O=+o[y+8>>3],y=0|i[y+16>>2],E=+o[((v=0==(0|y))?p:y)+8>>3],c>3]=c,h=c),O>3]=O,b=O),c>_?o[d>>3]=c:c=_,O>f&&(o[m>>3]=O,f=O),w=O>0&Ox?O:x,u|=+l(+(O-E))>3.141592653589793,!v;)_=c;u&&(o[m>>3]=x,o[g>>3]=w)}else i[d>>2]=0,i[d+4>>2]=0,i[d+8>>2]=0,i[d+12>>2]=0,i[d+16>>2]=0,i[d+20>>2]=0,i[d+24>>2]=0,i[d+28>>2]=0;u=S+1|0}if(s=0|i[(D=s+8|0)>>2],i[D>>2]=0,!s){j=45;break}S=u,g=r}if(21==(0|j))M(22624,22646,35,22658);else if(23==(0|j))M(22678,22646,37,22658);else if(27==(0|j))M(22721,22646,61,22744);else if(45==(0|j)){e:do{if((0|k)>0){for(D=0==(0|u),P=u<<2,I=0==(0|e),L=0,r=0;;){if(C=0|i[n+(L<<2)>>2],D)j=73;else{if(!(S=0|mt(P))){j=50;break}if(!(T=0|mt(P))){j=52;break}t:do{if(I)a=0;else{for(u=0,a=0,d=e;s=t+(u<<5)|0,0|Je(0|i[d>>2],s,0|i[C>>2])?(i[S+(a<<2)>>2]=d,i[T+(a<<2)>>2]=s,v=a+1|0):v=a,d=0|i[d+8>>2];)u=u+1|0,a=v;if((0|v)>0)if(s=0|i[S>>2],1==(0|v))a=s;else for(m=0,y=-1,a=s,g=s;;){for(p=0|i[g>>2],s=0,d=0;A=(0|(u=0|i[i[S+(d<<2)>>2]>>2]))==(0|p)?s:s+(1&(0|Je(u,0|i[T+(d<<2)>>2],0|i[p>>2])))|0,(0|(d=d+1|0))!=(0|v);)s=A;if(a=(u=(0|A)>(0|y))?g:a,(0|(s=m+1|0))==(0|v))break t;m=s,y=u?A:y,g=0|i[S+(s<<2)>>2]}else a=0}}while(0);if(yt(S),yt(T),a){if(s=0|i[(u=a+4|0)>>2])a=s+8|0;else if(0|i[a>>2]){j=70;break}i[a>>2]=C,i[u>>2]=C}else j=73}if(73==(0|j)){if(j=0,0|(r=0|i[C>>2]))do{T=r,r=0|i[r+16>>2],yt(T)}while(0!=(0|r));yt(C),r=2}if((0|(L=L+1|0))>=(0|k)){R=r;break e}}50==(0|j)?M(22863,22646,249,22882):52==(0|j)?M(22901,22646,252,22882):70==(0|j)&&M(22721,22646,61,22744)}else R=0}while(0);return yt(n),yt(t),0|(j=R)}return 0}function Je(e,t,n){e|=0;var r,a=0,s=0,l=0,u=0,c=0,d=0,f=0;if(!(0|G(t|=0,n|=0)))return 0|(e=0);if(t=0|V(t),r=+o[n>>3],a=t&(a=+o[n+8>>3])<0?a+6.283185307179586:a,!(e=0|i[e>>2]))return 0|(e=0);if(t){t=0,n=e;e:for(;;){for(;u=+o[n>>3],d=+o[n+8>>3],f=0|i[(n=n+16|0)>>2],l=+o[(f=0==(0|f)?e:f)>>3],s=+o[f+8>>3],u>l?(c=u,u=d):(c=l,l=u,u=s,s=d),rc;)if(!(n=0|i[n>>2])){n=22;break e}if(a=(u=u<0?u+6.283185307179586:u)==a|(d=s<0?s+6.283185307179586:s)==a?a+-2220446049250313e-31:a,((d+=(r-l)/(c-l)*(u-d))<0?d+6.283185307179586:d)>a&&(t^=1),!(n=0|i[n>>2])){n=22;break}}if(22==(0|n))return 0|t}else{t=0,n=e;e:for(;;){for(;u=+o[n>>3],d=+o[n+8>>3],f=0|i[(n=n+16|0)>>2],l=+o[(f=0==(0|f)?e:f)>>3],s=+o[f+8>>3],u>l?(c=u,u=d):(c=l,l=u,u=s,s=d),rc;)if(!(n=0|i[n>>2])){n=22;break e}if(s+(r-l)/(c-l)*(u-s)>(a=u==a|s==a?a+-2220446049250313e-31:a)&&(t^=1),!(n=0|i[n>>2])){n=22;break}}if(22==(0|n))return 0|t}return 0}function $e(e,t,n,o,a){n|=0,o|=0,a|=0;var s,l,u,c,d=0,f=0,h=0,p=0,A=0,g=0,m=0,y=0,v=0,b=0;if(c=L,L=L+32|0,b=c+16|0,u=c,d=0|Mt(0|(e|=0),0|(t|=0),52),x(),d&=15,m=0|Mt(0|n,0|o,52),x(),(0|d)!=(15&m|0))return L=c,0|(b=1);if(A=0|Mt(0|e,0|t,45),x(),A&=127,g=0|Mt(0|n,0|o,45),x(),m=(0|A)!=(0|(g&=127))){if(7==(0|(h=0|H(A,g))))return L=c,0|(b=2);7==(0|(p=0|H(g,A)))?M(22925,22949,151,22959):(y=h,f=p)}else y=0,f=0;s=0|j(A),l=0|j(g),i[b>>2]=0,i[b+4>>2]=0,i[b+8>>2]=0,i[b+12>>2]=0;do{if(y){if(h=(0|(g=0|i[4304+(28*A|0)+(y<<2)>>2]))>0,l)if(h){A=0,p=n,h=o;do{p=0|Ne(p,h),h=0|x(),1==(0|(f=0|ue(f)))&&(f=0|ue(1)),A=A+1|0}while((0|A)!=(0|g));g=f,A=p,p=h}else g=f,A=n,p=o;else if(h){A=0,p=n,h=o;do{p=0|Be(p,h),h=0|x(),f=0|ue(f),A=A+1|0}while((0|A)!=(0|g));g=f,A=p,p=h}else g=f,A=n,p=o;if(He(A,p,b),m||M(22972,22949,181,22959),(h=0!=(0|s))&(f=0!=(0|l))&&M(22999,22949,182,22959),h){if(f=0|Re(e,t),0|r[22032+(7*f|0)+y>>0]){d=3;break}A=p=0|i[21200+(28*f|0)+(y<<2)>>2],v=26}else if(f){if(f=0|Re(A,p),0|r[22032+(7*f|0)+g>>0]){d=4;break}A=0,p=0|i[21200+(28*g|0)+(f<<2)>>2],v=26}else f=0;if(26==(0|v))if((0|p)<=-1&&M(23030,22949,212,22959),(0|A)<=-1&&M(23053,22949,213,22959),(0|p)>0){h=b+4|0,f=0;do{se(h),f=f+1|0}while((0|f)!=(0|p));f=A}else f=A;if(i[u>>2]=0,i[u+4>>2]=0,i[u+8>>2]=0,oe(u,y),0|d)for(;0|ze(d)?re(u):ie(u),(0|d)>1;)d=d+-1|0;if((0|f)>0){d=0;do{se(u),d=d+1|0}while((0|d)!=(0|f))}Q(v=b+4|0,u,v),Z(v),v=50}else if(He(n,o,b),0!=(0|s)&0!=(0|l))if((0|g)!=(0|A)&&M(23077,22949,243,22959),f=0|Re(e,t),d=0|Re(n,o),0|r[22032+(7*f|0)+d>>0])d=5;else if((0|(f=0|i[21200+(28*f|0)+(d<<2)>>2]))>0){h=b+4|0,d=0;do{se(h),d=d+1|0}while((0|d)!=(0|f));v=50}else v=50;else v=50}while(0);return 50==(0|v)&&(d=b+4|0,i[a>>2]=i[d>>2],i[a+4>>2]=i[d+4>>2],i[a+8>>2]=i[d+8>>2],d=0),L=c,0|(b=d)}function et(e,t,n,r){n|=0,r|=0;var o,a,s=0,l=0,u=0,c=0,d=0,f=0,h=0,p=0,A=0,g=0,m=0,y=0,v=0;if(a=L,L=L+48|0,u=a+36|0,c=a+24|0,d=a+12|0,f=a,l=0|Mt(0|(e|=0),0|(t|=0),52),x(),l&=15,p=0|Mt(0|e,0|t,45),x(),o=0|j(p&=127),Et(0|l,0,52),m=134225919|x(),i[(g=r)>>2]=-1,i[g+4>>2]=m,!l)return(0|i[n>>2])>1||(0|i[n+4>>2])>1||(0|i[n+8>>2])>1||127==(0|(s=0|U(p,0|ee(n))))?(L=a,0|(m=1)):(A=0|Et(0|s,0,45),g=0|x(),g=-1040385&i[(p=r)+4>>2]|g,i[(m=r)>>2]=i[p>>2]|A,i[m+4>>2]=g,L=a,0|(m=0));for(i[u>>2]=i[n>>2],i[u+4>>2]=i[n+4>>2],i[u+8>>2]=i[n+8>>2];i[c>>2]=i[u>>2],i[c+4>>2]=i[u+4>>2],i[c+8>>2]=i[u+8>>2],0|ze(l)?(te(u),i[d>>2]=i[u>>2],i[d+4>>2]=i[u+4>>2],i[d+8>>2]=i[u+8>>2],re(d)):(ne(u),i[d>>2]=i[u>>2],i[d+4>>2]=i[u+4>>2],i[d+8>>2]=i[u+8>>2],ie(d)),J(c,d,f),Z(f),y=0|i[(g=r)>>2],g=0|i[g+4>>2],n=0|Et(7,0,0|(v=3*(15-l|0)|0)),g&=~(0|x()),v=0|Et(0|ee(f),0,0|v),g=0|x()|g,i[(m=r)>>2]=v|y&~n,i[m+4>>2]=g,(0|l)>1;)l=l+-1|0;e:do{if((0|i[u>>2])<=1&&(0|i[u+4>>2])<=1&&(0|i[u+8>>2])<=1){f=127==(0|(c=0|U(p,l=0|ee(u))))?0:0|j(c);t:do{if(l){if(o){if(u=21408+(28*(0|Re(e,t))|0)+(l<<2)|0,(0|(u=0|i[u>>2]))>0){n=0;do{l=0|le(l),n=n+1|0}while((0|n)!=(0|u))}if(1==(0|l)){s=3;break e}127==(0|(n=0|U(p,l)))&&M(23104,22949,376,23134),0|j(n)?M(23147,22949,377,23134):(A=u,h=l,s=n)}else A=0,h=l,s=c;if((0|(d=0|i[4304+(28*p|0)+(h<<2)>>2]))<=-1&&M(23178,22949,384,23134),!f){if((0|A)<=-1&&M(23030,22949,417,23134),0|A){l=0,n=0|i[(u=r)>>2],u=0|i[u+4>>2];do{n=0|Fe(n,u),u=0|x(),i[(v=r)>>2]=n,i[v+4>>2]=u,l=l+1|0}while((0|l)<(0|A))}if((0|d)<=0){l=54;break}for(l=0,n=0|i[(u=r)>>2],u=0|i[u+4>>2];;)if(n=0|Fe(n,u),u=0|x(),i[(v=r)>>2]=n,i[v+4>>2]=u,(0|(l=l+1|0))==(0|d)){l=54;break t}}if(7==(0|(c=0|H(s,p)))&&M(22925,22949,393,23134),n=0|i[(l=r)>>2],l=0|i[l+4>>2],(0|d)>0){u=0;do{n=0|Fe(n,l),l=0|x(),i[(v=r)>>2]=n,i[v+4>>2]=l,u=u+1|0}while((0|u)!=(0|d))}if(n=0|Re(n,l),v=0|F(s),(0|(n=0|i[(v?21824:21616)+(28*c|0)+(n<<2)>>2]))<=-1&&M(23030,22949,412,23134),n){l=0,u=0|i[(c=r)>>2],c=0|i[c+4>>2];do{u=0|je(u,c),c=0|x(),i[(v=r)>>2]=u,i[v+4>>2]=c,l=l+1|0}while((0|l)<(0|n));l=54}else l=54}else if(0!=(0|o)&0!=(0|f))if(l=21408+(28*(v=0|Re(e,t))|0)+((0|Re(0|i[(l=r)>>2],0|i[l+4>>2]))<<2)|0,(0|(l=0|i[l>>2]))<=-1&&M(23201,22949,433,23134),l){s=0,n=0|i[(u=r)>>2],u=0|i[u+4>>2];do{n=0|Fe(n,u),u=0|x(),i[(v=r)>>2]=n,i[v+4>>2]=u,s=s+1|0}while((0|s)<(0|l));s=c,l=54}else s=c,l=55;else s=c,l=54}while(0);if(54==(0|l)&&f&&(l=55),55==(0|l)&&1==(0|Re(0|i[(v=r)>>2],0|i[v+4>>2]))){s=4;break}m=0|i[(v=r)>>2],v=-1040385&i[v+4>>2],y=0|Et(0|s,0,45),v=0|v|x(),i[(s=r)>>2]=m|y,i[s+4>>2]=v,s=0}else s=2}while(0);return L=a,0|(v=s)}function tt(e,t){var n=0;if(!(t|=0))return 0|(n=1);n=e|=0,e=1;do{e=0|v(0==(1&t|0)?1:n,e),t>>=1,n=0|v(n,n)}while(0!=(0|t));return 0|e}function nt(e,t,n){e|=0;var r,a,s=0,l=0,u=0,c=0,d=0,f=0,h=0,p=0;if(!(0|G(t|=0,n|=0)))return 0|(p=0);if(t=0|V(t),a=+o[n>>3],s=t&(s=+o[n+8>>3])<0?s+6.283185307179586:s,(0|(p=0|i[e>>2]))<=0)return 0|(p=0);if(r=0|i[e+4>>2],t){t=0,n=-1,e=0;e:for(;;){for(h=e;c=+o[r+(h<<4)>>3],f=+o[r+(h<<4)+8>>3],u=+o[r+((e=(n+2|0)%(0|p)|0)<<4)>>3],l=+o[r+(e<<4)+8>>3],c>u?(d=c,c=f):(d=u,u=c,c=l,l=f),ad;){if(!((0|(n=h+1|0))<(0|p))){n=22;break e}e=h,h=n,n=e}if(s=(c=c<0?c+6.283185307179586:c)==s|(f=l<0?l+6.283185307179586:l)==s?s+-2220446049250313e-31:s,((f+=(a-u)/(d-u)*(c-f))<0?f+6.283185307179586:f)>s&&(t^=1),(0|(e=h+1|0))>=(0|p)){n=22;break}n=h}if(22==(0|n))return 0|t}else{t=0,n=-1,e=0;e:for(;;){for(h=e;c=+o[r+(h<<4)>>3],f=+o[r+(h<<4)+8>>3],u=+o[r+((e=(n+2|0)%(0|p)|0)<<4)>>3],l=+o[r+(e<<4)+8>>3],c>u?(d=c,c=f):(d=u,u=c,c=l,l=f),ad;){if(!((0|(n=h+1|0))<(0|p))){n=22;break e}e=h,h=n,n=e}if(l+(a-u)/(d-u)*(c-l)>(s=c==s|l==s?s+-2220446049250313e-31:s)&&(t^=1),(0|(e=h+1|0))>=(0|p)){n=22;break}n=h}if(22==(0|n))return 0|t}return 0}function rt(e,t){t|=0;var n,r,a,s,u,c=0,d=0,f=0,h=0,p=0,A=0,g=0,m=0,y=0,v=0,b=0,_=0;if(!(r=0|i[(e|=0)>>2]))return i[t>>2]=0,i[t+4>>2]=0,i[t+8>>2]=0,i[t+12>>2]=0,i[t+16>>2]=0,i[t+20>>2]=0,i[t+24>>2]=0,void(i[t+28>>2]=0);if(o[(a=t+8|0)>>3]=17976931348623157e292,o[(s=t+24|0)>>3]=17976931348623157e292,o[t>>3]=-17976931348623157e292,o[(u=t+16|0)>>3]=-17976931348623157e292,!((0|r)<=0)){for(n=0|i[e+4>>2],m=17976931348623157e292,y=-17976931348623157e292,v=0,e=-1,h=17976931348623157e292,p=17976931348623157e292,g=-17976931348623157e292,d=-17976931348623157e292,b=0;c=+o[n+(b<<4)>>3],A=+o[n+(b<<4)+8>>3],f=+o[n+(((0|(e=e+2|0))==(0|r)?0:e)<<4)+8>>3],c>3]=c,h=c),A>3]=A,p=A),c>g?o[t>>3]=c:c=g,A>d&&(o[u>>3]=A,d=A),m=A>0&Ay?A:y,v|=+l(+(A-f))>3.141592653589793,(0|(e=b+1|0))!=(0|r);)_=b,g=c,b=e,e=_;v&&(o[u>>3]=y,o[s>>3]=m)}}function it(e,t){t|=0;var n,r=0,a=0,s=0,u=0,c=0,d=0,f=0,h=0,p=0,A=0,g=0,m=0,y=0,v=0,b=0,_=0,w=0,x=0,M=0,E=0,O=0;if(y=0|i[(e|=0)>>2]){if(o[(v=t+8|0)>>3]=17976931348623157e292,o[(b=t+24|0)>>3]=17976931348623157e292,o[t>>3]=-17976931348623157e292,o[(_=t+16|0)>>3]=-17976931348623157e292,(0|y)>0){for(s=0|i[e+4>>2],g=17976931348623157e292,m=-17976931348623157e292,a=0,r=-1,f=17976931348623157e292,h=17976931348623157e292,A=-17976931348623157e292,c=-17976931348623157e292,w=0;u=+o[s+(w<<4)>>3],p=+o[s+(w<<4)+8>>3],d=+o[s+(((0|(E=r+2|0))==(0|y)?0:E)<<4)+8>>3],u>3]=u,f=u),p>3]=p,h=p),u>A?o[t>>3]=u:u=A,p>c&&(o[_>>3]=p,c=p),g=p>0&pm?p:m,a|=+l(+(p-d))>3.141592653589793,(0|(r=w+1|0))!=(0|y);)E=w,A=u,w=r,r=E;a&&(o[_>>3]=m,o[b>>3]=g)}}else i[t>>2]=0,i[t+4>>2]=0,i[t+8>>2]=0,i[t+12>>2]=0,i[t+16>>2]=0,i[t+20>>2]=0,i[t+24>>2]=0,i[t+28>>2]=0;if(!((0|(r=0|i[(E=e+8|0)>>2]))<=0)){n=e+12|0,M=0;do{if(s=0|i[n>>2],a=M,b=t+((M=M+1|0)<<5)|0,_=0|i[s+(a<<3)>>2]){if(o[(w=t+(M<<5)+8|0)>>3]=17976931348623157e292,o[(e=t+(M<<5)+24|0)>>3]=17976931348623157e292,o[b>>3]=-17976931348623157e292,o[(x=t+(M<<5)+16|0)>>3]=-17976931348623157e292,(0|_)>0){for(y=0|i[s+(a<<3)+4>>2],g=17976931348623157e292,m=-17976931348623157e292,s=0,a=-1,v=0,f=17976931348623157e292,h=17976931348623157e292,p=-17976931348623157e292,c=-17976931348623157e292;u=+o[y+(v<<4)>>3],A=+o[y+(v<<4)+8>>3],d=+o[y+(((0|(a=a+2|0))==(0|_)?0:a)<<4)+8>>3],u>3]=u,f=u),A>3]=A,h=A),u>p?o[b>>3]=u:u=p,A>c&&(o[x>>3]=A,c=A),g=A>0&Am?A:m,s|=+l(+(A-d))>3.141592653589793,(0|(a=v+1|0))!=(0|_);)O=v,v=a,p=u,a=O;s&&(o[x>>3]=m,o[e>>3]=g)}}else i[b>>2]=0,i[b+4>>2]=0,i[b+8>>2]=0,i[b+12>>2]=0,i[b+16>>2]=0,i[b+20>>2]=0,i[b+24>>2]=0,i[b+28>>2]=0,r=0|i[E>>2]}while((0|M)<(0|r))}}function ot(e,t,n){var r=0,o=0,a=0;if(!(0|nt(e|=0,t|=0,n|=0)))return 0|(o=0);if((0|i[(o=e+8|0)>>2])<=0)return 0|(o=1);for(r=e+12|0,e=0;;){if(a=e,e=e+1|0,0|nt((0|i[r>>2])+(a<<3)|0,t+(e<<5)|0,n)){e=0,r=6;break}if((0|e)>=(0|i[o>>2])){e=1,r=6;break}}return 6==(0|r)?0|e:0}function at(e,t,n,r,i){t|=0,n|=0,r|=0,i|=0;var a,s,l,u,c,d,f,h=0;u=+o[(e|=0)>>3],l=+o[t>>3]-u,s=+o[e+8>>3],a=+o[t+8>>3]-s,d=+o[n>>3],h=((h=+o[r>>3]-d)*(s-(f=+o[n+8>>3]))-(u-d)*(c=+o[r+8>>3]-f))/(l*c-a*h),o[i>>3]=u+l*h,o[i+8>>3]=s+a*h}function st(e,t){return t|=0,+o[(e|=0)>>3]!=+o[t>>3]?0|(t=0):0|(t=+o[e+8>>3]==+o[t+8>>3])}function lt(e,t){t|=0;var n,r,i;return+((i=+o[(e|=0)>>3]-+o[t>>3])*i+(r=+o[e+8>>3]-+o[t+8>>3])*r+(n=+o[e+16>>3]-+o[t+16>>3])*n)}function ut(e,t,n){e|=0,n|=0;var r=0;(0|(t|=0))>0?(r=0|vt(t,4),i[e>>2]=r,r||M(23230,23253,40,23267)):i[e>>2]=0,i[e+4>>2]=t,i[e+8>>2]=0,i[e+12>>2]=n}function ct(e){var t,n,r,a=0,s=0,u=0,d=0;t=(e|=0)+4|0,n=e+12|0,r=e+8|0;e:for(;;){for(s=0|i[t>>2],a=0;;){if((0|a)>=(0|s))break e;if(u=0|i[e>>2],d=0|i[u+(a<<2)>>2])break;a=a+1|0}a=u+(~~(+l(+ +c(10,+ +(15-(0|i[n>>2])|0))*(+o[d>>3]+ +o[d+8>>3]))%+(0|s))>>>0<<2)|0,s=0|i[a>>2];t:do{if(0|s){if(u=d+32|0,(0|s)==(0|d))i[a>>2]=i[u>>2];else{if(!(a=0|i[(s=s+32|0)>>2]))break;for(;(0|a)!=(0|d);)if(!(a=0|i[(s=a+32|0)>>2]))break t;i[s>>2]=i[u>>2]}yt(d),i[r>>2]=(0|i[r>>2])-1}}while(0)}yt(0|i[e>>2])}function dt(e){var t,n=0,r=0;for(t=0|i[(e|=0)+4>>2],r=0;;){if((0|r)>=(0|t)){n=0,r=4;break}if(n=0|i[(0|i[e>>2])+(r<<2)>>2]){r=4;break}r=r+1|0}return 4==(0|r)?0|n:0}function ft(e,t){t|=0;var n=0,r=0,a=0,s=0;if(n=~~(+l(+ +c(10,+ +(15-(0|i[(e|=0)+12>>2])|0))*(+o[t>>3]+ +o[t+8>>3]))%+(0|i[e+4>>2]))>>>0,n=(0|i[e>>2])+(n<<2)|0,!(r=0|i[n>>2]))return 0|(s=1);s=t+32|0;do{if((0|r)!=(0|t)){if(!(n=0|i[r+32>>2]))return 0|(s=1);for(a=n;;){if((0|a)==(0|t)){a=8;break}if(!(n=0|i[a+32>>2])){n=1,a=10;break}r=a,a=n}if(8==(0|a)){i[r+32>>2]=i[s>>2];break}if(10==(0|a))return 0|n}else i[n>>2]=i[s>>2]}while(0);return yt(t),i[(s=e+8|0)>>2]=(0|i[s>>2])-1,0|(s=0)}function ht(e,t,n){e|=0,t|=0,n|=0;var r,a=0,s=0,u=0;(r=0|mt(40))||M(23283,23253,98,23296),i[r>>2]=i[t>>2],i[r+4>>2]=i[t+4>>2],i[r+8>>2]=i[t+8>>2],i[r+12>>2]=i[t+12>>2],i[(s=r+16|0)>>2]=i[n>>2],i[s+4>>2]=i[n+4>>2],i[s+8>>2]=i[n+8>>2],i[s+12>>2]=i[n+12>>2],i[r+32>>2]=0,s=~~(+l(+ +c(10,+ +(15-(0|i[e+12>>2])|0))*(+o[t>>3]+ +o[t+8>>3]))%+(0|i[e+4>>2]))>>>0,s=(0|i[e>>2])+(s<<2)|0,a=0|i[s>>2];do{if(a){for(;!(0|Se(a,t)&&0|Se(a+16|0,n));)if(s=0|i[a+32>>2],!(0|i[(a=0==(0|s)?a:s)+32>>2])){u=10;break}if(10==(0|u)){i[a+32>>2]=r;break}return yt(r),0|(u=a)}i[s>>2]=r}while(0);return i[(u=e+8|0)>>2]=1+(0|i[u>>2]),0|(u=r)}function pt(e,t,n){t|=0,n|=0;var r=0,a=0;if(a=~~(+l(+ +c(10,+ +(15-(0|i[(e|=0)+12>>2])|0))*(+o[t>>3]+ +o[t+8>>3]))%+(0|i[e+4>>2]))>>>0,!(a=0|i[(0|i[e>>2])+(a<<2)>>2]))return 0|(n=0);if(!n){for(e=a;;){if(0|Se(e,t)){r=10;break}if(!(e=0|i[e+32>>2])){e=0,r=10;break}}if(10==(0|r))return 0|e}for(e=a;;){if(0|Se(e,t)&&0|Se(e+16|0,n)){r=10;break}if(!(e=0|i[e+32>>2])){e=0,r=10;break}}return 10==(0|r)?0|e:0}function At(e,t){t|=0;var n=0;if(n=~~(+l(+ +c(10,+ +(15-(0|i[(e|=0)+12>>2])|0))*(+o[t>>3]+ +o[t+8>>3]))%+(0|i[e+4>>2]))>>>0,!(e=0|i[(0|i[e>>2])+(n<<2)>>2]))return 0|(n=0);for(;;){if(0|Se(e,t)){t=5;break}if(!(e=0|i[e+32>>2])){e=0,t=5;break}}return 5==(0|t)?0|e:0}function gt(e){return 0|~~+function(e){return+ +Lt(+(e=+e))}(e=+e)}function mt(e){e|=0;var t,n=0,r=0,o=0,a=0,s=0,l=0,u=0,c=0,d=0,f=0,h=0,p=0,A=0,g=0,m=0,y=0,v=0,b=0,_=0,w=0;t=L,L=L+16|0,p=t;do{if(e>>>0<245){if(e=(d=e>>>0<11?16:e+11&-8)>>>3,3&(r=(h=0|i[5829])>>>e)|0)return o=0|i[(r=(e=23356+((n=(1&r^1)+e|0)<<1<<2)|0)+8|0)>>2],(0|(s=0|i[(a=o+8|0)>>2]))==(0|e)?i[5829]=h&~(1<>2]=e,i[r>>2]=s),w=n<<3,i[o+4>>2]=3|w,i[(w=o+w+4|0)>>2]=1|i[w>>2],L=t,0|(w=a);if(d>>>0>(f=0|i[5831])>>>0){if(0|r)return n=((n=r<>>=u=n>>>12&16)>>>5&8)|u|(s=(n>>>=r)>>>2&4)|(e=(n>>>=s)>>>1&2)|(o=(n>>>=e)>>>1&1))+(n>>>o)|0)<<1<<2)|0)+8|0)>>2],(0|(r=0|i[(u=s+8|0)>>2]))==(0|n)?(e=h&~(1<>2]=n,i[e>>2]=r,e=h),l=(w=o<<3)-d|0,i[s+4>>2]=3|d,i[(a=s+d|0)+4>>2]=1|l,i[s+w>>2]=l,0|f&&(o=0|i[5834],r=23356+((n=f>>>3)<<1<<2)|0,e&(n=1<>2]:(i[5829]=e|n,n=r,e=r+8|0),i[e>>2]=o,i[n+12>>2]=o,i[o+8>>2]=n,i[o+12>>2]=r),i[5831]=l,i[5834]=a,L=t,0|(w=u);if(s=0|i[5830]){for(r=(s&0-s)-1|0,r=c=0|i[23620+(((o=(r>>>=a=r>>>12&16)>>>5&8)|a|(l=(r>>>=o)>>>2&4)|(u=(r>>>=l)>>>1&2)|(c=(r>>>=u)>>>1&1))+(r>>>c)<<2)>>2],u=c,c=(-8&i[c+4>>2])-d|0;(e=0|i[r+16>>2])||(e=0|i[r+20>>2]);)r=e,u=(a=(l=(-8&i[e+4>>2])-d|0)>>>0>>0)?e:u,c=a?l:c;if((l=u+d|0)>>>0>u>>>0){a=0|i[u+24>>2],n=0|i[u+12>>2];do{if((0|n)==(0|u)){if(!(n=0|i[(e=u+20|0)>>2])&&!(n=0|i[(e=u+16|0)>>2])){r=0;break}for(;;)if(r=0|i[(o=n+20|0)>>2])n=r,e=o;else{if(!(r=0|i[(o=n+16|0)>>2]))break;n=r,e=o}i[e>>2]=0,r=n}else r=0|i[u+8>>2],i[r+12>>2]=n,i[n+8>>2]=r,r=n}while(0);do{if(0|a){if(n=0|i[u+28>>2],(0|u)==(0|i[(e=23620+(n<<2)|0)>>2])){if(i[e>>2]=r,!r){i[5830]=s&~(1<>2])==(0|u)?w:a+20|0)>>2]=r,!r)break;i[r+24>>2]=a,0|(n=0|i[u+16>>2])&&(i[r+16>>2]=n,i[n+24>>2]=r),0|(n=0|i[u+20>>2])&&(i[r+20>>2]=n,i[n+24>>2]=r)}}while(0);return c>>>0<16?(w=c+d|0,i[u+4>>2]=3|w,i[(w=u+w+4|0)>>2]=1|i[w>>2]):(i[u+4>>2]=3|d,i[l+4>>2]=1|c,i[l+c>>2]=c,0|f&&(o=0|i[5834],r=23356+((n=f>>>3)<<1<<2)|0,(n=1<>2]:(i[5829]=n|h,n=r,e=r+8|0),i[e>>2]=o,i[n+12>>2]=o,i[o+8>>2]=n,i[o+12>>2]=r),i[5831]=c,i[5834]=l),L=t,0|(w=u+8|0)}h=d}else h=d}else h=d}else if(e>>>0<=4294967231)if(d=-8&(e=e+11|0),o=0|i[5830]){a=0-d|0,c=(e>>>=8)?d>>>0>16777215?31:d>>>((c=14-((u=((m=e<<(h=(e+1048320|0)>>>16&8))+520192|0)>>>16&4)|h|(c=((m<<=u)+245760|0)>>>16&2))+(m<>>15)|0)+7|0)&1|c<<1:0,r=0|i[23620+(c<<2)>>2];e:do{if(r)for(e=0,u=d<<(31==(0|c)?0:25-(c>>>1)|0),s=0;;){if((l=(-8&i[r+4>>2])-d|0)>>>0>>0){if(!l){e=r,a=0,m=65;break e}e=r,a=l}if(s=0==(0|(m=0|i[r+20>>2]))|(0|m)==(0|(r=0|i[r+16+(u>>>31<<2)>>2]))?s:m,!r){r=s,m=61;break}u<<=1}else r=0,e=0,m=61}while(0);if(61==(0|m)){if(0==(0|r)&0==(0|e)){if(!(e=((e=2<>>=l=h>>>12&16)>>>5&8)|l|(u=(h>>>=s)>>>2&4)|(c=(h>>>=u)>>>1&2)|(r=(h>>>=c)>>>1&1))+(h>>>r)<<2)>>2]}r?m=65:(u=e,l=a)}if(65==(0|m))for(s=r;;){if(a=(r=(h=(-8&i[s+4>>2])-d|0)>>>0>>0)?h:a,e=r?s:e,(r=0|i[s+16>>2])||(r=0|i[s+20>>2]),!r){u=e,l=a;break}s=r}if(0!=(0|u)&&l>>>0<((0|i[5831])-d|0)>>>0&&(f=u+d|0)>>>0>u>>>0){s=0|i[u+24>>2],n=0|i[u+12>>2];do{if((0|n)==(0|u)){if(!(n=0|i[(e=u+20|0)>>2])&&!(n=0|i[(e=u+16|0)>>2])){n=0;break}for(;;)if(r=0|i[(a=n+20|0)>>2])n=r,e=a;else{if(!(r=0|i[(a=n+16|0)>>2]))break;n=r,e=a}i[e>>2]=0}else w=0|i[u+8>>2],i[w+12>>2]=n,i[n+8>>2]=w}while(0);do{if(s){if(e=0|i[u+28>>2],(0|u)==(0|i[(r=23620+(e<<2)|0)>>2])){if(i[r>>2]=n,!n){o&=~(1<>2])==(0|u)?w:s+20|0)>>2]=n,!n)break;i[n+24>>2]=s,0|(e=0|i[u+16>>2])&&(i[n+16>>2]=e,i[e+24>>2]=n),(e=0|i[u+20>>2])&&(i[n+20>>2]=e,i[e+24>>2]=n)}}while(0);e:do{if(l>>>0<16)w=l+d|0,i[u+4>>2]=3|w,i[(w=u+w+4|0)>>2]=1|i[w>>2];else{if(i[u+4>>2]=3|d,i[f+4>>2]=1|l,i[f+l>>2]=l,n=l>>>3,l>>>0<256){r=23356+(n<<1<<2)|0,(e=0|i[5829])&(n=1<>2]:(i[5829]=e|n,n=r,e=r+8|0),i[e>>2]=f,i[n+12>>2]=f,i[f+8>>2]=n,i[f+12>>2]=r;break}if(n=23620+((r=(n=l>>>8)?l>>>0>16777215?31:l>>>((r=14-((b=((w=n<<(_=(n+1048320|0)>>>16&8))+520192|0)>>>16&4)|_|(r=((w<<=b)+245760|0)>>>16&2))+(w<>>15)|0)+7|0)&1|r<<1:0)<<2)|0,i[f+28>>2]=r,i[(e=f+16|0)+4>>2]=0,i[e>>2]=0,!(o&(e=1<>2]=f,i[f+24>>2]=n,i[f+12>>2]=f,i[f+8>>2]=f;break}n=0|i[n>>2];t:do{if((-8&i[n+4>>2]|0)!=(0|l)){for(o=l<<(31==(0|r)?0:25-(r>>>1)|0);e=0|i[(r=n+16+(o>>>31<<2)|0)>>2];){if((-8&i[e+4>>2]|0)==(0|l)){n=e;break t}o<<=1,n=e}i[r>>2]=f,i[f+24>>2]=n,i[f+12>>2]=f,i[f+8>>2]=f;break e}}while(0);w=0|i[(_=n+8|0)>>2],i[w+12>>2]=f,i[_>>2]=f,i[f+8>>2]=w,i[f+12>>2]=n,i[f+24>>2]=0}}while(0);return L=t,0|(w=u+8|0)}h=d}else h=d;else h=-1}while(0);if((r=0|i[5831])>>>0>=h>>>0)return n=r-h|0,e=0|i[5834],n>>>0>15?(w=e+h|0,i[5834]=w,i[5831]=n,i[w+4>>2]=1|n,i[e+r>>2]=n,i[e+4>>2]=3|h):(i[5831]=0,i[5834]=0,i[e+4>>2]=3|r,i[(w=e+r+4|0)>>2]=1|i[w>>2]),L=t,0|(w=e+8|0);if((l=0|i[5832])>>>0>h>>>0)return b=l-h|0,i[5832]=b,_=(w=0|i[5835])+h|0,i[5835]=_,i[_+4>>2]=1|b,i[w+4>>2]=3|h,L=t,0|(w=w+8|0);if(0|i[5947]?e=0|i[5949]:(i[5949]=4096,i[5948]=4096,i[5950]=-1,i[5951]=-1,i[5952]=0,i[5940]=0,i[5947]=-16&p^1431655768,e=4096),u=h+48|0,(d=(s=e+(c=h+47|0)|0)&(a=0-e|0))>>>0<=h>>>0)return L=t,0|(w=0);if(0|(e=0|i[5939])&&(p=(f=0|i[5937])+d|0)>>>0<=f>>>0|p>>>0>e>>>0)return L=t,0|(w=0);e:do{if(4&i[5940])n=0,m=143;else{r=0|i[5835];t:do{if(r){for(o=23764;!((p=0|i[o>>2])>>>0<=r>>>0&&(p+(0|i[o+4>>2])|0)>>>0>r>>>0);){if(!(e=0|i[o+8>>2])){m=128;break t}o=e}if((n=s-l&a)>>>0<2147483647)if((0|(e=0|Pt(0|n)))==((0|i[o>>2])+(0|i[o+4>>2])|0)){if(-1!=(0|e)){l=n,s=e,m=145;break e}}else o=e,m=136;else n=0}else m=128}while(0);do{if(128==(0|m))if(-1!=(0|(r=0|Pt(0)))&&(n=r,g=(n=(0==((g=(A=0|i[5948])+-1|0)&n|0)?0:(g+n&0-A)-n|0)+d|0)+(A=0|i[5937])|0,n>>>0>h>>>0&n>>>0<2147483647)){if(0|(p=0|i[5939])&&g>>>0<=A>>>0|g>>>0>p>>>0){n=0;break}if((0|(e=0|Pt(0|n)))==(0|r)){l=n,s=r,m=145;break e}o=e,m=136}else n=0}while(0);do{if(136==(0|m)){if(r=0-n|0,!(u>>>0>n>>>0&n>>>0<2147483647&-1!=(0|o))){if(-1==(0|o)){n=0;break}l=n,s=o,m=145;break e}if((e=c-n+(e=0|i[5949])&0-e)>>>0>=2147483647){l=n,s=o,m=145;break e}if(-1==(0|Pt(0|e))){Pt(0|r),n=0;break}l=e+n|0,s=o,m=145;break e}}while(0);i[5940]=4|i[5940],m=143}}while(0);if(143==(0|m)&&d>>>0<2147483647&&!(-1==(0|(b=0|Pt(0|d)))|1^(v=(y=(g=0|Pt(0))-b|0)>>>0>(h+40|0)>>>0)|b>>>0>>0&-1!=(0|b)&-1!=(0|g)^1)&&(l=v?y:n,s=b,m=145),145==(0|m)){n=(0|i[5937])+l|0,i[5937]=n,n>>>0>(0|i[5938])>>>0&&(i[5938]=n),c=0|i[5835];e:do{if(c){for(n=23764;;){if((0|s)==((e=0|i[n>>2])+(r=0|i[n+4>>2])|0)){m=154;break}if(!(o=0|i[n+8>>2]))break;n=o}if(154==(0|m)&&(_=n+4|0,0==(8&i[n+12>>2]|0))&&s>>>0>c>>>0&e>>>0<=c>>>0){i[_>>2]=r+l,_=c+(b=0==(7&(b=c+8|0)|0)?0:0-b&7)|0,b=(w=(0|i[5832])+l|0)-b|0,i[5835]=_,i[5832]=b,i[_+4>>2]=1|b,i[c+w+4>>2]=40,i[5836]=i[5951];break}for(s>>>0<(0|i[5833])>>>0&&(i[5833]=s),r=s+l|0,n=23764;;){if((0|i[n>>2])==(0|r)){m=162;break}if(!(e=0|i[n+8>>2]))break;n=e}if(162==(0|m)&&0==(8&i[n+12>>2]|0)){i[n>>2]=s,i[(f=n+4|0)>>2]=(0|i[f>>2])+l,d=(f=s+(0==(7&(f=s+8|0)|0)?0:0-f&7)|0)+h|0,u=(n=r+(0==(7&(n=r+8|0)|0)?0:0-n&7)|0)-f-h|0,i[f+4>>2]=3|h;t:do{if((0|c)==(0|n))w=(0|i[5832])+u|0,i[5832]=w,i[5835]=d,i[d+4>>2]=1|w;else{if((0|i[5834])==(0|n)){w=(0|i[5831])+u|0,i[5831]=w,i[5834]=d,i[d+4>>2]=1|w,i[d+w>>2]=w;break}if(1==(3&(e=0|i[n+4>>2])|0)){l=-8&e,o=e>>>3;n:do{if(e>>>0<256){if(e=0|i[n+8>>2],(0|(r=0|i[n+12>>2]))==(0|e)){i[5829]=i[5829]&~(1<>2]=r,i[r+8>>2]=e;break}s=0|i[n+24>>2],e=0|i[n+12>>2];do{if((0|e)==(0|n)){if(e=0|i[(o=(r=n+16|0)+4|0)>>2])r=o;else if(!(e=0|i[r>>2])){e=0;break}for(;;)if(o=0|i[(a=e+20|0)>>2])e=o,r=a;else{if(!(o=0|i[(a=e+16|0)>>2]))break;e=o,r=a}i[r>>2]=0}else w=0|i[n+8>>2],i[w+12>>2]=e,i[e+8>>2]=w}while(0);if(!s)break;o=23620+((r=0|i[n+28>>2])<<2)|0;do{if((0|i[o>>2])==(0|n)){if(i[o>>2]=e,0|e)break;i[5830]=i[5830]&~(1<>2])==(0|n)?w:s+20|0)>>2]=e,!e)break n}while(0);if(i[e+24>>2]=s,0|(o=0|i[(r=n+16|0)>>2])&&(i[e+16>>2]=o,i[o+24>>2]=e),!(r=0|i[r+4>>2]))break;i[e+20>>2]=r,i[r+24>>2]=e}while(0);n=n+l|0,a=l+u|0}else a=u;if(i[(n=n+4|0)>>2]=-2&i[n>>2],i[d+4>>2]=1|a,i[d+a>>2]=a,n=a>>>3,a>>>0<256){r=23356+(n<<1<<2)|0,(e=0|i[5829])&(n=1<>2]:(i[5829]=e|n,n=r,e=r+8|0),i[e>>2]=d,i[n+12>>2]=d,i[d+8>>2]=n,i[d+12>>2]=r;break}n=a>>>8;do{if(n){if(a>>>0>16777215){o=31;break}o=a>>>((o=14-((b=((w=n<<(_=(n+1048320|0)>>>16&8))+520192|0)>>>16&4)|_|(o=((w<<=b)+245760|0)>>>16&2))+(w<>>15)|0)+7|0)&1|o<<1}else o=0}while(0);if(n=23620+(o<<2)|0,i[d+28>>2]=o,i[(e=d+16|0)+4>>2]=0,i[e>>2]=0,!((e=0|i[5830])&(r=1<>2]=d,i[d+24>>2]=n,i[d+12>>2]=d,i[d+8>>2]=d;break}n=0|i[n>>2];n:do{if((-8&i[n+4>>2]|0)!=(0|a)){for(o=a<<(31==(0|o)?0:25-(o>>>1)|0);e=0|i[(r=n+16+(o>>>31<<2)|0)>>2];){if((-8&i[e+4>>2]|0)==(0|a)){n=e;break n}o<<=1,n=e}i[r>>2]=d,i[d+24>>2]=n,i[d+12>>2]=d,i[d+8>>2]=d;break t}}while(0);w=0|i[(_=n+8|0)>>2],i[w+12>>2]=d,i[_>>2]=d,i[d+8>>2]=w,i[d+12>>2]=n,i[d+24>>2]=0}}while(0);return L=t,0|(w=f+8|0)}for(n=23764;!((e=0|i[n>>2])>>>0<=c>>>0&&(w=e+(0|i[n+4>>2])|0)>>>0>c>>>0);)n=0|i[n+8>>2];n=(e=(e=(a=w+-47|0)+(0==(7&(e=a+8|0)|0)?0:0-e&7)|0)>>>0<(a=c+16|0)>>>0?c:e)+8|0,_=s+(b=0==(7&(b=s+8|0)|0)?0:0-b&7)|0,b=(r=l+-40|0)-b|0,i[5835]=_,i[5832]=b,i[_+4>>2]=1|b,i[s+r+4>>2]=40,i[5836]=i[5951],i[(r=e+4|0)>>2]=27,i[n>>2]=i[5941],i[n+4>>2]=i[5942],i[n+8>>2]=i[5943],i[n+12>>2]=i[5944],i[5941]=s,i[5942]=l,i[5944]=0,i[5943]=n,n=e+24|0;do{_=n,i[(n=n+4|0)>>2]=7}while((_+8|0)>>>0>>0);if((0|e)!=(0|c)){if(s=e-c|0,i[r>>2]=-2&i[r>>2],i[c+4>>2]=1|s,i[e>>2]=s,n=s>>>3,s>>>0<256){r=23356+(n<<1<<2)|0,(e=0|i[5829])&(n=1<>2]:(i[5829]=e|n,n=r,e=r+8|0),i[e>>2]=c,i[n+12>>2]=c,i[c+8>>2]=n,i[c+12>>2]=r;break}if(r=23620+((o=(n=s>>>8)?s>>>0>16777215?31:s>>>((o=14-((b=((w=n<<(_=(n+1048320|0)>>>16&8))+520192|0)>>>16&4)|_|(o=((w<<=b)+245760|0)>>>16&2))+(w<>>15)|0)+7|0)&1|o<<1:0)<<2)|0,i[c+28>>2]=o,i[c+20>>2]=0,i[a>>2]=0,!((n=0|i[5830])&(e=1<>2]=c,i[c+24>>2]=r,i[c+12>>2]=c,i[c+8>>2]=c;break}n=0|i[r>>2];t:do{if((-8&i[n+4>>2]|0)!=(0|s)){for(o=s<<(31==(0|o)?0:25-(o>>>1)|0);e=0|i[(r=n+16+(o>>>31<<2)|0)>>2];){if((-8&i[e+4>>2]|0)==(0|s)){n=e;break t}o<<=1,n=e}i[r>>2]=c,i[c+24>>2]=n,i[c+12>>2]=c,i[c+8>>2]=c;break e}}while(0);w=0|i[(_=n+8|0)>>2],i[w+12>>2]=c,i[_>>2]=c,i[c+8>>2]=w,i[c+12>>2]=n,i[c+24>>2]=0}}else 0==(0|(w=0|i[5833]))|s>>>0>>0&&(i[5833]=s),i[5941]=s,i[5942]=l,i[5944]=0,i[5838]=i[5947],i[5837]=-1,i[5842]=23356,i[5841]=23356,i[5844]=23364,i[5843]=23364,i[5846]=23372,i[5845]=23372,i[5848]=23380,i[5847]=23380,i[5850]=23388,i[5849]=23388,i[5852]=23396,i[5851]=23396,i[5854]=23404,i[5853]=23404,i[5856]=23412,i[5855]=23412,i[5858]=23420,i[5857]=23420,i[5860]=23428,i[5859]=23428,i[5862]=23436,i[5861]=23436,i[5864]=23444,i[5863]=23444,i[5866]=23452,i[5865]=23452,i[5868]=23460,i[5867]=23460,i[5870]=23468,i[5869]=23468,i[5872]=23476,i[5871]=23476,i[5874]=23484,i[5873]=23484,i[5876]=23492,i[5875]=23492,i[5878]=23500,i[5877]=23500,i[5880]=23508,i[5879]=23508,i[5882]=23516,i[5881]=23516,i[5884]=23524,i[5883]=23524,i[5886]=23532,i[5885]=23532,i[5888]=23540,i[5887]=23540,i[5890]=23548,i[5889]=23548,i[5892]=23556,i[5891]=23556,i[5894]=23564,i[5893]=23564,i[5896]=23572,i[5895]=23572,i[5898]=23580,i[5897]=23580,i[5900]=23588,i[5899]=23588,i[5902]=23596,i[5901]=23596,i[5904]=23604,i[5903]=23604,_=s+(b=0==(7&(b=s+8|0)|0)?0:0-b&7)|0,b=(w=l+-40|0)-b|0,i[5835]=_,i[5832]=b,i[_+4>>2]=1|b,i[s+w+4>>2]=40,i[5836]=i[5951]}while(0);if((n=0|i[5832])>>>0>h>>>0)return b=n-h|0,i[5832]=b,_=(w=0|i[5835])+h|0,i[5835]=_,i[_+4>>2]=1|b,i[w+4>>2]=3|h,L=t,0|(w=w+8|0)}return i[(w=23312)>>2]=12,L=t,0|(w=0)}function yt(e){var t=0,n=0,r=0,o=0,a=0,s=0,l=0,u=0;if(e|=0){n=e+-8|0,o=0|i[5833],u=n+(t=-8&(e=0|i[e+-4>>2]))|0;do{if(1&e)l=n,s=n;else{if(r=0|i[n>>2],!(3&e))return;if(a=r+t|0,(s=n+(0-r)|0)>>>0>>0)return;if((0|i[5834])==(0|s)){if(3!=(3&(t=0|i[(e=u+4|0)>>2])|0)){l=s,t=a;break}return i[5831]=a,i[e>>2]=-2&t,i[s+4>>2]=1|a,void(i[s+a>>2]=a)}if(n=r>>>3,r>>>0<256){if(e=0|i[s+8>>2],(0|(t=0|i[s+12>>2]))==(0|e)){i[5829]=i[5829]&~(1<>2]=t,i[t+8>>2]=e,l=s,t=a;break}o=0|i[s+24>>2],e=0|i[s+12>>2];do{if((0|e)==(0|s)){if(e=0|i[(n=(t=s+16|0)+4|0)>>2])t=n;else if(!(e=0|i[t>>2])){e=0;break}for(;;)if(n=0|i[(r=e+20|0)>>2])e=n,t=r;else{if(!(n=0|i[(r=e+16|0)>>2]))break;e=n,t=r}i[t>>2]=0}else l=0|i[s+8>>2],i[l+12>>2]=e,i[e+8>>2]=l}while(0);if(o){if(t=0|i[s+28>>2],(0|i[(n=23620+(t<<2)|0)>>2])==(0|s)){if(i[n>>2]=e,!e){i[5830]=i[5830]&~(1<>2])==(0|s)?l:o+20|0)>>2]=e,!e){l=s,t=a;break}i[e+24>>2]=o,0|(n=0|i[(t=s+16|0)>>2])&&(i[e+16>>2]=n,i[n+24>>2]=e),(t=0|i[t+4>>2])?(i[e+20>>2]=t,i[t+24>>2]=e,l=s,t=a):(l=s,t=a)}else l=s,t=a}}while(0);if(!(s>>>0>=u>>>0)&&1&(r=0|i[(e=u+4|0)>>2])){if(2&r)i[e>>2]=-2&r,i[l+4>>2]=1|t,i[s+t>>2]=t,o=t;else{if((0|i[5835])==(0|u)){if(u=(0|i[5832])+t|0,i[5832]=u,i[5835]=l,i[l+4>>2]=1|u,(0|l)!=(0|i[5834]))return;return i[5834]=0,void(i[5831]=0)}if((0|i[5834])==(0|u))return u=(0|i[5831])+t|0,i[5831]=u,i[5834]=s,i[l+4>>2]=1|u,void(i[s+u>>2]=u);o=(-8&r)+t|0,n=r>>>3;do{if(r>>>0<256){if(t=0|i[u+8>>2],(0|(e=0|i[u+12>>2]))==(0|t)){i[5829]=i[5829]&~(1<>2]=e,i[e+8>>2]=t;break}a=0|i[u+24>>2],e=0|i[u+12>>2];do{if((0|e)==(0|u)){if(e=0|i[(n=(t=u+16|0)+4|0)>>2])t=n;else if(!(e=0|i[t>>2])){n=0;break}for(;;)if(n=0|i[(r=e+20|0)>>2])e=n,t=r;else{if(!(n=0|i[(r=e+16|0)>>2]))break;e=n,t=r}i[t>>2]=0,n=e}else n=0|i[u+8>>2],i[n+12>>2]=e,i[e+8>>2]=n,n=e}while(0);if(0|a){if(e=0|i[u+28>>2],(0|i[(t=23620+(e<<2)|0)>>2])==(0|u)){if(i[t>>2]=n,!n){i[5830]=i[5830]&~(1<>2])==(0|u)?r:a+20|0)>>2]=n,!n)break;i[n+24>>2]=a,0|(t=0|i[(e=u+16|0)>>2])&&(i[n+16>>2]=t,i[t+24>>2]=n),0|(e=0|i[e+4>>2])&&(i[n+20>>2]=e,i[e+24>>2]=n)}}while(0);if(i[l+4>>2]=1|o,i[s+o>>2]=o,(0|l)==(0|i[5834]))return void(i[5831]=o)}if(e=o>>>3,o>>>0<256)return n=23356+(e<<1<<2)|0,(t=0|i[5829])&(e=1<>2]:(i[5829]=t|e,e=n,t=n+8|0),i[t>>2]=l,i[e+12>>2]=l,i[l+8>>2]=e,void(i[l+12>>2]=n);e=23620+((r=(e=o>>>8)?o>>>0>16777215?31:o>>>((r=14-((a=((u=e<<(s=(e+1048320|0)>>>16&8))+520192|0)>>>16&4)|s|(r=((u<<=a)+245760|0)>>>16&2))+(u<>>15)|0)+7|0)&1|r<<1:0)<<2)|0,i[l+28>>2]=r,i[l+20>>2]=0,i[l+16>>2]=0,t=0|i[5830],n=1<>2];t:do{if((-8&i[e+4>>2]|0)!=(0|o)){for(r=o<<(31==(0|r)?0:25-(r>>>1)|0);t=0|i[(n=e+16+(r>>>31<<2)|0)>>2];){if((-8&i[t+4>>2]|0)==(0|o)){e=t;break t}r<<=1,e=t}i[n>>2]=l,i[l+24>>2]=e,i[l+12>>2]=l,i[l+8>>2]=l;break e}}while(0);u=0|i[(s=e+8|0)>>2],i[u+12>>2]=l,i[s>>2]=l,i[l+8>>2]=u,i[l+12>>2]=e,i[l+24>>2]=0}else i[5830]=t|n,i[e>>2]=l,i[l+24>>2]=e,i[l+12>>2]=l,i[l+8>>2]=l}while(0);if(u=(0|i[5837])-1|0,i[5837]=u,!(0|u)){for(e=23772;e=0|i[e>>2];)e=e+8|0;i[5837]=-1}}}}function vt(e,t){t|=0;var n=0;return(e|=0)?(n=0|v(t,e),(t|e)>>>0>65535&&(n=(0|(n>>>0)/(e>>>0))==(0|t)?n:-1)):n=0,(e=0|mt(n))&&3&i[e+-4>>2]?(Ct(0|e,0,0|n),0|e):0|e}function bt(e,t,n,r){return 0|(w(0|(r=(t|=0)-(r|=0)-((n|=0)>>>0>(e|=0)>>>0|0)>>>0)),e-n>>>0|0)}function _t(e){return 0|((e|=0)?31-(0|_(e^e-1))|0:32)}function wt(e,t,n,r,o){o|=0;var a=0,s=0,l=0,u=0,c=0,d=0,f=0,h=0,p=0,A=0;if(d=e|=0,s=n|=0,l=h=r|=0,!(c=u=t|=0))return a=0!=(0|o),l?a?(i[o>>2]=0|e,i[o+4>>2]=0&t,o=0,0|(w(0|(h=0)),o)):(o=0,0|(w(0|(h=0)),o)):(a&&(i[o>>2]=(d>>>0)%(s>>>0),i[o+4>>2]=0),o=(d>>>0)/(s>>>0)>>>0,0|(w(0|(h=0)),o));a=0==(0|l);do{if(s){if(!a){if((a=(0|_(0|l))-(0|_(0|c))|0)>>>0<=31){s=f=a+1|0,e=d>>>(f>>>0)&(t=a-31>>31)|c<<(l=31-a|0),t&=c>>>(f>>>0),a=0,l=d<>2]=0|e,i[o+4>>2]=u|0&t,o=0,0|(w(0|(h=0)),o)):(o=0,0|(w(0|(h=0)),o))}if((a=s-1|0)&s|0){s=l=33+(0|_(0|s))-(0|_(0|c))|0,e=(f=32-l|0)-1>>31&c>>>((p=l-32|0)>>>0)|(c<>>(l>>>0))&(t=p>>31),t&=c>>>(l>>>0),a=d<<(A=64-l|0)&(u=f>>31),l=(c<>>(p>>>0))&u|d<>31;break}return 0|o&&(i[o>>2]=a&d,i[o+4>>2]=0),1==(0|s)?(A=0|e,0|(w(0|(p=u|0&t)),A)):(p=c>>>((A=0|_t(0|s))>>>0)|0,A=c<<32-A|d>>>(A>>>0)|0,0|(w(0|p),A))}if(a)return 0|o&&(i[o>>2]=(c>>>0)%(s>>>0),i[o+4>>2]=0),A=(c>>>0)/(s>>>0)>>>0,0|(w(0|(p=0)),A);if(!d)return 0|o&&(i[o>>2]=0,i[o+4>>2]=(c>>>0)%(l>>>0)),A=(c>>>0)/(l>>>0)>>>0,0|(w(0|(p=0)),A);if(!((a=l-1|0)&l))return 0|o&&(i[o>>2]=0|e,i[o+4>>2]=a&c|0&t),p=0,A=c>>>((0|_t(0|l))>>>0),0|(w(0|p),A);if((a=(0|_(0|l))-(0|_(0|c))|0)>>>0<=30){s=t=a+1|0,e=c<<(l=31-a|0)|d>>>(t>>>0),t=c>>>(t>>>0),a=0,l=d<>2]=0|e,i[o+4>>2]=u|0&t,A=0,0|(w(0|(p=0)),A)):(A=0,0|(w(0|(p=0)),A))}while(0);if(s){c=0|function(e,t,n,r){return 0|(w((t|=0)+(r|=0)+((n=(e|=0)+(n|=0)>>>0)>>>0>>0|0)>>>0|0),0|n)}(0|(f=0|n),0|(d=h|0&r),-1,-1),n=0|x(),u=l,l=0;do{r=u,u=a>>>31|u<<1,a=l|a<<1,bt(0|c,0|n,0|(r=e<<1|r>>>31|0),0|(h=e>>>31|t<<1|0)),l=1&(p=(A=0|x())>>31|((0|A)<0?-1:0)<<1),e=0|bt(0|r,0|h,p&f|0,(((0|A)<0?-1:0)>>31|((0|A)<0?-1:0)<<1)&d|0),t=0|x(),s=s-1|0}while(0!=(0|s));c=u,u=0}else c=l,u=0,l=0;return s=0,0|o&&(i[o>>2]=e,i[o+4>>2]=t),A=-2&(a<<1|0)|l,0|(w(0|(p=(0|a)>>>31|(c|s)<<1|0&(s<<1|a>>>31)|u)),A)}function xt(e,t,n,r){var o,a;return a=L,L=L+16|0,wt(e|=0,t|=0,n|=0,r|=0,o=0|a),L=a,0|(w(0|i[o+4>>2]),0|i[o>>2])}function Mt(e,t,n){return e|=0,t|=0,(0|(n|=0))<32?(w(t>>>n|0),e>>>n|(t&(1<>>n-32|0)}function Et(e,t,n){return e|=0,t|=0,(0|(n|=0))<32?(w(t<>>32-n|0),e<=0?+s(e+.5):+y(e-.5)}function Tt(e,t,n){e|=0,t|=0;var o,a,s=0;if((0|(n|=0))>=8192)return S(0|e,0|t,0|n),0|e;if(a=0|e,o=e+n|0,(3&e)==(3&t)){for(;3&e;){if(!n)return 0|a;r[e>>0]=0|r[t>>0],e=e+1|0,t=t+1|0,n=n-1|0}for(s=(n=-4&o|0)-64|0;(0|e)<=(0|s);)i[e>>2]=i[t>>2],i[e+4>>2]=i[t+4>>2],i[e+8>>2]=i[t+8>>2],i[e+12>>2]=i[t+12>>2],i[e+16>>2]=i[t+16>>2],i[e+20>>2]=i[t+20>>2],i[e+24>>2]=i[t+24>>2],i[e+28>>2]=i[t+28>>2],i[e+32>>2]=i[t+32>>2],i[e+36>>2]=i[t+36>>2],i[e+40>>2]=i[t+40>>2],i[e+44>>2]=i[t+44>>2],i[e+48>>2]=i[t+48>>2],i[e+52>>2]=i[t+52>>2],i[e+56>>2]=i[t+56>>2],i[e+60>>2]=i[t+60>>2],e=e+64|0,t=t+64|0;for(;(0|e)<(0|n);)i[e>>2]=i[t>>2],e=e+4|0,t=t+4|0}else for(n=o-4|0;(0|e)<(0|n);)r[e>>0]=0|r[t>>0],r[e+1>>0]=0|r[t+1>>0],r[e+2>>0]=0|r[t+2>>0],r[e+3>>0]=0|r[t+3>>0],e=e+4|0,t=t+4|0;for(;(0|e)<(0|o);)r[e>>0]=0|r[t>>0],e=e+1|0,t=t+1|0;return 0|a}function Ct(e,t,n){t|=0;var o,a=0,s=0,l=0;if(o=(e|=0)+(n|=0)|0,t&=255,(0|n)>=67){for(;3&e;)r[e>>0]=t,e=e+1|0;for(l=t|t<<8|t<<16|t<<24,s=(a=-4&o|0)-64|0;(0|e)<=(0|s);)i[e>>2]=l,i[e+4>>2]=l,i[e+8>>2]=l,i[e+12>>2]=l,i[e+16>>2]=l,i[e+20>>2]=l,i[e+24>>2]=l,i[e+28>>2]=l,i[e+32>>2]=l,i[e+36>>2]=l,i[e+40>>2]=l,i[e+44>>2]=l,i[e+48>>2]=l,i[e+52>>2]=l,i[e+56>>2]=l,i[e+60>>2]=l,e=e+64|0;for(;(0|e)<(0|a);)i[e>>2]=l,e=e+4|0}for(;(0|e)<(0|o);)r[e>>0]=t,e=e+1|0;return o-n|0}function Lt(e){return(e=+e)>=0?+s(e+.5):+y(e-.5)}function Pt(e){e|=0;var t,n,r;return r=0|O(),(0|e)>0&(0|(t=(n=0|i[a>>2])+e|0))<(0|n)|(0|t)<0?(C(0|t),E(12),-1):(0|t)>(0|r)&&!(0|T(0|t))?(E(12),-1):(i[a>>2]=t,0|n)}return{___uremdi3:xt,_bitshift64Lshr:Mt,_bitshift64Shl:Et,_calloc:vt,_cellAreaKm2:function(e,t){var n,r,o,a=0;if(o=L,L=L+192|0,r=o,Ge(e|=0,t|=0,n=o+168|0),Ye(e,t,r),(0|(t=0|i[r>>2]))>0){if(a=+Ce(r+8|0,r+8+((1!=(0|t)&1)<<4)|0,n)+0,1!=(0|t)){e=1;do{a+=+Ce(r+8+(e<<4)|0,r+8+(((0|(e=e+1|0))%(0|t)|0)<<4)|0,n)}while((0|e)<(0|t))}}else a=0;return L=o,6371.007180918475*a*6371.007180918475},_cellAreaM2:function(e,t){var n,r,o,a=0;if(o=L,L=L+192|0,r=o,Ge(e|=0,t|=0,n=o+168|0),Ye(e,t,r),(0|(t=0|i[r>>2]))>0){if(a=+Ce(r+8|0,r+8+((1!=(0|t)&1)<<4)|0,n)+0,1!=(0|t)){e=1;do{a+=+Ce(r+8+(e<<4)|0,r+8+(((0|(e=e+1|0))%(0|t)|0)<<4)|0,n)}while((0|e)<(0|t))}}else a=0;return L=o,6371.007180918475*a*6371.007180918475*1e3*1e3},_cellAreaRads2:function(e,t){var n,r,o,a=0;if(o=L,L=L+192|0,r=o,Ge(e|=0,t|=0,n=o+168|0),Ye(e,t,r),(0|(t=0|i[r>>2]))<=0)return L=o,+(a=0);if(a=+Ce(r+8|0,r+8+((1!=(0|t)&1)<<4)|0,n)+0,1==(0|t))return L=o,+a;e=1;do{a+=+Ce(r+8+(e<<4)|0,r+8+(((0|(e=e+1|0))%(0|t)|0)<<4)|0,n)}while((0|e)<(0|t));return L=o,+a},_compact:function(e,t,n){t|=0;var r,o=0,a=0,s=0,l=0,u=0,c=0,d=0,f=0,h=0,p=0,A=0,g=0,m=0,y=0,v=0,b=0,_=0,w=0,M=0,E=0,O=0;if(!(n|=0))return 0|(E=0);if(o=0|i[(a=e|=0)>>2],!0&0==(15728640&(a=0|i[a+4>>2])|0)){if((0|n)<=0)return 0|(E=0);if(i[(E=t)>>2]=o,i[E+4>>2]=a,1==(0|n))return 0|(E=0);o=1;do{M=0|i[(w=e+(o<<3)|0)+4>>2],i[(E=t+(o<<3)|0)>>2]=i[w>>2],i[E+4>>2]=M,o=o+1|0}while((0|o)!=(0|n));return 0|(o=0)}if(!(M=0|mt(w=n<<3)))return 0|(E=-3);if(Tt(0|M,0|e,0|w),!(r=0|vt(n,8)))return yt(M),0|(E=-3);o=n;e:for(;;){b=0|Mt(0|(f=0|i[(l=M)>>2]),0|(l=0|i[l+4>>2]),52),x(),_=(b&=15)+-1|0,v=(0|o)>0;t:do{if(v){if(y=((0|o)<0)<<31>>31,g=0|Et(0|_,0,52),m=0|x(),_>>>0>15)for(a=0,e=f,n=l;;){if(!(0==(0|e)&0==(0|n))){if(s=0|Mt(0|e,0|n,52),x(),u=(0|(s&=15))<(0|_),s=(0|s)==(0|_),n=0|xt(0|(d=u?0:s?e:0),0|(e=u?0:s?n:0),0|o,0|y),x(),0==(0|(c=0|i[(u=s=r+(n<<3)|0)>>2]))&0==(0|(u=0|i[u+4>>2])))n=d;else for(g=0,A=n,p=u,n=d;;){if((0|g)>(0|o)){E=41;break e}if((0|c)==(0|n)&(-117440513&p|0)==(0|e)){d=0|Mt(0|c,0|p,56),x(),h=(d&=7)+1|0,m=0|Mt(0|c,0|p,45),x();n:do{if(0|j(127&m)){if(c=0|Mt(0|c,0|p,52),x(),!(c&=15)){u=6;break}for(u=1;;){if(!(0==((m=0|Et(7,0,3*(15-u|0)|0))&n|0)&0==((0|x())&e|0))){u=7;break n}if(!(u>>>0>>0)){u=6;break}u=u+1|0}}else u=7}while(0);if((d+2|0)>>>0>u>>>0){E=51;break e}m=0|Et(0|h,0,56),e=0|x()|-117440513&e,i[(u=s)>>2]=0,i[u+4>>2]=0,u=A,n|=m}else u=(A+1|0)%(0|o)|0;if(0==(0|(c=0|i[(p=s=r+(u<<3)|0)>>2]))&0==(0|(p=0|i[p+4>>2])))break;g=g+1|0,A=u}i[(m=s)>>2]=n,i[m+4>>2]=e}if((0|(a=a+1|0))>=(0|o))break t;e=0|i[(n=M+(a<<3)|0)>>2],n=0|i[n+4>>2]}for(a=0,e=f,n=l;;){if(!(0==(0|e)&0==(0|n))){if(u=0|Mt(0|e,0|n,52),x(),(0|(u&=15))>=(0|_)){if((0|u)!=(0|_)&&(e|=g,n=-15728641&n|m,u>>>0>=b>>>0)){s=_;do{A=0|Et(7,0,3*(14-s|0)|0),s=s+1|0,e|=A,n=0|x()|n}while(s>>>0>>0)}}else e=0,n=0;if(u=0|xt(0|e,0|n,0|o,0|y),x(),!(0==(0|(d=0|i[(c=s=r+(u<<3)|0)>>2]))&0==(0|(c=0|i[c+4>>2]))))for(A=0;;){if((0|A)>(0|o)){E=41;break e}if((0|d)==(0|e)&(-117440513&c|0)==(0|n)){h=0|Mt(0|d,0|c,56),x(),p=(h&=7)+1|0,O=0|Mt(0|d,0|c,45),x();n:do{if(0|j(127&O)){if(d=0|Mt(0|d,0|c,52),x(),!(d&=15)){c=6;break}for(c=1;;){if(!(0==((O=0|Et(7,0,3*(15-c|0)|0))&e|0)&0==((0|x())&n|0))){c=7;break n}if(!(c>>>0>>0)){c=6;break}c=c+1|0}}else c=7}while(0);if((h+2|0)>>>0>c>>>0){E=51;break e}O=0|Et(0|p,0,56),n=0|x()|-117440513&n,i[(p=s)>>2]=0,i[p+4>>2]=0,e|=O}else u=(u+1|0)%(0|o)|0;if(0==(0|(d=0|i[(c=s=r+(u<<3)|0)>>2]))&0==(0|(c=0|i[c+4>>2])))break;A=A+1|0}i[(O=s)>>2]=e,i[O+4>>2]=n}if((0|(a=a+1|0))>=(0|o))break t;e=0|i[(n=M+(a<<3)|0)>>2],n=0|i[n+4>>2]}}}while(0);if((o+5|0)>>>0<11){E=99;break}if(!(m=0|vt((0|o)/6|0,8))){E=58;break}t:do{if(v){A=0,p=0;do{if(!(0==(0|(a=0|i[(e=u=r+(A<<3)|0)>>2]))&0==(0|(e=0|i[e+4>>2])))){c=0|Mt(0|a,0|e,56),x(),n=(c&=7)+1|0,d=-117440513&e,O=0|Mt(0|a,0|e,45),x();n:do{if(0|j(127&O)){if(h=0|Mt(0|a,0|e,52),x(),0|(h&=15))for(s=1;;){if(!(0==(a&(O=0|Et(7,0,3*(15-s|0)|0))|0)&0==(d&(0|x())|0)))break n;if(!(s>>>0>>0))break;s=s+1|0}a|=e=0|Et(0|n,0,56),e=0|x()|d,i[(n=u)>>2]=a,i[n+4>>2]=e,n=c+2|0}}while(0);7==(0|n)&&(i[(O=m+(p<<3)|0)>>2]=a,i[O+4>>2]=-117440513&e,p=p+1|0)}A=A+1|0}while((0|A)!=(0|o));if(v){if(g=((0|o)<0)<<31>>31,h=0|Et(0|_,0,52),A=0|x(),_>>>0>15)for(e=0,a=0;;){do{if(!(0==(0|f)&0==(0|l))){for(c=0|Mt(0|f,0|l,52),x(),s=(0|(c&=15))<(0|_),c=(0|c)==(0|_),s=0|xt(0|(u=s?0:c?f:0),0|(c=s?0:c?l:0),0|o,0|g),x(),n=0;;){if((0|n)>(0|o)){E=98;break e}if((-117440513&(d=0|i[(O=r+(s<<3)|0)+4>>2])|0)==(0|c)&&(0|i[O>>2])==(0|u)){E=70;break}if((0|i[(O=r+((s=(s+1|0)%(0|o)|0)<<3)|0)>>2])==(0|u)&&(0|i[O+4>>2])==(0|c))break;n=n+1|0}if(70==(0|E)&&(E=0,!0&100663296==(117440512&d|0)))break;i[(O=t+(a<<3)|0)>>2]=f,i[O+4>>2]=l,a=a+1|0}}while(0);if((0|(e=e+1|0))>=(0|o)){o=p;break t}f=0|i[(l=M+(e<<3)|0)>>2],l=0|i[l+4>>2]}for(e=0,a=0;;){do{if(!(0==(0|f)&0==(0|l))){if(c=0|Mt(0|f,0|l,52),x(),(0|(c&=15))>=(0|_))if((0|c)!=(0|_))if(n=f|h,s=-15728641&l|A,c>>>0>>0)c=s;else{u=_;do{O=0|Et(7,0,3*(14-u|0)|0),u=u+1|0,n|=O,s=0|x()|s}while(u>>>0>>0);c=s}else n=f,c=l;else n=0,c=0;for(u=0|xt(0|n,0|c,0|o,0|g),x(),s=0;;){if((0|s)>(0|o)){E=98;break e}if((-117440513&(d=0|i[(O=r+(u<<3)|0)+4>>2])|0)==(0|c)&&(0|i[O>>2])==(0|n)){E=93;break}if((0|i[(O=r+((u=(u+1|0)%(0|o)|0)<<3)|0)>>2])==(0|n)&&(0|i[O+4>>2])==(0|c))break;s=s+1|0}if(93==(0|E)&&(E=0,!0&100663296==(117440512&d|0)))break;i[(O=t+(a<<3)|0)>>2]=f,i[O+4>>2]=l,a=a+1|0}}while(0);if((0|(e=e+1|0))>=(0|o)){o=p;break t}f=0|i[(l=M+(e<<3)|0)>>2],l=0|i[l+4>>2]}}else a=0,o=p}else a=0,o=0}while(0);if(Ct(0|r,0,0|w),Tt(0|M,0|m,o<<3|0),yt(m),!o)break;t=t+(a<<3)|0}return 41==(0|E)?(yt(M),yt(r),0|(O=-1)):51==(0|E)?(yt(M),yt(r),0|(O=-2)):58==(0|E)?(yt(M),yt(r),0|(O=-3)):98==(0|E)?(yt(m),yt(M),yt(r),0|(O=-1)):(99==(0|E)&&Tt(0|t,0|M,o<<3|0),yt(M),yt(r),0|(O=0))},_destroyLinkedPolygon:function(e){var t=0,n=0,r=0,o=0;if(e|=0)for(r=1;;){if(0|(t=0|i[e>>2]))do{if(0|(n=0|i[t>>2]))do{o=n,n=0|i[n+16>>2],yt(o)}while(0!=(0|n));o=t,t=0|i[t+8>>2],yt(o)}while(0!=(0|t));if(t=e,e=0|i[e+8>>2],r||yt(t),!e)break;r=0}},_edgeLengthKm:function(e){return+ +o[20752+((e|=0)<<3)>>3]},_edgeLengthM:function(e){return+ +o[20880+((e|=0)<<3)>>3]},_emscripten_replace_memory:function(e){return r=new Int8Array(e),new Uint8Array(e),i=new Int32Array(e),new Float32Array(e),o=new Float64Array(e),n=e,!0},_exactEdgeLengthKm:function(e,t){var n,r,a=0,s=0,l=0,c=0,h=0,p=0;if(r=L,L=L+176|0,Xe(e|=0,t|=0,n=r),(0|(e=0|i[n>>2]))<=1)return L=r,+(l=0);t=e+-1|0,e=0,a=0,s=+o[n+8>>3],l=+o[n+16>>3];do{h=s,s=+o[n+8+((e=e+1|0)<<4)>>3],p=+f(.5*(s-h)),c=l,l=+o[n+8+(e<<4)+8>>3],c=p*p+(c=+f(.5*(l-c)))*(+d(+h)*+d(+s)*c),a+=2*+m(+ +u(+c),+ +u(+(1-c)))}while((0|e)!=(0|t));return L=r,+(p=6371.007180918475*a)},_exactEdgeLengthM:function(e,t){var n,r,a=0,s=0,l=0,c=0,h=0,p=0;if(r=L,L=L+176|0,Xe(e|=0,t|=0,n=r),(0|(e=0|i[n>>2]))<=1)return L=r,+(l=0);t=e+-1|0,e=0,a=0,s=+o[n+8>>3],l=+o[n+16>>3];do{h=s,s=+o[n+8+((e=e+1|0)<<4)>>3],p=+f(.5*(s-h)),c=l,l=+o[n+8+(e<<4)+8>>3],c=p*p+(c=+f(.5*(l-c)))*(+d(+h)*+d(+s)*c),a+=2*+m(+ +u(+c),+ +u(+(1-c)))}while((0|e)!=(0|t));return L=r,+(p=6371.007180918475*a*1e3)},_exactEdgeLengthRads:function(e,t){var n,r,a=0,s=0,l=0,c=0,h=0,p=0;if(r=L,L=L+176|0,Xe(e|=0,t|=0,n=r),(0|(e=0|i[n>>2]))<=1)return L=r,+(l=0);t=e+-1|0,e=0,a=0,s=+o[n+8>>3],l=+o[n+16>>3];do{h=s,s=+o[n+8+((e=e+1|0)<<4)>>3],p=+f(.5*(s-h)),c=l,l=+o[n+8+(e<<4)+8>>3],c=p*p+(c=+f(.5*(l-c)))*(+d(+s)*+d(+h)*c),a+=2*+m(+ +u(+c),+ +u(+(1-c)))}while((0|e)<(0|t));return L=r,+a},_experimentalH3ToLocalIj:function(e,t,n,r,i){var o,a;return i|=0,a=L,L=L+16|0,(e=0|$e(e|=0,t|=0,n|=0,r|=0,o=a))||(he(o,i),e=0),L=a,0|e},_experimentalLocalIjToH3:function(e,t,n,r){var i,o;return e|=0,t|=0,r|=0,i=L,L=L+16|0,pe(n|=0,o=i),r=0|et(e,t,o,r),L=i,0|r},_free:yt,_geoToH3:Ue,_getDestinationH3IndexFromUnidirectionalEdge:function(e,t){e|=0;var n,r,o=0;return n=L,L=L+16|0,o=n,!0&268435456==(2013265920&(t|=0)|0)?(r=0|Mt(0|e,0|t,56),x(),i[o>>2]=0,o=0|k(e,-2130706433&t|134217728,7&r,o),t=0|x(),w(0|t),L=n,0|o):(o=0,w(0|(t=0)),L=n,0|o)},_getH3IndexesFromUnidirectionalEdge:function(e,t,n){e|=0;var r,o,a,s,l=0;a=L,L=L+16|0,r=a,s=!0&268435456==(2013265920&(t|=0)|0),o=-2130706433&t|134217728,i[(l=n|=0)>>2]=s?e:0,i[l+4>>2]=s?o:0,s?(t=0|Mt(0|e,0|t,56),x(),i[r>>2]=0,e=0|k(e,o,7&t,r),t=0|x()):(e=0,t=0),i[(l=n+8|0)>>2]=e,i[l+4>>2]=t,L=a},_getH3UnidirectionalEdge:function(e,t,n,r){var o,a,s=0,l=0,u=0,c=0,d=0;if(a=L,L=L+16|0,o=a,!(0|qe(e|=0,t|=0,n|=0,r|=0)))return c=0,w(0|(u=0)),L=a,0|c;for(u=-2130706433&t,s=(s=0==(0|ke(e,t)))?1:2;i[o>>2]=0,l=s+1|0,!((0|(d=0|k(e,t,s,o)))==(0|n)&(0|x())==(0|r));){if(!(l>>>0<7)){s=0,e=0,c=6;break}s=l}return 6==(0|c)?(w(0|s),L=a,0|e):(d=0|Et(0|s,0,56),c=0|u|x()|268435456,d|=e,w(0|c),L=a,0|d)},_getH3UnidirectionalEdgeBoundary:Xe,_getH3UnidirectionalEdgesFromHexagon:function(e,t,n){n|=0;var r,o=0;r=0==(0|ke(e|=0,t|=0)),t&=-2130706433,i[(o=n)>>2]=r?e:0,i[o+4>>2]=r?285212672|t:0,i[(o=n+8|0)>>2]=e,i[o+4>>2]=301989888|t,i[(o=n+16|0)>>2]=e,i[o+4>>2]=318767104|t,i[(o=n+24|0)>>2]=e,i[o+4>>2]=335544320|t,i[(o=n+32|0)>>2]=e,i[o+4>>2]=352321536|t,i[(n=n+40|0)>>2]=e,i[n+4>>2]=369098752|t},_getOriginH3IndexFromUnidirectionalEdge:function(e,t){var n;return e|=0,w(0|((n=!0&268435456==(2013265920&(t|=0)|0))?-2130706433&t|134217728:0)),0|(n?e:0)},_getPentagonIndexes:We,_getRes0Indexes:function(e){e|=0;var t=0,n=0,r=0;t=0;do{Et(0|t,0,45),r=134225919|x(),i[(n=e+(t<<3)|0)>>2]=-1,i[n+4>>2]=r,t=t+1|0}while(122!=(0|t))},_h3Distance:function(e,t,n,r){var i,o,a;return n|=0,r|=0,a=L,L=L+32|0,o=a,e=0==(0|$e(e|=0,t|=0,e,t,i=a+12|0))&&0==(0|$e(e,t,n,r,o))?0|fe(i,o):-1,L=a,0|e},_h3GetBaseCell:Le,_h3GetFaces:function e(t,n,r){r|=0;var o,a=0,s=0,l=0,u=0,c=0,d=0,f=0,h=0;o=L,L=L+128|0,f=o+112|0,l=o+96|0,h=o,s=0|Mt(0|(t|=0),0|(n|=0),52),x(),c=15&s,i[f>>2]=c,u=0|Mt(0|t,0|n,45),x(),u&=127;e:do{if(0|j(u)){if(0|c)for(a=1;;){if(!(0==((d=0|Et(7,0,3*(15-a|0)|0))&t|0)&0==((0|x())&n|0))){s=0;break e}if(!(a>>>0>>0))break;a=a+1|0}if(!(1&s))return d=0|Et(c+1|0,0,52),h=0|x()|-15728641&n,e((d|t)&~(f=0|Et(7,0,3*(14-c|0)|0)),h&~(0|x()),r),void(L=o);s=1}else s=0}while(0);Ve(t,n,l),s?(_e(l,f,h),d=5):(Ee(l,f,h),d=6);e:do{if(0|j(u))if(c)for(a=1;;){if(!(0==((u=0|Et(7,0,3*(15-a|0)|0))&t|0)&0==((0|x())&n|0))){a=8;break e}if(!(a>>>0>>0)){a=20;break}a=a+1|0}else a=20;else a=8}while(0);if(Ct(0|r,-1,0|a),s){s=0;do{for(xe(l=h+(s<<4)|0,0|i[f>>2]),l=0|i[l>>2],a=0;!(-1==(0|(c=0|i[(u=r+(a<<2)|0)>>2]))|(0|c)==(0|l));)a=a+1|0;i[u>>2]=l,s=s+1|0}while((0|s)!=(0|d))}else{s=0;do{for(we(l=h+(s<<4)|0,0|i[f>>2],0,1),l=0|i[l>>2],a=0;!(-1==(0|(c=0|i[(u=r+(a<<2)|0)>>2]))|(0|c)==(0|l));)a=a+1|0;i[u>>2]=l,s=s+1|0}while((0|s)!=(0|d))}L=o},_h3GetResolution:function(e,t){return t=0|Mt(0|(e|=0),0|(t|=0),52),x(),15&t|0},_h3IndexesAreNeighbors:qe,_h3IsPentagon:ke,_h3IsResClassIII:function(e,t){return t=0|Mt(0|(e|=0),0|(t|=0),52),x(),1&t|0},_h3IsValid:Pe,_h3Line:function(e,t,n,r,o){n|=0,r|=0,o|=0;var a,s=0,u=0,c=0,d=0,f=0,h=0,p=0,A=0,g=0,m=0,y=0,v=0,b=0,_=0,w=0,x=0,M=0;if(a=L,L=L+48|0,u=a+12|0,x=a,0==(0|$e(e|=0,t|=0,e,t,s=a+24|0))&&0==(0|$e(e,t,n,r,u))){if((0|(w=0|fe(s,u)))<0)return L=a,0|(x=w);for(i[s>>2]=0,i[s+4>>2]=0,i[s+8>>2]=0,i[u>>2]=0,i[u+4>>2]=0,i[u+8>>2]=0,$e(e,t,e,t,s),$e(e,t,n,r,u),Ae(s),Ae(u),w?(g=+(0|w),_=s,n=h=0|i[s>>2],r=p=0|i[(v=s+4|0)>>2],s=A=0|i[(b=s+8|0)>>2],m=+((0|i[u>>2])-h|0)/g,y=+((0|i[u+4>>2])-p|0)/g,g=+((0|i[u+8>>2])-A|0)/g):(v=r=s+4|0,b=A=s+8|0,_=s,n=0|i[s>>2],r=0|i[r>>2],s=0|i[A>>2],m=0,y=0,g=0),i[x>>2]=n,i[(A=x+4|0)>>2]=r,i[(p=x+8|0)>>2]=s,h=0;;){M=m*(d=+(0|h))+ +(0|n),c=y*d+ +(0|i[v>>2]),d=g*d+ +(0|i[b>>2]),r=~~+St(+M),u=~~+St(+c),n=~~+St(+d),M=+l(+(+(0|r)-M)),c=+l(+(+(0|u)-c)),d=+l(+(+(0|n)-d));do{if(!(M>c&M>d)){if(f=0-r|0,c>d){s=f-n|0;break}s=u,n=f-u|0;break}r=0-(u+n)|0,s=u}while(0);if(i[x>>2]=r,i[A>>2]=s,i[p>>2]=n,ge(x),et(e,t,x,o+(h<<3)|0),(0|h)==(0|w))break;h=h+1|0,n=0|i[_>>2]}return L=a,0|(x=0)}return L=a,0|(x=-1)},_h3LineSize:function(e,t,n,r){var i,o,a;return n|=0,r|=0,a=L,L=L+32|0,o=a,e=0==(0|$e(e|=0,t|=0,e,t,i=a+12|0))&&0==(0|$e(e,t,n,r,o))?0|fe(i,o):-1,L=a,(e>>>31^1)+e|0},_h3SetToLinkedGeo:function(e,t,n){n|=0;var r,o,a,s=0;if(a=L,L=L+32|0,r=a,function(e,t,n){e|=0,n|=0;var r,o,a=0,s=0,l=0,u=0,c=0;if(o=L,L=L+176|0,r=o,(0|(t|=0))<1)return ut(n,0,0),void(L=o);u=0|Mt(0|i[(u=e)>>2],0|i[u+4>>2],52),x(),ut(n,(0|t)>6?t:6,15&u),u=0;do{if(Ye(0|i[(a=e+(u<<3)|0)>>2],0|i[a+4>>2],r),(0|(a=0|i[r>>2]))>0){c=0;do{l=r+8+(c<<4)|0,(s=0|pt(n,a=r+8+(((0|(c=c+1|0))%(0|a)|0)<<4)|0,l))?ft(n,s):ht(n,l,a),a=0|i[r>>2]}while((0|c)<(0|a))}u=u+1|0}while((0|u)!=(0|t));L=o}(e|=0,t|=0,o=a+16|0),i[n>>2]=0,i[n+4>>2]=0,i[n+8>>2]=0,!(e=0|dt(o)))return Qe(n),ct(o),void(L=a);do{t=0|Ze(n);do{Ke(t,e),s=e+16|0,i[r>>2]=i[s>>2],i[r+4>>2]=i[s+4>>2],i[r+8>>2]=i[s+8>>2],i[r+12>>2]=i[s+12>>2],ft(o,e),e=0|At(o,r)}while(0!=(0|e));e=0|dt(o)}while(0!=(0|e));Qe(n),ct(o),L=a},_h3ToCenterChild:function(e,t,n){n|=0;var r=0,i=0;if(r=0|Mt(0|(e|=0),0|(t|=0),52),x(),(0|n)<16&(0|(r&=15))<=(0|n)){if((0|r)!=(0|n)&&(e|=i=0|Et(0|n,0,52),t=0|x()|-15728641&t,(0|r)<(0|n)))do{i=0|Et(7,0,3*(14-r|0)|0),r=r+1|0,e&=~i,t&=~(0|x())}while((0|r)<(0|n))}else t=0,e=0;return w(0|t),0|e},_h3ToChildren:De,_h3ToGeo:Ge,_h3ToGeoBoundary:Ye,_h3ToParent:Ie,_h3UnidirectionalEdgeIsValid:function(e,t){var n=0;if(!(!0&268435456==(2013265920&(t|=0)|0)))return 0|(n=0);switch(n=0|Mt(0|(e|=0),0|t,56),x(),7&n){case 0:case 7:return 0|(n=0)}return!0&16777216==(117440512&t|0)&0!=(0|ke(e,n=-2130706433&t|134217728))?0|(n=0):0|(n=0|Pe(e,n))},_hexAreaKm2:function(e){return+ +o[20496+((e|=0)<<3)>>3]},_hexAreaM2:function(e){return+ +o[20624+((e|=0)<<3)>>3]},_hexRing:function(e,t,n,r){e|=0,t|=0,r|=0;var o,a=0,s=0,l=0,u=0,c=0,d=0,f=0;if(o=L,L=L+16|0,f=o,!(n|=0))return i[(f=r)>>2]=e,i[f+4>>2]=t,L=o,0|(f=0);i[f>>2]=0;e:do{if(0|ke(e,t))e=1;else{if(s=(0|n)>0){a=0,d=e;do{if(0==(0|(d=0|k(d,t,4,f)))&0==(0|(t=0|x()))){e=2;break e}if(a=a+1|0,0|ke(d,t)){e=1;break e}}while((0|a)<(0|n));if(i[(c=r)>>2]=d,i[c+4>>2]=t,c=n+-1|0,s){s=0,l=1,a=d,e=t;do{if(0==(0|(a=0|k(a,e,2,f)))&0==(0|(e=0|x()))){e=2;break e}if(i[(u=r+(l<<3)|0)>>2]=a,i[u+4>>2]=e,l=l+1|0,0|ke(a,e)){e=1;break e}s=s+1|0}while((0|s)<(0|n));u=0,s=l;do{if(0==(0|(a=0|k(a,e,3,f)))&0==(0|(e=0|x()))){e=2;break e}if(i[(l=r+(s<<3)|0)>>2]=a,i[l+4>>2]=e,s=s+1|0,0|ke(a,e)){e=1;break e}u=u+1|0}while((0|u)<(0|n));l=0;do{if(0==(0|(a=0|k(a,e,1,f)))&0==(0|(e=0|x()))){e=2;break e}if(i[(u=r+(s<<3)|0)>>2]=a,i[u+4>>2]=e,s=s+1|0,0|ke(a,e)){e=1;break e}l=l+1|0}while((0|l)<(0|n));l=0;do{if(0==(0|(a=0|k(a,e,5,f)))&0==(0|(e=0|x()))){e=2;break e}if(i[(u=r+(s<<3)|0)>>2]=a,i[u+4>>2]=e,s=s+1|0,0|ke(a,e)){e=1;break e}l=l+1|0}while((0|l)<(0|n));l=0;do{if(0==(0|(a=0|k(a,e,4,f)))&0==(0|(e=0|x()))){e=2;break e}if(i[(u=r+(s<<3)|0)>>2]=a,i[u+4>>2]=e,s=s+1|0,0|ke(a,e)){e=1;break e}l=l+1|0}while((0|l)<(0|n));for(l=0;;){if(0==(0|(a=0|k(a,e,6,f)))&0==(0|(e=0|x()))){e=2;break e}if((0|l)!=(0|c)){if(i[(u=r+(s<<3)|0)>>2]=a,i[u+4>>2]=e,0|ke(a,e)){e=1;break e}s=s+1|0}if((0|(l=l+1|0))>=(0|n)){l=d,s=t;break}}}else l=d,a=d,s=t,e=t}else i[(l=r)>>2]=e,i[l+4>>2]=t,l=e,a=e,s=t,e=t;e=1&((0|l)!=(0|a)|(0|s)!=(0|e))}}while(0);return L=o,0|(f=e)},_i64Subtract:bt,_kRing:P,_kRingDistances:function(e,t,n,r,i){var o;if(0|I(e|=0,t|=0,n|=0,r|=0,i|=0)){if(Ct(0|r,0,(o=1+(0|v(3*n|0,n+1|0))|0)<<3|0),0|i)return Ct(0|i,0,o<<2|0),void D(e,t,n,r,i,o,0);(i=0|vt(o,4))&&(D(e,t,n,r,i,o,0),yt(i))}},_llvm_minnum_f64:Ot,_llvm_round_f64:St,_malloc:mt,_maxFaceCount:function(e,t){var n=0,r=0;if(r=0|Mt(0|(e|=0),0|(t|=0),45),x(),!(0|j(127&r)))return 0|(r=2);if(r=0|Mt(0|e,0|t,52),x(),!(r&=15))return 0|(r=5);for(n=1;;){if(!(0==((0|Et(7,0,3*(15-n|0)|0))&e|0)&0==((0|x())&t|0))){n=2,e=6;break}if(!(n>>>0>>0)){n=5,e=6;break}n=n+1|0}return 6==(0|e)?0|n:0},_maxH3ToChildrenSize:function(e,t,n){return n|=0,e=0|Mt(0|(e|=0),0|(t|=0),52),x(),(0|n)<16&(0|(e&=15))<=(0|n)?0|(n=0|tt(7,n-e|0)):0|(n=0)},_maxKringSize:function(e){return 1+(0|v(3*(e|=0)|0,e+1|0))|0},_maxPolyfillSize:function(e,t){t|=0;var n,r=0,o=0,a=0,s=0,l=0;if(n=L,L=L+48|0,a=n+8|0,o=n,s=0|i[(l=e|=0)+4>>2],i[(r=o)>>2]=i[l>>2],i[r+4>>2]=s,rt(o,a),a=0|Y(a,t),t=0|i[o>>2],(0|(o=0|i[e+8>>2]))<=0)return L=n,0|(l=(l=(s=(0|a)<(0|(l=t)))?l:a)+12|0);r=0|i[e+12>>2],e=0;do{t=(0|i[r+(e<<3)>>2])+t|0,e=e+1|0}while((0|e)<(0|o));return L=n,0|(l=(l=(l=(0|a)<(0|t))?t:a)+12|0)},_maxUncompactSize:function(e,t,n){e|=0,n|=0;var r=0,o=0,a=0,s=0;if((0|(t|=0))<=0)return 0|(n=0);if((0|n)>=16){for(r=0;;){if(!(0==(0|i[(s=e+(r<<3)|0)>>2])&0==(0|i[s+4>>2]))){r=-1,o=13;break}if((0|(r=r+1|0))>=(0|t)){r=0,o=13;break}}if(13==(0|o))return 0|r}r=0,s=0;e:for(;;){a=0|i[(o=e+(s<<3)|0)>>2],o=0|i[o+4>>2];do{if(!(0==(0|a)&0==(0|o))){if(o=0|Mt(0|a,0|o,52),x(),(0|(o&=15))>(0|n)){r=-1,o=13;break e}if((0|o)==(0|n)){r=r+1|0;break}r=(0|tt(7,n-o|0))+r|0;break}}while(0);if((0|(s=s+1|0))>=(0|t)){o=13;break}}return 13==(0|o)?0|r:0},_memcpy:Tt,_memset:Ct,_numHexagons:function(e){var t;return e=0|i[(t=21008+((e|=0)<<3)|0)>>2],w(0|i[t+4>>2]),0|e},_pentagonIndexCount:function(){return 12},_pointDistKm:Te,_pointDistM:function(e,t){e|=0;var n,r,i,a=0;return r=+o[(t|=0)>>3],n=+o[e>>3],a=(i=+f(.5*(r-n)))*i+(a=+f(.5*(+o[t+8>>3]-+o[e+8>>3])))*(+d(+r)*+d(+n)*a),2*+m(+ +u(+a),+ +u(+(1-a)))*6371.007180918475*1e3},_pointDistRads:function(e,t){e|=0;var n,r,i,a=0;return r=+o[(t|=0)>>3],n=+o[e>>3],a=(i=+f(.5*(r-n)))*i+(a=+f(.5*(+o[t+8>>3]-+o[e+8>>3])))*(+d(+r)*+d(+n)*a),2*+m(+ +u(+a),+ +u(+(1-a)))},_polyfill:function(e,t,n){var r,o=0,a=0,s=0,l=0,u=0;if(r=L,L=L+48|0,o=r+8|0,a=r,0|function(e,t,n){t|=0,n|=0;var r,o,a,s,l,u=0,c=0,d=0,f=0,h=0,p=0,A=0,g=0,m=0,y=0,v=0,b=0,_=0,w=0,E=0,O=0,S=0,T=0,C=0,P=0,k=0,j=0,F=0,N=0,B=0;l=L,L=L+112|0,o=l+80|0,p=l+72|0,a=l,s=l+56|0,(B=0|mt(32+(i[(A=(e=e|0)+8|0)>>2]<<5)|0))||M(22848,22448,800,22456);if(it(e,B),u=0|i[(d=e)+4>>2],i[(h=p)>>2]=i[d>>2],i[h+4>>2]=u,rt(p,o),h=0|Y(o,t),u=0|i[p>>2],(0|(d=0|i[A>>2]))>0){f=0|i[e+12>>2],c=0;do{u=(0|i[f+(c<<3)>>2])+u|0,c=c+1|0}while((0|c)!=(0|d))}if(c=0|vt(r=(h=(0|h)<(0|u)?u:h)+12|0,8),g=0|vt(r,8),i[o>>2]=0,N=0|i[(F=e)+4>>2],i[(u=p)>>2]=i[F>>2],i[u+4>>2]=N,0|(u=0|R(p,r,t,o,c,g)))return yt(c),yt(g),yt(B),L=l,0|(B=u);e:do{if((0|i[A>>2])>0){for(d=e+12|0,u=0;f=0|R((0|i[d>>2])+(u<<3)|0,r,t,o,c,g),u=u+1|0,!(0|f);)if((0|u)>=(0|i[A>>2]))break e;return yt(c),yt(g),yt(B),L=l,0|(B=f)}}while(0);(0|h)>-12&&Ct(0|g,0,((0|r)>1?r:1)<<3|0);e:do{if((0|i[o>>2])>0){N=((0|r)<0)<<31>>31,T=c,C=g,P=c,k=c,j=g,F=c,u=c,w=c,E=g,O=g,S=g,c=g;t:for(;;){for(_=0|i[o>>2],v=0,b=0,d=0;;){h=(f=a)+56|0;do{i[f>>2]=0,f=f+4|0}while((0|f)<(0|h));if(p=0|i[(t=T+(v<<3)|0)>>2],t=0|i[t+4>>2],0|I(p,t,1,a,0)){h=(f=a)+56|0;do{i[f>>2]=0,f=f+4|0}while((0|f)<(0|h));0|(f=0|vt(7,4))&&(D(p,t,1,a,f,7,0),yt(f))}y=0;do{g=0|i[(m=a+(y<<3)|0)>>2],m=0|i[m+4>>2];n:do{if(!(0==(0|g)&0==(0|m))){if(p=0|xt(0|g,0|m,0|r,0|N),x(),t=0|i[(h=f=n+(p<<3)|0)>>2],h=0|i[h+4>>2],!(0==(0|t)&0==(0|h)))for(A=0;;){if((0|A)>(0|r))break t;if((0|t)==(0|g)&(0|h)==(0|m))break n;if(t=0|i[(h=f=n+((p=(p+1|0)%(0|r)|0)<<3)|0)>>2],h=0|i[h+4>>2],0==(0|t)&0==(0|h))break;A=A+1|0}0==(0|g)&0==(0|m)||(Ge(g,m,s),0|ot(e,B,s)&&(i[(A=f)>>2]=g,i[A+4>>2]=m,i[(A=C+(d<<3)|0)>>2]=g,i[A+4>>2]=m,d=d+1|0))}}while(0);y=y+1|0}while(y>>>0<7);if((0|(b=b+1|0))>=(0|_))break;v=v+1|0}if((0|_)>0&&Ct(0|P,0,_<<3|0),i[o>>2]=d,!((0|d)>0))break e;g=c,m=S,y=F,v=O,b=E,_=C,c=w,S=u,O=k,E=P,w=g,u=m,F=j,j=y,k=v,P=b,C=T,T=_}return yt(k),yt(j),yt(B),L=l,0|(B=-1)}u=g}while(0);return yt(B),yt(c),yt(u),L=l,0|(B=0)}(e|=0,t|=0,n|=0)){if(s=0|i[(u=e)+4>>2],i[(l=a)>>2]=i[u>>2],i[l+4>>2]=s,rt(a,o),l=0|Y(o,t),t=0|i[a>>2],(0|(s=0|i[e+8>>2]))>0){a=0|i[e+12>>2],o=0;do{t=(0|i[a+(o<<3)>>2])+t|0,o=o+1|0}while((0|o)!=(0|s))}(0|(t=(0|l)<(0|t)?t:l))<=-12||Ct(0|n,0,8+(((0|(u=t+11|0))>0?u:0)<<3)|0),L=r}else L=r},_res0IndexCount:function(){return 122},_round:Lt,_sbrk:Pt,_sizeOfCoordIJ:function(){return 8},_sizeOfGeoBoundary:function(){return 168},_sizeOfGeoCoord:function(){return 16},_sizeOfGeoPolygon:function(){return 16},_sizeOfGeofence:function(){return 8},_sizeOfH3Index:function(){return 8},_sizeOfLinkedGeoPolygon:function(){return 12},_uncompact:function(e,t,n,r,o){e|=0,n|=0,r|=0,o|=0;var a=0,s=0,l=0,u=0,c=0,d=0;if((0|(t|=0))<=0)return 0|(o=0);if((0|o)>=16){for(a=0;;){if(!(0==(0|i[(d=e+(a<<3)|0)>>2])&0==(0|i[d+4>>2]))){a=14;break}if((0|(a=a+1|0))>=(0|t)){s=0,a=16;break}}if(14==(0|a))return 0|((0|r)>0?-2:-1);if(16==(0|a))return 0|s}a=0,d=0;e:for(;;){s=0|i[(l=c=e+(d<<3)|0)>>2],l=0|i[l+4>>2];do{if(!(0==(0|s)&0==(0|l))){if((0|a)>=(0|r)){s=-1,a=16;break e}if(u=0|Mt(0|s,0|l,52),x(),(0|(u&=15))>(0|o)){s=-2,a=16;break e}if((0|u)==(0|o)){i[(c=n+(a<<3)|0)>>2]=s,i[c+4>>2]=l,a=a+1|0;break}if((0|(s=(0|tt(7,o-u|0))+a|0))>(0|r)){s=-1,a=16;break e}De(0|i[c>>2],0|i[c+4>>2],o,n+(a<<3)|0),a=s}}while(0);if((0|(d=d+1|0))>=(0|t)){s=0,a=16;break}}return 16==(0|a)?0|s:0},establishStackSpace:function(e,t){L=e|=0},stackAlloc:function(e){var t;return t=L,L=(L=L+(e|=0)|0)+15&-16,0|t},stackRestore:function(e){L=e|=0},stackSave:function(){return 0|L}}}({Math:Math,Int8Array:Int8Array,Int32Array:Int32Array,Uint8Array:Uint8Array,Float32Array:Float32Array,Float64Array:Float64Array},{a:le,b:function(e){u=e},c:c,d:function(e,t,n,r){le("Assertion failed: "+A(e)+", at: "+[t?A(t):"unknown filename",n,r?A(r):"unknown function"])},e:function(e){return n.___errno_location&&(b[n.___errno_location()>>2]=e),e},f:W,g:function(e,t,n){y.set(y.subarray(t,t+n),e)},h:function(e){var t=W();if(e>2130706432)return!1;for(var n=Math.max(t,16777216);n>0]=t;break;case"i16":v[e>>1]=t;break;case"i32":b[e>>2]=t;break;case"i64":B=[t>>>0,(N=t,+P(N)>=1?N>0?(0|k(+D(N/4294967296),4294967295))>>>0:~~+I((N-+(~~N>>>0))/4294967296)>>>0:0)],b[e>>2]=B[0],b[e+4>>2]=B[1];break;case"float":_[e>>2]=t;break;case"double":w[e>>3]=t;break;default:le("invalid type for setValue: "+n)}},n.getValue=function(e,t,n){switch("*"===(t=t||"i8").charAt(t.length-1)&&(t="i32"),t){case"i1":case"i8":return m[e>>0];case"i16":return v[e>>1];case"i32":case"i64":return b[e>>2];case"float":return _[e>>2];case"double":return w[e>>3];default:le("invalid type for getValue: "+t)}return null},n.getTempRet0=c,z){H(z)||(K=z,z=n.locateFile?n.locateFile(K,a):a+K),R++,n.monitorRunDependencies&&n.monitorRunDependencies(R);var re=function(e){e.byteLength&&(e=new Uint8Array(e)),y.set(e,8),n.memoryInitializerRequest&&delete n.memoryInitializerRequest.response,function(e){if(R--,n.monitorRunDependencies&&n.monitorRunDependencies(R),0==R&&(null!==j&&(clearInterval(j),j=null),F)){var t=F;F=null,t()}}()},ie=function(){i(z,re,(function(){throw"could not load memory initializer "+z}))},oe=Z(z);if(oe)re(oe.buffer);else if(n.memoryInitializerRequest){var ae=function(){var e=n.memoryInitializerRequest,t=e.response;if(200!==e.status&&0!==e.status){var r=Z(n.memoryInitializerRequestURL);if(!r)return console.warn("a problem seems to have happened with Module.memoryInitializerRequest, status: "+e.status+", retrying "+z),void ie();t=r.buffer}re(t)};n.memoryInitializerRequest.response?setTimeout(ae,0):n.memoryInitializerRequest.addEventListener("load",ae)}else ie()}function se(e){function t(){Q||(Q=!0,d||(O(T),O(C),n.onRuntimeInitialized&&n.onRuntimeInitialized(),function(){if(n.postRun)for("function"==typeof n.postRun&&(n.postRun=[n.postRun]);n.postRun.length;)e=n.postRun.shift(),L.unshift(e);var e;O(L)}()))}e=e||o,R>0||(!function(){if(n.preRun)for("function"==typeof n.preRun&&(n.preRun=[n.preRun]);n.preRun.length;)e=n.preRun.shift(),S.unshift(e);var e;O(S)}(),R>0||(n.setStatus?(n.setStatus("Running..."),setTimeout((function(){setTimeout((function(){n.setStatus("")}),1),t()}),1)):t()))}function le(e){throw n.onAbort&&n.onAbort(e),s(e+=""),l(e),d=!0,"abort("+e+"). Build with -s ASSERTIONS=1 for more info."}if(F=function e(){Q||se(),Q||(F=e)},n.run=se,n.abort=le,n.preInit)for("function"==typeof n.preInit&&(n.preInit=[n.preInit]);n.preInit.length>0;)n.preInit.pop()();return se(),e}("object"==typeof r?r:{}),i="number",o={};[["sizeOfH3Index",i],["sizeOfGeoCoord",i],["sizeOfGeoBoundary",i],["sizeOfGeoPolygon",i],["sizeOfGeofence",i],["sizeOfLinkedGeoPolygon",i],["sizeOfCoordIJ",i],["h3IsValid","number",["number","number"]],["geoToH3","number",[i,i,"number"]],["h3ToGeo",null,["number","number",i]],["h3ToGeoBoundary",null,["number","number",i]],["maxKringSize",i,[i]],["kRing",null,["number","number",i,i]],["kRingDistances",null,["number","number",i,i,i]],["hexRing",null,["number","number",i,i]],["maxPolyfillSize",i,[i,"number"]],["polyfill",null,[i,"number",i]],["h3SetToLinkedGeo",null,[i,i,i]],["destroyLinkedPolygon",null,[i]],["compact",i,[i,i,i]],["uncompact",i,[i,i,i,i,"number"]],["maxUncompactSize",i,[i,i,"number"]],["h3IsPentagon","number",["number","number"]],["h3IsResClassIII","number",["number","number"]],["h3GetBaseCell",i,["number","number"]],["h3GetResolution",i,["number","number"]],["maxFaceCount",i,["number","number"]],["h3GetFaces",null,["number","number",i]],["h3ToParent","number",["number","number","number"]],["h3ToChildren",null,["number","number","number",i]],["h3ToCenterChild","number",["number","number","number"]],["maxH3ToChildrenSize",i,["number","number","number"]],["h3IndexesAreNeighbors","number",["number","number","number","number"]],["getH3UnidirectionalEdge","number",["number","number","number","number"]],["getOriginH3IndexFromUnidirectionalEdge","number",["number","number"]],["getDestinationH3IndexFromUnidirectionalEdge","number",["number","number"]],["h3UnidirectionalEdgeIsValid","number",["number","number"]],["getH3IndexesFromUnidirectionalEdge",null,["number","number",i]],["getH3UnidirectionalEdgesFromHexagon",null,["number","number",i]],["getH3UnidirectionalEdgeBoundary",null,["number","number",i]],["h3Distance",i,["number","number","number","number"]],["h3Line",i,["number","number","number","number",i]],["h3LineSize",i,["number","number","number","number"]],["experimentalH3ToLocalIj",i,["number","number","number","number",i]],["experimentalLocalIjToH3",i,["number","number",i,i]],["hexAreaM2",i,["number"]],["hexAreaKm2",i,["number"]],["edgeLengthM",i,["number"]],["edgeLengthKm",i,["number"]],["pointDistM",i,[i,i]],["pointDistKm",i,[i,i]],["pointDistRads",i,[i,i]],["cellAreaM2",i,["number","number"]],["cellAreaKm2",i,["number","number"]],["cellAreaRads2",i,["number","number"]],["exactEdgeLengthM",i,["number","number"]],["exactEdgeLengthKm",i,["number","number"]],["exactEdgeLengthRads",i,["number","number"]],["numHexagons",i,["number"]],["getRes0Indexes",null,[i]],["res0IndexCount",i],["getPentagonIndexes",null,[i,i]],["pentagonIndexCount",i]].forEach((function(e){o[e[0]]=r.cwrap.apply(r,e)}));var a=o.sizeOfH3Index(),s=o.sizeOfGeoCoord(),l=o.sizeOfGeoBoundary(),u=o.sizeOfGeoPolygon(),c=o.sizeOfGeofence(),d=o.sizeOfLinkedGeoPolygon(),f=o.sizeOfCoordIJ(),h={m:"m",m2:"m2",km:"km",km2:"km2",rads:"rads",rads2:"rads2"};function p(e){if("number"!=typeof e||e<0||e>15||Math.floor(e)!==e)throw new Error("Invalid resolution: "+e)}var A=/[^0-9a-fA-F]/;function g(e){if(Array.isArray(e)&&2===e.length&&Number.isInteger(e[0])&&Number.isInteger(e[1]))return e;if("string"!=typeof e||A.test(e))return[0,0];var t=parseInt(e.substring(0,e.length-8),16);return[parseInt(e.substring(e.length-8),16),t]}function m(e){if(e>=0)return e.toString(16);var t=v(8,(e&=2147483647).toString(16));return t=(parseInt(t[0],16)+8).toString(16)+t.substring(1)}function y(e,t){return m(t)+v(8,m(e))}function v(e,t){for(var n=e-t.length,r="",i=0;i=0&&n.push(o)}return n}(s,a);return r._free(s),l}function F(e){var t=g(e),n=t[0],r=t[1];return o.h3IsValid(n,r)?o.h3GetResolution(n,r):-1}function N(e,t,n){var i=r._malloc(s);r.HEAPF64.set([e,t].map(me),i/8);var a=w(o.geoToH3(i,n));return r._free(i),a}function B(e){var t=r._malloc(s),n=g(e),i=n[0],a=n[1];o.h3ToGeo(i,a,t);var l=C(t);return r._free(t),l}function z(e,t){var n=r._malloc(l),i=g(e),a=i[0],s=i[1];o.h3ToGeoBoundary(a,s,n);var u=P(n,t,t);return r._free(n),u}function U(e,t){var n=g(e),r=n[0],i=n[1];return w(o.h3ToParent(r,i,t))}function H(e,t){if(!I(e))return[];var n=g(e),i=n[0],s=n[1],l=o.maxH3ToChildrenSize(i,s,t),u=r._calloc(l,a);o.h3ToChildren(i,s,t,u);var c=E(u,l);return r._free(u),c}function V(e,t){var n=g(e),r=n[0],i=n[1];return w(o.h3ToCenterChild(r,i,t))}function G(e,t){var n=g(e),i=n[0],s=n[1],l=o.maxKringSize(t),u=r._calloc(l,a);o.kRing(i,s,t,u);var c=E(u,l);return r._free(u),c}function Y(e,t){var n=g(e),i=n[0],s=n[1],l=o.maxKringSize(t),u=r._calloc(l,a),c=r._calloc(l,4);o.kRingDistances(i,s,t,u,c);for(var d=[],f=0;f0){n=r._calloc(i,c);for(var l=0;l0){for(var o=r.getValue(e+n,"i32"),a=0;a2&&void 0!==arguments[2]?arguments[2]:{},i=r.shallowCopy,o=void 0===i?[]:i,a=r.notToCopy,s=void 0===a?[]:a,l={};return Object.keys(e).forEach((function(r){(0,v.isPlainObject)(e[r])&&(0,v.isPlainObject)(t[r])&&!o.includes(r)&&!s.includes(r)?l[r]=n.copyLayerConfig(e[r],t[r],{shallowCopy:o,notToCopy:s}):(0,v.notNullorUndefined)(t[r])&&!s.includes(r)?l[r]=t[r]:l[r]=e[r]})),l}},{key:"registerVisConfig",value:function(e){var t=this;Object.keys(e).forEach((function(n){var r=e[n];"string"==typeof r&&y.LAYER_VIS_CONFIGS[r]?(t.config.visConfig[n]=y.LAYER_VIS_CONFIGS[r].defaultValue,t.visConfigSettings[n]=y.LAYER_VIS_CONFIGS[r]):"object"===(0,a.default)(r)&&["type","defaultValue"].every((function(e){return r.hasOwnProperty(e)}))&&(t.config.visConfig[n]=r.defaultValue,t.visConfigSettings[n]=r)}))}},{key:"getLayerColumns",value:function(){var e=this.columnValidators,t=this.requiredLayerColumns.reduce((function(t,n){return _(_({},t),{},(0,u.default)({},n,e[n]?{value:null,fieldIdx:-1,validator:e[n]}:{value:null,fieldIdx:-1}))}),{}),n=this.optionalColumns.reduce((function(e,t){return _(_({},e),{},(0,u.default)({},t,{value:null,fieldIdx:-1,optional:!0}))}),{});return _(_({},t),n)}},{key:"updateLayerConfig",value:function(e){return this.config=_(_({},this.config),e),this}},{key:"updateLayerVisConfig",value:function(e){return this.config.visConfig=_(_({},this.config.visConfig),e),this}},{key:"updateLayerColorUI",value:function(e,t){var n=this.config,r=n.colorUI,i=n.visConfig;if(!(0,v.isPlainObject)(t)||"string"!=typeof e)return this;var a=Object.entries(t).reduce((function(e,t){var n=(0,o.default)(t,2),r=n[0],i=n[1];return _(_({},e),{},(0,u.default)({},r,(0,v.isPlainObject)(e[r])&&(0,v.isPlainObject)(i)?_(_({},e[r]),i):i))}),r[e]||y.DEFAULT_COLOR_UI),s=_(_({},r),{},(0,u.default)({},e,a));return this.updateLayerConfig({colorUI:s}),i[e]&&i[e].colors&&(this.updateColorUIByColorRange(t,e),this.updateColorRangeByColorUI(t,r,e),this.updateCustomPalette(t,r,e)),this}},{key:"updateCustomPalette",value:function(e,t,n){if(e.colorRangeConfig&&e.colorRangeConfig.custom){var r=this.config,o=r.colorUI,a=r.visConfig;if(a[n]){var s=a[n].colors,l=_(_({},o[n].customPalette),{},{name:"Custom Palette",colors:(0,i.default)(s)});this.updateLayerConfig({colorUI:_(_({},o),{},(0,u.default)({},n,_(_({},o[n]),{},{customPalette:l})))})}}}},{key:"updateColorUIByColorRange",value:function(e,t){if("number"==typeof e.showDropdown){var n=this.config,r=n.colorUI,i=n.visConfig;this.updateLayerConfig({colorUI:_(_({},r),{},(0,u.default)({},t,_(_({},r[t]),{},{colorRangeConfig:_(_({},r[t].colorRangeConfig),{},{steps:i[t].colors.length,reversed:Boolean(i[t].reversed)})})))})}}},{key:"updateColorRangeByColorUI",value:function(e,t,n){if(e.colorRangeConfig&&["reversed","steps"].some((function(r){return e.colorRangeConfig.hasOwnProperty(r)&&e.colorRangeConfig[r]!==(t[n]||y.DEFAULT_COLOR_UI).colorRangeConfig[r]}))){var r,i=this.config,o=i.colorUI,a=i.visConfig,s=o[n].colorRangeConfig,l=s.steps,c=s.reversed,d=a[n];if(e.colorRangeConfig.hasOwnProperty("steps")){var f=(0,v.getColorGroupByName)(d);if(f)(r=y.COLOR_RANGES.filter((function(e){return(0,v.getColorGroupByName)(e)===f})).find((function(e){return e.colors.length===l})))&&d.reversed&&(r=(0,v.reverseColorRange)(!0,r))}e.colorRangeConfig.hasOwnProperty("reversed")&&(r=(0,v.reverseColorRange)(c,r||d)),r&&this.updateLayerVisConfig((0,u.default)({},n,r))}}},{key:"hasAllColumns",value:function(){var e=this.config.columns;return e&&Object.values(e).every((function(e){return Boolean(e&&(e.optional||e.value&&e.fieldIdx>-1))}))}},{key:"hasLayerData",value:function(e){return!!e&&Boolean(e.data&&e.data.length)}},{key:"isValidToSave",value:function(){return Boolean(this.type&&this.hasAllColumns())}},{key:"shouldRenderLayer",value:function(e){return Boolean(this.type)&&this.hasAllColumns()&&this.hasLayerData(e)&&"function"==typeof this.renderLayer}},{key:"getColorScale",value:function(e,t,n){if(Array.isArray(n.colorMap)){var r=new Map;return n.colorMap.forEach((function(e){var t=(0,o.default)(e,2),n=t[0],i=t[1];r.set(n,"string"==typeof i?(0,v.hexToRgb)(i):i)})),y.SCALE_FUNC[y.SCALE_TYPES.ordinal]().domain(r.keys()).range(r.values()).unknown(r.get(y.UNKNOWN_COLOR_KEY)||y.NO_VALUE_COLOR)}return this.getVisChannelScale(e,t,n.colors.map(v.hexToRgb))}},{key:"getAttributeAccessors",value:function(e){var t=this,n=e.dataAccessor,r=void 0===n?E:n,i=e.dataContainer,o={};return Object.keys(this.visualChannels).forEach((function(e){var n=t.visualChannels[e],a=n.field,s=n.fixed,l=n.scale,u=n.domain,c=n.range,f=n.accessor,h=n.defaultValue,p=n.getAttributeValue,A=n.nullValue,g=n.channelScaleType;if(f){if(t.config[a]){var m=s&&t.config.visConfig[s],v=g===y.CHANNEL_SCALES.color?t.getColorScale(t.config[l],t.config[u],t.config.visConfig[c]):t.getVisChannelScale(t.config[l],t.config[u],t.config.visConfig[c],m);o[f]=function(e){return t.getEncodedChannelValue(v,r(i)(e),t.config[a],A)}}else o[f]="function"==typeof p?p(t.config):"function"==typeof h?h(t.config):h;o[f]||d.console.warn("Failed to provide accessor function for ".concat(f||e))}})),o}},{key:"getVisChannelScale",value:function(e,t,n,r){return y.SCALE_FUNC[r?"linear":e]().domain(t).range(r?t:n)}},{key:"getPointsBounds",value:function(e,t){var n=e.numRows()>5e3?(0,v.getSampleContainerData)(e,5e3):e,r=t?n.mapIndex(t):[],i=(0,v.getLatLngBounds)(r,1,[-90,90]),o=(0,v.getLatLngBounds)(r,0,[-180,180]);return i&&o?[o[0],i[0],o[1],i[1]]:null}},{key:"getChangedTriggers",value:function(e){var t=(0,m.diffUpdateTriggers)(e,this._oldDataUpdateTriggers);return this._oldDataUpdateTriggers=e,t}},{key:"getEncodedChannelValue",value:function(e,t,n){var r,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:y.NO_VALUE_COLOR,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:O,a=n.type,s=o(n,t);return(0,v.notNullorUndefined)(s)?(r=a===y.ALL_FIELD_TYPES.timestamp?e(new Date(s)):e(s),(0,v.notNullorUndefined)(r)||(r=i),r):i}},{key:"updateMeta",value:function(e){this.meta=_(_({},this.meta),e)}},{key:"getDataUpdateTriggers",value:function(e){var t=e.filteredIndex,n=e.id,r=e.dataContainer,i=this.config.columns;return _({getData:{datasetId:n,dataContainer:r,columns:i,filteredIndex:t},getMeta:{datasetId:n,dataContainer:r,columns:i}},(this.config.textLabel||[]).reduce((function(e,t,n){return _(_({},e),{},(0,u.default)({},"getLabelCharacterSet-".concat(n),t.field?t.field.name:null))}),{}))}},{key:"updateData",value:function(e,t){if(!this.config.dataId)return{};var n=e[this.config.dataId],r=n.dataContainer,i=this.getPositionAccessor(r),o=this.getDataUpdateTriggers(n),a=this.getChangedTriggers(o);a&&(a.getMeta||a.getData)&&this.updateLayerMeta(r,i);return{data:a&&a.getData||!t||!t.data?this.calculateDataAttribute(n,i):t.data,triggerChanged:a}}},{key:"updateLayerDomain",value:function(e,t){var n=this,r=this.getDataset(e);return r?(Object.values(this.visualChannels).forEach((function(e){var i=e.scale,o=n.config[i];if(!t||o!==y.SCALE_TYPES.ordinal){var a=e.domain,s=n.calculateLayerDomain(r,e);n.updateLayerConfig((0,u.default)({},a,s))}})),this):this}},{key:"getDataset",value:function(e){return this.config.dataId?e[this.config.dataId]:null}},{key:"validateVisualChannel",value:function(e){this.validateFieldType(e),this.validateScale(e)}},{key:"validateFieldType",value:function(e){var t=this.visualChannels[e],n=t.field,r=t.channelScaleType,i=t.supportedFieldTypes;this.config[n]&&((i||y.CHANNEL_SCALE_SUPPORTED_FIELDS[r]).includes(this.config[n].type)||this.updateLayerConfig((0,u.default)({},n,null)))}},{key:"validateScale",value:function(e){var t=this.visualChannels[e].scale;if(t){var n=this.getScaleOptions(e);n.includes(this.config[t])||this.updateLayerConfig((0,u.default)({},t,n[0]))}}},{key:"getScaleOptions",value:function(e){var t=this.visualChannels[e],n=t.field,r=t.scale,i=t.channelScaleType;return this.config[n]?y.FIELD_OPTS[this.config[n].type].scale[i]:[this.getDefaultLayerConfig({dataId:""})[r]]}},{key:"updateLayerVisualChannel",value:function(e,t){var n=this.visualChannels[t];this.validateVisualChannel(t);var r=this.calculateLayerDomain(e,n);this.updateLayerConfig((0,u.default)({},n.domain,r))}},{key:"getVisualChannelUpdateTriggers",value:function(){var e=this,t={};return Object.values(this.visualChannels).forEach((function(n){var r,i=n.accessor,o=n.field,a=n.scale,s=n.domain,l=n.range,c=n.defaultValue,d=n.fixed;i&&(t[i]=_((r={},(0,u.default)(r,o,e.config[o]),(0,u.default)(r,a,e.config[a]),(0,u.default)(r,s,e.config[s]),(0,u.default)(r,l,e.config.visConfig[l]),(0,u.default)(r,"defaultValue","function"==typeof c?c(e.config):c),r),d?(0,u.default)({},d,e.config.visConfig[d]):{}))})),t}},{key:"calculateLayerDomain",value:function(e,t){var n=t.scale,r=this.config[n],i=this.config[t.field];return i&&e.getColumnLayerDomain(i,r)||x}},{key:"hasHoveredObject",value:function(e){return this.isLayerHovered(e)&&e.object?e.object:null}},{key:"isLayerHovered",value:function(e){var t,n;return(null==e?void 0:e.picked)&&(null==e||null===(t=e.layer)||void 0===t||null===(n=t.props)||void 0===n?void 0:n.id)===this.id}},{key:"getRadiusScaleByZoom",value:function(e,t){var n=Object.values(this.visualChannels).find((function(e){return"radius"===e.property}));if(!n)return 1;var r=n.field,i=void 0===t?this.config.visConfig.fixedRadius:t,o=this.config.visConfig.radius;return i?1:(this.config[r]?1:o)*this.getZoomFactor(e)}},{key:"shouldCalculateLayerData",value:function(e){var t=this;return e.some((function(e){return!t.noneLayerDataAffectingProps.includes(e)}))}},{key:"getBrushingExtensionProps",value:function(e,t){var n=e.brush;return{autoHighlight:!n.enabled,brushingRadius:1e3*n.config.size,brushingTarget:t||"source",brushingEnabled:n.enabled}}},{key:"getDefaultDeckLayerProps",value:function(e){var t=e.idx,n=e.gpuFilter,r=e.mapState,i=e.visible;return{id:this.id,idx:t,coordinateSystem:p.COORDINATE_SYSTEM.LNGLAT,pickable:!0,wrapLongitude:!0,parameters:{depthTest:Boolean(r.dragRotate||this.config.visConfig.enable3d)},hidden:this.config.hidden,opacity:this.config.visConfig.opacity,highlightColor:this.config.highlightColor,extensions:[M],filterRange:n?n.filterRange:void 0,visible:this.config.isVisible&&i}}},{key:"getDefaultHoverLayerProps",value:function(){return{id:"".concat(this.id,"-hovered"),pickable:!1,wrapLongitude:!0,coordinateSystem:p.COORDINATE_SYSTEM.LNGLAT}}},{key:"renderTextLabelLayer",value:function(e,t){var n=this,r=e.getPosition,i=e.getPixelOffset,o=e.backgroundProps,a=e.updateTriggers,s=e.sharedProps,l=t.data,u=t.mapState,c=this.config.textLabel;return l.textLabels.reduce((function(e,t,d){if(t.getText){var f,h,p=c[d].background||(null==o?void 0:o.background);e.push(new A.TextLayer(_(_({},s),{},{id:"".concat(n.id,"-label-").concat(null===(f=c[d].field)||void 0===f?void 0:f.name),data:l.data,visible:n.config.isVisible,getText:t.getText,getPosition:r,characterSet:t.characterSet,getPixelOffset:i(c[d]),getSize:y.PROJECTED_PIXEL_SIZE_MULTIPLIER,sizeScale:c[d].size,getTextAnchor:c[d].anchor,getAlignmentBaseline:c[d].alignment,getColor:c[d].color,outlineWidth:c[d].outlineWidth*y.TEXT_OUTLINE_MULTIPLIER,outlineColor:c[d].outlineColor,background:p,getBackgroundColor:c[d].backgroundColor,fontSettings:{sdf:c[d].outlineWidth>0},parameters:{depthTest:!1},getFilterValue:l.getFilterValue,updateTriggers:_(_({},a),{},{getText:null===(h=c[d].field)||void 0===h?void 0:h.name,getPixelOffset:_(_({},a.getRadius),{},{mapState:u,anchor:c[d].anchor,alignment:c[d].alignment}),getTextAnchor:c[d].anchor,getAlignmentBaseline:c[d].alignment,getColor:c[d].color}),_subLayerProps:_({},p?{background:{parameters:{cull:!1}}}:null)})))}return e}),[])}},{key:"calculateDataAttribute",value:function(e,t){return[]}},{key:"updateLayerMeta",value:function(e,t){}},{key:"getPositionAccessor",value:function(e){return function(){return null}}}],[{key:"findDefaultLayerProps",value:function(e,t){return{props:[],foundLayers:t}}},{key:"findDefaultColumnField",value:function(e,t){var n=Object.keys(e).reduce((function(n,r){var i=t.filter((function(t){return t.name===e[r]||e[r].includes(t.name)}));return n[r]=i.length?i.map((function(e){return{value:e.name,fieldIdx:e.fieldIdx}})):null,n}),{});return Object.values(n).every(Boolean)?this.getAllPossibleColumnParis(n):null}},{key:"getAllPossibleColumnParis",value:function(e){for(var t=Object.keys(e),n=t.map((function(e,n){return n===t.length-1?-1:0})),r=t.map((function(t){return e[t].length})),i=[];a(n,r,n.length-1);){var o=n.reduce((function(n,r,i){return n[t[i]]=e[t[i]][r],n}),{});i.push(o)}function a(e,t,n){return(0!==n||e[0]!==t[0]-1)&&(e[n]+1{const r=new FileReader;r.onload=e=>{var n;return t(null==e||null===(n=e.target)||void 0===n?void 0:n.result)},r.onerror=e=>n(e),r.readAsArrayBuffer(e)})}(r)}var o=n(190),a=n(346),s=n(227),l=n(271),u=n(136),c=n(367),d=n(272),f=n(140);function h(e,t,n,r){Array.isArray(t)||Object(u.a)(t)||(r=void 0,n=t,t=void 0),n=n||{};const i=t,a=Object(d.b)(i,r),l=Object(s.b)(e,a,n);if(!l)return null;n=Object(o.c)(n,l,a);const h=Object(f.c)(e),p=()=>{throw new Error("parseSync called parse (which is async")};return function(e,t,n,r){if(t=Object(c.b)(t,e,n),e.parseTextSync&&"string"==typeof t)return e.parseTextSync(t,n);if(e.parseSync&&t instanceof ArrayBuffer)return e.parseSync(t,n,r);throw new Error(`${e.name} loader: 'parseSync' not supported by this loader, use 'parse' instead. ${r.url||""}`)}(l,e,n,r=Object(d.a)({url:h,_parseSync:p,_parse:p,loaders:t},n,r||null))}var p=n(299),A=n(502);async function g(e,t,n,r){const i=Array.isArray(t)?t:void 0;Array.isArray(t)||Object(u.a)(t)||(r=void 0,n=t,t=void 0),e=await e,n=n||{};const a=Object(f.c)(e),h=await Object(s.a)(e,t,n);return h?(n=Object(o.c)(n,h,i,a),r=Object(d.a)({url:a,_parseInBatches:g,_parse:l.a,loaders:i},n,r||null),await async function(e,t,n,r){const i=await async function(e,t,n,r){const i=await Object(c.c)(t,n),o=await async function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=e;for await(const e of t)n=e(n);return n}(i,(null==n?void 0:n.transforms)||[]);if(e.parseInBatches)return e.parseInBatches(o,n,r);return async function*(e,t,n,r){const i=await Object(A.a)(e),o=function(e,t){const n=Object(p.isTable)(e)?Object(p.makeBatchFromTable)(e):{shape:"unknown",batchType:"data",data:e,length:Array.isArray(e)?e.length:1};return n.mimeType=t.mimeTypes[0],n}(await Object(l.a)(i,t,{...n,mimeType:t.mimeTypes[0]},r),t);yield o}(o,e,n,r)}(e,t,n,r);if(!n.metadata)return i;const o={shape:"metadata",batchType:"metadata",metadata:{_loader:e,_context:r},data:[],bytesUsed:0};return async function*(e){yield o,yield*e}(i)}(h,e,n,r)):[]}var m=n(871),y=n(366);function v(e,t,n,r){let i;Array.isArray(t)||Object(u.a)(t)?i=t:(void 0,n=t,i=void 0);const o=Object(y.a)(n||{});if(!Array.isArray(e))return b(e,i,n||{},o);return e.map(e=>b(e,i,n||{},o))}async function b(e,t,n,r){if("string"==typeof e){const i=e,o=await r(i);return Array.isArray(t),await g(o,t,n)}return Array.isArray(t),await g(e,t,n)}var _=n(297);async function w(e,t,n){if(t.encode)return await t.encode(e,n);if(t.encodeText){const r=await t.encodeText(e,n);return(new TextEncoder).encode(r)}if(t.encodeInBatches){const r=M(e,t,n),i=[];for await(const e of r)i.push(e);return Object(_.b)(...i)}throw new Error("Writer could not encode data")}async function x(e,t,n){if(t.text&&t.encodeText)return await t.encodeText(e,n);if(t.text){const r=await w(e,t,n);return(new TextDecoder).decode(r)}throw new Error(`Writer ${t.name} could not encode data as text`)}function M(e,t,n){if(t.encodeInBatches){const r=function(e){return[{...e,start:0,end:e.length}]}(e);return t.encodeInBatches(r,n)}throw new Error("Writer could not encode data in batches")}var E=n(872),O=n(296),S=n(873),T=n(1841),C=n(169);async function L(e,t,n){return n={...Object(o.a)(),...n},t.encodeURLtoURL?async function(e,t,n){if(C.c)throw new Error(`Writer ${e.name} not supported in browser`);const i=F("input"),o=new S.a(i,"w");await o.write(t);const a=F("output"),s=await R(i,a,e,n);return(await Object(r.a)(s)).arrayBuffer()}(t,e,n):Object(E.a)(t,n)?await Object(T.a)(t,e,n):await t.encode(e,n)}function P(e,t,n){if(t.encodeSync)return t.encodeSync(e,n);if(t.encodeTextSync)return(new TextEncoder).encode(t.encodeTextSync(e,n));throw new Error(`Writer ${t.name} could not synchronously encode data`)}async function I(e,t,n){if(t.encodeText)return await t.encodeText(e,n);if(t.encodeTextSync)return t.encodeTextSync(e,n);if(t.text){const r=await t.encode(e,n);return(new TextDecoder).decode(r)}throw new Error(`Writer ${t.name} could not encode data as text`)}function D(e,t,n){if(t.encodeTextSync)return t.encodeTextSync(e,n);if(t.text&&t.encodeSync){const r=P(e,t,n);return(new TextDecoder).decode(r)}throw new Error(`Writer ${t.name} could not encode data as text`)}function k(e,t,n){if(t.encodeInBatches){const r=j(e);return t.encodeInBatches(r,n)}throw new Error(`Writer ${t.name} could not encode in batches`)}async function R(e,t,n,r){if(e=Object(O.b)(e),t=Object(O.b)(t),C.c||!n.encodeURLtoURL)throw new Error;return await n.encodeURLtoURL(e,t,r)}function j(e){return[{...e,start:0,end:e.length}]}function F(e){return"/tmp/"+e}var N=n(1132),B=n(374);function z(e,t){if(globalThis.loaders.makeNodeStream)return globalThis.loaders.makeNodeStream(e,t);const n=e[Symbol.asyncIterator]?e[Symbol.asyncIterator]():e[Symbol.iterator]();return new ReadableStream({type:"bytes",async pull(e){try{const{done:t,value:r}=await n.next();t?e.close():e.enqueue(new Uint8Array(r))}catch(t){e.error(t)}},async cancel(){var e;await(null==n||null===(e=n.return)||void 0===e?void 0:e.call(n))}},{highWaterMark:2**24,...t})}const U={name:"Null loader",id:"null",module:"core",version:"4.1.0-alpha.4",worker:!0,mimeTypes:["application/x.empty"],extensions:["null"],tests:[()=>!1],options:{null:{}}},H={name:"Null loader",id:"null",module:"core",version:"4.1.0-alpha.4",mimeTypes:["application/x.empty"],extensions:["null"],parse:async(e,t,n)=>null,parseSync:V,parseInBatches:async function*(e,t,n){for await(const t of e)yield null},tests:[()=>!1],options:{null:{}}};function V(e,t,n){return null}var G=n(874);async function Y(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:()=>{},r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:()=>{};if(!(e=await e).ok)return e;const i=e.body;if(!i)return e;const o=e.headers.get("content-length")||0,a=o?parseInt(o):0;if(!(a>0))return e;if("undefined"==typeof ReadableStream||!i.getReader)return e;const s=new ReadableStream({async start(e){const o=i.getReader();await W(e,o,0,a,t,n,r)}});return new Response(s)}async function W(e,t,n,r,i,o,a){try{const{done:s,value:l}=await t.read();if(s)return o(),void e.close();n+=l.byteLength;i(Math.round(n/r*100),{loadedBytes:n,totalBytes:r}),e.enqueue(l),await W(e,t,n,r,i,o,a)}catch(t){e.error(t),a(t)}}var q=n(875);class X{constructor(e,t){this._fetch=void 0,this.files={},this.lowerCaseFiles={},this.usedFiles={},this._fetch=(null==t?void 0:t.fetch)||fetch;for(let t=0;t1-(1-e)*(1-e),l=["wheel"],u=["panstart","panmove","panend"],c=["pinchstart","pinchmove","pinchend"],d=["tripanstart","tripanmove","tripanend"],f=["doubletap"],h=["keydown"],p={};class A{constructor(e){Object(r.a)(this,"props",void 0),Object(r.a)(this,"state",{}),Object(r.a)(this,"transitionManager",void 0),Object(r.a)(this,"eventManager",void 0),Object(r.a)(this,"onViewStateChange",void 0),Object(r.a)(this,"onStateChange",void 0),Object(r.a)(this,"makeViewport",void 0),Object(r.a)(this,"_controllerState",void 0),Object(r.a)(this,"_events",{}),Object(r.a)(this,"_interactionState",{isDragging:!1}),Object(r.a)(this,"_customEvents",[]),Object(r.a)(this,"_eventStartBlocked",null),Object(r.a)(this,"_panMove",!1),Object(r.a)(this,"invertPan",!1),Object(r.a)(this,"dragMode","rotate"),Object(r.a)(this,"inertia",0),Object(r.a)(this,"scrollZoom",!0),Object(r.a)(this,"dragPan",!0),Object(r.a)(this,"dragRotate",!0),Object(r.a)(this,"doubleClickZoom",!0),Object(r.a)(this,"touchZoom",!0),Object(r.a)(this,"touchRotate",!1),Object(r.a)(this,"keyboard",!0),this.transitionManager=new i.b({...e,getControllerState:e=>new this.ControllerState(e),onViewStateChange:this._onTransition.bind(this),onStateChange:this._setInteractionState.bind(this)}),this.handleEvent=this.handleEvent.bind(this),this.eventManager=e.eventManager,this.onViewStateChange=e.onViewStateChange||(()=>{}),this.onStateChange=e.onStateChange||(()=>{}),this.makeViewport=e.makeViewport}set events(e){this.toggleEvents(this._customEvents,!1),this.toggleEvents(e,!0),this._customEvents=e,this.props&&this.setProps(this.props)}finalize(){for(const t in this._events){var e;if(this._events[t])null===(e=this.eventManager)||void 0===e||e.off(t,this.handleEvent)}this.transitionManager.finalize()}handleEvent(e){this._controllerState=void 0;const t=this._eventStartBlocked;switch(e.type){case"panstart":return!t&&this._onPanStart(e);case"panmove":return this._onPan(e);case"panend":return this._onPanEnd(e);case"pinchstart":return!t&&this._onPinchStart(e);case"pinchmove":return this._onPinch(e);case"pinchend":return this._onPinchEnd(e);case"tripanstart":return!t&&this._onTriplePanStart(e);case"tripanmove":return this._onTriplePan(e);case"tripanend":return this._onTriplePanEnd(e);case"doubletap":return this._onDoubleTap(e);case"wheel":return this._onWheel(e);case"keydown":return this._onKeyDown(e);default:return!1}}get controllerState(){return this._controllerState=this._controllerState||new this.ControllerState({makeViewport:this.makeViewport,...this.props,...this.state}),this._controllerState}getCenter(e){const{x:t,y:n}=this.props,{offsetCenter:r}=e;return[r.x-t,r.y-n]}isPointInBounds(e,t){const{width:n,height:r}=this.props;if(t&&t.handled)return!1;const i=e[0]>=0&&e[0]<=n&&e[1]>=0&&e[1]<=r;return i&&t&&t.stopPropagation(),i}isFunctionKeyPressed(e){const{srcEvent:t}=e;return Boolean(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}isDragging(){return this._interactionState.isDragging||!1}blockEvents(e){const t=setTimeout(()=>{this._eventStartBlocked===t&&(this._eventStartBlocked=null)},e);this._eventStartBlocked=t}setProps(e){e.dragMode&&(this.dragMode=e.dragMode),this.props=e,"transitionInterpolator"in e||(e.transitionInterpolator=this._getTransitionProps().transitionInterpolator),this.transitionManager.processViewStateChange(e);const{inertia:t}=e;this.inertia=Number.isFinite(t)?t:!0===t?300:0;const{scrollZoom:n=!0,dragPan:r=!0,dragRotate:i=!0,doubleClickZoom:o=!0,touchZoom:a=!0,touchRotate:s=!1,keyboard:p=!0}=e,A=Boolean(this.onViewStateChange);this.toggleEvents(l,A&&n),this.toggleEvents(u,A),this.toggleEvents(c,A&&(a||s)),this.toggleEvents(d,A&&s),this.toggleEvents(f,A&&o),this.toggleEvents(h,A&&p),this.scrollZoom=n,this.dragPan=r,this.dragRotate=i,this.doubleClickZoom=o,this.touchZoom=a,this.touchRotate=s,this.keyboard=p}updateTransition(){this.transitionManager.updateTransition()}toggleEvents(e,t){this.eventManager&&e.forEach(e=>{this._events[e]!==t&&(this._events[e]=t,t?this.eventManager.on(e,this.handleEvent):this.eventManager.off(e,this.handleEvent))})}updateViewport(e,t=null,n={}){const r={...e.getViewportProps(),...t},i=this.controllerState!==e;if(this.state=e.getState(),this._setInteractionState(n),i){const e=this.controllerState&&this.controllerState.getViewportProps();this.onViewStateChange&&this.onViewStateChange({viewState:r,interactionState:this._interactionState,oldViewState:e})}}_onTransition(e){this.onViewStateChange({...e,interactionState:this._interactionState})}_setInteractionState(e){Object.assign(this._interactionState,e),this.onStateChange(this._interactionState)}_onPanStart(e){const t=this.getCenter(e);if(!this.isPointInBounds(t,e))return!1;let n=this.isFunctionKeyPressed(e)||e.rightButton||!1;(this.invertPan||"pan"===this.dragMode)&&(n=!n);const r=this.controllerState[n?"panStart":"rotateStart"]({pos:t});return this._panMove=n,this.updateViewport(r,a,{isDragging:!0}),!0}_onPan(e){return!!this.isDragging()&&(this._panMove?this._onPanMove(e):this._onPanRotate(e))}_onPanEnd(e){return!!this.isDragging()&&(this._panMove?this._onPanMoveEnd(e):this._onPanRotateEnd(e))}_onPanMove(e){if(!this.dragPan)return!1;const t=this.getCenter(e),n=this.controllerState.pan({pos:t});return this.updateViewport(n,a,{isDragging:!0,isPanning:!0}),!0}_onPanMoveEnd(e){const{inertia:t}=this;if(this.dragPan&&t&&e.velocity){const n=this.getCenter(e),r=[n[0]+e.velocityX*t/2,n[1]+e.velocityY*t/2],i=this.controllerState.pan({pos:r}).panEnd();this.updateViewport(i,{...this._getTransitionProps(),transitionDuration:t,transitionEasing:s},{isDragging:!1,isPanning:!0})}else{const e=this.controllerState.panEnd();this.updateViewport(e,null,{isDragging:!1,isPanning:!1})}return!0}_onPanRotate(e){if(!this.dragRotate)return!1;const t=this.getCenter(e),n=this.controllerState.rotate({pos:t});return this.updateViewport(n,a,{isDragging:!0,isRotating:!0}),!0}_onPanRotateEnd(e){const{inertia:t}=this;if(this.dragRotate&&t&&e.velocity){const n=this.getCenter(e),r=[n[0]+e.velocityX*t/2,n[1]+e.velocityY*t/2],i=this.controllerState.rotate({pos:r}).rotateEnd();this.updateViewport(i,{...this._getTransitionProps(),transitionDuration:t,transitionEasing:s},{isDragging:!1,isRotating:!0})}else{const e=this.controllerState.rotateEnd();this.updateViewport(e,null,{isDragging:!1,isRotating:!1})}return!0}_onWheel(e){if(!this.scrollZoom)return!1;const t=this.getCenter(e);if(!this.isPointInBounds(t,e))return!1;e.srcEvent.preventDefault();const{speed:n=.01,smooth:r=!1}=!0===this.scrollZoom?{}:this.scrollZoom,{delta:i}=e;let o=2/(1+Math.exp(-Math.abs(i*n)));i<0&&0!==o&&(o=1/o);const a=this.controllerState.zoom({pos:t,scale:o});return this.updateViewport(a,{...this._getTransitionProps({around:t}),transitionDuration:r?250:1},{isZooming:!0,isPanning:!0}),!0}_onTriplePanStart(e){const t=this.getCenter(e);if(!this.isPointInBounds(t,e))return!1;const n=this.controllerState.rotateStart({pos:t});return this.updateViewport(n,a,{isDragging:!0}),!0}_onTriplePan(e){if(!this.touchRotate)return!1;if(!this.isDragging())return!1;const t=this.getCenter(e);t[0]-=e.deltaX;const n=this.controllerState.rotate({pos:t});return this.updateViewport(n,a,{isDragging:!0,isRotating:!0}),!0}_onTriplePanEnd(e){if(!this.isDragging())return!1;const{inertia:t}=this;if(this.touchRotate&&t&&e.velocityY){const n=this.getCenter(e),r=[n[0],n[1]+=e.velocityY*t/2],i=this.controllerState.rotate({pos:r});this.updateViewport(i,{...this._getTransitionProps(),transitionDuration:t,transitionEasing:s},{isDragging:!1,isRotating:!0}),this.blockEvents(t)}else{const e=this.controllerState.rotateEnd();this.updateViewport(e,null,{isDragging:!1,isRotating:!1})}return!0}_onPinchStart(e){const t=this.getCenter(e);if(!this.isPointInBounds(t,e))return!1;const n=this.controllerState.zoomStart({pos:t}).rotateStart({pos:t});return p._startPinchRotation=e.rotation,p._lastPinchEvent=e,this.updateViewport(n,a,{isDragging:!0}),!0}_onPinch(e){if(!this.touchZoom&&!this.touchRotate)return!1;if(!this.isDragging())return!1;let t=this.controllerState;if(this.touchZoom){const{scale:n}=e,r=this.getCenter(e);t=t.zoom({pos:r,scale:n})}if(this.touchRotate){const{rotation:n}=e;t=t.rotate({deltaAngleX:p._startPinchRotation-n})}return this.updateViewport(t,a,{isDragging:!0,isPanning:this.touchZoom,isZooming:this.touchZoom,isRotating:this.touchRotate}),p._lastPinchEvent=e,!0}_onPinchEnd(e){if(!this.isDragging())return!1;const{inertia:t}=this,{_lastPinchEvent:n}=p;if(this.touchZoom&&t&&n&&e.scale!==n.scale){const r=this.getCenter(e);let i=this.controllerState.rotateEnd();const o=Math.log2(e.scale),a=(o-Math.log2(n.scale))/(e.deltaTime-n.deltaTime),l=Math.pow(2,o+a*t/2);i=i.zoom({pos:r,scale:l}).zoomEnd(),this.updateViewport(i,{...this._getTransitionProps({around:r}),transitionDuration:t,transitionEasing:s},{isDragging:!1,isPanning:this.touchZoom,isZooming:this.touchZoom,isRotating:!1}),this.blockEvents(t)}else{const e=this.controllerState.zoomEnd().rotateEnd();this.updateViewport(e,null,{isDragging:!1,isPanning:!1,isZooming:!1,isRotating:!1})}return p._startPinchRotation=null,p._lastPinchEvent=null,!0}_onDoubleTap(e){if(!this.doubleClickZoom)return!1;const t=this.getCenter(e);if(!this.isPointInBounds(t,e))return!1;const n=this.isFunctionKeyPressed(e),r=this.controllerState.zoom({pos:t,scale:n?.5:2});return this.updateViewport(r,this._getTransitionProps({around:t}),{isZooming:!0,isPanning:!0}),this.blockEvents(100),!0}_onKeyDown(e){if(!this.keyboard)return!1;const t=this.isFunctionKeyPressed(e),{zoomSpeed:n,moveSpeed:r,rotateSpeedX:i,rotateSpeedY:o}=!0===this.keyboard?{}:this.keyboard,{controllerState:a}=this;let s;const l={};switch(e.srcEvent.code){case"Minus":s=t?a.zoomOut(n).zoomOut(n):a.zoomOut(n),l.isZooming=!0;break;case"Equal":s=t?a.zoomIn(n).zoomIn(n):a.zoomIn(n),l.isZooming=!0;break;case"ArrowLeft":t?(s=a.rotateLeft(i),l.isRotating=!0):(s=a.moveLeft(r),l.isPanning=!0);break;case"ArrowRight":t?(s=a.rotateRight(i),l.isRotating=!0):(s=a.moveRight(r),l.isPanning=!0);break;case"ArrowUp":t?(s=a.rotateUp(o),l.isRotating=!0):(s=a.moveUp(r),l.isPanning=!0);break;case"ArrowDown":t?(s=a.rotateDown(o),l.isRotating=!0):(s=a.moveDown(r),l.isPanning=!0);break;default:return!1}return this.updateViewport(s,this._getTransitionProps(),l),!0}_getTransitionProps(e){const{transition:t}=this;return t&&t.transitionInterpolator?e?{...t,transitionInterpolator:new o.a({...e,...t.transitionInterpolator.opts,makeViewport:this.controllerState.makeViewport})}:t:a}}},function(e,t,n){"use strict";n.d(t,"d",(function(){return P})),n.d(t,"c",(function(){return I})),n.d(t,"a",(function(){return D})),n.d(t,"b",(function(){return k}));var r=n(20),i=n(135),o=n(108),a=n(59),s=n(12),l=n(103),u=n(215),c=n(5),d=n(191),f=n(90),h=n(80),p=n(87),A=n(26),g=n(102);class m extends h.a{static assemble(...e){const t=e=>e.flatMap(e=>Array.isArray(e)?t(e):e instanceof p.a?e.data.children:e.data),n=new m;return n.visitMany(t(e)),n}constructor(){super(),this._byteLength=0,this._nodes=[],this._buffers=[],this._bufferRegions=[]}visit(e){if(e instanceof a.a)return this.visitMany(e.data),this;const{type:t}=e;if(!s.c.isDictionary(t)){const{length:n,nullCount:r}=e;if(n>2147483647)throw new RangeError("Cannot write arrays larger than 2^31 - 1 in length");s.c.isNull(t)||y.call(this,r<=0?new Uint8Array(0):Object(g.truncateBitmap)(e.offset,n,e.nullBitmap)),this.nodes.push(new l.c(n,r))}return super.visit(e)}visitNull(e){return this}visitDictionary(e){return this.visit(e.clone(e.type.indices))}get nodes(){return this._nodes}get buffers(){return this._buffers}get byteLength(){return this._byteLength}get bufferRegions(){return this._bufferRegions}}function y(e){const t=e.byteLength+7&-8;return this.buffers.push(e),this.bufferRegions.push(new l.a(this._byteLength,t)),this._byteLength+=t,this}function v(e){return y.call(this,e.values.subarray(0,e.length*e.stride))}function b(e){const{length:t,values:n,valueOffsets:r}=e,i=r[0],o=r[t],a=Math.min(o-i,n.byteLength-i);return y.call(this,Object(A.rebaseValueOffsets)(-r[0],t,r)),y.call(this,n.subarray(i,i+a)),this}function _(e){const{length:t,valueOffsets:n}=e;return n&&y.call(this,Object(A.rebaseValueOffsets)(n[0],t,n)),this.visit(e.children[0])}function w(e){return this.visitMany(e.type.children.map((t,n)=>e.children[n]).filter(Boolean))[0]}m.prototype.visitBool=function(e){let t;return e.nullCount>=e.length?y.call(this,new Uint8Array(0)):(t=e.values)instanceof Uint8Array?y.call(this,Object(g.truncateBitmap)(e.offset,e.length,t)):y.call(this,Object(g.packBools)(e.values))},m.prototype.visitInt=v,m.prototype.visitFloat=v,m.prototype.visitUtf8=b,m.prototype.visitBinary=b,m.prototype.visitFixedSizeBinary=v,m.prototype.visitDate=v,m.prototype.visitTimestamp=v,m.prototype.visitTime=v,m.prototype.visitDecimal=v,m.prototype.visitList=_,m.prototype.visitStruct=w,m.prototype.visitUnion=function(e){const{type:t,length:n,typeIds:r,valueOffsets:i}=e;if(y.call(this,r),t.mode===c.i.Sparse)return w.call(this,e);if(t.mode===c.i.Dense){if(e.offset<=0)return y.call(this,i),w.call(this,e);{const o=r.reduce((e,t)=>Math.max(e,t),r[0]),a=new Int32Array(o+1),s=new Int32Array(o+1).fill(-1),l=new Int32Array(n),u=Object(A.rebaseValueOffsets)(-i[0],n,i);for(let e,t,i=-1;++it.visitMany(e.fields,n.children))}visit({name:e},t){const{length:n}=t,{offset:r,nullCount:i,nullBitmap:o}=t,a=s.c.isDictionary(t.type)?t.type.indices:t.type,l=Object.assign([],t.buffers,{[c.a.VALIDITY]:void 0});return Object.assign({name:e,count:n,VALIDITY:s.c.isNull(a)?void 0:i<=0?Array.from({length:n},()=>1):[...new g.BitIterator(o,r,n,null,g.getBit)]},super.visit(t.clone(a,r,n,0,l)))}visitNull(){return{}}visitBool({values:e,offset:t,length:n}){return{DATA:[...new g.BitIterator(e,t,n,null,g.getBool)]}}visitInt(e){return{DATA:e.type.bitWidth<64?[...e.values]:[...T(e.values,2)]}}visitFloat(e){return{DATA:[...e.values]}}visitUtf8(e){return{DATA:[...new a.a([e])],OFFSET:[...e.valueOffsets]}}visitBinary(e){return{DATA:[...S(new a.a([e]))],OFFSET:[...e.valueOffsets]}}visitFixedSizeBinary(e){return{DATA:[...S(new a.a([e]))]}}visitDate(e){return{DATA:e.type.unit===c.b.DAY?[...e.values]:[...T(e.values,2)]}}visitTimestamp(e){return{DATA:[...T(e.values,2)]}}visitTime(e){return{DATA:e.type.unit`${e}${("0"+(255&t).toString(16)).slice(-2)}`,"").toUpperCase()}function*T(e,t){const n=new Uint32Array(e.buffer);for(let e=-1,r=n.length/t;++ethis.writeAll(e)):Object(L.b)(e)?j(this,e):R(this,e)}get closed(){return this._sink.closed}[Symbol.asyncIterator](){return this._sink[Symbol.asyncIterator]()}toDOMStream(e){return this._sink.toDOMStream(e)}toNodeStream(e){return this._sink.toNodeStream(e)}close(){return this.reset()._sink.close()}abort(e){return this.reset()._sink.abort(e)}finish(){return this._autoDestroy?this.close():this.reset(this._sink,this._schema),this}reset(e=this._sink,t=null){return e===this._sink||e instanceof f.a?this._sink=e:(this._sink=new f.a,e&&Object(L.l)(e)?this.toDOMStream({type:"bytes"}).pipeTo(e):e&&Object(L.m)(e)&&this.toNodeStream({objectMode:!1}).pipe(e)),this._started&&this._schema&&this._writeFooter(this._schema),this._started=!1,this._dictionaryBlocks=[],this._recordBatchBlocks=[],this._dictionaryDeltaOffsets=new Map,t&&Object(d.b)(t,this._schema)||(null==t?(this._position=0,this._schema=null):(this._started=!0,this._schema=t,this._writeSchema(t))),this}write(e){let t=null;if(!this._sink)throw new Error("RecordBatchWriter is closed");if(null==e)return this.finish()&&void 0;if(e instanceof i.a&&!(t=e.schema))return this.finish()&&void 0;if(e instanceof p.a&&!(t=e.schema))return this.finish()&&void 0;if(t&&!Object(d.b)(t,this._schema)){if(this._started&&this._autoDestroy)return this.close();this.reset(this._sink,t)}e instanceof p.a?e instanceof p.b||this._writeRecordBatch(e):e instanceof i.a?this.writeAll(e.batches):Object(L.f)(e)&&this.writeAll(e)}_writeMessage(e,t=8){const n=t-1,r=l.d.encode(e),i=r.byteLength,o=this._writeLegacyIpcFormat?4:8,a=i+o+n&~n,s=a-i-o;return e.headerType===c.d.RecordBatch?this._recordBatchBlocks.push(new u.a(a,e.bodyLength,this._position)):e.headerType===c.d.DictionaryBatch&&this._dictionaryBlocks.push(new u.a(a,e.bodyLength,this._position)),this._writeLegacyIpcFormat||this._write(Int32Array.of(-1)),this._write(Int32Array.of(a-o)),i>0&&this._write(r),this._writePadding(s)}_write(e){if(this._started){const t=Object(A.toUint8Array)(e);t&&t.byteLength>0&&(this._sink.write(t),this._position+=t.byteLength)}return this}_writeSchema(e){return this._writeMessage(l.d.from(e))}_writeFooter(e){return this._writeLegacyIpcFormat?this._write(Int32Array.of(0)):this._write(Int32Array.of(-1,0))}_writeMagic(){return this._write(o.c)}_writePadding(e){return e>0?this._write(new Uint8Array(e)):this}_writeRecordBatch(e){const{byteLength:t,nodes:n,bufferRegions:r,buffers:i}=m.assemble(e),o=new l.e(e.numRows,n,r),a=l.d.from(o,t);return this._writeDictionaries(e)._writeMessage(a)._writeBodyBuffers(i)}_writeDictionaryBatch(e,t,n=!1){this._dictionaryDeltaOffsets.set(t,e.length+(this._dictionaryDeltaOffsets.get(t)||0));const{byteLength:r,nodes:i,bufferRegions:o,buffers:s}=m.assemble(new a.a([e])),u=new l.e(e.length,i,o),c=new l.b(u,t,n),d=l.d.from(c,r);return this._writeMessage(d)._writeBodyBuffers(s)}_writeBodyBuffers(e){let t,n,r;for(let i=-1,o=e.length;++i0&&(this._write(t),(r=(n+7&-8)-n)>0&&this._writePadding(r));return this}_writeDictionaries(e){for(let[t,n]of e.dictionaries){let e=this._dictionaryDeltaOffsets.get(t)||0;if(0===e||(n=null==n?void 0:n.slice(e)).length>0)for(const r of n.data)this._writeDictionaryBatch(r,t,e>0),e+=r.length}return this}}class I extends P{static writeAll(e,t){const n=new I(t);return Object(L.i)(e)?e.then(e=>n.writeAll(e)):Object(L.b)(e)?j(n,e):R(n,e)}}class D extends P{static writeAll(e){const t=new D;return Object(L.i)(e)?e.then(e=>t.writeAll(e)):Object(L.b)(e)?j(t,e):R(t,e)}constructor(){super(),this._autoDestroy=!0}_writeSchema(e){return this._writeMagic()._writePadding(2)}_writeFooter(e){const t=u.b.encode(new u.b(e,c.e.V4,this._recordBatchBlocks,this._dictionaryBlocks));return super._writeFooter(e)._write(t)._write(Int32Array.of(t.byteLength))._writeMagic()}}class k extends P{static writeAll(e){return(new k).writeAll(e)}constructor(){super(),this._autoDestroy=!0,this._recordBatches=[],this._dictionaries=[]}_writeMessage(){return this}_writeFooter(e){return this}_writeSchema(e){return this._write('{\n "schema": '+JSON.stringify({fields:e.fields.map(e=>function e({name:t,type:n,nullable:r}){const i=new M;return{name:t,nullable:r,type:i.visit(n),children:(n.children||[]).map(t=>e(t)),dictionary:s.c.isDictionary(n)?{id:n.id,isOrdered:n.isOrdered,indexType:i.visit(n.indices)}:void 0}}(e))},null,2))}_writeDictionaries(e){return e.dictionaries.size>0&&this._dictionaries.push(e),this}_writeDictionaryBatch(e,t,n=!1){return this._dictionaryDeltaOffsets.set(t,e.length+(this._dictionaryDeltaOffsets.get(t)||0)),this._write(0===this._dictionaryBlocks.length?" ":",\n "),this._write(""+function(e,t,n=!1){const[r]=O.assemble(new p.a({[t]:e}));return JSON.stringify({id:t,isDelta:n,data:{count:e.length,columns:r}},null,2)}(e,t,n)),this._dictionaryBlocks.push(new u.a(0,0,0)),this}_writeRecordBatch(e){return this._writeDictionaries(e),this._recordBatches.push(e),this}close(){if(this._dictionaries.length>0){this._write(',\n "dictionaries": [\n');for(const e of this._dictionaries)super._writeDictionaries(e);this._write("\n ]")}if(this._recordBatches.length>0){for(let e=-1,t=this._recordBatches.length;++e=3){const e="%"===t[2],n=parseFloat(t[1]);return{position:e?n/100:n,relative:e}}default:throw new Error("Could not parse position string ".concat(e))}}function s(e,t){return e.relative?Math.round(e.position*t):e.position}var l=n(122),u=n(85);class c{constructor(e){Object(r.a)(this,"id",void 0),Object(r.a)(this,"viewportInstance",void 0),Object(r.a)(this,"_x",void 0),Object(r.a)(this,"_y",void 0),Object(r.a)(this,"_width",void 0),Object(r.a)(this,"_height",void 0),Object(r.a)(this,"_padding",void 0),Object(r.a)(this,"props",void 0);const{id:t,x:n=0,y:o=0,width:s="100%",height:l="100%",padding:c=null,viewportInstance:d}=e||{};Object(u.a)(!d||d instanceof i.a),this.viewportInstance=d,this.id=t||this.constructor.displayName||"view",this.props={...e,id:this.id},this._x=a(n),this._y=a(o),this._width=a(s),this._height=a(l),this._padding=c&&{left:a(c.left||0),right:a(c.right||0),top:a(c.top||0),bottom:a(c.bottom||0)},this.equals=this.equals.bind(this),Object.seal(this)}equals(e){return this===e||(this.viewportInstance?!!e.viewportInstance&&this.viewportInstance.equals(e.viewportInstance):this.ViewportType===e.ViewportType&&Object(l.a)(this.props,e.props,2))}makeViewport({width:e,height:t,viewState:n}){if(this.viewportInstance)return this.viewportInstance;n=this.filterViewState(n);const r=this.getDimensions({width:e,height:t});return r.height&&r.width?new this.ViewportType({...n,...this.props,...r}):null}getViewStateId(){const{viewState:e}=this.props;return"string"==typeof e?e:(null==e?void 0:e.id)||this.id}filterViewState(e){if(this.props.viewState&&"object"==typeof this.props.viewState){if(!this.props.viewState.id)return this.props.viewState;const t={...e};for(const e in this.props.viewState)"id"!==e&&(t[e]=this.props.viewState[e]);return t}return e}getDimensions({width:e,height:t}){const n={x:s(this._x,e),y:s(this._y,t),width:s(this._width,e),height:s(this._height,t)};return this._padding&&(n.padding={left:s(this._padding.left,e),top:s(this._padding.top,t),right:s(this._padding.right,e),bottom:s(this._padding.bottom,t)}),n}get controller(){const e=this.props.controller;return e?!0===e?{type:this.ControllerType}:"function"==typeof e?{type:e}:{type:this.ControllerType,...e}:null}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(138),i=n(28);const o={POINTS:0,LINES:1,LINE_LOOP:2,LINE_STRIP:3,TRIANGLES:4,TRIANGLE_STRIP:5,TRIANGLE_FAN:6};class a{static get DRAW_MODE(){return o}constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{id:t=Object(r.c)("geometry"),drawMode:n=o.TRIANGLES,attributes:i={},indices:a=null,vertexCount:s=null}=e;this.id=t,this.drawMode=0|n,this.attributes={},this.userData={},this._setAttributes(i,a),this.vertexCount=s||this._calculateVertexCount(this.attributes,this.indices)}get mode(){return this.drawMode}getVertexCount(){return this.vertexCount}getAttributes(){return this.indices?{indices:this.indices,...this.attributes}:this.attributes}_print(e){return"Geometry ".concat(this.id," attribute ").concat(e)}_setAttributes(e,t){t&&(this.indices=ArrayBuffer.isView(t)?{value:t,size:1}:t);for(const t in e){let n=e[t];n=ArrayBuffer.isView(n)?{value:n}:n,Object(i.a)(ArrayBuffer.isView(n.value),"".concat(this._print(t),": must be typed array or object with value as typed array")),"POSITION"!==t&&"positions"!==t||n.size||(n.size=3),"indices"===t?(Object(i.a)(!this.indices),this.indices=n):this.attributes[t]=n}return this.indices&&void 0!==this.indices.isIndexed&&(this.indices=Object.assign({},this.indices),delete this.indices.isIndexed),this}_calculateVertexCount(e,t){if(t)return t.value.length;let n=1/0;for(const t in e){const r=e[t],{value:i,size:o,constant:a}=r;!a&&i&&o>=1&&(n=Math.min(n,i.length/o))}return Object(i.a)(Number.isFinite(n)),n}}},function(e,t,n){"use strict";t.a=function(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var r=n(151),i=n(28),o=n(429);const a={offset:0,stride:0,type:5126,size:1,divisor:0,normalized:!1,integer:!1},s={deprecatedProps:{instanced:"divisor",isInstanced:"divisor"}};class l{static getBytesPerElement(e){return Object(r.c)(e.type||5126).BYTES_PER_ELEMENT}static getBytesPerVertex(e){Object(i.a)(e.size);return Object(r.c)(e.type||5126).BYTES_PER_ELEMENT*e.size}static resolve(){for(var e=arguments.length,t=new Array(e),n=0;nthis._assign(e)),Object.freeze(this)}toString(){return JSON.stringify(this)}get BYTES_PER_ELEMENT(){return l.getBytesPerElement(this)}get BYTES_PER_VERTEX(){return l.getBytesPerVertex(this)}_assign(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e=Object(o.a)("Accessor",e,s),void 0!==e.type&&(this.type=e.type,5124!==e.type&&5125!==e.type||(this.integer=!0)),void 0!==e.size&&(this.size=e.size),void 0!==e.offset&&(this.offset=e.offset),void 0!==e.stride&&(this.stride=e.stride),void 0!==e.normalized&&(this.normalized=e.normalized),void 0!==e.integer&&(this.integer=e.integer),void 0!==e.divisor&&(this.divisor=e.divisor),void 0!==e.buffer&&(this.buffer=e.buffer),void 0!==e.index&&("boolean"==typeof e.index?this.index=e.index?1:0:this.index=e.index),void 0!==e.instanced&&(this.divisor=e.instanced?1:0),void 0!==e.isInstanced&&(this.divisor=e.isInstanced?1:0),this}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r,i=n(31);!function(e){e[e.Sparse=0]="Sparse",e[e.Dense=1]="Dense"}(r||(r={}));class o{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsUnion(e,t){return(t||new o).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsUnion(e,t){return e.setPosition(e.position()+i.SIZE_PREFIX_LENGTH),(t||new o).__init(e.readInt32(e.position())+e.position(),e)}mode(){const e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt16(this.bb_pos+e):r.Sparse}typeIds(e){const t=this.bb.__offset(this.bb_pos,6);return t?this.bb.readInt32(this.bb.__vector(this.bb_pos+t)+4*e):0}typeIdsLength(){const e=this.bb.__offset(this.bb_pos,6);return e?this.bb.__vector_len(this.bb_pos+e):0}typeIdsArray(){const e=this.bb.__offset(this.bb_pos,6);return e?new Int32Array(this.bb.bytes().buffer,this.bb.bytes().byteOffset+this.bb.__vector(this.bb_pos+e),this.bb.__vector_len(this.bb_pos+e)):null}static startUnion(e){e.startObject(2)}static addMode(e,t){e.addFieldInt16(0,t,r.Sparse)}static addTypeIds(e,t){e.addFieldOffset(1,t,0)}static createTypeIdsVector(e,t){e.startVector(4,t.length,4);for(let n=t.length-1;n>=0;n--)e.addInt32(t[n]);return e.endVector()}static startTypeIdsVector(e,t){e.startVector(4,t,4)}static endUnion(e){return e.endObject()}static createUnion(e,t,n){return o.startUnion(e),o.addMode(e,t),o.addTypeIds(e,n),o.endUnion(e)}}},function(e,t,n){"use strict";n.d(t,"b",(function(){return u})),n.d(t,"a",(function(){return c})),n.d(t,"d",(function(){return h})),n.d(t,"c",(function(){return g}));var r=n(1150),i=n.n(r),o=n(152);const a=o.a.CLOCKWISE,s=o.a.COUNTER_CLOCKWISE,l={isClosed:!0};function u(e){return"positions"in e?e.positions:e}function c(e){return"holeIndices"in e?e.holeIndices:null}function d(e,t,n,r,i){let a=t;const s=n.length;for(let t=0;t=1&&e[0].length>=2&&Number.isFinite(e[0][0])}(e)){let i=0;for(const[o,l]of e.entries())i=d(n,i,l,t,0===o?a:s),r.push(i);return r.pop(),{positions:n,holeIndices:r}}return d(n,0,e,t,a),n}function p(e,t,n){const r=e.length/3;let i=0;for(let o=0;oe/t));let a=u(e);const s=r&&3===t;if(n){const e=a.length;a=a.slice();const r=[];for(let i=0;it&&e>r||(t>r?(n||(a=a.slice()),A(a,0,2,1)):(n||(a=a.slice()),A(a,2,0,1)))}return i()(a,o,t)}},function(e,t,n){"use strict";n.d(t,"b",(function(){return o}));var r,i=["normal","small-caps"];function o(e){if(!e)return"";var t=window.getComputedStyle(e);if(t.font)return t.font;if(!(""!==t.fontFamily))return"";var n=i.includes(t.fontVariant)?t.fontVariant:"normal";return"".concat(t.fontStyle," ").concat(n," ").concat(t.fontWeight," ").concat(t.fontSize," / ").concat(t.lineHeight," ").concat(t.fontFamily)}t.a=function(e){if("undefined"==typeof document||!e)return null;var t=o(e),n=function(e,t){var n=(r||(r=document.createElement("canvas"))).getContext("2d");if(!n)return null;n.font=t;var i=n.measureText(e).width;return Math.ceil(i)}(e.value||e.placeholder,t);return null===n?null:(e.style.width="".concat(n,"px"),n)}},function(e,t,n){(function(t){var n=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,r=/^\w*$/,i=/^\./,o=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,a=/\\(\\)?/g,s=/^\[object .+?Constructor\]$/,l="object"==typeof t&&t&&t.Object===Object&&t,u="object"==typeof self&&self&&self.Object===Object&&self,c=l||u||Function("return this")();var d,f=Array.prototype,h=Function.prototype,p=Object.prototype,A=c["__core-js_shared__"],g=(d=/[^.]+$/.exec(A&&A.keys&&A.keys.IE_PROTO||""))?"Symbol(src)_1."+d:"",m=h.toString,y=p.hasOwnProperty,v=p.toString,b=RegExp("^"+m.call(y).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),_=c.Symbol,w=f.splice,x=k(c,"Map"),M=k(Object,"create"),E=_?_.prototype:void 0,O=E?E.toString:void 0;function S(e){var t=-1,n=e?e.length:0;for(this.clear();++t-1},T.prototype.set=function(e,t){var n=this.__data__,r=L(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},C.prototype.clear=function(){this.__data__={hash:new S,map:new(x||T),string:new S}},C.prototype.delete=function(e){return D(this,e).delete(e)},C.prototype.get=function(e){return D(this,e).get(e)},C.prototype.has=function(e){return D(this,e).has(e)},C.prototype.set=function(e,t){return D(this,e).set(e,t),this};var R=F((function(e){e=function(e){return null==e?"":function(e){if("string"==typeof e)return e;if(U(e))return O?O.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}(e)}(e);var t=[];return i.test(e)&&t.push(""),e.replace(o,(function(e,n,r,i){t.push(r?i.replace(a,"$1"):n||e)})),t}));function j(e){if("string"==typeof e||U(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function F(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=e.apply(this,r);return n.cache=o.set(i,a),a};return n.cache=new(F.Cache||C),n}function N(e,t){return e===t||e!=e&&t!=t}F.Cache=C;var B=Array.isArray;function z(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function U(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==v.call(e)}e.exports=function(e,t,n){var r=null==e?void 0:P(e,t);return void 0===r?n:r}}).call(this,n(68))},function(e,t){var n=Array.isArray;e.exports=n},function(e,t,n){"use strict";n.r(t),n.d(t,"assembleShaders",(function(){return r.a})),n.d(t,"combineInjects",(function(){return i.b})),n.d(t,"normalizeShaderModule",(function(){return o.b})),n.d(t,"getQualifierDetails",(function(){return a.c})),n.d(t,"getPassthroughFS",(function(){return a.b})),n.d(t,"typeToChannelSuffix",(function(){return a.e})),n.d(t,"typeToChannelCount",(function(){return a.d})),n.d(t,"convertToVec4",(function(){return a.a})),n.d(t,"random",(function(){return s})),n.d(t,"fp32",(function(){return l.a})),n.d(t,"fp64",(function(){return u.a})),n.d(t,"fp64arithmetic",(function(){return u.b})),n.d(t,"project",(function(){return c.a})),n.d(t,"lights",(function(){return d.a})),n.d(t,"dirlight",(function(){return f.a})),n.d(t,"picking",(function(){return h.a})),n.d(t,"gouraudLighting",(function(){return p.a})),n.d(t,"phongLighting",(function(){return p.b})),n.d(t,"pbr",(function(){return A.a})),n.d(t,"tiltShift",(function(){return g})),n.d(t,"triangleBlur",(function(){return m})),n.d(t,"zoomBlur",(function(){return y})),n.d(t,"brightnessContrast",(function(){return v})),n.d(t,"denoise",(function(){return b})),n.d(t,"hueSaturation",(function(){return _})),n.d(t,"noise",(function(){return w})),n.d(t,"sepia",(function(){return x})),n.d(t,"vibrance",(function(){return M})),n.d(t,"vignette",(function(){return E})),n.d(t,"colorHalftone",(function(){return O})),n.d(t,"dotScreen",(function(){return S})),n.d(t,"edgeWork",(function(){return T})),n.d(t,"hexagonalPixelate",(function(){return C})),n.d(t,"ink",(function(){return L})),n.d(t,"magnify",(function(){return P})),n.d(t,"bulgePinch",(function(){return D})),n.d(t,"swirl",(function(){return k})),n.d(t,"_warp",(function(){return I})),n.d(t,"fxaa",(function(){return R})),n.d(t,"_transform",(function(){return j.a}));var r=n(668),i=n(376),o=n(426),a=n(336);const s={name:"random",fs:"float random(vec3 scale, float seed) {\n return fract(sin(dot(gl_FragCoord.xyz + seed, scale)) * 43758.5453 + seed);\n}\n"};var l=n(858),u=n(657),c=n(501),d=n(310),f=n(859),h=n(663),p=n(415),A=n(1138);const g={name:"tiltShift",uniforms:{blurRadius:{value:15,min:0,max:50},gradientRadius:{value:200,min:0,max:400},start:[0,0],end:[1,1],invert:{value:!1,private:!0}},fs:"uniform float blurRadius;\nuniform float gradientRadius;\nuniform vec2 start;\nuniform vec2 end;\nuniform bool invert;\n\nvec2 tiltShift_getDelta(vec2 texSize) {\n vec2 vector = normalize((end - start) * texSize);\n return invert ? vec2(-vector.y, vector.x) : vector;\n}\n\nvec4 tiltShift_sampleColor(sampler2D texture, vec2 texSize, vec2 texCoord) {\n vec4 color = vec4(0.0);\n float total = 0.0;\n float offset = random(vec3(12.9898, 78.233, 151.7182), 0.0);\n\n vec2 normal = normalize(vec2((start.y - end.y) * texSize.y, (end.x - start.x) * texSize.x));\n float radius = smoothstep(0.0, 1.0,\n abs(dot(texCoord * texSize - start * texSize, normal)) / gradientRadius) * blurRadius;\n\n for (float t = -30.0; t <= 30.0; t++) {\n float percent = (t + offset - 0.5) / 30.0;\n float weight = 1.0 - abs(percent);\n vec4 sample = texture2D(texture, texCoord + tiltShift_getDelta(texSize) / texSize * percent * radius);\n sample.rgb *= sample.a;\n\n color += sample * weight;\n total += weight;\n }\n\n color = color / total;\n color.rgb /= color.a + 0.00001;\n\n return color;\n}\n",dependencies:[s],passes:[{sampler:!0,uniforms:{invert:!1}},{sampler:!0,uniforms:{invert:!0}}]},m={name:"triangleBlur",uniforms:{radius:{value:20,min:0,softMax:100},delta:{value:[1,0],private:!0}},fs:"uniform float radius;\nuniform vec2 delta;\n\nvec4 triangleBlur_sampleColor(sampler2D texture, vec2 texSize, vec2 texCoord) {\n vec2 adjustedDelta = delta * radius / texSize;\n\n vec4 color = vec4(0.0);\n float total = 0.0;\n float offset = random(vec3(12.9898, 78.233, 151.7182), 0.0);\n\n for (float t = -30.0; t <= 30.0; t++) {\n float percent = (t + offset - 0.5) / 30.0;\n float weight = 1.0 - abs(percent);\n vec4 sample = texture2D(texture, texCoord + adjustedDelta * percent);\n sample.rgb *= sample.a;\n\n color += sample * weight;\n total += weight;\n }\n\n color = color / total;\n color.rgb /= color.a + 0.00001;\n\n return color;\n}\n",dependencies:[s],passes:[{sampler:!0,uniforms:{delta:[1,0]}},{sampler:!0,uniforms:{delta:[0,1]}}]},y={name:"zoomBlur",uniforms:{center:[.5,.5],strength:{value:.3,min:0,softMax:1}},fs:"\nuniform vec2 center;\nuniform float strength;\n\nvec4 zoomBlur_sampleColor(sampler2D texture, vec2 texSize, vec2 texCoord) {\n vec4 color = vec4(0.0);\n float total = 0.0;\n vec2 toCenter = center * texSize - texCoord * texSize;\n float offset = random(vec3(12.9898, 78.233, 151.7182), 0.0);\n\n for (float t = 0.0; t <= 40.0; t++) {\n float percent = (t + offset) / 40.0;\n float weight = 4.0 * (percent - percent * percent);\n vec4 sample = texture2D(texture, texCoord + toCenter * percent * strength / texSize);\n sample.rgb *= sample.a;\n\n color += sample * weight;\n total += weight;\n }\n\n color = color / total;\n color.rgb /= color.a + 0.00001;\n\n return color;\n}\n",dependencies:[s],passes:[{sampler:!0}]},v={name:"brightnessContrast",uniforms:{brightness:{value:0,min:-1,max:1},contrast:{value:0,min:-1,max:1}},fs:"uniform float brightness;\nuniform float contrast;\n\nvec4 brightnessContrast_filterColor(vec4 color) {\n color.rgb += brightness;\n if (contrast > 0.0) {\n color.rgb = (color.rgb - 0.5) / (1.0 - contrast) + 0.5;\n } else {\n color.rgb = (color.rgb - 0.5) * (1.0 + contrast) + 0.5;\n }\n return color;\n}\n\nvec4 brightnessContrast_filterColor(vec4 color, vec2 texSize, vec2 texCoords) {\n return brightnessContrast_filterColor(color);\n}\n",passes:[{filter:!0}]},b={name:"denoise",uniforms:{strength:{value:.5,min:0,max:.1,adjust:e=>.53+200*Math.pow(1-e,4)}},fs:"uniform float strength;\n\nvec4 denoise_sampleColor(sampler2D texture, vec2 texSize, vec2 texCoord) {\n float adjustedExponent = 3. + 200. * pow(1. - strength, 4.);\n\n vec4 center = texture2D(texture, texCoord);\n vec4 color = vec4(0.0);\n float total = 0.0;\n for (float x = -4.0; x <= 4.0; x += 1.0) {\n for (float y = -4.0; y <= 4.0; y += 1.0) {\n vec4 sample = texture2D(texture, texCoord + vec2(x, y) / texSize);\n float weight = 1.0 - abs(dot(sample.rgb - center.rgb, vec3(0.25)));\n weight = pow(weight, adjustedExponent);\n color += sample * weight;\n total += weight;\n }\n }\n\n return color / total;\n}\n",passes:[{sampler:!0},{sampler:!0}]},_={name:"hueSaturation",uniforms:{hue:{value:0,min:-1,max:1},saturation:{value:0,min:-1,max:1}},fs:"uniform float hue;\nuniform float saturation;\n\nvec4 hueSaturation_filterColor(vec4 color) {\n float angle = hue * 3.14159265;\n float s = sin(angle), c = cos(angle);\n vec3 weights = (vec3(2.0 * c, -sqrt(3.0) * s - c, sqrt(3.0) * s - c) + 1.0) / 3.0;\n float len = length(color.rgb);\n color.rgb = vec3(\n dot(color.rgb, weights.xyz),\n dot(color.rgb, weights.zxy),\n dot(color.rgb, weights.yzx)\n );\n float average = (color.r + color.g + color.b) / 3.0;\n if (saturation > 0.0) {\n color.rgb += (average - color.rgb) * (1.0 - 1.0 / (1.001 - saturation));\n } else {\n color.rgb += (average - color.rgb) * (-saturation);\n }\n\n return color;\n}\n\nvec4 hueSaturation_filterColor(vec4 color, vec2 texSize, vec2 texCoord) {\n return hueSaturation_filterColor(color);\n}\n",passes:[{filter:!0}]},w={name:"noise",uniforms:{amount:{value:.5,min:0,max:1}},fs:"uniform float amount;\n\nfloat rand(vec2 co) {\n return fract(sin(dot(co.xy ,vec2(12.9898,78.233))) * 43758.5453);\n}\n\nvec4 noise_filterColor(vec4 color, vec2 texCoord) {\n float diff = (rand(texCoord) - 0.5) * amount;\n color.r += diff;\n color.g += diff;\n color.b += diff;\n return color;\n}\n\nvec4 noise_filterColor(vec4 color, vec2 texSize, vec2 texCoord) {\n return noise_filterColor(color, texCoord);\n}\n",passes:[{filter:!0}]},x={name:"sepia",uniforms:{amount:{value:.5,min:0,max:1}},fs:"uniform float amount;\n\nvec4 sepia_filterColor(vec4 color) {\n float r = color.r;\n float g = color.g;\n float b = color.b;\n\n color.r =\n min(1.0, (r * (1.0 - (0.607 * amount))) + (g * (0.769 * amount)) + (b * (0.189 * amount)));\n color.g = min(1.0, (r * 0.349 * amount) + (g * (1.0 - (0.314 * amount))) + (b * 0.168 * amount));\n color.b = min(1.0, (r * 0.272 * amount) + (g * 0.534 * amount) + (b * (1.0 - (0.869 * amount))));\n\n return color;\n}\n\nvec4 sepia_filterColor(vec4 color, vec2 texSize, vec2 texCoord) {\n return sepia_filterColor(color);\n}\n",passes:[{filter:!0}]},M={name:"vibrance",uniforms:{amount:{value:0,min:-1,max:1}},fs:"uniform float amount;\n\nvec4 vibrance_filterColor(vec4 color) {\n float average = (color.r + color.g + color.b) / 3.0;\n float mx = max(color.r, max(color.g, color.b));\n float amt = (mx - average) * (-amount * 3.0);\n color.rgb = mix(color.rgb, vec3(mx), amt);\n return color;\n}\n\nvec4 vibrance_filterColor(vec4 color, vec2 texSize, vec2 texCoord) {\n return vibrance_filterColor(color);\n}\n",passes:[{filter:!0}]},E={name:"vignette",fs:"uniform float radius;\nuniform float amount;\n\nvec4 vignette_filterColor(vec4 color, vec2 texCoord) {\n float dist = distance(texCoord, vec2(0.5, 0.5));\n float ratio = smoothstep(0.8, radius * 0.799, dist * (amount + radius));\n return color.rgba * ratio + (1.0 - ratio)*vec4(0.0, 0.0, 0.0, 1.0);\n}\n\nvec4 vignette_filterColor(vec4 color, vec2 texSize, vec2 texCoord) {\n return vignette_filterColor(color, texCoord);\n}\n",uniforms:{radius:{value:.5,min:0,max:1},amount:{value:.5,min:0,max:1}},passes:[{filter:!0}]},O={name:"colorHalftone",uniforms:{center:[.5,.5],angle:{value:1.1,softMin:0,softMax:Math.PI/2},size:{value:4,min:1,softMin:3,softMax:20}},fs:"uniform vec2 center;\nuniform float angle;\nuniform float size;\n\nfloat scale = 3.1514 / size;\n\nfloat pattern(float angle, vec2 texSize, vec2 texCoord) {\n float s = sin(angle), c = cos(angle);\n vec2 tex = texCoord * texSize - center * texSize;\n vec2 point = vec2(\n\tc * tex.x - s * tex.y,\n\ts * tex.x + c * tex.y\n ) * scale;\n return (sin(point.x) * sin(point.y)) * 4.0;\n}\n\nvec4 colorHalftone_filterColor(vec4 color, vec2 texSize, vec2 texCoord) {\n vec3 cmy = 1.0 - color.rgb;\n float k = min(cmy.x, min(cmy.y, cmy.z));\n cmy = (cmy - k) / (1.0 - k);\n cmy = clamp(\n\tcmy * 10.0 - 3.0 + vec3(\n pattern(angle + 0.26179, texSize, texCoord),\n\t pattern(angle + 1.30899, texSize, texCoord),\n pattern(angle, texSize, texCoord)\n ),\n\t0.0,\n\t1.0\n );\n k = clamp(k * 10.0 - 5.0 + pattern(angle + 0.78539, texSize, texCoord), 0.0, 1.0);\n return vec4(1.0 - cmy - k, color.a);\n}\n",passes:[{filter:!0}]},S={name:"dotScreen",uniforms:{center:[.5,.5],angle:{value:1.1,softMin:0,softMax:Math.PI/2},size:{value:3,min:1,softMin:3,softMax:20}},fs:"uniform vec2 center;\nuniform float angle;\nuniform float size;\n\nfloat pattern(vec2 texSize, vec2 texCoord) {\n float scale = 3.1415 / size;\n\n float s = sin(angle), c = cos(angle);\n vec2 tex = texCoord * texSize - center * texSize;\n vec2 point = vec2(\n c * tex.x - s * tex.y,\n s * tex.x + c * tex.y\n ) * scale;\n return (sin(point.x) * sin(point.y)) * 4.0;\n}\n\nvec4 dotScreen_filterColor(vec4 color, vec2 texSize, vec2 texCoord) {\n float average = (color.r + color.g + color.b) / 3.0;\n return vec4(vec3(average * 10.0 - 5.0 + pattern(texSize, texCoord)), color.a);\n}\n",passes:[{filter:!0}]},T={name:"edgeWork",uniforms:{radius:{value:2,min:1,softMax:50},delta:{value:[1,0],private:!0}},fs:"uniform float radius;\nuniform vec2 delta;\n\nvec4 edgeWork_sampleColor1(sampler2D source, vec2 texSize, vec2 texCoord) {\n vec2 relativeDelta = radius * delta / texSize;\n\n vec2 color = vec2(0.0);\n vec2 total = vec2(0.0);\n float offset = random(vec3(12.9898, 78.233, 151.7182), 0.0);\n\n for (float t = -30.0; t <= 30.0; t++) {\n float percent = (t + offset - 0.5) / 30.0;\n float weight = 1.0 - abs(percent);\n vec3 sampleColor = texture2D(source, texCoord + relativeDelta * percent).rgb;\n float average = (sampleColor.r + sampleColor.g + sampleColor.b) / 3.0;\n color.x += average * weight;\n total.x += weight;\n if (abs(t) < 15.0) {\n weight = weight * 2.0 - 1.0;\n color.y += average * weight;\n total.y += weight;\n }\n }\n return vec4(color / total, 0.0, 1.0);\n}\n\nvec4 edgeWork_sampleColor2(sampler2D source, vec2 texSize, vec2 texCoord) {\n vec2 relativeDelta = radius * delta / texSize;\n\n vec2 color = vec2(0.0);\n vec2 total = vec2(0.0);\n float offset = random(vec3(12.9898, 78.233, 151.7182), 0.0);\n\n for (float t = -30.0; t <= 30.0; t++) {\n float percent = (t + offset - 0.5) / 30.0;\n float weight = 1.0 - abs(percent);\n vec2 sampleColor = texture2D(source, texCoord + relativeDelta * percent).xy;\n color.x += sampleColor.x * weight;\n total.x += weight;\n if (abs(t) < 15.0) {\n weight = weight * 2.0 - 1.0;\n color.y += sampleColor.y * weight;\n total.y += weight;\n }\n }\n float c = clamp(10000.0 * (color.y / total.y - color.x / total.x) + 0.5, 0.0, 1.0);\n return vec4(c, c, c, 1.0);\n}\n",dependencies:[s],passes:[{sampler:"edgeWork_sampleColor1",uniforms:{delta:[1,0]}},{sampler:"edgeWork_sampleColor2",uniforms:{delta:[0,1]}}]},C={name:"hexagonalPixelate",uniforms:{center:{value:[.5,.5],hint:"screenspace"},scale:{value:10,min:1,softMin:5,softMax:50}},fs:"uniform vec2 center;\nuniform float scale;\n\nvec4 hexagonalPixelate_sampleColor(sampler2D texture, vec2 texSize, vec2 texCoord) {\n vec2 tex = (texCoord * texSize - center * texSize) / scale;\n tex.y /= 0.866025404;\n tex.x -= tex.y * 0.5;\n\n vec2 a;\n if (tex.x + tex.y - floor(tex.x) - floor(tex.y) < 1.0) {\n a = vec2(floor(tex.x), floor(tex.y));\n }\n else a = vec2(ceil(tex.x), ceil(tex.y));\n vec2 b = vec2(ceil(tex.x), floor(tex.y));\n vec2 c = vec2(floor(tex.x), ceil(tex.y));\n\n vec3 TEX = vec3(tex.x, tex.y, 1.0 - tex.x - tex.y);\n vec3 A = vec3(a.x, a.y, 1.0 - a.x - a.y);\n vec3 B = vec3(b.x, b.y, 1.0 - b.x - b.y);\n vec3 C = vec3(c.x, c.y, 1.0 - c.x - c.y);\n\n float alen = length(TEX - A);\n float blen = length(TEX - B);\n float clen = length(TEX - C);\n\n vec2 choice;\n if (alen < blen) {\n if (alen < clen) choice = a;\n else choice = c;\n } else {\n if (blen < clen) choice = b;\n else choice = c;\n }\n\n choice.x += choice.y * 0.5;\n choice.y *= 0.866025404;\n choice *= scale / texSize;\n\n return texture2D(texture, choice + center);\n}\n",passes:[{sampler:!0}]},L={name:"ink",uniforms:{strength:{value:.25,min:0,softMax:1}},fs:"uniform float strength;\n\nvec4 ink_sampleColor(sampler2D texture, vec2 texSize, vec2 texCoord) {\n vec2 dx = vec2(1.0 / texSize.x, 0.0);\n vec2 dy = vec2(0.0, 1.0 / texSize.y);\n vec4 color = texture2D(texture, texCoord);\n float bigTotal = 0.0;\n float smallTotal = 0.0;\n vec3 bigAverage = vec3(0.0);\n vec3 smallAverage = vec3(0.0);\n for (float x = -2.0; x <= 2.0; x += 1.0) {\n for (float y = -2.0; y <= 2.0; y += 1.0) {\n vec3 sample = texture2D(texture, texCoord + dx * x + dy * y).rgb;\n bigAverage += sample;\n bigTotal += 1.0;\n if (abs(x) + abs(y) < 2.0) {\n smallAverage += sample;\n smallTotal += 1.0;\n }\n }\n }\n vec3 edge = max(vec3(0.0), bigAverage / bigTotal - smallAverage / smallTotal);\n float power = strength * strength * strength * strength * strength;\n return vec4(color.rgb - dot(edge, edge) * power * 100000.0, color.a);\n}\n",passes:[{sampler:!0}]},P={name:"magnify",uniforms:{screenXY:[0,0],radiusPixels:200,zoom:2,borderWidthPixels:0,borderColor:[255,255,255,255]},fs:"uniform vec2 screenXY;\nuniform float radiusPixels;\nuniform float zoom;\nuniform float borderWidthPixels;\nuniform vec4 borderColor;\n\nvec4 magnify_sampleColor(sampler2D texture, vec2 texSize, vec2 texCoord) {\n vec2 pos = vec2(screenXY.x, 1.0 - screenXY.y);\n float dist = distance(texCoord * texSize, pos * texSize);\n if (dist < radiusPixels) {\n return texture2D(texture, (texCoord - pos) / zoom + pos);\n }\n\n if (dist <= radiusPixels + borderWidthPixels) {\n return borderColor;\n }\n return texture2D(texture, texCoord);\n}\n",passes:[{sampler:!0}]},I={name:"warp",fs:"vec4 warp_sampleColor(sampler2D texture, vec2 texSize, vec2 coord) {\n vec4 color = texture2D(texture, coord / texSize);\n vec2 clampedCoord = clamp(coord, vec2(0.0), texSize);\n if (coord != clampedCoord) {\n color.a *= max(0.0, 1.0 - length(coord - clampedCoord));\n }\n\n return color;\n}\n"},D={name:"bulgePinch",fs:"uniform float radius;\nuniform float strength;\nuniform vec2 center;\n\nvec2 bulgePinch_warp(vec2 coord, vec2 texCenter) {\n coord -= texCenter;\n float distance = length(coord);\n if (distance < radius) {\n float percent = distance / radius;\n if (strength > 0.0) {\n coord *= mix(1.0, smoothstep(0.0, radius / distance, percent), strength * 0.75);\n } else {\n coord *= mix(1.0, pow(percent, 1.0 + strength * 0.75) * radius / distance, 1.0 - percent);\n }\n }\n coord += texCenter;\n return coord;\n}\n\nvec4 bulgePinch_sampleColor(sampler2D texture, vec2 texSize, vec2 texCoord) {\n vec2 coord = texCoord * texSize;\n coord = bulgePinch_warp(coord, center * texSize);\n\n return warp_sampleColor(texture, texSize, coord);\n}\n",uniforms:{center:[.5,.5],radius:{value:200,min:1,softMax:600},strength:{value:.5,min:-1,max:1}},dependencies:[I],passes:[{sampler:!0}]},k={name:"swirl",fs:"uniform float radius;\nuniform float angle;\nuniform vec2 center;\n\nvec2 swirl_warp(vec2 coord, vec2 texCenter) {\n coord -= texCenter;\n float distance = length(coord);\n if (distance < radius) {\n float percent = (radius - distance) / radius;\n float theta = percent * percent * angle;\n float s = sin(theta);\n float c = cos(theta);\n coord = vec2(\n coord.x * c - coord.y * s,\n coord.x * s + coord.y * c\n );\n }\n coord += texCenter;\n return coord;\n}\n\nvec4 swirl_sampleColor(sampler2D texture, vec2 texSize, vec2 texCoord) {\n vec2 coord = texCoord * texSize;\n coord = swirl_warp(coord, center * texSize);\n\n return warp_sampleColor(texture, texSize, coord);\n}\n",uniforms:{center:[.5,.5],radius:{value:200,min:1,softMax:600},angle:{value:3,softMin:-25,softMax:25}},dependencies:[I],passes:[{sampler:!0}]},R={name:"fxaa",uniforms:{},fs:"\n#define FXAA_QUALITY_PRESET 29\n\n#if (FXAA_QUALITY_PRESET == 10)\n #define FXAA_QUALITY_PS 3\n #define FXAA_QUALITY_P0 1.5\n #define FXAA_QUALITY_P1 3.0\n #define FXAA_QUALITY_P2 12.0\n#endif\n#if (FXAA_QUALITY_PRESET == 11)\n #define FXAA_QUALITY_PS 4\n #define FXAA_QUALITY_P0 1.0\n #define FXAA_QUALITY_P1 1.5\n #define FXAA_QUALITY_P2 3.0\n #define FXAA_QUALITY_P3 12.0\n#endif\n#if (FXAA_QUALITY_PRESET == 12)\n #define FXAA_QUALITY_PS 5\n #define FXAA_QUALITY_P0 1.0\n #define FXAA_QUALITY_P1 1.5\n #define FXAA_QUALITY_P2 2.0\n #define FXAA_QUALITY_P3 4.0\n #define FXAA_QUALITY_P4 12.0\n#endif\n#if (FXAA_QUALITY_PRESET == 13)\n #define FXAA_QUALITY_PS 6\n #define FXAA_QUALITY_P0 1.0\n #define FXAA_QUALITY_P1 1.5\n #define FXAA_QUALITY_P2 2.0\n #define FXAA_QUALITY_P3 2.0\n #define FXAA_QUALITY_P4 4.0\n #define FXAA_QUALITY_P5 12.0\n#endif\n#if (FXAA_QUALITY_PRESET == 14)\n #define FXAA_QUALITY_PS 7\n #define FXAA_QUALITY_P0 1.0\n #define FXAA_QUALITY_P1 1.5\n #define FXAA_QUALITY_P2 2.0\n #define FXAA_QUALITY_P3 2.0\n #define FXAA_QUALITY_P4 2.0\n #define FXAA_QUALITY_P5 4.0\n #define FXAA_QUALITY_P6 12.0\n#endif\n#if (FXAA_QUALITY_PRESET == 15)\n #define FXAA_QUALITY_PS 8\n #define FXAA_QUALITY_P0 1.0\n #define FXAA_QUALITY_P1 1.5\n #define FXAA_QUALITY_P2 2.0\n #define FXAA_QUALITY_P3 2.0\n #define FXAA_QUALITY_P4 2.0\n #define FXAA_QUALITY_P5 2.0\n #define FXAA_QUALITY_P6 4.0\n #define FXAA_QUALITY_P7 12.0\n#endif\n#if (FXAA_QUALITY_PRESET == 20)\n #define FXAA_QUALITY_PS 3\n #define FXAA_QUALITY_P0 1.5\n #define FXAA_QUALITY_P1 2.0\n #define FXAA_QUALITY_P2 8.0\n#endif\n#if (FXAA_QUALITY_PRESET == 21)\n #define FXAA_QUALITY_PS 4\n #define FXAA_QUALITY_P0 1.0\n #define FXAA_QUALITY_P1 1.5\n #define FXAA_QUALITY_P2 2.0\n #define FXAA_QUALITY_P3 8.0\n#endif\n#if (FXAA_QUALITY_PRESET == 22)\n #define FXAA_QUALITY_PS 5\n #define FXAA_QUALITY_P0 1.0\n #define FXAA_QUALITY_P1 1.5\n #define FXAA_QUALITY_P2 2.0\n #define FXAA_QUALITY_P3 2.0\n #define FXAA_QUALITY_P4 8.0\n#endif\n#if (FXAA_QUALITY_PRESET == 23)\n #define FXAA_QUALITY_PS 6\n #define FXAA_QUALITY_P0 1.0\n #define FXAA_QUALITY_P1 1.5\n #define FXAA_QUALITY_P2 2.0\n #define FXAA_QUALITY_P3 2.0\n #define FXAA_QUALITY_P4 2.0\n #define FXAA_QUALITY_P5 8.0\n#endif\n#if (FXAA_QUALITY_PRESET == 24)\n #define FXAA_QUALITY_PS 7\n #define FXAA_QUALITY_P0 1.0\n #define FXAA_QUALITY_P1 1.5\n #define FXAA_QUALITY_P2 2.0\n #define FXAA_QUALITY_P3 2.0\n #define FXAA_QUALITY_P4 2.0\n #define FXAA_QUALITY_P5 3.0\n #define FXAA_QUALITY_P6 8.0\n#endif\n#if (FXAA_QUALITY_PRESET == 25)\n #define FXAA_QUALITY_PS 8\n #define FXAA_QUALITY_P0 1.0\n #define FXAA_QUALITY_P1 1.5\n #define FXAA_QUALITY_P2 2.0\n #define FXAA_QUALITY_P3 2.0\n #define FXAA_QUALITY_P4 2.0\n #define FXAA_QUALITY_P5 2.0\n #define FXAA_QUALITY_P6 4.0\n #define FXAA_QUALITY_P7 8.0\n#endif\n#if (FXAA_QUALITY_PRESET == 26)\n #define FXAA_QUALITY_PS 9\n #define FXAA_QUALITY_P0 1.0\n #define FXAA_QUALITY_P1 1.5\n #define FXAA_QUALITY_P2 2.0\n #define FXAA_QUALITY_P3 2.0\n #define FXAA_QUALITY_P4 2.0\n #define FXAA_QUALITY_P5 2.0\n #define FXAA_QUALITY_P6 2.0\n #define FXAA_QUALITY_P7 4.0\n #define FXAA_QUALITY_P8 8.0\n#endif\n#if (FXAA_QUALITY_PRESET == 27)\n #define FXAA_QUALITY_PS 10\n #define FXAA_QUALITY_P0 1.0\n #define FXAA_QUALITY_P1 1.5\n #define FXAA_QUALITY_P2 2.0\n #define FXAA_QUALITY_P3 2.0\n #define FXAA_QUALITY_P4 2.0\n #define FXAA_QUALITY_P5 2.0\n #define FXAA_QUALITY_P6 2.0\n #define FXAA_QUALITY_P7 2.0\n #define FXAA_QUALITY_P8 4.0\n #define FXAA_QUALITY_P9 8.0\n#endif\n#if (FXAA_QUALITY_PRESET == 28)\n #define FXAA_QUALITY_PS 11\n #define FXAA_QUALITY_P0 1.0\n #define FXAA_QUALITY_P1 1.5\n #define FXAA_QUALITY_P2 2.0\n #define FXAA_QUALITY_P3 2.0\n #define FXAA_QUALITY_P4 2.0\n #define FXAA_QUALITY_P5 2.0\n #define FXAA_QUALITY_P6 2.0\n #define FXAA_QUALITY_P7 2.0\n #define FXAA_QUALITY_P8 2.0\n #define FXAA_QUALITY_P9 4.0\n #define FXAA_QUALITY_P10 8.0\n#endif\n#if (FXAA_QUALITY_PRESET == 29)\n #define FXAA_QUALITY_PS 12\n #define FXAA_QUALITY_P0 1.0\n #define FXAA_QUALITY_P1 1.5\n #define FXAA_QUALITY_P2 2.0\n #define FXAA_QUALITY_P3 2.0\n #define FXAA_QUALITY_P4 2.0\n #define FXAA_QUALITY_P5 2.0\n #define FXAA_QUALITY_P6 2.0\n #define FXAA_QUALITY_P7 2.0\n #define FXAA_QUALITY_P8 2.0\n #define FXAA_QUALITY_P9 2.0\n #define FXAA_QUALITY_P10 4.0\n #define FXAA_QUALITY_P11 8.0\n#endif\n#if (FXAA_QUALITY_PRESET == 39)\n #define FXAA_QUALITY_PS 12\n #define FXAA_QUALITY_P0 1.0\n #define FXAA_QUALITY_P1 1.0\n #define FXAA_QUALITY_P2 1.0\n #define FXAA_QUALITY_P3 1.0\n #define FXAA_QUALITY_P4 1.0\n #define FXAA_QUALITY_P5 1.5\n #define FXAA_QUALITY_P6 2.0\n #define FXAA_QUALITY_P7 2.0\n #define FXAA_QUALITY_P8 2.0\n #define FXAA_QUALITY_P9 2.0\n #define FXAA_QUALITY_P10 4.0\n #define FXAA_QUALITY_P11 8.0\n#endif\n\n#define FxaaBool bool\n#define FxaaFloat float\n#define FxaaFloat2 vec2\n#define FxaaFloat3 vec3\n#define FxaaFloat4 vec4\n#define FxaaHalf float\n#define FxaaHalf2 vec2\n#define FxaaHalf3 vec3\n#define FxaaHalf4 vec4\n#define FxaaInt2 vec2\n#define FxaaTex sampler2D\n\n#define FxaaSat(x) clamp(x, 0.0, 1.0)\n#define FxaaTexTop(t, p) texture2D(t, p)\n#define FxaaTexOff(t, p, o, r) texture2D(t, p + (o * r))\n\nFxaaFloat FxaaLuma_(FxaaFloat4 rgba) { return dot(rgba.rgb, vec3(0.2126, 0.7152, 0.0722)); }\n\nFxaaFloat4 FxaaPixelShader_(\n\n\n FxaaFloat2 pos,\n\n\n\n\n FxaaTex tex,\n\n\n\n\n FxaaFloat2 fxaaQualityRcpFrame,\n\n\n\n\n\n\n\n\n\n\n FxaaFloat fxaaQualitySubpix,\n\n\n\n\n\n\n\n\n\n FxaaFloat fxaaQualityEdgeThreshold,\n\n\n\n\n\n\n\n\n\n\n\n\n\n FxaaFloat fxaaQualityEdgeThresholdMin\n) {\n FxaaFloat2 posM;\n posM.x = pos.x;\n posM.y = pos.y;\n FxaaFloat4 rgbyM = FxaaTexTop(tex, posM);\n #define lumaM rgbyM.y\n FxaaFloat lumaS = FxaaLuma_(FxaaTexOff(tex, posM, FxaaInt2( 0, 1), fxaaQualityRcpFrame.xy));\n FxaaFloat lumaE = FxaaLuma_(FxaaTexOff(tex, posM, FxaaInt2( 1, 0), fxaaQualityRcpFrame.xy));\n FxaaFloat lumaN = FxaaLuma_(FxaaTexOff(tex, posM, FxaaInt2( 0,-1), fxaaQualityRcpFrame.xy));\n FxaaFloat lumaW = FxaaLuma_(FxaaTexOff(tex, posM, FxaaInt2(-1, 0), fxaaQualityRcpFrame.xy));\n FxaaFloat maxSM = max(lumaS, lumaM);\n FxaaFloat minSM = min(lumaS, lumaM);\n FxaaFloat maxESM = max(lumaE, maxSM);\n FxaaFloat minESM = min(lumaE, minSM);\n FxaaFloat maxWN = max(lumaN, lumaW);\n FxaaFloat minWN = min(lumaN, lumaW);\n FxaaFloat rangeMax = max(maxWN, maxESM);\n FxaaFloat rangeMin = min(minWN, minESM);\n FxaaFloat rangeMaxScaled = rangeMax * fxaaQualityEdgeThreshold;\n FxaaFloat range = rangeMax - rangeMin;\n FxaaFloat rangeMaxClamped = max(fxaaQualityEdgeThresholdMin, rangeMaxScaled);\n FxaaBool earlyExit = range < rangeMaxClamped;\n if(earlyExit)\n return rgbyM;\n FxaaFloat lumaNW = FxaaLuma_(FxaaTexOff(tex, posM, FxaaInt2(-1,-1), fxaaQualityRcpFrame.xy));\n FxaaFloat lumaSE = FxaaLuma_(FxaaTexOff(tex, posM, FxaaInt2( 1, 1), fxaaQualityRcpFrame.xy));\n FxaaFloat lumaNE = FxaaLuma_(FxaaTexOff(tex, posM, FxaaInt2( 1,-1), fxaaQualityRcpFrame.xy));\n FxaaFloat lumaSW = FxaaLuma_(FxaaTexOff(tex, posM, FxaaInt2(-1, 1), fxaaQualityRcpFrame.xy));\n FxaaFloat lumaNS = lumaN + lumaS;\n FxaaFloat lumaWE = lumaW + lumaE;\n FxaaFloat subpixRcpRange = 1.0/range;\n FxaaFloat subpixNSWE = lumaNS + lumaWE;\n FxaaFloat edgeHorz1 = (-2.0 * lumaM) + lumaNS;\n FxaaFloat edgeVert1 = (-2.0 * lumaM) + lumaWE;\n FxaaFloat lumaNESE = lumaNE + lumaSE;\n FxaaFloat lumaNWNE = lumaNW + lumaNE;\n FxaaFloat edgeHorz2 = (-2.0 * lumaE) + lumaNESE;\n FxaaFloat edgeVert2 = (-2.0 * lumaN) + lumaNWNE;\n FxaaFloat lumaNWSW = lumaNW + lumaSW;\n FxaaFloat lumaSWSE = lumaSW + lumaSE;\n FxaaFloat edgeHorz4 = (abs(edgeHorz1) * 2.0) + abs(edgeHorz2);\n FxaaFloat edgeVert4 = (abs(edgeVert1) * 2.0) + abs(edgeVert2);\n FxaaFloat edgeHorz3 = (-2.0 * lumaW) + lumaNWSW;\n FxaaFloat edgeVert3 = (-2.0 * lumaS) + lumaSWSE;\n FxaaFloat edgeHorz = abs(edgeHorz3) + edgeHorz4;\n FxaaFloat edgeVert = abs(edgeVert3) + edgeVert4;\n FxaaFloat subpixNWSWNESE = lumaNWSW + lumaNESE;\n FxaaFloat lengthSign = fxaaQualityRcpFrame.x;\n FxaaBool horzSpan = edgeHorz >= edgeVert;\n FxaaFloat subpixA = subpixNSWE * 2.0 + subpixNWSWNESE;\n if(!horzSpan) lumaN = lumaW;\n if(!horzSpan) lumaS = lumaE;\n if(horzSpan) lengthSign = fxaaQualityRcpFrame.y;\n FxaaFloat subpixB = (subpixA * (1.0/12.0)) - lumaM;\n FxaaFloat gradientN = lumaN - lumaM;\n FxaaFloat gradientS = lumaS - lumaM;\n FxaaFloat lumaNN = lumaN + lumaM;\n FxaaFloat lumaSS = lumaS + lumaM;\n FxaaBool pairN = abs(gradientN) >= abs(gradientS);\n FxaaFloat gradient = max(abs(gradientN), abs(gradientS));\n if(pairN) lengthSign = -lengthSign;\n FxaaFloat subpixC = FxaaSat(abs(subpixB) * subpixRcpRange);\n FxaaFloat2 posB;\n posB.x = posM.x;\n posB.y = posM.y;\n FxaaFloat2 offNP;\n offNP.x = (!horzSpan) ? 0.0 : fxaaQualityRcpFrame.x;\n offNP.y = ( horzSpan) ? 0.0 : fxaaQualityRcpFrame.y;\n if(!horzSpan) posB.x += lengthSign * 0.5;\n if( horzSpan) posB.y += lengthSign * 0.5;\n FxaaFloat2 posN;\n posN.x = posB.x - offNP.x * FXAA_QUALITY_P0;\n posN.y = posB.y - offNP.y * FXAA_QUALITY_P0;\n FxaaFloat2 posP;\n posP.x = posB.x + offNP.x * FXAA_QUALITY_P0;\n posP.y = posB.y + offNP.y * FXAA_QUALITY_P0;\n FxaaFloat subpixD = ((-2.0)*subpixC) + 3.0;\n FxaaFloat lumaEndN = FxaaLuma_(FxaaTexTop(tex, posN));\n FxaaFloat subpixE = subpixC * subpixC;\n FxaaFloat lumaEndP = FxaaLuma_(FxaaTexTop(tex, posP));\n if(!pairN) lumaNN = lumaSS;\n FxaaFloat gradientScaled = gradient * 1.0/4.0;\n FxaaFloat lumaMM = lumaM - lumaNN * 0.5;\n FxaaFloat subpixF = subpixD * subpixE;\n FxaaBool lumaMLTZero = lumaMM < 0.0;\n lumaEndN -= lumaNN * 0.5;\n lumaEndP -= lumaNN * 0.5;\n FxaaBool doneN = abs(lumaEndN) >= gradientScaled;\n FxaaBool doneP = abs(lumaEndP) >= gradientScaled;\n if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P1;\n if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P1;\n FxaaBool doneNP = (!doneN) || (!doneP);\n if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P1;\n if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P1;\n if(doneNP) {\n if(!doneN) lumaEndN = FxaaLuma_(FxaaTexTop(tex, posN.xy));\n if(!doneP) lumaEndP = FxaaLuma_(FxaaTexTop(tex, posP.xy));\n if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;\n if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;\n doneN = abs(lumaEndN) >= gradientScaled;\n doneP = abs(lumaEndP) >= gradientScaled;\n if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P2;\n if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P2;\n doneNP = (!doneN) || (!doneP);\n if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P2;\n if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P2;\n #if (FXAA_QUALITY_PS > 3)\n if(doneNP) {\n if(!doneN) lumaEndN = FxaaLuma_(FxaaTexTop(tex, posN.xy));\n if(!doneP) lumaEndP = FxaaLuma_(FxaaTexTop(tex, posP.xy));\n if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;\n if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;\n doneN = abs(lumaEndN) >= gradientScaled;\n doneP = abs(lumaEndP) >= gradientScaled;\n if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P3;\n if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P3;\n doneNP = (!doneN) || (!doneP);\n if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P3;\n if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P3;\n #if (FXAA_QUALITY_PS > 4)\n if(doneNP) {\n if(!doneN) lumaEndN = FxaaLuma_(FxaaTexTop(tex, posN.xy));\n if(!doneP) lumaEndP = FxaaLuma_(FxaaTexTop(tex, posP.xy));\n if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;\n if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;\n doneN = abs(lumaEndN) >= gradientScaled;\n doneP = abs(lumaEndP) >= gradientScaled;\n if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P4;\n if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P4;\n doneNP = (!doneN) || (!doneP);\n if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P4;\n if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P4;\n #if (FXAA_QUALITY_PS > 5)\n if(doneNP) {\n if(!doneN) lumaEndN = FxaaLuma_(FxaaTexTop(tex, posN.xy));\n if(!doneP) lumaEndP = FxaaLuma_(FxaaTexTop(tex, posP.xy));\n if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;\n if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;\n doneN = abs(lumaEndN) >= gradientScaled;\n doneP = abs(lumaEndP) >= gradientScaled;\n if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P5;\n if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P5;\n doneNP = (!doneN) || (!doneP);\n if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P5;\n if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P5;\n #if (FXAA_QUALITY_PS > 6)\n if(doneNP) {\n if(!doneN) lumaEndN = FxaaLuma_(FxaaTexTop(tex, posN.xy));\n if(!doneP) lumaEndP = FxaaLuma_(FxaaTexTop(tex, posP.xy));\n if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;\n if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;\n doneN = abs(lumaEndN) >= gradientScaled;\n doneP = abs(lumaEndP) >= gradientScaled;\n if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P6;\n if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P6;\n doneNP = (!doneN) || (!doneP);\n if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P6;\n if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P6;\n #if (FXAA_QUALITY_PS > 7)\n if(doneNP) {\n if(!doneN) lumaEndN = FxaaLuma_(FxaaTexTop(tex, posN.xy));\n if(!doneP) lumaEndP = FxaaLuma_(FxaaTexTop(tex, posP.xy));\n if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;\n if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;\n doneN = abs(lumaEndN) >= gradientScaled;\n doneP = abs(lumaEndP) >= gradientScaled;\n if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P7;\n if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P7;\n doneNP = (!doneN) || (!doneP);\n if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P7;\n if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P7;\n #if (FXAA_QUALITY_PS > 8)\n if(doneNP) {\n if(!doneN) lumaEndN = FxaaLuma_(FxaaTexTop(tex, posN.xy));\n if(!doneP) lumaEndP = FxaaLuma_(FxaaTexTop(tex, posP.xy));\n if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;\n if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;\n doneN = abs(lumaEndN) >= gradientScaled;\n doneP = abs(lumaEndP) >= gradientScaled;\n if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P8;\n if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P8;\n doneNP = (!doneN) || (!doneP);\n if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P8;\n if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P8;\n #if (FXAA_QUALITY_PS > 9)\n if(doneNP) {\n if(!doneN) lumaEndN = FxaaLuma_(FxaaTexTop(tex, posN.xy));\n if(!doneP) lumaEndP = FxaaLuma_(FxaaTexTop(tex, posP.xy));\n if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;\n if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;\n doneN = abs(lumaEndN) >= gradientScaled;\n doneP = abs(lumaEndP) >= gradientScaled;\n if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P9;\n if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P9;\n doneNP = (!doneN) || (!doneP);\n if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P9;\n if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P9;\n #if (FXAA_QUALITY_PS > 10)\n if(doneNP) {\n if(!doneN) lumaEndN = FxaaLuma_(FxaaTexTop(tex, posN.xy));\n if(!doneP) lumaEndP = FxaaLuma_(FxaaTexTop(tex, posP.xy));\n if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;\n if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;\n doneN = abs(lumaEndN) >= gradientScaled;\n doneP = abs(lumaEndP) >= gradientScaled;\n if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P10;\n if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P10;\n doneNP = (!doneN) || (!doneP);\n if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P10;\n if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P10;\n #if (FXAA_QUALITY_PS > 11)\n if(doneNP) {\n if(!doneN) lumaEndN = FxaaLuma_(FxaaTexTop(tex, posN.xy));\n if(!doneP) lumaEndP = FxaaLuma_(FxaaTexTop(tex, posP.xy));\n if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;\n if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;\n doneN = abs(lumaEndN) >= gradientScaled;\n doneP = abs(lumaEndP) >= gradientScaled;\n if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P11;\n if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P11;\n doneNP = (!doneN) || (!doneP);\n if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P11;\n if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P11;\n #if (FXAA_QUALITY_PS > 12)\n if(doneNP) {\n if(!doneN) lumaEndN = FxaaLuma_(FxaaTexTop(tex, posN.xy));\n if(!doneP) lumaEndP = FxaaLuma_(FxaaTexTop(tex, posP.xy));\n if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;\n if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;\n doneN = abs(lumaEndN) >= gradientScaled;\n doneP = abs(lumaEndP) >= gradientScaled;\n if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P12;\n if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P12;\n doneNP = (!doneN) || (!doneP);\n if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P12;\n if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P12;\n }\n #endif\n }\n #endif\n }\n #endif\n }\n #endif\n }\n #endif\n }\n #endif\n }\n #endif\n }\n #endif\n }\n #endif\n }\n #endif\n }\n FxaaFloat dstN = posM.x - posN.x;\n FxaaFloat dstP = posP.x - posM.x;\n if(!horzSpan) dstN = posM.y - posN.y;\n if(!horzSpan) dstP = posP.y - posM.y;\n FxaaBool goodSpanN = (lumaEndN < 0.0) != lumaMLTZero;\n FxaaFloat spanLength = (dstP + dstN);\n FxaaBool goodSpanP = (lumaEndP < 0.0) != lumaMLTZero;\n FxaaFloat spanLengthRcp = 1.0/spanLength;\n FxaaBool directionN = dstN < dstP;\n FxaaFloat dst = min(dstN, dstP);\n FxaaBool goodSpan = directionN ? goodSpanN : goodSpanP;\n FxaaFloat subpixG = subpixF * subpixF;\n FxaaFloat pixelOffset = (dst * (-spanLengthRcp)) + 0.5;\n FxaaFloat subpixH = subpixG * fxaaQualitySubpix;\n FxaaFloat pixelOffsetGood = goodSpan ? pixelOffset : 0.0;\n FxaaFloat pixelOffsetSubpix = max(pixelOffsetGood, subpixH);\n if(!horzSpan) posM.x += pixelOffsetSubpix * lengthSign;\n if( horzSpan) posM.y += pixelOffsetSubpix * lengthSign;\n return FxaaTexTop(tex, posM);\n}\n\nvec4 fxaa_sampleColor(sampler2D texture, vec2 texSize, vec2 texCoord) {\n const float fxaa_QualitySubpix = 0.5;\n const float fxaa_QualityEdgeThreshold = 0.125;\n const float fxaa_QualityEdgeThresholdMin = 0.0833;\n\n return FxaaPixelShader_(\n texCoord,\n texture,\n vec2(1.0) / texSize,\n fxaa_QualitySubpix,\n fxaa_QualityEdgeThreshold,\n fxaa_QualityEdgeThresholdMin\n );\n}\n",passes:[{sampler:!0}]};var j=n(857)},function(e,t,n){"use strict";function r(e,t=(()=>!0)){return Array.isArray(e)?function e(t,n,r){let i=-1;for(;++i{for(const o in i)if(!r(i[o],n[o])){t=e(i),n=i;break}return t}}n.d(t,"a",(function(){return i}))},function(e,t,n){"use strict";var r=n(1);t.a=new class{constructor(e={}){Object(r.a)(this,"_pool",[]),Object(r.a)(this,"opts",{overAlloc:2,poolSize:100}),this.setOptions(e)}setOptions(e){Object.assign(this.opts,e)}allocate(e,t,{size:n=1,type:r,padding:i=0,copy:o=!1,initialize:a=!1,maxCount:s}){const l=r||e&&e.constructor||Float32Array,u=t*n+i;if(ArrayBuffer.isView(e)){if(u<=e.length)return e;if(u*e.BYTES_PER_ELEMENT<=e.buffer.byteLength)return new l(e.buffer,0,u)}let c=1/0;s&&(c=s*n+i);const d=this._allocate(l,u,a,c);return e&&o?d.set(e):a||d.fill(0,0,4),this._release(e),d}release(e){this._release(e)}_allocate(e,t,n,r){let i=Math.max(Math.ceil(t*this.opts.overAlloc),1);i>r&&(i=r);const o=this._pool,a=e.BYTES_PER_ELEMENT*i,s=o.findIndex(e=>e.byteLength>=a);if(s>=0){const t=new e(o.splice(s,1)[0],0,i);return n&&t.fill(0),t}return new e(i)}_release(e){if(!ArrayBuffer.isView(e))return;const t=this._pool,{buffer:n}=e,{byteLength:r}=n,i=t.findIndex(e=>e.byteLength>=r);i<0?t.push(n):(i>0||t.lengththis.opts.poolSize&&t.shift()}}},function(e,t,n){"use strict";n.d(t,"b",(function(){return i})),n.d(t,"a",(function(){return o}));var r=n(212);function i(e,t){return Object(r.a)(e>=0),Object(r.a)(t>0),e+(t-1)&~(t-1)}function o(e,t,n){let r;if(e instanceof ArrayBuffer)r=new Uint8Array(e);else{const t=e.byteOffset,n=e.byteLength;r=new Uint8Array(e.buffer||e.arrayBuffer,t,n)}return t.set(r,n),n+i(r.byteLength,4)}},function(e,t,n){"use strict";n.d(t,"b",(function(){return d}));var r=n(226),i=n.n(r);function o(e){return JSON.stringify(e)}function a(e){return"string"==typeof e}function s(e,t,n){return n.indexOf(e)===t}function l(e){return-1===e.indexOf(",")?e:e.split(",")}function u(e){if(!e)return e;if("C"===e||"posix"===e||"POSIX"===e)return"en-US";if(-1!==e.indexOf(".")){var t=e.split(".")[0];return u(void 0===t?"":t)}if(-1!==e.indexOf("@")){var n=e.split("@")[0];return u(void 0===n?"":n)}if(-1===e.indexOf("-")||(r=e).toLowerCase()!==r)return e;var r,i=e.split("-"),o=i[0],a=i[1],s=void 0===a?"":a;return"".concat(o,"-").concat(s.toUpperCase())}var c=i()((function(e){var t=void 0===e?{}:e,n=t.useFallbackLocale,r=void 0===n||n,i=t.fallbackLocale,o=void 0===i?"en-US":i,c=[];if("undefined"!=typeof navigator){for(var d=[],f=0,h=navigator.languages||[];f{}}info(){return()=>{}}warn(){return()=>{}}error(){return()=>{}}}var a=n(169);const s={fetch:null,mimeType:void 0,nothrow:!1,log:new class{constructor(){this.console=void 0,this.console=console}log(){for(var e=arguments.length,t=new Array(e),n=0;nthis.compareFields(e,t[n]))}compareFields(e,t){return e===t||t instanceof e.constructor&&e.name===t.name&&e.nullable===t.nullable&&this.visit(e.type,t.type)}}function o(e,t){return t instanceof e.constructor}function a(e,t){return e===t||o(e,t)}function s(e,t){return e===t||o(e,t)&&e.bitWidth===t.bitWidth&&e.isSigned===t.isSigned}function l(e,t){return e===t||o(e,t)&&e.precision===t.precision}function u(e,t){return e===t||o(e,t)&&e.unit===t.unit}function c(e,t){return e===t||o(e,t)&&e.unit===t.unit&&e.timezone===t.timezone}function d(e,t){return e===t||o(e,t)&&e.unit===t.unit&&e.bitWidth===t.bitWidth}function f(e,t){return e===t||o(e,t)&&e.mode===t.mode&&e.typeIds.every((e,n)=>e===t.typeIds[n])&&p.compareManyFields(e.children,t.children)}function h(e,t){return e===t||o(e,t)&&e.unit===t.unit}i.prototype.visitNull=a,i.prototype.visitBool=a,i.prototype.visitInt=s,i.prototype.visitInt8=s,i.prototype.visitInt16=s,i.prototype.visitInt32=s,i.prototype.visitInt64=s,i.prototype.visitUint8=s,i.prototype.visitUint16=s,i.prototype.visitUint32=s,i.prototype.visitUint64=s,i.prototype.visitFloat=l,i.prototype.visitFloat16=l,i.prototype.visitFloat32=l,i.prototype.visitFloat64=l,i.prototype.visitUtf8=a,i.prototype.visitBinary=a,i.prototype.visitFixedSizeBinary=function(e,t){return e===t||o(e,t)&&e.byteWidth===t.byteWidth},i.prototype.visitDate=u,i.prototype.visitDateDay=u,i.prototype.visitDateMillisecond=u,i.prototype.visitTimestamp=c,i.prototype.visitTimestampSecond=c,i.prototype.visitTimestampMillisecond=c,i.prototype.visitTimestampMicrosecond=c,i.prototype.visitTimestampNanosecond=c,i.prototype.visitTime=d,i.prototype.visitTimeSecond=d,i.prototype.visitTimeMillisecond=d,i.prototype.visitTimeMicrosecond=d,i.prototype.visitTimeNanosecond=d,i.prototype.visitDecimal=a,i.prototype.visitList=function(e,t){return e===t||o(e,t)&&e.children.length===t.children.length&&p.compareManyFields(e.children,t.children)},i.prototype.visitStruct=function(e,t){return e===t||o(e,t)&&e.children.length===t.children.length&&p.compareManyFields(e.children,t.children)},i.prototype.visitUnion=f,i.prototype.visitDenseUnion=f,i.prototype.visitSparseUnion=f,i.prototype.visitDictionary=function(e,t){return e===t||o(e,t)&&e.id===t.id&&e.isOrdered===t.isOrdered&&p.visit(e.indices,t.indices)&&p.visit(e.dictionary,t.dictionary)},i.prototype.visitInterval=h,i.prototype.visitIntervalDayTime=h,i.prototype.visitIntervalYearMonth=h,i.prototype.visitFixedSizeList=function(e,t){return e===t||o(e,t)&&e.listSize===t.listSize&&e.children.length===t.children.length&&p.compareManyFields(e.children,t.children)},i.prototype.visitMap=function(e,t){return e===t||o(e,t)&&e.keysSorted===t.keysSorted&&e.children.length===t.children.length&&p.compareManyFields(e.children,t.children)};const p=new i;function A(e,t){return p.compareSchemas(e,t)}function g(e,t){return p.compareFields(e,t)}function m(e,t){return p.visit(e,t)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(31);class i{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsDecimal(e,t){return(t||new i).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsDecimal(e,t){return e.setPosition(e.position()+r.SIZE_PREFIX_LENGTH),(t||new i).__init(e.readInt32(e.position())+e.position(),e)}precision(){const e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt32(this.bb_pos+e):0}scale(){const e=this.bb.__offset(this.bb_pos,6);return e?this.bb.readInt32(this.bb_pos+e):0}bitWidth(){const e=this.bb.__offset(this.bb_pos,8);return e?this.bb.readInt32(this.bb_pos+e):128}static startDecimal(e){e.startObject(3)}static addPrecision(e,t){e.addFieldInt32(0,t,0)}static addScale(e,t){e.addFieldInt32(1,t,0)}static addBitWidth(e,t){e.addFieldInt32(2,t,128)}static endDecimal(e){return e.endObject()}static createDecimal(e,t,n,r){return i.startDecimal(e),i.addPrecision(e,t),i.addScale(e,n),i.addBitWidth(e,r),i.endDecimal(e)}}},function(e,t,n){"use strict";var r=n(3);Object.defineProperty(t,"__esModule",{value:!0});var i={ThreeDBuildingLayer:!0,DeckGLClusterLayer:!0,EnhancedColumnLayer:!0,EnhancedGridLayer:!0,EnhancedHexagonLayer:!0,EnhancedLineLayer:!0,SvgIconLayer:!0,FilterArrowExtension:!0};Object.defineProperty(t,"ThreeDBuildingLayer",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(t,"DeckGLClusterLayer",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(t,"EnhancedColumnLayer",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(t,"EnhancedGridLayer",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(t,"EnhancedHexagonLayer",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(t,"EnhancedLineLayer",{enumerable:!0,get:function(){return c.default}}),Object.defineProperty(t,"SvgIconLayer",{enumerable:!0,get:function(){return d.default}}),Object.defineProperty(t,"FilterArrowExtension",{enumerable:!0,get:function(){return f.default}});var o=r(n(1292)),a=r(n(1307)),s=r(n(1309)),l=r(n(1310)),u=r(n(1311)),c=r(n(1312)),d=r(n(1313)),f=r(n(1315)),h=n(1317);Object.keys(h).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===h[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return h[e]}}))}));var p=n(1318);Object.keys(p).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===p[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return p[e]}}))}));var A=n(894);Object.keys(A).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===A[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return A[e]}}))}))},function(e,t,n){"use strict";function r(e){return function(e){if(Array.isArray(e))return i(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return i(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return i(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0;i--){var o=t[i];o>=0&&o0?r[i-1]:t[0],i=r?[o[r-1],n]:[o[i-1],o[i]]},s.unknown=function(t){return arguments.length?(e=t,s):s},s.thresholds=function(){return o.slice()},s.copy=function(){return x().domain([t,n]).range(a).unknown(e)},u.b.apply(Object(i.b)(s),arguments)}function M(){var e,t=[.5],n=[0,1],r=1;function i(i){return i<=i?n[Object(b.d)(t,i,0,r)]:e}return i.domain=function(e){return arguments.length?(t=Array.from(e),r=Math.min(t.length,n.length-1),i):t.slice()},i.range=function(e){return arguments.length?(n=Array.from(e),r=Math.min(t.length,n.length-1),i):n.slice()},i.invertExtent=function(e){var r=n.indexOf(e);return[t[r-1],t[r]]},i.unknown=function(t){return arguments.length?(e=t,i):e},i.copy=function(){return M().domain(t).range(n).unknown(e)},u.b.apply(i,arguments)}var E=n(523),O=n(1130),S=n(1161),T=n(1827);function C(){var e,t,n,r,i,o=0,a=1,s=l.c,u=!1;function c(t){return isNaN(t=+t)?i:s(0===n?.5:(t=(r(t)-e)*n,u?Math.max(0,Math.min(1,t)):t))}function d(e){return function(t){var n,r;return arguments.length?([n,r]=t,s=e(n,r),c):[s(0),s(1)]}}return c.domain=function(i){return arguments.length?([o,a]=i,e=r(o=+o),t=r(a=+a),n=e===t?0:1/(t-e),c):[o,a]},c.clamp=function(e){return arguments.length?(u=!!e,c):u},c.interpolator=function(e){return arguments.length?(s=e,c):s},c.range=d(S.a),c.rangeRound=d(T.a),c.unknown=function(e){return arguments.length?(i=e,c):i},function(i){return r=i,e=i(o),t=i(a),n=e===t?0:1/(t-e),c}}function L(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function P(){var e=Object(i.b)(C()(l.c));return e.copy=function(){return L(e,P())},u.a.apply(e,arguments)}function I(){var e=Object(s.b)(C()).domain([1,10]);return e.copy=function(){return L(e,I()).base(e.base())},u.a.apply(e,arguments)}function D(){var e=f(C());return e.copy=function(){return L(e,D()).constant(e.constant())},u.a.apply(e,arguments)}function k(){var e=Object(A.b)(C());return e.copy=function(){return L(e,k()).exponent(e.exponent())},u.a.apply(e,arguments)}function R(){return k.apply(null,arguments).exponent(.5)}function j(){var e=[],t=l.c;function n(n){if(!isNaN(n=+n))return t((Object(b.d)(e,n,1)-1)/(e.length-1))}return n.domain=function(t){if(!arguments.length)return e.slice();e=[];for(let n of t)null==n||isNaN(n=+n)||e.push(n);return e.sort(_.a),n},n.interpolator=function(e){return arguments.length?(t=e,n):t},n.range=function(){return e.map((n,r)=>t(r/(e.length-1)))},n.quantiles=function(t){return Array.from({length:t+1},(n,r)=>Object(v.a)(e,r/t))},n.copy=function(){return j(t).domain(e)},u.a.apply(n,arguments)}function F(e,t){void 0===t&&(t=e,e=S.a);for(var n=0,r=t.length-1,i=t[0],o=new Array(r<0?0:r);n{this._builder.clear()},pull:e=>{this._maybeFlush(this._builder,this._controller=e)},start:e=>{this._maybeFlush(this._builder,this._controller=e)}},{highWaterMark:o,size:"bytes"!==r?f:h}),this.writable=new WritableStream({abort:()=>{this._builder.clear()},write:()=>{this._maybeFlush(this._builder,this._controller)},close:()=>{this._maybeFlush(this._builder.finish(),this._controller)}},{highWaterMark:a,size:e=>this._writeValueAndReturnChunkSize(e)})}_writeValueAndReturnChunkSize(e){const t=this._bufferedSize;return this._bufferedSize=this._getSize(this._builder.append(e)),this._bufferedSize-t}_maybeFlush(e,t){null!=t&&(this._bufferedSize>=t.desiredSize&&++this._numChunks&&this._enqueue(t,e.toVector()),e.finished&&((e.length>0||0===this._numChunks)&&++this._numChunks&&this._enqueue(t,e.toVector()),!this._finished&&(this._finished=!0)&&this._enqueue(t,null)))}_enqueue(e,t){this._bufferedSize=0,this._controller=null,null==t?e.close():e.enqueue(t)}}const f=e=>{var t;return null!==(t=null==e?void 0:e.length)&&void 0!==t?t:0},h=e=>{var t;return null!==(t=null==e?void 0:e.byteLength)&&void 0!==t?t:0};var p=n(90);function A(e,t){const n=new p.a;let r=null;const i=new ReadableStream({cancel(){return Object(s.__awaiter)(this,void 0,void 0,(function*(){yield n.close()}))},start(e){return Object(s.__awaiter)(this,void 0,void 0,(function*(){yield a(e,r||(r=yield function(){return Object(s.__awaiter)(this,void 0,void 0,(function*(){return yield(yield o.d.from(n)).open(t)}))}()))}))},pull(e){return Object(s.__awaiter)(this,void 0,void 0,(function*(){r?yield a(e,r):e.close()}))}});return{writable:new WritableStream(n,Object.assign({highWaterMark:Math.pow(2,14)},e)),readable:i};function a(e,t){return Object(s.__awaiter)(this,void 0,void 0,(function*(){let n=e.desiredSize,r=null;for(;!(r=yield t.next()).done;)if(e.enqueue(r.value),null!=n&&--n<=0)return;e.close()}))}}function g(e,t){const n=new this(e),r=new p.b(n),i=new ReadableStream({cancel(){return Object(s.__awaiter)(this,void 0,void 0,(function*(){yield r.cancel()}))},pull(e){return Object(s.__awaiter)(this,void 0,void 0,(function*(){yield o(e)}))},start(e){return Object(s.__awaiter)(this,void 0,void 0,(function*(){yield o(e)}))}},Object.assign({highWaterMark:Math.pow(2,14)},t));return{writable:new WritableStream(n,e),readable:i};function o(e){return Object(s.__awaiter)(this,void 0,void 0,(function*(){let t=null,n=e.desiredSize;for(;t=yield r.read(n||null);)if(e.enqueue(t),null!=n&&(n-=t.byteLength)<=0)return;e.close()}))}}var m=n(5),y=n(424),v=n(38),b=n(12),_=n(347),w=n(228),x=n(135),M=n(41),E=n(80),O=n(59),S=n(568),T=n(108),C=n(103),L=n(87),P=n(363),I=n(319),D=n(102),k=n(231),R=n(230),j=n(191);const F=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},P),I),D),k),l),R),{compareSchemas:j.b,compareFields:j.a,compareTypes:j.c});var N=n(348),B=n(489),z=n(258),U=n(492),H=n(495),V=n(491),G=n(496),Y=n(201),W=n(260),q=n(98),X=n(493),Z=n(497),K=n(488),Q=n(494),J=n(170),$=n(171),ee=n(259),te=n(490);r.a.toDOMStream=function(e,t){if(Object(u.b)(e))return function(e,t){let n=null;const r="bytes"===(null==t?void 0:t.type)||!1,i=(null==t?void 0:t.highWaterMark)||Math.pow(2,24);return new ReadableStream(Object.assign(Object.assign({},t),{start(t){return Object(s.__awaiter)(this,void 0,void 0,(function*(){yield o(t,n||(n=e[Symbol.asyncIterator]()))}))},pull(e){return Object(s.__awaiter)(this,void 0,void 0,(function*(){n?yield o(e,n):e.close()}))},cancel(){return Object(s.__awaiter)(this,void 0,void 0,(function*(){(null==n?void 0:n.return)&&(yield n.return()),n=null}))}}),Object.assign({highWaterMark:r?i:void 0},t));function o(e,t){return Object(s.__awaiter)(this,void 0,void 0,(function*(){let n,i=null,o=e.desiredSize||null;for(;!(i=yield t.next(r?o:null)).done;)if(ArrayBuffer.isView(i.value)&&(n=Object(l.toUint8Array)(i.value))&&(null!=o&&r&&(o=o-n.byteLength+1),i.value=n),e.enqueue(i.value),null!=o&&--o<=0)return;e.close()}))}}(e,t);if(Object(u.f)(e))return function(e,t){let n=null;const r="bytes"===(null==t?void 0:t.type)||!1,i=(null==t?void 0:t.highWaterMark)||Math.pow(2,24);return new ReadableStream(Object.assign(Object.assign({},t),{start(t){o(t,n||(n=e[Symbol.iterator]()))},pull(e){n?o(e,n):e.close()},cancel(){(null==n?void 0:n.return)&&n.return(),n=null}}),Object.assign({highWaterMark:r?i:void 0},t));function o(e,t){let n,i=null,o=e.desiredSize||null;for(;!(i=t.next(r?o:null)).done;)if(ArrayBuffer.isView(i.value)&&(n=Object(l.toUint8Array)(i.value))&&(null!=o&&r&&(o=o-n.byteLength+1),i.value=n),e.enqueue(i.value),null!=o&&--o<=0)return;e.close()}}(e,t);throw new Error("toDOMStream() must be called with an Iterable or AsyncIterable")},i.a.throughDOM=function(e){return new d(e)},o.d.throughDOM=A,o.c.throughDOM=A,o.e.throughDOM=A,a.d.throughDOM=g,a.a.throughDOM=g,a.c.throughDOM=g},function(e,t,n){"use strict";n.d(t,"d",(function(){return o})),n.d(t,"a",(function(){return a})),n.d(t,"b",(function(){return s})),n.d(t,"c",(function(){return l}));var r=n(231),i=n(61);class o extends i.b{setValue(e,t){this._values.set(e,t)}}class a extends o{setValue(e,t){super.setValue(e,Object(r.float64ToUint16)(t))}}class s extends o{}class l extends o{}},function(e,t,n){"use strict";n.d(t,"a",(function(){return f}));var r=n(17),i=n(115),o=n(318),a=n(322),s=n(555),l=n(677),u=n(1163),c=n(141),d=n(28);class f extends i.a{get[Symbol.toStringTag](){return"Framebuffer"}static isSupported(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{colorBufferFloat:n,colorBufferHalfFloat:r}=t;let i=!0;return n&&(i=Boolean(e.getExtension("EXT_color_buffer_float")||e.getExtension("WEBGL_color_buffer_float")||e.getExtension("OES_texture_float"))),r&&(i=i&&Boolean(e.getExtension("EXT_color_buffer_float")||e.getExtension("EXT_color_buffer_half_float"))),i}static getDefaultFramebuffer(e){return e.luma=e.luma||{},e.luma.defaultFramebuffer=e.luma.defaultFramebuffer||new f(e,{id:"default-framebuffer",handle:null,attachments:{}}),e.luma.defaultFramebuffer}get MAX_COLOR_ATTACHMENTS(){const e=Object(r.a)(this.gl);return e.getParameter(e.MAX_COLOR_ATTACHMENTS)}get MAX_DRAW_BUFFERS(){const e=Object(r.a)(this.gl);return e.getParameter(e.MAX_DRAW_BUFFERS)}constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};super(e,t),this.width=null,this.height=null,this.attachments={},this.readBuffer=36064,this.drawBuffers=[36064],this.ownResources=[],this.initialize(t),Object.seal(this)}get color(){return this.attachments[36064]||null}get texture(){return this.attachments[36064]||null}get depth(){return this.attachments[36096]||this.attachments[33306]||null}get stencil(){return this.attachments[36128]||this.attachments[33306]||null}initialize(e){let{width:t=1,height:n=1,attachments:r=null,color:i=!0,depth:o=!0,stencil:a=!1,check:s=!0,readBuffer:l,drawBuffers:u}=e;if(Object(d.a)(t>=0&&n>=0,"Width and height need to be integers"),this.width=t,this.height=n,r)for(const e in r){const i=r[e];(Array.isArray(i)?i[0]:i).resize({width:t,height:n})}else r=this._createDefaultAttachments(i,o,a,t,n);this.update({clearAttachments:!0,attachments:r,readBuffer:l,drawBuffers:u}),r&&s&&this.checkStatus()}delete(){for(const e of this.ownResources)e.delete();return super.delete(),this}update(e){let{attachments:t={},readBuffer:n,drawBuffers:r,clearAttachments:i=!1,resizeAttachments:o=!0}=e;this.attach(t,{clearAttachments:i,resizeAttachments:o});const{gl:a}=this,s=a.bindFramebuffer(36160,this.handle);return n&&this._setReadBuffer(n),r&&this._setDrawBuffers(r),a.bindFramebuffer(36160,s||null),this}resize(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{width:t,height:n}=e;if(null===this.handle)return Object(d.a)(void 0===t&&void 0===n),this.width=this.gl.drawingBufferWidth,this.height=this.gl.drawingBufferHeight,this;void 0===t&&(t=this.gl.drawingBufferWidth),void 0===n&&(n=this.gl.drawingBufferHeight),t!==this.width&&n!==this.height&&r.k.log(2,"Resizing framebuffer ".concat(this.id," to ").concat(t,"x").concat(n))();for(const e in this.attachments)this.attachments[e].resize({width:t,height:n});return this.width=t,this.height=n,this}attach(e){let{clearAttachments:t=!1,resizeAttachments:n=!0}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const r={};t&&Object.keys(this.attachments).forEach(e=>{r[e]=null}),Object.assign(r,e);const i=this.gl.bindFramebuffer(36160,this.handle);for(const e in r){Object(d.a)(void 0!==e,"Misspelled framebuffer binding point?");const t=Number(e),i=r[t];let o=i;if(o)if(o instanceof a.a)this._attachRenderbuffer({attachment:t,renderbuffer:o});else if(Array.isArray(i)){const[e,n=0,r=0]=i;o=e,this._attachTexture({attachment:t,texture:e,layer:n,level:r})}else this._attachTexture({attachment:t,texture:o,layer:0,level:0});else this._unattach(t);n&&o&&o.resize({width:this.width,height:this.height})}this.gl.bindFramebuffer(36160,i||null),Object.assign(this.attachments,e),Object.keys(this.attachments).filter(e=>!this.attachments[e]).forEach(e=>{delete this.attachments[e]})}checkStatus(){const{gl:e}=this,t=this.getStatus();if(36053!==t)throw new Error(function(e){return(f.STATUS||{})[e]||"Framebuffer error ".concat(e)}(t));return this}getStatus(){const{gl:e}=this,t=e.bindFramebuffer(36160,this.handle),n=e.checkFramebufferStatus(36160);return e.bindFramebuffer(36160,t||null),n}clear(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{color:t,depth:n,stencil:r,drawBuffers:i=[]}=e,o=this.gl.bindFramebuffer(36160,this.handle);return(t||n||r)&&Object(s.a)(this.gl,{color:t,depth:n,stencil:r}),i.forEach((e,t)=>{Object(s.b)(this.gl,{drawBuffer:t,value:e})}),this.gl.bindFramebuffer(36160,o||null),this}readPixels(){return r.k.error("Framebuffer.readPixels() is no logner supported, use readPixelsToArray(framebuffer)")(),null}readPixelsToBuffer(){return r.k.error("Framebuffer.readPixelsToBuffer()is no logner supported, use readPixelsToBuffer(framebuffer)")(),null}copyToDataUrl(){return r.k.error("Framebuffer.copyToDataUrl() is no logner supported, use copyToDataUrl(framebuffer)")(),null}copyToImage(){return r.k.error("Framebuffer.copyToImage() is no logner supported, use copyToImage(framebuffer)")(),null}copyToTexture(){return r.k.error("Framebuffer.copyToTexture({...}) is no logner supported, use copyToTexture(source, target, opts})")(),null}blit(){return r.k.error("Framebuffer.blit({...}) is no logner supported, use blit(source, target, opts)")(),null}invalidate(e){let{attachments:t=[],x:n=0,y:i=0,width:o,height:a}=e;const s=Object(r.a)(this.gl),l=s.bindFramebuffer(36008,this.handle);return 0===n&&0===i&&void 0===o&&void 0===a?s.invalidateFramebuffer(36008,t):s.invalidateFramebuffer(36008,t,n,i,o,a),s.bindFramebuffer(36008,l),this}getAttachmentParameter(e,t,n){let r=this._getAttachmentParameterFallback(t);return null===r&&(this.gl.bindFramebuffer(36160,this.handle),r=this.gl.getFramebufferAttachmentParameter(36160,e,t),this.gl.bindFramebuffer(36160,null)),n&&r>1e3&&(r=Object(c.a)(this.gl,r)),r}getAttachmentParameters(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:36064,t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.constructor.ATTACHMENT_PARAMETERS||[];const r={};for(const i of n){r[t?Object(c.a)(this.gl,i):i]=this.getAttachmentParameter(e,i,t)}return r}getParameters(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];const t=Object.keys(this.attachments),n={};for(const r of t){const t=Number(r);n[e?Object(c.a)(this.gl,t):t]=this.getAttachmentParameters(t,e)}return n}show(){return"undefined"!=typeof window&&window.open(Object(l.a)(this),"luma-debug-texture"),this}log(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(e>r.k.level||"undefined"==typeof window)return this;t=t||"Framebuffer ".concat(this.id);const n=Object(l.a)(this,{targetMaxHeight:100});return r.k.image({logLevel:e,message:t,image:n},t)(),this}bind(){let{target:e=36160}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.gl.bindFramebuffer(e,this.handle),this}unbind(){let{target:e=36160}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.gl.bindFramebuffer(e,null),this}_createDefaultAttachments(e,t,n,r,i){let s=null;return e&&(s=s||{},s[36064]=new o.a(this.gl,{id:"".concat(this.id,"-color0"),pixels:null,format:6408,type:5121,width:r,height:i,mipmaps:!1,parameters:{10241:9729,10240:9729,10242:33071,10243:33071}}),this.ownResources.push(s[36064])),t&&n?(s=s||{},s[33306]=new a.a(this.gl,{id:"".concat(this.id,"-depth-stencil"),format:35056,width:r,height:111}),this.ownResources.push(s[33306])):t?(s=s||{},s[36096]=new a.a(this.gl,{id:"".concat(this.id,"-depth"),format:33189,width:r,height:i}),this.ownResources.push(s[36096])):n&&Object(d.a)(!1),s}_unattach(e){const t=this.attachments[e];t&&(t instanceof a.a?this.gl.framebufferRenderbuffer(36160,e,36161,null):this.gl.framebufferTexture2D(36160,e,3553,null,0),delete this.attachments[e])}_attachRenderbuffer(e){let{attachment:t=36064,renderbuffer:n}=e;const{gl:r}=this;r.framebufferRenderbuffer(36160,t,36161,n.handle),this.attachments[t]=n}_attachTexture(e){let{attachment:t=36064,texture:n,layer:i,level:o}=e;const{gl:a}=this;switch(a.bindTexture(n.target,n.handle),n.target){case 35866:case 32879:Object(r.a)(a).framebufferTextureLayer(36160,t,n.target,o,i);break;case 34067:const e=function(e){return e<34069?e+34069:e}(i);a.framebufferTexture2D(36160,t,e,n.handle,o);break;case 3553:a.framebufferTexture2D(36160,t,3553,n.handle,o);break;default:Object(d.a)(!1,"Illegal texture type")}a.bindTexture(n.target,null),this.attachments[t]=n}_setReadBuffer(e){const t=Object(r.g)(this.gl);t?t.readBuffer(e):Object(d.a)(36064===e||1029===e,"Multiple render targets not supported"),this.readBuffer=e}_setDrawBuffers(e){const{gl:t}=this,n=Object(r.a)(t);if(n)n.drawBuffers(e);else{const n=t.getExtension("WEBGL_draw_buffers");n?n.drawBuffersWEBGL(e):Object(d.a)(1===e.length&&(36064===e[0]||1029===e[0]),"Multiple render targets not supported")}this.drawBuffers=e}_getAttachmentParameterFallback(e){const t=Object(u.a)(this.gl);switch(e){case 36052:return t.WEBGL2?null:0;case 33298:case 33299:case 33300:case 33301:case 33302:case 33303:return t.WEBGL2?null:8;case 33297:return t.WEBGL2?null:5125;case 33296:return t.WEBGL2||t.EXT_sRGB?null:9729;default:return null}}_createHandle(){return this.gl.createFramebuffer()}_deleteHandle(){this.gl.deleteFramebuffer(this.handle)}_bindHandle(e){return this.gl.bindFramebuffer(36160,e)}}f.ATTACHMENT_PARAMETERS=[36049,36048,33296,33298,33299,33300,33301,33302,33303]},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(1);class i{constructor(e){Object(r.a)(this,"_inProgress",void 0),Object(r.a)(this,"_handle",void 0),Object(r.a)(this,"_timeline",void 0),Object(r.a)(this,"time",void 0),Object(r.a)(this,"settings",void 0),this._inProgress=!1,this._handle=null,this._timeline=e,this.time=0,this.settings={duration:0}}get inProgress(){return this._inProgress}start(e){var t,n;this.cancel(),this.settings=e,this._inProgress=!0,null===(t=(n=this.settings).onStart)||void 0===t||t.call(n,this)}end(){var e,t;this._inProgress&&(this._timeline.removeChannel(this._handle),this._handle=null,this._inProgress=!1,null===(e=(t=this.settings).onEnd)||void 0===e||e.call(t,this))}cancel(){var e,t;this._inProgress&&(null===(e=(t=this.settings).onInterrupt)||void 0===e||e.call(t,this),this._timeline.removeChannel(this._handle),this._handle=null,this._inProgress=!1)}update(){var e,t;if(!this._inProgress)return!1;if(null===this._handle){const{_timeline:e,settings:t}=this;this._handle=e.addChannel({delay:e.getTime(),duration:t.duration})}return this.time=this._timeline.getTime(this._handle),this._onUpdate(),null===(e=(t=this.settings).onUpdate)||void 0===e||e.call(t,this),this._timeline.isFinished(this._handle)&&this.end(),!0}_onUpdate(){}}},function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return l})),n.d(t,"b",(function(){return d}));var r=n(0),i=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}(n.n(r).a.version.split("."),2),o=i[0],a=i[1],s=Number(a)>13||Number(o)>13,l=function(e){return s?e:e&&e.getDOMNode()},u={},c=!0;function d(t){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];e.process&&c||n&&u[t]||(console.warn(t),u[t]=!0)}}).call(this,n(68))},function(e,t,n){"use strict";var r=n(232);t.a=function(e){return(e=Object(r.b)(Math.abs(e)))?e[1]:NaN}},function(e,t,n){"use strict";function r(e,t,n){const r=t[0],i=t[1],o=n[3]*r+n[7]*i||1;return e[0]=(n[0]*r+n[4]*i)/o,e[1]=(n[1]*r+n[5]*i)/o,e}function i(e,t,n){const r=t[0],i=t[1],o=t[2],a=n[3]*r+n[7]*i+n[11]*o||1;return e[0]=(n[0]*r+n[4]*i+n[8]*o)/a,e[1]=(n[1]*r+n[5]*i+n[9]*o)/a,e[2]=(n[2]*r+n[6]*i+n[10]*o)/a,e}function o(e,t,n){const r=t[0],i=t[1];return e[0]=n[0]*r+n[2]*i,e[1]=n[1]*r+n[3]*i,e[2]=t[2],e}function a(e,t,n){const r=t[0],i=t[1],o=t[2];return e[0]=n[0]*r+n[3]*i+n[6]*o,e[1]=n[1]*r+n[4]*i+n[7]*o,e[2]=n[2]*r+n[5]*i+n[8]*o,e[3]=t[3],e}n.d(t,"a",(function(){return r})),n.d(t,"c",(function(){return i})),n.d(t,"b",(function(){return o})),n.d(t,"d",(function(){return a}))},function(e,t,n){"use strict";n.d(t,"c",(function(){return re})),n.d(t,"a",(function(){return ie}));var r=n(356),i=n(373),o=n(516);var a=n(265),s=Array.prototype.find;function l(){return this.firstElementChild}var u=Array.prototype.filter;function c(){return this.children}var d=function(e){return new Array(e.length)};function f(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}f.prototype={constructor:f,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};var h=function(e){return function(){return e}};function p(e,t,n,r,i,o){for(var a,s=0,l=t.length,u=o.length;st?1:e>=t?0:NaN}var y=n(357);function v(e){return function(){this.removeAttribute(e)}}function b(e){return function(){this.removeAttributeNS(e.space,e.local)}}function _(e,t){return function(){this.setAttribute(e,t)}}function w(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function x(e,t){return function(){var n=t.apply(this,arguments);null==n?this.removeAttribute(e):this.setAttribute(e,n)}}function M(e,t){return function(){var n=t.apply(this,arguments);null==n?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}var E=n(517);function O(e){return function(){delete this[e]}}function S(e,t){return function(){this[e]=t}}function T(e,t){return function(){var n=t.apply(this,arguments);null==n?delete this[e]:this[e]=n}}function C(e){return e.trim().split(/^|\s+/)}function L(e){return e.classList||new P(e)}function P(e){this._node=e,this._names=C(e.getAttribute("class")||"")}function I(e,t){for(var n=L(e),r=-1,i=t.length;++r=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function F(){this.textContent=""}function N(e){return function(){this.textContent=e}}function B(e){return function(){var t=e.apply(this,arguments);this.textContent=null==t?"":t}}function z(){this.innerHTML=""}function U(e){return function(){this.innerHTML=e}}function H(e){return function(){var t=e.apply(this,arguments);this.innerHTML=null==t?"":t}}function V(){this.nextSibling&&this.parentNode.appendChild(this)}function G(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}var Y=n(266);function W(){return null}function q(){var e=this.parentNode;e&&e.removeChild(this)}function X(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Z(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function K(e){return e.trim().split(/^|\s+/).map((function(e){var t="",n=e.indexOf(".");return n>=0&&(t=e.slice(n+1),e=e.slice(0,n)),{type:e,name:t}}))}function Q(e){return function(){var t=this.__on;if(t){for(var n,r=0,i=-1,o=t.length;r=O&&(O=E+1);!(M=_[O])&&++O=0;)(r=i[o])&&(a&&4^r.compareDocumentPosition(a)&&a.parentNode.insertBefore(r,a),a=r);return this},sort:function(e){function t(t,n){return t&&n?e(t.__data__,n.__data__):!t-!n}e||(e=m);for(var n=this._groups,r=n.length,i=new Array(r),o=0;o1?this.each((null==t?O:"function"==typeof t?T:S)(e,t)):this.node()[e]},classed:function(e,t){var n=C(e+"");if(arguments.length<2){for(var r=L(this.node()),i=-1,o=n.length;++i=0;n--)e.addOffset(t[n]);return e.endVector()}static startCustomMetadataVector(e,t){e.startVector(4,t,4)}static endFooter(e){return e.endObject()}static finishFooterBuffer(e,t){e.finish(t)}static finishSizePrefixedFooterBuffer(e,t){e.finish(t,void 0,!0)}}var u=n(41),c=n(5),d=n(26),f=n(153),h=i.Builder,p=i.ByteBuffer;class A{static decode(e){e=new p(Object(d.toUint8Array)(e));const t=l.getRootAsFooter(e),n=u.b.decode(t.schema());return new g(n,t)}static encode(e){const t=new h,n=u.b.encode(t,e.schema);l.startRecordBatchesVector(t,e.numRecordBatches);for(const n of[...e.recordBatches()].slice().reverse())m.encode(t,n);const r=t.endVector();l.startDictionariesVector(t,e.numDictionaries);for(const n of[...e.dictionaryBatches()].slice().reverse())m.encode(t,n);const i=t.endVector();return l.startFooter(t),l.addSchema(t,n),l.addVersion(t,c.e.V4),l.addRecordBatches(t,r),l.addDictionaries(t,i),l.finishFooterBuffer(t,l.endFooter(t)),t.asUint8Array()}get numRecordBatches(){return this._recordBatches.length}get numDictionaries(){return this._dictionaryBatches.length}constructor(e,t=c.e.V4,n,r){this.schema=e,this.version=t,n&&(this._recordBatches=n),r&&(this._dictionaryBatches=r)}*recordBatches(){for(let e,t=-1,n=this.numRecordBatches;++t=0&&e=0&&e=0&&e=0&&e2*Math.PI)throw Error("expected radians")}},,function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t,n){"use strict";(function(e){var r=n(3);Object.defineProperty(t,"__esModule",{value:!0}),t.generateHashId=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:6;return Math.random().toString(36).substr(e)},t.generateHashIdFromString=function(e){var t,n,r,i=0;if(0===e.length)return i.toString();for(t=0,r=e.length;tt){var n=r._getOptions(r.page);n&&r.setState({options:n})}r.prevY=t})),r.state={options:[]},r.initNumberOfOptions=v.INIT_FILTER_ITEMS_IN_DROPDOWN,r.page=0,r.prevY=0,r.loadingRef=g.default.createRef(),r}return(0,u.default)(n,[{key:"componentDidMount",value:function(){var e=this._getOptions(this.page);this.setState({options:e});this.loadingRef.current&&(this.observer=new IntersectionObserver(this.handleObserver,{root:null,rootMargin:"0%",threshold:1}),this.observer.observe(this.loadingRef.current))}},{key:"getSnapshotBeforeUpdate",value:function(e,t){if(e.options!==this.props.options){var n=this._getOptions(0);this.setState({options:n})}return null}},{key:"componentDidUpdate",value:function(e,t,n){}},{key:"componentWillUnmount",value:function(){var e;this.loadingRef.current&&(null===(e=this.observer)||void 0===e||e.unobserve(this.loadingRef.current))}},{key:"_getOptions",value:function(e){if(!this.props.options)return[];var t=this.props.options.length;if(0===t)return[];var n=e*this.initNumberOfOptions,r=n+this.initNumberOfOptions>t?t:n+this.initNumberOfOptions;return n0&&this.state.options||[]),(0,s.default)(this.props.options.slice(n,r)))):null}},{key:"_onClick",value:function(e,t){var n,r;(t.preventDefault(),"mousedown"===t.type&&0===t.button||"click"===t.type)&&(null===(n=(r=this.props).onOptionSelected)||void 0===n||n.call(r,e,t))}},{key:"render",value:function(){var e,t,n,r,i=this,o=this.props,a=o.fixedOptions,s=o.light,l=o.allowCustomValues,u=void 0===l?0:l,c=o.customListItemComponent,d=void 0===c?x:c,f=this.props.displayOption,h=void 0===f?w:f;if((null===(e=this.props.options)||void 0===e||!e.length)&&u<=0)return g.default.createElement("div",null);var A=Array.isArray(a)?a.length:0;return g.default.createElement(M,{className:(0,m.default)(_.list,null===(t=this.props.customClasses)||void 0===t?void 0:t.results),light:s},this.props.customListHeaderComponent?g.default.createElement("div",{className:(0,m.default)(_.listHeader,null===(n=this.props.customClasses)||void 0===n?void 0:n.listHeader)},g.default.createElement(this.props.customListHeaderComponent,null)):null,A>0?g.default.createElement("div",{className:_.listSection},null==a?void 0:a.map((function(e,t){var n;return g.default.createElement("div",{className:(0,m.default)(_.listItem,(0,p.default)({hover:i.props.selectionIndex===t},_.listItemFixed,!0),null===(n=i.props.customClasses)||void 0===n?void 0:n.listItem),key:"".concat(h(e),"_").concat(t),onMouseDown:function(t){return i._onClick(e,t)},onClick:function(t){return i._onClick(e,t)}},g.default.createElement(d,{value:e,displayOption:h}))}))):null,null===(r=this.state.options)||void 0===r?void 0:r.map((function(e,t){var n;return g.default.createElement("div",{className:(0,m.default)(_.listItem,{hover:i.props.selectionIndex===t+A},null===(n=i.props.customClasses)||void 0===n?void 0:n.listItem),key:"".concat(h(e),"_").concat(t),onMouseDown:function(t){return i._onClick(e,t)},onClick:function(t){return i._onClick(e,t)}},g.default.createElement(d,{value:e,displayOption:h}))})),g.default.createElement(E,{ref:this.loadingRef}))}}]),n}(g.Component);t.default=O,(0,p.default)(O,"defaultProps",{customClasses:{},customListItemComponent:x,customListHeaderComponent:null,allowCustomValues:0,customValues:[],displayOption:w,onOptionSelected:function(){},defaultClassNames:!0,selectionIndex:null})},function(e,t){e.exports=function(e){return null!=e&&"object"==typeof e}},function(e,t,n){"use strict";e.exports=function(e){return-2===e||-1===e||32===e}},function(e,t,n){(function(t){var n=/^\[object .+?Constructor\]$/,r="object"==typeof t&&t&&t.Object===Object&&t,i="object"==typeof self&&self&&self.Object===Object&&self,o=r||i||Function("return this")();var a,s=Array.prototype,l=Function.prototype,u=Object.prototype,c=o["__core-js_shared__"],d=(a=/[^.]+$/.exec(c&&c.keys&&c.keys.IE_PROTO||""))?"Symbol(src)_1."+a:"",f=l.toString,h=u.hasOwnProperty,p=u.toString,A=RegExp("^"+f.call(h).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),g=s.splice,m=E(o,"Map"),y=E(Object,"create");function v(e){var t=-1,n=e?e.length:0;for(this.clear();++t-1},b.prototype.set=function(e,t){var n=this.__data__,r=w(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},_.prototype.clear=function(){this.__data__={hash:new v,map:new(m||b),string:new v}},_.prototype.delete=function(e){return M(this,e).delete(e)},_.prototype.get=function(e){return M(this,e).get(e)},_.prototype.has=function(e){return M(this,e).has(e)},_.prototype.set=function(e,t){return M(this,e).set(e,t),this},O.Cache=_,e.exports=O}).call(this,n(68))},function(e,t,n){"use strict";n.d(t,"a",(function(){return f})),n.d(t,"b",(function(){return h}));var r=n(46),i=n(297),o=n(136);const a=new(n(1844).a)({id:"loaders.gl"});var s=n(140),l=n(346),u=n(48),c=n(314);const d=/\.([^.]+)$/;async function f(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0;if(!A(e))return null;let i=h(e,t,{...n,nothrow:!0},r);if(i)return i;if(Object(u.b)(e)&&(i=h(e=await e.slice(0,10).arrayBuffer(),t,n,r)),!(i||null!=n&&n.nothrow))throw new Error(g(e));return i}function h(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0;if(!A(e))return null;if(t&&!Array.isArray(t))return Object(o.b)(t);let i=[];t&&(i=i.concat(t)),null!=n&&n.ignoreRegisteredLoaders||i.push(...Object(l.b)()),m(i);const a=p(e,i,n,r);if(!(a||null!=n&&n.nothrow))throw new Error(g(e));return a}function p(e,t,n,r){const i=Object(s.c)(e),o=Object(s.b)(e),l=Object(c.b)(i)||(null==r?void 0:r.url);let u=null,f="";var h;(null!=n&&n.mimeType&&(u=y(t,null==n?void 0:n.mimeType),f="match forced by supplied MIME type "+(null==n?void 0:n.mimeType)),u=u||function(e,t){const n=t&&d.exec(t),r=n&&n[1];return r?function(e,t){t=t.toLowerCase();for(const n of e)for(const e of n.extensions)if(e.toLowerCase()===t)return n;return null}(e,r):null}(t,l),f=f||(u?"matched url "+l:""),u=u||y(t,o),f=f||(u?"matched MIME type "+o:""),u=u||function(e,t){if(!t)return null;for(const n of e)if("string"==typeof t){if(v(t,n))return n}else if(ArrayBuffer.isView(t)){if(b(t.buffer,t.byteOffset,n))return n}else if(t instanceof ArrayBuffer){if(b(t,0,n))return n}return null}(t,e),f=f||(u?"matched initial data "+_(e):""),null!=n&&n.fallbackMimeType&&(u=u||y(t,null==n?void 0:n.fallbackMimeType),f=f||(u?"matched fallback MIME type "+o:"")),f)&&a.log(1,`selectLoader selected ${null===(h=u)||void 0===h?void 0:h.name}: ${f}.`);return u}function A(e){return!(e instanceof Response&&204===e.status)}function g(e){const t=Object(s.c)(e),n=Object(s.b)(e);let i="No valid loader found (";i+=t?r.a.filename(t)+", ":"no url provided, ",i+=`MIME type: ${n?`"${n}"`:"not provided"}, `;const o=e?_(e):"";return i+=o?` first bytes: "${o}"`:"first bytes: not available",i+=")",i}function m(e){for(const t of e)Object(o.b)(t)}function y(e,t){for(const n of e){if(n.mimeTypes&&n.mimeTypes.includes(t))return n;if(t==="application/x."+n.id)return n}return null}function v(e,t){if(t.testText)return t.testText(e);return(Array.isArray(t.tests)?t.tests:[t.tests]).some(t=>e.startsWith(t))}function b(e,t,n){return(Array.isArray(n.tests)?n.tests:[n.tests]).some(n=>function(e,t,n,r){if(r instanceof ArrayBuffer)return Object(i.a)(r,e,r.byteLength);switch(typeof r){case"function":return r(e);case"string":const n=w(e,t,r.length);return r===n;default:return!1}}(e,t,0,n))}function _(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:5;if("string"==typeof e)return e.slice(0,t);if(ArrayBuffer.isView(e))return w(e.buffer,e.byteOffset,t);if(e instanceof ArrayBuffer){return w(e,0,t)}return""}function w(e,t,n){if(e.byteLength`${Object(i.a)(e)}: ${Object(i.a)(t)}`).join(", ")}}`}[Symbol.for("nodejs.util.inspect.custom")](){return this.toString()}}class c{constructor(e,t){this.keys=e,this.vals=t,this.keyIndex=0,this.numKeys=e.length}[Symbol.iterator](){return this}next(){const e=this.keyIndex;return e===this.numKeys?{done:!0,value:null}:(this.keyIndex++,{done:!1,value:[this.keys.get(e),o.a.visit(this.vals,e)]})}}class d{isExtensible(){return!1}deleteProperty(){return!1}preventExtensions(){return!0}ownKeys(e){return e[s].toArray().map(String)}has(e,t){return e[s].includes(t)}getOwnPropertyDescriptor(e,t){if(-1!==e[s].indexOf(t))return{writable:!0,enumerable:!0,configurable:!0}}get(e,t){if(Reflect.has(e,t))return e[t];const n=e[s].indexOf(t);if(-1!==n){const r=o.a.visit(Reflect.get(e,l),n);return Reflect.set(e,t,r),r}}set(e,t,n){const r=e[s].indexOf(t);return-1!==r?(a.a.visit(Reflect.get(e,l),r,n),Reflect.set(e,t,n)):!!Reflect.has(e,t)&&Reflect.set(e,t,n)}}Object.defineProperties(u.prototype,{[Symbol.toStringTag]:{enumerable:!1,configurable:!1,value:"Row"},[s]:{writable:!0,enumerable:!1,configurable:!1,value:null},[l]:{writable:!0,enumerable:!1,configurable:!1,value:null}})},function(e,t,n){var r,i,o; +/** + * @license long.js (c) 2013 Daniel Wirtz + * Released under the Apache License, Version 2.0 + * see: https://github.com/dcodeIO/long.js for details + */i=[],void 0===(o="function"==typeof(r=function(){"use strict";function e(e,t,n){this.low=0|e,this.high=0|t,this.unsigned=!!n}function t(e){return!0===(e&&e.__isLong__)}e.prototype.__isLong__,Object.defineProperty(e.prototype,"__isLong__",{value:!0,enumerable:!1,configurable:!1}),e.isLong=t;var n={},r={};function i(e,t){var i,o,s;return t?(s=0<=(e>>>=0)&&e<256)&&(o=r[e])?o:(i=a(e,(0|e)<0?-1:0,!0),s&&(r[e]=i),i):(s=-128<=(e|=0)&&e<128)&&(o=n[e])?o:(i=a(e,e<0?-1:0,!1),s&&(n[e]=i),i)}function o(e,t){if(isNaN(e)||!isFinite(e))return t?A:p;if(t){if(e<0)return A;if(e>=d)return b}else{if(e<=-f)return _;if(e+1>=f)return v}return e<0?o(-e,t).neg():a(e%c|0,e/c|0,t)}function a(t,n,r){return new e(t,n,r)}e.fromInt=i,e.fromNumber=o,e.fromBits=a;var s=Math.pow;function l(e,t,n){if(0===e.length)throw Error("empty string");if("NaN"===e||"Infinity"===e||"+Infinity"===e||"-Infinity"===e)return p;if("number"==typeof t?(n=t,t=!1):t=!!t,(n=n||10)<2||360)throw Error("interior hyphen");if(0===r)return l(e.substring(1),t,n).neg();for(var i=o(s(n,8)),a=p,u=0;u>>0:this.low},w.toNumber=function(){return this.unsigned?(this.high>>>0)*c+(this.low>>>0):this.high*c+(this.low>>>0)},w.toString=function(e){if((e=e||10)<2||36>>0).toString(e);if((a=u).isZero())return c+l;for(;c.length<6;)c="0"+c;l=""+c+l}},w.getHighBits=function(){return this.high},w.getHighBitsUnsigned=function(){return this.high>>>0},w.getLowBits=function(){return this.low},w.getLowBitsUnsigned=function(){return this.low>>>0},w.getNumBitsAbs=function(){if(this.isNegative())return this.eq(_)?64:this.neg().getNumBitsAbs();for(var e=0!=this.high?this.high:this.low,t=31;t>0&&0==(e&1<=0},w.isOdd=function(){return 1==(1&this.low)},w.isEven=function(){return 0==(1&this.low)},w.equals=function(e){return t(e)||(e=u(e)),(this.unsigned===e.unsigned||this.high>>>31!=1||e.high>>>31!=1)&&this.high===e.high&&this.low===e.low},w.eq=w.equals,w.notEquals=function(e){return!this.eq(e)},w.neq=w.notEquals,w.lessThan=function(e){return this.comp(e)<0},w.lt=w.lessThan,w.lessThanOrEqual=function(e){return this.comp(e)<=0},w.lte=w.lessThanOrEqual,w.greaterThan=function(e){return this.comp(e)>0},w.gt=w.greaterThan,w.greaterThanOrEqual=function(e){return this.comp(e)>=0},w.gte=w.greaterThanOrEqual,w.compare=function(e){if(t(e)||(e=u(e)),this.eq(e))return 0;var n=this.isNegative(),r=e.isNegative();return n&&!r?-1:!n&&r?1:this.unsigned?e.high>>>0>this.high>>>0||e.high===this.high&&e.low>>>0>this.low>>>0?-1:1:this.sub(e).isNegative()?-1:1},w.comp=w.compare,w.negate=function(){return!this.unsigned&&this.eq(_)?_:this.not().add(g)},w.neg=w.negate,w.add=function(e){t(e)||(e=u(e));var n=this.high>>>16,r=65535&this.high,i=this.low>>>16,o=65535&this.low,s=e.high>>>16,l=65535&e.high,c=e.low>>>16,d=0,f=0,h=0,p=0;return h+=(p+=o+(65535&e.low))>>>16,f+=(h+=i+c)>>>16,d+=(f+=r+l)>>>16,d+=n+s,a((h&=65535)<<16|(p&=65535),(d&=65535)<<16|(f&=65535),this.unsigned)},w.subtract=function(e){return t(e)||(e=u(e)),this.add(e.neg())},w.sub=w.subtract,w.multiply=function(e){if(this.isZero())return p;if(t(e)||(e=u(e)),e.isZero())return p;if(this.eq(_))return e.isOdd()?_:p;if(e.eq(_))return this.isOdd()?_:p;if(this.isNegative())return e.isNegative()?this.neg().mul(e.neg()):this.neg().mul(e).neg();if(e.isNegative())return this.mul(e.neg()).neg();if(this.lt(h)&&e.lt(h))return o(this.toNumber()*e.toNumber(),this.unsigned);var n=this.high>>>16,r=65535&this.high,i=this.low>>>16,s=65535&this.low,l=e.high>>>16,c=65535&e.high,d=e.low>>>16,f=65535&e.low,A=0,g=0,m=0,y=0;return m+=(y+=s*f)>>>16,g+=(m+=i*f)>>>16,m&=65535,g+=(m+=s*d)>>>16,A+=(g+=r*f)>>>16,g&=65535,A+=(g+=i*d)>>>16,g&=65535,A+=(g+=s*c)>>>16,A+=n*f+r*d+i*c+s*l,a((m&=65535)<<16|(y&=65535),(A&=65535)<<16|(g&=65535),this.unsigned)},w.mul=w.multiply,w.divide=function(e){if(t(e)||(e=u(e)),e.isZero())throw Error("division by zero");if(this.isZero())return this.unsigned?A:p;var n,r,i;if(this.unsigned){if(e.unsigned||(e=e.toUnsigned()),e.gt(this))return A;if(e.gt(this.shru(1)))return m;i=A}else{if(this.eq(_))return e.eq(g)||e.eq(y)?_:e.eq(_)?g:(n=this.shr(1).div(e).shl(1)).eq(p)?e.isNegative()?g:y:(r=this.sub(e.mul(n)),i=n.add(r.div(e)));if(e.eq(_))return this.unsigned?A:p;if(this.isNegative())return e.isNegative()?this.neg().div(e.neg()):this.neg().div(e).neg();if(e.isNegative())return this.div(e.neg()).neg();i=p}for(r=this;r.gte(e);){n=Math.max(1,Math.floor(r.toNumber()/e.toNumber()));for(var a=Math.ceil(Math.log(n)/Math.LN2),l=a<=48?1:s(2,a-48),c=o(n),d=c.mul(e);d.isNegative()||d.gt(r);)d=(c=o(n-=l,this.unsigned)).mul(e);c.isZero()&&(c=g),i=i.add(c),r=r.sub(d)}return i},w.div=w.divide,w.modulo=function(e){return t(e)||(e=u(e)),this.sub(this.div(e).mul(e))},w.mod=w.modulo,w.not=function(){return a(~this.low,~this.high,this.unsigned)},w.and=function(e){return t(e)||(e=u(e)),a(this.low&e.low,this.high&e.high,this.unsigned)},w.or=function(e){return t(e)||(e=u(e)),a(this.low|e.low,this.high|e.high,this.unsigned)},w.xor=function(e){return t(e)||(e=u(e)),a(this.low^e.low,this.high^e.high,this.unsigned)},w.shiftLeft=function(e){return t(e)&&(e=e.toInt()),0==(e&=63)?this:e<32?a(this.low<>>32-e,this.unsigned):a(0,this.low<>>e|this.high<<32-e,this.high>>e,this.unsigned):a(this.high>>e-32,this.high>=0?0:-1,this.unsigned)},w.shr=w.shiftRight,w.shiftRightUnsigned=function(e){if(t(e)&&(e=e.toInt()),0==(e&=63))return this;var n=this.high;return e<32?a(this.low>>>e|n<<32-e,n>>>e,this.unsigned):a(32===e?n:n>>>e-32,0,this.unsigned)},w.shru=w.shiftRightUnsigned,w.toSigned=function(){return this.unsigned?a(this.low,this.high,!1):this},w.toUnsigned=function(){return this.unsigned?this:a(this.low,this.high,!0)},w.toBytes=function(e){return e?this.toBytesLE():this.toBytesBE()},w.toBytesLE=function(){var e=this.high,t=this.low;return[255&t,t>>>8&255,t>>>16&255,t>>>24&255,255&e,e>>>8&255,e>>>16&255,e>>>24&255]},w.toBytesBE=function(){var e=this.high,t=this.low;return[e>>>24&255,e>>>16&255,e>>>8&255,255&e,t>>>24&255,t>>>16&255,t>>>8&255,255&t]},e})?r.apply(t,i):r)||(e.exports=o)},function(e,t,n){"use strict";n.r(t),n.d(t,"clampIndex",(function(){return s})),n.d(t,"clampRange",(function(){return u})),n.d(t,"createElementComparator",(function(){return d}));var r=n(59),i=n(228),o=n(347),a=n(26);function s(e,t,n){const r=e.length,i=t>-1?t:r+t%r;return n?n(e,i):i}let l;function u(e,t,n,r){const{length:i=0}=e;let o="number"!=typeof t?0:t,a="number"!=typeof n?i:n;return o<0&&(o=(o%i+i)%i),a<0&&(a=(a%i+i)%i),ai&&(a=i),r?r(e,o,a):[o,a]}const c=e=>e!=e;function d(e){if("object"!==typeof e||null===e)return c(e)?c:t=>t===e;if(e instanceof Date){const t=e.valueOf();return e=>e instanceof Date&&e.valueOf()===t}return ArrayBuffer.isView(e)?t=>!!t&&Object(a.compareArrayLike)(e,t):e instanceof Map?function(e){let t=-1;const n=[];for(const r of e.values())n[++t]=d(r);return f(n)}(e):Array.isArray(e)?function(e){const t=[];for(let n=-1,r=e.length;++n!1;const r=[];for(let t=-1,i=n.length;++t{if(!n||"object"!=typeof n)return!1;switch(n.constructor){case Array:return function(e,t){const n=e.length;if(t.length!==n)return!1;for(let r=-1;++r>10,n=(1023&e)/1024,r=Math.pow(-1,(32768&e)>>15);switch(t){case 31:return r*(n?Number.NaN:1/0);case 0:return r*(n?6103515625e-14*n:0)}return r*Math.pow(2,t-15)*(1+n)}function a(e){if(e!=e)return 32256;r[0]=e;const t=(2147483648&i[1])>>16&65535;let n=2146435072&i[1],o=0;return n>=1089470464?i[0]>0?n=31744:(n=(2080374784&n)>>16,o=(1048575&i[1])>>10):n<=1056964608?(o=1048576+(1048575&i[1]),o=1048576+(o<<(n>>20)-998)>>21,n=0):(n=n-1056964608>>10,o=512+(1048575&i[1])>>10),t|n|65535&o}},function(e,t,n){"use strict";function r(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}n.d(t,"b",(function(){return r})),t.a=function(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}},function(e,t,n){"use strict";n.d(t,"c",(function(){return o})),n.d(t,"a",(function(){return a})),n.d(t,"b",(function(){return s}));var r=n(28);const i={5126:[5126,1,"float"],35664:[5126,2,"vec2"],35665:[5126,3,"vec3"],35666:[5126,4,"vec4"],5124:[5124,1,"int"],35667:[5124,2,"ivec2"],35668:[5124,3,"ivec3"],35669:[5124,4,"ivec4"],5125:[5125,1,"uint"],36294:[5125,2,"uvec2"],36295:[5125,3,"uvec3"],36296:[5125,4,"uvec4"],35670:[5126,1,"bool"],35671:[5126,2,"bvec2"],35672:[5126,3,"bvec3"],35673:[5126,4,"bvec4"],35674:[5126,8,"mat2"],35685:[5126,8,"mat2x3"],35686:[5126,8,"mat2x4"],35675:[5126,12,"mat3"],35687:[5126,12,"mat3x2"],35688:[5126,12,"mat3x4"],35676:[5126,16,"mat4"],35689:[5126,16,"mat4x2"],35690:[5126,16,"mat4x3"]};function o(e){switch(e){case 0:return 0;case 1:case 3:case 2:return 1;case 4:case 5:case 6:return 4;default:return Object(r.a)(!1),0}}function a(e){const t=i[e];if(!t)return null;const[n,r]=t;return{type:n,components:r}}function s(e,t){switch(e){case 5120:case 5121:case 5122:case 5123:e=5126}for(const n in i){const[r,o,a]=i[n];if(r===e&&o===t)return{glType:n,name:a}}return null}},function(e,t,n){"use strict";var r=n(18),i=n(35);t.a=function(e,t,n,o){void 0===o&&(o={});var a=t<0,s=Object(r.convertLength)(Math.abs(t),o.units,"meters");a&&(s=-Math.abs(s));var l=Object(i.getCoord)(e),u=function(e,t,n,i){i=void 0===i?r.earthRadius:Number(i);var o=t/i,a=e[0]*Math.PI/180,s=Object(r.degreesToRadians)(e[1]),l=Object(r.degreesToRadians)(n),u=o*Math.cos(l),c=s+u;Math.abs(c)>Math.PI/2&&(c=c>0?Math.PI-c:-Math.PI-c);var d=Math.log(Math.tan(c/2+Math.PI/4)/Math.tan(s/2+Math.PI/4)),f=Math.abs(d)>1e-11?u/d:Math.cos(s),h=o*Math.sin(l)/f;return[(180*(a+h)/Math.PI+540)%360-180,180*c/Math.PI]}(l,s,n);return u[0]+=u[0]-l[0]>180?-360:l[0]-u[0]>180?360:0,Object(r.point)(u,o.properties)}},function(e,t,n){"use strict";n.d(t,"b",(function(){return r})),n.d(t,"a",(function(){return i}));n(118);function r(e,t={}){const{start:n=0,end:r=e.length}=t,i=t.size||2;let o=0;for(let t=n,a=r-i;t80*n){m=p=e[0],y=A=e[1];for(let t=n;tp&&(p=v),b>A&&(A=b);d=Math.max(p-m,A-y),d=0!==d?1/d:0}return s(u,c,n,m,y,d),c}function o(e,t,n,i,o,a){let s,l;if(void 0===a&&(a=r(e,{start:t,end:n,size:i})),o===a<0)for(s=t;s=t;s-=i)l=O(s,e[s],e[s+1],l);return l&&b(l,l.next)&&(S(l),l=l.next),l}function a(e,t){if(!e)return e;t||(t=e);let n,r=e;do{if(n=!1,r.steiner||!b(r,r.next)&&0!==v(r.prev,r,r.next))r=r.next;else{if(S(r),r=t=r.prev,r===r.next)break;n=!0}}while(n||r!==t);return t}function s(e,t,n,r,i,o,f){if(!e)return;!f&&o&&function(e,t,n,r){let i=e;do{null===i.z&&(i.z=A(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,function(e){let t,n,r,i,o,a,s,l,u=1;do{for(i=e,e=null,l=null,r=0;i;){for(r++,a=i,o=0,n=0;n0||s>0&&a;)0!==o&&(0===s||!a||i.z<=a.z)?(t=i,i=i.nextZ,o--):(t=a,a=a.nextZ,s--),l?l.nextZ=t:e=t,t.prevZ=l,l=t;i=a}l.nextZ=null,u*=2}while(r>1)}(i)}(e,r,i,o);let h,p,g=e;for(;e.prev!==e.next;)if(h=e.prev,p=e.next,o?u(e,r,i,o):l(e))t.push(h.i/n),t.push(e.i/n),t.push(p.i/n),S(e),e=p.next,g=p.next;else if((e=p)===g){f?1===f?s(e=c(a(e),t,n),t,n,r,i,o,2):2===f&&d(e,t,n,r,i,o):s(a(e),t,n,r,i,o,1);break}}function l(e){const t=e.prev,n=e,r=e.next;if(v(t,n,r)>=0)return!1;let i=e.next.next;for(;i!==e.prev;){if(m(t.x,t.y,n.x,n.y,r.x,r.y,i.x,i.y)&&v(i.prev,i,i.next)>=0)return!1;i=i.next}return!0}function u(e,t,n,r){const i=e.prev,o=e,a=e.next;if(v(i,o,a)>=0)return!1;const s=i.xo.x?i.x>a.x?i.x:a.x:o.x>a.x?o.x:a.x,c=i.y>o.y?i.y>a.y?i.y:a.y:o.y>a.y?o.y:a.y,d=A(s,l,t,n,r),f=A(u,c,t,n,r);let h=e.prevZ,p=e.nextZ;for(;h&&h.z>=d&&p&&p.z<=f;){if(h!==e.prev&&h!==e.next&&m(i.x,i.y,o.x,o.y,a.x,a.y,h.x,h.y)&&v(h.prev,h,h.next)>=0)return!1;if(h=h.prevZ,p!==e.prev&&p!==e.next&&m(i.x,i.y,o.x,o.y,a.x,a.y,p.x,p.y)&&v(p.prev,p,p.next)>=0)return!1;p=p.nextZ}for(;h&&h.z>=d;){if(h!==e.prev&&h!==e.next&&m(i.x,i.y,o.x,o.y,a.x,a.y,h.x,h.y)&&v(h.prev,h,h.next)>=0)return!1;h=h.prevZ}for(;p&&p.z<=f;){if(p!==e.prev&&p!==e.next&&m(i.x,i.y,o.x,o.y,a.x,a.y,p.x,p.y)&&v(p.prev,p,p.next)>=0)return!1;p=p.nextZ}return!0}function c(e,t,n){let r=e;do{const i=r.prev,o=r.next.next;!b(i,o)&&_(i,r,r.next,o)&&M(i,o)&&M(o,i)&&(t.push(i.i/n),t.push(r.i/n),t.push(o.i/n),S(r),S(r.next),r=e=o),r=r.next}while(r!==e);return a(r)}function d(e,t,n,r,i,o){let l=e;do{let e=l.next.next;for(;e!==l.prev;){if(l.i!==e.i&&y(l,e)){let u=E(l,e);return l=a(l,l.next),u=a(u,u.next),s(l,t,n,r,i,o),void s(u,t,n,r,i,o)}e=e.next}l=l.next}while(l!==e)}function f(e,t){return e.x-t.x}function h(e,t){if(t=function(e,t){let n=t;const r=e.x,i=e.y;let o,a=-1/0;do{if(i<=n.y&&i>=n.next.y&&n.next.y!==n.y){const e=n.x+(i-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(e<=r&&e>a){if(a=e,e===r){if(i===n.y)return n;if(i===n.next.y)return n.next}o=n.x=n.x&&n.x>=l&&r!==n.x&&m(io.x||n.x===o.x&&p(o,n)))&&(o=n,d=c)),n=n.next}while(n!==s);return o}(e,t)){const n=E(t,e);a(t,t.next),a(n,n.next)}}function p(e,t){return v(e.prev,e,t.prev)<0&&v(t.next,e,e.next)<0}function A(e,t,n,r,i){return(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-n)*i)|e<<8))|e<<4))|e<<2))|e<<1))|(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-r)*i)|t<<8))|t<<4))|t<<2))|t<<1))<<1}function g(e){let t=e,n=e;do{(t.x=0&&(e-a)*(r-s)-(n-a)*(t-s)>=0&&(n-a)*(o-s)-(i-a)*(r-s)>=0}function y(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!function(e,t){let n=e;do{if(n.i!==e.i&&n.next.i!==e.i&&n.i!==t.i&&n.next.i!==t.i&&_(n,n.next,e,t))return!0;n=n.next}while(n!==e);return!1}(e,t)&&(M(e,t)&&M(t,e)&&function(e,t){let n=e,r=!1;const i=(e.x+t.x)/2,o=(e.y+t.y)/2;do{n.y>o!=n.next.y>o&&n.next.y!==n.y&&i<(n.next.x-n.x)*(o-n.y)/(n.next.y-n.y)+n.x&&(r=!r),n=n.next}while(n!==e);return r}(e,t)&&(v(e.prev,e,t.prev)||v(e,t.prev,t))||b(e,t)&&v(e.prev,e,e.next)>0&&v(t.prev,t,t.next)>0)}function v(e,t,n){return(t.y-e.y)*(n.x-t.x)-(t.x-e.x)*(n.y-t.y)}function b(e,t){return e.x===t.x&&e.y===t.y}function _(e,t,n,r){const i=x(v(e,t,n)),o=x(v(e,t,r)),a=x(v(n,r,e)),s=x(v(n,r,t));return i!==o&&a!==s||(!(0!==i||!w(e,n,t))||(!(0!==o||!w(e,r,t))||(!(0!==a||!w(n,e,r))||!(0!==s||!w(n,t,r)))))}function w(e,t,n){return t.x<=Math.max(e.x,n.x)&&t.x>=Math.min(e.x,n.x)&&t.y<=Math.max(e.y,n.y)&&t.y>=Math.min(e.y,n.y)}function x(e){return e>0?1:e<0?-1:0}function M(e,t){return v(e.prev,e,e.next)<0?v(e,t,e.next)>=0&&v(e,e.prev,t)>=0:v(e,t,e.prev)<0||v(e,e.next,t)<0}function E(e,t){const n=new T(e.i,e.x,e.y),r=new T(t.i,t.x,t.y),i=e.next,o=t.prev;return e.next=t,t.prev=e,n.next=i,i.prev=n,r.next=n,n.prev=r,o.next=r,r.prev=o,r}function O(e,t,n,r){const i=new T(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 S(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 T(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}},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));function r(e){if(null===e)return"null";if(void 0===e)return"undefined";switch(typeof e){case"number":case"bigint":return""+e;case"string":return`"${e}"`}return"function"==typeof e[Symbol.toPrimitive]?e[Symbol.toPrimitive]("string"):ArrayBuffer.isView(e)?e instanceof BigInt64Array||e instanceof BigUint64Array?`[${[...e].map(e=>r(e))}]`:`[${e}]`:ArrayBuffer.isView(e)?`[${e}]`:JSON.stringify(e,(e,t)=>"bigint"==typeof t?""+t:t)}},function(e,t,n){"use strict";var r;n.d(t,"a",(function(){return r})),function(e){e[e.SECOND=0]="SECOND",e[e.MILLISECOND=1]="MILLISECOND",e[e.MICROSECOND=2]="MICROSECOND",e[e.NANOSECOND=3]="NANOSECOND"}(r||(r={}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(31);class i{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsFixedSizeBinary(e,t){return(t||new i).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsFixedSizeBinary(e,t){return e.setPosition(e.position()+r.SIZE_PREFIX_LENGTH),(t||new i).__init(e.readInt32(e.position())+e.position(),e)}byteWidth(){const e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt32(this.bb_pos+e):0}static startFixedSizeBinary(e){e.startObject(1)}static addByteWidth(e,t){e.addFieldInt32(0,t,0)}static endFixedSizeBinary(e){return e.endObject()}static createFixedSizeBinary(e,t){return i.startFixedSizeBinary(e),i.addByteWidth(e,t),i.endFixedSizeBinary(e)}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(31);class i{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsFixedSizeList(e,t){return(t||new i).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsFixedSizeList(e,t){return e.setPosition(e.position()+r.SIZE_PREFIX_LENGTH),(t||new i).__init(e.readInt32(e.position())+e.position(),e)}listSize(){const e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt32(this.bb_pos+e):0}static startFixedSizeList(e){e.startObject(1)}static addListSize(e,t){e.addFieldInt32(0,t,0)}static endFixedSizeList(e){return e.endObject()}static createFixedSizeList(e,t){return i.startFixedSizeList(e),i.addListSize(e,t),i.endFixedSizeList(e)}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(31);class i{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsMap(e,t){return(t||new i).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsMap(e,t){return e.setPosition(e.position()+r.SIZE_PREFIX_LENGTH),(t||new i).__init(e.readInt32(e.position())+e.position(),e)}keysSorted(){const e=this.bb.__offset(this.bb_pos,4);return!!e&&!!this.bb.readInt8(this.bb_pos+e)}static startMap(e){e.startObject(1)}static addKeysSorted(e,t){e.addFieldInt8(0,+t,0)}static endMap(e){return e.endObject()}static createMap(e,t){return i.startMap(e),i.addKeysSorted(e,t),i.endMap(e)}}},function(e,t,n){"use strict";function r(e){return e[0]}function i(e){return e[1]}n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return i}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r,i=n(31);!function(e){e[e.HALF=0]="HALF",e[e.SINGLE=1]="SINGLE",e[e.DOUBLE=2]="DOUBLE"}(r||(r={}));class o{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsFloatingPoint(e,t){return(t||new o).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsFloatingPoint(e,t){return e.setPosition(e.position()+i.SIZE_PREFIX_LENGTH),(t||new o).__init(e.readInt32(e.position())+e.position(),e)}precision(){const e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt16(this.bb_pos+e):r.HALF}static startFloatingPoint(e){e.startObject(1)}static addPrecision(e,t){e.addFieldInt16(0,t,r.HALF)}static endFloatingPoint(e){return e.endObject()}static createFloatingPoint(e,t){return o.startFloatingPoint(e),o.addPrecision(e,t),o.endFloatingPoint(e)}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r,i=n(31);!function(e){e[e.DAY=0]="DAY",e[e.MILLISECOND=1]="MILLISECOND"}(r||(r={}));class o{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsDate(e,t){return(t||new o).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsDate(e,t){return e.setPosition(e.position()+i.SIZE_PREFIX_LENGTH),(t||new o).__init(e.readInt32(e.position())+e.position(),e)}unit(){const e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt16(this.bb_pos+e):r.MILLISECOND}static startDate(e){e.startObject(1)}static addUnit(e,t){e.addFieldInt16(0,t,r.MILLISECOND)}static endDate(e){return e.endObject()}static createDate(e,t){return o.startDate(e),o.addUnit(e,t),o.endDate(e)}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r,i=n(31);!function(e){e[e.YEAR_MONTH=0]="YEAR_MONTH",e[e.DAY_TIME=1]="DAY_TIME",e[e.MONTH_DAY_NANO=2]="MONTH_DAY_NANO"}(r||(r={}));class o{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsInterval(e,t){return(t||new o).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsInterval(e,t){return e.setPosition(e.position()+i.SIZE_PREFIX_LENGTH),(t||new o).__init(e.readInt32(e.position())+e.position(),e)}unit(){const e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt16(this.bb_pos+e):r.YEAR_MONTH}static startInterval(e){e.startObject(1)}static addUnit(e,t){e.addFieldInt16(0,t,r.YEAR_MONTH)}static endInterval(e){return e.endObject()}static createInterval(e,t){return o.startInterval(e),o.addUnit(e,t),o.endInterval(e)}}},function(e,t,n){"use strict";n.d(t,"b",(function(){return i})),n.d(t,"a",(function(){return o})),n.d(t,"c",(function(){return a})),n.d(t,"d",(function(){return s})),n.d(t,"e",(function(){return l}));var r=n(17);const i={6407:{dataFormat:6407,types:[5121,33635]},6408:{dataFormat:6408,types:[5121,32819,32820]},6406:{dataFormat:6406,types:[5121]},6409:{dataFormat:6409,types:[5121]},6410:{dataFormat:6410,types:[5121]},33326:{dataFormat:6403,types:[5126],gl2:!0},33328:{dataFormat:33319,types:[5126],gl2:!0},34837:{dataFormat:6407,types:[5126],gl2:!0},34836:{dataFormat:6408,types:[5126],gl2:!0}},o={6403:1,36244:1,33319:2,33320:2,6407:3,36248:3,6408:4,36249:4,6402:1,34041:1,6406:1,6409:1,6410:2},a={5126:4,5125:4,5124:4,5123:2,5122:2,5131:2,5120:1,5121:1};function s(e,t){const n=i[t];if(!n)return!1;if(void 0===n.gl1&&void 0===n.gl2)return!0;const o=Object(r.j)(e)&&n.gl2||n.gl1;return"string"==typeof o?e.getExtension(o):o}function l(e,t){const n=i[t];switch(n&&n.types[0]){case 5126:return e.getExtension("OES_texture_float_linear");case 5131:return e.getExtension("OES_texture_half_float_linear");default:return!0}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return f}));var r=n(541),i=n(105),o=n(431);class a extends r.a{get x(){return this[0]}set x(e){this[0]=Object(i.a)(e)}get y(){return this[1]}set y(e){this[1]=Object(i.a)(e)}len(){return Math.sqrt(this.lengthSquared())}magnitude(){return this.len()}lengthSquared(){let e=0;for(let t=0;t=0&&e=0&&e0&&void 0!==arguments[0])||arguments[0],n=function(n){var r=n.value,i=n.displayOption,o=void 0===i?x:i;return A.default.createElement(O,{className:"field-selector_list-item"},t?A.default.createElement(E,null,A.default.createElement(e,{type:r.type})):null,A.default.createElement("span",{className:b.classList.listItemAnchor},o(r)))};return n}}S.deps=[_.default];var T=function(){return A.default.createElement("div",null,"Suggested Field")};function C(e){var t=function(t){(0,c.default)(r,t);var n=w(r);function r(){var t;(0,s.default)(this,r);for(var i=arguments.length,o=new Array(i),a=0;aa?0:a+t:t>a?a:t,n=n>0?n:0,i.length<1e4)(o=Array.from(i)).unshift(t,n),r.apply(e,o);else for(n&&r.apply(e,[t,n]);s{if(!e||!("viewport"in e))return{};const{brushingEnabled:t=!0,brushingRadius:n=1e4,brushingTarget:r="source",mousePosition:i,viewport:o}=e;return{brushing_enabled:Boolean(t&&i&&o.containsPixel(i)),brushing_radius:n,brushing_target:a[r]||0,brushing_mousePos:i?o.unproject([i.x-o.x,i.y-o.y]):[0,0]}}};class l extends i.a{getShaders(){return{modules:[s]}}initializeState(e,t){const n=this.getAttributeManager();n&&n.add({brushingTargets:{size:2,accessor:"getBrushingTarget",shaderAttributes:{brushingTargets:{divisor:0},instanceBrushingTargets:{divisor:1}}}}),this.state.onMouseMove=()=>{var e;null===(e=this.getCurrentLayer())||void 0===e||e.setNeedsRedraw()},e.deck&&e.deck.eventManager.on({pointermove:this.state.onMouseMove,pointerleave:this.state.onMouseMove})}finalizeState(e,t){e.deck&&e.deck.eventManager.off({pointermove:this.state.onMouseMove,pointerleave:this.state.onMouseMove})}}Object(r.a)(l,"defaultProps",{getBrushingTarget:{type:"accessor",value:[0,0]},brushingTarget:"source",brushingEnabled:!0,brushingRadius:1e4}),Object(r.a)(l,"extensionName","BrushingExtension");const u="\nuniform DATAFILTER_TYPE filter_min;\nuniform DATAFILTER_TYPE filter_softMin;\nuniform DATAFILTER_TYPE filter_softMax;\nuniform DATAFILTER_TYPE filter_max;\nuniform bool filter_useSoftMargin;\nuniform bool filter_enabled;\nuniform bool filter_transformSize;\n\n#ifdef NON_INSTANCED_MODEL\n #define DATAFILTER_ATTRIB filterValues\n #define DATAFILTER_ATTRIB_64LOW filterValues64Low\n#else\n #define DATAFILTER_ATTRIB instanceFilterValues\n #define DATAFILTER_ATTRIB_64LOW instanceFilterValues64Low\n#endif\n\nattribute DATAFILTER_TYPE DATAFILTER_ATTRIB;\n#ifdef DATAFILTER_DOUBLE\n attribute DATAFILTER_TYPE DATAFILTER_ATTRIB_64LOW;\n\n uniform DATAFILTER_TYPE filter_min64High;\n uniform DATAFILTER_TYPE filter_max64High;\n#endif\n\nvarying float dataFilter_value;\n\nfloat dataFilter_reduceValue(float value) {\n return value;\n}\nfloat dataFilter_reduceValue(vec2 value) {\n return min(value.x, value.y);\n}\nfloat dataFilter_reduceValue(vec3 value) {\n return min(min(value.x, value.y), value.z);\n}\nfloat dataFilter_reduceValue(vec4 value) {\n return min(min(value.x, value.y), min(value.z, value.w));\n}\nvoid dataFilter_setValue(DATAFILTER_TYPE valueFromMin, DATAFILTER_TYPE valueFromMax) {\n if (filter_enabled) {\n if (filter_useSoftMargin) {\n dataFilter_value = dataFilter_reduceValue(\n smoothstep(filter_min, filter_softMin, valueFromMin) *\n (1.0 - smoothstep(filter_softMax, filter_max, valueFromMax))\n );\n } else {\n dataFilter_value = dataFilter_reduceValue(\n step(filter_min, valueFromMin) * step(valueFromMax, filter_max)\n );\n }\n } else {\n dataFilter_value = 1.0;\n }\n}\n",c="\nuniform bool filter_transformColor;\nvarying float dataFilter_value;\n";function d(e){if(!e||!("extensions"in e))return{};const{filterRange:t=[-1,1],filterEnabled:n=!0,filterTransformSize:r=!0,filterTransformColor:i=!0}=e,o=e.filterSoftRange||t;return{...Number.isFinite(t[0])?{filter_min:t[0],filter_softMin:o[0],filter_softMax:o[1],filter_max:t[1]}:{filter_min:t.map(e=>e[0]),filter_softMin:o.map(e=>e[0]),filter_softMax:o.map(e=>e[1]),filter_max:t.map(e=>e[1])},filter_enabled:n,filter_useSoftMargin:Boolean(e.filterSoftRange),filter_transformSize:n&&r,filter_transformColor:n&&i}}const f={"vs:#main-start":"\n #ifdef DATAFILTER_DOUBLE\n dataFilter_setValue(\n DATAFILTER_ATTRIB - filter_min64High + DATAFILTER_ATTRIB_64LOW,\n DATAFILTER_ATTRIB - filter_max64High + DATAFILTER_ATTRIB_64LOW\n );\n #else\n dataFilter_setValue(DATAFILTER_ATTRIB, DATAFILTER_ATTRIB);\n #endif\n ","vs:#main-end":"\n if (dataFilter_value == 0.0) {\n gl_Position = vec4(0.);\n }\n ","vs:DECKGL_FILTER_SIZE":"\n if (filter_transformSize) {\n size = size * dataFilter_value;\n }\n ","fs:DECKGL_FILTER_COLOR":"\n if (dataFilter_value == 0.0) discard;\n if (filter_transformColor) {\n color.a *= dataFilter_value;\n }\n "},h={name:"data-filter",vs:u,fs:c,inject:f,getUniforms:d},p={name:"data-filter-fp64",vs:u,fs:c,inject:f,getUniforms:function(e){if(!e||!("extensions"in e))return{};const t=d(e);if(Number.isFinite(t.filter_min)){const e=Math.fround(t.filter_min);t.filter_min-=e,t.filter_softMin-=e,t.filter_min64High=e;const n=Math.fround(t.filter_max);t.filter_max-=n,t.filter_softMax-=n,t.filter_max64High=n}else{const e=t.filter_min.map(Math.fround);t.filter_min=t.filter_min.map((t,n)=>t-e[n]),t.filter_softMin=t.filter_softMin.map((t,n)=>t-e[n]),t.filter_min64High=e;const n=t.filter_max.map(Math.fround);t.filter_max=t.filter_max.map((e,t)=>e-n[t]),t.filter_softMax=t.filter_softMax.map((e,t)=>e-n[t]),t.filter_max64High=n}return t}};var A=n(202),g=n(318),m=n(17),y=n(551);const v={blend:!0,blendFunc:[1,1,1,1],blendEquation:[32774,32774],depthTest:!1};var b=n(555),_=n(677);const w={1:"float",2:"vec2",3:"vec3",4:"vec4"};class x extends i.a{constructor({filterSize:e=1,fp64:t=!1,countItems:n=!1}={}){if(!w[e])throw new Error("filterSize out of range");super({filterSize:e,fp64:t,countItems:n})}getShaders(e){const{filterSize:t,fp64:n}=e.opts;return{modules:[n?p:h],defines:{DATAFILTER_TYPE:w[t],DATAFILTER_DOUBLE:Boolean(n)}}}initializeState(e,t){const n=this.getAttributeManager();n&&n.add({filterValues:{size:t.opts.filterSize,type:t.opts.fp64?5130:5126,accessor:"getFilterValue",shaderAttributes:{filterValues:{divisor:0},instanceFilterValues:{divisor:1}}}});const{gl:r}=this.context;if(n&&t.opts.countItems){const e=function(e){return Boolean(e.getExtension("EXT_float_blend")&&(e.getExtension("EXT_color_buffer_float")||e.getExtension("WEBGL_color_buffer_float")))}(r);n.add({filterIndices:{size:e?1:2,vertexOffset:1,type:5121,normalized:!0,accessor:(t,{index:n})=>{const r=t&&t.__source?t.__source.index:n;return e?(r+1)%255:[(r+1)%255,Math.floor(r/255)%255]},shaderAttributes:{filterPrevIndices:{vertexOffset:0},filterIndices:{vertexOffset:1}}}});const i=function(e,t){return t?new A.a(e,{width:1,height:1,attachments:{36064:new g.a(e,{format:Object(m.j)(e)?34836:6408,type:5126,mipmaps:!1})}}):new A.a(e,{width:256,height:64,depth:!1})}(r,e),o=function(e,t,n){return t.defines.NON_INSTANCED_MODEL=1,n&&(t.defines.FLOAT_TARGET=1),new y.a(e,{id:"data-filter-aggregation-model",vertexCount:1,isInstanced:!1,drawMode:0,vs:"#define SHADER_NAME data-filter-vertex-shader\n\n#ifdef FLOAT_TARGET\n attribute float filterIndices;\n attribute float filterPrevIndices;\n#else\n attribute vec2 filterIndices;\n attribute vec2 filterPrevIndices;\n#endif\n\nvarying vec4 vColor;\nconst float component = 1.0 / 255.0;\n\nvoid main() {\n #ifdef FLOAT_TARGET\n dataFilter_value *= float(filterIndices != filterPrevIndices);\n gl_Position = vec4(0.0, 0.0, 0.0, 1.0);\n vColor = vec4(0.0, 0.0, 0.0, 1.0);\n #else\n // Float texture is not supported: pack result into 4 channels x 256 px x 64px\n dataFilter_value *= float(filterIndices.x != filterPrevIndices.x);\n float col = filterIndices.x;\n float row = filterIndices.y * 4.0;\n float channel = floor(row);\n row = fract(row);\n vColor = component * vec4(bvec4(channel == 0.0, channel == 1.0, channel == 2.0, channel == 3.0));\n gl_Position = vec4(col * 2.0 - 1.0, row * 2.0 - 1.0, 0.0, 1.0);\n #endif\n gl_PointSize = 1.0;\n}\n",fs:"#define SHADER_NAME data-filter-fragment-shader\nprecision highp float;\n\nvarying vec4 vColor;\n\nvoid main() {\n if (dataFilter_value < 0.5) {\n discard;\n }\n gl_FragColor = vColor;\n}\n",...t})}(r,t.getShaders.call(this,t),e);this.setState({filterFBO:i,filterModel:o})}}updateState({props:e,oldProps:t}){if(this.state.filterModel){const n=this.getAttributeManager().attributes.filterValues.needsUpdate()||e.filterEnabled!==t.filterEnabled||e.filterRange!==t.filterRange||e.filterSoftRange!==t.filterSoftRange;n&&this.setState({filterNeedsUpdate:n})}}draw(e,t){const{filterFBO:n,filterModel:r,filterNeedsUpdate:i}=this.state,{onFilteredItemsChange:o}=this.props;if(i&&o&&r){const{attributes:{filterValues:t,filterIndices:i}}=this.getAttributeManager();r.setVertexCount(this.getNumInstances());const{gl:a}=this.context;Object(b.a)(a,{framebuffer:n,color:[0,0,0,0]}),r.updateModuleSettings(e.moduleParameters).setAttributes({...t.getShaderAttributes(),...i&&i.getShaderAttributes()}).draw({framebuffer:n,parameters:{...v,viewport:[0,0,n.width,n.height]}});const s=Object(_.c)(n);let l=0;for(let e=0;e 0.0) {\n if (dashAlignMode == 0.0) {\n offset = vDashOffset;\n } else {\n unitLength = vPathLength / round(vPathLength / unitLength);\n offset = solidLength / 2.0;\n }\n\n float unitOffset = mod(vPathPosition.y + offset, unitLength);\n\n if (gapLength > 0.0 && unitOffset > solidLength) {\n if (capType <= 0.5) {\n if (!(dashGapPickable && picking_uActive)) {\n discard;\n }\n } else {\n float distToEnd = length(vec2(\n min(unitOffset - solidLength, unitLength - unitOffset),\n vPathPosition.x\n ));\n if (distToEnd > 1.0) {\n if (!(dashGapPickable && picking_uActive)) {\n discard;\n }\n }\n }\n }\n }\n"}},k={inject:{"vs:#decl":"\nattribute float instanceOffsets;\n","vs:DECKGL_FILTER_SIZE":"\n float offsetWidth = abs(instanceOffsets * 2.0) + 1.0;\n size *= offsetWidth;\n","vs:#main-end":"\n float offsetWidth = abs(instanceOffsets * 2.0) + 1.0;\n float offsetDir = sign(instanceOffsets);\n vPathPosition.x = (vPathPosition.x + offsetDir) * offsetWidth - offsetDir;\n vPathPosition.y *= offsetWidth;\n vPathLength *= offsetWidth;\n","fs:#main-start":"\n float isInside;\n isInside = step(-1.0, vPathPosition.x) * step(vPathPosition.x, 1.0);\n if (isInside == 0.0) {\n discard;\n }\n"}};var R=n(49);class j extends i.a{constructor({dash:e=!1,offset:t=!1,highPrecisionDash:n=!1}={}){super({dash:e||n,offset:t,highPrecisionDash:n})}isEnabled(e){return"pathTesselator"in e.state}getShaders(e){if(!e.isEnabled(this))return null;let t={};return e.opts.dash&&(t=Object(I.a)(t,D)),e.opts.offset&&(t=Object(I.a)(t,k)),t}initializeState(e,t){const n=this.getAttributeManager();n&&t.isEnabled(this)&&(t.opts.dash&&n.addInstanced({instanceDashArrays:{size:2,accessor:"getDashArray"}}),t.opts.highPrecisionDash&&n.addInstanced({instanceDashOffsets:{size:1,accessor:"getPath",transform:t.getDashOffsets.bind(this)}}),t.opts.offset&&n.addInstanced({instanceOffsets:{size:1,accessor:"getOffset"}}))}updateState(e,t){if(!t.isEnabled(this))return;const n={};t.opts.dash&&(n.dashAlignMode=this.props.dashJustified?1:0,n.dashGapPickable=Boolean(this.props.dashGapPickable)),this.state.model.setUniforms(n)}getDashOffsets(e){const t=[0],n="XY"===this.props.positionFormat?2:3,r=Array.isArray(e[0]),i=r?e.length:e.length/n;let o,a;for(let s=0;s0&&(t[s]=t[s-1]+Object(R.e)(a,o)),a=o;return t}}Object(r.a)(j,"defaultProps",{getDashArray:{type:"accessor",value:[0,0]},getOffset:{type:"accessor",value:0},dashJustified:!1,dashGapPickable:!1}),Object(r.a)(j,"extensionName","PathStyleExtension");var F=n(91);const N={name:"fill-pattern",vs:"\n#ifdef NON_INSTANCED_MODEL\n #define FILL_PATTERN_FRAME_ATTRIB fillPatternFrames\n #define FILL_PATTERN_SCALE_ATTRIB fillPatternScales\n #define FILL_PATTERN_OFFSET_ATTRIB fillPatternOffsets\n#else\n #define FILL_PATTERN_FRAME_ATTRIB instanceFillPatternFrames\n #define FILL_PATTERN_SCALE_ATTRIB instanceFillPatternScales\n #define FILL_PATTERN_OFFSET_ATTRIB instanceFillPatternOffsets\n#endif\n\nattribute vec4 FILL_PATTERN_FRAME_ATTRIB;\nattribute float FILL_PATTERN_SCALE_ATTRIB;\nattribute vec2 FILL_PATTERN_OFFSET_ATTRIB;\n\nuniform bool fill_patternEnabled;\nuniform vec2 fill_patternTextureSize;\n\nvarying vec2 fill_uv;\nvarying vec4 fill_patternBounds;\nvarying vec4 fill_patternPlacement;\n",fs:"\nuniform bool fill_patternEnabled;\nuniform bool fill_patternMask;\nuniform sampler2D fill_patternTexture;\nuniform vec2 fill_uvCoordinateOrigin;\nuniform vec2 fill_uvCoordinateOrigin64Low;\n\nvarying vec4 fill_patternBounds;\nvarying vec4 fill_patternPlacement;\nvarying vec2 fill_uv;\n\nconst float FILL_UV_SCALE = 512.0 / 40000000.0;\n",inject:{"vs:DECKGL_FILTER_GL_POSITION":"\n fill_uv = geometry.position.xy;\n ","vs:DECKGL_FILTER_COLOR":"\n if (fill_patternEnabled) {\n fill_patternBounds = FILL_PATTERN_FRAME_ATTRIB / vec4(fill_patternTextureSize, fill_patternTextureSize);\n fill_patternPlacement.xy = FILL_PATTERN_OFFSET_ATTRIB;\n fill_patternPlacement.zw = FILL_PATTERN_SCALE_ATTRIB * FILL_PATTERN_FRAME_ATTRIB.zw;\n }\n ","fs:DECKGL_FILTER_COLOR":"\n if (fill_patternEnabled) {\n vec2 scale = FILL_UV_SCALE * fill_patternPlacement.zw;\n vec2 patternUV = mod(mod(fill_uvCoordinateOrigin, scale) + fill_uvCoordinateOrigin64Low + fill_uv, scale) / scale;\n patternUV = mod(fill_patternPlacement.xy + patternUV, 1.0);\n\n vec2 texCoords = fill_patternBounds.xy + fill_patternBounds.zw * patternUV;\n\n vec4 patternColor = texture2D(fill_patternTexture, texCoords);\n color.a *= patternColor.a;\n if (!fill_patternMask) {\n color.rgb = patternColor.rgb;\n }\n }\n "},dependencies:[o.a],getUniforms:function(e,t){if(!e)return{};if("fillPatternTexture"in e){const{fillPatternTexture:t}=e;return{fill_patternTexture:t,fill_patternTextureSize:[t.width,t.height]}}if("viewport"in e){const{fillPatternMask:n=!0,fillPatternEnabled:r=!0}=e,{project_uCommonOrigin:i}=t,o=[Object(F.b)(i[0]),Object(F.b)(i[1])];return{fill_uvCoordinateOrigin:i.slice(0,2),fill_uvCoordinateOrigin64Low:o,fill_patternMask:n,fill_patternEnabled:r}}return{}}},B={fillPatternEnabled:!0,fillPatternAtlas:{type:"image",value:null,async:!0,parameters:{10241:9729}},fillPatternMapping:{type:"object",value:{},async:!0},fillPatternMask:!0,getFillPattern:{type:"accessor",value:e=>e.pattern},getFillPatternScale:{type:"accessor",value:1},getFillPatternOffset:{type:"accessor",value:[0,0]}};class z extends i.a{constructor({pattern:e=!1}={}){super({pattern:e})}isEnabled(e){return null!==e.getAttributeManager()&&!("pathTesselator"in e.state)}getShaders(e){return e.isEnabled(this)?{modules:[e.opts.pattern&&N].filter(Boolean)}:null}initializeState(e,t){if(!t.isEnabled(this))return;const n=this.getAttributeManager();t.opts.pattern&&n.add({fillPatternFrames:{size:4,accessor:"getFillPattern",transform:t.getPatternFrame.bind(this),shaderAttributes:{fillPatternFrames:{divisor:0},instanceFillPatternFrames:{divisor:1}}},fillPatternScales:{size:1,accessor:"getFillPatternScale",defaultValue:1,shaderAttributes:{fillPatternScales:{divisor:0},instanceFillPatternScales:{divisor:1}}},fillPatternOffsets:{size:2,accessor:"getFillPatternOffset",shaderAttributes:{fillPatternOffsets:{divisor:0},instanceFillPatternOffsets:{divisor:1}}}}),this.setState({emptyTexture:new g.a(this.context.gl,{data:new Uint8Array(4),width:1,height:1})})}updateState({props:e,oldProps:t},n){n.isEnabled(this)&&e.fillPatternMapping&&e.fillPatternMapping!==t.fillPatternMapping&&this.getAttributeManager().invalidate("getFillPattern")}draw(e,t){if(!t.isEnabled(this))return;const{fillPatternAtlas:n}=this.props;this.setModuleParameters({fillPatternTexture:n||this.state.emptyTexture})}finalizeState(){const{emptyTexture:e}=this.state;null==e||e.delete()}getPatternFrame(e){const{fillPatternMapping:t}=this.getCurrentLayer().props,n=t&&t[e];return n?[n.x,n.y,n.width,n.height]:[0,0,0,0]}}Object(r.a)(z,"defaultProps",B),Object(r.a)(z,"extensionName","FillStyleExtension");var U=n(885);var H={name:"collision",dependencies:[o.a],vs:"\n#ifdef NON_INSTANCED_MODEL\nattribute float collisionPriorities;\n#else\nattribute float instanceCollisionPriorities;\n#endif\n\nuniform sampler2D collision_texture;\nuniform bool collision_sort;\nuniform bool collision_enabled;\n\nvec2 collision_getCoords(vec4 position) {\n vec4 collision_clipspace = project_common_position_to_clipspace(position);\n return (1.0 + collision_clipspace.xy / collision_clipspace.w) / 2.0;\n}\n\nfloat collision_match(vec2 tex, vec3 pickingColor) {\n vec4 collision_pickingColor = texture2D(collision_texture, tex);\n float delta = dot(abs(collision_pickingColor.rgb - pickingColor), vec3(1.0));\n float e = 0.001;\n return step(delta, e);\n}\n\nfloat collision_isVisible(vec2 texCoords, vec3 pickingColor) {\n if (!collision_enabled) {\n return 1.0;\n }\n\n // Visibility test, sample area of 5x5 pixels in order to fade in/out.\n // Due to the locality, the lookups will be cached\n // This reduces the flicker present when objects are shown/hidden\n const int N = 2;\n float accumulator = 0.0;\n vec2 step = vec2(1.0 / project_uViewportSize);\n\n const float floatN = float(N);\n vec2 delta = -floatN * step;\n for(int i = -N; i <= N; i++) {\n delta.x = -step.x * floatN;\n for(int j = -N; j <= N; j++) {\n accumulator += collision_match(texCoords + delta, pickingColor);\n delta.x += step.x;\n }\n delta.y += step.y;\n }\n\n float W = 2.0 * floatN + 1.0;\n return pow(accumulator / (W * W), 2.2);\n}\n",inject:{"vs:#decl":"\n float collision_fade = 1.0;\n","vs:DECKGL_FILTER_GL_POSITION":"\n if (collision_sort) {\n #ifdef NON_INSTANCED_MODEL\n float collisionPriority = collisionPriorities;\n #else\n float collisionPriority = instanceCollisionPriorities;\n #endif\n position.z = -0.001 * collisionPriority * position.w; // Support range -1000 -> 1000\n }\n\n if (collision_enabled) {\n vec4 collision_common_position = project_position(vec4(geometry.worldPosition, 1.0));\n vec2 collision_texCoords = collision_getCoords(collision_common_position);\n collision_fade = collision_isVisible(collision_texCoords, geometry.pickingColor / 255.0);\n if (collision_fade < 0.0001) {\n // Position outside clip space bounds to discard\n position = vec4(0.0, 0.0, 2.0, 1.0);\n }\n }\n ","vs:DECKGL_FILTER_COLOR":"\n color.a *= collision_fade;\n "},getUniforms:(e,t)=>{if(!e||!("dummyCollisionMap"in e))return{};const{collisionFBO:n,drawToCollisionMap:r,dummyCollisionMap:i}=e;return{collision_sort:Boolean(r),collision_texture:!r&&n?n:i}}},V=n(322),G=n(118),Y=n(122),W=n(263);class q extends W.a{renderCollisionMap(e,t){const n=this.gl;return Object(m.o)(n,{scissorTest:!0,scissor:[1,1,e.width-2,e.height-2],clearColor:[0,0,0,0],blend:!1,depthTest:!0,depthRange:[0,1]},()=>this.render({...t,target:e,pass:"collision"}))}getModuleParameters(){return{drawToCollisionMap:!0,pickingActive:1,pickingAttribute:!1,lightSources:{}}}}var X=n(54);class Z extends W.a{constructor(e,t){super(e,t),Object(r.a)(this,"maskMap",void 0),Object(r.a)(this,"fbo",void 0);const{mapSize:n=2048}=t;this.maskMap=new g.a(e,{width:n,height:n,parameters:{10241:9729,10240:9729,10242:33071,10243:33071}}),this.fbo=new A.a(e,{id:"maskmap",width:n,height:n,attachments:{36064:this.maskMap}})}render(e){const t=this.gl,n=[!1,!1,!1,!1];return n[e.channel]=!0,Object(m.o)(t,{clearColor:[255,255,255,255],blend:!0,blendFunc:[0,1],blendEquation:32778,colorMask:n,depthTest:!1},()=>super.render({...e,target:this.fbo,pass:"mask"}))}shouldDrawLayer(e){return e.props.operation.includes("mask")}delete(){this.fbo.delete(),this.maskMap.delete()}}var K=n(351),Q=n(509);function J(e,t){const n=[1/0,1/0,-1/0,-1/0];for(const r of e){const e=r.getBounds();if(e){const i=r.projectPosition(e[0],{viewport:t,autoOffset:!1}),o=r.projectPosition(e[1],{viewport:t,autoOffset:!1});n[0]=Math.min(n[0],i[0]),n[1]=Math.min(n[1],i[1]),n[2]=Math.max(n[2],o[0]),n[3]=Math.max(n[3],o[1])}}return Number.isFinite(n[0])?n:null}function $(e){const{bounds:t,viewport:n,border:r=0}=e,{isGeospatial:i}=n;if(t[2]<=t[0]||t[3]<=t[1])return null;const o=n.unprojectPosition([(t[0]+t[2])/2,(t[1]+t[3])/2,0]);let{width:a,height:s,zoom:l}=e;if(void 0===l){a-=2*r,s-=2*r;const e=Math.min(a/(t[2]-t[0]),s/(t[3]-t[1]));l=Math.min(Math.log2(e),20)}else if(!a||!s){const e=2**l;a=Math.round(Math.abs(t[2]-t[0])*e),s=Math.round(Math.abs(t[3]-t[1])*e);const n=2048-2*r;if(a>n||s>n){const e=n/Math.max(a,s);a=Math.round(a*e),s=Math.round(s*e),l+=Math.log2(e)}}return i?new K.a({id:n.id,x:r,y:r,width:a,height:s,longitude:o[0],latitude:o[1],zoom:l,orthographic:!0}):new Q.a({id:n.id,x:r,y:r,width:a,height:s,target:o,zoom:l,flipY:!1})}function ee(e,t,n){if(!e)return[0,0,1,1];const r=function(e){const t=e[2]-e[0],n=e[3]-e[1],r=(e[0]+e[2])/2,i=(e[1]+e[3])/2;return[r-t,i-n,r+t,i+n]}(function(e,t){let n;if(t&&2===t.length){const[r,i]=t,o=e.getBounds({z:r}),a=e.getBounds({z:i});n=[Math.min(o[0],a[0]),Math.min(o[1],a[1]),Math.max(o[2],a[2]),Math.max(o[3],a[3])]}else n=e.getBounds();const r=e.projectPosition(n.slice(0,2)),i=e.projectPosition(n.slice(2,4));return[r[0],r[1],i[0],i[1]]}(t,n));return e[2]-e[0]<=r[2]-r[0]&&e[3]-e[1]<=r[3]-r[1]?e:[Math.max(e[0],r[0]),Math.max(e[1],r[1]),Math.min(e[2],r[2]),Math.min(e[3],r[3])]}class te{constructor(){Object(r.a)(this,"id","mask-effect"),Object(r.a)(this,"props",null),Object(r.a)(this,"useInPicking",!0),Object(r.a)(this,"order",0),Object(r.a)(this,"dummyMaskMap",void 0),Object(r.a)(this,"channels",[]),Object(r.a)(this,"masks",null),Object(r.a)(this,"maskPass",void 0),Object(r.a)(this,"maskMap",void 0),Object(r.a)(this,"lastViewport",void 0)}preRender(e,{layers:t,layerFilter:n,viewports:r,onViewportActive:i,views:o,isPicking:a}){let s=!1;if(this.dummyMaskMap||(this.dummyMaskMap=new g.a(e,{width:1,height:1})),a)return{didRender:s};const l=t.filter(e=>e.props.visible&&e.props.operation.includes("mask"));if(0===l.length)return this.masks=null,this.channels.length=0,{didRender:s};this.masks={},this.maskPass||(this.maskPass=new Z(e,{id:"default-mask"}),this.maskMap=this.maskPass.maskMap);const u=this._sortMaskChannels(l),c=r[0],d=!this.lastViewport||!this.lastViewport.equals(c);if(void 0!==c.resolution)return X.a.warn("MaskExtension is not supported in GlobeView")(),{didRender:s};for(const e in u){const t=this._renderChannel(u[e],{layerFilter:n,onViewportActive:i,views:o,viewport:c,viewportChanged:d});s||(s=t)}return{didRender:s}}_renderChannel(e,{layerFilter:t,onViewportActive:n,views:r,viewport:i,viewportChanged:o}){let a=!1;const s=this.channels[e.index];if(!s)return a;const l=e===s||e.layers.length!==s.layers.length||e.layers.some((e,t)=>e!==s.layers[t]||e.props.transitions)||e.layerBounds.some((e,t)=>e!==s.layerBounds[t]);if(e.bounds=s.bounds,e.maskBounds=s.maskBounds,this.channels[e.index]=e,l||o){this.lastViewport=i;const o=J(e.layers,i);if(e.bounds=o&&ee(o,i),l||!Object(G.d)(e.bounds,s.bounds)){const{maskPass:s,maskMap:l}=this,u=o&&$({bounds:e.bounds,viewport:i,width:l.width,height:l.height,border:1});e.maskBounds=u?u.getBounds():[0,0,1,1],s.render({pass:"mask",channel:e.index,layers:e.layers,layerFilter:t,viewports:u?[u]:[],onViewportActive:n,views:r,moduleParameters:{devicePixelRatio:1}}),a=!0}}return this.masks[e.id]={index:e.index,bounds:e.maskBounds,coordinateOrigin:e.coordinateOrigin,coordinateSystem:e.coordinateSystem},a}_sortMaskChannels(e){const t={};let n=0;for(const r of e){const{id:e}=r.root;let i=t[e];if(!i){if(++n>4){X.a.warn("Too many mask layers. The max supported is 4")();continue}i={id:e,index:this.channels.findIndex(t=>(null==t?void 0:t.id)===e),layers:[],layerBounds:[],coordinateOrigin:r.root.props.coordinateOrigin,coordinateSystem:r.root.props.coordinateSystem},t[e]=i}i.layers.push(r),i.layerBounds.push(r.getBounds())}for(let e=0;e<4;e++){const n=this.channels[e];n&&n.id in t||(this.channels[e]=null)}for(const e in t){const n=t[e];n.index<0&&(n.index=this.channels.findIndex(e=>!e),this.channels[n.index]=n)}return t}getModuleParameters(){return{maskMap:this.masks?this.maskMap:this.dummyMaskMap,maskChannels:this.masks}}cleanup(){this.dummyMaskMap&&(this.dummyMaskMap.delete(),this.dummyMaskMap=void 0),this.maskPass&&(this.maskPass.delete(),this.maskPass=void 0,this.maskMap=void 0),this.lastViewport=void 0,this.masks=null,this.channels.length=0}}class ne{constructor(){Object(r.a)(this,"id","collision-filter-effect"),Object(r.a)(this,"props",null),Object(r.a)(this,"useInPicking",!0),Object(r.a)(this,"order",1),Object(r.a)(this,"channels",{}),Object(r.a)(this,"collisionFilterPass",void 0),Object(r.a)(this,"collisionFBOs",{}),Object(r.a)(this,"dummyCollisionMap",void 0),Object(r.a)(this,"lastViewport",void 0)}preRender(e,{effects:t,layers:n,layerFilter:r,viewports:i,onViewportActive:o,views:a,isPicking:s,preRenderStats:l={}}){var u;if(this.dummyCollisionMap||(this.dummyCollisionMap=new g.a(e,{width:1,height:1})),s)return;const c=n.filter(({props:{visible:e,collisionEnabled:t}})=>e&&t);if(0===c.length)return void(this.channels={});this.collisionFilterPass||(this.collisionFilterPass=new q(e,{id:"default-collision-filter"}));const d=null==t?void 0:t.filter(e=>e.constructor===te),f=null===(u=l["mask-effect"])||void 0===u?void 0:u.didRender,h=this._groupByCollisionGroup(e,c),p=i[0],A=!this.lastViewport||!this.lastViewport.equals(p)||f;for(const t in h){const n=this.collisionFBOs[t],i=h[t];n.resize({width:e.canvas.width/2,height:e.canvas.height/2}),this._render(i,{effects:d,layerFilter:r,onViewportActive:o,views:a,viewport:p,viewportChanged:A})}}_render(e,{effects:t,layerFilter:n,onViewportActive:r,views:i,viewport:o,viewportChanged:a}){const{collisionGroup:s}=e,l=this.channels[s];if(!l)return;const u=a||e===l||!Object(Y.a)(l.layers,e.layers,1)||e.layerBounds.some((e,t)=>!Object(G.d)(e,l.layerBounds[t]))||e.allLayersLoaded!==l.allLayersLoaded||e.layers.some(e=>e.props.transitions);if(this.channels[s]=e,u){this.lastViewport=o;const a=this.collisionFBOs[s];this.collisionFilterPass.renderCollisionMap(a,{pass:"collision-filter",isPicking:!0,layers:e.layers,effects:t,layerFilter:n,viewports:o?[o]:[],onViewportActive:r,views:i,moduleParameters:{dummyCollisionMap:this.dummyCollisionMap,devicePixelRatio:Object(m.e)(a.gl)/2}})}}_groupByCollisionGroup(e,t){const n={};for(const e of t){const{collisionGroup:t}=e.props;let r=n[t];r||(r={collisionGroup:t,layers:[],layerBounds:[],allLayersLoaded:!0},n[t]=r),r.layers.push(e),r.layerBounds.push(e.getBounds()),e.isLoaded||(r.allLayersLoaded=!1)}for(const t of Object.keys(n))this.collisionFBOs[t]||this.createFBO(e,t),this.channels[t]||(this.channels[t]=n[t]);for(const e of Object.keys(this.collisionFBOs))n[e]||this.destroyFBO(e);return n}getModuleParameters(e){const{collisionGroup:t}=e.props,{collisionFBOs:n,dummyCollisionMap:r}=this;return{collisionFBO:n[t],dummyCollisionMap:r}}cleanup(){this.dummyCollisionMap&&(this.dummyCollisionMap.delete(),this.dummyCollisionMap=void 0),this.channels={};for(const e of Object.keys(this.collisionFBOs))this.destroyFBO(e);this.collisionFBOs={},this.lastViewport=void 0}createFBO(e,t){const{width:n,height:r}=e.canvas,i=new g.a(e,{width:n,height:r,parameters:{10241:9728,10240:9728,10242:33071,10243:33071}}),o=new V.a(e,{format:33189,width:n,height:r});this.collisionFBOs[t]=new A.a(e,{id:"Collision-".concat(t),width:n,height:r,attachments:{36064:i,36096:o}})}destroyFBO(e){const t=this.collisionFBOs[e];for(const e of Object.values(t.attachments))e.delete();t.delete(),delete this.collisionFBOs[e]}}class re extends i.a{getShaders(){return{modules:[H]}}draw({uniforms:e,context:t,moduleParameters:n}){const{collisionEnabled:r}=this.props,{collisionFBO:i,drawToCollisionMap:o}=n,a=r&&Boolean(i);e.collision_enabled=a,o&&(this.props=this.clone(this.props.collisionTestProps).props)}initializeState(e,t){var n;if(null===this.getAttributeManager())return;null===(n=this.context.deck)||void 0===n||n._addDefaultEffect(new ne);this.getAttributeManager().add({collisionPriorities:{size:1,accessor:"getCollisionPriority",shaderAttributes:{collisionPriorities:{divisor:0},instanceCollisionPriorities:{divisor:1}}}})}getNeedsPickingBuffer(){return this.props.collisionEnabled}}Object(r.a)(re,"defaultProps",{getCollisionPriority:{type:"accessor",value:0},collisionEnabled:!0,collisionGroup:{type:"string",value:"default"},collisionTestProps:{}}),Object(r.a)(re,"extensionName","CollisionFilterExtension");var ie={name:"mask",dependencies:[o.a],vs:"\nuniform vec4 mask_bounds;\nuniform bool mask_maskByInstance;\nvec2 mask_getCoords(vec4 position) {\n return (position.xy - mask_bounds.xy) / (mask_bounds.zw - mask_bounds.xy);\n}\n",fs:"\nuniform sampler2D mask_texture;\nuniform int mask_channel;\nuniform bool mask_enabled;\nuniform bool mask_inverted;\nbool mask_isInBounds(vec2 texCoords) {\n if (!mask_enabled) {\n return true;\n }\n vec4 maskColor = texture2D(mask_texture, texCoords);\n float maskValue = 1.0;\n if (mask_channel == 0) {\n maskValue = maskColor.r;\n } else if (mask_channel == 1) {\n maskValue = maskColor.g;\n } else if (mask_channel == 2) {\n maskValue = maskColor.b;\n } else if (mask_channel == 3) {\n maskValue = maskColor.a;\n }\n\n if (mask_inverted) {\n return maskValue >= 0.5;\n } else {\n return maskValue < 0.5;\n }\n}\n",inject:{"vs:#decl":"\nvarying vec2 mask_texCoords;\n","vs:#main-end":"\n vec4 mask_common_position;\n if (mask_maskByInstance) {\n mask_common_position = project_position(vec4(geometry.worldPosition, 1.0));\n } else {\n mask_common_position = geometry.position;\n }\n mask_texCoords = mask_getCoords(mask_common_position);\n","fs:#decl":"\nvarying vec2 mask_texCoords;\n","fs:#main-start":"\n if (mask_enabled) {\n bool mask = mask_isInBounds(mask_texCoords);\n\n // Debug: show extent of render target\n // gl_FragColor = vec4(mask_texCoords, 0.0, 1.0);\n gl_FragColor = texture2D(mask_texture, mask_texCoords);\n\n if (!mask) discard;\n }\n"},getUniforms:e=>e&&"maskMap"in e?{mask_texture:e.maskMap}:{}};const oe={maskId:"",maskByInstance:void 0,maskInverted:!1};class ae extends i.a{initializeState(){var e;null===(e=this.context.deck)||void 0===e||e._addDefaultEffect(new te)}getShaders(){let e="instancePositions"in this.getAttributeManager().attributes;return void 0!==this.props.maskByInstance&&(e=Boolean(this.props.maskByInstance)),this.state.maskByInstance=e,{modules:[ie]}}draw({uniforms:e,context:t,moduleParameters:n}){e.mask_maskByInstance=this.state.maskByInstance;const{maskId:r,maskInverted:i}=this.props,{maskChannels:o}=n,{viewport:a}=t;if(o&&o[r]){const{index:t,bounds:n,coordinateOrigin:s}=o[r];let{coordinateSystem:l}=o[r];e.mask_enabled=!0,e.mask_channel=t,e.mask_inverted=i,l===M.a.DEFAULT&&(l=a.isGeospatial?M.a.LNGLAT:M.a.CARTESIAN);const u={modelMatrix:null,fromCoordinateOrigin:s,fromCoordinateSystem:l},c=this.projectPosition([n[0],n[1],0],u),d=this.projectPosition([n[2],n[3],0],u);e.mask_bounds=[c[0],c[1],d[0],d[1]]}else r&&X.a.warn("Could not find a mask layer with id: ".concat(r))(),e.mask_enabled=!1}}Object(r.a)(ae,"defaultProps",oe),Object(r.a)(ae,"extensionName","MaskExtension");var se=n(671);const le={NONE:0,WRITE_HEIGHT_MAP:1,USE_HEIGHT_MAP:2,USE_COVER:3,USE_COVER_ONLY:4,SKIP:5},ue=Object.keys(le).map(e=>"const float TERRAIN_MODE_".concat(e," = ").concat(le[e],".0;")).join("\n"),ce={name:"terrain",dependencies:[o.a],inject:{"vs:#decl":"\nuniform float terrain_mode;\nuniform sampler2D terrain_map;\nuniform vec4 terrain_bounds;\nvarying vec3 commonPos;\n".concat(ue,"\n "),"vs:#main-start":"\nif (terrain_mode == TERRAIN_MODE_SKIP) {\n gl_Position = vec4(0.0);\n return;\n}\n","vs:DECKGL_FILTER_GL_POSITION":"\ncommonPos = geometry.position.xyz;\nif (terrain_mode == TERRAIN_MODE_WRITE_HEIGHT_MAP) {\n vec2 texCoords = (commonPos.xy - terrain_bounds.xy) / terrain_bounds.zw;\n position = vec4(texCoords * 2.0 - 1.0, 0.0, 1.0);\n commonPos.z += project_uCommonOrigin.z;\n}\nif (terrain_mode == TERRAIN_MODE_USE_HEIGHT_MAP) {\n vec3 anchor = geometry.worldPosition;\n anchor.z = 0.0;\n vec3 anchorCommon = project_position(anchor);\n vec2 texCoords = (anchorCommon.xy - terrain_bounds.xy) / terrain_bounds.zw;\n if (texCoords.x >= 0.0 && texCoords.y >= 0.0 && texCoords.x <= 1.0 && texCoords.y <= 1.0) {\n float terrainZ = texture2D(terrain_map, texCoords).r;\n geometry.position.z += terrainZ;\n position = project_common_position_to_clipspace(geometry.position);\n }\n}\n ","fs:#decl":"\nuniform float terrain_mode;\nuniform sampler2D terrain_map;\nuniform vec4 terrain_bounds;\nvarying vec3 commonPos;\n".concat(ue,"\n "),"fs:#main-start":"\nif (terrain_mode == TERRAIN_MODE_WRITE_HEIGHT_MAP) {\n gl_FragColor = vec4(commonPos.z, 0.0, 0.0, 1.0);\n return;\n}\n ","fs:DECKGL_FILTER_COLOR":"\nif ((terrain_mode == TERRAIN_MODE_USE_COVER) || (terrain_mode == TERRAIN_MODE_USE_COVER_ONLY)) {\n vec2 texCoords = (commonPos.xy - terrain_bounds.xy) / terrain_bounds.zw;\n vec4 pixel = texture2D(terrain_map, texCoords);\n if (terrain_mode == TERRAIN_MODE_USE_COVER_ONLY) {\n color = pixel;\n } else {\n // pixel is premultiplied\n color = pixel + color * (1.0 - pixel.a);\n }\n return;\n}\n "},getUniforms:(e={},t)=>{if("dummyHeightMap"in e){const{drawToTerrainHeightMap:n,heightMap:r,heightMapBounds:i,dummyHeightMap:o,terrainCover:a,useTerrainHeightMap:s,terrainSkipRender:l}=e,{project_uCommonOrigin:u}=t;let c=l?le.SKIP:le.NONE,d=o,f=null;if(n)c=le.WRITE_HEIGHT_MAP,f=i;else if(s&&r)c=le.USE_HEIGHT_MAP,d=r,f=i;else if(a){const t=e.pickingActive;d=t?a.getPickingFramebuffer():a.getRenderFramebuffer(),t&&(c=le.SKIP),d?(c=c===le.SKIP?le.USE_COVER_ONLY:le.USE_COVER,f=a.bounds):d=o}return{terrain_mode:c,terrain_map:d,terrain_bounds:f?[f[0]-u[0],f[1]-u[1],f[2]-f[0],f[3]-f[1]]:[0,0,0,0]}}return null}};function de(e,t){return new A.a(e,{id:t.id,attachments:{36064:new g.a(e,{...t.float&&{format:Object(m.j)(e)?34836:6408,type:5126},mipmaps:!1,parameters:{10241:9729,10240:9729,10242:33071,10243:33071}})}})}class fe{constructor(e){Object(r.a)(this,"isDirty",!0),Object(r.a)(this,"targetLayer",void 0),Object(r.a)(this,"renderViewport",null),Object(r.a)(this,"bounds",null),Object(r.a)(this,"fbo",void 0),Object(r.a)(this,"pickingFbo",void 0),Object(r.a)(this,"layers",[]),Object(r.a)(this,"tile",void 0),Object(r.a)(this,"targetBounds",null),Object(r.a)(this,"targetBoundsCommon",null),this.targetLayer=e,this.tile=he(e)}get id(){return this.targetLayer.id}get isActive(){return Boolean(this.targetLayer.getCurrentLayer())}shouldUpdate({targetLayer:e,viewport:t,layers:n,layerNeedsRedraw:r}){e&&(this.targetLayer=e);const i=!!t&&this._updateViewport(t);let o=!!n&&this._updateLayers(n);if(r)for(const e of this.layers)if(r[e]){o=!0;break}return o||i}_updateLayers(e){let t=!1;if((e=this.tile?function(e,t){return t.filter(t=>{const n=he(t);return!n||function(e,t){if(e&&t)return e[0][0]e.id)),t}_updateViewport(e){const t=this.targetLayer;let n=!1;if(this.tile&&"boundingBox"in this.tile){if(!this.targetBounds){n=!0,this.targetBounds=this.tile.boundingBox;const t=e.projectPosition(this.targetBounds[0]),r=e.projectPosition(this.targetBounds[1]);this.targetBoundsCommon=[t[0],t[1],r[0],r[1]]}}else this.targetBounds!==t.getBounds()&&(n=!0,this.targetBounds=t.getBounds(),this.targetBoundsCommon=J([t],e));if(!this.targetBoundsCommon)return!1;const r=Math.ceil(e.zoom+.5);if(this.tile)this.bounds=this.targetBoundsCommon;else{var i;const t=null===(i=this.renderViewport)||void 0===i?void 0:i.zoom;n=n||r!==t;const o=ee(this.targetBoundsCommon,e),a=this.bounds;n=n||!a||o.some((e,t)=>e!==a[t]),this.bounds=o}return n&&(this.renderViewport=$({bounds:this.bounds,zoom:r,viewport:e})),n}getRenderFramebuffer(){return this.renderViewport&&0!==this.layers.length?(this.fbo||(this.fbo=de(this.targetLayer.context.gl,{id:this.id})),this.fbo):null}getPickingFramebuffer(){return!this.renderViewport||0===this.layers.length&&!this.targetLayer.props.pickable?null:(this.pickingFbo||(this.pickingFbo=de(this.targetLayer.context.gl,{id:"".concat(this.id,"-picking")})),this.pickingFbo)}filterLayers(e){return e.filter(({id:e})=>this.layers.includes(e))}delete(){const{fbo:e,pickingFbo:t}=this;e&&(e.texture.delete(),e.delete()),t&&(t.texture.delete(),t.delete())}}function he(e){for(;e;){const{tile:t}=e.props;if(t)return t;e=e.parent}return null}class pe extends W.a{getRenderableLayers(e,t){const{layers:n}=t,r=[],i=this._getDrawLayerParams(e,t,!0);for(let e=0;ethis.render({...t,target:n,pass:"terrain-height-map",layers:t.layers,viewports:[r],effects:[]})))}renderTerrainCover(e,t){const n=e.getRenderFramebuffer(),r=e.renderViewport;if(!n||!r)return;const i=e.filterLayers(t.layers);n.resize(r),Object(m.o)(this.gl,{clearColor:[0,0,0,0],depthTest:!1},()=>this.render({...t,target:n,pass:"terrain-cover-".concat(e.id),layers:i,effects:[],viewports:[r]}))}}var Ae=n(352);class ge extends Ae.a{constructor(...e){super(...e),Object(r.a)(this,"drawParameters",{})}getRenderableLayers(e,t){const{layers:n}=t,r=[];this.drawParameters={},this._resetColorEncoder(t.pickZ);const i=this._getDrawLayerParams(e,t);for(let e=0;ethis.render({...t,pickingFBO:n,pass:"terrain-cover-picking-".concat(e.id),layers:i,effects:[],viewports:[r],cullRect:void 0,deviceRect:r,pickZ:!1}))}getLayerParameters(e,t,n){if(this.drawParameters[e.id])return this.drawParameters[e.id];const r=super.getLayerParameters(e,t,n);return r.blend=!0,r}}class me{static isSupported(e){return A.a.isSupported(e,{colorBufferFloat:!0})}constructor(e){Object(r.a)(this,"renderViewport",null),Object(r.a)(this,"bounds",null),Object(r.a)(this,"fbo",void 0),Object(r.a)(this,"gl",void 0),Object(r.a)(this,"layers",[]),Object(r.a)(this,"layersBounds",[]),Object(r.a)(this,"layersBoundsCommon",null),Object(r.a)(this,"lastViewport",null),this.gl=e}getRenderFramebuffer(){return this.renderViewport?(this.fbo||(this.fbo=de(this.gl,{id:"height-map",float:!0})),this.fbo):null}shouldUpdate({layers:e,viewport:t}){const n=e.length!==this.layers.length||e.some((e,t)=>e!==this.layers[t]||e.props.transitions||e.getBounds()!==this.layersBounds[t]);n&&(this.layers=e,this.layersBounds=e.map(e=>e.getBounds()),this.layersBoundsCommon=J(e,t));const r=!this.lastViewport||!t.equals(this.lastViewport);if(this.layersBoundsCommon){if(n||r){const e=ee(this.layersBoundsCommon,t);if(e[2]<=e[0]||e[3]<=e[1])return this.renderViewport=null,!1;this.bounds=e,this.lastViewport=t;const n=t.scale,r=(e[2]-e[0])*n,i=(e[3]-e[1])*n;return this.renderViewport=r>0||i>0?$({bounds:[t.center[0]-1,t.center[1]-1,t.center[0]+1,t.center[1]+1],zoom:t.zoom,width:Math.min(r,2048),height:Math.min(i,2048),viewport:t}):null,!0}}else this.renderViewport=null;return!1}delete(){this.fbo&&(this.fbo.color.delete(),this.fbo.delete())}}class ye{constructor(){Object(r.a)(this,"id","terrain-effect"),Object(r.a)(this,"props",null),Object(r.a)(this,"useInPicking",!0),Object(r.a)(this,"isPicking",!1),Object(r.a)(this,"isDrapingEnabled",!1),Object(r.a)(this,"dummyHeightMap",void 0),Object(r.a)(this,"heightMap",void 0),Object(r.a)(this,"terrainPass",void 0),Object(r.a)(this,"terrainPickingPass",void 0),Object(r.a)(this,"terrainCovers",new Map)}initialize(e){this.dummyHeightMap=new g.a(e,{width:1,height:1,data:new Uint8Array([0,0,0,0])}),this.terrainPass=new pe(e,{id:"terrain"}),this.terrainPickingPass=new ge(e,{id:"terrain-picking"}),me.isSupported(e)?this.heightMap=new me(e):X.a.warn("Terrain offset mode is not supported by this browser")(),se.a.getDefaultProgramManager(e).addDefaultModule(ce)}preRender(e,t){if(!this.dummyHeightMap){this.initialize(e);for(const e of t.layers)e.props.operation.includes("terrain")&&e.setChangeFlags({extensionsChanged:!0})}if(t.pickZ)return void(this.isDrapingEnabled=!1);const{viewports:n,isPicking:r=!1}=t;this.isPicking=r,this.isDrapingEnabled=!0;const i=n[0],o=(r?this.terrainPickingPass:this.terrainPass).getRenderableLayers(i,t),a=o.filter(e=>e.props.operation.includes("terrain"));if(0===a.length)return;if(!r){o.filter(e=>"offset"===e.state.terrainDrawMode).length>0&&this._updateHeightMap(a,i,t)}const s=o.filter(e=>"drape"===e.state.terrainDrawMode);this._updateTerrainCovers(a,s,i,t)}getModuleParameters(e){var t,n;const{terrainDrawMode:r}=e.state;return{heightMap:null===(t=this.heightMap)||void 0===t?void 0:t.getRenderFramebuffer(),heightMapBounds:null===(n=this.heightMap)||void 0===n?void 0:n.bounds,dummyHeightMap:this.dummyHeightMap,terrainCover:this.isDrapingEnabled?this.terrainCovers.get(e.id):null,useTerrainHeightMap:"offset"===r,terrainSkipRender:"drape"===r||!e.props.operation.includes("draw")}}cleanup(){this.dummyHeightMap&&(this.dummyHeightMap.delete(),this.dummyHeightMap=void 0),this.heightMap&&(this.heightMap.delete(),this.heightMap=void 0);for(const e of this.terrainCovers.values())e.delete();this.terrainCovers.clear()}_updateHeightMap(e,t,n){if(!this.heightMap)return;this.heightMap.shouldUpdate({layers:e,viewport:t})&&this.terrainPass.renderHeightMap(this.heightMap,{...n,layers:e,moduleParameters:{heightMapBounds:this.heightMap.bounds,dummyHeightMap:this.dummyHeightMap,devicePixelRatio:1,drawToTerrainHeightMap:!0}})}_updateTerrainCovers(e,t,n,r){const i={};for(const e of t)e.state.terrainCoverNeedsRedraw&&(i[e.id]=!0,e.state.terrainCoverNeedsRedraw=!1);for(const e of this.terrainCovers.values())e.isDirty=e.isDirty||e.shouldUpdate({layerNeedsRedraw:i});for(const i of e)this._updateTerrainCover(i,t,n,r);this.isPicking||this._pruneTerrainCovers()}_updateTerrainCover(e,t,n,r){const i=this.isPicking?this.terrainPickingPass:this.terrainPass;let o=this.terrainCovers.get(e.id);o||(o=new fe(e),this.terrainCovers.set(e.id,o));try{const a=o.shouldUpdate({targetLayer:e,viewport:n,layers:t});(this.isPicking||o.isDirty||a)&&(i.renderTerrainCover(o,{...r,layers:t,moduleParameters:{dummyHeightMap:this.dummyHeightMap,terrainSkipRender:!1,devicePixelRatio:1}}),o.isDirty=!1)}catch(t){e.raiseError(t,"Error rendering terrain cover ".concat(o.id))}}_pruneTerrainCovers(){const e=[];for(const[t,n]of this.terrainCovers)n.isActive||e.push(t);for(const t of e)this.terrainCovers.delete(t)}}const ve={terrainDrawMode:void 0};class be extends i.a{getShaders(){return{modules:[ce]}}initializeState(){var e;null===(e=this.context.deck)||void 0===e||e._addDefaultEffect(new ye)}updateState(e){const{props:t,oldProps:n}=e;if(this.state.terrainDrawMode&&t.terrainDrawMode===n.terrainDrawMode&&t.extruded===n.extruded)return;let{terrainDrawMode:r}=t;if(!r){var i;const e=this.props.extruded,t=null===(i=this.getAttributeManager())||void 0===i?void 0:i.attributes,n=t&&"instancePositions"in t;r=e||n?"offset":"drape"}this.setState({terrainDrawMode:r})}onNeedsRedraw(){const e=this.state;"drape"===e.terrainDrawMode&&(e.terrainCoverNeedsRedraw=!0)}}Object(r.a)(be,"defaultProps",ve),Object(r.a)(be,"extensionName","TerrainExtension")},function(e,t,n){"use strict";n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return a})),n.d(t,"c",(function(){return s}));var r=n(61),i=n(66);class o extends r.b{}o.prototype._setValue=i.b;class a extends o{}a.prototype._setValue=i.c;class s extends o{}s.prototype._setValue=i.d},function(e,t,n){"use strict";n.d(t,"c",(function(){return s})),n.d(t,"b",(function(){return l})),n.d(t,"a",(function(){return u}));var r=n(41),i=n(137),o=n(61),a=n(12);class s extends o.a{constructor(e){super(e),this._typeIds=new i.c(new Int8Array(0),1),"function"==typeof e.valueToChildTypeId&&(this._valueToChildTypeId=e.valueToChildTypeId)}get typeIdToChildIndex(){return this.type.typeIdToChildIndex}append(e,t){return this.set(this.length,e,t)}set(e,t,n){return void 0===n&&(n=this._valueToChildTypeId(this,t,e)),this.setValid(e,this.isValid(t))&&this.setValue(e,t,n),this}setValue(e,t,n){this._typeIds.set(e,n);const r=this.type.typeIdToChildIndex[n],i=this.children[r];null==i||i.set(e,t)}addChild(e,t=""+this.children.length){const n=this.children.push(e),{type:{children:i,mode:o,typeIds:s}}=this,l=[...i,new r.a(t,e.type)];return this.type=new a.Q(o,[...s,n],l),n}_valueToChildTypeId(e,t,n){throw new Error("Cannot map UnionBuilder value to child typeId. Pass the `childTypeId` as the second argument to unionBuilder.append(), or supply a `valueToChildTypeId` function as part of the UnionBuilder constructor options.")}}class l extends s{}class u extends s{constructor(e){super(e),this._offsets=new i.c(new Int32Array(0))}setValue(e,t,n){const r=this._typeIds.set(e,n).buffer[e],i=this.getChildAt(this.type.typeIdToChildIndex[r]),o=this._offsets.set(e,i.length).buffer[e];null==i||i.set(o,t)}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return a})),n.d(t,"c",(function(){return s}));var r=n(61),i=n(66);class o extends r.b{}o.prototype._setValue=i.h;class a extends o{}a.prototype._setValue=i.g;class s extends o{}s.prototype._setValue=i.i},function(e,t,n){"use strict";n.d(t,"a",(function(){return s})),n.d(t,"b",(function(){return l}));var r=n(419),i=n(305),o=n(499),a=n(427);function s(e,t,n){if(s=(e=Float64Array.from(Object(a.b)(e,n))).length){if((t=+t)<=0||s<2)return Object(i.a)(e);if(t>=1)return Object(r.a)(e);var s,l=(s-1)*t,u=Math.floor(l),c=Object(r.a)(Object(o.a)(e,u).subarray(0,u+1));return c+(Object(i.a)(e.subarray(u+1))-c)*(l-u)}}function l(e,t,n=a.a){if(r=e.length){if((t=+t)<=0||r<2)return+n(e[0],0,e);if(t>=1)return+n(e[r-1],r-1,e);var r,i=(r-1)*t,o=Math.floor(i),s=+n(e[o],o,e);return s+(+n(e[o+1],o+1,e)-s)*(i-o)}}},function(e,t,n){"use strict";function r(e,t){let n=0;if(void 0===t)for(let t of e)null!=t&&(t=+t)>=t&&++n;else{let r=-1;for(let i of e)null!=(i=t(i,++r,e))&&(i=+i)>=i&&++n}return n}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(1),i=n(542),o=n(17),a=n(555);class s extends i.a{constructor(...e){super(...e),Object(r.a)(this,"_lastRenderIndex",-1)}render(e){const t=this.gl;return Object(o.n)(t,{framebuffer:e.target}),this._drawLayers(e)}_drawLayers(e){const{target:t,moduleParameters:n,viewports:r,views:i,onViewportActive:a,clearStack:s=!0,clearCanvas:l=!0}=e;e.pass=e.pass||"unknown";const u=this.gl;l&&function(e,t){const n=t?t.width:e.drawingBufferWidth,r=t?t.height:e.drawingBufferHeight;Object(o.n)(e,{viewport:[0,0,n,r]}),e.clear(16640)}(u,t),s&&(this._lastRenderIndex=-1);const c=[];for(const o of r){const r=i&&i[o.id];null==a||a(o);const s=this._getDrawLayerParams(o,e),l=o.subViewports||[o];for(const i of l){const o=this._drawLayersInViewport(u,{target:t,moduleParameters:n,viewport:i,view:r,pass:e.pass,layers:e.layers},s);c.push(o)}}return c}_getDrawLayerParams(e,{layers:t,pass:n,isPicking:r=!1,layerFilter:i,cullRect:o,effects:a,moduleParameters:s},l=!1){const u=[],c=function e(t=0,n={}){const r={},i=(o,a)=>{const s=o.props._offset,l=o.id,u=o.parent&&o.parent.id;let c;if(u&&!(u in n)&&i(o.parent,!1),u in r){const t=r[u]=r[u]||e(n[u],n);c=t(o,a),r[l]=t}else Number.isFinite(s)?(c=s+(n[u]||0),r[l]=null):c=t;return a&&c>=t&&(t=c+1),n[l]=c,c};return i}(this._lastRenderIndex+1),d={layer:t[0],viewport:e,isPicking:r,renderPass:n,cullRect:o},f={};for(let r=0;rObject(a.a)(e,t))}const d={totalCount:t.length,visibleCount:0,compositeCount:0,pickableCount:0};Object(o.n)(e,{viewport:c});for(let e=0;ee.startsWith(t))}function s(e,t){return function(e,t){var n;const r=e.split(";");let i=r.pop();const o=(r.shift()||"").split("=").pop(),a=l({parts:r,_:i,i:0});return null!=t&&null!==(n=t.wkt)&&void 0!==n&&n.crs?function(e,t){if(e&&null!=t&&t.match(/\d+/)){const n={type:"name",properties:{name:"urn:ogc:def:crs:EPSG::"+t}};e.crs=n}return e}(a,o):a}(e,t)}function l(e){return function(e){if(!d(/^(POINT(\sz)?)/i,e))return null;if(f(e),!d(/^(\()/,e))return null;const t=c(e);if(!t)return null;if(f(e),!d(/^(\))/,e))return null;return{type:"Point",coordinates:t[0]}}(e)||function(e){if(!d(/^(LINESTRING(\sz)?)/i,e))return null;if(f(e),!d(/^(\()/,e))return null;const t=c(e);if(!t)return null;if(!d(/^(\))/,e))return null;return{type:"LineString",coordinates:t}}(e)||function(e){if(!d(/^(POLYGON(\sz)?)/i,e))return null;f(e);const t=u(e);if(!t)return null;return{type:"Polygon",coordinates:t}}(e)||function(e){var t,n;if(!d(/^(MULTIPOINT)/i,e))return null;f(e);const r=null===(t=e._)||void 0===t?void 0:t.substring((null===(n=e._)||void 0===n?void 0:n.indexOf("("))+1,e._.length-1).replace(/\(/g,"").replace(/\)/g,"");e._="MULTIPOINT ("+r+")";const i=u(e);if(!i)return null;return f(e),{type:"MultiPoint",coordinates:i}}(e)||function(e){if(!d(/^(MULTILINESTRING)/i,e))return null;f(e);const t=u(e);if(!t)return null;return f(e),{type:"MultiLineString",coordinates:t}}(e)||function(e){if(!d(/^(MULTIPOLYGON)/i,e))return null;f(e);const t=u(e);if(!t)return null;return{type:"MultiPolygon",coordinates:t}}(e)||function(e){const t=[];let n;if(!d(/^(GEOMETRYCOLLECTION)/i,e))return null;if(f(e),!d(/^(\()/,e))return null;for(;n=l(e);)t.push(n),f(e),d(/^(,)/,e),f(e);if(!d(/^(\))/,e))return null;return{type:"GeometryCollection",geometries:t}}(e)}function u(e){f(e);let t=0;const n=[],r=[n];let o,a=n;for(;o=d(/^(\()/,e)||d(/^(\))/,e)||d(/^(,)/,e)||d(i,e);){if("("===o)r.push(a),a=[],r[r.length-1].push(a),t++;else if(")"===o){if(0===a.length)return null;if(a=r.pop(),!a)return null;if(t--,0===t)break}else if(","===o)a=[],r[r.length-1].push(a);else{if(o.split(/\s/g).some(isNaN))return null;Array.prototype.push.apply(a,o.split(/\s/g).map(parseFloat))}f(e)}return 0!==t?null:n}function c(e){const t=[];let n,r;for(;r=d(i,e)||d(/^(,)/,e);)","===r?(t.push(n),n=[]):r.split(/\s/g).some(isNaN)||(n||(n=[]),Array.prototype.push.apply(n,r.split(/\s/g).map(parseFloat))),f(e);return n?(t.push(n),t.length?t:null):null}function d(e,t){var n;const r=null===(n=t._)||void 0===n?void 0:n.substring(t.i).match(e);return r?(t.i+=r[0].length,r[0]):null}function f(e){d(/^\s*/,e)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));const r="4.1.0-alpha.4"},function(e,t,n){"use strict";function r(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=function e(t){var n={};if(!t)return n;return Object.keys(t).forEach((function(r){var i=t[r];"object"==typeof i?null===i?n[r]=null:Array.isArray(i)?n[r]=i.map((function(e){return e})):n[r]=e(i):n[r]=i})),n}(e.properties),t.geometry=i(e.geometry),t}function i(e){var t={type:e.type};return e.bbox&&(t.bbox=e.bbox),"GeometryCollection"===e.type?(t.geometries=e.geometries.map((function(e){return i(e)})),t):(t.coordinates=function e(t){var n=t;if("object"!=typeof n[0])return n.slice();return n.map((function(t){return e(t)}))}(e.coordinates),t)}t.a=function(e){if(!e)throw new Error("geojson is required");switch(e.type){case"Feature":return r(e);case"FeatureCollection":return function(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(e){return r(e)})),t}(e);case"Point":case"LineString":case"Polygon":case"MultiPoint":case"MultiLineString":case"MultiPolygon":case"GeometryCollection":return i(e);default:throw new Error("unknown GeoJSON type")}}},function(e,t,n){"use strict";n.d(t,"b",(function(){return r}));var r="http://www.w3.org/1999/xhtml";t.a={svg:"http://www.w3.org/2000/svg",xhtml:r,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"}},function(e,t,n){"use strict";n.d(t,"a",(function(){return p}));var r=n(571),i=n(149),o=n(273);var a=n(136),s=n(48),l=n(190),u=n(870),c=n(367),d=n(272),f=n(140),h=n(227);async function p(e,t,n,A){!t||Array.isArray(t)||Object(a.a)(t)||(A=void 0,n=t,t=void 0),e=await e,n=n||{};const g=Object(f.c)(e),m=t,y=Object(d.b)(m,A),v=await Object(h.a)(e,y,n);return v?(n=Object(l.c)(n,v,y,g),A=Object(d.a)({url:g,_parse:p,loaders:y},n,A||null),await async function(e,t,n,a){if(function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.b;Object(i.a)(e,"no worker provided");const n=e.version}(e),n=Object(u.a)(e.options,n),Object(s.j)(t)){const e=t,{ok:n,redirected:r,status:i,statusText:o,type:s,url:l}=e,u=Object.fromEntries(e.headers.entries());a.response={headers:u,ok:n,redirected:r,status:i,statusText:o,type:s,url:l}}t=await Object(c.a)(t,e,n);const l=e;if(l.parseTextSync&&"string"==typeof t)return l.parseTextSync(t,n,a);if(Object(r.a)(e,n))return await Object(r.b)(e,t,n,a,p);if(l.parseText&&"string"==typeof t)return await l.parseText(t,n,a);if(l.parse)return await l.parse(t,n,a);throw Object(i.a)(!l.parseSync),new Error(e.id+" loader - no parser found and worker is disabled")}(v,e,n,A)):null}},function(e,t,n){"use strict";n.d(t,"a",(function(){return a})),n.d(t,"b",(function(){return s}));var r=n(366),i=n(314),o=n(46);function a(e,t,n){if(n)return n;const a={fetch:Object(r.a)(t,e),...e};if(a.url){const e=Object(i.b)(a.url);a.baseUrl=e,a.queryString=Object(i.a)(a.url),a.filename=o.a.filename(e),a.baseUrl=o.a.dirname(e)}return Array.isArray(a.loaders)||(a.loaders=null),a}function s(e,t){if(e&&!Array.isArray(e))return e;let n;if(e&&(n=Array.isArray(e)?e:[e]),t&&t.loaders){const e=Array.isArray(t.loaders)?t.loaders:[t.loaders];n=n?[...n,...e]:e}return n&&n.length?n:void 0}},function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return i}));const r="latest";const i=(null!==(o=globalThis._loadersgl_)&&void 0!==o&&o.version||(globalThis._loadersgl_=globalThis._loadersgl_||{},globalThis._loadersgl_.version="4.1.0-alpha.4"),globalThis._loadersgl_.version);var o},function(e,t,n){"use strict";n.d(t,"b",(function(){return a})),n.d(t,"a",(function(){return s}));var r=n(20),i=n(90),o=n(26);class a extends i.c{constructor(e,t){super(),this.position=0,this.buffer=Object(o.toUint8Array)(e),this.size=void 0===t?this.buffer.byteLength:t}readInt32(e){const{buffer:t,byteOffset:n}=this.readAt(e,4);return new DataView(t,n).getInt32(0,!0)}seek(e){return this.position=Math.min(e,this.size),eObject(r.__awaiter)(this,void 0,void 0,(function*(){this.size=(yield e.stat()).size,delete this._pending})))()}readInt32(e){return Object(r.__awaiter)(this,void 0,void 0,(function*(){const{buffer:t,byteOffset:n}=yield this.readAt(e,4);return new DataView(t,n).getInt32(0,!0)}))}seek(e){return Object(r.__awaiter)(this,void 0,void 0,(function*(){return this._pending&&(yield this._pending),this.position=Math.min(e,this.size),e-1}function s(e,t,n){for(var r=-1,i=e?e.length:0;++r-1},O.prototype.set=function(e,t){var n=this.__data__,r=C(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},S.prototype.clear=function(){this.__data__={hash:new E,map:new(w||O),string:new E}},S.prototype.delete=function(e){return I(this,e).delete(e)},S.prototype.get=function(e){return I(this,e).get(e)},S.prototype.has=function(e){return I(this,e).has(e)},S.prototype.set=function(e,t){return I(this,e).set(e,t),this},T.prototype.add=T.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},T.prototype.has=function(e){return this.__data__.has(e)};var P=x&&1/c(new x([,-0]))[1]==1/0?function(e){return new x(e)}:function(){};function I(e,t){var n=e.__data__;return function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}(t)?n["string"==typeof t?"string":"hash"]:n.map}function D(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return L(n)?n:void 0}function k(e,t){return e===t||e!=e&&t!=t}function R(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}e.exports=function(e){return e&&e.length?function(e,t,n){var r=-1,i=a,o=e.length,l=!0,d=[],f=d;if(n)l=!1,i=s;else if(o>=200){var h=t?null:P(e);if(h)return c(h);l=!1,i=u,f=new T}else f=t?[]:d;e:for(;++r-1&&e%1==0&&e<=9007199254740991}(e.length)&&!function(e){var t=function(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}(e)?u.call(e):"";return"[object Function]"==t||"[object GeneratorFunction]"==t}(e)}(e)}(e)&&l.call(e,"callee")&&(!d.call(e,"callee")||"[object Arguments]"==u.call(e))}(e)||!!(f&&e&&e[f])}function A(e){if("string"==typeof e||function(e){return"symbol"==typeof e||m(e)&&"[object Symbol]"==u.call(e)}(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}var g=Array.isArray;function m(e){return!!e&&"object"==typeof e}var y,v,b=(y=function(e,t){return null==e?{}:function(e,t){return function(e,t,n){for(var r=-1,i=t.length,o={};++r0&&r(u)?n>1?e(u,n-1,r,i,o):a(o,u):i||(o[o.length]=u)}return o}(t,1),A))},v=h(void 0===v?y.length-1:v,0),function(){for(var e=arguments,t=-1,n=h(e.length-v,0),r=Array(n);++t.008856451679035631?Math.pow(e,1/3):e/l+4/29}function p(e){return e>s?e*e*e:l*(e-4/29)}function A(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function g(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function m(e){if(e instanceof b)return new b(e.h,e.c,e.l,e.opacity);if(e instanceof f||(e=u(e)),0===e.a&&0===e.b)return new b(NaN,0e instanceof ArrayBuffer?new Uint8Array(e):e),i=r.reduce((e,t)=>e+t.byteLength,0),o=new Uint8Array(i);let a=0;for(const e of r)o.set(e,a),a+=e.byteLength;return o.buffer}function o(e,t,n){const r=void 0!==n?new Uint8Array(e).subarray(t,t+n):new Uint8Array(e).subarray(t);return new Uint8Array(r).buffer}n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return i})),n.d(t,"c",(function(){return o}))},function(e,t,n){"use strict";n.d(t,"b",(function(){return u})),n.d(t,"a",(function(){return c})),n.d(t,"c",(function(){return d}));var r=n(129),i=n(77),o=n(65);function a(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function s(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function l(e){return e<0?-e*e:e*e}function u(e){var t=e(i.c,i.c),n=1;function o(){return 1===n?e(i.c,i.c):.5===n?e(s,l):e(a(n),a(1/n))}return t.exponent=function(e){return arguments.length?(n=+e,o()):n},Object(r.b)(t)}function c(){var e=u(Object(i.d)());return e.copy=function(){return Object(i.a)(e,c()).exponent(e.exponent())},o.b.apply(e,arguments),e}function d(){return c.apply(null,arguments).exponent(.5)}},function(e,t,n){},function(e,t,n){"use strict";n.r(t);var r=n(301),i=n(18);t.default=function(e,t){void 0===t&&(t={});var n=Object(r.default)(e),o=(n[0]+n[2])/2,a=(n[1]+n[3])/2;return Object(i.point)([o,a],t.properties,t)}},function(e,t,n){"use strict";n.r(t);var r=n(64);function i(e){var t=[1/0,1/0,-1/0,-1/0];return Object(r.coordEach)(e,(function(e){t[0]>e[0]&&(t[0]=e[0]),t[1]>e[1]&&(t[1]=e[1]),t[2]=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function i(e){if(!(t=r.exec(e)))throw new Error("invalid format: "+e);var t;return new o({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}function o(e){this.fill=void 0===e.fill?" ":e.fill+"",this.align=void 0===e.align?">":e.align+"",this.sign=void 0===e.sign?"-":e.sign+"",this.symbol=void 0===e.symbol?"":e.symbol+"",this.zero=!!e.zero,this.width=void 0===e.width?void 0:+e.width,this.comma=!!e.comma,this.precision=void 0===e.precision?void 0:+e.precision,this.trim=!!e.trim,this.type=void 0===e.type?"":e.type+""}i.prototype=o.prototype,o.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type}},function(e,t,n){"use strict";n.d(t,"b",(function(){return i})),n.d(t,"c",(function(){return o})),n.d(t,"a",(function(){return s}));var r,i,o,a=n(521);function s(e){return r=Object(a.a)(e),i=r.format,o=r.formatPrefix,r}s({thousands:",",grouping:[3],currency:["$",""]})},function(e,t,n){"use strict";function r(e,t){let n;if(void 0===t)for(const t of e)null!=t&&(n>t||void 0===n&&t>=t)&&(n=t);else{let r=-1;for(let i of e)null!=(i=t(i,++r,e))&&(n>i||void 0===n&&i>=i)&&(n=i)}return n}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(296),i=n(320);async function o(e,t){if("string"==typeof e){const i=Object(r.b)(e);var n,o;if(function(e){return!function(e){return e.startsWith("http:")||e.startsWith("https:")}(e)&&!function(e){return e.startsWith("data:")}(e)}(i))if(null!==(n=globalThis.loaders)&&void 0!==n&&n.fetchNode)return null===(o=globalThis.loaders)||void 0===o?void 0:o.fetchNode(i,t);return await fetch(i,t)}return await Object(i.b)(e)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(1),i=n(246);const o=[255,255,255],a=1,s=[0,0,-1];let l=0;class u{constructor(e={}){Object(r.a)(this,"id",void 0),Object(r.a)(this,"color",void 0),Object(r.a)(this,"intensity",void 0),Object(r.a)(this,"type","directional"),Object(r.a)(this,"direction",void 0),Object(r.a)(this,"shadow",void 0);const{color:t=o}=e,{intensity:n=a}=e,{direction:u=s}=e,{_shadow:c=!1}=e;this.id=e.id||"directional-".concat(l++),this.color=t,this.intensity=n,this.type="directional",this.direction=new i.a(u).normalize().toArray(),this.shadow=c}getProjectedLight(e){return this}}},function(e,t,n){"use strict";var r=n(858);const i="#define SMOOTH_EDGE_RADIUS 0.5";var o={name:"geometry",vs:"\n".concat(i,"\n\nstruct VertexGeometry {\n vec4 position;\n vec3 worldPosition;\n vec3 worldPositionAlt;\n vec3 normal;\n vec2 uv;\n vec3 pickingColor;\n} geometry = VertexGeometry(\n vec4(0.0, 0.0, 1.0, 0.0),\n vec3(0.0),\n vec3(0.0),\n vec3(0.0),\n vec2(0.0),\n vec3(0.0)\n);\n"),fs:"\n".concat(i,"\n\nstruct FragmentGeometry {\n vec2 uv;\n} geometry;\n\nfloat smoothedge(float edge, float x) {\n return smoothstep(edge - SMOOTH_EDGE_RADIUS, edge + SMOOTH_EDGE_RADIUS, x);\n}\n")},a=n(39);const s=Object.keys(a.a).map(e=>"const int COORDINATE_SYSTEM_".concat(e," = ").concat(a.a[e],";")).join(""),l=Object.keys(a.d).map(e=>"const int PROJECTION_MODE_".concat(e," = ").concat(a.d[e],";")).join(""),u=Object.keys(a.e).map(e=>"const int UNIT_".concat(e.toUpperCase()," = ").concat(a.e[e],";")).join("");var c="".concat(s,"\n").concat(l,"\n").concat(u,"\n\nuniform int project_uCoordinateSystem;\nuniform int project_uProjectionMode;\nuniform float project_uScale;\nuniform bool project_uWrapLongitude;\nuniform vec3 project_uCommonUnitsPerMeter;\nuniform vec3 project_uCommonUnitsPerWorldUnit;\nuniform vec3 project_uCommonUnitsPerWorldUnit2;\nuniform vec4 project_uCenter;\nuniform mat4 project_uModelMatrix;\nuniform mat4 project_uViewProjectionMatrix;\nuniform vec2 project_uViewportSize;\nuniform float project_uDevicePixelRatio;\nuniform float project_uFocalDistance;\nuniform vec3 project_uCameraPosition;\nuniform vec3 project_uCoordinateOrigin;\nuniform vec3 project_uCommonOrigin;\nuniform bool project_uPseudoMeters;\n\nconst float TILE_SIZE = 512.0;\nconst float PI = 3.1415926536;\nconst float WORLD_SCALE = TILE_SIZE / (PI * 2.0);\nconst vec3 ZERO_64_LOW = vec3(0.0);\nconst float EARTH_RADIUS = 6370972.0;\nconst float GLOBE_RADIUS = 256.0;\nfloat project_size_at_latitude(float lat) {\n float y = clamp(lat, -89.9, 89.9);\n return 1.0 / cos(radians(y));\n}\n\nfloat project_size() {\n if (project_uProjectionMode == PROJECTION_MODE_WEB_MERCATOR &&\n project_uCoordinateSystem == COORDINATE_SYSTEM_LNGLAT &&\n project_uPseudoMeters == false) {\n \n if (geometry.position.w == 0.0) {\n return project_size_at_latitude(geometry.worldPosition.y);\n }\n \n float y = geometry.position.y / TILE_SIZE * 2.0 - 1.0;\n float y2 = y * y;\n float y4 = y2 * y2;\n float y6 = y4 * y2;\n return 1.0 + 4.9348 * y2 + 4.0587 * y4 + 1.5642 * y6;\n }\n return 1.0;\n}\n\nfloat project_size_at_latitude(float meters, float lat) {\n return meters * project_uCommonUnitsPerMeter.z * project_size_at_latitude(lat);\n}\nfloat project_size(float meters) {\n return meters * project_uCommonUnitsPerMeter.z * project_size();\n}\n\nvec2 project_size(vec2 meters) {\n return meters * project_uCommonUnitsPerMeter.xy * project_size();\n}\n\nvec3 project_size(vec3 meters) {\n return meters * project_uCommonUnitsPerMeter * project_size();\n}\n\nvec4 project_size(vec4 meters) {\n return vec4(meters.xyz * project_uCommonUnitsPerMeter, meters.w);\n}\nmat3 project_get_orientation_matrix(vec3 up) {\n vec3 uz = normalize(up);\n vec3 ux = abs(uz.z) == 1.0 ? vec3(1.0, 0.0, 0.0) : normalize(vec3(uz.y, -uz.x, 0));\n vec3 uy = cross(uz, ux);\n return mat3(ux, uy, uz);\n}\n\nbool project_needs_rotation(vec3 commonPosition, out mat3 transform) {\n if (project_uProjectionMode == PROJECTION_MODE_GLOBE) {\n transform = project_get_orientation_matrix(commonPosition);\n return true;\n }\n return false;\n}\nvec3 project_normal(vec3 vector) {\n vec4 normal_modelspace = project_uModelMatrix * vec4(vector, 0.0);\n vec3 n = normalize(normal_modelspace.xyz * project_uCommonUnitsPerMeter);\n mat3 rotation;\n if (project_needs_rotation(geometry.position.xyz, rotation)) {\n n = rotation * n;\n }\n return n;\n}\n\nvec4 project_offset_(vec4 offset) {\n float dy = offset.y;\n vec3 commonUnitsPerWorldUnit = project_uCommonUnitsPerWorldUnit + project_uCommonUnitsPerWorldUnit2 * dy;\n return vec4(offset.xyz * commonUnitsPerWorldUnit, offset.w);\n}\nvec2 project_mercator_(vec2 lnglat) {\n float x = lnglat.x;\n if (project_uWrapLongitude) {\n x = mod(x + 180., 360.0) - 180.;\n }\n float y = clamp(lnglat.y, -89.9, 89.9);\n return vec2(\n radians(x) + PI,\n PI + log(tan_fp32(PI * 0.25 + radians(y) * 0.5))\n ) * WORLD_SCALE;\n}\n\nvec3 project_globe_(vec3 lnglatz) {\n float lambda = radians(lnglatz.x);\n float phi = radians(lnglatz.y);\n float cosPhi = cos(phi);\n float D = (lnglatz.z / EARTH_RADIUS + 1.0) * GLOBE_RADIUS;\n\n return vec3(\n sin(lambda) * cosPhi,\n -cos(lambda) * cosPhi,\n sin(phi)\n ) * D;\n}\nvec4 project_position(vec4 position, vec3 position64Low) {\n vec4 position_world = project_uModelMatrix * position;\n if (project_uProjectionMode == PROJECTION_MODE_WEB_MERCATOR) {\n if (project_uCoordinateSystem == COORDINATE_SYSTEM_LNGLAT) {\n return vec4(\n project_mercator_(position_world.xy),\n project_size_at_latitude(position_world.z, position_world.y),\n position_world.w\n );\n }\n if (project_uCoordinateSystem == COORDINATE_SYSTEM_CARTESIAN) {\n position_world.xyz += project_uCoordinateOrigin;\n }\n }\n if (project_uProjectionMode == PROJECTION_MODE_GLOBE) {\n if (project_uCoordinateSystem == COORDINATE_SYSTEM_LNGLAT) {\n return vec4(\n project_globe_(position_world.xyz),\n position_world.w\n );\n }\n }\n if (project_uProjectionMode == PROJECTION_MODE_WEB_MERCATOR_AUTO_OFFSET) {\n if (project_uCoordinateSystem == COORDINATE_SYSTEM_LNGLAT) {\n if (abs(position_world.y - project_uCoordinateOrigin.y) > 0.25) {\n return vec4(\n project_mercator_(position_world.xy) - project_uCommonOrigin.xy,\n project_size(position_world.z),\n position_world.w\n );\n }\n }\n }\n if (project_uProjectionMode == PROJECTION_MODE_IDENTITY ||\n (project_uProjectionMode == PROJECTION_MODE_WEB_MERCATOR_AUTO_OFFSET &&\n (project_uCoordinateSystem == COORDINATE_SYSTEM_LNGLAT ||\n project_uCoordinateSystem == COORDINATE_SYSTEM_CARTESIAN))) {\n position_world.xyz -= project_uCoordinateOrigin;\n }\n return project_offset_(position_world + project_uModelMatrix * vec4(position64Low, 0.0));\n}\n\nvec4 project_position(vec4 position) {\n return project_position(position, ZERO_64_LOW);\n}\n\nvec3 project_position(vec3 position, vec3 position64Low) {\n vec4 projected_position = project_position(vec4(position, 1.0), position64Low);\n return projected_position.xyz;\n}\n\nvec3 project_position(vec3 position) {\n vec4 projected_position = project_position(vec4(position, 1.0), ZERO_64_LOW);\n return projected_position.xyz;\n}\n\nvec2 project_position(vec2 position) {\n vec4 projected_position = project_position(vec4(position, 0.0, 1.0), ZERO_64_LOW);\n return projected_position.xy;\n}\n\nvec4 project_common_position_to_clipspace(vec4 position, mat4 viewProjectionMatrix, vec4 center) {\n return viewProjectionMatrix * position + center;\n}\nvec4 project_common_position_to_clipspace(vec4 position) {\n return project_common_position_to_clipspace(position, project_uViewProjectionMatrix, project_uCenter);\n}\nvec2 project_pixel_size_to_clipspace(vec2 pixels) {\n vec2 offset = pixels / project_uViewportSize * project_uDevicePixelRatio * 2.0;\n return offset * project_uFocalDistance;\n}\n\nfloat project_size_to_pixel(float meters) {\n return project_size(meters) * project_uScale;\n}\nfloat project_size_to_pixel(float size, int unit) {\n if (unit == UNIT_METERS) return project_size_to_pixel(size);\n if (unit == UNIT_COMMON) return size * project_uScale;\n return size;\n}\nfloat project_pixel_size(float pixels) {\n return pixels / project_uScale;\n}\nvec2 project_pixel_size(vec2 pixels) {\n return pixels / project_uScale;\n}\n"),d=n(369);const f={};t.a={name:"project",dependencies:[r.a,o],vs:c,getUniforms:function(e=f){return"viewport"in e?Object(d.b)(e):{}}}},function(e,t,n){"use strict";n.d(t,"b",(function(){return f})),n.d(t,"a",(function(){return h}));var r=n(116),i=n(572),o=n(78);function a(e,t){var n;const r=function(e,t){const n=new DataView(e),r=Object(o.c)(n),{geometryType:i,dimensions:a,littleEndian:f}=r,h=r.byteOffset;switch(i){case o.a.Point:return s(n,h,a,f).geometry;case o.a.LineString:return l(n,h,a,f).geometry;case o.a.Polygon:return c(n,h,a,f).geometry;case o.a.MultiPoint:const e=function(e,t,n,r){const i=e.getUint32(t,r);t+=4;const o=[];for(let r=0;re.positions.value);return{type:"Point",positions:{value:new Float64Array(d(n).buffer),size:t}}}(o,n)}(n,h,a,f);return e.type="Point",e;case o.a.MultiLineString:const t=function(e,t,n,r){const i=e.getUint32(t,r);t+=4;const o=[];for(let r=0;re.positions.value),r=new Float64Array(d(n).buffer),i=n.map(e=>e.length/t).map(u(0));return i.unshift(0),{type:"LineString",positions:{value:r,size:t},pathIndices:{value:new Uint16Array(i),size:1}}}(o,n)}(n,h,a,f);return t.type="LineString",t;case o.a.MultiPolygon:const r=function(e,t,n,r){const i=e.getUint32(t,r);t+=4;const o=[];for(let r=0;re.length/t).map(u(0));o.unshift(0);const a=[0];for(const e of r)a.push(...e.filter(e=>e>0).map(e=>e+a[a.length-1]));return{type:"Polygon",positions:{value:i,size:t},polygonIndices:{value:new Uint16Array(o),size:1},primitivePolygonIndices:{value:new Uint16Array(a),size:1}}}(o,n)}(n,h,a,f);return r.type="Polygon",r;default:throw new Error("WKB: Unsupported geometry type: "+i)}}(e),a=(null==t||null===(n=t.wkb)||void 0===n?void 0:n.shape)||"binary-geometry";switch(a){case"binary-geometry":return r;case"geojson-geometry":return Object(i.b)(r);case"geometry":return console.error('WKBLoader: "geometry" shape is deprecated, use "binary-geometry" instead'),Object(i.b)(r);default:throw new Error(a)}}function s(e,t,n,r){const i=new Float64Array(n);for(let o=0;o0&&a.push(i),{geometry:{type:"LineString",positions:{value:o,size:n},pathIndices:{value:new Uint16Array(a),size:1}},offset:t}}const u=e=>t=>e+=t;function c(e,t,n,r){const i=e.getUint32(t,r);t+=4;const o=[];for(let a=0;a0&&s.push(a.length/n);const c=o.map(e=>e.length/n).map(u(0));return c.unshift(0),{geometry:{type:"Polygon",positions:{value:a,size:n},polygonIndices:{value:new Uint16Array(s),size:1},primitivePolygonIndices:{value:new Uint16Array(c),size:1}},offset:t}}function d(e){let t=0;for(let n=0;na(e),parseSync:a}},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r="#if (defined(SHADER_TYPE_FRAGMENT) && defined(LIGHTING_FRAGMENT)) || (defined(SHADER_TYPE_VERTEX) && defined(LIGHTING_VERTEX))\n\nstruct AmbientLight {\n vec3 color;\n};\n\nstruct PointLight {\n vec3 color;\n vec3 position;\n vec3 attenuation;\n};\n\nstruct DirectionalLight {\n vec3 color;\n vec3 direction;\n};\n\nuniform AmbientLight lighting_uAmbientLight;\nuniform PointLight lighting_uPointLight[MAX_LIGHTS];\nuniform DirectionalLight lighting_uDirectionalLight[MAX_LIGHTS];\nuniform int lighting_uPointLightCount;\nuniform int lighting_uDirectionalLightCount;\n\nuniform bool lighting_uEnabled;\n\nfloat getPointLightAttenuation(PointLight pointLight, float distance) {\n return pointLight.attenuation.x\n + pointLight.attenuation.y * distance\n + pointLight.attenuation.z * distance * distance;\n}\n\n#endif\n";const i={lightSources:{}};function o(){let{color:e=[0,0,0],intensity:t=1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e.map(e=>e*t/255)}function a(e){let{ambientLight:t,pointLights:n=[],directionalLights:r=[]}=e;const i={};return i["lighting_uAmbientLight.color"]=t?o(t):[0,0,0],n.forEach((e,t)=>{i["lighting_uPointLight[".concat(t,"].color")]=o(e),i["lighting_uPointLight[".concat(t,"].position")]=e.position,i["lighting_uPointLight[".concat(t,"].attenuation")]=e.attenuation||[1,0,0]}),i.lighting_uPointLightCount=n.length,r.forEach((e,t)=>{i["lighting_uDirectionalLight[".concat(t,"].color")]=o(e),i["lighting_uDirectionalLight[".concat(t,"].direction")]=e.direction}),i.lighting_uDirectionalLightCount=r.length,i}const s={name:"lights",vs:r,fs:r,getUniforms:function e(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:i;if("lightSources"in t){const{ambientLight:e,pointLights:n,directionalLights:r}=t.lightSources||{};return e||n&&n.length>0||r&&r.length>0?Object.assign({},a({ambientLight:e,pointLights:n,directionalLights:r}),{lighting_uEnabled:!0}):{lighting_uEnabled:!1}}if("lights"in t){const n={pointLights:[],directionalLights:[]};for(const e of t.lights||[])switch(e.type){case"ambient":n.ambientLight=e;break;case"directional":n.directionalLights.push(e);break;case"point":n.pointLights.push(e)}return e({lightSources:n})}return{}},defines:{MAX_LIGHTS:3}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(80),i=n(117),o=n(102),a=n(230);class s extends r.a{}function l(e,t,n){if(void 0===t)return-1;if(null===t)return function(e,t){const{nullBitmap:n}=e;if(!n||e.nullCount<=0)return-1;let r=0;for(const i of new o.BitIterator(n,e.offset+(t||0),e.length,n,o.getBool)){if(!i)return r;++r}return-1}(e,n);const r=i.a.getVisitFn(e),s=Object(a.createElementComparator)(t);for(let t=(n||0)-1,i=e.length;++t0?0:-1},s.prototype.visitBool=l,s.prototype.visitInt=l,s.prototype.visitInt8=l,s.prototype.visitInt16=l,s.prototype.visitInt32=l,s.prototype.visitInt64=l,s.prototype.visitUint8=l,s.prototype.visitUint16=l,s.prototype.visitUint32=l,s.prototype.visitUint64=l,s.prototype.visitFloat=l,s.prototype.visitFloat16=l,s.prototype.visitFloat32=l,s.prototype.visitFloat64=l,s.prototype.visitUtf8=l,s.prototype.visitBinary=l,s.prototype.visitFixedSizeBinary=l,s.prototype.visitDate=l,s.prototype.visitDateDay=l,s.prototype.visitDateMillisecond=l,s.prototype.visitTimestamp=l,s.prototype.visitTimestampSecond=l,s.prototype.visitTimestampMillisecond=l,s.prototype.visitTimestampMicrosecond=l,s.prototype.visitTimestampNanosecond=l,s.prototype.visitTime=l,s.prototype.visitTimeSecond=l,s.prototype.visitTimeMillisecond=l,s.prototype.visitTimeMicrosecond=l,s.prototype.visitTimeNanosecond=l,s.prototype.visitDecimal=l,s.prototype.visitList=l,s.prototype.visitStruct=l,s.prototype.visitUnion=l,s.prototype.visitDenseUnion=u,s.prototype.visitSparseUnion=u,s.prototype.visitDictionary=l,s.prototype.visitInterval=l,s.prototype.visitIntervalDayTime=l,s.prototype.visitIntervalYearMonth=l,s.prototype.visitFixedSizeList=l,s.prototype.visitMap=l;const c=new s},function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(80),i=n(5);const o=(e,t)=>e+t;class a extends r.a{visitNull(e,t){return 0}visitInt(e,t){return e.type.bitWidth/8}visitFloat(e,t){return e.type.ArrayType.BYTES_PER_ELEMENT}visitBool(e,t){return 1/8}visitDecimal(e,t){return e.type.bitWidth/8}visitDate(e,t){return 4*(e.type.unit+1)}visitTime(e,t){return e.type.bitWidth/8}visitTimestamp(e,t){return e.type.unit===i.g.SECOND?4:8}visitInterval(e,t){return 4*(e.type.unit+1)}visitStruct(e,t){return e.children.reduce((e,n)=>e+u.visit(n,t),0)}visitFixedSizeBinary(e,t){return e.type.byteWidth}visitMap(e,t){return 8+e.children.reduce((e,n)=>e+u.visit(n,t),0)}visitDictionary(e,t){var n;return e.type.indices.bitWidth/8+((null===(n=e.dictionary)||void 0===n?void 0:n.getByteLength(e.values[t]))||0)}}const s=({type:e,children:t,typeIds:n,valueOffsets:r},i)=>{const o=e.typeIdToChildIndex[n[i]];return 8+u.visit(t[o],r[i])},l=({children:e},t)=>4+u.visitMany(e,e.map(()=>t)).reduce(o,0);a.prototype.visitUtf8=({valueOffsets:e},t)=>e[t+1]-e[t]+8,a.prototype.visitBinary=({valueOffsets:e},t)=>e[t+1]-e[t]+8,a.prototype.visitList=({valueOffsets:e,stride:t,children:n},r)=>{const i=n[0],{[r*t]:o}=e,{[r*t+1]:a}=e,s=u.getVisitFn(i.type),l=i.slice(o,a-o);let c=8;for(let e=-1,t=a-o;++e{const r=t[0],i=r.slice(n*e,e),o=u.getVisitFn(r.type);let a=0;for(let e=-1,t=i.length;++ee.type.mode===i.i.Dense?s(e,t):l(e,t),a.prototype.visitDenseUnion=s,a.prototype.visitSparseUnion=l;const u=new a},function(e,t,n){"use strict";function r(e){return+e}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return o}));const r=/\?.*/;function i(e){const t=e.match(r);return t&&t[0]}function o(e){return e.replace(r,"")}},function(e,t,n){"use strict";t.a=function(e,t){return[(t=+t)*Math.cos(e-=Math.PI/2),t*Math.sin(e)]}},function(e,t,n){"use strict";(function(e){var r=n(95),i=n(1156),o="object"==typeof exports&&exports&&!exports.nodeType&&exports,a=o&&"object"==typeof e&&e&&!e.nodeType&&e,s=a&&a.exports===o?r.a.Buffer:void 0,l=(s?s.isBuffer:void 0)||i.a;t.a=l}).call(this,n(623)(e))},function(e,t,n){"use strict";n.d(t,"b",(function(){return a})),n.d(t,"c",(function(){return p})),n.d(t,"a",(function(){return o}));function r(){}function i(e,t){var n=new r;if(e instanceof r)e.each((function(e,t){n.set(t,e)}));else if(Array.isArray(e)){var i,o=-1,a=e.length;if(null==t)for(;++o=r.length)return null!=e&&n.sort(e),null!=t?t(n):n;for(var u,c,d,f=-1,h=n.length,p=r[i++],A=o(),g=s();++fr.length)return n;var a,s=i[o-1];return null!=t&&o>=r.length?a=n.entries():(a=[],n.each((function(t,n){a.push({key:n,values:e(t,o)})}))),null!=s?a.sort((function(e,t){return s(e.key,t.key)})):a}(a(e,0,u,c),0)},key:function(e){return r.push(e),n},sortKeys:function(e){return i[r.length-1]=e,n},sortValues:function(t){return e=t,n},rollup:function(e){return t=e,n}}};function s(){return{}}function l(e,t,n){e[t]=n}function u(){return o()}function c(e,t,n){e.set(t,n)}function d(){}var f=o.prototype;function h(e,t){var n=new d;if(e instanceof d)e.each((function(e){n.add(e)}));else if(e){var r=-1,i=e.length;if(null==t)for(;++r1&&void 0!==arguments[1]?arguments[1]:{};var n,i;Object(r.b)(e),(t instanceof Promise||"string"==typeof t)&&(t={data:t}),"string"==typeof t.data&&(t=Object.assign({},t,{data:(n=t.data,Object(o.a)("string"==typeof n),n=a+n,new Promise((e,t)=>{try{const r=new Image;r.onload=()=>e(r),r.onerror=()=>t(new Error("Could not load image ".concat(n,"."))),r.crossOrigin=i&&i.crossOrigin||"anonymous",r.src=n}catch(e){t(e)}}))})),super(e,Object.assign({},t,{target:3553})),this.initialize(t),Object.seal(this)}}},function(e,t,n){"use strict";n.r(t),n.d(t,"BaseInt64",(function(){return o})),n.d(t,"Uint64",(function(){return a})),n.d(t,"Int64",(function(){return s})),n.d(t,"Int128",(function(){return l}));function r(e){return e<0&&(e=4294967295+e+1),"0x"+e.toString(16)}const i=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8];class o{constructor(e){this.buffer=e}high(){return this.buffer[1]}low(){return this.buffer[0]}_times(e){const t=new Uint32Array([this.buffer[1]>>>16,65535&this.buffer[1],this.buffer[0]>>>16,65535&this.buffer[0]]),n=new Uint32Array([e.buffer[1]>>>16,65535&e.buffer[1],e.buffer[0]>>>16,65535&e.buffer[0]]);let r=t[3]*n[3];this.buffer[0]=65535&r;let i=r>>>16;return r=t[2]*n[3],i+=r,r=t[3]*n[2]>>>0,i+=r,this.buffer[0]+=i<<16,this.buffer[1]=i>>>0>>16,this.buffer[1]+=t[1]*n[3]+t[2]*n[2]+t[3]*n[1],this.buffer[1]+=t[0]*n[3]+t[1]*n[2]+t[2]*n[1]+t[3]*n[0]<<16,this}_plus(e){const t=this.buffer[0]+e.buffer[0]>>>0;this.buffer[1]+=e.buffer[1],t>>0&&++this.buffer[1],this.buffer[0]=t}lessThan(e){return this.buffer[1]>>0,t[2]=this.buffer[2]+e.buffer[2]>>>0,t[1]=this.buffer[1]+e.buffer[1]>>>0,t[0]=this.buffer[0]+e.buffer[0]>>>0,t[0]>>0&&++t[1],t[1]>>0&&++t[2],t[2]>>0&&++t[3],this.buffer[3]=t[3],this.buffer[2]=t[2],this.buffer[1]=t[1],this.buffer[0]=t[0],this}hex(){return`${r(this.buffer[3])} ${r(this.buffer[2])} ${r(this.buffer[1])} ${r(this.buffer[0])}`}static multiply(e,t){return new l(new Uint32Array(e.buffer)).times(t)}static add(e,t){return new l(new Uint32Array(e.buffer)).plus(t)}static from(e,t=new Uint32Array(4)){return l.fromString("string"==typeof e?e:e.toString(),t)}static fromNumber(e,t=new Uint32Array(4)){return l.fromString(e.toString(),t)}static fromString(e,t=new Uint32Array(4)){const n=e.startsWith("-"),r=e.length,o=new l(t);for(let t=n?1:0;t=0&&(t["content-length"]=String(n));const o=Object(i.c)(e),a=Object(i.b)(e);a&&(t["content-type"]=a);const s=await async function(e){if("string"==typeof e)return"data:,"+e.slice(0,5);if(e instanceof Blob){const t=e.slice(0,5);return await new Promise(e=>{const n=new FileReader;n.onload=t=>{var n;return e(null==t||null===(n=t.target)||void 0===n?void 0:n.result)},n.readAsDataURL(t)})}if(e instanceof ArrayBuffer){const t=e.slice(0,5);return"data:base64,"+function(e){let t="";const n=new Uint8Array(e);for(let e=0;e60?t.slice(0,60)+"...":t}catch(e){}return t}(e);throw new Error(t)}}},function(e,t,n){var r,i=function(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0; +/** + * @license + * Copyright 2009 The Closure Library Authors + * Copyright 2020 Daniel Wirtz / The long.js Authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + */ +var t=null;try{t=new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([0,97,115,109,1,0,0,0,1,13,2,96,0,1,127,96,4,127,127,127,127,1,127,3,7,6,0,1,1,1,1,1,6,6,1,127,1,65,0,11,7,50,6,3,109,117,108,0,1,5,100,105,118,95,115,0,2,5,100,105,118,95,117,0,3,5,114,101,109,95,115,0,4,5,114,101,109,95,117,0,5,8,103,101,116,95,104,105,103,104,0,0,10,191,1,6,4,0,35,0,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,126,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,127,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,128,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,129,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,130,34,4,66,32,135,167,36,0,32,4,167,11])),{}).exports}catch(e){}function n(e,t,n){this.low=0|e,this.high=0|t,this.unsigned=!!n}function r(e){return!0===(e&&e.__isLong__)}function i(e){var t=Math.clz32(e&-e);return e?31-t:t}n.prototype.__isLong__,Object.defineProperty(n.prototype,"__isLong__",{value:!0}),n.isLong=r;var o={},a={};function s(e,t){var n,r,i;return t?(i=0<=(e>>>=0)&&e<256)&&(r=a[e])?r:(n=u(e,0,!0),i&&(a[e]=n),n):(i=-128<=(e|=0)&&e<128)&&(r=o[e])?r:(n=u(e,e<0?-1:0,!1),i&&(o[e]=n),n)}function l(e,t){if(isNaN(e))return t?y:m;if(t){if(e<0)return y;if(e>=p)return x}else{if(e<=-A)return M;if(e+1>=A)return w}return e<0?l(-e,t).neg():u(e%h|0,e/h|0,t)}function u(e,t,r){return new n(e,t,r)}n.fromInt=s,n.fromNumber=l,n.fromBits=u;var c=Math.pow;function d(e,t,n){if(0===e.length)throw Error("empty string");if("number"==typeof t?(n=t,t=!1):t=!!t,"NaN"===e||"Infinity"===e||"+Infinity"===e||"-Infinity"===e)return t?y:m;if((n=n||10)<2||360)throw Error("interior hyphen");if(0===r)return d(e.substring(1),t,n).neg();for(var i=l(c(n,8)),o=m,a=0;a>>0:this.low},E.toNumber=function(){return this.unsigned?(this.high>>>0)*h+(this.low>>>0):this.high*h+(this.low>>>0)},E.toString=function(e){if((e=e||10)<2||36>>0).toString(e);if((o=s).isZero())return u+a;for(;u.length<6;)u="0"+u;a=""+u+a}},E.getHighBits=function(){return this.high},E.getHighBitsUnsigned=function(){return this.high>>>0},E.getLowBits=function(){return this.low},E.getLowBitsUnsigned=function(){return this.low>>>0},E.getNumBitsAbs=function(){if(this.isNegative())return this.eq(M)?64:this.neg().getNumBitsAbs();for(var e=0!=this.high?this.high:this.low,t=31;t>0&&0==(e&1<=0},E.isOdd=function(){return 1==(1&this.low)},E.isEven=function(){return 0==(1&this.low)},E.equals=function(e){return r(e)||(e=f(e)),(this.unsigned===e.unsigned||this.high>>>31!=1||e.high>>>31!=1)&&(this.high===e.high&&this.low===e.low)},E.eq=E.equals,E.notEquals=function(e){return!this.eq(e)},E.neq=E.notEquals,E.ne=E.notEquals,E.lessThan=function(e){return this.comp(e)<0},E.lt=E.lessThan,E.lessThanOrEqual=function(e){return this.comp(e)<=0},E.lte=E.lessThanOrEqual,E.le=E.lessThanOrEqual,E.greaterThan=function(e){return this.comp(e)>0},E.gt=E.greaterThan,E.greaterThanOrEqual=function(e){return this.comp(e)>=0},E.gte=E.greaterThanOrEqual,E.ge=E.greaterThanOrEqual,E.compare=function(e){if(r(e)||(e=f(e)),this.eq(e))return 0;var t=this.isNegative(),n=e.isNegative();return t&&!n?-1:!t&&n?1:this.unsigned?e.high>>>0>this.high>>>0||e.high===this.high&&e.low>>>0>this.low>>>0?-1:1:this.sub(e).isNegative()?-1:1},E.comp=E.compare,E.negate=function(){return!this.unsigned&&this.eq(M)?M:this.not().add(v)},E.neg=E.negate,E.add=function(e){r(e)||(e=f(e));var t=this.high>>>16,n=65535&this.high,i=this.low>>>16,o=65535&this.low,a=e.high>>>16,s=65535&e.high,l=e.low>>>16,c=0,d=0,h=0,p=0;return h+=(p+=o+(65535&e.low))>>>16,d+=(h+=i+l)>>>16,c+=(d+=n+s)>>>16,c+=t+a,u((h&=65535)<<16|(p&=65535),(c&=65535)<<16|(d&=65535),this.unsigned)},E.subtract=function(e){return r(e)||(e=f(e)),this.add(e.neg())},E.sub=E.subtract,E.multiply=function(e){if(this.isZero())return this;if(r(e)||(e=f(e)),t)return u(t.mul(this.low,this.high,e.low,e.high),t.get_high(),this.unsigned);if(e.isZero())return this.unsigned?y:m;if(this.eq(M))return e.isOdd()?M:m;if(e.eq(M))return this.isOdd()?M:m;if(this.isNegative())return e.isNegative()?this.neg().mul(e.neg()):this.neg().mul(e).neg();if(e.isNegative())return this.mul(e.neg()).neg();if(this.lt(g)&&e.lt(g))return l(this.toNumber()*e.toNumber(),this.unsigned);var n=this.high>>>16,i=65535&this.high,o=this.low>>>16,a=65535&this.low,s=e.high>>>16,c=65535&e.high,d=e.low>>>16,h=65535&e.low,p=0,A=0,v=0,b=0;return v+=(b+=a*h)>>>16,A+=(v+=o*h)>>>16,v&=65535,A+=(v+=a*d)>>>16,p+=(A+=i*h)>>>16,A&=65535,p+=(A+=o*d)>>>16,A&=65535,p+=(A+=a*c)>>>16,p+=n*h+i*d+o*c+a*s,u((v&=65535)<<16|(b&=65535),(p&=65535)<<16|(A&=65535),this.unsigned)},E.mul=E.multiply,E.divide=function(e){if(r(e)||(e=f(e)),e.isZero())throw Error("division by zero");var n,i,o;if(t)return this.unsigned||-2147483648!==this.high||-1!==e.low||-1!==e.high?u((this.unsigned?t.div_u:t.div_s)(this.low,this.high,e.low,e.high),t.get_high(),this.unsigned):this;if(this.isZero())return this.unsigned?y:m;if(this.unsigned){if(e.unsigned||(e=e.toUnsigned()),e.gt(this))return y;if(e.gt(this.shru(1)))return b;o=y}else{if(this.eq(M))return e.eq(v)||e.eq(_)?M:e.eq(M)?v:(n=this.shr(1).div(e).shl(1)).eq(m)?e.isNegative()?v:_:(i=this.sub(e.mul(n)),o=n.add(i.div(e)));if(e.eq(M))return this.unsigned?y:m;if(this.isNegative())return e.isNegative()?this.neg().div(e.neg()):this.neg().div(e).neg();if(e.isNegative())return this.div(e.neg()).neg();o=m}for(i=this;i.gte(e);){n=Math.max(1,Math.floor(i.toNumber()/e.toNumber()));for(var a=Math.ceil(Math.log(n)/Math.LN2),s=a<=48?1:c(2,a-48),d=l(n),h=d.mul(e);h.isNegative()||h.gt(i);)h=(d=l(n-=s,this.unsigned)).mul(e);d.isZero()&&(d=v),o=o.add(d),i=i.sub(h)}return o},E.div=E.divide,E.modulo=function(e){return r(e)||(e=f(e)),t?u((this.unsigned?t.rem_u:t.rem_s)(this.low,this.high,e.low,e.high),t.get_high(),this.unsigned):this.sub(this.div(e).mul(e))},E.mod=E.modulo,E.rem=E.modulo,E.not=function(){return u(~this.low,~this.high,this.unsigned)},E.countLeadingZeros=function(){return this.high?Math.clz32(this.high):Math.clz32(this.low)+32},E.clz=E.countLeadingZeros,E.countTrailingZeros=function(){return this.low?i(this.low):i(this.high)+32},E.ctz=E.countTrailingZeros,E.and=function(e){return r(e)||(e=f(e)),u(this.low&e.low,this.high&e.high,this.unsigned)},E.or=function(e){return r(e)||(e=f(e)),u(this.low|e.low,this.high|e.high,this.unsigned)},E.xor=function(e){return r(e)||(e=f(e)),u(this.low^e.low,this.high^e.high,this.unsigned)},E.shiftLeft=function(e){return r(e)&&(e=e.toInt()),0==(e&=63)?this:e<32?u(this.low<>>32-e,this.unsigned):u(0,this.low<>>e|this.high<<32-e,this.high>>e,this.unsigned):u(this.high>>e-32,this.high>=0?0:-1,this.unsigned)},E.shr=E.shiftRight,E.shiftRightUnsigned=function(e){return r(e)&&(e=e.toInt()),0==(e&=63)?this:e<32?u(this.low>>>e|this.high<<32-e,this.high>>>e,this.unsigned):u(32===e?this.high:this.high>>>e-32,0,this.unsigned)},E.shru=E.shiftRightUnsigned,E.shr_u=E.shiftRightUnsigned,E.rotateLeft=function(e){var t;return r(e)&&(e=e.toInt()),0==(e&=63)?this:32===e?u(this.high,this.low,this.unsigned):e<32?(t=32-e,u(this.low<>>t,this.high<>>t,this.unsigned)):(t=32-(e-=32),u(this.high<>>t,this.low<>>t,this.unsigned))},E.rotl=E.rotateLeft,E.rotateRight=function(e){var t;return r(e)&&(e=e.toInt()),0==(e&=63)?this:32===e?u(this.high,this.low,this.unsigned):e<32?(t=32-e,u(this.high<>>e,this.low<>>e,this.unsigned)):(t=32-(e-=32),u(this.low<>>e,this.high<>>e,this.unsigned))},E.rotr=E.rotateRight,E.toSigned=function(){return this.unsigned?u(this.low,this.high,!1):this},E.toUnsigned=function(){return this.unsigned?this:u(this.low,this.high,!0)},E.toBytes=function(e){return e?this.toBytesLE():this.toBytesBE()},E.toBytesLE=function(){var e=this.high,t=this.low;return[255&t,t>>>8&255,t>>>16&255,t>>>24,255&e,e>>>8&255,e>>>16&255,e>>>24]},E.toBytesBE=function(){var e=this.high,t=this.low;return[e>>>24,e>>>16&255,e>>>8&255,255&e,t>>>24,t>>>16&255,t>>>8&255,255&t]},n.fromBytes=function(e,t,r){return r?n.fromBytesLE(e,t):n.fromBytesBE(e,t)},n.fromBytesLE=function(e,t){return new n(e[0]|e[1]<<8|e[2]<<16|e[3]<<24,e[4]|e[5]<<8|e[6]<<16|e[7]<<24,t)},n.fromBytesBE=function(e,t){return new n(e[4]<<24|e[5]<<16|e[6]<<8|e[7],e[0]<<24|e[1]<<16|e[2]<<8|e[3],t)};var O=n;return e.default=O,"default"in e?e.default:e}({});void 0===(r=function(){return i}.apply(t,[]))||(e.exports=r)},function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var r=n(115);const i="EXT_color_buffer_float";var o={33189:{bpp:2},33190:{gl2:!0,bpp:3},36012:{gl2:!0,bpp:4},36168:{bpp:1},34041:{bpp:4},35056:{gl2:!0,bpp:4},36013:{gl2:!0,bpp:5},32854:{bpp:2},36194:{bpp:2},32855:{bpp:2},33321:{gl2:!0,bpp:1},33330:{gl2:!0,bpp:1},33329:{gl2:!0,bpp:1},33332:{gl2:!0,bpp:2},33331:{gl2:!0,bpp:2},33334:{gl2:!0,bpp:4},33333:{gl2:!0,bpp:4},33323:{gl2:!0,bpp:2},33336:{gl2:!0,bpp:2},33335:{gl2:!0,bpp:2},33338:{gl2:!0,bpp:4},33337:{gl2:!0,bpp:4},33340:{gl2:!0,bpp:8},33339:{gl2:!0,bpp:8},32849:{gl2:!0,bpp:3},32856:{gl2:!0,bpp:4},32857:{gl2:!0,bpp:4},36220:{gl2:!0,bpp:4},36238:{gl2:!0,bpp:4},36975:{gl2:!0,bpp:4},36214:{gl2:!0,bpp:8},36232:{gl2:!0,bpp:8},36226:{gl2:!0,bpp:16},36208:{gl2:!0,bpp:16},33325:{gl2:i,bpp:2},33327:{gl2:i,bpp:4},34842:{gl2:i,bpp:8},33326:{gl2:i,bpp:4},33328:{gl2:i,bpp:8},34836:{gl2:i,bpp:16},35898:{gl2:i,bpp:4}},a=n(17),s=n(28);class l extends r.a{get[Symbol.toStringTag](){return"Renderbuffer"}static isSupported(e){let{format:t}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{format:null};return!t||function(e,t,n){const r=n[t];if(!r)return!1;const i=Object(a.j)(e)&&r.gl2||r.gl1;return"string"==typeof i?e.getExtension(i):i}(e,t,o)}static getSamplesForFormat(e,t){let{format:n}=t;return e.getInternalformatParameter(36161,n,32937)}constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};super(e,t),this.initialize(t),Object.seal(this)}initialize(e){let{format:t,width:n=1,height:r=1,samples:i=0}=e;return Object(s.a)(t,"Needs format"),this._trackDeallocatedMemory(),this.gl.bindRenderbuffer(36161,this.handle),0!==i&&Object(a.j)(this.gl)?this.gl.renderbufferStorageMultisample(36161,i,t,n,r):this.gl.renderbufferStorage(36161,t,n,r),this.format=t,this.width=n,this.height=r,this.samples=i,this._trackAllocatedMemory(this.width*this.height*(this.samples||1)*o[this.format].bpp),this}resize(e){let{width:t,height:n}=e;return t!==this.width||n!==this.height?this.initialize({width:t,height:n,format:this.format,samples:this.samples}):this}_createHandle(){return this.gl.createRenderbuffer()}_deleteHandle(){this.gl.deleteRenderbuffer(this.handle),this._trackDeallocatedMemory()}_bindHandle(e){this.gl.bindRenderbuffer(36161,e)}_syncHandle(e){this.format=this.getParameter(36164),this.width=this.getParameter(36162),this.height=this.getParameter(36163),this.samples=this.getParameter(36011)}_getParameter(e){this.gl.bindRenderbuffer(36161,this.handle);return this.gl.getRenderbufferParameter(36161,e)}}},function(e,t,n){"use strict";function r(e,t){if(!e)throw new Error(t||"shadertools: assertion failed.")}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";(function(e){n.d(t,"b",(function(){return r})),n.d(t,"c",(function(){return i})),n.d(t,"a",(function(){return o}));const r="undefined"!=typeof navigator&&navigator.userAgent?navigator.userAgent.toLowerCase():"",i="undefined"!=typeof window?window:e;void 0!==e||window,"undefined"!=typeof document&&document;let o=!1;try{const e={get passive(){return o=!0,!0}};i.addEventListener("test",null,e),i.removeEventListener("test",null)}catch(e){o=!1}}).call(this,n(68))},function(e,t,n){"use strict";n.d(t,"b",(function(){return f})),n.d(t,"a",(function(){return h}));var r=n(17);function i(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"unnamed";const n=/#define[\s*]SHADER_NAME[\s*]([A-Za-z0-9_-]+)[\s*]/,r=e.match(n);return r?r[1]:t}function o(e,t,n,r){const o=e.split(/\r?\n/),l={},u={},c=r||i(t)||"(unnamed)",d="".concat(function(e){switch(e){case 35632:return"fragment";case 35633:return"vertex";default:return"unknown type"}}(n)," shader ").concat(c);for(let t=0;t1&&void 0!==arguments[1]?arguments[1]:1,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:": ";const r=e.split(/\r?\n/),i=String(r.length+t-1).length;return r.map((e,r)=>{const o=String(r+t),a=o.length;return s(o,i-a)+n+e})}(t);return{shaderName:d,errors:a(l,f),warnings:a(u,f)}}function a(e,t){let n="";for(let r=0;r0&&void 0!==arguments[0]?arguments[0]:this.source;e.startsWith("#version ")||(e="#version 100\n".concat(e)),this.source=e,this.gl.shaderSource(this.handle,this.source),this.gl.compileShader(this.handle);if(!this.getParameter(35713)){const e=this.gl.getShaderInfoLog(this.handle),{shaderName:t,errors:n,warnings:i}=o(e,this.source,this.shaderType,this.id);throw r.k.error("GLSL compilation errors in ".concat(t,"\n").concat(n))(),r.k.warn("GLSL compilation warnings in ".concat(t,"\n").concat(i))(),new Error("GLSL compilation errors in ".concat(t))}}_deleteHandle(){this.gl.deleteShader(this.handle)}_getOptsFromHandle(){return{type:this.getParameter(35663),source:this.getSource()}}}class f extends d{get[Symbol.toStringTag](){return"VertexShader"}constructor(e,t){"string"==typeof t&&(t={source:t}),super(e,Object.assign({},t,{shaderType:35633}))}_createHandle(){return this.gl.createShader(35633)}}class h extends d{get[Symbol.toStringTag](){return"FragmentShader"}constructor(e,t){"string"==typeof t&&(t={source:t}),super(e,Object.assign({},t,{shaderType:35632}))}_createHandle(){return this.gl.createShader(35632)}}},,,,,function(e,t,n){"use strict";n.r(t),n.d(t,"MiddlewareArray",(function(){return M})),n.d(t,"configureStore",(function(){return P})),n.d(t,"createAction",(function(){return I})),n.d(t,"createAsyncThunk",(function(){return K})),n.d(t,"createDraftSafeSelector",(function(){return _})),n.d(t,"createEntityAdapter",(function(){return G})),n.d(t,"createImmutableStateInvariantMiddleware",(function(){return O})),n.d(t,"createReducer",(function(){return j})),n.d(t,"createSerializableStateInvariantMiddleware",(function(){return C})),n.d(t,"createSlice",(function(){return F})),n.d(t,"findNonSerializableValue",(function(){return T})),n.d(t,"getDefaultMiddleware",(function(){return L})),n.d(t,"getType",(function(){return k})),n.d(t,"isAllOf",(function(){return ee})),n.d(t,"isAnyOf",(function(){return $})),n.d(t,"isAsyncThunkAction",(function(){return se})),n.d(t,"isFulfilled",(function(){return ae})),n.d(t,"isImmutableDefault",(function(){return E})),n.d(t,"isPending",(function(){return re})),n.d(t,"isPlain",(function(){return S})),n.d(t,"isPlainObject",(function(){return x})),n.d(t,"isRejected",(function(){return ie})),n.d(t,"isRejectedWithValue",(function(){return oe})),n.d(t,"miniSerializeError",(function(){return Z})),n.d(t,"nanoid",(function(){return Y})),n.d(t,"unwrapResult",(function(){return Q}));var r=n(97),i=n(159);for(var o in i)["default","MiddlewareArray","configureStore","createAction","createAsyncThunk","createDraftSafeSelector","createEntityAdapter","createImmutableStateInvariantMiddleware","createNextState","createReducer","createSelector","createSerializableStateInvariantMiddleware","createSlice","current","findNonSerializableValue","freeze","getDefaultMiddleware","getType","isAllOf","isAnyOf","isAsyncThunkAction","isDraft","isFulfilled","isImmutableDefault","isPending","isPlain","isPlainObject","isRejected","isRejectedWithValue","miniSerializeError","nanoid","original","unwrapResult"].indexOf(o)<0&&function(e){n.d(t,e,(function(){return i[e]}))}(o);n.d(t,"createNextState",(function(){return r.b})),n.d(t,"current",(function(){return r.a})),n.d(t,"freeze",(function(){return r.d})),n.d(t,"isDraft",(function(){return r.e})),n.d(t,"original",(function(){return r.g}));var a=n(528);n.d(t,"createSelector",(function(){return a.a}));var s,l=n(669),u=(s=function(e,t){return(s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}s(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),c=function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]",value:e};if("object"!=typeof e||null===e)return!1;for(var a=null!=r?r(e):Object.entries(e),s=i.length>0,l=0,u=a;l=0)){if(!n(f))return{keyPath:h,value:f};if("object"==typeof f&&(o=T(f,h,n,r,i)))return o}}return!1}function C(e){return void 0===e&&(e={}),function(){return function(e){return function(t){return e(t)}}}}function L(e){void 0===e&&(e={});var t=e.thunk,n=void 0===t||t,r=(e.immutableCheck,e.serializableCheck,new M);return n&&("boolean"==typeof n?r.push(l.a):r.push(l.a.withExtraArgument(n.extraArgument))),r}function P(e){var t,n=function(e){return L(e)},r=e||{},o=r.reducer,a=void 0===o?void 0:o,s=r.middleware,l=void 0===s?n():s,u=r.devTools,c=void 0===u||u,f=r.preloadedState,h=void 0===f?void 0:f,p=r.enhancers,A=void 0===p?void 0:p;if("function"==typeof a)t=a;else{if(!x(a))throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');t=Object(i.combineReducers)(a)}var g=l;"function"==typeof g&&(g=g(n));var m=i.applyMiddleware.apply(void 0,g),y=i.compose;c&&(y=w(v({trace:!1},"object"==typeof c&&c)));var b=[m];Array.isArray(A)?b=d([m],A):"function"==typeof A&&(b=A(b));var _=y.apply(void 0,b);return Object(i.createStore)(t,h,_)}function I(e,t){function n(){for(var n=[],r=0;r-1}function k(e){return""+e}function R(e){var t,n={},r=[],i={addCase:function(e,t){var r="string"==typeof e?e:e.type;if(r in n)throw new Error("addCase cannot be called with two reducers for the same action type");return n[r]=t,i},addMatcher:function(e,t){return r.push({matcher:e,reducer:t}),i},addDefaultCase:function(e){return t=e,i}};return e(i),[n,r,t]}function j(e,t,n,i){void 0===n&&(n=[]);var o,a="function"==typeof t?R(t):[t,n,i],s=a[0],l=a[1],u=a[2];if("function"==typeof e)o=function(){return Object(r.b)(e(),(function(){}))};else{var c=Object(r.b)(e,(function(){}));o=function(){return c}}function f(e,t){void 0===e&&(e=o());var n=d([s[t.type]],l.filter((function(e){return(0,e.matcher)(t)})).map((function(e){return e.reducer})));return 0===n.filter((function(e){return!!e})).length&&(n=[u]),n.reduce((function(e,n){if(n){var i;if(Object(r.e)(e))return void 0===(i=n(e,t))?e:i;if(Object(r.f)(e))return Object(r.b)(e,(function(e){return n(e,t)}));if(void 0===(i=n(e,t))){if(null===e)return e;throw Error("A case reducer on a non-draftable value must not return undefined")}return i}return e}),e)}return f.getInitialState=o,f}function F(e){var t=e.name;if(!t)throw new Error("`name` is a required option for createSlice");var n,i="function"==typeof e.initialState?e.initialState:Object(r.b)(e.initialState,(function(){})),o=e.reducers||{},a=Object.keys(o),s={},l={},u={};function c(){var t="function"==typeof e.extraReducers?R(e.extraReducers):[e.extraReducers],n=t[0],r=void 0===n?{}:n,o=t[1],a=void 0===o?[]:o,s=t[2],u=void 0===s?void 0:s,c=v(v({},r),l);return j(i,c,a,u)}return a.forEach((function(e){var n,r,i=o[e],a=t+"/"+e;"reducer"in i?(n=i.reducer,r=i.prepare):n=i,s[e]=n,l[a]=n,u[e]=r?I(a,r):I(a)})),{name:t,reducer:function(e,t){return n||(n=c()),n(e,t)},actions:u,caseReducers:s,getInitialState:function(){return n||(n=c()),n.getInitialState()}}}function N(e){return function(t,n){function i(e){return x(t=e)&&"string"==typeof t.type&&Object.keys(t).every(D);var t}var o=function(t){i(n)?e(n.payload,t):e(n,t)};return Object(r.e)(t)?(o(t),t):Object(r.b)(t,o)}}function B(e,t){return t(e)}function z(e){return Array.isArray(e)||(e=Object.values(e)),e}function U(e,t,n){for(var r=[],i=[],o=0,a=e=z(e);o0)&&(t.filter((function(t){return function(t,n,r){var i=r.entities[n.id],o=Object.assign({},i,n.changes),a=B(o,e),s=a!==n.id;return s&&(t[n.id]=a,delete r.entities[n.id]),r.entities[a]=o,s}(r,t,n)})).length>0&&(n.ids=n.ids.map((function(e){return r[e]||e}))))}function a(t,r){var i=U(t,e,r),a=i[0];o(i[1],r),n(a,r)}return{removeAll:(s=function(e){Object.assign(e,{ids:[],entities:{}})},l=N((function(e,t){return s(t)})),function(e){return l(e,void 0)}),addOne:N(t),addMany:N(n),setOne:N(r),setMany:N((function(e,t){for(var n=0,i=e=z(e);n-1;return n&&r}function ne(e){return"function"==typeof e[0]&&"pending"in e[0]&&"fulfilled"in e[0]&&"rejected"in e[0]}function re(){for(var e=[],t=0;t-1},oe.prototype.set=function(e,t){var n=this.__data__,r=ce(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},ae.prototype.clear=function(){this.__data__={hash:new ie,map:new(W||oe),string:new ie}},ae.prototype.delete=function(e){return Ae(this,e).delete(e)},ae.prototype.get=function(e){return Ae(this,e).get(e)},ae.prototype.has=function(e){return Ae(this,e).has(e)},ae.prototype.set=function(e,t){return Ae(this,e).set(e,t),this},se.prototype.clear=function(){this.__data__=new oe},se.prototype.delete=function(e){return this.__data__.delete(e)},se.prototype.get=function(e){return this.__data__.get(e)},se.prototype.has=function(e){return this.__data__.has(e)},se.prototype.set=function(e,t){var n=this.__data__;if(n instanceof oe){var r=n.__data__;if(!W||r.length<199)return r.push([e,t]),this;n=this.__data__=new ae(r)}return n.set(e,t),this};var me=H?x(H,Object):function(){return[]},ye=function(e){return D.call(e)};function ve(e,t){return!!(t=null==t?9007199254740991:t)&&("number"==typeof e||c.test(e))&&e>-1&&e%1==0&&e-1&&e%1==0&&e<=9007199254740991}(e.length)&&!Oe(e)}var Ee=V||function(){return!1};function Oe(e){var t=Se(e)?D.call(e):"";return t==i||t==o}function Se(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function Te(e){return Me(e)?le(e):function(e){if(!be(e))return G(e);var t=[];for(var n in Object(e))I.call(e,n)&&"constructor"!=n&&t.push(n);return t}(e)}n.exports=function(e){return de(e,!0,!0)}}).call(this,n(68),n(219)(e))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SIZE_PREFIX_LENGTH=t.FILE_IDENTIFIER_LENGTH=t.SIZEOF_INT=t.SIZEOF_SHORT=void 0,t.SIZEOF_SHORT=2,t.SIZEOF_INT=4,t.FILE_IDENTIFIER_LENGTH=4,t.SIZE_PREFIX_LENGTH=4},function(e,t,n){"use strict";var r=n(3);Object.defineProperty(t,"__esModule",{value:!0}),t.unique=function(e){var t=[];return new Set(e).forEach((function(e){p(e)&&t.push(e)})),t},t.getLatLngBounds=function(e,t,n){var r=e.map((function(e){return Number(Array.isArray(e))&&e[t]})).filter(Number.isFinite).sort(g);if(!r.length)return null;return[Math.max(r[0],n[0]),Math.min(r[r.length-1],n[1])]},t.clamp=function(e){var t=(0,s.default)(e,2),n=t[0],r=t[1],i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return i<=n?n:i>=r?r:i},t.getSampleData=function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:500,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(e){return e},r=Math.max(Math.floor(e.length/t),1),i=[],o=0;o0?1:0)*(Math.sign(e)*(10/Math.pow(100,t))))/n).toFixed(t)}function y(e){return Number("".concat(Math.round("".concat(e,"e+4")),"e-4"))}function v(e){isNaN(e)&&((0,l.default)("step is not a number"),(0,l.default)(e));var t=e.toString(),n=t.split("e-");if(2===n.length){var r=n[0].split("."),i=1===r.length?0:r[1].length;return parseInt(n[1],10)+i}var o=t.split(".");return 1===o.length?0:o[1].length}function b(e,t,n){if(!A(t)||!A(e))return n;var r=v(t),i=Math.floor((n-e)/t),o=n-(i*t+e);o=Number(m(o,8));var a=m(0===o?n:o0&&void 0!==arguments[0]?arguments[0]:{};const{version:t=100,input:n,inputType:r,output:s}=e;if(!n)return 300===t?a:t>300?"#version ".concat(t,"\n").concat(o):i;const l=d(n,r);return t>=300?"#version ".concat(t," ").concat(300===t?"es":"","\nin ").concat(r," ").concat(n,";\nout vec4 ").concat(s,";\nvoid main() {\n ").concat(s," = ").concat(l,";\n}"):"varying ".concat(r," ").concat(n,";\nvoid main() {\n gl_FragColor = ").concat(l,";\n}")}function u(e){switch(e){case"float":return"x";case"vec2":return"xy";case"vec3":return"xyz";case"vec4":return"xyzw";default:return Object(r.a)(!1),null}}function c(e){switch(e){case"float":return 1;case"vec2":return 2;case"vec3":return 3;case"vec4":return 4;default:return Object(r.a)(!1),null}}function d(e,t){switch(t){case"float":return"vec4(".concat(e,", 0.0, 0.0, 1.0)");case"vec2":return"vec4(".concat(e,", 0.0, 1.0)");case"vec3":return"vec4(".concat(e,", 1.0)");case"vec4":return e;default:return Object(r.a)(!1),null}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return o}));var r=n(188);function i(e,t,n,i){const o=Object(r.b)(n.byteLength,i),a=o-n.byteLength;if(e){const r=new Uint8Array(e.buffer,e.byteOffset+t,n.byteLength),i=new Uint8Array(n);r.set(i);for(let r=0;r1&&n&&"Polygon"===n.geometry.type){var r={type:"Feature",properties:{shape:n.properties.shape},geometry:{type:"Polygon",coordinates:n.geometry.coordinates}},i=this.getAddFeatureOrBooleanPolygonAction(r,e);this.resetClickSequence(),i&&e.onEdit(i)}}},{key:"getGuides",value:function(e){var t=e.lastPointerMoveEvent,n=e.modeConfig,r=this.getClickSequence(),i={type:"FeatureCollection",features:[]};if(0===r.length)return i;var o=r[0],a=t.mapCoords,s=this.getTwoClickPolygon(o,a,n);return s&&i.features.push({type:"Feature",properties:{shape:s.properties&&s.properties.shape,guideType:"tentative"},geometry:s.geometry}),i}},{key:"getTwoClickPolygon",value:function(e,t,n){return null}},{key:"handlePointerMove",value:function(e,t){t.onUpdateCursor("cell"),a(u(h.prototype),"handlePointerMove",this).call(this,e,t)}},{key:"createTentativeFeature",value:function(e){var t,n=e.lastPointerMoveEvent,r=this.getClickSequence(),i=n?[n.mapCoords]:[];return 1===r.length&&(t=this.getTwoClickPolygon(r[0],i[0],e.modeConfig)),t}}])&&o(n.prototype,r),d&&o(n,d),h}(n(93).GeoJsonEditMode);t.TwoClickPolygonMode=d},function(e,t,n){"use strict";var r=n(3);Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.IconButton=void 0;var i,o=r(n(15)),a=r(n(14)),s=n(29),l=(0,a.default)(s.Button)(i||(i=(0,o.default)(["\n width: ","px;\n height: 32px;\n color: ",";\n background-color: ",";\n border-radius: 4px;\n margin-left: 7px;\n border: 0;\n padding: 0;\n\n .__react_component_tooltip {\n font-family: ",";\n }\n svg {\n margin: 0;\n }\n &.active {\n background-color: ",";\n }\n"])),(function(e){return e.collapsed?0:32}),(function(e){return e.theme.playbackButtonColor}),(function(e){return e.theme.playbackButtonBgColor}),(function(e){return e.theme.fontFamily}),(function(e){return e.theme.playbackButtonActBgColor}));t.IconButton=l;var u=l;t.default=u},function(e,t){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},function(e,t,n){"use strict";var r=n(3);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i,o,a=r(n(15)),s=r(n(0)),l=r(n(14)),u=r(n(51)),c=l.default.div.attrs((function(e){return{className:(0,u.default)("panel-title",e.className)}}))(i||(i=(0,a.default)(["\n color: ",";\n font-size: ",";\n line-height: ",";\n font-weight: 400;\n letter-spacing: 1.25px;\n"])),(function(e){return e.theme.titleTextColor}),(function(e){return e.theme.sidePanelTitleFontsize}),(function(e){return e.theme.sidePanelTitleLineHeight})),d=l.default.div.attrs({className:"layer-manager-header"})(o||(o=(0,a.default)(["\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin-top: 16px;\n margin-bottom: 32px;\n"]))),f=function(){return function(e){var t=e.title,n=e.className,r=e.children;return s.default.createElement(d,null,s.default.createElement(c,{className:n||"panel-title"},t),r)}};t.default=f},function(e,t,n){"use strict";var r=n(3);Object.defineProperty(t,"__esModule",{value:!0}),t.arePointsEqual=function(e,t){var n=Array.isArray(e)?e[0]:e?e.x:0,r=Array.isArray(e)?e[1]:e?e.y:0,i=Array.isArray(t)?t[0]:t?t.x:0,o=Array.isArray(t)?t[1]:t?t.y:0;return n===i&&r===o},t.deepEqual=function e(t,n){if(t===n)return!0;if(!t||!n)return!1;if(Array.isArray(t)){if(!Array.isArray(n)||t.length!==n.length)return!1;for(var r=0;r1?n-1:0),i=1;i1?t-1:0),r=1;r2?n-2:0),a=2;a{const e=Object(i.b)();return e.loaderRegistry=e.loaderRegistry||[],e.loaderRegistry};function a(e){const t=o();e=Array.isArray(e)?e:[e];for(const n of e){const e=Object(r.b)(n);t.find(t=>e===t)||t.unshift(e)}}function s(){return o()}function l(){Object(i.b)().loaderRegistry=[]}},function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var r=n(236),i=n(117),o=n(66);const a=Symbol.for("parent"),s=Symbol.for("rowIndex");class l{constructor(e,t){return this[a]=e,this[s]=t,new Proxy(this,new c)}toArray(){return Object.values(this.toJSON())}toJSON(){const e=this[s],t=this[a],n=t.type.children,r={};for(let o=-1,a=n.length;++o`${Object(r.a)(e)}: ${Object(r.a)(t)}`).join(", ")}}`}[Symbol.for("nodejs.util.inspect.custom")](){return this.toString()}[Symbol.iterator](){return new u(this[a],this[s])}}class u{constructor(e,t){this.childIndex=0,this.children=e.children,this.rowIndex=t,this.childFields=e.type.children,this.numChildren=this.childFields.length}[Symbol.iterator](){return this}next(){const e=this.childIndex;return ee.name)}has(e,t){return-1!==e[a].type.children.findIndex(e=>e.name===t)}getOwnPropertyDescriptor(e,t){if(-1!==e[a].type.children.findIndex(e=>e.name===t))return{writable:!0,enumerable:!0,configurable:!0}}get(e,t){if(Reflect.has(e,t))return e[t];const n=e[a].type.children.findIndex(e=>e.name===t);if(-1!==n){const r=i.a.visit(e[a].children[n],e[s]);return Reflect.set(e,t,r),r}}set(e,t,n){const r=e[a].type.children.findIndex(e=>e.name===t);return-1!==r?(o.a.visit(e[a].children[r],e[s],n),Reflect.set(e,t,n)):!(!Reflect.has(e,t)&&"symbol"!=typeof t)&&Reflect.set(e,t,n)}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(26),i=n(137),o=n(61);class a extends o.c{constructor(e){super(e),this._values=new i.b(new Uint8Array(0))}get byteLength(){let e=this._pendingLength+4*this.length;return this._offsets&&(e+=this._offsets.byteLength),this._values&&(e+=this._values.byteLength),this._nulls&&(e+=this._nulls.byteLength),e}setValue(e,t){return super.setValue(e,Object(r.toUint8Array)(t))}_flushPending(e,t){const n=this._offsets,r=this._values.reserve(t).buffer;let i=0;for(const[t,o]of e)if(void 0===o)n.set(t,0);else{const e=o.length;r.set(o,i),n.set(t,e),i+=e}}}},function(e,t,n){"use strict";var r={},i={};function o(e){return new Function("d","return {"+e.map((function(e,t){return JSON.stringify(e)+": d["+t+'] || ""'})).join(",")+"}")}function a(e){var t=Object.create(null),n=[];return e.forEach((function(e){for(var r in e)r in t||n.push(t[r]=r)})),n}function s(e,t){var n=e+"",r=n.length;return r9999?"+"+s(t,6):s(t,4))+"-"+s(e.getUTCMonth()+1,2)+"-"+s(e.getUTCDate(),2)+(o?"T"+s(n,2)+":"+s(r,2)+":"+s(i,2)+"."+s(o,3)+"Z":i?"T"+s(n,2)+":"+s(r,2)+":"+s(i,2)+"Z":r||n?"T"+s(n,2)+":"+s(r,2)+"Z":"")}t.a=function(e){var t=new RegExp('["'+e+"\n\r]"),n=e.charCodeAt(0);function s(e,t){var o,a=[],s=e.length,l=0,u=0,c=s<=0,d=!1;function f(){if(c)return i;if(d)return d=!1,r;var t,o,a=l;if(34===e.charCodeAt(a)){for(;l++=s?c=!0:10===(o=e.charCodeAt(l++))?d=!0:13===o&&(d=!0,10===e.charCodeAt(l)&&++l),e.slice(a+1,t-1).replace(/""/g,'"')}for(;l0){for(;f<=h;++f)for(c=1,u=n(f);cl)break;g.push(d)}}else for(;f<=h;++f)for(c=p-1,u=n(f);c>=1;--c)if(!((d=u*c)l)break;g.push(d)}2*g.lengthsuper.render({target:a,layers:e,layerFilter:t,views:n,viewports:r,onViewportActive:i,cullRect:h,effects:null==p?void 0:p.filter(e=>e.useInPicking),pass:A,isPicking:!0,moduleParameters:m}));this._colorEncoderState=null;return{decodePickingColor:v&&u.bind(null,v),stats:b}}shouldDrawLayer(e){const{pickable:t,operation:n}=e.props;return t&&n.includes("draw")||n.includes("terrain")||n.includes("mask")}getModuleParameters(){return{pickingActive:1,pickingAttribute:this.pickZ,lightSources:{}}}getLayerParameters(e,t,n){const r={...e.props.parameters},{pickable:i,operation:o}=e.props;return this._colorEncoderState?i&&o.includes("draw")&&(Object.assign(r,s),r.blend=!0,r.blendColor=function(e,t,n){const{byLayer:r,byAlpha:i}=e;let o,s=r.get(t);s?(s.viewports.push(n),o=s.a):(o=r.size+1,o<=255?(s={a:o,layer:t,viewports:[n]},r.set(t,s),i[o]=s):(a.a.warn("Too many pickable layers, only picking the first 255")(),o=0));return[0,0,0,o/255]}(this._colorEncoderState,e,n)):r.blend=!1,o.includes("terrain")&&(r.blend=!1),r}_resetColorEncoder(e){return this._colorEncoderState=e?null:{byLayer:new Map,byAlpha:[]},this._colorEncoderState}}function u(e,t){const n=e.byAlpha[t[3]];return n&&{pickedLayer:n.layer,pickedViewports:n.viewports,pickedObjectIndex:n.layer.decodePickingColor(t)}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return c})),n.d(t,"b",(function(){return d}));var r=n(1),i=n(52),o=n(172),a=n(370),s=n(47),l=n(85),u=n(147);class c extends a.a{constructor(e){const{width:t,height:n,latitude:i,longitude:o,zoom:a,bearing:s=0,pitch:u=0,altitude:c=1.5,position:d=[0,0,0],maxZoom:f=20,minZoom:h=0,maxPitch:p=60,minPitch:A=0,startPanLngLat:g,startZoomLngLat:m,startRotatePos:y,startBearing:v,startPitch:b,startZoom:_,normalize:w=!0}=e;Object(l.a)(Number.isFinite(o)),Object(l.a)(Number.isFinite(i)),Object(l.a)(Number.isFinite(a)),super({width:t,height:n,latitude:i,longitude:o,zoom:a,bearing:s,pitch:u,altitude:c,maxZoom:f,minZoom:h,maxPitch:p,minPitch:A,normalize:w,position:d},{startPanLngLat:g,startZoomLngLat:m,startRotatePos:y,startBearing:v,startPitch:b,startZoom:_}),Object(r.a)(this,"makeViewport",void 0),this.makeViewport=e.makeViewport}panStart({pos:e}){return this._getUpdatedState({startPanLngLat:this._unproject(e)})}pan({pos:e,startPos:t}){const n=this.getState().startPanLngLat||this._unproject(t);if(!n)return this;const r=this.makeViewport(this.getViewportProps()).panByPosition(n,e);return this._getUpdatedState(r)}panEnd(){return this._getUpdatedState({startPanLngLat:null})}rotateStart({pos:e}){return this._getUpdatedState({startRotatePos:e,startBearing:this.getViewportProps().bearing,startPitch:this.getViewportProps().pitch})}rotate({pos:e,deltaAngleX:t=0,deltaAngleY:n=0}){const{startRotatePos:r,startBearing:i,startPitch:o}=this.getState();if(!r||void 0===i||void 0===o)return this;let a;return a=e?this._getNewRotation(e,r,o,i):{bearing:i+t,pitch:o+n},this._getUpdatedState(a)}rotateEnd(){return this._getUpdatedState({startBearing:null,startPitch:null})}zoomStart({pos:e}){return this._getUpdatedState({startZoomLngLat:this._unproject(e),startZoom:this.getViewportProps().zoom})}zoom({pos:e,startPos:t,scale:n}){let{startZoom:r,startZoomLngLat:o}=this.getState();if(o||(r=this.getViewportProps().zoom,o=this._unproject(t)||this._unproject(e)),!o)return this;const{maxZoom:a,minZoom:s}=this.getViewportProps();let l=r+Math.log2(n);l=Object(i.a)(l,s,a);const u=this.makeViewport({...this.getViewportProps(),zoom:l});return this._getUpdatedState({zoom:l,...u.panByPosition(o,e)})}zoomEnd(){return this._getUpdatedState({startZoomLngLat:null,startZoom:null})}zoomIn(e=2){return this._zoomFromCenter(e)}zoomOut(e=2){return this._zoomFromCenter(1/e)}moveLeft(e=100){return this._panFromCenter([e,0])}moveRight(e=100){return this._panFromCenter([-e,0])}moveUp(e=100){return this._panFromCenter([0,e])}moveDown(e=100){return this._panFromCenter([0,-e])}rotateLeft(e=15){return this._getUpdatedState({bearing:this.getViewportProps().bearing-e})}rotateRight(e=15){return this._getUpdatedState({bearing:this.getViewportProps().bearing+e})}rotateUp(e=10){return this._getUpdatedState({pitch:this.getViewportProps().pitch+e})}rotateDown(e=10){return this._getUpdatedState({pitch:this.getViewportProps().pitch-e})}shortestPathFrom(e){const t=e.getViewportProps(),n={...this.getViewportProps()},{bearing:r,longitude:i}=n;return Math.abs(r-t.bearing)>180&&(n.bearing=r<0?r+360:r-360),Math.abs(i-t.longitude)>180&&(n.longitude=i<0?i+360:i-360),n}applyConstraints(e){const{maxZoom:t,minZoom:n,zoom:r}=e;e.zoom=Object(i.a)(r,n,t);const{maxPitch:o,minPitch:a,pitch:l}=e;e.pitch=Object(i.a)(l,a,o);const{normalize:u=!0}=e;return u&&Object.assign(e,Object(s.normalizeViewportProps)(e)),e}_zoomFromCenter(e){const{width:t,height:n}=this.getViewportProps();return this.zoom({pos:[t/2,n/2],scale:e})}_panFromCenter(e){const{width:t,height:n}=this.getViewportProps();return this.pan({startPos:[t/2,n/2],pos:[t/2+e[0],n/2+e[1]]})}_getUpdatedState(e){return new this.constructor({makeViewport:this.makeViewport,...this.getViewportProps(),...this.getState(),...e})}_unproject(e){const t=this.makeViewport(this.getViewportProps());return e&&t.unproject(e)}_getNewRotation(e,t,n,r){const o=e[0]-t[0],a=e[1]-t[1],s=e[1],l=t[1],{width:u,height:c}=this.getViewportProps(),d=o/u;let f=0;a>0?Math.abs(c-l)>5&&(f=a/(l-c)*1.2):a<0&&l>5&&(f=1-s/l),f=Object(i.a)(f,-1,1);const{minPitch:h,maxPitch:p}=this.getViewportProps();let A=n;return f>0?A=n+f*(p-n):f<0&&(A=n-f*(h-n)),{pitch:A,bearing:r+180*d}}}class d extends o.a{constructor(...e){super(...e),Object(r.a)(this,"ControllerState",c),Object(r.a)(this,"transition",{transitionDuration:300,transitionInterpolator:new u.a({transitionProps:{compare:["longitude","latitude","zoom","bearing","pitch","position"],required:["longitude","latitude","zoom"]}})}),Object(r.a)(this,"dragMode","pan")}setProps(e){e.position=e.position||[0,0,0];const t=this.props;super.setProps(e);(!t||t.height!==e.height)&&this.updateViewport(new this.ControllerState({makeViewport:this.makeViewport,...e,...this.state}))}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(1),i=n(52),o=n(85);class a{constructor(e){Object(r.a)(this,"_propsToCompare",void 0),Object(r.a)(this,"_propsToExtract",void 0),Object(r.a)(this,"_requiredProps",void 0);const{compare:t,extract:n,required:i}=e;this._propsToCompare=t,this._propsToExtract=n||t,this._requiredProps=i}arePropsEqual(e,t){for(const n of this._propsToCompare)if(!(n in e)||!(n in t)||!Object(i.d)(e[n],t[n]))return!1;return!0}initializeProps(e,t){const n={},r={};for(const i of this._propsToExtract)(i in e||i in t)&&(n[i]=e[i],r[i]=t[i]);return this._checkRequiredProps(n),this._checkRequiredProps(r),{start:n,end:r}}getDuration(e,t){return t.transitionDuration}_checkRequiredProps(e){this._requiredProps&&this._requiredProps.forEach(t=>{const n=e[t];Object(o.a)(Number.isFinite(n)||Array.isArray(n),"".concat(t," is required for transition"))})}}},function(e,t,n){"use strict";var r=n(558),i=n(56),o=n(264),a=n(241);t.a=function(){var e=a.a,t=a.b,n=Object(i.a)(!0),s=null,l=o.a,u=null;function c(i){var o,a,c,d=i.length,f=!1;for(null==s&&(u=l(c=Object(r.a)())),o=0;o<=d;++o)!(o=0&&"xmlns"!==(t=e.slice(0,n))&&(e=e.slice(n+1)),r.a.hasOwnProperty(t)?{space:r.a[t],local:e}:e}},function(e,t,n){"use strict";t.a=function(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}},function(e,t,n){"use strict";n.d(t,"a",(function(){return M}));var r=n(1),i=n(519),o=n(880),a=n(415),s=n(879),l=n(39),u=n(1163),c=n(554),d=n(551),f=n(175),h=n(179),p=n(881),A=n(152);class g extends p.a{constructor(e){const{fp64:t,IndexType:n=Uint32Array}=e;super({...e,attributes:{positions:{size:3,type:t?Float64Array:Float32Array},vertexValid:{type:Uint8ClampedArray,size:1},indices:{type:n,size:1}}})}get(e){const{attributes:t}=this;return"indices"===e?t.indices&&t.indices.subarray(0,this.vertexCount):t[e]}updateGeometry(e){super.updateGeometry(e);const t=this.buffers.indices;if(t)this.vertexCount=(t.value||t).length;else if(this.data&&!this.getGeometry)throw new Error("missing indices buffer")}normalizeGeometry(e){if(this.normalize){const t=h.d(e,this.positionSize);return this.opts.resolution?Object(A.b)(h.b(t),h.a(t),{size:this.positionSize,gridResolution:this.opts.resolution,edgeTypes:!0}):this.opts.wrapLongitude?Object(A.c)(h.b(t),h.a(t),{size:this.positionSize,maxLatitude:86,edgeTypes:!0}):t}return e}getGeometrySize(e){if(m(e)){let t=0;for(const n of e)t+=this.getGeometrySize(n);return t}return h.b(e).length/this.positionSize}getGeometryFromBuffer(e){return this.normalize||!this.buffers.indices?super.getGeometryFromBuffer(e):null}updateGeometryAttributes(e,t){if(e&&m(e))for(const n of e){const e=this.getGeometrySize(n);t.geometrySize=e,this.updateGeometryAttributes(n,t),t.vertexStart+=e,t.indexStart=this.indexStarts[t.geometryIndex+1]}else this._updateIndices(e,t),this._updatePositions(e,t),this._updateVertexValid(e,t)}_updateIndices(e,{geometryIndex:t,vertexStart:n,indexStart:r}){const{attributes:i,indexStarts:o,typedArrayManager:a}=this;let s=i.indices;if(!s||!e)return;let l=r;const u=h.c(e,this.positionSize,this.opts.preproject,this.opts.full3d);s=a.allocate(s,r+u.length,{copy:!0});for(let e=0;e2?o[a*i+2]:0;r[3*e]=t,r[3*e+1]=n,r[3*e+2]=s}}_updateVertexValid(e,{vertexStart:t,geometrySize:n}){const{positionSize:r}=this,i=this.attributes.vertexValid,o=e&&h.a(e);if(e&&e.edgeTypes?i.set(e.edgeTypes,t):i.fill(1,t,t+n),o)for(let e=0;e0&&!Number.isFinite(e[0])}var y="\nattribute vec2 vertexPositions;\nattribute float vertexValid;\n\nuniform bool extruded;\nuniform bool isWireframe;\nuniform float elevationScale;\nuniform float opacity;\n\nvarying vec4 vColor;\n\nstruct PolygonProps {\n vec4 fillColors;\n vec4 lineColors;\n vec3 positions;\n vec3 nextPositions;\n vec3 pickingColors;\n vec3 positions64Low;\n vec3 nextPositions64Low;\n float elevations;\n};\n\nvec3 project_offset_normal(vec3 vector) {\n if (project_uCoordinateSystem == COORDINATE_SYSTEM_LNGLAT ||\n project_uCoordinateSystem == COORDINATE_SYSTEM_LNGLAT_OFFSETS) {\n return normalize(vector * project_uCommonUnitsPerWorldUnit);\n }\n return project_normal(vector);\n}\n\nvoid calculatePosition(PolygonProps props) {\n#ifdef IS_SIDE_VERTEX\n if(vertexValid < 0.5){\n gl_Position = vec4(0.);\n return;\n }\n#endif\n\n vec3 pos;\n vec3 pos64Low;\n vec3 normal;\n vec4 colors = isWireframe ? props.lineColors : props.fillColors;\n\n geometry.worldPosition = props.positions;\n geometry.worldPositionAlt = props.nextPositions;\n geometry.pickingColor = props.pickingColors;\n\n#ifdef IS_SIDE_VERTEX\n pos = mix(props.positions, props.nextPositions, vertexPositions.x);\n pos64Low = mix(props.positions64Low, props.nextPositions64Low, vertexPositions.x);\n#else\n pos = props.positions;\n pos64Low = props.positions64Low;\n#endif\n\n if (extruded) {\n pos.z += props.elevations * vertexPositions.y * elevationScale;\n }\n gl_Position = project_position_to_clipspace(pos, pos64Low, vec3(0.), geometry.position);\n\n DECKGL_FILTER_GL_POSITION(gl_Position, geometry);\n\n if (extruded) {\n #ifdef IS_SIDE_VERTEX\n normal = vec3(\n props.positions.y - props.nextPositions.y + (props.positions64Low.y - props.nextPositions64Low.y),\n props.nextPositions.x - props.positions.x + (props.nextPositions64Low.x - props.positions64Low.x),\n 0.0);\n normal = project_offset_normal(normal);\n #else\n normal = project_normal(vec3(0.0, 0.0, 1.0));\n #endif\n geometry.normal = normal;\n vec3 lightColor = lighting_getLightColor(colors.rgb, project_uCameraPosition, geometry.position.xyz, normal);\n vColor = vec4(lightColor, colors.a * opacity);\n } else {\n vColor = vec4(colors.rgb, colors.a * opacity);\n }\n DECKGL_FILTER_COLOR(vColor, geometry);\n}\n",v="#define SHADER_NAME solid-polygon-layer-vertex-shader\n\nattribute vec3 positions;\nattribute vec3 positions64Low;\nattribute float elevations;\nattribute vec4 fillColors;\nattribute vec4 lineColors;\nattribute vec3 pickingColors;\n\n".concat(y,"\n\nvoid main(void) {\n PolygonProps props;\n\n props.positions = positions;\n props.positions64Low = positions64Low;\n props.elevations = elevations;\n props.fillColors = fillColors;\n props.lineColors = lineColors;\n props.pickingColors = pickingColors;\n\n calculatePosition(props);\n}\n"),b="#define SHADER_NAME solid-polygon-layer-vertex-shader-side\n#define IS_SIDE_VERTEX\n\n\nattribute vec3 instancePositions;\nattribute vec3 nextPositions;\nattribute vec3 instancePositions64Low;\nattribute vec3 nextPositions64Low;\nattribute float instanceElevations;\nattribute vec4 instanceFillColors;\nattribute vec4 instanceLineColors;\nattribute vec3 instancePickingColors;\n\n".concat(y,"\n\nvoid main(void) {\n PolygonProps props;\n\n #if RING_WINDING_ORDER_CW == 1\n props.positions = instancePositions;\n props.positions64Low = instancePositions64Low;\n props.nextPositions = nextPositions;\n props.nextPositions64Low = nextPositions64Low;\n #else\n props.positions = nextPositions;\n props.positions64Low = nextPositions64Low;\n props.nextPositions = instancePositions;\n props.nextPositions64Low = instancePositions64Low;\n #endif\n props.elevations = instanceElevations;\n props.fillColors = instanceFillColors;\n props.lineColors = instanceLineColors;\n props.pickingColors = instancePickingColors;\n\n calculatePosition(props);\n}\n");const _=[0,0,0,255],w={filled:!0,extruded:!1,wireframe:!1,_normalize:!0,_windingOrder:"CW",_full3d:!1,elevationScale:{type:"number",min:0,value:1},getPolygon:{type:"accessor",value:e=>e.polygon},getElevation:{type:"accessor",value:1e3},getFillColor:{type:"accessor",value:_},getLineColor:{type:"accessor",value:_},material:!0},x={enter:(e,t)=>t.length?t.subarray(t.length-e.length):e};class M extends i.a{constructor(...e){super(...e),Object(r.a)(this,"state",void 0)}getShaders(e){return super.getShaders({vs:"top"===e?v:b,fs:"#define SHADER_NAME solid-polygon-layer-fragment-shader\n\nprecision highp float;\n\nvarying vec4 vColor;\n\nvoid main(void) {\n gl_FragColor = vColor;\n\n DECKGL_FILTER_COLOR(gl_FragColor, geometry);\n}\n",defines:{RING_WINDING_ORDER_CW:this.props._normalize||"CCW"!==this.props._windingOrder?1:0},modules:[o.a,a.a,s.a]})}get wrapLongitude(){return!1}initializeState(){const{gl:e,viewport:t}=this.context;let{coordinateSystem:n}=this.props;const{_full3d:r}=this.props;let i;t.isGeospatial&&n===l.a.DEFAULT&&(n=l.a.LNGLAT),n===l.a.LNGLAT&&(i=r?t.projectPosition.bind(t):t.projectFlat.bind(t)),this.setState({numInstances:0,polygonTesselator:new g({preproject:i,fp64:this.use64bitPositions(),IndexType:!e||Object(u.c)(e,c.a.ELEMENT_INDEX_UINT32)?Uint32Array:Uint16Array})});const o=this.getAttributeManager();o.remove(["instancePickingColors"]),o.add({indices:{size:1,isIndexed:!0,update:this.calculateIndices,noAlloc:!0},positions:{size:3,type:5130,fp64:this.use64bitPositions(),transition:x,accessor:"getPolygon",update:this.calculatePositions,noAlloc:!0,shaderAttributes:{positions:{vertexOffset:0,divisor:0},instancePositions:{vertexOffset:0,divisor:1},nextPositions:{vertexOffset:1,divisor:1}}},vertexValid:{size:1,divisor:1,type:5121,update:this.calculateVertexValid,noAlloc:!0},elevations:{size:1,transition:x,accessor:"getElevation",shaderAttributes:{elevations:{divisor:0},instanceElevations:{divisor:1}}},fillColors:{size:this.props.colorFormat.length,type:5121,normalized:!0,transition:x,accessor:"getFillColor",defaultValue:_,shaderAttributes:{fillColors:{divisor:0},instanceFillColors:{divisor:1}}},lineColors:{size:this.props.colorFormat.length,type:5121,normalized:!0,transition:x,accessor:"getLineColor",defaultValue:_,shaderAttributes:{lineColors:{divisor:0},instanceLineColors:{divisor:1}}},pickingColors:{size:3,type:5121,accessor:(e,{index:t,target:n})=>this.encodePickingColor(e&&e.__source?e.__source.index:t,n),shaderAttributes:{pickingColors:{divisor:0},instancePickingColors:{divisor:1}}}})}getPickingInfo(e){const t=super.getPickingInfo(e),{index:n}=t,{data:r}=this.props;return r[0]&&r[0].__source&&(t.object=r.find(e=>e.__source.index===n)),t}disablePickingIndex(e){const{data:t}=this.props;if(t[0]&&t[0].__source)for(let n=0;ne.delete()),this.setState(this._getModels(this.context.gl)),i.invalidateAll())}updateGeometry({props:e,oldProps:t,changeFlags:n}){if(n.dataChanged||n.updateTriggersChanged&&(n.updateTriggersChanged.all||n.updateTriggersChanged.getPolygon)){const{polygonTesselator:t}=this.state,r=e.data.attributes||{};t.updateGeometry({data:e.data,normalize:e._normalize,geometryBuffer:r.getPolygon,buffers:r,getGeometry:e.getPolygon,positionFormat:e.positionFormat,wrapLongitude:e.wrapLongitude,resolution:this.context.viewport.resolution,fp64:this.use64bitPositions(),dataChanged:n.dataChanged,full3d:e._full3d}),this.setState({numInstances:t.instanceCount,startIndices:t.vertexStarts}),n.dataChanged||this.getAttributeManager().invalidateAll()}}_getModels(e){const{id:t,filled:n,extruded:r}=this.props;let i,o;if(n){const n=this.getShaders("top");n.defines.NON_INSTANCED_MODEL=1,i=new d.a(e,{...n,id:"".concat(t,"-top"),drawMode:4,attributes:{vertexPositions:new Float32Array([0,1])},uniforms:{isWireframe:!1,isSideVertex:!1},vertexCount:0,isIndexed:!0})}return r&&(o=new d.a(e,{...this.getShaders("side"),id:"".concat(t,"-side"),geometry:new f.a({drawMode:1,vertexCount:4,attributes:{vertexPositions:{size:2,value:new Float32Array([1,0,0,0,0,1,1,1])}}}),instanceCount:0,isInstanced:1}),o.userData.excludeAttributes={indices:!0}),{models:[o,i].filter(Boolean),topModel:i,sideModel:o}}calculateIndices(e){const{polygonTesselator:t}=this.state;e.startIndices=t.indexStarts,e.value=t.get("indices")}calculatePositions(e){const{polygonTesselator:t}=this.state;e.startIndices=t.vertexStarts,e.value=t.get("positions")}calculateVertexValid(e){e.value=this.state.polygonTesselator.get("vertexValid")}}Object(r.a)(M,"defaultProps",w),Object(r.a)(M,"layerName","SolidPolygonLayer")},function(e,t,n){"use strict";n.d(t,"a",(function(){return m}));var r=n(1),i=n(519),o=n(880),a=n(879),s=n(39),l=n(551),u=n(175),c=n(881),d=n(152);class f extends c.a{constructor(e){super({...e,attributes:{positions:{size:3,padding:18,initialize:!0,type:e.fp64?Float64Array:Float32Array},segmentTypes:{size:1,type:Uint8ClampedArray}}})}get(e){return this.attributes[e]}getGeometryFromBuffer(e){return this.normalize?super.getGeometryFromBuffer(e):null}normalizeGeometry(e){return this.normalize?function(e,t,n,r){let i;if(Array.isArray(e[0])){const n=e.length*t;i=new Array(n);for(let n=0;n=e.length&&(t+=1-e.length/r);const i=t*r;return n[0]=e[i],n[1]=e[i+1],n[2]=3===r&&e[i+2]||0,n}isClosed(e){if(!this.normalize)return Boolean(this.opts.loop);const{positionSize:t}=this,n=e.length-t;return e[0]===e[n]&&e[1]===e[n+1]&&(2===t||e[2]===e[n+2])}}function h(e){return Array.isArray(e[0])}const p=[0,0,0,255],A={widthUnits:"meters",widthScale:{type:"number",min:0,value:1},widthMinPixels:{type:"number",min:0,value:0},widthMaxPixels:{type:"number",min:0,value:Number.MAX_SAFE_INTEGER},jointRounded:!1,capRounded:!1,miterLimit:{type:"number",min:0,value:4},billboard:!1,_pathType:null,getPath:{type:"accessor",value:e=>e.path},getColor:{type:"accessor",value:p},getWidth:{type:"accessor",value:1},rounded:{deprecatedFor:["jointRounded","capRounded"]}},g={enter:(e,t)=>t.length?t.subarray(t.length-e.length):e};class m extends i.a{constructor(...e){super(...e),Object(r.a)(this,"state",void 0)}getShaders(){return super.getShaders({vs:"#define SHADER_NAME path-layer-vertex-shader\n\nattribute vec2 positions;\n\nattribute float instanceTypes;\nattribute vec3 instanceStartPositions;\nattribute vec3 instanceEndPositions;\nattribute vec3 instanceLeftPositions;\nattribute vec3 instanceRightPositions;\nattribute vec3 instanceLeftPositions64Low;\nattribute vec3 instanceStartPositions64Low;\nattribute vec3 instanceEndPositions64Low;\nattribute vec3 instanceRightPositions64Low;\nattribute float instanceStrokeWidths;\nattribute vec4 instanceColors;\nattribute vec3 instancePickingColors;\n\nuniform float widthScale;\nuniform float widthMinPixels;\nuniform float widthMaxPixels;\nuniform float jointType;\nuniform float capType;\nuniform float miterLimit;\nuniform bool billboard;\nuniform int widthUnits;\n\nuniform float opacity;\n\nvarying vec4 vColor;\nvarying vec2 vCornerOffset;\nvarying float vMiterLength;\nvarying vec2 vPathPosition;\nvarying float vPathLength;\nvarying float vJointType;\n\nconst float EPSILON = 0.001;\nconst vec3 ZERO_OFFSET = vec3(0.0);\n\nfloat flipIfTrue(bool flag) {\n return -(float(flag) * 2. - 1.);\n}\nvec3 getLineJoinOffset(\n vec3 prevPoint, vec3 currPoint, vec3 nextPoint,\n vec2 width\n) {\n bool isEnd = positions.x > 0.0;\n float sideOfPath = positions.y;\n float isJoint = float(sideOfPath == 0.0);\n\n vec3 deltaA3 = (currPoint - prevPoint);\n vec3 deltaB3 = (nextPoint - currPoint);\n\n mat3 rotationMatrix;\n bool needsRotation = !billboard && project_needs_rotation(currPoint, rotationMatrix);\n if (needsRotation) {\n deltaA3 = deltaA3 * rotationMatrix;\n deltaB3 = deltaB3 * rotationMatrix;\n }\n vec2 deltaA = deltaA3.xy / width;\n vec2 deltaB = deltaB3.xy / width;\n\n float lenA = length(deltaA);\n float lenB = length(deltaB);\n\n vec2 dirA = lenA > 0. ? normalize(deltaA) : vec2(0.0, 0.0);\n vec2 dirB = lenB > 0. ? normalize(deltaB) : vec2(0.0, 0.0);\n\n vec2 perpA = vec2(-dirA.y, dirA.x);\n vec2 perpB = vec2(-dirB.y, dirB.x);\n vec2 tangent = dirA + dirB;\n tangent = length(tangent) > 0. ? normalize(tangent) : perpA;\n vec2 miterVec = vec2(-tangent.y, tangent.x);\n vec2 dir = isEnd ? dirA : dirB;\n vec2 perp = isEnd ? perpA : perpB;\n float L = isEnd ? lenA : lenB;\n float sinHalfA = abs(dot(miterVec, perp));\n float cosHalfA = abs(dot(dirA, miterVec));\n float turnDirection = flipIfTrue(dirA.x * dirB.y >= dirA.y * dirB.x);\n float cornerPosition = sideOfPath * turnDirection;\n\n float miterSize = 1.0 / max(sinHalfA, EPSILON);\n miterSize = mix(\n min(miterSize, max(lenA, lenB) / max(cosHalfA, EPSILON)),\n miterSize,\n step(0.0, cornerPosition)\n );\n\n vec2 offsetVec = mix(miterVec * miterSize, perp, step(0.5, cornerPosition))\n * (sideOfPath + isJoint * turnDirection);\n bool isStartCap = lenA == 0.0 || (!isEnd && (instanceTypes == 1.0 || instanceTypes == 3.0));\n bool isEndCap = lenB == 0.0 || (isEnd && (instanceTypes == 2.0 || instanceTypes == 3.0));\n bool isCap = isStartCap || isEndCap;\n if (isCap) {\n offsetVec = mix(perp * sideOfPath, dir * capType * 4.0 * flipIfTrue(isStartCap), isJoint);\n vJointType = capType;\n } else {\n vJointType = jointType;\n }\n vPathLength = L;\n vCornerOffset = offsetVec;\n vMiterLength = dot(vCornerOffset, miterVec * turnDirection);\n vMiterLength = isCap ? isJoint : vMiterLength;\n\n vec2 offsetFromStartOfPath = vCornerOffset + deltaA * float(isEnd);\n vPathPosition = vec2(\n dot(offsetFromStartOfPath, perp),\n dot(offsetFromStartOfPath, dir)\n );\n geometry.uv = vPathPosition;\n\n float isValid = step(instanceTypes, 3.5);\n vec3 offset = vec3(offsetVec * width * isValid, 0.0);\n\n if (needsRotation) {\n offset = rotationMatrix * offset;\n }\n return offset;\n}\nvoid clipLine(inout vec4 position, vec4 refPosition) {\n if (position.w < EPSILON) {\n float r = (EPSILON - refPosition.w) / (position.w - refPosition.w);\n position = refPosition + (position - refPosition) * r;\n }\n}\n\nvoid main() {\n geometry.pickingColor = instancePickingColors;\n\n vColor = vec4(instanceColors.rgb, instanceColors.a * opacity);\n\n float isEnd = positions.x;\n\n vec3 prevPosition = mix(instanceLeftPositions, instanceStartPositions, isEnd);\n vec3 prevPosition64Low = mix(instanceLeftPositions64Low, instanceStartPositions64Low, isEnd);\n\n vec3 currPosition = mix(instanceStartPositions, instanceEndPositions, isEnd);\n vec3 currPosition64Low = mix(instanceStartPositions64Low, instanceEndPositions64Low, isEnd);\n\n vec3 nextPosition = mix(instanceEndPositions, instanceRightPositions, isEnd);\n vec3 nextPosition64Low = mix(instanceEndPositions64Low, instanceRightPositions64Low, isEnd);\n\n geometry.worldPosition = currPosition;\n vec2 widthPixels = vec2(clamp(\n project_size_to_pixel(instanceStrokeWidths * widthScale, widthUnits),\n widthMinPixels, widthMaxPixels) / 2.0);\n vec3 width;\n\n if (billboard) {\n vec4 prevPositionScreen = project_position_to_clipspace(prevPosition, prevPosition64Low, ZERO_OFFSET);\n vec4 currPositionScreen = project_position_to_clipspace(currPosition, currPosition64Low, ZERO_OFFSET, geometry.position);\n vec4 nextPositionScreen = project_position_to_clipspace(nextPosition, nextPosition64Low, ZERO_OFFSET);\n\n clipLine(prevPositionScreen, currPositionScreen);\n clipLine(nextPositionScreen, currPositionScreen);\n clipLine(currPositionScreen, mix(nextPositionScreen, prevPositionScreen, isEnd));\n\n width = vec3(widthPixels, 0.0);\n DECKGL_FILTER_SIZE(width, geometry);\n\n vec3 offset = getLineJoinOffset(\n prevPositionScreen.xyz / prevPositionScreen.w,\n currPositionScreen.xyz / currPositionScreen.w,\n nextPositionScreen.xyz / nextPositionScreen.w,\n project_pixel_size_to_clipspace(width.xy)\n );\n\n DECKGL_FILTER_GL_POSITION(currPositionScreen, geometry);\n gl_Position = vec4(currPositionScreen.xyz + offset * currPositionScreen.w, currPositionScreen.w);\n } else {\n prevPosition = project_position(prevPosition, prevPosition64Low);\n currPosition = project_position(currPosition, currPosition64Low);\n nextPosition = project_position(nextPosition, nextPosition64Low);\n\n width = vec3(project_pixel_size(widthPixels), 0.0);\n DECKGL_FILTER_SIZE(width, geometry);\n\n vec3 offset = getLineJoinOffset(prevPosition, currPosition, nextPosition, width.xy);\n geometry.position = vec4(currPosition + offset, 1.0);\n gl_Position = project_common_position_to_clipspace(geometry.position);\n DECKGL_FILTER_GL_POSITION(gl_Position, geometry);\n }\n DECKGL_FILTER_COLOR(vColor, geometry);\n}\n",fs:"#define SHADER_NAME path-layer-fragment-shader\n\nprecision highp float;\n\nuniform float miterLimit;\n\nvarying vec4 vColor;\nvarying vec2 vCornerOffset;\nvarying float vMiterLength;\nvarying vec2 vPathPosition;\nvarying float vPathLength;\nvarying float vJointType;\n\nvoid main(void) {\n geometry.uv = vPathPosition;\n\n if (vPathPosition.y < 0.0 || vPathPosition.y > vPathLength) {\n if (vJointType > 0.5 && length(vCornerOffset) > 1.0) {\n discard;\n }\n if (vJointType < 0.5 && vMiterLength > miterLimit + 1.0) {\n discard;\n }\n }\n gl_FragColor = vColor;\n\n DECKGL_FILTER_COLOR(gl_FragColor, geometry);\n}\n",modules:[o.a,a.a]})}get wrapLongitude(){return!1}initializeState(){this.getAttributeManager().addInstanced({positions:{size:3,vertexOffset:1,type:5130,fp64:this.use64bitPositions(),transition:g,accessor:"getPath",update:this.calculatePositions,noAlloc:!0,shaderAttributes:{instanceLeftPositions:{vertexOffset:0},instanceStartPositions:{vertexOffset:1},instanceEndPositions:{vertexOffset:2},instanceRightPositions:{vertexOffset:3}}},instanceTypes:{size:1,type:5121,update:this.calculateSegmentTypes,noAlloc:!0},instanceStrokeWidths:{size:1,accessor:"getWidth",transition:g,defaultValue:1},instanceColors:{size:this.props.colorFormat.length,type:5121,normalized:!0,accessor:"getColor",transition:g,defaultValue:p},instancePickingColors:{size:3,type:5121,accessor:(e,{index:t,target:n})=>this.encodePickingColor(e&&e.__source?e.__source.index:t,n)}}),this.setState({pathTesselator:new f({fp64:this.use64bitPositions()})})}updateState(e){super.updateState(e);const{props:t,changeFlags:n}=e,r=this.getAttributeManager();if(n.dataChanged||n.updateTriggersChanged&&(n.updateTriggersChanged.all||n.updateTriggersChanged.getPath)){const{pathTesselator:e}=this.state,i=t.data.attributes||{};e.updateGeometry({data:t.data,geometryBuffer:i.getPath,buffers:i,normalize:!t._pathType,loop:"loop"===t._pathType,getGeometry:t.getPath,positionFormat:t.positionFormat,wrapLongitude:t.wrapLongitude,resolution:this.context.viewport.resolution,dataChanged:n.dataChanged}),this.setState({numInstances:e.instanceCount,startIndices:e.vertexStarts}),n.dataChanged||r.invalidateAll()}if(n.extensionsChanged){var i;const{gl:e}=this.context;null===(i=this.state.model)||void 0===i||i.delete(),this.state.model=this._getModel(e),r.invalidateAll()}}getPickingInfo(e){const t=super.getPickingInfo(e),{index:n}=t,{data:r}=this.props;return r[0]&&r[0].__source&&(t.object=r.find(e=>e.__source.index===n)),t}disablePickingIndex(e){const{data:t}=this.props;if(t[0]&&t[0].__source)for(let n=0;n{},g={10241:9987,10240:9729,10242:33071,10243:33071};function m(e,t,n,r){const i=Math.min(n/t.width,r/t.height),o=Math.floor(t.width*i),a=Math.floor(t.height*i);return 1===i?{data:t,width:o,height:a}:(e.canvas.height=a,e.canvas.width=o,e.clearRect(0,0,o,a),e.drawImage(t,0,0,t.width,t.height,0,0,o,a),{data:e.canvas,width:o,height:a})}function y(e){return e&&(e.id||e.url)}function v(e,t,n){for(let r=0;r0){const{mapping:e,xOffset:t,yOffset:r,rowHeight:i,canvasHeight:o}=function({icons:e,buffer:t,mapping:n={},xOffset:r=0,yOffset:i=0,rowHeight:o=0,canvasWidth:a}){let s=[];for(let l=0;la&&(v(n,s,i),r=0,i=o+i+t,o=0,s=[]),s.push({icon:u,xOffset:r}),r=r+l+t,o=Math.max(o,e)}}return s.length>0&&v(n,s,i),{mapping:n,rowHeight:o,xOffset:r,yOffset:i,canvasWidth:a,canvasHeight:(l=o+i+t,Math.pow(2,Math.ceil(Math.log2(l))))};var l}({icons:n,buffer:this._buffer,canvasWidth:this._canvasWidth,mapping:this._mapping,rowHeight:this._rowHeight,xOffset:this._xOffset,yOffset:this._yOffset});this._rowHeight=i,this._mapping=e,this._xOffset=t,this._yOffset=r,this._canvasHeight=o,this._texture||(this._texture=new d.a(this.gl,{width:this._canvasWidth,height:this._canvasHeight,parameters:this._textureParameters||g})),this._texture.height!==this._canvasHeight&&(this._texture=function(e,t,n,r){const i=e.width,o=e.height,a=new d.a(e.gl,{width:t,height:n,parameters:r});return Object(f.b)(e,a,{targetY:0,width:i,height:o}),e.delete(),a}(this._texture,this._canvasWidth,this._canvasHeight,this._textureParameters||g)),this.onUpdate(),this._canvas=this._canvas||document.createElement("canvas"),this._loadIcons(n)}}_loadIcons(e){const t=this._canvas.getContext("2d",{willReadFrequently:!0});for(const n of e)this._pendingCount++,Object(h.a)(n.url,this._loadOptions).then(e=>{const r=y(n),i=this._mapping[r],{x:o,y:a,width:s,height:l}=i,{data:u,width:c,height:d}=m(t,e,s,l);this._texture.setSubImageData({data:u,x:o+(s-c)/2,y:a+(l-d)/2,width:c,height:d}),i.width=c,i.height=d,this._texture.generateMipmap(),this.onUpdate()}).catch(e=>{this.onError({url:n.url,source:n.source,sourceIndex:n.sourceIndex,loadOptions:this._loadOptions,error:e})}).finally(()=>{this._pendingCount--})}}const _=[0,0,0,255],w={iconAtlas:{type:"image",value:null,async:!0},iconMapping:{type:"object",value:{},async:!0},sizeScale:{type:"number",value:1,min:0},billboard:!0,sizeUnits:"pixels",sizeMinPixels:{type:"number",min:0,value:0},sizeMaxPixels:{type:"number",min:0,value:Number.MAX_SAFE_INTEGER},alphaCutoff:{type:"number",value:.05,min:0,max:1},getPosition:{type:"accessor",value:e=>e.position},getIcon:{type:"accessor",value:e=>e.icon},getColor:{type:"accessor",value:_},getSize:{type:"accessor",value:1},getAngle:{type:"accessor",value:0},getPixelOffset:{type:"accessor",value:[0,0]},onIconError:{type:"function",value:null,optional:!0},textureParameters:{type:"object",ignore:!0}};class x extends i.a{constructor(...e){super(...e),Object(r.a)(this,"state",void 0)}getShaders(){return super.getShaders({vs:"#define SHADER_NAME icon-layer-vertex-shader\n\nattribute vec2 positions;\n\nattribute vec3 instancePositions;\nattribute vec3 instancePositions64Low;\nattribute float instanceSizes;\nattribute float instanceAngles;\nattribute vec4 instanceColors;\nattribute vec3 instancePickingColors;\nattribute vec4 instanceIconFrames;\nattribute float instanceColorModes;\nattribute vec2 instanceOffsets;\nattribute vec2 instancePixelOffset;\n\nuniform float sizeScale;\nuniform vec2 iconsTextureDim;\nuniform float sizeMinPixels;\nuniform float sizeMaxPixels;\nuniform bool billboard;\nuniform int sizeUnits;\n\nvarying float vColorMode;\nvarying vec4 vColor;\nvarying vec2 vTextureCoords;\nvarying vec2 uv;\n\nvec2 rotate_by_angle(vec2 vertex, float angle) {\n float angle_radian = angle * PI / 180.0;\n float cos_angle = cos(angle_radian);\n float sin_angle = sin(angle_radian);\n mat2 rotationMatrix = mat2(cos_angle, -sin_angle, sin_angle, cos_angle);\n return rotationMatrix * vertex;\n}\n\nvoid main(void) {\n geometry.worldPosition = instancePositions;\n geometry.uv = positions;\n geometry.pickingColor = instancePickingColors;\n uv = positions;\n\n vec2 iconSize = instanceIconFrames.zw;\n float sizePixels = clamp(\n project_size_to_pixel(instanceSizes * sizeScale, sizeUnits), \n sizeMinPixels, sizeMaxPixels\n );\n float instanceScale = iconSize.y == 0.0 ? 0.0 : sizePixels / iconSize.y;\n vec2 pixelOffset = positions / 2.0 * iconSize + instanceOffsets;\n pixelOffset = rotate_by_angle(pixelOffset, instanceAngles) * instanceScale;\n pixelOffset += instancePixelOffset;\n pixelOffset.y *= -1.0;\n\n if (billboard) {\n gl_Position = project_position_to_clipspace(instancePositions, instancePositions64Low, vec3(0.0), geometry.position);\n DECKGL_FILTER_GL_POSITION(gl_Position, geometry);\n vec3 offset = vec3(pixelOffset, 0.0);\n DECKGL_FILTER_SIZE(offset, geometry);\n gl_Position.xy += project_pixel_size_to_clipspace(offset.xy);\n\n } else {\n vec3 offset_common = vec3(project_pixel_size(pixelOffset), 0.0);\n DECKGL_FILTER_SIZE(offset_common, geometry);\n gl_Position = project_position_to_clipspace(instancePositions, instancePositions64Low, offset_common, geometry.position); \n DECKGL_FILTER_GL_POSITION(gl_Position, geometry);\n }\n\n vTextureCoords = mix(\n instanceIconFrames.xy,\n instanceIconFrames.xy + iconSize,\n (positions.xy + 1.0) / 2.0\n ) / iconsTextureDim;\n\n vColor = instanceColors;\n DECKGL_FILTER_COLOR(vColor, geometry);\n\n vColorMode = instanceColorModes;\n}\n",fs:"#define SHADER_NAME icon-layer-fragment-shader\n\nprecision highp float;\n\nuniform float opacity;\nuniform sampler2D iconsTexture;\nuniform float alphaCutoff;\n\nvarying float vColorMode;\nvarying vec4 vColor;\nvarying vec2 vTextureCoords;\nvarying vec2 uv;\n\nvoid main(void) {\n geometry.uv = uv;\n\n vec4 texColor = texture2D(iconsTexture, vTextureCoords);\n vec3 color = mix(texColor.rgb, vColor.rgb, vColorMode);\n float a = texColor.a * opacity * vColor.a;\n\n if (a < alphaCutoff) {\n discard;\n }\n\n gl_FragColor = vec4(color, a);\n DECKGL_FILTER_COLOR(gl_FragColor, geometry);\n}\n",modules:[o.a,a.a]})}initializeState(){this.state={iconManager:new b(this.context.gl,{onUpdate:this._onUpdate.bind(this),onError:this._onError.bind(this)})};this.getAttributeManager().addInstanced({instancePositions:{size:3,type:5130,fp64:this.use64bitPositions(),transition:!0,accessor:"getPosition"},instanceSizes:{size:1,transition:!0,accessor:"getSize",defaultValue:1},instanceOffsets:{size:2,accessor:"getIcon",transform:this.getInstanceOffset},instanceIconFrames:{size:4,accessor:"getIcon",transform:this.getInstanceIconFrame},instanceColorModes:{size:1,type:5121,accessor:"getIcon",transform:this.getInstanceColorMode},instanceColors:{size:this.props.colorFormat.length,type:5121,normalized:!0,transition:!0,accessor:"getColor",defaultValue:_},instanceAngles:{size:1,transition:!0,accessor:"getAngle"},instancePixelOffset:{size:2,transition:!0,accessor:"getPixelOffset"}})}updateState(e){super.updateState(e);const{props:t,oldProps:n,changeFlags:r}=e,i=this.getAttributeManager(),{iconAtlas:o,iconMapping:a,data:s,getIcon:l,textureParameters:u}=t,{iconManager:c}=this.state,d=o||this.internalState.isAsyncPropLoading("iconAtlas");if(c.setProps({loadOptions:t.loadOptions,autoPacking:!d,iconAtlas:o,iconMapping:d?a:null,textureParameters:u}),d?n.iconMapping!==t.iconMapping&&i.invalidate("getIcon"):(r.dataChanged||r.updateTriggersChanged&&(r.updateTriggersChanged.all||r.updateTriggersChanged.getIcon))&&c.packIcons(s,l),r.extensionsChanged){var f;const{gl:e}=this.context;null===(f=this.state.model)||void 0===f||f.delete(),this.state.model=this._getModel(e),i.invalidateAll()}}get isLoaded(){return super.isLoaded&&this.state.iconManager.isLoaded}finalizeState(e){super.finalizeState(e),this.state.iconManager.finalize()}draw({uniforms:e}){const{sizeScale:t,sizeMinPixels:n,sizeMaxPixels:r,sizeUnits:i,billboard:o,alphaCutoff:a}=this.props,{iconManager:l}=this.state,u=l.getTexture();u&&this.state.model.setUniforms(e).setUniforms({iconsTexture:u,iconsTextureDim:[u.width,u.height],sizeUnits:s.e[i],sizeScale:t,sizeMinPixels:n,sizeMaxPixels:r,billboard:o,alphaCutoff:a}).draw()}_getModel(e){return new u.a(e,{...this.getShaders(),id:this.props.id,geometry:new c.a({drawMode:6,attributes:{positions:{size:2,value:new Float32Array([-1,-1,-1,1,1,1,1,-1])}}}),isInstanced:!0})}_onUpdate(){this.setNeedsRedraw()}_onError(e){var t;const n=null===(t=this.getCurrentLayer())||void 0===t?void 0:t.props.onIconError;n?n(e):l.a.error(e.error.message)()}getInstanceOffset(e){const{width:t,height:n,anchorX:r=t/2,anchorY:i=n/2}=this.state.iconManager.getIconMapping(e);return[t/2-r,n/2-i]}getInstanceColorMode(e){return this.state.iconManager.getIconMapping(e).mask?1:0}getInstanceIconFrame(e){const{x:t,y:n,width:r,height:i}=this.state.iconManager.getIconMapping(e);return[t,n,r,i]}}Object(r.a)(x,"defaultProps",w),Object(r.a)(x,"layerName","IconLayer")},function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(80),i=n(5),o=n(12),a=n(88);class s extends r.a{}function l(e){const{type:t}=e;if(0===e.nullCount&&1===e.stride&&(t.typeId===i.h.Timestamp||t instanceof o.p&&64!==t.bitWidth||t instanceof o.C&&64!==t.bitWidth||t instanceof o.l&&t.precision!==i.f.HALF))return new a.a(e.data.length,t=>{const n=e.data[t];return n.values.subarray(0,n.length)[Symbol.iterator]()});let n=0;return new a.a(e.data.length,t=>{const r=e.data[t].length,i=e.slice(n,n+r);return n+=r,new u(i)})}class u{constructor(e){this.vector=e,this.index=0}next(){return this.index{if(8===e.byteLength){return""+new e.BigIntArray(e.buffer,e.byteOffset,1)[0]}if(!e.signed)return f(e);let t=new Uint16Array(e.buffer,e.byteOffset,e.byteLength/2);if(new Int16Array([t.at(-1)])[0]>=0)return f(e);t=t.slice();let n=1;for(let e=0;e{if(8===e.byteLength){return new e.BigIntArray(e.buffer,e.byteOffset,1)[0]}return c(e)};function f(e){let t="";const n=new Uint32Array(2);let r=new Uint16Array(e.buffer,e.byteOffset,e.byteLength/2);const i=new Uint32Array((r=new Uint16Array(r).reverse()).buffer);let o=-1;const a=r.length-1;do{for(n[0]=r[o=0];o=t&&(n=r=t):(n>t&&(n=t),r=o&&(n=r=o):(n>o&&(n=o),r0?", ":"")+Object(r.e)(this[n],e);return"".concat(e.printTypes?this.constructor.name:"","[").concat(t,"]")}equals(e){if(!e||this.length!==e.length)return!1;for(let t=0;tObject(i.a)(e,a.fetch):null!=t&&t.fetch?null==t?void 0:t.fetch:i.a}},function(e,t,n){"use strict";n.d(t,"b",(function(){return l})),n.d(t,"a",(function(){return u})),n.d(t,"c",(function(){return c}));var r=n(502),i=n(48),o=n(374),a=n(320);const s="Cannot convert supplied data type";function l(e,t,n){if(t.text&&"string"==typeof e)return e;if(Object(i.c)(e)&&(e=e.buffer),e instanceof ArrayBuffer){const n=e;if(t.text&&!t.binary){return new TextDecoder("utf8").decode(n)}return n}if(ArrayBuffer.isView(e)){if(t.text&&!t.binary){return new TextDecoder("utf8").decode(e)}let n=e.buffer;const r=e.byteLength||e.length;return 0===e.byteOffset&&r===n.byteLength||(n=n.slice(e.byteOffset,e.byteOffset+r)),n}throw new Error(s)}async function u(e,t,n){const u=e instanceof ArrayBuffer||ArrayBuffer.isView(e);if("string"==typeof e||u)return l(e,t);if(Object(i.b)(e)&&(e=await Object(a.b)(e)),Object(i.j)(e)){const n=e;return await Object(a.a)(n),t.binary?await n.arrayBuffer():await n.text()}if(Object(i.i)(e)&&(e=Object(o.a)(e,n)),Object(i.d)(e)||Object(i.a)(e))return Object(r.a)(e);throw new Error(s)}async function c(e,t){if(Object(i.e)(e))return e;if(Object(i.j)(e)){const n=e;await Object(a.a)(n);const r=await n.body;return Object(o.a)(r,t)}return Object(i.b)(e)||Object(i.i)(e)?Object(o.a)(e,t):Object(i.a)(e)?e:function(e){if(ArrayBuffer.isView(e))return function*(){yield e.buffer}();if(e instanceof ArrayBuffer)return function*(){yield e}();if(Object(i.e)(e))return e;if(Object(i.d)(e))return e[Symbol.iterator]();throw new Error(s)}(e)}},function(e,t,n){"use strict";var r=n(39),i=n(308),o=n(217),a=n(246),s=n(186),l=n(47);const u=Object(s.a)((function({viewport:e,center:t}){return new o.a(e.viewProjectionMatrix).invert().transform(t)})),c=Object(s.a)((function({viewport:e,shadowMatrices:t}){const n=[],r=e.pixelUnprojectionMatrix,i=e.isGeospatial?void 0:1,s=[[0,0,i],[e.width,0,i],[0,e.height,i],[e.width,e.height,i],[0,0,-1],[e.width,0,-1],[0,e.height,-1],[e.width,e.height,-1]].map(e=>function(e,t){const[n,r,i]=e,o=Object(l.pixelsToWorld)([n,r,i],t);if(Number.isFinite(i))return o;return[o[0],o[1],0]}(e,r));for(const r of t){const t=r.clone().translate(new a.a(e.center).negate()),i=s.map(e=>t.transform(e)),l=(new o.a).ortho({left:Math.min(...i.map(e=>e[0])),right:Math.max(...i.map(e=>e[0])),bottom:Math.min(...i.map(e=>e[1])),top:Math.max(...i.map(e=>e[1])),near:Math.min(...i.map(e=>-e[2])),far:Math.max(...i.map(e=>-e[2]))});n.push(l.multiplyRight(r))}return n})),d=[0,0,0,1],f=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,0];t.a={name:"shadow",dependencies:[i.a],vs:"\nconst int max_lights = 2;\nuniform mat4 shadow_uViewProjectionMatrices[max_lights];\nuniform vec4 shadow_uProjectCenters[max_lights];\nuniform bool shadow_uDrawShadowMap;\nuniform bool shadow_uUseShadowMap;\nuniform int shadow_uLightId;\nuniform float shadow_uLightCount;\n\nvarying vec3 shadow_vPosition[max_lights];\n\nvec4 shadow_setVertexPosition(vec4 position_commonspace) {\n if (shadow_uDrawShadowMap) {\n return project_common_position_to_clipspace(position_commonspace, shadow_uViewProjectionMatrices[shadow_uLightId], shadow_uProjectCenters[shadow_uLightId]);\n }\n if (shadow_uUseShadowMap) {\n for (int i = 0; i < max_lights; i++) {\n if(i < int(shadow_uLightCount)) {\n vec4 shadowMap_position = project_common_position_to_clipspace(position_commonspace, shadow_uViewProjectionMatrices[i], shadow_uProjectCenters[i]);\n shadow_vPosition[i] = (shadowMap_position.xyz / shadowMap_position.w + 1.0) / 2.0;\n }\n }\n }\n return gl_Position;\n}\n",fs:"\nconst int max_lights = 2;\nuniform bool shadow_uDrawShadowMap;\nuniform bool shadow_uUseShadowMap;\nuniform sampler2D shadow_uShadowMap0;\nuniform sampler2D shadow_uShadowMap1;\nuniform vec4 shadow_uColor;\nuniform float shadow_uLightCount;\n\nvarying vec3 shadow_vPosition[max_lights];\n\nconst vec4 bitPackShift = vec4(1.0, 255.0, 65025.0, 16581375.0);\nconst vec4 bitUnpackShift = 1.0 / bitPackShift;\nconst vec4 bitMask = vec4(1.0 / 255.0, 1.0 / 255.0, 1.0 / 255.0, 0.0);\n\nfloat shadow_getShadowWeight(vec3 position, sampler2D shadowMap) {\n vec4 rgbaDepth = texture2D(shadowMap, position.xy);\n\n float z = dot(rgbaDepth, bitUnpackShift);\n return smoothstep(0.001, 0.01, position.z - z);\n}\n\nvec4 shadow_filterShadowColor(vec4 color) {\n if (shadow_uDrawShadowMap) {\n vec4 rgbaDepth = fract(gl_FragCoord.z * bitPackShift);\n rgbaDepth -= rgbaDepth.gbaa * bitMask;\n return rgbaDepth;\n }\n if (shadow_uUseShadowMap) {\n float shadowAlpha = 0.0;\n shadowAlpha += shadow_getShadowWeight(shadow_vPosition[0], shadow_uShadowMap0);\n if(shadow_uLightCount > 1.0) {\n shadowAlpha += shadow_getShadowWeight(shadow_vPosition[1], shadow_uShadowMap1);\n }\n shadowAlpha *= shadow_uColor.a / shadow_uLightCount;\n float blendedAlpha = shadowAlpha + color.a * (1.0 - shadowAlpha);\n\n return vec4(\n mix(color.rgb, shadow_uColor.rgb, shadowAlpha / blendedAlpha),\n blendedAlpha\n );\n }\n return color;\n}\n",inject:{"vs:DECKGL_FILTER_GL_POSITION":"\n position = shadow_setVertexPosition(geometry.position);\n ","fs:DECKGL_FILTER_COLOR":"\n color = shadow_filterShadowColor(color);\n "},getUniforms:(e={},t={})=>"viewport"in e&&(e.drawToShadowMap||e.shadowMaps&&e.shadowMaps.length>0)?function(e,t){const{shadowEnabled:n=!0}=e;if(!n||!e.shadowMatrices||!e.shadowMatrices.length)return{shadow_uDrawShadowMap:!1,shadow_uUseShadowMap:!1};const i={shadow_uDrawShadowMap:Boolean(e.drawToShadowMap),shadow_uUseShadowMap:!!e.shadowMaps&&e.shadowMaps.length>0,shadow_uColor:e.shadowColor||d,shadow_uLightId:e.shadowLightId||0,shadow_uLightCount:e.shadowMatrices.length},o=u({viewport:e.viewport,center:t.project_uCenter}),s=[],l=c({shadowMatrices:e.shadowMatrices,viewport:e.viewport}).slice();for(let n=0;n0?i["shadow_uShadowMap".concat(t)]=e.shadowMaps[t]:i["shadow_uShadowMap".concat(t)]=e.dummyShadowMap;return i}(e,t):{}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return h})),n.d(t,"b",(function(){return p}));var r=n(34),i=n(67),o=n(39),a=n(186);const s=[0,0,0,0],l=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,0],u=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],c=[0,0,0],d=[0,0,0],f=Object(a.a)((function({viewport:e,devicePixelRatio:t,coordinateSystem:n,coordinateOrigin:a}){const{projectionCenter:d,viewProjectionMatrix:f,originCommon:p,cameraPosCommon:A,shaderCoordinateOrigin:g,geospatialOrigin:m}=function(e,t,n){const{viewMatrixUncentered:o,projectionMatrix:a}=e;let{viewMatrix:u,viewProjectionMatrix:c}=e,d=s,f=s,p=e.cameraPosition;const{geospatialOrigin:A,shaderCoordinateOrigin:g,offsetMode:m}=h(e,t,n);m&&(f=e.projectPosition(A||g),p=[p[0]-f[0],p[1]-f[1],p[2]-f[2]],f[3]=1,d=i.n([],f,c),u=o||u,c=r.h([],a,u),c=r.h([],c,l));return{viewMatrix:u,viewProjectionMatrix:c,projectionCenter:d,originCommon:f,cameraPosCommon:p,shaderCoordinateOrigin:g,geospatialOrigin:A}}(e,n,a),y=e.getDistanceScales(),v=[e.width*t,e.height*t],b=i.n([],[0,0,-e.focalDistance,1],e.projectionMatrix)[3]||1,_={project_uCoordinateSystem:n,project_uProjectionMode:e.projectionMode,project_uCoordinateOrigin:g,project_uCommonOrigin:p.slice(0,3),project_uCenter:d,project_uPseudoMeters:Boolean(e._pseudoMeters),project_uViewportSize:v,project_uDevicePixelRatio:t,project_uFocalDistance:b,project_uCommonUnitsPerMeter:y.unitsPerMeter,project_uCommonUnitsPerWorldUnit:y.unitsPerMeter,project_uCommonUnitsPerWorldUnit2:c,project_uScale:e.scale,project_uWrapLongitude:!1,project_uViewProjectionMatrix:f,project_uModelMatrix:u,project_uCameraPosition:A};if(m){const t=e.getDistanceScales(m);switch(n){case o.a.METER_OFFSETS:_.project_uCommonUnitsPerWorldUnit=t.unitsPerMeter,_.project_uCommonUnitsPerWorldUnit2=t.unitsPerMeter2;break;case o.a.LNGLAT:case o.a.LNGLAT_OFFSETS:e._pseudoMeters||(_.project_uCommonUnitsPerMeter=t.unitsPerMeter),_.project_uCommonUnitsPerWorldUnit=t.unitsPerDegree,_.project_uCommonUnitsPerWorldUnit2=t.unitsPerDegree2;break;case o.a.CARTESIAN:_.project_uCommonUnitsPerWorldUnit=[1,1,t.unitsPerMeter[2]],_.project_uCommonUnitsPerWorldUnit2=[0,0,t.unitsPerMeter2[2]]}}return _}));function h(e,t,n=d){n.length<3&&(n=[n[0],n[1],0]);let r,i=n,a=!0;switch(r=t===o.a.LNGLAT_OFFSETS||t===o.a.METER_OFFSETS?n:e.isGeospatial?[Math.fround(e.longitude),Math.fround(e.latitude),0]:null,e.projectionMode){case o.d.WEB_MERCATOR:t!==o.a.LNGLAT&&t!==o.a.CARTESIAN||(r=[0,0,0],a=!1);break;case o.d.WEB_MERCATOR_AUTO_OFFSET:t===o.a.LNGLAT?i=r:t===o.a.CARTESIAN&&(i=[Math.fround(e.center[0]),Math.fround(e.center[1]),0],r=e.unprojectPosition(i),i[0]-=n[0],i[1]-=n[1],i[2]-=n[2]);break;case o.d.IDENTITY:i=e.position.map(Math.fround),i[2]=i[2]||0;break;case o.d.GLOBE:a=!1,r=null;break;default:a=!1}return{geospatialOrigin:r,shaderCoordinateOrigin:i,offsetMode:a}}function p({viewport:e,devicePixelRatio:t=1,modelMatrix:n=null,coordinateSystem:r=o.a.DEFAULT,coordinateOrigin:i=d,autoWrapLongitude:a=!1}){r===o.a.DEFAULT&&(r=e.isGeospatial?o.a.LNGLAT:o.a.CARTESIAN);const s=f({viewport:e,devicePixelRatio:t,coordinateSystem:r,coordinateOrigin:i});return s.project_uWrapLongitude=a,s.project_uModelMatrix=n||u,s}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(1);class i{constructor(e,t){Object(r.a)(this,"_viewportProps",void 0),Object(r.a)(this,"_state",void 0),this._viewportProps=this.applyConstraints(e),this._state=t}getViewportProps(){return this._viewportProps}getState(){return this._state}}},function(e,t,n){(function(t){e.exports=function(){"use strict";function e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function n(e,t){for(var n=0;n + * @license MIT + * @preserve + */var i=function(e,t){this.next=null,this.key=e,this.data=t,this.left=null,this.right=null};function o(e,t){return e>t?1:e0))break;if(null===t.right)break;if(n(e,t.right.key)>0&&(l=t.right,t.right=l.left,l.left=t,null===(t=l).right))break;o.right=t,o=t,t=t.right}}return o.right=t.left,a.left=t.right,t.left=r.right,t.right=r.left,t}function s(e,t,n,r){var o=new i(e,t);if(null===n)return o.left=o.right=null,o;var s=r(e,(n=a(e,n,r)).key);return s<0?(o.left=n.left,o.right=n,n.left=null):s>=0&&(o.right=n.right,o.left=n,n.right=null),o}function l(e,t,n){var r=null,i=null;if(t){var o=n((t=a(e,t,n)).key,e);0===o?(r=t.left,i=t.right):o<0?(i=t.right,t.right=null,r=t):(r=t.left,t.left=null,i=t)}return{left:r,right:i}}var u=function(){function e(e){void 0===e&&(e=o),this._root=null,this._size=0,this._comparator=e}return e.prototype.insert=function(e,t){return this._size++,this._root=s(e,t,this._root,this._comparator)},e.prototype.add=function(e,t){var n=new i(e,t);null===this._root&&(n.left=n.right=null,this._size++,this._root=n);var r=this._comparator,o=a(e,this._root,r),s=r(e,o.key);return 0===s?this._root=o:(s<0?(n.left=o.left,n.right=o,o.left=null):s>0&&(n.right=o.right,n.left=o,o.right=null),this._size++,this._root=n),this._root},e.prototype.remove=function(e){this._root=this._remove(e,this._root,this._comparator)},e.prototype._remove=function(e,t,n){var r;return null===t?null:0===n(e,(t=a(e,t,n)).key)?(null===t.left?r=t.right:(r=a(e,t.left,n)).right=t.right,this._size--,r):t},e.prototype.pop=function(){var e=this._root;if(e){for(;e.left;)e=e.left;return this._root=a(e.key,this._root,this._comparator),this._root=this._remove(e.key,this._root,this._comparator),{key:e.key,data:e.data}}return null},e.prototype.findStatic=function(e){for(var t=this._root,n=this._comparator;t;){var r=n(e,t.key);if(0===r)return t;t=r<0?t.left:t.right}return null},e.prototype.find=function(e){return this._root&&(this._root=a(e,this._root,this._comparator),0!==this._comparator(e,this._root.key))?null:this._root},e.prototype.contains=function(e){for(var t=this._root,n=this._comparator;t;){var r=n(e,t.key);if(0===r)return!0;t=r<0?t.left:t.right}return!1},e.prototype.forEach=function(e,t){for(var n=this._root,r=[],i=!1;!i;)null!==n?(r.push(n),n=n.left):0!==r.length?(n=r.pop(),e.call(t,n),n=n.right):i=!0;return this},e.prototype.range=function(e,t,n,r){for(var i=[],o=this._comparator,a=this._root;0!==i.length||a;)if(a)i.push(a),a=a.left;else{if(o((a=i.pop()).key,t)>0)break;if(o(a.key,e)>=0&&n.call(r,a))return this;a=a.right}return this},e.prototype.keys=function(){var e=[];return this.forEach((function(t){var n=t.key;return e.push(n)})),e},e.prototype.values=function(){var e=[];return this.forEach((function(t){var n=t.data;return e.push(n)})),e},e.prototype.min=function(){return this._root?this.minNode(this._root).key:null},e.prototype.max=function(){return this._root?this.maxNode(this._root).key:null},e.prototype.minNode=function(e){if(void 0===e&&(e=this._root),e)for(;e.left;)e=e.left;return e},e.prototype.maxNode=function(e){if(void 0===e&&(e=this._root),e)for(;e.right;)e=e.right;return e},e.prototype.at=function(e){for(var t=this._root,n=!1,r=0,i=[];!n;)if(t)i.push(t),t=t.left;else if(i.length>0){if(t=i.pop(),r===e)return t;r++,t=t.right}else n=!0;return null},e.prototype.next=function(e){var t=this._root,n=null;if(e.right){for(n=e.right;n.left;)n=n.left;return n}for(var r=this._comparator;t;){var i=r(e.key,t.key);if(0===i)break;i<0?(n=t,t=t.left):t=t.right}return n},e.prototype.prev=function(e){var t=this._root,n=null;if(null!==e.left){for(n=e.left;n.right;)n=n.right;return n}for(var r=this._comparator;t;){var i=r(e.key,t.key);if(0===i)break;i<0?t=t.left:(n=t,t=t.right)}return n},e.prototype.clear=function(){return this._root=null,this._size=0,this},e.prototype.toList=function(){return function(e){for(var t=e,n=[],r=!1,o=new i(null,null),a=o;!r;)t?(n.push(t),t=t.left):n.length>0?t=(t=a=a.next=n.pop()).right:r=!0;return a.next=null,o.next}(this._root)},e.prototype.load=function(e,t,n){void 0===t&&(t=[]),void 0===n&&(n=!1);var r=e.length,o=this._comparator;if(n&&function e(t,n,r,i,o){if(!(r>=i)){for(var a=t[r+i>>1],s=r-1,l=i+1;;){do{s++}while(o(t[s],a)<0);do{l--}while(o(t[l],a)>0);if(s>=l)break;var u=t[s];t[s]=t[l],t[l]=u,u=n[s],n[s]=n[l],n[l]=u}e(t,n,r,l,o),e(t,n,l+1,i,o)}}(e,t,0,r-1,o),null===this._root)this._root=function e(t,n,r,o){var a=o-r;if(a>0){var s=r+Math.floor(a/2),l=t[s],u=n[s],c=new i(l,u);return c.left=e(t,n,r,s),c.right=e(t,n,s+1,o),c}return null}(e,t,0,r),this._size=r;else{var a=function(e,t,n){for(var r=new i(null,null),o=r,a=e,s=t;null!==a&&null!==s;)n(a.key,s.key)<0?(o.next=a,a=a.next):(o.next=s,s=s.next),o=o.next;return null!==a?o.next=a:null!==s&&(o.next=s),r.next}(this.toList(),function(e,t){for(var n=new i(null,null),r=n,o=0;o0){var o=n+Math.floor(i/2),a=e(t,n,o),s=t.head;return s.left=a,t.head=t.head.next,s.right=e(t,o+1,r),s}return null}({head:a},0,r)}return this},e.prototype.isEmpty=function(){return null===this._root},Object.defineProperty(e.prototype,"size",{get:function(){return this._size},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"root",{get:function(){return this._root},enumerable:!0,configurable:!0}),e.prototype.toString=function(e){void 0===e&&(e=function(e){return String(e.key)});var t=[];return function e(t,n,r,i,o){if(t){i(n+(r?"└── ":"├── ")+o(t)+"\n");var a=n+(r?" ":"│ ");t.left&&e(t.left,a,!1,i,o),t.right&&e(t.right,a,!0,i,o)}}(this._root,"",!0,(function(e){return t.push(e)}),e),t.join("")},e.prototype.update=function(e,t,n){var r=this._comparator,i=l(e,this._root,r),o=i.left,u=i.right;r(e,t)<0?u=s(t,n,u,r):o=s(t,n,o,r),this._root=function(e,t,n){return null===t?e:(null===e||((t=a(e.key,t,n)).left=e),t)}(o,u,r)},e.prototype.split=function(e){return l(e,this._root,this._comparator)},e}(),c=function(e,t){return e.ll.x<=t.x&&t.x<=e.ur.x&&e.ll.y<=t.y&&t.y<=e.ur.y},d=function(e,t){if(t.ur.xt.x?1:e.yt.y?1:0}}]),r(t,[{key:"link",value:function(e){if(e.point===this.point)throw new Error("Tried to link already linked events");for(var t=e.point.events,n=0,r=t.length;n=0&&l>=0?au?-1:0:o<0&&l<0?au?1:0:lo?1:0}}}]),t}(),O=0,S=function(){function t(n,r,i,o){e(this,t),this.id=++O,this.leftSE=n,n.segment=this,n.otherSE=r,this.rightSE=r,r.segment=this,r.otherSE=n,this.rings=i,this.windings=o}return r(t,null,[{key:"compare",value:function(e,t){var n=e.leftSE.point.x,r=t.leftSE.point.x,i=e.rightSE.point.x,o=t.rightSE.point.x;if(oa&&s>l)return-1;var c=e.comparePoint(t.leftSE.point);if(c<0)return 1;if(c>0)return-1;var d=t.comparePoint(e.rightSE.point);return 0!==d?d:-1}if(n>r){if(as&&a>u)return 1;var f=t.comparePoint(e.leftSE.point);if(0!==f)return f;var h=e.comparePoint(t.rightSE.point);return h<0?1:h>0?-1:1}if(as)return 1;if(io){var A=e.comparePoint(t.rightSE.point);if(A<0)return 1;if(A>0)return-1}if(i!==o){var g=l-a,m=i-n,y=u-s,v=o-r;if(g>m&&yv)return-1}return i>o?1:iu?1:e.idt.id?1:0}}]),r(t,[{key:"replaceRightSE",value:function(e){this.rightSE=e,this.rightSE.segment=this,this.rightSE.otherSE=this.leftSE,this.leftSE.otherSE=this.rightSE}},{key:"bbox",value:function(){var e=this.leftSE.point.y,t=this.rightSE.point.y;return{ll:{x:this.leftSE.point.x,y:et?e:t}}}},{key:"vector",value:function(){return{x:this.rightSE.point.x-this.leftSE.point.x,y:this.rightSE.point.y-this.leftSE.point.y}}},{key:"isAnEndpoint",value:function(e){return e.x===this.leftSE.point.x&&e.y===this.leftSE.point.y||e.x===this.rightSE.point.x&&e.y===this.rightSE.point.y}},{key:"comparePoint",value:function(e){if(this.isAnEndpoint(e))return 0;var t=this.leftSE.point,n=this.rightSE.point,r=this.vector();if(t.x===n.x)return e.x===t.x?0:e.x0&&s.swapEvents(),E.comparePoints(this.leftSE.point,this.rightSE.point)>0&&this.swapEvents(),r&&(i.checkForConsuming(),o.checkForConsuming()),n}},{key:"swapEvents",value:function(){var e=this.rightSE;this.rightSE=this.leftSE,this.leftSE=e,this.leftSE.isLeft=!0,this.rightSE.isLeft=!1;for(var t=0,n=this.windings.length;t0){var o=n;n=r,r=o}if(n.prev===r){var a=n;n=r,r=a}for(var s=0,l=r.rings.length;s0))throw new Error("Tried to create degenerate segment at [".concat(e.x,", ").concat(e.y,"]"));i=n,o=e,a=-1}return new t(new E(i,!0),new E(o,!1),[r],[a])}}]),t}(),T=function(){function t(n,r,i){if(e(this,t),!Array.isArray(n)||0===n.length)throw new Error("Input geometry is not a valid Polygon or MultiPolygon");if(this.poly=r,this.isExterior=i,this.segments=[],"number"!=typeof n[0][0]||"number"!=typeof n[0][1])throw new Error("Input geometry is not a valid Polygon or MultiPolygon");var o=m.round(n[0][0],n[0][1]);this.bbox={ll:{x:o.x,y:o.y},ur:{x:o.x,y:o.y}};for(var a=o,s=1,l=n.length;sthis.bbox.ur.x&&(this.bbox.ur.x=u.x),u.y>this.bbox.ur.y&&(this.bbox.ur.y=u.y),a=u)}o.x===a.x&&o.y===a.y||this.segments.push(S.fromRing(a,o,this))}return r(t,[{key:"getSweepEvents",value:function(){for(var e=[],t=0,n=this.segments.length;tthis.bbox.ur.x&&(this.bbox.ur.x=a.bbox.ur.x),a.bbox.ur.y>this.bbox.ur.y&&(this.bbox.ur.y=a.bbox.ur.y),this.interiorRings.push(a)}this.multiPoly=r}return r(t,[{key:"getSweepEvents",value:function(){for(var e=this.exteriorRing.getSweepEvents(),t=0,n=this.interiorRings.length;tthis.bbox.ur.x&&(this.bbox.ur.x=a.bbox.ur.x),a.bbox.ur.y>this.bbox.ur.y&&(this.bbox.ur.y=a.bbox.ur.y),this.polys.push(a)}this.isSubject=r}return r(t,[{key:"getSweepEvents",value:function(){for(var e=[],t=0,n=this.polys.length;t0&&(e=r)}for(var i=e.segment.prevInResult(),o=i?i.prevInResult():null;;){if(!i)return null;if(!o)return i.ringOut;if(o.ringOut!==i.ringOut)return o.ringOut.enclosingRing()!==i.ringOut?i.ringOut:i.ringOut.enclosingRing();i=o.prevInResult(),o=i?i.prevInResult():null}}}]),t}(),I=function(){function t(n){e(this,t),this.exteriorRing=n,n.poly=this,this.interiorRings=[]}return r(t,[{key:"addInterior",value:function(e){this.interiorRings.push(e),e.poly=this}},{key:"getGeom",value:function(){var e=[this.exteriorRing.getGeom()];if(null===e[0])return null;for(var t=0,n=this.interiorRings.length;t1&&void 0!==arguments[1]?arguments[1]:S.compare;e(this,t),this.queue=n,this.tree=new u(r),this.segments=[]}return r(t,[{key:"process",value:function(e){var t=e.segment,n=[];if(e.consumedBy)return e.isLeft?this.queue.remove(e.otherSE):this.tree.remove(t),n;var r=e.isLeft?this.tree.insert(t):this.tree.find(t);if(!r)throw new Error("Unable to find segment #".concat(t.id," ")+"[".concat(t.leftSE.point.x,", ").concat(t.leftSE.point.y,"] -> ")+"[".concat(t.rightSE.point.x,", ").concat(t.rightSE.point.y,"] ")+"in SweepLine tree. Please submit a bug report.");for(var i=r,o=r,a=void 0,s=void 0;void 0===a;)null===(i=this.tree.prev(i))?a=null:void 0===i.key.consumedBy&&(a=i.key);for(;void 0===s;)null===(o=this.tree.next(o))?s=null:void 0===o.key.consumedBy&&(s=o.key);if(e.isLeft){var l=null;if(a){var u=a.getIntersection(t);if(null!==u&&(t.isAnEndpoint(u)||(l=u),!a.isAnEndpoint(u)))for(var c=this._splitSafely(a,u),d=0,f=c.length;d0?(this.tree.remove(t),n.push(e)):(this.segments.push(t),t.prev=a)}else{if(a&&s){var w=a.getIntersection(s);if(null!==w){if(!a.isAnEndpoint(w))for(var x=this._splitSafely(a,w),M=0,O=x.length;MR)throw new Error("Infinite loop when putting segment endpoints in a priority queue (queue size too big). Please file a bug report.");for(var w=new k(A),x=A.size,M=A.pop();M;){var O=M.key;if(A.size===x){var S=O.segment;throw new Error("Unable to pop() ".concat(O.isLeft?"left":"right"," SweepEvent ")+"[".concat(O.point.x,", ").concat(O.point.y,"] from segment #").concat(S.id," ")+"[".concat(S.leftSE.point.x,", ").concat(S.leftSE.point.y,"] -> ")+"[".concat(S.rightSE.point.x,", ").concat(S.rightSE.point.y,"] from queue. ")+"Please file a bug report.")}if(A.size>R)throw new Error("Infinite loop when passing sweep line over endpoints (queue size too big). Please file a bug report.");if(w.segments.length>j)throw new Error("Infinite loop when passing sweep line over endpoints (too many sweep line segments). Please file a bug report.");for(var T=w.process(O),C=0,I=T.length;C1?t-1:0),r=1;r1?t-1:0),r=1;r1?t-1:0),r=1;r1?t-1:0),r=1;r180?-360:o[0]-a[0]>180?360:0;var s=function(e,t,n){var i=n=void 0===n?r.earthRadius:Number(n),o=e[1]*Math.PI/180,a=t[1]*Math.PI/180,s=a-o,l=Math.abs(t[0]-e[0])*Math.PI/180;l>Math.PI&&(l-=2*Math.PI);var u=Math.log(Math.tan(a/2+Math.PI/4)/Math.tan(o/2+Math.PI/4)),c=Math.abs(u)>1e-11?s/u:Math.cos(o);return Math.sqrt(s*s+c*c*l*l)*i}(o,a);return Object(r.convertLength)(s,"meters",n.units)}},function(e,t,n){"use strict";t.a=function(e){return"object"==typeof e&&"length"in e?e:Array.from(e)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));const r=262144;var i=n(169),o=n(487);function a(e,t){return i.c?async function*(e,t){const n=e.getReader();let r;try{for(;;){const e=r||n.read();null!=t&&t._streamReadAhead&&(r=n.read());const{done:i,value:a}=await e;if(i)return;yield Object(o.a)(a)}}catch(e){n.releaseLock()}}(e,t):async function*(e,t){for await(const t of e)yield Object(o.a)(t)}(e)}var s=n(48);function l(e,t){if("string"==typeof e)return function*(e,t){const n=(null==t?void 0:t.chunkSize)||262144;let r=0;const i=new TextEncoder;for(;r1&&void 0!==arguments[1]?arguments[1]:{};return function*(){const{chunkSize:n=r}=t;let i=0;for(;i0?this.lastSampleCount/this.sampleSize:0}getSampleAverageTime(){return this.sampleSize>0?this.lastSampleTime/this.sampleSize:0}getSampleHz(){return this.lastSampleTime>0?this.sampleSize/(this.lastSampleTime/1e3):0}getAverageCount(){return this.samples>0?this.count/this.samples:0}getAverageTime(){return this.samples>0?this.time/this.samples:0}getHz(){return this.time>0?this.samples/(this.time/1e3):0}reset(){return this.time=0,this.count=0,this.samples=0,this.lastTiming=0,this.lastSampleTime=0,this.lastSampleCount=0,this._count=0,this._time=0,this._samples=0,this._startTime=0,this._timerPending=!1,this}_checkSampling(){this._samples===this.sampleSize&&(this.lastSampleTime=this._time,this.lastSampleCount=this._count,this.count+=this._count,this.time+=this._time,this.samples+=this._samples,this._time=0,this._count=0,this._samples=0)}}class a{constructor(e){Object(r.a)(this,"id",void 0),Object(r.a)(this,"stats",{}),this.id=e.id,this.stats={},this._initializeStats(e.stats),Object.seal(this)}get(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"count";return this._getOrCreate({name:e,type:t})}get size(){return Object.keys(this.stats).length}reset(){for(const e in this.stats)this.stats[e].reset();return this}forEach(e){for(const t in this.stats)e(this.stats[t])}getTable(){const e={};return this.forEach(t=>{e[t.name]={time:t.time||0,count:t.count||0,average:t.getAverageTime()||0,hz:t.getHz()||0}}),e}_initializeStats(){(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).forEach(e=>this._getOrCreate(e))}_getOrCreate(e){if(!e||!e.name)return null;const{name:t,type:n}=e;return this.stats[t]||(this.stats[t]=e instanceof o?e:new o(t,n)),this.stats[t]}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return a})),n.d(t,"c",(function(){return c})),n.d(t,"b",(function(){return d}));var r=n(214),i=n(323);const o={[r.b]:"#ifdef MODULE_LOGDEPTH\n logdepth_adjustPosition(gl_Position);\n#endif\n",[r.a]:"#ifdef MODULE_MATERIAL\n gl_FragColor = material_filterColor(gl_FragColor);\n#endif\n\n#ifdef MODULE_LIGHTING\n gl_FragColor = lighting_filterColor(gl_FragColor);\n#endif\n\n#ifdef MODULE_FOG\n gl_FragColor = fog_filterColor(gl_FragColor);\n#endif\n\n#ifdef MODULE_PICKING\n gl_FragColor = picking_filterHighlightColor(gl_FragColor);\n gl_FragColor = picking_filterPickingColor(gl_FragColor);\n#endif\n\n#ifdef MODULE_LOGDEPTH\n logdepth_setFragDepth();\n#endif\n"},a="__LUMA_INJECT_DECLARATIONS__",s=/void\s+main\s*\([^)]*\)\s*\{\n?/,l=/}\n?[^{}]*$/,u=[];function c(e,t,n){let i=arguments.length>3&&void 0!==arguments[3]&&arguments[3];const c=t===r.b;for(const t in n){const r=n[t];r.sort((e,t)=>e.order-t.order),u.length=r.length;for(let e=0,t=r.length;ee+i));break;case"vs:#main-end":c&&(e=e.replace(l,e=>i+e));break;case"fs:#decl":c||(e=e.replace(a,i));break;case"fs:#main-start":c||(e=e.replace(s,e=>e+i));break;case"fs:#main-end":c||(e=e.replace(l,e=>i+e));break;default:e=e.replace(t,e=>e+i)}}return e=e.replace(a,""),i&&(e=e.replace(/\}\s*$/,e=>e+o[t])),e}function d(e){const t={};return Object(i.a)(Array.isArray(e)&&e.length>1),e.forEach(e=>{for(const n in e)t[n]=t[n]?"".concat(t[n],"\n").concat(e[n]):e[n]}),t}},function(e,t,n){"use strict";var r;n.d(t,"a",(function(){return r})),function(e){e[e.V1=0]="V1",e[e.V2=1]="V2",e[e.V3=2]="V3",e[e.V4=3]="V4",e[e.V5=4]="V5"}(r||(r={}))},function(e,t,n){"use strict";var r;n.d(t,"a",(function(){return r})),function(e){e[e.Little=0]="Little",e[e.Big=1]="Big"}(r||(r={}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(31);class i{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsNull(e,t){return(t||new i).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsNull(e,t){return e.setPosition(e.position()+r.SIZE_PREFIX_LENGTH),(t||new i).__init(e.readInt32(e.position())+e.position(),e)}static startNull(e){e.startObject(0)}static endNull(e){return e.endObject()}static createNull(e){return i.startNull(e),i.endNull(e)}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(31);class i{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsBinary(e,t){return(t||new i).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsBinary(e,t){return e.setPosition(e.position()+r.SIZE_PREFIX_LENGTH),(t||new i).__init(e.readInt32(e.position())+e.position(),e)}static startBinary(e){e.startObject(0)}static endBinary(e){return e.endObject()}static createBinary(e){return i.startBinary(e),i.endBinary(e)}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(31);class i{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsUtf8(e,t){return(t||new i).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsUtf8(e,t){return e.setPosition(e.position()+r.SIZE_PREFIX_LENGTH),(t||new i).__init(e.readInt32(e.position())+e.position(),e)}static startUtf8(e){e.startObject(0)}static endUtf8(e){return e.endObject()}static createUtf8(e){return i.startUtf8(e),i.endUtf8(e)}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(31);class i{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsBool(e,t){return(t||new i).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsBool(e,t){return e.setPosition(e.position()+r.SIZE_PREFIX_LENGTH),(t||new i).__init(e.readInt32(e.position())+e.position(),e)}static startBool(e){e.startObject(0)}static endBool(e){return e.endObject()}static createBool(e){return i.startBool(e),i.endBool(e)}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(31);class i{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsList(e,t){return(t||new i).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsList(e,t){return e.setPosition(e.position()+r.SIZE_PREFIX_LENGTH),(t||new i).__init(e.readInt32(e.position())+e.position(),e)}static startList(e){e.startObject(0)}static endList(e){return e.endObject()}static createList(e){return i.startList(e),i.endList(e)}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(31);class i{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsStruct_(e,t){return(t||new i).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsStruct_(e,t){return e.setPosition(e.position()+r.SIZE_PREFIX_LENGTH),(t||new i).__init(e.readInt32(e.position())+e.position(),e)}static startStruct_(e){e.startObject(0)}static endStruct_(e){return e.endObject()}static createStruct_(e){return i.startStruct_(e),i.endStruct_(e)}}},function(e,t,n){"use strict";t.a=e=>()=>e},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(71),i=n.n(r),o=n(60);function a(e,t){return!t||"object"!==i()(t)&&"function"!=typeof t?Object(o.a)(e):t}},function(e,t,n){"use strict";function r(e){return(r=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";function r(e,t,n){const r=t[0],i=t[1],o=n[3]*r+n[7]*i||1;return e[0]=(n[0]*r+n[4]*i)/o,e[1]=(n[1]*r+n[5]*i)/o,e}function i(e,t,n){const r=t[0],i=t[1],o=t[2],a=n[3]*r+n[7]*i+n[11]*o||1;return e[0]=(n[0]*r+n[4]*i+n[8]*o)/a,e[1]=(n[1]*r+n[5]*i+n[9]*o)/a,e[2]=(n[2]*r+n[6]*i+n[10]*o)/a,e}function o(e,t,n){const r=t[0],i=t[1];return e[0]=n[0]*r+n[2]*i,e[1]=n[1]*r+n[3]*i,e[2]=t[2],e}n.d(t,"a",(function(){return r})),n.d(t,"c",(function(){return i})),n.d(t,"b",(function(){return o}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return s})),n.d(t,"b",(function(){return l}));var r=n(212),i=n(188);const o=1735152710;function a(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return`${String.fromCharCode(e.getUint8(t+0))}${String.fromCharCode(e.getUint8(t+1))}${String.fromCharCode(e.getUint8(t+2))}${String.fromCharCode(e.getUint8(t+3))}`}function s(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=new DataView(e),{magic:i=o}=n,a=r.getUint32(t,!1);return a===i||a===o}function l(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const i=new DataView(t),o=a(i,n+0),s=i.getUint32(n+4,!0),l=i.getUint32(n+8,!0);switch(Object.assign(e,{header:{byteOffset:n,byteLength:l,hasBinChunk:!1},type:o,version:s,json:{},binChunks:[]}),n+=12,e.version){case 1:return u(e,i,n);case 2:return c(e,i,n,r={});default:throw new Error(`Invalid GLB version ${e.version}. Only supports version 1 and 2.`)}}function u(e,t,n){Object(r.a)(e.header.byteLength>20);const i=t.getUint32(n+0,!0),o=t.getUint32(n+4,!0);return n+=8,Object(r.a)(0===o),d(e,t,n,i),n+=i,n+=f(e,t,n,e.header.byteLength)}function c(e,t,n,o){return Object(r.a)(e.header.byteLength>20),function(e,t,n,r){for(;n+8<=e.header.byteLength;){const o=t.getUint32(n+0,!0),a=t.getUint32(n+4,!0);switch(n+=8,a){case 1313821514:d(e,t,n,o);break;case 5130562:f(e,t,n,o);break;case 0:r.strict||d(e,t,n,o);break;case 1:r.strict||f(e,t,n,o)}n+=Object(i.b)(o,4)}}(e,t,n,o),n+e.header.byteLength}function d(e,t,n,r){const o=new Uint8Array(t.buffer,n,r),a=new TextDecoder("utf8").decode(o);return e.json=JSON.parse(a),Object(i.b)(r,4)}function f(e,t,n,r){return e.header.hasBinChunk=!0,e.binChunks.push({byteOffset:n,byteLength:r,arrayBuffer:t.buffer}),Object(i.b)(r,4)}},function(e,t,n){"use strict";n.d(t,"b",(function(){return r})),n.d(t,"a",(function(){return i}));const r={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},i={5120:1,5121:1,5122:2,5123:2,5125:4,5126:4}},function(e,t,n){"use strict";n.d(t,"a",(function(){return c})),n.d(t,"b",(function(){return d}));var r=n(150),i=n(39);const o=Math.PI/180,a=new Float32Array(16),s=new Float32Array(12);function l(e,t,n){const r=t[0]*o,i=t[1]*o,a=t[2]*o,s=Math.sin(a),l=Math.sin(r),u=Math.sin(i),c=Math.cos(a),d=Math.cos(r),f=Math.cos(i),h=n[0],p=n[1],A=n[2];e[0]=h*f*d,e[1]=h*u*d,e[2]=h*-l,e[3]=p*(-u*c+f*l*s),e[4]=p*(f*c+u*l*s),e[5]=p*d*s,e[6]=A*(u*s+f*l*c),e[7]=A*(-f*s+u*l*c),e[8]=A*d*c}function u(e){return e[0]=e[0],e[1]=e[1],e[2]=e[2],e[3]=e[4],e[4]=e[5],e[5]=e[6],e[6]=e[8],e[7]=e[9],e[8]=e[10],e[9]=e[12],e[10]=e[13],e[11]=e[14],e.subarray(0,12)}const c={size:12,accessor:["getOrientation","getScale","getTranslation","getTransformMatrix"],shaderAttributes:{instanceModelMatrix__LOCATION_0:{size:3,elementOffset:0},instanceModelMatrix__LOCATION_1:{size:3,elementOffset:3},instanceModelMatrix__LOCATION_2:{size:3,elementOffset:6},instanceTranslation:{size:3,elementOffset:9}},update(e,{startRow:t,endRow:n}){const{data:i,getOrientation:o,getScale:c,getTranslation:d,getTransformMatrix:f}=this.props,h=Array.isArray(f),p=h&&16===f.length,A=Array.isArray(c),g=Array.isArray(o),m=Array.isArray(d),y=p||!h&&Boolean(f(i[0]));e.constant=y?p:g&&A&&m;const v=e.value;if(e.constant){let t;if(y)a.set(f),t=u(a);else{t=s;l(t,o,c),t.set(d,9)}e.value=new Float32Array(t)}else{let h=t*e.size;const{iterable:b,objectInfo:_}=Object(r.a)(i,t,n);for(const e of b){let t;if(_.index++,y)a.set(p?f:f(e,_)),t=u(a);else{t=s;l(t,g?o:o(e,_),A?c:c(e,_)),t.set(m?d:d(e,_),9)}v[h++]=t[0],v[h++]=t[1],v[h++]=t[2],v[h++]=t[3],v[h++]=t[4],v[h++]=t[5],v[h++]=t[6],v[h++]=t[7],v[h++]=t[8],v[h++]=t[9],v[h++]=t[10],v[h++]=t[11]}}}};function d(e,t){return t===i.a.CARTESIAN||t===i.a.METER_OFFSETS||t===i.a.DEFAULT&&!e.isGeospatial}},function(e,t,n){"use strict";function r(e,t){return(r=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&r(e,t)}n.d(t,"a",(function(){return i}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return A}));var r=n(104);class i{terminate(){}}var o=n(149);const a=new Map;function s(e){Object(o.a)(e.source&&!e.url||!e.source&&e.url);let t=a.get(e.source||e.url);return t||(e.url&&(t=function(e){if(!e.startsWith("http"))return e;return l((t=e,`try {\n importScripts('${t}');\n} catch (error) {\n console.error(error);\n throw error;\n}`));var t}(e.url),a.set(e.url,t)),e.source&&(t=l(e.source),a.set(e.source,t))),Object(o.a)(t),t}function l(e){const t=new Blob([e],{type:"application/javascript"});return URL.createObjectURL(t)}var u=n(540);const c=()=>{};class d{static isSupported(){return"undefined"!=typeof Worker&&r.a||void 0!==i&&!r.a}constructor(e){this.name=void 0,this.source=void 0,this.url=void 0,this.terminated=!1,this.worker=void 0,this.onMessage=void 0,this.onError=void 0,this._loadableURL="";const{name:t,source:n,url:i}=e;Object(o.a)(n||i),this.name=t,this.source=n,this.url=i,this.onMessage=c,this.onError=e=>console.log(e),this.worker=r.a?this._createBrowserWorker():this._createNodeWorker()}destroy(){this.onMessage=c,this.onError=c,this.worker.terminate(),this.terminated=!0}get isRunning(){return Boolean(this.onMessage)}postMessage(e,t){t=t||Object(u.a)(e),this.worker.postMessage(e,t)}_getErrorFromErrorEvent(e){let t="Failed to load ";return t+=`worker ${this.name} from ${this.url}. `,e.message&&(t+=e.message+" in "),e.lineno&&(t+=`:${e.lineno}:${e.colno}`),new Error(t)}_createBrowserWorker(){this._loadableURL=s({source:this.source,url:this.url});const e=new Worker(this._loadableURL,{name:this.name});return e.onmessage=e=>{e.data?this.onMessage(e.data):this.onError(new Error("No data received"))},e.onerror=e=>{this.onError(this._getErrorFromErrorEvent(e)),this.terminated=!0},e.onmessageerror=e=>console.error(e),e}_createNodeWorker(){let e;if(this.url){const t=this.url.includes(":/")||this.url.startsWith("/")?this.url:"./"+this.url;e=new i(t,{eval:!1})}else{if(!this.source)throw new Error("no worker");e=new i(this.source,{eval:!0})}return e.on("message",e=>{this.onMessage(e)}),e.on("error",e=>{this.onError(e)}),e.on("exit",e=>{}),e}}class f{constructor(e,t){this.name=void 0,this.workerThread=void 0,this.isRunning=!0,this.result=void 0,this._resolve=()=>{},this._reject=()=>{},this.name=e,this.workerThread=t,this.result=new Promise((e,t)=>{this._resolve=e,this._reject=t})}postMessage(e,t){this.workerThread.postMessage({source:"loaders.gl",type:e,payload:t})}done(e){Object(o.a)(this.isRunning),this.isRunning=!1,this._resolve(e)}error(e){Object(o.a)(this.isRunning),this.isRunning=!1,this._reject(e)}}class h{static isSupported(){return d.isSupported()}constructor(e){this.name="unnamed",this.source=void 0,this.url=void 0,this.maxConcurrency=1,this.maxMobileConcurrency=1,this.onDebug=()=>{},this.reuseWorkers=!0,this.props={},this.jobQueue=[],this.idleQueue=[],this.count=0,this.isDestroyed=!1,this.source=e.source,this.url=e.url,this.setProps(e)}destroy(){this.idleQueue.forEach(e=>e.destroy()),this.isDestroyed=!0}setProps(e){this.props={...this.props,...e},void 0!==e.name&&(this.name=e.name),void 0!==e.maxConcurrency&&(this.maxConcurrency=e.maxConcurrency),void 0!==e.maxMobileConcurrency&&(this.maxMobileConcurrency=e.maxMobileConcurrency),void 0!==e.reuseWorkers&&(this.reuseWorkers=e.reuseWorkers),void 0!==e.onDebug&&(this.onDebug=e.onDebug)}async startJob(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(e,t,n)=>e.done(n),n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:(e,t)=>e.error(t);const r=new Promise(r=>(this.jobQueue.push({name:e,onMessage:t,onError:n,onStart:r}),this));return this._startQueuedJob(),await r}async _startQueuedJob(){if(!this.jobQueue.length)return;const e=this._getAvailableWorker();if(!e)return;const t=this.jobQueue.shift();if(t){this.onDebug({message:"Starting job",name:t.name,workerThread:e,backlog:this.jobQueue.length});const n=new f(t.name,e);e.onMessage=e=>t.onMessage(n,e.type,e.payload),e.onError=e=>t.onError(n,e),t.onStart(n);try{await n.result}catch(e){console.error("Worker exception: "+e)}finally{this.returnWorkerToQueue(e)}}}returnWorkerToQueue(e){!r.a||this.isDestroyed||!this.reuseWorkers||this.count>this._getMaxConcurrency()?(e.destroy(),this.count--):this.idleQueue.push(e),this.isDestroyed||this._startQueuedJob()}_getAvailableWorker(){if(this.idleQueue.length>0)return this.idleQueue.shift()||null;if(this.count{}};class A{static isSupported(){return d.isSupported()}static getWorkerFarm(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return A._workerFarm=A._workerFarm||new A({}),A._workerFarm.setProps(e),A._workerFarm}constructor(e){this.props=void 0,this.workerPools=new Map,this.props={...p},this.setProps(e),this.workerPools=new Map}destroy(){for(const e of this.workerPools.values())e.destroy();this.workerPools=new Map}setProps(e){this.props={...this.props,...e};for(const e of this.workerPools.values())e.setProps(this._getWorkerPoolProps())}getWorkerPool(e){const{name:t,source:n,url:r}=e;let i=this.workerPools.get(t);return i||(i=new h({name:t,source:n,url:r}),i.setProps(this._getWorkerPoolProps()),this.workerPools.set(t,i)),i}_getWorkerPoolProps(){return{maxConcurrency:this.props.maxConcurrency,maxMobileConcurrency:this.props.maxMobileConcurrency,reuseWorkers:this.props.reuseWorkers,onDebug:this.props.onDebug}}}A._workerFarm=void 0},function(e,t,n){(function(e,n){var r="[object Arguments]",i="[object Map]",o="[object Object]",a="[object Set]",s=/^\[object .+?Constructor\]$/,l=/^(?:0|[1-9]\d*)$/,u={};u["[object Float32Array]"]=u["[object Float64Array]"]=u["[object Int8Array]"]=u["[object Int16Array]"]=u["[object Int32Array]"]=u["[object Uint8Array]"]=u["[object Uint8ClampedArray]"]=u["[object Uint16Array]"]=u["[object Uint32Array]"]=!0,u[r]=u["[object Array]"]=u["[object ArrayBuffer]"]=u["[object Boolean]"]=u["[object DataView]"]=u["[object Date]"]=u["[object Error]"]=u["[object Function]"]=u[i]=u["[object Number]"]=u[o]=u["[object RegExp]"]=u[a]=u["[object String]"]=u["[object WeakMap]"]=!1;var c="object"==typeof e&&e&&e.Object===Object&&e,d="object"==typeof self&&self&&self.Object===Object&&self,f=c||d||Function("return this")(),h=t&&!t.nodeType&&t,p=h&&"object"==typeof n&&n&&!n.nodeType&&n,A=p&&p.exports===h,g=A&&c.process,m=function(){try{return g&&g.binding&&g.binding("util")}catch(e){}}(),y=m&&m.isTypedArray;function v(e,t){for(var n=-1,r=null==e?0:e.length;++ns))return!1;var u=o.get(e);if(u&&o.get(t))return u==t;var c=-1,d=!0,f=2&n?new oe:void 0;for(o.set(e,t),o.set(t,e);++c-1},re.prototype.set=function(e,t){var n=this.__data__,r=le(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},ie.prototype.clear=function(){this.size=0,this.__data__={hash:new ne,map:new(G||re),string:new ne}},ie.prototype.delete=function(e){var t=ge(this,e).delete(e);return this.size-=t?1:0,t},ie.prototype.get=function(e){return ge(this,e).get(e)},ie.prototype.has=function(e){return ge(this,e).has(e)},ie.prototype.set=function(e,t){var n=ge(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},oe.prototype.add=oe.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},oe.prototype.has=function(e){return this.__data__.has(e)},ae.prototype.clear=function(){this.__data__=new re,this.size=0},ae.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},ae.prototype.get=function(e){return this.__data__.get(e)},ae.prototype.has=function(e){return this.__data__.has(e)},ae.prototype.set=function(e,t){var n=this.__data__;if(n instanceof re){var r=n.__data__;if(!G||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new ie(r)}return n.set(e,t),this.size=n.size,this};var ye=z?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var n=-1,r=null==e?0:e.length,i=0,o=[];++n-1&&e%1==0&&e-1&&e%1==0&&e<=9007199254740991}function Te(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Ce(e){return null!=e&&"object"==typeof e}var Le=y?function(e){return function(t){return e(t)}}(y):function(e){return Ce(e)&&Se(e.length)&&!!u[ue(e)]};function Pe(e){return function(e){return null!=e&&Se(e.length)&&!Oe(e)}(e)?se(e):he(e)}n.exports=function(e,t){return de(e,t)}}).call(this,n(68),n(219)(e))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(700);Object.keys(r).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===r[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return r[e]}}))}));var i=n(1271);Object.keys(i).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===i[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return i[e]}}))}));var o=n(1276);Object.keys(o).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===o[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return o[e]}}))}))},function(e,t,n){"use strict";e.exports={Analyzer:n(1225),DATA_TYPES:n(442).DATA_TYPES,RegexList:n(705)}},function(e,t,n){"use strict";e.exports=function(e){var t,n={};if(!(e instanceof Object)||Array.isArray(e))throw new Error("keyMirror(...): Argument must be an object.");for(t in e)e.hasOwnProperty(t)&&(n[t]=t);return n}},function(e,t,n){(function(t){var r,i=void 0!==t?t:"undefined"!=typeof window?window:{},o=n(1235);"undefined"!=typeof document?r=document:(r=i["__GLOBAL_DOCUMENT_CACHE@4"])||(r=i["__GLOBAL_DOCUMENT_CACHE@4"]=o),e.exports=r}).call(this,n(68))},function(e,t,n){"use strict";n.r(t),n.d(t,"SortableContext",(function(){return y})),n.d(t,"arrayMove",(function(){return s})),n.d(t,"arraySwap",(function(){return l})),n.d(t,"defaultAnimateLayoutChanges",(function(){return b})),n.d(t,"defaultNewIndexGetter",(function(){return v})),n.d(t,"hasSortableData",(function(){return E})),n.d(t,"horizontalListSortingStrategy",(function(){return f})),n.d(t,"rectSortingStrategy",(function(){return h})),n.d(t,"rectSwappingStrategy",(function(){return p})),n.d(t,"sortableKeyboardCoordinates",(function(){return S})),n.d(t,"useSortable",(function(){return M})),n.d(t,"verticalListSortingStrategy",(function(){return g}));var r=n(0),i=n.n(r),o=n(111),a=n(22);function s(e,t,n){const r=e.slice();return r.splice(n<0?r.length+n:n,0,r.splice(t,1)[0]),r}function l(e,t,n){const r=e.slice();return r[t]=e[n],r[n]=e[t],r}function u(e,t){return e.reduce((e,n,r)=>{const i=t.get(n);return i&&(e[r]=i),e},Array(e.length))}function c(e){return null!==e&&e>=0}const d={scaleX:1,scaleY:1},f=e=>{var t;let{rects:n,activeNodeRect:r,activeIndex:i,overIndex:o,index:a}=e;const s=null!=(t=n[i])?t:r;if(!s)return null;const l=function(e,t,n){const r=e[t],i=e[t-1],o=e[t+1];if(!r||!i&&!o)return 0;if(ni&&a<=o?{x:-s.width-l,y:0,...d}:a=o?{x:s.width+l,y:0,...d}:{x:0,y:0,...d}};const h=e=>{let{rects:t,activeIndex:n,overIndex:r,index:i}=e;const o=s(t,r,n),a=t[i],l=o[i];return l&&a?{x:l.left-a.left,y:l.top-a.top,scaleX:l.width/a.width,scaleY:l.height/a.height}:null},p=e=>{let t,n,{activeIndex:r,index:i,rects:o,overIndex:a}=e;return i===r&&(t=o[i],n=o[a]),i===a&&(t=o[i],n=o[r]),n&&t?{x:n.left-t.left,y:n.top-t.top,scaleX:n.width/t.width,scaleY:n.height/t.height}:null},A={scaleX:1,scaleY:1},g=e=>{var t;let{activeIndex:n,activeNodeRect:r,index:i,rects:o,overIndex:a}=e;const s=null!=(t=o[n])?t:r;if(!s)return null;if(i===n){const e=o[a];return e?{x:0,y:nn&&i<=a?{x:0,y:-s.height-l,...A}:i=a?{x:0,y:s.height+l,...A}:{x:0,y:0,...A}};const m=i.a.createContext({activeIndex:-1,containerId:"Sortable",disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:h,disabled:{draggable:!1,droppable:!1}});function y(e){let{children:t,id:n,items:s,strategy:l=h,disabled:c=!1}=e;const{active:d,dragOverlay:f,droppableRects:p,over:A,measureDroppableContainers:g}=Object(o.useDndContext)(),y=Object(a.useUniqueId)("Sortable",n),v=Boolean(null!==f.rect),b=Object(r.useMemo)(()=>s.map(e=>"object"==typeof e&&"id"in e?e.id:e),[s]),_=null!=d,w=d?b.indexOf(d.id):-1,x=A?b.indexOf(A.id):-1,M=Object(r.useRef)(b),E=!function(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n{E&&_&&g(b)},[E,b,_,g]),Object(r.useEffect)(()=>{M.current=b},[b]);const T=Object(r.useMemo)(()=>({activeIndex:w,containerId:y,disabled:S,disableTransforms:O,items:b,overIndex:x,useDragOverlay:v,sortedRects:u(b,p),strategy:l}),[w,y,S.draggable,S.droppable,O,b,x,p,v,l]);return i.a.createElement(m.Provider,{value:T},t)}const v=e=>{let{id:t,items:n,activeIndex:r,overIndex:i}=e;return s(n,r,i).indexOf(t)},b=e=>{let{containerId:t,isSorting:n,wasDragging:r,index:i,items:o,newIndex:a,previousItems:s,previousContainerId:l,transition:u}=e;return!(!u||!r)&&((s===o||i!==a)&&(!!n||a!==i&&t===l))},_={duration:200,easing:"ease"},w=a.CSS.Transition.toString({property:"transform",duration:0,easing:"linear"}),x={roleDescription:"sortable"};function M(e){let{animateLayoutChanges:t=b,attributes:n,disabled:i,data:s,getNewIndex:l=v,id:u,strategy:d,resizeObserverConfig:f,transition:h=_}=e;const{items:p,containerId:A,activeIndex:g,disabled:y,disableTransforms:M,sortedRects:E,overIndex:O,useDragOverlay:S,strategy:T}=Object(r.useContext)(m),C=function(e,t){var n,r;if("boolean"==typeof e)return{draggable:e,droppable:!1};return{draggable:null!=(n=null==e?void 0:e.draggable)?n:t.draggable,droppable:null!=(r=null==e?void 0:e.droppable)?r:t.droppable}}(i,y),L=p.indexOf(u),P=Object(r.useMemo)(()=>({sortable:{containerId:A,index:L,items:p},...s}),[A,s,L,p]),I=Object(r.useMemo)(()=>p.slice(p.indexOf(u)),[p,u]),{rect:D,node:k,isOver:R,setNodeRef:j}=Object(o.useDroppable)({id:u,data:P,disabled:C.droppable,resizeObserverConfig:{updateMeasurementsFor:I,...f}}),{active:F,activatorEvent:N,activeNodeRect:B,attributes:z,setNodeRef:U,listeners:H,isDragging:V,over:G,setActivatorNodeRef:Y,transform:W}=Object(o.useDraggable)({id:u,data:P,attributes:{...x,...n},disabled:C.draggable}),q=Object(a.useCombinedRefs)(j,U),X=Boolean(F),Z=X&&!M&&c(g)&&c(O),K=!S&&V,Q=K&&Z?W:null,J=Z?null!=Q?Q:(null!=d?d:T)({rects:E,activeNodeRect:B,activeIndex:g,overIndex:O,index:L}):null,$=c(g)&&c(O)?l({id:u,items:p,activeIndex:g,overIndex:O}):L,ee=null==F?void 0:F.id,te=Object(r.useRef)({activeId:ee,items:p,newIndex:$,containerId:A}),ne=p!==te.current.items,re=t({active:F,containerId:A,isDragging:V,isSorting:X,id:u,index:L,items:p,newIndex:te.current.newIndex,previousItems:te.current.items,previousContainerId:te.current.containerId,transition:h,wasDragging:null!=te.current.activeId}),ie=function(e){let{disabled:t,index:n,node:i,rect:s}=e;const[l,u]=Object(r.useState)(null),c=Object(r.useRef)(n);return Object(a.useIsomorphicLayoutEffect)(()=>{if(!t&&n!==c.current&&i.current){const e=s.current;if(e){const t=Object(o.getClientRect)(i.current,{ignoreTransform:!0}),n={x:e.left-t.left,y:e.top-t.top,scaleX:e.width/t.width,scaleY:e.height/t.height};(n.x||n.y)&&u(n)}}n!==c.current&&(c.current=n)},[t,n,i,s]),Object(r.useEffect)(()=>{l&&u(null)},[l]),l}({disabled:!re,index:L,node:k,rect:D});return Object(r.useEffect)(()=>{X&&te.current.newIndex!==$&&(te.current.newIndex=$),A!==te.current.containerId&&(te.current.containerId=A),p!==te.current.items&&(te.current.items=p)},[X,$,A,p]),Object(r.useEffect)(()=>{if(ee===te.current.activeId)return;if(ee&&!te.current.activeId)return void(te.current.activeId=ee);const e=setTimeout(()=>{te.current.activeId=ee},50);return()=>clearTimeout(e)},[ee]),{active:F,activeIndex:g,attributes:z,data:P,rect:D,index:L,newIndex:$,items:p,isOver:R,isSorting:X,isDragging:V,listeners:H,node:k,overIndex:O,over:G,setNodeRef:q,setActivatorNodeRef:Y,setDroppableNodeRef:j,setDraggableNodeRef:U,transform:null!=ie?ie:J,transition:function(){if(ie||ne&&te.current.newIndex===L)return w;if(K&&!Object(a.isKeyboardEvent)(N)||!h)return;if(X||re)return a.CSS.Transition.toString({...h,property:"transform"});return}()}}function E(e){if(!e)return!1;const t=e.data.current;return!!(t&&"sortable"in t&&"object"==typeof t.sortable&&"containerId"in t.sortable&&"items"in t.sortable&&"index"in t.sortable)}const O=[o.KeyboardCode.Down,o.KeyboardCode.Right,o.KeyboardCode.Up,o.KeyboardCode.Left],S=(e,t)=>{let{context:{active:n,collisionRect:r,droppableRects:i,droppableContainers:s,over:l,scrollableAncestors:u}}=t;if(O.includes(e.code)){if(e.preventDefault(),!n||!r)return;const t=[];s.getEnabled().forEach(n=>{if(!n||null!=n&&n.disabled)return;const a=i.get(n.id);if(a)switch(e.code){case o.KeyboardCode.Down:r.topa.top&&t.push(n);break;case o.KeyboardCode.Left:r.left>a.left&&t.push(n);break;case o.KeyboardCode.Right:r.left1&&(d=c[1].id),null!=d){const e=s.get(n.id),t=s.get(d),l=t?i.get(t.id):null,c=null==t?void 0:t.node.current;if(c&&l&&e&&t){const n=Object(o.getScrollableAncestors)(c).some((e,t)=>u[t]!==e),i=T(e,t),s=function(e,t){if(!E(e)||!E(t))return!1;if(!T(e,t))return!1;return e.data.current.sortable.index0&&void 0!==arguments[0]?arguments[0]:{},n=t.version,r=void 0===n?u.CURRENT_VERSION:n,i=t.key,a=void 0===i?"":i,l=t.properties,c=void 0===l?null:l;(0,o.default)(this,e),(0,s.default)(this,"version",void 0),(0,s.default)(this,"key",void 0),(0,s.default)(this,"properties",void 0),this.version=r,this.properties=c,this.key=a}return(0,a.default)(e,[{key:"loadPropertiesOrApplySchema",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2?arguments[2]:void 0;return this._getPropertyValueFromSchema("load",e,t,n)}},{key:"savePropertiesOrApplySchema",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2?arguments[2]:void 0;return this._getPropertyValueFromSchema("save",e,t,n)}},{key:"_getPropertyValueFromSchema",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],o="_".concat(e);return(0,s.default)({},this.key,this.properties?Object.keys(this.properties).reduce((function(a,l){return d(d({},a),l in t?n.properties[l]?n.properties[l][e]?n.properties[l][o](t[l],[].concat((0,i.default)(r),[t]),a):{}:(0,s.default)({},l,t[l]):{})}),{}):t)}},{key:"_isCurrentVersion",value:function(){return this.version===u.CURRENT_VERSION}},{key:"outdatedVersionError",value:function(){this._isCurrentVersion()||l.console.error("".concat(this.key," ").concat(this.version," is outdated. save should not be called anymore"))}},{key:"_save",value:function(){return this.outdatedVersionError(),this.save.apply(this,arguments)}},{key:"save",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.savePropertiesOrApplySchema(e,t,n)}},{key:"_load",value:function(){return this.load.apply(this,arguments)}},{key:"load",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.loadPropertiesOrApplySchema(e,t,n)}}]),e}();t.default=f},function(e,t,n){"use strict";function r(e){try{let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return async function*(){const n=new TextDecoder(void 0,t);for await(const t of e)yield"string"==typeof t?t:n.decode(t,{stream:!0})}()}catch(e){return Promise.reject(e)}}async function*i(e){const t=new TextEncoder;for await(const n of e)yield"string"==typeof n?t.encode(n):n}async function*o(e){let t="";for await(const n of e){let e;for(t+=n;(e=t.indexOf("\n"))>=0;){const n=t.slice(0,e+1);t=t.slice(e+1),yield n}}t.length>0&&(yield t)}async function*a(e){let t=1;for await(const n of e)yield{counter:t,line:n},t++}n.d(t,"c",(function(){return r})),n.d(t,"d",(function(){return i})),n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return a}))},function(e,t,n){"use strict";n.r(t);var r=n(1136);n.d(t,"SimpleMeshLayer",(function(){return r.a}));var i=n(1127);n.d(t,"ScenegraphLayer",(function(){return i.a}))},function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"GeoJsonEditMode",{enumerable:!0,get:function(){return o.GeoJsonEditMode}}),Object.defineProperty(t,"ModifyMode",{enumerable:!0,get:function(){return a.ModifyMode}}),Object.defineProperty(t,"ResizeCircleMode",{enumerable:!0,get:function(){return s.ResizeCircleMode}}),Object.defineProperty(t,"TranslateMode",{enumerable:!0,get:function(){return l.TranslateMode}}),Object.defineProperty(t,"ScaleMode",{enumerable:!0,get:function(){return u.ScaleMode}}),Object.defineProperty(t,"RotateMode",{enumerable:!0,get:function(){return c.RotateMode}}),Object.defineProperty(t,"DuplicateMode",{enumerable:!0,get:function(){return d.DuplicateMode}}),Object.defineProperty(t,"ExtendLineStringMode",{enumerable:!0,get:function(){return f.ExtendLineStringMode}}),Object.defineProperty(t,"SplitPolygonMode",{enumerable:!0,get:function(){return h.SplitPolygonMode}}),Object.defineProperty(t,"ExtrudeMode",{enumerable:!0,get:function(){return p.ExtrudeMode}}),Object.defineProperty(t,"ElevationMode",{enumerable:!0,get:function(){return A.ElevationMode}}),Object.defineProperty(t,"TransformMode",{enumerable:!0,get:function(){return g.TransformMode}}),Object.defineProperty(t,"DrawPointMode",{enumerable:!0,get:function(){return m.DrawPointMode}}),Object.defineProperty(t,"DrawLineStringMode",{enumerable:!0,get:function(){return y.DrawLineStringMode}}),Object.defineProperty(t,"DrawPolygonMode",{enumerable:!0,get:function(){return v.DrawPolygonMode}}),Object.defineProperty(t,"DrawRectangleMode",{enumerable:!0,get:function(){return b.DrawRectangleMode}}),Object.defineProperty(t,"DrawRectangleFromCenterMode",{enumerable:!0,get:function(){return _.DrawRectangleFromCenterMode}}),Object.defineProperty(t,"DrawSquareFromCenterMode",{enumerable:!0,get:function(){return w.DrawSquareFromCenterMode}}),Object.defineProperty(t,"DrawCircleByDiameterMode",{enumerable:!0,get:function(){return x.DrawCircleByDiameterMode}}),Object.defineProperty(t,"DrawCircleFromCenterMode",{enumerable:!0,get:function(){return M.DrawCircleFromCenterMode}}),Object.defineProperty(t,"DrawEllipseByBoundingBoxMode",{enumerable:!0,get:function(){return E.DrawEllipseByBoundingBoxMode}}),Object.defineProperty(t,"DrawEllipseUsingThreePointsMode",{enumerable:!0,get:function(){return O.DrawEllipseUsingThreePointsMode}}),Object.defineProperty(t,"DrawRectangleUsingThreePointsMode",{enumerable:!0,get:function(){return S.DrawRectangleUsingThreePointsMode}}),Object.defineProperty(t,"Draw90DegreePolygonMode",{enumerable:!0,get:function(){return T.Draw90DegreePolygonMode}}),Object.defineProperty(t,"DrawPolygonByDraggingMode",{enumerable:!0,get:function(){return C.DrawPolygonByDraggingMode}}),Object.defineProperty(t,"ImmutableFeatureCollection",{enumerable:!0,get:function(){return L.ImmutableFeatureCollection}}),Object.defineProperty(t,"ViewMode",{enumerable:!0,get:function(){return P.ViewMode}}),Object.defineProperty(t,"MeasureDistanceMode",{enumerable:!0,get:function(){return I.MeasureDistanceMode}}),Object.defineProperty(t,"MeasureAreaMode",{enumerable:!0,get:function(){return D.MeasureAreaMode}}),Object.defineProperty(t,"MeasureAngleMode",{enumerable:!0,get:function(){return k.MeasureAngleMode}}),Object.defineProperty(t,"CompositeMode",{enumerable:!0,get:function(){return R.CompositeMode}}),Object.defineProperty(t,"SnappableMode",{enumerable:!0,get:function(){return j.SnappableMode}}),Object.defineProperty(t,"_memoize",{enumerable:!0,get:function(){return F.default}}),t.utils=void 0;var i,o=n(93),a=n(582),s=n(1363),l=n(584),u=n(910),c=n(911),d=n(1367),f=n(1368),h=n(1369),p=n(1371),A=n(1372),g=n(1373),m=n(1374),y=n(1375),v=n(586),b=n(1376),_=n(1377),w=n(1378),x=n(1380),M=n(1381),E=n(1382),O=n(1383),S=n(1384),T=n(1385),C=n(1386),L=n(194),P=n(1387),I=n(1388),D=n(1389),k=n(1391),R=n(912),j=n(1392),F=(i=n(915))&&i.__esModule?i:{default:i},N=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{default:e};var t=B();if(t&&t.has(e))return t.get(e);var n={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){var a=i?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(n,o,a):n[o]=e[o]}n.default=e,t&&t.set(e,n);return n}(n(119));function B(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return B=function(){return e},e}t.utils=N},function(e,t,n){"use strict";var r=n(937),i="function"==typeof Symbol&&"symbol"==typeof Symbol("foo"),o=Object.prototype.toString,a=Array.prototype.concat,s=Object.defineProperty,l=s&&function(){var e={};try{for(var t in s(e,"x",{enumerable:!1,value:e}),e)return!1;return e.x===e}catch(e){return!1}}(),u=function(e,t,n,r){var i;(!(t in e)||"function"==typeof(i=r)&&"[object Function]"===o.call(i)&&r())&&(l?s(e,t,{configurable:!0,enumerable:!1,value:n,writable:!0}):e[t]=n)},c=function(e,t){var n=arguments.length>2?arguments[2]:{},o=r(t);i&&(o=a.call(o,Object.getOwnPropertySymbols(t)));for(var s=0;s=0||(i[n]=e[n]);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(t,["excludeScrollbar"]));return e.prototype.isReactComponent?n.ref=this.getRef:n.wrappedRef=this.getRef,n.disableOnClickOutside=this.disableOnClickOutside,n.enableOnClickOutside=this.enableOnClickOutside,Object(r.createElement)(e,n)},p}(r.Component),n.displayName="OnClickOutside("+d+")",n.defaultProps={eventTypes:["mousedown","touchstart"],excludeScrollbar:t&&t.excludeScrollbar||!1,outsideClickIgnoreClass:f,preventDefault:!1,stopPropagation:!1},n.getClass=function(){return e.getClass?e.getClass():e},a}},function(e,t,n){"use strict";var r=n(3);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i,o=r(n(15)),a=r(n(0)),s=n(79),l=n(36),u=n(29),c=n(43),d=r(n(14)),f=n(24),h=d.default.div(i||(i=(0,o.default)(["\n align-items: center;\n margin-left: 10px;\n color: ",";\n display: inline-flex;\n .info-helper__content {\n width: ",";\n max-width: ",";\n }\n :hover {\n cursor: pointer;\n color: ",";\n }\n"])),(function(e){return e.theme.labelColor}),(function(e){return e.width?"".concat(e.width,"px"):"auto"}),(function(e){return e.width?"auto":"100px"}),(function(e){return e.theme.textColorHl}));var p=function(){return function(e){var t=e.description,n=e.property,r=e.containerClass,i=e.width,o=e.id,d=(0,s.useIntl)();return a.default.createElement(h,{className:"info-helper ".concat(r||""),width:i,"data-tip":!0,"data-for":o},a.default.createElement(c.Docs,{height:"16px"}),a.default.createElement(u.Tooltip,{id:o,effect:"solid"},a.default.createElement("div",{className:"info-helper__content"},t&&a.default.createElement(l.FormattedMessage,{id:t,defaultValue:t,values:{property:d.formatMessage({id:n?"property.".concat((0,f.camelize)(n)):"misc.empty"})}}))))}};t.default=p},function(e,t,n){"use strict";var r=n(6),i=n(3);Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.getChildPos=void 0;var o=i(n(33)),a=i(n(7)),s=i(n(8)),l=i(n(13)),u=i(n(10)),c=i(n(11)),d=i(n(9)),f=i(n(4)),h=r(n(0)),p=i(n(457)),A=i(n(394)),g=n(964),m=n(14),y=n(195),v=i(n(965)),b=i(n(73)),_=n(120);function w(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=(0,d.default)(e);if(t){var i=(0,d.default)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return(0,c.default)(this,n)}}function x(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function M(e){for(var t=1;tb.default.innerWidth&&(c[d]=b.default.innerWidth-r.width-o),c.top<0?c.top=o:c.top+r.height>b.default.innerHeight&&(c.top=b.default.innerHeight-r.height-o),c};t.getChildPos=C,g.canUseDOM&&(document.body?T():document.addEventListener("DOMContentLoaded",T));var L=0;var P={content:{top:0,left:0,border:0,right:"auto",bottom:"auto",padding:"0px 0px 0px 0px"},overlay:{right:"auto",bottom:"auto",width:"100vw",height:"100vh",backgroundColor:"rgba(0, 0, 0, 0)"}},I=function(e){(0,u.default)(n,e);var t=w(n);function n(){var e;(0,a.default)(this,n);for(var r=arguments.length,i=new Array(r),o=0;o0&&void 0!==arguments[0]?arguments[0]:new Map,n=new Map,r=function e(r,i){var o=t.get(r);if(!o)return d.console.error(g.noDep(r,i)),A;var a=n.get(o)||o.apply(void 0,(0,s.default)(o.deps?o.deps.map((function(t){return e(t,o)})):[]));return n.set(r,a),a};return{provide:function(n,r){return y([n,r])?e(new Map(t).set(n,r)):e(t)},get:r}},t.flattenDeps=m,t.provideRecipesToInjector=function(e,t){var n=new Map;return e.reduce((function(e,t){var r;return y(t)?(e=m([],t[1]).reduce((function(e,r){return n.get(r)&&d.console.warn("".concat(r.name," already injected from ").concat(n.get(r).name,", injecting ").concat(t[0].name," after ").concat(n.get(r).name," will override it")),e.provide(r,r)}),e),n.set(t[0],t[1]),(r=e).provide.apply(r,(0,s.default)(t))):e}),t)},t.typeCheckRecipe=y,t.withState=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:v,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return function(r){return(0,u.connect)((function(e){return p(p({},t(e)),{},{state:e})}),(function(e){return Object.keys(n).reduce((function(t,r){return p(p({},t),{},(0,i.default)({},r,(0,c.bindActionCreators)(n[r],e)))}),{})}))((function(t){var n=t.state,i=(0,o.default)(t,["state"]);return l.default.createElement(f.default.Consumer,null,(function(t){return l.default.createElement(r,e.reduce((function(e,r){return p(p({},e),r(t.selector(n)))}),i))}))}))}},t.ERROR_MSG=void 0;var i=r(n(4)),o=r(n(72)),a=r(n(40)),s=r(n(44)),l=r(n(0)),u=n(410),c=n(159),d=n(73),f=r(n(195));function h(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function p(e){for(var t=1;tt(e,n);const n=null==e?void 0:e.fetch;if(n&&"function"!=typeof n)return e=>fetch(e,n);return e=>fetch(e)}(this.loadOptions)}setProps(e){this.props=Object.assign(this.props,e),this.setNeedsRefresh()}setNeedsRefresh(){this._needsRefresh=!0}getNeedsRefresh(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];const t=this._needsRefresh;return e&&(this._needsRefresh=!1),t}}{}var c=n(1843);class d extends u{constructor(e){super(e)}async getMetadata(){throw new Error("ImageSource.getMetadata not implemented")}async getImage(e){const t=this.getGranularParameters(e),n=this.getURLFromTemplate(t),r=await this.fetch(n),i=await r.arrayBuffer();return await c.a.parse(i)}getGranularParameters(e){const[t,n,r,i]=e.bbox;return{...e,east:t,north:n,south:i,west:r}}getURLFromTemplate(e){let t=this.props.url;for(const[n,r]of Object.entries(e))t=t.replace("${".concat(n,"}"),String(r)),t=t.replace("{".concat(n,"}"),String(r));return t}}Object(i.a)(d,"type","template"),Object(i.a)(d,"testURL",e=>e.toLowerCase().includes("{"));var f=n(870);const h={ontext:()=>{},onprocessinginstruction:()=>{},onsgmldeclaration:()=>{},ondoctype:()=>{},oncomment:()=>{},onopentagstart:()=>{},onattribute:()=>{},onopentag:()=>{},onclosetag:()=>{},onopencdata:()=>{},oncdata:()=>{},onclosecdata:()=>{},onerror:()=>{},onend:()=>{},onready:()=>{},onscript:()=>{},onopennamespace:()=>{},onclosenamespace:()=>{}},p={...h,strict:!1,MAX_BUFFER_LENGTH:65536,lowercase:!1,lowercasetags:!1,noscript:!1,strictEntities:!1,xmlns:void 0,position:void 0,trim:void 0,normalize:void 0},A=["text","processinginstruction","sgmldeclaration","doctype","comment","opentagstart","attribute","opentag","closetag","opencdata","cdata","closecdata","error","end","ready","script","opennamespace","closenamespace"],g=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"],m=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,y=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/,v=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,b=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/,_={amp:"&",gt:">",lt:"<",quot:'"',apos:"'",AElig:198,Aacute:193,Acirc:194,Agrave:192,Aring:197,Atilde:195,Auml:196,Ccedil:199,ETH:208,Eacute:201,Ecirc:202,Egrave:200,Euml:203,Iacute:205,Icirc:206,Igrave:204,Iuml:207,Ntilde:209,Oacute:211,Ocirc:212,Ograve:210,Oslash:216,Otilde:213,Ouml:214,THORN:222,Uacute:218,Ucirc:219,Ugrave:217,Uuml:220,Yacute:221,aacute:225,acirc:226,aelig:230,agrave:224,aring:229,atilde:227,auml:228,ccedil:231,eacute:233,ecirc:234,egrave:232,eth:240,euml:235,iacute:237,icirc:238,igrave:236,iuml:239,ntilde:241,oacute:243,ocirc:244,ograve:242,oslash:248,otilde:245,ouml:246,szlig:223,thorn:254,uacute:250,ucirc:251,ugrave:249,uuml:252,yacute:253,yuml:255,copy:169,reg:174,nbsp:160,iexcl:161,cent:162,pound:163,curren:164,yen:165,brvbar:166,sect:167,uml:168,ordf:170,laquo:171,not:172,shy:173,macr:175,deg:176,plusmn:177,sup1:185,sup2:178,sup3:179,acute:180,micro:181,para:182,middot:183,cedil:184,ordm:186,raquo:187,frac14:188,frac12:189,frac34:190,iquest:191,times:215,divide:247,OElig:338,oelig:339,Scaron:352,scaron:353,Yuml:376,fnof:402,circ:710,tilde:732,Alpha:913,Beta:914,Gamma:915,Delta:916,Epsilon:917,Zeta:918,Eta:919,Theta:920,Iota:921,Kappa:922,Lambda:923,Mu:924,Nu:925,Xi:926,Omicron:927,Pi:928,Rho:929,Sigma:931,Tau:932,Upsilon:933,Phi:934,Chi:935,Psi:936,Omega:937,alpha:945,beta:946,gamma:947,delta:948,epsilon:949,zeta:950,eta:951,theta:952,iota:953,kappa:954,lambda:955,mu:956,nu:957,xi:958,omicron:959,pi:960,rho:961,sigmaf:962,sigma:963,tau:964,upsilon:965,phi:966,chi:967,psi:968,omega:969,thetasym:977,upsih:978,piv:982,ensp:8194,emsp:8195,thinsp:8201,zwnj:8204,zwj:8205,lrm:8206,rlm:8207,ndash:8211,mdash:8212,lsquo:8216,rsquo:8217,sbquo:8218,ldquo:8220,rdquo:8221,bdquo:8222,dagger:8224,Dagger:8225,bull:8226,hellip:8230,permil:8240,prime:8242,Prime:8243,lsaquo:8249,rsaquo:8250,oline:8254,frasl:8260,euro:8364,image:8465,weierp:8472,real:8476,trade:8482,alefsym:8501,larr:8592,uarr:8593,rarr:8594,darr:8595,harr:8596,crarr:8629,lArr:8656,uArr:8657,rArr:8658,dArr:8659,hArr:8660,forall:8704,part:8706,exist:8707,empty:8709,nabla:8711,isin:8712,notin:8713,ni:8715,prod:8719,sum:8721,minus:8722,lowast:8727,radic:8730,prop:8733,infin:8734,ang:8736,and:8743,or:8744,cap:8745,cup:8746,int:8747,there4:8756,sim:8764,cong:8773,asymp:8776,ne:8800,equiv:8801,le:8804,ge:8805,sub:8834,sup:8835,nsub:8836,sube:8838,supe:8839,oplus:8853,otimes:8855,perp:8869,sdot:8901,lceil:8968,rceil:8969,lfloor:8970,rfloor:8971,lang:9001,rang:9002,loz:9674,spades:9824,clubs:9827,hearts:9829,diams:9830};Object.keys(_).forEach(e=>{const t=_[e];_[e]="number"==typeof t?String.fromCharCode(t):t});class w{constructor(){Object(i.a)(this,"EVENTS",A),Object(i.a)(this,"ENTITIES",{..._}),Object(i.a)(this,"events",void 0),Object(i.a)(this,"XML_ENTITIES",{amp:"&",gt:">",lt:"<",quot:'"',apos:"'"}),Object(i.a)(this,"S",0),Object(i.a)(this,"opt",void 0),Object(i.a)(this,"trackPosition",!1),Object(i.a)(this,"column",0),Object(i.a)(this,"line",0),Object(i.a)(this,"c",""),Object(i.a)(this,"error",void 0),Object(i.a)(this,"q",""),Object(i.a)(this,"bufferCheckPosition",void 0),Object(i.a)(this,"closed",!1),Object(i.a)(this,"tags",[]),Object(i.a)(this,"looseCase",""),Object(i.a)(this,"closedRoot",!1),Object(i.a)(this,"sawRoot",!1),Object(i.a)(this,"strict",!1),Object(i.a)(this,"tag",void 0),Object(i.a)(this,"strictEntities",void 0),Object(i.a)(this,"state",void 0),Object(i.a)(this,"noscript",!1),Object(i.a)(this,"attribList",[]),Object(i.a)(this,"ns",void 0),Object(i.a)(this,"position",0),Object(i.a)(this,"STATE",{BEGIN:this.S++,BEGIN_WHITESPACE:this.S++,TEXT:this.S++,TEXT_ENTITY:this.S++,OPEN_WAKA:this.S++,SGML_DECL:this.S++,SGML_DECL_QUOTED:this.S++,DOCTYPE:this.S++,DOCTYPE_QUOTED:this.S++,DOCTYPE_DTD:this.S++,DOCTYPE_DTD_QUOTED:this.S++,COMMENT_STARTING:this.S++,COMMENT:this.S++,COMMENT_ENDING:this.S++,COMMENT_ENDED:this.S++,CDATA:this.S++,CDATA_ENDING:this.S++,CDATA_ENDING_2:this.S++,PROC_INST:this.S++,PROC_INST_BODY:this.S++,PROC_INST_ENDING:this.S++,OPEN_TAG:this.S++,OPEN_TAG_SLASH:this.S++,ATTRIB:this.S++,ATTRIB_NAME:this.S++,ATTRIB_NAME_SAW_WHITE:this.S++,ATTRIB_VALUE:this.S++,ATTRIB_VALUE_QUOTED:this.S++,ATTRIB_VALUE_CLOSED:this.S++,ATTRIB_VALUE_UNQUOTED:this.S++,ATTRIB_VALUE_ENTITY_Q:this.S++,ATTRIB_VALUE_ENTITY_U:this.S++,CLOSE_TAG:this.S++,CLOSE_TAG_SAW_WHITE:this.S++,SCRIPT:this.S++,SCRIPT_ENDING:this.S++}),Object(i.a)(this,"BUFFERS",g),Object(i.a)(this,"CDATA","[CDATA["),Object(i.a)(this,"DOCTYPE","DOCTYPE"),Object(i.a)(this,"XML_NAMESPACE","http://www.w3.org/XML/1998/namespace"),Object(i.a)(this,"XMLNS_NAMESPACE","http://www.w3.org/2000/xmlns/"),Object(i.a)(this,"rootNS",{xml:this.XML_NAMESPACE,xmlns:this.XMLNS_NAMESPACE}),Object(i.a)(this,"comment",void 0),Object(i.a)(this,"sgmlDecl",void 0),Object(i.a)(this,"textNode",""),Object(i.a)(this,"tagName",void 0),Object(i.a)(this,"doctype",void 0),Object(i.a)(this,"procInstName",void 0),Object(i.a)(this,"procInstBody",void 0),Object(i.a)(this,"entity",""),Object(i.a)(this,"attribName",void 0),Object(i.a)(this,"attribValue",void 0),Object(i.a)(this,"cdata",""),Object(i.a)(this,"script",""),Object(i.a)(this,"startTagPosition",0),this.S=0;for(const e in this.STATE)this.STATE.hasOwnProperty(e)&&(this.STATE[this.STATE[e]]=e);this.S=this.STATE}static charAt(e,t){let n="";return t"===e||w.isWhitespace(e)}static isMatch(e,t){return e.test(t)}static notMatch(e,t){return!w.isMatch(e,t)}static qname(e,t){const n=e.indexOf(":")<0?["",e]:e.split(":");let r=n[0],i=n[1];return t&&"xmlns"===e&&(r="xmlns",i=""),{prefix:r,local:i}}write(e){if(this.error)throw this.error;if(this.closed)return this.errorFunction("Cannot write after close. Assign an onready handler.");if(null===e)return this.end();"object"==typeof e&&(e=e.toString());let t,n=0;for(;t=w.charAt(e,n++),this.c=t,t;)switch(this.trackPosition&&(this.position++,"\n"===t?(this.line++,this.column=0):this.column++),this.state){case this.S.BEGIN:if(this.state=this.S.BEGIN_WHITESPACE,"\ufeff"===t)continue;this.beginWhiteSpace(t);continue;case this.S.BEGIN_WHITESPACE:this.beginWhiteSpace(t);continue;case this.S.TEXT:if(this.sawRoot&&!this.closedRoot){const r=n-1;for(;t&&"<"!==t&&"&"!==t;)t=w.charAt(e,n++),t&&this.trackPosition&&(this.position++,"\n"===t?(this.line++,this.column=0):this.column++);this.textNode+=e.substring(r,n-1)}"<"!==t||this.sawRoot&&this.closedRoot&&!this.strict?(w.isWhitespace(t)||this.sawRoot&&!this.closedRoot||this.strictFail("Text data outside of root node."),"&"===t?this.state=this.S.TEXT_ENTITY:this.textNode+=t):(this.state=this.S.OPEN_WAKA,this.startTagPosition=this.position);continue;case this.S.SCRIPT:"<"===t?this.state=this.S.SCRIPT_ENDING:this.script+=t;continue;case this.S.SCRIPT_ENDING:"/"===t?this.state=this.S.CLOSE_TAG:(this.script+="<".concat(t),this.state=this.S.SCRIPT);continue;case this.S.OPEN_WAKA:if("!"===t)this.state=this.S.SGML_DECL,this.sgmlDecl="";else if(w.isWhitespace(t));else if(w.isMatch(m,t))this.state=this.S.OPEN_TAG,this.tagName=t;else if("/"===t)this.state=this.S.CLOSE_TAG,this.tagName="";else if("?"===t)this.state=this.S.PROC_INST,this.procInstName=this.procInstBody="";else{if(this.strictFail("Unencoded <"),this.startTagPosition+1"===t?(this.emitNode("onsgmldeclaration",this.sgmlDecl),this.sgmlDecl="",this.state=this.S.TEXT):w.isQuote(t)?(this.state=this.S.SGML_DECL_QUOTED,this.sgmlDecl+=t):this.sgmlDecl+=t;continue;case this.S.SGML_DECL_QUOTED:t===this.q&&(this.state=this.S.SGML_DECL,this.q=""),this.sgmlDecl+=t;continue;case this.S.DOCTYPE:">"===t?(this.state=this.S.TEXT,this.emitNode("ondoctype",this.doctype),this.doctype=!0):(this.doctype+=t,"["===t?this.state=this.S.DOCTYPE_DTD:w.isQuote(t)&&(this.state=this.S.DOCTYPE_QUOTED,this.q=t));continue;case this.S.DOCTYPE_QUOTED:this.doctype+=t,t===this.q&&(this.q="",this.state=this.S.DOCTYPE);continue;case this.S.DOCTYPE_DTD:this.doctype+=t,"]"===t?this.state=this.S.DOCTYPE:w.isQuote(t)&&(this.state=this.S.DOCTYPE_DTD_QUOTED,this.q=t);continue;case this.S.DOCTYPE_DTD_QUOTED:this.doctype+=t,t===this.q&&(this.state=this.S.DOCTYPE_DTD,this.q="");continue;case this.S.COMMENT:"-"===t?this.state=this.S.COMMENT_ENDING:this.comment+=t;continue;case this.S.COMMENT_ENDING:"-"===t?(this.state=this.S.COMMENT_ENDED,this.comment=this.textApplyOptions(this.comment),this.comment&&this.emitNode("oncomment",this.comment),this.comment=""):(this.comment+="-".concat(t),this.state=this.S.COMMENT);continue;case this.S.COMMENT_ENDED:">"!==t?(this.strictFail("Malformed comment"),this.comment+="--".concat(t),this.state=this.S.COMMENT):this.state=this.S.TEXT;continue;case this.S.CDATA:"]"===t?this.state=this.S.CDATA_ENDING:this.cdata+=t;continue;case this.S.CDATA_ENDING:"]"===t?this.state=this.S.CDATA_ENDING_2:(this.cdata+="]".concat(t),this.state=this.S.CDATA);continue;case this.S.CDATA_ENDING_2:">"===t?(this.cdata&&this.emitNode("oncdata",this.cdata),this.emitNode("onclosecdata"),this.cdata="",this.state=this.S.TEXT):"]"===t?this.cdata+="]":(this.cdata+="]]".concat(t),this.state=this.S.CDATA);continue;case this.S.PROC_INST:"?"===t?this.state=this.S.PROC_INST_ENDING:w.isWhitespace(t)?this.state=this.S.PROC_INST_BODY:this.procInstName+=t;continue;case this.S.PROC_INST_BODY:if(!this.procInstBody&&w.isWhitespace(t))continue;"?"===t?this.state=this.S.PROC_INST_ENDING:this.procInstBody+=t;continue;case this.S.PROC_INST_ENDING:">"===t?(this.emitNode("onprocessinginstruction",{name:this.procInstName,body:this.procInstBody}),this.procInstName=this.procInstBody="",this.state=this.S.TEXT):(this.procInstBody+="?".concat(t),this.state=this.S.PROC_INST_BODY);continue;case this.S.OPEN_TAG:w.isMatch(y,t)?this.tagName+=t:(this.newTag(),">"===t?this.openTag():"/"===t?this.state=this.S.OPEN_TAG_SLASH:(w.isWhitespace(t)||this.strictFail("Invalid character in tag name"),this.state=this.S.ATTRIB));continue;case this.S.OPEN_TAG_SLASH:">"===t?(this.openTag(!0),this.closeTag()):(this.strictFail("Forward-slash in opening tag not followed by >"),this.state=this.S.ATTRIB);continue;case this.S.ATTRIB:if(w.isWhitespace(t))continue;">"===t?this.openTag():"/"===t?this.state=this.S.OPEN_TAG_SLASH:w.isMatch(m,t)?(this.attribName=t,this.attribValue="",this.state=this.S.ATTRIB_NAME):this.strictFail("Invalid attribute name");continue;case this.S.ATTRIB_NAME:"="===t?this.state=this.S.ATTRIB_VALUE:">"===t?(this.strictFail("Attribute without value"),this.attribValue=this.attribName,this.attrib(),this.openTag()):w.isWhitespace(t)?this.state=this.S.ATTRIB_NAME_SAW_WHITE:w.isMatch(y,t)?this.attribName+=t:this.strictFail("Invalid attribute name");continue;case this.S.ATTRIB_NAME_SAW_WHITE:if("="===t)this.state=this.S.ATTRIB_VALUE;else{if(w.isWhitespace(t))continue;this.strictFail("Attribute without value"),this.tag.attributes[this.attribName]="",this.attribValue="",this.emitNode("onattribute",{name:this.attribName,value:""}),this.attribName="",">"===t?this.openTag():w.isMatch(m,t)?(this.attribName=t,this.state=this.S.ATTRIB_NAME):(this.strictFail("Invalid attribute name"),this.state=this.S.ATTRIB)}continue;case this.S.ATTRIB_VALUE:if(w.isWhitespace(t))continue;w.isQuote(t)?(this.q=t,this.state=this.S.ATTRIB_VALUE_QUOTED):(this.strictFail("Unquoted attribute value"),this.state=this.S.ATTRIB_VALUE_UNQUOTED,this.attribValue=t);continue;case this.S.ATTRIB_VALUE_QUOTED:if(t!==this.q){"&"===t?this.state=this.S.ATTRIB_VALUE_ENTITY_Q:this.attribValue+=t;continue}this.attrib(),this.q="",this.state=this.S.ATTRIB_VALUE_CLOSED;continue;case this.S.ATTRIB_VALUE_CLOSED:w.isWhitespace(t)?this.state=this.S.ATTRIB:">"===t?this.openTag():"/"===t?this.state=this.S.OPEN_TAG_SLASH:w.isMatch(m,t)?(this.strictFail("No whitespace between attributes"),this.attribName=t,this.attribValue="",this.state=this.S.ATTRIB_NAME):this.strictFail("Invalid attribute name");continue;case this.S.ATTRIB_VALUE_UNQUOTED:if(!w.isAttribEnd(t)){"&"===t?this.state=this.S.ATTRIB_VALUE_ENTITY_U:this.attribValue+=t;continue}this.attrib(),">"===t?this.openTag():this.state=this.S.ATTRIB;continue;case this.S.CLOSE_TAG:if(this.tagName)">"===t?this.closeTag():w.isMatch(y,t)?this.tagName+=t:this.script?(this.script+=""===t?this.closeTag():this.strictFail("Invalid characters in closing tag");continue;case this.S.TEXT_ENTITY:case this.S.ATTRIB_VALUE_ENTITY_Q:case this.S.ATTRIB_VALUE_ENTITY_U:let r,i;switch(this.state){case this.S.TEXT_ENTITY:r=this.S.TEXT,i="textNode";break;case this.S.ATTRIB_VALUE_ENTITY_Q:r=this.S.ATTRIB_VALUE_QUOTED,i="attribValue";break;case this.S.ATTRIB_VALUE_ENTITY_U:r=this.S.ATTRIB_VALUE_UNQUOTED,i="attribValue";break;default:throw new Error("Unknown state: ".concat(this.state))}";"===t?(this[i]+=this.parseEntity(),this.entity="",this.state=r):w.isMatch(this.entity.length?b:v,t)?this.entity+=t:(this.strictFail("Invalid character in entity name"),this[i]+="&".concat(this.entity).concat(t),this.entity="",this.state=r);continue;default:throw new Error("Unknown state: ".concat(this.state))}return this.position>=this.bufferCheckPosition&&this.checkBufferLength(),this}emit(e,t){if(this.events.hasOwnProperty(e)){const n=e.replace(/^on/,"");this.events[e](t,n,this)}}clearBuffers(){for(let e=0,t=this.BUFFERS.length;ee)switch(this.BUFFERS[r]){case"textNode":this.closeText();break;case"cdata":this.emitNode("oncdata",this.cdata),this.cdata="";break;case"script":this.emitNode("onscript",this.script),this.script="";break;default:this.errorFunction("Max buffer length exceeded: ".concat(this.BUFFERS[r]))}t=Math.max(t,i)}const r=this.opt.MAX_BUFFER_LENGTH-t;this.bufferCheckPosition=r+this.position}openTag(e){if(this.opt.xmlns){const e=this.tag,t=w.qname(this.tagName);e.prefix=t.prefix,e.local=t.local,e.uri=e.ns[t.prefix]||"",e.prefix&&!e.uri&&(this.strictFail("Unbound namespace prefix: ".concat(JSON.stringify(this.tagName))),e.uri=t.prefix);const n=this.tags[this.tags.length-1]||this;if(e.ns&&n.ns!==e.ns){const t=this;Object.keys(e.ns).forEach(n=>{t.emitNode("onopennamespace",{prefix:n,uri:e.ns[n]})})}for(let t=0,n=this.attribList.length;t"),this.tagName="",void(this.state=this.S.SCRIPT);this.emitNode("onscript",this.script),this.script=""}let e=this.tags.length,t=this.tagName;for(this.strict||(t=t[this.looseCase]());e--;){if(this.tags[e].name===t)break;this.strictFail("Unexpected close tag")}if(e<0)return this.strictFail("Unmatched closing tag: ".concat(this.tagName)),this.textNode+=""),void(this.state=this.S.TEXT);this.tagName=t;let n=this.tags.length;for(;n-- >e;){const e=this.tag=this.tags.pop();this.tagName=this.tag.name,this.emitNode("onclosetag",this.tagName);const t={};for(const n in e.ns)e.ns.hasOwnProperty(n)&&(t[n]=e.ns[n]);const n=this.tags[this.tags.length-1]||this;if(this.opt.xmlns&&e.ns!==n.ns){const t=this;Object.keys(e.ns).forEach(n=>{const r=e.ns[n];t.emitNode("onclosenamespace",{prefix:n,uri:r})})}}0===e&&(this.closedRoot=!0),this.tagName=this.attribValue=this.attribName="",this.attribList.length=0,this.state=this.S.TEXT}}class x extends w{constructor(e){super(),Object(i.a)(this,"opt",p),Object(i.a)(this,"events",h),this.clearBuffers(),this.opt=e={...this.opt,...e},this.events={...this.events,...e},this.q=this.c="",this.opt.lowercase=this.opt.lowercase||this.opt.lowercasetags,this.bufferCheckPosition=this.opt.MAX_BUFFER_LENGTH,this.looseCase=this.opt.lowercase?"toLowerCase":"toUpperCase",this.tags=[],this.closed=this.closedRoot=this.sawRoot=!1,this.tag=this.error=null,this.strict=Boolean(this.opt.strict),this.noscript=Boolean(this.opt.strict||this.opt.noscript),this.state=this.S.BEGIN,this.strictEntities=this.opt.strictEntities,this.ENTITIES=this.strictEntities?Object.create(this.XML_ENTITIES):Object.create(this.ENTITIES),this.attribList=[],this.opt.xmlns&&(this.ns=Object.create(this.rootNS)),this.trackPosition=!1!==this.opt.position,this.trackPosition&&(this.position=this.line=this.column=0),this.emit("onready")}resume(){return this.error=null,this}close(){return this.write(null)}flush(){this.flushBuffers()}}Object(i.a)(x,"ENTITIES",_);var M=n(1151);function E(e){return"string"==typeof e?e.charAt(0).toLowerCase()+e.slice(1):e}const O={name:"XML",id:"xml",module:"xml",version:"3.4.14",worker:!1,extensions:["xml"],mimeTypes:["application/xml","text/xml"],testText:function(e){return e.startsWith("S((new TextDecoder).decode(e),t),parseTextSync:(e,t)=>S(e,t)};function S(e,t){var n;const r={...O.options.xml,...null==t?void 0:t.xml};switch(r.parser){case"fast-xml-parser":const i=function(e,t){return new M.XMLParser({ignoreAttributes:!1,attributeNamePrefix:"",...t}).parse(e)}(e,{allowBooleanAttributes:!0,ignoreDeclaration:!0,removeNSPrefix:r.removeNSPrefix,textNodeName:r.textNodeName,isArray:(e,t,n,i)=>{var o;return Boolean(null==r||null===(o=r.arrayPaths)||void 0===o?void 0:o.some(e=>t===e))},...null==t?void 0:t._fastXML});return r.uncapitalizeKeys?function e(t){if(Array.isArray(t))return t.map(t=>e(t));if(t&&"object"==typeof t){const n={};for(const[r,i]of Object.entries(t))n[E(r)]=e(i);return n}return t}(i):i;default:throw new Error(null==t||null===(n=t.xml)||void 0===n?void 0:n.parser)}}function T(e){return Array.isArray(e)?e:e?[e]:[]}function C(e){const t=T(e);return t.length>0&&t.every(e=>"string"==typeof e)?t:[]}function L(e){switch(typeof e){case"number":return e;case"string":return parseFloat(e);default:return}}function P(e){switch(typeof e){case"number":return e;case"string":return parseInt(e,10);default:return}}function I(e){switch(e){case"true":return!0;case"false":return!1;case"1":return!0;case"0":default:return!1}}function D(e,t){const n=O.parseTextSync(e,t),r=n.WMT_MS_Capabilities||n.WMS_Capabilities||n,i=function(e){var t,n,r,i,o,a,s,l,u,c,d,f,h,p,A,g;const m={version:String(e.version||""),name:String((null===(t=e.Service)||void 0===t?void 0:t.Name)||"unnamed"),title:null!==(n=e.Service)&&void 0!==n&&n.Title?String(null===(r=e.Service)||void 0===r?void 0:r.Title):void 0,abstract:null!==(i=e.Service)&&void 0!==i&&i.Abstract?String(null===(o=e.Service)||void 0===o?void 0:o.Abstract):void 0,keywords:C(null===(a=e.Service)||void 0===a||null===(s=a.KeywordList)||void 0===s?void 0:s.Keyword),fees:null!==(l=e.Service)&&void 0!==l&&l.Fees?JSON.stringify(null===(u=e.Service)||void 0===u?void 0:u.Fees):void 0,accessConstraints:null!==(c=e.Service)&&void 0!==c&&c.AccessConstraints?JSON.stringify(null===(d=e.Service)||void 0===d?void 0:d.AccessConstraints):void 0,layerLimit:P(null===(f=e.Service)||void 0===f?void 0:f.LayerLimit),maxWidth:P(null===(h=e.Service)||void 0===h?void 0:h.maxWidth),maxHeight:P(null===(p=e.Service)||void 0===p?void 0:p.maxHeight),layers:[],requests:k(null===(A=e.Capability)||void 0===A?void 0:A.Request),exceptions:R(e.Exception)},y=T(null===(g=e.Capability)||void 0===g?void 0:g.Layer);for(const e of y)m.layers.push(j(e));for(const[e,t]of Object.entries(m))void 0===t&&delete m[e];return m}(r);if(null!=t&&t.inheritedLayerProps)for(const e of i.layers)F(e,null);return(null!=t&&t.includeRawData||null!=t&&t.raw)&&(i.raw=r),null!=t&&t.includeXMLText&&(i.xml=e),i}function k(e){const t={};for(const[n,r]of Object.entries(e||{})){const e=C(null==r?void 0:r.Format);t[n]={mimeTypes:e}}return t}function R(e){if(T(null==e?void 0:e.Format).length>0)return{mimeTypes:C(e)}}function j(e){var t;const n={title:String((null==e?void 0:e.Title)||""),name:(null==e?void 0:e.Name)&&String(null==e?void 0:e.Name),abstract:(null==e?void 0:e.Name)&&String(null==e?void 0:e.Abstract),keywords:C(null===(t=e.KeywordList)||void 0===t?void 0:t.Keyword)},r=(null==e?void 0:e.CRS)||(null==e?void 0:e.SRS);r&&Array.isArray(r)&&r.every(e=>"string"==typeof e)&&(n.crs=r);let i=(null==e?void 0:e.EX_GeographicBoundingBox)&&function(e){const{westBoundLongitude:t,northBoundLatitude:n,eastBoundLongitude:r,southBoundLatitude:i}=e;return[[t,i],[r,n]]}(null==e?void 0:e.EX_GeographicBoundingBox);i&&(n.geographicBoundingBox=i),i=(null==e?void 0:e.LatLonBoundingBox)&&function(e){const{minx:t,miny:n,maxx:r,maxy:i}=e;return[[t,n],[r,i]]}(null==e?void 0:e.LatLonBoundingBox),i&&(n.geographicBoundingBox=i);const o=(null==e?void 0:e.BoundingBox)&&T(null==e?void 0:e.BoundingBox).map(e=>function(e){const{CRS:t,SRS:n,minx:r,miny:i,maxx:o,maxy:a,resx:s,resy:l}=e,u={crs:t||n,boundingBox:[[L(r),L(i)],[L(o),L(a)]]};return s&&(u.xResolution=s),l&&(u.yResolution=l),u}(e));o&&o.length>0&&(n.boundingBoxes=o);const a=T(null==e?void 0:e.Dimension).map(e=>function(e){const{name:t,units:n,value:r}=e,i={name:t,units:n,extent:r};e.unitSymbol&&(i.unitSymbol=e.unitSymbol);e.default&&(i.defaultValue=e.default);e.multipleValues&&(i.multipleValues=I(e.multipleValues));e.nearestValue&&(i.nearestValue=I(e.nearestValue));e.current&&(i.current=I(e.current));return i}(e));a.length&&(n.dimensions=a),null!=e&&e.opaque&&(n.opaque=I(null==e?void 0:e.opaque)),null!=e&&e.cascaded&&(n.cascaded=I(null==e?void 0:e.cascaded)),null!=e&&e.queryable&&(n.queryable=I(null==e?void 0:e.queryable));const s=T(null==e?void 0:e.Layer),l=[];for(const e of s)l.push(j(e));l.length>0&&(n.layers=l);for(const[e,t]of Object.entries(n))void 0===t&&delete n[e];return n}function F(e,t){null!=t&&t.geographicBoundingBox&&!e.geographicBoundingBox&&(e.geographicBoundingBox=[...t.geographicBoundingBox]),null!=t&&t.crs&&!e.crs&&(e.crs=[...t.crs]),null!=t&&t.boundingBoxes&&!e.boundingBoxes&&(e.boundingBoxes=[...t.boundingBoxes]),null!=t&&t.dimensions&&!e.dimensions&&(e.dimensions=[...t.dimensions]);for(const t of e.layers||[])F(t,e)}const N={id:"wms-capabilities",name:"WMS Capabilities",module:"wms",version:"3.4.14",worker:!1,extensions:["xml"],mimeTypes:["application/vnd.ogc.wms_xml","application/xml","text/xml"],testText:function(e){return e.startsWith("D((new TextDecoder).decode(e),null==t?void 0:t.wms),parseTextSync:(e,t)=>D(e,null==t?void 0:t.wms)};function B(e,t){var n;const r=(null===(n=O.parseTextSync(e,t).FeatureInfoResponse)||void 0===n?void 0:n.FIELDS)||[];return{features:(Array.isArray(r)?r:[r]).map(e=>function(e){return{attributes:e||{},type:"",bounds:{bottom:0,top:0,left:0,right:0}}}(e))}}const z={...N,id:"wms-feature-info",name:"WMS FeatureInfo",parse:async(e,t)=>B((new TextDecoder).decode(e),t),parseTextSync:(e,t)=>B(e,t)};function U(e,t){var n;return null===(n=O.parseTextSync)||void 0===n?void 0:n.call(O,e,t)}const H={...N,id:"wms-layer-description",name:"WMS DescribeLayer",parse:async(e,t)=>U((new TextDecoder).decode(e),t),parseTextSync:(e,t)=>U(e,t)};const V={id:"wms-error",name:"WMS Error",module:"wms",version:"3.4.14",worker:!1,extensions:["xml"],mimeTypes:["application/vnd.ogc.se_xml","application/xml","text/xml"],testText:function(e){return e.startsWith("G((new TextDecoder).decode(e),t),parseSync:(e,t)=>G((new TextDecoder).decode(e),t),parseTextSync:(e,t)=>G(e,t)};function G(e,t){const n={...V.options.wms,...null==t?void 0:t.wms},r=function(e,t){var n,r,i;const o=null===(n=O.parseTextSync)||void 0===n?void 0:n.call(O,e,t),a=(null==o||null===(r=o.ServiceExceptionReport)||void 0===r?void 0:r.ServiceException)||(null==o||null===(i=o["ogc:ServiceExceptionReport"])||void 0===i?void 0:i["ogc:ServiceException"]);return"string"==typeof a?a:a.value||a.code||"Unknown error"}(e,n),i=n.minimalErrors?r:"WMS Service error: ".concat(r);if(n.throwOnError)throw new Error(i);return i}class Y extends u{constructor(e){var t;super(e),Object(i.a)(this,"url",void 0),Object(i.a)(this,"substituteCRS84",void 0),Object(i.a)(this,"flipCRS",void 0),Object(i.a)(this,"wmsParameters",void 0),Object(i.a)(this,"vendorParameters",void 0),Object(i.a)(this,"capabilities",null),this.url=e.url,this.substituteCRS84=null!==(t=e.substituteCRS84)&&void 0!==t&&t,this.flipCRS=["EPSG:4326"],this.wmsParameters={layers:void 0,query_layers:void 0,styles:void 0,version:"1.3.0",crs:"EPSG:4326",format:"image/png",info_format:"text/plain",transparent:void 0,time:void 0,elevation:void 0,...e.wmsParameters},this.vendorParameters=e.vendorParameters||{}}async getMetadata(){const e=await this.getCapabilities();return this.normalizeMetadata(e)}async getImage(e){return await this.getMap(e)}normalizeMetadata(e){return e}async getCapabilities(e,t){const n=this.getCapabilitiesURL(e,t),r=await this.fetch(n),i=await r.arrayBuffer();this._checkResponse(r,i);const o=await N.parse(i,this.loadOptions);return this.capabilities=o,o}async getMap(e,t){const n=this.getMapURL(e,t),r=await this.fetch(n),i=await r.arrayBuffer();this._checkResponse(r,i);try{return await c.a.parse(i,this.loadOptions)}catch{throw this._parseError(i)}}async getFeatureInfo(e,t){const n=this.getFeatureInfoURL(e,t),r=await this.fetch(n),i=await r.arrayBuffer();return this._checkResponse(r,i),await z.parse(i,this.loadOptions)}async getFeatureInfoText(e,t){const n=this.getFeatureInfoURL(e,t),r=await this.fetch(n),i=await r.arrayBuffer();return this._checkResponse(r,i),(new TextDecoder).decode(i)}async describeLayer(e,t){const n=this.describeLayerURL(e,t),r=await this.fetch(n),i=await r.arrayBuffer();return this._checkResponse(r,i),await H.parse(i,this.loadOptions)}async getLegendGraphic(e,t){const n=this.getLegendGraphicURL(e,t),r=await this.fetch(n),i=await r.arrayBuffer();this._checkResponse(r,i);try{return await c.a.parse(i,this.loadOptions)}catch{throw this._parseError(i)}}getCapabilitiesURL(e,t){const n={version:this.wmsParameters.version,...e};return this._getWMSUrl("GetCapabilities",n,t)}getMapURL(e,t){e=this._getWMS130Parameters(e);const n={version:this.wmsParameters.version,format:this.wmsParameters.format,transparent:this.wmsParameters.transparent,time:this.wmsParameters.time,elevation:this.wmsParameters.elevation,layers:this.wmsParameters.layers,styles:this.wmsParameters.styles,crs:this.wmsParameters.crs,...e};return this._getWMSUrl("GetMap",n,t)}getFeatureInfoURL(e,t){const n={version:this.wmsParameters.version,info_format:this.wmsParameters.info_format,layers:this.wmsParameters.layers,query_layers:this.wmsParameters.query_layers,styles:this.wmsParameters.styles,crs:this.wmsParameters.crs,...e};return this._getWMSUrl("GetFeatureInfo",n,t)}describeLayerURL(e,t){const n={version:this.wmsParameters.version,...e};return this._getWMSUrl("DescribeLayer",n,t)}getLegendGraphicURL(e,t){const n={version:this.wmsParameters.version,...e};return this._getWMSUrl("GetLegendGraphic",n,t)}_parseWMSUrl(e){const[t,n]=e.split("?"),r=n.split("&"),i={};for(const e of r){const[t,n]=e.split("=");i[t]=n}return{url:t,parameters:i}}_getWMSUrl(e,t,n){let r=this.url,i=!0;const o={service:"WMS",version:t.version,request:e,...t,...this.vendorParameters,...n},a=["transparent","time","elevation"];for(const[e,n]of Object.entries(o))a.includes(e)&&!n||(r+=i?"?":"&",i=!1,r+=this._getURLParameter(e,n,t));return encodeURI(r)}_getWMS130Parameters(e){const t={...e};return t.srs&&(t.crs=t.crs||t.srs,delete t.srs),t}_getURLParameter(e,t,n){switch(e){case"crs":"1.3.0"!==n.version?e="srs":this.substituteCRS84&&"EPSG:4326"===t&&(t="CRS:84");break;case"srs":"1.3.0"===n.version&&(e="crs");break;case"bbox":const r=this._flipBoundingBox(t,n);r&&(t=r)}return e=e.toUpperCase(),Array.isArray(t)?"".concat(e,"=").concat(t.join(",")):"".concat(e,"=").concat(t?String(t):"")}_flipBoundingBox(e,t){if(!Array.isArray(e)||4!==e.length)return null;const n=e;return"1.3.0"===t.version&&this.flipCRS.includes(t.crs||"")&&!(this.substituteCRS84&&"EPSG:4326"===t.crs)?[n[1],n[0],n[3],n[2]]:n}async _fetchArrayBuffer(e){const t=await this.fetch(e),n=await t.arrayBuffer();return this._checkResponse(t,n),n}_checkResponse(e,t){const n=e.headers["content-type"];if(!e.ok||V.mimeTypes.includes(n)){const e=Object(f.a)(this.loadOptions,{wms:{throwOnError:!0}}),n=V.parseSync(t,e);throw new Error(n)}}_parseError(e){const t=V.parseSync(e,this.loadOptions);return new Error(t)}}Object(i.a)(Y,"type","wms"),Object(i.a)(Y,"testURL",e=>e.toLowerCase().includes("wms"));class W extends u{constructor(e){super(e)}async getMetadata(){return await this.metadata()}async getImage(e){throw new Error("not implemented")}async metadata(){throw new Error("not implemented")}exportImage(e){throw new Error("not implemented")}metadataURL(e){return"".concat(this.props.url,"?f=pjson")}exportImageURL(e){const t="bbox=".concat(e.bbox[0],",").concat(e.bbox[1],",").concat(e.bbox[2],",").concat(e.bbox[3]),n="size=".concat(e.width,",").concat(e.height),r={...e,bbox:t,size:n};return delete r.width,delete r.height,this.getUrl("exportImage",r)}getUrl(e,t,n){let r="".concat(this.props.url,"/").concat(e),i=!0;for(const[e,n]of Object.entries(t))r+=i?"?":"&",i=!1,Array.isArray(n)?r+="".concat(e.toUpperCase(),"=").concat(n.join(",")):r+="".concat(e.toUpperCase(),"=").concat(n?String(n):"");return r}async checkResponse(e){if(!e.ok)throw new Error("error")}}Object(i.a)(W,"type","arcgis-image-server"),Object(i.a)(W,"testURL",e=>e.toLowerCase().includes("ImageServer"));const q=[Y,W,d];function X(e){const{type:t="auto"}=e;switch("auto"===t?function(e){for(const t of q)if(t.testURL&&t.testURL(e))return t.type;return"wms"}(e.url):t){case"template":return new d(e);case"wms":return new Y(e);default:throw new Error("Not a valid image source type")}}var Z=n(47);const K=6378137*Math.PI;function Q(e){const t=Object(Z.lngLatToWorld)(e);return t[0]=(t[0]/256-1)*K,t[1]=(t[1]/256-1)*K,t}const J={id:"imagery-layer",data:"",serviceType:"auto",srs:"auto",layers:{type:"array",compare:!0,value:[]},onMetadataLoad:{type:"function",value:()=>{}},onMetadataLoadError:{type:"function",value:console.error},onImageLoadStart:{type:"function",value:()=>{}},onImageLoad:{type:"function",value:()=>{}},onImageLoadError:{type:"function",compare:!1,value:(e,t)=>console.error(t,e)}};class $ extends o.a{constructor(...e){super(...e),Object(i.a)(this,"state",void 0)}get isLoaded(){return Boolean(this.state)&&0===this.state.loadCounter&&super.isLoaded}shouldUpdateState(){return!0}initializeState(){this.state._nextRequestId=0,this.state.lastRequestId=-1,this.state.loadCounter=0}updateState({changeFlags:e,props:t,oldProps:n}){const{viewport:r}=this.context;e.dataChanged||t.serviceType!==n.serviceType?(this.state.imageSource=this._createImageSource(t),this._loadMetadata(),this.debounce(()=>this.loadImage(r,"image source changed"),0)):Object(a.a)(t.layers,n.layers,1)?e.viewportChanged&&this.debounce(()=>this.loadImage(r,"viewport changed")):this.debounce(()=>this.loadImage(r,"layers changed"),0)}finalizeState(){}renderLayers(){const{bounds:e,image:t,lastRequestParameters:n}=this.state;return t&&new l.a({...this.getSubLayerProps({id:"bitmap"}),_imageCoordinateSystem:"EPSG:4326"===n.srs?s.a.LNGLAT:s.a.CARTESIAN,bounds:e,image:t})}async getFeatureInfoText(e,t){const{lastRequestParameters:n}=this.state;if(n){var r,i;return await(null===(r=(i=this.state.imageSource).getFeatureInfoText)||void 0===r?void 0:r.call(i,{...n,query_layers:n.layers,x:e,y:t,info_format:"application/vnd.ogc.gml"}))}return""}_createImageSource(e){if(e.data instanceof u)return e.data;if("string"==typeof e.data)return X({url:e.data,loadOptions:e.loadOptions,type:e.serviceType});throw new Error("invalid image source in props.data")}async _loadMetadata(){const{imageSource:e}=this.state;try{this.state.loadCounter++;const n=await e.getMetadata();var t;if(this.state.imageSource===e)null===(t=this.getCurrentLayer())||void 0===t||t.props.onMetadataLoad(n)}catch(e){var n;null===(n=this.getCurrentLayer())||void 0===n||n.props.onMetadataLoadError(e)}finally{this.state.loadCounter--}}async loadImage(e,t){const{layers:n,serviceType:r}=this.props;if("wms"===r&&0===n.length)return;const i=e.getBounds(),{width:o,height:a}=e,s=this.getRequestId();let{srs:l}=this.props;"auto"===l&&(l=e.resolution?"EPSG:4326":"EPSG:3857");const u={width:o,height:a,bbox:i,layers:n,srs:l};if("EPSG:3857"===l){const[e,t]=Q([i[0],i[1]]),[n,r]=Q([i[2],i[3]]);u.bbox=[e,t,n,r]}try{this.state.loadCounter++,this.props.onImageLoadStart(s);const e=await this.state.imageSource.getImage(u);var c;if(this.state.lastRequestIde(),t)}}Object(i.a)($,"layerName","WMSLayer"),Object(i.a)($,"defaultProps",J);var ee=n(1133);class te extends ee.a{}Object(i.a)(te,"layerName","GreatCircleLayer"),Object(i.a)(te,"defaultProps",{getHeight:{type:"accessor",value:0},greatCircle:!0});var ne=n(887);const re={...ne.a.defaultProps};class ie extends o.a{indexToBounds(){return null}renderLayers(){const{elevationScale:e,extruded:t,wireframe:n,filled:r,stroked:i,lineWidthUnits:o,lineWidthScale:a,lineWidthMinPixels:s,lineWidthMaxPixels:l,lineJointRounded:u,lineMiterLimit:c,lineDashJustified:d,getElevation:f,getFillColor:h,getLineColor:p,getLineWidth:A}=this.props,{updateTriggers:g,material:m,transitions:y}=this.props,v=this.getSubLayerClass("cell",ne.a),{updateTriggers:b,..._}=this.indexToBounds()||{};return new v({filled:r,wireframe:n,extruded:t,elevationScale:e,stroked:i,lineWidthUnits:o,lineWidthScale:a,lineWidthMinPixels:s,lineWidthMaxPixels:l,lineJointRounded:u,lineMiterLimit:c,lineDashJustified:d,material:m,transitions:y,getElevation:f,getFillColor:h,getLineColor:p,getLineWidth:A},this.getSubLayerProps({id:"cell",updateTriggers:g&&{...b,getElevation:g.getElevation,getFillColor:g.getFillColor,getLineColor:g.getLineColor,getLineWidth:g.getLineWidth}}),_)}}Object(i.a)(ie,"layerName","GeoCellLayer"),Object(i.a)(ie,"defaultProps",re);var oe=n(229),ae=n.n(oe);const se=180/Math.PI;function le(e,t,n){const r=1<=.5?1/3*(4*e*e-1):1/3*(1-4*(1-e)*(1-e))}function ce(e){return[ue(e[0]),ue(e[1])]}function de(e,[t,n]){switch(e){case 0:return[1,t,n];case 1:return[-t,1,n];case 2:return[-t,-n,1];case 3:return[-1,-n,-t];case 4:return[n,-1,-t];case 5:return[n,t,-1];default:throw new Error("Invalid face")}}function fe([e,t,n]){const r=Math.atan2(n,Math.sqrt(e*e+t*t));return[Math.atan2(t,e)*se,r*se]}function he(e,t,n,r){if(0===r){1===n&&(t[0]=e-1-t[0],t[1]=e-1-t[1]);const r=t[0];t[0]=t[1],t[1]=r}}function pe(e){if("string"==typeof e){if(e.indexOf("/")>0)return e;e=function(e){const t=e.padEnd(16,"0");return ae.a.fromString(t,16)}(e)}return function(e){let t=ae.a.fromString(e,!0,10).toString(2);for(;t.length<64;)t="0"+t;const n=t.lastIndexOf("1"),r=t.substring(0,3),i=t.substring(3,n),o=i.length/2,a=ae.a.fromString(r,!0,2).toString(10);let s=ae.a.fromString(i,!0,2).toString(4);for(;s.length89.999&&(r[0]=s);const i=r[0]-s;r[0]+=i>180?-360:i<-180?360:0,o[a++]=r[0],o[a++]=r[1],s=r[0]}}return o[a++]=o[0],o[a++]=o[1],o}(function(e){const t=e.split("/"),n=parseInt(t[0],10),r=t[1],i=r.length,o=[0,0];let a;for(let e=i-1;e>=0;e--){a=i-e;const t=r[e];let n=0,s=0;"1"===t?s=1:"2"===t?(n=1,s=1):"3"===t&&(n=1);const l=Math.pow(2,a-1);he(l,o,n,s),o[0]+=l*n,o[1]+=l*s}if(n%2==1){const e=o[0];o[0]=o[1],o[1]=e}return{face:n,ij:o,level:a}}(pe(e)))}class ge extends ie{indexToBounds(){const{data:e,getS2Token:t}=this.props;return{data:e,_normalize:!1,positionFormat:"XY",getPolygon:(e,n)=>Ae(t(e,n))}}}Object(i.a)(ge,"layerName","S2Layer"),Object(i.a)(ge,"defaultProps",{getS2Token:{type:"accessor",value:e=>e.token}});function me(e,t=1){const[n,r]=function(e,t){let n=0,r=0,i=1<>=1;const o=parseInt(e[t]);o%2&&(n|=i),o>1&&(r|=i)}return[[n/o,512-r/o],[(n+t)/o,512-(r+t)/o]]}(e,t),[i,o]=Object(Z.worldToLngLat)(n),[a,s]=Object(Z.worldToLngLat)(r);return[a,o,a,s,i,s,i,o,a,o]}class ye extends ie{indexToBounds(){const{data:e,extruded:t,getQuadkey:n}=this.props,r=t?.99:1;return{data:e,_normalize:!1,positionFormat:"XY",getPolygon:(e,t)=>me(n(e,t),r),updateTriggers:{getPolygon:r}}}}Object(i.a)(ye,"layerName","QuadkeyLayer"),Object(i.a)(ye,"defaultProps",{getQuadkey:{type:"accessor",value:e=>e.quadkey}});var ve=n(184),be=n(1129),_e=n(1132);Math.PI,Math.PI;const we={EPSILON:1e-12,debug:!1,precision:4,printTypes:!1,printDegrees:!1,printRowMajor:!0};function xe(e,{precision:t=we.precision}={}){return e=function(e){return Math.round(e/we.EPSILON)*we.EPSILON}(e),"".concat(parseFloat(e.toPrecision(t)))}function Me(e){return Array.isArray(e)||ArrayBuffer.isView(e)&&!(e instanceof DataView)}function Ee(e,t,n){return Me(e)?e.map((e,r)=>Ee(e,t[r],n)):n*t+(1-n)*e}function Oe(e,t,n){const r=we.EPSILON;n&&(we.EPSILON=n);try{if(e===t)return!0;if(Me(e)&&Me(t)){if(e.length!==t.length)return!1;for(let n=0;n0?", ":"")+xe(this[n],e);return"".concat(e.printTypes?this.constructor.name:"","[").concat(t,"]")}equals(e){if(!e||this.length!==e.length)return!1;for(let t=0;t2*Math.PI)throw Error("expected radians")}class qe{constructor(e){Object(i.a)(this,"index",void 0),Object(i.a)(this,"isVisible",void 0),Object(i.a)(this,"isSelected",void 0),Object(i.a)(this,"parent",void 0),Object(i.a)(this,"children",void 0),Object(i.a)(this,"content",void 0),Object(i.a)(this,"state",void 0),Object(i.a)(this,"layers",void 0),Object(i.a)(this,"id",void 0),Object(i.a)(this,"zoom",void 0),Object(i.a)(this,"userData",void 0),Object(i.a)(this,"boundingBox",void 0),Object(i.a)(this,"_abortController",void 0),Object(i.a)(this,"_loader",void 0),Object(i.a)(this,"_loaderId",void 0),Object(i.a)(this,"_isLoaded",void 0),Object(i.a)(this,"_isCancelled",void 0),Object(i.a)(this,"_needsReload",void 0),Object(i.a)(this,"_bbox",void 0),this.index=e,this.isVisible=!1,this.isSelected=!1,this.parent=null,this.children=[],this.content=null,this._loader=void 0,this._abortController=null,this._loaderId=0,this._isLoaded=!1,this._isCancelled=!1,this._needsReload=!1}get bbox(){return this._bbox}set bbox(e){this._bbox||(this._bbox=e,this.boundingBox="west"in e?[[e.west,e.south],[e.east,e.north]]:[[e.left,e.top],[e.right,e.bottom]])}get data(){return this.isLoading&&this._loader?this._loader.then(()=>this.data):this.content}get isLoaded(){return this._isLoaded&&!this._needsReload}get isLoading(){return Boolean(this._loader)&&!this._isCancelled}get needsReload(){return this._needsReload||this._isCancelled}get byteLength(){const e=this.content?this.content.byteLength:0;return Number.isFinite(e)||console.error("byteLength not defined in tile data"),e}async _loadData({getData:e,requestScheduler:t,onLoad:n,onError:r}){const{index:i,id:o,bbox:a,userData:s,zoom:l}=this,u=this._loaderId;this._abortController=new AbortController;const{signal:c}=this._abortController,d=await t.scheduleRequest(this,e=>e.isSelected?1:-1);if(!d)return void(this._isCancelled=!0);if(this._isCancelled)return void d.done();let f,h=null;try{h=await e({index:i,id:o,bbox:a,userData:s,zoom:l,signal:c})}catch(e){f=e||!0}finally{d.done()}u===this._loaderId&&(this._loader=void 0,this.content=h,!this._isCancelled||h?(this._isLoaded=!0,this._isCancelled=!1,f?r(f,this):n(this)):this._isLoaded=!1)}loadData(e){return this._isLoaded=!1,this._isCancelled=!1,this._needsReload=!1,this._loaderId++,this._loader=this._loadData(e),this._loader}setNeedsReload(){this.isLoading&&(this.abort(),this._loader=void 0),this._needsReload=!0}abort(){var e;this.isLoaded||(this._isCancelled=!0,null===(e=this._abortController)||void 0===e||e.abort())}}var Xe=n(508),Ze=n(351);const Ke=-1,Qe=0,Je=1;function $e(e,t){if(!e)throw new Error("math.gl assertion ".concat(t))}Math.PI,Math.PI;const et={EPSILON:1e-12,debug:!1,precision:4,printTypes:!1,printDegrees:!1,printRowMajor:!0};function tt(e,{precision:t=et.precision}={}){return e=function(e){return Math.round(e/et.EPSILON)*et.EPSILON}(e),"".concat(parseFloat(e.toPrecision(t)))}function nt(e){return Array.isArray(e)||ArrayBuffer.isView(e)&&!(e instanceof DataView)}function rt(e,t,n){const r=et.EPSILON;n&&(et.EPSILON=n);try{if(e===t)return!0;if(nt(e)&&nt(t)){if(e.length!==t.length)return!1;for(let n=0;n0?", ":"")+tt(this[n],e);return"".concat(e.printTypes?this.constructor.name:"","[").concat(t,"]")}equals(e){if(!e||this.length!==e.length)return!1;for(let t=0;t=0&&e=0&&e0?Je:i+r<0?Ke:Qe}distanceTo(e){return Math.sqrt(this.distanceSquaredTo(e))}distanceSquaredTo(e){const t=wt.from(e).subtract(this.center),{halfDiagonal:n}=this;let r,i=0;return r=Math.abs(t.x)-n.x,r>0&&(i+=r*r),r=Math.abs(t.y)-n.y,r>0&&(i+=r*r),r=Math.abs(t.z)-n.z,r>0&&(i+=r*r),i}}function Et(e,t){var n=t[0],r=t[1],i=t[2],o=t[4],a=t[5],s=t[6],l=t[8],u=t[9],c=t[10];return e[0]=Math.hypot(n,r,i),e[1]=Math.hypot(o,a,s),e[2]=Math.hypot(l,u,c),e}const Ot=new _t,St=new _t;class Tt{constructor(e=[0,0,0],t=0){Object(i.a)(this,"center",void 0),Object(i.a)(this,"radius",void 0),this.radius=-0,this.center=new _t,this.fromCenterRadius(e,t)}fromCenterRadius(e,t){return this.center.from(e),this.radius=t,this}fromCornerPoints(e,t){return t=Ot.from(t),this.center=(new _t).from(e).add(t).scale(.5),this.radius=this.center.distance(t),this}equals(e){return this===e||Boolean(e)&&this.center.equals(e.center)&&this.radius===e.radius}clone(){return new Tt(this.center,this.radius)}union(e){const t=this.center,n=this.radius,r=e.center,i=e.radius,o=Ot.copy(r).subtract(t),a=o.magnitude();if(n>=a+i)return this.clone();if(i>=a+n)return e.clone();const s=.5*(n+a+i);return St.copy(o).scale((-n+s)/a).add(t),this.center.copy(St),this.radius=s,this}expand(e){const t=Ot.from(e).subtract(this.center).magnitude();return t>this.radius&&(this.radius=t),this}transform(e){this.center.transform(e);const t=Et(Ot,e);return this.radius=Math.max(t[0],Math.max(t[1],t[2]))*this.radius,this}distanceSquaredTo(e){const t=this.distanceTo(e);return t*t}distanceTo(e){const t=Ot.from(e).subtract(this.center);return Math.max(0,t.len()-this.radius)}intersectPlane(e){const t=this.center,n=this.radius,r=e.normal.dot(t)+e.distance;return r<-n?Ke:r0?this.copy([e,...t]):this.identity()}copy(e){return this[0]=e[0],this[1]=e[1],this[2]=e[2],this[3]=e[3],this[4]=e[4],this[5]=e[5],this[6]=e[6],this[7]=e[7],this[8]=e[8],this.check()}identity(){return this.copy(kt)}fromObject(e){return this.check()}fromQuaternion(e){return function(e,t){var n=t[0],r=t[1],i=t[2],o=t[3],a=n+n,s=r+r,l=i+i,u=n*a,c=r*a,d=r*s,f=i*a,h=i*s,p=i*l,A=o*a,g=o*s,m=o*l;e[0]=1-d-p,e[3]=c-m,e[6]=f+g,e[1]=c+m,e[4]=1-u-p,e[7]=h-A,e[2]=f-g,e[5]=h+A,e[8]=1-u-d}(this,e),this.check()}set(e,t,n,r,i,o,a,s,l){return this[0]=e,this[1]=t,this[2]=n,this[3]=r,this[4]=i,this[5]=o,this[6]=a,this[7]=s,this[8]=l,this.check()}setRowMajor(e,t,n,r,i,o,a,s,l){return this[0]=e,this[1]=r,this[2]=a,this[3]=t,this[4]=i,this[5]=s,this[6]=n,this[7]=o,this[8]=l,this.check()}determinant(){return t=(e=this)[0],n=e[1],r=e[2],i=e[3],o=e[4],a=e[5],s=e[6],l=e[7],u=e[8],t*(u*o-a*l)+n*(-u*i+a*s)+r*(l*i-o*s);var e,t,n,r,i,o,a,s,l,u}transpose(){return function(e,t){if(e===t){var n=t[1],r=t[2],i=t[5];e[1]=t[3],e[2]=t[6],e[3]=n,e[5]=t[7],e[6]=r,e[7]=i}else e[0]=t[0],e[1]=t[3],e[2]=t[6],e[3]=t[1],e[4]=t[4],e[5]=t[7],e[6]=t[2],e[7]=t[5],e[8]=t[8]}(this,this),this.check()}invert(){return function(e,t){var n=t[0],r=t[1],i=t[2],o=t[3],a=t[4],s=t[5],l=t[6],u=t[7],c=t[8],d=c*a-s*u,f=-c*o+s*l,h=u*o-a*l,p=n*d+r*f+i*h;p&&(p=1/p,e[0]=d*p,e[1]=(-c*r+i*u)*p,e[2]=(s*r-i*a)*p,e[3]=f*p,e[4]=(c*n-i*l)*p,e[5]=(-s*n+i*o)*p,e[6]=h*p,e[7]=(-u*n+r*l)*p,e[8]=(a*n-r*o)*p)}(this,this),this.check()}multiplyLeft(e){return Lt(this,e,this),this.check()}multiplyRight(e){return Lt(this,this,e),this.check()}rotate(e){return function(e,t,n){var r=t[0],i=t[1],o=t[2],a=t[3],s=t[4],l=t[5],u=t[6],c=t[7],d=t[8],f=Math.sin(n),h=Math.cos(n);e[0]=h*r+f*a,e[1]=h*i+f*s,e[2]=h*o+f*l,e[3]=h*a-f*r,e[4]=h*s-f*i,e[5]=h*l-f*o,e[6]=u,e[7]=c,e[8]=d}(this,this,e),this.check()}scale(e){return Array.isArray(e)?Pt(this,this,e):Pt(this,this,[e,e]),this.check()}translate(e){return function(e,t,n){var r=t[0],i=t[1],o=t[2],a=t[3],s=t[4],l=t[5],u=t[6],c=t[7],d=t[8],f=n[0],h=n[1];e[0]=r,e[1]=i,e[2]=o,e[3]=a,e[4]=s,e[5]=l,e[6]=f*r+h*a+u,e[7]=f*i+h*s+c,e[8]=f*o+h*l+d}(this,this,e),this.check()}transform(e,t){let n;switch(e.length){case 2:n=It(t||[-0,-0],e,this);break;case 3:n=pt(t||[-0,-0,-0],e,this);break;case 4:n=yt(t||[-0,-0,-0,-0],e,this);break;default:throw new Error("Illegal vector")}return at(n,e.length),n}transformVector(e,t){return this.transform(e,t)}transformVector2(e,t){return this.transform(e,t)}transformVector3(e,t){return this.transform(e,t)}}let jt,Ft,Nt;class Bt extends st{static get ZERO(){return Nt||(Nt=new Bt(0,0,0,0),Object.freeze(Nt)),Nt}constructor(e=0,t=0,n=0,r=0){super(-0,-0,-0,-0),nt(e)&&1===arguments.length?this.copy(e):(et.debug&&(ot(e),ot(t),ot(n),ot(r)),this[0]=e,this[1]=t,this[2]=n,this[3]=r)}set(e,t,n,r){return this[0]=e,this[1]=t,this[2]=n,this[3]=r,this.check()}copy(e){return this[0]=e[0],this[1]=e[1],this[2]=e[2],this[3]=e[3],this.check()}fromObject(e){return et.debug&&(ot(e.x),ot(e.y),ot(e.z),ot(e.w)),this[0]=e.x,this[1]=e.y,this[2]=e.z,this[3]=e.w,this}toObject(e){return e.x=this[0],e.y=this[1],e.z=this[2],e.w=this[3],e}get ELEMENTS(){return 4}get z(){return this[2]}set z(e){this[2]=ot(e)}get w(){return this[3]}set w(e){this[3]=ot(e)}transform(e){return ht(this,this,e),this.check()}transformByMatrix3(e){return yt(this,this,e),this.check()}transformByMatrix2(e){return function(e,t,n){const r=t[0],i=t[1];e[0]=n[0]*r+n[2]*i,e[1]=n[1]*r+n[3]*i,e[2]=t[2],e[3]=t[3]}(this,this,e),this.check()}transformByQuaternion(e){return At(this,this,e),this.check()}applyMatrix4(e){return e.transform(this,this),this}}function zt(e){var t=e[0],n=e[1],r=e[2],i=e[3];return Math.hypot(t,n,r,i)}function Ut(e){var t=e[0],n=e[1],r=e[2],i=e[3];return t*t+n*n+r*r+i*i}!function(){var e=function(){var e=new lt(4);return lt!=Float32Array&&(e[0]=0,e[1]=0,e[2]=0,e[3]=0),e}()}();function Ht(){var e=new lt(4);return lt!=Float32Array&&(e[0]=0,e[1]=0,e[2]=0),e[3]=1,e}function Vt(e,t,n){n*=.5;var r=Math.sin(n);return e[0]=r*t[0],e[1]=r*t[1],e[2]=r*t[2],e[3]=Math.cos(n),e}function Gt(e,t,n){var r=t[0],i=t[1],o=t[2],a=t[3],s=n[0],l=n[1],u=n[2],c=n[3];return e[0]=r*c+a*s+i*u-o*l,e[1]=i*c+a*l+o*s-r*u,e[2]=o*c+a*u+r*l-i*s,e[3]=a*c-r*s-i*l-o*u,e}function Yt(e,t,n,r){var i,o,a,s,l,u=t[0],c=t[1],d=t[2],f=t[3],h=n[0],p=n[1],A=n[2],g=n[3];return(o=u*h+c*p+d*A+f*g)<0&&(o=-o,h=-h,p=-p,A=-A,g=-g),1-o>1e-6?(i=Math.acos(o),a=Math.sin(i),s=Math.sin((1-r)*i)/a,l=Math.sin(r*i)/a):(s=1-r,l=r),e[0]=s*u+l*h,e[1]=s*c+l*p,e[2]=s*d+l*A,e[3]=s*f+l*g,e}function Wt(e,t){var n,r=t[0]+t[4]+t[8];if(r>0)n=Math.sqrt(r+1),e[3]=.5*n,n=.5/n,e[0]=(t[5]-t[7])*n,e[1]=(t[6]-t[2])*n,e[2]=(t[1]-t[3])*n;else{var i=0;t[4]>t[0]&&(i=1),t[8]>t[3*i+i]&&(i=2);var o=(i+1)%3,a=(i+2)%3;n=Math.sqrt(t[3*i+i]-t[3*o+o]-t[3*a+a]+1),e[i]=.5*n,n=.5/n,e[3]=(t[3*o+a]-t[3*a+o])*n,e[o]=(t[3*o+i]+t[3*i+o])*n,e[a]=(t[3*a+i]+t[3*i+a])*n}return e}var qt,Xt,Zt,Kt,Qt,Jt,$t=function(e,t,n){return e[0]=t[0]+n[0],e[1]=t[1]+n[1],e[2]=t[2]+n[2],e[3]=t[3]+n[3],e},en=function(e,t,n){return e[0]=t[0]*n,e[1]=t[1]*n,e[2]=t[2]*n,e[3]=t[3]*n,e},tn=function(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]*t[3]},nn=function(e,t,n,r){var i=t[0],o=t[1],a=t[2],s=t[3];return e[0]=i+r*(n[0]-i),e[1]=o+r*(n[1]-o),e[2]=a+r*(n[2]-a),e[3]=s+r*(n[3]-s),e},rn=zt,on=Ut,an=function(e,t){var n=t[0],r=t[1],i=t[2],o=t[3],a=n*n+r*r+i*i+o*o;return a>0&&(a=1/Math.sqrt(a)),e[0]=n*a,e[1]=r*a,e[2]=i*a,e[3]=o*a,e},sn=(qt=ut(),Xt=ct(1,0,0),Zt=ct(0,1,0),function(e,t,n){var r=dt(t,n);return r<-.999999?(ft(qt,Xt,t),gt(qt)<1e-6&&ft(qt,Zt,t),function(e,t){var n=t[0],r=t[1],i=t[2],o=n*n+r*r+i*i;o>0&&(o=1/Math.sqrt(o)),e[0]=t[0]*o,e[1]=t[1]*o,e[2]=t[2]*o}(qt,qt),Vt(e,qt,Math.PI),e):r>.999999?(e[0]=0,e[1]=0,e[2]=0,e[3]=1,e):(ft(qt,t,n),e[0]=qt[0],e[1]=qt[1],e[2]=qt[2],e[3]=1+r,an(e,e))});Kt=Ht(),Qt=Ht(),Jt=function(){var e=new lt(9);return lt!=Float32Array&&(e[1]=0,e[2]=0,e[3]=0,e[5]=0,e[6]=0,e[7]=0),e[0]=1,e[4]=1,e[8]=1,e}();const ln=[0,0,0,1];class un extends it{constructor(e=0,t=0,n=0,r=1){super(-0,-0,-0,-0),Array.isArray(e)&&1===arguments.length?this.copy(e):this.set(e,t,n,r)}copy(e){return this[0]=e[0],this[1]=e[1],this[2]=e[2],this[3]=e[3],this.check()}set(e,t,n,r){return this[0]=e,this[1]=t,this[2]=n,this[3]=r,this.check()}fromObject(e){return this[0]=e.x,this[1]=e.y,this[2]=e.z,this[3]=e.w,this.check()}fromMatrix3(e){return Wt(this,e),this.check()}fromAxisRotation(e,t){return Vt(this,e,t),this.check()}identity(){return function(e){e[0]=0,e[1]=0,e[2]=0,e[3]=1}(this),this.check()}setAxisAngle(e,t){return this.fromAxisRotation(e,t)}get ELEMENTS(){return 4}get x(){return this[0]}set x(e){this[0]=ot(e)}get y(){return this[1]}set y(e){this[1]=ot(e)}get z(){return this[2]}set z(e){this[2]=ot(e)}get w(){return this[3]}set w(e){this[3]=ot(e)}len(){return rn(this)}lengthSquared(){return on(this)}dot(e){return tn(this,e)}rotationTo(e,t){return sn(this,e,t),this.check()}add(e){return $t(this,this,e),this.check()}calculateW(){return function(e,t){var n=t[0],r=t[1],i=t[2];e[0]=n,e[1]=r,e[2]=i,e[3]=Math.sqrt(Math.abs(1-n*n-r*r-i*i))}(this,this),this.check()}conjugate(){return function(e,t){e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e[3]=t[3]}(this,this),this.check()}invert(){return function(e,t){var n=t[0],r=t[1],i=t[2],o=t[3],a=n*n+r*r+i*i+o*o,s=a?1/a:0;e[0]=-n*s,e[1]=-r*s,e[2]=-i*s,e[3]=o*s}(this,this),this.check()}lerp(e,t,n){return void 0===n?this.lerp(this,e,t):(nn(this,e,t,n),this.check())}multiplyRight(e){return Gt(this,this,e),this.check()}multiplyLeft(e){return Gt(this,e,this),this.check()}normalize(){const e=this.len(),t=e>0?1/e:0;return this[0]=this[0]*t,this[1]=this[1]*t,this[2]=this[2]*t,this[3]=this[3]*t,0===e&&(this[3]=1),this.check()}rotateX(e){return function(e,t,n){n*=.5;var r=t[0],i=t[1],o=t[2],a=t[3],s=Math.sin(n),l=Math.cos(n);e[0]=r*l+a*s,e[1]=i*l+o*s,e[2]=o*l-i*s,e[3]=a*l-r*s}(this,this,e),this.check()}rotateY(e){return function(e,t,n){n*=.5;var r=t[0],i=t[1],o=t[2],a=t[3],s=Math.sin(n),l=Math.cos(n);e[0]=r*l-o*s,e[1]=i*l+a*s,e[2]=o*l+r*s,e[3]=a*l-i*s}(this,this,e),this.check()}rotateZ(e){return function(e,t,n){n*=.5;var r=t[0],i=t[1],o=t[2],a=t[3],s=Math.sin(n),l=Math.cos(n);e[0]=r*l+i*s,e[1]=i*l-r*s,e[2]=o*l+a*s,e[3]=a*l-o*s}(this,this,e),this.check()}scale(e){return en(this,this,e),this.check()}slerp(e,t,n){let r,i,o;switch(arguments.length){case 1:({start:r=ln,target:i,ratio:o}=e);break;case 2:r=this,i=e,o=t;break;default:r=e,i=t,o=n}return Yt(this,r,i,o),this.check()}transformVector4(e,t=new Bt){return function(e,t,n){var r=t[0],i=t[1],o=t[2],a=n[0],s=n[1],l=n[2],u=n[3],c=u*r+s*o-l*i,d=u*i+l*r-a*o,f=u*o+a*i-s*r,h=-a*r-s*i-l*o;e[0]=c*u+h*-a+d*-l-f*-s,e[1]=d*u+h*-s+f*-a-c*-l,e[2]=f*u+h*-l+c*-s-d*-a,e[3]=t[3]}(t,e,this),at(t,4)}lengthSq(){return this.lengthSquared()}setFromAxisAngle(e,t){return this.setAxisAngle(e,t)}premultiply(e){return this.multiplyLeft(e)}multiply(e){return this.multiplyRight(e)}}const cn=new _t,dn=new _t,fn=new _t,hn=new _t,pn=new _t,An=new _t,gn=new _t,mn=0,yn=1,vn=2,bn=3,_n=4,wn=5,xn=6,Mn=7,En=8;class On{constructor(e=[0,0,0],t=[0,0,0,0,0,0,0,0,0]){Object(i.a)(this,"center",void 0),Object(i.a)(this,"halfAxes",void 0),this.center=(new _t).from(e),this.halfAxes=new Rt(t)}get halfSize(){const e=this.halfAxes.getColumn(0),t=this.halfAxes.getColumn(1),n=this.halfAxes.getColumn(2);return[new _t(e).len(),new _t(t).len(),new _t(n).len()]}get quaternion(){const e=this.halfAxes.getColumn(0),t=this.halfAxes.getColumn(1),n=this.halfAxes.getColumn(2),r=new _t(e).normalize(),i=new _t(t).normalize(),o=new _t(n).normalize();return(new un).fromMatrix3(new Rt([...r,...i,...o]))}fromCenterHalfSizeQuaternion(e,t,n){const r=new un(n),i=(new Rt).fromQuaternion(r);return i[0]=i[0]*t[0],i[1]=i[1]*t[0],i[2]=i[2]*t[0],i[3]=i[3]*t[1],i[4]=i[4]*t[1],i[5]=i[5]*t[1],i[6]=i[6]*t[2],i[7]=i[7]*t[2],i[8]=i[8]*t[2],this.center=(new _t).from(e),this.halfAxes=i,this}clone(){return new On(this.center,this.halfAxes)}equals(e){return this===e||Boolean(e)&&this.center.equals(e.center)&&this.halfAxes.equals(e.halfAxes)}getBoundingSphere(e=new Tt){const t=this.halfAxes,n=t.getColumn(0,fn),r=t.getColumn(1,hn),i=t.getColumn(2,pn),o=cn.copy(n).add(r).add(i);return e.center.copy(this.center),e.radius=o.magnitude(),e}intersectPlane(e){const t=this.center,n=e.normal,r=this.halfAxes,i=n.x,o=n.y,a=n.z,s=Math.abs(i*r[mn]+o*r[yn]+a*r[vn])+Math.abs(i*r[bn]+o*r[_n]+a*r[wn])+Math.abs(i*r[xn]+o*r[Mn]+a*r[En]),l=n.dot(t)+e.distance;return l<=-s?Ke:l>=s?Je:Qe}distanceTo(e){return Math.sqrt(this.distanceSquaredTo(e))}distanceSquaredTo(e){const t=dn.from(e).subtract(this.center),n=this.halfAxes,r=n.getColumn(0,fn),i=n.getColumn(1,hn),o=n.getColumn(2,pn),a=r.magnitude(),s=i.magnitude(),l=o.magnitude();r.normalize(),i.normalize(),o.normalize();let u,c=0;return u=Math.abs(t.dot(r))-a,u>0&&(c+=u*u),u=Math.abs(t.dot(i))-s,u>0&&(c+=u*u),u=Math.abs(t.dot(o))-l,u>0&&(c+=u*u),c}computePlaneDistances(e,t,n=[-0,-0]){let r=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY;const o=this.center,a=this.halfAxes,s=a.getColumn(0,fn),l=a.getColumn(1,hn),u=a.getColumn(2,pn),c=An.copy(s).add(l).add(u).add(o),d=gn.copy(c).subtract(e);let f=t.dot(d);return r=Math.min(f,r),i=Math.max(f,i),c.copy(o).add(s).add(l).subtract(u),d.copy(c).subtract(e),f=t.dot(d),r=Math.min(f,r),i=Math.max(f,i),c.copy(o).add(s).subtract(l).add(u),d.copy(c).subtract(e),f=t.dot(d),r=Math.min(f,r),i=Math.max(f,i),c.copy(o).add(s).subtract(l).subtract(u),d.copy(c).subtract(e),f=t.dot(d),r=Math.min(f,r),i=Math.max(f,i),o.copy(c).subtract(s).add(l).add(u),d.copy(c).subtract(e),f=t.dot(d),r=Math.min(f,r),i=Math.max(f,i),o.copy(c).subtract(s).add(l).subtract(u),d.copy(c).subtract(e),f=t.dot(d),r=Math.min(f,r),i=Math.max(f,i),o.copy(c).subtract(s).subtract(l).add(u),d.copy(c).subtract(e),f=t.dot(d),r=Math.min(f,r),i=Math.max(f,i),o.copy(c).subtract(s).subtract(l).subtract(u),d.copy(c).subtract(e),f=t.dot(d),r=Math.min(f,r),i=Math.max(f,i),n[0]=r,n[1]=i,n}transform(e){this.center.transformAsPoint(e);const t=this.halfAxes.getColumn(0,fn);t.transformAsPoint(e);const n=this.halfAxes.getColumn(1,hn);n.transformAsPoint(e);const r=this.halfAxes.getColumn(2,pn);return r.transformAsPoint(e),this.halfAxes=new Rt([...t,...n,...r]),this}getTransform(){throw new Error("not implemented")}}const Sn=new _t,Tn=new _t;class Cn{constructor(e=[0,0,1],t=0){Object(i.a)(this,"normal",void 0),Object(i.a)(this,"distance",void 0),this.normal=new _t,this.distance=-0,this.fromNormalDistance(e,t)}fromNormalDistance(e,t){return $e(Number.isFinite(t)),this.normal.from(e).normalize(),this.distance=t,this}fromPointNormal(e,t){e=Sn.from(e),this.normal.from(t).normalize();const n=-this.normal.dot(e);return this.distance=n,this}fromCoefficients(e,t,n,r){return this.normal.set(e,t,n),$e(rt(this.normal.len(),1)),this.distance=r,this}clone(){return new Cn(this.normal,this.distance)}equals(e){return rt(this.distance,e.distance)&&rt(this.normal,e.normal)}getPointDistance(e){return this.normal.dot(e)+this.distance}transform(e){const t=Tn.copy(this.normal).transformAsVector(e).normalize(),n=this.normal.scale(-this.distance).transform(e);return this.fromPointNormal(n,t)}projectPointOntoPlane(e,t=[0,0,0]){e=Sn.from(e);const n=this.getPointDistance(e),r=Tn.copy(this.normal).scale(n);return e.subtract(r).to(t)}}const Ln=[new _t([1,0,0]),new _t([0,1,0]),new _t([0,0,1])],Pn=new _t,In=new _t;new Cn(new _t(1,0,0),0);class Dn{constructor(e=[]){Object(i.a)(this,"planes",void 0),this.planes=e}fromBoundingSphere(e){this.planes.length=2*Ln.length;const t=e.center,n=e.radius;let r=0;for(const e of Ln){let i=this.planes[r],o=this.planes[r+1];i||(i=this.planes[r]=new Cn),o||(o=this.planes[r+1]=new Cn);const a=Pn.copy(e).scale(-n).add(t);e.dot(a);i.fromPointNormal(a,e);const s=Pn.copy(e).scale(n).add(t),l=In.copy(e).negate();l.dot(s);o.fromPointNormal(s,l),r+=2}return this}computeVisibility(e){let t=Je;for(const n of this.planes){switch(e.intersectPlane(n)){case Ke:return Ke;case Qe:t=Qe}}return t}computeVisibilityWithPlaneMask(e,t){if($e(Number.isFinite(t),"parentPlaneMask is required."),t===Dn.MASK_OUTSIDE||t===Dn.MASK_INSIDE)return t;let n=Dn.MASK_INSIDE;const r=this.planes;for(let i=0;is;)Wn(a,zn),Un.copy(zn).transpose(),a.multiplyRight(zn),a.multiplyLeft(Un),o.multiplyRight(zn),++r>2&&(++i,r=0);return t.unitary=o.toTarget(t.unitary),t.diagonal=a.toTarget(t.diagonal),t}const Vn=[1,0,0],Gn=[2,2,1];function Yn(e){let t=0;for(let n=0;n<3;++n){const r=e[Fn.getElementIndex(Gn[n],Vn[n])];t+=2*r*r}return Math.sqrt(t)}function Wn(e,t){const n=Rn;let r=0,i=1;for(let t=0;t<3;++t){const n=Math.abs(e[Fn.getElementIndex(Gn[t],Vn[t])]);n>r&&(i=t,r=n)}const o=Vn[i],a=Gn[i];let s=1,l=0;if(Math.abs(e[Fn.getElementIndex(a,o)])>n){const t=(e[Fn.getElementIndex(a,a)]-e[Fn.getElementIndex(o,o)])/2/e[Fn.getElementIndex(a,o)];let n;n=t<0?-1/(-t+Math.sqrt(1+t*t)):1/(t+Math.sqrt(1+t*t)),s=1/Math.sqrt(1+n*n),l=n*s}return Rt.IDENTITY.to(t),t[Fn.getElementIndex(o,o)]=t[Fn.getElementIndex(a,a)]=s,t[Fn.getElementIndex(a,o)]=l,t[Fn.getElementIndex(o,a)]=-l,t}const qn=new _t,Xn=new _t,Zn=new _t,Kn=new _t,Qn=new _t,Jn=new Rt,$n={diagonal:new Rt,unitary:new Rt};function er(e,t=new On){if(!e||0===e.length)return t.halfAxes=new Rt([0,0,0,0,0,0,0,0,0]),t.center=new _t,t;const n=e.length,r=new _t(0,0,0);for(const t of e)r.add(t);const i=1/n;r.multiplyByScalar(i);let o=0,a=0,s=0,l=0,u=0,c=0;for(const t of e){const e=qn.copy(t).subtract(r);o+=e.x*e.x,a+=e.x*e.y,s+=e.x*e.z,l+=e.y*e.y,u+=e.y*e.z,c+=e.z*e.z}o*=i,a*=i,s*=i,l*=i,u*=i,c*=i;const d=Jn;d[0]=o,d[1]=a,d[2]=s,d[3]=a,d[4]=l,d[5]=u,d[6]=s,d[7]=u,d[8]=c;const{unitary:f}=Hn(d,$n),h=t.halfAxes.copy(f);let p=h.getColumn(0,Zn),A=h.getColumn(1,Kn),g=h.getColumn(2,Qn),m=-Number.MAX_VALUE,y=-Number.MAX_VALUE,v=-Number.MAX_VALUE,b=Number.MAX_VALUE,_=Number.MAX_VALUE,w=Number.MAX_VALUE;for(const t of e)qn.copy(t),m=Math.max(qn.dot(p),m),y=Math.max(qn.dot(A),y),v=Math.max(qn.dot(g),v),b=Math.min(qn.dot(p),b),_=Math.min(qn.dot(A),_),w=Math.min(qn.dot(g),w);p=p.multiplyByScalar(.5*(b+m)),A=A.multiplyByScalar(.5*(_+y)),g=g.multiplyByScalar(.5*(w+v)),t.center.copy(p).add(A).add(g);const x=Xn.set(m-b,y-_,v-w).multiplyByScalar(.5),M=new Rt([x[0],0,0,0,x[1],0,0,0,x[2]]);return t.halfAxes.multiplyRight(M),t}const tr=[[.5,.5],[0,0],[0,1],[1,0],[1,1]],nr=tr.concat([[0,.5],[.5,0],[1,.5],[.5,1]]),rr=nr.concat([[.25,.5],[.75,.5]]);class ir{constructor(e,t,n){Object(i.a)(this,"x",void 0),Object(i.a)(this,"y",void 0),Object(i.a)(this,"z",void 0),Object(i.a)(this,"childVisible",void 0),Object(i.a)(this,"selected",void 0),Object(i.a)(this,"_children",void 0),this.x=e,this.y=t,this.z=n}get children(){if(!this._children){const e=2*this.x,t=2*this.y,n=this.z+1;this._children=[new ir(e,t,n),new ir(e,t+1,n),new ir(e+1,t,n),new ir(e+1,t+1,n)]}return this._children}update(e){const{viewport:t,cullingVolume:n,elevationBounds:r,minZ:i,maxZ:o,bounds:a,offset:s,project:l}=e,u=this.getBoundingVolume(r,s,l);if(a&&!this.insideBounds(a))return!1;if(n.computeVisibility(u)<0)return!1;if(!this.childVisible){let{z:e}=this;if(e=i){const n=u.distanceTo(t.cameraPosition)*t.scale/t.height;e+=Math.floor(Math.log2(n))}if(e>=o)return this.selected=!0,!0}this.selected=!1,this.childVisible=!0;for(const t of this.children)t.update(e);return!0}getSelected(e=[]){if(this.selected&&e.push(this),this._children)for(const t of this._children)t.getSelected(e);return e}insideBounds([e,t,n,r]){const i=512/Math.pow(2,this.z);return this.x*ie&&(this.y+1)*i>t}getBoundingVolume(e,t,n){if(n){const t=this.z<1?rr:this.z<2?nr:tr,r=[];for(const i of t){const t=dr(this.x+i[0],this.y+i[1],this.z);t[2]=e[0],r.push(n(t)),e[0]!==e[1]&&(t[2]=e[1],r.push(n(t)))}return er(r)}const r=512/Math.pow(2,this.z),i=this.x*r+512*t,o=512-(this.y+1)*r;return new Mt([i,o,e[0]],[i+r,o+r,e[1]])}}const or=[-1/0,-1/0,1/0,1/0],ar={type:"object",value:null,validate:(e,t)=>t.optional&&null===e||"string"==typeof e||Array.isArray(e)&&e.every(e=>"string"==typeof e),equal:(e,t)=>{if(e===t)return!0;if(!Array.isArray(e)||!Array.isArray(t))return!1;const n=e.length;if(n!==t.length)return!1;for(let r=0;re[0])),Math.min(...n.map(e=>e[1])),Math.max(...n.map(e=>e[0])),Math.max(...n.map(e=>e[1]))]}function lr(e,t){if(!e||!e.length)return null;const{index:n,id:r}=t;if(Array.isArray(e)){e=e[(i=r,Math.abs(i.split("").reduce((e,t)=>(e<<5)-e+t.charCodeAt(0)|0,0))%e.length)]}var i;let o=e;for(const e of Object.keys(n)){const t=new RegExp("{".concat(e,"}"),"g");o=o.replace(t,String(n[e]))}return Number.isInteger(n.y)&&Number.isInteger(n.z)&&(o=o.replace(/\{-y\}/g,String(Math.pow(2,n.z)-n.y-1))),o}function ur({viewport:e,z:t=0,cullRect:n}){return(e.subViewports||[e]).map(e=>function e(t,n,r){if(!Array.isArray(n)){const e=r.x-t.x,i=r.y-t.y,{width:o,height:a}=r,s={targetZ:n},l=t.unproject([e,i],s),u=t.unproject([e+o,i],s),c=t.unproject([e,i+a],s),d=t.unproject([e+o,i+a],s);return[Math.min(l[0],u[0],c[0],d[0]),Math.min(l[1],u[1],c[1],d[1]),Math.max(l[0],u[0],c[0],d[0]),Math.max(l[1],u[1],c[1],d[1])]}const i=e(t,n[0],r),o=e(t,n[1],r);return[Math.min(i[0],o[0]),Math.min(i[1],o[1]),Math.max(i[2],o[2]),Math.max(i[3],o[3])]}(e,t,n))}function cr(e,t){return 512*Math.pow(2,e)/t}function dr(e,t,n){const r=cr(n,512),i=e/r*360-180,o=Math.PI-2*Math.PI*t/r;return[i,180/Math.PI*Math.atan(.5*(Math.exp(o)-Math.exp(-o)))]}function fr(e,t,n,r){const i=cr(n,r);return[e/i*512,t/i*512]}function hr(e,t,n,r,i=512){if(e.isGeospatial){const[e,i]=dr(t,n,r),[o,a]=dr(t+1,n+1,r);return{west:e,north:i,east:o,south:a}}const[o,a]=fr(t,n,r,i),[s,l]=fr(t+1,n+1,r,i);return{left:o,top:a,right:s,bottom:l}}function pr(e,t,n,r,i){const o=function(e,t,n){let r;if(t&&2===t.length){const[n,i]=t,o=e.getBounds({z:n}),a=e.getBounds({z:i});r=[Math.min(o[0],a[0]),Math.min(o[1],a[1]),Math.max(o[2],a[2]),Math.max(o[3],a[3])]}else r=e.getBounds();return e.isGeospatial?[Math.max(r[0],n[0]),Math.max(r[1],n[1]),Math.min(r[2],n[2]),Math.min(r[3],n[3])]:[Math.max(Math.min(r[0],n[2]),n[0]),Math.max(Math.min(r[1],n[3]),n[1]),Math.min(Math.max(r[2],n[0]),n[2]),Math.min(Math.max(r[3],n[1]),n[3])]}(e,null,r),a=cr(t,n),[s,l,u,c]=function(e,t,n){if(n){return sr(e,n).map(e=>e*t/512)}return e.map(e=>e*t/512)}(o,a,i),d=[];for(let e=Math.floor(s);et&&(u=t);let c=i;return a&&s&&i&&!e.isGeospatial&&(c=sr(i,a)),e.isGeospatial?function(e,t,n,r){const i=e instanceof Xe.a&&e.resolution?e.projectPosition:null,o=Object.values(e.getFrustumPlanes()).map(({normal:e,distance:t})=>new Cn(e.clone().negate(),t)),a=new Dn(o),s=e.distanceScales.unitsPerMeter[2],l=n&&n[0]*s||0,u=n&&n[1]*s||0,c=e instanceof Ze.a&&e.pitch<=60?t:0;if(r){const[e,t,n,i]=r,o=Object(Z.lngLatToWorld)([e,i]),a=Object(Z.lngLatToWorld)([n,t]);r=[o[0],512-o[1],a[0],512-a[1]]}const d=new ir(0,0,0),f={viewport:e,project:i,cullingVolume:a,elevationBounds:[l,u],minZ:c,maxZ:t,bounds:r,offset:0};if(d.update(f),e instanceof Ze.a&&e.subViewports&&e.subViewports.length>1){for(f.offset=-1;d.update(f)&&!(--f.offset<-3););for(f.offset=1;d.update(f)&&!(++f.offset>3););}return d.getSelected()}(e,u,r,i):pr(e,u,o,c||or,s)}function gr(e,t){if(e===t)return!0;if(Array.isArray(e)){const n=e.length;if(!t||t.length!==n)return!1;for(let r=0;re.zoom-t.zoom);for(const e of t)if(e.isVisible=Boolean(2&e.state),e.children&&(e.isVisible||1&e.state))for(const t of e.children)t.state=1;else e.isSelected&&_r(e)},never:()=>{}},yr={extent:null,tileSize:512,maxZoom:null,minZoom:null,maxCacheSize:null,maxCacheByteSize:null,refinementStrategy:"best-available",zRange:null,maxRequests:6,zoomOffset:0,onTileLoad:()=>{},onTileUnload:()=>{},onTileError:()=>{}};class vr{constructor(e){Object(i.a)(this,"opts",void 0),Object(i.a)(this,"_requestScheduler",void 0),Object(i.a)(this,"_cache",void 0),Object(i.a)(this,"_dirty",void 0),Object(i.a)(this,"_tiles",void 0),Object(i.a)(this,"_cacheByteSize",void 0),Object(i.a)(this,"_viewport",void 0),Object(i.a)(this,"_zRange",void 0),Object(i.a)(this,"_selectedTiles",void 0),Object(i.a)(this,"_frameNumber",void 0),Object(i.a)(this,"_modelMatrix",void 0),Object(i.a)(this,"_modelMatrixInverse",void 0),Object(i.a)(this,"_maxZoom",void 0),Object(i.a)(this,"_minZoom",void 0),Object(i.a)(this,"onTileLoad",void 0),Object(i.a)(this,"_getCullBounds",function(e){let t,n={};return r=>{for(const i in r)if(!gr(r[i],n[i])){t=e(r),n=r;break}return t}}(ur)),this.opts={...yr,...e},this.onTileLoad=e=>{var t,n;null===(t=(n=this.opts).onTileLoad)||void 0===t||t.call(n,e),this.opts.maxCacheByteSize&&(this._cacheByteSize+=e.byteLength,this._resizeCache())},this._requestScheduler=new _e.a({maxRequests:e.maxRequests,throttleRequests:Boolean(e.maxRequests&&e.maxRequests>0)}),this._cache=new Map,this._tiles=[],this._dirty=!1,this._cacheByteSize=0,this._viewport=null,this._selectedTiles=null,this._frameNumber=0,this._modelMatrix=new Ve,this._modelMatrixInverse=new Ve,this.setOptions(e)}get tiles(){return this._tiles}get selectedTiles(){return this._selectedTiles}get isLoaded(){return null!==this._selectedTiles&&this._selectedTiles.every(e=>e.isLoaded)}get needsReload(){return null!==this._selectedTiles&&this._selectedTiles.some(e=>e.needsReload)}setOptions(e){Object.assign(this.opts,e),Number.isFinite(e.maxZoom)&&(this._maxZoom=Math.floor(e.maxZoom)),Number.isFinite(e.minZoom)&&(this._minZoom=Math.ceil(e.minZoom))}finalize(){for(const e of this._cache.values())e.isLoading&&e.abort();this._cache.clear(),this._tiles=[],this._selectedTiles=null}reloadAll(){for(const e of this._cache.keys()){const t=this._cache.get(e);this._selectedTiles&&this._selectedTiles.includes(t)?t.setNeedsReload():this._cache.delete(e)}}update(e,{zRange:t,modelMatrix:n}={}){const r=new Ve(n),i=!r.equals(this._modelMatrix);if(this._viewport&&e.equals(this._viewport)&&Oe(this._zRange,t)&&!i)this.needsReload&&(this._selectedTiles=this._selectedTiles.map(e=>this._getTile(e.index,!0)));else{i&&(this._modelMatrixInverse=r.clone().invert(),this._modelMatrix=r),this._viewport=e,this._zRange=t;const n=this.getTileIndices({viewport:e,maxZoom:this._maxZoom,minZoom:this._minZoom,zRange:t,modelMatrix:this._modelMatrix,modelMatrixInverse:this._modelMatrixInverse});this._selectedTiles=n.map(e=>this._getTile(e,!0)),this._dirty&&this._rebuildTree()}const o=this.updateTileStates();return this._pruneRequests(),this._dirty&&this._resizeCache(),o&&this._frameNumber++,this._frameNumber}isTileVisible(e,t){if(!e.isVisible)return!1;if(t&&this._viewport){const n=this._getCullBounds({viewport:this._viewport,z:this._zRange,cullRect:t}),{bbox:r}=e;for(const[e,t,i,o]of n){let n;if("west"in r)n=r.weste&&r.southt;else{const a=Math.min(r.top,r.bottom),s=Math.max(r.top,r.bottom);n=r.lefte&&at}if(n)return!0}return!1}return!0}getTileIndices({viewport:e,maxZoom:t,minZoom:n,zRange:r,modelMatrix:i,modelMatrixInverse:o}){const{tileSize:a,extent:s,zoomOffset:l}=this.opts;return Ar({viewport:e,maxZoom:t,minZoom:n,zRange:r,tileSize:a,extent:s,modelMatrix:i,modelMatrixInverse:o,zoomOffset:l})}getTileId(e){return"".concat(e.x,"-").concat(e.y,"-").concat(e.z)}getTileZoom(e){return e.z}getTileMetadata(e){const{tileSize:t}=this.opts;return{bbox:hr(this._viewport,e.x,e.y,e.z,t)}}getParentIndex(e){return{x:Math.floor(e.x/2),y:Math.floor(e.y/2),z:e.z-1}}updateTileStates(){const e=this.opts.refinementStrategy||"best-available",t=new Array(this._cache.size);let n=0;for(const e of this._cache.values())t[n++]=e.isVisible,e.isSelected=!1,e.isVisible=!1;for(const e of this._selectedTiles)e.isSelected=!0,e.isVisible=!0;("function"==typeof e?e:mr[e])(Array.from(this._cache.values())),n=0;for(const e of this._cache.values())if(t[n++]!==e.isVisible)return!0;return!1}_pruneRequests(){const{maxRequests:e=0}=this.opts,t=[];let n=0;for(const e of this._cache.values())e.isLoading&&(n++,e.isSelected||e.isVisible||t.push(e));for(;e>0&&n>e&&t.length>0;){t.shift().abort(),n--}}_rebuildTree(){const{_cache:e}=this;for(const t of e.values())t.parent=null,t.children&&(t.children.length=0);for(const t of e.values()){const e=this._getNearestAncestor(t);t.parent=e,null!=e&&e.children&&e.children.push(t)}}_resizeCache(){const{_cache:e,opts:t}=this,n=t.maxCacheSize||(t.maxCacheByteSize?1/0:5*this.selectedTiles.length),r=t.maxCacheByteSize||1/0;if(e.size>n||this._cacheByteSize>r){for(const[a,s]of e){var i,o;if(!s.isVisible&&!s.isSelected)this._cacheByteSize-=t.maxCacheByteSize?s.byteLength:0,e.delete(a),null===(i=(o=this.opts).onTileUnload)||void 0===i||i.call(o,s);if(e.size<=n&&this._cacheByteSize<=r)break}this._rebuildTree(),this._dirty=!0}this._dirty&&(this._tiles=Array.from(this._cache.values()).sort((e,t)=>e.zoom-t.zoom),this._dirty=!1)}_getTile(e,t){const n=this.getTileId(e);let r=this._cache.get(n),i=!1;return!r&&t?(r=new qe(e),Object.assign(r,this.getTileMetadata(r.index)),Object.assign(r,{id:n,zoom:this.getTileZoom(r.index)}),i=!0,this._cache.set(n,r),this._dirty=!0):r&&r.needsReload&&(i=!0),r&&i&&r.loadData({getData:this.opts.getTileData,requestScheduler:this._requestScheduler,onLoad:this.onTileLoad,onError:this.opts.onTileError}),r}_getNearestAncestor(e){const{_minZoom:t=0}=this;let n=e.index;for(;this.getTileZoom(n)>t;){n=this.getParentIndex(n);const e=this._getTile(n);if(e)return e}return null}}function br(e){let t=e;for(;t;){if(t.isLoaded||t.content)return t.state|=2,!0;t=t.parent}return!1}function _r(e){for(const t of e.children)t.isLoaded||t.content?t.state|=2:_r(t)}const wr={TilesetClass:vr,data:{type:"data",value:[]},dataComparator:ar.equal,renderSubLayers:{type:"function",value:e=>new be.a(e)},getTileData:{type:"function",optional:!0,value:null},onViewportLoad:{type:"function",optional:!0,value:null},onTileLoad:{type:"function",value:e=>{}},onTileUnload:{type:"function",value:e=>{}},onTileError:{type:"function",value:e=>console.error(e)},extent:{type:"array",optional:!0,value:null,compare:!0},tileSize:512,maxZoom:null,minZoom:0,maxCacheSize:null,maxCacheByteSize:null,refinementStrategy:"best-available",zRange:null,maxRequests:6,zoomOffset:0};class xr extends o.a{initializeState(){this.state={tileset:null,isLoaded:!1}}finalizeState(){var e,t;null===(e=this.state)||void 0===e||null===(t=e.tileset)||void 0===t||t.finalize()}get isLoaded(){var e,t,n;return null===(e=this.state)||void 0===e||null===(t=e.tileset)||void 0===t||null===(n=t.selectedTiles)||void 0===n?void 0:n.every(e=>e.isLoaded&&e.layers&&e.layers.every(e=>e.isLoaded))}shouldUpdateState({changeFlags:e}){return e.somethingChanged}updateState({changeFlags:e}){let{tileset:t}=this.state;const n=e.propsOrDataChanged||e.updateTriggersChanged,r=e.dataChanged||e.updateTriggersChanged&&(e.updateTriggersChanged.all||e.updateTriggersChanged.getTileData);t?n&&(t.setOptions(this._getTilesetOptions()),r?t.reloadAll():this.state.tileset.tiles.forEach(e=>{e.layers=null})):(t=new this.props.TilesetClass(this._getTilesetOptions()),this.setState({tileset:t})),this._updateTileset()}_getTilesetOptions(){const{tileSize:e,maxCacheSize:t,maxCacheByteSize:n,refinementStrategy:r,extent:i,maxZoom:o,minZoom:a,maxRequests:s,zoomOffset:l}=this.props;return{maxCacheSize:t,maxCacheByteSize:n,maxZoom:o,minZoom:a,tileSize:e,refinementStrategy:r,extent:i,maxRequests:s,zoomOffset:l,getTileData:this.getTileData.bind(this),onTileLoad:this._onTileLoad.bind(this),onTileError:this._onTileError.bind(this),onTileUnload:this._onTileUnload.bind(this)}}_updateTileset(){const{tileset:e}=this.state,{zRange:t,modelMatrix:n}=this.props,r=e.update(this.context.viewport,{zRange:t,modelMatrix:n}),{isLoaded:i}=e,o=this.state.isLoaded!==i,a=this.state.frameNumber!==r;i&&(o||a)&&this._onViewportLoad(),a&&this.setState({frameNumber:r}),this.state.isLoaded=i}_onViewportLoad(){const{tileset:e}=this.state,{onViewportLoad:t}=this.props;t&&t(e.selectedTiles)}_onTileLoad(e){this.props.onTileLoad(e),e.layers=null,this.setNeedsUpdate()}_onTileError(e,t){this.props.onTileError(e),t.layers=null,this.setNeedsUpdate()}_onTileUnload(e){this.props.onTileUnload(e)}getTileData(e){const{data:t,getTileData:n,fetch:r}=this.props,{signal:i}=e;return e.url="string"==typeof t||Array.isArray(t)?lr(t,e):null,n?n(e):r&&e.url?r(e.url,{propName:"data",layer:this,signal:i}):null}renderSubLayers(e){return this.props.renderSubLayers(e)}getSubLayerPropsByTile(e){return null}getPickingInfo({info:e,sourceLayer:t}){const n=t.props.tile;return e.picked&&(e.tile=n),e.sourceTile=n,e}_updateAutoHighlight(e){const t=e.sourceTile;if(t&&t.layers)for(const n of t.layers)n.updateAutoHighlight(e)}renderLayers(){return this.state.tileset.tiles.map(e=>{const t=this.getSubLayerPropsByTile(e);if(e.isLoaded||e.content)if(e.layers)t&&e.layers[0]&&Object.keys(t).some(n=>e.layers[0].props[n]!==t[n])&&(e.layers=e.layers.map(e=>e.clone(t)));else{const n=this.renderSubLayers({...this.props,...this.getSubLayerProps({id:e.id,updateTriggers:this.props.updateTriggers}),data:e.content,_offset:0,tile:e});e.layers=Object(ve.b)(n,Boolean).map(n=>n.clone({tile:e,...t}))}else;return e.layers})}filterSubLayer({layer:e,cullRect:t}){const{tile:n}=e.props;return this.state.tileset.isTileVisible(n,t)}}Object(i.a)(xr,"defaultProps",wr),Object(i.a)(xr,"layerName","TileLayer");var Mr=n(360);class Er extends Mr.a{getShaders(){const e=super.getShaders();return e.inject={"vs:#decl":"uniform float trailLength;\nattribute float instanceTimestamps;\nattribute float instanceNextTimestamps;\nvarying float vTime;\n","vs:#main-end":"vTime = instanceTimestamps + (instanceNextTimestamps - instanceTimestamps) * vPathPosition.y / vPathLength;\n","fs:#decl":"uniform bool fadeTrail;\nuniform float trailLength;\nuniform float currentTime;\nvarying float vTime;\n","fs:#main-start":"if(vTime > currentTime || (fadeTrail && (vTime < currentTime - trailLength))) {\n discard;\n}\n","fs:DECKGL_FILTER_COLOR":"if(fadeTrail) {\n color.a *= 1.0 - (currentTime - vTime) / trailLength;\n}\n"},e}initializeState(){super.initializeState();this.getAttributeManager().addInstanced({timestamps:{size:1,accessor:"getTimestamps",shaderAttributes:{instanceTimestamps:{vertexOffset:0},instanceNextTimestamps:{vertexOffset:1}}}})}draw(e){const{fadeTrail:t,trailLength:n,currentTime:r}=this.props;e.uniforms={...e.uniforms,fadeTrail:t,trailLength:n,currentTime:r},super.draw(e)}}Object(i.a)(Er,"layerName","TripsLayer"),Object(i.a)(Er,"defaultProps",{fadeTrail:!0,trailLength:{type:"number",value:120,min:0},currentTime:{type:"number",value:0,min:0},getTimestamps:{type:"accessor",value:e=>e.timestamps}});var Or=n(164),Sr=n(150),Tr=n(524);function Cr(e,t){t=void 0===t?e[0][0]:t;for(const n of e){const e=n[0]-t;e>180?n[0]-=360:e<-180&&(n[0]+=360)}}function Lr(e,t,n){const r=e(t,n),[i,o]=Object(Or.h3ToGeo)(r);return[o,i]}function Pr(e,t=1){const n=Object(Or.h3ToGeoBoundary)(e,!0);return 1!==t?function(e,t,n){const[r,i]=Object(Or.h3ToGeo)(e),o=t.length;Cr(t,i);const a=t[0]===t[o-1]?o-1:o;for(let e=0;ee.hexagon},extruded:!0};class Dr extends o.a{constructor(...e){super(...e),Object(i.a)(this,"state",void 0)}initializeState(){Dr._checkH3Lib(),this.state={edgeLengthKM:0,resolution:-1}}shouldUpdateState({changeFlags:e}){return this._shouldUseHighPrecision()?e.propsOrDataChanged:e.somethingChanged}updateState({props:e,changeFlags:t}){if(!0!==e.highPrecision&&(t.dataChanged||t.updateTriggersChanged&&t.updateTriggersChanged.getHexagon)){const e=this._calculateH3DataProps();this.setState(e)}this._updateVertices(this.context.viewport)}_calculateH3DataProps(){let e=-1,t=!1,n=!1;const{iterable:r,objectInfo:i}=Object(Sr.a)(this.props.data);for(const o of r){i.index++;const r=this.props.getHexagon(o,i),a=Object(Or.h3GetResolution)(r);if(e<0){if(e=a,!this.props.highPrecision)break}else if(e!==a){n=!0;break}if(Object(Or.h3IsPentagon)(r)){t=!0;break}}return{resolution:e,edgeLengthKM:e>=0?Object(Or.edgeLength)(e,"km"):0,hasMultipleRes:n,hasPentagon:t}}_shouldUseHighPrecision(){if("auto"===this.props.highPrecision){const{resolution:e,hasPentagon:t,hasMultipleRes:n}=this.state,{viewport:r}=this.context;return Boolean(null==r?void 0:r.resolution)||n||t||e>=0&&e<=5}return this.props.highPrecision}_updateVertices(e){if(this._shouldUseHighPrecision())return;const{resolution:t,edgeLengthKM:n,centerHex:r}=this.state;if(t<0)return;const i=this.props.centerHexagon||Object(Or.geoToH3)(e.latitude,e.longitude,t);if(r===i)return;if(r){const e=Object(Or.h3Distance)(r,i);if(e>=0&&e*n<10)return}const{unitsPerMeter:o}=e.distanceScales;let a=Pr(i);const[s,l]=Object(Or.h3ToGeo)(i),[u,c]=e.projectFlat([l,s]);a=a.map(t=>{const n=e.projectFlat(t);return[(n[0]-u)/o[0],(n[1]-c)/o[1]]}),this.setState({centerHex:i,vertices:a})}renderLayers(){return this._shouldUseHighPrecision()?this._renderPolygonLayer():this._renderColumnLayer()}_getForwardProps(){const{elevationScale:e,material:t,coverage:n,extruded:r,wireframe:i,stroked:o,filled:a,lineWidthUnits:s,lineWidthScale:l,lineWidthMinPixels:u,lineWidthMaxPixels:c,getFillColor:d,getElevation:f,getLineColor:h,getLineWidth:p,transitions:A,updateTriggers:g}=this.props;return{elevationScale:e,extruded:r,coverage:n,wireframe:i,stroked:o,filled:a,lineWidthUnits:s,lineWidthScale:l,lineWidthMinPixels:u,lineWidthMaxPixels:c,material:t,getElevation:f,getFillColor:d,getLineColor:h,getLineWidth:p,transitions:A,updateTriggers:{getFillColor:g.getFillColor,getElevation:g.getElevation,getLineColor:g.getLineColor,getLineWidth:g.getLineWidth}}}_renderPolygonLayer(){const{data:e,getHexagon:t,updateTriggers:n,coverage:r}=this.props,i=this.getSubLayerClass("hexagon-cell-hifi",ne.a),o=this._getForwardProps();return o.updateTriggers.getPolygon=function(e,t){let n;return n=null==e?t:"object"==typeof e?{...e,coverage:t}:{getHexagon:e,coverage:t},n}(n.getHexagon,r),new i(o,this.getSubLayerProps({id:"hexagon-cell-hifi",updateTriggers:o.updateTriggers}),{data:e,_normalize:!1,_windingOrder:"CCW",positionFormat:"XY",getPolygon:(e,n)=>function(e){const t=new Float64Array(2*e.length);let n=0;for(const r of e)t[n++]=r[0],t[n++]=r[1];return t}(Pr(t(e,n),r))})}_renderColumnLayer(){const{data:e,getHexagon:t,updateTriggers:n}=this.props,r=this.getSubLayerClass("hexagon-cell",Tr.a),i=this._getForwardProps();return i.updateTriggers.getPosition=n.getHexagon,new r(i,this.getSubLayerProps({id:"hexagon-cell",flatShading:!0,updateTriggers:i.updateTriggers}),{data:e,diskResolution:6,radius:1,vertices:this.state.vertices,getPosition:Lr.bind(null,t)})}}Object(i.a)(Dr,"defaultProps",Ir),Object(i.a)(Dr,"layerName","H3HexagonLayer"),Object(i.a)(Dr,"_checkH3Lib",()=>{});class kr extends ie{initializeState(){Dr._checkH3Lib()}updateState({props:e,changeFlags:t}){if(t.dataChanged||t.updateTriggersChanged&&t.updateTriggersChanged.getHexagons){const{data:t,getHexagons:n}=e,r=[],{iterable:i,objectInfo:o}=Object(Sr.a)(t);for(const e of i){o.index++;const t=n(e,o),i=Object(Or.h3SetToMultiPolygon)(t,!0);for(const t of i)r.push(this.getSubLayerRow({polygon:t},e,o.index))}this.setState({polygons:r})}}indexToBounds(){const{getElevation:e,getFillColor:t,getLineColor:n,getLineWidth:r}=this.props;return{data:this.state.polygons,getPolygon:e=>e.polygon,getElevation:this.getSubLayerAccessor(e),getFillColor:this.getSubLayerAccessor(t),getLineColor:this.getSubLayerAccessor(n),getLineWidth:this.getSubLayerAccessor(r)}}}Object(i.a)(kr,"layerName","H3ClusterLayer"),Object(i.a)(kr,"defaultProps",{getHexagons:{type:"accessor",value:e=>e.hexagons}});var Rr=n(175),jr=n(54),Fr=n(1135),Nr=n(1127),Br=n(1153),zr=n(1138),Ur=n(551),Hr=n(1136);class Vr extends Hr.a{getShaders(){const e=super.getShaders();return e.modules.push(zr.a),{...e,vs:"#version 300 es\n#define SHADER_NAME simple-mesh-layer-vs\nuniform float sizeScale;\nuniform bool composeModelMatrix;\nuniform bool pickFeatureIds;\nin vec3 positions;\nin vec3 normals;\nin vec3 colors;\nin vec2 texCoords;\nin vec4 uvRegions;\nin vec3 featureIdsPickingColors;\nin vec4 instanceColors;\nin vec3 instancePickingColors;\nin mat3 instanceModelMatrix;\nout vec2 vTexCoord;\nout vec3 cameraPosition;\nout vec3 normals_commonspace;\nout vec4 position_commonspace;\nout vec4 vColor;\n\nvec2 applyUVRegion(vec2 uv) {\n #ifdef HAS_UV_REGIONS\n return fract(uv) * (uvRegions.zw - uvRegions.xy) + uvRegions.xy;\n #else\n return uv;\n #endif\n}\n\nvoid main(void) {\n vec2 uv = applyUVRegion(texCoords);\n geometry.uv = uv;\n\n if (pickFeatureIds) {\n geometry.pickingColor = featureIdsPickingColors;\n } else {\n geometry.pickingColor = instancePickingColors;\n }\n\n vTexCoord = uv;\n cameraPosition = project_uCameraPosition;\n vColor = vec4(colors * instanceColors.rgb, instanceColors.a);\n\n vec3 pos = (instanceModelMatrix * positions) * sizeScale;\n vec3 projectedPosition = project_position(positions);\n position_commonspace = vec4(projectedPosition, 1.0);\n gl_Position = project_common_position_to_clipspace(position_commonspace);\n\n geometry.position = position_commonspace;\n normals_commonspace = project_normal(instanceModelMatrix * normals);\n geometry.normal = normals_commonspace;\n\n DECKGL_FILTER_GL_POSITION(gl_Position, geometry);\n\n #ifdef MODULE_PBR\n pbr_vPosition = geometry.position.xyz;\n #ifdef HAS_NORMALS\n pbr_vNormal = geometry.normal;\n #endif\n\n #ifdef HAS_UV\n pbr_vUV = uv;\n #else\n pbr_vUV = vec2(0., 0.);\n #endif\n geometry.uv = pbr_vUV;\n #endif\n\n DECKGL_FILTER_COLOR(vColor, geometry);\n}\n",fs:"#version 300 es\n#define SHADER_NAME simple-mesh-layer-fs\n\nprecision highp float;\n\nuniform bool hasTexture;\nuniform sampler2D sampler;\nuniform bool flatShading;\nuniform float opacity;\n\nin vec2 vTexCoord;\nin vec3 cameraPosition;\nin vec3 normals_commonspace;\nin vec4 position_commonspace;\nin vec4 vColor;\n\nout vec4 fragColor;\n\nvoid main(void) {\n \n#ifdef MODULE_PBR\n\n fragColor = vColor * pbr_filterColor(vec4(0));\n geometry.uv = pbr_vUV;\n fragColor.a *= opacity;\n\n#else\n\n geometry.uv = vTexCoord;\n\n vec3 normal;\n if (flatShading) {\n#ifdef DERIVATIVES_AVAILABLE\n normal = normalize(cross(dFdx(position_commonspace.xyz), dFdy(position_commonspace.xyz)));\n#else\n normal = vec3(0.0, 0.0, 1.0);\n#endif\n } else {\n normal = normals_commonspace;\n }\n\n vec4 color = hasTexture ? texture(sampler, vTexCoord) : vColor;\n vec3 lightColor = lighting_getLightColor(color.rgb, cameraPosition, position_commonspace.xyz, normal);\n fragColor = vec4(lightColor, color.a * opacity);\n\n#endif\n\n DECKGL_FILTER_COLOR(fragColor, geometry);\n}\n"}}initializeState(){const{featureIds:e}=this.props;super.initializeState();const t=this.getAttributeManager();e&&t.add({featureIdsPickingColors:{type:5121,size:3,noAlloc:!0,update:this.calculateFeatureIdsPickingColors}})}updateState(e){super.updateState(e);const{props:t,oldProps:n}=e;t.pbrMaterial!==n.pbrMaterial&&this.updatePbrMaterialUniforms(t.pbrMaterial)}draw(e){const{featureIds:t}=this.props;this.state.model&&(this.state.model.setUniforms({u_Camera:this.state.model.getUniforms().project_uCameraPosition,pickFeatureIds:Boolean(t)}),super.draw(e))}getModel(e){const{id:t,pbrMaterial:n}=this.props,r=this.parseMaterial(n,e);this.setState({materialParser:r});const i=this.getShaders();var o;(o=e.attributes).COLOR_0||o.colors||(o.colors={constant:!0,value:new Float32Array([1,1,1])});return new Ur.a(this.context.gl,{...this.getShaders(),id:t,geometry:e,defines:{...i.defines,...null==r?void 0:r.defines,HAS_UV_REGIONS:e.attributes.uvRegions},parameters:null==r?void 0:r.parameters,isInstanced:!0})}updatePbrMaterialUniforms(e){const{model:t}=this.state;if(t){const{mesh:n}=this.props,r=this.parseMaterial(e,n);this.setState({materialParser:r}),t.setUniforms(r.uniforms)}}parseMaterial(e,t){var n;const r=Boolean(e.pbrMetallicRoughness&&e.pbrMetallicRoughness.baseColorTexture);return null===(n=this.state.materialParser)||void 0===n||n.delete(),new Br.a(this.context.gl,{attributes:{NORMAL:t.attributes.normals,TEXCOORD_0:t.attributes.texCoords},material:{unlit:r,...e},pbrDebug:!1,imageBasedLightingEnvironment:null,lights:!0,useTangents:!1})}calculateFeatureIdsPickingColors(e){const t=this.props.featureIds,n=new Uint8ClampedArray(t.length*e.size),r=[];for(let e=0;ee,ei=new Wr.a;function ti(e,t,n=$r){return Object(Qr.f)(e)?(t[0]=n(e[0]),t[1]=n(e[1]),t[2]=e[2]):"longitude"in e?(t[0]=n(e.longitude),t[1]=n(e.latitude),t[2]=e.height):(t[0]=n(e.x),t[1]=n(e.y),t[2]=e.z),t}function ni(e,t,n=$r){return Object(Qr.f)(t)?(t[0]=n(e[0]),t[1]=n(e[1]),t[2]=e[2]):"longitude"in t?(t.longitude=n(e[0]),t.latitude=n(e[1]),t.height=e[2]):(t.x=n(e[0]),t.y=n(e[1]),t.z=e[2]),t}const ri=new Wr.a,ii=new Wr.a,oi=new Wr.a;const ai=new Wr.a,si={up:{south:"east",north:"west",west:"south",east:"north"},down:{south:"west",north:"east",west:"north",east:"south"},south:{up:"west",down:"east",west:"down",east:"up"},north:{up:"east",down:"west",west:"up",east:"down"},west:{up:"north",down:"south",north:"down",south:"up"},east:{up:"south",down:"north",north:"up",south:"down"}},li={north:[-1,0,0],east:[0,1,0],up:[0,0,1],south:[1,0,0],west:[0,-1,0],down:[0,0,-1]},ui={east:new Wr.a,north:new Wr.a,up:new Wr.a,west:new Wr.a,south:new Wr.a,down:new Wr.a},ci=new Wr.a,di=new Wr.a,fi=new Wr.a;function hi(e,t,n,r,i,o){const a=si[t]&&si[t][n];let s,l,u;Object(qr.a)(a&&(!r||r===a));const c=ai.copy(i);if(Object(Qr.d)(c.x,0,1e-14)&&Object(Qr.d)(c.y,0,1e-14)){const e=Math.sign(c.z);s=ci.fromArray(li[t]),"east"!==t&&"west"!==t&&s.scale(e),l=di.fromArray(li[n]),"east"!==n&&"west"!==n&&l.scale(e),u=fi.fromArray(li[r]),"east"!==r&&"west"!==r&&u.scale(e)}else{const{up:i,east:o,north:a}=ui;o.set(-c.y,c.x,0).normalize(),e.geodeticSurfaceNormal(c,i),a.copy(i).cross(o);const{down:d,west:f,south:h}=ui;d.copy(i).scale(-1),f.copy(o).scale(-1),h.copy(a).scale(-1),s=ui[t],l=ui[n],u=ui[r]}return o[0]=s.x,o[1]=s.y,o[2]=s.z,o[3]=0,o[4]=l.x,o[5]=l.y,o[6]=l.z,o[7]=0,o[8]=u.x,o[9]=u.y,o[10]=u.z,o[11]=0,o[12]=c.x,o[13]=c.y,o[14]=c.z,o[15]=1,o}const pi=new Wr.a,Ai=new Wr.a,gi=new Wr.a,mi=new Wr.a,yi=new Wr.a,vi=new Wr.a;let bi;class _i{static get WGS84(){return bi=bi||new _i(6378137,6378137,6356752.314245179),bi}constructor(e=0,t=0,n=0){Object(qr.a)(e>=0),Object(qr.a)(t>=0),Object(qr.a)(n>=0),this.radii=new Wr.a(e,t,n),this.radiiSquared=new Wr.a(e*e,t*t,n*n),this.radiiToTheFourth=new Wr.a(e*e*e*e,t*t*t*t,n*n*n*n),this.oneOverRadii=new Wr.a(0===e?0:1/e,0===t?0:1/t,0===n?0:1/n),this.oneOverRadiiSquared=new Wr.a(0===e?0:1/(e*e),0===t?0:1/(t*t),0===n?0:1/(n*n)),this.minimumRadius=Math.min(e,t,n),this.maximumRadius=Math.max(e,t,n),this.centerToleranceSquared=Xr,0!==this.radiiSquared.z&&(this.squaredXOverSquaredZ=this.radiiSquared.x/this.radiiSquared.z),Object.freeze(this)}equals(e){return this===e||Boolean(e&&this.radii.equals(e.radii))}toString(){return this.radii.toString()}cartographicToCartesian(e,t=[0,0,0]){const n=Ai,r=gi,[,,i]=e;this.geodeticSurfaceNormalCartographic(e,n),r.copy(this.radiiSquared).scale(n);const o=Math.sqrt(n.dot(r));return r.scale(1/o),n.scale(i),r.add(n),r.to(t)}cartesianToCartographic(e,t=[0,0,0]){vi.from(e);const n=this.scaleToGeodeticSurface(vi,mi);if(!n)return;const r=this.geodeticSurfaceNormal(n,Ai),i=yi;i.copy(vi).subtract(n);const o=Math.atan2(r.y,r.x),a=Math.asin(r.z),s=Math.sign(Jr.f(i,vi))*Jr.i(i);return ni([o,a,s],t,Qr.b._cartographicRadians?$r:Qr.g)}eastNorthUpToFixedFrame(e,t=new Yr.a){return hi(this,"east","north","up",e,t)}localFrameToFixedFrame(e,t,n,r,i=new Yr.a){return hi(this,e,t,n,r,i)}geocentricSurfaceNormal(e,t=[0,0,0]){return pi.from(e).normalize().to(t)}geodeticSurfaceNormalCartographic(e,t=[0,0,0]){const n=function(e,t=ei){return ti(e,t,Qr.b._cartographicRadians?$r:Qr.h)}(e),r=n[0],i=n[1],o=Math.cos(i);return pi.set(o*Math.cos(r),o*Math.sin(r),Math.sin(i)).normalize(),pi.to(t)}geodeticSurfaceNormal(e,t=[0,0,0]){return pi.from(e).scale(this.oneOverRadiiSquared).normalize().to(t)}scaleToGeodeticSurface(e,t){return function(e,t,n=new Wr.a){const{oneOverRadii:r,oneOverRadiiSquared:i,centerToleranceSquared:o}=t;ri.from(e);const a=e.x,s=e.y,l=e.z,u=r.x,c=r.y,d=r.z,f=a*a*u*u,h=s*s*c*c,p=l*l*d*d,A=f+h+p,g=Math.sqrt(1/A);if(!Number.isFinite(g))return;const m=ii;if(m.copy(e).scale(g),AZr);return ri.scale([w,x,M]).to(n)}(e,this,t)}scaleToGeocentricSurface(e,t=[0,0,0]){mi.from(e);const n=mi.x,r=mi.y,i=mi.z,o=this.oneOverRadiiSquared,a=1/Math.sqrt(n*n*o.x+r*r*o.y+i*i*o.z);return mi.multiplyScalar(a).to(t)}transformPositionToScaledSpace(e,t=[0,0,0]){return mi.from(e).scale(this.oneOverRadii).to(t)}transformPositionFromScaledSpace(e,t=[0,0,0]){return mi.from(e).scale(this.radii).to(t)}getSurfaceNormalIntersectionWithZAxis(e,t=0,n=[0,0,0]){Object(qr.a)(Object(Qr.d)(this.radii.x,this.radii.y,Kr)),Object(qr.a)(this.radii.z>0),mi.from(e);const r=mi.z*(1-this.squaredXOverSquaredZ);if(!(Math.abs(r)>=this.radii.z-t))return mi.set(0,0,r).to(n)}}var wi=n(423);class xi{constructor(e,t){this.name=void 0,this.type=void 0,this.sampleSize=1,this.time=0,this.count=0,this.samples=0,this.lastTiming=0,this.lastSampleTime=0,this.lastSampleCount=0,this._count=0,this._time=0,this._samples=0,this._startTime=0,this._timerPending=!1,this.name=e,this.type=t,this.reset()}reset(){return this.time=0,this.count=0,this.samples=0,this.lastTiming=0,this.lastSampleTime=0,this.lastSampleCount=0,this._count=0,this._time=0,this._samples=0,this._startTime=0,this._timerPending=!1,this}setSampleSize(e){return this.sampleSize=e,this}incrementCount(){return this.addCount(1),this}decrementCount(){return this.subtractCount(1),this}addCount(e){return this._count+=e,this._samples++,this._checkSampling(),this}subtractCount(e){return this._count-=e,this._samples++,this._checkSampling(),this}addTime(e){return this._time+=e,this.lastTiming=e,this._samples++,this._checkSampling(),this}timeStart(){return this._startTime=Object(wi.a)(),this._timerPending=!0,this}timeEnd(){return this._timerPending?(this.addTime(Object(wi.a)()-this._startTime),this._timerPending=!1,this._checkSampling(),this):this}getSampleAverageCount(){return this.sampleSize>0?this.lastSampleCount/this.sampleSize:0}getSampleAverageTime(){return this.sampleSize>0?this.lastSampleTime/this.sampleSize:0}getSampleHz(){return this.lastSampleTime>0?this.sampleSize/(this.lastSampleTime/1e3):0}getAverageCount(){return this.samples>0?this.count/this.samples:0}getAverageTime(){return this.samples>0?this.time/this.samples:0}getHz(){return this.time>0?this.samples/(this.time/1e3):0}_checkSampling(){this._samples===this.sampleSize&&(this.lastSampleTime=this._time,this.lastSampleCount=this._count,this.count+=this._count,this.time+=this._time,this.samples+=this._samples,this._time=0,this._count=0,this._samples=0)}}class Mi{constructor(e){this.id=void 0,this.stats={},this.id=e.id,this.stats={},this._initializeStats(e.stats),Object.seal(this)}get(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"count";return this._getOrCreate({name:e,type:t})}get size(){return Object.keys(this.stats).length}reset(){for(const e of Object.values(this.stats))e.reset();return this}forEach(e){for(const t of Object.values(this.stats))e(t)}getTable(){const e={};return this.forEach(t=>{e[t.name]={time:t.time||0,count:t.count||0,average:t.getAverageTime()||0,hz:t.getHz()||0}}),e}_initializeStats(){(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).forEach(e=>this._getOrCreate(e))}_getOrCreate(e){const{name:t,type:n}=e;let r=this.stats[t];return r||(r=e instanceof xi?e:new xi(t,n),this.stats[t]=r),r}}var Ei=n(46);class Oi{constructor(e,t,n){Object(i.a)(this,"item",void 0),Object(i.a)(this,"previous",void 0),Object(i.a)(this,"next",void 0),this.item=e,this.previous=t,this.next=n}}class Si{constructor(){Object(i.a)(this,"head",null),Object(i.a)(this,"tail",null),Object(i.a)(this,"_length",0)}get length(){return this._length}add(e){const t=new Oi(e,this.tail,null);return this.tail?(this.tail.next=t,this.tail=t):(this.head=t,this.tail=t),++this._length,t}remove(e){e&&(e.previous&&e.next?(e.previous.next=e.next,e.next.previous=e.previous):e.previous?(e.previous.next=null,this.tail=e.previous):e.next?(e.next.previous=null,this.head=e.next):(this.head=null,this.tail=null),e.next=null,e.previous=null,--this._length)}splice(e,t){e!==t&&(this.remove(t),this._insert(e,t))}_insert(e,t){const n=e.next;e.next=t,this.tail===e?this.tail=t:n.previous=t,t.next=n,t.previous=e,++this._length}}class Ti{constructor(){Object(i.a)(this,"_list",void 0),Object(i.a)(this,"_sentinel",void 0),Object(i.a)(this,"_trimTiles",void 0),this._list=new Si,this._sentinel=this._list.add("sentinel"),this._trimTiles=!1}reset(){this._list.splice(this._list.tail,this._sentinel)}touch(e){const t=e._cacheNode;t&&this._list.splice(this._sentinel,t)}add(e,t,n){t._cacheNode||(t._cacheNode=this._list.add(t),n&&n(e,t))}unloadTile(e,t,n){const r=t._cacheNode;r&&(this._list.remove(r),t._cacheNode=null,n&&n(e,t))}unloadTiles(e,t){const n=this._trimTiles;this._trimTiles=!1;const r=this._list,i=1024*e.maximumMemoryUsage*1024,o=this._sentinel;let a=r.head;for(;a!==o&&(e.gpuMemoryUsageInBytes>i||n);){const n=a.item;a=a.next,this.unloadTile(e,n,t)}}trim(){this._trimTiles=!0}}var Ci=n(212);const Li=Object.freeze({OUTSIDE:-1,INTERSECTING:0,INSIDE:1});new Wr.a,new Wr.a;var Pi=n(34);const Ii=new Wr.a,Di=new Wr.a;class ki{constructor(e=[0,0,0],t=0){this.radius=-0,this.center=new Wr.a,this.fromCenterRadius(e,t)}fromCenterRadius(e,t){return this.center.from(e),this.radius=t,this}fromCornerPoints(e,t){return t=Ii.from(t),this.center=(new Wr.a).from(e).add(t).scale(.5),this.radius=this.center.distance(t),this}equals(e){return this===e||Boolean(e)&&this.center.equals(e.center)&&this.radius===e.radius}clone(){return new ki(this.center,this.radius)}union(e){const t=this.center,n=this.radius,r=e.center,i=e.radius,o=Ii.copy(r).subtract(t),a=o.magnitude();if(n>=a+i)return this.clone();if(i>=a+n)return e.clone();const s=.5*(n+a+i);return Di.copy(o).scale((-n+s)/a).add(t),this.center.copy(Di),this.radius=s,this}expand(e){const t=(e=Ii.from(e)).subtract(this.center).magnitude();return t>this.radius&&(this.radius=t),this}transform(e){this.center.transform(e);const t=Pi.e(Ii,e);return this.radius=Math.max(t[0],Math.max(t[1],t[2]))*this.radius,this}distanceSquaredTo(e){return(e=Ii.from(e)).subtract(this.center).lengthSquared()-this.radius*this.radius}distanceTo(e){return Math.sqrt(this.distanceSquaredTo(e))}intersectPlane(e){const t=this.center,n=this.radius,r=e.normal.dot(t)+e.distance;return r<-n?Li.OUTSIDE:r=s?Li.INSIDE:Li.INTERSECTING}distanceTo(e){return Math.sqrt(this.distanceSquaredTo(e))}distanceSquaredTo(e){const t=qi.from(e).subtract(this.center),n=this.halfAxes,r=n.getColumn(0,Xi),i=n.getColumn(1,Zi),o=n.getColumn(2,Ki),a=r.magnitude(),s=i.magnitude(),l=o.magnitude();r.normalize(),i.normalize(),o.normalize();let u,c=0;return u=Math.abs(t.dot(r))-a,u>0&&(c+=u*u),u=Math.abs(t.dot(i))-s,u>0&&(c+=u*u),u=Math.abs(t.dot(o))-l,u>0&&(c+=u*u),c}computePlaneDistances(e,t,n=[-0,-0]){let r=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY;const o=this.center,a=this.halfAxes,s=a.getColumn(0,Xi),l=a.getColumn(1,Zi),u=a.getColumn(2,Ki),c=Qi.copy(s).add(l).add(u).add(o),d=Ji.copy(c).subtract(e);let f=t.dot(d);return r=Math.min(f,r),i=Math.max(f,i),c.copy(o).add(s).add(l).subtract(u),d.copy(c).subtract(e),f=t.dot(d),r=Math.min(f,r),i=Math.max(f,i),c.copy(o).add(s).subtract(l).add(u),d.copy(c).subtract(e),f=t.dot(d),r=Math.min(f,r),i=Math.max(f,i),c.copy(o).add(s).subtract(l).subtract(u),d.copy(c).subtract(e),f=t.dot(d),r=Math.min(f,r),i=Math.max(f,i),o.copy(c).subtract(s).add(l).add(u),d.copy(c).subtract(e),f=t.dot(d),r=Math.min(f,r),i=Math.max(f,i),o.copy(c).subtract(s).add(l).subtract(u),d.copy(c).subtract(e),f=t.dot(d),r=Math.min(f,r),i=Math.max(f,i),o.copy(c).subtract(s).subtract(l).add(u),d.copy(c).subtract(e),f=t.dot(d),r=Math.min(f,r),i=Math.max(f,i),o.copy(c).subtract(s).subtract(l).subtract(u),d.copy(c).subtract(e),f=t.dot(d),r=Math.min(f,r),i=Math.max(f,i),n[0]=r,n[1]=i,n}transform(e){this.center.transformAsPoint(e);const t=this.halfAxes.getColumn(0,Xi);t.transformAsPoint(e);const n=this.halfAxes.getColumn(1,Zi);n.transformAsPoint(e);const r=this.halfAxes.getColumn(2,Ki);return r.transformAsPoint(e),this.halfAxes=new Gi([...t,...n,...r]),this}getTransform(){throw new Error("not implemented")}}const uo=new Wr.a,co=new Wr.a;class fo{constructor(e=[0,0,1],t=0){this.normal=new Wr.a,this.distance=-0,this.fromNormalDistance(e,t)}fromNormalDistance(e,t){return Object(qr.a)(Number.isFinite(t)),this.normal.from(e).normalize(),this.distance=t,this}fromPointNormal(e,t){e=uo.from(e),this.normal.from(t).normalize();const n=-this.normal.dot(e);return this.distance=n,this}fromCoefficients(e,t,n,r){return this.normal.set(e,t,n),Object(qr.a)(Object(Qr.d)(this.normal.len(),1)),this.distance=r,this}clone(e){return new fo(this.normal,this.distance)}equals(e){return Object(Qr.d)(this.distance,e.distance)&&Object(Qr.d)(this.normal,e.normal)}getPointDistance(e){return this.normal.dot(e)+this.distance}transform(e){const t=co.copy(this.normal).transformAsVector(e).normalize(),n=this.normal.scale(-this.distance).transform(e);return this.fromPointNormal(n,t)}projectPointOntoPlane(e,t=[0,0,0]){e=uo.from(e);const n=this.getPointDistance(e),r=co.copy(this.normal).scale(n);return e.subtract(r).to(t)}}const ho=[new Wr.a([1,0,0]),new Wr.a([0,1,0]),new Wr.a([0,0,1])],po=new Wr.a,Ao=new Wr.a;new fo(new Wr.a(1,0,0),0);class go{static get MASK_OUTSIDE(){return 4294967295}static get MASK_INSIDE(){return 0}static get MASK_INDETERMINATE(){return 2147483647}constructor(e=[]){this.planes=e,Object(qr.a)(this.planes.every(e=>e instanceof fo))}fromBoundingSphere(e){this.planes.length=2*ho.length;const t=e.center,n=e.radius;let r=0;for(const e of ho){let i=this.planes[r],o=this.planes[r+1];i||(i=this.planes[r]=new fo),o||(o=this.planes[r+1]=new fo);const a=po.copy(e).scale(-n).add(t);e.dot(a);i.fromPointNormal(a,e);const s=po.copy(e).scale(n).add(t),l=Ao.copy(e).negate();l.dot(s);o.fromPointNormal(s,l),r+=2}return this}computeVisibility(e){Object(qr.a)(e);let t=Li.INSIDE;for(const n of this.planes){switch(e.intersectPlane(n)){case Li.OUTSIDE:return Li.OUTSIDE;case Li.INTERSECTING:t=Li.INTERSECTING}}return t}computeVisibilityWithPlaneMask(e,t){if(Object(qr.a)(e,"boundingVolume is required."),Object(qr.a)(Number.isFinite(t),"parentPlaneMask is required."),t===go.MASK_OUTSIDE||t===go.MASK_INSIDE)return t;let n=go.MASK_INSIDE;const r=this.planes;for(let i=0;i2&&void 0!==arguments[2]?arguments[2]:new Wr.a;const r=e.normal.dot(t);return n.copy(e.normal).scale(e.distance-r).add(t),n}function wo(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new Wr.a;const r=e.unprojectPosition(t);return _i.WGS84.cartographicToCartesian(r,n)}const xo=new Wr.a;function Mo(e,t){if(e instanceof lo){const{halfAxes:n}=e,r=function(e){e.getColumn(0,xo);const t=e.getColumn(1),n=e.getColumn(2),r=xo.add(t).add(n);return r.len()}(n);return Math.log2(6356752.314245179/(r+t[2]))}if(e instanceof ki){const{radius:n}=e;return Math.log2(6356752.314245179/(n+t[2]))}if(e.width&&e.height){const{width:t,height:n}=e;return(Math.log2(6378137/t)+Math.log2(6378137/n))/2}return 1}function Eo(e,t,n){const r=_i.WGS84.cartographicToCartesian([e.xmax,e.ymax,e.zmax],new Wr.a),i=Math.sqrt(Math.pow(r[0]-n[0],2)+Math.pow(r[1]-n[1],2)+Math.pow(r[2]-n[2],2));return Math.log2(6356752.314245179/(i+t[2]))}const Oo=0,So=1,To=3,Co=4,Lo=5,Po=1,Io=2,Do="empty",ko="scenegraph",Ro="pointcloud",jo="mesh",Fo="I3S",No="TILES3D",Bo="geometricError",zo=1;function Uo(e){return null!=e}const Ho=new Wr.a,Vo=new Wr.a,Go=new Wr.a,Yo=new Wr.a;function Wo(e,t,n){if(Object(Ci.a)(e,"3D Tile: boundingVolume must be defined"),e.box)return function(e,t,n){const r=new Wr.a(e[0],e[1],e[2]);t.transform(r,r);let i=[];if(10===e.length){const t=e.slice(3,6),n=new Yi.a;n.fromArray(e,6);const r=new Wr.a([1,0,0]),o=new Wr.a([0,1,0]),a=new Wr.a([0,0,1]);r.transformByQuaternion(n),r.scale(t[0]),o.transformByQuaternion(n),o.scale(t[1]),a.transformByQuaternion(n),a.scale(t[2]),i=[...r.toArray(),...o.toArray(),...a.toArray()]}else i=[...e.slice(3,6),...e.slice(6,9),...e.slice(9,12)];const o=t.transformAsVector(i.slice(0,3)),a=t.transformAsVector(i.slice(3,6)),s=t.transformAsVector(i.slice(6,9)),l=new Gi([o[0],o[1],o[2],a[0],a[1],a[2],s[0],s[1],s[2]]);if(Uo(n))return n.center=r,n.halfAxes=l,n;return new lo(r,l)}(e.box,t,n);if(e.region){const[t,n,r,i,o,a]=e.region,s=_i.WGS84.cartographicToCartesian([Object(Qr.c)(t),Object(Qr.c)(i),o],Go),l=_i.WGS84.cartographicToCartesian([Object(Qr.c)(r),Object(Qr.c)(n),a],Yo),u=(new Wr.a).addVectors(s,l).multiplyScalar(.5),c=(new Wr.a).subVectors(s,l).len()/2;return Xo([u[0],u[1],u[2],c],new Yr.a)}if(e.sphere)return Xo(e.sphere,t,n);throw new Error("3D Tile: boundingVolume must contain a sphere, region, or box")}function qo(e,t){if(e.box)return function(e){const t=Zo(),{halfAxes:n}=e,r=new Wr.a(n.getColumn(0)),i=new Wr.a(n.getColumn(1)),o=new Wr.a(n.getColumn(2));for(let n=0;n<2;n++){for(let n=0;n<2;n++){for(let n=0;n<2;n++)Ho.copy(e.center),Ho.add(r),Ho.add(i),Ho.add(o),Ko(t,Ho),o.negate();i.negate()}r.negate()}return t}(t);if(e.region){const[t,n,r,i,o,a]=e.region;return[[Object(Qr.c)(t),Object(Qr.c)(n),o],[Object(Qr.c)(r),Object(Qr.c)(i),a]]}if(e.sphere)return function(e){const t=Zo(),{center:n,radius:r}=e,i=_i.WGS84.scaleToGeodeticSurface(n,Ho);let o;o=i?_i.WGS84.geodeticSurfaceNormal(i):new Wr.a(0,0,1);let a=new Wr.a(o[2],-o[1],0);a.len()>0?a.normalize():a=new Wr.a(0,1,0);const s=a.clone().cross(o);for(const e of[a,s,o]){Vo.copy(e).scale(r);for(let e=0;e<2;e++)Ho.copy(n),Ho.add(Vo),Ko(t,Ho),Vo.negate()}return t}(t);throw new Error("Unkown boundingVolume type")}function Xo(e,t,n){const r=new Wr.a(e[0],e[1],e[2]);t.transform(r,r);const i=t.getScale(Vo),o=Math.max(Math.max(i[0],i[1]),i[2]),a=e[3]*o;return Uo(n)?(n.center=r,n.radius=a,n):new ki(r,a)}function Zo(){return[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]]}function Ko(e,t){_i.WGS84.cartesianToCartographic(t,Ho),e[0][0]=Math.min(e[0][0],Ho[0]),e[0][1]=Math.min(e[0][1],Ho[1]),e[0][2]=Math.min(e[0][2],Ho[2]),e[1][0]=Math.max(e[1][0],Ho[0]),e[1][1]=Math.max(e[1][1],Ho[1]),e[1][2]=Math.max(e[1][2],Ho[2])}new Wr.a,new Wr.a,new Yr.a,new Wr.a,new Wr.a,new Wr.a;function Qo(e,t){if(e.dynamicScreenSpaceError&&e.dynamicScreenSpaceErrorComputedDensity){const n=e.dynamicScreenSpaceErrorComputedDensity,r=e.dynamicScreenSpaceErrorFactor;return function(e,t){const n=e*t;return 1-Math.exp(-n*n)}(t,n)*r}return 0}const Jo=new Wr.a,$o=new Wr.a,ea=new Wr.a,ta=new Wr.a,na=new Wr.a,ra=new Yr.a,ia=new Yr.a;function oa(e,t){const{topDownViewport:n}=t,r=e.header.mbs[1],i=e.header.mbs[0],o=e.header.mbs[2],a=e.header.mbs[3],s=[...e.boundingVolume.center],l=n.unprojectPosition(n.cameraPosition);_i.WGS84.cartographicToCartesian(l,Jo),$o.copy(Jo).subtract(s).normalize(),_i.WGS84.eastNorthUpToFixedFrame(s,ra),ia.copy(ra).invert(),ea.copy(Jo).transform(ia);const u=Math.sqrt(ea[0]*ea[0]+ea[1]*ea[1]),c=u*u/ea[2];ta.copy([ea[0],ea[1],c]);const d=ta.transform(ra).subtract(s).normalize(),f=$o.cross(d).normalize().scale(a).add(s),h=_i.WGS84.cartesianToCartographic(f),p=n.project([i,r,o]),A=n.project(h);return na.copy(p).subtract(A).magnitude()}class aa{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;Object(i.a)(this,"_map",new Map),Object(i.a)(this,"_array",void 0),Object(i.a)(this,"_length",void 0),this._array=new Array(e),this._length=e}get length(){return this._length}set length(e){this._length=e,e>this._array.length&&(this._array.length=e)}get values(){return this._array}get(e){return Object(Ci.a)(e=0),e>=this.length&&(this.length=e+1),this._map.has(this._array[e])&&this._map.delete(this._array[e]),this._array[e]=t,this._map.set(t,e)}delete(e){const t=this._map.get(e);t>=0&&(this._array.splice(t,1),this._map.delete(e),this.length--)}peek(){return this._array[this._length-1]}push(e){if(!this._map.has(e)){const t=this.length++;this._array[t]=e,this._map.set(e,t)}}pop(){const e=this._array[--this.length];return this._map.delete(e),e}reserve(e){Object(Ci.a)(e>=0),e>this._array.length&&(this._array.length=e)}resize(e){Object(Ci.a)(e>=0),this.length=e}trim(e){null==e&&(e=this.length),this._array.length=e}reset(){this._array=[],this._map=new Map,this._length=0}find(e){return this._map.has(e)}}const sa={loadSiblings:!1,skipLevelOfDetail:!1,maximumScreenSpaceError:2,updateTransforms:!0,onTraversalEnd:()=>{},viewportTraversersMap:{},basePath:""};class la{traversalFinished(e){return!0}constructor(e){Object(i.a)(this,"options",void 0),Object(i.a)(this,"root",null),Object(i.a)(this,"selectedTiles",{}),Object(i.a)(this,"requestedTiles",{}),Object(i.a)(this,"emptyTiles",{}),Object(i.a)(this,"lastUpdate",(new Date).getTime()),Object(i.a)(this,"updateDebounceTime",1e3),Object(i.a)(this,"_traversalStack",new aa),Object(i.a)(this,"_emptyTraversalStack",new aa),Object(i.a)(this,"_frameNumber",null),this.options={...sa,...e}}traverse(e,t,n){this.root=e,this.options={...this.options,...n},this.reset(),this.updateTile(e,t),this._frameNumber=t.frameNumber,this.executeTraversal(e,t)}reset(){this.requestedTiles={},this.selectedTiles={},this.emptyTiles={},this._traversalStack.reset(),this._emptyTraversalStack.reset()}executeTraversal(e,t){const n=this._traversalStack;for(e._selectionDepth=1,n.push(e);n.length>0;){const e=n.pop();let r=!1;this.canTraverse(e,t)&&(this.updateChildTiles(e,t),r=this.updateAndPushChildren(e,t,n,e.hasRenderContent?e._selectionDepth+1:e._selectionDepth));const i=e.parent,o=Boolean(!i||i._shouldRefine),a=!r;e.hasRenderContent?e.refine===Po?(this.loadTile(e,t),this.selectTile(e,t)):e.refine===Io&&(this.loadTile(e,t),a&&this.selectTile(e,t)):(this.emptyTiles[e.id]=e,this.loadTile(e,t),a&&this.selectTile(e,t)),this.touchTile(e,t),e._shouldRefine=r&&o}const r=(new Date).getTime();(this.traversalFinished(t)||r-this.lastUpdate>this.updateDebounceTime)&&(this.lastUpdate=r,this.options.onTraversalEnd(t))}updateChildTiles(e,t){const n=e.children;for(const e of n)this.updateTile(e,t)}updateAndPushChildren(e,t,n,r){const{loadSiblings:i,skipLevelOfDetail:o}=this.options,a=e.children;a.sort(this.compareDistanceToCamera.bind(this));const s=e.refine===Io&&e.hasRenderContent&&!o;let l=!1,u=!0;for(const e of a)if(e._selectionDepth=r,e.isVisibleAndInRequestVolume?(n.find(e)&&n.delete(e),n.push(e),l=!0):(s||i)&&(this.loadTile(e,t),this.touchTile(e,t)),s){let n;if(n=!!e._inRequestVolume&&(e.hasRenderContent?e.contentAvailable:this.executeEmptyTraversal(e,t)),u=u&&n,!u)return!1}return l||(u=!1),u}updateTile(e,t){this.updateTileVisibility(e,t)}selectTile(e,t){this.shouldSelectTile(e)&&(e._selectedFrame=t.frameNumber,this.selectedTiles[e.id]=e)}loadTile(e,t){this.shouldLoadTile(e)&&(e._requestedFrame=t.frameNumber,e._priority=e._getPriority(),this.requestedTiles[e.id]=e)}touchTile(e,t){e.tileset._cache.touch(e),e._touchedFrame=t.frameNumber}canTraverse(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return!!e.hasChildren&&(e.hasTilesetContent?!e.contentExpired:!(!r&&!e.isVisibleAndInRequestVolume)&&this.shouldRefine(e,t,n))}shouldLoadTile(e){return e.hasUnloadedContent||e.contentExpired}shouldSelectTile(e){return e.contentAvailable&&!this.options.skipLevelOfDetail}shouldRefine(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=e._screenSpaceError;return n&&(r=e.getScreenSpaceError(t,!0)),r>this.options.maximumScreenSpaceError}updateTileVisibility(e,t){const n=[];if(this.options.viewportTraversersMap)for(const e in this.options.viewportTraversersMap){this.options.viewportTraversersMap[e]===t.viewport.id&&n.push(e)}else n.push(t.viewport.id);e.updateVisibility(t,n)}compareDistanceToCamera(e,t){return e._distanceToCamera-t._distanceToCamera}anyChildrenVisible(e,t){let n=!1;for(const r of e.children)r.updateVisibility(t),n=n||r.isVisibleAndInRequestVolume;return n}executeEmptyTraversal(e,t){let n=!0;const r=this._emptyTraversalStack;for(r.push(e);r.length>0&&n;){const e=r.pop();this.updateTile(e,t),e.isVisibleAndInRequestVolume||this.loadTile(e,t),this.touchTile(e,t);if(!e.hasRenderContent&&this.canTraverse(e,t,!1,!0)){const t=e.children;for(const e of t)r.find(e)&&r.delete(e),r.push(e)}else e.contentAvailable||e.hasEmptyContent||(n=!1)}return n}}const ua=new Wr.a;class ca{constructor(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"";Object(i.a)(this,"tileset",void 0),Object(i.a)(this,"header",void 0),Object(i.a)(this,"id",void 0),Object(i.a)(this,"url",void 0),Object(i.a)(this,"parent",void 0),Object(i.a)(this,"refine",void 0),Object(i.a)(this,"type",void 0),Object(i.a)(this,"contentUrl",void 0),Object(i.a)(this,"lodMetricType","geometricError"),Object(i.a)(this,"lodMetricValue",0),Object(i.a)(this,"boundingVolume",null),Object(i.a)(this,"content",null),Object(i.a)(this,"contentState",Oo),Object(i.a)(this,"gpuMemoryUsageInBytes",0),Object(i.a)(this,"children",[]),Object(i.a)(this,"depth",0),Object(i.a)(this,"viewportIds",[]),Object(i.a)(this,"transform",new Yr.a),Object(i.a)(this,"extensions",null),Object(i.a)(this,"implicitTiling",null),Object(i.a)(this,"userData",{}),Object(i.a)(this,"computedTransform",void 0),Object(i.a)(this,"hasEmptyContent",!1),Object(i.a)(this,"hasTilesetContent",!1),Object(i.a)(this,"traverser",new la({})),Object(i.a)(this,"_cacheNode",null),Object(i.a)(this,"_frameNumber",null),Object(i.a)(this,"_expireDate",null),Object(i.a)(this,"_expiredContent",null),Object(i.a)(this,"_boundingBox",void 0),Object(i.a)(this,"_distanceToCamera",0),Object(i.a)(this,"_screenSpaceError",0),Object(i.a)(this,"_visibilityPlaneMask",void 0),Object(i.a)(this,"_visible",void 0),Object(i.a)(this,"_contentBoundingVolume",void 0),Object(i.a)(this,"_viewerRequestVolume",void 0),Object(i.a)(this,"_initialTransform",new Yr.a),Object(i.a)(this,"_priority",0),Object(i.a)(this,"_selectedFrame",0),Object(i.a)(this,"_requestedFrame",0),Object(i.a)(this,"_selectionDepth",0),Object(i.a)(this,"_touchedFrame",0),Object(i.a)(this,"_centerZDepth",0),Object(i.a)(this,"_shouldRefine",!1),Object(i.a)(this,"_stackLength",0),Object(i.a)(this,"_visitedFrame",0),Object(i.a)(this,"_inRequestVolume",!1),Object(i.a)(this,"_lodJudge",null),this.header=t,this.tileset=e,this.id=r||t.id,this.url=t.url,this.parent=n,this.refine=this._getRefine(t.refine),this.type=t.type,this.contentUrl=t.contentUrl,this._initializeLodMetric(t),this._initializeTransforms(t),this._initializeBoundingVolumes(t),this._initializeContent(t),this._initializeRenderingState(t),Object.seal(this)}destroy(){this.header=null}isDestroyed(){return null===this.header}get selected(){return this._selectedFrame===this.tileset._frameNumber}get isVisible(){return this._visible}get isVisibleAndInRequestVolume(){return this._visible&&this._inRequestVolume}get hasRenderContent(){return!this.hasEmptyContent&&!this.hasTilesetContent}get hasChildren(){return this.children.length>0||this.header.children&&this.header.children.length>0}get contentReady(){return this.contentState===To||this.hasEmptyContent}get contentAvailable(){return Boolean(this.contentReady&&this.hasRenderContent||this._expiredContent&&!this.contentFailed)}get hasUnloadedContent(){return this.hasRenderContent&&this.contentUnloaded}get contentUnloaded(){return this.contentState===Oo}get contentExpired(){return this.contentState===Co}get contentFailed(){return this.contentState===Lo}get distanceToCamera(){return this._distanceToCamera}get screenSpaceError(){return this._screenSpaceError}get boundingBox(){return this._boundingBox||(this._boundingBox=qo(this.header.boundingVolume,this.boundingVolume)),this._boundingBox}getScreenSpaceError(e,t){switch(this.tileset.type){case Fo:return oa(this,e);case No:return function(e,t,n){const r=e.tileset,i=e.parent&&e.parent.lodMetricValue||e.lodMetricValue,o=n?i:e.lodMetricValue;if(0===o)return 0;const a=Math.max(e._distanceToCamera,1e-7),{height:s,sseDenominator:l}=t,{viewDistanceScale:u}=r.options;let c=o*s*(u||1)/(a*l);return c-=Qo(r,a),c}(this,e,t);default:throw new Error("Unsupported tileset type")}}unselect(){this._selectedFrame=0}_getGpuMemoryUsageInBytes(){return this.content.gpuMemoryUsageInBytes||this.content.byteLength||0}_getPriority(){const e=this.tileset._traverser,{skipLevelOfDetail:t}=e.options,n=this.refine===Po||t;if(n&&!this.isVisible&&void 0!==this._visible)return-1;if(this.tileset._frameNumber-this._touchedFrame>=1)return-1;if(this.contentState===Oo)return-1;const r=this.parent,i=r&&(!n||0===this._screenSpaceError||r.hasTilesetContent)?r._screenSpaceError:this._screenSpaceError,o=e.root?e.root._screenSpaceError:0;return Math.max(o-i,0)}async loadContent(){if(this.hasEmptyContent)return!1;if(this.content)return!0;this.contentExpired&&(this._expireDate=null),this.contentState=So;const e=await this.tileset._requestScheduler.scheduleRequest(this.id,this._getPriority.bind(this));if(!e)return this.contentState=Oo,!1;try{const t=this.tileset.getTileUrl(this.contentUrl),n=this.tileset.loader,r={...this.tileset.loadOptions,[n.id]:{...this.tileset.loadOptions[n.id],isTileset:"json"===this.type,...this._getLoaderSpecificOptions(n.id)}};return this.content=await Object(Gr.a)(t,n,r),this.tileset.options.contentLoader&&await this.tileset.options.contentLoader(this),this._isTileset()&&this.tileset._initializeTileHeaders(this.content,this),this.contentState=To,this._onContentLoaded(),!0}catch(e){throw this.contentState=Lo,e}finally{e.done()}}unloadContent(){return this.content&&this.content.destroy&&this.content.destroy(),this.content=null,this.header.content&&this.header.content.destroy&&this.header.content.destroy(),this.header.content=null,this.contentState=Oo,!0}updateVisibility(e,t){if(this._frameNumber===e.frameNumber)return;const n=this.parent,r=n?n._visibilityPlaneMask:go.MASK_INDETERMINATE;if(this.tileset._traverser.options.updateTransforms){const e=n?n.computedTransform:this.tileset.modelMatrix;this._updateTransform(e)}this._distanceToCamera=this.distanceToTile(e),this._screenSpaceError=this.getScreenSpaceError(e,!1),this._visibilityPlaneMask=this.visibility(e,r),this._visible=this._visibilityPlaneMask!==go.MASK_OUTSIDE,this._inRequestVolume=this.insideViewerRequestVolume(e),this._frameNumber=e.frameNumber,this.viewportIds=t}visibility(e,t){const{cullingVolume:n}=e,{boundingVolume:r}=this;return n.computeVisibilityWithPlaneMask(r,t)}contentVisibility(){return!0}distanceToTile(e){const t=this.boundingVolume;return Math.sqrt(Math.max(t.distanceSquaredTo(e.camera.position),0))}cameraSpaceZDepth(e){let{camera:t}=e;const n=this.boundingVolume;return ua.subVectors(n.center,t.position),t.direction.dot(ua)}insideViewerRequestVolume(e){const t=this._viewerRequestVolume;return!t||t.distanceSquaredTo(e.camera.position)<=0}updateExpiration(){if(null!=this._expireDate&&this.contentReady&&!this.hasEmptyContent){const e=Date.now();Date.lessThan(this._expireDate,e)&&(this.contentState=Co,this._expiredContent=this.content)}}get extras(){return this.header.extras}_initializeLodMetric(e){"lodMetricType"in e?this.lodMetricType=e.lodMetricType:(this.lodMetricType=this.parent&&this.parent.lodMetricType||this.tileset.lodMetricType,console.warn("3D Tile: Required prop lodMetricType is undefined. Using parent lodMetricType")),"lodMetricValue"in e?this.lodMetricValue=e.lodMetricValue:(this.lodMetricValue=this.parent&&this.parent.lodMetricValue||this.tileset.lodMetricValue,console.warn("3D Tile: Required prop lodMetricValue is undefined. Using parent lodMetricValue"))}_initializeTransforms(e){this.transform=e.transform?new Yr.a(e.transform):new Yr.a;const t=this.parent,n=this.tileset,r=t&&t.computedTransform?t.computedTransform.clone():n.modelMatrix.clone();this.computedTransform=new Yr.a(r).multiplyRight(this.transform);const i=t&&t._initialTransform?t._initialTransform.clone():new Yr.a;this._initialTransform=new Yr.a(i).multiplyRight(this.transform)}_initializeBoundingVolumes(e){this._contentBoundingVolume=null,this._viewerRequestVolume=null,this._updateBoundingVolume(e)}_initializeContent(e){this.content={_tileset:this.tileset,_tile:this},this.hasEmptyContent=!0,this.contentState=Oo,this.hasTilesetContent=!1,e.contentUrl&&(this.content=null,this.hasEmptyContent=!1)}_initializeRenderingState(e){this.depth=e.level||(this.parent?this.parent.depth+1:0),this._shouldRefine=!1,this._distanceToCamera=0,this._centerZDepth=0,this._screenSpaceError=0,this._visibilityPlaneMask=go.MASK_INDETERMINATE,this._visible=void 0,this._inRequestVolume=!1,this._stackLength=0,this._selectionDepth=0,this._frameNumber=0,this._touchedFrame=0,this._visitedFrame=0,this._selectedFrame=0,this._requestedFrame=0,this._priority=0}_getRefine(e){return e||this.parent&&this.parent.refine||Io}_isTileset(){return-1!==this.contentUrl.indexOf(".json")}_onContentLoaded(){switch(this.content&&this.content.type){case"vctr":case"geom":this.tileset._traverser.disableSkipLevelOfDetail=!0}this._isTileset()?this.hasTilesetContent=!0:this.gpuMemoryUsageInBytes=this._getGpuMemoryUsageInBytes()}_updateBoundingVolume(e){this.boundingVolume=Wo(e.boundingVolume,this.computedTransform,this.boundingVolume);const t=e.content;t&&(t.boundingVolume&&(this._contentBoundingVolume=Wo(t.boundingVolume,this.computedTransform,this._contentBoundingVolume)),e.viewerRequestVolume&&(this._viewerRequestVolume=Wo(e.viewerRequestVolume,this.computedTransform,this._viewerRequestVolume)))}_updateTransform(){const e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Yr.a).clone().multiplyRight(this.transform);!e.equals(this.computedTransform)&&(this.computedTransform=e,this._updateBoundingVolume(this.header))}_getLoaderSpecificOptions(e){switch(e){case"i3s":return{...this.tileset.options.i3s,_tileOptions:{attributeUrls:this.header.attributeUrls,textureUrl:this.header.textureUrl,textureFormat:this.header.textureFormat,textureLoaderOptions:this.header.textureLoaderOptions,materialDefinition:this.header.materialDefinition,isDracoGeometry:this.header.isDracoGeometry,mbs:this.header.mbs},_tilesetOptions:{store:this.tileset.tileset.store,attributeStorageInfo:this.tileset.tileset.attributeStorageInfo,fields:this.tileset.tileset.fields},isTileHeader:!1};case"3d-tiles":case"cesium-ion":default:return{assetGltfUpAxis:(t=this.tileset.tileset).asset&&t.asset.gltfUpAxis||"Y"}}var t}}class da extends la{compareDistanceToCamera(e,t){return 0===t._distanceToCamera&&0===e._distanceToCamera?t._centerZDepth-e._centerZDepth:t._distanceToCamera-e._distanceToCamera}updateTileVisibility(e,t){if(super.updateTileVisibility(e,t),!e.isVisibleAndInRequestVolume)return;const n=e.children.length>0;if(e.hasTilesetContent&&n){const n=e.children[0];return this.updateTileVisibility(n,t),void(e._visible=n._visible)}if(this.meetsScreenSpaceErrorEarly(e,t))return void(e._visible=!1);const r=e.refine===Io,i=e._optimChildrenWithinParent===zo;r&&i&&n&&!this.anyChildrenVisible(e,t)&&(e._visible=!1)}meetsScreenSpaceErrorEarly(e,t){const{parent:n}=e;return!(!n||n.hasTilesetContent||n.refine!==Po)&&!this.shouldRefine(e,t,!0)}}class fa{constructor(){Object(i.a)(this,"frameNumberMap",new Map)}register(e,t){const n=this.frameNumberMap.get(e)||new Map,r=n.get(t)||0;n.set(t,r+1),this.frameNumberMap.set(e,n)}deregister(e,t){const n=this.frameNumberMap.get(e);if(!n)return;const r=n.get(t)||1;n.set(t,r-1)}isZero(e,t){var n;return 0===((null===(n=this.frameNumberMap.get(e))||void 0===n?void 0:n.get(t))||0)}}const ha="REQUESTED",pa="COMPLETED",Aa="ERROR";class ga{constructor(){Object(i.a)(this,"_statusMap",void 0),Object(i.a)(this,"pendingTilesRegister",new fa),this._statusMap={}}add(e,t,n,r){if(!this._statusMap[t]){const{frameNumber:i,viewport:{id:o}}=r;this._statusMap[t]={request:e,callback:n,key:t,frameState:r,status:ha},this.pendingTilesRegister.register(o,i),e().then(e=>{this._statusMap[t].status=pa;const{frameNumber:n,viewport:{id:i}}=this._statusMap[t].frameState;this.pendingTilesRegister.deregister(i,n),this._statusMap[t].callback(e,r)}).catch(e=>{this._statusMap[t].status=Aa;const{frameNumber:r,viewport:{id:i}}=this._statusMap[t].frameState;this.pendingTilesRegister.deregister(i,r),n(e)})}}update(e,t){if(this._statusMap[e]){const{frameNumber:n,viewport:{id:r}}=this._statusMap[e].frameState;this.pendingTilesRegister.deregister(r,n);const{frameNumber:i,viewport:{id:o}}=t;this.pendingTilesRegister.register(o,i),this._statusMap[e].frameState=t}}find(e){return this._statusMap[e]}hasPendingTiles(e,t){return!this.pendingTilesRegister.isZero(e,t)}}class ma extends la{constructor(e){super(e),Object(i.a)(this,"_tileManager",void 0),this._tileManager=new ga}traversalFinished(e){return!this._tileManager.hasPendingTiles(e.viewport.id,this._frameNumber||0)}shouldRefine(e,t){return e._lodJudge=function(e,t){if(0===e.lodMetricValue||isNaN(e.lodMetricValue))return"DIG";const n=2*oa(e,t);return n<2?"OUT":!e.header.children||n<=e.lodMetricValue?"DRAW":e.header.children?"DIG":"OUT"}(e,t),"DIG"===e._lodJudge}updateChildTiles(e,t){const n=e.header.children||[],r=e.children,i=e.tileset;for(const o of n){const n="".concat(o.id,"-").concat(t.viewport.id),a=r&&r.find(e=>e.id===n);if(a)a&&this.updateTile(a,t);else{let r=()=>this._loadTile(o.id,i);this._tileManager.find(n)?this._tileManager.update(n,t):(i.tileset.nodePages&&(r=()=>i.tileset.nodePagesTile.formTileFromNodePages(o.id)),this._tileManager.add(r,n,t=>this._onTileLoad(t,e,n),t))}}return!1}async _loadTile(e,t){const{loader:n}=t,r=t.getTileUrl("".concat(t.url,"/nodes/").concat(e)),i={...t.loadOptions,i3s:{...t.loadOptions.i3s,isTileHeader:!0}};return await Object(Gr.a)(r,n,i)}_onTileLoad(e,t,n){const r=new ca(t.tileset,e,t,n);t.children.push(r);const i=this._tileManager.find(r.id).frameState;this.updateTile(r,i),this._frameNumber===i.frameNumber&&(this.traversalFinished(i)||(new Date).getTime()-this.lastUpdate>this.updateDebounceTime)&&this.executeTraversal(r,i)}}const ya={description:"",ellipsoid:_i.WGS84,modelMatrix:new Yr.a,throttleRequests:!0,maxRequests:64,maximumMemoryUsage:32,maximumTilesSelected:0,debounceTime:0,onTileLoad:()=>{},onTileUnload:()=>{},onTileError:()=>{},onTraversalComplete:e=>e,contentLoader:void 0,viewDistanceScale:1,maximumScreenSpaceError:8,loadTiles:!0,updateTransforms:!0,viewportTraversersMap:null,loadOptions:{fetch:{}},attributions:[],basePath:"",i3s:{}},va="Tiles In Tileset(s)";class ba{constructor(e,t){Object(i.a)(this,"options",void 0),Object(i.a)(this,"loadOptions",void 0),Object(i.a)(this,"type",void 0),Object(i.a)(this,"tileset",void 0),Object(i.a)(this,"loader",void 0),Object(i.a)(this,"url",void 0),Object(i.a)(this,"basePath",void 0),Object(i.a)(this,"modelMatrix",void 0),Object(i.a)(this,"ellipsoid",void 0),Object(i.a)(this,"lodMetricType",void 0),Object(i.a)(this,"lodMetricValue",void 0),Object(i.a)(this,"refine",void 0),Object(i.a)(this,"root",null),Object(i.a)(this,"roots",{}),Object(i.a)(this,"asset",{}),Object(i.a)(this,"description",""),Object(i.a)(this,"properties",void 0),Object(i.a)(this,"extras",null),Object(i.a)(this,"attributions",{}),Object(i.a)(this,"credits",{}),Object(i.a)(this,"stats",void 0),Object(i.a)(this,"contentFormats",{draco:!1,meshopt:!1,dds:!1,ktx2:!1}),Object(i.a)(this,"cartographicCenter",null),Object(i.a)(this,"cartesianCenter",null),Object(i.a)(this,"zoom",1),Object(i.a)(this,"boundingVolume",null),Object(i.a)(this,"dynamicScreenSpaceErrorComputedDensity",0),Object(i.a)(this,"maximumMemoryUsage",32),Object(i.a)(this,"gpuMemoryUsageInBytes",0),Object(i.a)(this,"_frameNumber",0),Object(i.a)(this,"_queryParams",{}),Object(i.a)(this,"_extensionsUsed",[]),Object(i.a)(this,"_tiles",{}),Object(i.a)(this,"_pendingCount",0),Object(i.a)(this,"selectedTiles",[]),Object(i.a)(this,"traverseCounter",0),Object(i.a)(this,"geometricError",0),Object(i.a)(this,"lastUpdatedVieports",null),Object(i.a)(this,"_requestedTiles",[]),Object(i.a)(this,"_emptyTiles",[]),Object(i.a)(this,"frameStateData",{}),Object(i.a)(this,"_traverser",void 0),Object(i.a)(this,"_cache",new Ti),Object(i.a)(this,"_requestScheduler",void 0),Object(i.a)(this,"updatePromise",null),Object(i.a)(this,"tilesetInitializationPromise",void 0),this.options={...ya,...t},this.tileset=e,this.loader=e.loader,this.type=e.type,this.url=e.url,this.basePath=e.basePath||Ei.a.dirname(this.url),this.modelMatrix=this.options.modelMatrix,this.ellipsoid=this.options.ellipsoid,this.lodMetricType=e.lodMetricType,this.lodMetricValue=e.lodMetricValue,this.refine=e.root.refine,this.loadOptions=this.options.loadOptions||{},this._traverser=this._initializeTraverser(),this._requestScheduler=new _e.a({throttleRequests:this.options.throttleRequests,maxRequests:this.options.maxRequests}),this.stats=new Mi({id:this.url}),this._initializeStats(),this.tilesetInitializationPromise=this._initializeTileSet(e)}destroy(){this._destroy()}isLoaded(){return 0===this._pendingCount&&0!==this._frameNumber&&0===this._requestedTiles.length}get tiles(){return Object.values(this._tiles)}get frameNumber(){return this._frameNumber}get queryParams(){return new URLSearchParams(this._queryParams).toString()}setProps(e){this.options={...this.options,...e}}setOptions(e){this.options={...this.options,...e}}getTileUrl(e){return e.startsWith("data:")?e:"".concat(e).concat(e.includes("?")?"&":"?").concat(this.queryParams)}hasExtension(e){return Boolean(this._extensionsUsed.indexOf(e)>-1)}update(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;this.tilesetInitializationPromise.then(()=>{!e&&this.lastUpdatedVieports?e=this.lastUpdatedVieports:this.lastUpdatedVieports=e,e&&this.doUpdate(e)})}async selectTiles(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return await this.tilesetInitializationPromise,e&&(this.lastUpdatedVieports=e),this.updatePromise||(this.updatePromise=new Promise(e=>{setTimeout(()=>{this.lastUpdatedVieports&&this.doUpdate(this.lastUpdatedVieports),e(this._frameNumber),this.updatePromise=null},this.options.debounceTime)})),this.updatePromise}doUpdate(e){if("loadTiles"in this.options&&!this.options.loadTiles)return;if(this.traverseCounter>0)return;const t=e instanceof Array?e:[e];this._cache.reset(),this._frameNumber++,this.traverseCounter=t.length;const n=[];for(const e of t){const t=e.id;this._needTraverse(t)?n.push(t):this.traverseCounter--}for(const e of t){const t=e.id;if(this.roots[t]||(this.roots[t]=this._initializeTileHeaders(this.tileset,null)),!n.includes(t))continue;const r=bo(e,this._frameNumber);this._traverser.traverse(this.roots[t],r,this.options)}}_needTraverse(e){let t=e;return this.options.viewportTraversersMap&&(t=this.options.viewportTraversersMap[e]),t===e}_onTraversalEnd(e){const t=e.viewport.id;this.frameStateData[t]||(this.frameStateData[t]={selectedTiles:[],_requestedTiles:[],_emptyTiles:[]});const n=this.frameStateData[t],r=Object.values(this._traverser.selectedTiles),[i,o]=function(e,t,n){if(0===n||e.length<=n)return[e,[]];const r=[],{longitude:i,latitude:o}=t.viewport;for(const[t,n]of e.entries()){const[e,a]=n.header.mbs,s=Math.abs(i-e),l=Math.abs(o-a),u=Math.sqrt(l*l+s*s);r.push([t,u])}const a=r.sort((e,t)=>e[1]-t[1]),s=[];for(let t=0;t0||this._updateTiles()}_updateTiles(){this.selectedTiles=[],this._requestedTiles=[],this._emptyTiles=[];for(const e in this.frameStateData){const t=this.frameStateData[e];this.selectedTiles=this.selectedTiles.concat(t.selectedTiles),this._requestedTiles=this._requestedTiles.concat(t._requestedTiles),this._emptyTiles=this._emptyTiles.concat(t._emptyTiles)}this.selectedTiles=this.options.onTraversalComplete(this.selectedTiles);for(const e of this.selectedTiles)this._tiles[e.id]=e;this._loadTiles(),this._unloadTiles(),this._updateStats()}_tilesChanged(e,t){if(e.length!==t.length)return!0;const n=new Set(e.map(e=>e.id)),r=new Set(t.map(e=>e.id));let i=e.filter(e=>!r.has(e.id)).length>0;return i=i||t.filter(e=>!n.has(e.id)).length>0,i}_loadTiles(){for(const e of this._requestedTiles)e.contentUnloaded&&this._loadTile(e)}_unloadTiles(){this._cache.unloadTiles(this,(e,t)=>e._unloadTile(t))}_updateStats(){let e=0,t=0;for(const n of this.selectedTiles)n.contentAvailable&&n.content&&(e++,n.content.pointCount?t+=n.content.pointCount:t+=n.content.vertexCount);this.stats.get("Tiles In View").count=this.selectedTiles.length,this.stats.get("Tiles To Render").count=e,this.stats.get("Points/Vertices").count=t}async _initializeTileSet(e){this.type===Fo&&(this.calculateViewPropsI3S(),e.root=await e.root),this.root=this._initializeTileHeaders(e,null),this.type===No&&(this._initializeTiles3DTileset(e),this.calculateViewPropsTiles3D()),this.type===Fo&&this._initializeI3STileset()}calculateViewPropsI3S(){var e;const t=this.tileset.fullExtent;if(t){const{xmin:e,xmax:n,ymin:r,ymax:i,zmin:o,zmax:a}=t;return this.cartographicCenter=new Wr.a(e+(n-e)/2,r+(i-r)/2,o+(a-o)/2),this.cartesianCenter=_i.WGS84.cartographicToCartesian(this.cartographicCenter,new Wr.a),void(this.zoom=Eo(t,this.cartographicCenter,this.cartesianCenter))}const n=null===(e=this.tileset.store)||void 0===e?void 0:e.extent;if(n){const[e,t,r,i]=n;return this.cartographicCenter=new Wr.a(e+(r-e)/2,t+(i-t)/2,0),this.cartesianCenter=_i.WGS84.cartographicToCartesian(this.cartographicCenter,new Wr.a),void(this.zoom=function(e,t,n){const[r,i,o,a]=e;return Eo({xmin:r,xmax:o,ymin:i,ymax:a,zmin:0,zmax:0},t,n)}(n,this.cartographicCenter,this.cartesianCenter))}console.warn("Extent is not defined in the tileset header"),this.cartographicCenter=new Wr.a,this.zoom=1}calculateViewPropsTiles3D(){const e=this.root,{center:t}=e.boundingVolume;if(!t)return console.warn("center was not pre-calculated for the root tile"),this.cartographicCenter=new Wr.a,void(this.zoom=1);0!==t[0]||0!==t[1]||0!==t[2]?this.cartographicCenter=_i.WGS84.cartesianToCartographic(t,new Wr.a):this.cartographicCenter=new Wr.a(0,0,-_i.WGS84.radii[0]),this.cartesianCenter=t,this.zoom=Mo(e.boundingVolume,this.cartographicCenter)}_initializeStats(){this.stats.get(va),this.stats.get("Tiles Loading"),this.stats.get("Tiles In Memory"),this.stats.get("Tiles In View"),this.stats.get("Tiles To Render"),this.stats.get("Tiles Loaded"),this.stats.get("Tiles Unloaded"),this.stats.get("Failed Tile Loads"),this.stats.get("Points/Vertices"),this.stats.get("Tile Memory Use","memory")}_initializeTileHeaders(e,t){const n=new ca(this,e.root,t);if(t&&(t.children.push(n),n.depth=t.depth+1),this.type===No){const e=[];for(e.push(n);e.length>0;){const t=e.pop();this.stats.get(va).incrementCount();const n=t.header.children||[];for(const i of n){var r;const n=new ca(this,i,t);if(null!==(r=n.contentUrl)&&void 0!==r&&r.includes("?session=")){const e=new URL(n.contentUrl).searchParams.get("session");e&&(this._queryParams.session=e)}t.children.push(n),n.depth=t.depth+1,e.push(n)}}}return n}_initializeTraverser(){let e;switch(this.type){case No:e=da;break;case Fo:e=ma;break;default:e=la}return new e({basePath:this.basePath,onTraversalEnd:this._onTraversalEnd.bind(this)})}_destroyTileHeaders(e){this._destroySubtree(e)}async _loadTile(e){let t;try{this._onStartTileLoading(),t=await e.loadContent()}catch(t){this._onTileLoadError(e,t instanceof Error?t:new Error("load failed"))}finally{this._onEndTileLoading(),this._onTileLoad(e,t)}}_onTileLoadError(e,t){this.stats.get("Failed Tile Loads").incrementCount();const n=t.message||t.toString(),r=e.url;console.error("A 3D tile failed to load: ".concat(e.url," ").concat(n)),this.options.onTileError(e,n,r)}_onTileLoad(e,t){if(t){if(this.type===Fo){var n,r;const e=(null===(n=this.tileset)||void 0===n||null===(r=n.nodePagesTile)||void 0===r?void 0:r.nodesInNodePages)||0;this.stats.get(va).reset(),this.stats.get(va).addCount(e)}e&&e.content&&function(e,t){Object(Ci.a)(e),Object(Ci.a)(t);const{rtcCenter:n,gltfUpAxis:r}=t,{computedTransform:i,boundingVolume:{center:o}}=e;let a=new Yr.a(i);switch(n&&a.translate(n),r){case"Z":break;case"Y":const e=(new Yr.a).rotateX(Math.PI/2);a=a.multiplyRight(e);break;case"X":const t=(new Yr.a).rotateY(-Math.PI/2);a=a.multiplyRight(t)}t.isQuantized&&a.translate(t.quantizedVolumeOffset).scale(t.quantizedVolumeScale);const s=new Wr.a(o);t.cartesianModelMatrix=a,t.cartesianOrigin=s;const l=_i.WGS84.cartesianToCartographic(s,new Wr.a),u=_i.WGS84.eastNorthUpToFixedFrame(s).invert();t.cartographicModelMatrix=u.multiplyRight(a),t.cartographicOrigin=l,t.coordinateSystem||(t.modelMatrix=t.cartographicModelMatrix)}(e,e.content),this.updateContentTypes(e),this._addTileToCache(e),this.options.onTileLoad(e)}}updateContentTypes(e){if(this.type===Fo)switch(e.header.isDracoGeometry&&(this.contentFormats.draco=!0),e.header.textureFormat){case"dds":this.contentFormats.dds=!0;break;case"ktx2":this.contentFormats.ktx2=!0}else if(this.type===No){var t;const{extensionsRemoved:n=[]}=(null===(t=e.content)||void 0===t?void 0:t.gltf)||{};n.includes("KHR_draco_mesh_compression")&&(this.contentFormats.draco=!0),n.includes("EXT_meshopt_compression")&&(this.contentFormats.meshopt=!0),n.includes("KHR_texture_basisu")&&(this.contentFormats.ktx2=!0)}}_onStartTileLoading(){this._pendingCount++,this.stats.get("Tiles Loading").incrementCount()}_onEndTileLoading(){this._pendingCount--,this.stats.get("Tiles Loading").decrementCount()}_addTileToCache(e){this._cache.add(this,e,t=>t._updateCacheStats(e))}_updateCacheStats(e){this.stats.get("Tiles Loaded").incrementCount(),this.stats.get("Tiles In Memory").incrementCount(),this.gpuMemoryUsageInBytes+=e.gpuMemoryUsageInBytes||0,this.stats.get("Tile Memory Use").count=this.gpuMemoryUsageInBytes}_unloadTile(e){this.gpuMemoryUsageInBytes-=e.gpuMemoryUsageInBytes||0,this.stats.get("Tiles In Memory").decrementCount(),this.stats.get("Tiles Unloaded").incrementCount(),this.stats.get("Tile Memory Use").count=this.gpuMemoryUsageInBytes,this.options.onTileUnload(e),e.unloadContent()}_destroy(){const e=[];for(this.root&&e.push(this.root);e.length>0;){const t=e.pop();for(const n of t.children)e.push(n);this._destroyTile(t)}this.root=null}_destroySubtree(e){const t=e,n=[];for(n.push(t);n.length>0;){e=n.pop();for(const t of e.children)n.push(t);e!==t&&this._destroyTile(e)}t.children=[]}_destroyTile(e){this._cache.unloadTile(this,e),this._unloadTile(e),e.destroy()}_initializeTiles3DTileset(e){if(e.queryString){const t=new URLSearchParams(e.queryString),n=Object.fromEntries(t.entries());this._queryParams={...this._queryParams,...n}}if(this.asset=e.asset,!this.asset)throw new Error("Tileset must have an asset property.");if("0.0"!==this.asset.version&&"1.0"!==this.asset.version)throw new Error("The tileset must be 3D Tiles version 0.0 or 1.0.");"tilesetVersion"in this.asset&&(this._queryParams.v=this.asset.tilesetVersion),this.credits={attributions:this.options.attributions||[]},this.description=this.options.description||"",this.properties=e.properties,this.geometricError=e.geometricError,this._extensionsUsed=e.extensionsUsed||[],this.extras=e.extras}_initializeI3STileset(){this.loadOptions.i3s&&"token"in this.loadOptions.i3s&&(this._queryParams.token=this.loadOptions.i3s.token)}}const _a={COMPOSITE:"cmpt",POINT_CLOUD:"pnts",BATCHED_3D_MODEL:"b3dm",INSTANCED_3D_MODEL:"i3dm",GEOMETRY:"geom",VECTOR:"vect",GLTF:"glTF"};Object.keys(_a);function wa(e,t,n){Object(Ci.a)(e instanceof ArrayBuffer);const r=new TextDecoder("utf8"),i=new Uint8Array(e,t,n);return r.decode(i)}function xa(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;const n=new DataView(e);return"".concat(String.fromCharCode(n.getUint8(t+0))).concat(String.fromCharCode(n.getUint8(t+1))).concat(String.fromCharCode(n.getUint8(t+2))).concat(String.fromCharCode(n.getUint8(t+3)))}var Ma=n(276);const Ea={draco:{decoderType:"object"==typeof WebAssembly?"wasm":"js",libraryPath:"libs/",extraAttributes:{},attributeNameEntry:void 0}},Oa={name:"Draco",id:Ma.b?"draco":"draco-nodejs",module:"draco",shapes:["mesh"],version:"3.4.14",worker:!0,extensions:["drc"],mimeTypes:["application/octet-stream"],binary:!0,tests:["DRACO"],options:Ea};var Sa=n(578),Ta=n(449),Ca=n(1162);function La(e,t,n){const r=n?Pa(n.metadata):void 0;return Object(Ta.a)(e,t,r)}function Pa(e){const t=new Map;for(const n in e)t.set("".concat(n,".string"),JSON.stringify(e[n]));return t}const Ia={POSITION:"POSITION",NORMAL:"NORMAL",COLOR:"COLOR_0",TEX_COORD:"TEXCOORD_0"},Da={1:Int8Array,2:Uint8Array,3:Int16Array,4:Uint16Array,5:Int32Array,6:Uint32Array,9:Float32Array};class ka{constructor(e){Object(i.a)(this,"draco",void 0),Object(i.a)(this,"decoder",void 0),Object(i.a)(this,"metadataQuerier",void 0),this.draco=e,this.decoder=new this.draco.Decoder,this.metadataQuerier=new this.draco.MetadataQuerier}destroy(){this.draco.destroy(this.decoder),this.draco.destroy(this.metadataQuerier)}parseSync(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=new this.draco.DecoderBuffer;n.Init(new Int8Array(e),e.byteLength),this._disableAttributeTransforms(t);const r=this.decoder.GetEncodedGeometryType(n),i=r===this.draco.TRIANGULAR_MESH?new this.draco.Mesh:new this.draco.PointCloud;try{let e;switch(r){case this.draco.TRIANGULAR_MESH:e=this.decoder.DecodeBufferToMesh(n,i);break;case this.draco.POINT_CLOUD:e=this.decoder.DecodeBufferToPointCloud(n,i);break;default:throw new Error("DRACO: Unknown geometry type.")}if(!e.ok()||!i.ptr){const t="DRACO decompression failed: ".concat(e.error_msg());throw new Error(t)}const o=this._getDracoLoaderData(i,r,t),a=this._getMeshData(i,o,t),s=Object(Sa.a)(a.attributes),l=function(e,t,n){const r=Pa(t.metadata),i=[],o=function(e){const t={};for(const n in e){const r=e[n];t[r.name||"undefined"]=r}return t}(t.attributes);for(const t in e){const n=La(t,e[t],o[t]);i.push(n)}if(n){const e=La("indices",n);i.push(e)}return new Ca.a(i,r)}(a.attributes,o,a.indices);return{loader:"draco",loaderData:o,header:{vertexCount:i.num_points(),boundingBox:s},...a,schema:l}}finally{this.draco.destroy(n),i&&this.draco.destroy(i)}}_getDracoLoaderData(e,t,n){const r=this._getTopLevelMetadata(e),i=this._getDracoAttributes(e,n);return{geometry_type:t,num_attributes:e.num_attributes(),num_points:e.num_points(),num_faces:e instanceof this.draco.Mesh?e.num_faces():0,metadata:r,attributes:i}}_getDracoAttributes(e,t){const n={};for(let r=0;rthis.decoder[e]).includes(r)){const t=new this.draco.AttributeQuantizationTransform;try{if(t.InitFromAttribute(e))return{quantization_bits:t.quantization_bits(),range:t.range(),min_values:new Float32Array([1,2,3]).map(e=>t.min_value(e))}}finally{this.draco.destroy(t)}}return null}_getOctahedronTransform(e,t){const{octahedronAttributes:n=[]}=t,r=e.attribute_type();if(n.map(e=>this.decoder[e]).includes(r)){const t=new this.draco.AttributeQuantizationTransform;try{if(t.InitFromAttribute(e))return{quantization_bits:t.quantization_bits()}}finally{this.draco.destroy(t)}}return null}}const Ra=null,ja=null,Fa=null,Na=null;const Ba={};async function za(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return t&&(e=Ua(e,t,n)),Ba[e]=Ba[e]||Ha(e),await Ba[e]}function Ua(e,t,n){if(e.startsWith("http"))return e;const r=n.modules||{};return r[e]?r[e]:Ma.b?n.CDN?(function(e,t){if(!e)throw new Error(t||"loaders.gl assertion failed.")}(n.CDN.startsWith("http")),"".concat(n.CDN,"/").concat(t,"@").concat("3.4.14","/dist/libs/").concat(e)):Ma.c?"../src/libs/".concat(e):"modules/".concat(t,"/src/libs/").concat(e):"modules/".concat(t,"/dist/libs/").concat(e)}async function Ha(e){if(e.endsWith("wasm")){const t=await fetch(e);return await t.arrayBuffer()}if(!Ma.b)try{return r&&Fa&&await Fa(e)}catch{return null}if(Ma.c)return importScripts(e);const t=await fetch(e);return function(e,t){if(!Ma.b)return Na&&Na(e,t);if(Ma.c)return eval.call(Ma.a,e),null;const n=document.createElement("script");n.id=t;try{n.appendChild(document.createTextNode(e))}catch(t){n.text=e}return document.body.appendChild(n),null}(await t.text(),e)}const Va="https://www.gstatic.com/draco/versioned/decoders/".concat("1.5.5"),Ga="".concat(Va,"/draco_decoder.js"),Ya="".concat(Va,"/draco_wasm_wrapper.js"),Wa="".concat(Va,"/draco_decoder.wasm");"https://raw.githubusercontent.com/google/draco/".concat("1.4.1","/javascript/draco_encoder.js");let qa;async function Xa(e){const t=e.modules||{};return qa=t.draco3d?qa||t.draco3d.createDecoderModule({}).then(e=>({draco:e})):qa||async function(e){let t,n;switch(e.draco&&e.draco.decoderType){case"js":t=await za(Ga,"draco",e);break;case"wasm":default:[t,n]=await Promise.all([await za(Ya,"draco",e),await za(Wa,"draco",e)])}return t=t||globalThis.DracoDecoderModule,await function(e,t){const n={};t&&(n.wasmBinary=t);return new Promise(t=>{e({...n,onModuleLoaded:e=>t({draco:e})})})}(t,n)}(e),await qa}Ma.b;const Za={...Oa,parse:async function(e,t){const{draco:n}=await Xa(t),r=new ka(n);try{return r.parseSync(e,null==t?void 0:t.draco)}finally{r.destroy()}}};const Ka={BYTE:5120,UNSIGNED_BYTE:5121,SHORT:5122,UNSIGNED_SHORT:5123,INT:5124,UNSIGNED_INT:5125,FLOAT:5126,DOUBLE:5130},Qa={POINTS:0,LINES:1,LINE_LOOP:2,LINE_STRIP:3,TRIANGLES:4,TRIANGLE_STRIP:5,TRIANGLE_FAN:6,...Ka},Ja={[Ka.DOUBLE]:Float64Array,[Ka.FLOAT]:Float32Array,[Ka.UNSIGNED_SHORT]:Uint16Array,[Ka.UNSIGNED_INT]:Uint32Array,[Ka.UNSIGNED_BYTE]:Uint8Array,[Ka.BYTE]:Int8Array,[Ka.SHORT]:Int16Array,[Ka.INT]:Int32Array},$a={DOUBLE:Ka.DOUBLE,FLOAT:Ka.FLOAT,UNSIGNED_SHORT:Ka.UNSIGNED_SHORT,UNSIGNED_INT:Ka.UNSIGNED_INT,UNSIGNED_BYTE:Ka.UNSIGNED_BYTE,BYTE:Ka.BYTE,SHORT:Ka.SHORT,INT:Ka.INT};class es{static fromTypedArray(e){e=ArrayBuffer.isView(e)?e.constructor:e;for(const t in Ja){if(Ja[t]===e)return t}throw new Error("Failed to convert GL type")}static fromName(e){const t=$a[e];if(!t)throw new Error("Failed to convert GL type");return t}static getArrayType(e){switch(e){case Ka.UNSIGNED_SHORT_5_6_5:case Ka.UNSIGNED_SHORT_4_4_4_4:case Ka.UNSIGNED_SHORT_5_5_5_1:return Uint16Array;default:const t=Ja[e];if(!t)throw new Error("Failed to convert GL type");return t}}static getByteSize(e){return es.getArrayType(e).BYTES_PER_ELEMENT}static validate(e){return Boolean(es.getArrayType(e))}static createTypedArray(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3?arguments[3]:void 0;void 0===r&&(r=(t.byteLength-n)/es.getByteSize(e));return new(es.getArrayType(e))(t,n,r)}}class ts{constructor(e,t){Object(i.a)(this,"json",void 0),Object(i.a)(this,"buffer",void 0),Object(i.a)(this,"featuresLength",0),Object(i.a)(this,"_cachedTypedArrays",{}),this.json=e,this.buffer=t}getExtension(e){return this.json.extensions&&this.json.extensions[e]}hasProperty(e){return Boolean(this.json[e])}getGlobalProperty(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Qa.UNSIGNED_INT,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;const r=this.json[e];return r&&Number.isFinite(r.byteOffset)?this._getTypedArrayFromBinary(e,t,n,1,r.byteOffset):r}getPropertyArray(e,t,n){const r=this.json[e];return r&&Number.isFinite(r.byteOffset)?("componentType"in r&&(t=es.fromName(r.componentType)),this._getTypedArrayFromBinary(e,t,n,this.featuresLength,r.byteOffset)):this._getTypedArrayFromArray(e,t,r)}getProperty(e,t,n,r,i){const o=this.json[e];if(!o)return o;const a=this.getPropertyArray(e,t,n);if(1===n)return a[r];for(let e=0;ee[t],VEC2:(e,t)=>[e[2*t+0],e[2*t+1]],VEC3:(e,t)=>[e[3*t+0],e[3*t+1],e[3*t+2]],VEC4:(e,t)=>[e[4*t+0],e[4*t+1],e[4*t+2],e[4*t+3]],MAT2:(e,t)=>[e[4*t+0],e[4*t+1],e[4*t+2],e[4*t+3]],MAT3:(e,t)=>[e[9*t+0],e[9*t+1],e[9*t+2],e[9*t+3],e[9*t+4],e[9*t+5],e[9*t+6],e[9*t+7],e[9*t+8]],MAT4:(e,t)=>[e[16*t+0],e[16*t+1],e[16*t+2],e[16*t+3],e[16*t+4],e[16*t+5],e[16*t+6],e[16*t+7],e[16*t+8],e[16*t+9],e[16*t+10],e[16*t+11],e[16*t+12],e[16*t+13],e[16*t+14],e[16*t+15]]},is={SCALAR:(e,t,n)=>{t[n]=e},VEC2:(e,t,n)=>{t[2*n+0]=e[0],t[2*n+1]=e[1]},VEC3:(e,t,n)=>{t[3*n+0]=e[0],t[3*n+1]=e[1],t[3*n+2]=e[2]},VEC4:(e,t,n)=>{t[4*n+0]=e[0],t[4*n+1]=e[1],t[4*n+2]=e[2],t[4*n+3]=e[3]},MAT2:(e,t,n)=>{t[4*n+0]=e[0],t[4*n+1]=e[1],t[4*n+2]=e[2],t[4*n+3]=e[3]},MAT3:(e,t,n)=>{t[9*n+0]=e[0],t[9*n+1]=e[1],t[9*n+2]=e[2],t[9*n+3]=e[3],t[9*n+4]=e[4],t[9*n+5]=e[5],t[9*n+6]=e[6],t[9*n+7]=e[7],t[9*n+8]=e[8],t[9*n+9]=e[9]},MAT4:(e,t,n)=>{t[16*n+0]=e[0],t[16*n+1]=e[1],t[16*n+2]=e[2],t[16*n+3]=e[3],t[16*n+4]=e[4],t[16*n+5]=e[5],t[16*n+6]=e[6],t[16*n+7]=e[7],t[16*n+8]=e[8],t[16*n+9]=e[9],t[16*n+10]=e[10],t[16*n+11]=e[11],t[16*n+12]=e[12],t[16*n+13]=e[13],t[16*n+14]=e[14],t[16*n+15]=e[15]}};const os=e=>void 0!==e;function as(e,t,n){if(!t)return null;let r=e.getExtension("3DTILES_batch_table_hierarchy");const i=t.HIERARCHY;return i&&(console.warn("3D Tile Parser: HIERARCHY is deprecated. Use 3DTILES_batch_table_hierarchy."),t.extensions=t.extensions||{},t.extensions["3DTILES_batch_table_hierarchy"]=i,r=i),r?function(e,t){let n,r,i;const o=e.instancesLength,a=e.classes;let s,l=e.classIds,u=e.parentCounts,c=e.parentIds,d=o;os(l.byteOffset)&&(l.componentType=defaultValue(l.componentType,GL.UNSIGNED_SHORT),l.type=AttributeType.SCALAR,i=getBinaryAccessor(l),l=i.createArrayBufferView(t.buffer,t.byteOffset+l.byteOffset,o));if(os(u))for(os(u.byteOffset)&&(u.componentType=defaultValue(u.componentType,GL.UNSIGNED_SHORT),u.type=AttributeType.SCALAR,i=getBinaryAccessor(u),u=i.createArrayBufferView(t.buffer,t.byteOffset+u.byteOffset,o)),s=new Uint16Array(o),d=0,n=0;n0?function(e,t,n){const r=e.classIds,i=e.parentCounts,o=e.parentIds,a=e.parentIndexes,s=r.length,l=scratchVisited;l.length=Math.max(l.length,s);const u=++marker,c=scratchStack;c.length=0,c.push(t);for(;c.length>0;){if(t=c.pop(),l[t]===u)continue;l[t]=u;const r=n(e,t);if(os(r))return r;const s=i[t],d=a[t];for(let e=0;ee,ds={HIERARCHY:!0,extensions:!0,extras:!0};class fs{constructor(e,t,n){var r;let o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};Object(i.a)(this,"json",void 0),Object(i.a)(this,"binary",void 0),Object(i.a)(this,"featureCount",void 0),Object(i.a)(this,"_extensions",void 0),Object(i.a)(this,"_properties",void 0),Object(i.a)(this,"_binaryProperties",void 0),Object(i.a)(this,"_hierarchy",void 0),Object(Ci.a)(n>=0),this.json=e||{},this.binary=t,this.featureCount=n,this._extensions=(null===(r=this.json)||void 0===r?void 0:r.extensions)||{},this._properties={};for(const e in this.json)ds[e]||(this._properties[e]=this.json[e]);this._binaryProperties=this._initializeBinaryProperties(),o["3DTILES_batch_table_hierarchy"]&&(this._hierarchy=as(this,this.json,this.binary))}getExtension(e){return this.json&&this.json.extensions&&this.json.extensions[e]}memorySizeInBytes(){return 0}isClass(e,t){if(this._checkBatchId(e),Object(Ci.a)("string"==typeof t,t),this._hierarchy){return us(ss(this._hierarchy,e,(e,n)=>{const r=e.classIds[n];return e.classes[r].name===t}))}return!1}isExactClass(e,t){return Object(Ci.a)("string"==typeof t,t),this.getExactClassName(e)===t}getExactClassName(e){if(this._checkBatchId(e),this._hierarchy){const t=this._hierarchy.classIds[e];return this._hierarchy.classes[t].name}}hasProperty(e,t){return this._checkBatchId(e),Object(Ci.a)("string"==typeof t,t),us(this._properties[t])||this._hasPropertyInHierarchy(e,t)}getPropertyNames(e,t){this._checkBatchId(e),(t=us(t)?t:[]).length=0;const n=Object.keys(this._properties);return t.push(...n),this._hierarchy&&this._getPropertyNamesInHierarchy(e,t),t}getProperty(e,t){if(this._checkBatchId(e),Object(Ci.a)("string"==typeof t,t),this._binaryProperties){const n=this._binaryProperties[t];if(us(n))return this._getBinaryProperty(n,e)}const n=this._properties[t];if(us(n))return cs(n[e]);if(this._hierarchy){const n=this._getHierarchyProperty(e,t);if(us(n))return n}}setProperty(e,t,n){const r=this.featureCount;if(this._checkBatchId(e),Object(Ci.a)("string"==typeof t,t),this._binaryProperties){const r=this._binaryProperties[t];if(r)return void this._setBinaryProperty(r,e,n)}if(this._hierarchy&&this._setHierarchyProperty(this,e,t,n))return;let i=this._properties[t];us(i)||(this._properties[t]=new Array(r),i=this._properties[t]),i[e]=cs(n)}_checkBatchId(e){if(!(e>=0&&e{const r=e.classIds[n];return us(e.classes[r].instances[t])});return us(n)}_getPropertyNamesInHierarchy(e,t){ss(this._hierarchy,e,(e,n)=>{const r=e.classIds[n],i=e.classes[r].instances;for(const e in i)i.hasOwnProperty(e)&&-1===t.indexOf(e)&&t.push(e)})}_getHierarchyProperty(e,t){return ss(this._hierarchy,e,(e,n)=>{const r=e.classIds[n],i=e.classes[r],o=e.classIndexes[n],a=i.instances[t];return us(a)?us(a.typedArray)?this._getBinaryProperty(a,o):cs(a[o]):null})}_setHierarchyProperty(e,t,n,r){const i=ss(this._hierarchy,t,(e,i)=>{const o=e.classIds[i],a=e.classes[o],s=e.classIndexes[i],l=a.instances[n];return!!us(l)&&(Object(Ci.a)(i===t,'Inherited property "'.concat(n,'" is read-only.')),us(l.typedArray)?this._setBinaryProperty(l,s,r):l[s]=cs(r),!0)});return us(i)}}function hs(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;const r=new DataView(t);if(e.magic=r.getUint32(n,!0),n+=4,e.version=r.getUint32(n,!0),n+=4,e.byteLength=r.getUint32(n,!0),n+=4,1!==e.version)throw new Error("3D Tile Version ".concat(e.version," not supported"));return n}function ps(e,t,n){const r=new DataView(t);let i;e.header=e.header||{};let o=r.getUint32(n,!0);n+=4;let a=r.getUint32(n,!0);n+=4;let s=r.getUint32(n,!0);n+=4;let l=r.getUint32(n,!0);return n+=4,s>=570425344?(n-=8,i=o,s=a,l=0,o=0,a=0,console.warn("b3dm tile in legacy format.")):l>=570425344&&(n-=4,i=s,s=o,l=a,o=0,a=0,console.warn("b3dm tile in legacy format.")),e.header.featureTableJsonByteLength=o,e.header.featureTableBinaryByteLength=a,e.header.batchTableJsonByteLength=s,e.header.batchTableBinaryByteLength=l,e.header.batchLength=i,n}function As(e,t,n,r){return n=function(e,t,n,r){const{featureTableJsonByteLength:i,featureTableBinaryByteLength:o,batchLength:a}=e.header;if(e.featureTableJson={BATCH_LENGTH:a||0},i>0){const r=wa(t,n,i);e.featureTableJson=JSON.parse(r)}return n+=i,e.featureTableBinary=new Uint8Array(t,n,o),n+=o}(e,t,n),n=function(e,t,n,r){const{batchTableJsonByteLength:i,batchTableBinaryByteLength:o}=e.header;if(i>0){const r=wa(t,n,i);e.batchTableJson=JSON.parse(r),n+=i,o>0&&(e.batchTableBinary=new Uint8Array(t,n,o),e.batchTableBinary=new Uint8Array(e.batchTableBinary),n+=o)}return n}(e,t,n)}function gs(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[0,0,0];const n=e>>11&31,r=e>>5&63,i=31&e;return t[0]=n<<3,t[1]=r<<2,t[2]=i<<3,t}function ms(e,t,n){if(!(t||e&&e.batchIds&&n))return null;const{batchIds:r,isRGB565:i,pointCount:o}=e;if(r&&n){const e=new Uint8ClampedArray(3*o);for(let t=0;t255*e);e[3*t]=o[0],e[3*t+1]=o[1],e[3*t+2]=o[2]}return{type:Qa.UNSIGNED_BYTE,value:e,size:3,normalized:!0}}if(i){const e=new Uint8ClampedArray(3*o);for(let n=0;n1&&void 0!==arguments[1]?arguments[1]:255;return Object(Qr.a)(e,0,t)/t*2-1}function ws(e){return e<0?-1:1}function xs(e,t,n,r){if(bs(r),e<0||e>n||t<0||t>n)throw new Error("x and y must be unsigned normalized integers between 0 and ".concat(n));if(r.x=_s(e,n),r.y=_s(t,n),r.z=1-(Math.abs(r.x)+Math.abs(r.y)),r.z<0){const e=r.x;r.x=(1-Math.abs(r.y))*ws(e),r.y=(1-Math.abs(e))*ws(r.y)}return r.normalize()}function Ms(e,t,n){return xs(e,t,255,n)}const Es=new Wr.a;function Os(e,t,n){return e.isQuantized?n["3d-tiles"]&&n["3d-tiles"].decodeQuantizedPositions?(e.isQuantized=!1,function(e,t){const n=new Wr.a,r=new Float32Array(3*e.pointCount);for(let i=0;i12;){const a={};e.tiles.push(a),n=await o(t,n,r,i,a)}return n}async function Ns(e,t,n,r){e.rotateYtoZ=!0,e.gltfUpAxis=n["3d-tiles"]&&n["3d-tiles"].assetGltfUpAxis?n["3d-tiles"].assetGltfUpAxis:"Y";const{parse:i}=r;e.gltf=await i(t,Ts.a,n,r),e.gpuMemoryUsageInBytes=Object(Cs.d)(e.gltf)}async function Bs(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};switch(i.byteOffset=t,i.type=xa(e,t),i.type){case _a.COMPOSITE:return await Fs(i,e,t,n,r,Bs);case _a.BATCHED_3D_MODEL:return await Rs(i,e,t,n,r);case _a.GLTF:return await Ns(i,e,n,r);case _a.INSTANCED_3D_MODEL:return await js(i,e,t,n,r);case _a.POINT_CLOUD:return await Ss(i,e,t,n,r);default:throw new Error("3DTileLoader: unknown type ".concat(i.type))}}async function zs(e,t,n,r){const i=e[t].bufferView,o=e.bufferViews[i],a=e.buffers[o.buffer];if(null==r||!r.url||!r.fetch)throw new Error("Url is not provided");if(!r.fetch)throw new Error("fetch is not provided");if(a.uri){const e=function(e,t){if(t.startsWith("http")){const n=new URL(e,t);return decodeURI(n.toString())}const n="http://".concat(t),r=new URL(e,n);return"/".concat(r.host).concat(r.pathname)}(a.uri,null==r?void 0:r.url),t=await r.fetch(e),n=await t.arrayBuffer();return new Uint8Array(n,o.byteOffset,o.byteLength)}return new Uint8Array(n,o.byteOffset,o.byteLength)}function Us(e){const t=new DataView(e);return t.getUint32(0,!0)+2**32*t.getUint32(4,!0)}const Hs={id:"3d-tiles-subtree",name:"3D Tiles Subtree",module:"3d-tiles",version:"3.4.14",extensions:["subtree"],mimeTypes:["application/octet-stream"],tests:["subtree"],parse:async function(e,t,n){if(1952609651!==new Uint32Array(e.slice(0,4))[0])throw new Error("Wrong subtree file magic number");if(1!==new Uint32Array(e.slice(4,8))[0])throw new Error("Wrong subtree file verson, must be 1");const r=Us(e.slice(8,16)),i=new Uint8Array(e,24,r),o=new TextDecoder("utf8").decode(i),a=JSON.parse(o),s=Us(e.slice(16,24));let l=new ArrayBuffer(0);return s&&(l=e.slice(24+r)),"bufferView"in a.tileAvailability&&(a.tileAvailability.explicitBitstream=await zs(a,"tileAvailability",l,n)),"bufferView"in a.contentAvailability&&(a.contentAvailability.explicitBitstream=await zs(a,"contentAvailability",l,n)),"bufferView"in a.childSubtreeAvailability&&(a.childSubtreeAvailability.explicitBitstream=await zs(a,"childSubtreeAvailability",l,n)),a},options:{}};var Vs=n(321),Gs=n.n(Vs);function Ys(e){"X"===e&&(e="");const t=e.padEnd(16,"0");return Gs.a.fromString(t,!0,16)}const Ws=180/Math.PI;function qs(e,t,n){const r=1<=.5?1/3*(4*e*e-1):1/3*(1-4*(1-e)*(1-e))}function Zs(e){return[Xs(e[0]),Xs(e[1])]}function Ks(e,t){let[n,r]=t;switch(e){case 0:return[1,n,r];case 1:return[-n,1,r];case 2:return[-n,-r,1];case 3:return[-1,-r,-n];case 4:return[r,-1,-n];case 5:return[r,n,-1];default:throw new Error("Invalid face")}}function Qs(e){let[t,n,r]=e;const i=Math.atan2(r,Math.sqrt(t*t+n*n));return[Math.atan2(n,t)*Ws,i*Ws]}function Js(e,t,n,r){if(0===r){1===n&&(t[0]=e-1-t[0],t[1]=e-1-t[1]);const r=t[0];t[0]=t[1],t[1]=r}}function $s(e){return function(e){if(0===e.length)throw new Error("Invalid Hilbert quad key ".concat(e));const t=e.split("/"),n=parseInt(t[0],10),r=t[1],i=r.length;let o=0;const a=[0,0];for(let e=i-1;e>=0;e--){o=i-e;const t=r[e];let n=0,s=0;"1"===t?s=1:"2"===t?(n=1,s=1):"3"===t&&(n=1);const l=Math.pow(2,o-1);Js(l,a,n,s),a[0]+=l*n,a[1]+=l*s}if(n%2==1){const e=a[0];a[0]=a[1],a[1]=e}return{face:n,ij:a,level:o}}(function(e){if(e.indexOf("/")>0)return e;return function(e){if(e.isZero())return"";let t=e.toString(2);for(;t.length<64;)t="0"+t;const n=t.lastIndexOf("1"),r=t.substring(0,3),i=t.substring(3,n),o=i.length/2,a=Gs.a.fromString(r,!0,2).toString(10);let s="";if(0!==o)for(s=Gs.a.fromString(i,!0,2).toString(4);s.length89.999&&(e[0]=l);const i=e[0]-l;e[0]+=i>180?-360:i<-180?360:0,a[s++]=e[0],a[s++]=e[1],l=e[0]}}return a[s++]=a[0],a[s++]=a[1],a}function tl(e){if(e.length%2!=0)throw new Error("Invalid corners");const t=[],n=[];for(let r=0;re-t),n.sort((e,t)=>e-t),{west:t[0],east:t[t.length-1],north:n[n.length-1],south:n[0]}}function nl(e,t){const n=(null==t?void 0:t.minimumHeight)||0,r=(null==t?void 0:t.maximumHeight)||0,i=function(e){let t;if(2===e.face||5===e.face){let n=null,r=0;for(let t=0;t<4;t++){const i=el($s("".concat(e.face,"/").concat(t)));null==n&&(n=new Float64Array(4*i.length)),n.set(i,r),r+=i.length}t=tl(n)}else{t=tl(el(e))}return t}($s(e)),o=i.west,a=i.south,s=i.east,l=i.north,u=[];return u.push(new Wr.a(o,l,n)),u.push(new Wr.a(s,l,n)),u.push(new Wr.a(s,a,n)),u.push(new Wr.a(o,a,n)),u.push(new Wr.a(o,l,r)),u.push(new Wr.a(s,l,r)),u.push(new Wr.a(s,a,r)),u.push(new Wr.a(o,a,r)),u}function rl(e){return function(e){const t=Zs(qs(e.ij,e.level,[.5,.5]));return Qs(Ks(e.face,t))}($s(e))}function il(e){const t=e.token,n={minimumHeight:e.minimumHeight,maximumHeight:e.maximumHeight},r=nl(t,n),i=rl(t),o=i[0],a=i[1],s=_i.WGS84.cartographicToCartesian([o,a,n.maximumHeight]),l=new Wr.a(s[0],s[1],s[2]);r.push(l);const u=er(r);return[...u.center,...u.halfAxes]}const ol={QUADTREE:4,OCTREE:8};function al(e,t,n){if(null!=e&&e.box){const r=function(e){if(e.isZero())return"X";let t=e.countTrailingZeros();t=(t-t%4)/4;const n=t;t*=4;const r=e.shiftRightUnsigned(t).toString(16).replace(/0+$/,"");return Array(17-n-r.length).join("0")+r}(function(e,t){const n=function(e){return e.and(e.not().add(1))}(e).shiftRightUnsigned(2);return e.add(Gs.a.fromNumber(2*t+1-4).multiply(n))}(Ys(e.s2VolumeInfo.token),t)),i={...e.s2VolumeInfo};switch(i.token=r,n){case"OCTREE":const t=e.s2VolumeInfo,n=t.maximumHeight-t.minimumHeight,r=n/2,i=t.minimumHeight+n/2;t.minimumHeight=i-r,t.maximumHeight=i+r}return{box:il(i),s2VolumeInfo:i}}}function sl(e,t){return"constant"in e?Boolean(e.constant):!!e.explicitBitstream&&function(e,t){const n=Math.floor(e/8),r=e%8;return 1==(t[n]>>r&1)}(t,e.explicitBitstream)}function ll(e,t,n,r,i){const{basePath:o,refine:a,getRefine:s,lodMetricType:l,getTileType:u,rootLodMetricValue:c,rootBoundingVolume:d}=r,f=e.contentUrl&&e.contentUrl.replace("".concat(o,"/"),""),h=c/2**t,p=function(e,t,n){if(t.region){const{childTileX:r,childTileY:i,childTileZ:o}=n,[a,s,l,u,c,d]=t.region,f=2**e,h=(l-a)/f,p=(u-s)/f,A=(d-c)/f,[g,m]=[a+h*r,a+h*(r+1)],[y,v]=[s+p*i,s+p*(i+1)],[b,_]=[c+A*o,c+A*(o+1)];return{region:[g,y,m,v,b,_]}}if(t.box)return t;throw new Error("Unsupported bounding volume type ".concat(t))}(t,null!=i&&i.box?{box:i.box}:d,n);return{children:e.children,contentUrl:e.contentUrl,content:{uri:f},id:e.contentUrl,refine:s(a),type:u(e),lodMetricType:l,lodMetricValue:h,geometricError:h,transform:e.transform,boundingVolume:p}}function ul(e,t){return parseInt(e.toString(2)+t.toString(2),2)}function cl(e,t,n,r,i){const o=function(e){const t={};for(const n in e)t["{".concat(n,"}")]=e[n];return t}({level:t,x:n,y:r,z:i});return e.replace(/{level}|{x}|{y}|{z}/gi,e=>o[e])}function dl(e){if(!e.contentUrl)return Do;const t=e.contentUrl.split("?")[0].split(".").pop();switch(t){case"pnts":return Ro;case"i3dm":case"b3dm":case"glb":case"gltf":return ko;default:return t}}function fl(e){switch(e){case"REPLACE":case"replace":return Io;case"ADD":case"add":return Po;default:return e}}function hl(e,t){if(/^[a-z][0-9a-z+.-]*:/i.test(t)){const n=new URL(e,"".concat(t,"/"));return decodeURI(n.toString())}return e.startsWith("/")?e:"".concat(t,"/").concat(e)}function pl(e,t){if(!e)return null;if(e.content){const n=e.content.uri||e.content.url;e.contentUrl=hl(n,t.basePath)}return e.id=e.contentUrl,e.lodMetricType=Bo,e.lodMetricValue=e.geometricError,e.transformMatrix=e.transform,e.type=dl(e),e.refine=fl(e.refine),e}async function Al(e,t,n,r){var i,o;const a=t.basePath,{subdivisionScheme:s,maximumLevel:l,subtreeLevels:u,subtrees:{uri:c}}=n,d=hl(cl(c,0,0,0,0),a),f=await Object(Gr.a)(d,Hs,r),h=hl(e.content.uri,a),p=null==t||null===(i=t.root)||void 0===i?void 0:i.refine,A=e.geometricError,g=null===(o=e.boundingVolume.extensions)||void 0===o?void 0:o["3DTILES_bounding_volume_S2"];if(g){const t={box:il(g),s2VolumeInfo:g};e.boundingVolume=t}const m=e.boundingVolume,y={contentUrlTemplate:h,subtreesUriTemplate:c,subdivisionScheme:s,subtreeLevels:u,maximumLevel:l,refine:p,basePath:a,lodMetricType:Bo,rootLodMetricValue:A,rootBoundingVolume:m,getTileType:dl,getRefine:fl};return await async function(e,t,n){if(!e)return null;e.lodMetricType=Bo,e.lodMetricValue=e.geometricError,e.transformMatrix=e.transform;const{children:r,contentUrl:i}=await async function e(t){const{options:n,parentData:r={mortonIndex:0,x:0,y:0,z:0},childIndex:i=0,globalData:o={level:0,mortonIndex:0,x:0,y:0,z:0},s2VolumeBox:a}=t;let{subtree:s,level:l=0}=t;const{subdivisionScheme:u,subtreeLevels:c,maximumLevel:d,contentUrlTemplate:f,subtreesUriTemplate:h,basePath:p}=n,A={children:[],lodMetricValue:0,contentUrl:""},g=ol[u],m=1&i,y=i>>1&1,v=i>>2&1,b=(g**l-1)/(g-1);let _=ul(r.mortonIndex,i),w=b+_,x=ul(r.x,m),M=ul(r.y,y),E=ul(r.z,v),O=!1;l+1>c&&(O=sl(s.childSubtreeAvailability,_));const S=ul(o.x,x),T=ul(o.y,M),C=ul(o.z,E),L=l+o.level;if(O){const e=cl("".concat(p,"/").concat(h),L,S,T,C);s=await Object(Gr.a)(e,Hs),o.mortonIndex=_,o.x=x,o.y=M,o.z=E,o.level=l,_=0,w=0,x=0,M=0,E=0,l=0}if(!sl(s.tileAvailability,w)||l>d)return A;sl(s.contentAvailability,w)&&(A.contentUrl=cl(f,L,S,T,C));const P=l+1,I={mortonIndex:_,x:x,y:M,z:E};for(let t=0;t0;){const r=(o.pop()||{}).children||[];for(let i of r){const r=gl(i);r?i=await Al(i,e,r,t):pl(i,{basePath:n}),o.push(i)}}return r}(i,t),i.type=No,i.lodMetricType=Bo,i.lodMetricValue=(null===(r=i.root)||void 0===r?void 0:r.lodMetricValue)||0,i}(e,t,n):await async function(e,t,n){const r={content:{featureIds:null}};return await Bs(e,0,t,n,r.content),r.content}(e,t,n);return e},options:{"3d-tiles":{loadGLTF:!0,decodeQuantizedPositions:!1,isTileset:"auto",assetGltfUpAxis:null}}};const yl=[0],vl={getPointColor:{type:"accessor",value:[0,0,0,255]},pointSize:1,data:"",loader:ml,onTilesetLoad:{type:"function",value:e=>{}},onTileLoad:{type:"function",value:e=>{}},onTileUnload:{type:"function",value:e=>{}},onTileError:{type:"function",value:(e,t,n)=>{}},_getMeshColor:{type:"function",value:e=>[255,255,255]}};class bl extends o.a{constructor(...e){super(...e),Object(i.a)(this,"state",void 0)}initializeState(){"onTileLoadFail"in this.props&&jr.a.removed("onTileLoadFail","onTileError")(),this.state={layerMap:{},tileset3d:null,activeViewports:{},lastUpdatedViewports:null}}get isLoaded(){const{tileset3d:e}=this.state;return null!==e&&e.isLoaded()}shouldUpdateState({changeFlags:e}){return e.somethingChanged}updateState({props:e,oldProps:t,changeFlags:n}){if(e.data&&e.data!==t.data&&this._loadTileset(e.data),n.viewportChanged){const{activeViewports:e}=this.state;Object.keys(e).length&&(this._updateTileset(e),this.state.lastUpdatedViewports=e,this.state.activeViewports={})}if(n.propsChanged){const{layerMap:e}=this.state;for(const t in e)e[t].needsUpdate=!0}}activateViewport(e){const{activeViewports:t,lastUpdatedViewports:n}=this.state;this.internalState.viewport=e,t[e.id]=e;const r=null==n?void 0:n[e.id];r&&e.equals(r)||(this.setChangeFlags({viewportChanged:!0}),this.setNeedsUpdate())}getPickingInfo({info:e,sourceLayer:t}){const n=t&&t.props.tile;return e.picked&&(e.object=n),e.sourceTile=n,e}filterSubLayer({layer:e,viewport:t}){const{tile:n}=e.props,{id:r}=t;return n.selected&&n.viewportIds.includes(r)}_updateAutoHighlight(e){const t=e.sourceTile,n=this.state.layerMap[null==t?void 0:t.id];n&&n.layer&&n.layer.updateAutoHighlight(e)}async _loadTileset(e){const{loadOptions:t={}}=this.props;let n=this.props.loader||this.props.loaders;Array.isArray(n)&&(n=n[0]);const r={loadOptions:{...t}};let i=e;if(n.preload){const o=await n.preload(e,t);o.url&&(i=o.url),o.headers&&(r.loadOptions.fetch={...r.loadOptions.fetch,headers:o.headers}),Object.assign(r,o)}const o=await Object(Gr.a)(i,n,r.loadOptions),a=new ba(o,{onTileLoad:this._onTileLoad.bind(this),onTileUnload:this._onTileUnload.bind(this),onTileError:this.props.onTileError,...r});this.setState({tileset3d:a,layerMap:{}}),this._updateTileset(this.state.activeViewports),this.props.onTilesetLoad(a)}_onTileLoad(e){const{lastUpdatedViewports:t}=this.state;this.props.onTileLoad(e),this._updateTileset(t),this.setNeedsUpdate()}_onTileUnload(e){delete this.state.layerMap[e.id],this.props.onTileUnload(e)}_updateTileset(e){if(!e)return;const{tileset3d:t}=this.state,{timeline:n}=this.context,r=Object.keys(e).length;n&&r&&t&&t.selectTiles(Object.values(e)).then(e=>{this.state.frameNumber!==e&&this.setState({frameNumber:e})})}_getSubLayer(e,t){if(!e.content)return null;switch(e.type){case Ro:return this._makePointCloudLayer(e,t);case ko:return this._make3DModelLayer(e);case jo:return this._makeSimpleMeshLayer(e,t);default:throw new Error("Tile3DLayer: Failed to render layer of type ".concat(e.content.type))}}_makePointCloudLayer(e,t){const{attributes:n,pointCount:r,constantRGBA:i,cartographicOrigin:o,modelMatrix:a}=e.content,{positions:l,normals:u,colors:c}=n;if(!l)return null;const d=t&&t.props.data||{header:{vertexCount:r},attributes:{POSITION:l,NORMAL:u,COLOR_0:c}},{pointSize:f,getPointColor:h}=this.props;return new(this.getSubLayerClass("pointcloud",Fr.a))({pointSize:f},this.getSubLayerProps({id:"pointcloud"}),{id:"".concat(this.id,"-pointcloud-").concat(e.id),tile:e,data:d,coordinateSystem:s.a.METER_OFFSETS,coordinateOrigin:o,modelMatrix:a,getColor:i||h,_offset:0})}_make3DModelLayer(e){const{gltf:t,instances:n,cartographicOrigin:r,modelMatrix:i}=e.content;return new(this.getSubLayerClass("scenegraph",Nr.a))({_lighting:"pbr"},this.getSubLayerProps({id:"scenegraph"}),{id:"".concat(this.id,"-scenegraph-").concat(e.id),tile:e,data:n||yl,scenegraph:t,coordinateSystem:s.a.METER_OFFSETS,coordinateOrigin:r,modelMatrix:i,getTransformMatrix:e=>e.modelMatrix,getPosition:[0,0,0],_offset:0})}_makeSimpleMeshLayer(e,t){const n=e.content,{attributes:r,indices:i,modelMatrix:o,cartographicOrigin:a,coordinateSystem:l=s.a.METER_OFFSETS,material:u,featureIds:c}=n,{_getMeshColor:d}=this.props,f=t&&t.props.mesh||new Rr.a({drawMode:4,attributes:_l(r),indices:i});return new(this.getSubLayerClass("mesh",Vr))(this.getSubLayerProps({id:"mesh"}),{id:"".concat(this.id,"-mesh-").concat(e.id),tile:e,mesh:f,data:yl,getColor:d(e),pbrMaterial:u,modelMatrix:o,coordinateOrigin:a,coordinateSystem:l,featureIds:c,_offset:0})}renderLayers(){const{tileset3d:e,layerMap:t}=this.state;return e?e.tiles.map(e=>{const n=t[e.id]=t[e.id]||{tile:e};let{layer:r}=n;return e.selected&&(r?n.needsUpdate&&(r=this._getSubLayer(e,r),n.needsUpdate=!1):r=this._getSubLayer(e)),n.layer=r,r}).filter(Boolean):null}}function _l(e){const t={};return t.positions={...e.positions,value:new Float32Array(e.positions.value)},e.normals&&(t.normals=e.normals),e.texCoords&&(t.texCoords=e.texCoords),e.colors&&(t.colors=e.colors),e.uvRegions&&(t.uvRegions=e.uvRegions),t}Object(i.a)(bl,"defaultProps",vl),Object(i.a)(bl,"layerName","Tile3DLayer");const wl={name:"Terrain",id:"terrain",module:"terrain",version:"3.4.14",worker:!0,extensions:["png","pngraw","jpg","jpeg","gif","webp","bmp"],mimeTypes:["image/png","image/jpeg","image/gif","image/webp","image/bmp"],options:{terrain:{tesselator:"auto",bounds:null,meshMaxError:10,elevationDecoder:{rScaler:1,gScaler:0,bScaler:0,offset:0},skirtHeight:null}}},xl=[1],Ml={...xr.defaultProps,elevationData:ar,texture:{...ar,optional:!0},meshMaxError:{type:"number",value:4},bounds:{type:"array",value:null,optional:!0,compare:!0},color:{type:"color",value:[255,255,255]},elevationDecoder:{type:"object",value:{rScaler:1,gScaler:0,bScaler:0,offset:0}},workerUrl:"",wireframe:!1,material:!0,loaders:[wl]};function El(e){return Array.isArray(e)?e.join(";"):e||""}class Ol extends o.a{constructor(...e){super(...e),Object(i.a)(this,"state",void 0)}updateState({props:e,oldProps:t}){const n=e.elevationData!==t.elevationData;if(n){const{elevationData:t}=e,n=t&&(Array.isArray(t)||t.includes("{x}")&&t.includes("{y}"));this.setState({isTiled:n})}const r=n||e.meshMaxError!==t.meshMaxError||e.elevationDecoder!==t.elevationDecoder||e.bounds!==t.bounds;if(!this.state.isTiled&&r){const t=this.loadTerrain(e);this.setState({terrain:t})}e.workerUrl&&jr.a.removed("workerUrl","loadOptions.terrain.workerUrl")()}loadTerrain({elevationData:e,bounds:t,elevationDecoder:n,meshMaxError:r,signal:i}){var o;if(!e)return null;let a=this.getLoadOptions();a={...a,terrain:{skirtHeight:this.state.isTiled?2*r:0,...null===(o=a)||void 0===o?void 0:o.terrain,bounds:t,meshMaxError:r,elevationDecoder:n}};const{fetch:s}=this.props;return s(e,{propName:"elevationData",layer:this,loadOptions:a,signal:i})}getTiledTerrainData(e){const{elevationData:t,fetch:n,texture:r,elevationDecoder:i,meshMaxError:o}=this.props,{viewport:a}=this.context,s=lr(t,e),l=r&&lr(r,e),{signal:u}=e;let c=[0,0],d=[0,0];if(a.isGeospatial){const t=e.bbox;c=a.projectFlat([t.west,t.south]),d=a.projectFlat([t.east,t.north])}else{const t=e.bbox;c=[t.left,t.bottom],d=[t.right,t.top]}const f=[c[0],c[1],d[0],d[1]],h=this.loadTerrain({elevationData:s,bounds:f,elevationDecoder:i,meshMaxError:o,signal:u}),p=l?n(l,{propName:"texture",layer:this,loaders:[],signal:u}).catch(e=>null):Promise.resolve(null);return Promise.all([h,p])}renderSubLayers(e){const t=this.getSubLayerClass("mesh",Hr.a),{color:n,wireframe:r,material:i}=this.props,{data:o}=e;if(!o)return null;const[a,l]=o;return new t(e,{data:xl,mesh:a,texture:l,_instanced:!1,coordinateSystem:s.a.CARTESIAN,getPosition:e=>[0,0,0],getColor:n,wireframe:r,material:i})}onViewportLoad(e){if(!e)return;const{zRange:t}=this.state,n=e.map(e=>e.content).filter(Boolean).map(e=>e[0].header.boundingBox.map(e=>e[2]));if(0===n.length)return;const r=Math.min(...n.map(e=>e[0])),i=Math.max(...n.map(e=>e[1]));(!t||rt[1])&&this.setState({zRange:[r,i]})}renderLayers(){const{color:e,material:t,elevationData:n,texture:r,wireframe:i,meshMaxError:o,elevationDecoder:a,tileSize:s,maxZoom:l,minZoom:u,extent:c,maxRequests:d,onTileLoad:f,onTileUnload:h,onTileError:p,maxCacheSize:A,maxCacheByteSize:g,refinementStrategy:m}=this.props;if(this.state.isTiled)return new xr(this.getSubLayerProps({id:"tiles"}),{getTileData:this.getTiledTerrainData.bind(this),renderSubLayers:this.renderSubLayers.bind(this),updateTriggers:{getTileData:{elevationData:El(n),texture:El(r),meshMaxError:o,elevationDecoder:a}},onViewportLoad:this.onViewportLoad.bind(this),zRange:this.state.zRange||null,tileSize:s,maxZoom:l,minZoom:u,extent:c,maxRequests:d,onTileLoad:f,onTileUnload:h,onTileError:p,maxCacheSize:A,maxCacheByteSize:g,refinementStrategy:m});return new(this.getSubLayerClass("mesh",Hr.a))(this.getSubLayerProps({id:"mesh"}),{data:xl,mesh:this.state.terrain,texture:r,_instanced:!1,getPosition:e=>[0,0,0],getColor:e,material:t,wireframe:i})}}Object(i.a)(Ol,"defaultProps",Ml),Object(i.a)(Ol,"layerName","TerrainLayer");var Sl=n(885),Tl=n(235);function Cl(e,t,n){const r=Ll(e),i=Object.keys(r).filter(e=>r[e]!==Array);return function(e,t,n){const{pointPositionsCount:r,pointFeaturesCount:i,linePositionsCount:o,linePathsCount:a,lineFeaturesCount:s,polygonPositionsCount:l,polygonObjectsCount:u,polygonRingsCount:c,polygonFeaturesCount:d,propArrayTypes:f,coordLength:h}=t,{numericPropKeys:p=[],PositionDataType:A=Float32Array,triangulate:g=!0}=n,m=e[0]&&"id"in e[0],y=e.length>65535?Uint32Array:Uint16Array,v={type:"Point",positions:new A(r*h),globalFeatureIds:new y(r),featureIds:i>65535?new Uint32Array(r):new Uint16Array(r),numericProps:{},properties:[],fields:[]},b={type:"LineString",pathIndices:o>65535?new Uint32Array(a+1):new Uint16Array(a+1),positions:new A(o*h),globalFeatureIds:new y(o),featureIds:s>65535?new Uint32Array(o):new Uint16Array(o),numericProps:{},properties:[],fields:[]},_={type:"Polygon",polygonIndices:l>65535?new Uint32Array(u+1):new Uint16Array(u+1),primitivePolygonIndices:l>65535?new Uint32Array(c+1):new Uint16Array(c+1),positions:new A(l*h),globalFeatureIds:new y(l),featureIds:d>65535?new Uint32Array(l):new Uint16Array(l),numericProps:{},properties:[],fields:[]};g&&(_.triangles=[]);for(const e of[v,b,_])for(const t of p){const n=f[t];e.numericProps[t]=new n(e.positions.length/h)}b.pathIndices[a]=o,_.polygonIndices[u]=l,_.primitivePolygonIndices[c]=l;const w={pointPosition:0,pointFeature:0,linePosition:0,linePath:0,lineFeature:0,polygonPosition:0,polygonObject:0,polygonRing:0,polygonFeature:0,feature:0};for(const t of e){const e=t.geometry,n=t.properties||{};switch(e.type){case"Point":Pl(e,v,w,h,n),v.properties.push(Fl(n,p)),m&&v.fields.push({id:t.id}),w.pointFeature++;break;case"LineString":Il(e,b,w,h,n),b.properties.push(Fl(n,p)),m&&b.fields.push({id:t.id}),w.lineFeature++;break;case"Polygon":Dl(e,_,w,h,n),_.properties.push(Fl(n,p)),m&&_.fields.push({id:t.id}),w.polygonFeature++;break;default:throw new Error("Invalid geometry type")}w.feature++}return function(e,t,n,r){const i={points:{...e,positions:{value:e.positions,size:r},globalFeatureIds:{value:e.globalFeatureIds,size:1},featureIds:{value:e.featureIds,size:1},numericProps:Rl(e.numericProps,1)},lines:{...t,positions:{value:t.positions,size:r},pathIndices:{value:t.pathIndices,size:1},globalFeatureIds:{value:t.globalFeatureIds,size:1},featureIds:{value:t.featureIds,size:1},numericProps:Rl(t.numericProps,1)},polygons:{...n,positions:{value:n.positions,size:r},polygonIndices:{value:n.polygonIndices,size:1},primitivePolygonIndices:{value:n.primitivePolygonIndices,size:1},globalFeatureIds:{value:n.globalFeatureIds,size:1},featureIds:{value:n.featureIds,size:1},numericProps:Rl(n.numericProps,1)}};n.triangles&&(i.polygons.triangles={value:new Uint32Array(n.triangles),size:1});return i}(v,b,_,h)}(e,{propArrayTypes:r,...t},{numericPropKeys:n&&n.numericPropKeys||i,PositionDataType:n?n.PositionDataType:Float32Array,triangulate:!n||n.triangulate})}function Ll(e){const t={};for(const n of e)if(n.properties)for(const e in n.properties){const r=n.properties[e];t[e]=Nl(r,t[e])}return t}function Pl(e,t,n,r,i){t.positions.set(e.data,n.pointPosition*r);const o=e.data.length/r;jl(t,i,n.pointPosition,o),t.globalFeatureIds.fill(n.feature,n.pointPosition,n.pointPosition+o),t.featureIds.fill(n.pointFeature,n.pointPosition,n.pointPosition+o),n.pointPosition+=o}function Il(e,t,n,r,i){t.positions.set(e.data,n.linePosition*r);const o=e.data.length/r;jl(t,i,n.linePosition,o),t.globalFeatureIds.fill(n.feature,n.linePosition,n.linePosition+o),t.featureIds.fill(n.lineFeature,n.linePosition,n.linePosition+o);for(let i=0,o=e.indices.length;i(e-c)/a),f=Object(Tl.a)(u,d,a,t);for(let t=0,n=f.length;t>3}if(1===n||2===n)e.readSVarint(),e.readSVarint(),1===n&&(s&&a.push(s),[]),s&&s.push([i,o]);else{if(7!==n)throw new Error("unknown command ".concat(n));s&&s.push(s[0].slice())}}return s&&a.push(s),a}bbox(){const e=this._pbf;e.pos=this._geometry;const t=e.readVarint()+e.pos;let n=1,r=0,i=0,o=0,a=1/0,s=-1/0,l=1/0,u=-1/0;for(;e.pos>3}if(1===n||2===n)e.readSVarint(),e.readSVarint(),is&&i,ou&&o;else if(7!==n)throw new Error("unknown command ".concat(n))}return[a,l,s,u]}_toGeoJSON(e){let t,n,r=this.loadGeometry(),i=Vl.types[this.type];switch(this.type){case 1:const i=[];for(0;t=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[e];const t=this._pbf.readVarint()+this._pbf.pos;return new Vl(this._pbf,t,this.extent,this._keys,this._values)}}function Yl(e,t,n){t&&n&&(15===e?t.version=n.readVarint():1===e?t.name=n.readString():5===e?t.extent=n.readVarint():2===e?t._features.push(n.pos):3===e?t._keys.push(n.readString()):4===e&&t._values.push(function(e){let t=null;const n=e.readVarint()+e.pos;for(;e.pos>3;1===t?e.readString():2===t?e.readFloat():3===t?e.readDouble():4===t?e.readVarint64():5===t?e.readVarint():6===t?e.readSVarint():7===t?e.readBoolean():null}return t}(n)))}class Wl{constructor(e,t){Object(i.a)(this,"layers",void 0),this.layers=e.readFields(ql,{},t)}}function ql(e,t,n){if(3===e&&n){const e=new Gl(n,n.readVarint()+n.pos);e.length&&t&&(t[e.name]=e)}}function Xl(e){const t=e.indices.length;if(t<=1)return{type:"Polygon",data:e.data,areas:[[Object(Tl.b)(e.data)]],indices:[e.indices]};const n=[],r=[];let i,o=[],a=[],s=0;for(let l,u,c=0;c>3),1===Ql||2===Ql)e.readSVarint(),e.readSVarint(),1===Ql&&t.push(nu),n.push(eu,tu),2;else{if(7!==Ql)throw new Error("unknown command ".concat(Ql));if(nu>0){const e=t[t.length-1];n.push(n[e],n[e+1]),2}}return{data:n,indices:t}}_toBinaryCoordinates(e){const t=this.loadGeometry();let n;e(t.data,this);switch(this.type){case 1:this._geometryInfo.pointFeaturesCount++,this._geometryInfo.pointPositionsCount+=t.indices.length,{type:"Point",...t};break;case 2:this._geometryInfo.lineFeaturesCount++,this._geometryInfo.linePathsCount+=t.indices.length,this._geometryInfo.linePositionsCount+=t.data.length/2,{type:"LineString",...t};break;case 3:Xl(t),this._geometryInfo.polygonFeaturesCount++,this._geometryInfo.polygonObjectsCount+=n.indices.length;for(const e of n.indices)this._geometryInfo.polygonRingsCount+=e.length;this._geometryInfo.polygonPositionsCount+=n.data.length/2;break;default:throw new Error("Invalid geometry type: ".concat(this.type))}const r={type:"Feature",geometry:n,properties:this.properties};return null!==this.id&&(r.id=this.id),r}toBinaryCoordinates(e){if("function"==typeof e)return this._toBinaryCoordinates(e);const{x:t,y:n,z:r}=e,i=this.extent*Math.pow(2,r),o=this.extent*t,a=this.extent*n;return this._toBinaryCoordinates(e=>function(e,t,n,r){for(let i=0,o=e.length;i=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[e];const n=this._pbf.readVarint()+this._pbf.pos;return new ru(this._pbf,n,this.extent,this._keys,this._values,t)}}function ou(e,t,n){t&&n&&(15===e?t.version=n.readVarint():1===e?t.name=n.readString():5===e?t.extent=n.readVarint():2===e?t._features.push(n.pos):3===e?t._keys.push(n.readString()):4===e&&t._values.push(function(e){let t=null;const n=e.readVarint()+e.pos;for(;e.pos>3;1===t?e.readString():2===t?e.readFloat():3===t?e.readDouble():4===t?e.readVarint64():5===t?e.readVarint():6===t?e.readSVarint():7===t?e.readBoolean():null}return t}(n)))}class au{constructor(e,t){Object(i.a)(this,"layers",void 0),this.layers=e.readFields(su,{},t)}}function su(e,t,n){if(3===e&&n){const e=new iu(n,n.readVarint()+n.pos);e.length&&t&&(t[e.name]=e)}}function lu(e,t){var n,r;const i=function(e){var t;if(null==e||!e.mvt)throw new Error("mvt options required");const n="wgs84"===(null===e.mvt||void 0===t?void 0:t.coordinates),{tileIndex:r}=e.mvt,i=r&&Number.isFinite(r.x)&&Number.isFinite(r.y)&&Number.isFinite(r.z);if(n&&!i)throw new Error("MVT Loader: WGS84 coordinates need tileIndex property");return e.mvt}(t),o=(null==t||null===t.gis||void 0===n?void 0:n.format)||(null==t||null===t.mvt||void 0===r?void 0:r.shape);switch(o){case"columnar-table":return{shape:"columnar-table",data:uu(e,i)};case"geojson-row-table":return{shape:"geojson-row-table",data:cu(e,i)};case"geojson":return cu(e,i);case"binary-geometry":case"binary":return uu(e,i);default:throw new Error(o)}}function uu(e,t){const[n,r]=function(e,t){const n=[],r={coordLength:2,pointPositionsCount:0,pointFeaturesCount:0,linePositionsCount:0,linePathsCount:0,lineFeaturesCount:0,polygonPositionsCount:0,polygonObjectsCount:0,polygonRingsCount:0,polygonFeaturesCount:0};if(e.byteLength<=0)return[n,r];const i=new au(new zl.a(e));return(t&&Array.isArray(t.layers)?t.layers:Object.keys(i.layers)).forEach(e=>{const o=i.layers[e];if(o)for(let i=0;i{const i=r.layers[e];if(i)for(let r=0;r1)return{type:"MultiPoint",coordinates:i};return{type:"Point",coordinates:i[0]}}(e,t,n);case"LineString":return function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1/0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1/0;const{positions:r}=e,i=e.pathIndices.value.filter(e=>e>=t&&e<=n),o=i.length>2;if(!o){return{type:"LineString",coordinates:_u(r,i[0],i[1])}}const a=[];for(let e=0;e1&&void 0!==arguments[1]?arguments[1]:-1/0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1/0;const{positions:i}=t,o=t.polygonIndices.value.filter(e=>e>=n&&e<=r),a=t.primitivePolygonIndices.value.filter(e=>e>=n&&e<=r),s=o.length>2;if(!s){const e=[];for(let t=0;t1&&void 0!==arguments[1]?arguments[1]:0;const n=Object.assign({},e.properties[e.featureIds.value[t]]);for(const r in e.numericProps)n[r]=e.numericProps[r].value[t];return n}(e,t,n),...function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return e.fields&&e.fields[e.featureIds.value[t]]}(e,t,n)}}function _u(e,t,n){t=t||0,n=n||e.value.length/e.size;const r=[];for(let i=t;iEu(e,t,n))},Polygon:Ou,MultiPolygon:function(e,t,n){return e.map(e=>Ou(e,t,n))}};function xu([e,t],[n,r],i){const o=Ee(n[0],r[0],e),a=Ee(n[1],r[1],t);return i.unprojectFlat([o,a])}function Mu(e,t,n){return e.map(e=>xu(e,t,n))}function Eu(e,t,n){return Mu(e,t,n)}function Ou(e,t,n){return e.map(e=>Mu(e,t,n))}const Su=["points","lines","polygons"];function Tu(e,t,n,r){const i=e.featureIds.value;if(!i.length)return-1;let o=0,a=i[i.length-1]+1;if(r){const t=function(e,t){if(!e.__layers){const t={},{properties:n}=e;for(let e=0;ee===n&&i[t]>=o&&i[t]=0?e.globalFeatureIds.value[r]:-1}return t?s=Cu(e.properties,e=>e[t]===n,o,a):e.fields&&(s=Cu(e.fields,e=>e.id===n,o,a)),s>=0?function(e,t){if(!e.__ids){const t=[],n=e.featureIds.value,r=e.globalFeatureIds.value;for(let e=0;en&&(e.minZoom=t.minzoom),Number.isFinite(t.maxzoom)&&(!Number.isFinite(r)||t.maxzoom{const t=Iu(e,i)===l,r=s||Du(e)===n;return t&&r}):a&&r?function(e,t,n,r){for(const i of Su){const o=e[i]&&Tu(e[i],t,n,r);if(o>=0)return o}return-1}(a,i,l,s?"":n):-1}_pickObjects(e){const{deck:t,viewport:n}=this.context,r=n.width,i=n.height,o=n.x,a=n.y,s=[this.id];return t.pickObjects({x:o,y:a,width:r,height:i,layerIds:s,maxObjects:e})}getRenderedFeatures(e=null){const t=this._pickObjects(e),n=new Set,r=[];for(const e of t){const t=Iu(e.object,this.props.uniqueIdProperty);void 0===t?r.push(e.object):n.has(t)||(n.add(t),r.push(e.object))}return r}_setWGS84PropertyForTiles(){this.state.tileset.selectedTiles.forEach(e=>{e.hasOwnProperty("dataInWGS84")||Object.defineProperty(e,"dataInWGS84",{get:()=>{if(!e.content)return null;if(this.state.binary&&Array.isArray(e.content)&&!e.content.length)return[];const{bbox:t}=e;if(void 0===e._contentWGS84&&(n=t,Number.isFinite(n.west)&&Number.isFinite(n.north)&&Number.isFinite(n.east)&&Number.isFinite(n.south))){const n=this.state.binary?gu(e.content):e.content;e._contentWGS84=n.map(e=>Ru(e,t,this.context.viewport))}var n;return e._contentWGS84}})})}}function Iu(e,t){return e.properties&&t?e.properties[t]:"id"in e?e.id:void 0}function Du(e){var t;return(null===(t=e.properties)||void 0===t?void 0:t.layerName)||null}function ku(e){return null!=e&&""!==e}function Ru(e,t,n){const r={...e,geometry:{type:e.geometry.type}};return Object.defineProperty(r.geometry,"coordinates",{get:()=>function(e,t,n){const r=[n.projectFlat([t.west,t.north]),n.projectFlat([t.east,t.south])];return{...e,coordinates:wu[e.type](e.coordinates,r,n)}}(e.geometry,t,n).coordinates}),r}Object(i.a)(Pu,"layerName","MVTLayer"),Object(i.a)(Pu,"defaultProps",Lu);const ju={};for(let e=0;e<"0123456789bcdefghjkmnpqrstuvwxyz".length;e++)ju["0123456789bcdefghjkmnpqrstuvwxyz".charAt(e)]=e;function Fu(e){const[t,n,r,i]=function(e){let t,n=!0,r=90,i=-90,o=180,a=-180,s=0;for(let l=0,u=e.length;l=0;e--){const l=s>>e&1;n?(t=(o+a)/2,1===l?a=t:o=t):(t=(r+i)/2,1===l?i=t:r=t),n=!n}}return[i,a,r,o]}(e);return[i,r,i,t,n,t,n,r,i,r]}class Nu extends ie{indexToBounds(){const{data:e,getGeohash:t}=this.props;return{data:e,_normalize:!1,positionFormat:"XY",getPolygon:(e,n)=>Fu(t(e,n))}}}Object(i.a)(Nu,"layerName","GeohashLayer"),Object(i.a)(Nu,"defaultProps",{getGeohash:{type:"accessor",value:e=>e.geohash}})},function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return j})),n.d(t,"WebMercatorViewport",(function(){return j})),n.d(t,"fitBounds",(function(){return R})),n.d(t,"normalizeViewportProps",(function(){return F})),n.d(t,"flyToViewport",(function(){return z})),n.d(t,"getFlyToDuration",(function(){return U})),n.d(t,"lngLatToWorld",(function(){return M})),n.d(t,"worldToLngLat",(function(){return E})),n.d(t,"worldToPixels",(function(){return I})),n.d(t,"pixelsToWorld",(function(){return D})),n.d(t,"getMeterZoom",(function(){return O})),n.d(t,"getDistanceScales",(function(){return S})),n.d(t,"addMetersToLngLat",(function(){return T})),n.d(t,"getViewMatrix",(function(){return C})),n.d(t,"getProjectionMatrix",(function(){return P})),n.d(t,"getProjectionParameters",(function(){return L})),n.d(t,"PerspectiveMercatorViewport",(function(){return j})),n.d(t,"getUncenteredViewMatrix",(function(){return C})),n.d(t,"projectFlat",(function(){return M})),n.d(t,"unprojectFlat",(function(){return E}));var r=n(210),i=n(211),o=n(386),a=n(387),s=n(392),l=n(60),u=n(106),c=n(67);function d(e,t){var n=c.n([],t,e);return c.k(n,n,1/n[3]),n}function f(e,t){var n=e%t;return n<0?t+n:n}function h(e,t,n){return n*t+(1-n)*e}var p=n(34),A=n(45),g=n(49);function m(e,t){if(!e)throw new Error(t||"viewport-mercator-project: assertion failed.")}var y=Math.PI,v=y/4,b=y/180,_=180/y;function w(e){return Math.pow(2,e)}function x(e){return Math.log2(e)}function M(e,t){var n=Object(u.a)(e,2),r=n[0],i=n[1];m(Number.isFinite(r)&&Number.isFinite(t)),m(Number.isFinite(i)&&i>=-90&&i<=90,"invalid latitude");var o=i*b;return[(t*=512)*(r*b+y)/(2*y),t*(y-Math.log(Math.tan(v+.5*o)))/(2*y)]}function E(e,t){var n=Object(u.a)(e,2),r=n[0],i=n[1],o=r/(t*=512)*(2*y)-y,a=2*(Math.atan(Math.exp(y-i/t*(2*y)))-v);return[o*_,a*_]}function O(e){var t=e.latitude;return m(Number.isFinite(t)),x(4003e4*Math.cos(t*b))-9}function S(e){var t=e.latitude,n=e.longitude,r=e.zoom,i=e.scale,o=e.highPrecision,a=void 0!==o&&o;i=void 0!==i?i:w(r),m(Number.isFinite(t)&&Number.isFinite(n)&&Number.isFinite(i));var s={},l=512*i,u=Math.cos(t*b),c=l/360,d=c/u,f=l/4003e4/u;if(s.pixelsPerMeter=[f,-f,f],s.metersPerPixel=[1/f,-1/f,1/f],s.pixelsPerDegree=[c,-d,f],s.degreesPerPixel=[1/c,-1/d,1/f],a){var h=b*Math.tan(t*b)/u,p=c*h/2,A=l/4003e4*h,g=A/d*f;s.pixelsPerDegree2=[0,-p,A],s.pixelsPerMeter2=[g,0,g]}return s}function T(e,t){var n=Object(u.a)(e,3),r=n[0],i=n[1],o=n[2],a=Object(u.a)(t,3),s=a[0],l=a[1],c=a[2],d=S({longitude:r,latitude:i,scale:1,highPrecision:!0}),f=d.pixelsPerMeter,h=d.pixelsPerMeter2,p=M(e,1);p[0]+=s*(f[0]+h[0]*l),p[1]+=l*(f[1]+h[1]*l);var A=E(p,1),g=(o||0)+(c||0);return Number.isFinite(o)||Number.isFinite(c)?[A[0],A[1],g]:A}function C(e){var t=e.height,n=e.pitch,r=e.bearing,i=e.altitude,o=e.center,a=void 0===o?null:o,s=e.flipY,l=void 0!==s&&s,u=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];return p.p(u,u,[0,0,-i]),p.o(u,u,[1,1,1/t]),p.l(u,u,-n*b),p.n(u,u,r*b),l&&p.o(u,u,[1,-1,1]),a&&p.p(u,u,g.l([],a)),u}function L(e){var t=e.width,n=e.height,r=e.altitude,i=void 0===r?1.5:r,o=e.pitch,a=void 0===o?0:o,s=e.nearZMultiplier,l=void 0===s?1:s,u=e.farZMultiplier,c=void 0===u?1:u,d=a*b,f=Math.atan(.5/i),h=Math.sin(f)*i/Math.sin(Math.PI/2-d-f),p=Math.cos(Math.PI/2-d)*h+i;return{fov:2*Math.atan(n/2/i),aspect:t/n,focalDistance:i,near:l,far:p*c}}function P(e){var t=e.width,n=e.height,r=e.pitch,i=L({width:t,height:n,altitude:e.altitude,pitch:r,nearZMultiplier:e.nearZMultiplier,farZMultiplier:e.farZMultiplier}),o=i.fov,a=i.aspect,s=i.near,l=i.far;return p.j([],o,a,s,l)}function I(e,t){var n=Object(u.a)(e,3),r=n[0],i=n[1],o=n[2],a=void 0===o?0:o;return m(Number.isFinite(r)&&Number.isFinite(i)&&Number.isFinite(a)),d(t,[r,i,a,1])}function D(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=Object(u.a)(e,3),i=r[0],o=r[1],a=r[2];if(m(Number.isFinite(i)&&Number.isFinite(o),"invalid pixel coordinate"),Number.isFinite(a)){var s=d(t,[i,o,a,1]);return s}var l=d(t,[i,o,0,1]),c=d(t,[i,o,1,1]),f=l[2],h=c[2],p=f===h?0:((n||0)-f)/(h-f);return A.c([],l,c,p)}var k=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function R(e){var t=e.width,n=e.height,r=e.bounds,i=e.minExtent,o=void 0===i?0:i,a=e.maxZoom,s=void 0===a?24:a,l=e.padding,c=void 0===l?0:l,d=e.offset,f=void 0===d?[0,0]:d,h=Object(u.a)(r,2),p=Object(u.a)(h[0],2),A=p[0],g=p[1],y=Object(u.a)(h[1],2),v=y[0],b=y[1];if(Number.isFinite(c)){c={top:c,bottom:c,left:c,right:c}}else m(Number.isFinite(c.top)&&Number.isFinite(c.bottom)&&Number.isFinite(c.left)&&Number.isFinite(c.right));var _=new j({width:t,height:n,longitude:0,latitude:0,zoom:0}),w=_.project([A,b]),x=_.project([v,g]),M=[Math.max(Math.abs(x[0]-w[0]),o),Math.max(Math.abs(x[1]-w[1]),o)],E=[t-c.left-c.right-2*Math.abs(f[0]),n-c.top-c.bottom-2*Math.abs(f[1])];m(E[0]>0&&E[1]>0);var O=E[0]/M[0],S=E[1]/M[1],T=(c.right-c.left)/2/O,C=(c.bottom-c.top)/2/S,L=[(x[0]+w[0])/2+T,(x[1]+w[1])/2+C],P=_.unproject(L),I=_.zoom+Math.log2(Math.abs(Math.min(O,S)));return{longitude:P[0],latitude:P[1],zoom:Math.min(I,s)}}var j=function(e){function t(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=n.width,s=n.height,u=n.latitude,c=void 0===u?0:u,d=n.longitude,f=void 0===d?0:d,h=n.zoom,p=void 0===h?0:h,A=n.pitch,g=void 0===A?0:A,m=n.bearing,y=void 0===m?0:m,v=n.altitude,b=void 0===v?1.5:v,_=n.nearZMultiplier,x=n.farZMultiplier;Object(r.a)(this,t),i=i||1,s=s||1;var E=w(p);b=Math.max(.75,b);var O=M([f,c],E);O[2]=0;var T=P({width:i,height:s,pitch:g,bearing:y,altitude:b,nearZMultiplier:_||1/s,farZMultiplier:x||1.01}),L=C({height:s,center:O,pitch:g,bearing:y,altitude:b,flipY:!0});return(e=Object(o.a)(this,Object(a.a)(t).call(this,{width:i,height:s,viewMatrix:L,projectionMatrix:T}))).latitude=c,e.longitude=f,e.zoom=p,e.pitch=g,e.bearing=y,e.altitude=b,e.scale=E,e.center=O,e.pixelsPerMeter=S(Object(l.a)(Object(l.a)(e))).pixelsPerMeter[2],Object.freeze(Object(l.a)(Object(l.a)(e))),e}return Object(s.a)(t,e),Object(i.a)(t,[{key:"projectFlat",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.scale;return M(e,t)}},{key:"unprojectFlat",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.scale;return E(e,t)}},{key:"getMapCenterByLngLatPosition",value:function(e){var t=e.lngLat,n=D(e.pos,this.pixelUnprojectionMatrix),r=M(t,this.scale),i=A.a([],r,A.d([],n));return E(A.a([],this.center,i),this.scale)}},{key:"getLocationAtPoint",value:function(e){var t=e.lngLat,n=e.pos;return this.getMapCenterByLngLatPosition({lngLat:t,pos:n})}},{key:"fitBounds",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=this.width,i=this.height,o=R(Object.assign({width:r,height:i,bounds:e},n)),a=o.longitude,s=o.latitude,l=o.zoom;return new t({width:r,height:i,longitude:a,latitude:s,zoom:l})}}]),t}(function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.width,i=t.height,o=t.viewMatrix,a=void 0===o?k:o,s=t.projectionMatrix,l=void 0===s?k:s;Object(r.a)(this,e),this.width=n||1,this.height=i||1,this.scale=1,this.pixelsPerMeter=1,this.viewMatrix=a,this.projectionMatrix=l;var u=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];p.h(u,u,this.projectionMatrix),p.h(u,u,this.viewMatrix),this.viewProjectionMatrix=u;var c=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];p.o(c,c,[this.width/2,-this.height/2,1]),p.p(c,c,[1,-1,0]),p.h(c,c,this.viewProjectionMatrix);var d=p.f([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],c);if(!d)throw new Error("Pixel project matrix not invertible");this.pixelProjectionMatrix=c,this.pixelUnprojectionMatrix=d,this.equals=this.equals.bind(this),this.project=this.project.bind(this),this.unproject=this.unproject.bind(this),this.projectPosition=this.projectPosition.bind(this),this.unprojectPosition=this.unprojectPosition.bind(this),this.projectFlat=this.projectFlat.bind(this),this.unprojectFlat=this.unprojectFlat.bind(this)}return Object(i.a)(e,[{key:"equals",value:function(t){return t instanceof e&&(t.width===this.width&&t.height===this.height&&p.b(t.projectionMatrix,this.projectionMatrix)&&p.b(t.viewMatrix,this.viewMatrix))}},{key:"project",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.topLeft,r=void 0===n||n,i=this.projectPosition(e),o=I(i,this.pixelProjectionMatrix),a=Object(u.a)(o,2),s=a[0],l=a[1],c=r?l:this.height-l;return 2===e.length?[s,c]:[s,c,o[2]]}},{key:"unproject",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.topLeft,r=void 0===n||n,i=t.targetZ,o=Object(u.a)(e,3),a=o[0],s=o[1],l=o[2],c=r?s:this.height-s,d=i&&i*this.pixelsPerMeter,f=D([a,c,l],this.pixelUnprojectionMatrix,d),h=this.unprojectPosition(f),p=Object(u.a)(h,3),A=p[0],g=p[1],m=p[2];return Number.isFinite(l)?[A,g,m]:Number.isFinite(i)?[A,g,i]:[A,g]}},{key:"projectPosition",value:function(e){var t=this.projectFlat(e),n=Object(u.a)(t,2);return[n[0],n[1],(e[2]||0)*this.pixelsPerMeter]}},{key:"unprojectPosition",value:function(e){var t=this.unprojectFlat(e),n=Object(u.a)(t,2);return[n[0],n[1],(e[2]||0)/this.pixelsPerMeter]}},{key:"projectFlat",value:function(e){arguments.length>1&&void 0!==arguments[1]||this.scale;return e}},{key:"unprojectFlat",value:function(e){arguments.length>1&&void 0!==arguments[1]||this.scale;return e}}]),e}());function F(e){var t=e.width,n=e.height,r=e.longitude,i=e.latitude,o=e.zoom,a=e.pitch,s=void 0===a?0:a,l=e.bearing,u=void 0===l?0:l;(r<-180||r>180)&&(r=f(r+180,360)-180),(u<-180||u>180)&&(u=f(u+180,360)-180);var c=new j({width:t,height:n,longitude:r,latitude:i,zoom:o}),d=c.project([r,85.05113])[1],h=c.project([r,-85.05113])[1],p=0;return h-d0?p=d:h3&&void 0!==arguments[3]?arguments[3]:{},i={},o=H(e,t,r),a=o.startZoom,s=o.startCenterXY,l=o.uDelta,u=o.w0,c=o.u1,d=o.S,f=o.rho,p=o.rho2,g=o.r0;if(c<.01){for(var m=0;m2&&void 0!==arguments[2]?arguments[2]:{},i=r=Object.assign({},B,r),o=i.screenSpeed,a=i.speed,s=i.maxDuration,l=H(e,t,r),u=l.S,c=l.rho,d=1e3*u;return n=Number.isFinite(o)?d/(o/c):d/a,Number.isFinite(s)&&n>s?0:n}function H(e,t,n){var r=(n=Object.assign({},B,n)).curve,i=e.zoom,o=[e.longitude,e.latitude],a=w(i),s=t.zoom,l=[t.longitude,t.latitude],u=w(s-i),c=M(o,a),d=M(l,a),f=A.f([],d,c),h=Math.max(e.width,e.height),p=h/u,g=A.b(f),m=Math.max(g,.01),y=r*r,v=(p*p-h*h+y*y*m*m)/(2*h*y*m),b=(p*p-h*h-y*y*m*m)/(2*p*y*m),_=Math.log(Math.sqrt(v*v+1)-v),x=Math.log(Math.sqrt(b*b+1)-b);return{startZoom:i,startCenterXY:c,uDelta:f,w0:h,u1:g,S:(x-_)/r,rho:r,rho2:y,r0:_,r1:x}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return l})),n.d(t,"b",(function(){return u}));var r=n(310),i="\nuniform float lighting_uAmbient;\nuniform float lighting_uDiffuse;\nuniform float lighting_uShininess;\nuniform vec3 lighting_uSpecularColor;\n\nvec3 lighting_getLightColor(vec3 surfaceColor, vec3 light_direction, vec3 view_direction, vec3 normal_worldspace, vec3 color) {\n vec3 halfway_direction = normalize(light_direction + view_direction);\n float lambertian = dot(light_direction, normal_worldspace);\n float specular = 0.0;\n if (lambertian > 0.0) {\n float specular_angle = max(dot(normal_worldspace, halfway_direction), 0.0);\n specular = pow(specular_angle, lighting_uShininess);\n }\n lambertian = max(lambertian, 0.0);\n return (lambertian * lighting_uDiffuse * surfaceColor + specular * lighting_uSpecularColor) * color;\n}\n\nvec3 lighting_getLightColor(vec3 surfaceColor, vec3 cameraPosition, vec3 position_worldspace, vec3 normal_worldspace) {\n vec3 lightColor = surfaceColor;\n\n if (lighting_uEnabled) {\n vec3 view_direction = normalize(cameraPosition - position_worldspace);\n lightColor = lighting_uAmbient * surfaceColor * lighting_uAmbientLight.color;\n\n for (int i = 0; i < MAX_LIGHTS; i++) {\n if (i >= lighting_uPointLightCount) {\n break;\n }\n PointLight pointLight = lighting_uPointLight[i];\n vec3 light_position_worldspace = pointLight.position;\n vec3 light_direction = normalize(light_position_worldspace - position_worldspace);\n lightColor += lighting_getLightColor(surfaceColor, light_direction, view_direction, normal_worldspace, pointLight.color);\n }\n\n for (int i = 0; i < MAX_LIGHTS; i++) {\n if (i >= lighting_uDirectionalLightCount) {\n break;\n }\n DirectionalLight directionalLight = lighting_uDirectionalLight[i];\n lightColor += lighting_getLightColor(surfaceColor, -directionalLight.direction, view_direction, normal_worldspace, directionalLight.color);\n }\n }\n return lightColor;\n}\n\nvec3 lighting_getSpecularLightColor(vec3 cameraPosition, vec3 position_worldspace, vec3 normal_worldspace) {\n vec3 lightColor = vec3(0, 0, 0);\n vec3 surfaceColor = vec3(0, 0, 0);\n\n if (lighting_uEnabled) {\n vec3 view_direction = normalize(cameraPosition - position_worldspace);\n\n for (int i = 0; i < MAX_LIGHTS; i++) {\n if (i >= lighting_uPointLightCount) {\n break;\n }\n PointLight pointLight = lighting_uPointLight[i];\n vec3 light_position_worldspace = pointLight.position;\n vec3 light_direction = normalize(light_position_worldspace - position_worldspace);\n lightColor += lighting_getLightColor(surfaceColor, light_direction, view_direction, normal_worldspace, pointLight.color);\n }\n\n for (int i = 0; i < MAX_LIGHTS; i++) {\n if (i >= lighting_uDirectionalLightCount) {\n break;\n }\n DirectionalLight directionalLight = lighting_uDirectionalLight[i];\n lightColor += lighting_getLightColor(surfaceColor, -directionalLight.direction, view_direction, normal_worldspace, directionalLight.color);\n }\n }\n return lightColor;\n}\n";const o={};function a(e){const{ambient:t=.35,diffuse:n=.6,shininess:r=32,specularColor:i=[30,30,30]}=e;return{lighting_uAmbient:t,lighting_uDiffuse:n,lighting_uShininess:r,lighting_uSpecularColor:i.map(e=>e/255)}}function s(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:o;if(!("material"in e))return{};const{material:t}=e;return t?a(t):{lighting_uEnabled:!1}}const l={name:"gouraud-lighting",dependencies:[r.a],vs:i,defines:{LIGHTING_VERTEX:1},getUniforms:s},u={name:"phong-lighting",dependencies:[r.a],fs:i,defines:{LIGHTING_FRAGMENT:1},getUniforms:s}},function(e,t,n){"use strict";n.d(t,"b",(function(){return i})),n.d(t,"a",(function(){return o}));var r=n(65);const i=Symbol("implicit");function o(){var e=new Map,t=[],n=[],a=i;function s(r){var o=r+"",s=e.get(o);if(!s){if(a!==i)return a;e.set(o,s=t.push(r))}return n[(s-1)%n.length]}return s.domain=function(n){if(!arguments.length)return t.slice();t=[],e=new Map;for(const r of n){const n=r+"";e.has(n)||e.set(n,t.push(r))}return s},s.range=function(e){return arguments.length?(n=Array.from(e),s):n.slice()},s.unknown=function(e){return arguments.length?(a=e,s):a},s.copy=function(){return o(t,n).unknown(a)},r.b.apply(s,arguments),s}},function(e,t,n){"use strict";function r(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:5;if("string"==typeof e)return e.slice(0,t);if(ArrayBuffer.isView(e))return i(e.buffer,e.byteOffset,t);if(e instanceof ArrayBuffer){return i(e,0,t)}return""}function i(e,t,n){if(e.byteLength<=t+n)return"";const r=new DataView(e);let i="";for(let e=0;e>>1;n(e[o],t)<0?r=o+1:i=o}return r}return 1===e.length&&(t=(t,n)=>e(t)-n,n=function(e){return(t,n)=>Object(r.a)(e(t),n)}(e)),{left:i,center:function(e,n,r,o){null==r&&(r=0),null==o&&(o=e.length);const a=i(e,n,r,o-1);return a>r&&t(e[a-1],n)>-t(e[a],n)?a-1:a},right:function(e,t,r,i){for(null==r&&(r=0),null==i&&(i=e.length);r>>1;n(e[o],t)>0?i=o:r=o+1}return r}}}},function(e,t,n){"use strict";function r(e,t){let n;if(void 0===t)for(const t of e)null!=t&&(n=t)&&(n=t);else{let r=-1;for(let i of e)null!=(i=t(i,++r,e))&&(n=i)&&(n=i)}return n}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";(function(e){function r(){let t;if("undefined"!=typeof window&&window.performance)t=window.performance.now();else if(void 0!==e&&e.hrtime){const n=e.hrtime();t=1e3*n[0]+n[1]/1e6}else t=Date.now();return t}n.d(t,"a",(function(){return r}))}).call(this,n(113))},function(e,t,n){"use strict";(function(e){function r(){let t;if("undefined"!=typeof window&&window.performance)t=window.performance.now();else if(void 0!==e&&e.hrtime){const n=e.hrtime();t=1e3*n[0]+n[1]/1e6}else t=Date.now();return t}n.d(t,"a",(function(){return r}))}).call(this,n(113))},function(e,t,n){"use strict";n.d(t,"c",(function(){return i})),n.d(t,"b",(function(){return o})),n.d(t,"a",(function(){return s}));var r=n(50);function i(e){const t=e[r.g];for(const n in t){const r=t[n],{validate:i}=r;if(i&&!i(e[n],r))throw new Error("Invalid prop ".concat(n,": ").concat(e[n]))}}function o(e,t){const n=s({newProps:e,oldProps:t,propTypes:e[r.g],ignoreProps:{data:null,updateTriggers:null,extensions:null,transitions:null}}),i=function(e,t){if(null===t)return"oldProps is null, initial diff";let n=!1;const{dataComparator:r,_dataDiff:i}=e;r?r(e.data,t.data)||(n="Data comparator detected a change"):e.data!==t.data&&(n="A new data container was supplied");n&&i&&(n=i(e.data,t.data)||n);return n}(e,t);let o=!1;return i||(o=function(e,t){if(null===t)return{all:!0};if("all"in e.updateTriggers){if(c(e,t,"all"))return{all:!0}}const n={};let r=!1;for(const i in e.updateTriggers)if("all"!==i){c(e,t,i)&&(n[i]=!0,r=!0)}return!!r&&n}(e,t)),{dataChanged:i,propsChanged:n,updateTriggersChanged:o,extensionsChanged:u(e,t),transitionsChanged:a(e,t)}}function a(e,t){if(!e.transitions)return!1;const n={},i=e[r.g];let o=!1;for(const r in e.transitions){const a=i[r],s=a&&a.type;("number"===s||"color"===s||"array"===s)&&l(e[r],t[r],a)&&(n[r]=!0,o=!0)}return!!o&&n}function s({newProps:e,oldProps:t,ignoreProps:n={},propTypes:r={},triggerName:i="props"}){if(t===e)return!1;if("object"!=typeof e||null===e)return"".concat(i," changed shallowly");if("object"!=typeof t||null===t)return"".concat(i," changed shallowly");for(const o of Object.keys(e))if(!(o in n)){if(!(o in t))return"".concat(i,".").concat(o," added");const n=l(e[o],t[o],r[o]);if(n)return"".concat(i,".").concat(o," ").concat(n)}for(const o of Object.keys(t))if(!(o in n)){if(!(o in e))return"".concat(i,".").concat(o," dropped");if(!Object.hasOwnProperty.call(e,o)){const n=l(e[o],t[o],r[o]);if(n)return"".concat(i,".").concat(o," ").concat(n)}}return!1}function l(e,t,n){let r=n&&n.equal;return r&&!r(e,t,n)?"changed deeply":r||(r=e&&t&&e.equals,!r||r.call(e,t))?r||t===e?null:"changed shallowly":"changed deeply"}function u(e,t){if(null===t)return!0;const n=t.extensions,{extensions:r}=e;if(r===n)return!1;if(!n||!r)return!0;if(r.length!==n.length)return!0;for(let e=0;e{const n=e.viewports[0],r=Object(h.e)(this.gl),i=n.width*r,o=n.height*r;i===t.width&&o===t.height||t.resize({width:i,height:o}),super.render({...e,target:t,pass:"shadow"})})}shouldDrawLayer(e){return!1!==e.props.shadowEnabled}getModuleParameters(){return{drawToShadowMap:!0}}delete(){this.fbo&&(this.fbo.delete(),this.fbo=null),this.shadowMap&&(this.shadowMap.delete(),this.shadowMap=null),this.depthBuffer&&(this.depthBuffer.delete(),this.depthBuffer=null)}}var A=n(368);const g={color:[255,255,255],intensity:1},m=[{color:[255,255,255],intensity:1,direction:[-1,3,-1]},{color:[255,255,255],intensity:.9,direction:[1,-8,-2.5]}],y=[0,0,0,200/255];class v{constructor(e={}){Object(r.a)(this,"id","lighting-effect"),Object(r.a)(this,"props",void 0),Object(r.a)(this,"shadowColor",y),Object(r.a)(this,"shadow",void 0),Object(r.a)(this,"ambientLight",void 0),Object(r.a)(this,"directionalLights",void 0),Object(r.a)(this,"pointLights",void 0),Object(r.a)(this,"shadowPasses",[]),Object(r.a)(this,"shadowMaps",[]),Object(r.a)(this,"dummyShadowMap",null),Object(r.a)(this,"programManager",void 0),Object(r.a)(this,"shadowMatrices",void 0),this.setProps(e)}setProps(e){this.ambientLight=null,this.directionalLights=[],this.pointLights=[];for(const t in e){const n=e[t];switch(n.type){case"ambient":this.ambientLight=n;break;case"directional":this.directionalLights.push(n);break;case"point":this.pointLights.push(n)}}this._applyDefaultLights(),this.shadow=this.directionalLights.some(e=>e.shadow),this.props=e}preRender(e,{layers:t,layerFilter:n,viewports:r,onViewportActive:a,views:s}){if(this.shadow){this.shadowMatrices=this._calculateMatrices(),0===this.shadowPasses.length&&this._createShadowPasses(e),this.programManager||(this.programManager=i.a.getDefaultProgramManager(e),A.a&&this.programManager.addDefaultModule(A.a)),this.dummyShadowMap||(this.dummyShadowMap=new o.a(e,{width:1,height:1}));for(let e=0;et.getProjectedLight({layer:e})),pointLights:this.pointLights.map(t=>t.getProjectedLight({layer:e}))},t}cleanup(){for(const e of this.shadowPasses)e.delete();this.shadowPasses.length=0,this.shadowMaps.length=0,this.dummyShadowMap&&(this.dummyShadowMap.delete(),this.dummyShadowMap=null),this.shadow&&this.programManager&&(this.programManager.removeDefaultModule(A.a),this.programManager=null)}_calculateMatrices(){const e=[];for(const t of this.directionalLights){const n=(new l.a).lookAt({eye:new u.a(t.direction).negate()});e.push(n)}return e}_createShadowPasses(e){for(let t=0;tNumber.isFinite(e)&&(!("max"in t)||e<=t.max)&&(!("min"in t)||e>=t.min)},array:{validate:(e,t)=>Array.isArray(e)||ArrayBuffer.isView(e)}};function o(e){let t=a(e);return"object"===t?e?"type"in e?Object.assign({},e,i[e.type]):"value"in e?(t=a(e.value),Object.assign({type:t},e,i[t])):{type:"object",value:e}:{type:"object",value:null}:Object.assign({type:t,value:e},i[t])}function a(e){return Array.isArray(e)||ArrayBuffer.isView(e)?"array":typeof e}class s{constructor(e){let{name:t,vs:n,fs:i,dependencies:a=[],uniforms:s,getUniforms:l,deprecations:u=[],defines:c={},inject:d={},vertexShader:f,fragmentShader:h}=e;Object(r.a)("string"==typeof t),this.name=t,this.vs=n||f,this.fs=i||h,this.getModuleUniforms=l,this.dependencies=a,this.deprecations=this._parseDeprecationDefinitions(u),this.defines=c,this.injections=function(e){const t={vs:{},fs:{}};for(const n in e){let r=e[n];const i=n.slice(0,2);"string"==typeof r&&(r={order:0,injection:r}),t[i][n]=r}return t}(d),s&&(this.uniforms=function(e){const t={};for(const n in e){const r=o(e[n]);t[n]=r}return t}(s))}getModuleSource(e){let t;switch(e){case"vs":t=this.vs||"";break;case"fs":t=this.fs||"";break;default:Object(r.a)(!1)}return"#define MODULE_".concat(this.name.toUpperCase().replace(/[^0-9a-z]/gi,"_"),"\n").concat(t,"// END MODULE_").concat(this.name,"\n\n")}getUniforms(e,t){return this.getModuleUniforms?this.getModuleUniforms(e,t):this.uniforms?this._defaultGetUniforms(e):{}}getDefines(){return this.defines}checkDeprecations(e,t){this.deprecations.forEach(n=>{n.regex.test(e)&&(n.deprecated?t.deprecated(n.old,n.new)():t.removed(n.old,n.new)())})}_parseDeprecationDefinitions(e){return e.forEach(e=>{switch(e.type){case"function":e.regex=new RegExp("\\b".concat(e.old,"\\("));break;default:e.regex=new RegExp("".concat(e.type," ").concat(e.old,";"))}}),e}_defaultGetUniforms(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t={},n=this.uniforms;for(const i in n){const o=n[i];i in e&&!o.private?(o.validate&&Object(r.a)(o.validate(e[i],o),"".concat(this.name,": invalid ").concat(i)),t[i]=e[i]):t[i]=o.value}return t}}function l(e){if(!e.normalized&&(e.normalized=!0,e.uniforms&&!e.getUniforms)){const t=new s(e);e.getUniforms=t.getUniforms.bind(t)}return e}},function(e,t,n){"use strict";function*r(e,t){if(void 0===t)for(let t of e)null!=t&&(t=+t)>=t&&(yield t);else{let n=-1;for(let r of e)null!=(r=t(r,++n,e))&&(r=+r)>=r&&(yield r)}}n.d(t,"b",(function(){return r})),t.a=function(e){return null===e?NaN:+e}},function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return i}));var r=n(535);function i(){return!("object"==typeof e&&"[object process]"===String(e)&&!e.browser)||Object(r.a)()}}).call(this,n(113))},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(17);function i(e,t,n){const{removedProps:i={},deprecatedProps:o={},replacedProps:a={}}=n;for(const n in i)if(n in t){const t=i[n]?"".concat(e,".").concat(i[n]):"N/A";r.k.removed("".concat(e,".").concat(n),t)()}for(const n in o)if(n in t){const t=o[n];r.k.deprecated("".concat(e,".").concat(n),"".concat(e,".").concat(t))()}let s=null;for(const n in a)if(n in t){const i=a[n];r.k.deprecated("".concat(e,".").concat(n),"".concat(e,".").concat(i))(),s=s||Object.assign({},t),s[i]=t[n],delete s[n]}return s||t}},function(e,t,n){"use strict";function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n2&&void 0!==arguments[2]?arguments[2]:0;const r=i(t);for(let t=0;te.charCodeAt(0))}n.d(t,"a",(function(){return o}));function o(e){const t=a(e);return function(e){const t=a(e);if(!(t.byteLength>=24&&2303741511===t.getUint32(0,!1)))return null;return{mimeType:"image/png",width:t.getUint32(16,!1),height:t.getUint32(20,!1)}}(t)||function(e){const t=a(e);if(!(t.byteLength>=3&&65496===t.getUint16(0,!1)&&255===t.getUint8(2)))return null;const{tableMarkers:n,sofMarkers:r}=function(){const e=new Set([65499,65476,65484,65501,65534]);for(let t=65504;t<65520;++t)e.add(t);const t=new Set([65472,65473,65474,65475,65477,65478,65479,65481,65482,65483,65485,65486,65487,65502]);return{tableMarkers:e,sofMarkers:t}}();let i=2;for(;i+9=10&&1195984440===t.getUint32(0,!1)))return null;return{mimeType:"image/gif",width:t.getUint16(6,!0),height:t.getUint16(8,!0)}}(t)||function(e){const t=a(e);if(!(t.byteLength>=14&&16973===t.getUint16(0,!1)&&t.getUint32(2,!0)===t.byteLength))return null;return{mimeType:"image/bmp",width:t.getUint32(18,!0),height:t.getUint32(22,!0)}}(t)||function(e){const t=r(new Uint8Array(e instanceof DataView?e.buffer:e));if(!t)return null;return{mimeType:t.mimeType,width:0,height:0}}(t)}function a(e){if(e instanceof DataView)return e;if(ArrayBuffer.isView(e))return new DataView(e.buffer);if(e instanceof ArrayBuffer)return new DataView(e);throw new Error("toDataView")}},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(17),i=n(375),o=n(428);const a=new class{constructor(){this.stats=new Map}get(e){return this.stats.has(e)||this.stats.set(e,new i.a({id:e})),this.stats.get(e)}};if(globalThis.luma&&"8.5.21"!==globalThis.luma.VERSION)throw new Error("luma.gl - multiple VERSIONs detected: ".concat(globalThis.luma.VERSION," vs ").concat("8.5.21"));globalThis.luma||(Object(o.a)()&&r.k.log(1,"luma.gl ".concat("8.5.21"," - ").concat("set luma.log.level=1 (or higher) to trace rendering"))(),globalThis.luma=globalThis.luma||{VERSION:"8.5.21",version:"8.5.21",log:r.k,stats:a,globals:{modules:{},nodeIO:{}}});globalThis.luma},function(e,t,n){var r; +/*! Hammer.JS - v2.0.7 - 2016-04-22 + * http://hammerjs.github.io/ + * + * Copyright (c) 2016 Jorik Tangelder; + * Licensed under the MIT license */!function(i,o,a,s){"use strict";var l,u=["","webkit","Moz","MS","ms","o"],c=o.createElement("div"),d=Math.round,f=Math.abs,h=Date.now;function p(e,t,n){return setTimeout(_(e,n),t)}function A(e,t,n){return!!Array.isArray(e)&&(g(e,n[t],n),!0)}function g(e,t,n){var r;if(e)if(e.forEach)e.forEach(t,n);else if(void 0!==e.length)for(r=0;r\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",o=i.console&&(i.console.warn||i.console.log);return o&&o.call(i.console,r,n),e.apply(this,arguments)}}l="function"!=typeof Object.assign?function(e){if(null==e)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(e),n=1;n-1}function T(e){return e.trim().split(/\s+/g)}function C(e,t,n){if(e.indexOf&&!n)return e.indexOf(t);for(var r=0;rn[t]})):r.sort()),r}function I(e,t){for(var n,r,i=t[0].toUpperCase()+t.slice(1),o=0;o1&&!n.firstMultiple?n.firstMultiple=H(t):1===i&&(n.firstMultiple=!1);var o=n.firstInput,a=n.firstMultiple,s=a?a.center:o.center,l=t.center=V(r);t.timeStamp=h(),t.deltaTime=t.timeStamp-o.timeStamp,t.angle=q(s,l),t.distance=W(s,l),function(e,t){var n=t.center,r=e.offsetDelta||{},i=e.prevDelta||{},o=e.prevInput||{};1!==t.eventType&&4!==o.eventType||(i=e.prevDelta={x:o.deltaX||0,y:o.deltaY||0},r=e.offsetDelta={x:n.x,y:n.y});t.deltaX=i.x+(n.x-r.x),t.deltaY=i.y+(n.y-r.y)}(n,t),t.offsetDirection=Y(t.deltaX,t.deltaY);var u=G(t.deltaTime,t.deltaX,t.deltaY);t.overallVelocityX=u.x,t.overallVelocityY=u.y,t.overallVelocity=f(u.x)>f(u.y)?u.x:u.y,t.scale=a?(c=a.pointers,d=r,W(d[0],d[1],B)/W(c[0],c[1],B)):1,t.rotation=a?function(e,t){return q(t[1],t[0],B)+q(e[1],e[0],B)}(a.pointers,r):0,t.maxPointers=n.prevInput?t.pointers.length>n.prevInput.maxPointers?t.pointers.length:n.prevInput.maxPointers:t.pointers.length,function(e,t){var n,r,i,o,a=e.lastInterval||t,s=t.timeStamp-a.timeStamp;if(8!=t.eventType&&(s>25||void 0===a.velocity)){var l=t.deltaX-a.deltaX,u=t.deltaY-a.deltaY,c=G(s,l,u);r=c.x,i=c.y,n=f(c.x)>f(c.y)?c.x:c.y,o=Y(l,u),e.lastInterval=t}else n=a.velocity,r=a.velocityX,i=a.velocityY,o=a.direction;t.velocity=n,t.velocityX=r,t.velocityY=i,t.direction=o}(n,t);var c,d;var p=e.element;O(t.srcEvent.target,p)&&(p=t.srcEvent.target);t.target=p}(e,n),e.emit("hammer.input",n),e.recognize(n),e.session.prevInput=n}function H(e){for(var t=[],n=0;n=f(t)?e<0?2:4:t<0?8:16}function W(e,t,n){n||(n=N);var r=t[n[0]]-e[n[0]],i=t[n[1]]-e[n[1]];return Math.sqrt(r*r+i*i)}function q(e,t,n){n||(n=N);var r=t[n[0]]-e[n[0]],i=t[n[1]]-e[n[1]];return 180*Math.atan2(i,r)/Math.PI}z.prototype={handler:function(){},init:function(){this.evEl&&M(this.element,this.evEl,this.domHandler),this.evTarget&&M(this.target,this.evTarget,this.domHandler),this.evWin&&M(k(this.element),this.evWin,this.domHandler)},destroy:function(){this.evEl&&E(this.element,this.evEl,this.domHandler),this.evTarget&&E(this.target,this.evTarget,this.domHandler),this.evWin&&E(k(this.element),this.evWin,this.domHandler)}};var X={mousedown:1,mousemove:2,mouseup:4};function Z(){this.evEl="mousedown",this.evWin="mousemove mouseup",this.pressed=!1,z.apply(this,arguments)}b(Z,z,{handler:function(e){var t=X[e.type];1&t&&0===e.button&&(this.pressed=!0),2&t&&1!==e.which&&(t=4),this.pressed&&(4&t&&(this.pressed=!1),this.callback(this.manager,t,{pointers:[e],changedPointers:[e],pointerType:"mouse",srcEvent:e}))}});var K={pointerdown:1,pointermove:2,pointerup:4,pointercancel:8,pointerout:8},Q={2:"touch",3:"pen",4:"mouse",5:"kinect"},J="pointerdown",$="pointermove pointerup pointercancel";function ee(){this.evEl=J,this.evWin=$,z.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}i.MSPointerEvent&&!i.PointerEvent&&(J="MSPointerDown",$="MSPointerMove MSPointerUp MSPointerCancel"),b(ee,z,{handler:function(e){var t=this.store,n=!1,r=e.type.toLowerCase().replace("ms",""),i=K[r],o=Q[e.pointerType]||e.pointerType,a="touch"==o,s=C(t,e.pointerId,"pointerId");1&i&&(0===e.button||a)?s<0&&(t.push(e),s=t.length-1):12&i&&(n=!0),s<0||(t[s]=e,this.callback(this.manager,i,{pointers:t,changedPointers:[e],pointerType:o,srcEvent:e}),n&&t.splice(s,1))}});var te={touchstart:1,touchmove:2,touchend:4,touchcancel:8};function ne(){this.evTarget="touchstart",this.evWin="touchstart touchmove touchend touchcancel",this.started=!1,z.apply(this,arguments)}function re(e,t){var n=L(e.touches),r=L(e.changedTouches);return 12&t&&(n=P(n.concat(r),"identifier",!0)),[n,r]}b(ne,z,{handler:function(e){var t=te[e.type];if(1===t&&(this.started=!0),this.started){var n=re.call(this,e,t);12&t&&n[0].length-n[1].length==0&&(this.started=!1),this.callback(this.manager,t,{pointers:n[0],changedPointers:n[1],pointerType:"touch",srcEvent:e})}}});var ie={touchstart:1,touchmove:2,touchend:4,touchcancel:8};function oe(){this.evTarget="touchstart touchmove touchend touchcancel",this.targetIds={},z.apply(this,arguments)}function ae(e,t){var n=L(e.touches),r=this.targetIds;if(3&t&&1===n.length)return r[n[0].identifier]=!0,[n,n];var i,o,a=L(e.changedTouches),s=[],l=this.target;if(o=n.filter((function(e){return O(e.target,l)})),1===t)for(i=0;i-1&&r.splice(e,1)}),2500)}}function ce(e){for(var t=e.srcEvent.clientX,n=e.srcEvent.clientY,r=0;r-1&&this.requireFail.splice(t,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(e){return!!this.simultaneous[e.id]},emit:function(e){var t=this,n=this.state;function r(n){t.manager.emit(n,e)}n<8&&r(t.options.event+ge(n)),r(t.options.event),e.additionalEvent&&r(e.additionalEvent),n>=8&&r(t.options.event+ge(n))},tryEmit:function(e){if(this.canEmit())return this.emit(e);this.state=32},canEmit:function(){for(var e=0;et.threshold&&i&t.direction},attrTest:function(e){return ve.prototype.attrTest.call(this,e)&&(2&this.state||!(2&this.state)&&this.directionTest(e))},emit:function(e){this.pX=e.deltaX,this.pY=e.deltaY;var t=me(e.direction);t&&(e.additionalEvent=this.options.event+t),this._super.emit.call(this,e)}}),b(_e,ve,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return["none"]},attrTest:function(e){return this._super.attrTest.call(this,e)&&(Math.abs(e.scale-1)>this.options.threshold||2&this.state)},emit:function(e){if(1!==e.scale){var t=e.scale<1?"in":"out";e.additionalEvent=this.options.event+t}this._super.emit.call(this,e)}}),b(we,Ae,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return["auto"]},process:function(e){var t=this.options,n=e.pointers.length===t.pointers,r=e.distancet.time;if(this._input=e,!r||!n||12&e.eventType&&!i)this.reset();else if(1&e.eventType)this.reset(),this._timer=p((function(){this.state=8,this.tryEmit()}),t.time,this);else if(4&e.eventType)return 8;return 32},reset:function(){clearTimeout(this._timer)},emit:function(e){8===this.state&&(e&&4&e.eventType?this.manager.emit(this.options.event+"up",e):(this._input.timeStamp=h(),this.manager.emit(this.options.event,this._input)))}}),b(xe,ve,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return["none"]},attrTest:function(e){return this._super.attrTest.call(this,e)&&(Math.abs(e.rotation)>this.options.threshold||2&this.state)}}),b(Me,ve,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:30,pointers:1},getTouchAction:function(){return be.prototype.getTouchAction.call(this)},attrTest:function(e){var t,n=this.options.direction;return 30&n?t=e.overallVelocity:6&n?t=e.overallVelocityX:24&n&&(t=e.overallVelocityY),this._super.attrTest.call(this,e)&&n&e.offsetDirection&&e.distance>this.options.threshold&&e.maxPointers==this.options.pointers&&f(t)>this.options.velocity&&4&e.eventType},emit:function(e){var t=me(e.offsetDirection);t&&this.manager.emit(this.options.event+t,e),this.manager.emit(this.options.event,e)}}),b(Ee,Ae,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return["manipulation"]},process:function(e){var t=this.options,n=e.pointers.length===t.pointers,r=e.distance1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}if(e=D(e,360),t=D(t,100),n=D(n,100),0===t)r=i=o=n;else{var s=n<.5?n*(1+t):n+t-n*t,l=2*n-s;r=a(l,s,e+1/3),i=a(l,s,e),o=a(l,s,e-1/3)}return{r:255*r,g:255*i,b:255*o}}(e.h,r,l),d=!0,f="hsl"),e.hasOwnProperty("a")&&(n=e.a));var h,p,A;return n=I(n),{ok:d,format:e.format||f,r:u(255,c(t.r,0)),g:u(255,c(t.g,0)),b:u(255,c(t.b,0)),a:n}}(e);this._originalInput=e,this._r=n.r,this._g=n.g,this._b=n.b,this._a=n.a,this._roundA=l(100*this._a)/100,this._format=t.format||n.format,this._gradientType=t.gradientType,this._r<1&&(this._r=l(this._r)),this._g<1&&(this._g=l(this._g)),this._b<1&&(this._b=l(this._b)),this._ok=n.ok,this._tc_id=s++}function h(e,t,n){e=D(e,255),t=D(t,255),n=D(n,255);var r,i,o=c(e,t,n),a=u(e,t,n),s=(o+a)/2;if(o==a)r=i=0;else{var l=o-a;switch(i=s>.5?l/(2-o-a):l/(o+a),o){case e:r=(t-n)/l+(t>1)+720)%360;--t;)r.h=(r.h+i)%360,o.push(f(r));return o}function C(e,t){t=t||6;for(var n=f(e).toHsv(),r=n.h,i=n.s,o=n.v,a=[],s=1/t;t--;)a.push(f({h:r,s:i,v:o})),o=(o+s)%1;return a}f.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var e=this.toRgb();return(299*e.r+587*e.g+114*e.b)/1e3},getLuminance:function(){var e,t,n,r=this.toRgb();return e=r.r/255,t=r.g/255,n=r.b/255,.2126*(e<=.03928?e/12.92:i.pow((e+.055)/1.055,2.4))+.7152*(t<=.03928?t/12.92:i.pow((t+.055)/1.055,2.4))+.0722*(n<=.03928?n/12.92:i.pow((n+.055)/1.055,2.4))},setAlpha:function(e){return this._a=I(e),this._roundA=l(100*this._a)/100,this},toHsv:function(){var e=p(this._r,this._g,this._b);return{h:360*e.h,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=p(this._r,this._g,this._b),t=l(360*e.h),n=l(100*e.s),r=l(100*e.v);return 1==this._a?"hsv("+t+", "+n+"%, "+r+"%)":"hsva("+t+", "+n+"%, "+r+"%, "+this._roundA+")"},toHsl:function(){var e=h(this._r,this._g,this._b);return{h:360*e.h,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=h(this._r,this._g,this._b),t=l(360*e.h),n=l(100*e.s),r=l(100*e.l);return 1==this._a?"hsl("+t+", "+n+"%, "+r+"%)":"hsla("+t+", "+n+"%, "+r+"%, "+this._roundA+")"},toHex:function(e){return A(this._r,this._g,this._b,e)},toHexString:function(e){return"#"+this.toHex(e)},toHex8:function(e){return function(e,t,n,r,i){var o=[j(l(e).toString(16)),j(l(t).toString(16)),j(l(n).toString(16)),j(N(r))];if(i&&o[0].charAt(0)==o[0].charAt(1)&&o[1].charAt(0)==o[1].charAt(1)&&o[2].charAt(0)==o[2].charAt(1)&&o[3].charAt(0)==o[3].charAt(1))return o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0)+o[3].charAt(0);return o.join("")}(this._r,this._g,this._b,this._a,e)},toHex8String:function(e){return"#"+this.toHex8(e)},toRgb:function(){return{r:l(this._r),g:l(this._g),b:l(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+l(this._r)+", "+l(this._g)+", "+l(this._b)+")":"rgba("+l(this._r)+", "+l(this._g)+", "+l(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:l(100*D(this._r,255))+"%",g:l(100*D(this._g,255))+"%",b:l(100*D(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+l(100*D(this._r,255))+"%, "+l(100*D(this._g,255))+"%, "+l(100*D(this._b,255))+"%)":"rgba("+l(100*D(this._r,255))+"%, "+l(100*D(this._g,255))+"%, "+l(100*D(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(P[A(this._r,this._g,this._b,!0)]||!1)},toFilter:function(e){var t="#"+g(this._r,this._g,this._b,this._a),n=t,r=this._gradientType?"GradientType = 1, ":"";if(e){var i=f(e);n="#"+g(i._r,i._g,i._b,i._a)}return"progid:DXImageTransform.Microsoft.gradient("+r+"startColorstr="+t+",endColorstr="+n+")"},toString:function(e){var t=!!e;e=e||this._format;var n=!1,r=this._a<1&&this._a>=0;return t||!r||"hex"!==e&&"hex6"!==e&&"hex3"!==e&&"hex4"!==e&&"hex8"!==e&&"name"!==e?("rgb"===e&&(n=this.toRgbString()),"prgb"===e&&(n=this.toPercentageRgbString()),"hex"!==e&&"hex6"!==e||(n=this.toHexString()),"hex3"===e&&(n=this.toHexString(!0)),"hex4"===e&&(n=this.toHex8String(!0)),"hex8"===e&&(n=this.toHex8String()),"name"===e&&(n=this.toName()),"hsl"===e&&(n=this.toHslString()),"hsv"===e&&(n=this.toHsvString()),n||this.toHexString()):"name"===e&&0===this._a?this.toName():this.toRgbString()},clone:function(){return f(this.toString())},_applyModification:function(e,t){var n=e.apply(null,[this].concat([].slice.call(t)));return this._r=n._r,this._g=n._g,this._b=n._b,this.setAlpha(n._a),this},lighten:function(){return this._applyModification(b,arguments)},brighten:function(){return this._applyModification(_,arguments)},darken:function(){return this._applyModification(w,arguments)},desaturate:function(){return this._applyModification(m,arguments)},saturate:function(){return this._applyModification(y,arguments)},greyscale:function(){return this._applyModification(v,arguments)},spin:function(){return this._applyModification(x,arguments)},_applyCombination:function(e,t){return e.apply(null,[this].concat([].slice.call(t)))},analogous:function(){return this._applyCombination(T,arguments)},complement:function(){return this._applyCombination(M,arguments)},monochromatic:function(){return this._applyCombination(C,arguments)},splitcomplement:function(){return this._applyCombination(S,arguments)},triad:function(){return this._applyCombination(E,arguments)},tetrad:function(){return this._applyCombination(O,arguments)}},f.fromRatio=function(e,t){if("object"==typeof e){var n={};for(var r in e)e.hasOwnProperty(r)&&(n[r]="a"===r?e[r]:F(e[r]));e=n}return f(e,t)},f.equals=function(e,t){return!(!e||!t)&&f(e).toRgbString()==f(t).toRgbString()},f.random=function(){return f.fromRatio({r:d(),g:d(),b:d()})},f.mix=function(e,t,n){n=0===n?0:n||50;var r=f(e).toRgb(),i=f(t).toRgb(),o=n/100;return f({r:(i.r-r.r)*o+r.r,g:(i.g-r.g)*o+r.g,b:(i.b-r.b)*o+r.b,a:(i.a-r.a)*o+r.a})},f.readability=function(e,t){var n=f(e),r=f(t);return(i.max(n.getLuminance(),r.getLuminance())+.05)/(i.min(n.getLuminance(),r.getLuminance())+.05)},f.isReadable=function(e,t,n){var r,i,o=f.readability(e,t);switch(i=!1,(r=function(e){var t,n;t=((e=e||{level:"AA",size:"small"}).level||"AA").toUpperCase(),n=(e.size||"small").toLowerCase(),"AA"!==t&&"AAA"!==t&&(t="AA");"small"!==n&&"large"!==n&&(n="small");return{level:t,size:n}}(n)).level+r.size){case"AAsmall":case"AAAlarge":i=o>=4.5;break;case"AAlarge":i=o>=3;break;case"AAAsmall":i=o>=7}return i},f.mostReadable=function(e,t,n){var r,i,o,a,s=null,l=0;i=(n=n||{}).includeFallbackColors,o=n.level,a=n.size;for(var u=0;ul&&(l=r,s=f(t[u]));return f.isReadable(e,s,{level:o,size:a})||!i?s:(n.includeFallbackColors=!1,f.mostReadable(e,["#fff","#000"],n))};var L=f.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},P=f.hexNames=function(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[e[n]]=n);return t}(L);function I(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function D(e,t){(function(e){return"string"==typeof e&&-1!=e.indexOf(".")&&1===parseFloat(e)})(e)&&(e="100%");var n=function(e){return"string"==typeof e&&-1!=e.indexOf("%")}(e);return e=u(t,c(0,parseFloat(e))),n&&(e=parseInt(e*t,10)/100),i.abs(e-t)<1e-6?1:e%t/parseFloat(t)}function k(e){return u(1,c(0,e))}function R(e){return parseInt(e,16)}function j(e){return 1==e.length?"0"+e:""+e}function F(e){return e<=1&&(e=100*e+"%"),e}function N(e){return i.round(255*parseFloat(e)).toString(16)}function B(e){return R(e)/255}var z,U,H,V=(U="[\\s|\\(]+("+(z="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+z+")[,|\\s]+("+z+")\\s*\\)?",H="[\\s|\\(]+("+z+")[,|\\s]+("+z+")[,|\\s]+("+z+")[,|\\s]+("+z+")\\s*\\)?",{CSS_UNIT:new RegExp(z),rgb:new RegExp("rgb"+U),rgba:new RegExp("rgba"+H),hsl:new RegExp("hsl"+U),hsla:new RegExp("hsla"+H),hsv:new RegExp("hsv"+U),hsva:new RegExp("hsva"+H),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/});function G(e){return!!V.CSS_UNIT.exec(e)}e.exports?e.exports=f:void 0===(r=function(){return f}.call(t,n,t,e))||(e.exports=r)}(Math)},,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t._run=function(e,t,n,r,i){if("function"!=typeof e.run)throw new Error("Attempted to run something that is not a task.");return e.run(t,n,r,i)},t.fromPromise=function(e,t){var n=function(n){return i((function(t,r){return e(n).then(t,r)}),n,t)};return n.type=t,n},t.fromPromiseWithProgress=function(e,t){var n=function(n){var o=n.arg,a=n.onProgress;return i((function(t,n,i){return e({arg:o,onProgress:(i?function(e){return i.onProgress(a(e))}:r)||r}).then(t,n)}),{arg:o,onProgress:a},t)};return n.type=t,n},t.fromCallback=function(e,t){var n=function(n){return i((function(t,r){return e(n,(function(e,n){return e?r(e):t(n)}))}),n,t)};return n.type=t,n},t.taskCreator_=i,t.reportTasksForTesting=function(e){a=e},t.all=function(e){return o(e.map((function(e){return e.payload})),(function(t,n,r,i){if(0===e.length)return n([]);var o=Array(e.length),a=0,s=null;function l(e){if(e)return r(s=e)}return Promise.all(e.map((function(r,u){return r.run(t,function(t){return function(r){if(!s)return o[t]=r,(a+=1)===e.length?n(o):void 0}}(u),l,i)})))}),"Task.all("+e.map((function(e){return e.type})).join(", ")+")")},t.allSettled=function(e){return o(e.map((function(e){return e.payload})),(function(t,n,r,i){if(0===e.length)return n([]);var o=Array(e.length),a=0;function s(t,r){return function(i){if(o[t]={status:r,value:i},(a+=1)===e.length)return n(o)}}return Promise.allSettled(e.map((function(e,n){return e.run(t,s(n,"fulfilled"),s(n,"rejected"),i)})))}),"Task.allSettled("+e.map((function(e){return e.type})).join(", ")+")")};var r=function(){};function i(e,t,n){var r=function(n,r,o){return a("start",i,t),e((function(e){return a("success",i,e),n(e)}),(function(e){return a("error",i,e),r(e)}),o)};r.payload=t,r.type=n;var i=o(t,(function(e,t,n,i){return e(r,t,n,i)}),n);return i}function o(e,t,n){return{label:n,type:n,payload:e,run:t,chain:function(r){return o(e,(function(e,n,i,o){return t(e,(function(t){return r(t).run(e,n,i,o)}),i,o)}),"Chain(".concat(n,")"))},map:function(r){return o(e,(function(e,n,i,o){return t(e,(function(e){return n(r(e))}),i,o)}),n)},bimap:function(r,i){return o(e,(function(e,n,o,a){return t(e,(function(e){return n(r(e))}),(function(e){return o(i(e))}),a)}),n)}}}var a=function(e,t,n){}},function(e,t,n){"use strict";var r={DATA_TYPES:{DATE:"DATE",TIME:"TIME",DATETIME:"DATETIME",NUMBER:"NUMBER",INT:"INT",FLOAT:"FLOAT",CURRENCY:"CURRENCY",PERCENT:"PERCENT",STRING:"STRING",ZIPCODE:"ZIPCODE",BOOLEAN:"BOOLEAN",GEOMETRY:"GEOMETRY",GEOMETRY_FROM_STRING:"GEOMETRY_FROM_STRING",PAIR_GEOMETRY_FROM_STRING:"PAIR_GEOMETRY_FROM_STRING",NONE:"NONE",ARRAY:"ARRAY",DATE_OBJECT:"DATE_OBJECT",OBJECT:"OBJECT"},CATEGORIES:{GEOMETRY:"GEOMETRY",TIME:"TIME",DIMENSION:"DIMENSION",MEASURE:"MEASURE"},BOOLEAN_TRUE_VALUES:["true","yes"],BOOLEAN_FALSE_VALUES:["false","no"],DB_NULL:"\\N",NULL:"NULL",POSSIBLE_TYPES:{}};r.POSSIBLE_TYPES[r.CATEGORIES.GEOMETRY]=[r.DATA_TYPES.GEOMETRY_FROM_STRING,r.DATA_TYPES.PAIR_GEOMETRY_FROM_STRING,r.DATA_TYPES.GEOMETRY],r.POSSIBLE_TYPES[r.CATEGORIES.TIME]=[r.DATA_TYPES.DATETIME,r.DATA_TYPES.DATE,r.DATA_TYPES.TIME],r.POSSIBLE_TYPES[r.CATEGORIES.DIMENSION]=[r.DATA_TYPES.STRING,r.DATA_TYPES.BOOLEAN,r.DATA_TYPES.ZIPCODE],r.POSSIBLE_TYPES[r.CATEGORIES.MEASURE]=[r.DATA_TYPES.NUMBER,r.DATA_TYPES.INT,r.DATA_TYPES.FLOAT,r.DATA_TYPES.CURRENCY,r.DATA_TYPES.PERCENT],r.TYPES_TO_CATEGORIES=Object.keys(r.POSSIBLE_TYPES).reduce((function(e,t){return r.POSSIBLE_TYPES[t].forEach((function(n){e[n]=t})),e}),{}),r.VALIDATORS=[r.DATA_TYPES.GEOMETRY,r.DATA_TYPES.GEOMETRY_FROM_STRING,r.DATA_TYPES.PAIR_GEOMETRY_FROM_STRING,r.DATA_TYPES.BOOLEAN,r.DATA_TYPES.ARRAY,r.DATA_TYPES.DATE_OBJECT,r.DATA_TYPES.OBJECT,r.DATA_TYPES.CURRENCY,r.DATA_TYPES.PERCENT,r.DATA_TYPES.DATETIME,r.DATA_TYPES.DATE,r.DATA_TYPES.TIME,r.DATA_TYPES.INT,r.DATA_TYPES.FLOAT,r.DATA_TYPES.NUMBER,r.DATA_TYPES.ZIPCODE,r.DATA_TYPES.STRING],r.TIME_VALIDATORS=[r.DATA_TYPES.DATETIME,r.DATA_TYPES.DATE,r.DATA_TYPES.TIME],e.exports=r},function(e,t,n){"use strict";n.r(t);var r=n(304);n.d(t,"formatDefaultLocale",(function(){return r.a})),n.d(t,"format",(function(){return r.b})),n.d(t,"formatPrefix",(function(){return r.c}));var i=n(521);n.d(t,"formatLocale",(function(){return i.a}));var o=n(303);n.d(t,"formatSpecifier",(function(){return o.b})),n.d(t,"FormatSpecifier",(function(){return o.a}));var a=n(662);n.d(t,"precisionFixed",(function(){return a.a}));var s=n(660);n.d(t,"precisionPrefix",(function(){return s.a}));var l=n(661);n.d(t,"precisionRound",(function(){return l.a}))},function(e,t,n){(function(t){var n=/^\s+|\s+$/g,r=/^[-+]0x[0-9a-f]+$/i,i=/^0b[01]+$/i,o=/^0o[0-7]+$/i,a=parseInt,s="object"==typeof t&&t&&t.Object===Object&&t,l="object"==typeof self&&self&&self.Object===Object&&self,u=s||l||Function("return this")(),c=Object.prototype.toString,d=Math.max,f=Math.min,h=function(){return u.Date.now()};function p(e,t,n){var r,i,o,a,s,l,u=0,c=!1,p=!1,m=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function y(t){var n=r,o=i;return r=i=void 0,u=t,a=e.apply(o,n)}function v(e){return u=e,s=setTimeout(_,t),c?y(e):a}function b(e){var n=e-l;return void 0===l||n>=t||n<0||p&&e-u>=o}function _(){var e=h();if(b(e))return w(e);s=setTimeout(_,function(e){var n=t-(e-l);return p?f(n,o-(e-u)):n}(e))}function w(e){return s=void 0,m&&r?y(e):(r=i=void 0,a)}function x(){var e=h(),n=b(e);if(r=arguments,i=this,l=e,n){if(void 0===s)return v(l);if(p)return s=setTimeout(_,t),y(l)}return void 0===s&&(s=setTimeout(_,t)),a}return t=g(t)||0,A(n)&&(c=!!n.leading,o=(p="maxWait"in n)?d(g(n.maxWait)||0,t):o,m="trailing"in n?!!n.trailing:m),x.cancel=function(){void 0!==s&&clearTimeout(s),u=0,r=l=i=s=void 0},x.flush=function(){return void 0===s?a:w(h())},x}function A(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function g(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==c.call(e)}(e))return NaN;if(A(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=A(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(n,"");var s=i.test(e);return s||o.test(e)?a(e.slice(2),s?2:8):r.test(e)?NaN:+e}e.exports=function(e,t,n){var r=!0,i=!0;if("function"!=typeof e)throw new TypeError("Expected a function");return A(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),p(e,t,{leading:r,maxWait:t,trailing:i})}}).call(this,n(68))},function(e,t,n){"use strict";var r=n(3);Object.defineProperty(t,"__esModule",{value:!0}),t.DataRow=void 0;var i=r(n(7)),o=r(n(8)),a=r(n(4)),s=function(){function e(t,n){(0,i.default)(this,e),(0,a.default)(this,"_dataContainer",void 0),(0,a.default)(this,"_rowIndex",void 0),this._dataContainer=t,this._rowIndex=n}return(0,o.default)(e,[{key:"valueAt",value:function(e){var t;return null===(t=this._dataContainer)||void 0===t?void 0:t.valueAt(this._rowIndex,e)}},{key:"values",value:function(){return this._dataContainer?this._dataContainer.rowAsArray(this._rowIndex):[]}},{key:"setSource",value:function(e,t){this._dataContainer=e,this._rowIndex=t}},{key:"map",value:function(e){for(var t,n=(null===(t=this._dataContainer)||void 0===t?void 0:t.numColumns())||0,r=[],i=0;i=e[n][0]&&t<=e[n][1]}))}};t.getFilterDataFunc=w;var x=function(e){return e.colors.map(A.hexToRgb)},M=["lat","lng"];t.aggregateRequiredColumns=M;var E=function(e){(0,u.default)(n,e);var t=v(n);function n(e){var r;return(0,o.default)(this,n),r=t.call(this,e),(0,f.default)((0,s.default)(r),"getColorRange",void 0),r.getPositionAccessor=function(e){return b(r.config.columns)(e)},r.getColorRange=(0,h.default)(x),r.getPointData=function(e){return e.source},r.gpuFilterGetIndex=function(e){return r.getPointData(e).index},r.gpuFilterGetData=function(e,t,n){return e.valueAt(t.index,n)},r}return(0,a.default)(n,[{key:"isAggregated",get:function(){return!0}},{key:"requiredLayerColumns",get:function(){return M}},{key:"columnPairs",get:function(){return this.defaultPointColumnPairs}},{key:"noneLayerDataAffectingProps",get:function(){return[].concat((0,i.default)((0,l.default)((0,d.default)(n.prototype),"noneLayerDataAffectingProps",this)),["enable3d","colorRange","colorDomain","sizeRange","sizeScale","sizeDomain","percentile","coverage","elevationPercentile","elevationScale","enableElevationZoomFactor"])}},{key:"visualChannels",get:function(){return{color:{aggregation:"colorAggregation",channelScaleType:g.CHANNEL_SCALES.colorAggr,defaultMeasure:"property.pointCount",domain:"colorDomain",field:"colorField",key:"color",property:"color",range:"colorRange",scale:"colorScale"},size:{aggregation:"sizeAggregation",channelScaleType:g.CHANNEL_SCALES.sizeAggr,condition:function(e){return e.visConfig.enable3d},defaultMeasure:"property.pointCount",domain:"sizeDomain",field:"sizeField",key:"size",property:"height",range:"sizeRange",scale:"sizeScale"}}}},{key:"getVisualChannelDescription",value:function(e){var t,n=this.visualChannels[e];if(!n)return{label:"",measure:void 0};var r=n.range,i=n.field,o=n.defaultMeasure,a=n.aggregation,s=this.config[i],l=null===(t=this.visConfigSettings[r])||void 0===t?void 0:t.label;return{label:"function"==typeof l?l(this.config):l||"",measure:s&&a?"".concat(this.config.visConfig[a]," of ").concat(s.displayName||s.name):o}}},{key:"getHoverData",value:function(e){return e}},{key:"updateLayerVisualChannel",value:function(e,t){e.dataContainer;this.validateVisualChannel(t)}},{key:"validateVisualChannel",value:function(e){this.validateFieldType(e),this.validateAggregationType(e),this.validateScale(e)}},{key:"validateAggregationType",value:function(e){var t=this.visualChannels[e],n=t.field,r=t.aggregation,i=this.getAggregationOptions(e);r&&(i.length?i.includes(this.config.visConfig[r])||this.updateLayerVisConfig((0,f.default)({},r,i[0])):this.updateLayerConfig((0,f.default)({},n,null)))}},{key:"getAggregationOptions",value:function(e){var t=this.visualChannels[e],n=t.field,r=t.channelScaleType;return Object.keys(this.config[n]?g.FIELD_OPTS[this.config[n].type].scale[r]:g.DEFAULT_AGGREGATION[r])}},{key:"getScaleOptions",value:function(e){var t=this.visualChannels[e],n=t.field,r=t.aggregation,i=t.channelScaleType,o=r?this.config.visConfig[r]:null;return o?this.config[n]?g.FIELD_OPTS[this.config[n].type].scale[i][o]:g.DEFAULT_AGGREGATION[i][o]:[]}},{key:"updateLayerDomain",value:function(e,t){return this}},{key:"updateLayerMeta",value:function(e,t){var n=this.getPointsBounds(e,t);this.updateMeta({bounds:n})}},{key:"calculateDataAttribute",value:function(e,t){e.dataContainer;for(var n=e.filteredIndex,r=[],i=0;i0&&void 0!==arguments[0]?arguments[0]:[],t=1e4,n=e.length>t?(0,h.getSampleData)(e,t):e,r=n.filter((function(e){return e&&e.geometry&&e.geometry.coordinates&&e.geometry.coordinates.length}));try{return(0,l.default)({type:"FeatureCollection",features:r})}catch(e){return null}}t.FeatureTypes=i,function(e){e.Point="Point",e.MultiPoint="MultiPoint",e.LineString="LineString",e.MultiLineString="MultiLineString",e.Polygon="Polygon",e.MultiPolygon="MultiPolygon"}(i||(t.FeatureTypes=i={}));var b={Point:"point",MultiPoint:"point",LineString:"line",MultiLineString:"line",Polygon:"polygon",MultiPolygon:"polygon"};function _(e){for(var t={},n=0;n=t||n<0||g&&e-u>=o}function _(){var e=h();if(b(e))return w(e);s=setTimeout(_,function(e){var n=t-(e-l);return g?f(n,o-(e-u)):n}(e))}function w(e){return s=void 0,m&&r?y(e):(r=i=void 0,a)}function x(){var e=h(),n=b(e);if(r=arguments,i=this,l=e,n){if(void 0===s)return v(l);if(g)return s=setTimeout(_,t),y(l)}return void 0===s&&(s=setTimeout(_,t)),a}return t=A(t)||0,p(n)&&(c=!!n.leading,o=(g="maxWait"in n)?d(A(n.maxWait)||0,t):o,m="trailing"in n?!!n.trailing:m),x.cancel=function(){void 0!==s&&clearTimeout(s),u=0,r=l=i=s=void 0},x.flush=function(){return void 0===s?a:w(h())},x}}).call(this,n(68))},function(e,t,n){"use strict";var r=n(3),i=n(6);Object.defineProperty(t,"__esModule",{value:!0}),t.default=c;var o=i(n(0)),a=n(29),s=r(n(128)),l=r(n(459)),u=n(36);function c(e){var t=function(t){var n=t.value;return o.default.createElement(e,{dataset:n})},n=function(e){var n=e.dataId,r=e.datasets,i=e.disabled,l=e.onSelect,c=e.defaultValue,d=e.inputTheme,f=(0,o.useMemo)((function(){return Object.values(r).map((function(e){return{label:e.label,value:e.id,color:e.color}}))}),[r]),h=(0,o.useMemo)((function(){return n?(Array.isArray(n)&&n||[n]).map((function(e){return r[e]})):[]}),[n,r]);return o.default.createElement(a.SidePanelSection,{className:"data-source-selector"},o.default.createElement(a.PanelLabel,null,o.default.createElement(u.FormattedMessage,{id:"misc.dataSource"})),o.default.createElement(s.default,{inputTheme:d,selectedItems:h,options:f,getOptionValue:"value",filterOption:"label",multiSelect:!1,onChange:l,placeholder:c,disabled:Boolean(i),displayOption:"label",DropDownLineItemRenderComponent:t}))};return n.defaultProps={defaultValue:"Select A Dataset"},n}c.deps=[l.default]},function(e,t,n){"use strict";var r=n(3);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){return function(e){var t=e.onClick,n=void 0===t?d:t,r=e.onClickSquare,i=void 0===r?d:r,o=e.dataset,a=e.updateTableColor;return s.default.createElement(f,{className:"source-data-tag"},s.default.createElement(p,{id:o.id},s.default.createElement(c.DatasetSquare,{className:"dataset-color",backgroundColor:o.color,onClick:i,"data-tip":!0,"data-for":"update-color-".concat(o.id)}),a?s.default.createElement(c.Tooltip,{id:"update-color-".concat(o.id),effect:"solid"},s.default.createElement("span",null,s.default.createElement(l.FormattedMessage,{id:"Update color"}))):null),s.default.createElement("div",{className:"dataset-name",title:o.label,onClick:n},o.label))}};var i,o,a=r(n(15)),s=r(n(0)),l=n(36),u=r(n(14)),c=n(250);function d(e){}var f=u.default.div(i||(i=(0,a.default)(["\n display: flex;\n color: ",";\n font-size: 11px;\n letter-spacing: 0.2px;\n overflow: auto;\n\n .dataset-color {\n flex-shrink: 0;\n margin-top: 3px;\n }\n\n .dataset-name {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n"])),(function(e){return e.theme.textColor})),h=u.default.div(o||(o=(0,a.default)(["\n display: flex;\n"]))),p=function(e){var t=e.children,n=e.id;return s.default.createElement(h,{className:"dataset-action update-color","data-tip":!0,"data-for":"update-color-".concat(n)},t)}},function(e,t,n){"use strict";var r=n(3),i=n(6);Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.InputBoxContainer=t.ColorSelectorInput=t.ColorBlock=void 0;var o,a,s,l,u=r(n(33)),c=r(n(71)),d=r(n(44)),f=r(n(7)),h=r(n(8)),p=r(n(13)),A=r(n(10)),g=r(n(11)),m=r(n(9)),y=r(n(4)),v=r(n(15)),b=i(n(0)),_=r(n(14)),w=n(79),x=n(24),M=r(n(975)),E=r(n(976)),O=r(n(461)),S=n(29),T=r(n(405)),C=r(n(196));function L(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=(0,m.default)(e);if(t){var i=(0,m.default)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return(0,g.default)(this,n)}}var P=_.default.div(o||(o=(0,v.default)(["\n padding: 0px 12px 12px 12px;\n"]))),I={type:"number",range:[0,1],value0:0,step:.01,isRanged:!1,label:"Opacity",showInput:!0},D=_.default.div(a||(a=(0,v.default)(["\n width: 32px;\n height: 18px;\n border-radius: 1px;\n background-color: ",";\n"])),(function(e){return Array.isArray(e.backgroundcolor)?"rgb(".concat(e.backgroundcolor.slice(0,3).join(","),")"):"transparent"}));t.ColorBlock=D;var k=_.default.div(s||(s=(0,v.default)(["\n ",";\n height: ",";\n\n .color-selector__selector__label {\n text-transform: capitalize;\n font-size: 12px;\n text-align: center;\n color: ",";\n }\n"])),(function(e){return"secondary"===e.inputTheme?e.theme.secondaryInput:e.theme.input}),(function(e){return e.theme.inputBoxHeight}),(function(e){return e.theme.inputPlaceholderColor}));t.ColorSelectorInput=k;var R=_.default.div(l||(l=(0,v.default)(["\n display: flex;\n justify-content: space-between;\n\n .color-select__input-group {\n flex-grow: 1;\n }\n .color-select__input-group:nth-child(2) {\n margin-left: 12px;\n }\n"])));function j(e){var t=function(t){(0,A.default)(r,t);var n=L(r);function r(){var e;(0,f.default)(this,r);for(var t=arguments.length,i=new Array(t),o=0;o0?"border-image: ".concat((0,d.createLinearGradient)("bottom",e.$labelRCGColorValues)," 3;"):"border-color: transparent;"}));t.StyledFilterHeader=h;var p=l.default.div(o||(o=(0,a.default)(["\n display: flex;\n flex: 1;\n overflow: hidden;\n"])));function A(e){var t={delete:c.Trash};return function(n){var r=n.children,i=n.datasets,o=n.filter,a=n.removeFilter,l=n.actionIcons,u=void 0===l?t:l;return s.default.createElement(h,{className:"filter-panel__header",$labelRCGColorValues:i.map((function(e){return e.color}))},s.default.createElement(p,null,r),s.default.createElement(e,{id:o.id,tooltip:"tooltip.delete",tooltipType:"error",onClick:a,hoverColor:"errorColor",IconComponent:u.delete}))}}A.deps=[u.default];var g=A;t.default=g},function(e,t,n){"use strict";var r=n(3),i=n(6);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=i(n(0)),a=n(29),s=r(n(473)),l=r(n(252)),u=r(n(458)),c=r(n(251)),d=n(629);function f(e,t,n,r){var i=o.default.memo((function(i){var s=i.children,l=i.allAvailableFields,u=i.datasets,c=i.filter,f=i.idx,h=i.removeFilter,p=i.setFilter,A=i.panelActions,g=void 0===A?[]:A,m=(0,o.useCallback)((function(e){return p(f,"name",e.name)}),[f,p]),y=(0,o.useCallback)((function(e){return p(f,"dataId",[e])}),[f,p]),v=(0,o.useMemo)((function(){return Array.isArray(c.name)?c.name[0]:c.name}),[c.name]),b=u[c.dataId[0]],_=(0,o.useMemo)((function(){return(0,d.getSupportedFilterFields)(b.supportedFilterTypes,l)}),[b.supportedFilterTypes,l]);return o.default.createElement(o.default.Fragment,null,o.default.createElement(e,{datasets:[b],filter:c,removeFilter:h},o.default.createElement(n,{inputTheme:"secondary",fields:_,value:v,erasable:!1,onSelect:m}),g.map((function(e){return o.default.createElement(r,{id:e.id,key:e.id,onClick:e.onClick,tooltip:e.tooltip,IconComponent:e.iconComponent,active:e.active})}))),o.default.createElement(a.StyledFilterContent,{className:"filter-panel__content"},Object.keys(u).length>1&&o.default.createElement(t,{inputTheme:"secondary",datasets:u,disabled:c.freeze,dataId:c.dataId,onSelect:y}),s))}));return i.displayName="FilterPanelWithFieldSelect",i}f.deps=[s.default,u.default,c.default,l.default];var h=f;t.default=h},function(e,t,n){"use strict";var r=n(6),i=n(3);Object.defineProperty(t,"__esModule",{value:!0}),t.MapViewStateContextProvider=t.MapViewStateContext=void 0;var o=i(n(44)),a=i(n(40)),s=r(n(0)),l=i(n(394)),u=i(n(283)),c=n(166),d=(0,s.createContext)({getInternalViewState:function(){return{latitude:0,longitude:0,zoom:0}},setInternalViewState:function(e){}});t.MapViewStateContext=d;t.MapViewStateContextProvider=function(e){var t=e.mapState,n=e.children,r=t||{},i=r.isSplit,f=r.isViewportSynced,h=(0,s.useState)([t]),p=(0,a.default)(h,2),A=p[0],g=p[1];(0,s.useEffect)((function(){if(t){var e=A[0];if(e!==t){var n,r=Object.keys(e).filter((function(e){return!e.startsWith("transition")})),o=function(e,t){return!(0,l.default)((0,u.default)(e,r),(0,u.default)(t,r))};if(i&&!f)null!==(n=t.splitMapViewports)&&void 0!==n&&n.some((function(e,t){return o(e,A[t])}))&&g(t.splitMapViewports);else o(e,t)&&g([(0,c.pickViewportPropsFromMapState)(t)])}}}),[t]);var m={getInternalViewState:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return null!==(e=A[t])&&void 0!==e?e:A[0]},setInternalViewState:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;g((function(n){if(i&&!f){var r=(0,o.default)(n);return r[t]=e,r}return[e]}))}};return s.default.createElement(d.Provider,{value:m},n)}},function(e,t,n){"use strict";var r=n(3),i=n(6);Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.ModalDialog=t.ModalFooter=t.ModalTitle=void 0;var o,a,s,l,u,c,d,f,h,p,A,g,m,y=r(n(7)),v=r(n(8)),b=r(n(10)),_=r(n(11)),w=r(n(9)),x=r(n(33)),M=r(n(4)),E=r(n(72)),O=r(n(15)),S=i(n(0)),T=n(36),C=r(n(14)),L=r(n(965)),P=n(43),I=n(29),D=n(120);function k(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=(0,w.default)(e);if(t){var i=(0,w.default)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return(0,_.default)(this,n)}}function R(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function j(e){for(var t=1;te?t:e}function m(e,t){return t(t.index=n.index,e(n.source,t))}(t,n),r){case p.MIN:return e=>function(e,t){if(Number.isFinite(t))return e.length?t:null;const n=e.map(t).filter(Number.isFinite);return n.length?n.reduce(m,1/0):null}(e,t);case p.SUM:return e=>function(e,t){if(Number.isFinite(t))return e.length?e.length*t:null;const n=e.map(t).filter(Number.isFinite);return n.length?n.reduce(A,0):null}(e,t);case p.MEAN:return e=>function(e,t){if(Number.isFinite(t))return e.length?t:null;const n=e.map(t).filter(Number.isFinite);return n.length?n.reduce(A,0)/n.length:null}(e,t);case p.MAX:return e=>function(e,t){if(Number.isFinite(t))return e.length?t:null;const n=e.map(t).filter(Number.isFinite);return n.length?n.reduce(g,-1/0):null}(e,t);default:return null}}function v(e,t={}){return n=>(t.indices=n.map(e=>e.index),e(n.map(e=>e.source),t))}const b={projectPoints:!1,viewport:null,createBufferObjects:!0,moduleSettings:{}},_=3402823466e29,w=[32775,32774],x=[32776,32774],M=[32776,32775],E={[p.SUM]:32774,[p.MEAN]:32774,[p.MIN]:w,[p.MAX]:x},O={size:1,operation:p.SUM,needMin:!1,needMax:!1,combineMaxMin:!1};var S=n(318),T=n(202);const C={10240:9728,10241:9728};function L(e,t={}){const{width:n=1,height:r=1,data:i=null,unpackFlipY:o=!0,parameters:a=C}=t;return new S.a(e,{data:i,format:Object(s.j)(e)?34836:6408,type:5126,border:0,mipmaps:!1,parameters:a,dataFormat:6408,width:n,height:r,unpackFlipY:o})}function P(e,t){const{id:n,width:r=1,height:i=1,texture:o}=t;return new T.a(e,{id:n,width:r,height:i,attachments:{36064:o}})}const I=["aggregationBuffer","maxMinBuffer","minBuffer","maxBuffer"],D={maxData:"maxBuffer",minData:"minBuffer",maxMinData:"maxMinBuffer"},k=[o.a.WEBGL2,o.a.COLOR_ATTACHMENT_RGBA32F,o.a.BLEND_EQUATION_MINMAX,o.a.FLOAT_BLEND,o.a.TEXTURE_FLOAT];class R{static getAggregationData({aggregationData:e,maxData:t,minData:n,maxMinData:r,pixelIndex:i}){const o=4*i,a={};return e&&(a.cellCount=e[o+3],a.cellWeight=e[o]),r?(a.maxCellWieght=r[0],a.minCellWeight=r[3]):(t&&(a.maxCellWieght=t[0],a.totalCount=t[3]),n&&(a.minCellWeight=n[0],a.totalCount=t[3])),a}static getCellData({countsData:e,size:t=1}){const n=e.length/4,r=new Float32Array(n*t),i=new Uint32Array(n);for(let o=0;o{for(const t in e)e[t].delete()})}([i,r,o,a,s,l,u])}run(e={}){this.setState({results:{}});const t=this._normalizeAggregationParams(e);return this._hasGPUSupport||i.a.log(1,"GPUGridAggregator: not supported")(),this._runAggregation(t)}getData(e){const t={},n=this.state.results;n[e].aggregationData||(n[e].aggregationData=n[e].aggregationBuffer.getData()),t.aggregationData=n[e].aggregationData;for(const r in D){const i=D[r];(n[e][r]||n[e][i])&&(n[e][r]=n[e][r]||n[e][i].getData(),t[r]=n[e][r])}return t}updateShaders(e={}){this.setState({shaderOptions:e,modelDirty:!0})}_normalizeAggregationParams(e){const t={...b,...e},{weights:n}=t;return n&&(t.weights=function(e){const t={};for(const n in e)t[n]={...O,...e[n]};return t}(n)),t}setState(e){Object.assign(this.state,e)}_getAggregateData(e){const t={},{textures:n,framebuffers:r,maxMinFramebuffers:i,minFramebuffers:o,maxFramebuffers:a,resources:s}=this.state,{weights:u}=e;for(const e in u){t[e]={};const{needMin:c,needMax:d,combineMaxMin:f}=u[e];t[e].aggregationTexture=n[e],t[e].aggregationBuffer=Object(l.d)(r[e],{target:u[e].aggregationBuffer,sourceType:5126}),c&&d&&f?(t[e].maxMinBuffer=Object(l.d)(i[e],{target:u[e].maxMinBuffer,sourceType:5126}),t[e].maxMinTexture=s["".concat(e,"-maxMinTexture")]):(c&&(t[e].minBuffer=Object(l.d)(o[e],{target:u[e].minBuffer,sourceType:5126}),t[e].minTexture=s["".concat(e,"-minTexture")]),d&&(t[e].maxBuffer=Object(l.d)(a[e],{target:u[e].maxBuffer,sourceType:5126}),t[e].maxTexture=s["".concat(e,"-maxTexture")]))}return this._trackGPUResultBuffers(t,u),t}_renderAggregateData(e){const{cellSize:t,projectPoints:n,attributes:r,moduleSettings:i,numCol:o,numRow:a,weights:s,translation:l,scaling:u}=e,{maxMinFramebuffers:c,minFramebuffers:d,maxFramebuffers:f}=this.state,h=[o,a],p={blend:!0,depthTest:!1,blendFunc:[1,1]},A={cellSize:t,gridSize:h,projectPoints:n,translation:l,scaling:u};for(const e in s){const{needMin:t,needMax:n}=s[e],o=t&&n&&s[e].combineMaxMin;this._renderToWeightsTexture({id:e,parameters:p,moduleSettings:i,uniforms:A,gridSize:h,attributes:r,weights:s}),o?this._renderToMaxMinTexture({id:e,parameters:{...p,blendEquation:M},gridSize:h,minOrMaxFb:c[e],clearParams:{clearColor:[0,0,0,_]},combineMaxMin:o}):(t&&this._renderToMaxMinTexture({id:e,parameters:{...p,blendEquation:w},gridSize:h,minOrMaxFb:d[e],clearParams:{clearColor:[_,_,_,0]},combineMaxMin:o}),n&&this._renderToMaxMinTexture({id:e,parameters:{...p,blendEquation:x},gridSize:h,minOrMaxFb:f[e],clearParams:{clearColor:[0,0,0,0]},combineMaxMin:o}))}}_renderToMaxMinTexture(e){const{id:t,parameters:n,gridSize:r,minOrMaxFb:i,combineMaxMin:o,clearParams:a={}}=e,{framebuffers:l}=this.state,{gl:u,allAggregationModel:c}=this;Object(s.o)(u,{...a,framebuffer:i,viewport:[0,0,r[0],r[1]]},()=>{u.clear(16384),c.draw({parameters:n,uniforms:{uSampler:l[t].texture,gridSize:r,combineMaxMin:o}})})}_renderToWeightsTexture(e){const{id:t,parameters:n,moduleSettings:r,uniforms:i,gridSize:o,weights:a}=e,{framebuffers:l,equations:u,weightAttributes:d}=this.state,{gl:f,gridAggregationModel:h}=this,{operation:A}=a[t],g=A===p.MIN?[_,_,_,0]:[0,0,0,0];if(Object(s.o)(f,{framebuffer:l[t],viewport:[0,0,o[0],o[1]],clearColor:g},()=>{f.clear(16384);const e={weights:d[t]};h.draw({parameters:{...n,blendEquation:u[t]},moduleSettings:r,uniforms:i,attributes:e})}),A===p.MEAN){const{meanTextures:e,textures:n}=this.state,r={_sourceTextures:{aggregationValues:e[t]},_targetTexture:n[t],elementCount:n[t].width*n[t].height};this.meanTransform?this.meanTransform.update(r):this.meanTransform=function(e,t){return new c.a(e,{vs:"#define SHADER_NAME gpu-aggregation-transform-mean-vs\nattribute vec4 aggregationValues;\nvarying vec4 meanValues;\n\nvoid main()\n{\n bool isCellValid = bool(aggregationValues.w > 0.);\n meanValues.xyz = isCellValid ? aggregationValues.xyz/aggregationValues.w : vec3(0, 0, 0);\n meanValues.w = aggregationValues.w;\n gl_PointSize = 1.0;\n}\n",_targetTextureVarying:"meanValues",...t})}(f,r),this.meanTransform.run({parameters:{blend:!1,depthTest:!1}}),l[t].attach({36064:n[t]})}}_runAggregation(e){this._updateModels(e),this._setupFramebuffers(e),this._renderAggregateData(e);const t=this._getAggregateData(e);return this.setState({results:t}),t}_setupFramebuffers(e){const{textures:t,framebuffers:n,maxMinFramebuffers:r,minFramebuffers:i,maxFramebuffers:o,meanTextures:a,equations:s}=this.state,{weights:l}=e,{numCol:u,numRow:c}=e,d={width:u,height:c};for(const e in l){const{needMin:f,needMax:h,combineMaxMin:A,operation:g}=l[e];t[e]=l[e].aggregationTexture||t[e]||L(this.gl,{id:"".concat(e,"-texture"),width:u,height:c}),t[e].resize(d);let m=t[e];g===p.MEAN&&(a[e]=a[e]||L(this.gl,{id:"".concat(e,"-mean-texture"),width:u,height:c}),a[e].resize(d),m=a[e]),n[e]?n[e].attach({36064:m}):n[e]=P(this.gl,{id:"".concat(e,"-fb"),width:u,height:c,texture:m}),n[e].resize(d),s[e]=E[g]||E.SUM,(f||h)&&(f&&h&&A?r[e]||(m=l[e].maxMinTexture||this._getMinMaxTexture("".concat(e,"-maxMinTexture")),r[e]=P(this.gl,{id:"".concat(e,"-maxMinFb"),texture:m})):(f&&(i[e]||(m=l[e].minTexture||this._getMinMaxTexture("".concat(e,"-minTexture")),i[e]=P(this.gl,{id:"".concat(e,"-minFb"),texture:m}))),h&&(o[e]||(m=l[e].maxTexture||this._getMinMaxTexture("".concat(e,"-maxTexture")),o[e]=P(this.gl,{id:"".concat(e,"-maxFb"),texture:m})))))}}_getMinMaxTexture(e){const{resources:t}=this.state;return t[e]||(t[e]=L(this.gl,{id:"resourceName"})),t[e]}_setupModels({numCol:e=0,numRow:t=0}={}){var n;const{gl:r}=this,{shaderOptions:i}=this.state;if(null===(n=this.gridAggregationModel)||void 0===n||n.delete(),this.gridAggregationModel=function(e,t){const n=Object(f.a)({vs:"#define SHADER_NAME gpu-aggregation-to-grid-vs\n\nattribute vec3 positions;\nattribute vec3 positions64Low;\nattribute vec3 weights;\nuniform vec2 cellSize;\nuniform vec2 gridSize;\nuniform bool projectPoints;\nuniform vec2 translation;\nuniform vec3 scaling;\n\nvarying vec3 vWeights;\n\nvec2 project_to_pixel(vec4 pos) {\n vec4 result;\n pos.xy = pos.xy/pos.w;\n result = pos + vec4(translation, 0., 0.);\n result.xy = scaling.z > 0. ? result.xy * scaling.xy : result.xy;\n return result.xy;\n}\n\nvoid main(void) {\n\n vWeights = weights;\n\n vec4 windowPos = vec4(positions, 1.);\n if (projectPoints) {\n windowPos = project_position_to_clipspace(positions, positions64Low, vec3(0));\n }\n\n vec2 pos = project_to_pixel(windowPos);\n\n vec2 pixelXY64[2];\n pixelXY64[0] = vec2(pos.x, 0.);\n pixelXY64[1] = vec2(pos.y, 0.);\n vec2 gridXY64[2];\n gridXY64[0] = div_fp64(pixelXY64[0], vec2(cellSize.x, 0));\n gridXY64[1] = div_fp64(pixelXY64[1], vec2(cellSize.y, 0));\n float x = floor(gridXY64[0].x);\n float y = floor(gridXY64[1].x);\n pos = vec2(x, y);\n pos = (pos * (2., 2.) / (gridSize)) - (1., 1.);\n vec2 offset = 1.0 / gridSize;\n pos = pos + offset;\n\n gl_Position = vec4(pos, 0.0, 1.0);\n gl_PointSize = 1.0;\n}\n",fs:"#define SHADER_NAME gpu-aggregation-to-grid-fs\n\nprecision highp float;\n\nvarying vec3 vWeights;\n\nvoid main(void) {\n gl_FragColor = vec4(vWeights, 1.0);\n DECKGL_FILTER_COLOR(gl_FragColor, geometry);\n}\n",modules:[d.b,h.a]},t);return new u.a(e,{id:"Gird-Aggregation-Model",vertexCount:1,drawMode:0,...n})}(r,i),!this.allAggregationModel){const n=e*t;this.allAggregationModel=function(e,t){return new u.a(e,{id:"All-Aggregation-Model",vs:"#version 300 es\n#define SHADER_NAME gpu-aggregation-all-vs-64\n\nin vec2 position;\nuniform ivec2 gridSize;\nout vec2 vTextureCoord;\n\nvoid main(void) {\n vec2 pos = vec2(-1.0, -1.0);\n vec2 offset = 1.0 / vec2(gridSize);\n pos = pos + offset;\n\n gl_Position = vec4(pos, 0.0, 1.0);\n\n int yIndex = gl_InstanceID / gridSize[0];\n int xIndex = gl_InstanceID - (yIndex * gridSize[0]);\n\n vec2 yIndexFP64 = vec2(float(yIndex), 0.);\n vec2 xIndexFP64 = vec2(float(xIndex), 0.);\n vec2 gridSizeYFP64 = vec2(gridSize[1], 0.);\n vec2 gridSizeXFP64 = vec2(gridSize[0], 0.);\n\n vec2 texCoordXFP64 = div_fp64(yIndexFP64, gridSizeYFP64);\n vec2 texCoordYFP64 = div_fp64(xIndexFP64, gridSizeXFP64);\n\n vTextureCoord = vec2(texCoordYFP64.x, texCoordXFP64.x);\n gl_PointSize = 1.0;\n}\n",fs:"#version 300 es\n#define SHADER_NAME gpu-aggregation-all-fs\n\nprecision highp float;\n\nin vec2 vTextureCoord;\nuniform sampler2D uSampler;\nuniform bool combineMaxMin;\nout vec4 fragColor;\nvoid main(void) {\n vec4 textureColor = texture(uSampler, vec2(vTextureCoord.s, vTextureCoord.t));\n if (textureColor.a == 0.) {\n discard;\n }\n fragColor.rgb = textureColor.rgb;\n fragColor.a = combineMaxMin ? textureColor.r : textureColor.a;\n}\n",modules:[d.b],vertexCount:1,drawMode:0,isInstanced:!0,instanceCount:t,attributes:{position:[0,0]}})}(r,n)}}_setupWeightAttributes(e){const{weightAttributes:t}=this.state,{weights:n}=e;for(const r in n)t[r]=e.attributes[r]}_trackGPUResultBuffers(e,t){const{resources:n}=this.state;for(const r in e)if(e[r])for(const i of I)if(e[r][i]&&t[r][i]!==e[r][i]){const t="gpu-result-".concat(r,"-").concat(i);n[t]&&n[t].delete(),n[t]=e[r][i]}}_updateModels(e){const{vertexCount:t,attributes:n,numCol:r,numRow:i}=e,{modelDirty:o}=this.state;o&&(this._setupModels(e),this.setState({modelDirty:!1})),this._setupWeightAttributes(e),this.gridAggregationModel.setVertexCount(t),this.gridAggregationModel.setAttributes(n),this.allAggregationModel.setInstanceCount(r*i)}}var j=n(175),F=n(519),N=n(879);const B=[[255,255,178],[254,217,118],[254,178,76],[253,141,60],[240,59,32],[189,0,38]];function z(e,t=!1,n=Float32Array){let r;if(Number.isFinite(e[0]))r=new n(e);else{r=new n(4*e.length);let t=0;for(let n=0;n= domain.x && value <= domain.y) {\n float domainRange = domain.y - domain.x;\n if (domainRange <= 0.) {\n outColor = colorRange[0];\n } else {\n float rangeCount = float(RANGE_COUNT);\n float rangeStep = domainRange / rangeCount;\n float idx = floor((value - domain.x) / rangeStep);\n idx = clamp(idx, 0., rangeCount - 1.);\n int intIdx = int(idx);\n outColor = colorRange[intIdx];\n }\n }\n outColor = outColor / 255.;\n return outColor;\n}\n\nvoid main(void) {\n vSampleCount = instanceCounts.a;\n\n float weight = instanceCounts.r;\n float maxWeight = texture2D(maxTexture, vec2(0.5)).r;\n\n float step = weight / maxWeight;\n vec4 minMaxColor = mix(minColor, maxColor, step) / 255.;\n\n vec2 domain = colorDomain;\n float domainMaxValid = float(colorDomain.y != 0.);\n domain.y = mix(maxWeight, colorDomain.y, domainMaxValid);\n vec4 rangeColor = quantizeScale(domain, colorRange, weight);\n\n float rangeMinMax = float(shouldUseMinMax);\n vec4 color = mix(rangeColor, minMaxColor, rangeMinMax);\n vColor = vec4(color.rgb, color.a * opacity);\n picking_setPickingColor(instancePickingColors);\n\n gl_Position = vec4(instancePositions + positions * cellScale, 1.);\n}\n",fs:"#define SHADER_NAME screen-grid-layer-fragment-shader\n\nprecision highp float;\n\nvarying vec4 vColor;\nvarying float vSampleCount;\n\nvoid main(void) {\n if (vSampleCount <= 0.0) {\n discard;\n }\n gl_FragColor = vColor;\n\n DECKGL_FILTER_COLOR(gl_FragColor, geometry);\n}\n",modules:[N.a]}}initializeState(){const{gl:e}=this.context;this.getAttributeManager().addInstanced({instancePositions:{size:3,update:this.calculateInstancePositions},instanceCounts:{size:4,noAlloc:!0}}),this.setState({model:this._getModel(e)})}shouldUpdateState({changeFlags:e}){return e.somethingChanged}updateState(e){super.updateState(e);const{oldProps:t,props:n,changeFlags:r}=e,i=this.getAttributeManager();n.numInstances!==t.numInstances?i.invalidateAll():t.cellSizePixels!==n.cellSizePixels&&i.invalidate("instancePositions"),this._updateUniforms(t,n,r)}draw({uniforms:e}){const{parameters:t,maxTexture:n}=this.props,r=this.props.minColor||U,i=this.props.maxColor||H,o=this.props.colorDomain||[1,0],{model:a}=this.state;a.setUniforms(e).setUniforms({minColor:r,maxColor:i,maxTexture:n,colorDomain:o}).draw({parameters:{depthTest:!1,depthMask:!1,...t}})}calculateInstancePositions(e,{numInstances:t}){const{width:n,height:r}=this.context.viewport,{cellSizePixels:i}=this.props,o=Math.ceil(n/i),{value:a,size:s}=e;for(let e=0;ee[n]!==t[n])&&r.setUniforms({shouldUseMinMax:this._shouldUseMinMax()}),e.colorRange!==t.colorRange&&r.setUniforms({colorRange:z(t.colorRange)}),e.cellMarginPixels!==t.cellMarginPixels||e.cellSizePixels!==t.cellSizePixels||n.viewportChanged){const{width:e,height:t}=this.context.viewport,{cellSizePixels:n,cellMarginPixels:i}=this.props,o=n>i?i:0,a=new Float32Array([(n-o)/e*2,-(n-o)/t*2,1]);r.setUniforms({cellScale:a})}}}Object(r.a)(Y,"layerName","ScreenGridCellLayer"),Object(r.a)(Y,"defaultProps",G);var W=n(665),q=n(422),X=n(520);function Z(e,t){const n={};for(const r in e)t.includes(r)||(n[r]=e[r]);return n}class K extends W.a{constructor(...e){super(...e),Object(r.a)(this,"state",void 0)}initializeAggregationLayer(e){super.initializeState(this.context),this.setState({ignoreProps:Z(this.constructor._propTypes,e.data.props),dimensions:e})}updateState(e){super.updateState(e);const{changeFlags:t}=e;if(t.extensionsChanged){const e=this.getShaders({});e&&e.defines&&(e.defines.NON_INSTANCED_MODEL=1),this.updateShaders(e)}this._updateAttributes()}updateAttributes(e){this.setState({changedAttributes:e})}getAttributes(){return this.getAttributeManager().getShaderAttributes()}getModuleSettings(){const{viewport:e,mousePosition:t,gl:n}=this.context;return Object.assign(Object.create(this.props),{viewport:e,mousePosition:t,pickingActive:0,devicePixelRatio:Object(s.e)(n)})}updateShaders(e){}isAggregationDirty(e,t={}){const{props:n,oldProps:r,changeFlags:i}=e,{compareAll:o=!1,dimension:a}=t,{ignoreProps:s}=this.state,{props:l,accessors:u=[]}=a,{updateTriggersChanged:c}=i;if(i.dataChanged)return!0;if(c){if(c.all)return!0;for(const e of u)if(c[e])return!0}if(o)return!!i.extensionsChanged||Object(q.a)({oldProps:r,newProps:n,ignoreProps:s,propTypes:this.constructor._propTypes});for(const e of l)if(n[e]!==r[e])return!0;return!1}isAttributeChanged(e){const{changedAttributes:t}=this.state;return e?t&&void 0!==t[e]:!function(e){let t=!0;for(const n in e){t=!1;break}return t}(t)}_getAttributeManager(){return new X.a(this.context.gl,{id:this.props.id,stats:this.context.stats})}}Object(r.a)(K,"layerName","AggregationLayer");var Q=n(96);function J(e,t,n){const r=n;return r.domain=()=>e,r.range=()=>t,r}function $(e,t){return J(e,t,n=>function(e,t,n){const r=e[1]-e[0];if(r<=0)return i.a.warn("quantizeScale: invalid domain, returning range[0]")(),t[0];const o=r/t.length,a=Math.floor((n-e[0])/o),s=Math.max(Math.min(a,t.length-1),0);return t[s]}(e,t,n))}function ee(e,t){return J(e,t,n=>function(e,t,n){return(n-e[0])/(e[1]-e[0])*(t[1]-t[0])+t[0]}(e,t,n))}function te(e,t){const n=e.sort(ne);let r=0;const i=Math.max(1,t.length),o=new Array(i-1);for(;++rfunction(e,t,n){return t[function(e,t){let n=0,r=e.length;for(;n>>1;ne(e[i],t)>0?r=i:n=i+1}return n}(e,n)]}(o,t,e);return a.thresholds=()=>o,J(e,t,a)}function ne(e,t){return e-t}function re(e,t){const n=e.length;if(t<=0||n<2)return e[0];if(t>=1)return e[n-1];const r=(n-1)*t,i=Math.floor(r),o=e[i];return o+(e[i+1]-o)*(r-i)}function ie(e,t){const n=new Map,r=[];for(const t of e){const e="".concat(t);n.has(e)||n.set(e,r.push(t))}return J(e,t,e=>function(e,t,n,r){const i="".concat(r);let o=t.get(i);return void 0===o&&(o=e.push(r),t.set(i,o)),n[(o-1)%n.length]}(r,n,t,e))}function oe(e){return null!=e}function ae(e,t){return("function"==typeof t?e.map(t):e).filter(oe)}function se(e,t){return ae(e,t)}function le(e,t){return function(e){const t=[];return e.forEach(e=>{!t.includes(e)&&oe(e)&&t.push(e)}),t}(ae(e,t))}const ue=e=>e.length,ce=e=>e.points,de=e=>e.index,fe=(e,t)=>et?1:e>=t?0:NaN,he={getValue:ue,getPoints:ce,getIndex:de,filterData:null};class pe{constructor(e=[],t=he){Object(r.a)(this,"maxCount",void 0),Object(r.a)(this,"maxValue",void 0),Object(r.a)(this,"minValue",void 0),Object(r.a)(this,"totalCount",void 0),Object(r.a)(this,"aggregatedBins",void 0),Object(r.a)(this,"sortedBins",void 0),Object(r.a)(this,"binMap",void 0),this.aggregatedBins=this.getAggregatedBins(e,t),this._updateMinMaxValues(),this.binMap=this.getBinMap()}getAggregatedBins(e,t){const{getValue:n=ue,getPoints:r=ce,getIndex:i=de,filterData:o}=t,a="function"==typeof o,s=e.length,l=[];let u=0;for(let t=0;tfunction(e,t,n){return Math.max(t,Math.min(n,e))}(e,0,100));return[Math.ceil(n/100*(t-1)),Math.floor(r/100*(t-1))]}getBinMap(){const e={};for(const t of this.aggregatedBins)e[t.i]=t;return e}_updateMinMaxValues(){let e=0,t=0,n=3402823466e29,r=0;for(const i of this.aggregatedBins)e=e>i.counts?e:i.counts,t=t>i.value?t:i.value,n=nfe(e.value,t.value))),!this.sortedBins.length)return[];let t=0,n=this.sortedBins.length-1;if(Array.isArray(e)){const r=this._percentileToIndex(e);t=r[0],n=r[1]}return[this.sortedBins[t].value,this.sortedBins[n].value]}getValueDomainByScale(e,[t=0,n=100]=[]){if(this.sortedBins||(this.sortedBins=this.aggregatedBins.sort((e,t)=>fe(e.value,t.value))),!this.sortedBins.length)return[];const r=this._percentileToIndex([t,n]);return this._getScaleDomain(e,r)}_getScaleDomain(e,[t,n]){const r=this.sortedBins;switch(e){case"quantize":case"linear":return[r[t].value,r[n].value];case"quantile":return se(r.slice(t,n+1),e=>e.value);case"ordinal":return le(r,e=>e.value);default:return[r[t].value,r[n].value]}}}var Ae=n(150),ge=n(39);function me(e){return Number.isFinite(e)?e:0}function ye(e,t){const n=e.positions.value;let r,i,o=1/0,a=-1/0,s=1/0,l=-1/0;for(let e=0;ea?r:a,s=il?i:l;return{xMin:me(s),xMax:me(l),yMin:me(o),yMax:me(a)}}function ve(e,t){const n=e<0?-1:1;let r=n<0?Math.abs(e)+t:Math.abs(e);return r=Math.floor(r/t)*t,r*n}function be(e,t,n=!0){if(!n)return{xOffset:t,yOffset:t};const{yMin:r,yMax:i}=e;return function(e,t){const n=(a=e,a/6378e3*(180/Math.PI)),r=(i=t,o=e,o/6378e3*(180/Math.PI)/Math.cos(i*Math.PI/180));var i,o;var a;return{yOffset:n,xOffset:r}}(t,(r+i)/2)}function _e(e,t,n,r){const o=be(e,t,r!==ge.a.CARTESIAN),a=function(e,t,n,r){const{width:o,height:a}=r,s=n===ge.a.CARTESIAN?[-o/2,-a/2]:[-180,-90];i.a.assert(n===ge.a.CARTESIAN||n===ge.a.LNGLAT||n===ge.a.DEFAULT);const{xMin:l,yMin:u}=e;return[-1*(ve(l-s[0],t.xOffset)+s[0]),-1*(ve(u-s[1],t.yOffset)+s[1])]}(e,o,r,n),{xMin:s,yMin:l,xMax:u,yMax:c}=e,d=u-s+o.xOffset,f=c-l+o.yOffset;return{gridOffset:o,translation:a,width:d,height:f,numCol:Math.ceil(d/o.xOffset),numRow:Math.ceil(f/o.yOffset)}}function we(e,t){const n=function(e,t){const{data:n=[],cellSize:r}=e,{attributes:i,viewport:o,projectPoints:a,numInstances:s}=t,l=i.positions.value,{size:u}=i.positions.getAccessor(),c=t.boundingBox||function(e,t){const n=e.value,{size:r}=e.getAccessor();let i,o,a=1/0,s=-1/0,l=1/0,u=-1/0;for(let e=0;es?i:s,l=ou?o:u);return{xMin:l,xMax:u,yMin:a,yMax:s}}(i.positions,s),d=t.posOffset||[180,90],f=t.gridOffset||be(c,r);if(f.xOffset<=0||f.yOffset<=0)return{gridHash:{},gridOffset:f};const{width:h,height:p}=o,A=Math.ceil(h/f.xOffset),g=Math.ceil(p/f.yOffset),m={},{iterable:y,objectInfo:v}=Object(Ae.a)(n),b=new Array(3);for(const e of y){v.index++,b[0]=l[v.index*u],b[1]=l[v.index*u+1],b[2]=u>=3?l[v.index*u+2]:0;const[t,n]=a?o.project(b):b;if(Number.isFinite(t)&&Number.isFinite(n)){const r=Math.floor((n+d[1])/f.yOffset),i=Math.floor((t+d[0])/f.xOffset);if(!a||i>=0&&i=0&&re.position},getWeight:{type:"accessor",value:1},gpuAggregation:!0,aggregation:"SUM"},Ee={data:{props:["cellSizePixels"]},weights:{props:["aggregation"],accessors:["getWeight"]}};class Oe extends xe{constructor(...e){super(...e),Object(r.a)(this,"state",void 0)}initializeState(){const{gl:e}=this.context;if(!Y.isSupported(e))return this.setState({supported:!1}),void i.a.error("ScreenGridLayer: ".concat(this.id," is not supported on this browser"))();super.initializeAggregationLayer({dimensions:Ee,getCellSize:e=>e.cellSizePixels});const t={count:{size:1,operation:p.SUM,needMax:!0,maxTexture:L(e,{id:"".concat(this.id,"-max-texture")})}};this.setState({supported:!0,projectPoints:!0,weights:t,subLayerData:{attributes:{}},maxTexture:t.count.maxTexture,positionAttributeName:"positions",posOffset:[0,0],translation:[1,-1]});this.getAttributeManager().add({positions:{size:3,accessor:"getPosition",type:5130,fp64:this.use64bitPositions()},count:{size:3,accessor:"getWeight"}})}shouldUpdateState({changeFlags:e}){return this.state.supported&&e.somethingChanged}updateState(e){super.updateState(e)}renderLayers(){if(!this.state.supported)return[];const{maxTexture:e,numRow:t,numCol:n,weights:r}=this.state,{updateTriggers:i}=this.props,{aggregationBuffer:o}=r.count;return new(this.getSubLayerClass("cells",Y))(this.props,this.getSubLayerProps({id:"cell-layer",updateTriggers:i}),{data:{attributes:{instanceCounts:o}},maxTexture:e,numInstances:t*n})}finalizeState(e){super.finalizeState(e);const{aggregationBuffer:t,maxBuffer:n,maxTexture:r}=this.state;null==t||t.delete(),null==n||n.delete(),null==r||r.delete()}getPickingInfo({info:e}){const{index:t}=e;if(t>=0){const{gpuGridAggregator:n,gpuAggregation:r,weights:i}=this.state,o=r?n.getData("count"):i.count;e.object=R.getAggregationData({pixelIndex:t,...o})}return e}updateResults({aggregationData:e,maxData:t}){const{count:n}=this.state.weights;n.aggregationData=e,n.aggregationBuffer.setData({data:e}),n.maxData=t,n.maxTexture.setImageData({data:t})}updateAggregationState(e){const t=e.props.cellSizePixels,n=e.oldProps.cellSizePixels!==t,{viewportChanged:r}=e.changeFlags;let o=e.props.gpuAggregation;this.state.gpuAggregation!==e.props.gpuAggregation&&o&&!R.isSupported(this.context.gl)&&(i.a.warn("GPU Grid Aggregation not supported, falling back to CPU")(),o=!1);const a=o!==this.state.gpuAggregation;this.setState({gpuAggregation:o});const s=this.isAttributeChanged("positions"),{dimensions:l}=this.state,{data:u,weights:c}=l,d=s||a||r||this.isAggregationDirty(e,{compareAll:o,dimension:u}),f=this.isAggregationDirty(e,{dimension:c});this.setState({aggregationDataDirty:d,aggregationWeightsDirty:f});const{viewport:h}=this.context;if(r||n){const{width:e,height:n}=h,r=Math.ceil(e/t),i=Math.ceil(n/t);this.allocateResources(i,r),this.setState({scaling:[e/2,-n/2,1],gridOffset:{xOffset:t,yOffset:t},width:e,height:n,numCol:r,numRow:i})}f&&this._updateAccessors(e),(d||f)&&this._resetResults()}_updateAccessors(e){const{getWeight:t,aggregation:n,data:r}=e.props,{count:i}=this.state.weights;i&&(i.getWeight=t,i.operation=p[n]),this.setState({getValue:y(n,t,{data:r})})}_resetResults(){const{count:e}=this.state.weights;e&&(e.aggregationData=null)}}Object(r.a)(Oe,"layerName","ScreenGridLayer"),Object(r.a)(Oe,"defaultProps",Me);var Se=n(886);function Te(){}const Ce=["getBins","getDomain","getScaleFunc"],Le=[{key:"fillColor",accessor:"getFillColor",pickingInfo:"colorValue",getBins:{triggers:{value:{prop:"getColorValue",updateTrigger:"getColorValue"},weight:{prop:"getColorWeight",updateTrigger:"getColorWeight"},aggregation:{prop:"colorAggregation"},filterData:{prop:"_filterData",updateTrigger:"_filterData"}}},getDomain:{triggers:{lowerPercentile:{prop:"lowerPercentile"},upperPercentile:{prop:"upperPercentile"},scaleType:{prop:"colorScaleType"}}},getScaleFunc:{triggers:{domain:{prop:"colorDomain"},range:{prop:"colorRange"}},onSet:{props:"onSetColorDomain"}},nullValue:[0,0,0,0]},{key:"elevation",accessor:"getElevation",pickingInfo:"elevationValue",getBins:{triggers:{value:{prop:"getElevationValue",updateTrigger:"getElevationValue"},weight:{prop:"getElevationWeight",updateTrigger:"getElevationWeight"},aggregation:{prop:"elevationAggregation"},filterData:{prop:"_filterData",updateTrigger:"_filterData"}}},getDomain:{triggers:{lowerPercentile:{prop:"elevationLowerPercentile"},upperPercentile:{prop:"elevationUpperPercentile"},scaleType:{prop:"elevationScaleType"}}},getScaleFunc:{triggers:{domain:{prop:"elevationDomain"},range:{prop:"elevationRange"}},onSet:{props:"onSetElevationDomain"}},nullValue:-1}],Pe=e=>e.cellSize;class Ie{constructor(e){this.state={layerData:{},dimensions:{}},this.changeFlags={},this.dimensionUpdaters={},this._getCellSize=e.getCellSize||Pe,this._getAggregator=e.getAggregator,this._addDimension(e.dimensions||Le)}static defaultDimensions(){return Le}updateState(e,t){const{oldProps:n,props:r,changeFlags:i}=e;this.updateGetValueFuncs(n,r,i);const o=this.needsReProjectPoints(n,r,i);let a=!1;if(i.dataChanged||o)this.getAggregatedData(r,t),a=!0;else{(this.getDimensionChanges(n,r,i)||[]).forEach(e=>"function"==typeof e&&e()),a=!0}return this.setState({aggregationDirty:a}),this.state}setState(e){this.state={...this.state,...e}}setDimensionState(e,t){this.setState({dimensions:{...this.state.dimensions,[e]:{...this.state.dimensions[e],...t}}})}normalizeResult(e={}){return e.hexagons?{data:e.hexagons,...e}:e.layerData?{data:e.layerData,...e}:e}getAggregatedData(e,t){const n=this._getAggregator(e)(e,t);this.setState({layerData:this.normalizeResult(n)}),this.changeFlags={layerData:!0},this.getSortedBins(e)}updateGetValueFuncs(e,t,n){for(const r in this.dimensionUpdaters){const{value:i,weight:o,aggregation:a}=this.dimensionUpdaters[r].getBins.triggers;let s=t[i.prop];this.needUpdateDimensionStep(this.dimensionUpdaters[r].getBins,e,t,n)&&(s=s?v(s,{data:t.data}):y(t[a.prop],t[o.prop],{data:t.data})),s&&this.setDimensionState(r,{getValue:s})}}needsReProjectPoints(e,t,n){return this._getCellSize(e)!==this._getCellSize(t)||this._getAggregator(e)!==this._getAggregator(t)||n.updateTriggersChanged&&(n.updateTriggersChanged.all||n.updateTriggersChanged.getPosition)}addDimension(e){this._addDimension(e)}_addDimension(e=[]){e.forEach(e=>{const{key:t}=e;this.dimensionUpdaters[t]=this.getDimensionUpdaters(e),this.state.dimensions[t]={getValue:null,domain:null,sortedBins:null,scaleFunc:Te}})}getDimensionUpdaters({key:e,accessor:t,pickingInfo:n,getBins:r,getDomain:i,getScaleFunc:o,nullValue:a}){return{key:e,accessor:t,pickingInfo:n,getBins:{updater:this.getDimensionSortedBins,...r},getDomain:{updater:this.getDimensionValueDomain,...i},getScaleFunc:{updater:this.getDimensionScale,...o},attributeAccessor:this.getSubLayerDimensionAttribute(e,a)}}needUpdateDimensionStep(e,t,n,r){return Object.values(e.triggers).some(e=>e.updateTrigger?r.dataChanged||r.updateTriggersChanged&&(r.updateTriggersChanged.all||r.updateTriggersChanged[e.updateTrigger]):t[e.prop]!==n[e.prop])}getDimensionChanges(e,t,n){const r=[];for(const i in this.dimensionUpdaters){const o=Ce.find(r=>this.needUpdateDimensionStep(this.dimensionUpdaters[i][r],e,t,n));o&&r.push(this.dimensionUpdaters[i][o].updater.bind(this,t,this.dimensionUpdaters[i]))}return r.length?r:null}getUpdateTriggers(e){const t=e.updateTriggers||{},n={};for(const r in this.dimensionUpdaters){const{accessor:i}=this.dimensionUpdaters[r];n[i]={},Ce.forEach(o=>{Object.values(this.dimensionUpdaters[r][o].triggers).forEach(({prop:r,updateTrigger:o})=>{if(o){const e=t[o];"object"!=typeof e||Array.isArray(e)?void 0!==e&&(n[i][r]=e):Object.assign(n[i],e)}else n[i][r]=e[r]})})}return n}getSortedBins(e){for(const t in this.dimensionUpdaters)this.getDimensionSortedBins(e,this.dimensionUpdaters[t])}getDimensionSortedBins(e,t){const{key:n}=t,{getValue:r}=this.state.dimensions[n],i=new pe(this.state.layerData.data||[],{getValue:r,filterData:e._filterData});this.setDimensionState(n,{sortedBins:i}),this.getDimensionValueDomain(e,t)}getDimensionValueDomain(e,t){const{getDomain:n,key:r}=t,{triggers:{lowerPercentile:i,upperPercentile:o,scaleType:a}}=n,s=this.state.dimensions[r].sortedBins.getValueDomainByScale(e[a.prop],[e[i.prop],e[o.prop]]);this.setDimensionState(r,{valueDomain:s}),this.getDimensionScale(e,t)}getDimensionScale(e,t){const{key:n,getScaleFunc:r,getDomain:i}=t,{domain:o,range:a}=r.triggers,{scaleType:s}=i.triggers,{onSet:l}=r,u=e[a.prop],c=e[o.prop]||this.state.dimensions[n].valueDomain,d=function(e){switch(e){case"quantize":return $;case"linear":return ee;case"quantile":return te;case"ordinal":return ie;default:return $}}(s&&e[s.prop])(c,u);"object"==typeof l&&"function"==typeof e[l.props]&&e[l.props](d.domain()),this.setDimensionState(n,{scaleFunc:d})}getSubLayerDimensionAttribute(e,t){return n=>{const{sortedBins:r,scaleFunc:i}=this.state.dimensions[e],o=r.binMap[n.index];if(o&&0===o.counts)return t;const a=o&&o.value,s=i.domain();return a>=s[0]&&a<=s[s.length-1]?i(a):t}}getSubLayerAccessors(e){const t={};for(const n in this.dimensionUpdaters){const{accessor:r}=this.dimensionUpdaters[n];t[r]=this.getSubLayerDimensionAttribute(e,n)}return t}getPickingInfo({info:e}){let t=null;if(e.picked&&e.index>-1){const n=this.state.layerData.data[e.index],r={};for(const e in this.dimensionUpdaters){const{pickingInfo:t}=this.dimensionUpdaters[e],{sortedBins:i}=this.state.dimensions[e],o=i.binMap[n.index]&&i.binMap[n.index].value;r[t]=o}t=Object.assign(r,n,{points:n.filteredPoints||n.points})}return e.picked=Boolean(t),e.object=t,e}getAccessor(e){return this.dimensionUpdaters.hasOwnProperty(e)?this.dimensionUpdaters[e].attributeAccessor:Te}}function De(){}const ke={colorDomain:null,colorRange:B,getColorValue:{type:"accessor",value:null},getColorWeight:{type:"accessor",value:1},colorAggregation:"SUM",lowerPercentile:{type:"number",min:0,max:100,value:0},upperPercentile:{type:"number",min:0,max:100,value:100},colorScaleType:"quantize",onSetColorDomain:De,elevationDomain:null,elevationRange:[0,1e3],getElevationValue:{type:"accessor",value:null},getElevationWeight:{type:"accessor",value:1},elevationAggregation:"SUM",elevationLowerPercentile:{type:"number",min:0,max:100,value:0},elevationUpperPercentile:{type:"number",min:0,max:100,value:100},elevationScale:{type:"number",min:0,value:1},elevationScaleType:"linear",onSetElevationDomain:De,gridAggregator:we,cellSize:{type:"number",min:0,max:1e3,value:1e3},coverage:{type:"number",min:0,max:1,value:1},getPosition:{type:"accessor",value:e=>e.position},extruded:!1,material:!0,_filterData:{type:"function",value:null,optional:!0}};class Re extends K{initializeState(){const e=new Ie({getAggregator:e=>e.gridAggregator,getCellSize:e=>e.cellSize});this.state={cpuAggregator:e,aggregatorState:e.state};this.getAttributeManager().add({positions:{size:3,type:5130,accessor:"getPosition"}})}updateState(e){super.updateState(e),this.setState({aggregatorState:this.state.cpuAggregator.updateState(e,{viewport:this.context.viewport,attributes:this.getAttributes(),numInstances:this.getNumInstances()})})}getPickingInfo({info:e}){return this.state.cpuAggregator.getPickingInfo({info:e})}_onGetSublayerColor(e){return this.state.cpuAggregator.getAccessor("fillColor")(e)}_onGetSublayerElevation(e){return this.state.cpuAggregator.getAccessor("elevation")(e)}_getSublayerUpdateTriggers(){return this.state.cpuAggregator.getUpdateTriggers(this.props)}renderLayers(){const{elevationScale:e,extruded:t,cellSize:n,coverage:r,material:i,transitions:o}=this.props,{cpuAggregator:a}=this.state,s=this.getSubLayerClass("grid-cell",Se.a),l=this._getSublayerUpdateTriggers();return new s({cellSize:n,coverage:r,material:i,elevationScale:e,extruded:t,getFillColor:this._onGetSublayerColor.bind(this),getElevation:this._onGetSublayerElevation.bind(this),transitions:o&&{getFillColor:o.getColorValue||o.getColorWeight,getElevation:o.getElevationValue||o.getElevationWeight}},this.getSubLayerProps({id:"grid-cell",updateTriggers:l}),{data:a.state.layerData.data})}}Object(r.a)(Re,"layerName","CPUGridLayer"),Object(r.a)(Re,"defaultProps",ke);var je=n(524),Fe=n(553);function Ne(){}const Be={colorDomain:null,colorRange:B,getColorValue:{type:"accessor",value:null},getColorWeight:{type:"accessor",value:1},colorAggregation:"SUM",lowerPercentile:{type:"number",value:0,min:0,max:100},upperPercentile:{type:"number",value:100,min:0,max:100},colorScaleType:"quantize",onSetColorDomain:Ne,elevationDomain:null,elevationRange:[0,1e3],getElevationValue:{type:"accessor",value:null},getElevationWeight:{type:"accessor",value:1},elevationAggregation:"SUM",elevationLowerPercentile:{type:"number",value:0,min:0,max:100},elevationUpperPercentile:{type:"number",value:100,min:0,max:100},elevationScale:{type:"number",min:0,value:1},elevationScaleType:"linear",onSetElevationDomain:Ne,radius:{type:"number",value:1e3,min:1},coverage:{type:"number",min:0,max:1,value:1},extruded:!1,hexagonAggregator:function(e,t){const{data:n,radius:r}=e,{viewport:o,attributes:a}=t,s=n.length?function(e,t){const{attributes:n}=t,r=n.positions.value,{size:i}=n.positions.getAccessor();let o,a=1/0,s=1/0,l=-1/0,u=-1/0;for(o=0;oe.screenCoord[0]).y(e=>e.screenCoord[1])(u).map((e,t)=>({position:o.unprojectFlat([e.x,e.y]),points:e,index:t})),radiusCommon:l}},getPosition:{type:"accessor",value:e=>e.position},material:!0,_filterData:{type:"function",value:null,optional:!0}};class ze extends K{constructor(...e){super(...e),Object(r.a)(this,"state",void 0)}initializeState(){const e=new Ie({getAggregator:e=>e.hexagonAggregator,getCellSize:e=>e.radius});this.state={cpuAggregator:e,aggregatorState:e.state,vertices:null};this.getAttributeManager().add({positions:{size:3,type:5130,accessor:"getPosition"}})}updateState(e){if(super.updateState(e),e.changeFlags.propsOrDataChanged){const t=this.state.cpuAggregator.updateState(e,{viewport:this.context.viewport,attributes:this.getAttributes()});if(this.state.aggregatorState.layerData!==t.layerData){const{hexagonVertices:e}=t.layerData||{};this.setState({vertices:e&&this.convertLatLngToMeterOffset(e)})}this.setState({aggregatorState:t})}}convertLatLngToMeterOffset(e){const{viewport:t}=this.context;if(Array.isArray(e)&&6===e.length){const n=e[0],r=e[3],i=[(n[0]+r[0])/2,(n[1]+r[1])/2],o=t.projectFlat(i),{metersPerUnit:a}=t.getDistanceScales(i);return e.map(e=>{const n=t.projectFlat(e);return[(n[0]-o[0])*a[0],(n[1]-o[1])*a[1]]})}return i.a.error("HexagonLayer: hexagonVertices needs to be an array of 6 points")(),null}getPickingInfo({info:e}){return this.state.cpuAggregator.getPickingInfo({info:e})}_onGetSublayerColor(e){return this.state.cpuAggregator.getAccessor("fillColor")(e)}_onGetSublayerElevation(e){return this.state.cpuAggregator.getAccessor("elevation")(e)}_getSublayerUpdateTriggers(){return this.state.cpuAggregator.getUpdateTriggers(this.props)}renderLayers(){const{elevationScale:e,extruded:t,coverage:n,material:r,transitions:i}=this.props,{aggregatorState:o,vertices:a}=this.state,s=this.getSubLayerClass("hexagon-cell",je.a),l=this._getSublayerUpdateTriggers();return new s({...a?{vertices:a,radius:1}:{radius:o.layerData.radiusCommon||1,radiusUnits:"common",angle:90},diskResolution:6,elevationScale:e,extruded:t,coverage:n,material:r,getFillColor:this._onGetSublayerColor.bind(this),getElevation:this._onGetSublayerElevation.bind(this),transitions:i&&{getFillColor:i.getColorValue||i.getColorWeight,getElevation:i.getElevationValue||i.getElevationWeight}},this.getSubLayerProps({id:"hexagon-cell",updateTriggers:l}),{data:o.layerData.data})}}Object(r.a)(ze,"layerName","HexagonLayer"),Object(r.a)(ze,"defaultProps",Be);var Ue=n(1134),He=n(359);const Ve={N:[0,.5],E:[.5,0],S:[0,-.5],W:[-.5,0],NE:[.5,.5],NW:[-.5,.5],SE:[.5,-.5],SW:[-.5,-.5]},Ge=[Ve.W,Ve.SW,Ve.S],Ye=[Ve.S,Ve.SE,Ve.E],We=[Ve.E,Ve.NE,Ve.N],qe=[Ve.NW,Ve.W,Ve.N],Xe=[[-.5,1/6],[-.5,-1/6],[-1/6,-.5],[1/6,-.5]],Ze=[[-1/6,-.5],[1/6,-.5],[.5,-1/6],[.5,1/6]],Ke=[[.5,-1/6],[.5,1/6],[1/6,.5],[-1/6,.5]],Qe=[[-.5,1/6],[-.5,-1/6],[1/6,.5],[-1/6,.5]],Je=[Ve.W,Ve.SW,Ve.SE,Ve.E],$e=[Ve.S,Ve.SE,Ve.NE,Ve.N],et=[Ve.NW,Ve.W,Ve.E,Ve.NE],tt=[Ve.NW,Ve.SW,Ve.S,Ve.N],nt=[[-.5,1/6],[-.5,-1/6],[.5,-1/6],[.5,1/6]],rt=[[-1/6,-.5],[1/6,-.5],[1/6,.5],[-1/6,.5]],it=[Ve.NW,Ve.SW,Ve.SE,Ve.NE],ot=[Ve.NW,Ve.SW,Ve.SE,Ve.E,Ve.N],at=[Ve.W,Ve.SW,Ve.SE,Ve.NE,Ve.N],st=[Ve.NW,Ve.W,Ve.S,Ve.SE,Ve.NE],lt=[Ve.NW,Ve.SW,Ve.S,Ve.E,Ve.NE],ut=[Ve.NW,Ve.W,[.5,-1/6],[.5,1/6],Ve.N],ct=[[-1/6,-.5],[1/6,-.5],Ve.E,Ve.NE,Ve.N],dt=[[-.5,1/6],[-.5,-1/6],Ve.S,Ve.SE,Ve.E],ft=[Ve.W,Ve.SW,Ve.S,[1/6,.5],[-1/6,.5]],ht=[Ve.NW,Ve.W,[-1/6,-.5],[1/6,-.5],Ve.N],pt=[[-.5,1/6],[-.5,-1/6],Ve.E,Ve.NE,Ve.N],At=[Ve.S,Ve.SE,Ve.E,[1/6,.5],[-1/6,.5]],gt=[Ve.W,Ve.SW,Ve.S,[.5,-1/6],[.5,1/6]],mt=[Ve.W,Ve.SW,Ve.SE,Ve.E,[1/6,.5],[-1/6,.5]],yt=[[-.5,1/6],[-.5,-1/6],Ve.S,Ve.SE,Ve.NE,Ve.N],vt=[Ve.NW,Ve.W,[-1/6,-.5],[1/6,-.5],Ve.E,Ve.NE],bt=[Ve.NW,Ve.SW,Ve.S,[.5,-1/6],[.5,1/6],Ve.N],_t=[Ve.W,Ve.SW,Ve.S,Ve.E,Ve.NE,Ve.N],wt=[Ve.NW,Ve.W,Ve.S,Ve.SE,Ve.E,Ve.N],xt=[[-.5,1/6],[-.5,-1/6],[-1/6,-.5],[1/6,-.5],Ve.E,Ve.NE,Ve.N],Mt=[Ve.W,Ve.SW,Ve.S,[.5,-1/6],[.5,1/6],[1/6,.5],[-1/6,.5]],Et=[Ve.NW,Ve.W,[-1/6,-.5],[1/6,-.5],[.5,-1/6],[.5,1/6],Ve.N],Ot=[[-.5,1/6],[-.5,-1/6],Ve.S,Ve.SE,Ve.E,[1/6,.5],[-1/6,.5]],St=[[-.5,1/6],[-.5,-1/6],[-1/6,-.5],[1/6,-.5],[.5,-1/6],[.5,1/6],[1/6,.5],[-1/6,.5]],Tt={0:[],1:[[Ve.W,Ve.S]],2:[[Ve.S,Ve.E]],3:[[Ve.W,Ve.E]],4:[[Ve.N,Ve.E]],5:{0:[[Ve.W,Ve.S],[Ve.N,Ve.E]],1:[[Ve.W,Ve.N],[Ve.S,Ve.E]]},6:[[Ve.N,Ve.S]],7:[[Ve.W,Ve.N]],8:[[Ve.W,Ve.N]],9:[[Ve.N,Ve.S]],10:{0:[[Ve.W,Ve.N],[Ve.S,Ve.E]],1:[[Ve.W,Ve.S],[Ve.N,Ve.E]]},11:[[Ve.N,Ve.E]],12:[[Ve.W,Ve.E]],13:[[Ve.S,Ve.E]],14:[[Ve.W,Ve.S]],15:[]};function Ct(e){return parseInt(e,4)}const Lt={[Ct("0000")]:[],[Ct("2222")]:[],[Ct("2221")]:[Ge],[Ct("2212")]:[Ye],[Ct("2122")]:[We],[Ct("1222")]:[qe],[Ct("0001")]:[Ge],[Ct("0010")]:[Ye],[Ct("0100")]:[We],[Ct("1000")]:[qe],[Ct("2220")]:[Xe],[Ct("2202")]:[Ze],[Ct("2022")]:[Ke],[Ct("0222")]:[Qe],[Ct("0002")]:[Xe],[Ct("0020")]:[Ze],[Ct("0200")]:[Ke],[Ct("2000")]:[Qe],[Ct("0011")]:[Je],[Ct("0110")]:[$e],[Ct("1100")]:[et],[Ct("1001")]:[tt],[Ct("2211")]:[Je],[Ct("2112")]:[$e],[Ct("1122")]:[et],[Ct("1221")]:[tt],[Ct("2200")]:[nt],[Ct("2002")]:[rt],[Ct("0022")]:[nt],[Ct("0220")]:[rt],[Ct("1111")]:[it],[Ct("1211")]:[ot],[Ct("2111")]:[at],[Ct("1112")]:[st],[Ct("1121")]:[lt],[Ct("1011")]:[ot],[Ct("0111")]:[at],[Ct("1110")]:[st],[Ct("1101")]:[lt],[Ct("1200")]:[ut],[Ct("0120")]:[ct],[Ct("0012")]:[dt],[Ct("2001")]:[ft],[Ct("1022")]:[ut],[Ct("2102")]:[ct],[Ct("2210")]:[dt],[Ct("0221")]:[ft],[Ct("1002")]:[ht],[Ct("2100")]:[pt],[Ct("0210")]:[At],[Ct("0021")]:[gt],[Ct("1220")]:[ht],[Ct("0122")]:[pt],[Ct("2012")]:[At],[Ct("2201")]:[gt],[Ct("0211")]:[mt],[Ct("2110")]:[yt],[Ct("1102")]:[vt],[Ct("1021")]:[bt],[Ct("2011")]:[mt],[Ct("0112")]:[yt],[Ct("1120")]:[vt],[Ct("1201")]:[bt],[Ct("2101")]:[_t],[Ct("0121")]:[_t],[Ct("1012")]:[wt],[Ct("1210")]:[wt],[Ct("0101")]:{0:[Ge,We],1:[_t],2:[_t]},[Ct("1010")]:{0:[qe,Ye],1:[wt],2:[wt]},[Ct("2121")]:{0:[_t],1:[_t],2:[Ge,We]},[Ct("1212")]:{0:[wt],1:[wt],2:[qe,Ye]},[Ct("2120")]:{0:[xt],1:[xt],2:[Xe,We]},[Ct("2021")]:{0:[Mt],1:[Mt],2:[Ge,Ke]},[Ct("1202")]:{0:[Et],1:[Et],2:[qe,Ze]},[Ct("0212")]:{0:[Ot],1:[Ot],2:[Ye,Qe]},[Ct("0102")]:{0:[Xe,We],1:[xt],2:[xt]},[Ct("0201")]:{0:[Ge,Ke],1:[Mt],2:[Mt]},[Ct("1020")]:{0:[qe,Ze],1:[Et],2:[Et]},[Ct("2010")]:{0:[Ye,Qe],1:[Ot],2:[Ot]},[Ct("2020")]:{0:[Qe,Ze],1:[St],2:[Xe,Ke]},[Ct("0202")]:{0:[Ke,Xe],1:[St],2:[Qe,Ze]}},Pt={ISO_LINES:1,ISO_BANDS:2},It={zIndex:0,zOffset:.005};function Dt(e,t){return Array.isArray(t)?e=t?1:0}function kt(e){const{cellWeights:t,x:n,y:r,width:o,height:a}=e;let s=e.threshold;e.thresholdValue&&(i.a.deprecated("thresholdValue","threshold")(),s=e.thresholdValue);const l=n<0,u=n>=o-1,c=r<0,d=r>=a-1,f=l||u||c||d,h={},p={};l||d?p.top=0:(h.top=t[(r+1)*o+n],p.top=Dt(h.top,s)),u||d?p.topRight=0:(h.topRight=t[(r+1)*o+n+1],p.topRight=Dt(h.topRight,s)),u||c?p.right=0:(h.right=t[r*o+n+1],p.right=Dt(h.right,s)),l||c?p.current=0:(h.current=t[r*o+n],p.current=Dt(h.current,s));const{top:A,topRight:g,right:m,current:y}=p;let v=-1;Number.isFinite(s)&&(v=A<<3|g<<2|m<<1|y),Array.isArray(s)&&(v=A<<6|g<<4|m<<2|y);let b=0;return f||(b=Dt((h.top+h.topRight+h.right+h.current)/4,s)),{code:v,meanCode:b}}function Rt(e){const{gridOrigin:t,cellSize:n,x:r,y:i,code:o,meanCode:a,type:s=Pt.ISO_LINES}=e,l={...It,...e.thresholdData};let u=s===Pt.ISO_BANDS?Lt[o]:Tt[o];Array.isArray(u)||(u=u[a]);const c=l.zIndex*l.zOffset,d=(r+1)*n[0],f=(i+1)*n[1],h=t[0]+d,p=t[1]+f;if(s===Pt.ISO_BANDS){const e=[];return u.forEach(t=>{const r=[];t.forEach(e=>{const t=h+e[0]*n[0],i=p+e[1]*n[1];r.push([t,i,c])}),e.push(r)}),e}const A=[];return u.forEach(e=>{e.forEach(e=>{const t=h+e[0]*n[0],r=p+e[1]*n[1];A.push([t,r,c])})}),A}const jt=[255,255,255,255],Ft={cellSize:{type:"number",min:1,max:1e3,value:1e3},getPosition:{type:"accessor",value:e=>e.position},getWeight:{type:"accessor",value:1},gpuAggregation:!0,aggregation:"SUM",contours:{type:"object",value:[{threshold:1}],optional:!0,compare:3},zOffset:.005},Nt={data:{props:["cellSize"]},weights:{props:["aggregation"],accessors:["getWeight"]}};class Bt extends xe{initializeState(){super.initializeAggregationLayer({dimensions:Nt}),this.setState({contourData:{},projectPoints:!1,weights:{count:{size:1,operation:p.SUM}}});this.getAttributeManager().add({positions:{size:3,accessor:"getPosition",type:5130,fp64:this.use64bitPositions()},count:{size:3,accessor:"getWeight"}})}updateState(e){super.updateState(e);let t=!1;const{oldProps:n,props:r}=e,{aggregationDirty:i}=this.state;n.contours===r.contours&&n.zOffset===r.zOffset||(t=!0,this._updateThresholdData(e.props)),this.getNumInstances()>0&&(i||t)&&this._generateContours()}renderLayers(){const{contourSegments:e,contourPolygons:t}=this.state.contourData,n=this.getSubLayerClass("lines",Ue.a),r=this.getSubLayerClass("bands",He.a);return[e&&e.length>0&&new n(this.getSubLayerProps({id:"lines"}),{data:this.state.contourData.contourSegments,getSourcePosition:e=>e.start,getTargetPosition:e=>e.end,getColor:e=>e.contour.color||jt,getWidth:e=>e.contour.strokeWidth||1}),t&&t.length>0&&new r(this.getSubLayerProps({id:"bands"}),{data:this.state.contourData.contourPolygons,getPolygon:e=>e.vertices,getFillColor:e=>e.contour.color||jt})]}updateAggregationState(e){const{props:t,oldProps:n}=e,{cellSize:r,coordinateSystem:o}=t,{viewport:a}=this.context,s=n.cellSize!==r;let l=t.gpuAggregation;this.state.gpuAggregation!==t.gpuAggregation&&l&&!R.isSupported(this.context.gl)&&(i.a.warn("GPU Grid Aggregation not supported, falling back to CPU")(),l=!1);const u=l!==this.state.gpuAggregation;this.setState({gpuAggregation:l});const{dimensions:c}=this.state,d=this.isAttributeChanged("positions"),{data:f,weights:h}=c;let{boundingBox:p}=this.state;if(d&&(p=ye(this.getAttributes(),this.getNumInstances()),this.setState({boundingBox:p})),d||s){const{gridOffset:e,translation:t,width:n,height:i,numCol:s,numRow:l}=_e(p,r,a,o);this.allocateResources(l,s),this.setState({gridOffset:e,boundingBox:p,translation:t,posOffset:t.slice(),gridOrigin:[-1*t[0],-1*t[1]],width:n,height:i,numCol:s,numRow:l})}const A=d||u||this.isAggregationDirty(e,{dimension:f,compareAll:l}),g=this.isAggregationDirty(e,{dimension:h});g&&this._updateAccessors(e),(A||g)&&this._resetResults(),this.setState({aggregationDataDirty:A,aggregationWeightsDirty:g})}_updateAccessors(e){const{getWeight:t,aggregation:n,data:r}=e.props,{count:i}=this.state.weights;i&&(i.getWeight=t,i.operation=p[n]),this.setState({getValue:y(n,t,{data:r})})}_resetResults(){const{count:e}=this.state.weights;e&&(e.aggregationData=null)}_generateContours(){const{numCol:e,numRow:t,gridOrigin:n,gridOffset:r,thresholdData:i}=this.state,{count:o}=this.state.weights;let{aggregationData:a}=o;a||(a=o.aggregationBuffer.getData(),o.aggregationData=a);const{cellWeights:s}=R.getCellData({countsData:a}),l=function({thresholdData:e,cellWeights:t,gridSize:n,gridOrigin:r,cellSize:i}){const o=[],a=[],s=n[0],l=n[1];let u=0,c=0;for(const n of e){const{contour:e}=n,{threshold:d}=e;for(let f=-1;f= (domain.x - EPSILON) && value <= (domain.y + EPSILON)) {\n float domainRange = domain.y - domain.x;\n if (domainRange <= 0.) {\n outColor = colorRange[0];\n } else {\n float rangeCount = float(RANGE_COUNT);\n float rangeStep = domainRange / rangeCount;\n float idx = floor((value - domain.x) / rangeStep);\n idx = clamp(idx, 0., rangeCount - 1.);\n int intIdx = int(idx);\n outColor = colorRange[intIdx];\n }\n }\n return outColor;\n}\n\nfloat linearScale(vec2 domain, vec2 range, float value) {\n if (value >= (domain.x - EPSILON) && value <= (domain.y + EPSILON)) {\n return ((value - domain.x) / (domain.y - domain.x)) * (range.y - range.x) + range.x;\n }\n return -1.;\n}\n\nvoid main(void) {\n vec2 clrDomain = colorDomainValid ? colorDomain : vec2(colorData.maxMinCount.a, colorData.maxMinCount.r);\n vec4 color = quantizeScale(clrDomain, colorRange, colors.r);\n\n float elevation = 0.0;\n\n if (extruded) {\n vec2 elvDomain = elevationDomainValid ? elevationDomain : vec2(elevationData.maxMinCount.a, elevationData.maxMinCount.r);\n elevation = linearScale(elvDomain, elevationRange, elevations.r);\n elevation = elevation * (positions.z + 1.0) / 2.0 * elevationScale;\n }\n float shouldRender = float(color.r > 0.0 && elevations.r >= 0.0);\n float dotRadius = cellSize / 2. * coverage * shouldRender;\n\n int yIndex = (gl_InstanceID / gridSize[0]);\n int xIndex = gl_InstanceID - (yIndex * gridSize[0]);\n\n vec2 instancePositionXFP64 = mul_fp64(vec2(gridOffset[0], gridOffsetLow[0]), vec2(float(xIndex), 0.));\n instancePositionXFP64 = sum_fp64(instancePositionXFP64, vec2(gridOrigin[0], gridOriginLow[0]));\n vec2 instancePositionYFP64 = mul_fp64(vec2(gridOffset[1], gridOffsetLow[1]), vec2(float(yIndex), 0.));\n instancePositionYFP64 = sum_fp64(instancePositionYFP64, vec2(gridOrigin[1], gridOriginLow[1]));\n\n vec3 centroidPosition = vec3(instancePositionXFP64[0], instancePositionYFP64[0], elevation);\n vec3 centroidPosition64Low = vec3(instancePositionXFP64[1], instancePositionYFP64[1], 0.0);\n geometry.worldPosition = centroidPosition;\n vec3 pos = vec3(project_size(positions.xy + offset) * dotRadius, 0.);\n picking_setPickingColor(instancePickingColors);\n\n gl_Position = project_position_to_clipspace(centroidPosition, centroidPosition64Low, pos, geometry.position);\n\n vec3 normals_commonspace = project_normal(normals);\n\n if (extruded) {\n vec3 lightColor = lighting_getLightColor(color.rgb, project_uCameraPosition, geometry.position.xyz, normals_commonspace);\n vColor = vec4(lightColor, color.a * opacity) / 255.;\n } else {\n vColor = vec4(color.rgb, color.a * opacity) / 255.;\n }\n}\n",fs:"#version 300 es\n#define SHADER_NAME gpu-grid-cell-layer-fragment-shader\n\nprecision highp float;\n\nin vec4 vColor;\n\nout vec4 fragColor;\n\nvoid main(void) {\n fragColor = vColor;\n fragColor = picking_filterColor(fragColor);\n}\n",modules:[h.a,zt.a,N.a,d.b]})}initializeState({gl:e}){this.getAttributeManager().addInstanced({colors:{size:4,noAlloc:!0},elevations:{size:4,noAlloc:!0}});const t=this._getModel(e);this._setupUniformBuffer(t),this.setState({model:t})}_getModel(e){return new u.a(e,{...this.getShaders(),id:this.props.id,geometry:new Ht.a,isInstanced:!0})}draw({uniforms:e}){const{cellSize:t,offset:n,extruded:r,elevationScale:i,coverage:o,gridSize:a,gridOrigin:s,gridOffset:l,elevationRange:u,colorMaxMinBuffer:c,elevationMaxMinBuffer:d}=this.props,f=[Object(Ut.b)(s[0]),Object(Ut.b)(s[1])],h=[Object(Ut.b)(l[0]),Object(Ut.b)(l[1])],p=this.getDomainUniforms(),A=z(this.props.colorRange);this.bindUniformBuffers(c,d),this.state.model.setUniforms(e).setUniforms(p).setUniforms({cellSize:t,offset:n,extruded:r,elevationScale:i,coverage:o,gridSize:a,gridOrigin:s,gridOriginLow:f,gridOffset:l,gridOffsetLow:h,colorRange:A,elevationRange:u}).draw(),this.unbindUniformBuffers(c,d)}bindUniformBuffers(e,t){e.bind({target:35345,index:0}),t.bind({target:35345,index:1})}unbindUniformBuffers(e,t){e.unbind({target:35345,index:0}),t.unbind({target:35345,index:1})}getDomainUniforms(){const{colorDomain:e,elevationDomain:t}=this.props,n={};return null!==e?(n.colorDomainValid=!0,n.colorDomain=e):n.colorDomainValid=!1,null!==t?(n.elevationDomainValid=!0,n.elevationDomain=t):n.elevationDomainValid=!1,n}_setupUniformBuffer(e){const t=this.context.gl,n=e.program.handle,r=t.getUniformBlockIndex(n,"ColorData"),i=t.getUniformBlockIndex(n,"ElevationData");t.uniformBlockBinding(n,r,0),t.uniformBlockBinding(n,i,1)}}Object(r.a)(Gt,"layerName","GPUGridCellLayer"),Object(r.a)(Gt,"defaultProps",Vt);const Yt={colorDomain:null,colorRange:B,getColorWeight:{type:"accessor",value:1},colorAggregation:"SUM",elevationDomain:null,elevationRange:[0,1e3],getElevationWeight:{type:"accessor",value:1},elevationAggregation:"SUM",elevationScale:{type:"number",min:0,value:1},cellSize:{type:"number",min:1,max:1e3,value:1e3},coverage:{type:"number",min:0,max:1,value:1},getPosition:{type:"accessor",value:e=>e.position},extruded:!1,material:!0},Wt={data:{props:["cellSize","colorAggregation","elevationAggregation"]}};class qt extends xe{initializeState({gl:e}){const t=R.isSupported(e);t||i.a.error("GPUGridLayer is not supported on this browser, use GridLayer instead")(),super.initializeAggregationLayer({dimensions:Wt}),this.setState({gpuAggregation:!0,projectPoints:!1,isSupported:t,weights:{color:{needMin:!0,needMax:!0,combineMaxMin:!0,maxMinBuffer:new Q.a(e,{byteLength:16,accessor:{size:4,type:5126,divisor:1}})},elevation:{needMin:!0,needMax:!0,combineMaxMin:!0,maxMinBuffer:new Q.a(e,{byteLength:16,accessor:{size:4,type:5126,divisor:1}})}},positionAttributeName:"positions"});this.getAttributeManager().add({positions:{size:3,accessor:"getPosition",type:5130,fp64:this.use64bitPositions()},color:{size:3,accessor:"getColorWeight"},elevation:{size:3,accessor:"getElevationWeight"}})}updateState(e){if(!1===this.state.isSupported)return;super.updateState(e);const{aggregationDirty:t}=this.state;t&&this.setState({gridHash:null})}getHashKeyForIndex(e){const{numRow:t,numCol:n,boundingBox:r,gridOffset:i}=this.state,o=[n,t],a=[r.xMin,r.yMin],s=[i.xOffset,i.yOffset],l=Math.floor(e/o[0]),u=e-l*o[0],c=Math.floor((l*s[1]+a[1]+90+s[1]/2)/s[1]),d=Math.floor((u*s[0]+a[0]+180+s[0]/2)/s[0]);return"".concat(c,"-").concat(d)}getPositionForIndex(e){const{numRow:t,numCol:n,boundingBox:r,gridOffset:i}=this.state,o=[n,t],a=[r.xMin,r.yMin],s=[i.xOffset,i.yOffset],l=Math.floor(e/o[0]);return[(e-l*o[0])*s[0]+a[0],l*s[1]+a[1]]}getPickingInfo({info:e,mode:t}){const{index:n}=e;let r=null;if(n>=0){const{gpuGridAggregator:e}=this.state,i=this.getPositionForIndex(n),o=R.getAggregationData({pixelIndex:n,...e.getData("color")}),a=R.getAggregationData({pixelIndex:n,...e.getData("elevation")});if(r={colorValue:o.cellWeight,elevationValue:a.cellWeight,count:o.cellCount||a.cellCount,position:i,totalCount:o.totalCount||a.totalCount},"hover"!==t){const{props:e}=this;let{gridHash:t}=this.state;if(!t){const{gridOffset:n,translation:r,boundingBox:i}=this.state,{viewport:o}=this.context;t=we(e,{gridOffset:n,attributes:this.getAttributes(),viewport:o,translation:r,boundingBox:i}).gridHash,this.setState({gridHash:t})}const i=t[this.getHashKeyForIndex(n)];Object.assign(r,i)}}return e.picked=Boolean(r),e.object=r,e}renderLayers(){if(!this.state.isSupported)return null;const{elevationScale:e,extruded:t,cellSize:n,coverage:r,material:i,elevationRange:o,colorDomain:a,elevationDomain:s}=this.props,{weights:l,numRow:u,numCol:c,gridOrigin:d,gridOffset:f}=this.state,{color:h,elevation:p}=l,A=z(this.props.colorRange);return new(this.getSubLayerClass("gpu-grid-cell",Gt))({gridSize:[c,u],gridOrigin:d,gridOffset:[f.xOffset,f.yOffset],colorRange:A,elevationRange:o,colorDomain:a,elevationDomain:s,cellSize:n,coverage:r,material:i,elevationScale:e,extruded:t},this.getSubLayerProps({id:"gpu-grid-cell"}),{data:{attributes:{colors:h.aggregationBuffer,elevations:p.aggregationBuffer}},colorMaxMinBuffer:h.maxMinBuffer,elevationMaxMinBuffer:p.maxMinBuffer,numInstances:c*u})}finalizeState(e){const{color:t,elevation:n}=this.state.weights;[t,n].forEach(e=>{const{aggregationBuffer:t,maxMinBuffer:n}=e;n.delete(),null==t||t.delete()}),super.finalizeState(e)}updateAggregationState(e){const{props:t,oldProps:n}=e,{cellSize:r,coordinateSystem:i}=t,{viewport:o}=this.context,a=n.cellSize!==r,{dimensions:s}=this.state,l=this.isAttributeChanged("positions"),u=l||this.isAttributeChanged();let{boundingBox:c}=this.state;if(l&&(c=ye(this.getAttributes(),this.getNumInstances()),this.setState({boundingBox:c})),l||a){const{gridOffset:e,translation:t,width:n,height:a,numCol:s,numRow:l}=_e(c,r,o,i);this.allocateResources(l,s),this.setState({gridOffset:e,translation:t,gridOrigin:[-1*t[0],-1*t[1]],width:n,height:a,numCol:s,numRow:l})}const d=u||this.isAggregationDirty(e,{dimension:s.data,compareAll:!0});d&&this._updateAccessors(e),this.setState({aggregationDataDirty:d})}_updateAccessors(e){const{colorAggregation:t,elevationAggregation:n}=e.props,{color:r,elevation:i}=this.state.weights;r.operation=p[t],i.operation=p[n]}}Object(r.a)(qt,"layerName","GPUGridLayer"),Object(r.a)(qt,"defaultProps",Yt);const Xt={...qt.defaultProps,...Re.defaultProps,gpuAggregation:!1};class Zt extends W.a{constructor(...e){super(...e),Object(r.a)(this,"state",void 0)}initializeState(){this.state={useGPUAggregation:!0}}updateState({props:e}){this.setState({useGPUAggregation:this.canUseGPUAggregation(e)})}renderLayers(){const{data:e,updateTriggers:t}=this.props,n=this.state.useGPUAggregation?"GPU":"CPU";return new(this.state.useGPUAggregation?this.getSubLayerClass("GPU",qt):this.getSubLayerClass("CPU",Re))(this.props,this.getSubLayerProps({id:n,updateTriggers:t}),{data:e})}canUseGPUAggregation(e){const{gpuAggregation:t,lowerPercentile:n,upperPercentile:r,getColorValue:i,getElevationValue:o,colorScaleType:a}=e;return!!t&&(!!R.isSupported(this.context.gl)&&(0===n&&100===r&&(null===i&&null===o&&("quantile"!==a&&"ordinal"!==a))))}}Object(r.a)(Zt,"layerName","GridLayer"),Object(r.a)(Zt,"defaultProps",Xt);const Kt=new Float32Array(12);function Qt(e,t=2){let n=0;for(const r of e)for(let e=0;e 0.) {\n maxValue = colorDomain[1];\n minValue = colorDomain[0];\n }\n vIntensityMax = intensity / maxValue;\n vIntensityMin = intensity / minValue;\n}\n",fs:"#define SHADER_NAME triangle-layer-fragment-shader\n\nprecision highp float;\n\nuniform float opacity;\nuniform sampler2D texture;\nuniform sampler2D colorTexture;\nuniform float aggregationMode;\n\nvarying vec2 vTexCoords;\nvarying float vIntensityMin;\nvarying float vIntensityMax;\n\nvec4 getLinearColor(float value) {\n float factor = clamp(value * vIntensityMax, 0., 1.);\n vec4 color = texture2D(colorTexture, vec2(factor, 0.5));\n color.a *= min(value * vIntensityMin, 1.0);\n return color;\n}\n\nvoid main(void) {\n vec4 weights = texture2D(texture, vTexCoords);\n float weight = weights.r;\n\n if (aggregationMode > 0.5) {\n weight /= max(1.0, weights.a);\n }\n if (weight <= 0.) {\n discard;\n }\n\n vec4 linearColor = getLinearColor(weight);\n linearColor.a *= opacity;\n gl_FragColor =linearColor;\n}\n",modules:[h.a]}}initializeState({gl:e}){this.getAttributeManager().add({positions:{size:3,noAlloc:!0},texCoords:{size:2,noAlloc:!0}}),this.setState({model:this._getModel(e)})}_getModel(e){const{vertexCount:t}=this.props;return new u.a(e,{...this.getShaders(),id:this.props.id,geometry:new j.a({drawMode:6,vertexCount:t})})}draw({uniforms:e}){const{model:t}=this.state,{texture:n,maxTexture:r,colorTexture:i,intensity:o,threshold:a,aggregationMode:s,colorDomain:l}=this.props;t.setUniforms({...e,texture:n,maxTexture:r,colorTexture:i,intensity:o,threshold:a,aggregationMode:s,colorDomain:l}).draw()}}Object(r.a)(Jt,"layerName","TriangleLayer");const $t={mipmaps:!1,parameters:{10240:9729,10241:9729,10242:33071,10243:33071},dataFormat:6408},en=[0,0],tn={SUM:0,MEAN:1},nn={getPosition:{type:"accessor",value:e=>e.position},getWeight:{type:"accessor",value:1},intensity:{type:"number",min:0,value:1},radiusPixels:{type:"number",min:1,max:100,value:50},colorRange:B,threshold:{type:"number",min:0,max:1,value:.05},colorDomain:{type:"array",value:null,optional:!0},aggregation:"SUM",weightsTextureSize:{type:"number",min:128,max:2048,value:2048},debounceTimeout:{type:"number",min:0,max:1e3,value:500}},rn=[o.a.BLEND_EQUATION_MINMAX,o.a.TEXTURE_FLOAT],on=[o.a.COLOR_ATTACHMENT_RGBA32F,o.a.FLOAT_BLEND],an={data:{props:["radiusPixels"]}};class sn extends K{constructor(...e){super(...e),Object(r.a)(this,"state",void 0)}initializeState(){const{gl:e}=this.context;if(!Object(a.c)(e,rn))return this.setState({supported:!1}),void i.a.error("HeatmapLayer: ".concat(this.id," is not supported on this browser"))();super.initializeAggregationLayer(an),this.setState({supported:!0,colorDomain:en}),this._setupTextureParams(),this._setupAttributes(),this._setupResources()}shouldUpdateState({changeFlags:e}){return e.somethingChanged}updateState(e){this.state.supported&&(super.updateState(e),this._updateHeatmapState(e))}_updateHeatmapState(e){const{props:t,oldProps:n}=e,r=this._getChangeFlags(e);(r.dataChanged||r.viewportChanged)&&(r.boundsChanged=this._updateBounds(r.dataChanged),this._updateTextureRenderingBounds()),r.dataChanged||r.boundsChanged?(clearTimeout(this.state.updateTimer),this.setState({isWeightMapDirty:!0})):r.viewportZoomChanged&&this._debouncedUpdateWeightmap(),t.colorRange!==n.colorRange&&this._updateColorTexture(e),this.state.isWeightMapDirty&&this._updateWeightmap(),this.setState({zoom:e.context.viewport.zoom})}renderLayers(){if(!this.state.supported)return[];const{weightsTexture:e,triPositionBuffer:t,triTexCoordBuffer:n,maxWeightsTexture:r,colorTexture:i,colorDomain:o}=this.state,{updateTriggers:a,intensity:s,threshold:l,aggregation:u}=this.props;return new(this.getSubLayerClass("triangle",Jt))(this.getSubLayerProps({id:"triangle-layer",updateTriggers:a}),{coordinateSystem:ge.a.DEFAULT,data:{attributes:{positions:t,texCoords:n}},vertexCount:4,maxTexture:r,colorTexture:i,aggregationMode:tn[u]||0,texture:e,intensity:s,threshold:l,colorDomain:o})}finalizeState(e){super.finalizeState(e);const{weightsTransform:t,weightsTexture:n,maxWeightTransform:r,maxWeightsTexture:i,triPositionBuffer:o,triTexCoordBuffer:a,colorTexture:s,updateTimer:l}=this.state;null==t||t.delete(),null==n||n.delete(),null==r||r.delete(),null==i||i.delete(),null==o||o.delete(),null==a||a.delete(),null==s||s.delete(),l&&clearTimeout(l)}_getAttributeManager(){return new X.a(this.context.gl,{id:this.props.id,stats:this.context.stats})}_getChangeFlags(e){const t={},{dimensions:n}=this.state;t.dataChanged=this.isAttributeChanged()||this.isAggregationDirty(e,{compareAll:!0,dimension:n.data}),t.viewportChanged=e.changeFlags.viewportChanged;const{zoom:r}=this.state;return e.context.viewport&&e.context.viewport.zoom===r||(t.viewportZoomChanged=!0),t}_createTextures(){const{gl:e}=this.context,{textureSize:t,format:n,type:r}=this.state;this.setState({weightsTexture:new S.a(e,{width:t,height:t,format:n,type:r,...$t}),maxWeightsTexture:new S.a(e,{format:n,type:r,...$t})})}_setupAttributes(){this.getAttributeManager().add({positions:{size:3,type:5130,accessor:"getPosition"},weights:{size:1,accessor:"getWeight"}}),this.setState({positionAttributeName:"positions"})}_setupTextureParams(){const{gl:e}=this.context,{weightsTextureSize:t}=this.props,n=Math.min(t,Object(s.f)(e,3379)),r=Object(a.c)(e,on),{format:o,type:l}=function({gl:e,floatTargetSupport:t}){return t?{format:Object(s.j)(e)?34836:6408,type:5126}:{format:6408,type:5121}}({gl:e,floatTargetSupport:r}),u=r?1:1/255;this.setState({textureSize:n,format:o,type:l,weightsScale:u}),r||i.a.warn("HeatmapLayer: ".concat(this.id," rendering to float texture not supported, fallingback to low precession format"))()}getShaders(e){return super.getShaders("max-weights-transform"===e?{vs:"attribute vec4 inTexture;\nvarying vec4 outTexture;\n\nvoid main()\n{\noutTexture = inTexture;\ngl_Position = vec4(0, 0, 0, 1.);\ngl_PointSize = 1.0;\n}\n",_fs:"varying vec4 outTexture;\nvoid main() {\n gl_FragColor = outTexture;\n gl_FragColor.g = outTexture.r / max(1.0, outTexture.a);\n}\n"}:{vs:"attribute vec3 positions;\nattribute vec3 positions64Low;\nattribute float weights;\nvarying vec4 weightsTexture;\nuniform float radiusPixels;\nuniform float textureWidth;\nuniform vec4 commonBounds;\nuniform float weightsScale;\nvoid main()\n{\n weightsTexture = vec4(weights * weightsScale, 0., 0., 1.);\n\n float radiusTexels = project_pixel_size(radiusPixels) * textureWidth / (commonBounds.z - commonBounds.x);\n gl_PointSize = radiusTexels * 2.;\n\n vec3 commonPosition = project_position(positions, positions64Low);\n gl_Position.xy = (commonPosition.xy - commonBounds.xy) / (commonBounds.zw - commonBounds.xy) ;\n gl_Position.xy = (gl_Position.xy * 2.) - (1.);\n}\n",_fs:"varying vec4 weightsTexture;\nfloat gaussianKDE(float u){\n return pow(2.71828, -u*u/0.05555)/(1.77245385*0.166666);\n}\nvoid main()\n{\n float dist = length(gl_PointCoord - vec2(0.5, 0.5));\n if (dist > 0.5) {\n discard;\n }\n gl_FragColor = weightsTexture * gaussianKDE(2. * dist);\n DECKGL_FILTER_COLOR(gl_FragColor, geometry);\n}\n"})}_createWeightsTransform(e={}){var t;const{gl:n}=this.context;let{weightsTransform:r}=this.state;const{weightsTexture:i}=this.state;null===(t=r)||void 0===t||t.delete(),r=new c.a(n,{id:"".concat(this.id,"-weights-transform"),elementCount:1,_targetTexture:i,_targetTextureVarying:"weightsTexture",...e}),this.setState({weightsTransform:r})}_setupResources(){const{gl:e}=this.context;this._createTextures();const{textureSize:t,weightsTexture:n,maxWeightsTexture:r}=this.state,i=this.getShaders("weights-transform");this._createWeightsTransform(i);const o=this.getShaders("max-weights-transform"),a=new c.a(e,{id:"".concat(this.id,"-max-weights-transform"),_sourceTextures:{inTexture:n},_targetTexture:r,_targetTextureVarying:"outTexture",...o,elementCount:t*t});this.setState({weightsTexture:n,maxWeightsTexture:r,maxWeightTransform:a,zoom:null,triPositionBuffer:new Q.a(e,{byteLength:48,accessor:{size:3}}),triTexCoordBuffer:new Q.a(e,{byteLength:48,accessor:{size:2}})})}updateShaders(e){this._createWeightsTransform(e)}_updateMaxWeightValue(){const{maxWeightTransform:e}=this.state;e.run({parameters:{blend:!0,depthTest:!1,blendFunc:[1,1],blendEquation:32776}})}_updateBounds(e=!1){const{viewport:t}=this.context,n=[t.unproject([0,0]),t.unproject([t.width,0]),t.unproject([t.width,t.height]),t.unproject([0,t.height])].map(e=>e.map(Math.fround)),r=function(e){const t=e.map(e=>e[0]),n=e.map(e=>e[1]),r=Math.min.apply(null,t),i=Math.max.apply(null,t);return[r,Math.min.apply(null,n),i,Math.max.apply(null,n)]}(n),i={visibleWorldBounds:r,viewportCorners:n};let o=!1;if(e||!this.state.worldBounds||(a=this.state.worldBounds,!((s=r)[0]>=a[0]&&s[2]<=a[2]&&s[1]>=a[1]&&s[3]<=a[3]))){const e=this._worldToCommonBounds(r),t=this._commonToWorldBounds(e);this.props.coordinateSystem===ge.a.LNGLAT&&(t[1]=Math.max(t[1],-85.051129),t[3]=Math.min(t[3],85.051129),t[0]=Math.max(t[0],-360),t[2]=Math.min(t[2],360));const n=this._worldToCommonBounds(t);i.worldBounds=t,i.normalizedCommonBounds=n,o=!0}var a,s;return this.setState(i),o}_updateTextureRenderingBounds(){const{triPositionBuffer:e,triTexCoordBuffer:t,normalizedCommonBounds:n,viewportCorners:r}=this.state,{viewport:i}=this.context;e.subData(Qt(r,3));const o=r.map(e=>function(e,t){const[n,r,i,o]=t;return[(e[0]-n)/(i-n),(e[1]-r)/(o-r)]}(i.projectPosition(e),n));t.subData(Qt(o,2))}_updateColorTexture(e){const{colorRange:t}=e.props;let{colorTexture:n}=this.state;const r=z(t,!1,Uint8Array);n?n.setImageData({data:r,width:t.length}):n=new S.a(this.context.gl,{data:r,width:t.length,height:1,...$t}),this.setState({colorTexture:n})}_updateWeightmap(){const{radiusPixels:e,colorDomain:t,aggregation:n}=this.props,{weightsTransform:r,worldBounds:i,textureSize:o,weightsTexture:a,weightsScale:l}=this.state;this.state.isWeightMapDirty=!1;const u=this._worldToCommonBounds(i,{useLayerCoordinateSystem:!0});if(t&&"SUM"===n){const{viewport:e}=this.context,n=e.distanceScales.metersPerUnit[2]*(u[2]-u[0])/o;this.state.colorDomain=t.map(e=>e*n*l)}else this.state.colorDomain=t||en;const c={radiusPixels:e,commonBounds:u,textureWidth:o,weightsScale:l};r.update({elementCount:this.getNumInstances()}),Object(s.o)(this.context.gl,{clearColor:[0,0,0,0]},()=>{r.run({uniforms:c,parameters:{blend:!0,depthTest:!1,blendFunc:[1,1],blendEquation:32774},clearRenderTarget:!0,attributes:this.getAttributes(),moduleSettings:this.getModuleSettings()})}),this._updateMaxWeightValue(),a.setParameters({10240:9729,10241:9729})}_debouncedUpdateWeightmap(e=!1){let{updateTimer:t}=this.state;const{debounceTimeout:n}=this.props;e?(t=null,this._updateBounds(!0),this._updateTextureRenderingBounds(),this.setState({isWeightMapDirty:!0})):(this.setState({isWeightMapDirty:!1}),clearTimeout(t),t=setTimeout(this._debouncedUpdateWeightmap.bind(this,!0),n)),this.setState({updateTimer:t})}_worldToCommonBounds(e,t={}){const{useLayerCoordinateSystem:n=!1}=t,[r,i,o,a]=e,{viewport:s}=this.context,{textureSize:l}=this.state,{coordinateSystem:u}=this.props,c=n&&(u===ge.a.LNGLAT_OFFSETS||u===ge.a.METER_OFFSETS),d=c?s.projectPosition(this.props.coordinateOrigin):[0,0],f=2*l/s.scale;let h,p;return n&&!c?(h=this.projectPosition([r,i,0]),p=this.projectPosition([o,a,0])):(h=s.projectPosition([r,i,0]),p=s.projectPosition([o,a,0])),function(e,t,n){const[r,i,o,a]=e,s=o-r,l=a-i;let u=s,c=l;s/le.name===t);i&&(i.name===r&&l(i,"geo.primary_field","true"),s(i,n))}}function s(e,t){for(const[n,r]of Object.entries(t||{}))switch(n){case"geometry_types":l(e,"geo."+n,r.join(","));break;case"bbox":l(e,"geo.crs."+n,JSON.stringify(r));break;case"crs":for(const[t,n]of Object.entries(r||{}))switch(t){case"id":l(e,"geo.crs."+t,"object"==typeof n?`${null==n?void 0:n.authority}:${null==n?void 0:n.code}`:JSON.stringify(n));break;default:l(e,"geo.crs."+t,"string"==typeof n?n:JSON.stringify(n))}break;case"edges":default:l(e,"geo."+n,"string"==typeof r?r:JSON.stringify(r))}}function l(e,t,n){e.metadata=e.metadata||{},e.metadata[t]=n}function u(e,t){const n=e.metadata[t];if(!n)return null;try{const e=JSON.parse(n);return e&&"object"==typeof e?e:null}catch{return null}}function c(e,t){const n=u(e,t);for(const[r,i]of Object.entries(n||{}))e.metadata[`${t}.${r}`]="string"==typeof i?i:JSON.stringify(i)}var d=n(876);function f(e){switch(e.shape){case"array-row-table":case"object-row-table":return e.data.length;case"geojson-table":return e.features.length;case"arrow-table":return e.data.numRows;case"columnar-table":for(const t of Object.values(e.data))return t.length||0;return 0;default:throw new Error("table")}}function h(e,t,n,r){switch(e.shape){case"object-row-table":return r?Object.fromEntries(Object.entries(e.data[t])):e.data[t];case"array-row-table":if(e.schema){const r=n||{};for(let n=0;n"wkt"===e.id);return(null==t||null===(r=t.parseTextSync)||void 0===r?void 0:r.call(t,e))||null;case"wkb":default:const o=n.find(e=>"wkb"===e.id),a=ArrayBuffer.isView(e)?e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength):e;return null==o||null===(i=o.parseSync)||void 0===i?void 0:i.call(o,a,{wkb:{shape:"geojson-geometry"}})}}var g=n(1);Math.PI,Math.PI;globalThis.mathgl=globalThis.mathgl||{config:{EPSILON:1e-12,debug:!1,precision:4,printTypes:!1,printDegrees:!1,printRowMajor:!0,_cartographicRadians:!1}};globalThis.mathgl.config;const m={x:0,y:1,z:2};function y(e,t={}){const{start:n=0,end:r=e.length,plane:i="xy"}=t,o=t.size||2;let a=0;const s=m[i[0]],l=m[i[1]];for(let t=n,i=r-o;t80*n){f=c=e[0],h=d=e[1];for(let t=n;tc&&(c=p),A>d&&(d=A);u=Math.max(c-f,d-h),u=0!==u?32767/u:0}return w(s,l,n,f,h,u,0),l}function b(e,t,n,r,i,o,a){let s,l;void 0===o&&(o=y(e,{start:t,end:n,size:r,plane:a}));let u=m[a[0]],c=m[a[1]];if(i===o<0)for(s=t;s=t;s-=r)l=U(s,e[s+u],e[s+c],l);return l&&R(l,l.next)&&(H(l),l=l.next),l}function _(e,t){if(!e)return e;t||(t=e);let n,r=e;do{if(n=!1,r.steiner||!R(r,r.next)&&0!==k(r.prev,r,r.next))r=r.next;else{if(H(r),r=t=r.prev,r===r.next)break;n=!0}}while(n||r!==t);return t}function w(e,t,n,r,i,o,a){if(!e)return;!a&&o&&function(e,t,n,r){let i=e;do{0===i.z&&(i.z=L(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,function(e){let t,n,r,i,o,a,s,l,u=1;do{for(i=e,e=null,l=null,r=0;i;){for(r++,a=i,o=0,n=0;n0||s>0&&a;)0!==o&&(0===s||!a||i.z<=a.z)?(t=i,i=i.nextZ,o--):(t=a,a=a.nextZ,s--),l?l.nextZ=t:e=t,t.prevZ=l,l=t;i=a}l.nextZ=null,u*=2}while(r>1)}(i)}(e,r,i,o);let s,l,u=e;for(;e.prev!==e.next;)if(s=e.prev,l=e.next,o?M(e,r,i,o):x(e))t.push(s.i/n|0),t.push(e.i/n|0),t.push(l.i/n|0),H(e),e=l.next,u=l.next;else if((e=l)===u){a?1===a?w(e=E(_(e),t,n),t,n,r,i,o,2):2===a&&O(e,t,n,r,i,o):w(_(e),t,n,r,i,o,1);break}}function x(e){const t=e.prev,n=e,r=e.next;if(k(t,n,r)>=0)return!1;const i=t.x,o=n.x,a=r.x,s=t.y,l=n.y,u=r.y,c=io?i>a?i:a:o>a?o:a,h=s>l?s>u?s:u:l>u?l:u;let p=r.next;for(;p!==t;){if(p.x>=c&&p.x<=f&&p.y>=d&&p.y<=h&&I(i,s,o,l,a,u,p.x,p.y)&&k(p.prev,p,p.next)>=0)return!1;p=p.next}return!0}function M(e,t,n,r){const i=e.prev,o=e,a=e.next;if(k(i,o,a)>=0)return!1;const s=i.x,l=o.x,u=a.x,c=i.y,d=o.y,f=a.y,h=sl?s>u?s:u:l>u?l:u,g=c>d?c>f?c:f:d>f?d:f,m=L(h,p,t,n,r),y=L(A,g,t,n,r);let v=e.prevZ,b=e.nextZ;for(;v&&v.z>=m&&b&&b.z<=y;){if(v.x>=h&&v.x<=A&&v.y>=p&&v.y<=g&&v!==i&&v!==a&&I(s,c,l,d,u,f,v.x,v.y)&&k(v.prev,v,v.next)>=0)return!1;if(v=v.prevZ,b.x>=h&&b.x<=A&&b.y>=p&&b.y<=g&&b!==i&&b!==a&&I(s,c,l,d,u,f,b.x,b.y)&&k(b.prev,b,b.next)>=0)return!1;b=b.nextZ}for(;v&&v.z>=m;){if(v.x>=h&&v.x<=A&&v.y>=p&&v.y<=g&&v!==i&&v!==a&&I(s,c,l,d,u,f,v.x,v.y)&&k(v.prev,v,v.next)>=0)return!1;v=v.prevZ}for(;b&&b.z<=y;){if(b.x>=h&&b.x<=A&&b.y>=p&&b.y<=g&&b!==i&&b!==a&&I(s,c,l,d,u,f,b.x,b.y)&&k(b.prev,b,b.next)>=0)return!1;b=b.nextZ}return!0}function E(e,t,n){let r=e;do{const i=r.prev,o=r.next.next;!R(i,o)&&j(i,r,r.next,o)&&B(i,o)&&B(o,i)&&(t.push(i.i/n|0),t.push(r.i/n|0),t.push(o.i/n|0),H(r),H(r.next),r=e=o),r=r.next}while(r!==e);return _(r)}function O(e,t,n,r,i,o){let a=e;do{let e=a.next.next;for(;e!==a.prev;){if(a.i!==e.i&&D(a,e)){let s=z(a,e);return a=_(a,a.next),s=_(s,s.next),w(a,t,n,r,i,o,0),void w(s,t,n,r,i,o,0)}e=e.next}a=a.next}while(a!==e)}function S(e,t){return e.x-t.x}function T(e,t){const n=function(e,t){let n=t;const r=e.x,i=e.y;let o,a=-1/0;do{if(i<=n.y&&i>=n.next.y&&n.next.y!==n.y){const e=n.x+(i-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(e<=r&&e>a&&(a=e,o=n.x=n.x&&n.x>=l&&r!==n.x&&I(io.x||n.x===o.x&&C(o,n)))&&(o=n,d=c)),n=n.next}while(n!==s);return o}(e,t);if(!n)return t;const r=z(n,e);return _(r,r.next),_(n,n.next)}function C(e,t){return k(e.prev,e,t.prev)<0&&k(t.next,e,e.next)<0}function L(e,t,n,r,i){return(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=(e-n)*i|0)|e<<8))|e<<4))|e<<2))|e<<1))|(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=(t-r)*i|0)|t<<8))|t<<4))|t<<2))|t<<1))<<1}function P(e){let t=e,n=e;do{(t.x=(e-a)*(o-s)&&(e-a)*(r-s)>=(n-a)*(t-s)&&(n-a)*(o-s)>=(i-a)*(r-s)}function D(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!function(e,t){let n=e;do{if(n.i!==e.i&&n.next.i!==e.i&&n.i!==t.i&&n.next.i!==t.i&&j(n,n.next,e,t))return!0;n=n.next}while(n!==e);return!1}(e,t)&&(B(e,t)&&B(t,e)&&function(e,t){let n=e,r=!1;const i=(e.x+t.x)/2,o=(e.y+t.y)/2;do{n.y>o!=n.next.y>o&&n.next.y!==n.y&&i<(n.next.x-n.x)*(o-n.y)/(n.next.y-n.y)+n.x&&(r=!r),n=n.next}while(n!==e);return r}(e,t)&&(k(e.prev,e,t.prev)||k(e,t.prev,t))||R(e,t)&&k(e.prev,e,e.next)>0&&k(t.prev,t,t.next)>0)}function k(e,t,n){return(t.y-e.y)*(n.x-t.x)-(t.x-e.x)*(n.y-t.y)}function R(e,t){return e.x===t.x&&e.y===t.y}function j(e,t,n,r){const i=N(k(e,t,n)),o=N(k(e,t,r)),a=N(k(n,r,e)),s=N(k(n,r,t));return i!==o&&a!==s||(!(0!==i||!F(e,n,t))||(!(0!==o||!F(e,r,t))||(!(0!==a||!F(n,e,r))||!(0!==s||!F(n,t,r)))))}function F(e,t,n){return t.x<=Math.max(e.x,n.x)&&t.x>=Math.min(e.x,n.x)&&t.y<=Math.max(e.y,n.y)&&t.y>=Math.min(e.y,n.y)}function N(e){return e>0?1:e<0?-1:0}function B(e,t){return k(e.prev,e,e.next)<0?k(e,t,e.next)>=0&&k(e,e.prev,t)>=0:k(e,t,e.prev)<0||k(e,e.next,t)<0}function z(e,t){const n=new V(e.i,e.x,e.y),r=new V(t.i,t.x,t.y),i=e.next,o=t.prev;return e.next=t,t.prev=e,n.next=i,i.prev=n,r.next=n,n.prev=r,o.next=r,r.prev=o,r}function U(e,t,n,r){const i=new V(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 H(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)}class V{constructor(e,t,n){Object(g.a)(this,"i",void 0),Object(g.a)(this,"x",void 0),Object(g.a)(this,"y",void 0),Object(g.a)(this,"prev",null),Object(g.a)(this,"next",null),Object(g.a)(this,"z",0),Object(g.a)(this,"prevZ",null),Object(g.a)(this,"nextZ",null),Object(g.a)(this,"steiner",!1),this.i=e,this.x=t,this.y=n}}function G(e,t,n){const r=Y(e),i=Object.keys(r).filter(e=>r[e]!==Array);return function(e,t,n){const{pointPositionsCount:r,pointFeaturesCount:i,linePositionsCount:o,linePathsCount:a,lineFeaturesCount:s,polygonPositionsCount:l,polygonObjectsCount:u,polygonRingsCount:c,polygonFeaturesCount:d,propArrayTypes:f,coordLength:h}=t,{numericPropKeys:p=[],PositionDataType:A=Float32Array,triangulate:g=!0}=n,m=e[0]&&"id"in e[0],y=e.length>65535?Uint32Array:Uint16Array,v={type:"Point",positions:new A(r*h),globalFeatureIds:new y(r),featureIds:i>65535?new Uint32Array(r):new Uint16Array(r),numericProps:{},properties:[],fields:[]},b={type:"LineString",pathIndices:o>65535?new Uint32Array(a+1):new Uint16Array(a+1),positions:new A(o*h),globalFeatureIds:new y(o),featureIds:s>65535?new Uint32Array(o):new Uint16Array(o),numericProps:{},properties:[],fields:[]},_={type:"Polygon",polygonIndices:l>65535?new Uint32Array(u+1):new Uint16Array(u+1),primitivePolygonIndices:l>65535?new Uint32Array(c+1):new Uint16Array(c+1),positions:new A(l*h),globalFeatureIds:new y(l),featureIds:d>65535?new Uint32Array(l):new Uint16Array(l),numericProps:{},properties:[],fields:[]};g&&(_.triangles=[]);for(const e of[v,b,_])for(const t of p){const n=f[t];e.numericProps[t]=new n(e.positions.length/h)}b.pathIndices[a]=o,_.polygonIndices[u]=l,_.primitivePolygonIndices[c]=l;const w={pointPosition:0,pointFeature:0,linePosition:0,linePath:0,lineFeature:0,polygonPosition:0,polygonObject:0,polygonRing:0,polygonFeature:0,feature:0};for(const t of e){const e=t.geometry,n=t.properties||{};switch(e.type){case"Point":W(e,v,w,h,n),v.properties.push(J(n,p)),m&&v.fields.push({id:t.id}),w.pointFeature++;break;case"LineString":q(e,b,w,h,n),b.properties.push(J(n,p)),m&&b.fields.push({id:t.id}),w.lineFeature++;break;case"Polygon":X(e,_,w,h,n),_.properties.push(J(n,p)),m&&_.fields.push({id:t.id}),w.polygonFeature++;break;default:throw new Error("Invalid geometry type")}w.feature++}return function(e,t,n,r){const i={shape:"binary-feature-collection",points:{...e,positions:{value:e.positions,size:r},globalFeatureIds:{value:e.globalFeatureIds,size:1},featureIds:{value:e.featureIds,size:1},numericProps:K(e.numericProps,1)},lines:{...t,positions:{value:t.positions,size:r},pathIndices:{value:t.pathIndices,size:1},globalFeatureIds:{value:t.globalFeatureIds,size:1},featureIds:{value:t.featureIds,size:1},numericProps:K(t.numericProps,1)},polygons:{...n,positions:{value:n.positions,size:r},polygonIndices:{value:n.polygonIndices,size:1},primitivePolygonIndices:{value:n.primitivePolygonIndices,size:1},globalFeatureIds:{value:n.globalFeatureIds,size:1},featureIds:{value:n.featureIds,size:1},numericProps:K(n.numericProps,1)}};i.polygons&&n.triangles&&(i.polygons.triangles={value:new Uint32Array(n.triangles),size:1});return i}(v,b,_,h)}(e,{propArrayTypes:r,...t},{numericPropKeys:n&&n.numericPropKeys||i,PositionDataType:n?n.PositionDataType:Float32Array,triangulate:!n||n.triangulate})}function Y(e){const t={};for(const n of e)if(n.properties)for(const e in n.properties){const r=n.properties[e];t[e]=$(r,t[e])}return t}function W(e,t,n,r,i){t.positions.set(e.data,n.pointPosition*r);const o=e.data.length/r;Q(t,i,n.pointPosition,o),t.globalFeatureIds.fill(n.feature,n.pointPosition,n.pointPosition+o),t.featureIds.fill(n.pointFeature,n.pointPosition,n.pointPosition+o),n.pointPosition+=o}function q(e,t,n,r,i){t.positions.set(e.data,n.linePosition*r);const o=e.data.length/r;Q(t,i,n.linePosition,o),t.globalFeatureIds.fill(n.feature,n.linePosition,n.linePosition+o),t.featureIds.fill(n.lineFeature,n.linePosition,n.linePosition+o);for(let i=0,o=e.indices.length;i(e-c)/a),a,t);for(let t=0,n=d.length;t0?Math.max(...c):2,pointPositionsCount:t,pointFeaturesCount:n,linePositionsCount:r,linePathsCount:i,lineFeaturesCount:o,polygonPositionsCount:a,polygonObjectsCount:s,polygonRingsCount:l,polygonFeaturesCount:u}}function te(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{coordLength:2,fixRingWinding:!0};return e.map(e=>oe(e,t))}function ne(e,t,n,r){n.push(t.length),t.push(...e);for(let n=e.length;ne.slice(0,2)).flat());const r=e<0;i.fixRingWinding&&(0===o&&!r||o>0&&r)&&(n.reverse(),e=-e),a.push(e),re(n,t,s,i),o++}o>0&&(r.push(a),n.push(s))}function oe(e,t){const{geometry:n}=e;if("GeometryCollection"===n.type)throw new Error("GeometryCollection type not supported");const r=[],i=[];let o,a;switch(n.type){case"Point":a="Point",ne(n.coordinates,r,i,t);break;case"MultiPoint":a="Point",n.coordinates.map(e=>ne(e,r,i,t));break;case"LineString":a="LineString",re(n.coordinates,r,i,t);break;case"MultiLineString":a="LineString",n.coordinates.map(e=>re(e,r,i,t));break;case"Polygon":a="Polygon",o=[],ie(n.coordinates,r,i,o,t);break;case"MultiPolygon":a="Polygon",o=[],n.coordinates.map(e=>ie(e,r,i,o,t));break;default:throw new Error("Unknown type: "+a)}return{...e,geometry:{type:a,indices:i,data:r,areas:o}}}function ae(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{fixRingWinding:!0,triangulate:!0};const n=ee(e),r=n.coordLength,{fixRingWinding:i}=t,o=te(e,{coordLength:r,fixRingWinding:i});return G(o,n,{numericPropKeys:t.numericPropKeys,PositionDataType:t.PositionDataType||Float32Array,triangulate:t.triangulate})}var se=n(572);function le(e,t){return e.points&&ue(e.points,t),e.lines&&ue(e.lines,t),e.polygons&&ue(e.polygons,t),e}function ue(e,t){const{positions:n}=e;for(let e=0;ede(e,t))}},function(e,t,n){"use strict";n.r(t),n.d(t,"EXT_MESH_FEATURES",(function(){return r.name})),n.d(t,"EXT_STRUCTURAL_METADATA",(function(){return i.name})),n.d(t,"EXT_FEATURE_METADATA",(function(){return o.name})),n.d(t,"GLTFLoader",(function(){return a.a})),n.d(t,"GLTFWriter",(function(){return f})),n.d(t,"GLBLoader",(function(){return A})),n.d(t,"GLBWriter",(function(){return m})),n.d(t,"GLTFScenegraph",(function(){return v.a})),n.d(t,"postProcessGLTF",(function(){return I})),n.d(t,"_getMemoryUsageGLTF",(function(){return _.d}));var r=n(511),i=n(510),o=n(512),a=n(1122),s=n(268),l=n(337);const u=1179937895;function c(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;const{magic:r=u,version:i=2,json:o={},binary:a}=e,s=n;t&&(t.setUint32(n+0,r,!0),t.setUint32(n+4,i,!0),t.setUint32(n+8,0,!0));const c=n+8;n+=12;const d=n;t&&(t.setUint32(n+0,0,!0),t.setUint32(n+4,1313821514,!0)),n+=8;const f=JSON.stringify(o);if(n=Object(l.b)(t,n,f,4),t){const e=n-d-8;t.setUint32(d+0,e,!0)}if(a){const e=n;if(t&&(t.setUint32(n+0,0,!0),t.setUint32(n+4,5130562,!0)),n+=8,n=Object(l.a)(t,n,a,4),t){const r=n-e-8;t.setUint32(e+0,r,!0)}}if(t){const e=n-s;t.setUint32(c,e,!0)}return n}function d(e,t,n,r){return function(e){let{firstBuffer:t=0}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(e.buffers&&e.buffers.length>t)throw new Error("encodeGLTF: multiple buffers not yet implemented")}(e),c(e,t,n,r)}const f={name:"glTF",id:"gltf",module:"gltf",version:s.a,extensions:["glb"],mimeTypes:["model/gltf-binary"],binary:!0,options:{gltf:{}},encode:async function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return h(e,t)},encodeSync:h};function h(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{byteOffset:n=0}=t,r=d(e,null,n,t),i=new ArrayBuffer(r),o=new DataView(i);return d(e,o,n,t),i}var p=n(389);const A={name:"GLB",id:"glb",module:"gltf",version:s.a,extensions:["glb"],mimeTypes:["model/gltf-binary"],binary:!0,parse:async function(e,t){return g(e,t)},parseSync:g,options:{glb:{strict:!1}}};function g(e,t){const{byteOffset:n=0}=t||{},r={};return Object(p.b)(r,e,n,null==t?void 0:t.glb),r}const m={name:"GLB",id:"glb",module:"gltf",version:s.a,extensions:["glb"],mimeTypes:["model/gltf-binary"],binary:!0,options:{glb:{}},encode:async function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return y(e,t)},encodeSync:y};function y(e,t){const{byteOffset:n=0}=t,r=c(e,null,n,t),i=new ArrayBuffer(r);return c(e,new DataView(i),n,t),i}var v=n(74),b=n(110),_=n(131);const w={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},x={5120:1,5121:1,5122:2,5123:2,5125:4,5126:4},M=10240,E=10241,O=10242,S=10243,T=10497,C={magFilter:M,minFilter:E,wrapS:O,wrapT:S},L={[M]:9729,[E]:9986,[O]:T,[S]:T};class P{constructor(){this.baseUri="",this.jsonUnprocessed=void 0,this.json=void 0,this.buffers=[],this.images=[]}postProcess(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{json:n,buffers:r=[],images:i=[]}=e,{baseUri:o=""}=e;return Object(b.a)(n),this.baseUri=o,this.buffers=r,this.images=i,this.jsonUnprocessed=n,this.json=this._resolveTree(e.json,t),this.json}_resolveTree(e){const t={...e};return this.json=t,e.bufferViews&&(t.bufferViews=e.bufferViews.map((e,t)=>this._resolveBufferView(e,t))),e.images&&(t.images=e.images.map((e,t)=>this._resolveImage(e,t))),e.samplers&&(t.samplers=e.samplers.map((e,t)=>this._resolveSampler(e,t))),e.textures&&(t.textures=e.textures.map((e,t)=>this._resolveTexture(e,t))),e.accessors&&(t.accessors=e.accessors.map((e,t)=>this._resolveAccessor(e,t))),e.materials&&(t.materials=e.materials.map((e,t)=>this._resolveMaterial(e,t))),e.meshes&&(t.meshes=e.meshes.map((e,t)=>this._resolveMesh(e,t))),e.nodes&&(t.nodes=e.nodes.map((e,t)=>this._resolveNode(e,t)),t.nodes=t.nodes.map((e,t)=>this._resolveNodeChildren(e))),e.skins&&(t.skins=e.skins.map((e,t)=>this._resolveSkin(e,t))),e.scenes&&(t.scenes=e.scenes.map((e,t)=>this._resolveScene(e,t))),"number"==typeof this.json.scene&&t.scenes&&(t.scene=t.scenes[this.json.scene]),t}getScene(e){return this._get(this.json.scenes,e)}getNode(e){return this._get(this.json.nodes,e)}getSkin(e){return this._get(this.json.skins,e)}getMesh(e){return this._get(this.json.meshes,e)}getMaterial(e){return this._get(this.json.materials,e)}getAccessor(e){return this._get(this.json.accessors,e)}getCamera(e){return this._get(this.json.cameras,e)}getTexture(e){return this._get(this.json.textures,e)}getSampler(e){return this._get(this.json.samplers,e)}getImage(e){return this._get(this.json.images,e)}getBufferView(e){return this._get(this.json.bufferViews,e)}getBuffer(e){return this._get(this.json.buffers,e)}_get(e,t){if("object"==typeof t)return t;const n=e&&e[t];return n||console.warn(`glTF file error: Could not find ${e}[${t}]`),n}_resolveScene(e,t){return{...e,id:e.id||"scene-"+t,nodes:(e.nodes||[]).map(e=>this.getNode(e))}}_resolveNode(e,t){const n={...e,id:(null==e?void 0:e.id)||"node-"+t};return void 0!==e.mesh&&(n.mesh=this.getMesh(e.mesh)),void 0!==e.camera&&(n.camera=this.getCamera(e.camera)),void 0!==e.skin&&(n.skin=this.getSkin(e.skin)),void 0!==e.meshes&&e.meshes.length&&(n.mesh=e.meshes.reduce((e,t)=>{const n=this.getMesh(t);return e.id=n.id,e.primitives=e.primitives.concat(n.primitives),e},{primitives:[]})),n}_resolveNodeChildren(e){return e.children&&(e.children=e.children.map(e=>this.getNode(e))),e}_resolveSkin(e,t){const n="number"==typeof e.inverseBindMatrices?this.getAccessor(e.inverseBindMatrices):void 0;return{...e,id:e.id||"skin-"+t,inverseBindMatrices:n}}_resolveMesh(e,t){const n={...e,id:e.id||"mesh-"+t,primitives:[]};return e.primitives&&(n.primitives=e.primitives.map(e=>{const t={...e,attributes:{},indices:void 0,material:void 0},n=e.attributes;for(const e in n)t.attributes[e]=this.getAccessor(n[e]);return void 0!==e.indices&&(t.indices=this.getAccessor(e.indices)),void 0!==e.material&&(t.material=this.getMaterial(e.material)),t})),n}_resolveMaterial(e,t){const n={...e,id:e.id||"material-"+t};if(n.normalTexture&&(n.normalTexture={...n.normalTexture},n.normalTexture.texture=this.getTexture(n.normalTexture.index)),n.occlusionTexture&&(n.occlusionTexture={...n.occlusionTexture},n.occlusionTexture.texture=this.getTexture(n.occlusionTexture.index)),n.emissiveTexture&&(n.emissiveTexture={...n.emissiveTexture},n.emissiveTexture.texture=this.getTexture(n.emissiveTexture.index)),n.emissiveFactor||(n.emissiveFactor=n.emissiveTexture?[1,1,1]:[0,0,0]),n.pbrMetallicRoughness){n.pbrMetallicRoughness={...n.pbrMetallicRoughness};const e=n.pbrMetallicRoughness;e.baseColorTexture&&(e.baseColorTexture={...e.baseColorTexture},e.baseColorTexture.texture=this.getTexture(e.baseColorTexture.index)),e.metallicRoughnessTexture&&(e.metallicRoughnessTexture={...e.metallicRoughnessTexture},e.metallicRoughnessTexture.texture=this.getTexture(e.metallicRoughnessTexture.index))}return n}_resolveAccessor(e,t){const n=(r=e.componentType,x[r]);var r;const i=(o=e.type,w[o]);var o;const a=n*i,s={...e,id:e.id||"accessor-"+t,bytesPerComponent:n,components:i,bytesPerElement:a,value:void 0,bufferView:void 0,sparse:void 0};if(void 0!==e.bufferView&&(s.bufferView=this.getBufferView(e.bufferView)),s.bufferView){const e=s.bufferView.buffer,{ArrayType:t,byteLength:n}=Object(_.a)(s,s.bufferView),r=(s.bufferView.byteOffset||0)+(s.byteOffset||0)+e.byteOffset;let i=e.arrayBuffer.slice(r,r+n);s.bufferView.byteStride&&(i=this._getValueFromInterleavedBuffer(e,r,s.bufferView.byteStride,s.bytesPerElement,s.count)),s.value=new t(i)}return s}_getValueFromInterleavedBuffer(e,t,n,r,i){const o=new Uint8Array(i*r);for(let a=0;a0)throw new Error("ListBuilder can only have one child.");return this.children[this.numChildren]=e,this.type=new i.x(new r.a(t,e.type,!0)),this.numChildren-1}_flushPending(e){const t=this._offsets,[n]=this.children;for(const[r,i]of e)if(void 0===i)t.set(r,0);else{const e=i,o=e.length,a=t.set(r,o).buffer[r];for(let t=-1;++tn[i].set(e,t[i]));case Map:return r.children.forEach((r,i)=>n[i].set(e,t.get(r.name)));default:return r.children.forEach((r,i)=>n[i].set(e,t[r.name]))}}setValid(e,t){return super.setValid(e,t)||this.children.forEach(n=>n.setValid(e,t)),t}addChild(e,t=""+this.numChildren){const n=this.children.push(e);return this.type=new o.B([...this.type.children,new r.a(t,e.type,!0)]),n}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(12),i=n(61),o=n(158);class a extends i.a{constructor({type:e,nullValues:t,dictionaryHashFunction:n}){super({type:new r.i(e.dictionary,e.indices,e.id,e.isOrdered)}),this._nulls=null,this._dictionaryOffset=0,this._keysToIndices=Object.create(null),this.indices=Object(o.c)({type:this.type.indices,nullValues:t}),this.dictionary=Object(o.c)({type:this.type.dictionary,nullValues:null}),"function"==typeof n&&(this.valueToKey=n)}get values(){return this.indices.values}get nullCount(){return this.indices.nullCount}get nullBitmap(){return this.indices.nullBitmap}get byteLength(){return this.indices.byteLength+this.dictionary.byteLength}get reservedLength(){return this.indices.reservedLength+this.dictionary.reservedLength}get reservedByteLength(){return this.indices.reservedByteLength+this.dictionary.reservedByteLength}isValid(e){return this.indices.isValid(e)}setValid(e,t){const n=this.indices;return t=n.setValid(e,t),this.length=n.length,t}setValue(e,t){const n=this._keysToIndices,r=this.valueToKey(t);let i=n[r];return void 0===i&&(n[r]=i=this._dictionaryOffset+this.dictionary.append(t).length-1),this.indices.setValue(e,i)}flush(){const e=this.type,t=this._dictionary,n=this.dictionary.toVector(),r=this.indices.flush().clone(e);return r.dictionary=t?t.concat(n):n,this.finished||(this._dictionaryOffset+=n.length),this._dictionary=r.dictionary,this.clear(),r}finish(){return this.indices.finish(),this.dictionary.finish(),this._dictionaryOffset=0,this._keysToIndices=Object.create(null),super.finish()}clear(){return this.indices.clear(),this.dictionary.clear(),super.clear()}valueToKey(e){return"string"==typeof e?e:""+e}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(41),i=n(61),o=n(12);class a extends i.a{setValue(e,t){const[n]=this.children,r=e*this.stride;for(let e=-1,i=t.length;++e0)throw new Error("FixedSizeListBuilder can only have one child.");const n=this.children.push(e);return this.type=new o.k(this.type.listSize,new r.a(t,e.type,!0)),n}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(41),i=n(12),o=n(61);class a extends o.c{set(e,t){return super.set(e,t)}setValue(e,t){const n=t instanceof Map?t:new Map(Object.entries(t)),r=this._pending||(this._pending=new Map),i=r.get(e);i&&(this._pendingLength-=i.size),this._pendingLength+=n.size,r.set(e,n)}addChild(e,t=""+this.numChildren){if(this.numChildren>0)throw new Error("ListBuilder can only have one child.");return this.children[this.numChildren]=e,this.type=new i.y(new r.a(t,e.type,!0),this.type.keysSorted),this.numChildren-1}_flushPending(e){const t=this._offsets,[n]=this.children;for(const[r,i]of e)if(void 0===i)t.set(r,0);else{let{[r]:e,[r+1]:o}=t.set(r,i.size).buffer;for(const t of i.entries())if(n.set(e,t),++e>=o)break}}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(148),i=n(303),o=n(660),a=n(304),s=n(661),l=n(662);function u(e,t,n,u){var c,d=Object(r.c)(e,t,n);switch((u=Object(i.b)(null==u?",f":u)).type){case"s":var f=Math.max(Math.abs(e),Math.abs(t));return null!=u.precision||isNaN(c=Object(o.a)(d,f))||(u.precision=c),Object(a.c)(u,f);case"":case"e":case"g":case"p":case"r":null!=u.precision||isNaN(c=Object(s.a)(d,Math.max(Math.abs(e),Math.abs(t))))||(u.precision=c-("e"===u.type));break;case"f":case"%":null!=u.precision||isNaN(c=Object(l.a)(d))||(u.precision=c-2*("%"===u.type))}return Object(a.b)(u)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(81);function i(e,t,n=0,a=e.length-1,s=r.a){for(;a>n;){if(a-n>600){const r=a-n+1,o=t-n+1,l=Math.log(r),u=.5*Math.exp(2*l/3),c=.5*Math.sqrt(l*u*(r-u)/r)*(o-r/2<0?-1:1);i(e,t,Math.max(n,Math.floor(t-o*u/r+c)),Math.min(a,Math.floor(t+(r-o)*u/r+c)),s)}const r=e[t];let l=n,u=a;for(o(e,n,t),s(e[a],r)>0&&o(e,n,a);l0;)--u}0===s(e[n],r)?o(e,n,u):(++u,o(e,u,a)),u<=t&&(n=u+1),t<=u&&(a=u-1)}return e}function o(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}},function(e,t,n){"use strict";var r=n(262);t.a=function(e){return Math.ceil(Math.log(Object(r.a)(e))/Math.LN2)+1}},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(1802);const i=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],o={modelMatrix:i,viewMatrix:i,projectionMatrix:i,cameraPositionWorld:[0,0,0]};const a="varying vec4 project_vPositionWorld;\nvarying vec3 project_vNormalWorld;\n\nvec4 project_getPosition_World() {\n return project_vPositionWorld;\n}\n\nvec3 project_getNormal_World() {\n return project_vNormalWorld;\n}\n",s={name:"project",getUniforms:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:o;const t={};return void 0!==e.modelMatrix&&(t.modelMatrix=e.modelMatrix),void 0!==e.viewMatrix&&(t.viewMatrix=e.viewMatrix),void 0!==e.projectionMatrix&&(t.projectionMatrix=e.projectionMatrix),void 0!==e.cameraPositionWorld&&(t.cameraPositionWorld=e.cameraPositionWorld),void 0===e.projectionMatrix&&void 0===e.viewMatrix||(t.viewProjectionMatrix=new r.a(e.projectionMatrix).multiplyRight(e.viewMatrix)),t},vs:"".concat(a,"\nuniform mat4 modelMatrix;\nuniform mat4 viewMatrix;\nuniform mat4 projectionMatrix;\nuniform mat4 viewProjectionMatrix;\nuniform vec3 cameraPositionWorld;\n\nstruct World {\n vec3 position;\n vec3 normal;\n};\n\nWorld world;\n\nvoid project_setPosition(vec4 position) {\n project_vPositionWorld = position;\n}\n\nvoid project_setNormal(vec3 normal) {\n project_vNormalWorld = normal;\n}\n\nvoid project_setPositionAndNormal_World(vec3 position, vec3 normal) {\n world.position = position;\n world.normal = normal;\n}\n\nvoid project_setPositionAndNormal_Model(vec3 position, vec3 normal) {\n world.position = (modelMatrix * vec4(position, 1.)).xyz;\n world.normal = mat3(modelMatrix) * normal;\n}\n\nvec4 project_model_to_clipspace(vec4 position) {\n return viewProjectionMatrix * modelMatrix * position;\n}\n\nvec4 project_model_to_clipspace(vec3 position) {\n return viewProjectionMatrix * modelMatrix * vec4(position, 1.);\n}\n\nvec4 project_world_to_clipspace(vec3 position) {\n return viewProjectionMatrix * vec4(position, 1.);\n}\n\nvec4 project_view_to_clipspace(vec3 position) {\n return projectionMatrix * vec4(position, 1.);\n}\n\nvec4 project_to_clipspace(vec3 position) {\n return viewProjectionMatrix * vec4(position, 1.);\n}\n"),fs:"\n".concat(a)}},function(e,t,n){"use strict";n.d(t,"b",(function(){return i})),n.d(t,"a",(function(){return o}));var r=n(297);async function i(e,t){for(;;){const{done:n,value:r}=await e.next();if(n)return void e.return();if(t(r))return}}async function o(e){const t=[];for await(const n of e)t.push(n);return Object(r.b)(...t)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(1);const i=[255,255,255],o=1;let a=0;class s{constructor(e={}){Object(r.a)(this,"id",void 0),Object(r.a)(this,"color",void 0),Object(r.a)(this,"intensity",void 0),Object(r.a)(this,"type","ambient");const{color:t=i}=e,{intensity:n=o}=e;this.id=e.id||"ambient-".concat(a++),this.color=t,this.intensity=n}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(1),i=n(174),o=n(351),a=n(353);class s extends i.a{get ViewportType(){return o.a}get ControllerType(){return a.b}}Object(r.a)(s,"displayName","MapView")},function(e,t,n){"use strict";n.d(t,"a",(function(){return a})),n.d(t,"b",(function(){return u}));var r=n(1),i=n(203);const o=()=>{},a={BREAK:1,SNAP_TO_END:2,IGNORE:3},s=e=>e,l=a.BREAK;class u{constructor(e){Object(r.a)(this,"getControllerState",void 0),Object(r.a)(this,"props",void 0),Object(r.a)(this,"propsInTransition",void 0),Object(r.a)(this,"transition",void 0),Object(r.a)(this,"onViewStateChange",void 0),Object(r.a)(this,"onStateChange",void 0),Object(r.a)(this,"_onTransitionUpdate",e=>{const{time:t,settings:{interpolator:n,startProps:r,endProps:i,duration:o,easing:a}}=e,s=a(t/o),l=n.interpolateProps(r,i,s);this.propsInTransition=this.getControllerState({...this.props,...l}).getViewportProps(),this.onViewStateChange({viewState:this.propsInTransition,oldViewState:this.props})}),this.getControllerState=e.getControllerState,this.propsInTransition=null,this.transition=new i.a(e.timeline),this.onViewStateChange=e.onViewStateChange||o,this.onStateChange=e.onStateChange||o}finalize(){this.transition.cancel()}getViewportInTransition(){return this.propsInTransition}processViewStateChange(e){let t=!1;const n=this.props;if(this.props=e,!n||this._shouldIgnoreViewportChange(n,e))return!1;if(this._isTransitionEnabled(e)){let r=n;if(this.transition.inProgress){const{interruption:e,endProps:t}=this.transition.settings;r={...n,...e===a.SNAP_TO_END?t:this.propsInTransition||n}}this._triggerTransition(r,e),t=!0}else this.transition.cancel();return t}updateTransition(){this.transition.update()}_isTransitionEnabled(e){const{transitionDuration:t,transitionInterpolator:n}=e;return(t>0||"auto"===t)&&Boolean(n)}_isUpdateDueToCurrentTransition(e){return!(!this.transition.inProgress||!this.propsInTransition)&&this.transition.settings.interpolator.arePropsEqual(e,this.propsInTransition)}_shouldIgnoreViewportChange(e,t){return this.transition.inProgress?this.transition.settings.interruption===a.IGNORE||this._isUpdateDueToCurrentTransition(t):!this._isTransitionEnabled(t)||t.transitionInterpolator.arePropsEqual(e,t)}_triggerTransition(e,t){const n=this.getControllerState(e),r=this.getControllerState(t).shortestPathFrom(n),i=t.transitionInterpolator,o=i.getDuration?i.getDuration(e,t):t.transitionDuration;if(0===o)return;const a=i.initializeProps(e,r);this.propsInTransition={};const u={duration:o,easing:t.transitionEasing||s,interpolator:i,interruption:t.transitionInterruption||l,startProps:a.start,endProps:a.end,onStart:t.onTransitionStart,onUpdate:this._onTransitionUpdate,onInterrupt:this._onTransitionEnd(t.onTransitionInterrupt),onEnd:this._onTransitionEnd(t.onTransitionEnd)};this.transition.start(u),this.onStateChange({inTransition:!0}),this.updateTransition()}_onTransitionEnd(e){return t=>{this.propsInTransition=null,this.onStateChange({inTransition:!1,isZooming:!1,isPanning:!1,isRotating:!1}),null==e||e(t)}}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));function r(e){if(!function(e){return null!==e&&"object"==typeof e}(e))throw new Error("count(): argument not an object");if("function"==typeof e.count)return e.count();if(Number.isFinite(e.size))return e.size;if(Number.isFinite(e.length))return e.length;if(function(e){return null!==e&&"object"==typeof e&&e.constructor===Object}(e))return Object.keys(e).length;throw new Error("count(): argument not a container")}},function(e,t,n){"use strict";function r(e,t){if(!t)return e;const n={...e,...t};if("defines"in t&&(n.defines={...e.defines,...t.defines}),"modules"in t&&(n.modules=(e.modules||[]).concat(t.modules),t.modules.some(e=>"project64"===e.name))){const e=n.modules.findIndex(e=>"project32"===e.name);e>=0&&n.modules.splice(e,1)}if("inject"in t)if(e.inject){const r={...e.inject};for(const e in t.inject)r[e]=(r[e]||"")+t.inject[e];n.inject=r}else n.inject=t.inject;return n}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return f}));var r=n(1),i=n(217),o=n(130),a=n(39),s=n(49),l=n(67);const u=Math.PI/180,c=180/Math.PI;function d(){const e=Math.PI/180*256;return{unitsPerMeter:[256/6370972,256/6370972,256/6370972],unitsPerMeter2:[0,0,0],metersPerUnit:[24886.609375,24886.609375,24886.609375],unitsPerDegree:[e,e,256/6370972],unitsPerDegree2:[0,0,0],degreesPerUnit:[1/e,1/e,24886.609375]}}class f extends o.a{constructor(e={}){const{latitude:t=0,longitude:n=0,zoom:o=0,nearZMultiplier:a=.1,farZMultiplier:s=2,resolution:l=10}=e;let{height:c,altitude:f=1.5}=e;c=c||1,f=Math.max(.75,f);const h=(new i.a).lookAt({eye:[0,-f,0],up:[0,0,1]}),p=Math.pow(2,o);h.rotateX(t*u),h.rotateZ(-n*u),h.scale(p/c);const A=Math.atan(.5/f),g=512*p/c;super({...e,height:c,viewMatrix:h,longitude:n,latitude:t,zoom:o,distanceScales:d(),fovyRadians:2*A,focalDistance:f,near:a,far:Math.min(2,1/g+1)*f*s}),Object(r.a)(this,"longitude",void 0),Object(r.a)(this,"latitude",void 0),Object(r.a)(this,"resolution",void 0),this.latitude=t,this.longitude=n,this.resolution=l}get projectionMode(){return a.d.GLOBE}getDistanceScales(){return this.distanceScales}getBounds(e={}){const t={targetZ:e.z||0},n=this.unproject([0,this.height/2],t),r=this.unproject([this.width/2,0],t),i=this.unproject([this.width,this.height/2],t),o=this.unproject([this.width/2,this.height],t);return i[0]this.longitude&&(n[0]-=360),[Math.min(n[0],i[0],r[0],o[0]),Math.min(n[1],i[1],r[1],o[1]),Math.max(n[0],i[0],r[0],o[0]),Math.max(n[1],i[1],r[1],o[1])]}unproject(e,{topLeft:t=!0,targetZ:n}={}){const[r,i,o]=e,a=t?i:this.height-i,{pixelUnprojectionMatrix:l}=this;let u;if(Number.isFinite(o))u=h(l,[r,a,o,1]);else{const e=h(l,[r,a,-1,1]),t=h(l,[r,a,1,1]),i=256*((n||0)/6370972+1),o=s.q(s.r([],e,t)),c=s.q(e),d=s.q(t),f=4*((4*c*d-(o-c-d)**2)/16)/o,p=(Math.sqrt(c-f)-Math.sqrt(Math.max(0,i*i-f)))/Math.sqrt(o);u=s.j([],e,t,p)}const[c,d,f]=this.unprojectPosition(u);return Number.isFinite(o)?[c,d,f]:Number.isFinite(n)?[c,d,n]:[c,d]}projectPosition(e){const[t,n,r=0]=e,i=t*u,o=n*u,a=Math.cos(o),s=256*(r/6370972+1);return[Math.sin(i)*a*s,-Math.cos(i)*a*s,Math.sin(o)*s]}unprojectPosition(e){const[t,n,r]=e,i=s.h(e),o=Math.asin(r/i);return[Math.atan2(t,-n)*c,o*c,6370972*(i/256-1)]}projectFlat(e){return e}unprojectFlat(e){return e}panByPosition(e,t){const n=this.unproject(t);return{longitude:e[0]-n[0]+this.longitude,latitude:e[1]-n[1]+this.latitude}}}function h(e,t){const n=l.n([],t,e);return l.k(n,n,1/n[3]),n}},function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(130),i=n(217),o=n(52),a=n(47),s=n(45);const l=(new i.a).lookAt({eye:[0,0,1]});function u({width:e,height:t,near:n,far:r,padding:a}){let s=-e/2,l=e/2,u=-t/2,c=t/2;if(a){const{left:n=0,right:r=0,top:i=0,bottom:d=0}=a,f=Object(o.a)((n+e-r)/2,0,e)-e/2,h=Object(o.a)((i+t-d)/2,0,t)-t/2;s-=f,l-=f,u+=h,c+=h}return(new i.a).ortho({left:s,right:l,bottom:u,top:c,near:n,far:r})}class c extends r.a{constructor(e){const{width:t,height:n,near:r=.1,far:i=1e3,zoom:o=0,target:a=[0,0,0],padding:s=null,flipY:c=!0}=e,d=Array.isArray(o)?o[0]:o,f=Array.isArray(o)?o[1]:o,h=Math.min(d,f),p=Math.pow(2,h);let A;if(d!==f){const e=Math.pow(2,d),t=Math.pow(2,f);A={unitsPerMeter:[e/p,t/p,1],metersPerUnit:[p/e,p/t,1]}}super({...e,longitude:void 0,position:a,viewMatrix:l.clone().scale([p,p*(c?-1:1),p]),projectionMatrix:u({width:t||1,height:n||1,padding:s,near:r,far:i}),zoom:h,distanceScales:A})}projectFlat([e,t]){const{unitsPerMeter:n}=this.distanceScales;return[e*n[0],t*n[1]]}unprojectFlat([e,t]){const{metersPerUnit:n}=this.distanceScales;return[e*n[0],t*n[1]]}panByPosition(e,t){const n=Object(a.pixelsToWorld)(t,this.pixelUnprojectionMatrix),r=this.projectFlat(e),i=s.a([],r,s.d([],n)),o=s.a([],this.center,i);return{target:this.unprojectFlat(o)}}}},function(e,t,n){"use strict";n.r(t),n.d(t,"name",(function(){return o})),n.d(t,"decode",(function(){return a}));var r=n(74),i=n(89);const o="EXT_structural_metadata";async function a(e,t){!function(e,t){var n,r;if(null===(n=t.gltf)||void 0===n||!n.loadBuffers)return;const i=e.getExtension("EXT_structural_metadata");if(!i)return;null!==(r=t.gltf)&&void 0!==r&&r.loadImages&&function(e,t){const n=t.propertyTextures,r=e.gltf.json;if(n&&r.meshes)for(const i of r.meshes)for(const r of i.primitives)l(e,n,r,t)}(e,i);!function(e,t){const n=t.schema;if(!n)return;const r=n.classes,i=t.propertyTables;if(r&&i)for(const t in r){const r=s(i,t);r&&c(e,n,r)}}(e,i)}(new r.a(e),t)}function s(e,t){for(const n of e)if(n.class===t)return n;return null}function l(e,t,n,r){var i;if(!t)return;const o=null===(i=n.extensions)||void 0===i?void 0:i.EXT_structural_metadata,a=null==o?void 0:o.propertyTextures;if(a)for(const i of a){u(e,t[i],n,r)}}function u(e,t,n,r){if(!t.properties)return;r.dataAttributeNames||(r.dataAttributeNames=[]);const o=t.class;for(const s in t.properties){var a;const l=`${o}_${s}`,u=null===(a=t.properties)||void 0===a?void 0:a[s];if(!u)continue;u.data||(u.data=[]);const c=u.data,d=Object(i.d)(e,u,n);null!==d&&(Object(i.h)(e,l,d,c,n),u.data=c,r.dataAttributeNames.push(l))}}function c(e,t,n){var r;const i=null===(r=t.classes)||void 0===r?void 0:r[n.class];if(!i)throw new Error("Incorrect data in the EXT_structural_metadata extension: no schema class with name "+n.class);const o=n.count;for(const r in i.properties){var a;const s=i.properties[r],l=null===(a=n.properties)||void 0===a?void 0:a[r];if(l){const n=d(e,t,s,o,l);l.data=n}}}function d(e,t,n,r,o){let a=[];const s=o.values,l=e.getTypedArrayForBufferView(s),u=function(e,t,n,r){if(t.array&&void 0===t.count&&void 0!==n.arrayOffsets)return Object(i.c)(e,n.arrayOffsets,n.arrayOffsetType||"UINT32",r);return null}(e,n,o,r),c=function(e,t,n){if(void 0!==t.stringOffsets)return Object(i.c)(e,t.stringOffsets,t.stringOffsetType||"UINT32",n);return null}(e,o,r);switch(n.type){case"SCALAR":case"VEC2":case"VEC3":case"VEC4":case"MAT2":case"MAT3":case"MAT4":a=function(e,t,n,r){const o=e.array,a=e.count,s=Object(i.b)(e.type,e.componentType),l=n.byteLength/s;let u;u=e.componentType?Object(i.a)(n,e.type,e.componentType,l):n;if(o)return r?Object(i.g)(u,t,r,n.length,s):a?Object(i.f)(u,t,a):[];return u}(n,r,l,u);break;case"BOOLEAN":throw new Error("Not implemented - classProperty.type="+n.type);case"STRING":a=Object(i.e)(r,l,u,c);break;case"ENUM":a=function(e,t,n,r,o){var a;const s=t.enumType;if(!s)throw new Error("Incorrect data in the EXT_structural_metadata extension: classProperty.enumType is not set for type ENUM");const l=null===(a=e.enums)||void 0===a?void 0:a[s];if(!l)throw new Error("Incorrect data in the EXT_structural_metadata extension: schema.enums does't contain "+s);const u=l.valueType||"UINT16",c=Object(i.b)(t.type,u),d=r.byteLength/c;let h=Object(i.a)(r,t.type,u,d);h||(h=r);if(t.array){if(o)return function(e){const{valuesData:t,numberOfElements:n,arrayOffsets:r,valuesDataBytesLength:i,elementSize:o,enumEntry:a}=e,s=[];for(let e=0;ei)break;const u=f(t,n/o,l/o,a);s.push(u)}return s}({valuesData:h,numberOfElements:n,arrayOffsets:o,valuesDataBytesLength:r.length,elementSize:c,enumEntry:l});const e=t.count;return e?function(e,t,n,r){const i=[];for(let o=0;o=a;--s)f.point(m[s],y[s]);f.lineEnd(),f.areaEnd()}g&&(m[o]=+e(h,o,i),y[o]=+n(h,o,i),f.point(t?+t(h,o,i):m[o],l?+l(h,o,i):y[o]))}if(p)return f=null,p+""||null}function p(){return Object(a.a)().defined(u).curve(d).context(c)}return h.x=function(n){return arguments.length?(e="function"==typeof n?n:Object(i.a)(+n),t=null,h):e},h.x0=function(t){return arguments.length?(e="function"==typeof t?t:Object(i.a)(+t),h):e},h.x1=function(e){return arguments.length?(t=null==e?null:"function"==typeof e?e:Object(i.a)(+e),h):t},h.y=function(e){return arguments.length?(n="function"==typeof e?e:Object(i.a)(+e),l=null,h):n},h.y0=function(e){return arguments.length?(n="function"==typeof e?e:Object(i.a)(+e),h):n},h.y1=function(e){return arguments.length?(l=null==e?null:"function"==typeof e?e:Object(i.a)(+e),h):l},h.lineX0=h.lineY0=function(){return p().x(e).y(n)},h.lineY1=function(){return p().x(e).y(l)},h.lineX1=function(){return p().x(t).y(n)},h.defined=function(e){return arguments.length?(u="function"==typeof e?e:Object(i.a)(!!e),h):u},h.curve=function(e){return arguments.length?(d=e,null!=c&&(f=d(c)),h):d},h.context=function(e){return arguments.length?(null==e?c=f=null:f=d(c=e),h):c},h}},function(e,t,n){"use strict";var r=n(207);t.a=function(e){return"string"==typeof e?new r.a([[document.querySelector(e)]],[document.documentElement]):new r.a([[e]],r.c)}},function(e,t,n){"use strict";function r(){return[]}t.a=function(e){return null==e?r:function(){return this.querySelectorAll(e)}}},function(e,t,n){"use strict";n.d(t,"b",(function(){return s}));var r=n(358);function i(e){return function(){this.style.removeProperty(e)}}function o(e,t,n){return function(){this.style.setProperty(e,t,n)}}function a(e,t,n){return function(){var r=t.apply(this,arguments);null==r?this.style.removeProperty(e):this.style.setProperty(e,r,n)}}function s(e,t){return e.style.getPropertyValue(t)||Object(r.a)(e).getComputedStyle(e,null).getPropertyValue(t)}t.a=function(e,t,n){return arguments.length>1?this.each((null==t?i:"function"==typeof t?a:o)(e,t,null==n?"":n)):s(this.node(),e)}},function(e,t,n){"use strict";var r=n(547);t.a=function(e,t){if(e=Object(r.a)(e),void 0===t&&(t=e.currentTarget),t){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var i=n.createSVGPoint();return i.x=e.clientX,i.y=e.clientY,[(i=i.matrixTransform(t.getScreenCTM().inverse())).x,i.y]}if(t.getBoundingClientRect){var o=t.getBoundingClientRect();return[e.clientX-o.left-t.clientLeft,e.clientY-o.top-t.clientTop]}}return[e.pageX,e.pageY]}},function(e,t,n){"use strict";n.d(t,"a",(function(){return K}));var r=n(1),i=n(39),o=n(520),a=n(133),s=n(52),l=n(203);class u extends l.a{get value(){return this._value}_onUpdate(){const{time:e,settings:{fromValue:t,toValue:n,duration:r,easing:i}}=this,o=i(e/r);this._value=Object(s.g)(t,n,o)}}function c(e,t,n,r,i){const o=t-e;return(n-t)*i+-o*r+o+t}function d(e,t){if(Array.isArray(e)){let n=0;for(let r=0;r0}add(e,t,n,r){const{transitions:i}=this;if(i.has(e)){const n=i.get(e),{value:r=n.settings.fromValue}=n;t=r,this.remove(e)}if(!(r=Object(a.e)(r)))return;const o=p[r.type];if(!o)return void h.a.error("unsupported transition type '".concat(r.type,"'"))();const s=new o(this.timeline);s.start({...r,fromValue:t,toValue:n}),i.set(e,s)}remove(e){const{transitions:t}=this;t.has(e)&&(t.get(e).cancel(),t.delete(e))}update(){const e={};for(const[t,n]of this.transitions)n.update(),e[t]=n.value,n.inProgress||this.remove(t);return e}clear(){for(const e of this.transitions.keys())this.remove(e)}}var g=n(422),m=n(50),y=n(506),v=n(92),b=n(17),_=n(85),w=n(186),x=n(507),M=n(432),E=n(187),O=n(150),S=n(318);const T={10241:9987,10240:9729,10242:33071,10243:33071},C={};var L=n(122);const P={boolean:{validate:(e,t)=>!0,equal:(e,t,n)=>Boolean(e)===Boolean(t)},number:{validate:(e,t)=>Number.isFinite(e)&&(!("max"in t)||e<=t.max)&&(!("min"in t)||e>=t.min)},color:{validate:(e,t)=>t.optional&&!e||k(e)&&(3===e.length||4===e.length),equal:(e,t,n)=>Object(L.a)(e,t,1)},accessor:{validate(e,t){const n=R(e);return"function"===n||n===R(t.value)},equal:(e,t,n)=>"function"==typeof t||Object(L.a)(e,t,1)},array:{validate:(e,t)=>t.optional&&!e||k(e),equal(e,t,n){const{compare:r}=n,i=Number.isInteger(r)?r:r?1:0;return r?Object(L.a)(e,t,i):e===t}},object:{equal(e,t,n){if(n.ignore)return!0;const{compare:r}=n,i=Number.isInteger(r)?r:r?1:0;return r?Object(L.a)(e,t,i):e===t}},function:{validate:(e,t)=>t.optional&&!e||"function"==typeof e,equal:(e,t,n)=>!n.compare&&!1!==n.ignore||e===t},data:{transform:(e,t,n)=>{const{dataTransform:r}=n.props;return r&&e?r(e):e}},image:{transform:(e,t,n)=>{const r=n.context;return r&&r.gl?function(e,t,n,r){if(n instanceof S.a)return n;n.constructor&&"Object"!==n.constructor.name&&(n={data:n});let i=null;n.compressed&&(i={10241:n.data.length>1?9985:9729});const o=new S.a(t,{...n,parameters:{...T,...i,...r}});return C[o.id]=e,o}(n.id,r.gl,e,{...t.parameters,...n.props.textureParameters}):null},release:(e,t,n)=>{var r,i;r=n.id,(i=e)&&i instanceof S.a&&C[i.id]===r&&(i.delete(),delete C[i.id])}}};function I(e,t){switch(R(t)){case"object":return D(e,t);case"array":return D(e,{type:"array",value:t,compare:!1});case"boolean":return D(e,{type:"boolean",value:t});case"number":return D(e,{type:"number",value:t});case"function":return D(e,{type:"function",value:t,compare:!0});default:return{name:e,type:"unknown",value:t}}}function D(e,t){return"type"in t?{name:e,...P[t.type],...t}:"value"in t?{name:e,type:R(t.value),...t}:{name:e,type:"object",value:t}}function k(e){return Array.isArray(e)||ArrayBuffer.isView(e)}function R(e){return k(e)?"array":null===e?"null":typeof e}function j(e,t){let n="_mergedDefaultProps";if(t)for(const e of t){const t=e.constructor;t&&(n+=":".concat(t.extensionName||t.name))}const r=B(e,n);return r||(e[n]=function(e,t){if(!e.prototype)return null;const n=j(Object.getPrototypeOf(e)),r=function(e){const t={},n={},r={};for(const[i,o]of Object.entries(e)){const e=null==o?void 0:o.deprecatedFor;if(e)r[i]=Array.isArray(e)?e:[e];else{const e=I(i,o);t[i]=e,n[i]=e.value}}return{propTypes:t,defaultProps:n,deprecatedProps:r}}(B(e,"defaultProps")||{}),i=Object.assign(Object.create(null),n,r.defaultProps),o=Object.assign(Object.create(null),null==n?void 0:n[m.g],r.propTypes),a=Object.assign(Object.create(null),null==n?void 0:n[m.e],r.deprecatedProps);for(const e of t){const t=j(e.constructor);t&&(Object.assign(i,t),Object.assign(o,t[m.g]),Object.assign(a,t[m.e]))}(function(e,t){const n=function(e){const t=e.componentName;t||h.a.warn("".concat(e.name,".componentName not specified"))();return t||e.name}(t);Object.defineProperties(e,{id:{writable:!0,value:n}})})(i,e),function(e,t){const n={},r={};for(const e in t){const i=t[e],{name:o,value:a}=i;i.async&&(n[o]=a,r[o]=F(o))}e[m.a]=n,e[m.b]={},Object.defineProperties(e,r)}(i,o),function(e,t){for(const n in t)Object.defineProperty(e,n,{enumerable:!1,set(e){const r="".concat(this.id,": ").concat(n);for(const r of t[n])N(this,r)||(this[r]=e);h.a.deprecated(r,t[n].join("/"))()}})}(i,a),i[m.g]=o,i[m.e]=a,0!==t.length||N(e,"_propTypes")||(e._propTypes=o);return i}(e,t||[]))}function F(e){return{enumerable:!0,set(t){"string"==typeof t||t instanceof Promise||Object(O.c)(t)?this[m.b][e]=t:this[m.c][e]=t},get(){if(this[m.c]){if(e in this[m.c]){return this[m.c][e]||this[m.a][e]}if(e in this[m.b]){const t=this[m.d]&&this[m.d].internalState;if(t&&t.hasAsyncProp(e))return t.getAsyncProp(e)||this[m.a][e]}}return this[m.a][e]}}}function N(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function B(e,t){return N(e,t)&&e[t]}let z=0;class U{constructor(...e){Object(r.a)(this,"id",void 0),Object(r.a)(this,"props",void 0),Object(r.a)(this,"count",void 0),this.props=function(e,t){let n;for(let e=t.length-1;e>=0;e--){const r=t[e];"extensions"in r&&(n=r.extensions)}const r=j(e.constructor,n),i=Object.create(r);i[m.d]=e,i[m.b]={},i[m.c]={};for(let e=0;e{},this.oldProps=null,this.oldAsyncProps=null}finalize(){for(const e in this.asyncProps){const t=this.asyncProps[e];t&&t.type&&t.type.release&&t.type.release(t.resolvedValue,t.type,this.component)}this.asyncProps={},this.component=null,this.resetOldProps()}getOldProps(){return this.oldAsyncProps||this.oldProps||H}resetOldProps(){this.oldAsyncProps=null,this.oldProps=this.component?this.component.props:null}hasAsyncProp(e){return e in this.asyncProps}getAsyncProp(e){const t=this.asyncProps[e];return t&&t.resolvedValue}isAsyncPropLoading(e){if(e){const t=this.asyncProps[e];return Boolean(t&&t.pendingLoadCount>0&&t.pendingLoadCount!==t.resolvedLoadCount)}for(const e in this.asyncProps)if(this.isAsyncPropLoading(e))return!0;return!1}reloadAsyncProp(e,t){this._watchPromise(e,Promise.resolve(t))}setAsyncProps(e){this.component=e[m.d]||this.component;const t=e[m.c]||{},n=e[m.b]||e,r=e[m.a]||{};for(const e in t){const n=t[e];this._createAsyncPropData(e,r[e]),this._updateAsyncProp(e,n),t[e]=this.getAsyncProp(e)}for(const e in n){const t=n[e];this._createAsyncPropData(e,r[e]),this._updateAsyncProp(e,t)}}_fetch(e,t){return null}_onResolve(e,t){}_onError(e,t){}_updateAsyncProp(e,t){this._didAsyncInputValueChange(e,t)&&("string"==typeof t&&(t=this._fetch(e,t)),t instanceof Promise?this._watchPromise(e,t):Object(O.c)(t)?this._resolveAsyncIterable(e,t):this._setPropValue(e,t))}_freezeAsyncOldProps(){if(!this.oldAsyncProps&&this.oldProps){this.oldAsyncProps=Object.create(this.oldProps);for(const e in this.asyncProps)Object.defineProperty(this.oldAsyncProps,e,{enumerable:!0,value:this.oldProps[e]})}}_didAsyncInputValueChange(e,t){const n=this.asyncProps[e];return t!==n.resolvedValue&&t!==n.lastValue&&(n.lastValue=t,!0)}_setPropValue(e,t){this._freezeAsyncOldProps();const n=this.asyncProps[e];n&&(t=this._postProcessValue(n,t),n.resolvedValue=t,n.pendingLoadCount++,n.resolvedLoadCount=n.pendingLoadCount)}_setAsyncPropValue(e,t,n){const r=this.asyncProps[e];r&&n>=r.resolvedLoadCount&&void 0!==t&&(this._freezeAsyncOldProps(),r.resolvedValue=t,r.resolvedLoadCount=n,this.onAsyncPropUpdated(e,t))}_watchPromise(e,t){const n=this.asyncProps[e];if(n){n.pendingLoadCount++;const r=n.pendingLoadCount;t.then(t=>{this.component&&(t=this._postProcessValue(n,t),this._setAsyncPropValue(e,t,r),this._onResolve(e,t))}).catch(t=>{this._onError(e,t)})}}async _resolveAsyncIterable(e,t){if("data"!==e)return void this._setPropValue(e,t);const n=this.asyncProps[e];if(!n)return;n.pendingLoadCount++;const r=n.pendingLoadCount;let i=[],o=0;for await(const n of t){if(!this.component)return;const{dataTransform:t}=this.component.props;i=t?t(n,i):i.concat(n),Object.defineProperty(i,"__diff",{enumerable:!1,value:[{startRow:o,endRow:i.length}]}),o=i.length,this._setAsyncPropValue(e,i,r)}this._onResolve(e,i)}_postProcessValue(e,t){const n=e.type;return n&&this.component&&(n.release&&n.release(e.resolvedValue,n,this.component),n.transform)?n.transform(t,n,this.component):t}_createAsyncPropData(e,t){if(!this.asyncProps[e]){const n=this.component&&this.component.props[m.g];this.asyncProps[e]={type:n&&n[e],lastValue:null,resolvedValue:t,pendingLoadCount:0,resolvedLoadCount:0}}}}{constructor({attributeManager:e,layer:t}){super(t),Object(r.a)(this,"attributeManager",void 0),Object(r.a)(this,"needsRedraw",void 0),Object(r.a)(this,"needsUpdate",void 0),Object(r.a)(this,"subLayers",void 0),Object(r.a)(this,"usesPickingColorCache",void 0),Object(r.a)(this,"hasPickingBuffer",void 0),Object(r.a)(this,"changeFlags",void 0),Object(r.a)(this,"viewport",void 0),Object(r.a)(this,"uniformTransitions",void 0),Object(r.a)(this,"propsInTransition",void 0),this.attributeManager=e,this.needsRedraw=!0,this.needsUpdate=!0,this.subLayers=null,this.usesPickingColorCache=!1}get layer(){return this.component}_fetch(e,t){const n=this.layer,r=null==n?void 0:n.props.fetch;return r?r(t,{propName:e,layer:n}):super._fetch(e,t)}_onResolve(e,t){const n=this.layer;if(n){const r=n.props.onDataLoad;"data"===e&&r&&r(t,{propName:e,layer:n})}}_onError(e,t){const n=this.layer;n&&n.raiseError(t,"loading ".concat(e," of ").concat(this.layer))}}var G=n(47),Y=n(871);const W=Object.freeze([]),q=Object(w.a)(({oldViewport:e,viewport:t})=>e.equals(t));let X=new Uint8ClampedArray(0);const Z={data:{type:"data",value:W,async:!0},dataComparator:{type:"function",value:null,optional:!0},_dataDiff:{type:"function",value:e=>e&&e.__diff,optional:!0},dataTransform:{type:"function",value:null,optional:!0},onDataLoad:{type:"function",value:null,optional:!0},onError:{type:"function",value:null,optional:!0},fetch:{type:"function",value:(e,{propName:t,layer:n,loaders:r,loadOptions:i,signal:o})=>{const{resourceManager:a}=n.context;var s;(i=i||n.getLoadOptions(),r=r||n.props.loaders,o)&&(i={...i,fetch:{...null===(s=i)||void 0===s?void 0:s.fetch,signal:o}});let l=a.contains(e);return l||i||(a.add({resourceId:e,data:Object(Y.a)(e,r),persistent:!1}),l=!0),l?a.subscribe({resourceId:e,onChange:e=>{var r;return null===(r=n.internalState)||void 0===r?void 0:r.reloadAsyncProp(t,e)},consumerId:n.id,requestId:t}):Object(Y.a)(e,r,i)}},updateTriggers:{},visible:!0,pickable:!1,opacity:{type:"number",min:0,max:1,value:1},operation:"draw",onHover:{type:"function",value:null,optional:!0},onClick:{type:"function",value:null,optional:!0},onDragStart:{type:"function",value:null,optional:!0},onDrag:{type:"function",value:null,optional:!0},onDragEnd:{type:"function",value:null,optional:!0},coordinateSystem:i.a.DEFAULT,coordinateOrigin:{type:"array",value:[0,0,0],compare:!0},modelMatrix:{type:"array",value:null,compare:!0,optional:!0},wrapLongitude:!1,positionFormat:"XYZ",colorFormat:"RGBA",parameters:{type:"object",value:{},optional:!0,compare:2},loadOptions:{type:"object",value:null,optional:!0,ignore:!0},transitions:null,extensions:[],loaders:{type:"array",value:[],optional:!0,ignore:!0},getPolygonOffset:{type:"function",value:({layerIndex:e})=>[0,100*-e]},highlightedObjectIndex:null,autoHighlight:!1,highlightColor:{type:"accessor",value:[0,0,128,128]}};class K extends U{constructor(...e){super(...e),Object(r.a)(this,"internalState",null),Object(r.a)(this,"lifecycle",m.f.NO_STATE),Object(r.a)(this,"context",void 0),Object(r.a)(this,"state",void 0),Object(r.a)(this,"parent",null)}static get componentName(){return Object.prototype.hasOwnProperty.call(this,"layerName")?this.layerName:""}get root(){let e=this;for(;e.parent;)e=e.parent;return e}toString(){const e=this.constructor.layerName||this.constructor.name;return"".concat(e,"({id: '").concat(this.props.id,"'})")}project(e){Object(_.a)(this.internalState);const t=this.internalState.viewport||this.context.viewport,n=Object(M.a)(e,{viewport:t,modelMatrix:this.props.modelMatrix,coordinateOrigin:this.props.coordinateOrigin,coordinateSystem:this.props.coordinateSystem}),[r,i,o]=Object(G.worldToPixels)(n,t.pixelProjectionMatrix);return 2===e.length?[r,i]:[r,i,o]}unproject(e){Object(_.a)(this.internalState);return(this.internalState.viewport||this.context.viewport).unproject(e)}projectPosition(e,t){Object(_.a)(this.internalState);const n=this.internalState.viewport||this.context.viewport;return Object(M.b)(e,{viewport:n,modelMatrix:this.props.modelMatrix,coordinateOrigin:this.props.coordinateOrigin,coordinateSystem:this.props.coordinateSystem,...t})}get isComposite(){return!1}setState(e){this.setChangeFlags({stateChanged:!0}),Object.assign(this.state,e),this.setNeedsRedraw()}setNeedsRedraw(){this.internalState&&(this.internalState.needsRedraw=!0)}setNeedsUpdate(){this.internalState&&(this.context.layerManager.setNeedsUpdate(String(this)),this.internalState.needsUpdate=!0)}get isLoaded(){return!!this.internalState&&!this.internalState.isAsyncPropLoading()}get wrapLongitude(){return this.props.wrapLongitude}isPickable(){return this.props.pickable&&this.props.visible}getModels(){return this.state&&(this.state.models||this.state.model&&[this.state.model])||[]}setModuleParameters(e){for(const t of this.getModels())t.updateModuleSettings(e)}getAttributeManager(){return this.internalState&&this.internalState.attributeManager}getCurrentLayer(){return this.internalState&&this.internalState.layer}getLoadOptions(){return this.props.loadOptions}use64bitPositions(){const{coordinateSystem:e}=this.props;return e===i.a.DEFAULT||e===i.a.LNGLAT||e===i.a.CARTESIAN}onHover(e,t){return this.props.onHover&&this.props.onHover(e,t)||!1}onClick(e,t){return this.props.onClick&&this.props.onClick(e,t)||!1}nullPickingColor(){return[0,0,0]}encodePickingColor(e,t=[]){return t[0]=e+1&255,t[1]=e+1>>8&255,t[2]=e+1>>8>>8&255,t}decodePickingColor(e){Object(_.a)(e instanceof Uint8Array);const[t,n,r]=e;return t+256*n+65536*r-1}getNumInstances(){return Number.isFinite(this.props.numInstances)?this.props.numInstances:this.state&&void 0!==this.state.numInstances?this.state.numInstances:Object(y.a)(this.props.data)}getStartIndices(){return this.props.startIndices?this.props.startIndices:this.state&&this.state.startIndices?this.state.startIndices:null}getBounds(){var e;return null===(e=this.getAttributeManager())||void 0===e?void 0:e.getBounds(["positions","instancePositions"])}getShaders(e){for(const t of this.props.extensions)e=Object(x.a)(e,t.getShaders.call(this,t));return e}shouldUpdateState(e){return e.changeFlags.propsOrDataChanged}updateState(e){const t=this.getAttributeManager(),{dataChanged:n}=e.changeFlags;if(n&&t)if(Array.isArray(n))for(const e of n)t.invalidateAll(e);else t.invalidateAll();if(t){const{props:n}=e,r=this.internalState.hasPickingBuffer,i=Number.isInteger(n.highlightedObjectIndex)||n.pickable||n.extensions.some(e=>e.getNeedsPickingBuffer.call(this,e));if(r!==i){this.internalState.hasPickingBuffer=i;const{pickingColors:e,instancePickingColors:n}=t.attributes,r=e||n;r&&(i&&r.constant&&(r.constant=!1,t.invalidate(r.id)),r.value||i||(r.constant=!0,r.value=[0,0,0]))}}}finalizeState(e){for(const e of this.getModels())e.delete();const t=this.getAttributeManager();t&&t.finalize(),this.context&&this.context.resourceManager.unsubscribe({consumerId:this.id}),this.internalState&&(this.internalState.uniformTransitions.clear(),this.internalState.finalize())}draw(e){for(const t of this.getModels())t.draw(e)}getPickingInfo({info:e,mode:t,sourceLayer:n}){const{index:r}=e;return r>=0&&Array.isArray(this.props.data)&&(e.object=this.props.data[r]),e}raiseError(e,t){var n,r,i,o;(t&&(e=new Error("".concat(t,": ").concat(e.message),{cause:e})),null!==(n=(r=this.props).onError)&&void 0!==n&&n.call(r,e))||(null===(i=this.context)||void 0===i||null===(o=i.onError)||void 0===o||o.call(i,e,this))}getNeedsRedraw(e={clearRedrawFlags:!1}){return this._getNeedsRedraw(e)}needsUpdate(){return!!this.internalState&&(this.internalState.needsUpdate||this.hasUniformTransition()||this.shouldUpdateState(this._getUpdateParams()))}hasUniformTransition(){var e;return(null===(e=this.internalState)||void 0===e?void 0:e.uniformTransitions.active)||!1}activateViewport(e){if(!this.internalState)return;const t=this.internalState.viewport;this.internalState.viewport=e,t&&q({oldViewport:t,viewport:e})||(this.setChangeFlags({viewportChanged:!0}),this.isComposite?this.needsUpdate()&&this.setNeedsUpdate():this._update())}invalidateAttribute(e="all"){const t=this.getAttributeManager();t&&("all"===e?t.invalidateAll():t.invalidate(e))}updateAttributes(e){for(const t of this.getModels())this._setModelAttributes(t,e)}_updateAttributes(){const e=this.getAttributeManager();if(!e)return;const t=this.props,n=this.getNumInstances(),r=this.getStartIndices();e.update({data:t.data,numInstances:n,startIndices:r,props:t,transitions:t.transitions,buffers:t.data.attributes,context:this});const i=e.getChangedAttributes({clearChangedFlags:!0});this.updateAttributes(i)}_updateAttributeTransition(){const e=this.getAttributeManager();e&&e.updateTransition()}_updateUniformTransition(){const{uniformTransitions:e}=this.internalState;if(e.active){const t=e.update(),n=Object.create(this.props);for(const e in t)Object.defineProperty(n,e,{value:t[e]});return n}return this.props}calculateInstancePickingColors(e,{numInstances:t}){if(e.constant)return;const n=Math.floor(X.length/3);if(this.internalState.usesPickingColorCache=!0,n2**24-1&&h.a.warn("Layer has too many data objects. Picking might not be able to distinguish all objects.")(),X=E.a.allocate(X,t,{size:3,copy:!0,maxCount:Math.max(t,2**24-1)});const e=Math.floor(X.length/3),r=[];for(let t=n;t(h.a.deprecated("layer.state.attributeManager","layer.getAttributeManager()")(),e)}),this.internalState.uniformTransitions=new A(this.context.timeline),this.internalState.onAsyncPropUpdated=this._onAsyncPropUpdated.bind(this),this.internalState.setAsyncProps(this.props),this.initializeState(this.context);for(const e of this.props.extensions)e.initializeState.call(this,this.context,e);this.setChangeFlags({dataChanged:"init",propsChanged:"init",viewportChanged:!0,extensionsChanged:!0}),this._update()}_transferState(e){Object(v.a)("layer.matched",this,this===e);const{state:t,internalState:n}=e;this!==e&&(this.internalState=n,this.state=t,this.internalState.setAsyncProps(this.props),this._diffProps(this.props,this.internalState.getOldProps()))}_update(){const e=this.needsUpdate();if(Object(v.a)("layer.update",this,e),!e)return;const t=this.props,n=this.context,r=this.internalState,i=n.viewport,o=this._updateUniformTransition();r.propsInTransition=o,n.viewport=r.viewport||i,this.props=o;try{const e=this._getUpdateParams(),o=this.getModels();if(n.gl)this.updateState(e);else try{this.updateState(e)}catch(e){}for(const t of this.props.extensions)t.updateState.call(this,e,t);const a=this.getModels()[0]!==o[0];this._postUpdate(e,a)}finally{n.viewport=i,this.props=t,this._clearChangeFlags(),r.needsUpdate=!1,r.resetOldProps()}}_finalize(){Object(v.a)("layer.finalize",this),this.finalizeState(this.context);for(const e of this.props.extensions)e.finalizeState.call(this,this.context,e)}_drawLayer({moduleParameters:e=null,uniforms:t={},parameters:n={}}){this._updateAttributeTransition();const r=this.props,i=this.context;this.props=this.internalState.propsInTransition||r;const o=this.props.opacity;t.opacity=Math.pow(o,1/2.2);try{e&&this.setModuleParameters(e);const{getPolygonOffset:o}=this.props,a=o&&o(t)||[0,0];Object(b.n)(i.gl,{polygonOffset:a}),Object(b.o)(i.gl,n,()=>{const r={moduleParameters:e,uniforms:t,parameters:n,context:i};for(const e of this.props.extensions)e.draw.call(this,r,e);this.draw(r)})}finally{this.props=r}}getChangeFlags(){var e;return null===(e=this.internalState)||void 0===e?void 0:e.changeFlags}setChangeFlags(e){if(!this.internalState)return;const{changeFlags:t}=this.internalState;for(const n in e)if(e[n]){let r=!1;switch(n){case"dataChanged":const i=e[n],o=t[n];i&&Array.isArray(o)&&(t.dataChanged=Array.isArray(i)?o.concat(i):i,r=!0);default:t[n]||(t[n]=e[n],r=!0)}r&&Object(v.a)("layer.changeFlag",this,n,e)}const n=Boolean(t.dataChanged||t.updateTriggersChanged||t.propsChanged||t.extensionsChanged);t.propsOrDataChanged=n,t.somethingChanged=n||t.viewportChanged||t.stateChanged}_clearChangeFlags(){this.internalState.changeFlags={dataChanged:!1,propsChanged:!1,updateTriggersChanged:!1,viewportChanged:!1,stateChanged:!1,extensionsChanged:!1,propsOrDataChanged:!1,somethingChanged:!1}}_diffProps(e,t){const n=Object(g.b)(e,t);if(n.updateTriggersChanged)for(const e in n.updateTriggersChanged)n.updateTriggersChanged[e]&&this.invalidateAttribute(e);if(n.transitionsChanged)for(const i in n.transitionsChanged){var r;this.internalState.uniformTransitions.add(i,t[i],e[i],null===(r=e.transitions)||void 0===r?void 0:r[i])}return this.setChangeFlags(n)}validateProps(){Object(g.c)(this.props)}updateAutoHighlight(e){this.props.autoHighlight&&!Number.isInteger(this.props.highlightedObjectIndex)&&this._updateAutoHighlight(e)}_updateAutoHighlight(e){const t={pickingSelectedColor:e.picked?e.color:null},{highlightColor:n}=this.props;e.picked&&"function"==typeof n&&(t.pickingHighlightColor=n(e)),this.setModuleParameters(t),this.setNeedsRedraw()}_getAttributeManager(){const e=this.context;return new o.a(e.gl,{id:this.props.id,stats:e.stats,timeline:e.timeline})}_postUpdate(e,t){const{props:n,oldProps:r}=e;this.setNeedsRedraw(),this._updateAttributes();const{model:i}=this.state;null==i||i.setInstanceCount(this.getNumInstances());const{autoHighlight:o,highlightedObjectIndex:a,highlightColor:s}=n;if(t||r.autoHighlight!==o||r.highlightedObjectIndex!==a||r.highlightColor!==s){const e={};o||(e.pickingSelectedColor=null),Array.isArray(s)&&(e.pickingHighlightColor=s),(t||a!==r.highlightedObjectIndex)&&(e.pickingSelectedColor=Number.isFinite(a)&&a>=0?this.encodePickingColor(a):null),this.setModuleParameters(e)}}_getUpdateParams(){return{props:this.props,oldProps:this.internalState.getOldProps(),context:this.context,changeFlags:this.internalState.changeFlags}}_getNeedsRedraw(e){if(!this.internalState)return!1;let t=!1;t=t||this.internalState.needsRedraw&&this.id;const n=this.getAttributeManager(),r=!!n&&n.getNeedsRedraw(e);if(t=t||r,t)for(const e of this.props.extensions)e.onNeedsRedraw.call(this,e);return this.internalState.needsRedraw=this.internalState.needsRedraw&&!e.clearRedrawFlags,t}_onAsyncPropUpdated(){this._diffProps(this.props,this.internalState.getOldProps()),this.setNeedsUpdate()}}Object(r.a)(K,"defaultProps",Z),Object(r.a)(K,"layerName","Layer")},function(e,t,n){"use strict";n.d(t,"a",(function(){return C}));var r=n(1),i=n(1163),o=n(554),a=n(96);class s{constructor(e,t){Object(r.a)(this,"opts",void 0),Object(r.a)(this,"source",void 0),this.opts=t,this.source=e}get value(){return this.source.value}getValue(){const e=this.source.getBuffer(),t=this.getAccessor();if(e)return[e,t];const{value:n}=this.source,{size:r}=t;let i=n;if(n&&n.length!==r){i=new Float32Array(r);const e=t.elementOffset||0;for(let t=0;t=i){const n=new Array(r).fill(1/0),o=new Array(r).fill(-1/0);for(let e=0;eo[i]&&(o[i]=r)}e=[n,o]}}return this.state.bounds=e,e}setData(e){const{state:t}=this;let n;n=ArrayBuffer.isView(e)?{value:e}:e instanceof a.a?{buffer:e}:e;const r={...this.settings,...n};if(t.bufferAccessor=r,t.bounds=null,n.constant){let e=n.value;e=this._normalizeValue(e,[],0),this.settings.normalized&&(e=this.normalizeConstant(e));if(!(!t.constant||!this._areValuesEqual(e,this.value)))return!1;t.externalBuffer=null,t.constant=!0,this.value=e}else if(n.buffer){const e=n.buffer;t.externalBuffer=e,t.constant=!1,this.value=n.value||null;const i=n.value instanceof Float64Array;r.type=n.type||e.accessor.type,r.bytesPerElement=e.accessor.BYTES_PER_ELEMENT*(i?2:1),r.stride=d(r)}else if(n.value){this._checkExternalBuffer(n);let e=n.value;t.externalBuffer=null,t.constant=!1,this.value=e,r.bytesPerElement=e.BYTES_PER_ELEMENT,r.stride=d(r);const{buffer:i,byteOffset:o}=this;this.doublePrecision&&e instanceof Float64Array&&(e=Object(u.g)(e,r));const a=e.byteLength+o+2*r.stride;i.byteLength(e+128)/255*2-1);case 5122:return new Float32Array(e).map(e=>(e+32768)/65535*2-1);case 5121:return new Float32Array(e).map(e=>e/255);case 5123:return new Float32Array(e).map(e=>e/65535);default:return e}}_normalizeValue(e,t,n){const{defaultValue:r,size:i}=this.settings;if(Number.isFinite(e))return t[n]=e,t;if(!e){let e=i;for(;--e>=0;)t[n+e]=r[e];return t}switch(i){case 4:t[n+3]=Number.isFinite(e[3])?e[3]:r[3];case 3:t[n+2]=Number.isFinite(e[2])?e[2]:r[2];case 2:t[n+1]=Number.isFinite(e[1])?e[1]:r[1];case 1:t[n+0]=Number.isFinite(e[0])?e[0]:r[0];break;default:let o=i;for(;--o>=0;)t[n+o]=Number.isFinite(e[o])?e[o]:r[o]}return t}_areValuesEqual(e,t){if(!e||!t)return!1;const{size:n}=this;for(let r=0;re[t])]:e[t];return Object(y.e)(r,n)}setNeedsUpdate(e=this.id,t){if(this.state.needsUpdate=this.state.needsUpdate||e,this.setNeedsRedraw(e),t){const{startRow:e=0,endRow:n=1/0}=t;this.state.updateRanges=function(e,t){if(e===m)return e;if(t[0]<0&&(t[0]=0),t[0]>=t[1])return e;const n=[],r=e.length;let i=0;for(let o=0;ot[1]?n.push(r):t=[Math.min(r[0],t[0]),Math.max(r[1],t[1])]}return n.splice(i,0,t),n}(this.state.updateRanges,[e,n])}else this.state.updateRanges=m}clearNeedsUpdate(){this.state.needsUpdate=!1,this.state.updateRanges=g}setNeedsRedraw(e=this.id){this.state.needsRedraw=this.state.needsRedraw||e}allocate(e){const{state:t,settings:n}=this;return!n.noAlloc&&(!!n.update&&(super.allocate(e,t.updateRanges!==m),!0))}updateBuffer({numInstances:e,data:t,props:n,context:r}){if(!this.needsUpdate())return!1;const{state:{updateRanges:i},settings:{update:o,noAlloc:a}}=this;let s=!0;if(o){for(const[a,s]of i)o.call(r,this,{data:t,startRow:a,endRow:s,props:n,numInstances:e});if(this.value)if(this.constant||this.buffer.byteLengthu?l.set(n,m):(e._normalizeValue(n,v.target,0),Object(A.a)({target:l,source:v.target,start:m,count:t}));m+=t*u}else e._normalizeValue(n,l,m),m+=u}}_validateAttributeUpdaters(){const{settings:e}=this;if(!(e.noAlloc||"function"==typeof e.update))throw new Error("Attribute ".concat(this.id," missing update or accessor"))}_checkAttributeArray(){const{value:e}=this,t=Math.min(4,this.size);if(e&&e.length>=t){let n=!0;switch(t){case 4:n=n&&Number.isFinite(e[3]);case 3:n=n&&Number.isFinite(e[2]);case 2:n=n&&Number.isFinite(e[1]);case 1:n=n&&Number.isFinite(e[0]);break;default:n=!1}if(!n)throw new Error("Illegal attribute generated for ".concat(this.id))}}}var b=n(186),_=n(92),w=n(1845),x=n(203);var M=n(677),E=n(318),O=n(202);const S={interpolation:class{constructor({gl:e,attribute:t,timeline:n}){Object(r.a)(this,"gl",void 0),Object(r.a)(this,"type","interpolation"),Object(r.a)(this,"attributeInTransition",void 0),Object(r.a)(this,"settings",void 0),Object(r.a)(this,"attribute",void 0),Object(r.a)(this,"transition",void 0),Object(r.a)(this,"currentStartIndices",void 0),Object(r.a)(this,"currentLength",void 0),Object(r.a)(this,"transform",void 0),Object(r.a)(this,"buffers",void 0),this.gl=e,this.transition=new x.a(n),this.attribute=t,this.attributeInTransition=new v(e,t.settings),this.currentStartIndices=t.startIndices,this.currentLength=0,this.transform=function(e,t){const n=Object(y.c)(t.size);return new w.a(e,{vs:"\n#define SHADER_NAME interpolation-transition-vertex-shader\n\nuniform float time;\nattribute ATTRIBUTE_TYPE aFrom;\nattribute ATTRIBUTE_TYPE aTo;\nvarying ATTRIBUTE_TYPE vCurrent;\n\nvoid main(void) {\n vCurrent = mix(aFrom, aTo, time);\n gl_Position = vec4(0.0);\n}\n",defines:{ATTRIBUTE_TYPE:n},varyings:["vCurrent"]})}(e,t);const i={byteLength:0,usage:35050};this.buffers=[new a.a(e,i),new a.a(e,i)]}get inProgress(){return this.transition.inProgress}start(e,t){if(e.duration<=0)return void this.transition.cancel();this.settings=e;const{gl:n,buffers:r,attribute:i}=this;Object(y.a)(r);const o={numInstances:t,attribute:i,fromLength:this.currentLength,fromStartIndices:this.currentStartIndices,getData:e.enter};for(const e of r)Object(y.f)({buffer:e,...o});this.currentStartIndices=i.startIndices,this.currentLength=Object(y.b)(i,t),this.attributeInTransition.setData({buffer:r[1],value:i.value}),this.transition.start(e),this.transform.update({elementCount:Math.floor(this.currentLength/i.size),sourceBuffers:{aFrom:r[0],aTo:Object(y.d)(n,i)},feedbackBuffers:{vCurrent:r[1]}})}update(){const e=this.transition.update();if(e){const{duration:e,easing:t}=this.settings,{time:n}=this.transition;let r=n/e;t&&(r=t(r)),this.transform.run({uniforms:{time:r}})}return e}cancel(){this.transition.cancel(),this.transform.delete();for(const e of this.buffers)e.delete();this.buffers.length=0}},spring:class{constructor({gl:e,attribute:t,timeline:n}){Object(r.a)(this,"gl",void 0),Object(r.a)(this,"type","spring"),Object(r.a)(this,"attributeInTransition",void 0),Object(r.a)(this,"settings",void 0),Object(r.a)(this,"attribute",void 0),Object(r.a)(this,"transition",void 0),Object(r.a)(this,"currentStartIndices",void 0),Object(r.a)(this,"currentLength",void 0),Object(r.a)(this,"texture",void 0),Object(r.a)(this,"framebuffer",void 0),Object(r.a)(this,"transform",void 0),Object(r.a)(this,"buffers",void 0),this.gl=e,this.type="spring",this.transition=new x.a(n),this.attribute=t,this.attributeInTransition=new v(e,{...t.settings,normalized:!1}),this.currentStartIndices=t.startIndices,this.currentLength=0,this.texture=function(e){return new E.a(e,{data:new Uint8Array(4),format:6408,type:5121,border:0,mipmaps:!1,dataFormat:6408,width:1,height:1})}(e),this.framebuffer=function(e,t){return new O.a(e,{id:"spring-transition-is-transitioning-framebuffer",width:1,height:1,attachments:{36064:t}})}(e,this.texture),this.transform=function(e,t,n){const r=Object(y.c)(t.size);return new w.a(e,{framebuffer:n,vs:"\n#define SHADER_NAME spring-transition-vertex-shader\n\n#define EPSILON 0.00001\n\nuniform float stiffness;\nuniform float damping;\nattribute ATTRIBUTE_TYPE aPrev;\nattribute ATTRIBUTE_TYPE aCur;\nattribute ATTRIBUTE_TYPE aTo;\nvarying ATTRIBUTE_TYPE vNext;\nvarying float vIsTransitioningFlag;\n\nATTRIBUTE_TYPE getNextValue(ATTRIBUTE_TYPE cur, ATTRIBUTE_TYPE prev, ATTRIBUTE_TYPE dest) {\n ATTRIBUTE_TYPE velocity = cur - prev;\n ATTRIBUTE_TYPE delta = dest - cur;\n ATTRIBUTE_TYPE spring = delta * stiffness;\n ATTRIBUTE_TYPE damper = velocity * -1.0 * damping;\n return spring + damper + velocity + cur;\n}\n\nvoid main(void) {\n bool isTransitioning = length(aCur - aPrev) > EPSILON || length(aTo - aCur) > EPSILON;\n vIsTransitioningFlag = isTransitioning ? 1.0 : 0.0;\n\n vNext = getNextValue(aCur, aPrev, aTo);\n gl_Position = vec4(0, 0, 0, 1);\n gl_PointSize = 100.0;\n}\n",fs:"\n#define SHADER_NAME spring-transition-is-transitioning-fragment-shader\n\nvarying float vIsTransitioningFlag;\n\nvoid main(void) {\n if (vIsTransitioningFlag == 0.0) {\n discard;\n }\n gl_FragColor = vec4(1.0);\n}",defines:{ATTRIBUTE_TYPE:r},varyings:["vNext"]})}(e,t,this.framebuffer);const i={byteLength:0,usage:35050};this.buffers=[new a.a(e,i),new a.a(e,i),new a.a(e,i)]}get inProgress(){return this.transition.inProgress}start(e,t){const{gl:n,buffers:r,attribute:i}=this,o={numInstances:t,attribute:i,fromLength:this.currentLength,fromStartIndices:this.currentStartIndices,getData:e.enter};for(const e of r)Object(y.f)({buffer:e,...o});this.settings=e,this.currentStartIndices=i.startIndices,this.currentLength=Object(y.b)(i,t),this.attributeInTransition.setData({buffer:r[1],value:i.value}),this.transition.start({...e,duration:1/0}),this.transform.update({elementCount:Math.floor(this.currentLength/i.size),sourceBuffers:{aTo:Object(y.d)(n,i)}})}update(){const{buffers:e,transform:t,framebuffer:n,transition:r}=this;if(!r.update())return!1;const i=this.settings;t.update({sourceBuffers:{aPrev:e[0],aCur:e[1]},feedbackBuffers:{vNext:e[2]}}),t.run({framebuffer:n,discard:!1,clearRenderTarget:!0,uniforms:{stiffness:i.stiffness,damping:i.damping},parameters:{depthTest:!1,blend:!0,viewport:[0,0,1,1],blendFunc:[1,1],blendEquation:[32776,32776]}}),Object(y.a)(e),this.attributeInTransition.setData({buffer:e[1],value:this.attribute.value});return Object(M.c)(n)[0]>0||r.end(),!0}cancel(){this.transition.cancel(),this.transform.delete();for(const e of this.buffers)e.delete();this.buffers.length=0,this.texture.delete(),this.framebuffer.delete()}}};class T{constructor(e,{id:t,timeline:n}){Object(r.a)(this,"id",void 0),Object(r.a)(this,"isSupported",void 0),Object(r.a)(this,"gl",void 0),Object(r.a)(this,"timeline",void 0),Object(r.a)(this,"transitions",void 0),Object(r.a)(this,"needsRedraw",void 0),Object(r.a)(this,"numInstances",void 0),this.id=t,this.gl=e,this.timeline=n,this.transitions={},this.needsRedraw=!1,this.numInstances=1,this.isSupported=w.a.isSupported(e)}finalize(){for(const e in this.transitions)this._removeTransition(e)}update({attributes:e,transitions:t,numInstances:n}){this.numInstances=n||1;for(const n in e){const r=e[n],i=r.getTransitionSetting(t);i&&this._updateAttribute(n,r,i)}for(const n in this.transitions){const r=e[n];r&&r.getTransitionSetting(t)||this._removeTransition(n)}}hasAttribute(e){const t=this.transitions[e];return t&&t.inProgress}getAttributes(){const e={};for(const t in this.transitions){const n=this.transitions[t];n.inProgress&&(e[t]=n.attributeInTransition)}return e}run(){if(!this.isSupported||0===this.numInstances)return!1;for(const e in this.transitions){this.transitions[e].update()&&(this.needsRedraw=!0)}const e=this.needsRedraw;return this.needsRedraw=!1,e}_removeTransition(e){this.transitions[e].cancel(),delete this.transitions[e]}_updateAttribute(e,t,n){const r=this.transitions[e];let i=!r||r.type!==n.type;if(i){if(!this.isSupported)return void c.a.warn("WebGL2 not supported by this browser. Transition for ".concat(e," is disabled."))();r&&this._removeTransition(e);const o=S[n.type];o?this.transitions[e]=new o({attribute:t,timeline:this.timeline,gl:this.gl}):(c.a.error("unsupported transition type '".concat(n.type,"'"))(),i=!1)}(i||t.needsRedraw())&&(this.needsRedraw=!0,this.transitions[e].start(n,this.numInstances))}}class C{constructor(e,{id:t="attribute-manager",stats:n,timeline:i}={}){Object(r.a)(this,"id",void 0),Object(r.a)(this,"gl",void 0),Object(r.a)(this,"attributes",void 0),Object(r.a)(this,"updateTriggers",void 0),Object(r.a)(this,"needsRedraw",void 0),Object(r.a)(this,"userData",void 0),Object(r.a)(this,"stats",void 0),Object(r.a)(this,"attributeTransitionManager",void 0),Object(r.a)(this,"mergeBoundsMemoized",Object(b.a)(u.e)),this.id=t,this.gl=e,this.attributes={},this.updateTriggers={},this.needsRedraw=!0,this.userData={},this.stats=n,this.attributeTransitionManager=new T(e,{id:"".concat(t,"-transitions"),timeline:i}),Object.seal(this)}finalize(){for(const e in this.attributes)this.attributes[e].delete();this.attributeTransitionManager.finalize()}getNeedsRedraw(e={clearRedrawFlags:!1}){const t=this.needsRedraw;return this.needsRedraw=this.needsRedraw&&!e.clearRedrawFlags,t&&this.id}setNeedsRedraw(){this.needsRedraw=!0}add(e){this._add(e)}addInstanced(e){this._add(e,{instanced:1})}remove(e){for(const t of e)void 0!==this.attributes[t]&&(this.attributes[t].delete(),delete this.attributes[t])}invalidate(e,t){const n=this._invalidateTrigger(e,t);Object(_.a)("attributeManager.invalidate",this,e,n)}invalidateAll(e){for(const t in this.attributes)this.attributes[t].setNeedsUpdate(t,e);Object(_.a)("attributeManager.invalidate",this,"all")}update({data:e,numInstances:t,startIndices:n=null,transitions:r,props:i={},buffers:o={},context:a={}}){let s=!1;Object(_.a)("attributeManager.updateStart",this),this.stats&&this.stats.get("Update Attributes").timeStart();for(const r in this.attributes){const l=this.attributes[r],u=l.settings.accessor;l.startIndices=n,l.numInstances=t,i[r]&&c.a.removed("props.".concat(r),"data.attributes.".concat(r))(),l.setExternalBuffer(o[r])||l.setBinaryValue("string"==typeof u?o[u]:void 0,e.startIndices)||"string"==typeof u&&!o[u]&&l.setConstantValue(i[u])||l.needsUpdate()&&(s=!0,this._updateAttribute({attribute:l,numInstances:t,data:e,props:i,context:a})),this.needsRedraw=this.needsRedraw||l.needsRedraw()}s&&Object(_.a)("attributeManager.updateEnd",this,t),this.stats&&this.stats.get("Update Attributes").timeEnd(),this.attributeTransitionManager.update({attributes:this.attributes,numInstances:t,transitions:r})}updateTransition(){const{attributeTransitionManager:e}=this,t=e.run();return this.needsRedraw=this.needsRedraw||t,t}getAttributes(){return this.attributes}getBounds(e){const t=e.map(e=>{var t;return null===(t=this.attributes[e])||void 0===t?void 0:t.getBounds()});return this.mergeBoundsMemoized(t)}getChangedAttributes(e={clearChangedFlags:!1}){const{attributes:t,attributeTransitionManager:n}=this,r={...n.getAttributes()};for(const i in t){const o=t[i];o.needsRedraw(e)&&!n.hasAttribute(i)&&(r[i]=o)}return r}getShaderAttributes(e,t={}){e||(e=this.getAttributes());const n={};for(const r in e)t[r]||Object.assign(n,e[r].getShaderAttributes());return n}_add(e,t={}){for(const n in e){const r=e[n];this.attributes[n]=this._createAttribute(n,r,t)}this._mapUpdateTriggersToAttributes()}_createAttribute(e,t,n){const r={...t,id:e,size:(t.isIndexed?1:t.size)||1,divisor:n.instanced?1:t.divisor||0};return new v(this.gl,r)}_mapUpdateTriggersToAttributes(){const e={};for(const t in this.attributes){this.attributes[t].getUpdateTriggers().forEach(n=>{e[n]||(e[n]=[]),e[n].push(t)})}this.updateTriggers=e}_invalidateTrigger(e,t){const{attributes:n,updateTriggers:r}=this,i=r[e];return i&&i.forEach(e=>{const r=n[e];r&&r.setNeedsUpdate(r.id,t)}),i}_updateAttribute(e){const{attribute:t,numInstances:n}=e;if(Object(_.a)("attribute.updateStart",t),t.constant)return void t.setConstantValue(t.value);t.allocate(n)&&Object(_.a)("attribute.allocate",t,n);t.updateBuffer(e)&&(this.needsRedraw=!0,Object(_.a)("attribute.updateEnd",t,n))}}},function(e,t,n){"use strict";var r,i=n(205),o=n(303),a=n(232),s=function(e,t){var n=Object(a.b)(e,t);if(!n)return e+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")},l={"%":(e,t)=>(100*e).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:a.a,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>s(100*e,t),r:s,s:function(e,t){var n=Object(a.b)(e,t);if(!n)return e+"";var i=n[0],o=n[1],s=o-(r=3*Math.max(-8,Math.min(8,Math.floor(o/3))))+1,l=i.length;return s===l?i:s>l?i+new Array(s-l+1).join("0"):s>0?i.slice(0,s)+"."+i.slice(s):"0."+new Array(1-s).join("0")+Object(a.b)(e,Math.max(0,t+s-1))[0]},X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)},u=function(e){return e},c=Array.prototype.map,d=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];t.a=function(e){var t,n,a=void 0===e.grouping||void 0===e.thousands?u:(t=c.call(e.grouping,Number),n=e.thousands+"",function(e,r){for(var i=e.length,o=[],a=0,s=t[0],l=0;i>0&&s>0&&(l+s+1>r&&(s=Math.max(1,r-l)),o.push(e.substring(i-=s,i+s)),!((l+=s+1)>r));)s=t[a=(a+1)%t.length];return o.reverse().join(n)}),s=void 0===e.currency?"":e.currency[0]+"",f=void 0===e.currency?"":e.currency[1]+"",h=void 0===e.decimal?".":e.decimal+"",p=void 0===e.numerals?u:function(e){return function(t){return t.replace(/[0-9]/g,(function(t){return e[+t]}))}}(c.call(e.numerals,String)),A=void 0===e.percent?"%":e.percent+"",g=void 0===e.minus?"−":e.minus+"",m=void 0===e.nan?"NaN":e.nan+"";function y(e){var t=(e=Object(o.b)(e)).fill,n=e.align,i=e.sign,u=e.symbol,c=e.zero,y=e.width,v=e.comma,b=e.precision,_=e.trim,w=e.type;"n"===w?(v=!0,w="g"):l[w]||(void 0===b&&(b=12),_=!0,w="g"),(c||"0"===t&&"="===n)&&(c=!0,t="0",n="=");var x="$"===u?s:"#"===u&&/[boxX]/.test(w)?"0"+w.toLowerCase():"",M="$"===u?f:/[%p]/.test(w)?A:"",E=l[w],O=/[defgprs%]/.test(w);function S(e){var o,s,l,u=x,f=M;if("c"===w)f=E(e)+f,e="";else{var A=(e=+e)<0||1/e<0;if(e=isNaN(e)?m:E(Math.abs(e),b),_&&(e=function(e){e:for(var t,n=e.length,r=1,i=-1;r0&&(i=0)}return i>0?e.slice(0,i)+e.slice(t+1):e}(e)),A&&0==+e&&"+"!==i&&(A=!1),u=(A?"("===i?i:g:"-"===i||"("===i?"":i)+u,f=("s"===w?d[8+r/3]:"")+f+(A&&"("===i?")":""),O)for(o=-1,s=e.length;++o(l=e.charCodeAt(o))||l>57){f=(46===l?h+e.slice(o+1):e.slice(o))+f,e=e.slice(0,o);break}}v&&!c&&(e=a(e,1/0));var S=u.length+e.length+f.length,T=S>1)+u+e+f+T.slice(S);break;default:e=T+u+e+f}return p(e)}return b=void 0===b?6:/[gprs]/.test(w)?Math.max(1,Math.min(21,b)):Math.max(0,Math.min(20,b)),S.toString=function(){return e+""},S}return{format:y,formatPrefix:function(e,t){var n=y(((e=Object(o.b)(e)).type="f",e)),r=3*Math.max(-8,Math.min(8,Math.floor(Object(i.a)(t)/3))),a=Math.pow(10,-r),s=d[8+r/3];return function(e){return n(a*e)+s}}}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return T}));var r=n(1),i=n(665),o=n(54),a=n(150),s=n(531);const l=1e20;class u{constructor({fontSize:e=24,buffer:t=3,radius:n=8,cutoff:r=.25,fontFamily:i="sans-serif",fontWeight:o="normal",fontStyle:a="normal"}={}){this.buffer=t,this.cutoff=r,this.radius=n;const s=this.size=e+4*t,l=this._createCanvas(s),u=this.ctx=l.getContext("2d",{willReadFrequently:!0});u.font=`${a} ${o} ${e}px ${i}`,u.textBaseline="alphabetic",u.textAlign="left",u.fillStyle="black",this.gridOuter=new Float64Array(s*s),this.gridInner=new Float64Array(s*s),this.f=new Float64Array(s),this.z=new Float64Array(s+1),this.v=new Uint16Array(s)}_createCanvas(e){const t=document.createElement("canvas");return t.width=t.height=e,t}draw(e){const{width:t,actualBoundingBoxAscent:n,actualBoundingBoxDescent:r,actualBoundingBoxLeft:i,actualBoundingBoxRight:o}=this.ctx.measureText(e),a=Math.ceil(n),s=Math.max(0,Math.min(this.size-this.buffer,Math.ceil(o-i))),u=Math.min(this.size-this.buffer,a+Math.ceil(r)),d=s+2*this.buffer,f=u+2*this.buffer,h=Math.max(d*f,0),p=new Uint8ClampedArray(h),A={data:p,width:d,height:f,glyphWidth:s,glyphHeight:u,glyphTop:a,glyphLeft:0,glyphAdvance:t};if(0===s||0===u)return A;const{ctx:g,buffer:m,gridInner:y,gridOuter:v}=this;g.clearRect(m,m,s,u),g.fillText(e,m,m+a);const b=g.getImageData(m,m,s,u);v.fill(l,0,h),y.fill(0,0,h);for(let e=0;e0?e*e:0,y[r]=e<0?e*e:0}}c(v,0,0,d,f,d,this.f,this.v,this.z),c(y,m,m,s,u,d,this.f,this.v,this.z);for(let e=0;e-1);u++,o[u]=s,a[u]=c,a[u+1]=l}for(let s=0,l=0;sr&&(as){let t=h(e,s,l,i);u+t>r&&(ar&&(t=p(e,s,l,r,i,o),a=o[o.length-1])),s=l,u+=t}}(e,i,o,n,r,a),a}function g(e,t,n,r,i,a){let s=0,l=0;for(let a=t;a=0&&this._order.splice(t,1)}_appendOrder(e){this._order.push(e)}}const y={fontFamily:"Monaco, monospace",fontWeight:"normal",characterSet:function(){const e=[];for(let t=32;t<128;t++)e.push(String.fromCharCode(t));return e}(),fontSize:64,buffer:4,sdf:!1,cutoff:.25,radius:12,smoothing:.1};let v=new m(3);function b(e,t){for(let n=0;ni&&(u=0,l++),o[a]={x:u+r,y:s+l*c+r,width:e,height:c,layoutWidth:e,layoutHeight:n},u+=e+2*r}return{mapping:o,xOffset:u,yOffset:s+l*c,canvasHeight:(d=s+(l+1)*c,Math.pow(2,Math.ceil(Math.log2(d))))};var d}({getFontWidth:e=>d.measureText(e).width,fontHeight:1.2*i,buffer:o,characterSet:e,maxCanvasWidth:1024,...t&&{mapping:t.mapping,xOffset:t.xOffset,yOffset:t.yOffset}});if(c.height!==h){const e=d.getImageData(0,0,c.width,c.height);c.height=h,d.putImageData(e,0,0)}if(_(d,n,i,r),a){const t=new u({fontSize:i,buffer:o,radius:s,cutoff:l,fontFamily:n,fontWeight:"".concat(r)});for(const n of e){const{data:e,width:r,height:o,glyphTop:a}=t.draw(n);f[n].width=r,f[n].layoutOffsetY=.9*i-a;const s=d.createImageData(r,o);b(e,s),d.putImageData(s,f[n].x,f[n].y)}}else for(const t of e)d.fillText(t,f[t].x,f[t].y+o+.9*i);return{xOffset:p,yOffset:A,mapping:f,data:c,width:c.width,height:c.height}}_getKey(){const{fontFamily:e,fontWeight:t,fontSize:n,buffer:r,sdf:i,radius:o,cutoff:a}=this.props;return i?"".concat(e," ").concat(t," ").concat(n," ").concat(r," ").concat(o," ").concat(a):"".concat(e," ").concat(t," ").concat(n," ").concat(r)}}var x=n(527);const M={start:1,middle:0,end:-1},E={top:1,center:0,bottom:-1},O=[0,0,0,255],S={billboard:!0,sizeScale:1,sizeUnits:"pixels",sizeMinPixels:0,sizeMaxPixels:Number.MAX_SAFE_INTEGER,background:!1,getBackgroundColor:{type:"accessor",value:[255,255,255,255]},getBorderColor:{type:"accessor",value:O},getBorderWidth:{type:"accessor",value:0},backgroundPadding:{type:"array",value:[0,0,0,0]},characterSet:{type:"object",value:y.characterSet},fontFamily:y.fontFamily,fontWeight:y.fontWeight,lineHeight:1,outlineWidth:{type:"number",value:0,min:0},outlineColor:{type:"color",value:O},fontSettings:{type:"object",value:{},compare:1},wordBreak:"break-word",maxWidth:{type:"number",value:-1},getText:{type:"accessor",value:e=>e.text},getPosition:{type:"accessor",value:e=>e.position},getColor:{type:"accessor",value:O},getSize:{type:"accessor",value:32},getAngle:{type:"accessor",value:0},getTextAnchor:{type:"accessor",value:"middle"},getAlignmentBaseline:{type:"accessor",value:"center"},getPixelOffset:{type:"accessor",value:[0,0]},backgroundColor:{deprecatedFor:["background","getBackgroundColor"]}};class T extends i.a{constructor(...e){super(...e),Object(r.a)(this,"state",void 0),Object(r.a)(this,"getBoundingRect",(e,t)=>{let{size:[n,r]}=this.transformParagraph(e,t);const{fontSize:i}=this.state.fontAtlasManager.props;n/=i,r/=i;const{getTextAnchor:o,getAlignmentBaseline:a}=this.props;return[(M["function"==typeof o?o(e,t):o]-1)*n/2,(E["function"==typeof a?a(e,t):a]-1)*r/2,n,r]}),Object(r.a)(this,"getIconOffsets",(e,t)=>{const{getTextAnchor:n,getAlignmentBaseline:r}=this.props,{x:i,y:o,rowWidth:a,size:[s,l]}=this.transformParagraph(e,t),u=M["function"==typeof n?n(e,t):n],c=E["function"==typeof r?r(e,t):r],d=i.length,f=new Array(2*d);let h=0;for(let e=0;e0&&o.a.warn("v8.9 breaking change: TextLayer maxWidth is now relative to text size")()}updateState(e){const{props:t,oldProps:n,changeFlags:r}=e;(r.dataChanged||r.updateTriggersChanged&&(r.updateTriggersChanged.all||r.updateTriggersChanged.getText))&&this._updateText();(this._updateFontAtlas()||t.lineHeight!==n.lineHeight||t.wordBreak!==n.wordBreak||t.maxWidth!==n.maxWidth)&&this.setState({styleVersion:this.state.styleVersion+1})}getPickingInfo({info:e}){return e.object=e.index>=0?this.props.data[e.index]:null,e}_updateFontAtlas(){const{fontSettings:e,fontFamily:t,fontWeight:n}=this.props,{fontAtlasManager:r,characterSet:i}=this.state,o={...e,characterSet:i,fontFamily:t,fontWeight:n};if(!r.mapping)return r.setProps(o),!0;for(const e in o)if(o[e]!==r.props[e])return r.setProps(o),!0;return!1}_updateText(){var e;const{data:t,characterSet:n}=this.props,r=null===(e=t.attributes)||void 0===e?void 0:e.getText;let i,{getText:o}=this.props,s=t.startIndices;const l="auto"===n&&new Set;if(r&&s){const{texts:e,characterCount:n}=function({value:e,length:t,stride:n,offset:r,startIndices:i,characterSet:o}){const a=e.BYTES_PER_ELEMENT,s=n?n/a:1,l=r?r/a:0,u=i[t]||Math.ceil((e.length-l)/s),c=o&&new Set,d=new Array(t);let f=e;if(s>1||l>0){f=new(0,e.constructor)(u);for(let t=0;te[n]}else{const{iterable:e,objectInfo:n}=Object(a.a)(t);s=[0],i=0;for(const t of e){n.index++;const e=Array.from(o(t,n)||"");l&&e.forEach(l.add,l),i+=e.length,s.push(i)}}this.setState({getText:o,startIndices:s,numInstances:i,characterSet:l||n})}transformParagraph(e,t){const{fontAtlasManager:n}=this.state,r=n.mapping,i=this.state.getText,{wordBreak:o,lineHeight:a,maxWidth:s}=this.props;return function(e,t,n,r,i){const o=Array.from(e),a=o.length,s=new Array(a),l=new Array(a),u=new Array(a),c=("break-word"===n||"break-all"===n)&&isFinite(r)&&r>0,d=[0,0],h=[0,0];let p=0,m=0,y=0;for(let e=0;e<=a;e++){const b=o[e];if("\n"!==b&&e!==a||(y=e),y>m){const e=c?A(o,n,r,i,m,y):f;for(let n=0;n<=e.length;n++){const r=0===n?m:e[n-1],a=n=3,"Invalid cache limit"),v=new m(e)}(e)}}Object(r.a)(T,"defaultProps",S),Object(r.a)(T,"layerName","TextLayer")},function(e,t,n){"use strict";n.d(t,"a",(function(){return M})),n.d(t,"b",(function(){return E}));var r=n(418),i=n(148),o=n(1828),a=n(70),s=Object(a.a)((function(e){e.setDate(1),e.setHours(0,0,0,0)}),(function(e,t){e.setMonth(e.getMonth()+t)}),(function(e,t){return t.getMonth()-e.getMonth()+12*(t.getFullYear()-e.getFullYear())}),(function(e){return e.getMonth()})),l=s,u=(s.range,n(1829)),c=n(1830),d=n(82),f=Object(a.a)((function(e){e.setTime(e-e.getMilliseconds()-e.getSeconds()*d.d-e.getMinutes()*d.c)}),(function(e,t){e.setTime(+e+t*d.b)}),(function(e,t){return(t-e)/d.b}),(function(e){return e.getHours()})),h=f,p=(f.range,Object(a.a)((function(e){e.setTime(e-e.getMilliseconds()-e.getSeconds()*d.d)}),(function(e,t){e.setTime(+e+t*d.c)}),(function(e,t){return(t-e)/d.c}),(function(e){return e.getMinutes()}))),A=p,g=(p.range,n(1831)),m=n(1832),y=n(1847),v=n(77),b=n(65),_=n(534);function w(e){return new Date(e)}function x(e){return e instanceof Date?+e:+new Date(+e)}function M(e,t,n,o,a,s,l,u,c){var d=Object(v.b)(),f=d.invert,h=d.domain,p=c(".%L"),A=c(":%S"),g=c("%I:%M"),m=c("%I %p"),y=c("%a %d"),b=c("%b %d"),E=c("%B"),O=c("%Y"),S=[[l,1,1e3],[l,5,5e3],[l,15,15e3],[l,30,3e4],[s,1,6e4],[s,5,3e5],[s,15,9e5],[s,30,18e5],[a,1,36e5],[a,3,108e5],[a,6,216e5],[a,12,432e5],[o,1,864e5],[o,2,1728e5],[n,1,6048e5],[t,1,2592e6],[t,3,7776e6],[e,1,31536e6]];function T(r){return(l(r)=r),i=i.flatMap(e=>[e[0],e[1]]),Object(g.f)(i,g.a.COUNTER_CLOCKWISE));const o=n>0,a=r+1,s=o?3*a+1:r,l=2*Math.PI/r,u=new Uint16Array(o?3*r*2:0),c=new Float32Array(3*s),d=new Float32Array(3*s);let f=0;if(o){for(let e=0;ee.position},getFillColor:{type:"accessor",value:y},getLineColor:{type:"accessor",value:y},getLineWidth:{type:"accessor",value:1},getElevation:{type:"accessor",value:1e3},material:!0,getColor:{deprecatedFor:["getFillColor","getLineColor"]}};class b extends i.a{getShaders(){const{gl:e}=this.context,t=!Object(u.j)(e),n={},r=this.props.flatShading&&Object(c.b)(e,d.a.GLSL_DERIVATIVES);return r&&(n.FLAT_SHADING=1),super.getShaders({vs:"#version 300 es\n\n#define SHADER_NAME column-layer-vertex-shader\n\nin vec3 positions;\nin vec3 normals;\n\nin vec3 instancePositions;\nin float instanceElevations;\nin vec3 instancePositions64Low;\nin vec4 instanceFillColors;\nin vec4 instanceLineColors;\nin float instanceStrokeWidths;\n\nin vec3 instancePickingColors;\nuniform float opacity;\nuniform float radius;\nuniform float angle;\nuniform vec2 offset;\nuniform bool extruded;\nuniform bool stroked;\nuniform bool isStroke;\nuniform float coverage;\nuniform float elevationScale;\nuniform float edgeDistance;\nuniform float widthScale;\nuniform float widthMinPixels;\nuniform float widthMaxPixels;\nuniform int radiusUnits;\nuniform int widthUnits;\nout vec4 vColor;\n#ifdef FLAT_SHADING\nout vec4 position_commonspace;\n#endif\n\nvoid main(void) {\n geometry.worldPosition = instancePositions;\n\n vec4 color = isStroke ? instanceLineColors : instanceFillColors;\n mat2 rotationMatrix = mat2(cos(angle), sin(angle), -sin(angle), cos(angle));\n float elevation = 0.0;\n float strokeOffsetRatio = 1.0;\n\n if (extruded) {\n elevation = instanceElevations * (positions.z + 1.0) / 2.0 * elevationScale;\n } else if (stroked) {\n float widthPixels = clamp(\n project_size_to_pixel(instanceStrokeWidths * widthScale, widthUnits),\n widthMinPixels, widthMaxPixels) / 2.0;\n float halfOffset = project_pixel_size(widthPixels) / project_size(edgeDistance * coverage * radius);\n if (isStroke) {\n strokeOffsetRatio -= sign(positions.z) * halfOffset;\n } else {\n strokeOffsetRatio -= halfOffset;\n }\n }\n float shouldRender = float(color.a > 0.0 && instanceElevations >= 0.0);\n float dotRadius = radius * coverage * shouldRender;\n\n geometry.pickingColor = instancePickingColors;\n vec3 centroidPosition = vec3(instancePositions.xy, instancePositions.z + elevation);\n vec3 centroidPosition64Low = instancePositions64Low;\n vec2 offset = (rotationMatrix * positions.xy * strokeOffsetRatio + offset) * dotRadius;\n if (radiusUnits == UNIT_METERS) {\n offset = project_size(offset);\n }\n vec3 pos = vec3(offset, 0.);\n DECKGL_FILTER_SIZE(pos, geometry);\n\n gl_Position = project_position_to_clipspace(centroidPosition, centroidPosition64Low, pos, geometry.position);\n geometry.normal = project_normal(vec3(rotationMatrix * normals.xy, normals.z));\n DECKGL_FILTER_GL_POSITION(gl_Position, geometry);\n if (extruded && !isStroke) {\n#ifdef FLAT_SHADING\n position_commonspace = geometry.position;\n vColor = vec4(color.rgb, color.a * opacity);\n#else\n vec3 lightColor = lighting_getLightColor(color.rgb, project_uCameraPosition, geometry.position.xyz, geometry.normal);\n vColor = vec4(lightColor, color.a * opacity);\n#endif\n } else {\n vColor = vec4(color.rgb, color.a * opacity);\n }\n DECKGL_FILTER_COLOR(vColor, geometry);\n}\n",fs:"#version 300 es\n#define SHADER_NAME column-layer-fragment-shader\n\nprecision highp float;\n\nuniform vec3 project_uCameraPosition;\nuniform bool extruded;\nuniform bool isStroke;\n\nout vec4 fragColor;\n\nin vec4 vColor;\n#ifdef FLAT_SHADING\nin vec4 position_commonspace;\n#endif\n\nvoid main(void) {\n fragColor = vColor;\n#ifdef FLAT_SHADING\n if (extruded && !isStroke && !picking_uActive) {\n vec3 normal = normalize(cross(dFdx(position_commonspace.xyz), dFdy(position_commonspace.xyz)));\n fragColor.rgb = lighting_getLightColor(vColor.rgb, project_uCameraPosition, position_commonspace.xyz, normal);\n }\n#endif\n DECKGL_FILTER_COLOR(fragColor, geometry);\n}\n",defines:n,transpileToGLSL100:t,modules:[o.a,r?a.b:a.a,s.a]})}initializeState(){this.getAttributeManager().addInstanced({instancePositions:{size:3,type:5130,fp64:this.use64bitPositions(),transition:!0,accessor:"getPosition"},instanceElevations:{size:1,transition:!0,accessor:"getElevation"},instanceFillColors:{size:this.props.colorFormat.length,type:5121,normalized:!0,transition:!0,accessor:"getFillColor",defaultValue:y},instanceLineColors:{size:this.props.colorFormat.length,type:5121,normalized:!0,transition:!0,accessor:"getLineColor",defaultValue:y},instanceStrokeWidths:{size:1,accessor:"getLineWidth",transition:!0}})}updateState(e){super.updateState(e);const{props:t,oldProps:n,changeFlags:r}=e,i=r.extensionsChanged||t.flatShading!==n.flatShading;if(i){var o;const{gl:e}=this.context;null===(o=this.state.model)||void 0===o||o.delete(),this.state.model=this._getModel(e),this.getAttributeManager().invalidateAll()}(i||t.diskResolution!==n.diskResolution||t.vertices!==n.vertices||(t.extruded||t.stroked)!==(n.extruded||n.stroked))&&this._updateGeometry(t)}getGeometry(e,t,n){const r=new m({radius:1,height:n?2:0,vertices:t,nradial:e});let i=0;if(t)for(let n=0;n0}delete(){}getData(){return this.isLoaded?this._error?Promise.reject(this._error):this._content:this._loader.then(()=>this.getData())}setData(e,t){if(e===this._data&&!t)return;this._data=e;const n=++this._loadCount;let r=e;"string"==typeof e&&(r=Object(c.a)(e)),r instanceof Promise?(this.isLoaded=!1,this._loader=r.then(e=>{this._loadCount===n&&(this.isLoaded=!0,this._error=void 0,this._content=e)}).catch(e=>{this._loadCount===n&&(this.isLoaded=!0,this._error=e||!0)})):(this.isLoaded=!0,this._error=void 0,this._content=e);for(const e of this._subscribers)e.onChange(this.getData())}}class f{constructor({gl:e,protocol:t}){Object(r.a)(this,"protocol",void 0),Object(r.a)(this,"_context",void 0),Object(r.a)(this,"_resources",void 0),Object(r.a)(this,"_consumers",void 0),Object(r.a)(this,"_pruneRequest",void 0),this.protocol=t||"resource://",this._context={gl:e,resourceManager:this},this._resources={},this._consumers={},this._pruneRequest=null}contains(e){return!!e.startsWith(this.protocol)||e in this._resources}add({resourceId:e,data:t,forceUpdate:n=!1,persistent:r=!0}){let i=this._resources[e];i?i.setData(t,n):(i=new d(e,t,this._context),this._resources[e]=i),i.persistent=r}remove(e){const t=this._resources[e];t&&(t.delete(),delete this._resources[e])}unsubscribe({consumerId:e}){const t=this._consumers[e];if(t){for(const e in t){const n=t[e],r=this._resources[n.resourceId];r&&r.unsubscribe(n)}delete this._consumers[e],this.prune()}}subscribe({resourceId:e,onChange:t,consumerId:n,requestId:r="default"}){const{_resources:i,protocol:o}=this;e.startsWith(o)&&(i[e=e.replace(o,"")]||this.add({resourceId:e,data:null,persistent:!1}));const a=i[e];if(this._track(n,r,a,t),a)return a.getData()}prune(){this._pruneRequest||(this._pruneRequest=setTimeout(()=>this._prune(),0))}finalize(){for(const e in this._resources)this._resources[e].delete()}_track(e,t,n,r){const i=this._consumers,o=i[e]=i[e]||{},a=o[t]||{},s=a.resourceId&&this._resources[a.resourceId];s&&(s.unsubscribe(a),this.prune()),n&&(o[t]=a,a.onChange=r,a.resourceId=n.id,n.subscribe(a))}_prune(){this._pruneRequest=null;for(const e of Object.keys(this._resources)){const t=this._resources[e];t.persistent||t.inUse()||(t.delete(),delete this._resources[e])}}}var h=n(130),p=n(664);class A{constructor(e,{deck:t,stats:n,viewport:o,timeline:a}={}){Object(r.a)(this,"layers",void 0),Object(r.a)(this,"context",void 0),Object(r.a)(this,"resourceManager",void 0),Object(r.a)(this,"_lastRenderedLayers",[]),Object(r.a)(this,"_needsRedraw",!1),Object(r.a)(this,"_needsUpdate",!1),Object(r.a)(this,"_nextLayers",null),Object(r.a)(this,"_debug",!1),Object(r.a)(this,"activateViewport",e=>{Object(s.a)("layerManager.activateViewport",this,e),e&&(this.context.viewport=e)}),this.layers=[],this.resourceManager=new f({gl:e,protocol:"deck://"}),this.context={mousePosition:null,userData:{},layerManager:this,gl:e,deck:t,programManager:e&&Object(p.a)(e),stats:n||new u.a({id:"deck.gl"}),viewport:o||new h.a({id:"DEFAULT-INITIAL-VIEWPORT"}),timeline:a||new i.a,resourceManager:this.resourceManager,onError:void 0},Object.seal(this)}finalize(){this.resourceManager.finalize();for(const e of this.layers)this._finalizeLayer(e)}needsRedraw(e={clearRedrawFlags:!1}){let t=this._needsRedraw;e.clearRedrawFlags&&(this._needsRedraw=!1);for(const n of this.layers){const r=n.getNeedsRedraw(e);t=t||r}return t}needsUpdate(){return this._nextLayers&&this._nextLayers!==this._lastRenderedLayers?"layers changed":this._needsUpdate}setNeedsRedraw(e){this._needsRedraw=this._needsRedraw||e}setNeedsUpdate(e){this._needsUpdate=this._needsUpdate||e}getLayers({layerIds:e}={}){return e?this.layers.filter(t=>e.find(e=>0===t.id.indexOf(e))):this.layers}setProps(e){"debug"in e&&(this._debug=e.debug),"userData"in e&&(this.context.userData=e.userData),"layers"in e&&(this._nextLayers=e.layers),"onError"in e&&(this.context.onError=e.onError)}setLayers(e,t){Object(s.a)("layerManager.setLayers",this,t,e),this._lastRenderedLayers=e;const n=Object(l.b)(e,Boolean);for(const e of n)e.context=this.context;this._updateLayers(this.layers,n)}updateLayers(){const e=this.needsUpdate();e&&(this.setNeedsRedraw("updating layers: ".concat(e)),this.setLayers(this._nextLayers||this._lastRenderedLayers,e)),this._nextLayers=null}_handleError(e,t,n){n.raiseError(t,"".concat(e," of ").concat(n))}_updateLayers(e,t){const n={};for(const t of e)n[t.id]?a.a.warn("Multiple old layers with same id ".concat(t.id))():n[t.id]=t;const r=[];this._updateSublayersRecursively(t,n,r),this._finalizeOldLayers(n);let i=!1;for(const e of r)if(e.hasUniformTransition()){i="Uniform transition in ".concat(e);break}this._needsUpdate=i,this.layers=r}_updateSublayersRecursively(e,t,n){for(const r of e){r.context=this.context;const e=t[r.id];null===e&&a.a.warn("Multiple new layers with same id ".concat(r.id))(),t[r.id]=null;let i=null;try{this._debug&&e!==r&&r.validateProps(),e?(this._transferLayerState(e,r),this._updateLayer(r)):this._initializeLayer(r),n.push(r),i=r.isComposite?r.getSubLayers():null}catch(e){this._handleError("matching",e,r)}i&&this._updateSublayersRecursively(i,t,n)}}_finalizeOldLayers(e){for(const t in e){const n=e[t];n&&this._finalizeLayer(n)}}_initializeLayer(e){try{e._initialize(),e.lifecycle=o.f.INITIALIZED}catch(t){this._handleError("initialization",t,e)}}_transferLayerState(e,t){t._transferState(e),t.lifecycle=o.f.MATCHED,t!==e&&(e.lifecycle=o.f.AWAITING_GC)}_updateLayer(e){try{e._update()}catch(t){this._handleError("update",t,e)}}_finalizeLayer(e){this._needsRedraw=this._needsRedraw||"finalized ".concat(e),e.lifecycle=o.f.AWAITING_FINALIZATION;try{e._finalize(),e.lifecycle=o.f.FINALIZED}catch(t){this._handleError("finalization",t,e)}}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return f}));var r=n(1),i=n(519),o=n(880),a=n(879),s=n(39),l=n(551),u=n(175);const c=[0,0,0,255],d={radiusUnits:"meters",radiusScale:{type:"number",min:0,value:1},radiusMinPixels:{type:"number",min:0,value:0},radiusMaxPixels:{type:"number",min:0,value:Number.MAX_SAFE_INTEGER},lineWidthUnits:"meters",lineWidthScale:{type:"number",min:0,value:1},lineWidthMinPixels:{type:"number",min:0,value:0},lineWidthMaxPixels:{type:"number",min:0,value:Number.MAX_SAFE_INTEGER},stroked:!1,filled:!0,billboard:!1,antialiasing:!0,getPosition:{type:"accessor",value:e=>e.position},getRadius:{type:"accessor",value:1},getFillColor:{type:"accessor",value:c},getLineColor:{type:"accessor",value:c},getLineWidth:{type:"accessor",value:1},strokeWidth:{deprecatedFor:"getLineWidth"},outline:{deprecatedFor:"stroked"},getColor:{deprecatedFor:["getFillColor","getLineColor"]}};class f extends i.a{getShaders(){return super.getShaders({vs:"#define SHADER_NAME scatterplot-layer-vertex-shader\n\nattribute vec3 positions;\n\nattribute vec3 instancePositions;\nattribute vec3 instancePositions64Low;\nattribute float instanceRadius;\nattribute float instanceLineWidths;\nattribute vec4 instanceFillColors;\nattribute vec4 instanceLineColors;\nattribute vec3 instancePickingColors;\n\nuniform float opacity;\nuniform float radiusScale;\nuniform float radiusMinPixels;\nuniform float radiusMaxPixels;\nuniform float lineWidthScale;\nuniform float lineWidthMinPixels;\nuniform float lineWidthMaxPixels;\nuniform float stroked;\nuniform bool filled;\nuniform bool antialiasing;\nuniform bool billboard;\nuniform int radiusUnits;\nuniform int lineWidthUnits;\n\nvarying vec4 vFillColor;\nvarying vec4 vLineColor;\nvarying vec2 unitPosition;\nvarying float innerUnitRadius;\nvarying float outerRadiusPixels;\n\n\nvoid main(void) {\n geometry.worldPosition = instancePositions;\n outerRadiusPixels = clamp(\n project_size_to_pixel(radiusScale * instanceRadius, radiusUnits),\n radiusMinPixels, radiusMaxPixels\n );\n float lineWidthPixels = clamp(\n project_size_to_pixel(lineWidthScale * instanceLineWidths, lineWidthUnits),\n lineWidthMinPixels, lineWidthMaxPixels\n );\n outerRadiusPixels += stroked * lineWidthPixels / 2.0;\n float edgePadding = antialiasing ? (outerRadiusPixels + SMOOTH_EDGE_RADIUS) / outerRadiusPixels : 1.0;\n unitPosition = edgePadding * positions.xy;\n geometry.uv = unitPosition;\n geometry.pickingColor = instancePickingColors;\n\n innerUnitRadius = 1.0 - stroked * lineWidthPixels / outerRadiusPixels;\n \n if (billboard) {\n gl_Position = project_position_to_clipspace(instancePositions, instancePositions64Low, vec3(0.0), geometry.position);\n DECKGL_FILTER_GL_POSITION(gl_Position, geometry);\n vec3 offset = edgePadding * positions * outerRadiusPixels;\n DECKGL_FILTER_SIZE(offset, geometry);\n gl_Position.xy += project_pixel_size_to_clipspace(offset.xy);\n } else {\n vec3 offset = edgePadding * positions * project_pixel_size(outerRadiusPixels);\n DECKGL_FILTER_SIZE(offset, geometry);\n gl_Position = project_position_to_clipspace(instancePositions, instancePositions64Low, offset, geometry.position);\n DECKGL_FILTER_GL_POSITION(gl_Position, geometry);\n }\n vFillColor = vec4(instanceFillColors.rgb, instanceFillColors.a * opacity);\n DECKGL_FILTER_COLOR(vFillColor, geometry);\n vLineColor = vec4(instanceLineColors.rgb, instanceLineColors.a * opacity);\n DECKGL_FILTER_COLOR(vLineColor, geometry);\n}\n",fs:"#define SHADER_NAME scatterplot-layer-fragment-shader\n\nprecision highp float;\n\nuniform bool filled;\nuniform float stroked;\nuniform bool antialiasing;\n\nvarying vec4 vFillColor;\nvarying vec4 vLineColor;\nvarying vec2 unitPosition;\nvarying float innerUnitRadius;\nvarying float outerRadiusPixels;\n\nvoid main(void) {\n geometry.uv = unitPosition;\n\n float distToCenter = length(unitPosition) * outerRadiusPixels;\n float inCircle = antialiasing ? \n smoothedge(distToCenter, outerRadiusPixels) : \n step(distToCenter, outerRadiusPixels);\n\n if (inCircle == 0.0) {\n discard;\n }\n\n if (stroked > 0.5) {\n float isLine = antialiasing ? \n smoothedge(innerUnitRadius * outerRadiusPixels, distToCenter) :\n step(innerUnitRadius * outerRadiusPixels, distToCenter);\n\n if (filled) {\n gl_FragColor = mix(vFillColor, vLineColor, isLine);\n } else {\n if (isLine == 0.0) {\n discard;\n }\n gl_FragColor = vec4(vLineColor.rgb, vLineColor.a * isLine);\n }\n } else if (!filled) {\n discard;\n } else {\n gl_FragColor = vFillColor;\n }\n\n gl_FragColor.a *= inCircle;\n DECKGL_FILTER_COLOR(gl_FragColor, geometry);\n}\n",modules:[o.a,a.a]})}initializeState(){this.getAttributeManager().addInstanced({instancePositions:{size:3,type:5130,fp64:this.use64bitPositions(),transition:!0,accessor:"getPosition"},instanceRadius:{size:1,transition:!0,accessor:"getRadius",defaultValue:1},instanceFillColors:{size:this.props.colorFormat.length,transition:!0,normalized:!0,type:5121,accessor:"getFillColor",defaultValue:[0,0,0,255]},instanceLineColors:{size:this.props.colorFormat.length,transition:!0,normalized:!0,type:5121,accessor:"getLineColor",defaultValue:[0,0,0,255]},instanceLineWidths:{size:1,transition:!0,accessor:"getLineWidth",defaultValue:1}})}updateState(e){if(super.updateState(e),e.changeFlags.extensionsChanged){var t;const{gl:e}=this.context;null===(t=this.state.model)||void 0===t||t.delete(),this.state.model=this._getModel(e),this.getAttributeManager().invalidateAll()}}draw({uniforms:e}){const{radiusUnits:t,radiusScale:n,radiusMinPixels:r,radiusMaxPixels:i,stroked:o,filled:a,billboard:l,antialiasing:u,lineWidthUnits:c,lineWidthScale:d,lineWidthMinPixels:f,lineWidthMaxPixels:h}=this.props;this.state.model.setUniforms(e).setUniforms({stroked:o?1:0,filled:a,billboard:l,antialiasing:u,radiusUnits:s.e[t],radiusScale:n,radiusMinPixels:r,radiusMaxPixels:i,lineWidthUnits:s.e[c],lineWidthScale:d,lineWidthMinPixels:f,lineWidthMaxPixels:h}).draw()}_getModel(e){return new l.a(e,{...this.getShaders(),id:this.props.id,geometry:new u.a({drawMode:6,vertexCount:4,attributes:{positions:{size:3,value:new Float32Array([-1,-1,0,1,-1,0,1,1,0,-1,1,0])}}}),isInstanced:!0})}}Object(r.a)(f,"defaultProps",d),Object(r.a)(f,"layerName","ScatterplotLayer")},function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));var r=n(1),i=n(519),o=n(880),a=n(879),s=n(39),l=n(551),u=n(175);const c={billboard:!0,sizeScale:1,sizeUnits:"pixels",sizeMinPixels:0,sizeMaxPixels:Number.MAX_SAFE_INTEGER,padding:{type:"array",value:[0,0,0,0]},getPosition:{type:"accessor",value:e=>e.position},getSize:{type:"accessor",value:1},getAngle:{type:"accessor",value:0},getPixelOffset:{type:"accessor",value:[0,0]},getBoundingRect:{type:"accessor",value:[0,0,0,0]},getFillColor:{type:"accessor",value:[0,0,0,255]},getLineColor:{type:"accessor",value:[0,0,0,255]},getLineWidth:{type:"accessor",value:1}};class d extends i.a{constructor(...e){super(...e),Object(r.a)(this,"state",void 0)}getShaders(){return super.getShaders({vs:"#define SHADER_NAME text-background-layer-vertex-shader\n\nattribute vec2 positions;\n\nattribute vec3 instancePositions;\nattribute vec3 instancePositions64Low;\nattribute vec4 instanceRects;\nattribute float instanceSizes;\nattribute float instanceAngles;\nattribute vec2 instancePixelOffsets;\nattribute float instanceLineWidths;\nattribute vec4 instanceFillColors;\nattribute vec4 instanceLineColors;\nattribute vec3 instancePickingColors;\n\nuniform bool billboard;\nuniform float opacity;\nuniform float sizeScale;\nuniform float sizeMinPixels;\nuniform float sizeMaxPixels;\nuniform vec4 padding;\nuniform int sizeUnits;\n\nvarying vec4 vFillColor;\nvarying vec4 vLineColor;\nvarying float vLineWidth;\nvarying vec2 uv;\nvarying vec2 dimensions;\n\nvec2 rotate_by_angle(vec2 vertex, float angle) {\n float angle_radian = radians(angle);\n float cos_angle = cos(angle_radian);\n float sin_angle = sin(angle_radian);\n mat2 rotationMatrix = mat2(cos_angle, -sin_angle, sin_angle, cos_angle);\n return rotationMatrix * vertex;\n}\n\nvoid main(void) {\n geometry.worldPosition = instancePositions;\n geometry.uv = positions;\n geometry.pickingColor = instancePickingColors;\n uv = positions;\n vLineWidth = instanceLineWidths;\n float sizePixels = clamp(\n project_size_to_pixel(instanceSizes * sizeScale, sizeUnits),\n sizeMinPixels, sizeMaxPixels\n );\n\n dimensions = instanceRects.zw * sizePixels + padding.xy + padding.zw;\n\n vec2 pixelOffset = (positions * instanceRects.zw + instanceRects.xy) * sizePixels + mix(-padding.xy, padding.zw, positions);\n pixelOffset = rotate_by_angle(pixelOffset, instanceAngles);\n pixelOffset += instancePixelOffsets;\n pixelOffset.y *= -1.0;\n\n if (billboard) {\n gl_Position = project_position_to_clipspace(instancePositions, instancePositions64Low, vec3(0.0), geometry.position);\n DECKGL_FILTER_GL_POSITION(gl_Position, geometry);\n vec3 offset = vec3(pixelOffset, 0.0);\n DECKGL_FILTER_SIZE(offset, geometry);\n gl_Position.xy += project_pixel_size_to_clipspace(offset.xy);\n } else {\n vec3 offset_common = vec3(project_pixel_size(pixelOffset), 0.0);\n DECKGL_FILTER_SIZE(offset_common, geometry);\n gl_Position = project_position_to_clipspace(instancePositions, instancePositions64Low, offset_common, geometry.position);\n DECKGL_FILTER_GL_POSITION(gl_Position, geometry);\n }\n vFillColor = vec4(instanceFillColors.rgb, instanceFillColors.a * opacity);\n DECKGL_FILTER_COLOR(vFillColor, geometry);\n vLineColor = vec4(instanceLineColors.rgb, instanceLineColors.a * opacity);\n DECKGL_FILTER_COLOR(vLineColor, geometry);\n}\n",fs:"#define SHADER_NAME text-background-layer-fragment-shader\n\nprecision highp float;\n\nuniform bool stroked;\n\nvarying vec4 vFillColor;\nvarying vec4 vLineColor;\nvarying float vLineWidth;\nvarying vec2 uv;\nvarying vec2 dimensions;\n\nvoid main(void) {\n geometry.uv = uv;\n\n vec2 pixelPosition = uv * dimensions;\n if (stroked) {\n float distToEdge = min(\n min(pixelPosition.x, dimensions.x - pixelPosition.x),\n min(pixelPosition.y, dimensions.y - pixelPosition.y)\n );\n float isBorder = smoothedge(distToEdge, vLineWidth);\n gl_FragColor = mix(vFillColor, vLineColor, isBorder);\n } else {\n gl_FragColor = vFillColor;\n }\n\n DECKGL_FILTER_COLOR(gl_FragColor, geometry);\n}\n",modules:[o.a,a.a]})}initializeState(){this.getAttributeManager().addInstanced({instancePositions:{size:3,type:5130,fp64:this.use64bitPositions(),transition:!0,accessor:"getPosition"},instanceSizes:{size:1,transition:!0,accessor:"getSize",defaultValue:1},instanceAngles:{size:1,transition:!0,accessor:"getAngle"},instanceRects:{size:4,accessor:"getBoundingRect"},instancePixelOffsets:{size:2,transition:!0,accessor:"getPixelOffset"},instanceFillColors:{size:4,transition:!0,normalized:!0,type:5121,accessor:"getFillColor",defaultValue:[0,0,0,255]},instanceLineColors:{size:4,transition:!0,normalized:!0,type:5121,accessor:"getLineColor",defaultValue:[0,0,0,255]},instanceLineWidths:{size:1,transition:!0,accessor:"getLineWidth",defaultValue:1}})}updateState(e){super.updateState(e);const{changeFlags:t}=e;if(t.extensionsChanged){var n;const{gl:e}=this.context;null===(n=this.state.model)||void 0===n||n.delete(),this.state.model=this._getModel(e),this.getAttributeManager().invalidateAll()}}draw({uniforms:e}){const{billboard:t,sizeScale:n,sizeUnits:r,sizeMinPixels:i,sizeMaxPixels:o,getLineWidth:a}=this.props;let{padding:l}=this.props;l.length<4&&(l=[l[0],l[1],l[0],l[1]]),this.state.model.setUniforms(e).setUniforms({billboard:t,stroked:Boolean(a),padding:l,sizeUnits:s.e[r],sizeScale:n,sizeMinPixels:i,sizeMaxPixels:o}).draw()}_getModel(e){return new l.a(e,{...this.getShaders(),id:this.props.id,geometry:new u.a({drawMode:6,vertexCount:4,attributes:{positions:{size:2,value:new Float32Array([0,0,1,0,1,1,0,1])}}}),isInstanced:!0})}}Object(r.a)(d,"defaultProps",c),Object(r.a)(d,"layerName","TextBackgroundLayer")},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=function(e,t){return e===t};function i(e,t){var n,i,o="object"==typeof t?t:{equalityCheck:t},a=o.equalityCheck,s=void 0===a?r:a,l=o.maxSize,u=void 0===l?1:l,c=o.resultEqualityCheck,d=function(e){return function(t,n){if(null===t||null===n||t.length!==n.length)return!1;for(var r=t.length,i=0;i-1){var i=n[r];return r>0&&(n.splice(r,1),n.unshift(i)),i.value}return"NOT_FOUND"}return{get:r,put:function(t,i){"NOT_FOUND"===r(t)&&(n.unshift({key:t,value:i}),n.length>e&&n.pop())},getEntries:function(){return n},clear:function(){n=[]}}}(u,d);function h(){var t=f.get(arguments);if("NOT_FOUND"===t){if(t=e.apply(null,arguments),c){var n=f.getEntries(),r=n.find((function(e){return c(e.value,t)}));r&&(t=r.value)}f.put(arguments,t)}return t}return h.clearCache=function(){return f.clear()},h}function o(e){var t=Array.isArray(e[0])?e[0]:e;if(!t.every((function(e){return"function"==typeof e}))){var n=t.map((function(e){return"function"==typeof e?"function "+(e.name||"unnamed")+"()":typeof e})).join(", ");throw new Error("createSelector expects all input-selectors to be functions, but received the following types: ["+n+"]")}return t}function a(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r 0.0) {\n float inFill = alpha;\n float inBorder = smoothstep(outlineBuffer - gamma, outlineBuffer + gamma, distance);\n color = mix(outlineColor, vColor, inFill);\n alpha = inBorder;\n }\n }\n float a = alpha * color.a;\n \n if (a < alphaCutoff) {\n discard;\n }\n\n gl_FragColor = vec4(color.rgb, a * opacity);\n }\n\n DECKGL_FILTER_COLOR(gl_FragColor, geometry);\n}\n"}}initializeState(){super.initializeState();this.getAttributeManager().addInstanced({instanceOffsets:{size:2,accessor:"getIconOffsets"},instancePickingColors:{type:5121,size:3,accessor:(e,{index:t,target:n})=>this.encodePickingColor(t,n)}})}updateState(e){super.updateState(e);const{props:t,oldProps:n}=e;let{outlineColor:r}=t;r!==n.outlineColor&&(r=r.map(e=>e/255),r[3]=Number.isFinite(r[3])?r[3]:1,this.setState({outlineColor:r})),!t.sdf&&t.outlineWidth&&i.a.warn("".concat(this.id,": fontSettings.sdf is required to render outline"))()}draw(e){const{sdf:t,smoothing:n,outlineWidth:r}=this.props,{outlineColor:i}=this.state,o=r?Math.max(n,.75*(1-r)):-1;if(e.uniforms={...e.uniforms,sdfBuffer:.75,outlineBuffer:o,gamma:n,sdf:Boolean(t),outlineColor:i},super.draw(e),t&&r){const{iconManager:e}=this.state;e.getTexture()&&this.state.model.draw({uniforms:{outlineBuffer:.75}})}}getInstanceOffset(e){return e?Array.from(e).flatMap(e=>super.getInstanceOffset(e)):a}getInstanceColorMode(e){return 1}getInstanceIconFrame(e){return e?Array.from(e).flatMap(e=>super.getInstanceIconFrame(e)):a}}Object(r.a)(s,"defaultProps",{getIconOffsets:{type:"accessor",value:e=>e.offsets},alphaCutoff:.001,smoothing:.1,outlineWidth:0,outlineColor:{type:"color",value:[0,0,0,255]}}),Object(r.a)(s,"layerName","MultiIconLayer")},function(e,t,n){"use strict";n.r(t);var r=n(18),i=n(35),o=n(64);var a=function(e){if(!e)throw new Error("geojson is required");var t=[];return Object(o.flattenEach)(e,(function(e){!function(e,t){var n=[],o=e.geometry;if(null!==o){switch(o.type){case"Polygon":n=Object(i.getCoords)(o);break;case"LineString":n=[Object(i.getCoords)(o)]}n.forEach((function(n){(function(e,t){var n=[];return e.reduce((function(e,i){var o,a,s,l,u,c,d=Object(r.lineString)([e,i],t);return d.bbox=(a=i,s=(o=e)[0],l=o[1],u=a[0],c=a[1],[su?s:u,l>c?l:c]),n.push(d),i})),n})(n,e.properties).forEach((function(e){e.id=t.length,t.push(e)}))}))}}(e,t)})),Object(r.featureCollection)(t)},s=n(1154),l=n.n(s);function u(e,t){var n=Object(i.getCoords)(e),o=Object(i.getCoords)(t);if(2!==n.length)throw new Error(" line1 must only contain 2 coordinates");if(2!==o.length)throw new Error(" line2 must only contain 2 coordinates");var a=n[0][0],s=n[0][1],l=n[1][0],u=n[1][1],c=o[0][0],d=o[0][1],f=o[1][0],h=o[1][1],p=(h-d)*(l-a)-(f-c)*(u-s),A=(f-c)*(s-d)-(h-d)*(a-c),g=(l-a)*(s-d)-(u-s)*(a-c);if(0===p)return null;var m=A/p,y=g/p;if(m>=0&&m<=1&&y>=0&&y<=1){var v=a+m*(l-a),b=s+m*(u-s);return Object(r.point)([v,b])}return null}t.default=function(e,t){var n={},s=[];if("LineString"===e.type&&(e=Object(r.feature)(e)),"LineString"===t.type&&(t=Object(r.feature)(t)),"Feature"===e.type&&"Feature"===t.type&&null!==e.geometry&&null!==t.geometry&&"LineString"===e.geometry.type&&"LineString"===t.geometry.type&&2===e.geometry.coordinates.length&&2===t.geometry.coordinates.length){var c=u(e,t);return c&&s.push(c),Object(r.featureCollection)(s)}var d=l()();return d.load(a(t)),Object(o.featureEach)(a(e),(function(e){Object(o.featureEach)(d.search(e),(function(t){var r=u(e,t);if(r){var o=Object(i.getCoords)(r).join(",");n[o]||(n[o]=!0,s.push(r))}}))})),Object(r.featureCollection)(s)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));class r{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}length(){return this.bb.readInt64(this.bb_pos)}nullCount(){return this.bb.readInt64(this.bb_pos+8)}static sizeOf(){return 16}static createFieldNode(e,t,n){return e.prep(8,16),e.writeInt64(BigInt(null!=n?n:0)),e.writeInt64(BigInt(null!=t?t:0)),e.offset()}}},function(e,t,n){"use strict";function r(e,t){var n,r=0,i=(e=e.slice()).length-1,o=e[r],a=e[i];return a=0)}n.d(t,"a",(function(){return r}))}).call(this,n(113))},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(17);function i(e,t,n,i){const o="See luma.gl ".concat(n," Upgrade Guide at https://luma.gl/docs/upgrade-guide"),a=Object.getPrototypeOf(e);i.forEach(e=>{a.methodName||(a[e]=()=>{throw r.k.removed("Calling removed method ".concat(t,".").concat(e,": "),o)(),new Error(e)})})}},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(365),i=n(62),o=n(139);class a extends r.a{get ELEMENTS(){return Object(o.a)(!1),0}copy(e){return Object(o.a)(!1),this}get x(){return this[0]}set x(e){this[0]=Object(i.a)(e)}get y(){return this[1]}set y(e){this[1]=Object(i.a)(e)}len(){return Math.sqrt(this.lengthSquared())}magnitude(){return this.len()}lengthSquared(){let e=0;for(let t=0;t=0&&e=0&&e1&&void 0!==arguments[1])||arguments[1],n=arguments.length>2?arguments[2]:void 0;const o=n||new Set;if(e){if(i(e))o.add(e);else if(i(e.buffer))o.add(e.buffer);else if(ArrayBuffer.isView(e));else if(t&&"object"==typeof e)for(const n in e)r(e[n],t,o)}else;return void 0===n?Array.from(o):[]}function i(e){return!!e&&(e instanceof ArrayBuffer||("undefined"!=typeof MessagePort&&e instanceof MessagePort||("undefined"!=typeof ImageBitmap&&e instanceof ImageBitmap||"undefined"!=typeof OffscreenCanvas&&e instanceof OffscreenCanvas)))}function o(e){if(null===e)return{};const t=Object.assign({},e);return Object.keys(t).forEach(n=>{"object"!=typeof e[n]||ArrayBuffer.isView(e[n])||e[n]instanceof Array?"function"==typeof t[n]||t[n]instanceof RegExp?t[n]={}:t[n]=e[n]:t[n]=o(e[n])}),t}n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return o}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(52);class i extends(function(e){function t(){var t=Reflect.construct(e,Array.from(arguments));return Object.setPrototypeOf(t,Object.getPrototypeOf(this)),t}return t.prototype=Object.create(e.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e,t}(Array)){clone(){return(new this.constructor).copy(this)}fromArray(e,t=0){for(let n=0;n0?", ":"")+Object(r.e)(this[n],e);return"".concat(e.printTypes?this.constructor.name:"","[").concat(t,"]")}equals(e){if(!e||this.length!==e.length)return!1;for(let t=0;tn&&r>=i&&(s=n),r>=o){l=n;break}}let u=s;const c=l-s!==r.length?e.slice(l):void 0;for(let t=0;t>>0):4294967296*(t>>>0)+(e>>>0)}function l(e,t,n){var r=t<=16383?1:t<=2097151?2:t<=268435455?3:Math.floor(Math.log(t)/(7*Math.LN2));n.realloc(r);for(var i=n.pos-1;i>=e;i--)n.buf[i+r]=n.buf[i]}function u(e,t){for(var n=0;n>>8,e[n+2]=t>>>16,e[n+3]=t>>>24}function b(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16)+(e[t+3]<<24)}i.prototype={destroy:function(){this.buf=null},readFields:function(e,t,n){for(n=n||this.length;this.pos>3,o=this.pos;this.type=7&r,e(i,t,this),this.pos===o&&this.skip(r)}return t},readMessage:function(e,t){return this.readFields(e,t,this.readVarint()+this.pos)},readFixed32:function(){var e=y(this.buf,this.pos);return this.pos+=4,e},readSFixed32:function(){var e=b(this.buf,this.pos);return this.pos+=4,e},readFixed64:function(){var e=y(this.buf,this.pos)+4294967296*y(this.buf,this.pos+4);return this.pos+=8,e},readSFixed64:function(){var e=y(this.buf,this.pos)+4294967296*b(this.buf,this.pos+4);return this.pos+=8,e},readFloat:function(){var e=r.read(this.buf,this.pos,!0,23,4);return this.pos+=4,e},readDouble:function(){var e=r.read(this.buf,this.pos,!0,52,8);return this.pos+=8,e},readVarint:function(e){var t,n,r=this.buf;return t=127&(n=r[this.pos++]),n<128?t:(t|=(127&(n=r[this.pos++]))<<7,n<128?t:(t|=(127&(n=r[this.pos++]))<<14,n<128?t:(t|=(127&(n=r[this.pos++]))<<21,n<128?t:function(e,t,n){var r,i,o=n.buf;if(i=o[n.pos++],r=(112&i)>>4,i<128)return s(e,r,t);if(i=o[n.pos++],r|=(127&i)<<3,i<128)return s(e,r,t);if(i=o[n.pos++],r|=(127&i)<<10,i<128)return s(e,r,t);if(i=o[n.pos++],r|=(127&i)<<17,i<128)return s(e,r,t);if(i=o[n.pos++],r|=(127&i)<<24,i<128)return s(e,r,t);if(i=o[n.pos++],r|=(1&i)<<31,i<128)return s(e,r,t);throw new Error("Expected varint not more than 10 bytes")}(t|=(15&(n=r[this.pos]))<<28,e,this))))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var e=this.readVarint();return e%2==1?(e+1)/-2:e/2},readBoolean:function(){return Boolean(this.readVarint())},readString:function(){var e=this.readVarint()+this.pos,t=this.pos;return this.pos=e,e-t>=12&&o?function(e,t,n){return o.decode(e.subarray(t,n))}(this.buf,t,e):function(e,t,n){var r="",i=t;for(;i239?4:l>223?3:l>191?2:1;if(i+c>n)break;1===c?l<128&&(u=l):2===c?128==(192&(o=e[i+1]))&&(u=(31&l)<<6|63&o)<=127&&(u=null):3===c?(o=e[i+1],a=e[i+2],128==(192&o)&&128==(192&a)&&((u=(15&l)<<12|(63&o)<<6|63&a)<=2047||u>=55296&&u<=57343)&&(u=null)):4===c&&(o=e[i+1],a=e[i+2],s=e[i+3],128==(192&o)&&128==(192&a)&&128==(192&s)&&((u=(15&l)<<18|(63&o)<<12|(63&a)<<6|63&s)<=65535||u>=1114112)&&(u=null)),null===u?(u=65533,c=1):u>65535&&(u-=65536,r+=String.fromCharCode(u>>>10&1023|55296),u=56320|1023&u),r+=String.fromCharCode(u),i+=c}return r}(this.buf,t,e)},readBytes:function(){var e=this.readVarint()+this.pos,t=this.buf.subarray(this.pos,e);return this.pos=e,t},readPackedVarint:function(e,t){if(this.type!==i.Bytes)return e.push(this.readVarint(t));var n=a(this);for(e=e||[];this.pos127;);else if(t===i.Bytes)this.pos=this.readVarint()+this.pos;else if(t===i.Fixed32)this.pos+=4;else{if(t!==i.Fixed64)throw new Error("Unimplemented type: "+t);this.pos+=8}},writeTag:function(e,t){this.writeVarint(e<<3|t)},realloc:function(e){for(var t=this.length||16;t268435455||e<0?function(e,t){var n,r;e>=0?(n=e%4294967296|0,r=e/4294967296|0):(r=~(-e/4294967296),4294967295^(n=~(-e%4294967296))?n=n+1|0:(n=0,r=r+1|0));if(e>=0x10000000000000000||e<-0x10000000000000000)throw new Error("Given varint doesn't fit into 10 bytes");t.realloc(10),function(e,t,n){n.buf[n.pos++]=127&e|128,e>>>=7,n.buf[n.pos++]=127&e|128,e>>>=7,n.buf[n.pos++]=127&e|128,e>>>=7,n.buf[n.pos++]=127&e|128,e>>>=7,n.buf[n.pos]=127&e}(n,0,t),function(e,t){var n=(7&e)<<4;if(t.buf[t.pos++]|=n|((e>>>=3)?128:0),!e)return;if(t.buf[t.pos++]=127&e|((e>>>=7)?128:0),!e)return;if(t.buf[t.pos++]=127&e|((e>>>=7)?128:0),!e)return;if(t.buf[t.pos++]=127&e|((e>>>=7)?128:0),!e)return;if(t.buf[t.pos++]=127&e|((e>>>=7)?128:0),!e)return;t.buf[t.pos++]=127&e}(r,t)}(e,this):(this.realloc(4),this.buf[this.pos++]=127&e|(e>127?128:0),e<=127||(this.buf[this.pos++]=127&(e>>>=7)|(e>127?128:0),e<=127||(this.buf[this.pos++]=127&(e>>>=7)|(e>127?128:0),e<=127||(this.buf[this.pos++]=e>>>7&127))))},writeSVarint:function(e){this.writeVarint(e<0?2*-e-1:2*e)},writeBoolean:function(e){this.writeVarint(Boolean(e))},writeString:function(e){e=String(e),this.realloc(4*e.length),this.pos++;var t=this.pos;this.pos=function(e,t,n){for(var r,i,o=0;o55295&&r<57344){if(!i){r>56319||o+1===t.length?(e[n++]=239,e[n++]=191,e[n++]=189):i=r;continue}if(r<56320){e[n++]=239,e[n++]=191,e[n++]=189,i=r;continue}r=i-55296<<10|r-56320|65536,i=null}else i&&(e[n++]=239,e[n++]=191,e[n++]=189,i=null);r<128?e[n++]=r:(r<2048?e[n++]=r>>6|192:(r<65536?e[n++]=r>>12|224:(e[n++]=r>>18|240,e[n++]=r>>12&63|128),e[n++]=r>>6&63|128),e[n++]=63&r|128)}return n}(this.buf,e,this.pos);var n=this.pos-t;n>=128&&l(t,n,this),this.pos=t-1,this.writeVarint(n),this.pos+=n},writeFloat:function(e){this.realloc(4),r.write(this.buf,e,this.pos,!0,23,4),this.pos+=4},writeDouble:function(e){this.realloc(8),r.write(this.buf,e,this.pos,!0,52,8),this.pos+=8},writeBytes:function(e){var t=e.length;this.writeVarint(t),this.realloc(t);for(var n=0;n=128&&l(n,r,this),this.pos=n-1,this.writeVarint(r),this.pos+=r},writeMessage:function(e,t,n){this.writeTag(e,i.Bytes),this.writeRawMessage(t,n)},writePackedVarint:function(e,t){t.length&&this.writeMessage(e,u,t)},writePackedSVarint:function(e,t){t.length&&this.writeMessage(e,c,t)},writePackedBoolean:function(e,t){t.length&&this.writeMessage(e,h,t)},writePackedFloat:function(e,t){t.length&&this.writeMessage(e,d,t)},writePackedDouble:function(e,t){t.length&&this.writeMessage(e,f,t)},writePackedFixed32:function(e,t){t.length&&this.writeMessage(e,p,t)},writePackedSFixed32:function(e,t){t.length&&this.writeMessage(e,A,t)},writePackedFixed64:function(e,t){t.length&&this.writeMessage(e,g,t)},writePackedSFixed64:function(e,t){t.length&&this.writeMessage(e,m,t)},writeBytesField:function(e,t){this.writeTag(e,i.Bytes),this.writeBytes(t)},writeFixed32Field:function(e,t){this.writeTag(e,i.Fixed32),this.writeFixed32(t)},writeSFixed32Field:function(e,t){this.writeTag(e,i.Fixed32),this.writeSFixed32(t)},writeFixed64Field:function(e,t){this.writeTag(e,i.Fixed64),this.writeFixed64(t)},writeSFixed64Field:function(e,t){this.writeTag(e,i.Fixed64),this.writeSFixed64(t)},writeVarintField:function(e,t){this.writeTag(e,i.Varint),this.writeVarint(t)},writeSVarintField:function(e,t){this.writeTag(e,i.Varint),this.writeSVarint(t)},writeStringField:function(e,t){this.writeTag(e,i.Bytes),this.writeString(t)},writeFloatField:function(e,t){this.writeTag(e,i.Fixed32),this.writeFloat(t)},writeDoubleField:function(e,t){this.writeTag(e,i.Fixed64),this.writeDouble(t)},writeBooleanField:function(e,t){this.writeVarintField(e,Boolean(t))}}},function(e,t,n){"use strict";var r=n(18),i=n(35);function o(e,t){var n=Object(r.degreesToRadians)(e[1]),i=Object(r.degreesToRadians)(t[1]),o=Object(r.degreesToRadians)(t[0]-e[0]);o>Math.PI&&(o-=2*Math.PI),o<-Math.PI&&(o+=2*Math.PI);var a=Math.log(Math.tan(i/2+Math.PI/4)/Math.tan(n/2+Math.PI/4)),s=Math.atan2(o,a);return(Object(r.radiansToDegrees)(s)+360)%360}t.a=function(e,t,n){var r;return void 0===n&&(n={}),(r=n.final?o(Object(i.getCoord)(t),Object(i.getCoord)(e)):o(Object(i.getCoord)(e),Object(i.getCoord)(t)))>180?-(360-r):r}},function(e,t,n){"use strict";t.a=function(e){let t;for(;t=e.sourceEvent;)e=t;return e}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=function(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i div, .contract-trigger:before { content: " "; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; z-index: -1; } .resize-triggers > div { background: #eee; overflow: auto; } .contract-trigger:before { width: 200%; height: 200%; }',r=e.head||e.getElementsByTagName("head")[0],i=e.createElement("style");i.id="detectElementResize",i.type="text/css",null!=t&&i.setAttribute("nonce",t),i.styleSheet?i.styleSheet.cssText=n:i.appendChild(e.createTextNode(n)),r.appendChild(i)}}(i),e.__resizeLast__={},e.__resizeListeners__=[],(e.__resizeTriggers__=i.createElement("div")).className="resize-triggers";var s='
';if(window.trustedTypes){var l=trustedTypes.createPolicy("react-virtualized-auto-sizer",{createHTML:function(){return s}});e.__resizeTriggers__.innerHTML=l.createHTML("")}else e.__resizeTriggers__.innerHTML=s;e.appendChild(e.__resizeTriggers__),u(e),e.addEventListener("scroll",c,!0),h&&(e.__resizeTriggers__.__animationListener__=function(t){t.animationName==y&&u(e)},e.__resizeTriggers__.addEventListener(h,e.__resizeTriggers__.__animationListener__))}e.__resizeListeners__.push(n)}},removeResizeListener:function(e,t){if(a)e.detachEvent("onresize",t);else if(e.__resizeListeners__.splice(e.__resizeListeners__.indexOf(t),1),!e.__resizeListeners__.length){e.removeEventListener("scroll",c,!0),e.__resizeTriggers__.__animationListener__&&(e.__resizeTriggers__.removeEventListener(h,e.__resizeTriggers__.__animationListener__),e.__resizeTriggers__.__animationListener__=null);try{e.__resizeTriggers__=!e.removeChild(e.__resizeTriggers__)}catch(e){}}}}}n.d(t,"a",(function(){return r}))}).call(this,n(68))},function(e,t,n){"use strict";n.d(t,"a",(function(){return R}));var r=n(17),i=n(671),o=n(138),a=n(28),s=n(555),l=n(1804),u=n(177),c=n(96),d=n(115);let f=null;function h(e,t){var n;return new e((n=e.BYTES_PER_ELEMENT*t,(!f||f.byteLength1&&void 0!==arguments[1]?arguments[1]:{}).constantAttributeZero||(Object(r.j)(e)||"Chrome"===Object(p.a)())}static getDefaultArray(e){return e.luma=e.luma||{},e.luma.defaultVertexArray||(e.luma.defaultVertexArray=new A(e,{handle:null,isDefaultArray:!0})),e.luma.defaultVertexArray}static getMaxAttributes(e){return A.MAX_ATTRIBUTES=A.MAX_ATTRIBUTES||e.getParameter(34921),A.MAX_ATTRIBUTES}static setConstant(e,t,n){switch(n.constructor){case Float32Array:A._setConstantFloatArray(e,t,n);break;case Int32Array:A._setConstantIntArray(e,t,n);break;case Uint32Array:A._setConstantUintArray(e,t,n);break;default:Object(a.a)(!1)}}constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=t.id||t.program&&t.program.id;super(e,Object.assign({},t,{id:n})),this.buffer=null,this.bufferValue=null,this.isDefaultArray=t.isDefaultArray||!1,this.gl2=e,this.initialize(t),Object.seal(this)}delete(){return super.delete(),this.buffer&&this.buffer.delete(),this}get MAX_ATTRIBUTES(){return A.getMaxAttributes(this.gl)}initialize(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.setProps(e)}setProps(e){return this}setElementBuffer(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return Object(a.a)(!e||34963===e.target,"elements must be GL.ELEMENT_ARRAY_BUFFER"),this.bind(()=>{this.gl.bindBuffer(34963,e?e.handle:null)}),this}setBuffer(e,t,n){if(34963===t.target)return this.setElementBuffer(t,n);const{size:i,type:o,stride:s,offset:l,normalized:u,integer:c,divisor:d}=n,{gl:f,gl2:h}=this;return e=Number(e),this.bind(()=>{f.bindBuffer(34962,t.handle),c?(Object(a.a)(Object(r.j)(f)),h.vertexAttribIPointer(e,i,o,s,l)):f.vertexAttribPointer(e,i,o,u,s,l),f.enableVertexAttribArray(e),h.vertexAttribDivisor(e,d||0)}),this}enable(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return!t&&0===e&&!A.isSupported(this.gl,{constantAttributeZero:!0})||(e=Number(e),this.bind(()=>t?this.gl.enableVertexAttribArray(e):this.gl.disableVertexAttribArray(e))),this}getConstantBuffer(e,t){const n=this._normalizeConstantArrayValue(t),r=n.byteLength*e,i=n.length*e;let o=!this.buffer;if(this.buffer=this.buffer||new c.a(this.gl,r),o=o||this.buffer.reallocate(r),o=o||!this._compareConstantArrayValues(n,this.bufferValue),o){const e=h(t.constructor,i);!function(e){let{target:t,source:n,start:r=0,count:i=1}=e;const o=n.length,a=i*o;let s=0;for(let e=r;s{switch(e){case 34373:return this.gl.getVertexAttribOffset(n,e);default:return this.gl.getVertexAttrib(n,e)}})}}var g=n(536);const m=/^(.+)__LOCATION_([0-9]+)$/,y=["setBuffers","setGeneric","clearBindings","setLocations","setGenericValues","setDivisor","enable","disable"];class v{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=t.id||t.program&&t.program.id;this.id=n,this.gl=e,this.configuration=null,this.elements=null,this.elementsAccessor=null,this.values=null,this.accessors=null,this.unused=null,this.drawParams=null,this.buffer=null,this.attributes={},this.vertexArrayObject=new A(e),Object(g.a)(this,"VertexArray","v6.0",y),this.initialize(t),Object.seal(this)}delete(){this.buffer&&this.buffer.delete(),this.vertexArrayObject.delete()}initialize(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.reset(),this.configuration=null,this.bindOnUse=!1,this.setProps(e)}reset(){this.elements=null,this.elementsAccessor=null;const{MAX_ATTRIBUTES:e}=this.vertexArrayObject;return this.values=new Array(e).fill(null),this.accessors=new Array(e).fill(null),this.unused={},this.drawParams=null,this}setProps(e){return"program"in e&&(this.configuration=e.program&&e.program.configuration),"configuration"in e&&(this.configuration=e.configuration),"attributes"in e&&this.setAttributes(e.attributes),"elements"in e&&this.setElementBuffer(e.elements),"bindOnUse"in e&&(e=e.bindOnUse),this}clearDrawParams(){this.drawParams=null}getDrawParams(){return this.drawParams=this.drawParams||this._updateDrawParams(),this.drawParams}setAttributes(e){return Object.assign(this.attributes,e),this.vertexArrayObject.bind(()=>{for(const t in e){const n=e[t];this._setAttribute(t,n)}this.gl.bindBuffer(34962,null)}),this}setElementBuffer(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.elements=e,this.elementsAccessor=t,this.clearDrawParams(),this.vertexArrayObject.setElementBuffer(e,t),this}setBuffer(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(34963===t.target)return this.setElementBuffer(t,n);const{location:r,accessor:i}=this._resolveLocationAndAccessor(e,t,t.accessor,n);return r>=0&&(this.values[r]=t,this.accessors[r]=i,this.clearDrawParams(),this.vertexArrayObject.setBuffer(r,t,i)),this}setConstant(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{location:r,accessor:i}=this._resolveLocationAndAccessor(e,t,Object.assign({size:t.length},n));return r>=0&&(t=this.vertexArrayObject._normalizeConstantArrayValue(t),this.values[r]=t,this.accessors[r]=i,this.clearDrawParams(),this.vertexArrayObject.enable(r,!1)),this}unbindBuffers(){return this.vertexArrayObject.bind(()=>{this.elements&&this.vertexArrayObject.setElementBuffer(null),this.buffer=this.buffer||new c.a(this.gl,{accessor:{size:4}});for(let e=0;e{this.elements&&this.setElementBuffer(this.elements);for(let e=0;e{this._setConstantAttributes(e,t),r=n()}),r}_resolveLocationAndAccessor(e,t,n,i){const o={location:-1,accessor:null},{location:s,name:l}=this._getAttributeIndex(e);if(!Number.isFinite(s)||s<0)return this.unused[e]=t,r.k.once(3,()=>"unused value ".concat(e," in ").concat(this.id))(),o;const c=this._getAttributeInfo(l||s);if(!c)return o;const d=this.accessors[s]||{},f=u.a.resolve(c.accessor,d,n,i),{size:h,type:p}=f;return Object(a.a)(Number.isFinite(h)&&Number.isFinite(p)),{location:s,accessor:f}}_getAttributeInfo(e){return this.configuration&&this.configuration.getAttributeInfo(e)}_getAttributeIndex(e){const t=Number(e);if(Number.isFinite(t))return{location:t};const n=m.exec(e),r=n?n[1]:e,i=n?Number(n[2]):0;return this.configuration?{location:this.configuration.getAttributeLocation(r)+i,name:r}:{location:-1}}_setAttribute(e,t){if(t instanceof c.a)this.setBuffer(e,t);else if(Array.isArray(t)&&t.length&&t[0]instanceof c.a){const n=t[0],r=t[1];this.setBuffer(e,n,r)}else if(ArrayBuffer.isView(t)||Array.isArray(t)){const n=t;this.setConstant(e,n)}else{if(!(t.buffer instanceof c.a))throw new Error("VertexArray: attributes must be Buffers or constants (i.e. typed array)");{const n=t;this.setBuffer(e,n.buffer,n)}}}_setConstantAttributes(e,t){const n=Math.max(0|e,0|t);let r=this.values[0];ArrayBuffer.isView(r)&&this._setConstantAttributeZero(r,n);for(let e=1;e0;if(e.isInstanced=e.isInstanced||o,n instanceof c.a){const t=n;if(o){const n=t.getVertexCount(r);e.instanceCount=Math.min(e.instanceCount,n)}else{const n=t.getVertexCount(r);e.vertexCount=Math.min(e.vertexCount,n)}}}setElements(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return r.k.deprecated("setElements","setElementBuffer")(),this.setElementBuffer(e,t)}}var b=n(1836),_=n(141),w=n(233);function x(e,t){const{maxElts:n=16,size:r=1}=t;let i="[";for(let o=0;o0&&(i+=",".concat(o%r==0?" ":"")),i+=M(e[o],t);const o=e.length>n?"...":"]";return"".concat(i).concat(o)}function M(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=1e-16,{isInteger:r=!1}=t;if(Array.isArray(e)||ArrayBuffer.isView(e))return x(e,t);if(!Number.isFinite(e))return String(e);if(Math.abs(e)100&&Math.abs(e)<1e4)return e.toFixed(0);const i=e.toPrecision(2),o=i.indexOf(".0");return o===i.length-2?i.slice(0,-1):i}function E(e,t,n,r){const{gl:i}=e;if(!t)return{[r]:"null","Format ":"N/A"};let o,a,s,l="NOT PROVIDED",u=1,d=0,f=0;if(n&&(l=n.type,u=n.size,l=String(l).replace("Array",""),o=-1!==l.indexOf("nt")),t instanceof c.a){const e=t,{data:c,changed:h}=e.getDebugData();let p;if(a=h?"*":"",s=c,f=e.byteLength,d=f/c.BYTES_PER_ELEMENT/u,n){const e=n.divisor>0;p="".concat(e?"I ":"P "," ").concat(d," (x").concat(u,"=").concat(f," bytes ").concat(Object(_.a)(i,l),")")}else o=!0,p="".concat(f," bytes");return{[r]:"".concat(a).concat(M(s,{size:u,isInteger:o})),"Format ":p}}return s=t,u=t.length,l=String(t.constructor.name).replace("Array",""),o=-1!==l.indexOf("nt"),{[r]:"".concat(M(s,{size:u,isInteger:o})," (constant)"),"Format ":"".concat(u,"x").concat(l," (constant)")}}function O(e,t){const{type:n,size:r}=t,i=Object(w.b)(n,r);return i?"".concat(e," (").concat(i.name,")"):e}function S(e){let{header:t="Uniforms",program:n,uniforms:r,undefinedOnly:i=!1}=e;Object(a.a)(n);const o=n._uniformSetters,s={},l=Object.keys(o).sort();let u=0;for(const e of l)e.match(".*_.*")||e.match(".*Matrix")||T({table:s,header:t,uniforms:r,uniformName:e,undefinedOnly:i})&&u++;for(const e of l)e.match(".*Matrix")&&T({table:s,header:t,uniforms:r,uniformName:e,undefinedOnly:i})&&u++;for(const e of l)s[e]||T({table:s,header:t,uniforms:r,uniformName:e,undefinedOnly:i})&&u++;let c=0;const d={};if(!i)for(const e in r){const n=r[e];s[e]||(c++,d[e]={Type:"NOT USED: ".concat(n),[t]:M(n)})}return{table:s,count:u,unusedTable:d,unusedCount:c}}function T(e){let{table:t,header:n,uniforms:r,uniformName:i,undefinedOnly:o}=e;const a=r[i],s=function(e){return null!=e}(a);return(!o||!s)&&(t[i]={[n]:s?M(a):"N/A","Uniform Type":s?a:"NOT PROVIDED"},!0)}function C(e){const{type:t,size:n}=e.accessor,r=Object(w.b)(t,n);return r?"".concat(r.name," ").concat(e.name):e.name}const L={POSITION:"positions",NORMAL:"normals",COLOR_0:"colors",TEXCOORD_0:"texCoords",TEXCOORD_1:"texCoords1",TEXCOORD_2:"texCoords2"};function P(e,t){const{attributeMap:n=L}=t||{};return n&&n[e]||e}function I(e,t){let n;switch(e){case"texCoords":case"texCoord1":case"texCoord2":case"texCoord3":n="uvs";break;case"vertices":case"positions":case"normals":case"pickingColors":n="vectors"}switch(n){case"vectors":t.size=t.size||3;break;case"uvs":t.size=t.size||2}Object(a.a)(Number.isFinite(t.size),"attribute ".concat(e," needs size"))}const D=()=>{},k={};class R{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{id:n=Object(o.c)("model")}=t;Object(a.a)(Object(r.i)(e)),this.id=n,this.gl=e,this.id=t.id||Object(o.c)("Model"),this.lastLogTime=0,this.animated=!1,this.initialize(t)}initialize(e){this.props={},this.programManager=e.programManager||i.a.getDefaultProgramManager(this.gl),this._programManagerState=-1,this._managedProgram=!1;const{program:t=null,vs:n,fs:r,modules:o,defines:s,inject:l,varyings:u,bufferMode:c,transpileToGLSL100:d}=e;this.programProps={program:t,vs:n,fs:r,modules:o,defines:s,inject:l,varyings:u,bufferMode:c,transpileToGLSL100:d},this.program=null,this.vertexArray=null,this._programDirty=!0,this.userData={},this.needsRedraw=!0,this._attributes={},this.attributes={},this.uniforms={},this.pickable=!0,this._checkProgram(),this.setUniforms(Object.assign({},this.getModuleUniforms(e.moduleSettings))),this.drawMode=void 0!==e.drawMode?e.drawMode:4,this.vertexCount=e.vertexCount||0,this.geometryBuffers={},this.isInstanced=e.isInstanced||e.instanced||e.instanceCount>0,this._setModelProps(e),this.geometry={},Object(a.a)(void 0!==this.drawMode&&Number.isFinite(this.vertexCount),"Model needs drawMode and vertexCount")}setProps(e){this._setModelProps(e)}delete(){for(const e in this._attributes)this._attributes[e]!==this.attributes[e]&&this._attributes[e].delete();this._managedProgram&&(this.programManager.release(this.program),this._managedProgram=!1),this.vertexArray.delete(),this._deleteGeometryBuffers()}getDrawMode(){return this.drawMode}getVertexCount(){return this.vertexCount}getInstanceCount(){return this.instanceCount}getAttributes(){return this.attributes}getProgram(){return this.program}setProgram(e){const{program:t,vs:n,fs:r,modules:i,defines:o,inject:a,varyings:s,bufferMode:l,transpileToGLSL100:u}=e;this.programProps={program:t,vs:n,fs:r,modules:i,defines:o,inject:a,varyings:s,bufferMode:l,transpileToGLSL100:u},this._programDirty=!0}getUniforms(){return this.uniforms}setDrawMode(e){return this.drawMode=e,this}setVertexCount(e){return Object(a.a)(Number.isFinite(e)),this.vertexCount=e,this}setInstanceCount(e){return Object(a.a)(Number.isFinite(e)),this.instanceCount=e,this}setGeometry(e){return this.drawMode=e.drawMode,this.vertexCount=e.getVertexCount(),this._deleteGeometryBuffers(),this.geometryBuffers=function(e,t,n){const r={};let i=t.indices;for(const o in t.attributes){const a=t.attributes[o],s=P(o,n);if("indices"===o)i=a;else if(a.constant)r[s]=a.value;else{const t=a.value,n={...a};delete n.value,r[s]=[new c.a(e,t),n],I(o,n)}}if(i){const t=i.value||i;Object(a.a)(t instanceof Uint16Array||t instanceof Uint32Array,'attribute array for "indices" must be of integer type');const n={size:1,isIndexed:void 0===i.isIndexed||i.isIndexed};r.indices=[new c.a(e,{data:t,target:34963}),n]}return r}(this.gl,e),this.vertexArray.setAttributes(this.geometryBuffers),this}setAttributes(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(Object(o.a)(e))return this;const t={};for(const n in e){const r=e[n];t[n]=r.getValue?r.getValue():r}return this.vertexArray.setAttributes(t),this}setUniforms(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object.assign(this.uniforms,e),this}getModuleUniforms(e){this._checkProgram();const t=this.programManager.getUniforms(this.program);return t?t(e):{}}updateModuleSettings(e){const t=this.getModuleUniforms(e||{});return this.setUniforms(t)}clear(e){return Object(s.a)(this.program.gl,e),this}draw(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this._checkProgram();const{moduleSettings:t=null,framebuffer:n,uniforms:i={},attributes:o={},transformFeedback:a=this.transformFeedback,parameters:s={},vertexArray:l=this.vertexArray}=e;let u;this.setAttributes(o),this.updateModuleSettings(t),this.setUniforms(i),r.k.priority>=2&&(u=this._logDrawCallStart(2));const c=this.vertexArray.getDrawParams(),{isIndexed:d=c.isIndexed,indexType:f=c.indexType,indexOffset:h=c.indexOffset,vertexArrayInstanced:p=c.isInstanced}=this.props;p&&!this.isInstanced&&r.k.warn("Found instanced attributes on non-instanced model",this.id)();const{isInstanced:A,instanceCount:g}=this,{onBeforeRender:m=D,onAfterRender:y=D}=this.props;m(),this.program.setUniforms(this.uniforms);const v=this.program.draw(Object.assign(k,e,{logPriority:u,uniforms:null,framebuffer:n,parameters:s,drawMode:this.getDrawMode(),vertexCount:this.getVertexCount(),vertexArray:l,transformFeedback:a,isIndexed:d,indexType:f,isInstanced:A,instanceCount:g,offset:d?h:0}));return y(),r.k.priority>=2&&this._logDrawCallEnd(u,l,n),v}transform(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{discard:t=!0,feedbackBuffers:n,unbindModels:r=[]}=e;let{parameters:i}=e;n&&this._setFeedbackBuffers(n),t&&(i=Object.assign({},i,{35977:t})),r.forEach(e=>e.vertexArray.unbindBuffers());try{this.draw(Object.assign({},e,{parameters:i}))}finally{r.forEach(e=>e.vertexArray.bindBuffers())}return this}render(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return r.k.warn("Model.render() is deprecated. Use Model.setUniforms() and Model.draw()")(),this.setUniforms(e).draw()}_setModelProps(e){Object.assign(this.props,e),"uniforms"in e&&this.setUniforms(e.uniforms),"pickable"in e&&(this.pickable=e.pickable),"instanceCount"in e&&(this.instanceCount=e.instanceCount),"geometry"in e&&this.setGeometry(e.geometry),"attributes"in e&&this.setAttributes(e.attributes),"_feedbackBuffers"in e&&this._setFeedbackBuffers(e._feedbackBuffers)}_checkProgram(){if(!(this._programDirty||this.programManager.stateHash!==this._programManagerState))return;let{program:e}=this.programProps;if(e)this._managedProgram=!1;else{const{vs:t,fs:n,modules:r,inject:i,defines:o,varyings:a,bufferMode:s,transpileToGLSL100:l}=this.programProps;e=this.programManager.get({vs:t,fs:n,modules:r,inject:i,defines:o,varyings:a,bufferMode:s,transpileToGLSL100:l}),this.program&&this._managedProgram&&this.programManager.release(this.program),this._programManagerState=this.programManager.stateHash,this._managedProgram=!0}Object(a.a)(e instanceof l.a,"Model needs a program"),this._programDirty=!1,e!==this.program&&(this.program=e,this.vertexArray?this.vertexArray.setProps({program:this.program,attributes:this.vertexArray.attributes}):this.vertexArray=new v(this.gl,{program:this.program}),this.setUniforms(Object.assign({},this.getModuleUniforms())))}_deleteGeometryBuffers(){for(const e in this.geometryBuffers){const t=this.geometryBuffers[e][0]||this.geometryBuffers[e];t instanceof c.a&&t.delete()}}_setAnimationProps(e){this.animated&&Object(a.a)(e,"Model.draw(): animated uniforms but no animationProps")}_setFeedbackBuffers(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(Object(o.a)(e))return this;const{gl:t}=this.program;return this.transformFeedback=this.transformFeedback||new b.a(t,{program:this.program}),this.transformFeedback.setBuffers(e),this}_logDrawCallStart(e){const t=e>3?0:1e4;if(!(Date.now()-this.lastLogTime>> DRAWING MODEL ".concat(this.id),{collapsed:r.k.level<=2})(),e}_logDrawCallEnd(e,t,n,i){if(void 0===e)return;const o=function(e){let{vertexArray:t,header:n="Attributes"}=e;if(!t.configuration)return{};const r={};t.elements&&(r.ELEMENT_ARRAY_BUFFER=E(t,t.elements,null,n));const i=t.values;for(const e in i){const o=t._getAttributeInfo(e);if(o){let a="".concat(e,": ").concat(o.name);const s=t.accessors[o.location];s&&(a="".concat(e,": ").concat(O(o.name,s))),r[a]=E(t,i[e],s,n)}}return r}({vertexArray:t,header:"".concat(this.id," attributes"),attributes:this._attributes}),{table:a,unusedTable:s,unusedCount:l}=S({header:"".concat(this.id," uniforms"),program:this.program,uniforms:Object.assign({},this.program.uniforms,n)}),{table:u,count:c}=S({header:"".concat(this.id," uniforms"),program:this.program,uniforms:Object.assign({},this.program.uniforms,n),undefinedOnly:!0});c>0&&r.k.log("MISSING UNIFORMS",Object.keys(u))(),l>0&&r.k.log("UNUSED UNIFORMS",Object.keys(s))();const d=function(e){const t={},n="Accessors for ".concat(e.id);for(const r of e.attributeInfos)if(r){const e=C(r);t["in ".concat(e)]={[n]:JSON.stringify(r.accessor)}}for(const r of e.varyingInfos)if(r){const e=C(r);t["out ".concat(e)]={[n]:JSON.stringify(r.accessor)}}return t}(this.vertexArray.configuration);r.k.table(e,o)(),r.k.table(e,a)(),r.k.table(e+1,d)(),i&&i.log({logLevel:2,message:"Rendered to ".concat(i.id)}),r.k.groupEnd(2)()}}},function(e,t,n){"use strict";var r=n(0),i=n.n(r),o=n(58),a=n(2),s=n.n(a);function l(e){return e.getBoundingClientRect()}function u(e,t){return{get collidedTop(){return l(e).topl(t).bottom},get collidedLeft(){return l(e).leftl(t).right},get overflowTop(){return l(t).top-l(e).top},get overflowBottom(){return l(e).bottom-l(t).bottom},get overflowLeft(){return l(t).left-l(e).left},get overflowRight(){return l(e).right-l(t).right}}}var c,d=n(434),f=(c=function(e,t){return(c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}c(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),h=function(){return(h=Object.assign||function(e){for(var t,n=1,r=arguments.length;nL,t=l.getPropertyValue(E),n=t?parseInt(t,10):null;function i(e){Object(d.a)(!n||e>=n,"'s child will not fit anywhere with its current ".concat(E," of ").concat(n,"px."));var t=Math.max(e,n||0);Object(d.a)(!1,"'s child needed to have its ".concat(m," decreased to ").concat(t,"px.")),r.style[m]="".concat(t,"px")}e?(i(T),I()):(i(L),D())}()}function I(){r.style[A]="auto",r.style[g]=o?"0":"100%"}function D(){r.style[A]=o?"0":"100%",r.style[g]="auto"}function k(e,t){var n=P<=e;return n&&t(),n}function R(){return k(T,I)}function j(){return k(L,D)}}function _(e){var t=e.invertAxis,n=e.invertSecondaryAxis,r=p(e,["invertAxis","invertSecondaryAxis"]);!function(e){b(e)}(h(h({},r),{invertAxis:t})),function(e){b(h(h({},e),{axis:"x"===e.axis?"y":"x",secondary:!0}))}(h(h({},r),{invertAxis:n}))}var w=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.fit=function(){var e=t,n=e.scrollContainer,r=e.container,i=e.element;if(n&&r&&i){var o=i.clientWidth,a=i.clientHeight;if(t.elementWidth!==o||t.elementHeight!==a){t.elementWidth=o,t.elementHeight=a;var s=r.parentElement;if(s){"absolute"!==window.getComputedStyle(i).position&&(i.style.position="absolute");var l=window.getComputedStyle(s).position;"relative"!==l&&"absolute"!==l&&(s.style.position="relative");var u=t.props,c=u.invertAxis,d=u.invertSecondaryAxis,f=u.mainAxis,h=void 0===f?"y":f,p=u.spacing;_({container:r,element:i,invertAxis:c,invertSecondaryAxis:d,axis:h,scrollContainer:n,spacing:void 0===p?8:p})}}}},t}return f(t,e),t.prototype.componentDidMount=function(){var e=this;if(!g){var t=Object(o.findDOMNode)(this);if(!(t&&t instanceof HTMLElement))return;this.container=t,this.element=t,this.scrollContainer=v(t)}this.fit();m&&this.element&&new MutationObserver((function(){e.fit()})).observe(this.element,{attributes:!0,attributeFilter:["class","style"]})},t.prototype.render=function(){var e=this,t=this.props.children,n=i.a.Children.only(t);return g?i.a.createElement("span",{ref:function(t){e.container=t;var n=t&&t.firstElementChild;n&&n instanceof HTMLElement&&(e.element=n,e.scrollContainer=v(n))},style:{display:"contents"}},n):n},t.propTypes={children:s.a.node.isRequired,invertAxis:s.a.bool,invertSecondaryAxis:s.a.bool,mainAxis:s.a.oneOf(["x","y"]),spacing:s.a.oneOfType([s.a.number,s.a.shape({bottom:s.a.number.isRequired,left:s.a.number.isRequired,right:s.a.number.isRequired,top:s.a.number.isRequired})])},t}(r.Component);t.a=w},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=Math.PI/3,i=[0,r,2*r,3*r,4*r,5*r];function o(e){return e[0]}function a(e){return e[1]}var s=function(){var e,t,n,s=0,l=0,u=1,c=1,d=o,f=a;function h(e){var r,i={},o=[],a=e.length;for(r=0;r1){var A=l-h,g=h+(ly*y+v*v&&(h=g+(1&c?1:-1)/2,c=m)}var b=h+"-"+c,_=i[b];_?_.push(s):(o.push(_=i[b]=[s]),_.x=(h+(1&c)/2)*t,_.y=c*n)}return o}function p(e){var t=0,n=0;return i.map((function(r){var i=Math.sin(r)*e,o=-Math.cos(r)*e,a=i-t,s=o-n;return t=i,n=o,[a,s]}))}return h.hexagon=function(t){return"m"+p(null==t?e:+t).join("l")+"z"},h.centers=function(){for(var r=[],i=Math.round(l/n),o=Math.round(s/t),a=i*n;a1&&void 0!==arguments[1]?arguments[1]:{};const s={};t&&(s.framebuffer=t);let l=0;n&&(l|=16384,!0!==n&&(s.clearColor=n)),o&&(l|=256,!0!==o&&(s.clearDepth=o)),a&&(l|=1024,!0!==o&&(s.clearStencil=o)),Object(i.a)(0!==l,"clear: bad arguments"),Object(r.o)(e,s,()=>{e.clear(l)})}function s(e){let{framebuffer:t=null,buffer:n=o,drawBuffer:a=0,value:s=[0,0,0,0]}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Object(r.a)(e),Object(r.o)(e,{framebuffer:t},()=>{switch(n){case o:switch(s.constructor){case Int32Array:e.clearBufferiv(n,a,s);break;case Uint32Array:e.clearBufferuiv(n,a,s);break;case Float32Array:default:e.clearBufferfv(n,a,s)}break;case 6145:e.clearBufferfv(6145,0,[s]);break;case 6146:e.clearBufferiv(6146,0,[s]);break;case 34041:const[t,r]=s;e.clearBufferfi(34041,0,t,r);break;default:Object(i.a)(!1,"clear: bad arguments")}})}},function(e,t,n){"use strict";n.d(t,"a",(function(){return a})),n.d(t,"b",(function(){return s}));var r=n(149),i=n(104),o=n(273);function a(e){const t=e.version!==o.b?` (worker-utils@${o.b})`:"";return`${e.name}@${e.version}${t}`}function s(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=t[e.id]||{},a=i.a?e.id+"-worker.js":e.id+"-worker-node.js";let s=n.workerUrl;if(s||"compression"!==e.id||(s=t.workerUrl),"test"===t._workerType&&(s=i.a?`modules/${e.module}/dist/${a}`:`modules/${e.module}/src/workers/${e.id}-worker-node.ts`),!s){let t=e.version;"latest"===t&&(t=o.a);const n=t?"@"+t:"";s=`https://unpkg.com/@loaders.gl/${e.module}${n}/dist/${a}`}return Object(r.a)(s),s}},function(e,t,n){!function(e){"use strict";function t(){}function n(e){this.message=e||""}function r(e){this.message=e||""}function i(e){this.message=e||""}function o(){}function a(e){return null===e?ke:e.color}function s(e){return null===e?null:e.parent}function l(e,t){null!==e&&(e.color=t)}function u(e){return null===e?null:e.left}function c(e){return null===e?null:e.right}function d(){this.root_=null,this.size_=0}function f(){}function h(){this.array_=[],arguments[0]instanceof be&&this.addAll(arguments[0])}function p(){}function A(e){this.message=e||""}function g(){this.array_=[]}"fill"in Array.prototype||Object.defineProperty(Array.prototype,"fill",{configurable:!0,value:function(e){if(null==this)throw new TypeError(this+" is not an object");var t=Object(this),n=Math.max(Math.min(t.length,9007199254740991),0)||0,r=1 in arguments&&parseInt(Number(arguments[1]),10)||0;r=r<0?Math.max(n+r,0):Math.min(r,n);var i=2 in arguments&&void 0!==arguments[2]?parseInt(Number(arguments[2]),10)||0:n;for(i=i<0?Math.max(n+arguments[2],0):Math.min(i,n);rt.x?1:this.yt.y?1:0},M.prototype.clone=function(){},M.prototype.copy=function(){return new M(this)},M.prototype.toString=function(){return"("+this.x+", "+this.y+", "+this.z+")"},M.prototype.distance3D=function(e){var t=this.x-e.x,n=this.y-e.y,r=this.z-e.z;return Math.sqrt(t*t+n*n+r*r)},M.prototype.distance=function(e){var t=this.x-e.x,n=this.y-e.y;return Math.sqrt(t*t+n*n)},M.prototype.hashCode=function(){var e=17;return 37*(e=37*e+M.hashCode(this.x))+M.hashCode(this.y)},M.prototype.setCoordinate=function(e){this.x=e.x,this.y=e.y,this.z=e.z},M.prototype.interfaces_=function(){return[_,w,t]},M.prototype.getClass=function(){return M},M.hashCode=function(){if(1===arguments.length){var e=arguments[0],t=v.doubleToLongBits(e);return Math.trunc((t^t)>>>32)}},E.DimensionalComparator.get=function(){return O},E.serialVersionUID.get=function(){return 0x5cbf2c235c7e5800},E.NULL_ORDINATE.get=function(){return v.NaN},E.X.get=function(){return 0},E.Y.get=function(){return 1},E.Z.get=function(){return 2},Object.defineProperties(M,E);var O=function(e){if(this._dimensionsToTest=2,0===arguments.length);else if(1===arguments.length){var t=arguments[0];if(2!==t&&3!==t)throw new y("only 2 or 3 dimensions may be specified");this._dimensionsToTest=t}};O.prototype.compare=function(e,t){var n=e,r=t,i=O.compare(n.x,r.x);if(0!==i)return i;var o=O.compare(n.y,r.y);return 0!==o?o:this._dimensionsToTest<=2?0:O.compare(n.z,r.z)},O.prototype.interfaces_=function(){return[x]},O.prototype.getClass=function(){return O},O.compare=function(e,t){return et?1:v.isNaN(e)?v.isNaN(t)?0:-1:v.isNaN(t)?1:0};var S=function(){};S.prototype.create=function(){},S.prototype.interfaces_=function(){return[]},S.prototype.getClass=function(){return S};var T=function(){},C={INTERIOR:{configurable:!0},BOUNDARY:{configurable:!0},EXTERIOR:{configurable:!0},NONE:{configurable:!0}};T.prototype.interfaces_=function(){return[]},T.prototype.getClass=function(){return T},T.toLocationSymbol=function(e){switch(e){case T.EXTERIOR:return"e";case T.BOUNDARY:return"b";case T.INTERIOR:return"i";case T.NONE:return"-"}throw new y("Unknown location value: "+e)},C.INTERIOR.get=function(){return 0},C.BOUNDARY.get=function(){return 1},C.EXTERIOR.get=function(){return 2},C.NONE.get=function(){return-1},Object.defineProperties(T,C);var L=function(e,t){return e.interfaces_&&e.interfaces_().indexOf(t)>-1},P=function(){},I={LOG_10:{configurable:!0}};P.prototype.interfaces_=function(){return[]},P.prototype.getClass=function(){return P},P.log10=function(e){var t=Math.log(e);return v.isInfinite(t)||v.isNaN(t)?t:t/P.LOG_10},P.min=function(e,t,n,r){var i=e;return tn?n:e}if(Number.isInteger(arguments[2])&&Number.isInteger(arguments[0])&&Number.isInteger(arguments[1])){var r=arguments[0],i=arguments[1],o=arguments[2];return ro?o:r}},P.wrap=function(e,t){return e<0?t- -e%t:e%t},P.max=function(){if(3===arguments.length){var e=arguments[0],t=arguments[1],n=arguments[2],r=e;return t>r&&(r=t),n>r&&(r=n),r}if(4===arguments.length){var i=arguments[0],o=arguments[1],a=arguments[2],s=arguments[3],l=i;return o>l&&(l=o),a>l&&(l=a),s>l&&(l=s),l}},P.average=function(e,t){return(e+t)/2},I.LOG_10.get=function(){return Math.log(10)},Object.defineProperties(P,I);var D=function(e){this.str=e};D.prototype.append=function(e){this.str+=e},D.prototype.setCharAt=function(e,t){this.str=this.str.substr(0,e)+t+this.str.substr(e+1)},D.prototype.toString=function(e){return this.str};var k=function(e){this.value=e};k.prototype.intValue=function(){return this.value},k.prototype.compareTo=function(e){return this.valuee?1:0},k.isNaN=function(e){return Number.isNaN(e)};var R=function(){};R.isWhitespace=function(e){return e<=32&&e>=0||127===e},R.toUpperCase=function(e){return e.toUpperCase()};var j=function e(){if(this._hi=0,this._lo=0,0===arguments.length)this.init(0);else if(1===arguments.length){if("number"==typeof arguments[0]){var t=arguments[0];this.init(t)}else if(arguments[0]instanceof e){var n=arguments[0];this.init(n)}else if("string"==typeof arguments[0]){var r=arguments[0];e.call(this,e.parse(r))}}else if(2===arguments.length){var i=arguments[0],o=arguments[1];this.init(i,o)}},F={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}};j.prototype.le=function(e){return(this._hi9?(c=!0,d="9"):d="0"+u,a.append(d),n=n.subtract(j.valueOf(u)).multiply(j.TEN),c&&n.selfAdd(j.TEN);var f=!0,h=j.magnitude(n._hi);if(h<0&&Math.abs(h)>=s-l&&(f=!1),!f)break}return t[0]=r,a.toString()},j.prototype.sqr=function(){return this.multiply(this)},j.prototype.doubleValue=function(){return this._hi+this._lo},j.prototype.subtract=function(){if(arguments[0]instanceof j){var e=arguments[0];return this.add(e.negate())}if("number"==typeof arguments[0]){var t=arguments[0];return this.add(-t)}},j.prototype.equals=function(){if(1===arguments.length){var e=arguments[0];return this._hi===e._hi&&this._lo===e._lo}},j.prototype.isZero=function(){return 0===this._hi&&0===this._lo},j.prototype.selfSubtract=function(){if(arguments[0]instanceof j){var e=arguments[0];return this.isNaN()?this:this.selfAdd(-e._hi,-e._lo)}if("number"==typeof arguments[0]){var t=arguments[0];return this.isNaN()?this:this.selfAdd(-t,0)}},j.prototype.getSpecialNumberString=function(){return this.isZero()?"0.0":this.isNaN()?"NaN ":null},j.prototype.min=function(e){return this.le(e)?this:e},j.prototype.selfDivide=function(){if(1===arguments.length){if(arguments[0]instanceof j){var e=arguments[0];return this.selfDivide(e._hi,e._lo)}if("number"==typeof arguments[0]){var t=arguments[0];return this.selfDivide(t,0)}}else if(2===arguments.length){var n=arguments[0],r=arguments[1],i=null,o=null,a=null,s=null,l=null,u=null,c=null,d=null;return l=this._hi/n,d=(i=(u=j.SPLIT*l)-(i=u-l))*(a=(d=j.SPLIT*n)-(a=d-n))-(c=l*n)+i*(s=n-a)+(o=l-i)*a+o*s,d=l+(u=(this._hi-c-d+this._lo-l*r)/n),this._hi=d,this._lo=l-d+u,this}},j.prototype.dump=function(){return"DD<"+this._hi+", "+this._lo+">"},j.prototype.divide=function(){if(arguments[0]instanceof j){var e=arguments[0],t=null,n=null,r=null,i=null,o=null,a=null,s=null,l=null;return n=(o=this._hi/e._hi)-(t=(a=j.SPLIT*o)-(t=a-o)),l=t*(r=(l=j.SPLIT*e._hi)-(r=l-e._hi))-(s=o*e._hi)+t*(i=e._hi-r)+n*r+n*i,a=(this._hi-s-l+this._lo-o*e._lo)/e._hi,new j(l=o+a,o-l+a)}if("number"==typeof arguments[0]){var u=arguments[0];return v.isNaN(u)?j.createNaN():j.copy(this).selfDivide(u,0)}},j.prototype.ge=function(e){return(this._hi>e._hi||this._hi===e._hi)&&this._lo>=e._lo},j.prototype.pow=function(e){if(0===e)return j.valueOf(1);var t=new j(this),n=j.valueOf(1),r=Math.abs(e);if(r>1)for(;r>0;)r%2==1&&n.selfMultiply(t),(r/=2)>0&&(t=t.sqr());else n=t;return e<0?n.reciprocal():n},j.prototype.ceil=function(){if(this.isNaN())return j.NaN;var e=Math.ceil(this._hi),t=0;return e===this._hi&&(t=Math.ceil(this._lo)),new j(e,t)},j.prototype.compareTo=function(e){var t=e;return this._hit._hi?1:this._lot._lo?1:0},j.prototype.rint=function(){return this.isNaN()?this:this.add(.5).floor()},j.prototype.setValue=function(){if(arguments[0]instanceof j){var e=arguments[0];return this.init(e),this}if("number"==typeof arguments[0]){var t=arguments[0];return this.init(t),this}},j.prototype.max=function(e){return this.ge(e)?this:e},j.prototype.sqrt=function(){if(this.isZero())return j.valueOf(0);if(this.isNegative())return j.NaN;var e=1/Math.sqrt(this._hi),t=this._hi*e,n=j.valueOf(t),r=this.subtract(n.sqr())._hi*(.5*e);return n.add(r)},j.prototype.selfAdd=function(){if(1===arguments.length){if(arguments[0]instanceof j){var e=arguments[0];return this.selfAdd(e._hi,e._lo)}if("number"==typeof arguments[0]){var t=arguments[0],n=null,r=null,i=null,o=null,a=null,s=null;return o=(i=this._hi+t)-(a=i-this._hi),r=(s=(o=t-a+(this._hi-o))+this._lo)+(i-(n=i+s)),this._hi=n+r,this._lo=r+(n-this._hi),this}}else if(2===arguments.length){var l=arguments[0],u=arguments[1],c=null,d=null,f=null,h=null,p=null,A=null,g=null;h=this._hi+l,d=this._lo+u,p=h-(A=h-this._hi),f=d-(g=d-this._lo);var m=(c=h+(A=(p=l-A+(this._hi-p))+d))+(A=(f=u-g+(this._lo-f))+(A+(h-c))),y=A+(c-m);return this._hi=m,this._lo=y,this}},j.prototype.selfMultiply=function(){if(1===arguments.length){if(arguments[0]instanceof j){var e=arguments[0];return this.selfMultiply(e._hi,e._lo)}if("number"==typeof arguments[0]){var t=arguments[0];return this.selfMultiply(t,0)}}else if(2===arguments.length){var n=arguments[0],r=arguments[1],i=null,o=null,a=null,s=null,l=null,u=null;i=(l=j.SPLIT*this._hi)-this._hi,u=j.SPLIT*n,i=l-i,o=this._hi-i,a=u-n;var c=(l=this._hi*n)+(u=i*(a=u-a)-l+i*(s=n-a)+o*a+o*s+(this._hi*r+this._lo*n)),d=u+(i=l-c);return this._hi=c,this._lo=d,this}},j.prototype.selfSqr=function(){return this.selfMultiply(this)},j.prototype.floor=function(){if(this.isNaN())return j.NaN;var e=Math.floor(this._hi),t=0;return e===this._hi&&(t=Math.floor(this._lo)),new j(e,t)},j.prototype.negate=function(){return this.isNaN()?this:new j(-this._hi,-this._lo)},j.prototype.clone=function(){},j.prototype.multiply=function(){if(arguments[0]instanceof j){var e=arguments[0];return e.isNaN()?j.createNaN():j.copy(this).selfMultiply(e)}if("number"==typeof arguments[0]){var t=arguments[0];return v.isNaN(t)?j.createNaN():j.copy(this).selfMultiply(t,0)}},j.prototype.isNaN=function(){return v.isNaN(this._hi)},j.prototype.intValue=function(){return Math.trunc(this._hi)},j.prototype.toString=function(){var e=j.magnitude(this._hi);return e>=-3&&e<=20?this.toStandardNotation():this.toSciNotation()},j.prototype.toStandardNotation=function(){var e=this.getSpecialNumberString();if(null!==e)return e;var t=new Array(1).fill(null),n=this.extractSignificantDigits(!0,t),r=t[0]+1,i=n;if("."===n.charAt(0))i="0"+n;else if(r<0)i="0."+j.stringOfChar("0",-r)+n;else if(-1===n.indexOf(".")){var o=r-n.length;i=n+j.stringOfChar("0",o)+".0"}return this.isNegative()?"-"+i:i},j.prototype.reciprocal=function(){var e,t,n,r,i=null,o=null,a=null,s=null;e=(n=1/this._hi)-(i=(a=j.SPLIT*n)-(i=a-n)),o=(s=j.SPLIT*this._hi)-this._hi;var l=n+(a=(1-(r=n*this._hi)-(s=i*(o=s-o)-r+i*(t=this._hi-o)+e*o+e*t)-n*this._lo)/this._hi);return new j(l,n-l+a)},j.prototype.toSciNotation=function(){if(this.isZero())return j.SCI_NOT_ZERO;var e=this.getSpecialNumberString();if(null!==e)return e;var t=new Array(1).fill(null),n=this.extractSignificantDigits(!1,t),r=j.SCI_NOT_EXPONENT_CHAR+t[0];if("0"===n.charAt(0))throw new Error("Found leading zero: "+n);var i="";n.length>1&&(i=n.substring(1));var o=n.charAt(0)+"."+i;return this.isNegative()?"-"+o+r:o+r},j.prototype.abs=function(){return this.isNaN()?j.NaN:this.isNegative()?this.negate():new j(this)},j.prototype.isPositive=function(){return(this._hi>0||0===this._hi)&&this._lo>0},j.prototype.lt=function(e){return(this._hie._hi||this._hi===e._hi)&&this._lo>e._lo},j.prototype.isNegative=function(){return(this._hi<0||0===this._hi)&&this._lo<0},j.prototype.trunc=function(){return this.isNaN()?j.NaN:this.isPositive()?this.floor():this.ceil()},j.prototype.signum=function(){return this._hi>0?1:this._hi<0?-1:this._lo>0?1:this._lo<0?-1:0},j.prototype.interfaces_=function(){return[t,_,w]},j.prototype.getClass=function(){return j},j.sqr=function(e){return j.valueOf(e).selfMultiply(e)},j.valueOf=function(){if("string"==typeof arguments[0]){var e=arguments[0];return j.parse(e)}if("number"==typeof arguments[0]){var t=arguments[0];return new j(t)}},j.sqrt=function(e){return j.valueOf(e).sqrt()},j.parse=function(e){for(var t=0,n=e.length;R.isWhitespace(e.charAt(t));)t++;var r=!1;if(t=n);){var u=e.charAt(t);if(t++,R.isDigit(u)){var c=u-"0";o.selfMultiply(j.TEN),o.selfAdd(c),a++}else{if("."!==u){if("e"===u||"E"===u){var d=e.substring(t);try{l=k.parseInt(d)}catch(t){throw t instanceof Error?new Error("Invalid exponent "+d+" in string "+e):t}break}throw new Error("Unexpected character '"+u+"' at position "+t+" in string "+e)}s=a}}var f=o,h=a-s-l;if(0===h)f=o;else if(h>0){var p=j.TEN.pow(h);f=o.divide(p)}else if(h<0){var A=j.TEN.pow(-h);f=o.multiply(A)}return r?f.negate():f},j.createNaN=function(){return new j(v.NaN,v.NaN)},j.copy=function(e){return new j(e)},j.magnitude=function(e){var t=Math.abs(e),n=Math.log(t)/Math.log(10),r=Math.trunc(Math.floor(n));return 10*Math.pow(10,r)<=t&&(r+=1),r},j.stringOfChar=function(e,t){for(var n=new D,r=0;r0){if(o<=0)return N.signum(a);r=i+o}else{if(!(i<0))return N.signum(a);if(o>=0)return N.signum(a);r=-i-o}var s=N.DP_SAFE_EPSILON*r;return a>=s||-a>=s?N.signum(a):2},N.signum=function(e){return e>0?1:e<0?-1:0},B.DP_SAFE_EPSILON.get=function(){return 1e-15},Object.defineProperties(N,B);var z=function(){},U={X:{configurable:!0},Y:{configurable:!0},Z:{configurable:!0},M:{configurable:!0}};U.X.get=function(){return 0},U.Y.get=function(){return 1},U.Z.get=function(){return 2},U.M.get=function(){return 3},z.prototype.setOrdinate=function(e,t,n){},z.prototype.size=function(){},z.prototype.getOrdinate=function(e,t){},z.prototype.getCoordinate=function(){},z.prototype.getCoordinateCopy=function(e){},z.prototype.getDimension=function(){},z.prototype.getX=function(e){},z.prototype.clone=function(){},z.prototype.expandEnvelope=function(e){},z.prototype.copy=function(){},z.prototype.getY=function(e){},z.prototype.toCoordinateArray=function(){},z.prototype.interfaces_=function(){return[w]},z.prototype.getClass=function(){return z},Object.defineProperties(z,U);var H=function(){},V=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}(H),G=function(){};G.arraycopy=function(e,t,n,r,i){for(var o=0,a=t;ae._minx?this._minx:e._minx,n=this._miny>e._miny?this._miny:e._miny,r=this._maxx=this._minx&&t.getMaxX()<=this._maxx&&t.getMinY()>=this._miny&&t.getMaxY()<=this._maxy}}else if(2===arguments.length){var n=arguments[0],r=arguments[1];return!this.isNull()&&n>=this._minx&&n<=this._maxx&&r>=this._miny&&r<=this._maxy}},W.prototype.intersects=function(){if(1===arguments.length){if(arguments[0]instanceof W){var e=arguments[0];return!this.isNull()&&!e.isNull()&&!(e._minx>this._maxx||e._maxxthis._maxy||e._maxythis._maxx||nthis._maxy||rthis._maxx&&(this._maxx=t._maxx),t._minythis._maxy&&(this._maxy=t._maxy))}}else if(2===arguments.length){var n=arguments[0],r=arguments[1];this.isNull()?(this._minx=n,this._maxx=n,this._miny=r,this._maxy=r):(nthis._maxx&&(this._maxx=n),rthis._maxy&&(this._maxy=r))}},W.prototype.minExtent=function(){if(this.isNull())return 0;var e=this.getWidth(),t=this.getHeight();return et._minx?1:this._minyt._miny?1:this._maxxt._maxx?1:this._maxyt._maxy?1:0},W.prototype.translate=function(e,t){if(this.isNull())return null;this.init(this.getMinX()+e,this.getMaxX()+e,this.getMinY()+t,this.getMaxY()+t)},W.prototype.toString=function(){return"Env["+this._minx+" : "+this._maxx+", "+this._miny+" : "+this._maxy+"]"},W.prototype.setToNull=function(){this._minx=0,this._maxx=-1,this._miny=0,this._maxy=-1},W.prototype.getHeight=function(){return this.isNull()?0:this._maxy-this._miny},W.prototype.maxExtent=function(){if(this.isNull())return 0;var e=this.getWidth(),t=this.getHeight();return e>t?e:t},W.prototype.expandBy=function(){if(1===arguments.length){var e=arguments[0];this.expandBy(e,e)}else if(2===arguments.length){var t=arguments[0],n=arguments[1];if(this.isNull())return null;this._minx-=t,this._maxx+=t,this._miny-=n,this._maxy+=n,(this._minx>this._maxx||this._miny>this._maxy)&&this.setToNull()}},W.prototype.contains=function(){if(1===arguments.length){if(arguments[0]instanceof W){var e=arguments[0];return this.covers(e)}if(arguments[0]instanceof M){var t=arguments[0];return this.covers(t)}}else if(2===arguments.length){var n=arguments[0],r=arguments[1];return this.covers(n,r)}},W.prototype.centre=function(){return this.isNull()?null:new M((this.getMinX()+this.getMaxX())/2,(this.getMinY()+this.getMaxY())/2)},W.prototype.init=function(){if(0===arguments.length)this.setToNull();else if(1===arguments.length){if(arguments[0]instanceof M){var e=arguments[0];this.init(e.x,e.x,e.y,e.y)}else if(arguments[0]instanceof W){var t=arguments[0];this._minx=t._minx,this._maxx=t._maxx,this._miny=t._miny,this._maxy=t._maxy}}else if(2===arguments.length){var n=arguments[0],r=arguments[1];this.init(n.x,r.x,n.y,r.y)}else if(4===arguments.length){var i=arguments[0],o=arguments[1],a=arguments[2],s=arguments[3];ie._maxx&&(t=this._minx-e._maxx);var n=0;return this._maxye._maxy&&(n=this._miny-e._maxy),0===t?n:0===n?t:Math.sqrt(t*t+n*n)},W.prototype.hashCode=function(){var e=17;return 37*(e=37*(e=37*(e=37*e+M.hashCode(this._minx))+M.hashCode(this._maxx))+M.hashCode(this._miny))+M.hashCode(this._maxy)},W.prototype.interfaces_=function(){return[_,t]},W.prototype.getClass=function(){return W},W.intersects=function(){if(3===arguments.length){var e=arguments[0],t=arguments[1],n=arguments[2];return n.x>=(e.xt.x?e.x:t.x)&&n.y>=(e.yt.y?e.y:t.y)}if(4===arguments.length){var r=arguments[0],i=arguments[1],o=arguments[2],a=arguments[3],s=Math.min(o.x,a.x),l=Math.max(o.x,a.x),u=Math.min(r.x,i.x),c=Math.max(r.x,i.x);return!(u>l||cl||cthis.getEdgeDistance(e,1)?(this._intLineIndex[e][0]=0,this._intLineIndex[e][1]=1):(this._intLineIndex[e][0]=1,this._intLineIndex[e][1]=0)}},ne.prototype.isProper=function(){return this.hasIntersection()&&this._isProper},ne.prototype.setPrecisionModel=function(e){this._precisionModel=e},ne.prototype.isInteriorIntersection=function(){if(0===arguments.length)return!!this.isInteriorIntersection(0)||!!this.isInteriorIntersection(1);if(1===arguments.length){for(var e=arguments[0],t=0;ti?r:i;else{var a=Math.abs(e.x-t.x),s=Math.abs(e.y-t.y);0!==(o=r>i?a:s)||e.equals(t)||(o=Math.max(a,s))}return te.isTrue(!(0===o&&!e.equals(t)),"Bad distance calculation"),o},ne.nonRobustComputeEdgeDistance=function(e,t,n){var r=e.x-t.x,i=e.y-t.y,o=Math.sqrt(r*r+i*i);return te.isTrue(!(0===o&&!e.equals(t)),"Invalid distance calculation"),o},re.DONT_INTERSECT.get=function(){return 0},re.DO_INTERSECT.get=function(){return 1},re.COLLINEAR.get=function(){return 2},re.NO_INTERSECTION.get=function(){return 0},re.POINT_INTERSECTION.get=function(){return 1},re.COLLINEAR_INTERSECTION.get=function(){return 2},Object.defineProperties(ne,re);var ie=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(e){var t=new W(this._inputLines[0][0],this._inputLines[0][1]),n=new W(this._inputLines[1][0],this._inputLines[1][1]);return t.contains(e)&&n.contains(e)},t.prototype.computeIntersection=function(){if(3!==arguments.length)return e.prototype.computeIntersection.apply(this,arguments);var t=arguments[0],n=arguments[1],r=arguments[2];if(this._isProper=!1,W.intersects(n,r,t)&&0===se.orientationIndex(n,r,t)&&0===se.orientationIndex(r,n,t))return this._isProper=!0,(t.equals(n)||t.equals(r))&&(this._isProper=!1),this._result=e.POINT_INTERSECTION,null;this._result=e.NO_INTERSECTION},t.prototype.normalizeToMinimum=function(e,t,n,r,i){i.x=this.smallestInAbsValue(e.x,t.x,n.x,r.x),i.y=this.smallestInAbsValue(e.y,t.y,n.y,r.y),e.x-=i.x,e.y-=i.y,t.x-=i.x,t.y-=i.y,n.x-=i.x,n.y-=i.y,r.x-=i.x,r.y-=i.y},t.prototype.safeHCoordinateIntersection=function(e,n,r,i){var o=null;try{o=Y.intersection(e,n,r,i)}catch(a){if(!(a instanceof V))throw a;o=t.nearestEndpoint(e,n,r,i)}return o},t.prototype.intersection=function(e,n,r,i){var o=this.intersectionWithNormalization(e,n,r,i);return this.isInSegmentEnvelopes(o)||(o=new M(t.nearestEndpoint(e,n,r,i))),null!==this._precisionModel&&this._precisionModel.makePrecise(o),o},t.prototype.smallestInAbsValue=function(e,t,n,r){var i=e,o=Math.abs(i);return Math.abs(t)1e-4&&G.out.println("Distance = "+i.distance(o))},t.prototype.intersectionWithNormalization=function(e,t,n,r){var i=new M(e),o=new M(t),a=new M(n),s=new M(r),l=new M;this.normalizeToEnvCentre(i,o,a,s,l);var u=this.safeHCoordinateIntersection(i,o,a,s);return u.x+=l.x,u.y+=l.y,u},t.prototype.computeCollinearIntersection=function(t,n,r,i){var o=W.intersects(t,n,r),a=W.intersects(t,n,i),s=W.intersects(r,i,t),l=W.intersects(r,i,n);return o&&a?(this._intPt[0]=r,this._intPt[1]=i,e.COLLINEAR_INTERSECTION):s&&l?(this._intPt[0]=t,this._intPt[1]=n,e.COLLINEAR_INTERSECTION):o&&s?(this._intPt[0]=r,this._intPt[1]=t,!r.equals(t)||a||l?e.COLLINEAR_INTERSECTION:e.POINT_INTERSECTION):o&&l?(this._intPt[0]=r,this._intPt[1]=n,!r.equals(n)||a||s?e.COLLINEAR_INTERSECTION:e.POINT_INTERSECTION):a&&s?(this._intPt[0]=i,this._intPt[1]=t,!i.equals(t)||o||l?e.COLLINEAR_INTERSECTION:e.POINT_INTERSECTION):a&&l?(this._intPt[0]=i,this._intPt[1]=n,!i.equals(n)||o||s?e.COLLINEAR_INTERSECTION:e.POINT_INTERSECTION):e.NO_INTERSECTION},t.prototype.normalizeToEnvCentre=function(e,t,n,r,i){var o=e.xt.x?e.x:t.x,l=e.y>t.y?e.y:t.y,u=n.xr.x?n.x:r.x,f=n.y>r.y?n.y:r.y,h=((o>u?o:u)+(sc?a:c)+(l0&&a>0||o<0&&a<0)return e.NO_INTERSECTION;var s=se.orientationIndex(r,i,t),l=se.orientationIndex(r,i,n);return s>0&&l>0||s<0&&l<0?e.NO_INTERSECTION:0===o&&0===a&&0===s&&0===l?this.computeCollinearIntersection(t,n,r,i):(0===o||0===a||0===s||0===l?(this._isProper=!1,t.equals2D(r)||t.equals2D(i)?this._intPt[0]=t:n.equals2D(r)||n.equals2D(i)?this._intPt[0]=n:0===o?this._intPt[0]=new M(r):0===a?this._intPt[0]=new M(i):0===s?this._intPt[0]=new M(t):0===l&&(this._intPt[0]=new M(n))):(this._isProper=!0,this._intPt[0]=this.intersection(t,n,r,i)),e.POINT_INTERSECTION)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t.nearestEndpoint=function(e,t,n,r){var i=e,o=se.distancePointLine(e,n,r),a=se.distancePointLine(t,n,r);return a0?n>0?-i:i:n>0?i:-i;if(0===t||0===n)return r>0?e>0?i:-i:e>0?-i:i;if(t>0?r>0?t<=r||(i=-i,o=e,e=n,n=o,o=t,t=r,r=o):t<=-r?(i=-i,n=-n,r=-r):(o=e,e=-n,n=o,o=t,t=-r,r=o):r>0?-t<=r?(i=-i,e=-e,t=-t):(o=-e,e=n,n=o,o=-t,t=r,r=o):t>=r?(e=-e,t=-t,n=-n,r=-r):(i=-i,o=-e,e=-n,n=o,o=-t,t=-r,r=o),e>0){if(!(n>0))return i;if(!(e<=n))return i}else{if(n>0)return-i;if(!(e>=n))return-i;i=-i,e=-e,n=-n}for(;;){if((r-=(a=Math.floor(n/e))*t)<0)return-i;if(r>t)return i;if(e>(n-=a*e)+n){if(tr+r)return-i;n=e-n,r=t-r,i=-i}if(0===r)return 0===n?0:-i;if(0===n)return i;if((t-=(a=Math.floor(e/n))*r)<0)return i;if(t>r)return-i;if(n>(e-=a*n)+e){if(rt+t)return i;e=n-e,t=r-t,i=-i}if(0===t)return 0===e?0:i;if(0===e)return-i}};var ae=function(){this._p=null,this._crossingCount=0,this._isPointOnSegment=!1;var e=arguments[0];this._p=e};ae.prototype.countSegment=function(e,t){if(e.xr&&(n=t.x,r=e.x),this._p.x>=n&&this._p.x<=r&&(this._isPointOnSegment=!0),null}if(e.y>this._p.y&&t.y<=this._p.y||t.y>this._p.y&&e.y<=this._p.y){var i=e.x-this._p.x,o=e.y-this._p.y,a=t.x-this._p.x,s=t.y-this._p.y,l=oe.signOfDet2x2(i,o,a,s);if(0===l)return this._isPointOnSegment=!0,null;s0&&this._crossingCount++}},ae.prototype.isPointInPolygon=function(){return this.getLocation()!==T.EXTERIOR},ae.prototype.getLocation=function(){return this._isPointOnSegment?T.BOUNDARY:this._crossingCount%2==1?T.INTERIOR:T.EXTERIOR},ae.prototype.isOnSegment=function(){return this._isPointOnSegment},ae.prototype.interfaces_=function(){return[]},ae.prototype.getClass=function(){return ae},ae.locatePointInRing=function(){if(arguments[0]instanceof M&&L(arguments[1],z)){for(var e=arguments[0],t=arguments[1],n=new ae(e),r=new M,i=new M,o=1;o1||s<0||s>1)&&(i=!0)}}else i=!0;return i?P.min(se.distancePointLine(e,n,r),se.distancePointLine(t,n,r),se.distancePointLine(n,e,t),se.distancePointLine(r,e,t)):0},se.isPointInRing=function(e,t){return se.locatePointInRing(e,t)!==T.EXTERIOR},se.computeLength=function(e){var t=e.size();if(t<=1)return 0;var n=0,r=new M;e.getCoordinate(0,r);for(var i=r.x,o=r.y,a=1;an.y&&(n=o,r=i)}var a=r;do{(a-=1)<0&&(a=t)}while(e[a].equals2D(n)&&a!==r);var s=r;do{s=(s+1)%t}while(e[s].equals2D(n)&&s!==r);var l=e[a],u=e[s];if(l.equals2D(n)||u.equals2D(n)||l.equals2D(u))return!1;var c=se.computeOrientation(l,n,u);return 0===c?l.x>u.x:c>0},se.locatePointInRing=function(e,t){return ae.locatePointInRing(e,t)},se.distancePointLinePerpendicular=function(e,t,n){var r=(n.x-t.x)*(n.x-t.x)+(n.y-t.y)*(n.y-t.y),i=((t.y-e.y)*(n.x-t.x)-(t.x-e.x)*(n.y-t.y))/r;return Math.abs(i)*Math.sqrt(r)},se.computeOrientation=function(e,t,n){return se.orientationIndex(e,t,n)},se.distancePointLine=function(){if(2===arguments.length){var e=arguments[0],t=arguments[1];if(0===t.length)throw new y("Line array must contain at least one vertex");for(var n=e.distance(t[0]),r=0;r=1)return o.distance(s);var c=((a.y-o.y)*(s.x-a.x)-(a.x-o.x)*(s.y-a.y))/l;return Math.abs(c)*Math.sqrt(l)}},se.isOnLine=function(e,t){for(var n=new ie,r=1;r0},me.prototype.interfaces_=function(){return[pe]},me.prototype.getClass=function(){return me};var ye=function(){};ye.prototype.isInBoundary=function(e){return e>1},ye.prototype.interfaces_=function(){return[pe]},ye.prototype.getClass=function(){return ye};var ve=function(){};ve.prototype.isInBoundary=function(e){return 1===e},ve.prototype.interfaces_=function(){return[pe]},ve.prototype.getClass=function(){return ve};var be=function(){};be.prototype.add=function(){},be.prototype.addAll=function(){},be.prototype.isEmpty=function(){},be.prototype.iterator=function(){},be.prototype.size=function(){},be.prototype.toArray=function(){},be.prototype.remove=function(){},(n.prototype=new Error).name="IndexOutOfBoundsException";var _e=function(){};_e.prototype.hasNext=function(){},_e.prototype.next=function(){},_e.prototype.remove=function(){};var we=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}(be);(r.prototype=new Error).name="NoSuchElementException";var xe=function(e){function t(){e.call(this),this.array_=[],arguments[0]instanceof be&&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,be]},t.prototype.add=function(e){return 1===arguments.length?this.array_.push(e):this.array_.splice(arguments[0],arguments[1]),!0},t.prototype.clear=function(){this.array_=[]},t.prototype.addAll=function(e){for(var t=e.iterator();t.hasNext();)this.add(t.next());return!0},t.prototype.set=function(e,t){var n=this.array_[e];return this.array_[e]=t,n},t.prototype.iterator=function(){return new Me(this)},t.prototype.get=function(e){if(e<0||e>=this.size())throw new n;return this.array_[e]},t.prototype.isEmpty=function(){return 0===this.array_.length},t.prototype.size=function(){return this.array_.length},t.prototype.toArray=function(){for(var e=[],t=0,n=this.array_.length;t=1&&this.get(this.size()-1).equals2D(i))return null;e.prototype.add.call(this,i)}else if(arguments[0]instanceof Object&&"boolean"==typeof arguments[1]){var o=arguments[0],a=arguments[1];return this.add(o,a),!0}}else if(3===arguments.length){if("boolean"==typeof arguments[2]&&arguments[0]instanceof Array&&"boolean"==typeof arguments[1]){var s=arguments[0],l=arguments[1];if(arguments[2])for(var u=0;u=0;c--)this.add(s[c],l);return!0}if("boolean"==typeof arguments[2]&&Number.isInteger(arguments[0])&&arguments[1]instanceof M){var d=arguments[0],f=arguments[1];if(!arguments[2]){var h=this.size();if(h>0){if(d>0&&this.get(d-1).equals2D(f))return null;if(dm&&(y=-1);for(var v=g;v!==m;v+=y)this.add(p[v],A);return!0}},t.prototype.closeRing=function(){this.size()>0&&this.add(new M(this.get(0)),!1)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},Object.defineProperties(t,n),t}(xe),Oe=function(){},Se={ForwardComparator:{configurable:!0},BidirectionalComparator:{configurable:!0},coordArrayType:{configurable:!0}};Se.ForwardComparator.get=function(){return Te},Se.BidirectionalComparator.get=function(){return Ce},Se.coordArrayType.get=function(){return new Array(0).fill(null)},Oe.prototype.interfaces_=function(){return[]},Oe.prototype.getClass=function(){return Oe},Oe.isRing=function(e){return!(e.length<4||!e[0].equals2D(e[e.length-1]))},Oe.ptNotInList=function(e,t){for(var n=0;n=e?t:[]},Oe.indexOf=function(e,t){for(var n=0;n0)&&(t=e[n]);return t},Oe.extract=function(e,t,n){t=P.clamp(t,0,e.length);var r=(n=P.clamp(n,-1,e.length))-t+1;n<0&&(r=0),t>=e.length&&(r=0),nr.length)return 1;if(0===n.length)return 0;var i=Oe.compare(n,r);return Oe.isEqualReversed(n,r)?0:i},Ce.prototype.OLDcompare=function(e,t){var n=e,r=t;if(n.lengthr.length)return 1;if(0===n.length)return 0;for(var i=Oe.increasingDirection(n),o=Oe.increasingDirection(r),a=i>0?0:n.length-1,s=o>0?0:n.length-1,l=0;l0))return t.value;t=t.right}}return null},d.prototype.put=function(e,t){if(null===this.root_)return this.root_={key:e,value:t,left:null,right:null,parent:null,color:ke,getValue:function(){return this.value},getKey:function(){return this.key}},this.size_=1,null;var n,r,i=this.root_;do{if(n=i,(r=e.compareTo(i.key))<0)i=i.left;else{if(!(r>0)){var o=i.value;return i.value=t,o}i=i.right}}while(null!==i);var a={key:e,left:null,right:null,value:t,parent:n,color:ke,getValue:function(){return this.value},getKey:function(){return this.key}};return r<0?n.left=a:n.right=a,this.fixAfterInsertion(a),this.size_++,null},d.prototype.fixAfterInsertion=function(e){for(e.color=1;null!=e&&e!==this.root_&&1===e.parent.color;)if(s(e)===u(s(s(e)))){var t=c(s(s(e)));1===a(t)?(l(s(e),ke),l(t,ke),l(s(s(e)),1),e=s(s(e))):(e===c(s(e))&&(e=s(e),this.rotateLeft(e)),l(s(e),ke),l(s(s(e)),1),this.rotateRight(s(s(e))))}else{var n=u(s(s(e)));1===a(n)?(l(s(e),ke),l(n,ke),l(s(s(e)),1),e=s(s(e))):(e===u(s(e))&&(e=s(e),this.rotateRight(e)),l(s(e),ke),l(s(s(e)),1),this.rotateLeft(s(s(e))))}this.root_.color=ke},d.prototype.values=function(){var e=new xe,t=this.getFirstEntry();if(null!==t)for(e.add(t.value);null!==(t=d.successor(t));)e.add(t.value);return e},d.prototype.entrySet=function(){var e=new Ie,t=this.getFirstEntry();if(null!==t)for(e.add(t);null!==(t=d.successor(t));)e.add(t);return e},d.prototype.rotateLeft=function(e){if(null!=e){var t=e.right;e.right=t.left,null!=t.left&&(t.left.parent=e),t.parent=e.parent,null===e.parent?this.root_=t:e.parent.left===e?e.parent.left=t:e.parent.right=t,t.left=e,e.parent=t}},d.prototype.rotateRight=function(e){if(null!=e){var t=e.left;e.left=t.right,null!=t.right&&(t.right.parent=e),t.parent=e.parent,null===e.parent?this.root_=t:e.parent.right===e?e.parent.right=t:e.parent.left=t,t.right=e,e.parent=t}},d.prototype.getFirstEntry=function(){var e=this.root_;if(null!=e)for(;null!=e.left;)e=e.left;return e},d.successor=function(e){if(null===e)return null;if(null!==e.right){for(var t=e.right;null!==t.left;)t=t.left;return t}for(var n=e.parent,r=e;null!==n&&r===n.right;)r=n,n=n.parent;return n},d.prototype.size=function(){return this.size_};var Re=function(){};Re.prototype.interfaces_=function(){return[]},Re.prototype.getClass=function(){return Re},f.prototype=new o,(h.prototype=new f).contains=function(e){for(var t=0,n=this.array_.length;t=0;){var a=i.substring(0,o);r.add(a),o=(i=i.substring(o+n)).indexOf(t)}i.length>0&&r.add(i);for(var s=new Array(r.size()).fill(null),l=0;l0)for(var o=i;o0&&r.append(" ");for(var o=0;o0&&r.append(","),r.append(We.toString(e.getOrdinate(i,o)))}return r.append(")"),r.toString()}},Xe.ensureValidRing=function(e,t){var n=t.size();return 0===n?t:n<=3?Xe.createClosedRing(e,t,4):t.getOrdinate(0,z.X)===t.getOrdinate(n-1,z.X)&&t.getOrdinate(0,z.Y)===t.getOrdinate(n-1,z.Y)?t:Xe.createClosedRing(e,t,n+1)},Xe.createClosedRing=function(e,t,n){var r=e.create(n,t.getDimension()),i=t.size();Xe.copy(t,0,r,0,i);for(var o=i;o0&&Xe.reverse(this._points),null}},t.prototype.getCoordinate=function(){return this.isEmpty()?null:this._points.getCoordinate(0)},t.prototype.getBoundaryDimension=function(){return this.isClosed()?Ne.FALSE:0},t.prototype.isClosed=function(){return!this.isEmpty()&&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 se.computeLength(this._points)},t.prototype.getNumPoints=function(){return this._points.size()},t.prototype.reverse=function(){var e=this._points.copy();return Xe.reverse(e),this.getFactory().createLineString(e)},t.prototype.compareToSameClass=function(){if(1===arguments.length){for(var e=arguments[0],t=0,n=0;t= 2)");this._points=e},t.prototype.isCoordinate=function(e){for(var t=0;t=1&&this.getCoordinateSequence().size()= 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-0x3b229e262367a600},Object.defineProperties(t,n),t}(Ze),nt=function(e){function t(){e.apply(this,arguments)}e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t;var n={serialVersionUID:{configurable:!0}};return t.prototype.getSortIndex=function(){return ce.SORTINDEX_MULTIPOLYGON},t.prototype.equalsExact=function(){if(2===arguments.length){var t=arguments[0],n=arguments[1];return!!this.isEquivalentClass(t)&&e.prototype.equalsExact.call(this,t,n)}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 e=this._geometries.length,t=new Array(e).fill(null),n=0;n0?t.createPoint(n[0]):t.createPoint():e},at.prototype.interfaces_=function(){return[rt.GeometryEditorOperation]},at.prototype.getClass=function(){return at};var st=function(){};st.prototype.edit=function(e,t){return e instanceof tt?t.createLinearRing(this.edit(e.getCoordinateSequence(),e)):e instanceof Ze?t.createLineString(this.edit(e.getCoordinateSequence(),e)):e instanceof Qe?t.createPoint(this.edit(e.getCoordinateSequence(),e)):e},st.prototype.interfaces_=function(){return[rt.GeometryEditorOperation]},st.prototype.getClass=function(){return st};var lt=function(){if(this._dimension=3,this._coordinates=null,1===arguments.length){if(arguments[0]instanceof Array)this._coordinates=arguments[0],this._dimension=3;else if(Number.isInteger(arguments[0])){var e=arguments[0];this._coordinates=new Array(e).fill(null);for(var t=0;t0){var e=new D(17*this._coordinates.length);e.append("("),e.append(this._coordinates[0]);for(var t=1;t3&&(r=3),r<2?new lt(n):new lt(n,r)}},ct.prototype.interfaces_=function(){return[S,t]},ct.prototype.getClass=function(){return ct},ct.instance=function(){return ct.instanceObject},dt.serialVersionUID.get=function(){return-0x38e49fa6cf6f2e00},dt.instanceObject.get=function(){return new ct},Object.defineProperties(ct,dt);var ft=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(e){return this.map_.get(e)||null},t.prototype.put=function(e,t){return this.map_.set(e,t),t},t.prototype.values=function(){for(var e=new xe,t=this.map_.values(),n=t.next();!n.done;)e.add(n.value),n=t.next();return e},t.prototype.entrySet=function(){var e=new Ie;return this.map_.entries().forEach((function(t){return e.add(t)})),e},t.prototype.size=function(){return this.map_.size()},t}(Le),ht=function e(){if(this._modelType=null,this._scale=null,0===arguments.length)this._modelType=e.FLOATING;else if(1===arguments.length)if(arguments[0]instanceof At){var t=arguments[0];this._modelType=t,t===e.FIXED&&this.setScale(1)}else if("number"==typeof arguments[0]){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}},pt={serialVersionUID:{configurable:!0},maximumPreciseValue:{configurable:!0}};ht.prototype.equals=function(e){if(!(e instanceof ht))return!1;var t=e;return this._modelType===t._modelType&&this._scale===t._scale},ht.prototype.compareTo=function(e){var t=e,n=this.getMaximumSignificantDigits(),r=t.getMaximumSignificantDigits();return new k(n).compareTo(new k(r))},ht.prototype.getScale=function(){return this._scale},ht.prototype.isFloating=function(){return this._modelType===ht.FLOATING||this._modelType===ht.FLOATING_SINGLE},ht.prototype.getType=function(){return this._modelType},ht.prototype.toString=function(){var e="UNKNOWN";return this._modelType===ht.FLOATING?e="Floating":this._modelType===ht.FLOATING_SINGLE?e="Floating-Single":this._modelType===ht.FIXED&&(e="Fixed (Scale="+this.getScale()+")"),e},ht.prototype.makePrecise=function(){if("number"==typeof arguments[0]){var e=arguments[0];return v.isNaN(e)||this._modelType===ht.FLOATING_SINGLE?e:this._modelType===ht.FIXED?Math.round(e*this._scale)/this._scale:e}if(arguments[0]instanceof M){var t=arguments[0];if(this._modelType===ht.FLOATING)return null;t.x=this.makePrecise(t.x),t.y=this.makePrecise(t.y)}},ht.prototype.getMaximumSignificantDigits=function(){var e=16;return this._modelType===ht.FLOATING?e=16:this._modelType===ht.FLOATING_SINGLE?e=6:this._modelType===ht.FIXED&&(e=1+Math.trunc(Math.ceil(Math.log(this.getScale())/Math.log(10)))),e},ht.prototype.setScale=function(e){this._scale=Math.abs(e)},ht.prototype.interfaces_=function(){return[t,_]},ht.prototype.getClass=function(){return ht},ht.mostPrecise=function(e,t){return e.compareTo(t)>=0?e:t},pt.serialVersionUID.get=function(){return 0x6bee6404e9a25c00},pt.maximumPreciseValue.get=function(){return 9007199254740992},Object.defineProperties(ht,pt);var At=function e(t){this._name=t||null,e.nameToTypeMap.put(t,this)},gt={serialVersionUID:{configurable:!0},nameToTypeMap:{configurable:!0}};At.prototype.readResolve=function(){return At.nameToTypeMap.get(this._name)},At.prototype.toString=function(){return this._name},At.prototype.interfaces_=function(){return[t]},At.prototype.getClass=function(){return At},gt.serialVersionUID.get=function(){return-552860263173159e4},gt.nameToTypeMap.get=function(){return new ft},Object.defineProperties(At,gt),ht.Type=At,ht.FIXED=new At("FIXED"),ht.FLOATING=new At("FLOATING"),ht.FLOATING_SINGLE=new At("FLOATING SINGLE");var mt=function e(){this._precisionModel=new ht,this._SRID=0,this._coordinateSequenceFactory=e.getDefaultCoordinateSequenceFactory(),0===arguments.length||(1===arguments.length?L(arguments[0],S)?this._coordinateSequenceFactory=arguments[0]:arguments[0]instanceof ht&&(this._precisionModel=arguments[0]):2===arguments.length?(this._precisionModel=arguments[0],this._SRID=arguments[1]):3===arguments.length&&(this._precisionModel=arguments[0],this._SRID=arguments[1],this._coordinateSequenceFactory=arguments[2]))},yt={serialVersionUID:{configurable:!0}};mt.prototype.toGeometry=function(e){return e.isNull()?this.createPoint(null):e.getMinX()===e.getMaxX()&&e.getMinY()===e.getMaxY()?this.createPoint(new M(e.getMinX(),e.getMinY())):e.getMinX()===e.getMaxX()||e.getMinY()===e.getMaxY()?this.createLineString([new M(e.getMinX(),e.getMinY()),new M(e.getMaxX(),e.getMaxY())]):this.createPolygon(this.createLinearRing([new M(e.getMinX(),e.getMinY()),new M(e.getMinX(),e.getMaxY()),new M(e.getMaxX(),e.getMaxY()),new M(e.getMaxX(),e.getMinY()),new M(e.getMinX(),e.getMinY())]),null)},mt.prototype.createLineString=function(e){return e?e instanceof Array?new Ze(this.getCoordinateSequenceFactory().create(e),this):L(e,z)?new Ze(e,this):void 0:new Ze(this.getCoordinateSequenceFactory().create([]),this)},mt.prototype.createMultiLineString=function(){if(0===arguments.length)return new Ve(null,this);if(1===arguments.length){var e=arguments[0];return new Ve(e,this)}},mt.prototype.buildGeometry=function(e){for(var t=null,n=!1,r=!1,i=e.iterator();i.hasNext();){var o=i.next(),a=o.getClass();null===t&&(t=a),a!==t&&(n=!0),o.isGeometryCollectionOrDerived()&&(r=!0)}if(null===t)return this.createGeometryCollection();if(n||r)return this.createGeometryCollection(mt.toGeometryArray(e));var s=e.iterator().next();if(e.size()>1){if(s instanceof $e)return this.createMultiPolygon(mt.toPolygonArray(e));if(s instanceof Ze)return this.createMultiLineString(mt.toLineStringArray(e));if(s instanceof Qe)return this.createMultiPoint(mt.toPointArray(e));te.shouldNeverReachHere("Unhandled class: "+s.getClass().getName())}return s},mt.prototype.createMultiPointFromCoords=function(e){return this.createMultiPoint(null!==e?this.getCoordinateSequenceFactory().create(e):null)},mt.prototype.createPoint=function(){if(0===arguments.length)return this.createPoint(this.getCoordinateSequenceFactory().create([]));if(1===arguments.length){if(arguments[0]instanceof M){var e=arguments[0];return this.createPoint(null!==e?this.getCoordinateSequenceFactory().create([e]):null)}if(L(arguments[0],z)){var t=arguments[0];return new Qe(t,this)}}},mt.prototype.getCoordinateSequenceFactory=function(){return this._coordinateSequenceFactory},mt.prototype.createPolygon=function(){if(0===arguments.length)return new $e(null,null,this);if(1===arguments.length){if(L(arguments[0],z)){var e=arguments[0];return this.createPolygon(this.createLinearRing(e))}if(arguments[0]instanceof Array){var t=arguments[0];return this.createPolygon(this.createLinearRing(t))}if(arguments[0]instanceof tt){var n=arguments[0];return this.createPolygon(n,null)}}else if(2===arguments.length){var r=arguments[0],i=arguments[1];return new $e(r,i,this)}},mt.prototype.getSRID=function(){return this._SRID},mt.prototype.createGeometryCollection=function(){if(0===arguments.length)return new He(null,this);if(1===arguments.length){var e=arguments[0];return new He(e,this)}},mt.prototype.createGeometry=function(e){return new rt(this).edit(e,{edit:function(){if(2===arguments.length){var e=arguments[0];return this._coordinateSequenceFactory.create(e)}}})},mt.prototype.getPrecisionModel=function(){return this._precisionModel},mt.prototype.createLinearRing=function(){if(0===arguments.length)return this.createLinearRing(this.getCoordinateSequenceFactory().create([]));if(1===arguments.length){if(arguments[0]instanceof Array){var e=arguments[0];return this.createLinearRing(null!==e?this.getCoordinateSequenceFactory().create(e):null)}if(L(arguments[0],z)){var t=arguments[0];return new tt(t,this)}}},mt.prototype.createMultiPolygon=function(){if(0===arguments.length)return new nt(null,this);if(1===arguments.length){var e=arguments[0];return new nt(e,this)}},mt.prototype.createMultiPoint=function(){if(0===arguments.length)return new et(null,this);if(1===arguments.length){if(arguments[0]instanceof Array){var e=arguments[0];return new et(e,this)}if(arguments[0]instanceof Array){var t=arguments[0];return this.createMultiPoint(null!==t?this.getCoordinateSequenceFactory().create(t):null)}if(L(arguments[0],z)){var n=arguments[0];if(null===n)return this.createMultiPoint(new Array(0).fill(null));for(var r=new Array(n.size()).fill(null),i=0;i=this.size())throw new Error;return this.array_[e]},g.prototype.push=function(e){return this.array_.push(e),e},g.prototype.pop=function(e){if(0===this.array_.length)throw new A;return this.array_.pop()},g.prototype.peek=function(){if(0===this.array_.length)throw new A;return this.array_[this.array_.length-1]},g.prototype.empty=function(){return 0===this.array_.length},g.prototype.isEmpty=function(){return this.empty()},g.prototype.search=function(e){return this.array_.indexOf(e)},g.prototype.size=function(){return this.array_.length},g.prototype.toArray=function(){for(var e=[],t=0,n=this.array_.length;t0&&this._minIndexthis._minCoord.y&&n.y>this._minCoord.y&&r===se.CLOCKWISE)&&(i=!0),i&&(this._minIndex=this._minIndex-1)},St.prototype.getRightmostSideOfSegment=function(e,t){var n=e.getEdge().getCoordinates();if(t<0||t+1>=n.length)return-1;if(n[t].y===n[t+1].y)return-1;var r=Et.LEFT;return n[t].ythis._minCoord.x)&&(this._minDe=e,this._minIndex=n,this._minCoord=t[n])},St.prototype.findRightmostEdgeAtNode=function(){var e=this._minDe.getNode().getEdges();this._minDe=e.getRightmostEdge(),this._minDe.isForward()||(this._minDe=this._minDe.getSym(),this._minIndex=this._minDe.getEdge().getCoordinates().length-1)},St.prototype.findEdge=function(e){for(var t=e.iterator();t.hasNext();){var n=t.next();n.isForward()&&this.checkForRightmostCoordinate(n)}te.isTrue(0!==this._minIndex||this._minCoord.equals(this._minDe.getCoordinate()),"inconsistency in rightmost processing"),0===this._minIndex?this.findRightmostEdgeAtNode():this.findRightmostEdgeAtVertex(),this._orientedDe=this._minDe,this.getRightmostSide(this._minDe,this._minIndex)===Et.LEFT&&(this._orientedDe=this._minDe.getSym())},St.prototype.interfaces_=function(){return[]},St.prototype.getClass=function(){return St};var Tt=function(e){function t(n,r){e.call(this,t.msgWithCoord(n,r)),this.pt=r?new M(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(e,t){return t?e:e+" [ "+t+" ]"},t}($),Ct=function(){this.array_=[]};Ct.prototype.addLast=function(e){this.array_.push(e)},Ct.prototype.removeFirst=function(){return this.array_.shift()},Ct.prototype.isEmpty=function(){return 0===this.array_.length};var Lt=function(){this._finder=null,this._dirEdgeList=new xe,this._nodes=new xe,this._rightMostCoord=null,this._env=null,this._finder=new St};Lt.prototype.clearVisitedEdges=function(){for(var e=this._dirEdgeList.iterator();e.hasNext();)e.next().setVisited(!1)},Lt.prototype.getRightmostCoordinate=function(){return this._rightMostCoord},Lt.prototype.computeNodeDepth=function(e){for(var t=null,n=e.getEdges().iterator();n.hasNext();){var r=n.next();if(r.isVisited()||r.getSym().isVisited()){t=r;break}}if(null===t)throw new Tt("unable to find edge to compute depths at "+e.getCoordinate());e.getEdges().computeDepths(t);for(var i=e.getEdges().iterator();i.hasNext();){var o=i.next();o.setVisited(!0),this.copySymDepths(o)}},Lt.prototype.computeDepth=function(e){this.clearVisitedEdges();var t=this._finder.getEdge();t.setEdgeDepths(Et.RIGHT,e),this.copySymDepths(t),this.computeDepths(t)},Lt.prototype.create=function(e){this.addReachable(e),this._finder.findEdge(this._dirEdgeList),this._rightMostCoord=this._finder.getCoordinate()},Lt.prototype.findResultEdges=function(){for(var e=this._dirEdgeList.iterator();e.hasNext();){var t=e.next();t.getDepth(Et.RIGHT)>=1&&t.getDepth(Et.LEFT)<=0&&!t.isInteriorAreaEdge()&&t.setInResult(!0)}},Lt.prototype.computeDepths=function(e){var t=new Ie,n=new Ct,r=e.getNode();for(n.addLast(r),t.add(r),e.setVisited(!0);!n.isEmpty();){var i=n.removeFirst();t.add(i),this.computeNodeDepth(i);for(var o=i.getEdges().iterator();o.hasNext();){var a=o.next().getSym();if(!a.isVisited()){var s=a.getNode();t.contains(s)||(n.addLast(s),t.add(s))}}}},Lt.prototype.compareTo=function(e){var t=e;return this._rightMostCoord.xt._rightMostCoord.x?1:0},Lt.prototype.getEnvelope=function(){if(null===this._env){for(var e=new W,t=this._dirEdgeList.iterator();t.hasNext();)for(var n=t.next().getEdge().getCoordinates(),r=0;rthis.location.length){var t=new Array(3).fill(null);t[Et.ON]=this.location[Et.ON],t[Et.LEFT]=T.NONE,t[Et.RIGHT]=T.NONE,this.location=t}for(var n=0;n1&&e.append(T.toLocationSymbol(this.location[Et.LEFT])),e.append(T.toLocationSymbol(this.location[Et.ON])),this.location.length>1&&e.append(T.toLocationSymbol(this.location[Et.RIGHT])),e.toString()},Pt.prototype.setLocations=function(e,t,n){this.location[Et.ON]=e,this.location[Et.LEFT]=t,this.location[Et.RIGHT]=n},Pt.prototype.get=function(e){return e1},Pt.prototype.isAnyNull=function(){for(var e=0;ethis._maxNodeDegree&&(this._maxNodeDegree=t),e=this.getNext(e)}while(e!==this._startDe);this._maxNodeDegree*=2},Dt.prototype.addPoints=function(e,t,n){var r=e.getCoordinates();if(t){var i=1;n&&(i=0);for(var o=i;o=0;s--)this._pts.add(r[s])}},Dt.prototype.isHole=function(){return this._isHole},Dt.prototype.setInResult=function(){var e=this._startDe;do{e.getEdge().setInResult(!0),e=e.getNext()}while(e!==this._startDe)},Dt.prototype.containsPoint=function(e){var t=this.getLinearRing();if(!t.getEnvelopeInternal().contains(e))return!1;if(!se.isPointInRing(e,t.getCoordinates()))return!1;for(var n=this._holes.iterator();n.hasNext();)if(n.next().containsPoint(e))return!1;return!0},Dt.prototype.addHole=function(e){this._holes.add(e)},Dt.prototype.isShell=function(){return null===this._shell},Dt.prototype.getLabel=function(){return this._label},Dt.prototype.getEdges=function(){return this._edges},Dt.prototype.getMaxNodeDegree=function(){return this._maxNodeDegree<0&&this.computeMaxNodeDegree(),this._maxNodeDegree},Dt.prototype.getShell=function(){return this._shell},Dt.prototype.mergeLabel=function(){if(1===arguments.length){var e=arguments[0];this.mergeLabel(e,0),this.mergeLabel(e,1)}else if(2===arguments.length){var t=arguments[0],n=arguments[1],r=t.getLocation(n,Et.RIGHT);if(r===T.NONE)return null;if(this._label.getLocation(n)===T.NONE)return this._label.setLocation(n,r),null}},Dt.prototype.setShell=function(e){this._shell=e,null!==e&&e.addHole(this)},Dt.prototype.toPolygon=function(e){for(var t=new Array(this._holes.size()).fill(null),n=0;n=2,"found partial label"),this.computeIM(e)},jt.prototype.isInResult=function(){return this._isInResult},jt.prototype.isVisited=function(){return this._isVisited},jt.prototype.interfaces_=function(){return[]},jt.prototype.getClass=function(){return jt};var Ft=function(e){function t(){e.call(this),this._coord=null,this._edges=null;var t=arguments[0],n=arguments[1];this._coord=t,this._edges=n,this._label=new It(0,T.NONE)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.isIncidentEdgeInResult=function(){for(var e=this.getEdges().getEdges().iterator();e.hasNext();)if(e.next().getEdge().isInResult())return!0;return!1},t.prototype.isIsolated=function(){return 1===this._label.getGeometryCount()},t.prototype.getCoordinate=function(){return this._coord},t.prototype.print=function(e){e.println("node "+this._coord+" lbl: "+this._label)},t.prototype.computeIM=function(e){},t.prototype.computeMergedLocation=function(e,t){var n=T.NONE;if(n=this._label.getLocation(t),!e.isNull(t)){var r=e.getLocation(t);n!==T.BOUNDARY&&(n=r)}return n},t.prototype.setLabel=function(){if(2!==arguments.length)return e.prototype.setLabel.apply(this,arguments);var t=arguments[0],n=arguments[1];null===this._label?this._label=new It(t,n):this._label.setLocation(t,n)},t.prototype.getEdges=function(){return this._edges},t.prototype.mergeLabel=function(){if(arguments[0]instanceof t){var e=arguments[0];this.mergeLabel(e._label)}else if(arguments[0]instanceof It)for(var n=arguments[0],r=0;r<2;r++){var i=this.computeMergedLocation(n,r);this._label.getLocation(r)===T.NONE&&this._label.setLocation(r,i)}},t.prototype.add=function(e){this._edges.insert(e),e.setNode(this)},t.prototype.setLabelBoundary=function(e){if(null===this._label)return null;var t=T.NONE;null!==this._label&&(t=this._label.getLocation(e));var n=null;switch(t){case T.BOUNDARY:n=T.INTERIOR;break;case T.INTERIOR:default:n=T.BOUNDARY}this._label.setLocation(e,n)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(jt),Nt=function(){this.nodeMap=new d,this.nodeFact=null;var e=arguments[0];this.nodeFact=e};Nt.prototype.find=function(e){return this.nodeMap.get(e)},Nt.prototype.addNode=function(){if(arguments[0]instanceof M){var e=arguments[0],t=this.nodeMap.get(e);return null===t&&(t=this.nodeFact.createNode(e),this.nodeMap.put(e,t)),t}if(arguments[0]instanceof Ft){var n=arguments[0],r=this.nodeMap.get(n.getCoordinate());return null===r?(this.nodeMap.put(n.getCoordinate(),n),n):(r.mergeLabel(n),r)}},Nt.prototype.print=function(e){for(var t=this.iterator();t.hasNext();)t.next().print(e)},Nt.prototype.iterator=function(){return this.nodeMap.values().iterator()},Nt.prototype.values=function(){return this.nodeMap.values()},Nt.prototype.getBoundaryNodes=function(e){for(var t=new xe,n=this.iterator();n.hasNext();){var r=n.next();r.getLabel().getLocation(e)===T.BOUNDARY&&t.add(r)}return t},Nt.prototype.add=function(e){var t=e.getCoordinate();this.addNode(t).add(e)},Nt.prototype.interfaces_=function(){return[]},Nt.prototype.getClass=function(){return Nt};var Bt=function(){},zt={NE:{configurable:!0},NW:{configurable:!0},SW:{configurable:!0},SE:{configurable:!0}};Bt.prototype.interfaces_=function(){return[]},Bt.prototype.getClass=function(){return Bt},Bt.isNorthern=function(e){return e===Bt.NE||e===Bt.NW},Bt.isOpposite=function(e,t){return e!==t&&2==(e-t+4)%4},Bt.commonHalfPlane=function(e,t){if(e===t)return e;if(2==(e-t+4)%4)return-1;var n=et?e:t)?3:n},Bt.isInHalfPlane=function(e,t){return t===Bt.SE?e===Bt.SE||e===Bt.SW:e===t||e===t+1},Bt.quadrant=function(){if("number"==typeof arguments[0]&&"number"==typeof arguments[1]){var e=arguments[0],t=arguments[1];if(0===e&&0===t)throw new y("Cannot compute the quadrant for point ( "+e+", "+t+" )");return e>=0?t>=0?Bt.NE:Bt.SE:t>=0?Bt.NW:Bt.SW}if(arguments[0]instanceof M&&arguments[1]instanceof M){var n=arguments[0],r=arguments[1];if(r.x===n.x&&r.y===n.y)throw new y("Cannot compute the quadrant for two identical points "+n);return r.x>=n.x?r.y>=n.y?Bt.NE:Bt.SE:r.y>=n.y?Bt.NW:Bt.SW}},zt.NE.get=function(){return 0},zt.NW.get=function(){return 1},zt.SW.get=function(){return 2},zt.SE.get=function(){return 3},Object.defineProperties(Bt,zt);var Ut=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,1===arguments.length){var e=arguments[0];this._edge=e}else if(3===arguments.length){var t=arguments[0],n=arguments[1],r=arguments[2];this._edge=t,this.init(n,r),this._label=null}else if(4===arguments.length){var i=arguments[0],o=arguments[1],a=arguments[2],s=arguments[3];this._edge=i,this.init(o,a),this._label=s}};Ut.prototype.compareDirection=function(e){return this._dx===e._dx&&this._dy===e._dy?0:this._quadrant>e._quadrant?1:this._quadrant2){o.linkDirectedEdgesForMinimalEdgeRings();var a=o.buildMinimalRings(),s=this.findShell(a);null!==s?(this.placePolygonHoles(s,a),t.add(s)):n.addAll(a)}else r.add(o)}return r},Yt.prototype.containsPoint=function(e){for(var t=this._shellList.iterator();t.hasNext();)if(t.next().containsPoint(e))return!0;return!1},Yt.prototype.buildMaximalEdgeRings=function(e){for(var t=new xe,n=e.iterator();n.hasNext();){var r=n.next();if(r.isInResult()&&r.getLabel().isArea()&&null===r.getEdgeRing()){var i=new Rt(r,this._geometryFactory);t.add(i),i.setInResult()}}return t},Yt.prototype.placePolygonHoles=function(e,t){for(var n=t.iterator();n.hasNext();){var r=n.next();r.isHole()&&r.setShell(e)}},Yt.prototype.getPolygons=function(){return this.computePolygons(this._shellList)},Yt.prototype.findEdgeRingContaining=function(e,t){for(var n=e.getLinearRing(),r=n.getEnvelopeInternal(),i=n.getCoordinateN(0),o=null,a=null,s=t.iterator();s.hasNext();){var l=s.next(),u=l.getLinearRing(),c=u.getEnvelopeInternal();null!==o&&(a=o.getLinearRing().getEnvelopeInternal());var d=!1;c.contains(r)&&se.isPointInRing(i,u.getCoordinates())&&(d=!0),d&&(null===o||a.contains(c))&&(o=l)}return o},Yt.prototype.findShell=function(e){for(var t=0,n=null,r=e.iterator();r.hasNext();){var i=r.next();i.isHole()||(n=i,t++)}return te.isTrue(t<=1,"found two shells in MinimalEdgeRing list"),n},Yt.prototype.add=function(){if(1===arguments.length){var e=arguments[0];this.add(e.getEdgeEnds(),e.getNodes())}else if(2===arguments.length){var t=arguments[0],n=arguments[1];Gt.linkResultDirectedEdges(n);var r=this.buildMaximalEdgeRings(t),i=new xe,o=this.buildMinimalEdgeRings(r,this._shellList,i);this.sortShellsAndHoles(o,this._shellList,i),this.placeFreeHoles(this._shellList,i)}},Yt.prototype.interfaces_=function(){return[]},Yt.prototype.getClass=function(){return Yt};var Wt=function(){};Wt.prototype.getBounds=function(){},Wt.prototype.interfaces_=function(){return[]},Wt.prototype.getClass=function(){return Wt};var qt=function(){this._bounds=null,this._item=null;var e=arguments[0],t=arguments[1];this._bounds=e,this._item=t};qt.prototype.getItem=function(){return this._item},qt.prototype.getBounds=function(){return this._bounds},qt.prototype.interfaces_=function(){return[Wt,t]},qt.prototype.getClass=function(){return qt};var Xt=function(){this._size=null,this._items=null,this._size=0,this._items=new xe,this._items.add(null)};Xt.prototype.poll=function(){if(this.isEmpty())return null;var e=this._items.get(1);return this._items.set(1,this._items.get(this._size)),this._size-=1,this.reorder(1),e},Xt.prototype.size=function(){return this._size},Xt.prototype.reorder=function(e){for(var t=null,n=this._items.get(e);2*e<=this._size&&((t=2*e)!==this._size&&this._items.get(t+1).compareTo(this._items.get(t))<0&&t++,this._items.get(t).compareTo(n)<0);e=t)this._items.set(e,this._items.get(t));this._items.set(e,n)},Xt.prototype.clear=function(){this._size=0,this._items.clear()},Xt.prototype.isEmpty=function(){return 0===this._size},Xt.prototype.add=function(e){this._items.add(null),this._size+=1;var t=this._size;for(this._items.set(0,e);e.compareTo(this._items.get(Math.trunc(t/2)))<0;t/=2)this._items.set(t,this._items.get(Math.trunc(t/2)));this._items.set(t,e)},Xt.prototype.interfaces_=function(){return[]},Xt.prototype.getClass=function(){return Xt};var Zt=function(){};Zt.prototype.visitItem=function(e){},Zt.prototype.interfaces_=function(){return[]},Zt.prototype.getClass=function(){return Zt};var Kt=function(){};Kt.prototype.insert=function(e,t){},Kt.prototype.remove=function(e,t){},Kt.prototype.query=function(){},Kt.prototype.interfaces_=function(){return[]},Kt.prototype.getClass=function(){return Kt};var Qt=function(){if(this._childBoundables=new xe,this._bounds=null,this._level=null,0===arguments.length);else if(1===arguments.length){var e=arguments[0];this._level=e}},Jt={serialVersionUID:{configurable:!0}};Qt.prototype.getLevel=function(){return this._level},Qt.prototype.size=function(){return this._childBoundables.size()},Qt.prototype.getChildBoundables=function(){return this._childBoundables},Qt.prototype.addChildBoundable=function(e){te.isTrue(null===this._bounds),this._childBoundables.add(e)},Qt.prototype.isEmpty=function(){return this._childBoundables.isEmpty()},Qt.prototype.getBounds=function(){return null===this._bounds&&(this._bounds=this.computeBounds()),this._bounds},Qt.prototype.interfaces_=function(){return[Wt,t]},Qt.prototype.getClass=function(){return Qt},Jt.serialVersionUID.get=function(){return 0x5a1e55ec41369800},Object.defineProperties(Qt,Jt);var $t=function(){};$t.reverseOrder=function(){return{compare:function(e,t){return t.compareTo(e)}}},$t.min=function(e){return $t.sort(e),e.get(0)},$t.sort=function(e,t){var n=e.toArray();t?Fe.sort(n,t):Fe.sort(n);for(var r=e.iterator(),i=0,o=n.length;ien.area(this._boundable2)?(this.expand(this._boundable1,this._boundable2,e,t),null):(this.expand(this._boundable2,this._boundable1,e,t),null);if(n)return this.expand(this._boundable1,this._boundable2,e,t),null;if(r)return this.expand(this._boundable2,this._boundable1,e,t),null;throw new y("neither boundable is composite")},en.prototype.isLeaves=function(){return!(en.isComposite(this._boundable1)||en.isComposite(this._boundable2))},en.prototype.compareTo=function(e){var t=e;return this._distancet._distance?1:0},en.prototype.expand=function(e,t,n,r){for(var i=e.getChildBoundables().iterator();i.hasNext();){var o=i.next(),a=new en(o,t,this._itemDistance);a.getDistance()1,"Node capacity must be greater than 1"),this._nodeCapacity=n}},nn={IntersectsOp:{configurable:!0},serialVersionUID:{configurable:!0},DEFAULT_NODE_CAPACITY:{configurable:!0}};tn.prototype.getNodeCapacity=function(){return this._nodeCapacity},tn.prototype.lastNode=function(e){return e.get(e.size()-1)},tn.prototype.size=function(){if(0===arguments.length)return this.isEmpty()?0:(this.build(),this.size(this._root));if(1===arguments.length){for(var e=0,t=arguments[0].getChildBoundables().iterator();t.hasNext();){var n=t.next();n instanceof Qt?e+=this.size(n):n instanceof qt&&(e+=1)}return e}},tn.prototype.removeItem=function(e,t){for(var n=null,r=e.getChildBoundables().iterator();r.hasNext();){var i=r.next();i instanceof qt&&i.getItem()===t&&(n=i)}return null!==n&&(e.getChildBoundables().remove(n),!0)},tn.prototype.itemsTree=function(){if(0===arguments.length){this.build();var e=this.itemsTree(this._root);return null===e?new xe:e}if(1===arguments.length){for(var t=arguments[0],n=new xe,r=t.getChildBoundables().iterator();r.hasNext();){var i=r.next();if(i instanceof Qt){var o=this.itemsTree(i);null!==o&&n.add(o)}else i instanceof qt?n.add(i.getItem()):te.shouldNeverReachHere()}return n.size()<=0?null:n}},tn.prototype.insert=function(e,t){te.isTrue(!this._built,"Cannot insert items into an STR packed R-tree after it has been built."),this._itemBoundables.add(new qt(e,t))},tn.prototype.boundablesAtLevel=function(){if(1===arguments.length){var e=arguments[0],t=new xe;return this.boundablesAtLevel(e,this._root,t),t}if(3===arguments.length){var n=arguments[0],r=arguments[1],i=arguments[2];if(te.isTrue(n>-2),r.getLevel()===n)return i.add(r),null;for(var o=r.getChildBoundables().iterator();o.hasNext();){var a=o.next();a instanceof Qt?this.boundablesAtLevel(n,a,i):(te.isTrue(a instanceof qt),-1===n&&i.add(a))}return null}},tn.prototype.query=function(){if(1===arguments.length){var e=arguments[0];this.build();var t=new xe;return this.isEmpty()||this.getIntersectsOp().intersects(this._root.getBounds(),e)&&this.query(e,this._root,t),t}if(2===arguments.length){var n=arguments[0],r=arguments[1];if(this.build(),this.isEmpty())return null;this.getIntersectsOp().intersects(this._root.getBounds(),n)&&this.query(n,this._root,r)}else if(3===arguments.length)if(L(arguments[2],Zt)&&arguments[0]instanceof Object&&arguments[1]instanceof Qt)for(var i=arguments[0],o=arguments[1],a=arguments[2],s=o.getChildBoundables(),l=0;le&&(e=r)}}return e+1}},tn.prototype.createParentBoundables=function(e,t){te.isTrue(!e.isEmpty());var n=new xe;n.add(this.createNode(t));var r=new xe(e);$t.sort(r,this.getComparator());for(var i=r.iterator();i.hasNext();){var o=i.next();this.lastNode(n).getChildBoundables().size()===this.getNodeCapacity()&&n.add(this.createNode(t)),this.lastNode(n).addChildBoundable(o)}return n},tn.prototype.isEmpty=function(){return this._built?this._root.isEmpty():this._itemBoundables.isEmpty()},tn.prototype.interfaces_=function(){return[t]},tn.prototype.getClass=function(){return tn},tn.compareDoubles=function(e,t){return e>t?1:e0);for(var n=new xe,r=0;r0;){var d=c.poll(),f=d.getDistance();if(f>=l)break;d.isLeaves()?(l=f,u=d):d.expandToQueue(c,l)}return[u.getBoundable(0).getItem(),u.getBoundable(1).getItem()]}}else if(3===arguments.length){var h=arguments[0],p=arguments[1],A=arguments[2],g=new qt(h,p),m=new en(this.getRoot(),g,A);return this.nearestNeighbour(m)[0]}},n.prototype.interfaces_=function(){return[Kt,t]},n.prototype.getClass=function(){return n},n.centreX=function(e){return n.avg(e.getMinX(),e.getMaxX())},n.avg=function(e,t){return(e+t)/2},n.centreY=function(e){return n.avg(e.getMinY(),e.getMaxY())},r.STRtreeNode.get=function(){return sn},r.serialVersionUID.get=function(){return 0x39920f7d5f261e0},r.xComparator.get=function(){return{interfaces_:function(){return[x]},compare:function(t,r){return e.compareDoubles(n.centreX(t.getBounds()),n.centreX(r.getBounds()))}}},r.yComparator.get=function(){return{interfaces_:function(){return[x]},compare:function(t,r){return e.compareDoubles(n.centreY(t.getBounds()),n.centreY(r.getBounds()))}}},r.intersectsOp.get=function(){return{interfaces_:function(){return[e.IntersectsOp]},intersects:function(e,t){return e.intersects(t)}}},r.DEFAULT_NODE_CAPACITY.get=function(){return 10},Object.defineProperties(n,r),n}(tn),sn=function(e){function t(){var t=arguments[0];e.call(this,t)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.computeBounds=function(){for(var e=null,t=this.getChildBoundables().iterator();t.hasNext();){var n=t.next();null===e?e=new W(n.getBounds()):e.expandToInclude(n.getBounds())}return e},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(Qt),ln=function(){};ln.prototype.interfaces_=function(){return[]},ln.prototype.getClass=function(){return ln},ln.relativeSign=function(e,t){return et?1:0},ln.compare=function(e,t,n){if(t.equals2D(n))return 0;var r=ln.relativeSign(t.x,n.x),i=ln.relativeSign(t.y,n.y);switch(e){case 0:return ln.compareValue(r,i);case 1:return ln.compareValue(i,r);case 2:return ln.compareValue(i,-r);case 3:return ln.compareValue(-r,i);case 4:return ln.compareValue(-r,-i);case 5:return ln.compareValue(-i,-r);case 6:return ln.compareValue(-i,r);case 7:return ln.compareValue(r,-i)}return te.shouldNeverReachHere("invalid octant value"),0},ln.compareValue=function(e,t){return e<0?-1:e>0?1:t<0?-1:t>0?1:0};var un=function(){this._segString=null,this.coord=null,this.segmentIndex=null,this._segmentOctant=null,this._isInterior=null;var e=arguments[0],t=arguments[1],n=arguments[2],r=arguments[3];this._segString=e,this.coord=new M(t),this.segmentIndex=n,this._segmentOctant=r,this._isInterior=!t.equals2D(e.getCoordinate(n))};un.prototype.getCoordinate=function(){return this.coord},un.prototype.print=function(e){e.print(this.coord),e.print(" seg # = "+this.segmentIndex)},un.prototype.compareTo=function(e){var t=e;return this.segmentIndext.segmentIndex?1:this.coord.equals2D(t.coord)?0:ln.compare(this._segmentOctant,this.coord,t.coord)},un.prototype.isEndPoint=function(e){return 0===this.segmentIndex&&!this._isInterior||this.segmentIndex===e},un.prototype.isInterior=function(){return this._isInterior},un.prototype.interfaces_=function(){return[_]},un.prototype.getClass=function(){return un};var cn=function(){this._nodeMap=new d,this._edge=null;var e=arguments[0];this._edge=e};cn.prototype.getSplitCoordinates=function(){var e=new Ee;this.addEndpoints();for(var t=this.iterator(),n=t.next();t.hasNext();){var r=t.next();this.addEdgeCoordinates(n,r,e),n=r}return e.toCoordinateArray()},cn.prototype.addCollapsedNodes=function(){var e=new xe;this.findCollapsesFromInsertedNodes(e),this.findCollapsesFromExistingVertices(e);for(var t=e.iterator();t.hasNext();){var n=t.next().intValue();this.add(this._edge.getCoordinate(n),n)}},cn.prototype.print=function(e){e.println("Intersections:");for(var t=this.iterator();t.hasNext();)t.next().print(e)},cn.prototype.findCollapsesFromExistingVertices=function(e){for(var t=0;t=0?t>=0?n>=r?0:1:n>=r?7:6:t>=0?n>=r?3:2:n>=r?4:5}if(arguments[0]instanceof M&&arguments[1]instanceof M){var i=arguments[0],o=arguments[1],a=o.x-i.x,s=o.y-i.y;if(0===a&&0===s)throw new y("Cannot compute the octant for two identical points "+i);return dn.octant(a,s)}};var fn=function(){};fn.prototype.getCoordinates=function(){},fn.prototype.size=function(){},fn.prototype.getCoordinate=function(e){},fn.prototype.isClosed=function(){},fn.prototype.setData=function(e){},fn.prototype.getData=function(){},fn.prototype.interfaces_=function(){return[]},fn.prototype.getClass=function(){return fn};var hn=function(){};hn.prototype.addIntersection=function(e,t){},hn.prototype.interfaces_=function(){return[fn]},hn.prototype.getClass=function(){return hn};var pn=function(){this._nodeList=new cn(this),this._pts=null,this._data=null;var e=arguments[0],t=arguments[1];this._pts=e,this._data=t};pn.prototype.getCoordinates=function(){return this._pts},pn.prototype.size=function(){return this._pts.length},pn.prototype.getCoordinate=function(e){return this._pts[e]},pn.prototype.isClosed=function(){return this._pts[0].equals(this._pts[this._pts.length-1])},pn.prototype.getSegmentOctant=function(e){return e===this._pts.length-1?-1:this.safeOctant(this.getCoordinate(e),this.getCoordinate(e+1))},pn.prototype.setData=function(e){this._data=e},pn.prototype.safeOctant=function(e,t){return e.equals2D(t)?0:dn.octant(e,t)},pn.prototype.getData=function(){return this._data},pn.prototype.addIntersection=function(){if(2===arguments.length){var e=arguments[0],t=arguments[1];this.addIntersectionNode(e,t)}else if(4===arguments.length){var n=arguments[0],r=arguments[1],i=arguments[3],o=new M(n.getIntersection(i));this.addIntersection(o,r)}},pn.prototype.toString=function(){return J.toLineString(new lt(this._pts))},pn.prototype.getNodeList=function(){return this._nodeList},pn.prototype.addIntersectionNode=function(e,t){var n=t,r=n+1;if(r=0&&n>=0||t<=0&&n<=0?Math.max(t,n):0}if(arguments[0]instanceof M){var r=arguments[0];return se.orientationIndex(this.p0,this.p1,r)}},An.prototype.toGeometry=function(e){return e.createLineString([this.p0,this.p1])},An.prototype.isVertical=function(){return this.p0.x===this.p1.x},An.prototype.equals=function(e){if(!(e instanceof An))return!1;var t=e;return this.p0.equals(t.p0)&&this.p1.equals(t.p1)},An.prototype.intersection=function(e){var t=new ie;return t.computeIntersection(this.p0,this.p1,e.p0,e.p1),t.hasIntersection()?t.getIntersection(0):null},An.prototype.project=function(){if(arguments[0]instanceof M){var e=arguments[0];if(e.equals(this.p0)||e.equals(this.p1))return new M(e);var t=this.projectionFactor(e),n=new M;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}if(arguments[0]instanceof An){var r=arguments[0],i=this.projectionFactor(r.p0),o=this.projectionFactor(r.p1);if(i>=1&&o>=1)return null;if(i<=0&&o<=0)return null;var a=this.project(r.p0);i<0&&(a=this.p0),i>1&&(a=this.p1);var s=this.project(r.p1);return o<0&&(s=this.p0),o>1&&(s=this.p1),new An(a,s)}},An.prototype.normalize=function(){this.p1.compareTo(this.p0)<0&&this.reverse()},An.prototype.angle=function(){return Math.atan2(this.p1.y-this.p0.y,this.p1.x-this.p0.x)},An.prototype.getCoordinate=function(e){return 0===e?this.p0:this.p1},An.prototype.distancePerpendicular=function(e){return se.distancePointLinePerpendicular(e,this.p0,this.p1)},An.prototype.minY=function(){return Math.min(this.p0.y,this.p1.y)},An.prototype.midPoint=function(){return An.midPoint(this.p0,this.p1)},An.prototype.projectionFactor=function(e){if(e.equals(this.p0))return 0;if(e.equals(this.p1))return 1;var t=this.p1.x-this.p0.x,n=this.p1.y-this.p0.y,r=t*t+n*n;return r<=0?v.NaN:((e.x-this.p0.x)*t+(e.y-this.p0.y)*n)/r},An.prototype.closestPoints=function(e){var t=this.intersection(e);if(null!==t)return[t,t];var n=new Array(2).fill(null),r=v.MAX_VALUE,i=null,o=this.closestPoint(e.p0);r=o.distance(e.p0),n[0]=o,n[1]=e.p0;var a=this.closestPoint(e.p1);(i=a.distance(e.p1))0&&t<1?this.project(e):this.p0.distance(e)1||v.isNaN(t))&&(t=1),t},An.prototype.toString=function(){return"LINESTRING( "+this.p0.x+" "+this.p0.y+", "+this.p1.x+" "+this.p1.y+")"},An.prototype.isHorizontal=function(){return this.p0.y===this.p1.y},An.prototype.distance=function(){if(arguments[0]instanceof An){var e=arguments[0];return se.distanceLineLine(this.p0,this.p1,e.p0,e.p1)}if(arguments[0]instanceof M){var t=arguments[0];return se.distancePointLine(t,this.p0,this.p1)}},An.prototype.pointAlong=function(e){var t=new M;return t.x=this.p0.x+e*(this.p1.x-this.p0.x),t.y=this.p0.y+e*(this.p1.y-this.p0.y),t},An.prototype.hashCode=function(){var e=v.doubleToLongBits(this.p0.x);e^=31*v.doubleToLongBits(this.p0.y);var t=Math.trunc(e)^Math.trunc(e>>32),n=v.doubleToLongBits(this.p1.x);return n^=31*v.doubleToLongBits(this.p1.y),t^Math.trunc(n)^Math.trunc(n>>32)},An.prototype.interfaces_=function(){return[_,t]},An.prototype.getClass=function(){return An},An.midPoint=function(e,t){return new M((e.x+t.x)/2,(e.y+t.y)/2)},gn.serialVersionUID.get=function(){return 0x2d2172135f411c00},Object.defineProperties(An,gn);var mn=function(){this.tempEnv1=new W,this.tempEnv2=new W,this._overlapSeg1=new An,this._overlapSeg2=new An};mn.prototype.overlap=function(){if(2===arguments.length);else if(4===arguments.length){var e=arguments[0],t=arguments[1],n=arguments[2],r=arguments[3];e.getLineSegment(t,this._overlapSeg1),n.getLineSegment(r,this._overlapSeg2),this.overlap(this._overlapSeg1,this._overlapSeg2)}},mn.prototype.interfaces_=function(){return[]},mn.prototype.getClass=function(){return mn};var yn=function(){this._pts=null,this._start=null,this._end=null,this._env=null,this._context=null,this._id=null;var e=arguments[0],t=arguments[1],n=arguments[2],r=arguments[3];this._pts=e,this._start=t,this._end=n,this._context=r};yn.prototype.getLineSegment=function(e,t){t.p0=this._pts[e],t.p1=this._pts[e+1]},yn.prototype.computeSelect=function(e,t,n,r){var i=this._pts[t],o=this._pts[n];if(r.tempEnv1.init(i,o),n-t==1)return r.select(this,t),null;if(!e.intersects(r.tempEnv1))return null;var a=Math.trunc((t+n)/2);t=e.length-1)return e.length-1;for(var r=Bt.quadrant(e[n],e[n+1]),i=t+1;in.getId()&&(n.computeOverlaps(i,e),this._nOverlaps++),this._segInt.isDone())return null}},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},n.SegmentOverlapAction.get=function(){return xn},Object.defineProperties(t,n),t}(_n),xn=function(e){function t(){e.call(this),this._si=null;var t=arguments[0];this._si=t}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.overlap=function(){if(4!==arguments.length)return e.prototype.overlap.apply(this,arguments);var t=arguments[0],n=arguments[1],r=arguments[2],i=arguments[3],o=t.getContext(),a=r.getContext();this._si.processIntersections(o,n,a,i)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(mn),Mn=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,0===arguments.length);else if(1===arguments.length){var t=arguments[0];this.setQuadrantSegments(t)}else if(2===arguments.length){var n=arguments[0],r=arguments[1];this.setQuadrantSegments(n),this.setEndCapStyle(r)}else if(4===arguments.length){var i=arguments[0],o=arguments[1],a=arguments[2],s=arguments[3];this.setQuadrantSegments(i),this.setEndCapStyle(o),this.setJoinStyle(a),this.setMitreLimit(s)}},En={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}};Mn.prototype.getEndCapStyle=function(){return this._endCapStyle},Mn.prototype.isSingleSided=function(){return this._isSingleSided},Mn.prototype.setQuadrantSegments=function(e){this._quadrantSegments=e,0===this._quadrantSegments&&(this._joinStyle=Mn.JOIN_BEVEL),this._quadrantSegments<0&&(this._joinStyle=Mn.JOIN_MITRE,this._mitreLimit=Math.abs(this._quadrantSegments)),e<=0&&(this._quadrantSegments=1),this._joinStyle!==Mn.JOIN_ROUND&&(this._quadrantSegments=Mn.DEFAULT_QUADRANT_SEGMENTS)},Mn.prototype.getJoinStyle=function(){return this._joinStyle},Mn.prototype.setJoinStyle=function(e){this._joinStyle=e},Mn.prototype.setSimplifyFactor=function(e){this._simplifyFactor=e<0?0:e},Mn.prototype.getSimplifyFactor=function(){return this._simplifyFactor},Mn.prototype.getQuadrantSegments=function(){return this._quadrantSegments},Mn.prototype.setEndCapStyle=function(e){this._endCapStyle=e},Mn.prototype.getMitreLimit=function(){return this._mitreLimit},Mn.prototype.setMitreLimit=function(e){this._mitreLimit=e},Mn.prototype.setSingleSided=function(e){this._isSingleSided=e},Mn.prototype.interfaces_=function(){return[]},Mn.prototype.getClass=function(){return Mn},Mn.bufferDistanceError=function(e){var t=Math.PI/2/e;return 1-Math.cos(t/2)},En.CAP_ROUND.get=function(){return 1},En.CAP_FLAT.get=function(){return 2},En.CAP_SQUARE.get=function(){return 3},En.JOIN_ROUND.get=function(){return 1},En.JOIN_MITRE.get=function(){return 2},En.JOIN_BEVEL.get=function(){return 3},En.DEFAULT_QUADRANT_SEGMENTS.get=function(){return 8},En.DEFAULT_MITRE_LIMIT.get=function(){return 5},En.DEFAULT_SIMPLIFY_FACTOR.get=function(){return.01},Object.defineProperties(Mn,En);var On=function(e){this._distanceTol=null,this._isDeleted=null,this._angleOrientation=se.COUNTERCLOCKWISE,this._inputLine=e||null},Sn={INIT:{configurable:!0},DELETE:{configurable:!0},KEEP:{configurable:!0},NUM_PTS_TO_CHECK:{configurable:!0}};On.prototype.isDeletable=function(e,t,n,r){var i=this._inputLine[e],o=this._inputLine[t],a=this._inputLine[n];return!!this.isConcave(i,o,a)&&!!this.isShallow(i,o,a,r)&&this.isShallowSampled(i,o,e,n,r)},On.prototype.deleteShallowConcavities=function(){for(var e=1,t=this.findNextNonDeletedIndex(e),n=this.findNextNonDeletedIndex(t),r=!1;n=0;r--)this.addPt(e[r])},Tn.prototype.isRedundant=function(e){if(this._ptList.size()<1)return!1;var t=this._ptList.get(this._ptList.size()-1);return e.distance(t)Math.PI;)e-=Ln.PI_TIMES_2;for(;e<=-Math.PI;)e+=Ln.PI_TIMES_2;return e},Ln.angle=function(){if(1===arguments.length){var e=arguments[0];return Math.atan2(e.y,e.x)}if(2===arguments.length){var t=arguments[0],n=arguments[1],r=n.x-t.x,i=n.y-t.y;return Math.atan2(i,r)}},Ln.isAcute=function(e,t,n){var r=e.x-t.x,i=e.y-t.y;return r*(n.x-t.x)+i*(n.y-t.y)>0},Ln.isObtuse=function(e,t,n){var r=e.x-t.x,i=e.y-t.y;return r*(n.x-t.x)+i*(n.y-t.y)<0},Ln.interiorAngle=function(e,t,n){var r=Ln.angle(t,e),i=Ln.angle(t,n);return Math.abs(i-r)},Ln.normalizePositive=function(e){if(e<0){for(;e<0;)e+=Ln.PI_TIMES_2;e>=Ln.PI_TIMES_2&&(e=0)}else{for(;e>=Ln.PI_TIMES_2;)e-=Ln.PI_TIMES_2;e<0&&(e=0)}return e},Ln.angleBetween=function(e,t,n){var r=Ln.angle(t,e),i=Ln.angle(t,n);return Ln.diff(r,i)},Ln.diff=function(e,t){var n=null;return(n=eMath.PI&&(n=2*Math.PI-n),n},Ln.toRadians=function(e){return e*Math.PI/180},Ln.getTurn=function(e,t){var n=Math.sin(t-e);return n>0?Ln.COUNTERCLOCKWISE:n<0?Ln.CLOCKWISE:Ln.NONE},Ln.angleBetweenOriented=function(e,t,n){var r=Ln.angle(t,e),i=Ln.angle(t,n)-r;return i<=-Math.PI?i+Ln.PI_TIMES_2:i>Math.PI?i-Ln.PI_TIMES_2:i},Pn.PI_TIMES_2.get=function(){return 2*Math.PI},Pn.PI_OVER_2.get=function(){return Math.PI/2},Pn.PI_OVER_4.get=function(){return Math.PI/4},Pn.COUNTERCLOCKWISE.get=function(){return se.COUNTERCLOCKWISE},Pn.CLOCKWISE.get=function(){return se.CLOCKWISE},Pn.NONE.get=function(){return se.COLLINEAR},Object.defineProperties(Ln,Pn);var In=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 An,this._seg1=new An,this._offset0=new An,this._offset1=new An,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 ie,this._filletAngleQuantum=Math.PI/2/n.getQuadrantSegments(),n.getQuadrantSegments()>=8&&n.getJoinStyle()===Mn.JOIN_ROUND&&(this._closingSegLengthFactor=e.MAX_CLOSING_SEG_LEN_FACTOR),this.init(r)},Dn={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}};In.prototype.addNextSegment=function(e,t){if(this._s0=this._s1,this._s1=this._s2,this._s2=e,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 n=se.computeOrientation(this._s0,this._s1,this._s2),r=n===se.CLOCKWISE&&this._side===Et.LEFT||n===se.COUNTERCLOCKWISE&&this._side===Et.RIGHT;0===n?this.addCollinear(t):r?this.addOutsideTurn(n,t):this.addInsideTurn(n,t)},In.prototype.addLineEndCap=function(e,t){var n=new An(e,t),r=new An;this.computeOffsetSegment(n,Et.LEFT,this._distance,r);var i=new An;this.computeOffsetSegment(n,Et.RIGHT,this._distance,i);var o=t.x-e.x,a=t.y-e.y,s=Math.atan2(a,o);switch(this._bufParams.getEndCapStyle()){case Mn.CAP_ROUND:this._segList.addPt(r.p1),this.addFilletArc(t,s+Math.PI/2,s-Math.PI/2,se.CLOCKWISE,this._distance),this._segList.addPt(i.p1);break;case Mn.CAP_FLAT:this._segList.addPt(r.p1),this._segList.addPt(i.p1);break;case Mn.CAP_SQUARE:var l=new M;l.x=Math.abs(this._distance)*Math.cos(s),l.y=Math.abs(this._distance)*Math.sin(s);var u=new M(r.p1.x+l.x,r.p1.y+l.y),c=new M(i.p1.x+l.x,i.p1.y+l.y);this._segList.addPt(u),this._segList.addPt(c)}},In.prototype.getCoordinates=function(){return this._segList.getCoordinates()},In.prototype.addMitreJoin=function(e,t,n,r){var i=!0,o=null;try{o=Y.intersection(t.p0,t.p1,n.p0,n.p1),(r<=0?1:o.distance(e)/Math.abs(r))>this._bufParams.getMitreLimit()&&(i=!1)}catch(e){if(!(e instanceof V))throw e;o=new M(0,0),i=!1}i?this._segList.addPt(o):this.addLimitedMitreJoin(t,n,r,this._bufParams.getMitreLimit())},In.prototype.addFilletCorner=function(e,t,n,r,i){var o=t.x-e.x,a=t.y-e.y,s=Math.atan2(a,o),l=n.x-e.x,u=n.y-e.y,c=Math.atan2(u,l);r===se.CLOCKWISE?s<=c&&(s+=2*Math.PI):s>=c&&(s-=2*Math.PI),this._segList.addPt(t),this.addFilletArc(e,s,c,r,i),this._segList.addPt(n)},In.prototype.addOutsideTurn=function(e,t){if(this._offset0.p1.distance(this._offset1.p0)0){var n=new M((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(n);var r=new M((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(r)}else this._segList.addPt(this._s1);this._segList.addPt(this._offset1.p0)}},In.prototype.createCircle=function(e){var t=new M(e.x+this._distance,e.y);this._segList.addPt(t),this.addFilletArc(e,0,2*Math.PI,-1,this._distance),this._segList.closeRing()},In.prototype.addBevelJoin=function(e,t){this._segList.addPt(e.p1),this._segList.addPt(t.p0)},In.prototype.init=function(e){this._distance=e,this._maxCurveSegmentError=e*(1-Math.cos(this._filletAngleQuantum/2)),this._segList=new Tn,this._segList.setPrecisionModel(this._precisionModel),this._segList.setMinimumVertexDistance(e*In.CURVE_VERTEX_SNAP_DISTANCE_FACTOR)},In.prototype.addCollinear=function(e){this._li.computeIntersection(this._s0,this._s1,this._s1,this._s2),this._li.getIntersectionNum()>=2&&(this._bufParams.getJoinStyle()===Mn.JOIN_BEVEL||this._bufParams.getJoinStyle()===Mn.JOIN_MITRE?(e&&this._segList.addPt(this._offset0.p1),this._segList.addPt(this._offset1.p0)):this.addFilletCorner(this._s1,this._offset0.p1,this._offset1.p0,se.CLOCKWISE,this._distance))},In.prototype.closeRing=function(){this._segList.closeRing()},In.prototype.hasNarrowConcaveAngle=function(){return this._hasNarrowConcaveAngle},In.prototype.interfaces_=function(){return[]},In.prototype.getClass=function(){return In},Dn.OFFSET_SEGMENT_SEPARATION_FACTOR.get=function(){return.001},Dn.INSIDE_TURN_VERTEX_SNAP_DISTANCE_FACTOR.get=function(){return.001},Dn.CURVE_VERTEX_SNAP_DISTANCE_FACTOR.get=function(){return 1e-6},Dn.MAX_CLOSING_SEG_LEN_FACTOR.get=function(){return 80},Object.defineProperties(In,Dn);var kn=function(){this._distance=0,this._precisionModel=null,this._bufParams=null;var e=arguments[0],t=arguments[1];this._precisionModel=e,this._bufParams=t};kn.prototype.getOffsetCurve=function(e,t){if(this._distance=t,0===t)return null;var n=t<0,r=Math.abs(t),i=this.getSegGen(r);e.length<=1?this.computePointCurve(e[0],i):this.computeOffsetCurve(e,n,i);var o=i.getCoordinates();return n&&Oe.reverse(o),o},kn.prototype.computeSingleSidedBufferCurve=function(e,t,n){var r=this.simplifyTolerance(this._distance);if(t){n.addSegments(e,!0);var i=On.simplify(e,-r),o=i.length-1;n.initSideSegments(i[o],i[o-1],Et.LEFT),n.addFirstSegment();for(var a=o-2;a>=0;a--)n.addNextSegment(i[a],!0)}else{n.addSegments(e,!1);var s=On.simplify(e,r),l=s.length-1;n.initSideSegments(s[0],s[1],Et.LEFT),n.addFirstSegment();for(var u=2;u<=l;u++)n.addNextSegment(s[u],!0)}n.addLastSegment(),n.closeRing()},kn.prototype.computeRingBufferCurve=function(e,t,n){var r=this.simplifyTolerance(this._distance);t===Et.RIGHT&&(r=-r);var i=On.simplify(e,r),o=i.length-1;n.initSideSegments(i[o-1],i[0],t);for(var a=1;a<=o;a++){var s=1!==a;n.addNextSegment(i[a],s)}n.closeRing()},kn.prototype.computeLineBufferCurve=function(e,t){var n=this.simplifyTolerance(this._distance),r=On.simplify(e,n),i=r.length-1;t.initSideSegments(r[0],r[1],Et.LEFT);for(var o=2;o<=i;o++)t.addNextSegment(r[o],!0);t.addLastSegment(),t.addLineEndCap(r[i-1],r[i]);var a=On.simplify(e,-n),s=a.length-1;t.initSideSegments(a[s],a[s-1],Et.LEFT);for(var l=s-2;l>=0;l--)t.addNextSegment(a[l],!0);t.addLastSegment(),t.addLineEndCap(a[1],a[0]),t.closeRing()},kn.prototype.computePointCurve=function(e,t){switch(this._bufParams.getEndCapStyle()){case Mn.CAP_ROUND:t.createCircle(e);break;case Mn.CAP_SQUARE:t.createSquare(e)}},kn.prototype.getLineCurve=function(e,t){if(this._distance=t,t<0&&!this._bufParams.isSingleSided())return null;if(0===t)return null;var n=Math.abs(t),r=this.getSegGen(n);if(e.length<=1)this.computePointCurve(e[0],r);else if(this._bufParams.isSingleSided()){var i=t<0;this.computeSingleSidedBufferCurve(e,i,r)}else this.computeLineBufferCurve(e,r);return r.getCoordinates()},kn.prototype.getBufferParameters=function(){return this._bufParams},kn.prototype.simplifyTolerance=function(e){return e*this._bufParams.getSimplifyFactor()},kn.prototype.getRingCurve=function(e,t,n){if(this._distance=n,e.length<=2)return this.getLineCurve(e,n);if(0===n)return kn.copyCoordinates(e);var r=this.getSegGen(n);return this.computeRingBufferCurve(e,t,r),r.getCoordinates()},kn.prototype.computeOffsetCurve=function(e,t,n){var r=this.simplifyTolerance(this._distance);if(t){var i=On.simplify(e,-r),o=i.length-1;n.initSideSegments(i[o],i[o-1],Et.LEFT),n.addFirstSegment();for(var a=o-2;a>=0;a--)n.addNextSegment(i[a],!0)}else{var s=On.simplify(e,r),l=s.length-1;n.initSideSegments(s[0],s[1],Et.LEFT),n.addFirstSegment();for(var u=2;u<=l;u++)n.addNextSegment(s[u],!0)}n.addLastSegment()},kn.prototype.getSegGen=function(e){return new In(this._precisionModel,this._bufParams,e)},kn.prototype.interfaces_=function(){return[]},kn.prototype.getClass=function(){return kn},kn.copyCoordinates=function(e){for(var t=new Array(e.length).fill(null),n=0;ni.getMaxY()||this.findStabbedSegments(e,r.getDirectedEdges(),t)}return t}if(3===arguments.length)if(L(arguments[2],we)&&arguments[0]instanceof M&&arguments[1]instanceof Ht){for(var o=arguments[0],a=arguments[1],s=arguments[2],l=a.getEdge().getCoordinates(),u=0;uthis._seg.p1.y&&this._seg.reverse(),!(Math.max(this._seg.p0.x,this._seg.p1.x)this._seg.p1.y||se.computeOrientation(this._seg.p0,this._seg.p1,o)===se.RIGHT)){var c=a.getDepth(Et.LEFT);this._seg.p0.equals(l[u])||(c=a.getDepth(Et.RIGHT));var d=new Fn(this._seg,c);s.add(d)}}else if(L(arguments[2],we)&&arguments[0]instanceof M&&L(arguments[1],we))for(var f=arguments[0],h=arguments[1],p=arguments[2],A=h.iterator();A.hasNext();){var g=A.next();g.isForward()&&this.findStabbedSegments(f,g,p)}},Rn.prototype.getDepth=function(e){var t=this.findStabbedSegments(e);return 0===t.size()?0:$t.min(t)._leftDepth},Rn.prototype.interfaces_=function(){return[]},Rn.prototype.getClass=function(){return Rn},jn.DepthSegment.get=function(){return Fn},Object.defineProperties(Rn,jn);var Fn=function(){this._upwardSeg=null,this._leftDepth=null;var e=arguments[0],t=arguments[1];this._upwardSeg=new An(e),this._leftDepth=t};Fn.prototype.compareTo=function(e){var t=e;if(this._upwardSeg.minX()>=t._upwardSeg.maxX())return 1;if(this._upwardSeg.maxX()<=t._upwardSeg.minX())return-1;var n=this._upwardSeg.orientationIndex(t._upwardSeg);return 0!==n||0!=(n=-1*t._upwardSeg.orientationIndex(this._upwardSeg))?n:this._upwardSeg.compareTo(t._upwardSeg)},Fn.prototype.compareX=function(e,t){var n=e.p0.compareTo(t.p0);return 0!==n?n:e.p1.compareTo(t.p1)},Fn.prototype.toString=function(){return this._upwardSeg.toString()},Fn.prototype.interfaces_=function(){return[_]},Fn.prototype.getClass=function(){return Fn};var Nn=function(e,t,n){this.p0=e||null,this.p1=t||null,this.p2=n||null};Nn.prototype.area=function(){return Nn.area(this.p0,this.p1,this.p2)},Nn.prototype.signedArea=function(){return Nn.signedArea(this.p0,this.p1,this.p2)},Nn.prototype.interpolateZ=function(e){if(null===e)throw new y("Supplied point is null.");return Nn.interpolateZ(e,this.p0,this.p1,this.p2)},Nn.prototype.longestSideLength=function(){return Nn.longestSideLength(this.p0,this.p1,this.p2)},Nn.prototype.isAcute=function(){return Nn.isAcute(this.p0,this.p1,this.p2)},Nn.prototype.circumcentre=function(){return Nn.circumcentre(this.p0,this.p1,this.p2)},Nn.prototype.area3D=function(){return Nn.area3D(this.p0,this.p1,this.p2)},Nn.prototype.centroid=function(){return Nn.centroid(this.p0,this.p1,this.p2)},Nn.prototype.inCentre=function(){return Nn.inCentre(this.p0,this.p1,this.p2)},Nn.prototype.interfaces_=function(){return[]},Nn.prototype.getClass=function(){return Nn},Nn.area=function(e,t,n){return Math.abs(((n.x-e.x)*(t.y-e.y)-(t.x-e.x)*(n.y-e.y))/2)},Nn.signedArea=function(e,t,n){return((n.x-e.x)*(t.y-e.y)-(t.x-e.x)*(n.y-e.y))/2},Nn.det=function(e,t,n,r){return e*r-t*n},Nn.interpolateZ=function(e,t,n,r){var i=t.x,o=t.y,a=n.x-i,s=r.x-i,l=n.y-o,u=r.y-o,c=a*u-s*l,d=e.x-i,f=e.y-o,h=(u*d-s*f)/c,p=(-l*d+a*f)/c;return t.z+h*(n.z-t.z)+p*(r.z-t.z)},Nn.longestSideLength=function(e,t,n){var r=e.distance(t),i=t.distance(n),o=n.distance(e),a=r;return i>a&&(a=i),o>a&&(a=o),a},Nn.isAcute=function(e,t,n){return!!Ln.isAcute(e,t,n)&&!!Ln.isAcute(t,n,e)&&!!Ln.isAcute(n,e,t)},Nn.circumcentre=function(e,t,n){var r=n.x,i=n.y,o=e.x-r,a=e.y-i,s=t.x-r,l=t.y-i,u=2*Nn.det(o,a,s,l),c=Nn.det(a,o*o+a*a,l,s*s+l*l),d=Nn.det(o,o*o+a*a,s,s*s+l*l);return new M(r-c/u,i+d/u)},Nn.perpendicularBisector=function(e,t){var n=t.x-e.x,r=t.y-e.y,i=new Y(e.x+n/2,e.y+r/2,1),o=new Y(e.x-r+n/2,e.y+n+r/2,1);return new Y(i,o)},Nn.angleBisector=function(e,t,n){var r=t.distance(e),i=r/(r+t.distance(n)),o=n.x-e.x,a=n.y-e.y;return new M(e.x+i*o,e.y+i*a)},Nn.area3D=function(e,t,n){var r=t.x-e.x,i=t.y-e.y,o=t.z-e.z,a=n.x-e.x,s=n.y-e.y,l=n.z-e.z,u=i*l-o*s,c=o*a-r*l,d=r*s-i*a,f=u*u+c*c+d*d;return Math.sqrt(f)/2},Nn.centroid=function(e,t,n){var r=(e.x+t.x+n.x)/3,i=(e.y+t.y+n.y)/3;return new M(r,i)},Nn.inCentre=function(e,t,n){var r=t.distance(n),i=e.distance(n),o=e.distance(t),a=r+i+o,s=(r*e.x+i*t.x+o*n.x)/a,l=(r*e.y+i*t.y+o*n.y)/a;return new M(s,l)};var Bn=function(){this._inputGeom=null,this._distance=null,this._curveBuilder=null,this._curveList=new xe;var e=arguments[0],t=arguments[1],n=arguments[2];this._inputGeom=e,this._distance=t,this._curveBuilder=n};Bn.prototype.addPoint=function(e){if(this._distance<=0)return null;var t=e.getCoordinates(),n=this._curveBuilder.getLineCurve(t,this._distance);this.addCurve(n,T.EXTERIOR,T.INTERIOR)},Bn.prototype.addPolygon=function(e){var t=this._distance,n=Et.LEFT;this._distance<0&&(t=-this._distance,n=Et.RIGHT);var r=e.getExteriorRing(),i=Oe.removeRepeatedPoints(r.getCoordinates());if(this._distance<0&&this.isErodedCompletely(r,this._distance))return null;if(this._distance<=0&&i.length<3)return null;this.addPolygonRing(i,t,n,T.EXTERIOR,T.INTERIOR);for(var o=0;o0&&this.isErodedCompletely(a,-this._distance)||this.addPolygonRing(s,t,Et.opposite(n),T.INTERIOR,T.EXTERIOR)}},Bn.prototype.isTriangleErodedCompletely=function(e,t){var n=new Nn(e[0],e[1],e[2]),r=n.inCentre();return se.distancePointLine(r,n.p0,n.p1)=tt.MINIMUM_VALID_SIZE&&se.isCCW(e)&&(o=i,a=r,n=Et.opposite(n));var s=this._curveBuilder.getRingCurve(e,n,t);this.addCurve(s,o,a)},Bn.prototype.add=function(e){if(e.isEmpty())return null;e instanceof $e?this.addPolygon(e):e instanceof Ze?this.addLineString(e):e instanceof Qe?this.addPoint(e):(e instanceof et||e instanceof Ve||e instanceof nt||e instanceof He)&&this.addCollection(e)},Bn.prototype.isErodedCompletely=function(e,t){var n=e.getCoordinates();if(n.length<4)return t<0;if(4===n.length)return this.isTriangleErodedCompletely(n,t);var r=e.getEnvelopeInternal(),i=Math.min(r.getHeight(),r.getWidth());return t<0&&2*Math.abs(t)>i},Bn.prototype.addCollection=function(e){for(var t=0;t=this._max)throw new r;var e=this._parent.getGeometryN(this._index++);return e instanceof He?(this._subcollectionIterator=new Un(e),this._subcollectionIterator.next()):e},Un.prototype.remove=function(){throw new Error(this.getClass().getName())},Un.prototype.hasNext=function(){if(this._atStart)return!0;if(null!==this._subcollectionIterator){if(this._subcollectionIterator.hasNext())return!0;this._subcollectionIterator=null}return!(this._index>=this._max)},Un.prototype.interfaces_=function(){return[_e]},Un.prototype.getClass=function(){return Un},Un.isAtomic=function(e){return!(e instanceof He)};var Hn=function(){this._geom=null;var e=arguments[0];this._geom=e};Hn.prototype.locate=function(e){return Hn.locate(e,this._geom)},Hn.prototype.interfaces_=function(){return[zn]},Hn.prototype.getClass=function(){return Hn},Hn.isPointInRing=function(e,t){return!!t.getEnvelopeInternal().intersects(e)&&se.isPointInRing(e,t.getCoordinates())},Hn.containsPointInPolygon=function(e,t){if(t.isEmpty())return!1;var n=t.getExteriorRing();if(!Hn.isPointInRing(e,n))return!1;for(var r=0;r=0;n--){var r=this._edgeList.get(n),i=r.getSym();null===t&&(t=i),null!==e&&i.setNext(e),e=r}t.setNext(e)},t.prototype.computeDepths=function(){if(1===arguments.length){var e=arguments[0],t=this.findIndex(e),n=e.getDepth(Et.LEFT),r=e.getDepth(Et.RIGHT),i=this.computeDepths(t+1,this._edgeList.size(),n);if(this.computeDepths(0,t,i)!==r)throw new Tt("depth mismatch at "+e.getCoordinate())}else if(3===arguments.length){for(var o=arguments[0],a=arguments[1],s=arguments[2],l=o;l=0;i--){var o=this._resultAreaEdgeList.get(i),a=o.getSym();switch(null===t&&o.getEdgeRing()===e&&(t=o),r){case this._SCANNING_FOR_INCOMING:if(a.getEdgeRing()!==e)continue;n=a,r=this._LINKING_TO_OUTGOING;break;case this._LINKING_TO_OUTGOING:if(o.getEdgeRing()!==e)continue;n.setNextMin(o),r=this._SCANNING_FOR_INCOMING}}r===this._LINKING_TO_OUTGOING&&(te.isTrue(null!==t,"found null for first outgoing dirEdge"),te.isTrue(t.getEdgeRing()===e,"unable to link last incoming dirEdge"),n.setNextMin(t))},t.prototype.getOutgoingDegree=function(){if(0===arguments.length){for(var e=0,t=this.iterator();t.hasNext();)t.next().isInResult()&&e++;return e}if(1===arguments.length){for(var n=arguments[0],r=0,i=this.iterator();i.hasNext();)i.next().getEdgeRing()===n&&r++;return r}},t.prototype.getLabel=function(){return this._label},t.prototype.findCoveredLineEdges=function(){for(var e=T.NONE,t=this.iterator();t.hasNext();){var n=t.next(),r=n.getSym();if(!n.isLineEdge()){if(n.isInResult()){e=T.INTERIOR;break}if(r.isInResult()){e=T.EXTERIOR;break}}}if(e===T.NONE)return null;for(var i=e,o=this.iterator();o.hasNext();){var a=o.next(),s=a.getSym();a.isLineEdge()?a.getEdge().setCovered(i===T.INTERIOR):(a.isInResult()&&(i=T.EXTERIOR),s.isInResult()&&(i=T.INTERIOR))}},t.prototype.computeLabelling=function(t){e.prototype.computeLabelling.call(this,t),this._label=new It(T.NONE);for(var n=this.iterator();n.hasNext();)for(var r=n.next().getEdge().getLabel(),i=0;i<2;i++){var o=r.getLocation(i);o!==T.INTERIOR&&o!==T.BOUNDARY||this._label.setLocation(i,T.INTERIOR)}},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(Vn),Yn=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(e){return new Ft(e,new Gn)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(Vt),Wn=function e(){this._pts=null,this._orientation=null;var t=arguments[0];this._pts=t,this._orientation=e.orientation(t)};Wn.prototype.compareTo=function(e){var t=e;return Wn.compareOriented(this._pts,this._orientation,t._pts,t._orientation)},Wn.prototype.interfaces_=function(){return[_]},Wn.prototype.getClass=function(){return Wn},Wn.orientation=function(e){return 1===Oe.increasingDirection(e)},Wn.compareOriented=function(e,t,n,r){for(var i=t?1:-1,o=r?1:-1,a=t?e.length:-1,s=r?n.length:-1,l=t?0:e.length-1,u=r?0:n.length-1;;){var c=e[l].compareTo(n[u]);if(0!==c)return c;var d=(l+=i)===a,f=(u+=o)===s;if(d&&!f)return-1;if(!d&&f)return 1;if(d&&f)return 0}};var qn=function(){this._edges=new xe,this._ocaMap=new d};qn.prototype.print=function(e){e.print("MULTILINESTRING ( ");for(var t=0;t0&&e.print(","),e.print("(");for(var r=n.getCoordinates(),i=0;i0&&e.print(","),e.print(r[i].x+" "+r[i].y);e.println(")")}e.print(") ")},qn.prototype.addAll=function(e){for(var t=e.iterator();t.hasNext();)this.add(t.next())},qn.prototype.findEdgeIndex=function(e){for(var t=0;t0||!t.coord.equals2D(r);i||n--;var o=new Array(n).fill(null),a=0;o[a++]=new M(e.coord);for(var s=e.segmentIndex+1;s<=t.segmentIndex;s++)o[a++]=this.edge.pts[s];return i&&(o[a]=t.coord),new nr(o,new It(this.edge._label))},Qn.prototype.add=function(e,t,n){var r=new Kn(e,t,n),i=this._nodeMap.get(r);return null!==i?i:(this._nodeMap.put(r,r),r)},Qn.prototype.isIntersection=function(e){for(var t=this.iterator();t.hasNext();)if(t.next().coord.equals(e))return!0;return!1},Qn.prototype.interfaces_=function(){return[]},Qn.prototype.getClass=function(){return Qn};var Jn=function(){};Jn.prototype.getChainStartIndices=function(e){var t=0,n=new xe;n.add(new k(t));do{var r=this.findChainEnd(e,t);n.add(new k(r)),t=r}while(tn?t:n},$n.prototype.getMinX=function(e){var t=this.pts[this.startIndex[e]].x,n=this.pts[this.startIndex[e+1]].x;return tt&&(r=1),this._depth[e][n]=r}}},er.prototype.getDelta=function(e){return this._depth[e][Et.RIGHT]-this._depth[e][Et.LEFT]},er.prototype.getLocation=function(e,t){return this._depth[e][t]<=0?T.EXTERIOR:T.INTERIOR},er.prototype.toString=function(){return"A: "+this._depth[0][1]+","+this._depth[0][2]+" B: "+this._depth[1][1]+","+this._depth[1][2]},er.prototype.add=function(){if(1===arguments.length)for(var e=arguments[0],t=0;t<2;t++)for(var n=1;n<3;n++){var r=e.getLocation(t,n);r!==T.EXTERIOR&&r!==T.INTERIOR||(this.isNull(t,n)?this._depth[t][n]=er.depthAtLocation(r):this._depth[t][n]+=er.depthAtLocation(r))}else if(3===arguments.length){var i=arguments[0],o=arguments[1];arguments[2]===T.INTERIOR&&this._depth[i][o]++}},er.prototype.interfaces_=function(){return[]},er.prototype.getClass=function(){return er},er.depthAtLocation=function(e){return e===T.EXTERIOR?0:e===T.INTERIOR?1:er.NULL_VALUE},tr.NULL_VALUE.get=function(){return-1},Object.defineProperties(er,tr);var nr=function(e){function t(){if(e.call(this),this.pts=null,this._env=null,this.eiList=new Qn(this),this._name=null,this._mce=null,this._isIsolated=!0,this._depth=new er,this._depthDelta=0,1===arguments.length){var n=arguments[0];t.call(this,n,null)}else if(2===arguments.length){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 e=new Array(2).fill(null);return e[0]=this.pts[0],e[1]=this.pts[1],new t(e,It.toLineLabel(this._label))},t.prototype.isIsolated=function(){return this._isIsolated},t.prototype.getCoordinates=function(){return this.pts},t.prototype.setIsolated=function(e){this._isIsolated=e},t.prototype.setName=function(e){this._name=e},t.prototype.equals=function(e){if(!(e instanceof t))return!1;var n=e;if(this.pts.length!==n.pts.length)return!1;for(var r=!0,i=!0,o=this.pts.length,a=0;a0?this.pts[0]:null;if(1===arguments.length){var e=arguments[0];return this.pts[e]}},t.prototype.print=function(e){e.print("edge "+this._name+": "),e.print("LINESTRING (");for(var t=0;t0&&e.print(","),e.print(this.pts[t].x+" "+this.pts[t].y);e.print(") "+this._label+" "+this._depthDelta)},t.prototype.computeIM=function(e){t.updateIM(this._label,e)},t.prototype.isCollapsed=function(){return!!this._label.isArea()&&3===this.pts.length&&!!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(e){e.print("edge "+this._name+": ");for(var t=this.pts.length-1;t>=0;t--)e.print(this.pts[t]+" ");e.println("")},t.prototype.getMonotoneChainEdge=function(){return null===this._mce&&(this._mce=new $n(this)),this._mce},t.prototype.getEnvelope=function(){if(null===this._env){this._env=new W;for(var e=0;e0&&e.append(","),e.append(this.pts[t].x+" "+this.pts[t].y);return e.append(") "+this._label+" "+this._depthDelta),e.toString()},t.prototype.isPointwiseEqual=function(e){if(this.pts.length!==e.pts.length)return!1;for(var t=0;tr||this._maxyo;if(a)return!1;var s=this.intersectsToleranceSquare(e,t);return te.isTrue(!(a&&s),"Found bad envelope test"),s},sr.prototype.initCorners=function(e){this._minx=e.x-.5,this._maxx=e.x+.5,this._miny=e.y-.5,this._maxy=e.y+.5,this._corner[0]=new M(this._maxx,this._maxy),this._corner[1]=new M(this._minx,this._maxy),this._corner[2]=new M(this._minx,this._miny),this._corner[3]=new M(this._maxx,this._miny)},sr.prototype.intersects=function(e,t){return 1===this._scaleFactor?this.intersectsScaled(e,t):(this.copyScaled(e,this._p0Scaled),this.copyScaled(t,this._p1Scaled),this.intersectsScaled(this._p0Scaled,this._p1Scaled))},sr.prototype.scale=function(e){return Math.round(e*this._scaleFactor)},sr.prototype.getCoordinate=function(){return this._originalPt},sr.prototype.copyScaled=function(e,t){t.x=this.scale(e.x),t.y=this.scale(e.y)},sr.prototype.getSafeEnvelope=function(){if(null===this._safeEnv){var e=sr.SAFE_ENV_EXPANSION_FACTOR/this._scaleFactor;this._safeEnv=new W(this._originalPt.x-e,this._originalPt.x+e,this._originalPt.y-e,this._originalPt.y+e)}return this._safeEnv},sr.prototype.intersectsPixelClosure=function(e,t){return this._li.computeIntersection(e,t,this._corner[0],this._corner[1]),!!(this._li.hasIntersection()||(this._li.computeIntersection(e,t,this._corner[1],this._corner[2]),this._li.hasIntersection()||(this._li.computeIntersection(e,t,this._corner[2],this._corner[3]),this._li.hasIntersection()||(this._li.computeIntersection(e,t,this._corner[3],this._corner[0]),this._li.hasIntersection()))))},sr.prototype.intersectsToleranceSquare=function(e,t){var n=!1,r=!1;return this._li.computeIntersection(e,t,this._corner[0],this._corner[1]),!!(this._li.isProper()||(this._li.computeIntersection(e,t,this._corner[1],this._corner[2]),this._li.isProper()||(this._li.hasIntersection()&&(n=!0),this._li.computeIntersection(e,t,this._corner[2],this._corner[3]),this._li.isProper()||(this._li.hasIntersection()&&(r=!0),this._li.computeIntersection(e,t,this._corner[3],this._corner[0]),this._li.isProper()||n&&r||e.equals(this._pt)||t.equals(this._pt)))))},sr.prototype.addSnappedNode=function(e,t){var n=e.getCoordinate(t),r=e.getCoordinate(t+1);return!!this.intersects(n,r)&&(e.addIntersection(this.getCoordinate(),t),!0)},sr.prototype.interfaces_=function(){return[]},sr.prototype.getClass=function(){return sr},lr.SAFE_ENV_EXPANSION_FACTOR.get=function(){return.75},Object.defineProperties(sr,lr);var ur=function(){this.tempEnv1=new W,this.selectedSegment=new An};ur.prototype.select=function(){if(1===arguments.length);else if(2===arguments.length){var e=arguments[0],t=arguments[1];e.getLineSegment(t,this.selectedSegment),this.select(this.selectedSegment)}},ur.prototype.interfaces_=function(){return[]},ur.prototype.getClass=function(){return ur};var cr=function(){this._index=null;var e=arguments[0];this._index=e},dr={HotPixelSnapAction:{configurable:!0}};cr.prototype.snap=function(){if(1===arguments.length){var e=arguments[0];return this.snap(e,null,-1)}if(3===arguments.length){var t=arguments[0],n=arguments[1],r=arguments[2],i=t.getSafeEnvelope(),o=new fr(t,n,r);return this._index.query(i,{interfaces_:function(){return[Zt]},visitItem:function(e){e.select(i,o)}}),o.isNodeAdded()}},cr.prototype.interfaces_=function(){return[]},cr.prototype.getClass=function(){return cr},dr.HotPixelSnapAction.get=function(){return fr},Object.defineProperties(cr,dr);var fr=function(e){function t(){e.call(this),this._hotPixel=null,this._parentEdge=null,this._hotPixelVertexIndex=null,this._isNodeAdded=!1;var t=arguments[0],n=arguments[1],r=arguments[2];this._hotPixel=t,this._parentEdge=n,this._hotPixelVertexIndex=r}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(2!==arguments.length)return e.prototype.select.apply(this,arguments);var t=arguments[0],n=arguments[1],r=t.getContext();if(null!==this._parentEdge&&r===this._parentEdge&&n===this._hotPixelVertexIndex)return null;this._isNodeAdded=this._hotPixel.addSnappedNode(r,n)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(ur),hr=function(){this._li=null,this._interiorIntersections=null;var e=arguments[0];this._li=e,this._interiorIntersections=new xe};hr.prototype.processIntersections=function(e,t,n,r){if(e===n&&t===r)return null;var i=e.getCoordinates()[t],o=e.getCoordinates()[t+1],a=n.getCoordinates()[r],s=n.getCoordinates()[r+1];if(this._li.computeIntersection(i,o,a,s),this._li.hasIntersection()&&this._li.isInteriorIntersection()){for(var l=0;l=0;t--){try{e.bufferReducedPrecision(t)}catch(t){if(!(t instanceof Tt))throw t;e._saveException=t}if(null!==e._resultGeometry)return null}throw this._saveException}if(1===arguments.length){var n=arguments[0],r=Ar.precisionScaleFactor(this._argGeom,this._distance,n),i=new ht(r);this.bufferFixedPrecision(i)}},Ar.prototype.computeGeometry=function(){if(this.bufferOriginalPrecision(),null!==this._resultGeometry)return null;var e=this._argGeom.getFactory().getPrecisionModel();e.getType()===ht.FIXED?this.bufferFixedPrecision(e):this.bufferReducedPrecision()},Ar.prototype.setQuadrantSegments=function(e){this._bufParams.setQuadrantSegments(e)},Ar.prototype.bufferOriginalPrecision=function(){try{var e=new rr(this._bufParams);this._resultGeometry=e.buffer(this._argGeom,this._distance)}catch(e){if(!(e instanceof $))throw e;this._saveException=e}},Ar.prototype.getResultGeometry=function(e){return this._distance=e,this.computeGeometry(),this._resultGeometry},Ar.prototype.setEndCapStyle=function(e){this._bufParams.setEndCapStyle(e)},Ar.prototype.interfaces_=function(){return[]},Ar.prototype.getClass=function(){return Ar},Ar.bufferOp=function(){if(2===arguments.length){var e=arguments[0],t=arguments[1];return new Ar(e).getResultGeometry(t)}if(3===arguments.length){if(Number.isInteger(arguments[2])&&arguments[0]instanceof ce&&"number"==typeof arguments[1]){var n=arguments[0],r=arguments[1],i=arguments[2],o=new Ar(n);return o.setQuadrantSegments(i),o.getResultGeometry(r)}if(arguments[2]instanceof Mn&&arguments[0]instanceof ce&&"number"==typeof arguments[1]){var a=arguments[0],s=arguments[1],l=arguments[2];return new Ar(a,l).getResultGeometry(s)}}else if(4===arguments.length){var u=arguments[0],c=arguments[1],d=arguments[2],f=arguments[3],h=new Ar(u);return h.setQuadrantSegments(d),h.setEndCapStyle(f),h.getResultGeometry(c)}},Ar.precisionScaleFactor=function(e,t,n){var r=e.getEnvelopeInternal(),i=P.max(Math.abs(r.getMaxX()),Math.abs(r.getMaxY()),Math.abs(r.getMinX()),Math.abs(r.getMinY()))+2*(t>0?t:0),o=n-Math.trunc(Math.log(i)/Math.log(10)+1);return Math.pow(10,o)},gr.CAP_ROUND.get=function(){return Mn.CAP_ROUND},gr.CAP_BUTT.get=function(){return Mn.CAP_FLAT},gr.CAP_FLAT.get=function(){return Mn.CAP_FLAT},gr.CAP_SQUARE.get=function(){return Mn.CAP_SQUARE},gr.MAX_PRECISION_DIGITS.get=function(){return 12},Object.defineProperties(Ar,gr);var mr=function(){this._pt=[new M,new M],this._distance=v.NaN,this._isNull=!0};mr.prototype.getCoordinates=function(){return this._pt},mr.prototype.getCoordinate=function(e){return this._pt[e]},mr.prototype.setMinimum=function(){if(1===arguments.length){var e=arguments[0];this.setMinimum(e._pt[0],e._pt[1])}else if(2===arguments.length){var t=arguments[0],n=arguments[1];if(this._isNull)return this.initialize(t,n),null;var r=t.distance(n);rthis._distance&&this.initialize(t,n,r)}},mr.prototype.interfaces_=function(){return[]},mr.prototype.getClass=function(){return mr};var yr=function(){};yr.prototype.interfaces_=function(){return[]},yr.prototype.getClass=function(){return yr},yr.computeDistance=function(){if(arguments[2]instanceof mr&&arguments[0]instanceof Ze&&arguments[1]instanceof M)for(var e=arguments[0],t=arguments[1],n=arguments[2],r=e.getCoordinates(),i=new An,o=0;o0||this._isIn?T.INTERIOR:T.EXTERIOR)},Er.prototype.interfaces_=function(){return[]},Er.prototype.getClass=function(){return Er};var Or=function e(){if(this._component=null,this._segIndex=null,this._pt=null,2===arguments.length){var t=arguments[0],n=arguments[1];e.call(this,t,e.INSIDE_AREA,n)}else if(3===arguments.length){var r=arguments[0],i=arguments[1],o=arguments[2];this._component=r,this._segIndex=i,this._pt=o}},Sr={INSIDE_AREA:{configurable:!0}};Or.prototype.isInsideArea=function(){return this._segIndex===Or.INSIDE_AREA},Or.prototype.getCoordinate=function(){return this._pt},Or.prototype.getGeometryComponent=function(){return this._component},Or.prototype.getSegmentIndex=function(){return this._segIndex},Or.prototype.interfaces_=function(){return[]},Or.prototype.getClass=function(){return Or},Sr.INSIDE_AREA.get=function(){return-1},Object.defineProperties(Or,Sr);var Tr=function(e){this._pts=e||null};Tr.prototype.filter=function(e){e instanceof Qe&&this._pts.add(e)},Tr.prototype.interfaces_=function(){return[ze]},Tr.prototype.getClass=function(){return Tr},Tr.getPoints=function(){if(1===arguments.length){var e=arguments[0];return e instanceof Qe?$t.singletonList(e):Tr.getPoints(e,new xe)}if(2===arguments.length){var t=arguments[0],n=arguments[1];return t instanceof Qe?n.add(t):t instanceof He&&t.apply(new Tr(n)),n}};var Cr=function(){this._locations=null;var e=arguments[0];this._locations=e};Cr.prototype.filter=function(e){(e instanceof Qe||e instanceof Ze||e instanceof $e)&&this._locations.add(new Or(e,0,e.getCoordinate()))},Cr.prototype.interfaces_=function(){return[ze]},Cr.prototype.getClass=function(){return Cr},Cr.getLocations=function(e){var t=new xe;return e.apply(new Cr(t)),t};var Lr=function(){if(this._geom=null,this._terminateDistance=0,this._ptLocator=new Er,this._minDistanceLocation=null,this._minDistance=v.MAX_VALUE,2===arguments.length){var e=arguments[0],t=arguments[1];this._geom=[e,t],this._terminateDistance=0}else if(3===arguments.length){var n=arguments[0],r=arguments[1],i=arguments[2];this._geom=new Array(2).fill(null),this._geom[0]=n,this._geom[1]=r,this._terminateDistance=i}};Lr.prototype.computeContainmentDistance=function(){if(0===arguments.length){var e=new Array(2).fill(null);if(this.computeContainmentDistance(0,e),this._minDistance<=this._terminateDistance)return null;this.computeContainmentDistance(1,e)}else if(2===arguments.length){var t=arguments[0],n=arguments[1],r=1-t,i=xr.getPolygons(this._geom[t]);if(i.size()>0){var o=Cr.getLocations(this._geom[r]);if(this.computeContainmentDistance(o,i,n),this._minDistance<=this._terminateDistance)return this._minDistanceLocation[r]=n[0],this._minDistanceLocation[t]=n[1],null}}else if(3===arguments.length)if(arguments[2]instanceof Array&&L(arguments[0],we)&&L(arguments[1],we)){for(var a=arguments[0],s=arguments[1],l=arguments[2],u=0;uthis._minDistance)return null;for(var r=e.getCoordinates(),i=t.getCoordinate(),o=0;othis._minDistance)return null;for(var d=l.getCoordinates(),f=u.getCoordinates(),h=0;hthis._distance&&this.initialize(t,n,r)}},Pr.prototype.interfaces_=function(){return[]},Pr.prototype.getClass=function(){return Pr};var Ir=function(){};Ir.prototype.interfaces_=function(){return[]},Ir.prototype.getClass=function(){return Ir},Ir.computeDistance=function(){if(arguments[2]instanceof Pr&&arguments[0]instanceof Ze&&arguments[1]instanceof M)for(var e=arguments[0],t=arguments[1],n=arguments[2],r=new An,i=e.getCoordinates(),o=0;o1||e<=0)throw new y("Fraction is not in range (0.0 - 1.0]");this._densifyFrac=e},Dr.prototype.compute=function(e,t){this.computeOrientedDistance(e,t,this._ptDist),this.computeOrientedDistance(t,e,this._ptDist)},Dr.prototype.distance=function(){return this.compute(this._g0,this._g1),this._ptDist.getDistance()},Dr.prototype.computeOrientedDistance=function(e,t,n){var r=new Rr(t);if(e.apply(r),n.setMaximum(r.getMaxPointDistance()),this._densifyFrac>0){var i=new jr(t,this._densifyFrac);e.apply(i),n.setMaximum(i.getMaxPointDistance())}},Dr.prototype.orientedDistance=function(){return this.computeOrientedDistance(this._g0,this._g1,this._ptDist),this._ptDist.getDistance()},Dr.prototype.interfaces_=function(){return[]},Dr.prototype.getClass=function(){return Dr},Dr.distance=function(){if(2===arguments.length){var e=arguments[0],t=arguments[1];return new Dr(e,t).distance()}if(3===arguments.length){var n=arguments[0],r=arguments[1],i=arguments[2],o=new Dr(n,r);return o.setDensifyFraction(i),o.distance()}},kr.MaxPointDistanceFilter.get=function(){return Rr},kr.MaxDensifiedByFractionDistanceFilter.get=function(){return jr},Object.defineProperties(Dr,kr);var Rr=function(){this._maxPtDist=new Pr,this._minPtDist=new Pr,this._euclideanDist=new Ir,this._geom=null;var e=arguments[0];this._geom=e};Rr.prototype.filter=function(e){this._minPtDist.initialize(),Ir.computeDistance(this._geom,e,this._minPtDist),this._maxPtDist.setMaximum(this._minPtDist)},Rr.prototype.getMaxPointDistance=function(){return this._maxPtDist},Rr.prototype.interfaces_=function(){return[he]},Rr.prototype.getClass=function(){return Rr};var jr=function(){this._maxPtDist=new Pr,this._minPtDist=new Pr,this._geom=null,this._numSubSegs=0;var e=arguments[0],t=arguments[1];this._geom=e,this._numSubSegs=Math.trunc(Math.round(1/t))};jr.prototype.filter=function(e,t){if(0===t)return null;for(var n=e.getCoordinate(t-1),r=e.getCoordinate(t),i=(r.x-n.x)/this._numSubSegs,o=(r.y-n.y)/this._numSubSegs,a=0;an){this._isValid=!1;var i=r.getCoordinates();this._errorLocation=i[1],this._errorIndicator=e.getFactory().createLineString(i),this._errMsg="Distance between buffer curve and input is too large ("+this._maxDistanceFound+" at "+J.toLineString(i[0],i[1])+")"}},Fr.prototype.isValid=function(){var e=Math.abs(this._bufDistance),t=Fr.MAX_DISTANCE_DIFF_FRAC*e;return this._minValidDistance=e-t,this._maxValidDistance=e+t,!(!this._input.isEmpty()&&!this._result.isEmpty())||(this._bufDistance>0?this.checkPositiveValid():this.checkNegativeValid(),Fr.VERBOSE&&G.out.println("Min Dist= "+this._minDistanceFound+" err= "+(1-this._minDistanceFound/this._bufDistance)+" Max Dist= "+this._maxDistanceFound+" err= "+(this._maxDistanceFound/this._bufDistance-1)),this._isValid)},Fr.prototype.checkNegativeValid=function(){if(!(this._input instanceof $e||this._input instanceof nt||this._input instanceof He))return null;var e=this.getPolygonLines(this._input);if(this.checkMinimumDistance(e,this._result,this._minValidDistance),!this._isValid)return null;this.checkMaximumDistance(e,this._result,this._maxValidDistance)},Fr.prototype.getErrorIndicator=function(){return this._errorIndicator},Fr.prototype.checkMinimumDistance=function(e,t,n){var r=new Lr(e,t,n);if(this._minDistanceFound=r.distance(),this._minDistanceFound0&&e>t&&(this._isValid=!1,this._errorMsg="Area of positive buffer is smaller than input",this._errorIndicator=this._result),this._distance<0&&e=2||this._distance>0?null:(this._result.isEmpty()||(this._isValid=!1,this._errorMsg="Result is non-empty",this._errorIndicator=this._result),void this.report("ExpectedEmpty"))},Br.prototype.report=function(e){if(!Br.VERBOSE)return null;G.out.println("Check "+e+": "+(this._isValid?"passed":"FAILED"))},Br.prototype.getErrorMessage=function(){return this._errorMsg},Br.prototype.interfaces_=function(){return[]},Br.prototype.getClass=function(){return Br},Br.isValidMsg=function(e,t,n){var r=new Br(e,t,n);return r.isValid()?null:r.getErrorMessage()},Br.isValid=function(e,t,n){return!!new Br(e,t,n).isValid()},zr.VERBOSE.get=function(){return!1},zr.MAX_ENV_DIFF_FRAC.get=function(){return.012},Object.defineProperties(Br,zr);var Ur=function(){this._pts=null,this._data=null;var e=arguments[0],t=arguments[1];this._pts=e,this._data=t};Ur.prototype.getCoordinates=function(){return this._pts},Ur.prototype.size=function(){return this._pts.length},Ur.prototype.getCoordinate=function(e){return this._pts[e]},Ur.prototype.isClosed=function(){return this._pts[0].equals(this._pts[this._pts.length-1])},Ur.prototype.getSegmentOctant=function(e){return e===this._pts.length-1?-1:dn.octant(this.getCoordinate(e),this.getCoordinate(e+1))},Ur.prototype.setData=function(e){this._data=e},Ur.prototype.getData=function(){return this._data},Ur.prototype.toString=function(){return J.toLineString(new lt(this._pts))},Ur.prototype.interfaces_=function(){return[fn]},Ur.prototype.getClass=function(){return Ur};var Hr=function(){this._findAllIntersections=!1,this._isCheckEndSegmentsOnly=!1,this._li=null,this._interiorIntersection=null,this._intSegments=null,this._intersections=new xe,this._intersectionCount=0,this._keepIntersections=!0;var e=arguments[0];this._li=e,this._interiorIntersection=null};Hr.prototype.getInteriorIntersection=function(){return this._interiorIntersection},Hr.prototype.setCheckEndSegmentsOnly=function(e){this._isCheckEndSegmentsOnly=e},Hr.prototype.getIntersectionSegments=function(){return this._intSegments},Hr.prototype.count=function(){return this._intersectionCount},Hr.prototype.getIntersections=function(){return this._intersections},Hr.prototype.setFindAllIntersections=function(e){this._findAllIntersections=e},Hr.prototype.setKeepIntersections=function(e){this._keepIntersections=e},Hr.prototype.processIntersections=function(e,t,n,r){if(!this._findAllIntersections&&this.hasIntersection())return null;if(e===n&&t===r)return null;if(this._isCheckEndSegmentsOnly&&!this.isEndSegment(e,t)&&!this.isEndSegment(n,r))return null;var i=e.getCoordinates()[t],o=e.getCoordinates()[t+1],a=n.getCoordinates()[r],s=n.getCoordinates()[r+1];this._li.computeIntersection(i,o,a,s),this._li.hasIntersection()&&this._li.isInteriorIntersection()&&(this._intSegments=new Array(4).fill(null),this._intSegments[0]=i,this._intSegments[1]=o,this._intSegments[2]=a,this._intSegments[3]=s,this._interiorIntersection=this._li.getIntersection(0),this._keepIntersections&&this._intersections.add(this._interiorIntersection),this._intersectionCount++)},Hr.prototype.isEndSegment=function(e,t){return 0===t||t>=e.size()-2},Hr.prototype.hasIntersection=function(){return null!==this._interiorIntersection},Hr.prototype.isDone=function(){return!this._findAllIntersections&&null!==this._interiorIntersection},Hr.prototype.interfaces_=function(){return[Xn]},Hr.prototype.getClass=function(){return Hr},Hr.createAllIntersectionsFinder=function(e){var t=new Hr(e);return t.setFindAllIntersections(!0),t},Hr.createAnyIntersectionFinder=function(e){return new Hr(e)},Hr.createIntersectionCounter=function(e){var t=new Hr(e);return t.setFindAllIntersections(!0),t.setKeepIntersections(!1),t};var Vr=function(){this._li=new ie,this._segStrings=null,this._findAllIntersections=!1,this._segInt=null,this._isValid=!0;var e=arguments[0];this._segStrings=e};Vr.prototype.execute=function(){if(null!==this._segInt)return null;this.checkInteriorIntersections()},Vr.prototype.getIntersections=function(){return this._segInt.getIntersections()},Vr.prototype.isValid=function(){return this.execute(),this._isValid},Vr.prototype.setFindAllIntersections=function(e){this._findAllIntersections=e},Vr.prototype.checkInteriorIntersections=function(){this._isValid=!0,this._segInt=new Hr(this._li),this._segInt.setFindAllIntersections(this._findAllIntersections);var e=new wn;if(e.setSegmentIntersector(this._segInt),e.computeNodes(this._segStrings),this._segInt.hasIntersection())return this._isValid=!1,null},Vr.prototype.checkValid=function(){if(this.execute(),!this._isValid)throw new Tt(this.getErrorMessage(),this._segInt.getInteriorIntersection())},Vr.prototype.getErrorMessage=function(){if(this._isValid)return"no intersections found";var e=this._segInt.getIntersectionSegments();return"found non-noded intersection between "+J.toLineString(e[0],e[1])+" and "+J.toLineString(e[2],e[3])},Vr.prototype.interfaces_=function(){return[]},Vr.prototype.getClass=function(){return Vr},Vr.computeIntersections=function(e){var t=new Vr(e);return t.setFindAllIntersections(!0),t.isValid(),t.getIntersections()};var Gr=function e(){this._nv=null;var t=arguments[0];this._nv=new Vr(e.toSegmentStrings(t))};Gr.prototype.checkValid=function(){this._nv.checkValid()},Gr.prototype.interfaces_=function(){return[]},Gr.prototype.getClass=function(){return Gr},Gr.toSegmentStrings=function(e){for(var t=new xe,n=e.iterator();n.hasNext();){var r=n.next();t.add(new Ur(r.getCoordinates(),r))}return t},Gr.checkValid=function(e){new Gr(e).checkValid()};var Yr=function(e){this._mapOp=e};Yr.prototype.map=function(e){for(var t=new xe,n=0;n0&&r<4&&!this._preserveType?this._factory.createLineString(n):this._factory.createLinearRing(n)},Xr.prototype.interfaces_=function(){return[]},Xr.prototype.getClass=function(){return Xr};var Zr=function e(){if(this._snapTolerance=0,this._srcPts=null,this._seg=new An,this._allowSnappingToSourceVertices=!1,this._isClosed=!1,arguments[0]instanceof Ze&&"number"==typeof arguments[1]){var t=arguments[0],n=arguments[1];e.call(this,t.getCoordinates(),n)}else if(arguments[0]instanceof Array&&"number"==typeof arguments[1]){var r=arguments[0],i=arguments[1];this._srcPts=r,this._isClosed=e.isClosed(r),this._snapTolerance=i}};Zr.prototype.snapVertices=function(e,t){for(var n=this._isClosed?e.size()-1:e.size(),r=0;r=0&&e.add(o+1,new M(i),!1)}},Zr.prototype.findSegmentIndexToSnap=function(e,t){for(var n=v.MAX_VALUE,r=-1,i=0;it&&(t=r)}return t}if(2===arguments.length){var i=arguments[0],o=arguments[1];return Math.min(Kr.computeOverlaySnapTolerance(i),Kr.computeOverlaySnapTolerance(o))}},Kr.computeSizeBasedSnapTolerance=function(e){var t=e.getEnvelopeInternal();return Math.min(t.getHeight(),t.getWidth())*Kr.SNAP_PRECISION_FACTOR},Kr.snapToSelf=function(e,t,n){return new Kr(e).snapToSelf(t,n)},Qr.SNAP_PRECISION_FACTOR.get=function(){return 1e-9},Object.defineProperties(Kr,Qr);var Jr=function(e){function t(t,n,r){e.call(this),this._snapTolerance=t||null,this._snapPts=n||null,this._isSelfSnap=void 0!==r&&r}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.snapLine=function(e,t){var n=new Zr(e,this._snapTolerance);return n.setAllowSnappingToSourceVertices(this._isSelfSnap),n.snapTo(t)},t.prototype.transformCoordinates=function(e,t){var n=e.toCoordinateArray(),r=this.snapLine(n,this._snapPts);return this._factory.getCoordinateSequenceFactory().create(r)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(Xr),$r=function(){this._isFirst=!0,this._commonMantissaBitsCount=53,this._commonBits=0,this._commonSignExp=null};$r.prototype.getCommon=function(){return v.longBitsToDouble(this._commonBits)},$r.prototype.add=function(e){var t=v.doubleToLongBits(e);return this._isFirst?(this._commonBits=t,this._commonSignExp=$r.signExpBits(this._commonBits),this._isFirst=!1,null):$r.signExpBits(t)!==this._commonSignExp?(this._commonBits=0,null):(this._commonMantissaBitsCount=$r.numCommonMostSigMantissaBits(this._commonBits,t),void(this._commonBits=$r.zeroLowerBits(this._commonBits,64-(12+this._commonMantissaBitsCount))))},$r.prototype.toString=function(){if(1===arguments.length){var e=arguments[0],t=v.longBitsToDouble(e),n="0000000000000000000000000000000000000000000000000000000000000000"+v.toBinaryString(e),r=n.substring(n.length-64);return r.substring(0,1)+" "+r.substring(1,12)+"(exp) "+r.substring(12)+" [ "+t+" ]"}},$r.prototype.interfaces_=function(){return[]},$r.prototype.getClass=function(){return $r},$r.getBit=function(e,t){return 0!=(e&1<>52},$r.zeroLowerBits=function(e,t){return e&~((1<=0;r--){if($r.getBit(e,r)!==$r.getBit(t,r))return n;n++}return 52};var ei=function(){this._commonCoord=null,this._ccFilter=new ni},ti={CommonCoordinateFilter:{configurable:!0},Translater:{configurable:!0}};ei.prototype.addCommonBits=function(e){var t=new ri(this._commonCoord);e.apply(t),e.geometryChanged()},ei.prototype.removeCommonBits=function(e){if(0===this._commonCoord.x&&0===this._commonCoord.y)return e;var t=new M(this._commonCoord);t.x=-t.x,t.y=-t.y;var n=new ri(t);return e.apply(n),e.geometryChanged(),e},ei.prototype.getCommonCoordinate=function(){return this._commonCoord},ei.prototype.add=function(e){e.apply(this._ccFilter),this._commonCoord=this._ccFilter.getCommonCoordinate()},ei.prototype.interfaces_=function(){return[]},ei.prototype.getClass=function(){return ei},ti.CommonCoordinateFilter.get=function(){return ni},ti.Translater.get=function(){return ri},Object.defineProperties(ei,ti);var ni=function(){this._commonBitsX=new $r,this._commonBitsY=new $r};ni.prototype.filter=function(e){this._commonBitsX.add(e.x),this._commonBitsY.add(e.y)},ni.prototype.getCommonCoordinate=function(){return new M(this._commonBitsX.getCommon(),this._commonBitsY.getCommon())},ni.prototype.interfaces_=function(){return[he]},ni.prototype.getClass=function(){return ni};var ri=function(){this.trans=null;var e=arguments[0];this.trans=e};ri.prototype.filter=function(e,t){var n=e.getOrdinate(t,0)+this.trans.x,r=e.getOrdinate(t,1)+this.trans.y;e.setOrdinate(t,0,n),e.setOrdinate(t,1,r)},ri.prototype.isDone=function(){return!1},ri.prototype.isGeometryChanged=function(){return!0},ri.prototype.interfaces_=function(){return[Ue]},ri.prototype.getClass=function(){return ri};var ii=function(e,t){this._geom=new Array(2).fill(null),this._snapTolerance=null,this._cbr=null,this._geom[0]=e,this._geom[1]=t,this.computeSnapTolerance()};ii.prototype.selfSnap=function(e){return new Kr(e).snapTo(e,this._snapTolerance)},ii.prototype.removeCommonBits=function(e){this._cbr=new ei,this._cbr.add(e[0]),this._cbr.add(e[1]);var t=new Array(2).fill(null);return t[0]=this._cbr.removeCommonBits(e[0].copy()),t[1]=this._cbr.removeCommonBits(e[1].copy()),t},ii.prototype.prepareResult=function(e){return this._cbr.addCommonBits(e),e},ii.prototype.getResultGeometry=function(e){var t=this.snap(this._geom),n=Oi.overlayOp(t[0],t[1],e);return this.prepareResult(n)},ii.prototype.checkValid=function(e){e.isValid()||G.out.println("Snapped geometry is invalid")},ii.prototype.computeSnapTolerance=function(){this._snapTolerance=Kr.computeOverlaySnapTolerance(this._geom[0],this._geom[1])},ii.prototype.snap=function(e){var t=this.removeCommonBits(e);return Kr.snap(t[0],t[1],this._snapTolerance)},ii.prototype.interfaces_=function(){return[]},ii.prototype.getClass=function(){return ii},ii.overlayOp=function(e,t,n){return new ii(e,t).getResultGeometry(n)},ii.union=function(e,t){return ii.overlayOp(e,t,Oi.UNION)},ii.intersection=function(e,t){return ii.overlayOp(e,t,Oi.INTERSECTION)},ii.symDifference=function(e,t){return ii.overlayOp(e,t,Oi.SYMDIFFERENCE)},ii.difference=function(e,t){return ii.overlayOp(e,t,Oi.DIFFERENCE)};var oi=function(e,t){this._geom=new Array(2).fill(null),this._geom[0]=e,this._geom[1]=t};oi.prototype.getResultGeometry=function(e){var t=null,n=!1,r=null;try{t=Oi.overlayOp(this._geom[0],this._geom[1],e),n=!0}catch(e){if(!(e instanceof $))throw e;r=e}if(!n)try{t=ii.overlayOp(this._geom[0],this._geom[1],e)}catch(e){throw e instanceof $?r:e}return t},oi.prototype.interfaces_=function(){return[]},oi.prototype.getClass=function(){return oi},oi.overlayOp=function(e,t,n){return new oi(e,t).getResultGeometry(n)},oi.union=function(e,t){return oi.overlayOp(e,t,Oi.UNION)},oi.intersection=function(e,t){return oi.overlayOp(e,t,Oi.INTERSECTION)},oi.symDifference=function(e,t){return oi.overlayOp(e,t,Oi.SYMDIFFERENCE)},oi.difference=function(e,t){return oi.overlayOp(e,t,Oi.DIFFERENCE)};var ai=function(){this.mce=null,this.chainIndex=null;var e=arguments[0],t=arguments[1];this.mce=e,this.chainIndex=t};ai.prototype.computeIntersections=function(e,t){this.mce.computeIntersectsForChain(this.chainIndex,e.mce,e.chainIndex,t)},ai.prototype.interfaces_=function(){return[]},ai.prototype.getClass=function(){return ai};var si=function e(){if(this._label=null,this._xValue=null,this._eventType=null,this._insertEvent=null,this._deleteEventIndex=null,this._obj=null,2===arguments.length){var t=arguments[0],n=arguments[1];this._eventType=e.DELETE,this._xValue=t,this._insertEvent=n}else if(3===arguments.length){var r=arguments[0],i=arguments[1],o=arguments[2];this._eventType=e.INSERT,this._label=r,this._xValue=i,this._obj=o}},li={INSERT:{configurable:!0},DELETE:{configurable:!0}};si.prototype.isDelete=function(){return this._eventType===si.DELETE},si.prototype.setDeleteEventIndex=function(e){this._deleteEventIndex=e},si.prototype.getObject=function(){return this._obj},si.prototype.compareTo=function(e){var t=e;return this._xValuet._xValue?1:this._eventTypet._eventType?1:0},si.prototype.getInsertEvent=function(){return this._insertEvent},si.prototype.isInsert=function(){return this._eventType===si.INSERT},si.prototype.isSameLabel=function(e){return null!==this._label&&this._label===e._label},si.prototype.getDeleteEventIndex=function(){return this._deleteEventIndex},si.prototype.interfaces_=function(){return[_]},si.prototype.getClass=function(){return si},li.INSERT.get=function(){return 1},li.DELETE.get=function(){return 2},Object.defineProperties(si,li);var ui=function(){};ui.prototype.interfaces_=function(){return[]},ui.prototype.getClass=function(){return ui};var ci=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 e=arguments[0],t=arguments[1],n=arguments[2];this._li=e,this._includeProper=t,this._recordIsolated=n};ci.prototype.isTrivialIntersection=function(e,t,n,r){if(e===n&&1===this._li.getIntersectionNum()){if(ci.isAdjacentSegments(t,r))return!0;if(e.isClosed()){var i=e.getNumPoints()-1;if(0===t&&r===i||0===r&&t===i)return!0}}return!1},ci.prototype.getProperIntersectionPoint=function(){return this._properIntersectionPoint},ci.prototype.setIsDoneIfProperInt=function(e){this._isDoneWhenProperInt=e},ci.prototype.hasProperInteriorIntersection=function(){return this._hasProperInterior},ci.prototype.isBoundaryPointInternal=function(e,t){for(var n=t.iterator();n.hasNext();){var r=n.next().getCoordinate();if(e.isIntersection(r))return!0}return!1},ci.prototype.hasProperIntersection=function(){return this._hasProper},ci.prototype.hasIntersection=function(){return this._hasIntersection},ci.prototype.isDone=function(){return this._isDone},ci.prototype.isBoundaryPoint=function(e,t){return!(null===t||!this.isBoundaryPointInternal(e,t[0])&&!this.isBoundaryPointInternal(e,t[1]))},ci.prototype.setBoundaryNodes=function(e,t){this._bdyNodes=new Array(2).fill(null),this._bdyNodes[0]=e,this._bdyNodes[1]=t},ci.prototype.addIntersections=function(e,t,n,r){if(e===n&&t===r)return null;this.numTests++;var i=e.getCoordinates()[t],o=e.getCoordinates()[t+1],a=n.getCoordinates()[r],s=n.getCoordinates()[r+1];this._li.computeIntersection(i,o,a,s),this._li.hasIntersection()&&(this._recordIsolated&&(e.setIsolated(!1),n.setIsolated(!1)),this._numIntersections++,this.isTrivialIntersection(e,t,n,r)||(this._hasIntersection=!0,!this._includeProper&&this._li.isProper()||(e.addIntersections(this._li,t,0),n.addIntersections(this._li,r,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))))},ci.prototype.interfaces_=function(){return[]},ci.prototype.getClass=function(){return ci},ci.isAdjacentSegments=function(e,t){return 1===Math.abs(e-t)};var di=function(e){function t(){e.call(this),this.events=new xe,this.nOverlaps=null}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.prepareEvents=function(){$t.sort(this.events);for(var e=0;et||this._maxo?1:0},pi.prototype.interfaces_=function(){return[x]},pi.prototype.getClass=function(){return pi};var Ai=function(e){function t(){e.call(this),this._item=null;var t=arguments[0],n=arguments[1],r=arguments[2];this._min=t,this._max=n,this._item=r}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.query=function(e,t,n){if(!this.intersects(e,t))return null;n.visitItem(this._item)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(fi),gi=function(e){function t(){e.call(this),this._node1=null,this._node2=null;var t=arguments[0],n=arguments[1];this._node1=t,this._node2=n,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(e,t){this._min=Math.min(e._min,t._min),this._max=Math.max(e._max,t._max)},t.prototype.query=function(e,t,n){if(!this.intersects(e,t))return null;null!==this._node1&&this._node1.query(e,t,n),null!==this._node2&&this._node2.query(e,t,n)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(fi),mi=function(){this._leaves=new xe,this._root=null,this._level=0};mi.prototype.buildTree=function(){$t.sort(this._leaves,new fi.NodeComparator);for(var e=this._leaves,t=null,n=new xe;;){if(this.buildLevel(e,n),1===n.size())return n.get(0);t=e,e=n,n=t}},mi.prototype.insert=function(e,t,n){if(null!==this._root)throw new Error("Index cannot be added to once it has been queried");this._leaves.add(new Ai(e,t,n))},mi.prototype.query=function(e,t,n){this.init(),this._root.query(e,t,n)},mi.prototype.buildRoot=function(){if(null!==this._root)return null;this._root=this.buildTree()},mi.prototype.printNode=function(e){G.out.println(J.toLineString(new M(e._min,this._level),new M(e._max,this._level)))},mi.prototype.init=function(){if(null!==this._root)return null;this.buildRoot()},mi.prototype.buildLevel=function(e,t){this._level++,t.clear();for(var n=0;n=2,"found LineString with single point"),this.insertBoundaryPoint(this._argIndex,t[0]),this.insertBoundaryPoint(this._argIndex,t[t.length-1])},t.prototype.getInvalidPoint=function(){return this._invalidPoint},t.prototype.getBoundaryPoints=function(){for(var e=this.getBoundaryNodes(),t=new Array(e.size()).fill(null),n=0,r=e.iterator();r.hasNext();){var i=r.next();t[n++]=i.getCoordinate().copy()}return t},t.prototype.getBoundaryNodes=function(){return null===this._boundaryNodes&&(this._boundaryNodes=this._nodes.getBoundaryNodes(this._argIndex)),this._boundaryNodes},t.prototype.addSelfIntersectionNode=function(e,t,n){if(this.isBoundaryNode(e,t))return null;n===T.BOUNDARY&&this._useBoundaryDeterminationRule?this.insertBoundaryPoint(e,t):this.insertPoint(e,t,n)},t.prototype.addPolygonRing=function(e,t,n){if(e.isEmpty())return null;var r=Oe.removeRepeatedPoints(e.getCoordinates());if(r.length<4)return this._hasTooFewPoints=!0,this._invalidPoint=r[0],null;var i=t,o=n;se.isCCW(r)&&(i=n,o=t);var a=new nr(r,new It(this._argIndex,T.BOUNDARY,i,o));this._lineEdgeMap.put(e,a),this.insertEdge(a),this.insertPoint(this._argIndex,r[0],T.BOUNDARY)},t.prototype.insertPoint=function(e,t,n){var r=this._nodes.addNode(t),i=r.getLabel();null===i?r._label=new It(e,n):i.setLocation(e,n)},t.prototype.createEdgeSetIntersector=function(){return new di},t.prototype.addSelfIntersectionNodes=function(e){for(var t=this._edges.iterator();t.hasNext();)for(var n=t.next(),r=n.getLabel().getLocation(e),i=n.eiList.iterator();i.hasNext();){var o=i.next();this.addSelfIntersectionNode(e,o.coord,r)}},t.prototype.add=function(){if(1!==arguments.length)return e.prototype.add.apply(this,arguments);var t=arguments[0];if(t.isEmpty())return null;if(t instanceof nt&&(this._useBoundaryDeterminationRule=!1),t instanceof $e)this.addPolygon(t);else if(t instanceof Ze)this.addLineString(t);else if(t instanceof Qe)this.addPoint(t);else if(t instanceof et)this.addCollection(t);else if(t instanceof Ve)this.addCollection(t);else if(t instanceof nt)this.addCollection(t);else{if(!(t instanceof He))throw new Error(t.getClass().getName());this.addCollection(t)}},t.prototype.addCollection=function(e){for(var t=0;t50?(null===this._areaPtLocator&&(this._areaPtLocator=new vi(this._parentGeom)),this._areaPtLocator.locate(e)):this._ptLocator.locate(e,this._parentGeom)},t.prototype.findEdge=function(){if(1===arguments.length){var t=arguments[0];return this._lineEdgeMap.get(t)}return e.prototype.findEdge.apply(this,arguments)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t.determineBoundary=function(e,t){return e.isInBoundary(t)?T.BOUNDARY:T.INTERIOR},t}(Gt),Mi=function(){if(this._li=new ie,this._resultPrecisionModel=null,this._arg=null,1===arguments.length){var e=arguments[0];this.setComputationPrecision(e.getPrecisionModel()),this._arg=new Array(1).fill(null),this._arg[0]=new xi(0,e)}else if(2===arguments.length){var t=arguments[0],n=arguments[1],r=pe.OGC_SFS_BOUNDARY_RULE;t.getPrecisionModel().compareTo(n.getPrecisionModel())>=0?this.setComputationPrecision(t.getPrecisionModel()):this.setComputationPrecision(n.getPrecisionModel()),this._arg=new Array(2).fill(null),this._arg[0]=new xi(0,t,r),this._arg[1]=new xi(1,n,r)}else if(3===arguments.length){var i=arguments[0],o=arguments[1],a=arguments[2];i.getPrecisionModel().compareTo(o.getPrecisionModel())>=0?this.setComputationPrecision(i.getPrecisionModel()):this.setComputationPrecision(o.getPrecisionModel()),this._arg=new Array(2).fill(null),this._arg[0]=new xi(0,i,a),this._arg[1]=new xi(1,o,a)}};Mi.prototype.getArgGeometry=function(e){return this._arg[e].getGeometry()},Mi.prototype.setComputationPrecision=function(e){this._resultPrecisionModel=e,this._li.setPrecisionModel(this._resultPrecisionModel)},Mi.prototype.interfaces_=function(){return[]},Mi.prototype.getClass=function(){return Mi};var Ei=function(){};Ei.prototype.interfaces_=function(){return[]},Ei.prototype.getClass=function(){return Ei},Ei.map=function(){if(arguments[0]instanceof ce&&L(arguments[1],Ei.MapOp)){for(var e=arguments[0],t=arguments[1],n=new xe,r=0;r=e.size()?null:e.get(t)},Di.union=function(e){return new Di(e).union()},ki.STRTREE_NODE_CAPACITY.get=function(){return 4},Object.defineProperties(Di,ki);var Ri=function(){};Ri.prototype.interfaces_=function(){return[]},Ri.prototype.getClass=function(){return Ri},Ri.union=function(e,t){if(e.isEmpty()||t.isEmpty()){if(e.isEmpty()&&t.isEmpty())return Oi.createEmptyResult(Oi.UNION,e,t,e.getFactory());if(e.isEmpty())return t.copy();if(t.isEmpty())return e.copy()}return e.checkNotGeometryCollection(e),e.checkNotGeometryCollection(t),oi.overlayOp(e,t,Oi.UNION)},e.GeoJSONReader=xt,e.GeoJSONWriter=Mt,e.OverlayOp=Oi,e.UnionOp=Ri,e.BufferOp=Ar,Object.defineProperty(e,"__esModule",{value:!0})}(t)},function(e,t,n){"use strict";var r=Math.PI,i=2*r,o=i-1e-6;function a(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function s(){return new a}a.prototype=s.prototype={constructor:a,moveTo:function(e,t){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)},closePath:function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(e,t){this._+="L"+(this._x1=+e)+","+(this._y1=+t)},quadraticCurveTo:function(e,t,n,r){this._+="Q"+ +e+","+ +t+","+(this._x1=+n)+","+(this._y1=+r)},bezierCurveTo:function(e,t,n,r,i,o){this._+="C"+ +e+","+ +t+","+ +n+","+ +r+","+(this._x1=+i)+","+(this._y1=+o)},arcTo:function(e,t,n,i,o){e=+e,t=+t,n=+n,i=+i,o=+o;var a=this._x1,s=this._y1,l=n-e,u=i-t,c=a-e,d=s-t,f=c*c+d*d;if(o<0)throw new Error("negative radius: "+o);if(null===this._x1)this._+="M"+(this._x1=e)+","+(this._y1=t);else if(f>1e-6)if(Math.abs(d*l-u*c)>1e-6&&o){var h=n-a,p=i-s,A=l*l+u*u,g=h*h+p*p,m=Math.sqrt(A),y=Math.sqrt(f),v=o*Math.tan((r-Math.acos((A+f-g)/(2*m*y)))/2),b=v/y,_=v/m;Math.abs(b-1)>1e-6&&(this._+="L"+(e+b*c)+","+(t+b*d)),this._+="A"+o+","+o+",0,0,"+ +(d*h>c*p)+","+(this._x1=e+_*l)+","+(this._y1=t+_*u)}else this._+="L"+(this._x1=e)+","+(this._y1=t);else;},arc:function(e,t,n,a,s,l){e=+e,t=+t,l=!!l;var u=(n=+n)*Math.cos(a),c=n*Math.sin(a),d=e+u,f=t+c,h=1^l,p=l?a-s:s-a;if(n<0)throw new Error("negative radius: "+n);null===this._x1?this._+="M"+d+","+f:(Math.abs(this._x1-d)>1e-6||Math.abs(this._y1-f)>1e-6)&&(this._+="L"+d+","+f),n&&(p<0&&(p=p%i+i),p>o?this._+="A"+n+","+n+",0,1,"+h+","+(e-u)+","+(t-c)+"A"+n+","+n+",0,1,"+h+","+(this._x1=d)+","+(this._y1=f):p>1e-6&&(this._+="A"+n+","+n+",0,"+ +(p>=r)+","+h+","+(this._x1=e+n*Math.cos(s))+","+(this._y1=t+n*Math.sin(s))))},rect:function(e,t,n,r){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)+"h"+ +n+"v"+ +r+"h"+-n+"Z"},toString:function(){return this._}},t.a=s},,,,function(e,t,n){var r=n(693);e.exports=function(e,t){if(e){if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){"use strict";var r=n(3),i=n(71);Object.defineProperty(t,"__esModule",{value:!0}),t.updateStateWithLayerAndData=V,t.updateStateOnLayerVisibilityChange=G,t.applyLayerConfigUpdater=function e(t,n){var r,i=n.oldLayerId,o=n.newLayerConfig,a=n.layerIndex,s=(0,M.parseLayerConfig)(t.schema,o),l=t.layers.find((function(e){return e.id===i}));if(!l||!s)return t;if(null!=a&&t.layers[a]!==l)return t;var u=t.datasets[s.config.dataId];if(!u)return t;var c=(0,M.validateLayerWithData)(u,s,t.layerClasses);if(!c)return t;var d=t;if(c.type&&c.type!==l.type){var f=t.layers.findIndex((function(e){return e.id===i}));if(f>=0&&(d=Z(d,(0,w.layerTypeChange)(l,c.type))).layers.length===t.layers.length){var h=d.layers[f].id;d=e(d,(0,w.applyLayerConfig)(h,N(N({},o),{},{id:h})))}return d}var p=null!==(r=(0,M.serializeLayer)(l,t.schema))&&void 0!==r?r:{config:{}},A=(0,M.serializeLayer)(c,t.schema);if(!A)return t;if(!(0,y.default)(p,A)){var g=(v=p.config,b=A.config,_={},(x=function(e){Object.keys(e).forEach((function(e){_.hasOwnProperty(e)||(0,y.default)(v[e],b[e])||(_[e]=b[e])}))})(v),x(b),_);"visConfig"in g&&(g.visConfig&&(d=Q(d,(0,w.layerVisConfigChange)(l,g.visConfig))),delete g.visConfig),Object.keys(l.visualChannels).forEach((function(e){var t=l.visualChannels[e],n=Y.map((function(e){return t[e]}));if(n.some((function(e){return e in g}))){d=K(d,(0,w.layerVisualChannelConfigChange)(l,(0,m.default)(c.config,n),e));var r,i=R(n);try{for(i.s();!(r=i.n()).done;){var o=r.value;delete g[o]}}catch(e){i.e(e)}finally{i.f()}}})),Object.keys(g).length>0&&(d=W(d,(0,w.layerConfigChange)(l,(0,m.default)(c.config,Object.keys(g)))))}var v,b,_,x;return d},t.layerConfigChangeUpdater=W,t.layerSetIsValidUpdater=function(e,t){var n=t.oldLayer,r=t.isValid,i=e.layers.findIndex((function(e){return e.id===n.id})),o=e.layers[i];if(o){var a,s=null;if(r){var l=(0,L.calculateLayerData)(o,e,void 0),u=l.layer,c=l.layerData;a=u,s=c}else(a=o.updateLayerConfig({isVisible:!1})).isValid=!1;return V(e,{idx:i,layer:a,layerData:s})}return e},t.layerTextLabelChangeUpdater=function(e,t){var n,r,i,o=t.oldLayer,a=t.idx,l=t.prop,c=t.value,d=o.config.textLabel,f=null!==(n=null===(r=o.getDefaultLayerConfig({dataId:""}))||void 0===r||null===(i=r.textLabel)||void 0===i?void 0:i[0])&&void 0!==n?n:S.DEFAULT_TEXT_LABEL,h=d.slice();d[a]||a!==d.length||(h=[].concat((0,s.default)(d),[f]));h="all"===a&&"fields"===l?function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:S.DEFAULT_TEXT_LABEL,r=t.slice(),i=t.map((function(e){return e.field&&e.field.name})).filter((function(e){return e})),o=e.filter((function(e){return!i.includes(e.name)})),a=i.filter((function(t){return!e.find((function(e){return e.name===t}))}));return r=(r=r.filter((function(e){return e.field&&!a.includes(e.field.name)}))).length?r:[n],r=[].concat((0,s.default)(r.filter((function(e){return e.field}))),(0,s.default)(o.map((function(e){return N(N({},n),{},{field:e})}))))}(c,d,f):function(e,t,n,r){if(!r[e].hasOwnProperty(t))return r;var i=r.slice();"field"===t&&null===n&&r.length>1?i.splice(e,1):t&&(i=r.map((function(r,i){return i===e?N(N({},r),{},(0,u.default)({},t,n)):r})));return i}(a,l,c,h);return W(e,{oldLayer:o,newConfig:{textLabel:h}})},t.layerDataIdChangeUpdater=q,t.setInitialLayerConfig=X,t.layerTypeChangeUpdater=Z,t.layerVisualChannelChangeUpdater=K,t.layerVisConfigChangeUpdater=Q,t.setFilterAnimationTimeUpdater=function(e,t){return J(e,t)},t.setFilterAnimationWindowUpdater=function(e,t){var n=t.id,r=t.animationWindow;return N(N({},e),{},{filters:e.filters.map((function(e){return e.id===n?N(N({},e),{},{animationWindow:r}):e}))})},t.setFilterUpdater=J,t.removeLayerUpdater=te,t.removeDatasetUpdater=re,t.interactionConfigChangeUpdater=function(e,t){var n=t.config,r=N(N({},e.interactionConfig),(0,u.default)({},n.id,n)),i=["brush","tooltip"];i.includes(n.id)&&n.enabled&&!e.interactionConfig[n.id].enabled&&i.forEach((function(e){e!==n.id&&(r[e]=N(N({},r[e]),{},{enabled:!1}))}));var o=N(N({},e),{},{interactionConfig:r});if("geocoder"===n.id&&!n.enabled)return re(o,{dataId:"geocoder_dataset"});return o},t.applyMergersUpdater=ae,t.renameDatasetUpdater=function(e,t){return le(e,{dataId:t.dataId,props:{label:t.label}})},t.updateDatasetPropsUpdater=le,t.closeSpecificMapAtIndex=ue,t.loadFileStepSuccessUpdater=function(e,t){if(!e.fileLoading)return e;var n=t.fileName,r=t.fileCache,i=e.fileLoading,o=i.filesToLoad,a=i.onFinish,s=ge(e,{fileName:n,progress:{percent:1,message:"Done"}}),l=(0,T.pick_)("fileLoading")((0,T.merge_)({fileCache:r}))(s);return(0,f.withTask)(l,(0,_.DELAY_TASK)(200).map(o.length?w.loadNextFile:function(){return a(r)}))},t.loadNextFileUpdater=ce,t.makeLoadFileTask=de,t.processFileContentUpdater=function(e,t){var n=t.payload,r=n.content,i=n.fileCache,o=ge(e,{fileName:r.fileName,progress:{percent:1,message:"processing..."}});return(0,f.withTask)(o,(0,_.PROCESS_FILE_DATA)({content:r,fileCache:i}).bimap((function(e){return(0,w.loadFileStepSuccess)({fileName:r.fileName,fileCache:e})}),(function(e){return(0,w.loadFilesErr)(r.fileName,e)})))},t.parseProgress=fe,t.addDefaultLayers=he,t.addDefaultTooltips=pe,t.initialFileLoadingProgress=Ae,t.updateFileLoadingProgressUpdater=ge,t.updateAllLayerDomainData=me,t.updateAnimationDomain=ye,t.setFeaturesUpdater=function(e,t){var n=t.features,r=void 0===n?[]:n,i=r.length&&r[r.length-1],o=N(N({},e),{},{editor:N(N({},e.editor),{},{features:r.filter((function(e){return!(0,x.getFilterIdInFeature)(e)})),mode:i&&i.properties.isClosed?S.EDITOR_MODES.EDIT:e.editor.mode})}),a=e.editor.selectedFeature;if(!a)return o;var s=r.find((function(e){return e.id===a.id})),l=s&&(0,x.getFilterIdInFeature)(s);if(l&&s){s.properties&&(s.properties.bbox=(0,c.default)(s));var u=(0,x.featureToFilterValue)(s,l),d=e.filters.findIndex((function(e){return e.id===l}));return J(o,{idx:d,prop:"value",value:u})}return o},t.deleteFeatureUpdater=function(e,t){var n=t.feature;if(!n)return e;var r=N(N({},e),{},{editor:N(N({},e.editor),{},{selectedFeature:null})});if((0,x.getFilterIdInFeature)(n)){var i=r.filters.findIndex((function(e){return e.id===(0,x.getFilterIdInFeature)(n)}));return i>-1?$(r,{idx:i}):r}var o=N(N({},e.editor),{},{features:e.editor.features.filter((function(e){return e.id!==n.id})),selectedFeature:null});return N(N({},e),{},{editor:o})},t.setPolygonFilterLayerUpdater=function(e,t){var n,r=t.layer,i=t.feature,o=(0,x.getFilterIdInFeature)(i),a=[r.id],l=e;if(o){if(n=e.filters.findIndex((function(e){return e.id===o})),!e.filters[n]){var u=N(N({},i),{},{properties:N(N({},i.properties),{},{filterId:null})});return N(N({},e),{},{editor:N(N({},e.editor),{},{features:[].concat((0,s.default)(e.editor.features),[u]),selectedFeature:u})})}var c=e.filters[n].layerId,d=void 0===c?[]:c,f=d.includes(r.id);a=f?d.filter((function(e){return e!==r.id})):[].concat((0,s.default)(d),[r.id])}else{var h=(0,x.generatePolygonFilter)([],i);n=e.filters.length,l=N(N({},e),{},{filters:[].concat((0,s.default)(e.filters),[h]),editor:N(N({},e.editor),{},{features:e.editor.features.filter((function(e){return e.id!==i.id})),selectedFeature:h.value})})}return J(l,{idx:n,prop:"layerId",value:a})},t.sortTableColumnUpdater=function(e,t){var n=t.dataId,r=t.column,i=t.mode,o=e.datasets[n];if(!o)return e;var a=i;if(!a){var s=(0,A.default)(o,["sortColumn",r]);a=s?Object.keys(S.SORT_ORDER).find((function(e){return e!==s})):S.SORT_ORDER.ASCENDING}var l=(0,P.sortDatasetByColumn)(o,r,a);return(0,x.set)(["datasets",n],l,e)},t.pinTableColumnUpdater=function(e,t){var n=t.dataId,r=t.column,i=e.datasets[n];if(!i)return e;var o=(0,P.pinTableColumns)(i,r);return(0,x.set)(["datasets",n],o,e)},t.copyTableColumnUpdater=function(e,t){var n=t.dataId,r=t.column,i=e.datasets[n];if(!i)return e;var o=i.fields.findIndex((function(e){return e.name===r}));if(o<0)return e;var a=i.fields[o].type,s=i.dataContainer.map((function(e){return(0,x.parseFieldValue)(e.valueAt(o),a)}),!0).join("\n");return(0,v.default)(s),e},t.setColumnDisplayFormatUpdater=function(e,t){var n=t.dataId,r=t.formats,i=e.datasets[n];if(!i)return e;var o=i.fields;Object.keys(r).forEach((function(e){var t=i.fields.findIndex((function(t){return t.name===e}));if(t>=0){var n=r[e],a=o[t];o=(0,T.swap_)((0,T.merge_)({displayFormat:n})(a))(o)}}));var a=(0,P.copyTableAndUpdate)(i,{fields:o});return(0,T.pick_)("datasets")((0,T.merge_)((0,u.default)({},n,a)))(e)},t.toggleEditorVisibilityUpdater=function(e,t){return N(N({},e),{},{editor:N(N({},e.editor),{},{visible:!e.editor.visible})})},t.setFilterAnimationTimeConfigUpdater=function(e,t){var n=t.idx,r=t.config,i=e.filters[n];if(!i)return d.console.error("filters.".concat(n," is undefined")),e;if(i.type!==S.FILTER_TYPES.timeRange)return d.console.error("setFilterAnimationTimeConfig can only be called to update a time filter. check filter.type === 'timeRange'"),e;var o=ve(r);return(0,T.pick_)("filters")((0,T.swap_)((0,T.merge_)(o)(i)))(e)},t.setLayerAnimationTimeConfigUpdater=function(e,t){var n=t.config;if(!n)return e;var r=ve(n);return(0,T.pick_)("animationConfig")((0,T.merge_)(r))(e)},t.prepareStateForDatasetReplace=function(e,t,n){var r,i=(0,M.serializeVisState)(e,e.schema),o=_e(e,t,n),a=(0,s.default)(e.layerOrder);if(o.preserveDatasetOrder=Object.keys(e.datasets).map((function(e){return e===t?n:e})),null!==(r=o.layerToBeMerged)&&void 0!==r&&r.length){var l;o.splitMapsToBeMerged=null!==(l=null==i?void 0:i.splitMaps)&&void 0!==l?l:[],o.layerOrder=(0,s.default)(a)}return o},t.replaceDatasetDepsInState=we,t.setSelectedFeatureUpdater=t.setEditorModeUpdater=t.setMapInfoUpdater=t.applyCPUFilterUpdater=t.loadFilesErrUpdater=t.nextFileBatchUpdater=t.loadFilesUpdater=t.updateVisDataUpdater=t.toggleLayerForMapUpdater=t.toggleSplitMapUpdater=t.mouseMoveUpdater=t.mapClickUpdater=t.layerClickUpdater=t.layerHoverUpdater=t.receiveMapConfigUpdater=t.resetMapConfigUpdater=t.updateTableColorUpdater=t.showDatasetTableUpdater=t.updateOverlayBlendingUpdater=t.updateLayerBlendingUpdater=t.updateEffectUpdater=t.reorderEffectUpdater=t.removeEffectUpdater=t.addEffectUpdater=t.duplicateLayerUpdater=t.reorderLayerUpdater=t.addLayerUpdater=t.removeFilterUpdater=t.toggleFilterFeatureUpdater=t.setFilterViewUpdater=t.updateLayerAnimationSpeedUpdater=t.setLayerAnimationTimeUpdater=t.updateFilterAnimationSpeedUpdater=t.toggleLayerAnimationControlUpdater=t.toggleLayerAnimationUpdater=t.toggleFilterAnimationUpdater=t.layerColorUIChangeUpdater=t.addFilterUpdater=t.setFilterPlotUpdater=t.INITIAL_VIS_STATE=t.DEFAULT_EDITOR=t.DEFAULT_ANIMATION_CONFIG=t.defaultInteractionConfig=void 0;var o=r(n(697)),a=r(n(40)),s=r(n(44)),l=r(n(72)),u=r(n(4)),c=r(n(1216)),d=n(73),f=n(331),h=r(n(332)),p=r(n(282)),A=r(n(181)),g=r(n(1222)),m=r(n(283)),y=r(n(394)),v=r(n(565)),b=r(n(566)),_=n(567),w=n(126),x=n(24),M=n(877),E=n(1284),O=n(286),S=n(21),T=n(453),C=r(n(446)),L=n(921),P=n(882),I=n(922),D=n(878);function k(e){var t=function(e,t){if("object"!==i(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==i(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===i(t)?t:String(t)}function R(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return j(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return j(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function j(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=e.layers.length)return d.console.warn("can not remove layer with invalid id|idx ".concat(n)),e;var i=e.layers,o=e.layerData,a=e.layerOrder,s=e.clicked,l=e.hoverInfo,u=i[r];return ye(N(N({},e),{},{layers:(0,T.filterOutById)(u.id)(i),layerData:(0,T.removeElementAtIndex)(r)(o),layerOrder:a.filter((function(e){return e!==u.id})),clicked:u.isLayerHovered(s)?void 0:s,hoverInfo:u.isLayerHovered(l)?void 0:l,splitMaps:(0,x.removeLayerFromSplitMaps)(e.splitMaps,u)}))}t.addLayerUpdater=ee;var ne=function(e,t){var n=t.order;return N(N({},e),{},{layerOrder:n})};t.reorderLayerUpdater=ne;t.duplicateLayerUpdater=function(e,t){var n=t.id,r=Number.isFinite(n)?Number(n):e.layers.findIndex((function(e){return e.id===n}));if(r<0||!e.layers[r])return d.console.warn("layer ".concat(r," not found in layerOrder")),e;for(var i=e.layers,o=i[r],a=e.layerOrder.findIndex((function(e){return e===o.id})),s="Copy of ".concat(o.config.label),l=0;i.find((function(e){return e.config.label===s}));)s="Copy of ".concat(o.config.label," ").concat(++l);var u=(0,M.serializeLayer)(o,e.schema);if(null==u||!u.config)return e;u.config.label=s,u.id=(0,x.generateHashId)(O.LAYER_ID_LENGTH);var c=ee(e,{config:u}),f=c.layers[c.layers.length-1],h=(0,x.arrayInsert)(c.layerOrder.slice(1,c.layerOrder.length),a,f.id);return ye(c=ne(c,{order:h}))};t.addEffectUpdater=function(e,t){var n=(0,D.createEffect)(t.config);e.effects.forEach((function(e){return e.setProps({isConfigActive:!1})}));var r=[].concat((0,s.default)(e.effects),[n]),i=(0,x.fixEffectOrder)(r,[n.id].concat((0,s.default)(e.effectOrder)));return N(N({},e),{},{effects:r,effectOrder:i})};t.removeEffectUpdater=function(e,t){var n=t.id,r=e.effects.findIndex((function(e){return e.id===n}));if(r<0||r>=e.effects.length)return d.console.warn("can not remove effect with invalid id ".concat(n)),e;var i=e.effects,o=e.effectOrder,a=i[r];return N(N({},e),{},{effects:(0,T.filterOutById)(a.id)(i),effectOrder:o.filter((function(e){return e!==a.id}))})};t.reorderEffectUpdater=function(e,t){var n=t.order;return N(N({},e),{},{effectOrder:(0,x.fixEffectOrder)(e.effects,(0,s.default)(n))})};function re(e,t){var n=t.dataId;if(!e.datasets[n])return e;var r=e.layers,i=e.datasets,o=(i[n],(0,l.default)(i,[n].map(k))),a=r.filter((function(e){return e.config.dataId===n})).map((function(e){return e.id})).reduce((function(e,t){return te(e,{id:t})}),N(N({},e),{},{datasets:o})),s=a.filters.filter((function(e){return!e.dataId.includes(n)}));return function(e,t){var n=t.dataId,r=e.interactionConfig,i=r.tooltip;if(i){var o=i.config,a=o.fieldsToShow,s=(a[n],(0,l.default)(a,[n].map(k)));r=N(N({},r),{},{tooltip:N(N({},i),{},{config:N(N({},o),{},{fieldsToShow:s})})})}return N(N({},e),{},{interactionConfig:r})}(a=N(N({},a),{},{filters:s}),{dataId:n})}t.updateEffectUpdater=function(e,t){var n=t.id,r=t.props,i=e.effects.findIndex((function(e){return e.id===n}));if(i<0||i>=e.effects.length)return d.console.warn("can not update effect with invalid id ".concat(n)),e;var o=e.effectOrder;if(void 0!==r.id&&r.id!==n){if(e.effects.findIndex((function(e){return e.id===r.id}))>=0)return d.console.warn("can not update effect with existing effect id ".concat(n)),e;o=o.map((function(e){return e===n?r.id:e}))}var a=(0,s.default)(e.effects);return a[i].setProps(r),N(N({},e),{},{effects:a,effectOrder:o})};t.updateLayerBlendingUpdater=function(e,t){return N(N({},e),{},{layerBlending:t.mode})};t.updateOverlayBlendingUpdater=function(e,t){return N(N({},e),{},{overlayBlending:t.mode})};t.showDatasetTableUpdater=function(e,t){return N(N({},e),{},{editingDataset:t.dataId})};t.updateTableColorUpdater=function(e,t){return le(e,{dataId:t.dataId,props:{color:t.newColor}})};var ie=function(e){return N(N(N({},H),e.initialState),{},{initialState:e.initialState})};t.resetMapConfigUpdater=ie;var oe=function(e,t){var n=t.payload,r=n.config,i=void 0===r?{}:r,o=n.options,a=void 0===o?{}:o;if(!i.visState)return e;var s,l=a.keepExistingConfig?e:ie(e),u=R(e.mergers);try{for(u.s();!(s=u.n()).done;){var c=s.value;(0,E.isValidMerger)(c)&&(0,E.hasPropsToMerge)(i.visState,c.prop)&&(l=c.merge(l,(0,E.getPropValueToMerger)(i.visState,c.prop,c.toMergeProp),!0))}}catch(e){u.e(e)}finally{u.f()}return l};t.receiveMapConfigUpdater=oe;t.layerHoverUpdater=function(e,t){return N(N({},e),{},{hoverInfo:N({},t.info)})};t.layerClickUpdater=function(e,t){return N(N({},e),{},{mousePos:e.interactionConfig.coordinate.enabled?N(N({},e.mousePos),{},{pinned:e.mousePos.pinned?null:(0,h.default)(e.mousePos)}):e.mousePos,clicked:t.info&&t.info.picked?t.info:null})};t.mapClickUpdater=function(e,t){return N(N({},e),{},{clicked:null})};t.mouseMoveUpdater=function(e,t){var n=t.evt;return Object.values(e.interactionConfig).some((function(e){return e.enabled}))?N(N({},e),{},{mousePos:N(N(N({},e.mousePos),Array.isArray(n.point)?{mousePosition:(0,s.default)(n.point)}:{}),Array.isArray(n.lngLat)?{coordinate:(0,s.default)(n.lngLat)}:{})}):e};t.toggleSplitMapUpdater=function(e,t){return e.splitMaps&&0===e.splitMaps.length?N(N({},e),{},{splitMaps:(0,x.computeSplitMapLayers)(e.layers,{duplicate:!1})}):ue(e,t)};t.toggleLayerForMapUpdater=function(e,t){var n=t.mapIndex,r=t.layerId,i=e.splitMaps;return N(N({},e),{},{splitMaps:i.map((function(e,t){return t===n?N(N({},i[t]),{},{layers:N(N({},i[t].layers),{},(0,u.default)({},r,!i[t].layers[r]))}):e}))})};function ae(e,t){var n=t.mergers,r=t.postMergerPayload,i=(0,E.mergeStateFromMergers)(e,N(N({},H),e.initialState),n,r);return i.allMerged?function(e,t){var n=t.newDataIds,r=t.options,i=t.layerMergers,o=e.filters.filter((function(e){return e.dataId.find((function(e){return n.includes(e)}))})),a=(0,p.default)(o.reduce((function(e,t){return[].concat((0,s.default)(e),(0,s.default)(t.dataId))}),[])),l=n.length<1,c=l?[]:e.layers.filter((function(e){return e.config.dataId&&n.includes(e.config.dataId)})),d=n.reduce((function(t,n){return N(N({},t),{},(0,u.default)({},n,e.datasets[n]))}),{});if(!c.length&&!1!==(r||{}).autoCreateLayers){var f=he(e,d);e=f.state,c=f.newLayers}e.splitMaps.length&&(c=e.layers.filter((function(e){return e.config.dataId&&n.includes(e.config.dataId)})),e=N(N({},e),{},{splitMaps:(0,x.addNewLayersToSplitMap)(e.splitMaps,c)}));n.forEach((function(t){var n=e.interactionConfig.tooltip.config.fieldsToShow[t];!1===(null==r?void 0:r.autoCreateTooltips)||Array.isArray(n)&&n.length||(e=pe(e,d[t]))}));var h=l?Object.keys(e.datasets):(0,p.default)(Object.keys(d).concat(a)),A=me(e,h,void 0);return A=ye(A),i&&i.length>0?ae(A,{mergers:i,postMergerPayload:N(N({},t),{},{layerMergers:[]})}):A}(i.mergedState,r):i.mergedState}t.updateVisDataUpdater=function(e,t){var n=t.config,r=t.options,i=n?oe(e,{payload:{config:n,options:r}}):e,o=(0,x.toArray)(t.datasets).reduce((function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.info,i=void 0===r?{}:r,o=(0,l.default)(n,["info"]);return N(N({},t),(0,P.createNewDataEntry)(N({info:i},o),e.datasets)||{})}),{}),a=N(N({},i),{},{datasets:(0,M.mergeDatasetsByOrder)(i,o)}),s=e.mergers.filter((function(e){return e.waitForLayerData}));return ae(a,{mergers:e.mergers.filter((function(e){return!s.includes(e)})),postMergerPayload:{newDataIds:Object.keys(o),options:r,layerMergers:s}})};var se=["label","color","metadata"];function le(e,t){var n=t.dataId,r=t.props,i=e.datasets,o=i[n];if(o){var s=function(e,t){return Object.entries(e).reduce((function(e,n){var r=(0,a.default)(n,2),i=r[0],o=r[1];return se.includes(i)&&("color"!==i||(0,x.isRgbColor)(o))?N(N({},e),{},(0,u.default)({},i,(0,x.isPlainObject)(o)?(0,b.default)(t[i]||{},o):o)):e}),{})}(r,o);return N(N({},e),{},{datasets:N(N({},i),{},(0,u.default)({},n,(0,P.copyTableAndUpdate)(o,s)))})}return e}function ue(e,t){var n,r=1-t.payload,i=null===(n=e.splitMaps[r])||void 0===n?void 0:n.layers,o=e.layers.map((function(e){return i&&!i[e.id]&&e.config.isVisible?e.updateLayerConfig({isVisible:!1}):e}));return N(N({},e),{},{layers:o,splitMaps:[]})}function ce(e){if(!e.fileLoading)return e;var t=e.fileLoading.filesToLoad,n=(0,o.default)(t),r=n[0],i=n.slice(1),a=(0,T.pick_)("fileLoading")((0,T.merge_)({filesToLoad:i}))(e),s=ge(a,{fileName:r.name,progress:{percent:0,message:"loading..."}}),l=e.loaders,u=e.loadOptions;return(0,f.withTask)(s,de(r,a.fileLoading&&a.fileLoading.fileCache,l,u))}function de(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return(0,_.LOAD_FILE_TASK)({file:e,fileCache:t,loaders:n,loadOptions:r}).bimap((function(n){return(0,w.nextFileBatch)({gen:n,fileName:e.name,onFinish:function(e){return(0,w.processFileContent)({content:e,fileCache:t})}})}),(function(t){return(0,w.loadFilesErr)(e.name,t)}))}function fe(){var e=arguments.length>1?arguments[1]:void 0;return e&&e.percent?{percent:e.percent}:{}}t.loadFilesUpdater=function(e,t){var n=t.files,r=t.onFinish,i=void 0===r?w.loadFilesSuccess:r;if(!n.length)return e;var o=Array.from(n).reduce((function(e,t,n){return(0,T.merge_)(Ae(t,n))(e)}),{}),a={fileCache:[],filesToLoad:n,onFinish:i};return ce((0,T.merge_)({fileLoadingProgress:o,fileLoading:a})(e))};t.nextFileBatchUpdater=function(e,t){var n,r=t.payload,i=r.gen,o=r.fileName,a=r.progress,l=r.accumulated,u=r.onFinish,c=ge(e,{fileName:o,progress:fe(e.fileLoadingProgress[o],a)});return(0,f.withTask)(c,[].concat((0,s.default)(o.endsWith("arrow")&&(null==l||null===(n=l.data)||void 0===n?void 0:n.length)>0?[(0,_.PROCESS_FILE_DATA)({content:l,fileCache:[]}).bimap((function(e){return(0,w.loadFilesSuccess)(e)}),(function(e){return(0,w.loadFilesErr)(o,e)}))]:[]),[(0,_.UNWRAP_TASK)(i.next()).bimap((function(e){var t=e.value;return e.done?u(l):(0,w.nextFileBatch)({gen:i,fileName:o,progress:t.progress,accumulated:t,onFinish:u})}),(function(e){return(0,w.loadFilesErr)(o,e)}))]))};t.loadFilesErrUpdater=function(e,t){var n=t.error,r=t.fileName;if(d.console.warn(n),!e.fileLoading)return e;var i=e.fileLoading,o=i.filesToLoad,a=i.onFinish,s=i.fileCache,l=ge(e,{fileName:r,progress:{error:n}});return(0,f.withTask)(l,(0,_.DELAY_TASK)(200).map(o.length?w.loadNextFile:function(){return a(s)}))};t.applyCPUFilterUpdater=function(e,t){var n=t.dataId;return(0,x.toArray)(n).reduce((function(e,t){return(0,x.filterDatasetCPU)(e,t)}),e)};function he(e,t){var n=Object.values(t).reduce((function(t,n){var r=(0,L.findDefaultLayer)(n,e.layerClasses);return r&&r.length?t.concat(r):t}),[]);return{state:N(N({},e),{},{layers:[].concat((0,s.default)(e.layers),(0,s.default)(n)),layerOrder:[].concat((0,s.default)((0,L.getLayerOrderFromLayers)(n)),(0,s.default)(e.layerOrder))}),newLayers:n}}function pe(e,t){var n=(0,I.findFieldsToShow)(N(N({},t),{},{maxDefaultTooltips:e.maxDefaultTooltips})),r=N(N({},e.interactionConfig.tooltip.config.fieldsToShow),n);return(0,x.set)(["interactionConfig","tooltip","config","fieldsToShow"],r,e)}function Ae(e,t){var n=e.name||"Untitled File ".concat(t);return(0,u.default)({},n,{percent:0,message:"",fileName:n,error:null})}function ge(e,t){var n=t.fileName,r=t.progress;return(0,T.pick_)("fileLoadingProgress")((0,T.pick_)(n)((0,T.merge_)(r)))(e)}function me(e,t,n){var r="string"==typeof t?[t]:t,i=[],o=[];return e.layers.forEach((function(t,a){if(t.config.dataId&&r.includes(t.config.dataId)){var s=n&&n.fixedDomain?t:t.updateLayerDomain(e.datasets,n),l=(0,L.calculateLayerData)(s,e,e.layerData[a]),u=l.layerData,c=l.layer;i.push(c),o.push(u)}else i.push(t),o.push(e.layerData[a])})),N(N({},e),{},{layers:i,layerData:o})}function ye(e){var t=e.layers.filter((function(e){return e.config.isVisible&&e.config.animation&&e.config.animation.enabled&&Array.isArray(e.animationDomain)}));if(!t.length)return N(N({},e),{},{animationConfig:N(N({},e.animationConfig),{},{domain:null,defaultTimeFormat:null})});var n=t.reduce((function(e,t){return[Math.min(e[0],t.animationDomain[0]),Math.max(e[1],t.animationDomain[1])]}),[Number(1/0),-1/0]),r=(0,x.getTimeWidgetTitleFormatter)(n);return N(N({},e),{},{animationConfig:N(N({},e.animationConfig),{},{currentTime:(0,x.isInRange)(e.animationConfig.currentTime,n)?e.animationConfig.currentTime:n[0],domain:n,defaultTimeFormat:r})})}t.setMapInfoUpdater=function(e,t){return N(N({},e),{},{mapInfo:N(N({},e.mapInfo),t.info)})};t.setEditorModeUpdater=function(e,t){var n=t.mode;return N(N({},e),{},{editor:N(N({},e.editor),{},{mode:n,selectedFeature:null})})};function ve(e){var t=["timeFormat","timezone"];return Object.keys(e).reduce((function(n,r){return t.includes(r)?(n[r]=e[r],n):(d.console.error("setLayerAnimationTimeConfig takes timeFormat and/or timezone as options, found ".concat(r)),n)}),{})}function be(e){var t;if(Array.isArray(e)){var n=e.map(be).filter((function(e){return e}));return n.length?n:null}return(null==e||null===(t=e.newDataset)||void 0===t?void 0:t.info.id)||null}function _e(e,t,n){return(0,T.compose_)([(0,T.apply_)(we,{dataId:t,dataIdToUse:n}),(0,T.apply_)(re,{dataId:t})])(e)}function we(e,t){var n=t.dataId,r=t.dataIdToUse,i=(0,M.serializeVisState)(e,e.schema);return e.mergers.reduce((function(e,t){var o=t.prop,a=t.toMergeProp,l=t.replaceParentDatasetIds,c=t.getChildDatasetIds,d=t.saveUnmerged,f=t.preserveOrder,h=(0,x.toArray)(o),p=(0,x.toArray)(a),A=i?h.map((function(e){return i[e]})):[],g=e;return A.forEach((function(e,t){var i,o={prop:h[t],toMergeProp:p[t],getChildDatasetIds:c,saveUnmerged:d},a=(null==l?void 0:l(e,n,r))||function e(t,n,r){var i,o;if(Array.isArray(t)){var a=t.map((function(t){return e(t,n,r)})).filter((function(e){return e}));return a.length?a:null}return"string"==typeof t.dataId&&t.dataId===n?N(N({},t),{},{dataId:r}):Array.isArray(t.dataId)&&t.dataId.includes(n)?N(N({},t),{},{dataId:t.dataId.map((function(e){return e===n?r:e}))}):null!==(i=t.config)&&void 0!==i&&i.dataId&&(null===(o=t.config)||void 0===o?void 0:o.dataId)===n?N(N({},t),{},{config:N(N({},t.config),{},{dataId:r})}):(0,x.isObject)(t)&&t.hasOwnProperty(n)?(0,u.default)({},r,t[n]):null}(e,n,r);g=a?function(e,t,n){var r=n.prop,i=n.toMergeProp,o=n.getChildDatasetIds,a=n.saveUnmerged,l=function(e,t,n){var r=n.prop,i=n.toMergeProp,o=n.saveUnmerged;if(!t)return e;var a="layers"===r?t.reduce((function(e,t){return te(e,{id:t.id})}),e):Array.isArray(e[r])?N(N({},e),{},(0,u.default)({},r,e[r].filter((function(e){return!t.find((function(t){return e.id===t.id}))})))):e,l=(0,u.default)({},i,o?o(a,t):Array.isArray(a[i])?[].concat((0,s.default)(a[i]),(0,s.default)(t)):(0,x.isObject)(a[i])?N(N({},a[i]),t):a[i]);return N(N({},a),l)}(e,t,{prop:r,toMergeProp:i,saveUnmerged:a}),c=(null==o?void 0:o(t))||be(t);c&&(l=(0,x.toArray)(c).reduce((function(e,t){return _e(e,t,t)}),l));return l}(g,a,o):g,void 0!==o.toMergeProp&&null!==(i=g[o.toMergeProp])&&void 0!==i&&i.length&&f&&(g[f]=e.map((function(e){return e.id})))})),g}),e)}t.setSelectedFeatureUpdater=function(e,t){var n=t.feature,r=t.selectionContext;return n&&n.properties&&(n.properties.bbox=(0,c.default)(n)),N(N({},e),{},{editor:N(N({},e.editor),{},{selectedFeature:n,selectionContext:r})})}},function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.getGlobalTaskQueue=function(){return r[n].tasks},t.updateGlobalTaskQueue=function(e){r[n].tasks=e},t.getLastWithTaskCall=function(){return r[n].lastWithTaskCall},t.setLastWithTaskCall=function(e){r[n].lastWithTaskCall=e},t.clearLastWithTaskCall=function(){r[n].lastWithTaskCall=null};var n="___GLOBAL_TASK_STATE_e3b0c442",r="undefined"!=typeof window?window:void 0!==e?e:{};void 0!==r[n]?console.warn("More than one copy of react-palm was loaded. This may cause problems."):Object.defineProperty(r,n,{ennumerable:!1,value:{tasks:[],lastWithTaskCall:null}})}).call(this,n(68))},function(e,t,n){"use strict";var r=n(1223),i={"text/plain":"Text","text/html":"Url",default:"Text"};e.exports=function(e,t){var n,o,a,s,l,u,c=!1;t||(t={}),n=t.debug||!1;try{if(a=r(),s=document.createRange(),l=document.getSelection(),(u=document.createElement("span")).textContent=e,u.style.all="unset",u.style.position="fixed",u.style.top=0,u.style.clip="rect(0, 0, 0, 0)",u.style.whiteSpace="pre",u.style.webkitUserSelect="text",u.style.MozUserSelect="text",u.style.msUserSelect="text",u.style.userSelect="text",u.addEventListener("copy",(function(r){if(r.stopPropagation(),t.format)if(r.preventDefault(),void 0===r.clipboardData){n&&console.warn("unable to use e.clipboardData"),n&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var o=i[t.format]||i.default;window.clipboardData.setData(o,e)}else r.clipboardData.clearData(),r.clipboardData.setData(t.format,e);t.onCopy&&(r.preventDefault(),t.onCopy(r.clipboardData))})),document.body.appendChild(u),s.selectNodeContents(u),l.addRange(s),!document.execCommand("copy"))throw new Error("copy command was unsuccessful");c=!0}catch(r){n&&console.error("unable to copy using execCommand: ",r),n&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(t.format||"text",e),t.onCopy&&t.onCopy(window.clipboardData),c=!0}catch(r){n&&console.error("unable to copy using clipboardData: ",r),n&&console.error("falling back to prompt"),o=function(e){var t=(/mac os x/i.test(navigator.userAgent)?"⌘":"Ctrl")+"+C";return e.replace(/#{\s*key\s*}/g,t)}("message"in t?t.message:"Copy to clipboard: #{key}, Enter"),window.prompt(o,e)}}finally{l&&("function"==typeof l.removeRange?l.removeRange(s):l.removeAllRanges()),u&&document.body.removeChild(u),a()}return c}},function(e,t,n){"use strict";var r=function(e){return function(e){return!!e&&"object"==typeof e}(e)&&!function(e){var t=Object.prototype.toString.call(e);return"[object RegExp]"===t||"[object Date]"===t||function(e){return e.$$typeof===i}(e)}(e)};var i="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function o(e,t){return!1!==t.clone&&t.isMergeableObject(e)?c(function(e){return Array.isArray(e)?[]:{}}(e),e,t):e}function a(e,t,n){return e.concat(t).map((function(e){return o(e,n)}))}function s(e){return Object.keys(e).concat(function(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter((function(t){return e.propertyIsEnumerable(t)})):[]}(e))}function l(e,t){try{return t in e}catch(e){return!1}}function u(e,t,n){var r={};return n.isMergeableObject(e)&&s(e).forEach((function(t){r[t]=o(e[t],n)})),s(t).forEach((function(i){(function(e,t){return l(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))})(e,i)||(l(e,i)&&n.isMergeableObject(t[i])?r[i]=function(e,t){if(!t.customMerge)return c;var n=t.customMerge(e);return"function"==typeof n?n:c}(i,n)(e[i],t[i],n):r[i]=o(t[i],n))})),r}function c(e,t,n){(n=n||{}).arrayMerge=n.arrayMerge||a,n.isMergeableObject=n.isMergeableObject||r,n.cloneUnlessOtherwiseSpecified=o;var i=Array.isArray(t);return i===Array.isArray(e)?i?n.arrayMerge(e,t,n):u(e,t,n):o(t,n)}c.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce((function(e,n){return c(e,n,t)}),{})};var d=c;e.exports=d},function(e,t,n){"use strict";var r=n(6);Object.defineProperty(t,"__esModule",{value:!0}),t.UNWRAP_TASK=t.DELAY_TASK=t.ACTION_TASK=t.LOAD_CLOUD_MAP_TASK=t.EXPORT_FILE_TO_CLOUD_TASK=t.LOAD_MAP_STYLE_TASK=t.PROCESS_FILE_DATA=t.LOAD_FILE_TASK=void 0;var i=r(n(331)),o=n(1791),a=n(395),s=i.default.fromPromise((function(e){var t=e.file,n=e.fileCache,r=e.loaders,i=e.loadOptions;return(0,a.readFileInBatches)({file:t,fileCache:n,loaders:r,loadOptions:i})}),"LOAD_FILE_TASK");t.LOAD_FILE_TASK=s;var l=i.default.fromPromise(a.processFileData,"PROCESS_FILE_CONTENT");t.PROCESS_FILE_DATA=l;var u=(0,i.taskCreator)((function(e,t,n){var r=e.url,i=e.id;return(0,o.json)(r,(function(e,r){e?n(e):(r||n(new Error("Map style response is empty")),t({id:i,style:r}))}))}),"LOAD_MAP_STYLE_TASK");t.LOAD_MAP_STYLE_TASK=u;var c=i.default.fromPromise((function(e){var t=e.provider,n=e.payload;return t.uploadMap(n)}),"EXPORT_FILE_TO_CLOUD_TASK");t.EXPORT_FILE_TO_CLOUD_TASK=c;var d=i.default.fromPromise((function(e){var t=e.provider,n=e.payload;return t.downloadMap(n)}),"LOAD_CLOUD_MAP_TASK");t.LOAD_CLOUD_MAP_TASK=d;var f=i.default.fromCallback((function(e,t){return t()}),"ACTION_TASK");t.ACTION_TASK=f;var h=i.default.fromCallback((function(e,t){return window.setTimeout((function(){return t()}),e)}),"DELAY_TASK");t.DELAY_TASK=h;var p=i.default.fromPromise((function(e){return e}),"UNWRAP");t.UNWRAP_TASK=p},function(e,t,n){"use strict";n.d(t,"a",(function(){return s})),n.d(t,"b",(function(){return l}));var r=n(135),i=n(55),o=n(146),a=n(173);function s(e){const t=o.d.from(e);return Object(i.i)(t)?t.then(e=>s(e)):t.isAsync()?t.readAll().then(e=>new r.a(e)):new r.a(t.readAll())}function l(e,t="stream"){return("stream"===t?a.c:a.a).writeAll(e).toUint8Array(!0)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return a})),n.d(t,"b",(function(){return l}));var r=n(659),i=n(65),o=n(416);function a(){var e,t,n=Object(o.a)().unknown(void 0),s=n.domain,l=n.range,u=0,c=1,d=!1,f=0,h=0,p=.5;function A(){var n=s().length,i=c1)return{type:"MultiPoint",coordinates:i};return{type:"Point",coordinates:i[0]}}(e,t,n);case"LineString":return function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1/0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1/0;const{positions:r}=e,i=e.pathIndices.value.filter(e=>e>=t&&e<=n),o=i.length>2;if(!o){return{type:"LineString",coordinates:s(r,i[0],i[1])}}const a=[];for(let e=0;e1&&void 0!==arguments[1]?arguments[1]:-1/0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1/0;const{positions:i}=t,o=t.polygonIndices.value.filter(e=>e>=n&&e<=r),a=t.primitivePolygonIndices.value.filter(e=>e>=n&&e<=r),l=o.length>2;if(!l){const e=[];for(let t=0;t1&&void 0!==arguments[1]?arguments[1]:0;const n=Object.assign({},e.properties[e.featureIds.value[t]]);for(const r in e.numericProps)n[r]=e.numericProps[r].value[t];return n}(e,t,n),...function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return e.fields&&e.fields[e.featureIds.value[t]]}(e,t,n)}}function s(e,t,n){t=t||0,n=n||e.value.length/e.size;const r=[];for(let i=t;iObject(i.c)((new TextDecoder).decode(e),t),parseTextSync:i.c}},function(e,t,n){"use strict";var r=n(3);Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Effect=void 0;var i=r(n(7)),o=r(n(8)),a=r(n(4)),s=n(24),l=n(21);function u(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function c(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{};(0,i.default)(this,e),(0,a.default)(this,"id",void 0),(0,a.default)(this,"type",void 0),(0,a.default)(this,"isEnabled",void 0),(0,a.default)(this,"parameters",void 0),(0,a.default)(this,"isConfigActive",void 0),(0,a.default)(this,"isJsonEditorActive",void 0),(0,a.default)(this,"deckEffect",void 0),(0,a.default)(this,"_uiConfig",void 0),this.id=n.id||"e_".concat((0,s.generateHashId)(6));var r=this.getDefaultProps(n);this.type=r.type,this.isEnabled=r.isEnabled,this.isConfigActive=r.isConfigActive,this.isJsonEditorActive=r.isJsonEditorActive,this._uiConfig=l.LIGHT_AND_SHADOW_EFFECT.type===this.type?l.LIGHT_AND_SHADOW_EFFECT.parameters:(null===(t=l.POSTPROCESSING_EFFECTS[this.type])||void 0===t?void 0:t.parameters)||[],this.parameters=(0,s.validateEffectParameters)(r.parameters,this._uiConfig),this.deckEffect=null,this._initializeEffect()}return(0,o.default)(e,[{key:"_initializeEffect",value:function(){}},{key:"getDefaultProps",value:function(){var e,t,n,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{id:r.id||"e_".concat((0,s.generateHashId)(6)),type:r.type||l.DEFAULT_POST_PROCESSING_EFFECT_TYPE,isEnabled:null===(e=r.isEnabled)||void 0===e||e,isConfigActive:null===(t=r.isConfigActive)||void 0===t||t,isJsonEditorActive:null!==(n=r.isJsonEditorActive)&&void 0!==n&&n,parameters:c({},r.parameters)}}},{key:"setProps",value:function(e){var t,n,r,i,o;this.id=null!==(t=e.id)&&void 0!==t?t:this.id,this.type=null!==(n=e.type)&&void 0!==n?n:this.type,this.isEnabled=null!==(r=e.isEnabled)&&void 0!==r?r:this.isEnabled,this.isConfigActive=null!==(i=e.isConfigActive)&&void 0!==i?i:this.isConfigActive,this.isJsonEditorActive=null!==(o=e.isJsonEditorActive)&&void 0!==o?o:this.isJsonEditorActive,this.parameters=c(c({},this.parameters),(0,s.validateEffectParameters)(e.parameters,this._uiConfig))}},{key:"isValidToSave",value:function(){return Boolean(this.type&&this.id&&this.deckEffect)}},{key:"getParameterDescriptions",value:function(){return this._uiConfig||[]}}]),e}();t.Effect=d;var f=d;t.default=f},function(e,t,n){"use strict";var r=n(3);Object.defineProperty(t,"__esModule",{value:!0}),t.getTextOffsetByRadius=function(e,t,n){return function(r){var o=(0,i.getDistanceScales)(n),a="middle"===r.anchor?0:"start"===r.anchor?1:-1,s="center"===r.alignment?0:"bottom"===r.alignment?1:-1,l="center"===r.alignment?0:(r.alignment,r.size),u=e*o.pixelsPerMeter[0];return"function"==typeof t?function(e){return[a*(t(e)*u+20),s*(t(e)*u+20+l)]}:[a*(t*u+20),s*(t*u+20+l)]}},t.formatTextLabelData=t.textLabelAccessor=t.defaultPadding=void 0;var i=n(414),o=n(24),a=r(n(282));t.defaultPadding=20;var s=function(e){return function(t){return function(t){var n=e.field.valueAccessor(t);return(0,o.notNullorUndefined)(n)?String(n):""}}};t.textLabelAccessor=s;t.formatTextLabelData=function(e){var t=e.textLabel,n=e.triggerChanged,r=e.oldLayerData,i=e.data,o=e.dataContainer;return t.map((function(e,t){if(!e.field)return{getText:null,characterSet:[]};var l,u=s(e)(o);if(!n["getLabelCharacterSet-".concat(t)]&&r&&r.textLabels&&r.textLabels[t])l=r.textLabels[t].characterSet;else{var c=e.field?i.map(u):[];l=(0,a.default)(c.join(""))}return{characterSet:l,getText:u}}))}},function(e,t,n){"use strict";var r=n(3);Object.defineProperty(t,"__esModule",{value:!0}),t.assignPointPairToLayerColumn=function(e,t){var n=e.pair,r=n.lat,i=n.lng,o=n.alt;if(!t)return{lat:r,lng:i};var a={value:null,fieldIdx:-1,optional:!0};return{lat:r,lng:i,altitude:o?s(s({},a),o):a}},t.getGeojsonLayerMetaFromArrow=function(e){var t,n=e.dataContainer,r=e.getGeoColumn,i=e.getGeoField,a=e.chunkIndex,l=r(n),u=i(n),c=null==u||null===(t=u.metadata)||void 0===t?void 0:t.get("ARROW:extension:name"),d=s(s({},void 0!==a&&a>=0?{chunkIndex:a,chunkOffset:l.data[0].length*a}:{}),{},{triangulate:!0,calculateMeanCenters:!0}),f=(0,o.getBinaryGeometriesFromArrow)(l,c,d),h=f.binaryGeometries,p=f.featureTypes,A=f.bounds,g=f.meanCenters;return{dataToFeature:h,featureTypes:p,bounds:A,fixedRadius:!1,centroids:g}},t.isLayerHoveredFromArrow=l,t.getHoveredObjectFromArrow=function(e,t,n,r,i){if(l(e,n)&&e.index>=0&&t){var a,u=r(t),c=null==u?void 0:u.get(e.index),d=i(t),f=null==d||null===(a=d.metadata)||void 0===a?void 0:a.get("ARROW:extension:name"),h=(0,o.parseGeometryFromArrow)(c,f),p=t.rowAsArray(e.index).reduce((function(e,n,r){var i,o=null==t||null===(i=t.getField)||void 0===i?void 0:i.call(t,r).name;return o!==d.name&&(e[o]=n),e}),{});return h?{type:"Feature",geometry:h,properties:s(s({},p),{},{index:e.index})}:null}return null};var i=r(n(4)),o=n(1123);function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function s(e){for(var t=1;ti?l:i,o=u>o?u:o,a=c>a?c:a}return[[t,n,r],[i,o,a]]}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";var r=n(3);Object.defineProperty(t,"__esModule",{value:!0}),t.getValueFunc=g,t.getScaleFunctor=m,t.getGetValue=v,t.getDimensionSortedBins=b,t.getDimensionValueDomain=_,t.getDimensionScale=w,t.getAggregatedData=M,t.default=t.defaultDimensions=t.defaultElevationDimension=t.defaultColorDimension=t.defaultAggregation=t.DECK_AGGREGATION_MAP=void 0;var i,o=r(n(7)),a=r(n(8)),s=r(n(71)),l=r(n(4)),u=n(484),c=n(73),d=n(24),f=n(21);function h(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function p(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{};return e.hexagons?Object.assign({data:e.hexagons},e):e.layerData?Object.assign({data:e.layerData},e):e}function M(e,t,n,r){var i=(0,t[e.triggers.aggregator.prop])(t,r);this.setState({layerData:x(i)})}t.DECK_AGGREGATION_MAP=A;var E={key:"position",updateSteps:[{key:"aggregate",triggers:{cellSize:{prop:"cellSize"},position:{prop:"getPosition",updateTrigger:"getPosition"},aggregator:{prop:"gridAggregator"}},updater:M}]};function O(e,t,n){return function(n){var r=e.sortedBins,i=e.scaleFunc,o=r.binMap[n.index];if(o&&0===o.counts)return t.nullValue;var a=o&&o.value,s=i.domain();return a>=s[0]&&a<=s[s.length-1]?i(a):t.nullValue}}t.defaultAggregation=E;var S={key:"fillColor",accessor:"getFillColor",getPickingInfo:function(e,t){if(!t)return{};var n=e.sortedBins;return{colorValue:n.binMap[t.index]&&n.binMap[t.index].value}},nullValue:[0,0,0,0],updateSteps:[{key:"getValue",triggers:{value:{prop:"getColorValue",updateTrigger:"getColorValue"},weight:{prop:"getColorWeight",updateTrigger:"getColorWeight"},aggregation:{prop:"colorAggregation"}},updater:v},{key:"getBins",triggers:{_filterData:{prop:"_filterData",updateTrigger:"_filterData"}},updater:b},{key:"getDomain",triggers:{lowerPercentile:{prop:"lowerPercentile"},upperPercentile:{prop:"upperPercentile"},scaleType:{prop:"colorScaleType"}},updater:_},{key:"getScaleFunc",triggers:{domain:{prop:"colorDomain"},range:{prop:"colorRange"},scaleType:{prop:"colorScaleType"}},onSet:{props:"onSetColorDomain"},updater:w}],getSubLayerAccessor:O};t.defaultColorDimension=S;var T={key:"elevation",accessor:"getElevation",getPickingInfo:function(e,t){if(!t)return{};var n=e.sortedBins;return{elevationValue:n.binMap[t.index]&&n.binMap[t.index].value}},nullValue:-1,updateSteps:[{key:"getValue",triggers:{value:{prop:"getElevationValue",updateTrigger:"getElevationValue"},weight:{prop:"getElevationWeight",updateTrigger:"getElevationWeight"},aggregation:{prop:"elevationAggregation"}},updater:v},{key:"getBins",triggers:{_filterData:{prop:"_filterData",updateTrigger:"_filterData"}},updater:b},{key:"getDomain",triggers:{lowerPercentile:{prop:"elevationLowerPercentile"},upperPercentile:{prop:"elevationUpperPercentile"},scaleType:{prop:"elevationScaleType"}},updater:_},{key:"getScaleFunc",triggers:{domain:{prop:"elevationDomain"},range:{prop:"elevationRange"},scaleType:{prop:"elevationScaleType"}},onSet:{props:"onSetElevationDomain"},updater:w}],getSubLayerAccessor:O};t.defaultElevationDimension=T;var C=[S,T];t.defaultDimensions=C;var L=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,o.default)(this,e),(0,l.default)(this,"state",void 0),(0,l.default)(this,"dimensionUpdaters",void 0),(0,l.default)(this,"aggregationUpdater",void 0),this.state=p({layerData:{},dimensions:{}},t.initialState),this.dimensionUpdaters={},this.aggregationUpdater=t.aggregation||E,this._addDimension(t.dimensions||C)}return(0,a.default)(e,[{key:"updateAllDimensions",value:function(e){var t=[];for(var n in this.dimensionUpdaters){var r=this._accumulateUpdaters(0,e,this.dimensionUpdaters[n]);t=t.concat(r)}t.forEach((function(e){return"function"==typeof e&&e()}))}},{key:"updateAggregation",value:function(e,t){this._accumulateUpdaters(0,e,this.aggregationUpdater).forEach((function(e){return"function"==typeof e&&e(t)}))}},{key:"updateState",value:function(e,t){var n=e.oldProps,r=e.props,i=e.changeFlags;if(i.dataChanged)return this.updateAggregation(r,t),this.updateAllDimensions(r),this.state;var o=this._getAggregationChanges(n,r,i);return o&&o.length?(o.forEach((function(e){return"function"==typeof e&&e(t)})),this.updateAllDimensions(r)):(this._getDimensionChanges(n,r,i)||[]).forEach((function(e){return"function"==typeof e&&e()})),this.state}},{key:"setState",value:function(e){this.state=Object.assign({},this.state,e)}},{key:"_setDimensionState",value:function(e,t){this.setState({dimensions:Object.assign({},this.state.dimensions,(0,l.default)({},e,Object.assign({},this.state.dimensions[e],t)))})}},{key:"_addAggregation",value:function(e){this.aggregationUpdater=e}},{key:"_addDimension",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];t.forEach((function(t){var n=t.key;e.dimensionUpdaters[n]=t}))}},{key:"_needUpdateStep",value:function(e,t,n,r){return Object.values(e.triggers).some((function(e){return e.updateTrigger?r.updateTriggersChanged&&(r.updateTriggersChanged.all||r.updateTriggersChanged[e.updateTrigger]):t[e.prop]!==n[e.prop]}))}},{key:"_accumulateUpdaters",value:function(e,t,n){for(var r=[],i=e;i-1&&(o=o.concat(this._accumulateUpdaters(a,n,e))),o}},{key:"_getAggregationChanges",value:function(e,t,n){var r=this._getAllUpdaters(this.aggregationUpdater,e,t,n);return r.length?r:null}},{key:"_getDimensionChanges",value:function(e,t,n){var r=[];for(var i in this.dimensionUpdaters){var o=this.dimensionUpdaters[i],a=this._getAllUpdaters(o,e,t,n);r=r.concat(a)}return r.length?r:null}},{key:"getUpdateTriggers",value:function(e){var t=this,n=e.updateTriggers||{},r={},i=function(i){var o=t.dimensionUpdaters[i],a=o.accessor,l=o.updateSteps;r[a]={},l.forEach((function(t){Object.values(t.triggers||[]).forEach((function(t){var i=t.prop,o=t.updateTrigger;if(o){var l=n[o];"object"!==(0,s.default)(l)||Array.isArray(l)?void 0!==l&&(r[a][i]=l):Object.assign(r[a],l)}else r[a][i]=e[i]}))}))};for(var o in this.dimensionUpdaters)i(o);return r}},{key:"getPickingInfo",value:function(e,t){var n=e.info,r=null,i=n.picked&&n.index>-1?this.state.layerData.data[n.index]:null;if(i){var o={};for(var a in this.dimensionUpdaters){var s=this.dimensionUpdaters[a].getPickingInfo;"function"==typeof s&&(o=Object.assign({},o,s(this.state.dimensions[a],i,t)))}r=Object.assign(o,i,{points:i.filteredPoints||i.points})}return Object.assign(n,{picked:Boolean(r),object:r})}},{key:"getAccessor",value:function(e,t){return this.dimensionUpdaters.hasOwnProperty(e)?this.dimensionUpdaters[e].getSubLayerAccessor(this.state.dimensions[e],this.dimensionUpdaters[e],t):y}}],[{key:"defaultDimensions",value:function(){return C}}]),e}();t.default=L,(0,l.default)(L,"getDimensionScale",void 0),L.getDimensionScale=w},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(69),i=n(403),o=n(587),a=l(n(916)),s=l(n(1393));function l(e){return e&&e.__esModule?e:{default:e}}function u(e){return(u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function c(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function d(e){if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(e=function(e,t){if(!e)return;if("string"==typeof e)return f(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return f(e,t)}(e))){var t=0,n=function(){};return{s:n,n:function(){return t>=e.length?{done:!0}:{done:!1,value:e[t++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,i,o=!0,a=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return o=e.done,e},e:function(e){a=!0,i=e},f:function(){try{o||null==r.return||r.return()}finally{if(a)throw i}}}}function f(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n=e.length?{done:!0}:{done:!1,value:e[t++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,i,o=!0,a=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return o=e.done,e},e:function(e){a=!0,i=e},f:function(){try{o||null==r.return||r.return()}finally{if(a)throw i}}}}(e.selectedIndexes);try{for(h.s();!(t=h.n()).done;){var p=t.value;if(p2}))){if(n)return(0,i.nearestPointOnProjectedLine)(e,t,n);console.log("Editing 3D point but modeConfig.viewport not provided. Falling back to 2D logic.")}return(0,i.nearestPointOnLine)(e,t,n)}},{key:"handleClick",value:function(e,t){var n=(0,i.getPickedExistingEditHandle)(e.picks),r=(0,i.getPickedIntermediateEditHandle)(e.picks);if(n){var o,s=n.properties,l=s.featureIndex,u=s.positionIndexes;try{o=new a.ImmutableFeatureCollection(t.data).removePosition(l,u).getObject()}catch(e){}o&&t.onEdit({updatedData:o,editType:"removePosition",editContext:{featureIndexes:[l],positionIndexes:u,position:n.geometry.coordinates}})}else if(r){var c,d=r.properties,f=d.featureIndex,h=d.positionIndexes,p=t.data.features[f];if(!(null===(c=t.modeConfig)||void 0===c?void 0:c.lockRectangles)||"Rectangle"!==(null==p?void 0:p.properties.shape)){var A=new a.ImmutableFeatureCollection(t.data).addPosition(f,h,r.geometry.coordinates).getObject();A&&t.onEdit({updatedData:A,editType:"addPosition",editContext:{featureIndexes:[f],positionIndexes:h,position:r.geometry.coordinates}})}}}},{key:"handleDragging",value:function(e,t){var n=(0,i.getPickedEditHandle)(e.pointerDownPicks);n&&(e.cancelPan(),this._dragEditHandle("movePosition",t,n,e))}},{key:"_dragEditHandle",value:function(e,t,n,r){var o,s,l=n.properties,u=t.data.features[l.featureIndex];if((null===(o=t.modeConfig)||void 0===o?void 0:o.lockRectangles)&&"Rectangle"===u.properties.shape){var c=(0,i.updateRectanglePosition)(u,l.positionIndexes[1],r.mapCoords);s=new a.ImmutableFeatureCollection(t.data).replaceGeometry(l.featureIndex,{coordinates:c,type:"Polygon"}).getObject()}else s=new a.ImmutableFeatureCollection(t.data).replacePosition(l.featureIndex,l.positionIndexes,r.mapCoords).getObject();t.onEdit({updatedData:s,editType:e,editContext:{featureIndexes:[l.featureIndex],positionIndexes:l.positionIndexes,position:r.mapCoords}})}},{key:"handlePointerMove",value:function(e,t){var n=this.getCursor(e);t.onUpdateCursor(n)}},{key:"handleStartDragging",value:function(e,t){var n=t.selectedIndexes,r=(0,i.getPickedIntermediateEditHandle)(e.picks);if(n.length&&r){var o=r.properties,s=new a.ImmutableFeatureCollection(t.data).addPosition(o.featureIndex,o.positionIndexes,e.mapCoords).getObject();t.onEdit({updatedData:s,editType:"addPosition",editContext:{featureIndexes:[o.featureIndex],positionIndexes:o.positionIndexes,position:e.mapCoords}})}}},{key:"handleStopDragging",value:function(e,t){var n=t.selectedIndexes,r=(0,i.getPickedEditHandle)(e.picks);n.length&&r&&this._dragEditHandle("finishMovePosition",t,r,e)}},{key:"getCursor",value:function(e){var t=e&&e.picks||[];return(0,i.getPickedEditHandles)(t).length?"cell":null}}])&&f(n.prototype,o),s&&f(n,s),m}(o.GeoJsonEditMode);t.ModifyMode=m},function(e,t,n){"use strict";n.r(t);var r=n(185),i=n(18);t.default=function(e,t,n){void 0===n&&(n={});for(var o=n.steps||64,a=n.properties?n.properties:!Array.isArray(e)&&"Feature"===e.type&&e.properties?e.properties:{},s=[],l=0;l1?Object(r.multiLineString)(e,t):Object(r.lineString)(e[0],t)}t.default=function(e,t){void 0===t&&(t={});var n=Object(i.getGeom)(e);switch(t.properties||"Feature"!==e.type||(t.properties=e.properties),n.type){case"Polygon":return o(n,t);case"MultiPolygon":return a(n,t);default:throw new Error("invalid poly")}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DrawPolygonMode=void 0;var r=n(119);function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(e){return function(e){if(Array.isArray(e))return a(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return a(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return a(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n2&&(t={type:"Feature",properties:{guideType:"tentative"},geometry:{type:"Polygon",coordinates:[[].concat(o(r),i,[r[0]])]}}),t}},{key:"getGuides",value:function(e){var t,n=this.getClickSequence(),r={type:"FeatureCollection",features:[]},i=this.createTentativeFeature(e);i&&r.features.push(i);var a=n.map((function(e,t){return{type:"Feature",properties:{guideType:"editHandle",editHandleType:"existing",featureIndex:-1,positionIndexes:[t]},geometry:{type:"Point",coordinates:e}}}));return(t=r.features).push.apply(t,o(a)),r}},{key:"handleClick",value:function(e,t){var n=e.picks,i=(0,r.getPickedEditHandle)(n),a=!1;i||(this.addClickSequence(e),a=!0);var s=this.getClickSequence();if(s.length>2&&i&&Array.isArray(i.properties.positionIndexes)&&(0===i.properties.positionIndexes[0]||i.properties.positionIndexes[0]===s.length-1)){var l={type:"Polygon",coordinates:[[].concat(o(s),[s[0]])]};this.resetClickSequence();var u=this.getAddFeatureOrBooleanPolygonAction(l,t);u&&t.onEdit(u)}else a&&t.onEdit({updatedData:t.data,editType:"addTentativePosition",editContext:{position:e.mapCoords}})}},{key:"handleKeyUp",value:function(e,t){if("Enter"===e.key){var n=this.getClickSequence();if(n.length>2){var r={type:"Polygon",coordinates:[[].concat(o(n),[n[0]])]};this.resetClickSequence();var i=this.getAddFeatureOrBooleanPolygonAction(r,t);i&&t.onEdit(i)}}}},{key:"handlePointerMove",value:function(e,t){t.onUpdateCursor("cell"),u(f(A.prototype),"handlePointerMove",this).call(this,e,t)}}])&&l(n.prototype,i),a&&l(n,a),A}(n(93).GeoJsonEditMode);t.DrawPolygonMode=p},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UNIT=t.PROJECTED_PIXEL_SIZE_MULTIPLIER=void 0;t.PROJECTED_PIXEL_SIZE_MULTIPLIER=2/3;t.UNIT={common:0,meters:1,pixels:2}},function(e,t,n){"use strict";var r=n(3);Object.defineProperty(t,"__esModule",{value:!0}),t.getMapDimForSplitMap=m,t.pickViewportPropsFromMapState=y,t.toggleSplitMapViewportUpdater=t.toggleSplitMapUpdater=t.receiveMapConfigUpdater=t.resetMapConfigUpdater=t.togglePerspectiveUpdater=t.fitBoundsUpdater=t.updateMapUpdater=t.INITIAL_MAP_STATE=void 0;var i=r(n(40)),o=r(n(4)),a=r(n(570)),s=r(n(656)),l=r(n(287)),u=n(47),c=r(n(566)),d=r(n(283)),f=n(24);function h(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function p(e){for(var t=1;t-1&&(s[a]=p(p({},s[a]),{},{width:s[o].width,height:s[o].height}),e.isZoomLocked&&(s[a]=p(p({},s[a]),{},{zoom:s[o].zoom}))),p(p(p({},e),s[o]),{},{splitMapViewports:s})};var g=function(e,t){var n=(0,f.getCenterAndZoomFromBounds)(t.payload,{width:e.width,height:e.height});if(!n)return e;var r=p(p({},e),{},{latitude:n.center[1],longitude:n.center[0]},Number.isFinite(n.zoom)?{zoom:n.zoom}:{});return r.splitMapViewports.length&&(r.splitMapViewports=r.splitMapViewports.map((function(e){return p(p({},e),{},{latitude:r.latitude,longitude:r.longitude,zoom:r.zoom})}))),r};t.fitBoundsUpdater=g;t.togglePerspectiveUpdater=function(e,t){var n=p(p(p({},e),{pitch:e.dragRotate?0:50,bearing:e.dragRotate?0:24}),{},{dragRotate:!e.dragRotate});return n.splitMapViewports.length&&(n.splitMapViewports=n.splitMapViewports.map((function(e){return p(p({},e),{},{pitch:n.pitch,bearing:n.bearing,dragRotate:n.dragRotate})}))),n};t.resetMapConfigUpdater=function(e){return p(p(p({},A),e.initialState),{},{initialState:e.initialState})};t.receiveMapConfigUpdater=function(e,t){var n=t.payload,r=n.config,i=void 0===r?{}:r,o=n.options,a=void 0===o?{}:o,s=n.bounds,l=void 0===s?null:s,u=(i||{}).mapState||{},d=(0,c.default)(e,u,{arrayMerge:function(e,t){return t}});return a.centerMap&&l&&(d=g(d,{payload:l})),p(p({},d),m(d.isSplit,e))};t.toggleSplitMapUpdater=function(e,t){return p(p(p({},e),m(!e.isSplit,e)),{},{isSplit:!e.isSplit},!1==!e.isSplit?{isViewportSynced:!0,isZoomLocked:!1,splitMapViewports:[]}:{})};function m(e,t){return t.isSplit===e?{}:{width:t.isSplit&&!e?2*t.width:t.width/2}}function y(e){return(0,d.default)(e,["width","height","zoom","pitch","bearing","latitude","longitude","dragRotate","minZoom","maxZoom","maxBounds"])}t.toggleSplitMapViewportUpdater=function(e,t){var n=p(p({},e),t.payload||{});if(n.isViewportSynced)n.splitMapViewports=[];else{if(e.isZoomLocked&&!n.isZoomLocked)return n;if(!e.isZoomLocked&&n.isZoomLocked){var r=n.splitMapViewports.findIndex((function(e){return n.zoom===e.zoom})),i=n.splitMapViewports.map((function(e,t){return t===r?e:p(p({},e),{},{zoom:n.splitMapViewports[r].zoom})}));return n.splitMapViewports=i,n}var o=y(n),a=y(n);n.splitMapViewports=[o,a]}return n};function v(e,t){var n,r=p(p({},e),(n=t,Object.entries(n).reduce((function(e,t){var n=(0,i.default)(t,2),r=n[0],a=n[1];return p(p({},e),void 0!==a?(0,o.default)({},r,a):{})}),{})||{}));return r.minZoom&&r.zoom&&r.zoomr.maxZoom&&(r.zoom=r.maxZoom),r.maxBounds&&(0,f.validateBounds)(r.maxBounds)&&(r=function(e,t){var n=a.default.bounds([t.longitude,t.latitude],t.zoom,[t.width,t.height],f.MAPBOX_TILE_SIZE),r=(0,l.default)(n),i=t.maxBounds,o=(0,l.default)(i);if(!e.maxBounds||!e.maxBounds.every((function(e,t){return e===i[t]}))){if(!(0,s.default)(r,o)){var c=(0,u.fitBounds)({width:t.width,height:t.width,bounds:[[i[0],i[1]],[i[2],i[3]]]}),d=c.latitude,h=c.longitude,A=c.zoom;t=p(p({},t),{},{latitude:d,longitude:h},Number.isFinite(A)?{zoom:A}:{})}return t}return(0,s.default)(r,o)||(t=p(p({},t),{},{longitude:e.longitude,latitude:e.latitude,zoom:e.zoom})),t}(e,r)),r}},function(e,t,n){"use strict";var r=n(6),i=n(3),o=n(71);Object.defineProperty(t,"__esModule",{value:!0}),t.getMapStyles=_,t.getInitialInputStyle=L,t.setBackgroundColorUpdater=t.set3dBuildingColorUpdater=t.removeCustomMapStyleUpdater=t.editCustomMapStyleUpdater=t.addCustomMapStyleUpdater=t.inputMapStyleUpdater=t.loadCustomMapStyleUpdater=t.resetMapConfigMapStyleUpdater=t.receiveMapConfigUpdater=t.loadMapStyleErrUpdater=t.loadMapStylesUpdater=t.mapStyleChangeUpdater=t.mapConfigChangeUpdater=t.initMapStyleUpdater=t.requestMapStylesUpdater=t.INITIAL_MAP_STYLE=void 0;var a=i(n(72)),s=i(n(4)),l=r(n(331)),u=i(n(332)),c=i(n(143)),d=n(24),f=n(21),h=n(567),p=n(294),A=n(126);function g(e){var t=function(e,t){if("object"!==o(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==o(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===o(t)?t:String(t)}function m(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function y(e){for(var t=1;t0&&Object.values(r).some((function(e){return e})),u=l&&Object.keys(r).reduce((function(e,t){return y(y({},e),{},(0,s.default)({},t,r[t]&&n[t]))}),{});return{bottomMapStyle:a,topMapStyle:l?(0,d.editTopMapStyle)({id:t,mapStyle:i,visibleLayerGroups:u}):null,editable:o}}function w(e){return e&&e.paint&&e.paint["background-color"]}function x(e,t){var n;if(!e.style)return(0,d.colorMaybeToRGB)(t)||t;var r,i=(e.style.layers||[]).find((function(e){var t=e.id;return f.BASE_MAP_BACKGROUND_LAYER_IDS.includes(t)})),o=(r=w(i),Array.isArray(r)&&"interpolate"===r[0]?r[4]:r),a="string"==typeof o?o:t;return(null===(n=(0,d.colorMaybeToRGB)(a))||void 0===n?void 0:n.map((function(e){return Math.round(e)})))||t}function M(e){return Array.isArray(null==e?void 0:e.layers)?f.DEFAULT_LAYER_GROUPS.filter((function(t){return e.layers.filter(t.filter).length})):[]}t.INITIAL_MAP_STYLE=b;var E=function(e,t){var n=t.payload,r=n.mapStyles,i=n.onSuccess,o=Object.keys(r).reduce((function(t,n){return y(y({},t),e.isLoading[n]?{}:(0,s.default)({},n,r[n]))}),{}),a=function(e,t,n,r){return[l.default.all(Object.values(e).map((function(e){var r=e.id,i=e.url,o=e.accessToken;return{id:r,url:(0,d.isValidStyleUrl)(i)?(0,d.getStyleDownloadUrl)(i,o||t,n):i}})).map(h.LOAD_MAP_STYLE_TASK)).bimap((function(t){return(0,A.loadMapStyles)(t.reduce((function(t,n){var r=n.id,i=n.style;return y(y({},t),{},(0,s.default)({},r,y(y({},e[r]),{},{style:i})))}),{}),r)}),(function(t){return(0,A.loadMapStyleErr)(Object.keys(e),t)}))]}(o,e.mapboxApiAccessToken,e.mapboxApiUrl,i),u=Object.keys(o).reduce((function(e,t){return y(y({},e),{},(0,s.default)({},t,!0))}),{}),c=y(y({},e),{},{isLoading:u});return(0,l.withTask)(c,a)};t.requestMapStylesUpdater=E;t.initMapStyleUpdater=function(e,t){var n=t.payload,r=void 0===n?{}:n;return y(y({},e),{},{mapboxApiAccessToken:r.mapboxApiAccessToken||e.mapboxApiAccessToken,mapboxApiUrl:r.mapboxApiUrl||e.mapboxApiUrl,mapStyles:r.mapStylesReplaceDefault?{}:e.mapStyles,mapStylesReplaceDefault:r.mapStylesReplaceDefault||!1})};var O=function(e,t){return y(y(y({},e),t.payload),_(y(y({},e),t.payload)))};t.mapConfigChangeUpdater=O;var S=function(e){return(0,d.isPlainObject)(null==e?void 0:e.style)},T=function(e,t){var n,r,i=t.payload,o=i.styleType,a=i.onSuccess;if(!e.mapStyles[o]||"MANAGED"===(null===(n=e.mapStyles[o])||void 0===n?void 0:n.custom)&&(null===(r=e.mapStyles[o])||void 0===r||!r.url)&&!S(e.mapStyles[o]))return e;if(!S(e.mapStyles[o]))return E(y(y({},e),{},{styleType:o}),{payload:{mapStyles:(0,s.default)({},o,e.mapStyles[o]),onSuccess:a}});var l=(0,d.getDefaultLayerGroupVisibility)(e.mapStyles[o]),u=(0,d.mergeLayerGroupVisibility)(l,e.visibleLayerGroups),c=e.custom3DBuildingColor?e.threeDBuildingColor:function(e){if(!e.style)return(0,d.hexToRgb)(f.DEFAULT_BLDG_COLOR);var t=(e.style.layers||[]).find((function(e){return"background"===e.id})),n=w((e.style.layers||[]).find((function(e){return e.id.match(/building/)})))||w(t)||f.DEFAULT_BLDG_COLOR,r=e.id.match(/(?=(dark|night))/)?"brighter":"darker",i=(0,p.rgb)(n)[r]([.2]);return[i.r,i.g,i.b]}(e.mapStyles[o]),h=function(e,t){var n=e.mapStyles[e.styleType],r=e.backgroundColor||f.DEFAULT_BACKGROUND_COLOR;return t===f.NO_MAP_ID?x(n,r):r}(e,o);return y(y({},e),{},{styleType:o,visibleLayerGroups:u,threeDBuildingColor:c,backgroundColor:h},_(y(y({},e),{},{visibleLayerGroups:u,styleType:o})))};t.mapStyleChangeUpdater=T;t.loadMapStylesUpdater=function(e,t){var n=t.payload||{},r=n.newStyles,i=n.onSuccess,o=Object.keys(r).reduce((function(e,t){return y(y({},e),{},(0,s.default)({},t,y(y({},r[t]),{},{layerGroups:r[t].layerGroups||M(r[t].style)})))}),{}),a=Object.keys(e.isLoading).reduce((function(t,n){return y(y({},t),e.isLoading[n]&&S(r[n])?(0,s.default)({},n,!1):(0,s.default)({},n,e.isLoading[n]))}),{}),u=y(y({},e),{},{isLoading:a,mapStyles:y(y({},e.mapStyles),o)}),c=function(e,t){if("function"==typeof e)return(0,h.ACTION_TASK)().map((function(n){return e(t)}));return null}(i,{styleType:e.styleType}),d=r[e.styleType]?T(u,{payload:{styleType:e.styleType}}):u;return c?(0,l.withTask)(d,c):d};t.loadMapStyleErrUpdater=function(e,t){var n=t.payload,r=n.ids,i=n.error;c.default.error(i);var o=Object.keys(e.isLoading).reduce((function(t,n){return y(y({},t),e.isLoading[n]&&(r||[]).includes(n)?(0,s.default)({},n,!1):(0,s.default)({},n,e.isLoading[n]))}),{});return y(y({},e),{},{isLoading:o})};t.receiveMapConfigUpdater=function(e,t){var n=(t.payload.config||{}).mapStyle;if(!n)return e;var r=n.mapStyles?y(y({},n),{},{mapStyles:y(y({},n.mapStyles),e.mapStyles)}):n;r.custom3DBuildingColor=Boolean(n.threeDBuildingColor)||r.custom3DBuildingColor;var i=O(e,{payload:r});return T(i,{payload:{styleType:i.styleType}})};t.resetMapConfigMapStyleUpdater=function(e){var t=y(y(y({},b),{},{mapboxApiAccessToken:e.mapboxApiAccessToken,mapboxApiUrl:e.mapboxApiUrl,mapStylesReplaceDefault:e.mapStylesReplaceDefault},e.initialState),{},{mapStyles:e.mapStyles,initialState:e.initialState});return T(t,{payload:{styleType:t.styleType}})};t.loadCustomMapStyleUpdater=function(e,t){var n=t.payload,r=n.icon,i=n.style,o=n.error;return y(y({},e),{},{inputStyle:y(y(y(y({},e.inputStyle),i?{id:"MANAGED"===e.inputStyle.custom?e.inputStyle.id:i.id||(0,d.generateHashId)(),style:(0,u.default)(i),label:e.inputStyle.label||i.name,layerGroups:M(i)}:{}),r?{icon:r}:{}),o?{error:o}:{})})};t.inputMapStyleUpdater=function(e,t){var n,r=t.payload,i=r.inputStyle,o=r.mapState,a=y(y({},e.inputStyle),i),s=(0,d.isValidStyleUrl)(a.url),l=null===(n=a.icon)||void 0===n?void 0:n.startsWith("data:image"),u=s||Boolean(a.uploadedFile),c=s&&!l?(0,d.getStyleImageIcon)({mapState:o,styleUrl:a.url||"",mapboxApiAccessToken:a.accessToken||e.mapboxApiAccessToken||"",mapboxApiUrl:e.mapboxApiUrl||f.DEFAULT_MAPBOX_API_URL}):a.icon;return y(y({},e),{},{inputStyle:y(y({},a),{},{isValid:u,icon:c})})};t.addCustomMapStyleUpdater=function(e){var t=e.inputStyle.id;if(!t)return e;var n=C(e);return T(n,{payload:{styleType:t}})};function C(e){var t=e.inputStyle.id;return t?y(y({},e),{},{mapStyles:y(y({},e.mapStyles),{},(0,s.default)({},t,y(y({},e.mapStyles[t]),e.inputStyle))),inputStyle:{id:null,accessToken:null,error:!1,isValid:!1,label:null,style:null,url:null,icon:null,custom:"LOCAL",uploadedFile:null}}):e}t.editCustomMapStyleUpdater=function(e){return C(e)};t.removeCustomMapStyleUpdater=function(e,t){var n=t.payload.id,r=e.mapStyles,i=(r[n],(0,a.default)(r,[n].map(g))),o=y(y({},e),{},{mapStyles:i});return e.styleType===n?T(o,{payload:{styleType:v().styleType}}):o};t.set3dBuildingColorUpdater=function(e,t){var n=t.payload;return y(y({},e),{},{threeDBuildingColor:n,custom3DBuildingColor:!0})};function L(){return{id:null,accessToken:null,error:!1,isValid:!1,label:null,style:null,url:null,icon:null,custom:"LOCAL",uploadedFile:null}}t.setBackgroundColorUpdater=function(e,t){var n=t.payload;return y(y({},e),{},{backgroundColor:n})}},function(e,t,n){"use strict";var r=n(3);Object.defineProperty(t,"__esModule",{value:!0}),t.togglePanelListViewUpdater=t.setLocaleUpdater=t.showDatasetTableUpdater=t.toggleSplitMapUpdater=t.loadFilesErrUpdater=t.loadFilesSuccessUpdater=t.loadFilesUpdater=t.removeNotificationUpdater=t.addNotificationUpdater=t.setExportMapHTMLModeUpdater=t.setExportMapFormatUpdater=t.setUserMapboxAccessTokenUpdater=t.setExportDataUpdater=t.setExportFilteredUpdater=t.setExportDataTypeUpdater=t.setExportSelectedDatasetUpdater=t.startExportingImageUpdater=t.cleanupExportImageUpdater=t.setExportImageErrorUpdater=t.setExportImageDataUriUpdater=t.setExportImageSettingUpdater=t.openDeleteModalUpdater=t.setMapControlVisibilityUpdater=t.toggleMapControlUpdater=t.toggleSidePanelCloseButtonUpdater=t.hideExportDropdownUpdater=t.showExportDropdownUpdater=t.toggleModalUpdater=t.toggleSidePanelUpdater=t.initUiStateUpdater=t.INITIAL_UI_STATE=t.DEFAULT_EXPORT_MAP=t.DEFAULT_EXPORT_JSON=t.DEFAULT_EXPORT_HTML=t.DEFAULT_NOTIFICATIONS=t.DEFAULT_EXPORT_DATA=t.DEFAULT_LOAD_FILES=t.DEFAULT_EXPORT_IMAGE=t.DEFAULT_MAP_CONTROLS=t.DEFAULT_MODAL=t.DEFAULT_ACTIVE_SIDE_PANEL=void 0;var i,o=r(n(44)),a=r(n(4)),s=n(21),l=n(36),u=n(24),c=n(453);function d(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function f(e){for(var t=1;t0?a:this.props.value0,h=o-a,p=(s-f)/h*100,m=(f-a)/h*100;return A.default.createElement(O,{className:(0,g.default)("kg-slider",w(w({},n),{},{disabled:r}),t),ref:this.ref,isRanged:i,vertical:l,style:d},A.default.createElement(E,{className:"kg-range-slider",vertical:l,ref:this.track},A.default.createElement(y.default,{left:this.calcHandleLeft0(p,m),valueListener:this.slide0Listener,sliderHandleWidth:u,display:i,vertical:l,showTooltip:c,track:this.track}),A.default.createElement(y.default,{left:this.calcHandleLeft1(p,m),valueListener:this.slide1Listener,sliderHandleWidth:u,vertical:l,value:s,showTooltip:c,track:this.track}),A.default.createElement(v.default,{width:p,v0Left:m,enableBarDrag:this.props.enableBarDrag,sliderBarListener:this.sliderBarListener,vertical:l,track:this.track,setAnchor:this.setAnchor})))}}]),n}(A.Component);t.default=S,(0,h.default)(S,"defaultProps",{title:"",isRanged:!0,value0:0,value1:100,minValue:0,maxValue:100,step:1,sliderHandleWidth:12,enableBarDrag:!1,onSlider0Change:M,onSlider1Change:M,onSliderBarChange:M,disabled:!1,vertical:!1,showTooltip:!1})},function(e,t,n){"use strict";var r=n(3),i=n(6);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o,a,s=r(n(40)),l=r(n(4)),u=r(n(15)),c=i(n(0)),d=r(n(14)),f=r(n(51)),h=n(43),p=n(21),A=r(n(953)),g=r(n(954)),m=r(n(955)),y=r(n(956)),v=r(n(957)),b=r(n(958)),_=d.default.div(o||(o=(0,u.default)(["\n display: flex;\n position: relative;\n width: ","px;\n &.disabled {\n opacity: 0.4;\n pointer-events: none;\n }\n"])),(function(e){return e.width})),w={reset:function(e){return c.default.createElement(h.Reset,{height:"18px"})},play:function(e){return c.default.createElement(h.Play,{height:"18px"})},pause:function(e){return c.default.createElement(h.Pause,{height:"18px"})},export:function(e){return c.default.createElement(h.Save,{height:"18px"})},speed:h.Rocket,animationFree:h.FreeWindow,animationIncremental:h.AnchorWindow};function x(){}var M=(a={},(0,l.default)(a,p.ANIMATION_WINDOW.free,{id:p.ANIMATION_WINDOW.free,icon:w.animationFree,tooltip:"tooltip.animationByWindow"}),(0,l.default)(a,p.ANIMATION_WINDOW.incremental,{id:p.ANIMATION_WINDOW.incremental,icon:w.animationIncremental,tooltip:"tooltip.animationByIncremental"}),a);function E(e,t,n,r,i){var o=[i,(0,b.default)(e),r,t,n],a=function(e){var t=e.isAnimatable,n=e.isAnimating,r=e.width,i=e.speed,o=e.animationWindow,a=e.setFilterAnimationWindow,u=e.updateAnimationSpeed,d=e.pauseAnimation,h=e.resetAnimation,p=e.startAnimation,A=e.playbackIcons,g=e.animationItems,m=e.buttonStyle,y=e.buttonHeight,v=e.playbackActionItems,b=void 0===v?[]:v,w=(0,c.useState)(!1),x=(0,s.default)(w,2),M=x[0],E=x[1],O=(0,c.useState)(!1),S=(0,s.default)(O,2),T=S[0],C=S[1],L=(0,c.useCallback)((function(){C(!T)}),[T,C]),P=m?(0,l.default)({},m,!0):{},I=(0,c.useCallback)((function(){M?window.setTimeout((function(){return E(!1)}),200):E(!0)}),[M,E]);return c.default.createElement(_,{className:(0,f.default)("playback-controls",{disabled:!t}),width:r},b.map((function(e,t){return c.default.createElement(e,{key:t,toggleAnimationWindowControl:L,showAnimationWindowControl:T,btnStyle:P,hideAndShowSpeedControl:I,animationItems:g,animationWindow:o,buttonHeight:y,setFilterAnimationWindow:a,updateAnimationSpeed:u,isAnimating:n,pauseAnimation:d,resetAnimation:h,startAnimation:p,playbackIcons:A,isSpeedControlVisible:M,speed:i})})))};return a.defaultProps={playbackIcons:w,animationItems:M,buttonStyle:"secondary",buttonHeight:"20px",playbackActionItems:o,animationWindow:p.ANIMATION_WINDOW.free,isAnimatable:!0,pauseAnimation:x,resetAnimation:x,startAnimation:x},a}E.deps=[A.default,g.default,m.default,y.default,v.default];var O=E;t.default=O},function(e,t,n){"use strict";var r=n(3);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i,o,a,s,l=r(n(15)),u=r(n(0)),c=r(n(14)),d=r(n(51)),f=n(120),h=r(n(1529)),p=r(n(600)),A=r(n(602)),g=c.default.div(i||(i=(0,l.default)(["\n padding: ",";\n position: relative;\n margin-top: ","px;\n\n ","\n"])),(function(e){return"".concat(e.theme.bottomInnerPdVert,"px ").concat(e.theme.bottomInnerPdSide,"px")}),(function(e){return e.theme.bottomPanelGap}),f.media.portable(o||(o=(0,l.default)(["\n border-top: 1px solid ",";\n border-left: 1px solid ",";\n padding: 12px 12px;\n margin-top: 0;\n "])),(function(e){return e.theme.panelBorderColor}),(function(e){return e.theme.panelBorderColor}))),m=c.default.div(a||(a=(0,l.default)(["\n position: relative;\n display: flex;\n align-items: center;\n\n .animation-control__time-slider {\n display: flex;\n align-items: center;\n height: 32px;\n width: 100%;\n }\n .playback-controls {\n margin-left: 16px;\n }\n\n ",";\n"])),f.media.palm(s||(s=(0,l.default)(["\n flex-direction: column;\n .playback-controls {\n margin: 0;\n }\n .animation-control__time-slider {\n width: 100%;\n position: relative;\n }\n .animation-control__time-domain {\n position: absolute;\n top: -24px;\n\n &.domain-start {\n left: ","px;\n }\n &.domain-end {\n right: ","px;\n }\n }\n "])),6,6)),y={flex:1};function v(e,t,n){var r=function(r){var i=r.className,o=r.style,a=r.isAnimatable,s=r.isAnimating,l=r.resetAnimation,c=r.toggleAnimation,f=r.updateAnimationSpeed,h=r.setTimelineValue,p=r.setAnimationWindow,A=r.timeline,v=r.showTimeline,b=void 0===v||v,_=r.showControls,w=void 0===_||_,x=r.showTimeDisplay,M=void 0===x||x;if(!A)return null;var E=A.animationWindow,O=A.value,S=A.speed,T=A.defaultTimeFormat,C=A.timeFormat,L=A.timezone;return u.default.createElement(g,{style:o,className:(0,d.default)("animation-control-container",i)},u.default.createElement(m,{className:"animation-widget--inner"},b?u.default.createElement(n,{style:y,timeline:A,setTimelineValue:h}):null,w?u.default.createElement(e,{className:"animation-control-playpause",isAnimatable:a,startAnimation:c,isAnimating:s,pauseAnimation:c,resetAnimation:l,speed:S,updateAnimationSpeed:f,setFilterAnimationWindow:p,animationWindow:E}):null),M?u.default.createElement(t,{currentTime:O,defaultTimeFormat:T,timeFormat:C,timezone:L}):null)};return r.defaultProps={toggleAnimation:function(){},updateAnimationSpeed:function(){}},r}v.deps=[p.default,A.default,h.default];var b=v;t.default=b},function(e,t,n){"use strict";var r=n(3),i=n(6);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){return function(e){var t=e.currentTime,n=e.defaultTimeFormat,r=e.timeFormat,i=e.timezone,o=(0,A.useMemo)((function(){var e=Array.isArray(t)?t:[t],o="string"==typeof r,a=(o?r:n)||v.DEFAULT_TIME_FORMAT,s=(0,_.datetimeFormatter)(i);return o?{displayDate:e.map(s(a)),displayTime:[]}:e.reduce((function(e,t){var n=a.split(" "),r=(0,h.default)(n,2),i=r[0],o=r[1],l=s(i)(t),u=o?s(o)(t):null;return e.displayDate.includes(l)||e.displayDate.push(l),u&&e.displayTime.push(u),e}),{displayDate:[],displayTime:[]})}),[t,r,n,i]),a=o.displayDate,s=o.displayTime,l=2===a.length&&2===s.length,u=s.length?s:a.length?a:null,c=a.length&&s.length?a:null;return A.default.createElement(w,null,A.default.createElement(x,{className:"animation-control__time-display"},l?A.default.createElement(M,null,A.default.createElement(T,null,A.default.createElement(O,null,a[0]),A.default.createElement(S,null,s[0])),A.default.createElement(L,null),A.default.createElement(T,null,A.default.createElement(O,null,a[1]),A.default.createElement(S,null,s[1]))):A.default.createElement(E,null,c?A.default.createElement(O,null,A.default.createElement(P,{timeValues:c})):null,u?A.default.createElement(S,null,A.default.createElement(P,{timeValues:u})):null)))}};var o,a,s,l,u,c,d,f,h=r(n(40)),p=r(n(15)),A=i(n(0)),g=r(n(14)),m=r(n(51)),y=n(43),v=n(21),b=n(29),_=n(24),w=g.default.div.attrs({className:"floating-time-display"})(o||(o=(0,p.default)(["\n bottom: ",";\n display: flex;\n position: absolute;\n width: 100%;\n margin-left: -","px;\n justify-content: center;\n pointer-events: none; /* prevent padding from blocking input */\n & > * {\n /* all children should allow input */\n pointer-events: all;\n }\n"])),(function(e){return"calc(100% + ".concat(e.theme.bottomPanelGap,"px)")}),(function(e){return e.theme.bottomInnerPdSide})),x=g.default.div.attrs((function(e){return{className:(0,m.default)("floating-time-display__inner",e.className)}}))(a||(a=(0,p.default)(["\n background-color: ",";\n border-radius: ","px;\n color: ",";\n display: flex;\n height: ","px;\n justify-content: center;\n min-width: ","px;\n opacity: ",";\n padding: ",";\n"])),(function(e){return e.theme.panelBackground}),(function(e){return e.theme.timeDisplayBorderRadius}),(function(e){return e.theme.titleTextColor}),(function(e){return e.theme.timeDisplayHeight}),(function(e){return e.theme.timeDisplayMinWidth}),(function(e){return e.theme.timeDisplayOpacity}),(function(e){return e.theme.timeDisplayPadding})),M=g.default.div(s||(s=(0,p.default)(["\n align-items: center;\n display: flex;\n flex-direction: row;\n"]))),E=g.default.div(l||(l=(0,p.default)(["\n display: flex;\n flex-direction: column;\n justify-content: center;\n"]))),O=g.default.div.attrs({className:"animation-control__time-display__top"})(u||(u=(0,p.default)(["\n color: ",";\n display: flex;\n font-size: 12px;\n font-weight: 500;\n justify-content: center;\n"])),(function(e){return e.theme.textColor})),S=g.default.div.attrs({className:"animation-control__time-display__bottom"})(c||(c=(0,p.default)(["\n color: ",";\n display: flex;\n font-size: 14px;\n font-weight: 500;\n justify-content: center;\n"])),(function(e){return e.theme.titleTextColor})),T=g.default.div.attrs({className:"animation-control__time-value-group"})(d||(d=(0,p.default)(["\n display: flex;\n flex-direction: column;\n"]))),C=g.default.div.attrs({className:"animation-control__horizontal-bar"})(f||(f=(0,p.default)(["\n margin: 0 12px;\n"]))),L=function(){return A.default.createElement(C,null,A.default.createElement(y.Minus,{height:"12px"}))},P=function(e){var t=e.timeValues,n=void 0===t?[]:t;return A.default.createElement(b.CenterFlexbox,null,A.default.createElement("div",{className:"time-value"},n[0]),n[1]?A.default.createElement(L,null):null,n[1]?A.default.createElement("div",{className:"time-value"},n[1]):null)}},function(e,t,n){"use strict";var r=n(3),i=n(6);Object.defineProperty(t,"__esModule",{value:!0}),t.LayerConfigGroupLabelFactory=T,t.default=t.StyledConfigGroupHeader=t.StyledLayerConfigGroup=t.ConfigGroupCollapsibleHeader=t.ConfigGroupCollapsibleContent=t.StyledLayerConfigGroupAction=void 0;var o,a,s,l,u,c,d,f=r(n(4)),h=r(n(40)),p=r(n(15)),A=i(n(0)),g=r(n(14)),m=r(n(51)),y=n(79),v=r(n(197)),b=r(n(406)),_=n(43),w=g.default.div(o||(o=(0,p.default)(["\n display: flex;\n align-items: center;\n color: ",";\n"])),(function(e){return e.theme.textColor}));t.StyledLayerConfigGroupAction=w;var x=g.default.div.attrs({className:"layer-config-group__content__collapsible"})(a||(a=(0,p.default)(["\n transition: max-height 0.3s ease-out;\n height: max-content;\n max-height: 1200px;\n overflow: auto;\n"])));t.ConfigGroupCollapsibleContent=x;var M=g.default.div.attrs({className:"layer-config-group__header__collapsible"})(s||(s=(0,p.default)(["\n overflow: visible;\n overflow: hidden;\n max-height: 0;\n"])));t.ConfigGroupCollapsibleHeader=M;var E=g.default.div(l||(l=(0,p.default)(["\n padding-left: ","px;\n margin-bottom: ","px;\n\n &.disabled {\n opacity: 0.3;\n pointer-events: none;\n }\n &.collapsed {\n .layer-config-group__header__collapsible {\n overflow: visible;\n max-height: 600px;\n }\n .layer-config-group__content {\n .layer-config-group__content__collapsible {\n overflow: hidden;\n max-height: 0;\n }\n }\n }\n"])),(function(e){return e.theme.layerConfigGroupPaddingLeft}),(function(e){return e.theme.layerConfigGroupMarginBottom}));t.StyledLayerConfigGroup=E;var O=g.default.div.attrs({className:"layer-config-group__header"})(u||(u=(0,p.default)(["\n display: flex;\n align-items: center;\n justify-content: space-between;\n margin-bottom: 12px;\n cursor: default;\n\n :hover {\n ","\n .layer-config-group__label {\n color: ",";\n }\n\n .layer-config-group__action {\n color: ",";\n }\n }\n"])),(function(e){return e.collapsible&&"cursor: pointer;"}),(function(e){return e.theme.textColorHl}),(function(e){return e.theme.textColorHl}));t.StyledConfigGroupHeader=O;var S=g.default.div(c||(c=(0,p.default)(["\n &.disabled {\n opacity: 0.3;\n pointer-events: none;\n * {\n pointer-events: none;\n }\n }\n"])));function T(e){var t=g.default.div(d||(d=(0,p.default)(["\n border-left: "," solid\n ",";\n line-height: 12px;\n margin-left: ",";\n padding-left: ",";\n\n display: flex;\n align-items: center;\n\n span {\n color: ",";\n font-weight: 500;\n letter-spacing: 0.2px;\n text-transform: capitalize;\n margin-left: ",";\n font-size: ",";\n }\n "])),(function(e){return e.theme.layerConfigGroupLabelBorderLeft}),(function(e){return e.theme.labelColor}),(function(e){return e.theme.layerConfigGroupLabelMargin}),(function(e){return e.theme.layerConfigGroupLabelPadding}),(function(e){return e.theme.textColor}),(function(e){return e.theme.layerConfigGroupLabelLabelMargin}),(function(e){return e.theme.layerConfigGroupLabelLabelFontSize}));return function(n){var r=n.label,i=n.description;return A.default.createElement(t,{className:"layer-config-group__label"},A.default.createElement("span",null,A.default.createElement(y.FormattedMessage,{id:r||"misc.empty",defaultMessage:r})),i&&A.default.createElement(e,{description:i,id:r}))}}function C(e){var t=function(t){var n=t.label,r=t.children,i=t.property,o=t.layer,a=t.onChange,s=t.collapsible,l=t.description,u=t.disabled,c=t.expanded,d=t.IconComponent,p=void 0===d?_.VertThreeDots:d,g=(0,A.useState)(!c),y=(0,h.default)(g,2),b=y[0],x=y[1],M=(0,A.useCallback)((function(){s&&x(!b)}),[b,x,s]);return A.default.createElement(E,{className:(0,m.default)("layer-config-group",{collapsed:b,disabled:u})},A.default.createElement(O,{onClick:M,collapsible:s},A.default.createElement(e,{label:n,description:l,collapsed:b}),A.default.createElement(w,{className:"layer-config-group__action"},i?A.default.createElement(v.default,{checked:null==o?void 0:o.config.visConfig[i],id:"".concat(null==o?void 0:o.id,"-").concat(i),onChange:function(){return null==a?void 0:a((0,f.default)({},i,!(null!=o&&o.config.visConfig[i])))}}):null,s?A.default.createElement(p,{height:"18px"}):null)),A.default.createElement(S,{className:(0,m.default)("layer-config-group__content",{disabled:i&&!(null!=o&&o.config.visConfig[i])})},r))};return t.defaultProps={collapsible:!1,expanded:!1,onChange:function(){},description:"",disabled:!1},t}T.deps=[b.default],C.deps=[T];var L=C;t.default=L},function(e,t,n){"use strict";var r=n(3),i=n(6);Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.ChickletTag=t.ChickletButton=void 0;var o,a,s,l=r(n(15)),u=i(n(0)),c=r(n(14)),d=n(111),f=n(399),h=n(712),p=r(n(950)),A=n(36),g=c.default.div(o||(o=(0,l.default)(["\n background: ",";\n border-radius: 1px;\n color: ",";\n font-size: 11px;\n line-height: 20px;\n margin: 4px 10px 4px 3px;\n padding: 2px 6px;\n display: flex;\n align-items: center;\n max-width: calc(100% - 8px);\n\n :hover {\n color: ",";\n }\n"])),(function(e){return"light"===e.inputTheme?e.theme.chickletBgdLT:e.theme.chickletBgd}),(function(e){return"light"===e.inputTheme?e.theme.textColorLT:e.theme.textColor}),(function(e){return"light"===e.inputTheme?e.theme.textColorHlLT:e.theme.textColorHl}));t.ChickletButton=g;var m=[h.restrictToParentElement],y=c.default.span(a||(a=(0,l.default)(["\n margin-right: 10px;\n text-overflow: ellipsis;\n width: 100%;\n overflow: hidden;\n\n :hover {\n overflow: visible;\n }\n"])));t.ChickletTag=y;var v=function(e){var t=e.disabled,n=e.name,r=e.remove,i=e.inputTheme;return u.default.createElement(g,{inputTheme:i},u.default.createElement(y,null,n),u.default.createElement(p.default,{onClick:t?void 0:r}))},b=c.default.div(s||(s=(0,l.default)(["\n ","\n \n color: ",";\n overflow: hidden;\n"])),(function(e){return"secondary"===e.inputTheme?e.theme.secondaryChickletedInput:"light"===e.inputTheme?e.theme.chickletedInputLT:e.theme.chickletedInput}),(function(e){return e.hasPlaceholder?e.theme.selectColorPlaceHolder:e.theme.selectColor})),_=function(e){var t=e.item,n=e.removeItem,r=e.displayOption,i=e.CustomChickletComponent,o=e.inputTheme,a=e.disabled,s=e.itemId,l=(0,f.useSortable)({id:s}),c=l.attributes,d=l.listeners,h=l.setNodeRef,p=l.transform,A=l.transition,g=l.isDragging,m=(0,u.useMemo)((function(){return{inputTheme:o,disabled:a,name:r(t),displayOption:r,item:t,attributes:c,listeners:d,setNodeRef:h,transform:p,transition:A,isDragging:g,remove:function(e){return n(t,e)}}}),[t,n,r,i,o,a,s,c,d,h,p,A,g]);return i?u.default.createElement(i,m):u.default.createElement(v,m)},w=function(e){var t=e.disabled,n=e.onClick,r=e.className,i=e.selectedItems,o=void 0===i?[]:i,a=e.placeholder,s=void 0===a?"":a,l=e.removeItem,c=e.reorderItems,h=void 0===c?function(e){return e}:c,p=e.displayOption,g=void 0===p?function(e){return e}:p,y=e.inputTheme,v=e.CustomChickletComponent,w=(0,u.useMemo)((function(){return o.map((function(e){return g(e)}))}),[g,o]),x=(0,u.useCallback)((function(e){var t=e.active,n=e.over;if(n&&t.id!==n.id){var r=w.findIndex((function(e){return e===t.id})),i=w.findIndex((function(e){return e===n.id}));h((0,f.arrayMove)(o,r,i))}}),[o,g,h]);return u.default.createElement(b,{className:"".concat(r," chickleted-input"),onClick:n,inputTheme:y,hasPlaceholder:!o||!o.length},u.default.createElement(d.DndContext,{onDragEnd:x,modifiers:m,collisionDetection:d.pointerWithin,autoScroll:!1},u.default.createElement(f.SortableContext,{items:w},o.length>0?o.map((function(e,n){return u.default.createElement(_,{item:e,itemId:g(e),removeItem:l,displayOption:g,CustomChickletComponent:v,disabled:t,inputTheme:y,key:"".concat(g(e),"_").concat(n)})})):u.default.createElement("span",{className:"".concat(r," chickleted-input__placeholder")},u.default.createElement(A.FormattedMessage,{id:s||"placeholder.enterValue"}))),u.default.createElement(d.DragOverlay,{dropAnimation:null})))};t.default=w},function(e,t,n){"use strict";var r=n(3),i=n(6);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o,a,s,l,u=r(n(33)),c=r(n(7)),d=r(n(8)),f=r(n(13)),h=r(n(10)),p=r(n(11)),A=r(n(9)),g=r(n(4)),m=r(n(15)),y=i(n(0)),v=n(145),b=r(n(1531)),_=r(n(51)),w=r(n(14)),x=n(73),M=r(n(456)),E=i(n(223)),O=n(43),S=n(21);function T(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=(0,A.default)(e);if(t){var i=(0,A.default)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return(0,p.default)(this,n)}}var C=w.default.div(o||(o=(0,m.default)(["\n display: flex;\n flex-direction: column;\n background-color: ",";\n box-shadow: ",";\n\n :focus {\n outline: 0;\n }\n"])),(function(e){return e.light?e.theme.dropdownListBgdLT:e.theme.dropdownListBgd}),(function(e){return e.theme.dropdownListShadow})),L=w.default.div.attrs({className:"typeahead__input_box"})(a||(a=(0,m.default)(["\n padding: 8px;\n"]))),P=w.default.input(s||(s=(0,m.default)(["\n "," :hover {\n cursor: pointer;\n background-color: ",";\n }\n"])),(function(e){return e.light?e.theme.inputLT:e.theme.secondaryInput}),(function(e){return e.light?e.theme.selectBackgroundLT:e.theme.secondaryInputBgd})),I=w.default.div.attrs({className:"typeahead__input_icon"})(l||(l=(0,m.default)(["\n position: absolute;\n right: 15px;\n top: 14px;\n color: ",";\n"])),(function(e){return e.theme.inputPlaceholderColor}));function D(e){var t=e.searchOptions,n=e.filterOption;if("function"==typeof t)return null!==n&&x.console.warn("searchOptions prop is being used, filterOption prop will be ignored"),t;if("function"==typeof n)return function(e,t){return t.filter((function(t){return n(e,t)}))};var r="string"==typeof n?M.default.generateAccessor(n):M.default.IDENTITY_FN;return function(e,t){return b.default.filter(e,t,{extract:r}).map((function(e){return t[e.index]}))}}function k(e,t){return D(t)(e,t.options)}var R=function(e){(0,h.default)(n,e);var t=T(n);function n(e){var r;return(0,c.default)(this,n),r=t.call(this,e),(0,g.default)((0,f.default)(r),"root",(0,y.createRef)()),(0,g.default)((0,f.default)(r),"entry",(0,y.createRef)()),(0,g.default)((0,f.default)(r),"focus",(function(){r.entry.current&&r.entry.current.focus()})),(0,g.default)((0,f.default)(r),"_hasCustomValue",(function(){var e;return Number(r.props.allowCustomValues)>0&&Number(null===(e=r.state.entryValue)||void 0===e?void 0:e.length)>=Number(r.props.allowCustomValues)&&r.state.searchResults.indexOf(r.state.entryValue)<0})),(0,g.default)((0,f.default)(r),"_getCustomValue",(function(){return r._hasCustomValue()?r.state.entryValue:null})),(0,g.default)((0,f.default)(r),"_onOptionSelected",(function(e,t){var n,i;r.props.searchable&&r.setState({searchResults:r.props.options||[],selection:"",entryValue:""}),null===(n=(i=r.props).onOptionSelected)||void 0===n||n.call(i,e,t)})),(0,g.default)((0,f.default)(r),"_onTextEntryUpdated",(function(){if(r.props.searchable){var e,t=null===(e=r.entry.current)||void 0===e?void 0:e.value;r.setState({searchResults:k(t,r.props),selection:"",entryValue:t})}})),(0,g.default)((0,f.default)(r),"_onEnter",(function(e){var t,n,i=r.getSelection();i||(null===(t=(n=r.props).onKeyDown)||void 0===t||t.call(n,e));r._onOptionSelected(i,e)})),(0,g.default)((0,f.default)(r),"_onEscape",(function(){r.setState({selectionIndex:null})})),(0,g.default)((0,f.default)(r),"_onTab",(function(e){var t=r.getSelection(),n=t||(r.state.searchResults.length>0?r.state.searchResults[0]:null);if(null===n&&r._hasCustomValue()&&(n=r._getCustomValue()),null!==n)return r._onOptionSelected(n,e)})),(0,g.default)((0,f.default)(r),"eventMap",(function(){var e={};return e[S.KeyEvent.DOM_VK_UP]=r.navUp,e[S.KeyEvent.DOM_VK_DOWN]=r.navDown,e[S.KeyEvent.DOM_VK_RETURN]=e[S.KeyEvent.DOM_VK_ENTER]=r._onEnter,e[S.KeyEvent.DOM_VK_ESCAPE]=r._onEscape,e[S.KeyEvent.DOM_VK_TAB]=r._onTab,e})),(0,g.default)((0,f.default)(r),"_nav",(function(e){if(r._hasHint()){var t=null===r.state.selectionIndex?1===e?0:e:r.state.selectionIndex+e,n=r.props.maxVisible?r.state.searchResults.slice(0,r.props.maxVisible).length:r.state.searchResults.length;r._hasCustomValue()&&(n+=1),t<0?t+=n:t>=n&&(t-=n),r.setState({selectionIndex:t})}})),(0,g.default)((0,f.default)(r),"navDown",(function(){r._nav(1)})),(0,g.default)((0,f.default)(r),"navUp",(function(){r._nav(-1)})),(0,g.default)((0,f.default)(r),"_onChange",(function(e){r.props.onChange&&r.props.onChange(e),r._onTextEntryUpdated()})),(0,g.default)((0,f.default)(r),"_onKeyDown",(function(e){var t,n;if(!r._hasHint()||e.shiftKey)return null===(t=(n=r.props).onKeyDown)||void 0===t?void 0:t.call(n,e);var i,o,a=r.eventMap()[e.keyCode];if(!a)return null===(i=(o=r.props).onKeyDown)||void 0===i?void 0:i.call(o,e);a(e),e.preventDefault()})),(0,g.default)((0,f.default)(r),"_onFocus",(function(e){if(r.setState({isFocused:!0}),r.props.onFocus)return r.props.onFocus(e)})),(0,g.default)((0,f.default)(r),"_onBlur",(function(e){if(r.setState({isFocused:!1}),r.props.onBlur)return r.props.onBlur(e)})),r.state={searchResults:r.props.options||[],entryValue:r.props.value||r.props.initialValue,selection:r.props.value,selectionIndex:null,isFocused:!1},r}return(0,d.default)(n,[{key:"componentDidMount",value:function(){var e;this.entry.current?this.entry.current.focus():null===(e=this.root.current)||void 0===e||e.focus()}},{key:"_renderIncrementalSearchResults",value:function(){var e=this.props.customListComponent,t=void 0===e?E.default:e;return y.default.createElement(t,{fixedOptions:this.props.fixedOptions,options:this.state.searchResults,areResultsTruncated:!1,resultsTruncatedMessage:this.props.resultsTruncatedMessage,onOptionSelected:this._onOptionSelected,allowCustomValues:this.props.allowCustomValues,customValue:this._getCustomValue(),customClasses:this.props.customClasses,customListItemComponent:this.props.customListItemComponent,customListHeaderComponent:this.props.customListHeaderComponent,selectionIndex:this.state.selectionIndex,defaultClassNames:this.props.defaultClassNames,displayOption:this.props.displayOption,selectedItems:this.props.selectedItems,light:this.props.light})}},{key:"getSelection",value:function(){var e,t,n,r=this.state.selectionIndex;if(null===r)return null;if(r=Number(r),this._hasCustomValue()){if(0===r)return this.state.entryValue;r--}return this._hasFixedOptions()?r0||this._hasCustomValue()}},{key:"_hasFixedOptions",value:function(){return Array.isArray(this.props.fixedOptions)&&this.props.fixedOptions.length}},{key:"render",value:function(){var e,t,n={};n[null===(e=this.props.customClasses)||void 0===e?void 0:e.input]=Boolean(null===(t=this.props.customClasses)||void 0===t?void 0:t.input);var r=(0,_.default)(n),i=(0,g.default)({},"typeahead",this.props.defaultClassNames);i[this.props.className?this.props.className:""]=Boolean(this.props.className);var o=(0,_.default)(i);return y.default.createElement(C,{className:o,ref:this.root,tabIndex:0,onKeyDown:this._onKeyDown,onKeyPress:this.props.onKeyPress,onKeyUp:this.props.onKeyUp,onFocus:this._onFocus,light:this.props.light},this._renderHiddenInput(),this.props.searchable?y.default.createElement(L,null,y.default.createElement(P,(0,u.default)({ref:this.entry,type:"text",disabled:this.props.disabled},this.props.inputProps,{placeholder:this.props.placeholder,className:r,value:this.state.entryValue,onChange:this._onChange,onBlur:this._onBlur,light:this.props.light})),y.default.createElement(I,null,y.default.createElement(this.props.inputIcon,{height:"18px"}))):null,this._renderIncrementalSearchResults())}}],[{key:"getDerivedStateFromProps",value:function(e,t){return e.options===t.prevOptions?{}:{searchResults:function(e,t,n){var r=t.options,i=t.showOptionsWhenEmpty;return t.searchable?function(e,t,n){var r=!e||0===e.trim().length,i=t&&t.isFocused;return!(n&&i)&&r}(e,n,i)?r:D(t)(e,r):r}(t.entryValue,e,t),prevOptions:e.options}}}]),n}(y.Component);(0,g.default)(R,"defaultProps",{options:[],customClasses:{},allowCustomValues:0,initialValue:"",value:"",placeholder:"",disabled:!1,textarea:!1,inputProps:{},onOptionSelected:function(e){},onChange:function(e){},onKeyDown:function(e){},onKeyPress:function(e){},onKeyUp:function(e){},onFocus:function(e){},onBlur:function(e){},filterOption:null,searchOptions:null,inputDisplayOption:null,defaultClassNames:!0,customListComponent:E.default,customListItemComponent:E.ListItem,inputIcon:O.Search,customListHeaderComponent:null,showOptionsWhenEmpty:!0,searchable:!0,resultsTruncatedMessage:null}),(0,v.polyfill)(R);var j=R;t.default=j},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.canUseDOM=t.SafeNodeList=t.SafeHTMLCollection=void 0;var r,i=n(964);var o=((r=i)&&r.__esModule?r:{default:r}).default,a=o.canUseDOM?window.HTMLElement:{};t.SafeHTMLCollection=o.canUseDOM?window.HTMLCollection:{},t.SafeNodeList=o.canUseDOM?window.NodeList:{},t.canUseDOM=o.canUseDOM;t.default=a},function(e,t,n){"use strict";var r=n(3);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i,o=r(n(15)),a=r(n(0)),s=r(n(14)),l=n(21);function u(e,t){var n=s.default.div(i||(i=(0,o.default)(["\n background-color: rgba(",", 0.2);\n border-radius: 2px;\n border: 1px solid rgb(",");\n color: rgb(",");\n display: inline-block;\n font-size: 10px;\n font-weight: 400;\n padding: 0 5px;\n text-align: center;\n width: ","px;\n line-height: ","px;\n "])),(function(e){return e.color}),(function(e){return e.color}),(function(e){return e.color}),(function(e){return e.theme.fieldTokenWidth}),(function(e){return e.theme.fieldTokenHeight}));return function(r){var i=r.type;return a.default.createElement(n,{color:e[i]&&e[i].color||t.default},e[i].label)}}u.deps=[function(){return l.FIELD_TYPE_DISPLAY},function(){return l.FIELD_COLORS}];var c=u;t.default=c},function(e,t,n){var r=n(979),i=n(1552);e.exports=function(e,t){return e&&r(e,i(t))}},function(e,t,n){(function(e){var r=n(198),i=n(1548),o=t&&!t.nodeType&&t,a=o&&"object"==typeof e&&e&&!e.nodeType&&e,s=a&&a.exports===o?r.Buffer:void 0,l=(s?s.isBuffer:void 0)||i;e.exports=l}).call(this,n(219)(e))},function(e,t){e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},function(e,t){e.exports=function(e){return function(t){return e(t)}}},function(e,t,n){(function(e){var r=n(978),i=t&&!t.nodeType&&t,o=i&&"object"==typeof e&&e&&!e.nodeType&&e,a=o&&o.exports===i&&r.process,s=function(){try{var e=o&&o.require&&o.require("util").types;return e||a&&a.binding&&a.binding("util")}catch(e){}}();e.exports=s}).call(this,n(219)(e))},function(e,t){var n=Object.prototype;e.exports=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||n)}},function(e,t,n){var r=n(984)(Object.getPrototypeOf,Object);e.exports=r},function(e,t,n){var r=n(464),i=n(1563),o=n(1564),a=n(1565),s=n(1566),l=n(1567);function u(e){var t=this.__data__=new r(e);this.size=t.size}u.prototype.clear=i,u.prototype.delete=o,u.prototype.get=a,u.prototype.has=s,u.prototype.set=l,e.exports=u},function(e,t){e.exports=function(e,t){return e===t||e!=e&&t!=t}},function(e,t,n){var r=n(289)(n(198),"Map");e.exports=r},function(e,t,n){var r=n(1572),i=n(1579),o=n(1581),a=n(1582),s=n(1583);function l(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t1&&o.default.createElement(t,{inputTheme:"secondary",datasets:l,disabled:s.freeze,dataId:s.dataId,onSelect:p})))}));return r.displayName="NewFilterPanel",r}d.deps=[s.default,l.default,u.default];var f=d;t.default=f},function(e,t,n){"use strict";var r=n(3);Object.defineProperty(t,"__esModule",{value:!0}),t.timeRangeSliderFieldsSelector=l,t.default=void 0;var i=r(n(33)),o=r(n(0)),a=r(n(591)),s=n(21);function l(e){var t=("string"==typeof e.timeFormat?e.timeFormat:e.defaultTimeFormat)||s.DEFAULT_TIME_FORMAT;return{id:e.id,domain:e.domain,bins:e.bins,value:e.value,plotType:e.plotType,lineChart:e.lineChart,yAxis:e.yAxis,step:e.step,speed:e.speed,histogram:e.view===s.FILTER_VIEW_TYPES.enlarged?e.enlargedHistogram:e.histogram,animationWindow:e.animationWindow,isAnimating:e.isAnimating,timezone:e.timezone,timeFormat:t,isMinified:e.view===s.FILTER_VIEW_TYPES.minified,isEnlarged:e.view===s.FILTER_VIEW_TYPES.enlarged}}function u(e){return function(t){var n=t.filter,r=t.setFilter,a=t.isAnimatable,s=t.toggleAnimation,u=t.hideTimeTitle,c=t.timeline;return o.default.createElement(e,(0,i.default)({},l(n),{onChange:r,toggleAnimation:s,isAnimatable:a,hideTimeTitle:u,timeline:c}))}}u.deps=[a.default];var c=u;t.default=c},function(e,t,n){"use strict";var r=n(3),i=n(6);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o,a,s=r(n(33)),l=r(n(40)),u=r(n(72)),c=r(n(15)),d=r(n(14)),f=i(n(0)),h=n(250),p=r(n(1139)),A=d.default.div(o||(o=(0,c.default)(["\n position: absolute;\n width: 15px;\n height: 15px;\n fill: ",";\n text-align: initial;\n\n > svg {\n position: absolute;\n }\n"])),(function(e){return e.theme.tooltipBg})),g=(0,d.default)((function(e){var t=e.children,n=e.arrow,r=(e.isLightTheme,(0,u.default)(e,["children","arrow","isLightTheme"]));return f.default.createElement("div",r,t,n?f.default.createElement(A,{className:"svg-arrow","data-popper-arrow":""},f.default.createElement("svg",{width:15,height:15},f.default.createElement("path",{d:"M2,7.5 7.5,2 13,7.5Z"}))):null)}))(a||(a=(0,c.default)(["\n font-family: ",";\n font-size: ",";\n font-weight: 400;\n padding: 7px 18px;\n box-shadow: ",";\n background-color: ",";\n color: ",";\n border-radius: ",";\n ","\n"])),(function(e){return e.theme.fontFamily}),(function(e){return e.theme.tooltipFontSize}),(function(e){return e.isLightTheme?e.theme.panelBoxShadow:e.theme.tooltipBoxShadow}),(function(e){return e.isLightTheme?e.theme.tooltipBgLT:e.theme.tooltipBg}),(function(e){return e.isLightTheme?e.theme.tooltipColorLT:e.theme.tooltipColor}),(function(e){return e.theme.primaryBtnRadius}),(function(e){return e.arrow?"\n &[data-placement^='top'] > .svg-arrow {\n bottom: 0;\n &::after,\n > svg {\n top: 7px;\n transform: rotate(180deg);\n }\n }\n\n &[data-placement^='bottom'] > .svg-arrow {\n top: 0;\n > svg {\n bottom: 7px;\n }\n }\n\n &[data-placement^='left'] > .svg-arrow {\n right: 0;\n &::after,\n > svg {\n transform: rotate(90deg);\n left: 7px;\n }\n }\n\n &[data-placement^='right'] > .svg-arrow {\n left: 0;\n &::after,\n > svg {\n transform: rotate(-90deg);\n right: 7px;\n }\n }\n ":""})),m=function(e){var t=e.children,n=e.render,r=e.duration,i=void 0===r?200:r,o=e.arrow,a=void 0===o||o,c=e.isLightTheme,d=void 0!==c&&c,A=e.className,m=(0,u.default)(e,["children","render","duration","arrow","isLightTheme","className"]),y=(0,f.useState)(0),v=(0,l.default)(y,2),b=v[0],_=v[1],w=(0,f.useState)(null),x=(0,l.default)(w,2),M=x[0],E=x[1];function O(){_(1),M&&clearTimeout(M)}function S(e){var t=e.unmount,n=setTimeout((function(){var n;null!==(n=e.state)&&void 0!==n&&n.isDestroyed||t()}),i[0]||i);E(n),_(0)}return f.default.createElement(h.RootContext.Consumer,null,(function(e){return f.default.createElement(p.default,(0,s.default)({},m,{appendTo:(null==e?void 0:e.current)||"parent",animation:!0,render:function(e){return f.default.createElement(g,(0,s.default)({},e,{className:A,style:{opacity:b,transition:"opacity ".concat(i,"ms")},arrow:a,isLightTheme:d}),null==n?void 0:n(e))},onMount:O,onHide:S}),t)}))};t.default=m},function(e,t,n){"use strict";var r=n(3),i=n(6);Object.defineProperty(t,"__esModule",{value:!0}),t.default=Q,t.Attribution=t.Droppable=t.isSplitSelector=void 0;var o,a,s=r(n(7)),l=r(n(8)),u=r(n(13)),c=r(n(10)),d=r(n(11)),f=r(n(9)),h=r(n(4)),p=r(n(33)),A=r(n(15)),g=i(n(0)),m=i(n(14)),y=n(633),v=r(n(1794)),b=n(114),_=r(n(634)),w=n(111),x=r(n(457)),M=r(n(1038)),E=r(n(1041)),O=n(29),S=r(n(1053)),T=n(286),C=n(24),L=n(120),P=n(21),I=n(475),D=r(n(1056)),k=n(36),R=n(25),j=n(166);function F(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function N(e){for(var t=1;t1};t.isSplitSelector=W;var q=function(e){var t=e.containerId,n=(0,w.useDroppable)({id:t,data:{type:P.DROPPABLE_MAP_CONTAINER_TYPE,index:t},disabled:!t}),r=n.isOver,i=n.setNodeRef;return g.default.createElement(Y,{ref:i,isOver:r})};t.Droppable=q;var X=m.default.div(a||(a=(0,A.default)(["\n max-width: ",";\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n color: ",";\n margin-right: 2px;\n line-height: ",";\n :hover {\n white-space: inherit;\n }\n"])),(function(e){return e.isPalm?"130px":"180px"}),(function(e){return e.theme.labelColor}),(function(e){return e.isPalm?"1em":"1.4em"})),Z=function(e){var t=e.datasetAttributions,n=e.isPalm;return g.default.createElement(g.default.Fragment,null,null!=t&&t.length?g.default.createElement(X,{isPalm:n},t.map((function(e,n){return g.default.createElement("a",(0,p.default)({},e.url?{href:e.url}:null,{target:"_blank",rel:"noopener noreferrer",key:"".concat(e.title,"_").concat(n)}),e.title,n!==t.length-1?", ":null)}))):null)},K=function(e){var t=e.showMapboxLogo,n=void 0===t||t,r=e.showOsmBasemapAttribution,i=void 0!==r&&r,o=e.datasetAttributions,a=(0,C.hasMobileWidth)(L.breakPointValues);return(0,g.useMemo)((function(){return n?g.default.createElement(O.StyledAttrbution,null,g.default.createElement(O.EndHorizontalFlexbox,null,g.default.createElement(Z,{datasetAttributions:o,isPalm:a}),g.default.createElement("div",{className:"attrition-link"},null!=o&&o.length?g.default.createElement("span",{className:"pipe-separator"},"|"):null,a?g.default.createElement(G,null):null,g.default.createElement("a",{href:"https://kepler.gl/policy/",target:"_blank",rel:"noopener noreferrer"},"© kepler.gl |"," "),a?null:g.default.createElement(G,null)))):g.default.createElement(O.StyledAttrbution,null,g.default.createElement(O.EndHorizontalFlexbox,null,g.default.createElement(Z,{datasetAttributions:o,isPalm:a}),i?g.default.createElement("div",{className:"attrition-link"},null!=o&&o.length?g.default.createElement("span",{className:"pipe-separator"},"|"):null,g.default.createElement("a",{href:"http://www.openstreetmap.org/copyright",target:"_blank",rel:"noopener noreferrer"},"© OpenStreetMap")):null))}),[n,i,o,a])};function Q(e,t,n){var r=function(r){(0,c.default)(o,r);var i=B(o);function o(e){var t;return(0,s.default)(this,o),t=i.call(this,e),(0,h.default)((0,u.default)(t),"displayName","MapContainer"),(0,h.default)((0,u.default)(t),"state",{showMapboxAttribution:!0}),(0,h.default)((0,u.default)(t),"_deck",null),(0,h.default)((0,u.default)(t),"_map",null),(0,h.default)((0,u.default)(t),"_ref",(0,g.createRef)()),(0,h.default)((0,u.default)(t),"_deckGLErrorsElapsed",{}),(0,h.default)((0,u.default)(t),"previousLayers",{}),(0,h.default)((0,u.default)(t),"_handleResize",(function(e){var n=t.props,r=n.primary,i=n.index;if(r){var o=t.props.mapStateActions;e&&e.width>0&&e.height>0&&o.updateMap(e,i)}})),(0,h.default)((0,u.default)(t),"layersSelector",(function(e){return e.visState.layers})),(0,h.default)((0,u.default)(t),"layerDataSelector",(function(e){return e.visState.layerData})),(0,h.default)((0,u.default)(t),"splitMapSelector",(function(e){return e.visState.splitMaps})),(0,h.default)((0,u.default)(t),"splitMapIndexSelector",(function(e){return e.index})),(0,h.default)((0,u.default)(t),"mapLayersSelector",(0,b.createSelector)(t.splitMapSelector,t.splitMapIndexSelector,C.getMapLayersFromSplitMaps)),(0,h.default)((0,u.default)(t),"layerOrderSelector",(function(e){return e.visState.layerOrder})),(0,h.default)((0,u.default)(t),"layersToRenderSelector",(0,b.createSelector)(t.layersSelector,t.layerDataSelector,t.mapLayersSelector,j.prepareLayersToRender)),(0,h.default)((0,u.default)(t),"layersForDeckSelector",(0,b.createSelector)(t.layersSelector,t.layerDataSelector,j.prepareLayersForDeck)),(0,h.default)((0,u.default)(t),"filtersSelector",(function(e){return e.visState.filters})),(0,h.default)((0,u.default)(t),"polygonFiltersSelector",(0,b.createSelector)(t.filtersSelector,(function(e){return e.filter((function(e){return e.type===P.FILTER_TYPES.polygon&&!1!==e.enabled}))}))),(0,h.default)((0,u.default)(t),"featuresSelector",(function(e){return e.visState.editor.features})),(0,h.default)((0,u.default)(t),"selectedFeatureSelector",(function(e){return e.visState.editor.selectedFeature})),(0,h.default)((0,u.default)(t),"featureCollectionSelector",(0,b.createSelector)(t.polygonFiltersSelector,t.featuresSelector,(function(e,t){return{type:"FeatureCollection",features:t.concat(e.map((function(e){return e.value})))}}))),(0,h.default)((0,u.default)(t),"selectedPolygonIndexSelector",(0,b.createSelector)(t.featureCollectionSelector,t.selectedFeatureSelector,(function(e,t){return e.features.findIndex((function(e){return e.id===(null==t?void 0:t.id)}))}))),(0,h.default)((0,u.default)(t),"selectedFeatureIndexArraySelector",(0,b.createSelector)((function(e){return e}),(function(e){return e<0?[]:[e]}))),(0,h.default)((0,u.default)(t),"generateMapboxLayerMethodSelector",(function(e){var t;return null!==(t=e.generateMapboxLayers)&&void 0!==t?t:T.generateMapboxLayers})),(0,h.default)((0,u.default)(t),"mapboxLayersSelector",(0,b.createSelector)(t.layersSelector,t.layerDataSelector,t.layerOrderSelector,t.layersToRenderSelector,t.generateMapboxLayerMethodSelector,(function(e,t,n,r,i){return i(e,t,n,r)}))),(0,h.default)((0,u.default)(t),"mapStyleTypeSelector",(function(e){return e.mapStyle.styleType})),(0,h.default)((0,u.default)(t),"mapStyleBackgroundColorSelector",(function(e){return e.mapStyle.backgroundColor})),(0,h.default)((0,u.default)(t),"styleSelector",(0,b.createSelector)(t.mapStyleTypeSelector,t.mapStyleBackgroundColorSelector,(function(e,t){return N(N({},z.container),e===P.NO_MAP_ID?{backgroundColor:(0,C.rgbToHex)(t)}:{})}))),(0,h.default)((0,u.default)(t),"_onCloseMapPopover",(function(){t.props.visStateActions.onLayerClick(null)})),(0,h.default)((0,u.default)(t),"_onLayerHover",(function(e,n){t.props.visStateActions.onLayerHover(n)})),(0,h.default)((0,u.default)(t),"_onLayerSetDomain",(function(e,n){t.props.visStateActions.layerConfigChange(t.props.visState.layers[e],{colorDomain:n})})),(0,h.default)((0,u.default)(t),"_handleMapToggleLayer",(function(e){var n=t.props,r=n.index,i=void 0===r?0:r;n.visStateActions.toggleLayerForMap(i,e)})),(0,h.default)((0,u.default)(t),"_onMapboxStyleUpdate",(function(e){t.previousLayers={},t._updateMapboxLayers(),e&&e.style&&t.setState({showMapboxAttribution:(0,C.isStyleUsingMapboxTiles)(e.style)}),"function"==typeof t.props.onMapStyleLoaded&&t.props.onMapStyleLoaded(t._map)})),(0,h.default)((0,u.default)(t),"_setMapboxMap",(function(e){if(!t._map&&e){if(t._map=e.getMap(),!t._map)return;t._map.on("style.load",t._onMapboxStyleUpdate),t._map.on("render",(function(){"function"==typeof t.props.onMapRender&&t.props.onMapRender(t._map)}))}t.props.getMapboxRef&&t.props.getMapboxRef(e,t.props.index)})),(0,h.default)((0,u.default)(t),"_onBeforeRender",(function(e){var n=e.gl;(0,C.setLayerBlending)(n,t.props.visState.layerBlending)})),(0,h.default)((0,u.default)(t),"_onDeckError",(function(e,n){var r=(null==e?void 0:e.message)||"unknown-error",i=null!=n&&n.id?" in ".concat(n.id," layer"):"",o="WebGL context is lost"===r?"Your GPU was disconnected. This can happen if your computer goes to sleep. It can also occur for other reasons, such as if you are running too many GPU applications.":"An error in deck.gl: ".concat(r).concat(i,"."),a=t._deckGLErrorsElapsed[o];if(!a||a1&&void 0!==arguments[1]?arguments[1]:{primaryMap:!1},i=this.props,o=i.mapStyle,a=i.visState,s=i.mapState,l=i.visStateActions,u=i.mapboxApiAccessToken,c=i.mapboxApiUrl,d=i.deckGlProps,f=i.index,h=i.mapControls,A=i.deckRenderCallbacks,m=i.theme,y=i.generateDeckGLLayers,b=i.onMouseMove,_=a.hoverInfo,w=a.editor,x=r.primaryMap,M=r.isInteractive,E=r.children,O=h.mapDraw,S=O||{},L=S.active,I=void 0!==L&&L,D=T.EditorLayerUtils.isDrawingActive(I,w.mode),k=null===(t=this.context)||void 0===t?void 0:t.getInternalViewState(f),F=N(N({},s),k),B=(0,C.getViewportFromMapState)(F),z=this.selectedPolygonIndexSelector(this.props),U=l.setFeatures,H=l.onLayerClick,V=l.setSelectedFeature,G=null!=y?y:j.computeDeckLayers,Y=G({visState:a,mapState:F,mapStyle:o},{mapIndex:f,primaryMap:x,mapboxApiAccessToken:u,mapboxApiUrl:c,layersForDeck:e,editorInfo:x?{editor:w,editorMenuActive:I,onSetFeatures:U,setSelectedFeature:V,featureCollection:this.featureCollectionSelector(this.props),selectedFeatureIndexes:this.selectedFeatureIndexArraySelector(z),viewport:B}:void 0},{onLayerHover:this._onLayerHover,onSetLayerDomain:this._onLayerSetDomain},d),W={};x&&(W.getTooltip=function(e){return T.EditorLayerUtils.getTooltip(e,{editorMenuActive:I,editor:w,theme:m})},W.getCursor=function(e){var t=e.isDragging,n=T.EditorLayerUtils.getCursor({editorMenuActive:I,editor:w,hoverInfo:_});return n||(t?"grabbing":null!=_&&_.layer?"pointer":"grab")});var q=this._isOKToRenderEffects(f)?(0,C.computeDeckEffects)({visState:a,mapState:s}):[],X=null!=d&&d.views?null==d?void 0:d.views():new R.MapView({legacyMeterSizes:!0}),Z=N(N({},d),{},{pickingRadius:P.DEFAULT_PICKING_RADIUS,views:X,layers:Y,effects:q});return"function"!=typeof(null==A?void 0:A.onDeckRender)||(Z=A.onDeckRender(Z))?g.default.createElement("div",M?{onMouseMove:x?function(e){null==b||b(e),n._onMouseMoveDebounced(e,B)}:void 0}:{style:{pointerEvents:"none"}},g.default.createElement(v.default,(0,p.default)({id:"default-deckgl-overlay",onLoad:function(){"function"==typeof(null==A?void 0:A.onDeckLoad)&&A.onDeckLoad()}},Z,{controller:!!M&&{doubleClickZoom:!D,dragRotate:this.props.mapState.dragRotate},initialViewState:k,onBeforeRender:this._onBeforeRender,onViewStateChange:M?this._onViewportChange:void 0},W,{onHover:M?function(e,t){T.EditorLayerUtils.onHover(e,{editorMenuActive:I,editor:w,hoverInfo:_})||n._onLayerHoverDebounced(e,f,t)}:null,onClick:function(e,t){(0,C.normalizeEvent)(t.srcEvent,B),T.EditorLayerUtils.onClick(e,t,{editorMenuActive:I,editor:w,onLayerClick:H,setSelectedFeature:V,mapIndex:f})||l.onLayerClick(e)},onError:this._onDeckError,ref:function(e){e&&e.deck&&!n._deck&&(n._deck=e.deck)},onWebGLInitialized:function(e){return n._onDeckInitialized(e)},onAfterRender:function(){"function"==typeof(null==A?void 0:A.onDeckAfterRender)&&A.onDeckAfterRender(Z)}}),E)):null}},{key:"_updateMapboxLayers",value:function(){var e=this.mapboxLayersSelector(this.props);(Object.keys(e).length||Object.keys(this.previousLayers).length)&&((0,T.updateMapboxLayers)(this._map,e,this.previousLayers),this.previousLayers=e)}},{key:"_renderMapboxOverlays",value:function(){this._map&&this._map.isStyleLoaded()&&this._updateMapboxLayers()}},{key:"_renderMap",value:function(){var e,r,i,o=this.props,a=o.visState,s=o.mapState,l=o.mapStyle,u=o.mapStateActions,c=o.MapComponent,d=void 0===c?y.Map:c,f=o.mapboxApiAccessToken,A=o.mapboxApiUrl,m=o.mapControls,v=o.isExport,b=o.locale,w=o.uiStateActions,x=o.visStateActions,M=o.index,E=o.primary,O=o.bottomMapContainerProps,S=o.topMapContainerProps,T=o.theme,L=o.datasetAttributions,I=void 0===L?[]:L,D=o.containerId,k=void 0===D?0:D,R=a.layers,j=a.datasets,F=a.editor,B=a.interactionConfig,H=this.layersToRenderSelector(this.props),V=this.layersForDeckSelector(this.props),G=null===(e=l.mapStyles)||void 0===e?void 0:e[l.styleType],Y=null===(r=this.context)||void 0===r?void 0:r.getInternalViewState(M),X=N(N({},Y),{},{preserveDrawingBuffer:!0,mapboxAccessToken:(null==G?void 0:G.accessToken)||f,baseApiUrl:A,mapLib:_.default,transformRequest:this.props.transformRequest||C.transformRequest}),Z=Boolean(R.find((function(e){return e.id===P.GEOCODER_LAYER_ID}))),Q=Boolean(s.isSplit),J=this._renderDeckOverlay(V,{primaryMap:!0,isInteractive:!0,children:g.default.createElement(d,(0,p.default)({key:"bottom"},X,{mapStyle:null!==(i=l.bottomMapStyle)&&void 0!==i?i:P.EMPTY_MAPBOX_STYLE},O,{ref:this._setMapboxMap}))});return J?g.default.createElement(g.default.Fragment,null,g.default.createElement(t,{mapState:s,datasets:j,availableLocales:U,dragRotate:s.dragRotate,isSplit:Q,primary:Boolean(E),isExport:v,layers:R,layersToRender:H,mapIndex:M||0,mapControls:m,readOnly:this.props.readOnly,scale:s.scale||1,top:B.geocoder&&B.geocoder.enabled?T.mapControlTop:0,editor:F,locale:b,onTogglePerspective:u.togglePerspective,onToggleSplitMap:u.toggleSplitMap,onMapToggleLayer:this._handleMapToggleLayer,onToggleMapControl:this._toggleMapControl,onToggleSplitMapViewport:u.toggleSplitMapViewport,onSetEditorMode:x.setEditorMode,onSetLocale:w.setLocale,onToggleEditorVisibility:x.toggleEditorVisibility,mapHeight:s.height}),W(this.props)&&g.default.createElement(q,{containerId:k}),J,this._renderMapboxOverlays(),g.default.createElement(n,{index:M||0,datasets:j,editor:F,filters:this.polygonFiltersSelector(this.props),layers:R,onDeleteFeature:x.deleteFeature,onSelect:x.setSelectedFeature,onTogglePolygonFilter:x.setPolygonFilterLayer,onSetEditorMode:x.setEditorMode,style:{pointerEvents:"all",position:"absolute",display:F.visible?"block":"none"}}),this.props.children,l.topMapStyle?g.default.createElement(d,(0,p.default)({key:"top",viewState:Y,mapStyle:l.topMapStyle,style:z.top,mapboxAccessToken:X.mapboxAccessToken,baseApiUrl:X.baseApiUrl,mapLib:_.default},S)):null,Z?this._renderDeckOverlay((0,h.default)({},P.GEOCODER_LAYER_ID,Z),{primaryMap:!1,isInteractive:!1}):null,this._renderMapPopover(),this.props.primary?g.default.createElement(K,{showMapboxLogo:this.state.showMapboxAttribution,showOsmBasemapAttribution:!0,datasetAttributions:I}):null):null}},{key:"render",value:function(){var e=this.props.visState,t=this._renderMap();return t?g.default.createElement(H,{ref:this._ref,style:this.styleSelector(this.props),onContextMenu:function(e){return e.preventDefault()},mixBlendMode:e.overlayBlending},t):null}}]),o}(g.Component);return(0,h.default)(r,"contextType",I.MapViewStateContext),(0,h.default)(r,"defaultProps",{MapComponent:y.Map,deckGlProps:{},index:0,primary:!0}),(0,m.withTheme)(r)}t.Attribution=K,Q.deps=[M.default,E.default,S.default]},function(e,t,n){"use strict";var r=n(3),i=n(6);Object.defineProperty(t,"__esModule",{value:!0});var o={useMap:!0,Map:!0,Marker:!0,Popup:!0,AttributionControl:!0,FullscreenControl:!0,NavigationControl:!0,GeolocateControl:!0,ScaleControl:!0,Layer:!0,Source:!0,MapProvider:!0,useControl:!0};t.useMap=function(){return(0,m.useMap)()},Object.defineProperty(t,"MapProvider",{enumerable:!0,get:function(){return m.MapProvider}}),Object.defineProperty(t,"useControl",{enumerable:!0,get:function(){return y.default}}),t.default=t.Source=t.Layer=t.ScaleControl=t.GeolocateControl=t.NavigationControl=t.FullscreenControl=t.AttributionControl=t.Popup=t.Marker=t.Map=void 0;var a=i(n(0)),s=r(n(290)),l=r(n(1666)),u=r(n(1667)),c=r(n(1668)),d=r(n(1669)),f=r(n(1670)),h=r(n(1671)),p=r(n(1672)),A=r(n(1673)),g=r(n(1674)),m=n(1036),y=r(n(343)),v=n(1675);Object.keys(v).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(o,e)||e in t&&t[e]===v[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return v[e]}}))}));var b=n(1676);Object.keys(b).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(o,e)||e in t&&t[e]===b[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return b[e]}}))}));var _=Promise.resolve().then(n.t.bind(null,634,7)),w=a.forwardRef((function(e,t){return(0,s.default)(e,t,_)}));t.Map=w;var x=l.default;t.Marker=x;var M=u.default;t.Popup=M;var E=c.default;t.AttributionControl=E;var O=d.default;t.FullscreenControl=O;var S=h.default;t.NavigationControl=S;var T=f.default;t.GeolocateControl=T;var C=p.default;t.ScaleControl=C;var L=A.default;t.Layer=L;var P=g.default;t.Source=P;var I=w;t.default=I},function(e,t,n){e.exports=function(){"use strict";var e,t,n;function r(r,i){if(e)if(t){var o="var sharedChunk = {}; ("+e+")(sharedChunk); ("+t+")(sharedChunk);",a={};e(a),n=i(a),"undefined"!=typeof window&&(n.workerUrl=window.URL.createObjectURL(new Blob([o],{type:"text/javascript"})))}else t=i;else e=i}return r(0,(function(e){function t(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(e){o(e)}}function s(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))}function n(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}"function"==typeof SuppressedError&&SuppressedError;var r=i;function i(e,t){this.x=e,this.y=t}i.prototype={clone:function(){return new i(this.x,this.y)},add:function(e){return this.clone()._add(e)},sub:function(e){return this.clone()._sub(e)},multByPoint:function(e){return this.clone()._multByPoint(e)},divByPoint:function(e){return this.clone()._divByPoint(e)},mult:function(e){return this.clone()._mult(e)},div:function(e){return this.clone()._div(e)},rotate:function(e){return this.clone()._rotate(e)},rotateAround:function(e,t){return this.clone()._rotateAround(e,t)},matMult:function(e){return this.clone()._matMult(e)},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(e){return this.x===e.x&&this.y===e.y},dist:function(e){return Math.sqrt(this.distSqr(e))},distSqr:function(e){var t=e.x-this.x,n=e.y-this.y;return t*t+n*n},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(e){return Math.atan2(this.y-e.y,this.x-e.x)},angleWith:function(e){return this.angleWithSep(e.x,e.y)},angleWithSep:function(e,t){return Math.atan2(this.x*t-this.y*e,this.x*e+this.y*t)},_matMult:function(e){var t=e[2]*this.x+e[3]*this.y;return this.x=e[0]*this.x+e[1]*this.y,this.y=t,this},_add:function(e){return this.x+=e.x,this.y+=e.y,this},_sub:function(e){return this.x-=e.x,this.y-=e.y,this},_mult:function(e){return this.x*=e,this.y*=e,this},_div:function(e){return this.x/=e,this.y/=e,this},_multByPoint:function(e){return this.x*=e.x,this.y*=e.y,this},_divByPoint:function(e){return this.x/=e.x,this.y/=e.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var e=this.y;return this.y=this.x,this.x=-e,this},_rotate:function(e){var t=Math.cos(e),n=Math.sin(e),r=n*this.x+t*this.y;return this.x=t*this.x-n*this.y,this.y=r,this},_rotateAround:function(e,t){var n=Math.cos(e),r=Math.sin(e),i=t.y+r*(this.x-t.x)+n*(this.y-t.y);return this.x=t.x+n*(this.x-t.x)-r*(this.y-t.y),this.y=i,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},i.convert=function(e){return e instanceof i?e:Array.isArray(e)?new i(e[0],e[1]):e};var o=n(r),a=s;function s(e,t,n,r){this.cx=3*e,this.bx=3*(n-e)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*t,this.by=3*(r-t)-this.cy,this.ay=1-this.cy-this.by,this.p1x=e,this.p1y=t,this.p2x=n,this.p2y=r}s.prototype={sampleCurveX:function(e){return((this.ax*e+this.bx)*e+this.cx)*e},sampleCurveY:function(e){return((this.ay*e+this.by)*e+this.cy)*e},sampleCurveDerivativeX:function(e){return(3*this.ax*e+2*this.bx)*e+this.cx},solveCurveX:function(e,t){if(void 0===t&&(t=1e-6),e<0)return 0;if(e>1)return 1;for(var n=e,r=0;r<8;r++){var i=this.sampleCurveX(n)-e;if(Math.abs(i)i?a=n:s=n,n=.5*(s-a)+a;return n},solve:function(e,t){return this.sampleCurveY(this.solveCurveX(e,t))}};var l=n(a);let u,c;function d(){return null==u&&(u="undefined"!=typeof OffscreenCanvas&&new OffscreenCanvas(1,1).getContext("2d")&&"function"==typeof createImageBitmap),u}function f(){if(null==c&&(c=!1,d())){const e=5,t=new OffscreenCanvas(e,e).getContext("2d",{willReadFrequently:!0});if(t){for(let n=0;n(t.y-e.y)*(n.x-e.x)}function E(e){let t=0;for(let n,r,i=0,o=e.length,a=o-1;icancelAnimationFrame(t)}},getImageData(e,t=0){return this.getImageCanvasContext(e).getImageData(-t,-t,e.width+2*t,e.height+2*t)},getImageCanvasContext(e){const t=window.document.createElement("canvas"),n=t.getContext("2d",{willReadFrequently:!0});if(!n)throw new Error("failed to create canvas 2d context");return t.width=e.width,t.height=e.height,n.drawImage(e,0,0,e.width,e.height),n},resolveURL:e=>(D||(D=document.createElement("a")),D.href=e,D.href),hardwareConcurrency:"undefined"!=typeof navigator&&navigator.hardwareConcurrency||4,get prefersReducedMotion(){return!!matchMedia&&(null==k&&(k=matchMedia("(prefers-reduced-motion: reduce)")),k.matches)}},j={MAX_PARALLEL_IMAGE_REQUESTS:16,MAX_PARALLEL_IMAGE_REQUESTS_PER_FRAME:8,MAX_TILE_CACHE_ZOOM_LEVELS:5,REGISTERED_PROTOCOLS:{},WORKER_URL:""};class F extends Error{constructor(e,t,n,r){super(`AJAXError: ${t} (${e}): ${n}`),this.status=e,this.statusText=t,this.url=n,this.body=r}}const N=O()?()=>self.worker&&self.worker.referrer:()=>("blob:"===window.location.protocol?window.parent:window).location.href,B=e=>j.REGISTERED_PROTOCOLS[e.substring(0,e.indexOf("://"))];function z(e,t){const n=new AbortController,r=new Request(e.url,{method:e.method||"GET",body:e.body,credentials:e.credentials,headers:e.headers,cache:e.cache,referrer:N(),signal:n.signal});let i=!1,o=!1;return"json"===e.type&&r.headers.set("Accept","application/json"),o||fetch(r).then(n=>n.ok?(n=>{("arrayBuffer"===e.type||"image"===e.type?n.arrayBuffer():"json"===e.type?n.json():n.text()).then(e=>{o||(i=!0,t(null,e,n.headers.get("Cache-Control"),n.headers.get("Expires")))}).catch(e=>{o||t(new Error(e.message))})})(n):n.blob().then(r=>t(new F(n.status,n.statusText,e.url,r)))).catch(e=>{20!==e.code&&t(new Error(e.message))}),{cancel:()=>{o=!0,i||n.abort()}}}const U=function(e,t){if(/:\/\//.test(e.url)&&!/^https?:|^file:/.test(e.url)){if(O()&&self.worker&&self.worker.actor)return self.worker.actor.send("getResource",e,t);if(!O())return(B(e.url)||z)(e,t)}if(!(/^file:/.test(n=e.url)||/^file:/.test(N())&&!/^\w+:/.test(n))){if(fetch&&Request&&AbortController&&Object.prototype.hasOwnProperty.call(Request.prototype,"signal"))return z(e,t);if(O()&&self.worker&&self.worker.actor)return self.worker.actor.send("getResource",e,t,void 0,!0)}var n;return function(e,t){const n=new XMLHttpRequest;n.open(e.method||"GET",e.url,!0),"arrayBuffer"!==e.type&&"image"!==e.type||(n.responseType="arraybuffer");for(const t in e.headers)n.setRequestHeader(t,e.headers[t]);return"json"===e.type&&(n.responseType="text",n.setRequestHeader("Accept","application/json")),n.withCredentials="include"===e.credentials,n.onerror=()=>{t(new Error(n.statusText))},n.onload=()=>{if((n.status>=200&&n.status<300||0===n.status)&&null!==n.response){let r=n.response;if("json"===e.type)try{r=JSON.parse(n.response)}catch(e){return t(e)}t(null,r,n.getResponseHeader("Cache-Control"),n.getResponseHeader("Expires"))}else{const r=new Blob([n.response],{type:n.getResponseHeader("Content-Type")});t(new F(n.status,n.statusText,e.url,r))}},n.send(e.body),{cancel:()=>n.abort()}}(e,t)},H=function(e,t){return U(m(e,{type:"arrayBuffer"}),t)};function V(e){if(!e||e.indexOf("://")<=0||0===e.indexOf("data:image/")||0===e.indexOf("blob:"))return!0;const t=new URL(e),n=window.location;return t.protocol===n.protocol&&t.host===n.host}function G(e,t,n){n[e]&&-1!==n[e].indexOf(t)||(n[e]=n[e]||[],n[e].push(t))}function Y(e,t,n){if(n&&n[e]){const r=n[e].indexOf(t);-1!==r&&n[e].splice(r,1)}}class W{constructor(e,t={}){m(this,t),this.type=e}}class q extends W{constructor(e,t={}){super("error",m({error:e},t))}}class X{on(e,t){return this._listeners=this._listeners||{},G(e,t,this._listeners),this}off(e,t){return Y(e,t,this._listeners),Y(e,t,this._oneTimeListeners),this}once(e,t){return t?(this._oneTimeListeners=this._oneTimeListeners||{},G(e,t,this._oneTimeListeners),this):new Promise(t=>this.once(e,t))}fire(e,t){"string"==typeof e&&(e=new W(e,t||{}));const n=e.type;if(this.listens(n)){e.target=this;const t=this._listeners&&this._listeners[n]?this._listeners[n].slice():[];for(const n of t)n.call(this,e);const r=this._oneTimeListeners&&this._oneTimeListeners[n]?this._oneTimeListeners[n].slice():[];for(const t of r)Y(n,t,this._oneTimeListeners),t.call(this,e);const i=this._eventedParent;i&&(m(e,"function"==typeof this._eventedParentData?this._eventedParentData():this._eventedParentData),i.fire(e))}else e instanceof q&&console.error(e.error);return this}listens(e){return this._listeners&&this._listeners[e]&&this._listeners[e].length>0||this._oneTimeListeners&&this._oneTimeListeners[e]&&this._oneTimeListeners[e].length>0||this._eventedParent&&this._eventedParent.listens(e)}setEventedParent(e,t){return this._eventedParent=e,this._eventedParentData=t,this}}var Z={$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"},terrain:{type:"terrain"},sources:{required:!0,type:"sources"},sprite:{type:"sprite"},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:{},custom:{}},default:"mapbox"},redFactor:{type:"number",default:1},blueFactor:{type:"number",default:1},greenFactor:{type:"number",default:1},baseShift:{type:"number",default:0},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_geojson:{type:{required:!0,type:"enum",values:{geojson:{}}},data:{required:!0,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",{"!":"icon-overlap"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-overlap":{type:"enum",values:{never:{},always:{},cooperative:{}},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:"padding",default:[2],units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"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:{},"viewport-glyph":{},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-variable-anchor-offset":{type:"variableAnchorOffsetCollection",requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"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",{"!":"text-overlap"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-overlap":{type:"enum",values:{never:{},always:{},cooperative:{}},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}},terrain:{source:{type:"string",required:!0},exaggeration:{type:"number",minimum:0,default:1}},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"}}};const K=["type","source","source-layer","minzoom","maxzoom","filter","layout"];function Q(e,t){const n={};for(const t in e)"ref"!==t&&(n[t]=e[t]);return K.forEach(e=>{e in t&&(n[e]=t[e])}),n}function J(e,t){if(Array.isArray(e)){if(!Array.isArray(t)||e.length!==t.length)return!1;for(let n=0;n`:"value"===e.itemType.kind?"array":`array<${t}>`}return e.kind}const Ee=[de,fe,he,pe,Ae,ve,ge,xe(me),be,_e,we];function Oe(e,t){if("error"===t.kind)return null;if("array"===e.kind){if("array"===t.kind&&(0===t.N&&"value"===t.itemType.kind||!Oe(e.itemType,t.itemType))&&("number"!=typeof e.N||e.N===t.N))return null}else{if(e.kind===t.kind)return null;if("value"===e.kind)for(const e of Ee)if(!Oe(e,t))return null}return`Expected ${Me(e)} but found ${Me(t)} instead.`}function Se(e,t){return t.some(t=>t.kind===e.kind)}function Te(e,t){return t.some(t=>"null"===t?null===e:"array"===t?Array.isArray(e):"object"===t?e&&!Array.isArray(e)&&"object"==typeof e:t===typeof e)}function Ce(e,t){return"array"===e.kind&&"array"===t.kind?e.itemType.kind===t.itemType.kind&&"number"==typeof e.N:e.kind===t.kind}const Le=6/29,Pe=3*Le*Le,Ie=Math.PI/180,De=180/Math.PI;function ke(e){return(e%=360)<0&&(e+=360),e}function Re([e,t,n,r]){let i,o;const a=Fe((.2225045*(e=je(e))+.7168786*(t=je(t))+.0606169*(n=je(n)))/1);e===t&&t===n?i=o=a:(i=Fe((.4360747*e+.3850649*t+.1430804*n)/.96422),o=Fe((.0139322*e+.0971045*t+.7141733*n)/.82521));const s=116*a-16;return[s<0?0:s,500*(i-a),200*(a-o),r]}function je(e){return e<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function Fe(e){return e>.008856451679035631?Math.pow(e,1/3):e/Pe+4/29}function Ne([e,t,n,r]){let i=(e+16)/116,o=isNaN(t)?i:i+t/500,a=isNaN(n)?i:i-n/200;return i=1*ze(i),o=.96422*ze(o),a=.82521*ze(a),[Be(3.1338561*o-1.6168667*i-.4906146*a),Be(-.9787684*o+1.9161415*i+.033454*a),Be(.0719453*o-.2289914*i+1.4052427*a),r]}function Be(e){return(e=e<=.00304?12.92*e:1.055*Math.pow(e,1/2.4)-.055)<0?0:e>1?1:e}function ze(e){return e>Le?e*e*e:Pe*(e-4/29)}function Ue(e){return parseInt(e.padEnd(2,e),16)/255}function He(e,t){return Ve(t?e/100:e,0,1)}function Ve(e,t,n){return Math.min(Math.max(t,e),n)}function Ge(e){return!e.some(Number.isNaN)}const Ye={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]};class We{constructor(e,t,n,r=1,i=!0){this.r=e,this.g=t,this.b=n,this.a=r,i||(this.r*=r,this.g*=r,this.b*=r,r||this.overwriteGetter("rgb",[e,t,n,r]))}static parse(e){if(e instanceof We)return e;if("string"!=typeof e)return;const t=function(e){if("transparent"===(e=e.toLowerCase().trim()))return[0,0,0,0];const t=Ye[e];if(t){const[e,n,r]=t;return[e/255,n/255,r/255,1]}if(e.startsWith("#")&&/^#(?:[0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/.test(e)){const t=e.length<6?1:2;let n=1;return[Ue(e.slice(n,n+=t)),Ue(e.slice(n,n+=t)),Ue(e.slice(n,n+=t)),Ue(e.slice(n,n+t)||"ff")]}if(e.startsWith("rgb")){const t=e.match(/^rgba?\(\s*([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(t){const[e,n,r,i,o,a,s,l,u,c,d,f]=t,h=[i||" ",s||" ",c].join("");if(" "===h||" /"===h||",,"===h||",,,"===h){const e=[r,a,u].join(""),t="%%%"===e?100:""===e?255:0;if(t){const e=[Ve(+n/t,0,1),Ve(+o/t,0,1),Ve(+l/t,0,1),d?He(+d,f):1];if(Ge(e))return e}}return}}const n=e.match(/^hsla?\(\s*([\de.+-]+)(?:deg)?(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(n){const[e,t,r,i,o,a,s,l,u]=n,c=[r||" ",o||" ",s].join("");if(" "===c||" /"===c||",,"===c||",,,"===c){const e=[+t,Ve(+i,0,100),Ve(+a,0,100),l?He(+l,u):1];if(Ge(e))return function([e,t,n,r]){function i(r){const i=(r+e/30)%12,o=t*Math.min(n,1-n);return n-o*Math.max(-1,Math.min(i-3,9-i,1))}return e=ke(e),t/=100,n/=100,[i(0),i(8),i(4),r]}(e)}}}(e);return t?new We(...t,!1):void 0}get rgb(){const{r:e,g:t,b:n,a:r}=this,i=r||1/0;return this.overwriteGetter("rgb",[e/i,t/i,n/i,r])}get hcl(){return this.overwriteGetter("hcl",function(e){const[t,n,r,i]=Re(e),o=Math.sqrt(n*n+r*r);return[Math.round(1e4*o)?ke(Math.atan2(r,n)*De):NaN,o,t,i]}(this.rgb))}get lab(){return this.overwriteGetter("lab",Re(this.rgb))}overwriteGetter(e,t){return Object.defineProperty(this,e,{value:t}),t}toString(){const[e,t,n,r]=this.rgb;return`rgba(${[e,t,n].map(e=>Math.round(255*e)).join(",")},${r})`}}We.black=new We(0,0,0,1),We.white=new We(1,1,1,1),We.transparent=new We(0,0,0,0),We.red=new We(1,0,0,1);class qe{constructor(e,t,n){this.sensitivity=e?t?"variant":"case":t?"accent":"base",this.locale=n,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})}compare(e,t){return this.collator.compare(e,t)}resolvedLocale(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale}}class Xe{constructor(e,t,n,r,i){this.text=e,this.image=t,this.scale=n,this.fontStack=r,this.textColor=i}}class Ze{constructor(e){this.sections=e}static fromString(e){return new Ze([new Xe(e,null,null,null,null)])}isEmpty(){return 0===this.sections.length||!this.sections.some(e=>0!==e.text.length||e.image&&0!==e.image.name.length)}static factory(e){return e instanceof Ze?e:Ze.fromString(e)}toString(){return 0===this.sections.length?"":this.sections.map(e=>e.text).join("")}}class Ke{constructor(e){this.values=e.slice()}static parse(e){if(e instanceof Ke)return e;if("number"==typeof e)return new Ke([e,e,e,e]);if(Array.isArray(e)&&!(e.length<1||e.length>4)){for(const t of e)if("number"!=typeof t)return;switch(e.length){case 1:e=[e[0],e[0],e[0],e[0]];break;case 2:e=[e[0],e[1],e[0],e[1]];break;case 3:e=[e[0],e[1],e[2],e[1]]}return new Ke(e)}}toString(){return JSON.stringify(this.values)}}const Qe=new Set(["center","left","right","top","bottom","top-left","top-right","bottom-left","bottom-right"]);class Je{constructor(e){this.values=e.slice()}static parse(e){if(e instanceof Je)return e;if(Array.isArray(e)&&!(e.length<1)&&e.length%2==0){for(let t=0;t=0&&e<=255&&"number"==typeof t&&t>=0&&t<=255&&"number"==typeof n&&n>=0&&n<=255?void 0===r||"number"==typeof r&&r>=0&&r<=1?null:`Invalid rgba value [${[e,t,n,r].join(", ")}]: 'a' must be between 0 and 1.`:`Invalid rgba value [${("number"==typeof r?[e,t,n,r]:[e,t,n]).join(", ")}]: 'r', 'g', and 'b' must be between 0 and 255.`}function tt(e){if(null===e||"string"==typeof e||"boolean"==typeof e||"number"==typeof e||e instanceof We||e instanceof qe||e instanceof Ze||e instanceof Ke||e instanceof Je||e instanceof $e)return!0;if(Array.isArray(e)){for(const t of e)if(!tt(t))return!1;return!0}if("object"==typeof e){for(const t in e)if(!tt(e[t]))return!1;return!0}return!1}function nt(e){if(null===e)return de;if("string"==typeof e)return he;if("boolean"==typeof e)return pe;if("number"==typeof e)return fe;if(e instanceof We)return Ae;if(e instanceof qe)return ye;if(e instanceof Ze)return ve;if(e instanceof Ke)return be;if(e instanceof Je)return we;if(e instanceof $e)return _e;if(Array.isArray(e)){const t=e.length;let n;for(const t of e){const e=nt(t);if(n){if(n===e)continue;n=me;break}n=e}return xe(n||me,t)}return ge}function rt(e){const t=typeof e;return null===e?"":"string"===t||"number"===t||"boolean"===t?String(e):e instanceof We||e instanceof Ze||e instanceof Ke||e instanceof Je||e instanceof $e?e.toString():JSON.stringify(e)}class it{constructor(e,t){this.type=e,this.value=t}static parse(e,t){if(2!==e.length)return t.error(`'literal' expression requires exactly one argument, but found ${e.length-1} instead.`);if(!tt(e[1]))return t.error("invalid value");const n=e[1];let r=nt(n);const i=t.expectedType;return"array"!==r.kind||0!==r.N||!i||"array"!==i.kind||"number"==typeof i.N&&0!==i.N||(r=i),new it(r,n)}evaluate(){return this.value}eachChild(){}outputDefined(){return!0}}class ot{constructor(e){this.name="ExpressionEvaluationError",this.message=e}toJSON(){return this.message}}const at={string:he,number:fe,boolean:pe,object:ge};class st{constructor(e,t){this.type=e,this.args=t}static parse(e,t){if(e.length<2)return t.error("Expected at least one argument.");let n,r=1;const i=e[0];if("array"===i){let i,o;if(e.length>2){const n=e[1];if("string"!=typeof n||!(n in at)||"object"===n)return t.error('The item type argument of "array" must be one of string, number, boolean',1);i=at[n],r++}else i=me;if(e.length>3){if(null!==e[2]&&("number"!=typeof e[2]||e[2]<0||e[2]!==Math.floor(e[2])))return t.error('The length argument to "array" must be a positive integer literal',2);o=e[2],r++}n=xe(i,o)}else{if(!at[i])throw new Error("Types doesn't contain name = "+i);n=at[i]}const o=[];for(;re.outputDefined())}}const lt={"to-boolean":pe,"to-color":Ae,"to-number":fe,"to-string":he};class ut{constructor(e,t){this.type=e,this.args=t}static parse(e,t){if(e.length<2)return t.error("Expected at least one argument.");const n=e[0];if(!lt[n])throw new Error(`Can't parse ${n} as it is not part of the known types`);if(("to-boolean"===n||"to-string"===n)&&2!==e.length)return t.error("Expected one argument.");const r=lt[n],i=[];for(let n=1;n4?`Invalid rbga value ${JSON.stringify(t)}: expected an array containing either three or four numeric values.`:et(t[0],t[1],t[2],t[3]),!n))return new We(t[0]/255,t[1]/255,t[2]/255,t[3])}throw new ot(n||`Could not parse color from value '${"string"==typeof t?t:JSON.stringify(t)}'`)}case"padding":{let t;for(const n of this.args){t=n.evaluate(e);const r=Ke.parse(t);if(r)return r}throw new ot(`Could not parse padding from value '${"string"==typeof t?t:JSON.stringify(t)}'`)}case"variableAnchorOffsetCollection":{let t;for(const n of this.args){t=n.evaluate(e);const r=Je.parse(t);if(r)return r}throw new ot(`Could not parse variableAnchorOffsetCollection from value '${"string"==typeof t?t:JSON.stringify(t)}'`)}case"number":{let t=null;for(const n of this.args){if(t=n.evaluate(e),null===t)return 0;const r=Number(t);if(!isNaN(r))return r}throw new ot(`Could not convert ${JSON.stringify(t)} to number.`)}case"formatted":return Ze.fromString(rt(this.args[0].evaluate(e)));case"resolvedImage":return $e.fromString(rt(this.args[0].evaluate(e)));default:return rt(this.args[0].evaluate(e))}}eachChild(e){this.args.forEach(e)}outputDefined(){return this.args.every(e=>e.outputDefined())}}const ct=["Unknown","Point","LineString","Polygon"];class dt{constructor(){this.globals=null,this.feature=null,this.featureState=null,this.formattedSection=null,this._parseColorCache={},this.availableImages=null,this.canonical=null}id(){return this.feature&&"id"in this.feature?this.feature.id:null}geometryType(){return this.feature?"number"==typeof this.feature.type?ct[this.feature.type]:this.feature.type:null}geometry(){return this.feature&&"geometry"in this.feature?this.feature.geometry:null}canonicalID(){return this.canonical}properties(){return this.feature&&this.feature.properties||{}}parseColor(e){let t=this._parseColorCache[e];return t||(t=this._parseColorCache[e]=We.parse(e)),t}}class ft{constructor(e,t,n=[],r,i=new ce,o=[]){this.registry=e,this.path=n,this.key=n.map(e=>`[${e}]`).join(""),this.scope=i,this.errors=o,this.expectedType=r,this._isConstant=t}parse(e,t,n,r,i={}){return t?this.concat(t,n,r)._parse(e,i):this._parse(e,i)}_parse(e,t){function n(e,t,n){return"assert"===n?new st(t,[e]):"coerce"===n?new ut(t,[e]):e}if(null!==e&&"string"!=typeof e&&"boolean"!=typeof e&&"number"!=typeof e||(e=["literal",e]),Array.isArray(e)){if(0===e.length)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');const r=e[0];if("string"!=typeof r)return this.error(`Expression name must be a string, but found ${typeof r} instead. If you wanted a literal array, use ["literal", [...]].`,0),null;const i=this.registry[r];if(i){let r=i.parse(e,this);if(!r)return null;if(this.expectedType){const e=this.expectedType,i=r.type;if("string"!==e.kind&&"number"!==e.kind&&"boolean"!==e.kind&&"object"!==e.kind&&"array"!==e.kind||"value"!==i.kind)if("color"!==e.kind&&"formatted"!==e.kind&&"resolvedImage"!==e.kind||"value"!==i.kind&&"string"!==i.kind)if("padding"!==e.kind||"value"!==i.kind&&"number"!==i.kind&&"array"!==i.kind)if("variableAnchorOffsetCollection"!==e.kind||"value"!==i.kind&&"array"!==i.kind){if(this.checkSubtype(e,i))return null}else r=n(r,e,t.typeAnnotation||"coerce");else r=n(r,e,t.typeAnnotation||"coerce");else r=n(r,e,t.typeAnnotation||"coerce");else r=n(r,e,t.typeAnnotation||"assert")}if(!(r instanceof it)&&"resolvedImage"!==r.type.kind&&this._isConstant(r)){const t=new dt;try{r=new it(r.type,r.evaluate(t))}catch(e){return this.error(e.message),null}}return r}return this.error(`Unknown expression "${r}". If you wanted a literal array, use ["literal", [...]].`,0)}return this.error(void 0===e?"'undefined' value invalid. Use null instead.":"object"==typeof e?'Bare objects invalid. Use ["literal", {...}] instead.':`Expected an array, but found ${typeof e} instead.`)}concat(e,t,n){const r="number"==typeof e?this.path.concat(e):this.path,i=n?this.scope.concat(n):this.scope;return new ft(this.registry,this._isConstant,r,t||null,i,this.errors)}error(e,...t){const n=`${this.key}${t.map(e=>`[${e}]`).join("")}`;this.errors.push(new ue(n,e))}checkSubtype(e,t){const n=Oe(e,t);return n&&this.error(n),n}}class ht{constructor(e,t,n){this.type=ye,this.locale=n,this.caseSensitive=e,this.diacriticSensitive=t}static parse(e,t){if(2!==e.length)return t.error("Expected one argument.");const n=e[1];if("object"!=typeof n||Array.isArray(n))return t.error("Collator options argument must be an object.");const r=t.parse(void 0!==n["case-sensitive"]&&n["case-sensitive"],1,pe);if(!r)return null;const i=t.parse(void 0!==n["diacritic-sensitive"]&&n["diacritic-sensitive"],1,pe);if(!i)return null;let o=null;return n.locale&&(o=t.parse(n.locale,1,he),!o)?null:new ht(r,i,o)}evaluate(e){return new qe(this.caseSensitive.evaluate(e),this.diacriticSensitive.evaluate(e),this.locale?this.locale.evaluate(e):null)}eachChild(e){e(this.caseSensitive),e(this.diacriticSensitive),this.locale&&e(this.locale)}outputDefined(){return!1}}const pt=8192;function At(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.max(e[2],t[0]),e[3]=Math.max(e[3],t[1])}function gt(e,t){return!(e[0]<=t[0]||e[2]>=t[2]||e[1]<=t[1]||e[3]>=t[3])}function mt(e,t){const n=(180+e[0])/360,r=(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+e[1]*Math.PI/360)))/360,i=Math.pow(2,t.z);return[Math.round(n*i*pt),Math.round(r*i*pt)]}function yt(e,t,n){const r=e[0]-t[0],i=e[1]-t[1],o=e[0]-n[0],a=e[1]-n[1];return r*a-o*i==0&&r*o<=0&&i*a<=0}function vt(e,t){let n=!1;for(let a=0,s=t.length;a(r=e)[1]!=(o=s[t+1])[1]>r[1]&&r[0]<(o[0]-i[0])*(r[1]-i[1])/(o[1]-i[1])+i[0]&&(n=!n)}}var r,i,o;return n}function bt(e,t){for(let n=0;n0&&s<0||a<0&&s>0}function wt(e,t,n){for(const u of n)for(let n=0;nn[2]){const t=.5*r;let i=e[0]-n[0]>t?-r:n[0]-e[0]>t?r:0;0===i&&(i=e[0]-n[2]>t?-r:n[2]-e[0]>t?r:0),e[0]+=i}At(t,e)}function Tt(e,t,n,r){const i=Math.pow(2,r.z)*pt,o=[r.x*pt,r.y*pt],a=[];for(const r of e)for(const e of r){const r=[e.x+o[0],e.y+o[1]];St(r,t,n,i),a.push(r)}return a}function Ct(e,t,n,r){const i=Math.pow(2,r.z)*pt,o=[r.x*pt,r.y*pt],a=[];for(const n of e){const e=[];for(const r of n){const n=[r.x+o[0],r.y+o[1]];At(t,n),e.push(n)}a.push(e)}if(t[2]-t[0]<=i/2){(s=t)[0]=s[1]=1/0,s[2]=s[3]=-1/0;for(const e of a)for(const r of e)St(r,t,n,i)}var s;return a}class Lt{constructor(e,t){this.type=pe,this.geojson=e,this.geometries=t}static parse(e,t){if(2!==e.length)return t.error(`'within' expression requires exactly one argument, but found ${e.length-1} instead.`);if(tt(e[1])){const t=e[1];if("FeatureCollection"===t.type)for(let e=0;e!Array.isArray(t)||t.length===e.length-1);let s=null;for(const[r,o]of a){s=new ft(t.registry,Dt,t.path,null,t.scope);const a=[];let l=!1;for(let t=1;t{return t=e,Array.isArray(t)?`(${t.map(Me).join(", ")})`:`(${Me(t.type)}...)`;var t}).join(" | "),r=[];for(let n=1;n{n=t?n&&Dt(e):n&&e instanceof it}),!!n&&kt(e)&&jt(e,["zoom","heatmap-density","line-progress","accumulated","is-supported-script"])}function kt(e){if(e instanceof It){if("get"===e.name&&1===e.args.length)return!1;if("feature-state"===e.name)return!1;if("has"===e.name&&1===e.args.length)return!1;if("properties"===e.name||"geometry-type"===e.name||"id"===e.name)return!1;if(/^filter-/.test(e.name))return!1}if(e instanceof Lt)return!1;let t=!0;return e.eachChild(e=>{t&&!kt(e)&&(t=!1)}),t}function Rt(e){if(e instanceof It&&"feature-state"===e.name)return!1;let t=!0;return e.eachChild(e=>{t&&!Rt(e)&&(t=!1)}),t}function jt(e,t){if(e instanceof It&&t.indexOf(e.name)>=0)return!1;let n=!0;return e.eachChild(e=>{n&&!jt(e,t)&&(n=!1)}),n}function Ft(e,t){const n=e.length-1;let r,i,o=0,a=n,s=0;for(;o<=a;)if(s=Math.floor((o+a)/2),r=e[s],i=e[s+1],r<=t){if(s===n||tt))throw new ot("Input is not a number.");a=s-1}return 0}class Nt{constructor(e,t,n){this.type=e,this.input=t,this.labels=[],this.outputs=[];for(const[e,t]of n)this.labels.push(e),this.outputs.push(t)}static parse(e,t){if(e.length-1<4)return t.error(`Expected at least 4 arguments, but found only ${e.length-1}.`);if((e.length-1)%2!=0)return t.error("Expected an even number of arguments.");const n=t.parse(e[1],1,fe);if(!n)return null;const r=[];let i=null;t.expectedType&&"value"!==t.expectedType.kind&&(i=t.expectedType);for(let n=1;n=o)return t.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',s);const u=t.parse(a,l,i);if(!u)return null;i=i||u.type,r.push([o,u])}return new Nt(i,n,r)}evaluate(e){const t=this.labels,n=this.outputs;if(1===t.length)return n[0].evaluate(e);const r=this.input.evaluate(e);if(r<=t[0])return n[0].evaluate(e);const i=t.length;return r>=t[i-1]?n[i-1].evaluate(e):n[Ft(t,r)].evaluate(e)}eachChild(e){e(this.input);for(const t of this.outputs)e(t)}outputDefined(){return this.outputs.every(e=>e.outputDefined())}}function Bt(e,t,n){return e+n*(t-e)}function zt(e,t,n){return e.map((e,r)=>Bt(e,t[r],n))}const Ut={number:Bt,color:function(e,t,n,r="rgb"){switch(r){case"rgb":{const[r,i,o,a]=zt(e.rgb,t.rgb,n);return new We(r,i,o,a,!1)}case"hcl":{const[r,i,o,a]=e.hcl,[s,l,u,c]=t.hcl;let d,f;if(isNaN(r)||isNaN(s))isNaN(r)?isNaN(s)?d=NaN:(d=s,1!==o&&0!==o||(f=l)):(d=r,1!==u&&0!==u||(f=i));else{let e=s-r;s>r&&e>180?e-=360:s180&&(e+=360),d=r+n*e}const[h,p,A,g]=function([e,t,n,r]){return e=isNaN(e)?0:e*Ie,Ne([n,Math.cos(e)*t,Math.sin(e)*t,r])}([d,null!=f?f:Bt(i,l,n),Bt(o,u,n),Bt(a,c,n)]);return new We(h,p,A,g,!1)}case"lab":{const[r,i,o,a]=Ne(zt(e.lab,t.lab,n));return new We(r,i,o,a,!1)}}},array:zt,padding:function(e,t,n){return new Ke(zt(e.values,t.values,n))},variableAnchorOffsetCollection:function(e,t,n){const r=e.values,i=t.values;if(r.length!==i.length)throw new ot(`Cannot interpolate values of different length. from: ${e.toString()}, to: ${t.toString()}`);const o=[];for(let e=0;e"number"!=typeof e||e<0||e>1))return t.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);r={name:"cubic-bezier",controlPoints:e}}}if(e.length-1<4)return t.error(`Expected at least 4 arguments, but found only ${e.length-1}.`);if((e.length-1)%2!=0)return t.error("Expected an even number of arguments.");if(i=t.parse(i,2,fe),!i)return null;const a=[];let s=null;"interpolate-hcl"===n||"interpolate-lab"===n?s=Ae:t.expectedType&&"value"!==t.expectedType.kind&&(s=t.expectedType);for(let e=0;e=n)return t.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',i);const u=t.parse(r,l,s);if(!u)return null;s=s||u.type,a.push([n,u])}return Ce(s,fe)||Ce(s,Ae)||Ce(s,be)||Ce(s,we)||Ce(s,xe(fe))?new Ht(s,n,r,i,a):t.error(`Type ${Me(s)} is not interpolatable.`)}evaluate(e){const t=this.labels,n=this.outputs;if(1===t.length)return n[0].evaluate(e);const r=this.input.evaluate(e);if(r<=t[0])return n[0].evaluate(e);const i=t.length;if(r>=t[i-1])return n[i-1].evaluate(e);const o=Ft(t,r),a=Ht.interpolationFactor(this.interpolation,r,t[o],t[o+1]),s=n[o].evaluate(e),l=n[o+1].evaluate(e);switch(this.operator){case"interpolate":return Ut[this.type.kind](s,l,a);case"interpolate-hcl":return Ut.color(s,l,a,"hcl");case"interpolate-lab":return Ut.color(s,l,a,"lab")}}eachChild(e){e(this.input);for(const t of this.outputs)e(t)}outputDefined(){return this.outputs.every(e=>e.outputDefined())}}function Vt(e,t,n,r){const i=r-n,o=e-n;return 0===i?0:1===t?o/i:(Math.pow(t,o)-1)/(Math.pow(t,i)-1)}class Gt{constructor(e,t){this.type=e,this.args=t}static parse(e,t){if(e.length<2)return t.error("Expectected at least one argument.");let n=null;const r=t.expectedType;r&&"value"!==r.kind&&(n=r);const i=[];for(const r of e.slice(1)){const e=t.parse(r,1+i.length,n,void 0,{typeAnnotation:"omit"});if(!e)return null;n=n||e.type,i.push(e)}if(!n)throw new Error("No output type");const o=r&&i.some(e=>Oe(r,e.type));return new Gt(o?me:n,i)}evaluate(e){let t,n=null,r=0;for(const i of this.args)if(r++,n=i.evaluate(e),n&&n instanceof $e&&!n.available&&(t||(t=n.name),n=null,r===this.args.length&&(n=t)),null!==n)break;return n}eachChild(e){this.args.forEach(e)}outputDefined(){return this.args.every(e=>e.outputDefined())}}class Yt{constructor(e,t){this.type=t.type,this.bindings=[].concat(e),this.result=t}evaluate(e){return this.result.evaluate(e)}eachChild(e){for(const t of this.bindings)e(t[1]);e(this.result)}static parse(e,t){if(e.length<4)return t.error(`Expected at least 3 arguments, but found ${e.length-1} instead.`);const n=[];for(let r=1;r=n.length)throw new ot(`Array index out of bounds: ${t} > ${n.length-1}.`);if(t!==Math.floor(t))throw new ot(`Array index must be an integer, but found ${t} instead.`);return n[t]}eachChild(e){e(this.index),e(this.input)}outputDefined(){return!1}}class qt{constructor(e,t){this.type=pe,this.needle=e,this.haystack=t}static parse(e,t){if(3!==e.length)return t.error(`Expected 2 arguments, but found ${e.length-1} instead.`);const n=t.parse(e[1],1,me),r=t.parse(e[2],2,me);return n&&r?Se(n.type,[pe,he,fe,de,me])?new qt(n,r):t.error(`Expected first argument to be of type boolean, string, number or null, but found ${Me(n.type)} instead`):null}evaluate(e){const t=this.needle.evaluate(e),n=this.haystack.evaluate(e);if(!n)return!1;if(!Te(t,["boolean","string","number","null"]))throw new ot(`Expected first argument to be of type boolean, string, number or null, but found ${Me(nt(t))} instead.`);if(!Te(n,["string","array"]))throw new ot(`Expected second argument to be of type array or string, but found ${Me(nt(n))} instead.`);return n.indexOf(t)>=0}eachChild(e){e(this.needle),e(this.haystack)}outputDefined(){return!0}}class Xt{constructor(e,t,n){this.type=fe,this.needle=e,this.haystack=t,this.fromIndex=n}static parse(e,t){if(e.length<=2||e.length>=5)return t.error(`Expected 3 or 4 arguments, but found ${e.length-1} instead.`);const n=t.parse(e[1],1,me),r=t.parse(e[2],2,me);if(!n||!r)return null;if(!Se(n.type,[pe,he,fe,de,me]))return t.error(`Expected first argument to be of type boolean, string, number or null, but found ${Me(n.type)} instead`);if(4===e.length){const i=t.parse(e[3],3,fe);return i?new Xt(n,r,i):null}return new Xt(n,r)}evaluate(e){const t=this.needle.evaluate(e),n=this.haystack.evaluate(e);if(!Te(t,["boolean","string","number","null"]))throw new ot(`Expected first argument to be of type boolean, string, number or null, but found ${Me(nt(t))} instead.`);if(!Te(n,["string","array"]))throw new ot(`Expected second argument to be of type array or string, but found ${Me(nt(n))} instead.`);if(this.fromIndex){const r=this.fromIndex.evaluate(e);return n.indexOf(t,r)}return n.indexOf(t)}eachChild(e){e(this.needle),e(this.haystack),this.fromIndex&&e(this.fromIndex)}outputDefined(){return!1}}class Zt{constructor(e,t,n,r,i,o){this.inputType=e,this.type=t,this.input=n,this.cases=r,this.outputs=i,this.otherwise=o}static parse(e,t){if(e.length<5)return t.error(`Expected at least 4 arguments, but found only ${e.length-1}.`);if(e.length%2!=1)return t.error("Expected an even number of arguments.");let n,r;t.expectedType&&"value"!==t.expectedType.kind&&(r=t.expectedType);const i={},o=[];for(let a=2;aNumber.MAX_SAFE_INTEGER)return u.error(`Branch labels must be integers no larger than ${Number.MAX_SAFE_INTEGER}.`);if("number"==typeof e&&Math.floor(e)!==e)return u.error("Numeric branch labels must be integer values.");if(n){if(u.checkSubtype(n,nt(e)))return null}else n=nt(e);if(void 0!==i[String(e)])return u.error("Branch labels must be unique.");i[String(e)]=o.length}const c=t.parse(l,a,r);if(!c)return null;r=r||c.type,o.push(c)}const a=t.parse(e[1],1,me);if(!a)return null;const s=t.parse(e[e.length-1],e.length-1,r);return s?"value"!==a.type.kind&&t.concat(1).checkSubtype(n,a.type)?null:new Zt(n,r,a,i,o,s):null}evaluate(e){const t=this.input.evaluate(e);return(nt(t)===this.inputType&&this.outputs[this.cases[t]]||this.otherwise).evaluate(e)}eachChild(e){e(this.input),this.outputs.forEach(e),e(this.otherwise)}outputDefined(){return this.outputs.every(e=>e.outputDefined())&&this.otherwise.outputDefined()}}class Kt{constructor(e,t,n){this.type=e,this.branches=t,this.otherwise=n}static parse(e,t){if(e.length<4)return t.error(`Expected at least 3 arguments, but found only ${e.length-1}.`);if(e.length%2!=0)return t.error("Expected an odd number of arguments.");let n;t.expectedType&&"value"!==t.expectedType.kind&&(n=t.expectedType);const r=[];for(let i=1;it.outputDefined())&&this.otherwise.outputDefined()}}class Qt{constructor(e,t,n,r){this.type=e,this.input=t,this.beginIndex=n,this.endIndex=r}static parse(e,t){if(e.length<=2||e.length>=5)return t.error(`Expected 3 or 4 arguments, but found ${e.length-1} instead.`);const n=t.parse(e[1],1,me),r=t.parse(e[2],2,fe);if(!n||!r)return null;if(!Se(n.type,[xe(me),he,me]))return t.error(`Expected first argument to be of type array or string, but found ${Me(n.type)} instead`);if(4===e.length){const i=t.parse(e[3],3,fe);return i?new Qt(n.type,n,r,i):null}return new Qt(n.type,n,r)}evaluate(e){const t=this.input.evaluate(e),n=this.beginIndex.evaluate(e);if(!Te(t,["string","array"]))throw new ot(`Expected first argument to be of type array or string, but found ${Me(nt(t))} instead.`);if(this.endIndex){const r=this.endIndex.evaluate(e);return t.slice(n,r)}return t.slice(n)}eachChild(e){e(this.input),e(this.beginIndex),this.endIndex&&e(this.endIndex)}outputDefined(){return!1}}function Jt(e,t){return"=="===e||"!="===e?"boolean"===t.kind||"string"===t.kind||"number"===t.kind||"null"===t.kind||"value"===t.kind:"string"===t.kind||"number"===t.kind||"value"===t.kind}function $t(e,t,n,r){return 0===r.compare(t,n)}function en(e,t,n){const r="=="!==e&&"!="!==e;return class i{constructor(e,t,n){this.type=pe,this.lhs=e,this.rhs=t,this.collator=n,this.hasUntypedArgument="value"===e.type.kind||"value"===t.type.kind}static parse(e,t){if(3!==e.length&&4!==e.length)return t.error("Expected two or three arguments.");const n=e[0];let o=t.parse(e[1],1,me);if(!o)return null;if(!Jt(n,o.type))return t.concat(1).error(`"${n}" comparisons are not supported for type '${Me(o.type)}'.`);let a=t.parse(e[2],2,me);if(!a)return null;if(!Jt(n,a.type))return t.concat(2).error(`"${n}" comparisons are not supported for type '${Me(a.type)}'.`);if(o.type.kind!==a.type.kind&&"value"!==o.type.kind&&"value"!==a.type.kind)return t.error(`Cannot compare types '${Me(o.type)}' and '${Me(a.type)}'.`);r&&("value"===o.type.kind&&"value"!==a.type.kind?o=new st(a.type,[o]):"value"!==o.type.kind&&"value"===a.type.kind&&(a=new st(o.type,[a])));let s=null;if(4===e.length){if("string"!==o.type.kind&&"string"!==a.type.kind&&"value"!==o.type.kind&&"value"!==a.type.kind)return t.error("Cannot use collator to compare non-string types.");if(s=t.parse(e[3],3,ye),!s)return null}return new i(o,a,s)}evaluate(i){const o=this.lhs.evaluate(i),a=this.rhs.evaluate(i);if(r&&this.hasUntypedArgument){const t=nt(o),n=nt(a);if(t.kind!==n.kind||"string"!==t.kind&&"number"!==t.kind)throw new ot(`Expected arguments for "${e}" to be (string, string) or (number, number), but found (${t.kind}, ${n.kind}) instead.`)}if(this.collator&&!r&&this.hasUntypedArgument){const e=nt(o),n=nt(a);if("string"!==e.kind||"string"!==n.kind)return t(i,o,a)}return this.collator?n(i,o,a,this.collator.evaluate(i)):t(i,o,a)}eachChild(e){e(this.lhs),e(this.rhs),this.collator&&e(this.collator)}outputDefined(){return!0}}}const tn=en("==",(function(e,t,n){return t===n}),$t),nn=en("!=",(function(e,t,n){return t!==n}),(function(e,t,n,r){return!$t(0,t,n,r)})),rn=en("<",(function(e,t,n){return t",(function(e,t,n){return t>n}),(function(e,t,n,r){return r.compare(t,n)>0})),an=en("<=",(function(e,t,n){return t<=n}),(function(e,t,n,r){return r.compare(t,n)<=0})),sn=en(">=",(function(e,t,n){return t>=n}),(function(e,t,n,r){return r.compare(t,n)>=0}));class ln{constructor(e,t,n,r,i){this.type=he,this.number=e,this.locale=t,this.currency=n,this.minFractionDigits=r,this.maxFractionDigits=i}static parse(e,t){if(3!==e.length)return t.error("Expected two arguments.");const n=t.parse(e[1],1,fe);if(!n)return null;const r=e[2];if("object"!=typeof r||Array.isArray(r))return t.error("NumberFormat options argument must be an object.");let i=null;if(r.locale&&(i=t.parse(r.locale,1,he),!i))return null;let o=null;if(r.currency&&(o=t.parse(r.currency,1,he),!o))return null;let a=null;if(r["min-fraction-digits"]&&(a=t.parse(r["min-fraction-digits"],1,fe),!a))return null;let s=null;return r["max-fraction-digits"]&&(s=t.parse(r["max-fraction-digits"],1,fe),!s)?null:new ln(n,i,o,a,s)}evaluate(e){return new Intl.NumberFormat(this.locale?this.locale.evaluate(e):[],{style:this.currency?"currency":"decimal",currency:this.currency?this.currency.evaluate(e):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(e):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(e):void 0}).format(this.number.evaluate(e))}eachChild(e){e(this.number),this.locale&&e(this.locale),this.currency&&e(this.currency),this.minFractionDigits&&e(this.minFractionDigits),this.maxFractionDigits&&e(this.maxFractionDigits)}outputDefined(){return!1}}class un{constructor(e){this.type=ve,this.sections=e}static parse(e,t){if(e.length<2)return t.error("Expected at least one argument.");const n=e[1];if(!Array.isArray(n)&&"object"==typeof n)return t.error("First argument must be an image or text section.");const r=[];let i=!1;for(let n=1;n<=e.length-1;++n){const o=e[n];if(i&&"object"==typeof o&&!Array.isArray(o)){i=!1;let e=null;if(o["font-scale"]&&(e=t.parse(o["font-scale"],1,fe),!e))return null;let n=null;if(o["text-font"]&&(n=t.parse(o["text-font"],1,xe(he)),!n))return null;let a=null;if(o["text-color"]&&(a=t.parse(o["text-color"],1,Ae),!a))return null;const s=r[r.length-1];s.scale=e,s.font=n,s.textColor=a}else{const o=t.parse(e[n],1,me);if(!o)return null;const a=o.type.kind;if("string"!==a&&"value"!==a&&"null"!==a&&"resolvedImage"!==a)return t.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");i=!0,r.push({content:o,scale:null,font:null,textColor:null})}}return new un(r)}evaluate(e){return new Ze(this.sections.map(t=>{const n=t.content.evaluate(e);return nt(n)===_e?new Xe("",n,null,null,null):new Xe(rt(n),null,t.scale?t.scale.evaluate(e):null,t.font?t.font.evaluate(e).join(","):null,t.textColor?t.textColor.evaluate(e):null)}))}eachChild(e){for(const t of this.sections)e(t.content),t.scale&&e(t.scale),t.font&&e(t.font),t.textColor&&e(t.textColor)}outputDefined(){return!1}}class cn{constructor(e){this.type=_e,this.input=e}static parse(e,t){if(2!==e.length)return t.error("Expected two arguments.");const n=t.parse(e[1],1,he);return n?new cn(n):t.error("No image name provided.")}evaluate(e){const t=this.input.evaluate(e),n=$e.fromString(t);return n&&e.availableImages&&(n.available=e.availableImages.indexOf(t)>-1),n}eachChild(e){e(this.input)}outputDefined(){return!1}}class dn{constructor(e){this.type=fe,this.input=e}static parse(e,t){if(2!==e.length)return t.error(`Expected 1 argument, but found ${e.length-1} instead.`);const n=t.parse(e[1],1);return n?"array"!==n.type.kind&&"string"!==n.type.kind&&"value"!==n.type.kind?t.error(`Expected argument of type string or array, but found ${Me(n.type)} instead.`):new dn(n):null}evaluate(e){const t=this.input.evaluate(e);if("string"==typeof t)return t.length;if(Array.isArray(t))return t.length;throw new ot(`Expected value to be of type string or array, but found ${Me(nt(t))} instead.`)}eachChild(e){e(this.input)}outputDefined(){return!1}}const fn={"==":tn,"!=":nn,">":on,"<":rn,">=":sn,"<=":an,array:st,at:Wt,boolean:st,case:Kt,coalesce:Gt,collator:ht,format:un,image:cn,in:qt,"index-of":Xt,interpolate:Ht,"interpolate-hcl":Ht,"interpolate-lab":Ht,length:dn,let:Yt,literal:it,match:Zt,number:st,"number-format":ln,object:st,slice:Qt,step:Nt,string:st,"to-boolean":ut,"to-color":ut,"to-number":ut,"to-string":ut,var:Pt,within:Lt};function hn(e,[t,n,r,i]){t=t.evaluate(e),n=n.evaluate(e),r=r.evaluate(e);const o=i?i.evaluate(e):1,a=et(t,n,r,o);if(a)throw new ot(a);return new We(t/255,n/255,r/255,o,!1)}function pn(e,t){return e in t}function An(e,t){const n=t[e];return void 0===n?null:n}function gn(e){return{type:e}}function mn(e){return{result:"success",value:e}}function yn(e){return{result:"error",value:e}}function vn(e){return"data-driven"===e["property-type"]||"cross-faded-data-driven"===e["property-type"]}function bn(e){return!!e.expression&&e.expression.parameters.indexOf("zoom")>-1}function _n(e){return!!e.expression&&e.expression.interpolated}function wn(e){return e instanceof Number?"number":e instanceof String?"string":e instanceof Boolean?"boolean":Array.isArray(e)?"array":null===e?"null":typeof e}function xn(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}function Mn(e){return e}function En(e,t,n){return void 0!==e?e:void 0!==t?t:void 0!==n?n:void 0}function On(e,t,n,r,i){return En(typeof n===i?r[n]:void 0,e.default,t.default)}function Sn(e,t,n){if("number"!==wn(n))return En(e.default,t.default);const r=e.stops.length;if(1===r)return e.stops[0][1];if(n<=e.stops[0][0])return e.stops[0][1];if(n>=e.stops[r-1][0])return e.stops[r-1][1];const i=Ft(e.stops.map(e=>e[0]),n);return e.stops[i][1]}function Tn(e,t,n){const r=void 0!==e.base?e.base:1;if("number"!==wn(n))return En(e.default,t.default);const i=e.stops.length;if(1===i)return e.stops[0][1];if(n<=e.stops[0][0])return e.stops[0][1];if(n>=e.stops[i-1][0])return e.stops[i-1][1];const o=Ft(e.stops.map(e=>e[0]),n),a=function(e,t,n,r){const i=r-n,o=e-n;return 0===i?0:1===t?o/i:(Math.pow(t,o)-1)/(Math.pow(t,i)-1)}(n,r,e.stops[o][0],e.stops[o+1][0]),s=e.stops[o][1],l=e.stops[o+1][1],u=Ut[t.type]||Mn;return"function"==typeof s.evaluate?{evaluate(...t){const n=s.evaluate.apply(void 0,t),r=l.evaluate.apply(void 0,t);if(void 0!==n&&void 0!==r)return u(n,r,a,e.colorSpace)}}:u(s,l,a,e.colorSpace)}function Cn(e,t,n){switch(t.type){case"color":n=We.parse(n);break;case"formatted":n=Ze.fromString(n.toString());break;case"resolvedImage":n=$e.fromString(n.toString());break;case"padding":n=Ke.parse(n);break;default:wn(n)===t.type||"enum"===t.type&&t.values[n]||(n=void 0)}return En(n,e.default,t.default)}It.register(fn,{error:[{kind:"error"},[he],(e,[t])=>{throw new ot(t.evaluate(e))}],typeof:[he,[me],(e,[t])=>Me(nt(t.evaluate(e)))],"to-rgba":[xe(fe,4),[Ae],(e,[t])=>{const[n,r,i,o]=t.evaluate(e).rgb;return[255*n,255*r,255*i,o]}],rgb:[Ae,[fe,fe,fe],hn],rgba:[Ae,[fe,fe,fe,fe],hn],has:{type:pe,overloads:[[[he],(e,[t])=>pn(t.evaluate(e),e.properties())],[[he,ge],(e,[t,n])=>pn(t.evaluate(e),n.evaluate(e))]]},get:{type:me,overloads:[[[he],(e,[t])=>An(t.evaluate(e),e.properties())],[[he,ge],(e,[t,n])=>An(t.evaluate(e),n.evaluate(e))]]},"feature-state":[me,[he],(e,[t])=>An(t.evaluate(e),e.featureState||{})],properties:[ge,[],e=>e.properties()],"geometry-type":[he,[],e=>e.geometryType()],id:[me,[],e=>e.id()],zoom:[fe,[],e=>e.globals.zoom],"heatmap-density":[fe,[],e=>e.globals.heatmapDensity||0],"line-progress":[fe,[],e=>e.globals.lineProgress||0],accumulated:[me,[],e=>void 0===e.globals.accumulated?null:e.globals.accumulated],"+":[fe,gn(fe),(e,t)=>{let n=0;for(const r of t)n+=r.evaluate(e);return n}],"*":[fe,gn(fe),(e,t)=>{let n=1;for(const r of t)n*=r.evaluate(e);return n}],"-":{type:fe,overloads:[[[fe,fe],(e,[t,n])=>t.evaluate(e)-n.evaluate(e)],[[fe],(e,[t])=>-t.evaluate(e)]]},"/":[fe,[fe,fe],(e,[t,n])=>t.evaluate(e)/n.evaluate(e)],"%":[fe,[fe,fe],(e,[t,n])=>t.evaluate(e)%n.evaluate(e)],ln2:[fe,[],()=>Math.LN2],pi:[fe,[],()=>Math.PI],e:[fe,[],()=>Math.E],"^":[fe,[fe,fe],(e,[t,n])=>Math.pow(t.evaluate(e),n.evaluate(e))],sqrt:[fe,[fe],(e,[t])=>Math.sqrt(t.evaluate(e))],log10:[fe,[fe],(e,[t])=>Math.log(t.evaluate(e))/Math.LN10],ln:[fe,[fe],(e,[t])=>Math.log(t.evaluate(e))],log2:[fe,[fe],(e,[t])=>Math.log(t.evaluate(e))/Math.LN2],sin:[fe,[fe],(e,[t])=>Math.sin(t.evaluate(e))],cos:[fe,[fe],(e,[t])=>Math.cos(t.evaluate(e))],tan:[fe,[fe],(e,[t])=>Math.tan(t.evaluate(e))],asin:[fe,[fe],(e,[t])=>Math.asin(t.evaluate(e))],acos:[fe,[fe],(e,[t])=>Math.acos(t.evaluate(e))],atan:[fe,[fe],(e,[t])=>Math.atan(t.evaluate(e))],min:[fe,gn(fe),(e,t)=>Math.min(...t.map(t=>t.evaluate(e)))],max:[fe,gn(fe),(e,t)=>Math.max(...t.map(t=>t.evaluate(e)))],abs:[fe,[fe],(e,[t])=>Math.abs(t.evaluate(e))],round:[fe,[fe],(e,[t])=>{const n=t.evaluate(e);return n<0?-Math.round(-n):Math.round(n)}],floor:[fe,[fe],(e,[t])=>Math.floor(t.evaluate(e))],ceil:[fe,[fe],(e,[t])=>Math.ceil(t.evaluate(e))],"filter-==":[pe,[he,me],(e,[t,n])=>e.properties()[t.value]===n.value],"filter-id-==":[pe,[me],(e,[t])=>e.id()===t.value],"filter-type-==":[pe,[he],(e,[t])=>e.geometryType()===t.value],"filter-<":[pe,[he,me],(e,[t,n])=>{const r=e.properties()[t.value],i=n.value;return typeof r==typeof i&&r{const n=e.id(),r=t.value;return typeof n==typeof r&&n":[pe,[he,me],(e,[t,n])=>{const r=e.properties()[t.value],i=n.value;return typeof r==typeof i&&r>i}],"filter-id->":[pe,[me],(e,[t])=>{const n=e.id(),r=t.value;return typeof n==typeof r&&n>r}],"filter-<=":[pe,[he,me],(e,[t,n])=>{const r=e.properties()[t.value],i=n.value;return typeof r==typeof i&&r<=i}],"filter-id-<=":[pe,[me],(e,[t])=>{const n=e.id(),r=t.value;return typeof n==typeof r&&n<=r}],"filter->=":[pe,[he,me],(e,[t,n])=>{const r=e.properties()[t.value],i=n.value;return typeof r==typeof i&&r>=i}],"filter-id->=":[pe,[me],(e,[t])=>{const n=e.id(),r=t.value;return typeof n==typeof r&&n>=r}],"filter-has":[pe,[me],(e,[t])=>t.value in e.properties()],"filter-has-id":[pe,[],e=>null!==e.id()&&void 0!==e.id()],"filter-type-in":[pe,[xe(he)],(e,[t])=>t.value.indexOf(e.geometryType())>=0],"filter-id-in":[pe,[xe(me)],(e,[t])=>t.value.indexOf(e.id())>=0],"filter-in-small":[pe,[he,xe(me)],(e,[t,n])=>n.value.indexOf(e.properties()[t.value])>=0],"filter-in-large":[pe,[he,xe(me)],(e,[t,n])=>function(e,t,n,r){for(;n<=r;){const i=n+r>>1;if(t[i]===e)return!0;t[i]>e?r=i-1:n=i+1}return!1}(e.properties()[t.value],n.value,0,n.value.length-1)],all:{type:pe,overloads:[[[pe,pe],(e,[t,n])=>t.evaluate(e)&&n.evaluate(e)],[gn(pe),(e,t)=>{for(const n of t)if(!n.evaluate(e))return!1;return!0}]]},any:{type:pe,overloads:[[[pe,pe],(e,[t,n])=>t.evaluate(e)||n.evaluate(e)],[gn(pe),(e,t)=>{for(const n of t)if(n.evaluate(e))return!0;return!1}]]},"!":[pe,[pe],(e,[t])=>!t.evaluate(e)],"is-supported-script":[pe,[he],(e,[t])=>{const n=e.globals&&e.globals.isSupportedScript;return!n||n(t.evaluate(e))}],upcase:[he,[he],(e,[t])=>t.evaluate(e).toUpperCase()],downcase:[he,[he],(e,[t])=>t.evaluate(e).toLowerCase()],concat:[he,gn(me),(e,t)=>t.map(t=>rt(t.evaluate(e))).join("")],"resolved-locale":[he,[ye],(e,[t])=>t.evaluate(e).resolvedLocale()]});class Ln{constructor(e,t){var n;this.expression=e,this._warningHistory={},this._evaluator=new dt,this._defaultValue=t?"color"===(n=t).type&&xn(n.default)?new We(0,0,0,0):"color"===n.type?We.parse(n.default)||null:"padding"===n.type?Ke.parse(n.default)||null:"variableAnchorOffsetCollection"===n.type?Je.parse(n.default)||null:void 0===n.default?null:n.default:null,this._enumValues=t&&"enum"===t.type?t.values:null}evaluateWithoutErrorHandling(e,t,n,r,i,o){return this._evaluator.globals=e,this._evaluator.feature=t,this._evaluator.featureState=n,this._evaluator.canonical=r,this._evaluator.availableImages=i||null,this._evaluator.formattedSection=o,this.expression.evaluate(this._evaluator)}evaluate(e,t,n,r,i,o){this._evaluator.globals=e,this._evaluator.feature=t||null,this._evaluator.featureState=n||null,this._evaluator.canonical=r,this._evaluator.availableImages=i||null,this._evaluator.formattedSection=o||null;try{const e=this.expression.evaluate(this._evaluator);if(null==e||"number"==typeof e&&e!=e)return this._defaultValue;if(this._enumValues&&!(e in this._enumValues))throw new ot(`Expected value to be one of ${Object.keys(this._enumValues).map(e=>JSON.stringify(e)).join(", ")}, but found ${JSON.stringify(e)} instead.`);return e}catch(e){return this._warningHistory[e.message]||(this._warningHistory[e.message]=!0,"undefined"!=typeof console&&console.warn(e.message)),this._defaultValue}}}function Pn(e){return Array.isArray(e)&&e.length>0&&"string"==typeof e[0]&&e[0]in fn}function In(e,t){const n=new ft(fn,Dt,[],t?function(e){const t={color:Ae,string:he,number:fe,enum:he,boolean:pe,formatted:ve,padding:be,resolvedImage:_e,variableAnchorOffsetCollection:we};return"array"===e.type?xe(t[e.value]||me,e.length):t[e.type]}(t):void 0),r=n.parse(e,void 0,void 0,void 0,t&&"string"===t.type?{typeAnnotation:"coerce"}:void 0);return r?mn(new Ln(r,t)):yn(n.errors)}class Dn{constructor(e,t){this.kind=e,this._styleExpression=t,this.isStateDependent="constant"!==e&&!Rt(t.expression)}evaluateWithoutErrorHandling(e,t,n,r,i,o){return this._styleExpression.evaluateWithoutErrorHandling(e,t,n,r,i,o)}evaluate(e,t,n,r,i,o){return this._styleExpression.evaluate(e,t,n,r,i,o)}}class kn{constructor(e,t,n,r){this.kind=e,this.zoomStops=n,this._styleExpression=t,this.isStateDependent="camera"!==e&&!Rt(t.expression),this.interpolationType=r}evaluateWithoutErrorHandling(e,t,n,r,i,o){return this._styleExpression.evaluateWithoutErrorHandling(e,t,n,r,i,o)}evaluate(e,t,n,r,i,o){return this._styleExpression.evaluate(e,t,n,r,i,o)}interpolationFactor(e,t,n){return this.interpolationType?Ht.interpolationFactor(this.interpolationType,e,t,n):0}}function Rn(e,t){const n=In(e,t);if("error"===n.result)return n;const r=n.value.expression,i=kt(r);if(!i&&!vn(t))return yn([new ue("","data expressions not supported")]);const o=jt(r,["zoom"]);if(!o&&!bn(t))return yn([new ue("","zoom expressions not supported")]);const a=function e(t){let n=null;if(t instanceof Yt)n=e(t.result);else if(t instanceof Gt){for(const r of t.args)if(n=e(r),n)break}else(t instanceof Nt||t instanceof Ht)&&t.input instanceof It&&"zoom"===t.input.name&&(n=t);return n instanceof ue||t.eachChild(t=>{const r=e(t);r instanceof ue?n=r:!n&&r?n=new ue("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):n&&r&&n!==r&&(n=new ue("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))}),n}(r);return a||o?a instanceof ue?yn([a]):a instanceof Ht&&!_n(t)?yn([new ue("",'"interpolate" expressions cannot be used with this property')]):mn(a?new kn(i?"camera":"composite",n.value,a.labels,a instanceof Ht?a.interpolation:void 0):new Dn(i?"constant":"source",n.value)):yn([new ue("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')])}class jn{constructor(e,t){this._parameters=e,this._specification=t,le(this,function e(t,n){const r="color"===n.type,i=t.stops&&"object"==typeof t.stops[0][0],o=i||!(i||void 0!==t.property),a=t.type||(_n(n)?"exponential":"interval");if(r||"padding"===n.type){const e=r?We.parse:Ke.parse;(t=le({},t)).stops&&(t.stops=t.stops.map(t=>[t[0],e(t[1])])),t.default=e(t.default?t.default:n.default)}if(t.colorSpace&&"rgb"!==(s=t.colorSpace)&&"hcl"!==s&&"lab"!==s)throw new Error(`Unknown color space: "${t.colorSpace}"`);var s;let l,u,c;if("exponential"===a)l=Tn;else if("interval"===a)l=Sn;else if("categorical"===a){l=On,u=Object.create(null);for(const e of t.stops)u[e[0]]=e[1];c=typeof t.stops[0][0]}else{if("identity"!==a)throw new Error(`Unknown function type "${a}"`);l=Cn}if(i){const r={},i=[];for(let e=0;ee[0]),evaluate:({zoom:e},r)=>Tn({stops:o,base:t.base},n,e).evaluate(e,r)}}if(o){const e="exponential"===a?{name:"exponential",base:void 0!==t.base?t.base:1}:null;return{kind:"camera",interpolationType:e,interpolationFactor:Ht.interpolationFactor.bind(void 0,e),zoomStops:t.stops.map(e=>e[0]),evaluate:({zoom:e})=>l(t,n,e,u,c)}}return{kind:"source",evaluate(e,r){const i=r&&r.properties?r.properties[t.property]:void 0;return void 0===i?En(t.default,n.default):l(t,n,i,u,c)}}}(this._parameters,this._specification))}static deserialize(e){return new jn(e._parameters,e._specification)}static serialize(e){return{_parameters:e._parameters,_specification:e._specification}}}function Fn(e){if(!0===e||!1===e)return!0;if(!Array.isArray(e)||0===e.length)return!1;switch(e[0]){case"has":return e.length>=2&&"$id"!==e[1]&&"$type"!==e[1];case"in":return e.length>=3&&("string"!=typeof e[1]||Array.isArray(e[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return 3!==e.length||Array.isArray(e[1])||Array.isArray(e[2]);case"any":case"all":for(const t of e.slice(1))if(!Fn(t)&&"boolean"!=typeof t)return!1;return!0;default:return!0}}const Nn={type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}};function Bn(e){if(null==e)return{filter:()=>!0,needGeometry:!1};Fn(e)||(e=Hn(e));const t=In(e,Nn);if("error"===t.result)throw new Error(t.value.map(e=>`${e.key}: ${e.message}`).join(", "));return{filter:(e,n,r)=>t.value.evaluate(e,n,{},r),needGeometry:Un(e)}}function zn(e,t){return et?1:0}function Un(e){if(!Array.isArray(e))return!1;if("within"===e[0])return!0;for(let t=1;t"===t||"<="===t||">="===t?Vn(e[1],e[2],t):"any"===t?(n=e.slice(1),["any"].concat(n.map(Hn))):"all"===t?["all"].concat(e.slice(1).map(Hn)):"none"===t?["all"].concat(e.slice(1).map(Hn).map(Wn)):"in"===t?Gn(e[1],e.slice(2)):"!in"===t?Wn(Gn(e[1],e.slice(2))):"has"===t?Yn(e[1]):"!has"===t?Wn(Yn(e[1])):"within"!==t||e;var n}function Vn(e,t,n){switch(e){case"$type":return["filter-type-"+n,t];case"$id":return["filter-id-"+n,t];default:return["filter-"+n,e,t]}}function Gn(e,t){if(0===t.length)return!1;switch(e){case"$type":return["filter-type-in",["literal",t]];case"$id":return["filter-id-in",["literal",t]];default:return t.length>200&&!t.some(e=>typeof e!=typeof t[0])?["filter-in-large",e,["literal",t.sort(zn)]]:["filter-in-small",e,["literal",t]]}}function Yn(e){switch(e){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",e]}}function Wn(e){return["!",e]}function qn(e){const t=typeof e;if("number"===t||"boolean"===t||"string"===t||null==e)return JSON.stringify(e);if(Array.isArray(e)){let t="[";for(const n of e)t+=qn(n)+",";return t+"]"}const n=Object.keys(e).sort();let r="{";for(let t=0;tr.maximum?[new se(t,n,`${n} is greater than the maximum value ${r.maximum}`)]:[]}function tr(e){const t=e.valueSpec,n=Kn(e.value.type);let r,i,o,a={};const s="categorical"!==n&&void 0===e.value.property,l=!s,u="array"===wn(e.value.stops)&&"array"===wn(e.value.stops[0])&&"object"===wn(e.value.stops[0][0]),c=Jn({key:e.key,value:e.value,valueSpec:e.styleSpec.function,validateSpec:e.validateSpec,style:e.style,styleSpec:e.styleSpec,objectElementValidators:{stops:function(e){if("identity"===n)return[new se(e.key,e.value,'identity function may not have a "stops" property')];let t=[];const r=e.value;return t=t.concat($n({key:e.key,value:r,valueSpec:e.valueSpec,validateSpec:e.validateSpec,style:e.style,styleSpec:e.styleSpec,arrayElementValidator:d})),"array"===wn(r)&&0===r.length&&t.push(new se(e.key,r,"array must have at least one stop")),t},default:function(e){return e.validateSpec({key:e.key,value:e.value,valueSpec:t,validateSpec:e.validateSpec,style:e.style,styleSpec:e.styleSpec})}}});return"identity"===n&&s&&c.push(new se(e.key,e.value,'missing required property "property"')),"identity"===n||e.value.stops||c.push(new se(e.key,e.value,'missing required property "stops"')),"exponential"===n&&e.valueSpec.expression&&!_n(e.valueSpec)&&c.push(new se(e.key,e.value,"exponential functions not supported")),e.styleSpec.$version>=8&&(l&&!vn(e.valueSpec)?c.push(new se(e.key,e.value,"property functions not supported")):s&&!bn(e.valueSpec)&&c.push(new se(e.key,e.value,"zoom functions not supported"))),"categorical"!==n&&!u||void 0!==e.value.property||c.push(new se(e.key,e.value,'"property" property is required')),c;function d(e){let n=[];const r=e.value,s=e.key;if("array"!==wn(r))return[new se(s,r,`array expected, ${wn(r)} found`)];if(2!==r.length)return[new se(s,r,`array length 2 expected, length ${r.length} found`)];if(u){if("object"!==wn(r[0]))return[new se(s,r,`object expected, ${wn(r[0])} found`)];if(void 0===r[0].zoom)return[new se(s,r,"object stop key must have zoom")];if(void 0===r[0].value)return[new se(s,r,"object stop key must have value")];if(o&&o>Kn(r[0].zoom))return[new se(s,r[0].zoom,"stop zoom values must appear in ascending order")];Kn(r[0].zoom)!==o&&(o=Kn(r[0].zoom),i=void 0,a={}),n=n.concat(Jn({key:s+"[0]",value:r[0],valueSpec:{zoom:{}},validateSpec:e.validateSpec,style:e.style,styleSpec:e.styleSpec,objectElementValidators:{zoom:er,value:f}}))}else n=n.concat(f({key:s+"[0]",value:r[0],valueSpec:{},validateSpec:e.validateSpec,style:e.style,styleSpec:e.styleSpec},r));return Pn(Qn(r[1]))?n.concat([new se(s+"[1]",r[1],"expressions are not allowed in function stops.")]):n.concat(e.validateSpec({key:s+"[1]",value:r[1],valueSpec:t,validateSpec:e.validateSpec,style:e.style,styleSpec:e.styleSpec}))}function f(e,o){const s=wn(e.value),l=Kn(e.value),u=null!==e.value?e.value:o;if(r){if(s!==r)return[new se(e.key,u,`${s} stop domain type must match previous stop domain type ${r}`)]}else r=s;if("number"!==s&&"string"!==s&&"boolean"!==s)return[new se(e.key,u,"stop domain value must be a number, string, or boolean")];if("number"!==s&&"categorical"!==n){let r=`number expected, ${s} found`;return vn(t)&&void 0===n&&(r+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new se(e.key,u,r)]}return"categorical"!==n||"number"!==s||isFinite(l)&&Math.floor(l)===l?"categorical"!==n&&"number"===s&&void 0!==i&&lnew se(`${e.key}${t.key}`,e.value,t.message));const n=t.value.expression||t.value._styleExpression.expression;if("property"===e.expressionContext&&"text-font"===e.propertyKey&&!n.outputDefined())return[new se(e.key,e.value,`Invalid data expression for "${e.propertyKey}". Output values must be contained as literals within the expression.`)];if("property"===e.expressionContext&&"layout"===e.propertyType&&!Rt(n))return[new se(e.key,e.value,'"feature-state" data expressions are not supported with layout properties.')];if("filter"===e.expressionContext&&!Rt(n))return[new se(e.key,e.value,'"feature-state" data expressions are not supported with filters.')];if(e.expressionContext&&0===e.expressionContext.indexOf("cluster")){if(!jt(n,["zoom","feature-state"]))return[new se(e.key,e.value,'"zoom" and "feature-state" expressions are not supported with cluster properties.')];if("cluster-initial"===e.expressionContext&&!kt(n))return[new se(e.key,e.value,"Feature data expressions are not supported with initial expression part of cluster properties.")]}return[]}function rr(e){const t=e.key,n=e.value,r=e.valueSpec,i=[];return Array.isArray(r.values)?-1===r.values.indexOf(Kn(n))&&i.push(new se(t,n,`expected one of [${r.values.join(", ")}], ${JSON.stringify(n)} found`)):-1===Object.keys(r.values).indexOf(Kn(n))&&i.push(new se(t,n,`expected one of [${Object.keys(r.values).join(", ")}], ${JSON.stringify(n)} found`)),i}function ir(e){return Fn(Qn(e.value))?nr(le({},e,{expressionContext:"filter",valueSpec:{value:"boolean"}})):function e(t){const n=t.value,r=t.key;if("array"!==wn(n))return[new se(r,n,`array expected, ${wn(n)} found`)];const i=t.styleSpec;let o,a=[];if(n.length<1)return[new se(r,n,"filter array must have at least 1 element")];switch(a=a.concat(rr({key:r+"[0]",value:n[0],valueSpec:i.filter_operator,style:t.style,styleSpec:t.styleSpec})),Kn(n[0])){case"<":case"<=":case">":case">=":n.length>=2&&"$type"===Kn(n[1])&&a.push(new se(r,n,`"$type" cannot be use with operator "${n[0]}"`));case"==":case"!=":3!==n.length&&a.push(new se(r,n,`filter array for operator "${n[0]}" must have 3 elements`));case"in":case"!in":n.length>=2&&(o=wn(n[1]),"string"!==o&&a.push(new se(r+"[1]",n[1],`string expected, ${o} found`)));for(let e=2;e{e in n&&t.push(new se(r,n[e],`"${e}" is prohibited for ref layers`))}),i.layers.forEach(t=>{Kn(t.id)===s&&(e=t)}),e?e.ref?t.push(new se(r,n.ref,"ref cannot reference another ref layer")):a=Kn(e.type):t.push(new se(r,n.ref,`ref layer "${s}" not found`))}else if("background"!==a)if(n.source){const e=i.sources&&i.sources[n.source],o=e&&Kn(e.type);e?"vector"===o&&"raster"===a?t.push(new se(r,n.source,`layer "${n.id}" requires a raster source`)):"raster-dem"!==o&&"hillshade"===a?t.push(new se(r,n.source,`layer "${n.id}" requires a raster-dem source`)):"raster"===o&&"raster"!==a?t.push(new se(r,n.source,`layer "${n.id}" requires a vector source`)):"vector"!==o||n["source-layer"]?"raster-dem"===o&&"hillshade"!==a?t.push(new se(r,n.source,"raster-dem source can only be used with layer type 'hillshade'.")):"line"!==a||!n.paint||!n.paint["line-gradient"]||"geojson"===o&&e.lineMetrics||t.push(new se(r,n,`layer "${n.id}" specifies a line-gradient, which requires a GeoJSON source with \`lineMetrics\` enabled.`)):t.push(new se(r,n,`layer "${n.id}" must specify a "source-layer"`)):t.push(new se(r,n.source,`source "${n.source}" not found`))}else t.push(new se(r,n,'missing required property "source"'));return t=t.concat(Jn({key:r,value:n,valueSpec:o.layer,style:e.style,styleSpec:e.styleSpec,validateSpec:e.validateSpec,objectElementValidators:{"*":()=>[],type:()=>e.validateSpec({key:r+".type",value:n.type,valueSpec:o.layer.type,style:e.style,styleSpec:e.styleSpec,validateSpec:e.validateSpec,object:n,objectKey:"type"}),filter:ir,layout:e=>Jn({layer:n,key:e.key,value:e.value,style:e.style,styleSpec:e.styleSpec,validateSpec:e.validateSpec,objectElementValidators:{"*":e=>sr(le({layerType:a},e))}}),paint:e=>Jn({layer:n,key:e.key,value:e.value,style:e.style,styleSpec:e.styleSpec,validateSpec:e.validateSpec,objectElementValidators:{"*":e=>ar(le({layerType:a},e))}})}})),t}function ur(e){const t=e.value,n=e.key,r=wn(t);return"string"!==r?[new se(n,t,`string expected, ${r} found`)]:[]}const cr={promoteId:function({key:e,value:t}){if("string"===wn(t))return ur({key:e,value:t});{const n=[];for(const r in t)n.push(...ur({key:`${e}.${r}`,value:t[r]}));return n}}};function dr(e){const t=e.value,n=e.key,r=e.styleSpec,i=e.style,o=e.validateSpec;if(!t.type)return[new se(n,t,'"type" is required')];const a=Kn(t.type);let s;switch(a){case"vector":case"raster":return s=Jn({key:n,value:t,valueSpec:r["source_"+a.replace("-","_")],style:e.style,styleSpec:r,objectElementValidators:cr,validateSpec:o}),s;case"raster-dem":return s=function(e){var t;const n=null!==(t=e.sourceName)&&void 0!==t?t:"",r=e.value,i=e.styleSpec,o=i.source_raster_dem,a=e.style;let s=[];const l=wn(r);if(void 0===r)return s;if("object"!==l)return s.push(new se("source_raster_dem",r,`object expected, ${l} found`)),s;const u="custom"===Kn(r.encoding),c=["redFactor","greenFactor","blueFactor","baseShift"],d=e.value.encoding?`"${e.value.encoding}"`:"Default";for(const t in r)!u&&c.includes(t)?s.push(new se(t,r[t],`In "${n}": "${t}" is only valid when "encoding" is set to "custom". ${d} encoding found`)):o[t]?s=s.concat(e.validateSpec({key:t,value:r[t],valueSpec:o[t],validateSpec:e.validateSpec,style:a,styleSpec:i})):s.push(new se(t,r[t],`unknown property "${t}"`));return s}({sourceName:n,value:t,style:e.style,styleSpec:r,validateSpec:o}),s;case"geojson":if(s=Jn({key:n,value:t,valueSpec:r.source_geojson,style:i,styleSpec:r,validateSpec:o,objectElementValidators:cr}),t.cluster)for(const e in t.clusterProperties){const[r,i]=t.clusterProperties[e],a="string"==typeof r?[r,["accumulated"],["get",e]]:r;s.push(...nr({key:`${n}.${e}.map`,value:i,validateSpec:o,expressionContext:"cluster-map"})),s.push(...nr({key:`${n}.${e}.reduce`,value:a,validateSpec:o,expressionContext:"cluster-reduce"}))}return s;case"video":return Jn({key:n,value:t,valueSpec:r.source_video,style:i,validateSpec:o,styleSpec:r});case"image":return Jn({key:n,value:t,valueSpec:r.source_image,style:i,validateSpec:o,styleSpec:r});case"canvas":return[new se(n,null,"Please use runtime APIs to add canvas sources, rather than including them in stylesheets.","source.canvas")];default:return rr({key:n+".type",value:t.type,valueSpec:{values:["vector","raster","raster-dem","geojson","video","image"]},style:i,validateSpec:o,styleSpec:r})}}function fr(e){const t=e.value,n=e.styleSpec,r=n.light,i=e.style;let o=[];const a=wn(t);if(void 0===t)return o;if("object"!==a)return o=o.concat([new se("light",t,`object expected, ${a} found`)]),o;for(const a in t){const s=a.match(/^(.*)-transition$/);o=o.concat(s&&r[s[1]]&&r[s[1]].transition?e.validateSpec({key:a,value:t[a],valueSpec:n.transition,validateSpec:e.validateSpec,style:i,styleSpec:n}):r[a]?e.validateSpec({key:a,value:t[a],valueSpec:r[a],validateSpec:e.validateSpec,style:i,styleSpec:n}):[new se(a,t[a],`unknown property "${a}"`)])}return o}function hr(e){const t=e.value,n=e.styleSpec,r=n.terrain,i=e.style;let o=[];const a=wn(t);if(void 0===t)return o;if("object"!==a)return o=o.concat([new se("terrain",t,`object expected, ${a} found`)]),o;for(const a in t)o=o.concat(r[a]?e.validateSpec({key:a,value:t[a],valueSpec:r[a],validateSpec:e.validateSpec,style:i,styleSpec:n}):[new se(a,t[a],`unknown property "${a}"`)]);return o}function pr(e){let t=[];const n=e.value,r=e.key;if(Array.isArray(n)){const i=[],o=[];for(const a in n)n[a].id&&i.includes(n[a].id)&&t.push(new se(r,n,`all the sprites' ids must be unique, but ${n[a].id} is duplicated`)),i.push(n[a].id),n[a].url&&o.includes(n[a].url)&&t.push(new se(r,n,`all the sprites' URLs must be unique, but ${n[a].url} is duplicated`)),o.push(n[a].url),t=t.concat(Jn({key:`${r}[${a}]`,value:n[a],valueSpec:{id:{type:"string",required:!0},url:{type:"string",required:!0}},validateSpec:e.validateSpec}));return t}return ur({key:r,value:n})}const Ar={"*":()=>[],array:$n,boolean:function(e){const t=e.value,n=e.key,r=wn(t);return"boolean"!==r?[new se(n,t,`boolean expected, ${r} found`)]:[]},number:er,color:function(e){const t=e.key,n=e.value,r=wn(n);return"string"!==r?[new se(t,n,`color expected, ${r} found`)]:We.parse(String(n))?[]:[new se(t,n,`color expected, "${n}" found`)]},constants:Zn,enum:rr,filter:ir,function:tr,layer:lr,object:Jn,source:dr,light:fr,terrain:hr,string:ur,formatted:function(e){return 0===ur(e).length?[]:nr(e)},resolvedImage:function(e){return 0===ur(e).length?[]:nr(e)},padding:function(e){const t=e.key,n=e.value;if("array"===wn(n)){if(n.length<1||n.length>4)return[new se(t,n,`padding requires 1 to 4 values; ${n.length} values found`)];const r={type:"number"};let i=[];for(let o=0;o[]}})),e.constants&&(n=n.concat(Zn({key:"constants",value:e.constants,style:e,styleSpec:t,validateSpec:gr}))),br(n)}function vr(e){return function(t){return e({...t,validateSpec:gr})}}function br(e){return[].concat(e).sort((e,t)=>e.line-t.line)}function _r(e){return function(...t){return br(e.apply(this,t))}}yr.source=_r(vr(dr)),yr.sprite=_r(vr(pr)),yr.glyphs=_r(vr(mr)),yr.light=_r(vr(fr)),yr.terrain=_r(vr(hr)),yr.layer=_r(vr(lr)),yr.filter=_r(vr(ir)),yr.paintProperty=_r(vr(ar)),yr.layoutProperty=_r(vr(sr));const wr=yr,xr=wr.light,Mr=wr.paintProperty,Er=wr.layoutProperty;function Or(e,t){let n=!1;if(t&&t.length)for(const r of t)e.fire(new q(new Error(r.message))),n=!0;return n}class Sr{constructor(e,t,n){const r=this.cells=[];if(e instanceof ArrayBuffer){this.arrayBuffer=e;const i=new Int32Array(this.arrayBuffer);e=i[0],this.d=(t=i[1])+2*(n=i[2]);for(let e=0;e=u[l+0]&&r>=u[l+1])?(a[d]=!0,o.push(i[d])):a[d]=!1}}}}_forEachCell(e,t,n,r,i,o,a,s){const l=this._convertToCellCoord(e),u=this._convertToCellCoord(t),c=this._convertToCellCoord(n),d=this._convertToCellCoord(r);for(let f=l;f<=c;f++)for(let l=u;l<=d;l++){const u=this.d*l+f;if((!s||s(this._convertFromCellCoord(f),this._convertFromCellCoord(l),this._convertFromCellCoord(f+1),this._convertFromCellCoord(l+1)))&&i.call(this,e,t,n,r,u,o,a,s))return}}_convertFromCellCoord(e){return(e-this.padding)/this.scale}_convertToCellCoord(e){return Math.max(0,Math.min(this.d-1,Math.floor(e*this.scale)+this.padding))}toArrayBuffer(){if(this.arrayBuffer)return this.arrayBuffer;const e=this.cells,t=3+this.cells.length+1+1;let n=0;for(let e=0;e=0)continue;const o=e[n];i[n]=Tr[r].shallow.indexOf(n)>=0?o:Pr(o,t)}e instanceof Error&&(i.message=e.message)}if(i.$name)throw new Error("$name property is reserved for worker serialization logic.");return"Object"!==r&&(i.$name=r),i}throw new Error("can't serialize object of type "+typeof e)}function Ir(e){if(null==e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||e instanceof Boolean||e instanceof Number||e instanceof String||e instanceof Date||e instanceof RegExp||e instanceof Blob||Lr(e)||T(e)||ArrayBuffer.isView(e)||e instanceof ImageData)return e;if(Array.isArray(e))return e.map(Ir);if("object"==typeof e){const t=e.$name||"Object";if(!Tr[t])throw new Error("can't deserialize unregistered class "+t);const{klass:n}=Tr[t];if(!n)throw new Error("can't deserialize unregistered class "+t);if(n.deserialize)return n.deserialize(e);const r=Object.create(n.prototype);for(const n of Object.keys(e)){if("$name"===n)continue;const i=e[n];r[n]=Tr[t].shallow.indexOf(n)>=0?i:Ir(i)}return r}throw new Error("can't deserialize object of type "+typeof e)}class Dr{constructor(){this.first=!0}update(e,t){const n=Math.floor(e);return this.first?(this.first=!1,this.lastIntegerZoom=n,this.lastIntegerZoomTime=0,this.lastZoom=e,this.lastFloorZoom=n,!0):(this.lastFloorZoom>n?(this.lastIntegerZoom=n+1,this.lastIntegerZoomTime=t):this.lastFloorZoome>=128&&e<=255,Arabic:e=>e>=1536&&e<=1791,"Arabic Supplement":e=>e>=1872&&e<=1919,"Arabic Extended-A":e=>e>=2208&&e<=2303,"Hangul Jamo":e=>e>=4352&&e<=4607,"Unified Canadian Aboriginal Syllabics":e=>e>=5120&&e<=5759,Khmer:e=>e>=6016&&e<=6143,"Unified Canadian Aboriginal Syllabics Extended":e=>e>=6320&&e<=6399,"General Punctuation":e=>e>=8192&&e<=8303,"Letterlike Symbols":e=>e>=8448&&e<=8527,"Number Forms":e=>e>=8528&&e<=8591,"Miscellaneous Technical":e=>e>=8960&&e<=9215,"Control Pictures":e=>e>=9216&&e<=9279,"Optical Character Recognition":e=>e>=9280&&e<=9311,"Enclosed Alphanumerics":e=>e>=9312&&e<=9471,"Geometric Shapes":e=>e>=9632&&e<=9727,"Miscellaneous Symbols":e=>e>=9728&&e<=9983,"Miscellaneous Symbols and Arrows":e=>e>=11008&&e<=11263,"CJK Radicals Supplement":e=>e>=11904&&e<=12031,"Kangxi Radicals":e=>e>=12032&&e<=12255,"Ideographic Description Characters":e=>e>=12272&&e<=12287,"CJK Symbols and Punctuation":e=>e>=12288&&e<=12351,Hiragana:e=>e>=12352&&e<=12447,Katakana:e=>e>=12448&&e<=12543,Bopomofo:e=>e>=12544&&e<=12591,"Hangul Compatibility Jamo":e=>e>=12592&&e<=12687,Kanbun:e=>e>=12688&&e<=12703,"Bopomofo Extended":e=>e>=12704&&e<=12735,"CJK Strokes":e=>e>=12736&&e<=12783,"Katakana Phonetic Extensions":e=>e>=12784&&e<=12799,"Enclosed CJK Letters and Months":e=>e>=12800&&e<=13055,"CJK Compatibility":e=>e>=13056&&e<=13311,"CJK Unified Ideographs Extension A":e=>e>=13312&&e<=19903,"Yijing Hexagram Symbols":e=>e>=19904&&e<=19967,"CJK Unified Ideographs":e=>e>=19968&&e<=40959,"Yi Syllables":e=>e>=40960&&e<=42127,"Yi Radicals":e=>e>=42128&&e<=42191,"Hangul Jamo Extended-A":e=>e>=43360&&e<=43391,"Hangul Syllables":e=>e>=44032&&e<=55215,"Hangul Jamo Extended-B":e=>e>=55216&&e<=55295,"Private Use Area":e=>e>=57344&&e<=63743,"CJK Compatibility Ideographs":e=>e>=63744&&e<=64255,"Arabic Presentation Forms-A":e=>e>=64336&&e<=65023,"Vertical Forms":e=>e>=65040&&e<=65055,"CJK Compatibility Forms":e=>e>=65072&&e<=65103,"Small Form Variants":e=>e>=65104&&e<=65135,"Arabic Presentation Forms-B":e=>e>=65136&&e<=65279,"Halfwidth and Fullwidth Forms":e=>e>=65280&&e<=65519};function Rr(e){for(const t of e)if(Nr(t.charCodeAt(0)))return!0;return!1}function jr(e){for(const t of e)if(!Fr(t.charCodeAt(0)))return!1;return!0}function Fr(e){return!(kr.Arabic(e)||kr["Arabic Supplement"](e)||kr["Arabic Extended-A"](e)||kr["Arabic Presentation Forms-A"](e)||kr["Arabic Presentation Forms-B"](e))}function Nr(e){return!(746!==e&&747!==e&&(e<4352||!(kr["Bopomofo Extended"](e)||kr.Bopomofo(e)||kr["CJK Compatibility Forms"](e)&&!(e>=65097&&e<=65103)||kr["CJK Compatibility Ideographs"](e)||kr["CJK Compatibility"](e)||kr["CJK Radicals Supplement"](e)||kr["CJK Strokes"](e)||!(!kr["CJK Symbols and Punctuation"](e)||e>=12296&&e<=12305||e>=12308&&e<=12319||12336===e)||kr["CJK Unified Ideographs Extension A"](e)||kr["CJK Unified Ideographs"](e)||kr["Enclosed CJK Letters and Months"](e)||kr["Hangul Compatibility Jamo"](e)||kr["Hangul Jamo Extended-A"](e)||kr["Hangul Jamo Extended-B"](e)||kr["Hangul Jamo"](e)||kr["Hangul Syllables"](e)||kr.Hiragana(e)||kr["Ideographic Description Characters"](e)||kr.Kanbun(e)||kr["Kangxi Radicals"](e)||kr["Katakana Phonetic Extensions"](e)||kr.Katakana(e)&&12540!==e||!(!kr["Halfwidth and Fullwidth Forms"](e)||65288===e||65289===e||65293===e||e>=65306&&e<=65310||65339===e||65341===e||65343===e||e>=65371&&e<=65503||65507===e||e>=65512&&e<=65519)||!(!kr["Small Form Variants"](e)||e>=65112&&e<=65118||e>=65123&&e<=65126)||kr["Unified Canadian Aboriginal Syllabics"](e)||kr["Unified Canadian Aboriginal Syllabics Extended"](e)||kr["Vertical Forms"](e)||kr["Yijing Hexagram Symbols"](e)||kr["Yi Syllables"](e)||kr["Yi Radicals"](e))))}function Br(e){return!(Nr(e)||function(e){return!!(kr["Latin-1 Supplement"](e)&&(167===e||169===e||174===e||177===e||188===e||189===e||190===e||215===e||247===e)||kr["General Punctuation"](e)&&(8214===e||8224===e||8225===e||8240===e||8241===e||8251===e||8252===e||8258===e||8263===e||8264===e||8265===e||8273===e)||kr["Letterlike Symbols"](e)||kr["Number Forms"](e)||kr["Miscellaneous Technical"](e)&&(e>=8960&&e<=8967||e>=8972&&e<=8991||e>=8996&&e<=9e3||9003===e||e>=9085&&e<=9114||e>=9150&&e<=9165||9167===e||e>=9169&&e<=9179||e>=9186&&e<=9215)||kr["Control Pictures"](e)&&9251!==e||kr["Optical Character Recognition"](e)||kr["Enclosed Alphanumerics"](e)||kr["Geometric Shapes"](e)||kr["Miscellaneous Symbols"](e)&&!(e>=9754&&e<=9759)||kr["Miscellaneous Symbols and Arrows"](e)&&(e>=11026&&e<=11055||e>=11088&&e<=11097||e>=11192&&e<=11243)||kr["CJK Symbols and Punctuation"](e)||kr.Katakana(e)||kr["Private Use Area"](e)||kr["CJK Compatibility Forms"](e)||kr["Small Form Variants"](e)||kr["Halfwidth and Fullwidth Forms"](e)||8734===e||8756===e||8757===e||e>=9984&&e<=10087||e>=10102&&e<=10131||65532===e||65533===e)}(e))}function zr(e){return e>=1424&&e<=2303||kr["Arabic Presentation Forms-A"](e)||kr["Arabic Presentation Forms-B"](e)}function Ur(e,t){return!(!t&&zr(e)||e>=2304&&e<=3583||e>=3840&&e<=4255||kr.Khmer(e))}function Hr(e){for(const t of e)if(zr(t.charCodeAt(0)))return!0;return!1}const Vr="deferred",Gr="loading",Yr="loaded";let Wr=null,qr="unavailable",Xr=null;const Zr=function(e){e&&"string"==typeof e&&e.indexOf("NetworkError")>-1&&(qr="error"),Wr&&Wr(e)};function Kr(){Qr.fire(new W("pluginStateChange",{pluginStatus:qr,pluginURL:Xr}))}const Qr=new X,Jr=function(){return qr},$r=function(){if(qr!==Vr||!Xr)throw new Error("rtl-text-plugin cannot be downloaded unless a pluginURL is specified");qr=Gr,Kr(),Xr&&H({url:Xr},e=>{e?Zr(e):(qr=Yr,Kr())})},ei={applyArabicShaping:null,processBidirectionalText:null,processStyledBidirectionalText:null,isLoaded:()=>qr===Yr||null!=ei.applyArabicShaping,isLoading:()=>qr===Gr,setState(e){if(!O())throw new Error("Cannot set the state of the rtl-text-plugin when not in the web-worker context");qr=e.pluginStatus,Xr=e.pluginURL},isParsed(){if(!O())throw new Error("rtl-text-plugin is only parsed on the worker-threads");return null!=ei.applyArabicShaping&&null!=ei.processBidirectionalText&&null!=ei.processStyledBidirectionalText},getPluginURL(){if(!O())throw new Error("rtl-text-plugin url can only be queried from the worker threads");return Xr}};class ti{constructor(e,t){this.zoom=e,t?(this.now=t.now,this.fadeDuration=t.fadeDuration,this.zoomHistory=t.zoomHistory,this.transition=t.transition):(this.now=0,this.fadeDuration=0,this.zoomHistory=new Dr,this.transition={})}isSupportedScript(e){return function(e,t){for(const n of e)if(!Ur(n.charCodeAt(0),t))return!1;return!0}(e,ei.isLoaded())}crossFadingFactor(){return 0===this.fadeDuration?1:Math.min((this.now-this.zoomHistory.lastIntegerZoomTime)/this.fadeDuration,1)}getCrossfadeParameters(){const e=this.zoom,t=e-Math.floor(e),n=this.crossFadingFactor();return e>this.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:t+(1-t)*n}:{fromScale:.5,toScale:1,t:1-(1-n)*t}}}class ni{constructor(e,t){this.property=e,this.value=t,this.expression=function(e,t){if(xn(e))return new jn(e,t);if(Pn(e)){const n=Rn(e,t);if("error"===n.result)throw new Error(n.value.map(e=>`${e.key}: ${e.message}`).join(", "));return n.value}{let n=e;return"color"===t.type&&"string"==typeof e?n=We.parse(e):"padding"!==t.type||"number"!=typeof e&&!Array.isArray(e)?"variableAnchorOffsetCollection"===t.type&&Array.isArray(e)&&(n=Je.parse(e)):n=Ke.parse(e),{kind:"constant",evaluate:()=>n}}}(void 0===t?e.specification.default:t,e.specification)}isDataDriven(){return"source"===this.expression.kind||"composite"===this.expression.kind}possiblyEvaluate(e,t,n){return this.property.possiblyEvaluate(this,e,t,n)}}class ri{constructor(e){this.property=e,this.value=new ni(e,void 0)}transitioned(e,t){return new oi(this.property,this.value,t,m({},e.transition,this.transition),e.now)}untransitioned(){return new oi(this.property,this.value,null,{},0)}}class ii{constructor(e){this._properties=e,this._values=Object.create(e.defaultTransitionablePropertyValues)}getValue(e){return _(this._values[e].value.value)}setValue(e,t){Object.prototype.hasOwnProperty.call(this._values,e)||(this._values[e]=new ri(this._values[e].property)),this._values[e].value=new ni(this._values[e].property,null===t?void 0:_(t))}getTransition(e){return _(this._values[e].transition)}setTransition(e,t){Object.prototype.hasOwnProperty.call(this._values,e)||(this._values[e]=new ri(this._values[e].property)),this._values[e].transition=_(t)||void 0}serialize(){const e={};for(const t of Object.keys(this._values)){const n=this.getValue(t);void 0!==n&&(e[t]=n);const r=this.getTransition(t);void 0!==r&&(e[t+"-transition"]=r)}return e}transitioned(e,t){const n=new ai(this._properties);for(const r of Object.keys(this._values))n._values[r]=this._values[r].transitioned(e,t._values[r]);return n}untransitioned(){const e=new ai(this._properties);for(const t of Object.keys(this._values))e._values[t]=this._values[t].untransitioned();return e}}class oi{constructor(e,t,n,r,i){this.property=e,this.value=t,this.begin=i+r.delay||0,this.end=this.begin+r.duration||0,e.specification.transition&&(r.delay||r.duration)&&(this.prior=n)}possiblyEvaluate(e,t,n){const r=e.now||0,i=this.value.possiblyEvaluate(e,t,n),o=this.prior;if(o){if(r>this.end)return this.prior=null,i;if(this.value.isDataDriven())return this.prior=null,i;if(r=1)return 1;const t=e*e,n=t*e;return 4*(e<.5?n:3*(e-t)+n-.75)}(a))}}return i}}class ai{constructor(e){this._properties=e,this._values=Object.create(e.defaultTransitioningPropertyValues)}possiblyEvaluate(e,t,n){const r=new ui(this._properties);for(const i of Object.keys(this._values))r._values[i]=this._values[i].possiblyEvaluate(e,t,n);return r}hasTransition(){for(const e of Object.keys(this._values))if(this._values[e].prior)return!0;return!1}}class si{constructor(e){this._properties=e,this._values=Object.create(e.defaultPropertyValues)}hasValue(e){return void 0!==this._values[e].value}getValue(e){return _(this._values[e].value)}setValue(e,t){this._values[e]=new ni(this._values[e].property,null===t?void 0:_(t))}serialize(){const e={};for(const t of Object.keys(this._values)){const n=this.getValue(t);void 0!==n&&(e[t]=n)}return e}possiblyEvaluate(e,t,n){const r=new ui(this._properties);for(const i of Object.keys(this._values))r._values[i]=this._values[i].possiblyEvaluate(e,t,n);return r}}class li{constructor(e,t,n){this.property=e,this.value=t,this.parameters=n}isConstant(){return"constant"===this.value.kind}constantOr(e){return"constant"===this.value.kind?this.value.value:e}evaluate(e,t,n,r){return this.property.evaluate(this.value,this.parameters,e,t,n,r)}}class ui{constructor(e){this._properties=e,this._values=Object.create(e.defaultPossiblyEvaluatedValues)}get(e){return this._values[e]}}class ci{constructor(e){this.specification=e}possiblyEvaluate(e,t){if(e.isDataDriven())throw new Error("Value should not be data driven");return e.expression.evaluate(t)}interpolate(e,t,n){const r=Ut[this.specification.type];return r?r(e,t,n):e}}class di{constructor(e,t){this.specification=e,this.overrides=t}possiblyEvaluate(e,t,n,r){return new li(this,"constant"===e.expression.kind||"camera"===e.expression.kind?{kind:"constant",value:e.expression.evaluate(t,null,{},n,r)}:e.expression,t)}interpolate(e,t,n){if("constant"!==e.value.kind||"constant"!==t.value.kind)return e;if(void 0===e.value.value||void 0===t.value.value)return new li(this,{kind:"constant",value:void 0},e.parameters);const r=Ut[this.specification.type];if(r){const i=r(e.value.value,t.value.value,n);return new li(this,{kind:"constant",value:i},e.parameters)}return e}evaluate(e,t,n,r,i,o){return"constant"===e.kind?e.value:e.evaluate(t,n,r,i,o)}}class fi extends di{possiblyEvaluate(e,t,n,r){if(void 0===e.value)return new li(this,{kind:"constant",value:void 0},t);if("constant"===e.expression.kind){const i=e.expression.evaluate(t,null,{},n,r),o="resolvedImage"===e.property.specification.type&&"string"!=typeof i?i.name:i,a=this._calculate(o,o,o,t);return new li(this,{kind:"constant",value:a},t)}if("camera"===e.expression.kind){const n=this._calculate(e.expression.evaluate({zoom:t.zoom-1}),e.expression.evaluate({zoom:t.zoom}),e.expression.evaluate({zoom:t.zoom+1}),t);return new li(this,{kind:"constant",value:n},t)}return new li(this,e.expression,t)}evaluate(e,t,n,r,i,o){if("source"===e.kind){const a=e.evaluate(t,n,r,i,o);return this._calculate(a,a,a,t)}return"composite"===e.kind?this._calculate(e.evaluate({zoom:Math.floor(t.zoom)-1},n,r),e.evaluate({zoom:Math.floor(t.zoom)},n,r),e.evaluate({zoom:Math.floor(t.zoom)+1},n,r),t):e.value}_calculate(e,t,n,r){return r.zoom>r.zoomHistory.lastIntegerZoom?{from:e,to:t}:{from:n,to:t}}interpolate(e){return e}}class hi{constructor(e){this.specification=e}possiblyEvaluate(e,t,n,r){if(void 0!==e.value){if("constant"===e.expression.kind){const i=e.expression.evaluate(t,null,{},n,r);return this._calculate(i,i,i,t)}return this._calculate(e.expression.evaluate(new ti(Math.floor(t.zoom-1),t)),e.expression.evaluate(new ti(Math.floor(t.zoom),t)),e.expression.evaluate(new ti(Math.floor(t.zoom+1),t)),t)}}_calculate(e,t,n,r){return r.zoom>r.zoomHistory.lastIntegerZoom?{from:e,to:t}:{from:n,to:t}}interpolate(e){return e}}class pi{constructor(e){this.specification=e}possiblyEvaluate(e,t,n,r){return!!e.expression.evaluate(t,null,{},n,r)}interpolate(){return!1}}class Ai{constructor(e){this.properties=e,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[];for(const t in e){const n=e[t];n.specification.overridable&&this.overridableProperties.push(t);const r=this.defaultPropertyValues[t]=new ni(n,void 0),i=this.defaultTransitionablePropertyValues[t]=new ri(n);this.defaultTransitioningPropertyValues[t]=i.untransitioned(),this.defaultPossiblyEvaluatedValues[t]=r.possiblyEvaluate({})}}}Cr("DataDrivenProperty",di),Cr("DataConstantProperty",ci),Cr("CrossFadedDataDrivenProperty",fi),Cr("CrossFadedProperty",hi),Cr("ColorRampProperty",pi);const gi="-transition";class mi extends X{constructor(e,t){if(super(),this.id=e.id,this.type=e.type,this._featureFilter={filter:()=>!0,needGeometry:!1},"custom"!==e.type&&(this.metadata=e.metadata,this.minzoom=e.minzoom,this.maxzoom=e.maxzoom,"background"!==e.type&&(this.source=e.source,this.sourceLayer=e["source-layer"],this.filter=e.filter),t.layout&&(this._unevaluatedLayout=new si(t.layout)),t.paint)){this._transitionablePaint=new ii(t.paint);for(const t in e.paint)this.setPaintProperty(t,e.paint[t],{validate:!1});for(const t in e.layout)this.setLayoutProperty(t,e.layout[t],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new ui(t.paint)}}getCrossfadeParameters(){return this._crossfadeParameters}getLayoutProperty(e){return"visibility"===e?this.visibility:this._unevaluatedLayout.getValue(e)}setLayoutProperty(e,t,n={}){null!=t&&this._validate(Er,`layers.${this.id}.layout.${e}`,e,t,n)||("visibility"!==e?this._unevaluatedLayout.setValue(e,t):this.visibility=t)}getPaintProperty(e){return e.endsWith(gi)?this._transitionablePaint.getTransition(e.slice(0,-11)):this._transitionablePaint.getValue(e)}setPaintProperty(e,t,n={}){if(null!=t&&this._validate(Mr,`layers.${this.id}.paint.${e}`,e,t,n))return!1;if(e.endsWith(gi))return this._transitionablePaint.setTransition(e.slice(0,-11),t||void 0),!1;{const n=this._transitionablePaint._values[e],r="cross-faded-data-driven"===n.property.specification["property-type"],i=n.value.isDataDriven(),o=n.value;this._transitionablePaint.setValue(e,t),this._handleSpecialPaintPropertyUpdate(e);const a=this._transitionablePaint._values[e].value;return a.isDataDriven()||i||r||this._handleOverridablePaintPropertyUpdate(e,o,a)}}_handleSpecialPaintPropertyUpdate(e){}_handleOverridablePaintPropertyUpdate(e,t,n){return!1}isHidden(e){return!!(this.minzoom&&e=this.maxzoom)||"none"===this.visibility}updateTransitions(e){this._transitioningPaint=this._transitionablePaint.transitioned(e,this._transitioningPaint)}hasTransition(){return this._transitioningPaint.hasTransition()}recalculate(e,t){e.getCrossfadeParameters&&(this._crossfadeParameters=e.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(e,void 0,t)),this.paint=this._transitioningPaint.possiblyEvaluate(e,void 0,t)}serialize(){const e={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&&(e.layout=e.layout||{},e.layout.visibility=this.visibility),b(e,(e,t)=>!(void 0===e||"layout"===t&&!Object.keys(e).length||"paint"===t&&!Object.keys(e).length))}_validate(e,t,n,r,i={}){return(!i||!1!==i.validate)&&Or(this,e.call(wr,{key:t,layerType:this.type,objectKey:n,value:r,styleSpec:Z,style:{glyphs:!0,sprite:!0}}))}is3D(){return!1}isTileClipped(){return!1}hasOffscreenPass(){return!1}resize(){}isStateDependent(){for(const e in this.paint._values){const t=this.paint.get(e);if(t instanceof li&&vn(t.property.specification)&&("source"===t.value.kind||"composite"===t.value.kind)&&t.value.isStateDependent)return!0}return!1}}const yi={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array};class vi{constructor(e,t){this._structArray=e,this._pos1=t*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8}}class bi{constructor(){this.isTransferred=!1,this.capacity=-1,this.resize(0)}static serialize(e,t){return e._trim(),t&&(e.isTransferred=!0,t.push(e.arrayBuffer)),{length:e.length,arrayBuffer:e.arrayBuffer}}static deserialize(e){const t=Object.create(this.prototype);return t.arrayBuffer=e.arrayBuffer,t.length=e.length,t.capacity=e.arrayBuffer.byteLength/t.bytesPerElement,t._refreshViews(),t}_trim(){this.length!==this.capacity&&(this.capacity=this.length,this.arrayBuffer=this.arrayBuffer.slice(0,this.length*this.bytesPerElement),this._refreshViews())}clear(){this.length=0}resize(e){this.reserve(e),this.length=e}reserve(e){if(e>this.capacity){this.capacity=Math.max(e,Math.floor(5*this.capacity),128),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);const t=this.uint8;this._refreshViews(),t&&this.uint8.set(t)}}_refreshViews(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")}}function _i(e,t=1){let n=0,r=0;return{members:e.map(e=>{const i=yi[e.type].BYTES_PER_ELEMENT,o=n=wi(n,Math.max(t,i)),a=e.components||1;return r=Math.max(r,i),n+=i*a,{name:e.name,type:e.type,components:a,offset:o}}),size:wi(n,Math.max(r,t)),alignment:t}}function wi(e,t){return Math.ceil(e/t)*t}class xi extends bi{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(e,t){const n=this.length;return this.resize(n+1),this.emplace(n,e,t)}emplace(e,t,n){const r=2*e;return this.int16[r+0]=t,this.int16[r+1]=n,e}}xi.prototype.bytesPerElement=4,Cr("StructArrayLayout2i4",xi);class Mi extends bi{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(e,t,n){const r=this.length;return this.resize(r+1),this.emplace(r,e,t,n)}emplace(e,t,n,r){const i=3*e;return this.int16[i+0]=t,this.int16[i+1]=n,this.int16[i+2]=r,e}}Mi.prototype.bytesPerElement=6,Cr("StructArrayLayout3i6",Mi);class Ei extends bi{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(e,t,n,r){const i=this.length;return this.resize(i+1),this.emplace(i,e,t,n,r)}emplace(e,t,n,r,i){const o=4*e;return this.int16[o+0]=t,this.int16[o+1]=n,this.int16[o+2]=r,this.int16[o+3]=i,e}}Ei.prototype.bytesPerElement=8,Cr("StructArrayLayout4i8",Ei);class Oi extends bi{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(e,t,n,r,i,o){const a=this.length;return this.resize(a+1),this.emplace(a,e,t,n,r,i,o)}emplace(e,t,n,r,i,o,a){const s=6*e;return this.int16[s+0]=t,this.int16[s+1]=n,this.int16[s+2]=r,this.int16[s+3]=i,this.int16[s+4]=o,this.int16[s+5]=a,e}}Oi.prototype.bytesPerElement=12,Cr("StructArrayLayout2i4i12",Oi);class Si extends bi{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(e,t,n,r,i,o){const a=this.length;return this.resize(a+1),this.emplace(a,e,t,n,r,i,o)}emplace(e,t,n,r,i,o,a){const s=4*e,l=8*e;return this.int16[s+0]=t,this.int16[s+1]=n,this.uint8[l+4]=r,this.uint8[l+5]=i,this.uint8[l+6]=o,this.uint8[l+7]=a,e}}Si.prototype.bytesPerElement=8,Cr("StructArrayLayout2i4ub8",Si);class Ti extends bi{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(e,t){const n=this.length;return this.resize(n+1),this.emplace(n,e,t)}emplace(e,t,n){const r=2*e;return this.float32[r+0]=t,this.float32[r+1]=n,e}}Ti.prototype.bytesPerElement=8,Cr("StructArrayLayout2f8",Ti);class Ci extends bi{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(e,t,n,r,i,o,a,s,l,u){const c=this.length;return this.resize(c+1),this.emplace(c,e,t,n,r,i,o,a,s,l,u)}emplace(e,t,n,r,i,o,a,s,l,u,c){const d=10*e;return this.uint16[d+0]=t,this.uint16[d+1]=n,this.uint16[d+2]=r,this.uint16[d+3]=i,this.uint16[d+4]=o,this.uint16[d+5]=a,this.uint16[d+6]=s,this.uint16[d+7]=l,this.uint16[d+8]=u,this.uint16[d+9]=c,e}}Ci.prototype.bytesPerElement=20,Cr("StructArrayLayout10ui20",Ci);class Li extends bi{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(e,t,n,r,i,o,a,s,l,u,c,d){const f=this.length;return this.resize(f+1),this.emplace(f,e,t,n,r,i,o,a,s,l,u,c,d)}emplace(e,t,n,r,i,o,a,s,l,u,c,d,f){const h=12*e;return this.int16[h+0]=t,this.int16[h+1]=n,this.int16[h+2]=r,this.int16[h+3]=i,this.uint16[h+4]=o,this.uint16[h+5]=a,this.uint16[h+6]=s,this.uint16[h+7]=l,this.int16[h+8]=u,this.int16[h+9]=c,this.int16[h+10]=d,this.int16[h+11]=f,e}}Li.prototype.bytesPerElement=24,Cr("StructArrayLayout4i4ui4i24",Li);class Pi extends bi{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(e,t,n){const r=this.length;return this.resize(r+1),this.emplace(r,e,t,n)}emplace(e,t,n,r){const i=3*e;return this.float32[i+0]=t,this.float32[i+1]=n,this.float32[i+2]=r,e}}Pi.prototype.bytesPerElement=12,Cr("StructArrayLayout3f12",Pi);class Ii extends bi{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)}emplaceBack(e){const t=this.length;return this.resize(t+1),this.emplace(t,e)}emplace(e,t){return this.uint32[1*e+0]=t,e}}Ii.prototype.bytesPerElement=4,Cr("StructArrayLayout1ul4",Ii);class Di extends bi{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(e,t,n,r,i,o,a,s,l){const u=this.length;return this.resize(u+1),this.emplace(u,e,t,n,r,i,o,a,s,l)}emplace(e,t,n,r,i,o,a,s,l,u){const c=10*e,d=5*e;return this.int16[c+0]=t,this.int16[c+1]=n,this.int16[c+2]=r,this.int16[c+3]=i,this.int16[c+4]=o,this.int16[c+5]=a,this.uint32[d+3]=s,this.uint16[c+8]=l,this.uint16[c+9]=u,e}}Di.prototype.bytesPerElement=20,Cr("StructArrayLayout6i1ul2ui20",Di);class ki extends bi{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(e,t,n,r,i,o){const a=this.length;return this.resize(a+1),this.emplace(a,e,t,n,r,i,o)}emplace(e,t,n,r,i,o,a){const s=6*e;return this.int16[s+0]=t,this.int16[s+1]=n,this.int16[s+2]=r,this.int16[s+3]=i,this.int16[s+4]=o,this.int16[s+5]=a,e}}ki.prototype.bytesPerElement=12,Cr("StructArrayLayout2i2i2i12",ki);class Ri extends bi{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(e,t,n,r,i){const o=this.length;return this.resize(o+1),this.emplace(o,e,t,n,r,i)}emplace(e,t,n,r,i,o){const a=4*e,s=8*e;return this.float32[a+0]=t,this.float32[a+1]=n,this.float32[a+2]=r,this.int16[s+6]=i,this.int16[s+7]=o,e}}Ri.prototype.bytesPerElement=16,Cr("StructArrayLayout2f1f2i16",Ri);class ji extends bi{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(e,t,n,r){const i=this.length;return this.resize(i+1),this.emplace(i,e,t,n,r)}emplace(e,t,n,r,i){const o=12*e,a=3*e;return this.uint8[o+0]=t,this.uint8[o+1]=n,this.float32[a+1]=r,this.float32[a+2]=i,e}}ji.prototype.bytesPerElement=12,Cr("StructArrayLayout2ub2f12",ji);class Fi extends bi{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(e,t,n){const r=this.length;return this.resize(r+1),this.emplace(r,e,t,n)}emplace(e,t,n,r){const i=3*e;return this.uint16[i+0]=t,this.uint16[i+1]=n,this.uint16[i+2]=r,e}}Fi.prototype.bytesPerElement=6,Cr("StructArrayLayout3ui6",Fi);class Ni extends bi{_refreshViews(){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)}emplaceBack(e,t,n,r,i,o,a,s,l,u,c,d,f,h,p,A,g){const m=this.length;return this.resize(m+1),this.emplace(m,e,t,n,r,i,o,a,s,l,u,c,d,f,h,p,A,g)}emplace(e,t,n,r,i,o,a,s,l,u,c,d,f,h,p,A,g,m){const y=24*e,v=12*e,b=48*e;return this.int16[y+0]=t,this.int16[y+1]=n,this.uint16[y+2]=r,this.uint16[y+3]=i,this.uint32[v+2]=o,this.uint32[v+3]=a,this.uint32[v+4]=s,this.uint16[y+10]=l,this.uint16[y+11]=u,this.uint16[y+12]=c,this.float32[v+7]=d,this.float32[v+8]=f,this.uint8[b+36]=h,this.uint8[b+37]=p,this.uint8[b+38]=A,this.uint32[v+10]=g,this.int16[y+22]=m,e}}Ni.prototype.bytesPerElement=48,Cr("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48",Ni);class Bi extends bi{_refreshViews(){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)}emplaceBack(e,t,n,r,i,o,a,s,l,u,c,d,f,h,p,A,g,m,y,v,b,_,w,x,M,E,O,S){const T=this.length;return this.resize(T+1),this.emplace(T,e,t,n,r,i,o,a,s,l,u,c,d,f,h,p,A,g,m,y,v,b,_,w,x,M,E,O,S)}emplace(e,t,n,r,i,o,a,s,l,u,c,d,f,h,p,A,g,m,y,v,b,_,w,x,M,E,O,S,T){const C=32*e,L=16*e;return this.int16[C+0]=t,this.int16[C+1]=n,this.int16[C+2]=r,this.int16[C+3]=i,this.int16[C+4]=o,this.int16[C+5]=a,this.int16[C+6]=s,this.int16[C+7]=l,this.uint16[C+8]=u,this.uint16[C+9]=c,this.uint16[C+10]=d,this.uint16[C+11]=f,this.uint16[C+12]=h,this.uint16[C+13]=p,this.uint16[C+14]=A,this.uint16[C+15]=g,this.uint16[C+16]=m,this.uint16[C+17]=y,this.uint16[C+18]=v,this.uint16[C+19]=b,this.uint16[C+20]=_,this.uint16[C+21]=w,this.uint16[C+22]=x,this.uint32[L+12]=M,this.float32[L+13]=E,this.float32[L+14]=O,this.uint16[C+30]=S,this.uint16[C+31]=T,e}}Bi.prototype.bytesPerElement=64,Cr("StructArrayLayout8i15ui1ul2f2ui64",Bi);class zi extends bi{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(e){const t=this.length;return this.resize(t+1),this.emplace(t,e)}emplace(e,t){return this.float32[1*e+0]=t,e}}zi.prototype.bytesPerElement=4,Cr("StructArrayLayout1f4",zi);class Ui extends bi{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(e,t,n){const r=this.length;return this.resize(r+1),this.emplace(r,e,t,n)}emplace(e,t,n,r){const i=3*e;return this.uint16[6*e+0]=t,this.float32[i+1]=n,this.float32[i+2]=r,e}}Ui.prototype.bytesPerElement=12,Cr("StructArrayLayout1ui2f12",Ui);class Hi extends bi{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(e,t,n){const r=this.length;return this.resize(r+1),this.emplace(r,e,t,n)}emplace(e,t,n,r){const i=4*e;return this.uint32[2*e+0]=t,this.uint16[i+2]=n,this.uint16[i+3]=r,e}}Hi.prototype.bytesPerElement=8,Cr("StructArrayLayout1ul2ui8",Hi);class Vi extends bi{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(e,t){const n=this.length;return this.resize(n+1),this.emplace(n,e,t)}emplace(e,t,n){const r=2*e;return this.uint16[r+0]=t,this.uint16[r+1]=n,e}}Vi.prototype.bytesPerElement=4,Cr("StructArrayLayout2ui4",Vi);class Gi extends bi{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(e){const t=this.length;return this.resize(t+1),this.emplace(t,e)}emplace(e,t){return this.uint16[1*e+0]=t,e}}Gi.prototype.bytesPerElement=2,Cr("StructArrayLayout1ui2",Gi);class Yi extends bi{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(e,t,n,r){const i=this.length;return this.resize(i+1),this.emplace(i,e,t,n,r)}emplace(e,t,n,r,i){const o=4*e;return this.float32[o+0]=t,this.float32[o+1]=n,this.float32[o+2]=r,this.float32[o+3]=i,e}}Yi.prototype.bytesPerElement=16,Cr("StructArrayLayout4f16",Yi);class Wi extends vi{get anchorPointX(){return this._structArray.int16[this._pos2+0]}get anchorPointY(){return this._structArray.int16[this._pos2+1]}get x1(){return this._structArray.int16[this._pos2+2]}get y1(){return this._structArray.int16[this._pos2+3]}get x2(){return this._structArray.int16[this._pos2+4]}get y2(){return this._structArray.int16[this._pos2+5]}get featureIndex(){return this._structArray.uint32[this._pos4+3]}get sourceLayerIndex(){return this._structArray.uint16[this._pos2+8]}get bucketIndex(){return this._structArray.uint16[this._pos2+9]}get anchorPoint(){return new o(this.anchorPointX,this.anchorPointY)}}Wi.prototype.size=20;class qi extends Di{get(e){return new Wi(this,e)}}Cr("CollisionBoxArray",qi);class Xi extends vi{get anchorX(){return this._structArray.int16[this._pos2+0]}get anchorY(){return this._structArray.int16[this._pos2+1]}get glyphStartIndex(){return this._structArray.uint16[this._pos2+2]}get numGlyphs(){return this._structArray.uint16[this._pos2+3]}get vertexStartIndex(){return this._structArray.uint32[this._pos4+2]}get lineStartIndex(){return this._structArray.uint32[this._pos4+3]}get lineLength(){return this._structArray.uint32[this._pos4+4]}get segment(){return this._structArray.uint16[this._pos2+10]}get lowerSize(){return this._structArray.uint16[this._pos2+11]}get upperSize(){return this._structArray.uint16[this._pos2+12]}get lineOffsetX(){return this._structArray.float32[this._pos4+7]}get lineOffsetY(){return this._structArray.float32[this._pos4+8]}get writingMode(){return this._structArray.uint8[this._pos1+36]}get placedOrientation(){return this._structArray.uint8[this._pos1+37]}set placedOrientation(e){this._structArray.uint8[this._pos1+37]=e}get hidden(){return this._structArray.uint8[this._pos1+38]}set hidden(e){this._structArray.uint8[this._pos1+38]=e}get crossTileID(){return this._structArray.uint32[this._pos4+10]}set crossTileID(e){this._structArray.uint32[this._pos4+10]=e}get associatedIconIndex(){return this._structArray.int16[this._pos2+22]}}Xi.prototype.size=48;class Zi extends Ni{get(e){return new Xi(this,e)}}Cr("PlacedSymbolArray",Zi);class Ki extends vi{get anchorX(){return this._structArray.int16[this._pos2+0]}get anchorY(){return this._structArray.int16[this._pos2+1]}get rightJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+2]}get centerJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+3]}get leftJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+4]}get verticalPlacedTextSymbolIndex(){return this._structArray.int16[this._pos2+5]}get placedIconSymbolIndex(){return this._structArray.int16[this._pos2+6]}get verticalPlacedIconSymbolIndex(){return this._structArray.int16[this._pos2+7]}get key(){return this._structArray.uint16[this._pos2+8]}get textBoxStartIndex(){return this._structArray.uint16[this._pos2+9]}get textBoxEndIndex(){return this._structArray.uint16[this._pos2+10]}get verticalTextBoxStartIndex(){return this._structArray.uint16[this._pos2+11]}get verticalTextBoxEndIndex(){return this._structArray.uint16[this._pos2+12]}get iconBoxStartIndex(){return this._structArray.uint16[this._pos2+13]}get iconBoxEndIndex(){return this._structArray.uint16[this._pos2+14]}get verticalIconBoxStartIndex(){return this._structArray.uint16[this._pos2+15]}get verticalIconBoxEndIndex(){return this._structArray.uint16[this._pos2+16]}get featureIndex(){return this._structArray.uint16[this._pos2+17]}get numHorizontalGlyphVertices(){return this._structArray.uint16[this._pos2+18]}get numVerticalGlyphVertices(){return this._structArray.uint16[this._pos2+19]}get numIconVertices(){return this._structArray.uint16[this._pos2+20]}get numVerticalIconVertices(){return this._structArray.uint16[this._pos2+21]}get useRuntimeCollisionCircles(){return this._structArray.uint16[this._pos2+22]}get crossTileID(){return this._structArray.uint32[this._pos4+12]}set crossTileID(e){this._structArray.uint32[this._pos4+12]=e}get textBoxScale(){return this._structArray.float32[this._pos4+13]}get collisionCircleDiameter(){return this._structArray.float32[this._pos4+14]}get textAnchorOffsetStartIndex(){return this._structArray.uint16[this._pos2+30]}get textAnchorOffsetEndIndex(){return this._structArray.uint16[this._pos2+31]}}Ki.prototype.size=64;class Qi extends Bi{get(e){return new Ki(this,e)}}Cr("SymbolInstanceArray",Qi);class Ji extends zi{getoffsetX(e){return this.float32[1*e+0]}}Cr("GlyphOffsetArray",Ji);class $i extends Mi{getx(e){return this.int16[3*e+0]}gety(e){return this.int16[3*e+1]}gettileUnitDistanceFromAnchor(e){return this.int16[3*e+2]}}Cr("SymbolLineVertexArray",$i);class eo extends vi{get textAnchor(){return this._structArray.uint16[this._pos2+0]}get textOffset0(){return this._structArray.float32[this._pos4+1]}get textOffset1(){return this._structArray.float32[this._pos4+2]}}eo.prototype.size=12;class to extends Ui{get(e){return new eo(this,e)}}Cr("TextAnchorOffsetArray",to);class no extends vi{get featureIndex(){return this._structArray.uint32[this._pos4+0]}get sourceLayerIndex(){return this._structArray.uint16[this._pos2+2]}get bucketIndex(){return this._structArray.uint16[this._pos2+3]}}no.prototype.size=8;class ro extends Hi{get(e){return new no(this,e)}}Cr("FeatureIndexArray",ro);class io extends xi{}class oo extends xi{}class ao extends xi{}class so extends Oi{}class lo extends Si{}class uo extends Ti{}class co extends Ci{}class fo extends Li{}class ho extends Pi{}class po extends Ii{}class Ao extends ki{}class go extends ji{}class mo extends Fi{}class yo extends Vi{}const vo=_i([{name:"a_pos",components:2,type:"Int16"}],4),{members:bo}=vo;class _o{constructor(e=[]){this.segments=e}prepareSegment(e,t,n,r){let i=this.segments[this.segments.length-1];return e>_o.MAX_VERTEX_ARRAY_LENGTH&&x(`Max vertices per segment is ${_o.MAX_VERTEX_ARRAY_LENGTH}: bucket requested ${e}`),(!i||i.vertexLength+e>_o.MAX_VERTEX_ARRAY_LENGTH||i.sortKey!==r)&&(i={vertexOffset:t.length,primitiveOffset:n.length,vertexLength:0,primitiveLength:0},void 0!==r&&(i.sortKey=r),this.segments.push(i)),i}get(){return this.segments}destroy(){for(const e of this.segments)for(const t in e.vaos)e.vaos[t].destroy()}static simpleSegment(e,t,n,r){return new _o([{vertexOffset:e,primitiveOffset:t,vertexLength:n,primitiveLength:r,vaos:{},sortKey:0}])}}function wo(e,t){return 256*(e=A(Math.floor(e),0,255))+A(Math.floor(t),0,255)}_o.MAX_VERTEX_ARRAY_LENGTH=Math.pow(2,16)-1,Cr("SegmentVector",_o);const xo=_i([{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"}]);var Mo={exports:{}},Eo={exports:{}};Eo.exports=function(e,t){var n,r,i,o,a,s,l,u;for(r=e.length-(n=3&e.length),i=t,a=3432918353,s=461845907,u=0;u>>16)*a&65535)<<16)&4294967295)<<15|l>>>17))*s+(((l>>>16)*s&65535)<<16)&4294967295)<<13|i>>>19))+((5*(i>>>16)&65535)<<16)&4294967295))+((58964+(o>>>16)&65535)<<16);switch(l=0,n){case 3:l^=(255&e.charCodeAt(u+2))<<16;case 2:l^=(255&e.charCodeAt(u+1))<<8;case 1:i^=l=(65535&(l=(l=(65535&(l^=255&e.charCodeAt(u)))*a+(((l>>>16)*a&65535)<<16)&4294967295)<<15|l>>>17))*s+(((l>>>16)*s&65535)<<16)&4294967295}return i^=e.length,i=2246822507*(65535&(i^=i>>>16))+((2246822507*(i>>>16)&65535)<<16)&4294967295,i=3266489909*(65535&(i^=i>>>13))+((3266489909*(i>>>16)&65535)<<16)&4294967295,(i^=i>>>16)>>>0};var Oo=Eo.exports,So={exports:{}};So.exports=function(e,t){for(var n,r=e.length,i=t^r,o=0;r>=4;)n=1540483477*(65535&(n=255&e.charCodeAt(o)|(255&e.charCodeAt(++o))<<8|(255&e.charCodeAt(++o))<<16|(255&e.charCodeAt(++o))<<24))+((1540483477*(n>>>16)&65535)<<16),i=1540483477*(65535&i)+((1540483477*(i>>>16)&65535)<<16)^(n=1540483477*(65535&(n^=n>>>24))+((1540483477*(n>>>16)&65535)<<16)),r-=4,++o;switch(r){case 3:i^=(255&e.charCodeAt(o+2))<<16;case 2:i^=(255&e.charCodeAt(o+1))<<8;case 1:i=1540483477*(65535&(i^=255&e.charCodeAt(o)))+((1540483477*(i>>>16)&65535)<<16)}return i=1540483477*(65535&(i^=i>>>13))+((1540483477*(i>>>16)&65535)<<16),(i^=i>>>15)>>>0};var To=Oo,Co=So.exports;Mo.exports=To,Mo.exports.murmur3=To,Mo.exports.murmur2=Co;var Lo=n(Mo.exports);class Po{constructor(){this.ids=[],this.positions=[],this.indexed=!1}add(e,t,n,r){this.ids.push(Io(e)),this.positions.push(t,n,r)}getPositions(e){if(!this.indexed)throw new Error("Trying to get index, but feature positions are not indexed");const t=Io(e);let n=0,r=this.ids.length-1;for(;n>1;this.ids[e]>=t?r=e:n=e+1}const i=[];for(;this.ids[n]===t;)i.push({index:this.positions[3*n],start:this.positions[3*n+1],end:this.positions[3*n+2]}),n++;return i}static serialize(e,t){const n=new Float64Array(e.ids),r=new Uint32Array(e.positions);return function e(t,n,r,i){for(;r>1];let a=r-1,s=i+1;for(;;){do{a++}while(t[a]o);if(a>=s)break;Do(t,a,s),Do(n,3*a,3*s),Do(n,3*a+1,3*s+1),Do(n,3*a+2,3*s+2)}s-r"u_"+e),this.type=n}setUniform(e,t,n){e.set(n.constantOr(this.value))}getBinding(e,t,n){return"color"===this.type?new Fo(e,t):new Ro(e,t)}}class Uo{constructor(e,t){this.uniformNames=t.map(e=>"u_"+e),this.patternFrom=null,this.patternTo=null,this.pixelRatioFrom=1,this.pixelRatioTo=1}setConstantPatternPositions(e,t){this.pixelRatioFrom=t.pixelRatio,this.pixelRatioTo=e.pixelRatio,this.patternFrom=t.tlbr,this.patternTo=e.tlbr}setUniform(e,t,n,r){const i="u_pattern_to"===r?this.patternTo:"u_pattern_from"===r?this.patternFrom:"u_pixel_ratio_to"===r?this.pixelRatioTo:"u_pixel_ratio_from"===r?this.pixelRatioFrom:null;i&&e.set(i)}getBinding(e,t,n){return"u_pattern"===n.substr(0,9)?new jo(e,t):new Ro(e,t)}}class Ho{constructor(e,t,n,r){this.expression=e,this.type=n,this.maxValue=0,this.paintVertexAttributes=t.map(e=>({name:"a_"+e,type:"Float32",components:"color"===n?2:1,offset:0})),this.paintVertexArray=new r}populatePaintArray(e,t,n,r,i){const o=this.paintVertexArray.length,a=this.expression.evaluate(new ti(0),t,{},r,[],i);this.paintVertexArray.resize(e),this._setPaintValue(o,e,a)}updatePaintArray(e,t,n,r){const i=this.expression.evaluate({zoom:0},n,r);this._setPaintValue(e,t,i)}_setPaintValue(e,t,n){if("color"===this.type){const r=Bo(n);for(let n=e;n`u_${e}_t`),this.type=n,this.useIntegerZoom=r,this.zoom=i,this.maxValue=0,this.paintVertexAttributes=t.map(e=>({name:"a_"+e,type:"Float32",components:"color"===n?4:2,offset:0})),this.paintVertexArray=new o}populatePaintArray(e,t,n,r,i){const o=this.expression.evaluate(new ti(this.zoom),t,{},r,[],i),a=this.expression.evaluate(new ti(this.zoom+1),t,{},r,[],i),s=this.paintVertexArray.length;this.paintVertexArray.resize(e),this._setPaintValue(s,e,o,a)}updatePaintArray(e,t,n,r){const i=this.expression.evaluate({zoom:this.zoom},n,r),o=this.expression.evaluate({zoom:this.zoom+1},n,r);this._setPaintValue(e,t,i,o)}_setPaintValue(e,t,n,r){if("color"===this.type){const i=Bo(n),o=Bo(r);for(let n=e;n"#define HAS_UNIFORM_"+e))}return e}getBinderAttributes(){const e=[];for(const t in this.binders){const n=this.binders[t];if(n instanceof Ho||n instanceof Vo)for(let t=0;t!0)){this.programConfigurations={};for(const r of e)this.programConfigurations[r.id]=new Yo(r,t,n);this.needsUpload=!1,this._featureMap=new Po,this._bufferOffset=0}populatePaintArrays(e,t,n,r,i,o){for(const n in this.programConfigurations)this.programConfigurations[n].populatePaintArrays(e,t,r,i,o);void 0!==t.id&&this._featureMap.add(t.id,n,this._bufferOffset,e),this._bufferOffset=e,this.needsUpload=!0}updatePaintArrays(e,t,n,r){for(const i of n)this.needsUpload=this.programConfigurations[i.id].updatePaintArrays(e,this._featureMap,t,i,r)||this.needsUpload}get(e){return this.programConfigurations[e]}upload(e){if(this.needsUpload){for(const t in this.programConfigurations)this.programConfigurations[t].upload(e);this.needsUpload=!1}}destroy(){for(const e in this.programConfigurations)this.programConfigurations[e].destroy()}}function qo(e,t){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"]}[e]||[e.replace(t+"-","").replace(/-/g,"_")]}function Xo(e,t,n){const r={color:{source:Ti,composite:Yi},number:{source:zi,composite:Ti}},i=function(e){return{"line-pattern":{source:co,composite:co},"fill-pattern":{source:co,composite:co},"fill-extrusion-pattern":{source:co,composite:co}}[e]}(e);return i&&i[n]||r[t][n]}Cr("ConstantBinder",zo),Cr("CrossFadedConstantBinder",Uo),Cr("SourceExpressionBinder",Ho),Cr("CrossFadedCompositeBinder",Go),Cr("CompositeExpressionBinder",Vo),Cr("ProgramConfiguration",Yo,{omit:["_buffers"]}),Cr("ProgramConfigurationSet",Wo);const Zo=8192,Ko=Math.pow(2,14)-1,Qo=-Ko-1;function Jo(e){const t=Zo/e.extent,n=e.loadGeometry();for(let e=0;en.x+1||on.y+1)&&x("Geometry exceeds allowed extent, reduce your vector tile buffer size")}}return n}function $o(e,t){return{type:e.type,id:e.id,properties:e.properties,geometry:t?Jo(e):[]}}function ea(e,t,n,r,i){e.emplaceBack(2*t+(r+1)/2,2*n+(i+1)/2)}class ta{constructor(e){this.zoom=e.zoom,this.overscaling=e.overscaling,this.layers=e.layers,this.layerIds=this.layers.map(e=>e.id),this.index=e.index,this.hasPattern=!1,this.layoutVertexArray=new oo,this.indexArray=new mo,this.segments=new _o,this.programConfigurations=new Wo(e.layers,e.zoom),this.stateDependentLayerIds=this.layers.filter(e=>e.isStateDependent()).map(e=>e.id)}populate(e,t,n){const r=this.layers[0],i=[];let o=null,a=!1;"circle"===r.type&&(o=r.layout.get("circle-sort-key"),a=!o.isConstant());for(const{feature:t,id:r,index:s,sourceLayerIndex:l}of e){const e=this.layers[0]._featureFilter.needGeometry,u=$o(t,e);if(!this.layers[0]._featureFilter.filter(new ti(this.zoom),u,n))continue;const c=a?o.evaluate(u,{},n):void 0,d={id:r,properties:t.properties,type:t.type,sourceLayerIndex:l,index:s,geometry:e?u.geometry:Jo(t),patterns:{},sortKey:c};i.push(d)}a&&i.sort((e,t)=>e.sortKey-t.sortKey);for(const r of i){const{geometry:i,index:o,sourceLayerIndex:a}=r,s=e[o].feature;this.addFeature(r,i,o,n),t.featureIndex.insert(s,i,o,a,this.index)}}update(e,t,n){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(e,t,this.stateDependentLayers,n)}isEmpty(){return 0===this.layoutVertexArray.length}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(e){this.uploaded||(this.layoutVertexBuffer=e.createVertexBuffer(this.layoutVertexArray,bo),this.indexBuffer=e.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(e),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}addFeature(e,t,n,r){for(const n of t)for(const t of n){const n=t.x,r=t.y;if(n<0||n>=Zo||r<0||r>=Zo)continue;const i=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray,e.sortKey),o=i.vertexLength;ea(this.layoutVertexArray,n,r,-1,-1),ea(this.layoutVertexArray,n,r,1,-1),ea(this.layoutVertexArray,n,r,1,1),ea(this.layoutVertexArray,n,r,-1,1),this.indexArray.emplaceBack(o,o+1,o+2),this.indexArray.emplaceBack(o,o+3,o+2),i.vertexLength+=4,i.primitiveLength+=2}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,e,n,{},r)}}function na(e,t){for(let n=0;n1){if(aa(e,t))return!0;for(let r=0;r1?n:n.sub(t)._mult(i)._add(t))}function ca(e,t){let n,r,i,o=!1;for(let a=0;at.y!=i.y>t.y&&t.x<(i.x-r.x)*(t.y-r.y)/(i.y-r.y)+r.x&&(o=!o)}return o}function da(e,t){let n=!1;for(let r=0,i=e.length-1;rt.y!=a.y>t.y&&t.x<(a.x-o.x)*(t.y-o.y)/(a.y-o.y)+o.x&&(n=!n)}return n}function fa(e,t,n){const r=n[0],i=n[2];if(e.xi.x&&t.x>i.x||e.yi.y&&t.y>i.y)return!1;const o=M(e,t,n[0]);return o!==M(e,t,n[1])||o!==M(e,t,n[2])||o!==M(e,t,n[3])}function ha(e,t,n){const r=t.paint.get(e).value;return"constant"===r.kind?r.value:n.programConfigurations.get(t.id).getMaxValue(e)}function pa(e){return Math.sqrt(e[0]*e[0]+e[1]*e[1])}function Aa(e,t,n,r,i){if(!t[0]&&!t[1])return e;const a=o.convert(t)._mult(i);"viewport"===n&&a._rotate(-r);const s=[];for(let t=0;tSa(e,t))}(l,s),f=c?u*a:u;for(const e of r)for(const t of e){const e=c?t:Sa(t,s);let n=f;const r=Ea([],[t.x,t.y,0,1],s);if("viewport"===this.paint.get("circle-pitch-scale")&&"map"===this.paint.get("circle-pitch-alignment")?n*=r[3]/o.cameraToCenterDistance:"map"===this.paint.get("circle-pitch-scale")&&"viewport"===this.paint.get("circle-pitch-alignment")&&(n*=o.cameraToCenterDistance/r[3]),ra(d,e,n))return!0}return!1}}function Sa(e,t){const n=Ea([],[e.x,e.y,0,1],t);return new o(n[0]/n[3],n[1]/n[3])}class Ta extends ta{}let Ca;Cr("HeatmapBucket",Ta,{omit:["layers"]});var La={get paint(){return Ca=Ca||new Ai({"heatmap-radius":new di(Z.paint_heatmap["heatmap-radius"]),"heatmap-weight":new di(Z.paint_heatmap["heatmap-weight"]),"heatmap-intensity":new ci(Z.paint_heatmap["heatmap-intensity"]),"heatmap-color":new pi(Z.paint_heatmap["heatmap-color"]),"heatmap-opacity":new ci(Z.paint_heatmap["heatmap-opacity"])})}};function Pa(e,{width:t,height:n},r,i){if(i){if(i instanceof Uint8ClampedArray)i=new Uint8Array(i.buffer);else if(i.length!==t*n*r)throw new RangeError(`mismatched image size. expected: ${i.length} but got: ${t*n*r}`)}else i=new Uint8Array(t*n*r);return e.width=t,e.height=n,e.data=i,e}function Ia(e,{width:t,height:n},r){if(t===e.width&&n===e.height)return;const i=Pa({},{width:t,height:n},r);Da(e,i,{x:0,y:0},{x:0,y:0},{width:Math.min(e.width,t),height:Math.min(e.height,n)},r),e.width=t,e.height=n,e.data=i.data}function Da(e,t,n,r,i,o){if(0===i.width||0===i.height)return t;if(i.width>e.width||i.height>e.height||n.x>e.width-i.width||n.y>e.height-i.height)throw new RangeError("out of range source coordinates for image copy");if(i.width>t.width||i.height>t.height||r.x>t.width-i.width||r.y>t.height-i.height)throw new RangeError("out of range destination coordinates for image copy");const a=e.data,s=t.data;if(a===s)throw new Error("srcData equals dstData, so image is already copied");for(let l=0;l{t[e.evaluationKey]=o;const a=e.expression.evaluate(t);i.data[n+r+0]=Math.floor(255*a.r/a.a),i.data[n+r+1]=Math.floor(255*a.g/a.a),i.data[n+r+2]=Math.floor(255*a.b/a.a),i.data[n+r+3]=Math.floor(255*a.a)};if(e.clips)for(let t=0,i=0;t80*n){r=o=e[0],i=a=e[1];for(var p=n;po&&(o=s),l>a&&(a=l);u=0!==(u=Math.max(o-r,a-i))?32767/u:0}return qa(f,h,n,r,i,u,0),h}function Ya(e,t,n,r,i){var o,a;if(i===As(e,t,n,r)>0)for(o=t;o=t;o-=r)a=fs(o,e[o],e[o+1],a);return a&&as(a,a.next)&&(hs(a),a=a.next),a}function Wa(e,t){if(!e)return e;t||(t=e);var n,r=e;do{if(n=!1,r.steiner||!as(r,r.next)&&0!==os(r.prev,r,r.next))r=r.next;else{if(hs(r),(r=t=r.prev)===r.next)break;n=!0}}while(n||r!==t);return t}function qa(e,t,n,r,i,o,a){if(e){!a&&o&&function(e,t,n,r){var i=e;do{0===i.z&&(i.z=ts(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,function(e){var t,n,r,i,o,a,s,l,u=1;do{for(n=e,e=null,o=null,a=0;n;){for(a++,r=n,s=0,t=0;t0||l>0&&r;)0!==s&&(0===l||!r||n.z<=r.z)?(i=n,n=n.nextZ,s--):(i=r,r=r.nextZ,l--),o?o.nextZ=i:e=i,i.prevZ=o,o=i;n=r}o.nextZ=null,u*=2}while(a>1)}(i)}(e,r,i,o);for(var s,l,u=e;e.prev!==e.next;)if(s=e.prev,l=e.next,o?Za(e,r,i,o):Xa(e))t.push(s.i/n|0),t.push(e.i/n|0),t.push(l.i/n|0),hs(e),e=l.next,u=l.next;else if((e=l)===u){a?1===a?qa(e=Ka(Wa(e),t,n),t,n,r,i,o,2):2===a&&Qa(e,t,n,r,i,o):qa(Wa(e),t,n,r,i,o,1);break}}}function Xa(e){var t=e.prev,n=e,r=e.next;if(os(t,n,r)>=0)return!1;for(var i=t.x,o=n.x,a=r.x,s=t.y,l=n.y,u=r.y,c=io?i>a?i:a:o>a?o:a,h=s>l?s>u?s:u:l>u?l:u,p=r.next;p!==t;){if(p.x>=c&&p.x<=f&&p.y>=d&&p.y<=h&&rs(i,s,o,l,a,u,p.x,p.y)&&os(p.prev,p,p.next)>=0)return!1;p=p.next}return!0}function Za(e,t,n,r){var i=e.prev,o=e,a=e.next;if(os(i,o,a)>=0)return!1;for(var s=i.x,l=o.x,u=a.x,c=i.y,d=o.y,f=a.y,h=sl?s>u?s:u:l>u?l:u,g=c>d?c>f?c:f:d>f?d:f,m=ts(h,p,t,n,r),y=ts(A,g,t,n,r),v=e.prevZ,b=e.nextZ;v&&v.z>=m&&b&&b.z<=y;){if(v.x>=h&&v.x<=A&&v.y>=p&&v.y<=g&&v!==i&&v!==a&&rs(s,c,l,d,u,f,v.x,v.y)&&os(v.prev,v,v.next)>=0)return!1;if(v=v.prevZ,b.x>=h&&b.x<=A&&b.y>=p&&b.y<=g&&b!==i&&b!==a&&rs(s,c,l,d,u,f,b.x,b.y)&&os(b.prev,b,b.next)>=0)return!1;b=b.nextZ}for(;v&&v.z>=m;){if(v.x>=h&&v.x<=A&&v.y>=p&&v.y<=g&&v!==i&&v!==a&&rs(s,c,l,d,u,f,v.x,v.y)&&os(v.prev,v,v.next)>=0)return!1;v=v.prevZ}for(;b&&b.z<=y;){if(b.x>=h&&b.x<=A&&b.y>=p&&b.y<=g&&b!==i&&b!==a&&rs(s,c,l,d,u,f,b.x,b.y)&&os(b.prev,b,b.next)>=0)return!1;b=b.nextZ}return!0}function Ka(e,t,n){var r=e;do{var i=r.prev,o=r.next.next;!as(i,o)&&ss(i,r,r.next,o)&&cs(i,o)&&cs(o,i)&&(t.push(i.i/n|0),t.push(r.i/n|0),t.push(o.i/n|0),hs(r),hs(r.next),r=e=o),r=r.next}while(r!==e);return Wa(r)}function Qa(e,t,n,r,i,o){var a=e;do{for(var s=a.next.next;s!==a.prev;){if(a.i!==s.i&&is(a,s)){var l=ds(a,s);return a=Wa(a,a.next),l=Wa(l,l.next),qa(a,t,n,r,i,o,0),void qa(l,t,n,r,i,o,0)}s=s.next}a=a.next}while(a!==e)}function Ja(e,t){return e.x-t.x}function $a(e,t){var n=function(e,t){var n,r=t,i=e.x,o=e.y,a=-1/0;do{if(o<=r.y&&o>=r.next.y&&r.next.y!==r.y){var s=r.x+(o-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(s<=i&&s>a&&(a=s,n=r.x=r.x&&r.x>=c&&i!==r.x&&rs(on.x||r.x===n.x&&es(n,r)))&&(n=r,f=l)),r=r.next}while(r!==u);return n}(e,t);if(!n)return t;var r=ds(n,e);return Wa(r,r.next),Wa(n,n.next)}function es(e,t){return os(e.prev,e,t.prev)<0&&os(t.next,e,e.next)<0}function ts(e,t,n,r,i){return(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=(e-n)*i|0)|e<<8))|e<<4))|e<<2))|e<<1))|(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=(t-r)*i|0)|t<<8))|t<<4))|t<<2))|t<<1))<<1}function ns(e){var t=e,n=e;do{(t.x=(e-a)*(o-s)&&(e-a)*(r-s)>=(n-a)*(t-s)&&(n-a)*(o-s)>=(i-a)*(r-s)}function is(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!function(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&&ss(n,n.next,e,t))return!0;n=n.next}while(n!==e);return!1}(e,t)&&(cs(e,t)&&cs(t,e)&&function(e,t){var n=e,r=!1,i=(e.x+t.x)/2,o=(e.y+t.y)/2;do{n.y>o!=n.next.y>o&&n.next.y!==n.y&&i<(n.next.x-n.x)*(o-n.y)/(n.next.y-n.y)+n.x&&(r=!r),n=n.next}while(n!==e);return r}(e,t)&&(os(e.prev,e,t.prev)||os(e,t.prev,t))||as(e,t)&&os(e.prev,e,e.next)>0&&os(t.prev,t,t.next)>0)}function os(e,t,n){return(t.y-e.y)*(n.x-t.x)-(t.x-e.x)*(n.y-t.y)}function as(e,t){return e.x===t.x&&e.y===t.y}function ss(e,t,n,r){var i=us(os(e,t,n)),o=us(os(e,t,r)),a=us(os(n,r,e)),s=us(os(n,r,t));return i!==o&&a!==s||!(0!==i||!ls(e,n,t))||!(0!==o||!ls(e,r,t))||!(0!==a||!ls(n,e,r))||!(0!==s||!ls(n,t,r))}function ls(e,t,n){return t.x<=Math.max(e.x,n.x)&&t.x>=Math.min(e.x,n.x)&&t.y<=Math.max(e.y,n.y)&&t.y>=Math.min(e.y,n.y)}function us(e){return e>0?1:e<0?-1:0}function cs(e,t){return os(e.prev,e,e.next)<0?os(e,t,e.next)>=0&&os(e,e.prev,t)>=0:os(e,t,e.prev)<0||os(e,e.next,t)<0}function ds(e,t){var n=new ps(e.i,e.x,e.y),r=new ps(t.i,t.x,t.y),i=e.next,o=t.prev;return e.next=t,t.prev=e,n.next=i,i.prev=n,r.next=n,n.prev=r,o.next=r,r.prev=o,r}function fs(e,t,n,r){var i=new ps(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 hs(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 ps(e,t,n){this.i=e,this.x=t,this.y=n,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}function As(e,t,n,r){for(var i=0,o=t,a=n-r;o0&&n.holes.push(r+=e[i-1].length)}return n};var gs=n(Va.exports);function ms(e,t,n,r,i){!function e(t,n,r,i,o){for(;i>r;){if(i-r>600){var a=i-r+1,s=n-r+1,l=Math.log(a),u=.5*Math.exp(2*l/3),c=.5*Math.sqrt(l*u*(a-u)/a)*(s-a/2<0?-1:1);e(t,n,Math.max(r,Math.floor(n-s*u/a+c)),Math.min(i,Math.floor(n+(a-s)*u/a+c)),o)}var d=t[n],f=r,h=i;for(ys(t,r,n),o(t[i],d)>0&&ys(t,r,i);f0;)h--}0===o(t[r],d)?ys(t,r,h):ys(t,++h,i),h<=n&&(r=h+1),n<=h&&(i=h-1)}}(e,t,n||0,r||e.length-1,i||vs)}function ys(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function vs(e,t){return et?1:0}function bs(e,t){const n=e.length;if(n<=1)return[e];const r=[];let i,o;for(let t=0;t1)for(let e=0;ee.id),this.index=e.index,this.hasPattern=!1,this.patternFeatures=[],this.layoutVertexArray=new ao,this.indexArray=new mo,this.indexArray2=new yo,this.programConfigurations=new Wo(e.layers,e.zoom),this.segments=new _o,this.segments2=new _o,this.stateDependentLayerIds=this.layers.filter(e=>e.isStateDependent()).map(e=>e.id)}populate(e,t,n){this.hasPattern=ws("fill",this.layers,t);const r=this.layers[0].layout.get("fill-sort-key"),i=!r.isConstant(),o=[];for(const{feature:a,id:s,index:l,sourceLayerIndex:u}of e){const e=this.layers[0]._featureFilter.needGeometry,c=$o(a,e);if(!this.layers[0]._featureFilter.filter(new ti(this.zoom),c,n))continue;const d=i?r.evaluate(c,{},n,t.availableImages):void 0,f={id:s,properties:a.properties,type:a.type,sourceLayerIndex:u,index:l,geometry:e?c.geometry:Jo(a),patterns:{},sortKey:d};o.push(f)}i&&o.sort((e,t)=>e.sortKey-t.sortKey);for(const r of o){const{geometry:i,index:o,sourceLayerIndex:a}=r;if(this.hasPattern){const e=xs("fill",this.layers,r,this.zoom,t);this.patternFeatures.push(e)}else this.addFeature(r,i,o,n,{});t.featureIndex.insert(e[o].feature,i,o,a,this.index)}}update(e,t,n){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(e,t,this.stateDependentLayers,n)}addFeatures(e,t,n){for(const e of this.patternFeatures)this.addFeature(e,e.geometry,e.index,t,n)}isEmpty(){return 0===this.layoutVertexArray.length}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(e){this.uploaded||(this.layoutVertexBuffer=e.createVertexBuffer(this.layoutVertexArray,Ha),this.indexBuffer=e.createIndexBuffer(this.indexArray),this.indexBuffer2=e.createIndexBuffer(this.indexArray2)),this.programConfigurations.upload(e),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.indexBuffer2.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.segments2.destroy())}addFeature(e,t,n,r,i){for(const e of bs(t,500)){let t=0;for(const n of e)t+=n.length;const n=this.segments.prepareSegment(t,this.layoutVertexArray,this.indexArray),r=n.vertexLength,i=[],o=[];for(const t of e){if(0===t.length)continue;t!==e[0]&&o.push(i.length/2);const n=this.segments2.prepareSegment(t.length,this.layoutVertexArray,this.indexArray2),r=n.vertexLength;this.layoutVertexArray.emplaceBack(t[0].x,t[0].y),this.indexArray2.emplaceBack(r+t.length-1,r),i.push(t[0].x),i.push(t[0].y);for(let e=1;e>3}if(i--,1===r||2===r)o+=e.readSVarint(),a+=e.readSVarint(),1===r&&(t&&s.push(t),t=[]),t.push(new Ds(o,a));else{if(7!==r)throw new Error("unknown command "+r);t&&t.push(t[0].clone())}}return t&&s.push(t),s},Rs.prototype.bbox=function(){var e=this._pbf;e.pos=this._geometry;for(var t=e.readVarint()+e.pos,n=1,r=0,i=0,o=0,a=1/0,s=-1/0,l=1/0,u=-1/0;e.pos>3}if(r--,1===n||2===n)(i+=e.readSVarint())s&&(s=i),(o+=e.readSVarint())u&&(u=o);else if(7!==n)throw new Error("unknown command "+n)}return[a,l,s,u]},Rs.prototype.toGeoJSON=function(e,t,n){var r,i,o=this.extent*Math.pow(2,n),a=this.extent*e,s=this.extent*t,l=this.loadGeometry(),u=Rs.types[this.type];function c(e){for(var t=0;t>3;t=1===r?e.readString():2===r?e.readFloat():3===r?e.readDouble():4===r?e.readVarint64():5===r?e.readVarint():6===r?e.readSVarint():7===r?e.readBoolean():null}return t}(n))}zs.prototype.feature=function(e){if(e<0||e>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[e];var t=this._pbf.readVarint()+this._pbf.pos;return new Ns(this._pbf,t,this.extent,this._keys,this._values)};var Hs=Bs;function Vs(e,t,n){if(3===e){var r=new Hs(n,n.readVarint()+n.pos);r.length&&(t[r.name]=r)}}Is.VectorTile=function(e,t){this.layers=e.readFields(Vs,{},t)},Is.VectorTileFeature=ks,Is.VectorTileLayer=Bs;const Gs=Is.VectorTileFeature.types,Ys=Math.pow(2,13);function Ws(e,t,n,r,i,o,a,s){e.emplaceBack(t,n,2*Math.floor(r*Ys)+a,i*Ys*2,o*Ys*2,Math.round(s))}class qs{constructor(e){this.zoom=e.zoom,this.overscaling=e.overscaling,this.layers=e.layers,this.layerIds=this.layers.map(e=>e.id),this.index=e.index,this.hasPattern=!1,this.layoutVertexArray=new so,this.centroidVertexArray=new io,this.indexArray=new mo,this.programConfigurations=new Wo(e.layers,e.zoom),this.segments=new _o,this.stateDependentLayerIds=this.layers.filter(e=>e.isStateDependent()).map(e=>e.id)}populate(e,t,n){this.features=[],this.hasPattern=ws("fill-extrusion",this.layers,t);for(const{feature:r,id:i,index:o,sourceLayerIndex:a}of e){const e=this.layers[0]._featureFilter.needGeometry,s=$o(r,e);if(!this.layers[0]._featureFilter.filter(new ti(this.zoom),s,n))continue;const l={id:i,sourceLayerIndex:a,index:o,geometry:e?s.geometry:Jo(r),properties:r.properties,type:r.type,patterns:{}};this.hasPattern?this.features.push(xs("fill-extrusion",this.layers,l,this.zoom,t)):this.addFeature(l,l.geometry,o,n,{}),t.featureIndex.insert(r,l.geometry,o,a,this.index,!0)}}addFeatures(e,t,n){for(const e of this.features){const{geometry:r}=e;this.addFeature(e,r,e.index,t,n)}}update(e,t,n){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(e,t,this.stateDependentLayers,n)}isEmpty(){return 0===this.layoutVertexArray.length&&0===this.centroidVertexArray.length}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(e){this.uploaded||(this.layoutVertexBuffer=e.createVertexBuffer(this.layoutVertexArray,Ps),this.centroidVertexBuffer=e.createVertexBuffer(this.centroidVertexArray,Ls.members,!0),this.indexBuffer=e.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(e),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.centroidVertexBuffer.destroy())}addFeature(e,t,n,r,i){const o={x:0,y:0,vertexCount:0};for(const n of bs(t,500)){let t=0;for(const e of n)t+=e.length;let r=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray);for(const e of n){if(0===e.length)continue;if(Zs(e))continue;let t=0;for(let n=0;n=1){const a=e[n-1];if(!Xs(i,a)){r.vertexLength+4>_o.MAX_VERTEX_ARRAY_LENGTH&&(r=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));const e=i.sub(a)._perp()._unit(),n=a.dist(i);t+n>32768&&(t=0),Ws(this.layoutVertexArray,i.x,i.y,e.x,e.y,0,0,t),Ws(this.layoutVertexArray,i.x,i.y,e.x,e.y,0,1,t),o.x+=2*i.x,o.y+=2*i.y,o.vertexCount+=2,t+=n,Ws(this.layoutVertexArray,a.x,a.y,e.x,e.y,0,0,t),Ws(this.layoutVertexArray,a.x,a.y,e.x,e.y,0,1,t),o.x+=2*a.x,o.y+=2*a.y,o.vertexCount+=2;const s=r.vertexLength;this.indexArray.emplaceBack(s,s+2,s+1),this.indexArray.emplaceBack(s+1,s+2,s+3),r.vertexLength+=4,r.primitiveLength+=2}}}}if(r.vertexLength+t>_o.MAX_VERTEX_ARRAY_LENGTH&&(r=this.segments.prepareSegment(t,this.layoutVertexArray,this.indexArray)),"Polygon"!==Gs[e.type])continue;const i=[],a=[],s=r.vertexLength;for(const e of n)if(0!==e.length){e!==n[0]&&a.push(i.length/2);for(let t=0;tZo)||e.y===t.y&&(e.y<0||e.y>Zo)}function Zs(e){return e.every(e=>e.x<0)||e.every(e=>e.x>Zo)||e.every(e=>e.y<0)||e.every(e=>e.y>Zo)}let Ks;Cr("FillExtrusionBucket",qs,{omit:["layers","features"]});var Qs={get paint(){return Ks=Ks||new Ai({"fill-extrusion-opacity":new ci(Z["paint_fill-extrusion"]["fill-extrusion-opacity"]),"fill-extrusion-color":new di(Z["paint_fill-extrusion"]["fill-extrusion-color"]),"fill-extrusion-translate":new ci(Z["paint_fill-extrusion"]["fill-extrusion-translate"]),"fill-extrusion-translate-anchor":new ci(Z["paint_fill-extrusion"]["fill-extrusion-translate-anchor"]),"fill-extrusion-pattern":new fi(Z["paint_fill-extrusion"]["fill-extrusion-pattern"]),"fill-extrusion-height":new di(Z["paint_fill-extrusion"]["fill-extrusion-height"]),"fill-extrusion-base":new di(Z["paint_fill-extrusion"]["fill-extrusion-base"]),"fill-extrusion-vertical-gradient":new ci(Z["paint_fill-extrusion"]["fill-extrusion-vertical-gradient"])})}};class Js extends mi{constructor(e){super(e,Qs)}createBucket(e){return new qs(e)}queryRadius(){return pa(this.paint.get("fill-extrusion-translate"))}is3D(){return!0}queryIntersectsFeature(e,t,n,r,i,a,s,l){const u=Aa(e,this.paint.get("fill-extrusion-translate"),this.paint.get("fill-extrusion-translate-anchor"),a.angle,s),c=this.paint.get("fill-extrusion-height").evaluate(t,n),d=this.paint.get("fill-extrusion-base").evaluate(t,n),f=function(e,t,n,r){const i=[];for(const n of e){const e=[n.x,n.y,0,1];Ea(e,e,t),i.push(new o(e[0]/e[3],e[1]/e[3]))}return i}(u,l),h=function(e,t,n,r){const i=[],a=[],s=r[8]*t,l=r[9]*t,u=r[10]*t,c=r[11]*t,d=r[8]*n,f=r[9]*n,h=r[10]*n,p=r[11]*n;for(const t of e){const e=[],n=[];for(const i of t){const t=i.x,a=i.y,A=r[0]*t+r[4]*a+r[12],g=r[1]*t+r[5]*a+r[13],m=r[2]*t+r[6]*a+r[14],y=r[3]*t+r[7]*a+r[15],v=m+u,b=y+c,_=A+d,w=g+f,x=m+h,M=y+p,E=new o((A+s)/b,(g+l)/b);E.z=v/b,e.push(E);const O=new o(_/M,w/M);O.z=x/M,n.push(O)}i.push(e),a.push(n)}return[i,a]}(r,d,c,l);return function(e,t,n){let r=1/0;ia(n,t)&&(r=el(n,t[0]));for(let i=0;ie.id),this.index=e.index,this.hasPattern=!1,this.patternFeatures=[],this.lineClipsArray=[],this.gradients={},this.layers.forEach(e=>{this.gradients[e.id]={}}),this.layoutVertexArray=new lo,this.layoutVertexArray2=new uo,this.indexArray=new mo,this.programConfigurations=new Wo(e.layers,e.zoom),this.segments=new _o,this.maxLineLength=0,this.stateDependentLayerIds=this.layers.filter(e=>e.isStateDependent()).map(e=>e.id)}populate(e,t,n){this.hasPattern=ws("line",this.layers,t);const r=this.layers[0].layout.get("line-sort-key"),i=!r.isConstant(),o=[];for(const{feature:t,id:a,index:s,sourceLayerIndex:l}of e){const e=this.layers[0]._featureFilter.needGeometry,u=$o(t,e);if(!this.layers[0]._featureFilter.filter(new ti(this.zoom),u,n))continue;const c=i?r.evaluate(u,{},n):void 0,d={id:a,properties:t.properties,type:t.type,sourceLayerIndex:l,index:s,geometry:e?u.geometry:Jo(t),patterns:{},sortKey:c};o.push(d)}i&&o.sort((e,t)=>e.sortKey-t.sortKey);for(const r of o){const{geometry:i,index:o,sourceLayerIndex:a}=r;if(this.hasPattern){const e=xs("line",this.layers,r,this.zoom,t);this.patternFeatures.push(e)}else this.addFeature(r,i,o,n,{});t.featureIndex.insert(e[o].feature,i,o,a,this.index)}}update(e,t,n){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(e,t,this.stateDependentLayers,n)}addFeatures(e,t,n){for(const e of this.patternFeatures)this.addFeature(e,e.geometry,e.index,t,n)}isEmpty(){return 0===this.layoutVertexArray.length}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(e){this.uploaded||(0!==this.layoutVertexArray2.length&&(this.layoutVertexBuffer2=e.createVertexBuffer(this.layoutVertexArray2,il)),this.layoutVertexBuffer=e.createVertexBuffer(this.layoutVertexArray,nl),this.indexBuffer=e.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(e),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}lineFeatureClips(e){if(e.properties&&Object.prototype.hasOwnProperty.call(e.properties,"mapbox_clip_start")&&Object.prototype.hasOwnProperty.call(e.properties,"mapbox_clip_end"))return{start:+e.properties.mapbox_clip_start,end:+e.properties.mapbox_clip_end}}addFeature(e,t,n,r,i){const o=this.layers[0].layout,a=o.get("line-join").evaluate(e,{}),s=o.get("line-cap"),l=o.get("line-miter-limit"),u=o.get("line-round-limit");this.lineClips=this.lineFeatureClips(e);for(const n of t)this.addLine(n,e,a,s,l,u);this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,e,n,i,r)}addLine(e,t,n,r,i,o){if(this.distance=0,this.scaledDistance=0,this.totalDistance=0,this.lineClips){this.lineClipsArray.push(this.lineClips);for(let t=0;t=2&&e[s-1].equals(e[s-2]);)s--;let l=0;for(;l0;if(_&&t>l){const e=d.dist(f);if(e>2*u){const t=d.sub(d.sub(f)._mult(u/e)._round());this.updateDistance(f,t),this.addCurrentVertex(t,p,0,0,c),f=t}}const x=f&&h;let M=x?n:a?"butt":r;if(x&&"round"===M&&(vi&&(M="bevel"),"bevel"===M&&(v>2&&(M="flipbevel"),v100)g=A.mult(-1);else{const e=v*p.add(A).mag()/p.sub(A).mag();g._perp()._mult(e*(w?-1:1))}this.addCurrentVertex(d,g,0,0,c),this.addCurrentVertex(d,g.mult(-1),0,0,c)}else if("bevel"===M||"fakeround"===M){const e=-Math.sqrt(v*v-1),t=w?e:0,n=w?0:e;if(f&&this.addCurrentVertex(d,p,t,n,c),"fakeround"===M){const e=Math.round(180*b/Math.PI/20);for(let t=1;t2*u){const t=d.add(h.sub(d)._mult(u/e)._round());this.updateDistance(d,t),this.addCurrentVertex(t,A,0,0,c),d=t}}}}addCurrentVertex(e,t,n,r,i,o=!1){const a=t.y*r-t.x,s=-t.y-t.x*r;this.addHalfVertex(e,t.x+t.y*n,t.y-t.x*n,o,!1,n,i),this.addHalfVertex(e,a,s,o,!0,-r,i),this.distance>sl/2&&0===this.totalDistance&&(this.distance=0,this.updateScaledDistance(),this.addCurrentVertex(e,t,n,r,i,o))}addHalfVertex({x:e,y:t},n,r,i,o,a,s){const l=.5*(this.lineClips?this.scaledDistance*(sl-1):this.scaledDistance);this.layoutVertexArray.emplaceBack((e<<1)+(i?1:0),(t<<1)+(o?1:0),Math.round(63*n)+128,Math.round(63*r)+128,1+(0===a?0:a<0?-1:1)|(63&l)<<2,l>>6),this.lineClips&&this.layoutVertexArray2.emplaceBack((this.scaledDistance-this.lineClips.start)/(this.lineClips.end-this.lineClips.start),this.lineClipsArray.length);const u=s.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,this.e2,u),s.primitiveLength++),o?this.e2=u:this.e1=u}updateScaledDistance(){this.scaledDistance=this.lineClips?this.lineClips.start+(this.lineClips.end-this.lineClips.start)*this.distance/this.totalDistance:this.distance}updateDistance(e,t){this.distance+=e.dist(t),this.updateScaledDistance()}}let ul,cl;Cr("LineBucket",ll,{omit:["layers","patternFeatures"]});var dl={get paint(){return cl=cl||new Ai({"line-opacity":new di(Z.paint_line["line-opacity"]),"line-color":new di(Z.paint_line["line-color"]),"line-translate":new ci(Z.paint_line["line-translate"]),"line-translate-anchor":new ci(Z.paint_line["line-translate-anchor"]),"line-width":new di(Z.paint_line["line-width"]),"line-gap-width":new di(Z.paint_line["line-gap-width"]),"line-offset":new di(Z.paint_line["line-offset"]),"line-blur":new di(Z.paint_line["line-blur"]),"line-dasharray":new hi(Z.paint_line["line-dasharray"]),"line-pattern":new fi(Z.paint_line["line-pattern"]),"line-gradient":new pi(Z.paint_line["line-gradient"])})},get layout(){return ul=ul||new Ai({"line-cap":new ci(Z.layout_line["line-cap"]),"line-join":new di(Z.layout_line["line-join"]),"line-miter-limit":new ci(Z.layout_line["line-miter-limit"]),"line-round-limit":new ci(Z.layout_line["line-round-limit"]),"line-sort-key":new di(Z.layout_line["line-sort-key"])})}};class fl extends di{possiblyEvaluate(e,t){return t=new ti(Math.floor(t.zoom),{now:t.now,fadeDuration:t.fadeDuration,zoomHistory:t.zoomHistory,transition:t.transition}),super.possiblyEvaluate(e,t)}evaluate(e,t,n,r){return t=m({},t,{zoom:Math.floor(t.zoom)}),super.evaluate(e,t,n,r)}}let hl;class pl extends mi{constructor(e){super(e,dl),this.gradientVersion=0,hl||(hl=new fl(dl.paint.properties["line-width"].specification),hl.useIntegerZoom=!0)}_handleSpecialPaintPropertyUpdate(e){if("line-gradient"===e){const e=this.gradientExpression();this.stepInterpolant=!!function(e){return void 0!==e._styleExpression}(e)&&e._styleExpression.expression instanceof Nt,this.gradientVersion=(this.gradientVersion+1)%Number.MAX_SAFE_INTEGER}}gradientExpression(){return this._transitionablePaint._values["line-gradient"].value.expression}recalculate(e,t){super.recalculate(e,t),this.paint._values["line-floorwidth"]=hl.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,e)}createBucket(e){return new ll(e)}queryRadius(e){const t=e,n=Al(ha("line-width",this,t),ha("line-gap-width",this,t)),r=ha("line-offset",this,t);return n/2+Math.abs(r)+pa(this.paint.get("line-translate"))}queryIntersectsFeature(e,t,n,r,i,a,s){const l=Aa(e,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),a.angle,s),u=s/2*Al(this.paint.get("line-width").evaluate(t,n),this.paint.get("line-gap-width").evaluate(t,n)),c=this.paint.get("line-offset").evaluate(t,n);return c&&(r=function(e,t){const n=[];for(let r=0;r=3)for(let t=0;t0?t+2*e:e}const gl=_i([{name:"a_pos_offset",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint16"},{name:"a_pixeloffset",components:4,type:"Int16"}],4),ml=_i([{name:"a_projected_pos",components:3,type:"Float32"}],4);_i([{name:"a_fade_opacity",components:1,type:"Uint32"}],4);const yl=_i([{name:"a_placed",components:2,type:"Uint8"},{name:"a_shift",components:2,type:"Float32"}]);_i([{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"}]);const vl=_i([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4),bl=_i([{name:"a_pos",components:2,type:"Float32"},{name:"a_radius",components:1,type:"Float32"},{name:"a_flags",components:2,type:"Int16"}],4);function _l(e,t,n){return e.sections.forEach(e=>{e.text=function(e,t,n){const r=t.layout.get("text-transform").evaluate(n,{});return"uppercase"===r?e=e.toLocaleUpperCase():"lowercase"===r&&(e=e.toLocaleLowerCase()),ei.applyArabicShaping&&(e=ei.applyArabicShaping(e)),e}(e.text,t,n)}),e}_i([{name:"triangle",components:3,type:"Uint16"}]),_i([{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"}]),_i([{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",name:"collisionCircleDiameter"},{type:"Uint16",name:"textAnchorOffsetStartIndex"},{type:"Uint16",name:"textAnchorOffsetEndIndex"}]),_i([{type:"Float32",name:"offsetX"}]),_i([{type:"Int16",name:"x"},{type:"Int16",name:"y"},{type:"Int16",name:"tileUnitDistanceFromAnchor"}]),_i([{type:"Uint16",name:"textAnchor"},{type:"Float32",components:2,name:"textOffset"}]);const wl={"!":"︕","#":"#",$:"$","%":"%","&":"&","(":"︵",")":"︶","*":"*","+":"+",",":"︐","-":"︲",".":"・","/":"/",":":"︓",";":"︔","<":"︿","=":"=",">":"﹀","?":"︖","@":"@","[":"﹇","\\":"\","]":"﹈","^":"^",_:"︳","`":"`","{":"︷","|":"―","}":"︸","~":"~","¢":"¢","£":"£","¥":"¥","¦":"¦","¬":"¬","¯":" ̄","–":"︲","—":"︱","‘":"﹃","’":"﹄","“":"﹁","”":"﹂","…":"︙","‧":"・","₩":"₩","、":"︑","。":"︒","〈":"︿","〉":"﹀","《":"︽","》":"︾","「":"﹁","」":"﹂","『":"﹃","』":"﹄","【":"︻","】":"︼","〔":"︹","〕":"︺","〖":"︗","〗":"︘","!":"︕","(":"︵",")":"︶",",":"︐","-":"︲",".":"・",":":"︓",";":"︔","<":"︿",">":"﹀","?":"︖","[":"﹇","]":"﹈","_":"︳","{":"︷","|":"―","}":"︸","⦅":"︵","⦆":"︶","。":"︒","「":"﹁","」":"﹂"};var xl=Ol,Ml=function(e,t,n,r,i){var o,a,s=8*i-r-1,l=(1<>1,c=-7,d=n?i-1:0,f=n?-1:1,h=e[t+d];for(d+=f,o=h&(1<<-c)-1,h>>=-c,c+=s;c>0;o=256*o+e[t+d],d+=f,c-=8);for(a=o&(1<<-c)-1,o>>=-c,c+=r;c>0;a=256*a+e[t+d],d+=f,c-=8);if(0===o)o=1-u;else{if(o===l)return a?NaN:1/0*(h?-1:1);a+=Math.pow(2,r),o-=u}return(h?-1:1)*a*Math.pow(2,o-r)},El=function(e,t,n,r,i,o){var a,s,l,u=8*o-i-1,c=(1<>1,f=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,h=r?0:o-1,p=r?1:-1,A=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=c):(a=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-a))<1&&(a--,l*=2),(t+=a+d>=1?f/l:f*Math.pow(2,1-d))*l>=2&&(a++,l/=2),a+d>=c?(s=0,a=c):a+d>=1?(s=(t*l-1)*Math.pow(2,i),a+=d):(s=t*Math.pow(2,d-1)*Math.pow(2,i),a=0));i>=8;e[n+h]=255&s,h+=p,s/=256,i-=8);for(a=a<0;e[n+h]=255&a,h+=p,a/=256,u-=8);e[n+h-p]|=128*A};function Ol(e){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(e)?e:new Uint8Array(e||0),this.pos=0,this.type=0,this.length=this.buf.length}Ol.Varint=0,Ol.Fixed64=1,Ol.Bytes=2,Ol.Fixed32=5;var Sl=4294967296,Tl=1/Sl,Cl="undefined"==typeof TextDecoder?null:new TextDecoder("utf8");function Ll(e){return e.type===Ol.Bytes?e.readVarint()+e.pos:e.pos+1}function Pl(e,t,n){return n?4294967296*t+(e>>>0):4294967296*(t>>>0)+(e>>>0)}function Il(e,t,n){var r=t<=16383?1:t<=2097151?2:t<=268435455?3:Math.floor(Math.log(t)/(7*Math.LN2));n.realloc(r);for(var i=n.pos-1;i>=e;i--)n.buf[i+r]=n.buf[i]}function Dl(e,t){for(var n=0;n>>8,e[n+2]=t>>>16,e[n+3]=t>>>24}function Gl(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16)+(e[t+3]<<24)}Ol.prototype={destroy:function(){this.buf=null},readFields:function(e,t,n){for(n=n||this.length;this.pos>3,o=this.pos;this.type=7&r,e(i,t,this),this.pos===o&&this.skip(r)}return t},readMessage:function(e,t){return this.readFields(e,t,this.readVarint()+this.pos)},readFixed32:function(){var e=Hl(this.buf,this.pos);return this.pos+=4,e},readSFixed32:function(){var e=Gl(this.buf,this.pos);return this.pos+=4,e},readFixed64:function(){var e=Hl(this.buf,this.pos)+Hl(this.buf,this.pos+4)*Sl;return this.pos+=8,e},readSFixed64:function(){var e=Hl(this.buf,this.pos)+Gl(this.buf,this.pos+4)*Sl;return this.pos+=8,e},readFloat:function(){var e=Ml(this.buf,this.pos,!0,23,4);return this.pos+=4,e},readDouble:function(){var e=Ml(this.buf,this.pos,!0,52,8);return this.pos+=8,e},readVarint:function(e){var t,n,r=this.buf;return t=127&(n=r[this.pos++]),n<128?t:(t|=(127&(n=r[this.pos++]))<<7,n<128?t:(t|=(127&(n=r[this.pos++]))<<14,n<128?t:(t|=(127&(n=r[this.pos++]))<<21,n<128?t:function(e,t,n){var r,i,o=n.buf;if(r=(112&(i=o[n.pos++]))>>4,i<128)return Pl(e,r,t);if(r|=(127&(i=o[n.pos++]))<<3,i<128)return Pl(e,r,t);if(r|=(127&(i=o[n.pos++]))<<10,i<128)return Pl(e,r,t);if(r|=(127&(i=o[n.pos++]))<<17,i<128)return Pl(e,r,t);if(r|=(127&(i=o[n.pos++]))<<24,i<128)return Pl(e,r,t);if(r|=(1&(i=o[n.pos++]))<<31,i<128)return Pl(e,r,t);throw new Error("Expected varint not more than 10 bytes")}(t|=(15&(n=r[this.pos]))<<28,e,this))))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var e=this.readVarint();return e%2==1?(e+1)/-2:e/2},readBoolean:function(){return Boolean(this.readVarint())},readString:function(){var e=this.readVarint()+this.pos,t=this.pos;return this.pos=e,e-t>=12&&Cl?function(e,t,n){return Cl.decode(e.subarray(t,n))}(this.buf,t,e):function(e,t,n){for(var r="",i=t;i239?4:l>223?3:l>191?2:1;if(i+c>n)break;1===c?l<128&&(u=l):2===c?128==(192&(o=e[i+1]))&&(u=(31&l)<<6|63&o)<=127&&(u=null):3===c?(a=e[i+2],128==(192&(o=e[i+1]))&&128==(192&a)&&((u=(15&l)<<12|(63&o)<<6|63&a)<=2047||u>=55296&&u<=57343)&&(u=null)):4===c&&(a=e[i+2],s=e[i+3],128==(192&(o=e[i+1]))&&128==(192&a)&&128==(192&s)&&((u=(15&l)<<18|(63&o)<<12|(63&a)<<6|63&s)<=65535||u>=1114112)&&(u=null)),null===u?(u=65533,c=1):u>65535&&(u-=65536,r+=String.fromCharCode(u>>>10&1023|55296),u=56320|1023&u),r+=String.fromCharCode(u),i+=c}return r}(this.buf,t,e)},readBytes:function(){var e=this.readVarint()+this.pos,t=this.buf.subarray(this.pos,e);return this.pos=e,t},readPackedVarint:function(e,t){if(this.type!==Ol.Bytes)return e.push(this.readVarint(t));var n=Ll(this);for(e=e||[];this.pos127;);else if(t===Ol.Bytes)this.pos=this.readVarint()+this.pos;else if(t===Ol.Fixed32)this.pos+=4;else{if(t!==Ol.Fixed64)throw new Error("Unimplemented type: "+t);this.pos+=8}},writeTag:function(e,t){this.writeVarint(e<<3|t)},realloc:function(e){for(var t=this.length||16;t268435455||e<0?function(e,t){var n,r;if(e>=0?(n=e%4294967296|0,r=e/4294967296|0):(r=~(-e/4294967296),4294967295^(n=~(-e%4294967296))?n=n+1|0:(n=0,r=r+1|0)),e>=0x10000000000000000||e<-0x10000000000000000)throw new Error("Given varint doesn't fit into 10 bytes");t.realloc(10),function(e,t,n){n.buf[n.pos++]=127&e|128,e>>>=7,n.buf[n.pos++]=127&e|128,e>>>=7,n.buf[n.pos++]=127&e|128,e>>>=7,n.buf[n.pos++]=127&e|128,n.buf[n.pos]=127&(e>>>=7)}(n,0,t),function(e,t){var n=(7&e)<<4;t.buf[t.pos++]|=n|((e>>>=3)?128:0),e&&(t.buf[t.pos++]=127&e|((e>>>=7)?128:0),e&&(t.buf[t.pos++]=127&e|((e>>>=7)?128:0),e&&(t.buf[t.pos++]=127&e|((e>>>=7)?128:0),e&&(t.buf[t.pos++]=127&e|((e>>>=7)?128:0),e&&(t.buf[t.pos++]=127&e)))))}(r,t)}(e,this):(this.realloc(4),this.buf[this.pos++]=127&e|(e>127?128:0),e<=127||(this.buf[this.pos++]=127&(e>>>=7)|(e>127?128:0),e<=127||(this.buf[this.pos++]=127&(e>>>=7)|(e>127?128:0),e<=127||(this.buf[this.pos++]=e>>>7&127))))},writeSVarint:function(e){this.writeVarint(e<0?2*-e-1:2*e)},writeBoolean:function(e){this.writeVarint(Boolean(e))},writeString:function(e){e=String(e),this.realloc(4*e.length),this.pos++;var t=this.pos;this.pos=function(e,t,n){for(var r,i,o=0;o55295&&r<57344){if(!i){r>56319||o+1===t.length?(e[n++]=239,e[n++]=191,e[n++]=189):i=r;continue}if(r<56320){e[n++]=239,e[n++]=191,e[n++]=189,i=r;continue}r=i-55296<<10|r-56320|65536,i=null}else i&&(e[n++]=239,e[n++]=191,e[n++]=189,i=null);r<128?e[n++]=r:(r<2048?e[n++]=r>>6|192:(r<65536?e[n++]=r>>12|224:(e[n++]=r>>18|240,e[n++]=r>>12&63|128),e[n++]=r>>6&63|128),e[n++]=63&r|128)}return n}(this.buf,e,this.pos);var n=this.pos-t;n>=128&&Il(t,n,this),this.pos=t-1,this.writeVarint(n),this.pos+=n},writeFloat:function(e){this.realloc(4),El(this.buf,e,this.pos,!0,23,4),this.pos+=4},writeDouble:function(e){this.realloc(8),El(this.buf,e,this.pos,!0,52,8),this.pos+=8},writeBytes:function(e){var t=e.length;this.writeVarint(t),this.realloc(t);for(var n=0;n=128&&Il(n,r,this),this.pos=n-1,this.writeVarint(r),this.pos+=r},writeMessage:function(e,t,n){this.writeTag(e,Ol.Bytes),this.writeRawMessage(t,n)},writePackedVarint:function(e,t){t.length&&this.writeMessage(e,Dl,t)},writePackedSVarint:function(e,t){t.length&&this.writeMessage(e,kl,t)},writePackedBoolean:function(e,t){t.length&&this.writeMessage(e,Fl,t)},writePackedFloat:function(e,t){t.length&&this.writeMessage(e,Rl,t)},writePackedDouble:function(e,t){t.length&&this.writeMessage(e,jl,t)},writePackedFixed32:function(e,t){t.length&&this.writeMessage(e,Nl,t)},writePackedSFixed32:function(e,t){t.length&&this.writeMessage(e,Bl,t)},writePackedFixed64:function(e,t){t.length&&this.writeMessage(e,zl,t)},writePackedSFixed64:function(e,t){t.length&&this.writeMessage(e,Ul,t)},writeBytesField:function(e,t){this.writeTag(e,Ol.Bytes),this.writeBytes(t)},writeFixed32Field:function(e,t){this.writeTag(e,Ol.Fixed32),this.writeFixed32(t)},writeSFixed32Field:function(e,t){this.writeTag(e,Ol.Fixed32),this.writeSFixed32(t)},writeFixed64Field:function(e,t){this.writeTag(e,Ol.Fixed64),this.writeFixed64(t)},writeSFixed64Field:function(e,t){this.writeTag(e,Ol.Fixed64),this.writeSFixed64(t)},writeVarintField:function(e,t){this.writeTag(e,Ol.Varint),this.writeVarint(t)},writeSVarintField:function(e,t){this.writeTag(e,Ol.Varint),this.writeSVarint(t)},writeStringField:function(e,t){this.writeTag(e,Ol.Bytes),this.writeString(t)},writeFloatField:function(e,t){this.writeTag(e,Ol.Fixed32),this.writeFloat(t)},writeDoubleField:function(e,t){this.writeTag(e,Ol.Fixed64),this.writeDouble(t)},writeBooleanField:function(e,t){this.writeVarintField(e,Boolean(t))}};var Yl,Wl=n(xl);function ql(e,t,n){1===e&&n.readMessage(Xl,t)}function Xl(e,t,n){if(3===e){const{id:e,bitmap:r,width:i,height:o,left:a,top:s,advance:l}=n.readMessage(Zl,{});t.push({id:e,bitmap:new ka({width:i+6,height:o+6},r),metrics:{width:i,height:o,left:a,top:s,advance:l}})}}function Zl(e,t,n){1===e?t.id=n.readVarint():2===e?t.bitmap=n.readBytes():3===e?t.width=n.readVarint():4===e?t.height=n.readVarint():5===e?t.left=n.readSVarint():6===e?t.top=n.readSVarint():7===e&&(t.advance=n.readVarint())}function Kl(e){let t=0,n=0;for(const r of e)t+=r.w*r.h,n=Math.max(n,r.w);e.sort((e,t)=>t.h-e.h);const r=[{x:0,y:0,w:Math.max(Math.ceil(Math.sqrt(t/.95)),n),h:1/0}];let i=0,o=0;for(const t of e)for(let e=r.length-1;e>=0;e--){const n=r[e];if(!(t.w>n.w||t.h>n.h)){if(t.x=n.x,t.y=n.y,o=Math.max(o,t.y+t.h),i=Math.max(i,t.x+t.w),t.w===n.w&&t.h===n.h){const t=r.pop();e=0&&n>=e&&nu[this.text.charCodeAt(n)];n--)t--;this.text=this.text.substring(e,t),this.sectionIndex=this.sectionIndex.slice(e,t)}substring(e,t){const n=new eu;return n.text=this.text.substring(e,t),n.sectionIndex=this.sectionIndex.slice(e,t),n.sections=this.sections,n}toString(){return this.text}getMaxScale(){return this.sectionIndex.reduce((e,t)=>Math.max(e,this.sections[t].scale),0)}addTextSection(e,t){this.text+=e.text,this.sections.push($l.forText(e.scale,e.fontStack||t));const n=this.sections.length-1;for(let t=0;t=63743?null:++this.imageSectionID:(this.imageSectionID=57344,this.imageSectionID)}}function tu(t,n,r,i,o,a,s,l,u,c,d,f,h,p,A,g){const m=eu.fromFeature(t,o);let y;f===e.ai.vertical&&m.verticalizePunctuation();const{processBidirectionalText:v,processStyledBidirectionalText:b}=ei;if(v&&1===m.sections.length){y=[];const e=v(m.toString(),lu(m,c,a,n,i,p,A));for(const t of e){const e=new eu;e.text=t,e.sections=m.sections;for(let n=0;n0&&r>w&&(w=r)}else{const e=r[A.fontStack],t=e&&e[m];if(t&&t.rect)x=t.rect,b=t.metrics;else{const e=n[A.fontStack],t=e&&e[m];if(!t)continue;b=t.metrics}y=24*(o-A.scale)}O?(t.verticalizable=!0,_.push({glyph:m,imageName:M,x:h,y:p+y,vertical:O,scale:A.scale,fontStack:A.fontStack,sectionIndex:g,metrics:b,rect:x}),h+=E*A.scale+c):(_.push({glyph:m,imageName:M,x:h,y:p+y,vertical:O,scale:A.scale,fontStack:A.fontStack,sectionIndex:g,metrics:b,rect:x}),h+=b.advance*A.scale+c)}0!==_.length&&(A=Math.max(h-c,A),cu(_,0,_.length-1,m,w)),h=0;const x=a*o+w;b.lineOffset=Math.max(w,l),p+=x,g=Math.max(x,g),++y}var v;const b=p- -17,{horizontalAlign:_,verticalAlign:w}=uu(s);(function(e,t,n,r,i,o,a,s,l){const u=(t-n)*i;let c=0;c=o!==a?-s*r- -17:(-r*l+.5)*a;for(const t of e)for(const e of t.positionedGlyphs)e.x+=u,e.y+=c})(t.positionedLines,m,_,w,A,g,a,b,o.length),t.top+=-w*b,t.bottom=t.top+b,t.left+=-_*A,t.right=t.left+A}(w,n,r,i,y,s,l,u,f,c,h,g),!function(e){for(const t of e)if(0!==t.positionedGlyphs.length)return!1;return!0}(_)&&w}const nu={9:!0,10:!0,11:!0,12:!0,13:!0,32:!0},ru={10:!0,32:!0,38:!0,40:!0,41:!0,43:!0,45:!0,47:!0,173:!0,183:!0,8203:!0,8208:!0,8211:!0,8231:!0};function iu(e,t,n,r,i,o){if(t.imageName){const e=r[t.imageName];return e?e.displaySize[0]*t.scale*24/o+i:0}{const r=n[t.fontStack],o=r&&r[e];return o?o.metrics.advance*t.scale+i:0}}function ou(e,t,n,r){const i=Math.pow(e-t,2);return r?e=0;let c=0;for(let n=0;ne.id),this.index=t.index,this.pixelRatio=t.pixelRatio,this.sourceLayerIndex=t.sourceLayerIndex,this.hasPattern=!1,this.hasRTLText=!1,this.sortKeyRanges=[],this.collisionCircleArray=[],this.placementInvProjMatrix=_a([]),this.placementViewportMatrix=_a([]);const n=this.layers[0]._unevaluatedLayout._values;this.textSizeData=Au(this.zoom,n["text-size"]),this.iconSizeData=Au(this.zoom,n["icon-size"]);const r=this.layers[0].layout,i=r.get("symbol-sort-key"),o=r.get("symbol-z-order");this.canOverlap="never"!==gu(r,"text-overlap","text-allow-overlap")||"never"!==gu(r,"icon-overlap","icon-allow-overlap")||r.get("text-ignore-placement")||r.get("icon-ignore-placement"),this.sortFeaturesByKey="viewport-y"!==o&&!i.isConstant(),this.sortFeaturesByY=("viewport-y"===o||"auto"===o&&!this.sortFeaturesByKey)&&this.canOverlap,"point"===r.get("symbol-placement")&&(this.writingModes=r.get("text-writing-mode").map(t=>e.ai[t])),this.stateDependentLayerIds=this.layers.filter(e=>e.isStateDependent()).map(e=>e.id),this.sourceID=t.sourceID}createArrays(){this.text=new wu(new Wo(this.layers,this.zoom,e=>/^text/.test(e))),this.icon=new wu(new Wo(this.layers,this.zoom,e=>/^icon/.test(e))),this.glyphOffsetArray=new Ji,this.lineVertexArray=new $i,this.symbolInstances=new Qi,this.textAnchorOffsets=new to}calculateGlyphDependencies(e,t,n,r,i){for(let o=0;o0)&&("constant"!==a.value.kind||a.value.value.length>0),c="constant"!==l.value.kind||!!l.value.value||Object.keys(l.parameters).length>0,d=o.get("symbol-sort-key");if(this.features=[],!u&&!c)return;const f=n.iconDependencies,h=n.glyphDependencies,p=n.availableImages,A=new ti(this.zoom);for(const{feature:n,id:s,index:l,sourceLayerIndex:g}of t){const t=i._featureFilter.needGeometry,m=$o(n,t);if(!i._featureFilter.filter(A,m,r))continue;let y,v;if(t||(m.geometry=Jo(n)),u){const e=i.getValueAndResolveTokens("text-field",m,r,p),t=Ze.factory(e);_u(t)&&(this.hasRTLText=!0),(!this.hasRTLText||"unavailable"===Jr()||this.hasRTLText&&ei.isParsed())&&(y=_l(t,i,m))}if(c){const e=i.getValueAndResolveTokens("icon-image",m,r,p);v=e instanceof $e?e:$e.fromString(e)}if(!y&&!v)continue;const b=this.sortFeaturesByKey?d.evaluate(m,{},r):void 0;if(this.features.push({id:s,text:y,icon:v,index:l,sourceLayerIndex:g,geometry:m.geometry,properties:n.properties,type:mu[n.type],sortKey:b}),v&&(f[v.name]=!0),y){const t=a.evaluate(m,{},r).join(","),n="viewport"!==o.get("text-rotation-alignment")&&"point"!==o.get("symbol-placement");this.allowVerticalPlacement=this.writingModes&&this.writingModes.indexOf(e.ai.vertical)>=0;for(const e of y.sections)if(e.image)f[e.image.name]=!0;else{const r=Rr(y.toString()),i=e.fontStack||t,o=h[i]=h[i]||{};this.calculateGlyphDependencies(e.text,o,n,this.allowVerticalPlacement,r)}}}"line"===o.get("symbol-placement")&&(this.features=function(e){const t={},n={},r=[];let i=0;function o(t){r.push(e[t]),i++}function a(e,t,i){const o=n[e];return delete n[e],n[t]=o,r[o].geometry[0].pop(),r[o].geometry[0]=r[o].geometry[0].concat(i[0]),o}function s(e,n,i){const o=t[n];return delete t[n],t[e]=o,r[o].geometry[0].shift(),r[o].geometry[0]=i[0].concat(r[o].geometry[0]),o}function l(e,t,n){const r=n?t[0][t[0].length-1]:t[0][0];return`${e}:${r.x}:${r.y}`}for(let u=0;ue.geometry)}(this.features)),this.sortFeaturesByKey&&this.features.sort((e,t)=>e.sortKey-t.sortKey)}update(e,t,n){this.stateDependentLayers.length&&(this.text.programConfigurations.updatePaintArrays(e,t,this.layers,n),this.icon.programConfigurations.updatePaintArrays(e,t,this.layers,n))}isEmpty(){return 0===this.symbolInstances.length&&!this.hasRTLText}uploadPending(){return!this.uploaded||this.text.programConfigurations.needsUpload||this.icon.programConfigurations.needsUpload}upload(e){!this.uploaded&&this.hasDebugData()&&(this.textCollisionBox.upload(e),this.iconCollisionBox.upload(e)),this.text.upload(e,this.sortFeaturesByY,!this.uploaded,this.text.programConfigurations.needsUpload),this.icon.upload(e,this.sortFeaturesByY,!this.uploaded,this.icon.programConfigurations.needsUpload),this.uploaded=!0}destroyDebugData(){this.textCollisionBox.destroy(),this.iconCollisionBox.destroy()}destroy(){this.text.destroy(),this.icon.destroy(),this.hasDebugData()&&this.destroyDebugData()}addToLineVertexArray(e,t){const n=this.lineVertexArray.length;if(void 0!==e.segment){let n=e.dist(t[e.segment+1]),r=e.dist(t[e.segment]);const i={};for(let r=e.segment+1;r=0;n--)i[n]={x:t[n].x,y:t[n].y,tileUnitDistanceFromAnchor:r},n>0&&(r+=t[n-1].dist(t[n]));for(let e=0;e0}hasIconData(){return this.icon.segments.get().length>0}hasDebugData(){return this.textCollisionBox&&this.iconCollisionBox}hasTextCollisionBoxData(){return this.hasDebugData()&&this.textCollisionBox.segments.get().length>0}hasIconCollisionBoxData(){return this.hasDebugData()&&this.iconCollisionBox.segments.get().length>0}addIndicesForPlacedSymbol(e,t){const n=e.placedSymbolArray.get(t),r=n.vertexStartIndex+4*n.numGlyphs;for(let t=n.vertexStartIndex;tr[e]-r[t]||i[t]-i[e]),o}addToSortKeyRanges(e,t){const n=this.sortKeyRanges[this.sortKeyRanges.length-1];n&&n.sortKey===t?n.symbolInstanceEnd=e+1:this.sortKeyRanges.push({sortKey:t,symbolInstanceStart:e,symbolInstanceEnd:e+1})}sortFeatures(e){if(this.sortFeaturesByY&&this.sortedAngle!==e&&!(this.text.segments.get().length>1||this.icon.segments.get().length>1)){this.symbolInstanceIndexes=this.getSortedSymbolIndexes(e),this.sortedAngle=e,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(const e of this.symbolInstanceIndexes){const t=this.symbolInstances.get(e);this.featureSortOrder.push(t.featureIndex),[t.rightJustifiedTextSymbolIndex,t.centerJustifiedTextSymbolIndex,t.leftJustifiedTextSymbolIndex].forEach((e,t,n)=>{e>=0&&n.indexOf(e)===t&&this.addIndicesForPlacedSymbol(this.text,e)}),t.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,t.verticalPlacedTextSymbolIndex),t.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,t.placedIconSymbolIndex),t.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,t.verticalPlacedIconSymbolIndex)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}}}let Eu,Ou;Cr("SymbolBucket",Mu,{omit:["layers","collisionBoxArray","features","compareText"]}),Mu.MAX_GLYPHS=65535,Mu.addDynamicAttributes=bu;var Su={get paint(){return Ou=Ou||new Ai({"icon-opacity":new di(Z.paint_symbol["icon-opacity"]),"icon-color":new di(Z.paint_symbol["icon-color"]),"icon-halo-color":new di(Z.paint_symbol["icon-halo-color"]),"icon-halo-width":new di(Z.paint_symbol["icon-halo-width"]),"icon-halo-blur":new di(Z.paint_symbol["icon-halo-blur"]),"icon-translate":new ci(Z.paint_symbol["icon-translate"]),"icon-translate-anchor":new ci(Z.paint_symbol["icon-translate-anchor"]),"text-opacity":new di(Z.paint_symbol["text-opacity"]),"text-color":new di(Z.paint_symbol["text-color"],{runtimeType:Ae,getOverride:e=>e.textColor,hasOverride:e=>!!e.textColor}),"text-halo-color":new di(Z.paint_symbol["text-halo-color"]),"text-halo-width":new di(Z.paint_symbol["text-halo-width"]),"text-halo-blur":new di(Z.paint_symbol["text-halo-blur"]),"text-translate":new ci(Z.paint_symbol["text-translate"]),"text-translate-anchor":new ci(Z.paint_symbol["text-translate-anchor"])})},get layout(){return Eu=Eu||new Ai({"symbol-placement":new ci(Z.layout_symbol["symbol-placement"]),"symbol-spacing":new ci(Z.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new ci(Z.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new di(Z.layout_symbol["symbol-sort-key"]),"symbol-z-order":new ci(Z.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new ci(Z.layout_symbol["icon-allow-overlap"]),"icon-overlap":new ci(Z.layout_symbol["icon-overlap"]),"icon-ignore-placement":new ci(Z.layout_symbol["icon-ignore-placement"]),"icon-optional":new ci(Z.layout_symbol["icon-optional"]),"icon-rotation-alignment":new ci(Z.layout_symbol["icon-rotation-alignment"]),"icon-size":new di(Z.layout_symbol["icon-size"]),"icon-text-fit":new ci(Z.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new ci(Z.layout_symbol["icon-text-fit-padding"]),"icon-image":new di(Z.layout_symbol["icon-image"]),"icon-rotate":new di(Z.layout_symbol["icon-rotate"]),"icon-padding":new di(Z.layout_symbol["icon-padding"]),"icon-keep-upright":new ci(Z.layout_symbol["icon-keep-upright"]),"icon-offset":new di(Z.layout_symbol["icon-offset"]),"icon-anchor":new di(Z.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new ci(Z.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new ci(Z.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new ci(Z.layout_symbol["text-rotation-alignment"]),"text-field":new di(Z.layout_symbol["text-field"]),"text-font":new di(Z.layout_symbol["text-font"]),"text-size":new di(Z.layout_symbol["text-size"]),"text-max-width":new di(Z.layout_symbol["text-max-width"]),"text-line-height":new ci(Z.layout_symbol["text-line-height"]),"text-letter-spacing":new di(Z.layout_symbol["text-letter-spacing"]),"text-justify":new di(Z.layout_symbol["text-justify"]),"text-radial-offset":new di(Z.layout_symbol["text-radial-offset"]),"text-variable-anchor":new ci(Z.layout_symbol["text-variable-anchor"]),"text-variable-anchor-offset":new di(Z.layout_symbol["text-variable-anchor-offset"]),"text-anchor":new di(Z.layout_symbol["text-anchor"]),"text-max-angle":new ci(Z.layout_symbol["text-max-angle"]),"text-writing-mode":new ci(Z.layout_symbol["text-writing-mode"]),"text-rotate":new di(Z.layout_symbol["text-rotate"]),"text-padding":new ci(Z.layout_symbol["text-padding"]),"text-keep-upright":new ci(Z.layout_symbol["text-keep-upright"]),"text-transform":new di(Z.layout_symbol["text-transform"]),"text-offset":new di(Z.layout_symbol["text-offset"]),"text-allow-overlap":new ci(Z.layout_symbol["text-allow-overlap"]),"text-overlap":new ci(Z.layout_symbol["text-overlap"]),"text-ignore-placement":new ci(Z.layout_symbol["text-ignore-placement"]),"text-optional":new ci(Z.layout_symbol["text-optional"])})}};class Tu{constructor(e){if(void 0===e.property.overrides)throw new Error("overrides must be provided to instantiate FormatSectionOverride class");this.type=e.property.overrides?e.property.overrides.runtimeType:de,this.defaultValue=e}evaluate(e){if(e.formattedSection){const t=this.defaultValue.property.overrides;if(t&&t.hasOverride(e.formattedSection))return t.getOverride(e.formattedSection)}return e.feature&&e.featureState?this.defaultValue.evaluate(e.feature,e.featureState):this.defaultValue.property.specification.default}eachChild(e){this.defaultValue.isConstant()||e(this.defaultValue.value._styleExpression.expression)}outputDefined(){return!1}serialize(){return null}}Cr("FormatSectionOverride",Tu,{omit:["defaultValue"]});class Cu extends mi{constructor(e){super(e,Su)}recalculate(e,t){if(super.recalculate(e,t),"auto"===this.layout.get("icon-rotation-alignment")&&(this.layout._values["icon-rotation-alignment"]="point"!==this.layout.get("symbol-placement")?"map":"viewport"),"auto"===this.layout.get("text-rotation-alignment")&&(this.layout._values["text-rotation-alignment"]="point"!==this.layout.get("symbol-placement")?"map":"viewport"),"auto"===this.layout.get("text-pitch-alignment")&&(this.layout._values["text-pitch-alignment"]="map"===this.layout.get("text-rotation-alignment")?"map":"viewport"),"auto"===this.layout.get("icon-pitch-alignment")&&(this.layout._values["icon-pitch-alignment"]=this.layout.get("icon-rotation-alignment")),"point"===this.layout.get("symbol-placement")){const e=this.layout.get("text-writing-mode");if(e){const t=[];for(const n of e)t.indexOf(n)<0&&t.push(n);this.layout._values["text-writing-mode"]=t}else this.layout._values["text-writing-mode"]=["horizontal"]}this._setPaintOverrides()}getValueAndResolveTokens(e,t,n,r){const i=this.layout.get(e).evaluate(t,{},n,r),o=this._unevaluatedLayout._values[e];return o.isDataDriven()||Pn(o.value)||!i?i:function(e,t){return t.replace(/{([^{}]+)}/g,(t,n)=>e&&n in e?String(e[n]):"")}(t.properties,i)}createBucket(e){return new Mu(e)}queryRadius(){return 0}queryIntersectsFeature(){throw new Error("Should take a different path in FeatureIndex")}_setPaintOverrides(){for(const e of Su.paint.overridableProperties){if(!Cu.hasPaintOverride(this.layout,e))continue;const t=this.paint.get(e),n=new Tu(t),r=new Ln(n,t.property.specification);let i=null;i="constant"===t.value.kind||"source"===t.value.kind?new Dn("source",r):new kn("composite",r,t.value.zoomStops),this.paint._values[e]=new li(t.property,i,t.parameters)}}_handleOverridablePaintPropertyUpdate(e,t,n){return!(!this.layout||t.isDataDriven()||n.isDataDriven())&&Cu.hasPaintOverride(this.layout,e)}static hasPaintOverride(e,t){const n=e.get("text-field"),r=Su.paint.properties[t];let i=!1;const o=e=>{for(const t of e)if(r.overrides&&r.overrides.hasOverride(t))return void(i=!0)};if("constant"===n.value.kind&&n.value.value instanceof Ze)o(n.value.value.sections);else if("source"===n.value.kind){const e=t=>{i||(t instanceof it&&nt(t.value)===ve?o(t.value.sections):t instanceof un?o(t.sections):t.eachChild(e))},t=n.value;t._styleExpression&&e(t._styleExpression.expression)}return i}}let Lu;var Pu={get paint(){return Lu=Lu||new Ai({"background-color":new ci(Z.paint_background["background-color"]),"background-pattern":new hi(Z.paint_background["background-pattern"]),"background-opacity":new ci(Z.paint_background["background-opacity"])})}};class Iu extends mi{constructor(e){super(e,Pu)}}let Du;var ku={get paint(){return Du=Du||new Ai({"raster-opacity":new ci(Z.paint_raster["raster-opacity"]),"raster-hue-rotate":new ci(Z.paint_raster["raster-hue-rotate"]),"raster-brightness-min":new ci(Z.paint_raster["raster-brightness-min"]),"raster-brightness-max":new ci(Z.paint_raster["raster-brightness-max"]),"raster-saturation":new ci(Z.paint_raster["raster-saturation"]),"raster-contrast":new ci(Z.paint_raster["raster-contrast"]),"raster-resampling":new ci(Z.paint_raster["raster-resampling"]),"raster-fade-duration":new ci(Z.paint_raster["raster-fade-duration"])})}};class Ru extends mi{constructor(e){super(e,ku)}}class ju extends mi{constructor(e){super(e,{}),this.onAdd=e=>{this.implementation.onAdd&&this.implementation.onAdd(e,e.painter.context.gl)},this.onRemove=e=>{this.implementation.onRemove&&this.implementation.onRemove(e,e.painter.context.gl)},this.implementation=e}is3D(){return"3d"===this.implementation.renderingMode}hasOffscreenPass(){return void 0!==this.implementation.prerender}recalculate(){}updateTransitions(){}hasTransition(){return!1}serialize(){throw new Error("Custom layers cannot be serialized")}}class Fu{constructor(e){this._callback=e,this._triggered=!1,"undefined"!=typeof MessageChannel&&(this._channel=new MessageChannel,this._channel.port2.onmessage=()=>{this._triggered=!1,this._callback()})}trigger(){this._triggered||(this._triggered=!0,this._channel?this._channel.port1.postMessage(!0):setTimeout(()=>{this._triggered=!1,this._callback()},0))}remove(){delete this._channel,this._callback=()=>{}}}const Nu=6371008.8;class Bu{constructor(e,t){if(isNaN(e)||isNaN(t))throw new Error(`Invalid LngLat object: (${e}, ${t})`);if(this.lng=+e,this.lat=+t,this.lat>90||this.lat<-90)throw new Error("Invalid LngLat latitude value: must be between -90 and 90")}wrap(){return new Bu(g(this.lng,-180,180),this.lat)}toArray(){return[this.lng,this.lat]}toString(){return`LngLat(${this.lng}, ${this.lat})`}distanceTo(e){const t=Math.PI/180,n=this.lat*t,r=e.lat*t,i=Math.sin(n)*Math.sin(r)+Math.cos(n)*Math.cos(r)*Math.cos((e.lng-this.lng)*t);return Nu*Math.acos(Math.min(i,1))}static convert(e){if(e instanceof Bu)return e;if(Array.isArray(e)&&(2===e.length||3===e.length))return new Bu(Number(e[0]),Number(e[1]));if(!Array.isArray(e)&&"object"==typeof e&&null!==e)return new Bu(Number("lng"in e?e.lng:e.lon),Number(e.lat));throw new Error("`LngLatLike` argument must be specified as a LngLat instance, an object {lng: , lat: }, an object {lon: , lat: }, or an array of [, ]")}}const zu=2*Math.PI*Nu;function Uu(e){return zu*Math.cos(e*Math.PI/180)}function Hu(e){return(180+e)/360}function Vu(e){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+e*Math.PI/360)))/360}function Gu(e,t){return e/Uu(t)}function Yu(e){return 360*e-180}function Wu(e){return 360/Math.PI*Math.atan(Math.exp((180-360*e)*Math.PI/180))-90}class qu{constructor(e,t,n=0){this.x=+e,this.y=+t,this.z=+n}static fromLngLat(e,t=0){const n=Bu.convert(e);return new qu(Hu(n.lng),Vu(n.lat),Gu(t,n.lat))}toLngLat(){return new Bu(Yu(this.x),Wu(this.y))}toAltitude(){return this.z*Uu(Wu(this.y))}meterInMercatorCoordinateUnits(){return 1/zu*(e=Wu(this.y),1/Math.cos(e*Math.PI/180));var e}}function Xu(e,t,n){var r=2*Math.PI*6378137/256/Math.pow(2,n);return[e*r-2*Math.PI*6378137/2,t*r-2*Math.PI*6378137/2]}class Zu{constructor(e,t,n){if(e<0||e>25||n<0||n>=Math.pow(2,e)||t<0||t>=Math.pow(2,e))throw new Error(`x=${t}, y=${n}, z=${e} outside of bounds. 0<=x<${Math.pow(2,e)}, 0<=y<${Math.pow(2,e)} 0<=z<=25 `);this.z=e,this.x=t,this.y=n,this.key=Ju(0,e,e,t,n)}equals(e){return this.z===e.z&&this.x===e.x&&this.y===e.y}url(e,t,n){const r=(o=this.y,a=this.z,s=Xu(256*(i=this.x),256*(o=Math.pow(2,a)-o-1),a),l=Xu(256*(i+1),256*(o+1),a),s[0]+","+s[1]+","+l[0]+","+l[1]);var i,o,a,s,l;const u=function(e,t,n){let r,i="";for(let o=e;o>0;o--)r=1<1?"@2x":"").replace(/{quadkey}/g,u).replace(/{bbox-epsg-3857}/g,r)}isChildOf(e){const t=this.z-e.z;return t>0&&e.x===this.x>>t&&e.y===this.y>>t}getTilePoint(e){const t=Math.pow(2,this.z);return new o((e.x*t-this.x)*Zo,(e.y*t-this.y)*Zo)}toString(){return`${this.z}/${this.x}/${this.y}`}}class Ku{constructor(e,t){this.wrap=e,this.canonical=t,this.key=Ju(e,t.z,t.z,t.x,t.y)}}class Qu{constructor(e,t,n,r,i){if(e= z; overscaledZ = ${e}; z = ${n}`);this.overscaledZ=e,this.wrap=t,this.canonical=new Zu(n,+r,+i),this.key=Ju(t,e,n,r,i)}clone(){return new Qu(this.overscaledZ,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)}equals(e){return this.overscaledZ===e.overscaledZ&&this.wrap===e.wrap&&this.canonical.equals(e.canonical)}scaledTo(e){if(e>this.overscaledZ)throw new Error(`targetZ > this.overscaledZ; targetZ = ${e}; overscaledZ = ${this.overscaledZ}`);const t=this.canonical.z-e;return e>this.canonical.z?new Qu(e,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new Qu(e,this.wrap,e,this.canonical.x>>t,this.canonical.y>>t)}calculateScaledKey(e,t){if(e>this.overscaledZ)throw new Error(`targetZ > this.overscaledZ; targetZ = ${e}; overscaledZ = ${this.overscaledZ}`);const n=this.canonical.z-e;return e>this.canonical.z?Ju(this.wrap*+t,e,this.canonical.z,this.canonical.x,this.canonical.y):Ju(this.wrap*+t,e,e,this.canonical.x>>n,this.canonical.y>>n)}isChildOf(e){if(e.wrap!==this.wrap)return!1;const t=this.canonical.z-e.canonical.z;return 0===e.overscaledZ||e.overscaledZ>t&&e.canonical.y===this.canonical.y>>t}children(e){if(this.overscaledZ>=e)return[new Qu(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];const t=this.canonical.z+1,n=2*this.canonical.x,r=2*this.canonical.y;return[new Qu(t,this.wrap,t,n,r),new Qu(t,this.wrap,t,n+1,r),new Qu(t,this.wrap,t,n,r+1),new Qu(t,this.wrap,t,n+1,r+1)]}isLessThan(e){return this.wrape.wrap)&&(this.overscaledZe.overscaledZ)&&(this.canonical.xe.canonical.x)&&this.canonical.ythis.max&&(this.max=n),n=this.dim+1||t<-1||t>=this.dim+1)throw new RangeError("out of range source coordinates for DEM data");return(t+1)*this.stride+(e+1)}unpack(e,t,n){return e*this.redFactor+t*this.greenFactor+n*this.blueFactor-this.baseShift}getPixels(){return new Ra({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))}backfillBorder(e,t,n){if(this.dim!==e.dim)throw new Error("dem dimension mismatch");let r=t*this.dim,i=t*this.dim+this.dim,o=n*this.dim,a=n*this.dim+this.dim;switch(t){case-1:r=i-1;break;case 1:i=r+1}switch(n){case-1:o=a-1;break;case 1:a=o+1}const s=-t*this.dim,l=-n*this.dim;for(let t=o;t=this._numberToString.length)throw new Error(`Out of bounds. Index requested n=${e} can't be >= this._numberToString.length ${this._numberToString.length}`);return this._numberToString[e]}}class tc{constructor(e,t,n,r,i){this.type="Feature",this._vectorTileFeature=e,e._z=t,e._x=n,e._y=r,this.properties=e.properties,this.id=i}get geometry(){return void 0===this._geometry&&(this._geometry=this._vectorTileFeature.toGeoJSON(this._vectorTileFeature._x,this._vectorTileFeature._y,this._vectorTileFeature._z).geometry),this._geometry}set geometry(e){this._geometry=e}toJSON(){const e={geometry:this.geometry};for(const t in this)"_geometry"!==t&&"_vectorTileFeature"!==t&&(e[t]=this[t]);return e}}class nc{constructor(e,t){this.tileID=e,this.x=e.canonical.x,this.y=e.canonical.y,this.z=e.canonical.z,this.grid=new Sr(Zo,16,0),this.grid3D=new Sr(Zo,16,0),this.featureIndexArray=new ro,this.promoteId=t}insert(e,t,n,r,i,o){const a=this.featureIndexArray.length;this.featureIndexArray.emplaceBack(n,r,i);const s=o?this.grid3D:this.grid;for(let e=0;e=0&&r[3]>=0&&s.insert(a,r[0],r[1],r[2],r[3])}}loadVTLayers(){return this.vtLayers||(this.vtLayers=new Is.VectorTile(new Wl(this.rawTileData)).layers,this.sourceLayerCoder=new ec(this.vtLayers?Object.keys(this.vtLayers).sort():["_geojsonTileLayer"])),this.vtLayers}query(e,t,n,r){this.loadVTLayers();const i=e.params||{},a=Zo/e.tileSize/e.scale,s=Bn(i.filter),l=e.queryGeometry,u=e.queryPadding*a,c=ic(l),d=this.grid.query(c.minX-u,c.minY-u,c.maxX+u,c.maxY+u),f=ic(e.cameraQueryGeometry),h=this.grid3D.query(f.minX-u,f.minY-u,f.maxX+u,f.maxY+u,(t,n,r,i)=>function(e,t,n,r,i){for(const o of e)if(t<=o.x&&n<=o.y&&r>=o.x&&i>=o.y)return!0;const a=[new o(t,n),new o(t,i),new o(r,i),new o(r,n)];if(e.length>2)for(const t of a)if(da(e,t))return!0;for(let t=0;t(f||(f=Jo(t)),n.queryIntersectsFeature(l,t,r,f,this.z,e.transform,a,e.pixelPosMatrix)))}return p}loadMatchingFeature(e,t,n,r,i,o,a,s,l,u,c){const d=this.bucketLayerIDs[t];if(o&&!function(e,t){for(let n=0;n=0)return!0;return!1}(o,d))return;const f=this.sourceLayerCoder.decode(n),h=this.vtLayers[f].feature(r);if(i.needGeometry){const e=$o(h,!0);if(!i.filter(new ti(this.tileID.overscaledZ),e,this.tileID.canonical))return}else if(!i.filter(new ti(this.tileID.overscaledZ),h))return;const p=this.getId(h,f);for(let t=0;t{const a=t instanceof ui?t.get(o):null;return a&&a.evaluate?a.evaluate(n,r,i):a})}function ic(e){let t=1/0,n=1/0,r=-1/0,i=-1/0;for(const o of e)t=Math.min(t,o.x),n=Math.min(n,o.y),r=Math.max(r,o.x),i=Math.max(i,o.y);return{minX:t,minY:n,maxX:r,maxY:i}}function oc(e,t){return t-e}function ac(e,t,n,r,i){const a=[];for(let s=0;s=r&&c.x>=r||(s.x>=r?s=new o(r,s.y+(r-s.x)/(c.x-s.x)*(c.y-s.y))._round():c.x>=r&&(c=new o(r,s.y+(r-s.x)/(c.x-s.x)*(c.y-s.y))._round()),s.y>=i&&c.y>=i||(s.y>=i?s=new o(s.x+(i-s.y)/(c.y-s.y)*(c.x-s.x),i)._round():c.y>=i&&(c=new o(s.x+(i-s.y)/(c.y-s.y)*(c.x-s.x),i)._round()),u&&s.equals(u[u.length-1])||(u=[s],a.push(u)),u.push(c)))))}}return a}Cr("FeatureIndex",nc,{omit:["rawTileData","sourceLayerCoder"]});class sc extends o{constructor(e,t,n,r){super(e,t),this.angle=n,void 0!==r&&(this.segment=r)}clone(){return new sc(this.x,this.y,this.angle,this.segment)}}function lc(e,t,n,r,i){if(void 0===t.segment||0===n)return!0;let o=t,a=t.segment+1,s=0;for(;s>-n/2;){if(a--,a<0)return!1;s-=e[a].dist(o),o=e[a]}s+=e[a].dist(e[a+1]),a++;const l=[];let u=0;for(;sr;)u-=l.shift().angleDelta;if(u>i)return!1;a++,s+=t.dist(n)}return!0}function uc(e){let t=0;for(let n=0;nu){const c=(u-l)/o,d=Ut.number(r.x,i.x,c),f=Ut.number(r.y,i.y,c),h=new sc(d,f,i.angleTo(r),n);return h._round(),!a||lc(e,h,s,a,t)?h:void 0}l+=o}}function hc(e,t,n,r,i,o,a,s,l){const u=cc(r,o,a),c=dc(r,i),d=c*a,f=0===e[0].x||e[0].x===l||0===e[0].y||e[0].y===l;return t-d=0&&m=0&&y=0&&h+c<=d){const n=new sc(m,y,A,e);n._round(),i&&!lc(t,n,a,i,o)||p.push(n)}}f+=l}return l||p.length||s||(p=e(t,f/2,r,i,o,a,s,!0,u)),p}(e,f?t/2*s%t:(c/2+2*o)*a*s%t,t,u,n,d,f,!1,l)}function pc(e,t,n,r){const i=[],a=e.image,s=a.pixelRatio,l=a.paddedRect.w-2,u=a.paddedRect.h-2,c=e.right-e.left,d=e.bottom-e.top,f=a.stretchX||[[0,l]],h=a.stretchY||[[0,u]],p=(e,t)=>e+t[1]-t[0],A=f.reduce(p,0),g=h.reduce(p,0),m=l-A,y=u-g;let v=0,b=A,_=0,w=g,x=0,M=m,E=0,O=y;if(a.content&&r){const e=a.content;v=Ac(f,0,e[0]),_=Ac(h,0,e[1]),b=Ac(f,e[0],e[2]),w=Ac(h,e[1],e[3]),x=e[0]-v,E=e[1]-_,M=e[2]-e[0]-b,O=e[3]-e[1]-w}const S=(r,i,l,u)=>{const f=mc(r.stretch-v,b,c,e.left),h=yc(r.fixed-x,M,r.stretch,A),p=mc(i.stretch-_,w,d,e.top),m=yc(i.fixed-E,O,i.stretch,g),y=mc(l.stretch-v,b,c,e.left),S=yc(l.fixed-x,M,l.stretch,A),T=mc(u.stretch-_,w,d,e.top),C=yc(u.fixed-E,O,u.stretch,g),L=new o(f,p),P=new o(y,p),I=new o(y,T),D=new o(f,T),k=new o(h/s,m/s),R=new o(S/s,C/s),j=t*Math.PI/180;if(j){const e=Math.sin(j),t=Math.cos(j),n=[t,-e,e,t];L._matMult(n),P._matMult(n),D._matMult(n),I._matMult(n)}const F=r.stretch+r.fixed,N=i.stretch+i.fixed;return{tl:L,tr:P,bl:D,br:I,tex:{x:a.paddedRect.x+1+F,y:a.paddedRect.y+1+N,w:l.stretch+l.fixed-F,h:u.stretch+u.fixed-N},writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:k,pixelOffsetBR:R,minFontScaleX:M/s/c,minFontScaleY:O/s/d,isSDF:n}};if(r&&(a.stretchX||a.stretchY)){const e=gc(f,m,A),t=gc(h,y,g);for(let n=0;n0&&(r=Math.max(10,r),this.circleDiameter=r)}else{let u=a.top*s-l[0],d=a.bottom*s+l[2],f=a.left*s-l[3],h=a.right*s+l[1];const p=a.collisionPadding;if(p&&(f-=p[0]*s,u-=p[1]*s,h+=p[2]*s,d+=p[3]*s),c){const e=new o(f,u),t=new o(h,u),n=new o(f,d),r=new o(h,d),i=c*Math.PI/180;e._rotate(i),t._rotate(i),n._rotate(i),r._rotate(i),f=Math.min(e.x,t.x,n.x,r.x),h=Math.max(e.x,t.x,n.x,r.x),u=Math.min(e.y,t.y,n.y,r.y),d=Math.max(e.y,t.y,n.y,r.y)}e.emplaceBack(t.x,t.y,f,u,h,d,n,r,i)}this.boxEndIndex=e.length}}class bc{constructor(e=[],t=_c){if(this.data=e,this.length=this.data.length,this.compare=t,this.length>0)for(let e=(this.length>>1)-1;e>=0;e--)this._down(e)}push(e){this.data.push(e),this.length++,this._up(this.length-1)}pop(){if(0===this.length)return;const e=this.data[0],t=this.data.pop();return this.length--,this.length>0&&(this.data[0]=t,this._down(0)),e}peek(){return this.data[0]}_up(e){const{data:t,compare:n}=this,r=t[e];for(;e>0;){const i=e-1>>1,o=t[i];if(n(r,o)>=0)break;t[e]=o,e=i}t[e]=r}_down(e){const{data:t,compare:n}=this,r=this.length>>1,i=t[e];for(;e=0)break;t[e]=o,e=r}t[e]=i}}function _c(e,t){return et?1:0}function wc(e,t=1,n=!1){let r=1/0,i=1/0,a=-1/0,s=-1/0;const l=e[0];for(let e=0;ea)&&(a=t.x),(!e||t.y>s)&&(s=t.y)}const u=Math.min(a-r,s-i);let c=u/2;const d=new bc([],xc);if(0===u)return new o(r,i);for(let t=r;tf.d||!f.d)&&(f=r,n&&console.log("found best %d after %d probes",Math.round(1e4*r.d)/1e4,h)),r.max-f.d<=t||(c=r.h/2,d.push(new Mc(r.p.x-c,r.p.y-c,c,e)),d.push(new Mc(r.p.x+c,r.p.y-c,c,e)),d.push(new Mc(r.p.x-c,r.p.y+c,c,e)),d.push(new Mc(r.p.x+c,r.p.y+c,c,e)),h+=4)}return n&&(console.log("num probes: "+h),console.log("best distance: "+f.d)),f.p}function xc(e,t){return t.max-e.max}function Mc(e,t,n,r){this.p=new o(e,t),this.h=n,this.d=function(e,t){let n=!1,r=1/0;for(let i=0;ie.y!=s.y>e.y&&e.x<(s.x-i.x)*(e.y-i.y)/(s.y-i.y)+i.x&&(n=!n),r=Math.min(r,ua(e,i,s))}}return(n?1:-1)*Math.sqrt(r)}(this.p,r),this.max=this.d+this.h*Math.SQRT2}var Ec;e.aq=void 0,(Ec=e.aq||(e.aq={}))[Ec.center=1]="center",Ec[Ec.left=2]="left",Ec[Ec.right=3]="right",Ec[Ec.top=4]="top",Ec[Ec.bottom=5]="bottom",Ec[Ec["top-left"]=6]="top-left",Ec[Ec["top-right"]=7]="top-right",Ec[Ec["bottom-left"]=8]="bottom-left",Ec[Ec["bottom-right"]=9]="bottom-right";const Oc=Number.POSITIVE_INFINITY;function Sc(e,t){return t[1]!==Oc?function(e,t,n){let r=0,i=0;switch(t=Math.abs(t),n=Math.abs(n),e){case"top-right":case"top-left":case"top":i=n-7;break;case"bottom-right":case"bottom-left":case"bottom":i=7-n}switch(e){case"top-right":case"bottom-right":case"right":r=-t;break;case"top-left":case"bottom-left":case"left":r=t}return[r,i]}(e,t[0],t[1]):function(e,t){let n=0,r=0;t<0&&(t=0);const i=t/Math.SQRT2;switch(e){case"top-right":case"top-left":r=i-7;break;case"bottom-right":case"bottom-left":r=7-i;break;case"bottom":r=7-t;break;case"top":r=t-7}switch(e){case"top-right":case"bottom-right":n=-i;break;case"top-left":case"bottom-left":n=i;break;case"left":n=t;break;case"right":n=-t}return[n,r]}(e,t[0])}function Tc(e,t,n){var r;const i=e.layout,o=null===(r=i.get("text-variable-anchor-offset"))||void 0===r?void 0:r.evaluate(t,{},n);if(o){const e=o.values,t=[];for(let n=0;n24*e);r.startsWith("top")?i[1]-=7:r.startsWith("bottom")&&(i[1]+=7),t[n+1]=i}return new Je(t)}const a=i.get("text-variable-anchor");if(a){let r;r=void 0!==e._unevaluatedLayout.getValue("text-radial-offset")?[24*i.get("text-radial-offset").evaluate(t,{},n),Oc]:i.get("text-offset").evaluate(t,{},n).map(e=>24*e);const o=[];for(const e of a)o.push(e,Sc(e,r));return new Je(o)}return null}function Cc(e){switch(e){case"right":case"top-right":case"bottom-right":return"right";case"left":case"top-left":case"bottom-left":return"left"}return"center"}function Lc(t,n,r,i,o,a,s,l,u,c,d){let f=a.textMaxSize.evaluate(n,{});void 0===f&&(f=s);const h=t.layers[0].layout,p=h.get("icon-offset").evaluate(n,{},d),A=Ic(r.horizontal),g=s/24,m=t.tilePixelRatio*g,y=t.tilePixelRatio*f/24,v=t.tilePixelRatio*l,b=t.tilePixelRatio*h.get("symbol-spacing"),_=h.get("text-padding")*t.tilePixelRatio,w=function(e,t,n,r=1){const i=e.get("icon-padding").evaluate(t,{},n),o=i&&i.values;return[o[0]*r,o[1]*r,o[2]*r,o[3]*r]}(h,n,d,t.tilePixelRatio),M=h.get("text-max-angle")/180*Math.PI,E="viewport"!==h.get("text-rotation-alignment")&&"point"!==h.get("symbol-placement"),O="map"===h.get("icon-rotation-alignment")&&"point"!==h.get("symbol-placement"),S=h.get("symbol-placement"),T=b/2,C=h.get("icon-text-fit");let L;i&&"none"!==C&&(t.allowVerticalPlacement&&r.vertical&&(L=fu(i,r.vertical,C,h.get("icon-text-fit-padding"),p,g)),A&&(i=fu(i,A,C,h.get("icon-text-fit-padding"),p,g)));const P=(l,f)=>{f.x<0||f.x>=Zo||f.y<0||f.y>=Zo||function(t,n,r,i,o,a,s,l,u,c,d,f,h,p,A,g,m,y,v,b,_,w,M,E,O){const S=t.addToLineVertexArray(n,r);let T,C,L,P,I=0,D=0,k=0,R=0,j=-1,F=-1;const N={};let B=Lo("");if(t.allowVerticalPlacement&&i.vertical){const e=l.layout.get("text-rotate").evaluate(_,{},E)+90;L=new vc(u,n,c,d,f,i.vertical,h,p,A,e),s&&(P=new vc(u,n,c,d,f,s,m,y,A,e))}if(o){const r=l.layout.get("icon-rotate").evaluate(_,{}),i="none"!==l.layout.get("icon-text-fit"),a=pc(o,r,M,i),h=s?pc(s,r,M,i):void 0;C=new vc(u,n,c,d,f,o,m,y,!1,r),I=4*a.length;const p=t.iconSizeData;let A=null;"source"===p.kind?(A=[hu*l.layout.get("icon-size").evaluate(_,{})],A[0]>pu&&x(t.layerIds[0]+': Value for "icon-size" is >= 255. Reduce your "icon-size".')):"composite"===p.kind&&(A=[hu*w.compositeIconSizes[0].evaluate(_,{},E),hu*w.compositeIconSizes[1].evaluate(_,{},E)],(A[0]>pu||A[1]>pu)&&x(t.layerIds[0]+': Value for "icon-size" is >= 255. Reduce your "icon-size".')),t.addSymbols(t.icon,a,A,b,v,_,e.ai.none,n,S.lineStartIndex,S.lineLength,-1,E),j=t.icon.placedSymbolArray.length-1,h&&(D=4*h.length,t.addSymbols(t.icon,h,A,b,v,_,e.ai.vertical,n,S.lineStartIndex,S.lineLength,-1,E),F=t.icon.placedSymbolArray.length-1)}const z=Object.keys(i.horizontal);for(const r of z){const o=i.horizontal[r];if(!T){B=Lo(o.text);const e=l.layout.get("text-rotate").evaluate(_,{},E);T=new vc(u,n,c,d,f,o,h,p,A,e)}const s=1===o.positionedLines.length;if(k+=Pc(t,n,o,a,l,A,_,g,S,i.vertical?e.ai.horizontal:e.ai.horizontalOnly,s?z:[r],N,j,w,E),s)break}i.vertical&&(R+=Pc(t,n,i.vertical,a,l,A,_,g,S,e.ai.vertical,["vertical"],N,F,w,E));const U=T?T.boxStartIndex:t.collisionBoxArray.length,H=T?T.boxEndIndex:t.collisionBoxArray.length,V=L?L.boxStartIndex:t.collisionBoxArray.length,G=L?L.boxEndIndex:t.collisionBoxArray.length,Y=C?C.boxStartIndex:t.collisionBoxArray.length,W=C?C.boxEndIndex:t.collisionBoxArray.length,q=P?P.boxStartIndex:t.collisionBoxArray.length,X=P?P.boxEndIndex:t.collisionBoxArray.length;let Z=-1;const K=(e,t)=>e&&e.circleDiameter?Math.max(e.circleDiameter,t):t;Z=K(T,Z),Z=K(L,Z),Z=K(C,Z),Z=K(P,Z);const Q=Z>-1?1:0;Q&&(Z*=O/24),t.glyphOffsetArray.length>=Mu.MAX_GLYPHS&&x("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),void 0!==_.sortKey&&t.addToSortKeyRanges(t.symbolInstances.length,_.sortKey);const J=Tc(l,_,E),[$,ee]=function(t,n){const r=t.length,i=null==n?void 0:n.values;if((null==i?void 0:i.length)>0)for(let n=0;n=0?N.right:-1,N.center>=0?N.center:-1,N.left>=0?N.left:-1,N.vertical||-1,j,F,B,U,H,V,G,Y,W,q,X,c,k,R,I,D,Q,0,h,Z,$,ee)}(t,f,l,r,i,o,L,t.layers[0],t.collisionBoxArray,n.index,n.sourceLayerIndex,t.index,m,[_,_,_,_],E,u,v,w,O,p,n,a,c,d,s)};if("line"===S)for(const e of ac(n.geometry,0,0,Zo,Zo)){const n=hc(e,b,M,r.vertical||A,i,24,y,t.overscaling,Zo);for(const r of n)A&&Dc(t,A.text,T,r)||P(e,r)}else if("line-center"===S){for(const e of n.geometry)if(e.length>1){const t=fc(e,M,r.vertical||A,i,24,y);t&&P(e,t)}}else if("Polygon"===n.type)for(const e of bs(n.geometry,0)){const t=wc(e,16);P(e[0],new sc(t.x,t.y,0))}else if("LineString"===n.type)for(const e of n.geometry)P(e,new sc(e[0].x,e[0].y,0));else if("Point"===n.type)for(const e of n.geometry)for(const t of e)P([t],new sc(t.x,t.y,0))}function Pc(e,t,n,r,i,a,s,l,u,c,d,f,h,p,A){const g=function(e,t,n,r,i,a,s,l){const u=r.layout.get("text-rotate").evaluate(a,{})*Math.PI/180,c=[];for(const e of t.positionedLines)for(const r of e.positionedGlyphs){if(!r.rect)continue;const a=r.rect||{};let d=4,f=!0,h=1,p=0;const A=(i||l)&&r.vertical,g=r.metrics.advance*r.scale/2;if(l&&t.verticalizable&&(p=e.lineOffset/2-(r.imageName?-(24-r.metrics.width*r.scale)/2:24*(r.scale-1))),r.imageName){const e=s[r.imageName];f=e.sdf,h=e.pixelRatio,d=1/h}const m=i?[r.x+g,r.y]:[0,0];let y=i?[0,0]:[r.x+g+n[0],r.y+n[1]-p],v=[0,0];A&&(v=y,y=[0,0]);const b=r.metrics.isDoubleResolution?2:1,_=(r.metrics.left-d)*r.scale-g+y[0],w=(-r.metrics.top-d)*r.scale+y[1],x=_+a.w/b*r.scale/h,M=w+a.h/b*r.scale/h,E=new o(_,w),O=new o(x,w),S=new o(_,M),T=new o(x,M);if(A){const e=new o(-g,g- -17),t=-Math.PI/2,n=12-g,i=new o(22-n,-(r.imageName?n:0)),a=new o(...v);E._rotateAround(t,e)._add(i)._add(a),O._rotateAround(t,e)._add(i)._add(a),S._rotateAround(t,e)._add(i)._add(a),T._rotateAround(t,e)._add(i)._add(a)}if(u){const e=Math.sin(u),t=Math.cos(u),n=[t,-e,e,t];E._matMult(n),O._matMult(n),S._matMult(n),T._matMult(n)}const C=new o(0,0),L=new o(0,0);c.push({tl:E,tr:O,bl:S,br:T,tex:a,writingMode:t.writingMode,glyphOffset:m,sectionIndex:r.sectionIndex,isSDF:f,pixelOffsetTL:C,pixelOffsetBR:L,minFontScaleX:0,minFontScaleY:0})}return c}(0,n,l,i,a,s,r,e.allowVerticalPlacement),m=e.textSizeData;let y=null;"source"===m.kind?(y=[hu*i.layout.get("text-size").evaluate(s,{})],y[0]>pu&&x(e.layerIds[0]+': Value for "text-size" is >= 255. Reduce your "text-size".')):"composite"===m.kind&&(y=[hu*p.compositeTextSizes[0].evaluate(s,{},A),hu*p.compositeTextSizes[1].evaluate(s,{},A)],(y[0]>pu||y[1]>pu)&&x(e.layerIds[0]+': Value for "text-size" is >= 255. Reduce your "text-size".')),e.addSymbols(e.text,g,y,l,a,s,c,t,u.lineStartIndex,u.lineLength,h,A);for(const t of d)f[t]=e.text.placedSymbolArray.length-1;return 4*g.length}function Ic(e){for(const t in e)return e[t];return null}function Dc(e,t,n,r){const i=e.compareText;if(t in i){const e=i[t];for(let t=e.length-1;t>=0;t--)if(r.dist(e[t])>4;if(1!==r)throw new Error(`Got v${r} data when expected v1.`);const i=kc[15&n];if(!i)throw new Error("Unrecognized array type.");const[o]=new Uint16Array(e,2,1),[a]=new Uint32Array(e,4,1);return new Rc(a,o,i,e)}constructor(e,t=64,n=Float64Array,r){if(isNaN(e)||e<0)throw new Error(`Unpexpected numItems value: ${e}.`);this.numItems=+e,this.nodeSize=Math.min(Math.max(+t,2),65535),this.ArrayType=n,this.IndexArrayType=e<65536?Uint16Array:Uint32Array;const i=kc.indexOf(this.ArrayType),o=2*e*this.ArrayType.BYTES_PER_ELEMENT,a=e*this.IndexArrayType.BYTES_PER_ELEMENT,s=(8-a%8)%8;if(i<0)throw new Error(`Unexpected typed array class: ${n}.`);r&&r instanceof ArrayBuffer?(this.data=r,this.ids=new this.IndexArrayType(this.data,8,e),this.coords=new this.ArrayType(this.data,8+a+s,2*e),this._pos=2*e,this._finished=!0):(this.data=new ArrayBuffer(8+o+a+s),this.ids=new this.IndexArrayType(this.data,8,e),this.coords=new this.ArrayType(this.data,8+a+s,2*e),this._pos=0,this._finished=!1,new Uint8Array(this.data,0,2).set([219,16+i]),new Uint16Array(this.data,2,1)[0]=t,new Uint32Array(this.data,4,1)[0]=e)}add(e,t){const n=this._pos>>1;return this.ids[n]=n,this.coords[this._pos++]=e,this.coords[this._pos++]=t,n}finish(){const e=this._pos>>1;if(e!==this.numItems)throw new Error(`Added ${e} items when expected ${this.numItems}.`);return function e(t,n,r,i,o,a){if(o-i<=r)return;const s=i+o>>1;(function e(t,n,r,i,o,a){for(;o>i;){if(o-i>600){const s=o-i+1,l=r-i+1,u=Math.log(s),c=.5*Math.exp(2*u/3),d=.5*Math.sqrt(u*c*(s-c)/s)*(l-s/2<0?-1:1);e(t,n,r,Math.max(i,Math.floor(r-l*c/s+d)),Math.min(o,Math.floor(r+(s-l)*c/s+d)),a)}const s=n[2*r+a];let l=i,u=o;for(jc(t,n,i,r),n[2*o+a]>s&&jc(t,n,i,o);ls;)u--}n[2*i+a]===s?jc(t,n,i,u):(u++,jc(t,n,u,o)),u<=r&&(i=u+1),r<=u&&(o=u-1)}})(t,n,s,i,o,a),e(t,n,r,i,s-1,1-a),e(t,n,r,s+1,o,1-a)}(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(e,t,n,r){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:i,coords:o,nodeSize:a}=this,s=[0,i.length-1,0],l=[];for(;s.length;){const u=s.pop()||0,c=s.pop()||0,d=s.pop()||0;if(c-d<=a){for(let a=d;a<=c;a++){const s=o[2*a],u=o[2*a+1];s>=e&&s<=n&&u>=t&&u<=r&&l.push(i[a])}continue}const f=d+c>>1,h=o[2*f],p=o[2*f+1];h>=e&&h<=n&&p>=t&&p<=r&&l.push(i[f]),(0===u?e<=h:t<=p)&&(s.push(d),s.push(f-1),s.push(1-u)),(0===u?n>=h:r>=p)&&(s.push(f+1),s.push(c),s.push(1-u))}return l}within(e,t,n){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:r,coords:i,nodeSize:o}=this,a=[0,r.length-1,0],s=[],l=n*n;for(;a.length;){const u=a.pop()||0,c=a.pop()||0,d=a.pop()||0;if(c-d<=o){for(let n=d;n<=c;n++)Nc(i[2*n],i[2*n+1],e,t)<=l&&s.push(r[n]);continue}const f=d+c>>1,h=i[2*f],p=i[2*f+1];Nc(h,p,e,t)<=l&&s.push(r[f]),(0===u?e-n<=h:t-n<=p)&&(a.push(d),a.push(f-1),a.push(1-u)),(0===u?e+n>=h:t+n>=p)&&(a.push(f+1),a.push(c),a.push(1-u))}return s}}function jc(e,t,n,r){Fc(e,n,r),Fc(t,2*n,2*r),Fc(t,2*n+1,2*r+1)}function Fc(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function Nc(e,t,n,r){const i=e-n,o=t-r;return i*i+o*o}var Bc;e.bh=void 0,(Bc=e.bh||(e.bh={})).create="create",Bc.load="load",Bc.fullLoad="fullLoad";let zc=null,Uc=[];const Hc=1e3/60,Vc="loadTime",Gc="fullLoadTime",Yc={mark(e){performance.mark(e)},frame(e){const t=e;null!=zc&&Uc.push(t-zc),zc=t},clearMetrics(){zc=null,Uc=[],performance.clearMeasures(Vc),performance.clearMeasures(Gc);for(const t in e.bh)performance.clearMarks(e.bh[t])},getPerformanceMetrics(){performance.measure(Vc,e.bh.create,e.bh.load),performance.measure(Gc,e.bh.create,e.bh.fullLoad);const t=performance.getEntriesByName(Vc)[0].duration,n=performance.getEntriesByName(Gc)[0].duration,r=Uc.length,i=1/(Uc.reduce((e,t)=>e+t,0)/r/1e3),o=Uc.filter(e=>e>Hc).reduce((e,t)=>e+(t-Hc)/Hc,0);return{loadTime:t,fullLoadTime:n,fps:i,percentDroppedFrames:o/(r+o)*100,totalFrames:r}}};e.$=function(e,t,n){var r,i,o,a,s,l,u,c,d,f,h,p,A=n[0],g=n[1],m=n[2];return t===e?(e[12]=t[0]*A+t[4]*g+t[8]*m+t[12],e[13]=t[1]*A+t[5]*g+t[9]*m+t[13],e[14]=t[2]*A+t[6]*g+t[10]*m+t[14],e[15]=t[3]*A+t[7]*g+t[11]*m+t[15]):(i=t[1],o=t[2],a=t[3],s=t[4],l=t[5],u=t[6],c=t[7],d=t[8],f=t[9],h=t[10],p=t[11],e[0]=r=t[0],e[1]=i,e[2]=o,e[3]=a,e[4]=s,e[5]=l,e[6]=u,e[7]=c,e[8]=d,e[9]=f,e[10]=h,e[11]=p,e[12]=r*A+s*g+d*m+t[12],e[13]=i*A+l*g+f*m+t[13],e[14]=o*A+u*g+h*m+t[14],e[15]=a*A+c*g+p*m+t[15]),e},e.A=ba,e.B=Ut,e.C=class{constructor(e,t,n){this.receive=e=>{const t=e.data,n=t.id;if(n&&(!t.targetMapId||this.mapId===t.targetMapId))if(""===t.type){delete this.tasks[n];const e=this.cancelCallbacks[n];delete this.cancelCallbacks[n],e&&e()}else O()||t.mustQueue?(this.tasks[n]=t,this.taskQueue.push(n),this.invoker.trigger()):this.processTask(n,t)},this.process=()=>{if(!this.taskQueue.length)return;const e=this.taskQueue.shift(),t=this.tasks[e];delete this.tasks[e],this.taskQueue.length&&this.invoker.trigger(),t&&this.processTask(e,t)},this.target=e,this.parent=t,this.mapId=n,this.callbacks={},this.tasks={},this.taskQueue=[],this.cancelCallbacks={},this.invoker=new Fu(this.process),this.target.addEventListener("message",this.receive,!1),this.globalScope=O()?e:window}send(e,t,n,r,i=!1){const o=Math.round(1e18*Math.random()).toString(36).substring(0,10);n&&(this.callbacks[o]=n);const a=[],s={id:o,type:e,hasCallback:!!n,targetMapId:r,mustQueue:i,sourceMapId:this.mapId,data:Pr(t,a)};return this.target.postMessage(s,{transfer:a}),{cancel:()=>{n&&delete this.callbacks[o],this.target.postMessage({id:o,type:"",targetMapId:r,sourceMapId:this.mapId})}}}processTask(e,t){if(""===t.type){const n=this.callbacks[e];delete this.callbacks[e],n&&(t.error?n(Ir(t.error)):n(null,Ir(t.data)))}else{let n=!1;const r=[],i=t.hasCallback?(t,i)=>{n=!0,delete this.cancelCallbacks[e];const o={id:e,type:"",sourceMapId:this.mapId,error:t?Pr(t):null,data:Pr(i,r)};this.target.postMessage(o,{transfer:r})}:e=>{n=!0};let o=null;const a=Ir(t.data);if(this.parent[t.type])o=this.parent[t.type](t.sourceMapId,a,i);else if("getWorkerSource"in this.parent){const e=t.type.split(".");o=this.parent.getWorkerSource(t.sourceMapId,e[0],a.source)[e[1]](a,i)}else i(new Error("Could not find function "+t.type));!n&&o&&o.cancel&&(this.cancelCallbacks[e]=o.cancel)}}remove(){this.invoker.remove(),this.target.removeEventListener("message",this.receive,!1)}},e.D=ci,e.E=X,e.F=function(e,t){const n={};for(let r=0;r{}}},e.Y=se,e.Z=function(){var e=new ba(16);return ba!=Float32Array&&(e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[11]=0,e[12]=0,e[13]=0,e[14]=0),e[0]=1,e[5]=1,e[10]=1,e[15]=1,e},e._=t,e.a=T,e.a$=class extends Gi{},e.a0=function(e,t,n){var r=n[0],i=n[1],o=n[2];return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e[3]=t[3]*r,e[4]=t[4]*i,e[5]=t[5]*i,e[6]=t[6]*i,e[7]=t[7]*i,e[8]=t[8]*o,e[9]=t[9]*o,e[10]=t[10]*o,e[11]=t[11]*o,e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e},e.a1=wa,e.a2=function(){return y++},e.a3=qi,e.a4=Mu,e.a5=function(){ei.isLoading()||ei.isLoaded()||"deferred"!==Jr()||$r()},e.a6=Bn,e.a7=$o,e.a8=ti,e.a9=tc,e.aA=Zr,e.aB=function(e){e=e.slice();const t=Object.create(null);for(let n=0;n{r[e.source]?n.push({command:$.removeLayer,args:[e.id]}):o.push(e)}),n=n.concat(i),function(e,t,n){t=t||[];const r=(e=e||[]).map(oe),i=t.map(oe),o=e.reduce(ae,{}),a=t.reduce(ae,{}),s=r.slice(),l=Object.create(null);let u,c,d,f,h,p,A;for(u=0,c=0;u@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,(e,n,r,i)=>{const o=r||i;return t[n]=!o||o.toLowerCase(),""}),t["max-age"]){const e=parseInt(t["max-age"],10);isNaN(e)?delete t["max-age"]:t["max-age"]=e}return t},e.ab=function(e,t){const n=[];for(const r in e)r in t||n.push(r);return n},e.ac=function(e){if(null==S){const t=e.navigator?e.navigator.userAgent:null;S=!!e.safari||!(!t||!(/\b(iPad|iPhone|iPod)\b/.test(t)||t.match("Safari")&&!t.match("Chrome")))}return S},e.ad=A,e.ae=function(e,t,n){var r=Math.sin(n),i=Math.cos(n),o=t[0],a=t[1],s=t[2],l=t[3],u=t[4],c=t[5],d=t[6],f=t[7];return t!==e&&(e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[0]=o*i+u*r,e[1]=a*i+c*r,e[2]=s*i+d*r,e[3]=l*i+f*r,e[4]=u*i-o*r,e[5]=c*i-a*r,e[6]=d*i-s*r,e[7]=f*i-l*r,e},e.af=function(e){var t=new ba(16);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t},e.ag=Ea,e.ah=function(e,t){let n=0,r=0;if("constant"===e.kind)r=e.layoutSize;else if("source"!==e.kind){const{interpolationType:i,minZoom:o,maxZoom:a}=e,s=i?A(Ht.interpolationFactor(i,t,o,a),0,1):0;"camera"===e.kind?r=Ut.number(e.minSize,e.maxSize,s):n=s}return{uSizeT:n,uSize:r}},e.aj=function(e,{uSize:t,uSizeT:n},{lowerSize:r,upperSize:i}){return"source"===e.kind?r/hu:"composite"===e.kind?Ut.number(r/hu,i/hu,n):t},e.ak=bu,e.al=function(e,t,n,r){const i=t.y-e.y,a=t.x-e.x,s=r.y-n.y,l=r.x-n.x,u=s*a-l*i;if(0===u)return null;const c=(l*(e.y-n.y)-s*(e.x-n.x))/u;return new o(e.x+c*a,e.y+c*i)},e.am=ac,e.an=na,e.ao=_a,e.ap=24,e.ar=gu,e.as=function(e,t){var n=t[0],r=t[1],i=t[2],o=t[3],a=t[4],s=t[5],l=t[6],u=t[7],c=t[8],d=t[9],f=t[10],h=t[11],p=t[12],A=t[13],g=t[14],m=t[15],y=n*s-r*a,v=n*l-i*a,b=n*u-o*a,_=r*l-i*s,w=r*u-o*s,x=i*u-o*l,M=c*A-d*p,E=c*g-f*p,O=c*m-h*p,S=d*g-f*A,T=d*m-h*A,C=f*m-h*g,L=y*C-v*T+b*S+_*O-w*E+x*M;return L?(e[0]=(s*C-l*T+u*S)*(L=1/L),e[1]=(i*T-r*C-o*S)*L,e[2]=(A*x-g*w+m*_)*L,e[3]=(f*w-d*x-h*_)*L,e[4]=(l*O-a*C-u*E)*L,e[5]=(n*C-i*O+o*E)*L,e[6]=(g*b-p*x-m*v)*L,e[7]=(c*x-f*b+h*v)*L,e[8]=(a*T-s*O+u*M)*L,e[9]=(r*O-n*T-o*M)*L,e[10]=(p*w-A*b+m*y)*L,e[11]=(d*b-c*w-h*y)*L,e[12]=(s*E-a*S-l*M)*L,e[13]=(n*S-r*E+i*M)*L,e[14]=(A*v-p*_-g*y)*L,e[15]=(c*_-d*v+f*y)*L,e):null},e.at=Cc,e.au=uu,e.av=Rc,e.aw=function(){const e={},t=Z.$version;for(const n in Z.$root){const r=Z.$root[n];if(r.required){let i=null;i="version"===n?t:"array"===r.type?[]:{},null!=i&&(e[n]=i)}}return e},e.ax=$,e.ay=Dr,e.az=N,e.b=function(e,t){const n=new Blob([new Uint8Array(e)],{type:"image/png"});createImageBitmap(n).then(e=>{t(null,e)}).catch(e=>{t(new Error(`Could not load image because of ${e.message}. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported.`))})},e.b0=mo,e.b1=function(e,t){var n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],s=e[5],l=e[6],u=e[7],c=e[8],d=e[9],f=e[10],h=e[11],p=e[12],A=e[13],g=e[14],m=e[15],y=t[0],v=t[1],b=t[2],_=t[3],w=t[4],x=t[5],M=t[6],E=t[7],O=t[8],S=t[9],T=t[10],C=t[11],L=t[12],P=t[13],I=t[14],D=t[15];return Math.abs(n-y)<=va*Math.max(1,Math.abs(n),Math.abs(y))&&Math.abs(r-v)<=va*Math.max(1,Math.abs(r),Math.abs(v))&&Math.abs(i-b)<=va*Math.max(1,Math.abs(i),Math.abs(b))&&Math.abs(o-_)<=va*Math.max(1,Math.abs(o),Math.abs(_))&&Math.abs(a-w)<=va*Math.max(1,Math.abs(a),Math.abs(w))&&Math.abs(s-x)<=va*Math.max(1,Math.abs(s),Math.abs(x))&&Math.abs(l-M)<=va*Math.max(1,Math.abs(l),Math.abs(M))&&Math.abs(u-E)<=va*Math.max(1,Math.abs(u),Math.abs(E))&&Math.abs(c-O)<=va*Math.max(1,Math.abs(c),Math.abs(O))&&Math.abs(d-S)<=va*Math.max(1,Math.abs(d),Math.abs(S))&&Math.abs(f-T)<=va*Math.max(1,Math.abs(f),Math.abs(T))&&Math.abs(h-C)<=va*Math.max(1,Math.abs(h),Math.abs(C))&&Math.abs(p-L)<=va*Math.max(1,Math.abs(p),Math.abs(L))&&Math.abs(A-P)<=va*Math.max(1,Math.abs(A),Math.abs(P))&&Math.abs(g-I)<=va*Math.max(1,Math.abs(g),Math.abs(I))&&Math.abs(m-D)<=va*Math.max(1,Math.abs(m),Math.abs(D))},e.b2=function(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e},e.b3=function(e,t,n){return e[0]=t[0]*n[0],e[1]=t[1]*n[1],e[2]=t[2]*n[2],e[3]=t[3]*n[3],e},e.b4=function(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]*t[3]},e.b5=g,e.b6=Ku,e.b7=Gu,e.b8=function(e,t,n,r,i){var o,a=1/Math.tan(t/2);return e[0]=a/n,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=a,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[11]=-1,e[12]=0,e[13]=0,e[15]=0,null!=i&&i!==1/0?(e[10]=(i+r)*(o=1/(r-i)),e[14]=2*i*r*o):(e[10]=-1,e[14]=-2*r),e},e.b9=function(e,t,n){var r=Math.sin(n),i=Math.cos(n),o=t[4],a=t[5],s=t[6],l=t[7],u=t[8],c=t[9],d=t[10],f=t[11];return t!==e&&(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[4]=o*i+u*r,e[5]=a*i+c*r,e[6]=s*i+d*r,e[7]=l*i+f*r,e[8]=u*i-o*r,e[9]=c*i-a*r,e[10]=d*i-s*r,e[11]=f*i-l*r,e},e.bA=r,e.bB=xl,e.bC=In,e.bD=ei,e.ba=h,e.bb=p,e.bc=function(e,t){return e[0]=t[0],e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=t[1],e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=t[2],e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e},e.bd=class extends Mi{},e.be=Nu,e.bf=Yu,e.bg=Yc,e.bi=F,e.bj=function(e,t,n=!1){if(qr===Vr||qr===Gr||qr===Yr)throw new Error("setRTLTextPlugin cannot be called multiple times.");Xr=R.resolveURL(e),qr=Vr,Wr=t,Kr(),n||$r()},e.bk=Jr,e.bl=function(e,t){const n={};for(let r=0;r24*e)}let v=s?"center":r.get("text-justify").evaluate(i,{},t.canonical);const b=r.get("symbol-placement"),_="point"===b?24*r.get("text-max-width").evaluate(i,{},t.canonical):0,w=()=>{t.bucket.allowVerticalPlacement&&Rr(o)&&(p.vertical=tu(A,t.glyphMap,t.glyphPositions,t.imagePositions,c,_,a,g,"left",h,m,e.ai.vertical,!0,b,f,d))};if(!s&&y){const n=new Set;if("auto"===v)for(let e=0;e{t(null,n),URL.revokeObjectURL(n.src),n.onload=null,window.requestAnimationFrame(()=>{n.src=C})},n.onerror=()=>t(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."));const r=new Blob([new Uint8Array(e)],{type:"image/png"});n.src=e.byteLength?URL.createObjectURL(r):C},e.e=m,e.f=function(e,t){return U(m(e,{type:"json"}),t)},e.g=B,e.h=R,e.i=O,e.j=q,e.k=W,e.l=H,e.m=U,e.n=function(e){return new Wl(e).readFields(ql,[])},e.o=function(e,t,n){if(!e.length)return n(null,[]);let r=e.length;const i=new Array(e.length);let o=null;e.forEach((e,a)=>{t(e,(e,t)=>{e&&(o=e),i[a]=t,0==--r&&n(o,i)})})},e.p=Kl,e.q=ka,e.r=Ai,e.s=V,e.t=xr,e.u=kr,e.v=Z,e.w=x,e.x=Or,e.y=wr,e.z=function([e,t,n]){return t+=90,t*=Math.PI/180,n*=Math.PI/180,{x:e*Math.cos(t)*Math.sin(n),y:e*Math.sin(t)*Math.sin(n),z:e*Math.cos(n)}}})),r(0,(function(e){class t{constructor(e){this.keyCache={},e&&this.replace(e)}replace(e){this._layerConfigs={},this._layers={},this.update(e,[])}update(t,n){for(const n of t){this._layerConfigs[n.id]=n;const t=this._layers[n.id]=e.aC(n);t._featureFilter=e.a6(t.filter),this.keyCache[n.id]&&delete this.keyCache[n.id]}for(const e of n)delete this.keyCache[e],delete this._layerConfigs[e],delete this._layers[e];this.familiesBySource={};const r=e.bl(Object.values(this._layerConfigs),this.keyCache);for(const e of r){const t=e.map(e=>this._layers[e.id]),n=t[0];if("none"===n.visibility)continue;const r=n.source||"";let i=this.familiesBySource[r];i||(i=this.familiesBySource[r]={});const o=n.sourceLayer||"_geojsonTileLayer";let a=i[o];a||(a=i[o]=[]),a.push(t)}}}class n{constructor(t){const n={},r=[];for(const e in t){const i=t[e],o=n[e]={};for(const e in i){const t=i[+e];if(!t||0===t.bitmap.width||0===t.bitmap.height)continue;const n={x:0,y:0,w:t.bitmap.width+2,h:t.bitmap.height+2};r.push(n),o[e]={rect:n,metrics:t.metrics}}}const{w:i,h:o}=e.p(r),a=new e.q({width:i||1,height:o||1});for(const r in t){const i=t[r];for(const t in i){const o=i[+t];if(!o||0===o.bitmap.width||0===o.bitmap.height)continue;const s=n[r][t].rect;e.q.copy(o.bitmap,a,{x:0,y:0},{x:s.x+1,y:s.y+1},o.bitmap)}}this.image=a,this.positions=n}}e.bm("GlyphAtlas",n);class r{constructor(t){this.tileID=new e.O(t.tileID.overscaledZ,t.tileID.wrap,t.tileID.canonical.z,t.tileID.canonical.x,t.tileID.canonical.y),this.uid=t.uid,this.zoom=t.zoom,this.pixelRatio=t.pixelRatio,this.tileSize=t.tileSize,this.source=t.source,this.overscaling=this.tileID.overscaleFactor(),this.showCollisionBoxes=t.showCollisionBoxes,this.collectResourceTiming=!!t.collectResourceTiming,this.returnDependencies=!!t.returnDependencies,this.promoteId=t.promoteId,this.inFlightDependencies=[],this.dependencySentinel=-1}parse(t,r,o,a,s){this.status="parsing",this.data=t,this.collisionBoxArray=new e.a3;const l=new e.bn(Object.keys(t.layers).sort()),u=new e.bo(this.tileID,this.promoteId);u.bucketLayerIDs=[];const c={},d={featureIndex:u,iconDependencies:{},patternDependencies:{},glyphDependencies:{},availableImages:o},f=r.familiesBySource[this.source];for(const n in f){const r=t.layers[n];if(!r)continue;1===r.version&&e.w(`Vector tile source "${this.source}" layer "${n}" does not use vector tile spec v2 and therefore may have some rendering errors.`);const a=l.encode(n),s=[];for(let e=0;e=n.maxzoom||"none"!==n.visibility&&(i(t,this.zoom,o),(c[n.id]=n.createBucket({index:u.bucketLayerIDs.length,layers:t,zoom:this.zoom,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:a,sourceID:this.source})).populate(s,d,this.tileID.canonical),u.bucketLayerIDs.push(t.map(e=>e.id)))}}let h,p,A,g;const m=e.aH(d.glyphDependencies,e=>Object.keys(e).map(Number));this.inFlightDependencies.forEach(e=>null==e?void 0:e.cancel()),this.inFlightDependencies=[];const y=++this.dependencySentinel;Object.keys(m).length?this.inFlightDependencies.push(a.send("getGlyphs",{uid:this.uid,stacks:m,source:this.source,tileID:this.tileID,type:"glyphs"},(e,t)=>{y===this.dependencySentinel&&(h||(h=e,p=t,_.call(this)))})):p={};const v=Object.keys(d.iconDependencies);v.length?this.inFlightDependencies.push(a.send("getImages",{icons:v,source:this.source,tileID:this.tileID,type:"icons"},(e,t)=>{y===this.dependencySentinel&&(h||(h=e,A=t,_.call(this)))})):A={};const b=Object.keys(d.patternDependencies);function _(){if(h)return s(h);if(p&&A&&g){const t=new n(p),r=new e.bp(A,g);for(const n in c){const a=c[n];a instanceof e.a4?(i(a.layers,this.zoom,o),e.bq({bucket:a,glyphMap:p,glyphPositions:t.positions,imageMap:A,imagePositions:r.iconPositions,showCollisionBoxes:this.showCollisionBoxes,canonical:this.tileID.canonical})):a.hasPattern&&(a instanceof e.br||a instanceof e.bs||a instanceof e.bt)&&(i(a.layers,this.zoom,o),a.addFeatures(d,this.tileID.canonical,r.patternPositions))}this.status="done",s(null,{buckets:Object.values(c).filter(e=>!e.isEmpty()),featureIndex:u,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:t.image,imageAtlas:r,glyphMap:this.returnDependencies?p:null,iconMap:this.returnDependencies?A:null,glyphPositions:this.returnDependencies?t.positions:null})}}b.length?this.inFlightDependencies.push(a.send("getImages",{icons:b,source:this.source,tileID:this.tileID,type:"patterns"},(e,t)=>{y===this.dependencySentinel&&(h||(h=e,g=t,_.call(this)))})):g={},_.call(this)}}function i(t,n,r){const i=new e.a8(n);for(const e of t)e.recalculate(i,r)}function o(t,n){const r=e.l(t.request,(r,i,o,a)=>{if(r)n(r);else if(i)try{const t=new e.bw.VectorTile(new e.bv(i));n(null,{vectorTile:t,rawData:i,cacheControl:o,expires:a})}catch(e){const r=new Uint8Array(i);let o=`Unable to parse the tile at ${t.request.url}, `;o+=31===r[0]&&139===r[1]?"please make sure the data is not gzipped and that you have configured the relevant header in the server":"got error: "+e.messge,n(new Error(o))}});return()=>{r.cancel(),n()}}class a{constructor(e,t,n,r){this.actor=e,this.layerIndex=t,this.availableImages=n,this.loadVectorData=r||o,this.fetching={},this.loading={},this.loaded={}}loadTile(t,n){const i=t.uid;this.loading||(this.loading={});const o=!!(t&&t.request&&t.request.collectResourceTiming)&&new e.bu(t.request),a=this.loading[i]=new r(t);a.abort=this.loadVectorData(t,(t,r)=>{if(delete this.loading[i],t||!r)return a.status="done",this.loaded[i]=a,n(t);const s=r.rawData,l={};r.expires&&(l.expires=r.expires),r.cacheControl&&(l.cacheControl=r.cacheControl);const u={};if(o){const e=o.finish();e&&(u.resourceTiming=JSON.parse(JSON.stringify(e)))}a.vectorTile=r.vectorTile,a.parse(r.vectorTile,this.layerIndex,this.availableImages,this.actor,(t,r)=>{if(delete this.fetching[i],t||!r)return n(t);n(null,e.e({rawTileData:s.slice(0)},r,l,u))}),this.loaded=this.loaded||{},this.loaded[i]=a,this.fetching[i]={rawTileData:s,cacheControl:l,resourceTiming:u}})}reloadTile(t,n){const r=this.loaded,i=t.uid;if(r&&r[i]){const o=r[i];o.showCollisionBoxes=t.showCollisionBoxes,"parsing"===o.status?o.parse(o.vectorTile,this.layerIndex,this.availableImages,this.actor,(t,r)=>{if(t||!r)return n(t,r);let o;if(this.fetching[i]){const{rawTileData:t,cacheControl:n,resourceTiming:a}=this.fetching[i];delete this.fetching[i],o=e.e({rawTileData:t.slice(0)},r,n,a)}else o=r;n(null,o)}):"done"===o.status&&(o.vectorTile?o.parse(o.vectorTile,this.layerIndex,this.availableImages,this.actor,n):n())}}abortTile(e,t){const n=this.loading,r=e.uid;n&&n[r]&&n[r].abort&&(n[r].abort(),delete n[r]),t()}removeTile(e,t){const n=this.loaded,r=e.uid;n&&n[r]&&delete n[r],t()}}class s{constructor(){this.loaded={}}loadTile(t,n){return e._(this,void 0,void 0,(function*(){const{uid:r,encoding:i,rawImageData:o,redFactor:a,greenFactor:s,blueFactor:l,baseShift:u}=t,c=o.width+2,d=o.height+2,f=e.a(o)?new e.R({width:c,height:d},yield e.bx(o,-1,-1,c,d)):o,h=new e.by(r,f,i,a,s,l,u);this.loaded=this.loaded||{},this.loaded[r]=h,n(null,h)}))}removeTile(e){const t=this.loaded,n=e.uid;t&&t[n]&&delete t[n]}}function l(e,t){if(0!==e.length){u(e[0],t);for(var n=1;n=Math.abs(s)?n-l+s:s-l+n,n=l}n+r>=0!=!!t&&e.reverse()}var c=e.bz((function e(t,n){var r,i=t&&t.type;if("FeatureCollection"===i)for(r=0;r>31}function O(e,t){for(var n=e.loadGeometry(),r=e.type,i=0,o=0,a=n.length,s=0;se},L=Math.fround||(P=new Float32Array(1),e=>(P[0]=+e,P[0]));var P;class I{constructor(e){this.options=Object.assign(Object.create(C),e),this.trees=new Array(this.options.maxZoom+1),this.stride=this.options.reduce?7:6,this.clusterProps=[]}load(e){const{log:t,minZoom:n,maxZoom:r}=this.options;t&&console.time("total time");const i=`prepare ${e.length} points`;t&&console.time(i),this.points=e;const o=[];for(let t=0;t=n;e--){const n=+Date.now();a=this.trees[e]=this._createTree(this._cluster(a,e)),t&&console.log("z%d: %d clusters in %dms",e,a.numItems,+Date.now()-n)}return t&&console.timeEnd("total time"),this}getClusters(e,t){let n=((e[0]+180)%360+360)%360-180;const r=Math.max(-90,Math.min(90,e[1]));let i=180===e[2]?180:((e[2]+180)%360+360)%360-180;const o=Math.max(-90,Math.min(90,e[3]));if(e[2]-e[0]>=360)n=-180,i=180;else if(n>i){const e=this.getClusters([n,r,180,o],t),a=this.getClusters([-180,r,i,o],t);return e.concat(a)}const a=this.trees[this._limitZoom(t)],s=a.range(R(n),j(o),R(i),j(r)),l=a.data,u=[];for(const e of s){const t=this.stride*e;u.push(l[t+5]>1?D(l,t,this.clusterProps):this.points[l[t+3]])}return u}getChildren(e){const t=this._getOriginId(e),n=this._getOriginZoom(e),r="No cluster with the specified id.",i=this.trees[n];if(!i)throw new Error(r);const o=i.data;if(t*this.stride>=o.length)throw new Error(r);const a=this.options.radius/(this.options.extent*Math.pow(2,n-1)),s=i.within(o[t*this.stride],o[t*this.stride+1],a),l=[];for(const t of s){const n=t*this.stride;o[n+4]===e&&l.push(o[n+5]>1?D(o,n,this.clusterProps):this.points[o[n+3]])}if(0===l.length)throw new Error(r);return l}getLeaves(e,t,n){const r=[];return this._appendLeaves(r,e,t=t||10,n=n||0,0),r}getTile(e,t,n){const r=this.trees[this._limitZoom(e)],i=Math.pow(2,e),{extent:o,radius:a}=this.options,s=a/o,l=(n-s)/i,u=(n+1+s)/i,c={features:[]};return this._addTileFeatures(r.range((t-s)/i,l,(t+1+s)/i,u),r.data,t,n,i,c),0===t&&this._addTileFeatures(r.range(1-s/i,l,1,u),r.data,i,n,i,c),t===i-1&&this._addTileFeatures(r.range(0,l,s/i,u),r.data,-1,n,i,c),c.features.length?c:null}getClusterExpansionZoom(e){let t=this._getOriginZoom(e)-1;for(;t<=this.options.maxZoom;){const n=this.getChildren(e);if(t++,1!==n.length)break;e=n[0].properties.cluster_id}return t}_appendLeaves(e,t,n,r,i){const o=this.getChildren(t);for(const t of o){const o=t.properties;if(o&&o.cluster?i+o.point_count<=r?i+=o.point_count:i=this._appendLeaves(e,o.cluster_id,n,r,i):i1;let l,u,c;if(s)l=k(t,e,this.clusterProps),u=t[e],c=t[e+1];else{const n=this.points[t[e+3]];l=n.properties;const[r,i]=n.geometry.coordinates;u=R(r),c=j(i)}const d={type:1,geometry:[[Math.round(this.options.extent*(u*i-n)),Math.round(this.options.extent*(c*i-r))]],tags:l};let f;f=s||this.options.generateId?t[e+3]:this.points[t[e+3]].id,void 0!==f&&(d.id=f),o.features.push(d)}}_limitZoom(e){return Math.max(this.options.minZoom,Math.min(Math.floor(+e),this.options.maxZoom+1))}_cluster(e,t){const{radius:n,extent:r,reduce:i,minPoints:o}=this.options,a=n/(r*Math.pow(2,t)),s=e.data,l=[],u=this.stride;for(let n=0;nt&&(h+=s[n+5])}if(h>f&&h>=o){let e,o=r*f,a=c*f,p=-1;const A=((n/u|0)<<5)+(t+1)+this.points.length;for(const r of d){const l=r*u;if(s[l+2]<=t)continue;s[l+2]=t;const c=s[l+5];o+=s[l]*c,a+=s[l+1]*c,s[l+4]=A,i&&(e||(e=this._map(s,n,!0),p=this.clusterProps.length,this.clusterProps.push(e)),i(e,this._map(s,l)))}s[n+4]=A,l.push(o/h,a/h,1/0,A,-1,h),i&&l.push(p)}else{for(let e=0;e1)for(const e of d){const n=e*u;if(!(s[n+2]<=t)){s[n+2]=t;for(let e=0;e>5}_getOriginZoom(e){return(e-this.points.length)%32}_map(e,t,n){if(e[t+5]>1){const r=this.clusterProps[e[t+6]];return n?Object.assign({},r):r}const r=this.points[e[t+3]].properties,i=this.options.map(r);return n&&i===r?Object.assign({},i):i}}function D(e,t,n){return{type:"Feature",id:e[t+3],properties:k(e,t,n),geometry:{type:"Point",coordinates:[(r=e[t],360*(r-.5)),F(e[t+1])]}};var r}function k(e,t,n){const r=e[t+5],i=r>=1e4?Math.round(r/1e3)+"k":r>=1e3?Math.round(r/100)/10+"k":r,o=e[t+6],a=-1===o?{}:Object.assign({},n[o]);return Object.assign(a,{cluster:!0,cluster_id:e[t+3],point_count:r,point_count_abbreviated:i})}function R(e){return e/360+.5}function j(e){const t=Math.sin(e*Math.PI/180),n=.5-.25*Math.log((1+t)/(1-t))/Math.PI;return n<0?0:n>1?1:n}function F(e){const t=(180-360*e)*Math.PI/180;return 360*Math.atan(Math.exp(t))/Math.PI-90}function N(e,t,n,r,i,o){var a=i-n,s=o-r;if(0!==a||0!==s){var l=((e-n)*a+(t-r)*s)/(a*a+s*s);l>1?(n=i,r=o):l>0&&(n+=a*l,r+=s*l)}return(a=e-n)*a+(s=t-r)*s}function B(e,t,n,r){var i={id:void 0===e?null:e,type:t,geometry:n,tags:r,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};return function(e){var t=e.geometry,n=e.type;if("Point"===n||"MultiPoint"===n||"LineString"===n)z(e,t);else if("Polygon"===n||"MultiLineString"===n)for(var r=0;r0&&(a+=r?(i*u-l*o)/2:Math.sqrt(Math.pow(l-i,2)+Math.pow(u-o,2))),i=l,o=u}var c=t.length-3;t[2]=1,function e(t,n,r,i){for(var o,a=i,s=r-n>>1,l=r-n,u=t[n],c=t[n+1],d=t[r],f=t[r+1],h=n+3;ha)o=h,a=p;else if(p===a){var A=Math.abs(h-s);Ai&&(o-n>3&&e(t,n,o,i),t[o+2]=a,r-o>3&&e(t,o,r,i))}(t,0,c,n),t[c+2]=1,t.size=Math.abs(a),t.start=0,t.end=t.size}function G(e,t,n,r){for(var i=0;i1?1:n}function q(e,t,n,r,i,o,a,s){if(r/=t,o>=(n/=t)&&a=r)return null;for(var l=[],u=0;u=n&&p=r)){var A=[];if("Point"===f||"MultiPoint"===f)X(d,A,n,r,i);else if("LineString"===f)Z(d,A,n,r,i,!1,s.lineMetrics);else if("MultiLineString"===f)Q(d,A,n,r,i,!1);else if("Polygon"===f)Q(d,A,n,r,i,!0);else if("MultiPolygon"===f)for(var g=0;g=n&&a<=r&&(t.push(e[o]),t.push(e[o+1]),t.push(e[o+2]))}}function Z(e,t,n,r,i,o,a){for(var s,l,u=K(e),c=0===i?$:ee,d=e.start,f=0;fn&&(l=c(u,h,p,g,m,n),a&&(u.start=d+s*l)):y>r?v=n&&(l=c(u,h,p,g,m,n),b=!0),v>r&&y<=r&&(l=c(u,h,p,g,m,r),b=!0),!o&&b&&(a&&(u.end=d+s*l),t.push(u),u=K(e)),a&&(d+=s)}var _=e.length-3;h=e[_],p=e[_+1],A=e[_+2],(y=0===i?h:p)>=n&&y<=r&&J(u,h,p,A),_=u.length-3,o&&_>=3&&(u[_]!==u[0]||u[_+1]!==u[1])&&J(u,u[0],u[1],u[2]),u.length&&t.push(u)}function K(e){var t=[];return t.size=e.size,t.start=e.start,t.end=e.end,t}function Q(e,t,n,r,i,o){for(var a=0;aa.maxX&&(a.maxX=c),d>a.maxY&&(a.maxY=d)}return a}function ae(e,t,n,r){var i=t.geometry,o=t.type,a=[];if("Point"===o||"MultiPoint"===o)for(var s=0;s0&&t.size<(i?a:r))n.numPoints+=t.length/3;else{for(var s=[],l=0;la)&&(n.numSimplified++,s.push(t[l]),s.push(t[l+1])),n.numPoints++;i&&function(e,t){for(var n=0,r=0,i=e.length,o=i-2;r0===t)for(r=0,i=e.length;r24)throw new Error("maxZoom should be in the 0-24 range");if(t.promoteId&&t.generateId)throw new Error("promoteId and generateId cannot be used together.");var r=function(e,t){var n=[];if("FeatureCollection"===e.type)for(var r=0;r1&&console.time("creation"),f=this.tiles[d]=oe(e,t,n,r,l),this.tileCoords.push({z:t,x:n,y:r}),u)){u>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",t,n,r,f.numFeatures,f.numPoints,f.numSimplified),console.timeEnd("creation"));var h="z"+t;this.stats[h]=(this.stats[h]||0)+1,this.total++}if(f.source=e,i){if(t===l.maxZoom||t===i)continue;var p=1<1&&console.time("clipping");var A,g,m,y,v,b,_=.5*l.buffer/l.extent,w=.5-_,x=.5+_,M=1+_;A=g=m=y=null,v=q(e,c,n-_,n+x,0,f.minX,f.maxX,l),b=q(e,c,n+w,n+M,0,f.minX,f.maxX,l),e=null,v&&(A=q(v,c,r-_,r+x,1,f.minY,f.maxY,l),g=q(v,c,r+w,r+M,1,f.minY,f.maxY,l),v=null),b&&(m=q(b,c,r-_,r+x,1,f.minY,f.maxY,l),y=q(b,c,r+w,r+M,1,f.minY,f.maxY,l),b=null),u>1&&console.timeEnd("clipping"),s.push(A||[],t+1,2*n,2*r),s.push(g||[],t+1,2*n,2*r+1),s.push(m||[],t+1,2*n+1,2*r),s.push(y||[],t+1,2*n+1,2*r+1)}}},le.prototype.getTile=function(e,t,n){var r=this.options,i=r.extent,o=r.debug;if(e<0||e>24)return null;var a=1<1&&console.log("drilling down to z%d-%d-%d",e,t,n);for(var l,u=e,c=t,d=n;!l&&u>0;)u--,c=Math.floor(c/2),d=Math.floor(d/2),l=this.tiles[ue(u,c,d)];return l&&l.source?(o>1&&console.log("found parent tile z%d-%d-%d",u,c,d),o>1&&console.time("drilling down"),this.splitTile(l.source,u,c,d,e,t,n),o>1&&console.timeEnd("drilling down"),this.tiles[s]?re(this.tiles[s],i):null):null};class he extends a{constructor(t,n,r,i){super(t,n,r),this._dataUpdateable=new Map,this.loadGeoJSON=(t,n)=>{const{promoteId:r}=t;if(t.request)return e.f(t.request,(e,t,i,o)=>{this._dataUpdateable=de(t,r)?fe(t,r):void 0,n(e,t,i,o)});if("string"==typeof t.data)try{const e=JSON.parse(t.data);this._dataUpdateable=de(e,r)?fe(e,r):void 0,n(null,e)}catch(e){n(new Error(`Input data given to '${t.source}' is not a valid GeoJSON object.`))}else t.dataDiff?this._dataUpdateable?(function(e,t,n){var r,i,o,a;if(t.removeAll&&e.clear(),t.remove)for(const n of t.remove)e.delete(n);if(t.add)for(const r of t.add){const t=ce(r,n);null!=t&&e.set(t,r)}if(t.update)for(const n of t.update){let t=e.get(n.id);if(null==t)continue;const s=!n.removeAllProperties&&((null===(r=n.removeProperties)||void 0===r?void 0:r.length)>0||(null===(i=n.addOrUpdateProperties)||void 0===i?void 0:i.length)>0);if((n.newGeometry||n.removeAllProperties||s)&&(t=Object.assign({},t),e.set(n.id,t),s&&(t.properties=Object.assign({},t.properties))),n.newGeometry&&(t.geometry=n.newGeometry),n.removeAllProperties)t.properties={};else if((null===(o=n.removeProperties)||void 0===o?void 0:o.length)>0)for(const e of n.removeProperties)Object.prototype.hasOwnProperty.call(t.properties,e)&&delete t.properties[e];if((null===(a=n.addOrUpdateProperties)||void 0===a?void 0:a.length)>0)for(const{key:e,value:r}of n.addOrUpdateProperties)t.properties[e]=r}}(this._dataUpdateable,t.dataDiff,r),n(null,{type:"FeatureCollection",features:Array.from(this._dataUpdateable.values())})):n(new Error("Cannot update existing geojson data in "+t.source)):n(new Error(`Input data given to '${t.source}' is not a valid GeoJSON object.`));return{cancel:()=>{}}},this.loadVectorData=this.loadGeoJSONTile,i&&(this.loadGeoJSON=i)}loadGeoJSONTile(t,n){const r=t.tileID.canonical;if(!this._geoJSONIndex)return n(null,null);const i=this._geoJSONIndex.getTile(r.z,r.x,r.y);if(!i)return n(null,null);const o=new class{constructor(t){this.layers={_geojsonTileLayer:this},this.name="_geojsonTileLayer",this.extent=e.N,this.length=t.length,this._features=t}feature(t){return new class{constructor(t){this._feature=t,this.extent=e.N,this.type=t.type,this.properties=t.tags,"id"in t&&!isNaN(t.id)&&(this.id=parseInt(t.id,10))}loadGeometry(){if(1===this._feature.type){const t=[];for(const n of this._feature.geometry)t.push([new e.P(n[0],n[1])]);return t}{const t=[];for(const n of this._feature.geometry){const r=[];for(const t of n)r.push(new e.P(t[0],t[1]));t.push(r)}return t}}toGeoJSON(e,t,n){return d.call(this,e,t,n)}}(this._features[t])}}(i.features);let a=T(o);0===a.byteOffset&&a.byteLength===a.buffer.byteLength||(a=new Uint8Array(a)),n(null,{vectorTile:o,rawData:a.buffer})}loadData(t,n){var r;null===(r=this._pendingRequest)||void 0===r||r.cancel(),this._pendingCallback&&this._pendingCallback(null,{abandoned:!0});const i=!!(t&&t.request&&t.request.collectResourceTiming)&&new e.bu(t.request);this._pendingCallback=n,this._pendingRequest=this.loadGeoJSON(t,(r,o)=>{if(delete this._pendingCallback,delete this._pendingRequest,r||!o)return n(r);if("object"!=typeof o)return n(new Error(`Input data given to '${t.source}' is not a valid GeoJSON object.`));{c(o,!0);try{if(t.filter){const n=e.bC(t.filter,{type:"boolean","property-type":"data-driven",overridable:!1,transition:!1});if("error"===n.result)throw new Error(n.value.map(e=>`${e.key}: ${e.message}`).join(", "));const r=o.features.filter(e=>n.value.evaluate({zoom:0},e));o={type:"FeatureCollection",features:r}}this._geoJSONIndex=t.cluster?new I(function({superclusterOptions:t,clusterProperties:n}){if(!n||!t)return t;const r={},i={},o={accumulated:null,zoom:0},a={properties:null},s=Object.keys(n);for(const t of s){const[o,a]=n[t],s=e.bC(a),l=e.bC("string"==typeof o?[o,["accumulated"],["get",t]]:o);r[t]=s.value,i[t]=l.value}return t.map=e=>{a.properties=e;const t={};for(const e of s)t[e]=r[e].evaluate(o,a);return t},t.reduce=(e,t)=>{a.properties=t;for(const t of s)o.accumulated=e[t],e[t]=i[t].evaluate(o,a)},t}(t)).load(o.features):function(e,t){return new le(e,t)}(o,t.geojsonVtOptions)}catch(r){return n(r)}this.loaded={};const a={};if(i){const e=i.finish();e&&(a.resourceTiming={},a.resourceTiming[t.source]=JSON.parse(JSON.stringify(e)))}n(null,a)}})}reloadTile(e,t){const n=this.loaded;return n&&n[e.uid]?super.reloadTile(e,t):this.loadTile(e,t)}removeSource(e,t){this._pendingCallback&&this._pendingCallback(null,{abandoned:!0}),t()}getClusterExpansionZoom(e,t){try{t(null,this._geoJSONIndex.getClusterExpansionZoom(e.clusterId))}catch(e){t(e)}}getClusterChildren(e,t){try{t(null,this._geoJSONIndex.getChildren(e.clusterId))}catch(e){t(e)}}getClusterLeaves(e,t){try{t(null,this._geoJSONIndex.getLeaves(e.clusterId,e.limit,e.offset))}catch(e){t(e)}}}class pe{constructor(t){this.self=t,this.actor=new e.C(t,this),this.layerIndexes={},this.availableImages={},this.workerSourceTypes={vector:a,geojson:he},this.workerSources={},this.demWorkerSources={},this.self.registerWorkerSource=(e,t)=>{if(this.workerSourceTypes[e])throw new Error(`Worker source with name "${e}" already registered.`);this.workerSourceTypes[e]=t},this.self.registerRTLTextPlugin=t=>{if(e.bD.isParsed())throw new Error("RTL text plugin already registered.");e.bD.applyArabicShaping=t.applyArabicShaping,e.bD.processBidirectionalText=t.processBidirectionalText,e.bD.processStyledBidirectionalText=t.processStyledBidirectionalText}}setReferrer(e,t){this.referrer=t}setImages(e,t,n){this.availableImages[e]=t;for(const n in this.workerSources[e]){const r=this.workerSources[e][n];for(const e in r)r[e].availableImages=t}n()}setLayers(e,t,n){this.getLayerIndex(e).replace(t),n()}updateLayers(e,t,n){this.getLayerIndex(e).update(t.layers,t.removedIds),n()}loadTile(e,t,n){this.getWorkerSource(e,t.type,t.source).loadTile(t,n)}loadDEMTile(e,t,n){this.getDEMWorkerSource(e,t.source).loadTile(t,n)}reloadTile(e,t,n){this.getWorkerSource(e,t.type,t.source).reloadTile(t,n)}abortTile(e,t,n){this.getWorkerSource(e,t.type,t.source).abortTile(t,n)}removeTile(e,t,n){this.getWorkerSource(e,t.type,t.source).removeTile(t,n)}removeDEMTile(e,t){this.getDEMWorkerSource(e,t.source).removeTile(t)}removeSource(e,t,n){if(!this.workerSources[e]||!this.workerSources[e][t.type]||!this.workerSources[e][t.type][t.source])return;const r=this.workerSources[e][t.type][t.source];delete this.workerSources[e][t.type][t.source],void 0!==r.removeSource?r.removeSource(t,n):n()}loadWorkerSource(e,t,n){try{this.self.importScripts(t.url),n()}catch(e){n(e.toString())}}syncRTLPluginState(t,n,r){try{e.bD.setState(n);const t=e.bD.getPluginURL();if(e.bD.isLoaded()&&!e.bD.isParsed()&&null!=t){this.self.importScripts(t);const n=e.bD.isParsed();r(n?void 0:new Error("RTL Text Plugin failed to import scripts from "+t),n)}}catch(e){r(e.toString())}}getAvailableImages(e){let t=this.availableImages[e];return t||(t=[]),t}getLayerIndex(e){let n=this.layerIndexes[e];return n||(n=this.layerIndexes[e]=new t),n}getWorkerSource(e,t,n){return this.workerSources[e]||(this.workerSources[e]={}),this.workerSources[e][t]||(this.workerSources[e][t]={}),this.workerSources[e][t][n]||(this.workerSources[e][t][n]=new this.workerSourceTypes[t]({send:(t,n,r)=>{this.actor.send(t,n,r,e)}},this.getLayerIndex(e),this.getAvailableImages(e))),this.workerSources[e][t][n]}getDEMWorkerSource(e,t){return this.demWorkerSources[e]||(this.demWorkerSources[e]={}),this.demWorkerSources[e][t]||(this.demWorkerSources[e][t]=new s),this.demWorkerSources[e][t]}}return e.i()&&(self.worker=new pe(self)),pe})),r(0,(function(e){class t{static testProp(e){if(!t.docStyle)return e[0];for(let n=0;n{window.removeEventListener("click",t.suppressClickInternal,!0)},0)}static mousePos(t,n){const r=t.getBoundingClientRect();return new e.P(n.clientX-r.left-t.clientLeft,n.clientY-r.top-t.clientTop)}static touchPos(t,n){const r=t.getBoundingClientRect(),i=[];for(let o=0;o{r=[],i=0,o=0,a={}},t.addThrottleControl=e=>{const t=o++;return a[t]=e,t},t.removeThrottleControl=e=>{delete a[e],u()},t.getImage=(e,t,o=!0)=>{n.supported&&(e.headers||(e.headers={}),e.headers.accept="image/webp,*/*");const a={requestParameters:e,supportImageRefresh:o,callback:t,cancelled:!1,completed:!1,cancel:()=>{a.completed||a.cancelled||(a.cancelled=!0,a.innerRequest&&(a.innerRequest.cancel(),i--),u())}};return r.push(a),u(),a};const s=t=>{const{requestParameters:n,supportImageRefresh:r,callback:i}=t;return e.e(n,{type:"image"}),(!1!==r||e.i()||e.g(n.url)||n.headers&&!Object.keys(n.headers).reduce((e,t)=>e&&"accept"===t,!0)?e.m:c)(n,(e,n,r,o)=>{l(t,i,e,n,r,o)})},l=(t,n,r,o,a,s)=>{r?n(r):o instanceof HTMLImageElement||e.a(o)?n(null,o):o&&((t,n)=>{"function"==typeof createImageBitmap?e.b(t,n):e.d(t,n)})(o,(e,t)=>{null!=e?n(e):null!=t&&n(null,t,{cacheControl:a,expires:s})}),t.cancelled||(t.completed=!0,i--,u())},u=()=>{const t=(()=>{const e=Object.keys(a);let t=!1;if(e.length>0)for(const n of e)if(t=a[n](),t)break;return t})()?e.c.MAX_PARALLEL_IMAGE_REQUESTS_PER_FRAME:e.c.MAX_PARALLEL_IMAGE_REQUESTS;for(let e=i;e0;e++){const t=r.shift();if(t.cancelled){e--;continue}const n=s(t);i++,t.innerRequest=n}},c=(t,n)=>{const r=new Image,i=t.url;let o=!1;const a=t.credentials;return a&&"include"===a?r.crossOrigin="use-credentials":(a&&"same-origin"===a||!e.s(i))&&(r.crossOrigin="anonymous"),r.fetchPriority="high",r.onload=()=>{n(null,r),r.onerror=r.onload=null},r.onerror=()=>{o||n(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.")),r.onerror=r.onload=null},r.src=i,{cancel:()=>{o=!0,r.src=""}}}}(l||(l={})),l.resetRequestQueue(),function(e){e.Glyphs="Glyphs",e.Image="Image",e.Source="Source",e.SpriteImage="SpriteImage",e.SpriteJSON="SpriteJSON",e.Style="Style",e.Tile="Tile",e.Unknown="Unknown"}(u||(u={}));class c{constructor(e){this._transformRequestFn=e}transformRequest(e,t){return this._transformRequestFn&&this._transformRequestFn(e,t)||{url:e}}normalizeSpriteURL(e,t,n){const r=function(e){const t=e.match(d);if(!t)throw new Error(`Unable to parse URL "${e}"`);return{protocol:t[1],authority:t[2],path:t[3]||"/",params:t[4]?t[4].split("&"):[]}}(e);return r.path+=`${t}${n}`,function(e){const t=e.params.length?"?"+e.params.join("&"):"";return`${e.protocol}://${e.authority}${e.path}${t}`}(r)}setTransformRequest(e){this._transformRequestFn=e}}const d=/^(\w+):\/\/([^/?]*)(\/[^?]+)?\??(.+)?/;function f(t){var n=new e.A(3);return n[0]=t[0],n[1]=t[1],n[2]=t[2],n}var h,p=function(e,t,n){return e[0]=t[0]-n[0],e[1]=t[1]-n[1],e[2]=t[2]-n[2],e};h=new e.A(3),e.A!=Float32Array&&(h[0]=0,h[1]=0,h[2]=0);var A=function(e){var t=e[0],n=e[1];return t*t+n*n};function g(e){const t=[];if("string"==typeof e)t.push({id:"default",url:e});else if(e&&e.length>0){const n=[];for(const{id:r,url:i}of e){const e=`${r}${i}`;-1===n.indexOf(e)&&(n.push(e),t.push({id:r,url:i}))}}return t}function m(t,n,r,i,o){if(i)return void t(i);if(o!==Object.values(n).length||o!==Object.values(r).length)return;const a={};for(const t in n){a[t]={};const i=e.h.getImageCanvasContext(r[t]),o=n[t];for(const e in o){const{width:n,height:r,x:s,y:l,sdf:u,pixelRatio:c,stretchX:d,stretchY:f,content:h}=o[e];a[t][e]={data:null,pixelRatio:c,sdf:u,stretchX:d,stretchY:f,content:h,spriteData:{width:n,height:r,x:s,y:l,context:i}}}}t(null,a)}!function(){var t=new e.A(2);e.A!=Float32Array&&(t[0]=0,t[1]=0)}();class y{constructor(e,t,n,r){this.context=e,this.format=n,this.texture=e.gl.createTexture(),this.update(t,r)}update(t,n,r){const{width:i,height:o}=t,a=!(this.size&&this.size[0]===i&&this.size[1]===o||r),{context:s}=this,{gl:l}=s;if(this.useMipmap=Boolean(n&&n.useMipmap),l.bindTexture(l.TEXTURE_2D,this.texture),s.pixelStoreUnpackFlipY.set(!1),s.pixelStoreUnpack.set(1),s.pixelStoreUnpackPremultiplyAlpha.set(this.format===l.RGBA&&(!n||!1!==n.premultiply)),a)this.size=[i,o],t instanceof HTMLImageElement||t instanceof HTMLCanvasElement||t instanceof HTMLVideoElement||t instanceof ImageData||e.a(t)?l.texImage2D(l.TEXTURE_2D,0,this.format,this.format,l.UNSIGNED_BYTE,t):l.texImage2D(l.TEXTURE_2D,0,this.format,i,o,0,this.format,l.UNSIGNED_BYTE,t.data);else{const{x:n,y:a}=r||{x:0,y:0};t instanceof HTMLImageElement||t instanceof HTMLCanvasElement||t instanceof HTMLVideoElement||t instanceof ImageData||e.a(t)?l.texSubImage2D(l.TEXTURE_2D,0,n,a,l.RGBA,l.UNSIGNED_BYTE,t):l.texSubImage2D(l.TEXTURE_2D,0,n,a,i,o,l.RGBA,l.UNSIGNED_BYTE,t.data)}this.useMipmap&&this.isSizePowerOfTwo()&&l.generateMipmap(l.TEXTURE_2D)}bind(e,t,n){const{context:r}=this,{gl:i}=r;i.bindTexture(i.TEXTURE_2D,this.texture),n!==i.LINEAR_MIPMAP_NEAREST||this.isSizePowerOfTwo()||(n=i.LINEAR),e!==this.filter&&(i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MAG_FILTER,e),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MIN_FILTER,n||e),this.filter=e),t!==this.wrap&&(i.texParameteri(i.TEXTURE_2D,i.TEXTURE_WRAP_S,t),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_WRAP_T,t),this.wrap=t)}isSizePowerOfTwo(){return this.size[0]===this.size[1]&&Math.log(this.size[0])/Math.LN2%1==0}destroy(){const{gl:e}=this.context;e.deleteTexture(this.texture),this.texture=null}}function v(e){const{userImage:t}=e;return!!(t&&t.render&&t.render())&&(e.data.replace(new Uint8Array(t.data.buffer)),!0)}class b extends e.E{constructor(){super(),this.images={},this.updatedImages={},this.callbackDispatchedThisFrame={},this.loaded=!1,this.requestors=[],this.patterns={},this.atlasImage=new e.R({width:1,height:1}),this.dirty=!0}isLoaded(){return this.loaded}setLoaded(e){if(this.loaded!==e&&(this.loaded=e,e)){for(const{ids:e,callback:t}of this.requestors)this._notify(e,t);this.requestors=[]}}getImage(t){const n=this.images[t];if(n&&!n.data&&n.spriteData){const t=n.spriteData;n.data=new e.R({width:t.width,height:t.height},t.context.getImageData(t.x,t.y,t.width,t.height).data),n.spriteData=null}return n}addImage(e,t){if(this.images[e])throw new Error(`Image id ${e} already exist, use updateImage instead`);this._validate(e,t)&&(this.images[e]=t)}_validate(t,n){let r=!0;const i=n.data||n.spriteData;return this._validateStretch(n.stretchX,i&&i.width)||(this.fire(new e.j(new Error(`Image "${t}" has invalid "stretchX" value`))),r=!1),this._validateStretch(n.stretchY,i&&i.height)||(this.fire(new e.j(new Error(`Image "${t}" has invalid "stretchY" value`))),r=!1),this._validateContent(n.content,n)||(this.fire(new e.j(new Error(`Image "${t}" has invalid "content" value`))),r=!1),r}_validateStretch(e,t){if(!e)return!0;let n=0;for(const r of e){if(r[0]-1);l++,o[l]=s,a[l]=u,a[l+1]=_}for(let s=0,l=0;s{let r=this.entries[e];r||(r=this.entries[e]={glyphs:{},requests:{},ranges:{}});let i=r.glyphs[t];if(void 0!==i)return void n(null,{stack:e,id:t,glyph:i});if(i=this._tinySDF(r,e,t),i)return r.glyphs[t]=i,void n(null,{stack:e,id:t,glyph:i});const o=Math.floor(t/256);if(256*o>65535)return void n(new Error("glyphs > 65535 not supported"));if(r.ranges[o])return void n(null,{stack:e,id:t,glyph:i});if(!this.url)return void n(new Error("glyphsUrl is not set"));let a=r.requests[o];a||(a=r.requests[o]=[],M.loadGlyphRange(e,o,this.url,this.requestManager,(e,t)=>{if(t){for(const e in t)this._doesCharSupportLocalGlyph(+e)||(r.glyphs[+e]=t[+e]);r.ranges[o]=!0}for(const n of a)n(e,t);delete r.requests[o]})),a.push((r,i)=>{r?n(r):i&&n(null,{stack:e,id:t,glyph:i[t]||null})})},(e,t)=>{if(e)n(e);else if(t){const e={};for(const{stack:n,id:r,glyph:i}of t)(e[n]||(e[n]={}))[r]=i&&{id:i.id,bitmap:i.bitmap.clone(),metrics:i.metrics};n(null,e)}})}_doesCharSupportLocalGlyph(t){return!!this.localIdeographFontFamily&&(e.u["CJK Unified Ideographs"](t)||e.u["Hangul Syllables"](t)||e.u.Hiragana(t)||e.u.Katakana(t))}_tinySDF(t,n,r){const i=this.localIdeographFontFamily;if(!i)return;if(!this._doesCharSupportLocalGlyph(r))return;let o=t.tinySDF;if(!o){let e="400";/bold/i.test(n)?e="900":/medium/i.test(n)?e="500":/light/i.test(n)&&(e="200"),o=t.tinySDF=new M.TinySDF({fontSize:48,buffer:6,radius:16,cutoff:.25,fontFamily:i,fontWeight:e})}const a=o.draw(String.fromCharCode(r));return{id:r,bitmap:new e.q({width:a.width||60,height:a.height||60},a.data),metrics:{width:a.glyphWidth/2||24,height:a.glyphHeight/2||24,left:a.glyphLeft/2+.5||0,top:a.glyphTop/2-27.5||-8,advance:a.glyphAdvance/2||24,isDoubleResolution:!0}}}}M.loadGlyphRange=function(t,n,r,i,o){const a=256*n,s=a+255,l=i.transformRequest(r.replace("{fontstack}",t).replace("{range}",`${a}-${s}`),u.Glyphs);e.l(l,(t,n)=>{if(t)o(t);else if(n){const t={};for(const r of e.n(n))t[r.id]=r;o(null,t)}})},M.TinySDF=class{constructor({fontSize:e=24,buffer:t=3,radius:n=8,cutoff:r=.25,fontFamily:i="sans-serif",fontWeight:o="normal",fontStyle:a="normal"}={}){this.buffer=t,this.cutoff=r,this.radius=n;const s=this.size=e+4*t,l=this._createCanvas(s),u=this.ctx=l.getContext("2d",{willReadFrequently:!0});u.font=`${a} ${o} ${e}px ${i}`,u.textBaseline="alphabetic",u.textAlign="left",u.fillStyle="black",this.gridOuter=new Float64Array(s*s),this.gridInner=new Float64Array(s*s),this.f=new Float64Array(s),this.z=new Float64Array(s+1),this.v=new Uint16Array(s)}_createCanvas(e){const t=document.createElement("canvas");return t.width=t.height=e,t}draw(e){const{width:t,actualBoundingBoxAscent:n,actualBoundingBoxDescent:r,actualBoundingBoxLeft:i,actualBoundingBoxRight:o}=this.ctx.measureText(e),a=Math.ceil(n),s=Math.max(0,Math.min(this.size-this.buffer,Math.ceil(o-i))),l=Math.min(this.size-this.buffer,a+Math.ceil(r)),u=s+2*this.buffer,c=l+2*this.buffer,d=Math.max(u*c,0),f=new Uint8ClampedArray(d),h={data:f,width:u,height:c,glyphWidth:s,glyphHeight:l,glyphTop:a,glyphLeft:0,glyphAdvance:t};if(0===s||0===l)return h;const{ctx:p,buffer:A,gridInner:g,gridOuter:m}=this;p.clearRect(A,A,s,l),p.fillText(e,A,A+a);const y=p.getImageData(A,A,s,l);m.fill(_,0,d),g.fill(0,0,d);for(let e=0;e0?e*e:0,g[r]=e<0?e*e:0}}w(m,0,0,u,c,u,this.f,this.v,this.z),w(g,A,A,s,l,u,this.f,this.v,this.z);for(let e=0;e1&&(a=e[++o]);const l=Math.abs(s-a.left),u=Math.abs(s-a.right),c=Math.min(l,u);let d;const f=t/n*(r+1);if(a.isDash){const e=r-Math.abs(f);d=Math.sqrt(c*c+e*e)}else d=r-Math.sqrt(c*c+f*f);this.data[i+s]=Math.max(0,Math.min(255,d+128))}}}addRegularDash(e){for(let t=e.length-1;t>=0;--t){const n=e[t],r=e[t+1];n.zeroLength?e.splice(t,1):r&&r.isDash===n.isDash&&(r.left=n.left,e.splice(t,1))}const t=e[0],n=e[e.length-1];t.isDash===n.isDash&&(t.left=n.left-this.width,n.right=t.right+this.width);const r=this.width*this.nextRow;let i=0,o=e[i];for(let t=0;t1&&(o=e[++i]);const n=Math.abs(t-o.left),a=Math.abs(t-o.right),s=Math.min(n,a);this.data[r+t]=Math.max(0,Math.min(255,(o.isDash?s:-s)+128))}}addDash(t,n){const r=n?7:0,i=2*r+1;if(this.nextRow+i>this.height)return e.w("LineAtlas out of space"),null;let o=0;for(let e=0;e{e.send(t,n,r)},r=r||function(){})}getActor(){return this.currentActor=(this.currentActor+1)%this.actors.length,this.actors[this.currentActor]}remove(e=!0){this.actors.forEach(e=>{e.remove()}),this.actors=[],e&&this.workerPool.release(this.id)}}function L(t,n,r){const i=function(n,i){if(n)return r(n);if(i){const n=e.F(e.e(i,t),["tiles","minzoom","maxzoom","attribution","bounds","scheme","tileSize","encoding"]);i.vector_layers&&(n.vectorLayers=i.vector_layers,n.vectorLayerIds=n.vectorLayers.map(e=>e.id)),r(null,n)}};return t.url?e.f(n.transformRequest(t.url,u.Source),i):e.h.frame(()=>i(null,t))}class P{constructor(e,t){e&&(t?this.setSouthWest(e).setNorthEast(t):Array.isArray(e)&&(4===e.length?this.setSouthWest([e[0],e[1]]).setNorthEast([e[2],e[3]]):this.setSouthWest(e[0]).setNorthEast(e[1])))}setNorthEast(t){return this._ne=t instanceof e.L?new e.L(t.lng,t.lat):e.L.convert(t),this}setSouthWest(t){return this._sw=t instanceof e.L?new e.L(t.lng,t.lat):e.L.convert(t),this}extend(t){const n=this._sw,r=this._ne;let i,o;if(t instanceof e.L)i=t,o=t;else{if(!(t instanceof P))return Array.isArray(t)?4===t.length||t.every(Array.isArray)?this.extend(P.convert(t)):this.extend(e.L.convert(t)):t&&("lng"in t||"lon"in t)&&"lat"in t?this.extend(e.L.convert(t)):this;if(i=t._sw,o=t._ne,!i||!o)return this}return n||r?(n.lng=Math.min(i.lng,n.lng),n.lat=Math.min(i.lat,n.lat),r.lng=Math.max(o.lng,r.lng),r.lat=Math.max(o.lat,r.lat)):(this._sw=new e.L(i.lng,i.lat),this._ne=new e.L(o.lng,o.lat)),this}getCenter(){return new e.L((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)}getSouthWest(){return this._sw}getNorthEast(){return this._ne}getNorthWest(){return new e.L(this.getWest(),this.getNorth())}getSouthEast(){return new e.L(this.getEast(),this.getSouth())}getWest(){return this._sw.lng}getSouth(){return this._sw.lat}getEast(){return this._ne.lng}getNorth(){return this._ne.lat}toArray(){return[this._sw.toArray(),this._ne.toArray()]}toString(){return`LngLatBounds(${this._sw.toString()}, ${this._ne.toString()})`}isEmpty(){return!(this._sw&&this._ne)}contains(t){const{lng:n,lat:r}=e.L.convert(t);let i=this._sw.lng<=n&&n<=this._ne.lng;return this._sw.lng>this._ne.lng&&(i=this._sw.lng>=n&&n>=this._ne.lng),this._sw.lat<=r&&r<=this._ne.lat&&i}static convert(e){return e instanceof P?e:e?new P(e):e}static fromLngLat(t,n=0){const r=360*n/40075017,i=r/Math.cos(Math.PI/180*t.lat);return new P(new e.L(t.lng-i,t.lat-r),new e.L(t.lng+i,t.lat+r))}}class I{constructor(e,t,n){this.bounds=P.convert(this.validateBounds(e)),this.minzoom=t||0,this.maxzoom=n||24}validateBounds(e){return Array.isArray(e)&&4===e.length?[Math.max(-180,e[0]),Math.max(-90,e[1]),Math.min(180,e[2]),Math.min(90,e[3])]:[-180,-90,180,90]}contains(t){const n=Math.pow(2,t.z),r=Math.floor(e.G(this.bounds.getWest())*n),i=Math.floor(e.H(this.bounds.getNorth())*n),o=Math.ceil(e.G(this.bounds.getEast())*n),a=Math.ceil(e.H(this.bounds.getSouth())*n);return t.x>=r&&t.x=i&&t.y{this._loaded=!1,this.fire(new e.k("dataloading",{dataType:"source"})),this._tileJSONRequest=L(this._options,this.map._requestManager,(t,n)=>{this._tileJSONRequest=null,this._loaded=!0,this.map.style.sourceCaches[this.id].clearTiles(),t?this.fire(new e.j(t)):n&&(e.e(this,n),n.bounds&&(this.tileBounds=new I(n.bounds,this.minzoom,this.maxzoom)),this.fire(new e.k("data",{dataType:"source",sourceDataType:"metadata"})),this.fire(new e.k("data",{dataType:"source",sourceDataType:"content"})))})},this.serialize=()=>e.e({},this._options),this.id=t,this.dispatcher=r,this.type="vector",this.minzoom=0,this.maxzoom=22,this.scheme="xyz",this.tileSize=512,this.reparseOverscaled=!0,this.isTileClipped=!0,this._loaded=!1,e.e(this,e.F(n,["url","scheme","tileSize","promoteId"])),this._options=e.e({type:"vector"},n),this._collectResourceTiming=n.collectResourceTiming,512!==this.tileSize)throw new Error("vector tile sources must have a tileSize of 512");this.setEventedParent(i)}loaded(){return this._loaded}hasTile(e){return!this.tileBounds||this.tileBounds.contains(e.canonical)}onAdd(e){this.map=e,this.load()}setSourceProperty(e){this._tileJSONRequest&&this._tileJSONRequest.cancel(),e(),this.load()}setTiles(e){return this.setSourceProperty(()=>{this._options.tiles=e}),this}setUrl(e){return this.setSourceProperty(()=>{this.url=e,this._options.url=e}),this}onRemove(){this._tileJSONRequest&&(this._tileJSONRequest.cancel(),this._tileJSONRequest=null)}loadTile(e,t){const n=e.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme),r={request:this.map._requestManager.transformRequest(n,u.Tile),uid:e.uid,tileID:e.tileID,zoom:e.tileID.overscaledZ,tileSize:this.tileSize*e.tileID.overscaleFactor(),type:this.type,source:this.id,pixelRatio:this.map.getPixelRatio(),showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};function i(n,r){return delete e.request,e.aborted?t(null):n&&404!==n.status?t(n):(r&&r.resourceTiming&&(e.resourceTiming=r.resourceTiming),this.map._refreshExpiredTiles&&r&&e.setExpiryData(r),e.loadVectorData(r,this.map.painter),t(null),void(e.reloadCallback&&(this.loadTile(e,e.reloadCallback),e.reloadCallback=null)))}r.request.collectResourceTiming=this._collectResourceTiming,e.actor&&"expired"!==e.state?"loading"===e.state?e.reloadCallback=t:e.request=e.actor.send("reloadTile",r,i.bind(this)):(e.actor=this.dispatcher.getActor(),e.request=e.actor.send("loadTile",r,i.bind(this)))}abortTile(e){e.request&&(e.request.cancel(),delete e.request),e.actor&&e.actor.send("abortTile",{uid:e.uid,type:this.type,source:this.id},void 0)}unloadTile(e){e.unloadVectorData(),e.actor&&e.actor.send("removeTile",{uid:e.uid,type:this.type,source:this.id},void 0)}hasTransition(){return!1}}class k extends e.E{constructor(t,n,r,i){super(),this.id=t,this.dispatcher=r,this.setEventedParent(i),this.type="raster",this.minzoom=0,this.maxzoom=22,this.roundZoom=!0,this.scheme="xyz",this.tileSize=512,this._loaded=!1,this._options=e.e({type:"raster"},n),e.e(this,e.F(n,["url","scheme","tileSize"]))}load(){this._loaded=!1,this.fire(new e.k("dataloading",{dataType:"source"})),this._tileJSONRequest=L(this._options,this.map._requestManager,(t,n)=>{this._tileJSONRequest=null,this._loaded=!0,t?this.fire(new e.j(t)):n&&(e.e(this,n),n.bounds&&(this.tileBounds=new I(n.bounds,this.minzoom,this.maxzoom)),this.fire(new e.k("data",{dataType:"source",sourceDataType:"metadata"})),this.fire(new e.k("data",{dataType:"source",sourceDataType:"content"})))})}loaded(){return this._loaded}onAdd(e){this.map=e,this.load()}onRemove(){this._tileJSONRequest&&(this._tileJSONRequest.cancel(),this._tileJSONRequest=null)}setSourceProperty(e){this._tileJSONRequest&&this._tileJSONRequest.cancel(),e(),this.load()}setTiles(e){return this.setSourceProperty(()=>{this._options.tiles=e}),this}serialize(){return e.e({},this._options)}hasTile(e){return!this.tileBounds||this.tileBounds.contains(e.canonical)}loadTile(e,t){const n=e.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme);e.request=l.getImage(this.map._requestManager.transformRequest(n,u.Tile),(n,r,i)=>{if(delete e.request,e.aborted)e.state="unloaded",t(null);else if(n)e.state="errored",t(n);else if(r){this.map._refreshExpiredTiles&&i&&e.setExpiryData(i);const n=this.map.painter.context,o=n.gl;e.texture=this.map.painter.getTileTexture(r.width),e.texture?e.texture.update(r,{useMipmap:!0}):(e.texture=new y(n,r,o.RGBA,{useMipmap:!0}),e.texture.bind(o.LINEAR,o.CLAMP_TO_EDGE,o.LINEAR_MIPMAP_NEAREST),n.extTextureFilterAnisotropic&&o.texParameterf(o.TEXTURE_2D,n.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,n.extTextureFilterAnisotropicMax)),e.state="loaded",t(null)}},this.map._refreshExpiredTiles)}abortTile(e,t){e.request&&(e.request.cancel(),delete e.request),t()}unloadTile(e,t){e.texture&&this.map.painter.saveTileTexture(e.texture),t()}hasTransition(){return!1}}class R extends k{constructor(t,n,r,i){super(t,n,r,i),this.type="raster-dem",this.maxzoom=22,this._options=e.e({type:"raster-dem"},n),this.encoding=n.encoding||"mapbox",this.redFactor=n.redFactor,this.greenFactor=n.greenFactor,this.blueFactor=n.blueFactor,this.baseShift=n.baseShift}loadTile(t,n){const r=t.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme),i=this.map._requestManager.transformRequest(r,u.Tile);function o(e,r){e&&(t.state="errored",n(e)),r&&(t.dem=r,t.needsHillshadePrepare=!0,t.needsTerrainPrepare=!0,t.state="loaded",n(null))}t.neighboringTiles=this._getNeighboringTiles(t.tileID),t.request=l.getImage(i,(r,i,a)=>e._(this,void 0,void 0,(function*(){if(delete t.request,t.aborted)t.state="unloaded",n(null);else if(r)t.state="errored",n(r);else if(i){this.map._refreshExpiredTiles&&t.setExpiryData(a);const n=e.a(i)&&e.J()?i:yield function(t){return e._(this,void 0,void 0,(function*(){if("undefined"!=typeof VideoFrame&&e.K()){const n=t.width+2,r=t.height+2;try{return new e.R({width:n,height:r},yield e.M(t,-1,-1,n,r))}catch(e){}}return e.h.getImageData(t,1)}))}(i),r={uid:t.uid,coord:t.tileID,source:this.id,rawImageData:n,encoding:this.encoding,redFactor:this.redFactor,greenFactor:this.greenFactor,blueFactor:this.blueFactor,baseShift:this.baseShift};t.actor&&"expired"!==t.state||(t.actor=this.dispatcher.getActor(),t.actor.send("loadDEMTile",r,o))}})),this.map._refreshExpiredTiles)}_getNeighboringTiles(t){const n=t.canonical,r=Math.pow(2,n.z),i=(n.x-1+r)%r,o=0===n.x?t.wrap-1:t.wrap,a=(n.x+1+r)%r,s=n.x+1===r?t.wrap+1:t.wrap,l={};return l[new e.O(t.overscaledZ,o,n.z,i,n.y).key]={backfilled:!1},l[new e.O(t.overscaledZ,s,n.z,a,n.y).key]={backfilled:!1},n.y>0&&(l[new e.O(t.overscaledZ,o,n.z,i,n.y-1).key]={backfilled:!1},l[new e.O(t.overscaledZ,t.wrap,n.z,n.x,n.y-1).key]={backfilled:!1},l[new e.O(t.overscaledZ,s,n.z,a,n.y-1).key]={backfilled:!1}),n.y+1{this._updateWorkerData()},this.serialize=()=>e.e({},this._options,{type:this.type,data:this._data}),this.id=t,this.type="geojson",this.minzoom=0,this.maxzoom=18,this.tileSize=512,this.isTileClipped=!0,this.reparseOverscaled=!0,this._removed=!1,this._pendingLoads=0,this.actor=r.getActor(),this.setEventedParent(i),this._data=n.data,this._options=e.e({},n),this._collectResourceTiming=n.collectResourceTiming,void 0!==n.maxzoom&&(this.maxzoom=n.maxzoom),n.type&&(this.type=n.type),n.attribution&&(this.attribution=n.attribution),this.promoteId=n.promoteId;const o=e.N/this.tileSize;this.workerOptions=e.e({source:this.id,cluster:n.cluster||!1,geojsonVtOptions:{buffer:(void 0!==n.buffer?n.buffer:128)*o,tolerance:(void 0!==n.tolerance?n.tolerance:.375)*o,extent:e.N,maxZoom:this.maxzoom,lineMetrics:n.lineMetrics||!1,generateId:n.generateId||!1},superclusterOptions:{maxZoom:void 0!==n.clusterMaxZoom?n.clusterMaxZoom:this.maxzoom-1,minPoints:Math.max(2,n.clusterMinPoints||2),extent:e.N,radius:(n.clusterRadius||50)*o,log:!1,generateId:n.generateId||!1},clusterProperties:n.clusterProperties,filter:n.filter},n.workerOptions),"string"==typeof this.promoteId&&(this.workerOptions.promoteId=this.promoteId)}onAdd(e){this.map=e,this.load()}setData(e){return this._data=e,this._updateWorkerData(),this}updateData(e){return this._updateWorkerData(e),this}setClusterOptions(e){return this.workerOptions.cluster=e.cluster,e&&(void 0!==e.clusterRadius&&(this.workerOptions.superclusterOptions.radius=e.clusterRadius),void 0!==e.clusterMaxZoom&&(this.workerOptions.superclusterOptions.maxZoom=e.clusterMaxZoom)),this._updateWorkerData(),this}getClusterExpansionZoom(e,t){return this.actor.send("geojson.getClusterExpansionZoom",{clusterId:e,source:this.id},t),this}getClusterChildren(e,t){return this.actor.send("geojson.getClusterChildren",{clusterId:e,source:this.id},t),this}getClusterLeaves(e,t,n,r){return this.actor.send("geojson.getClusterLeaves",{source:this.id,clusterId:e,limit:t,offset:n},r),this}_updateWorkerData(t){const n=e.e({},this.workerOptions);t?n.dataDiff=t:"string"==typeof this._data?(n.request=this.map._requestManager.transformRequest(e.h.resolveURL(this._data),u.Source),n.request.collectResourceTiming=this._collectResourceTiming):n.data=JSON.stringify(this._data),this._pendingLoads++,this.fire(new e.k("dataloading",{dataType:"source"})),this.actor.send(this.type+".loadData",n,(t,n)=>{if(this._pendingLoads--,this._removed||n&&n.abandoned)return void this.fire(new e.k("dataabort",{dataType:"source"}));let r=null;if(n&&n.resourceTiming&&n.resourceTiming[this.id]&&(r=n.resourceTiming[this.id].slice(0)),t)return void this.fire(new e.j(t));const i={dataType:"source"};this._collectResourceTiming&&r&&r.length>0&&e.e(i,{resourceTiming:r}),this.fire(new e.k("data",Object.assign(Object.assign({},i),{sourceDataType:"metadata"}))),this.fire(new e.k("data",Object.assign(Object.assign({},i),{sourceDataType:"content"})))})}loaded(){return 0===this._pendingLoads}loadTile(e,t){const n=e.actor?"reloadTile":"loadTile";e.actor=this.actor;const r={type:this.type,uid:e.uid,tileID:e.tileID,zoom:e.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:this.map.getPixelRatio(),showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};e.request=this.actor.send(n,r,(r,i)=>(delete e.request,e.unloadVectorData(),e.aborted?t(null):r?t(r):(e.loadVectorData(i,this.map.painter,"reloadTile"===n),t(null))))}abortTile(e){e.request&&(e.request.cancel(),delete e.request),e.aborted=!0}unloadTile(e){e.unloadVectorData(),this.actor.send("removeTile",{uid:e.uid,type:this.type,source:this.id})}onRemove(){this._removed=!0,this.actor.send("removeSource",{type:this.type,source:this.id})}hasTransition(){return!1}}var F=e.Q([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]);class N extends e.E{constructor(t,n,r,i){super(),this.load=(t,n)=>{this._loaded=!1,this.fire(new e.k("dataloading",{dataType:"source"})),this.url=this.options.url,this._request=l.getImage(this.map._requestManager.transformRequest(this.url,u.Image),(r,i)=>{this._request=null,this._loaded=!0,r?this.fire(new e.j(r)):i&&(this.image=i,t&&(this.coordinates=t),n&&n(),this._finishLoading())})},this.prepare=()=>{if(0===Object.keys(this.tiles).length||!this.image)return;const t=this.map.painter.context,n=t.gl;this.boundsBuffer||(this.boundsBuffer=t.createVertexBuffer(this._boundsArray,F.members)),this.boundsSegments||(this.boundsSegments=e.S.simpleSegment(0,0,4,2)),this.texture||(this.texture=new y(t,this.image,n.RGBA),this.texture.bind(n.LINEAR,n.CLAMP_TO_EDGE));let r=!1;for(const e in this.tiles){const t=this.tiles[e];"loaded"!==t.state&&(t.state="loaded",t.texture=this.texture,r=!0)}r&&this.fire(new e.k("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))},this.serialize=()=>({type:"image",url:this.options.url,coordinates:this.coordinates}),this.id=t,this.dispatcher=r,this.coordinates=n.coordinates,this.type="image",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this._loaded=!1,this.setEventedParent(i),this.options=n}loaded(){return this._loaded}updateImage(e){return e.url?(this._request&&(this._request.cancel(),this._request=null),this.options.url=e.url,this.load(e.coordinates,()=>{this.texture=null}),this):this}_finishLoading(){this.map&&(this.setCoordinates(this.coordinates),this.fire(new e.k("data",{dataType:"source",sourceDataType:"metadata"})))}onAdd(e){this.map=e,this.load()}onRemove(){this._request&&(this._request.cancel(),this._request=null)}setCoordinates(t){this.coordinates=t;const n=t.map(e.U.fromLngLat);this.tileID=function(t){let n=1/0,r=1/0,i=-1/0,o=-1/0;for(const e of t)n=Math.min(n,e.x),r=Math.min(r,e.y),i=Math.max(i,e.x),o=Math.max(o,e.y);const a=Math.max(i-n,o-r),s=Math.max(0,Math.floor(-Math.log(a)/Math.LN2)),l=Math.pow(2,s);return new e.W(s,Math.floor((n+i)/2*l),Math.floor((r+o)/2*l))}(n),this.minzoom=this.maxzoom=this.tileID.z;const r=n.map(e=>this.tileID.getTilePoint(e)._round());return this._boundsArray=new e.V,this._boundsArray.emplaceBack(r[0].x,r[0].y,0,0),this._boundsArray.emplaceBack(r[1].x,r[1].y,e.N,0),this._boundsArray.emplaceBack(r[3].x,r[3].y,0,e.N),this._boundsArray.emplaceBack(r[2].x,r[2].y,e.N,e.N),this.boundsBuffer&&(this.boundsBuffer.destroy(),delete this.boundsBuffer),this.fire(new e.k("data",{dataType:"source",sourceDataType:"content"})),this}loadTile(e,t){this.tileID&&this.tileID.equals(e.tileID.canonical)?(this.tiles[String(e.tileID.wrap)]=e,e.buckets={},t(null)):(e.state="errored",t(null))}hasTransition(){return!1}}class B extends N{constructor(t,n,r,i){super(t,n,r,i),this.load=()=>{this._loaded=!1;const t=this.options;this.urls=[];for(const e of t.urls)this.urls.push(this.map._requestManager.transformRequest(e,u.Source).url);e.X(this.urls,(t,n)=>{this._loaded=!0,t?this.fire(new e.j(t)):n&&(this.video=n,this.video.loop=!0,this.video.addEventListener("playing",()=>{this.map.triggerRepaint()}),this.map&&this.video.play(),this._finishLoading())})},this.prepare=()=>{if(0===Object.keys(this.tiles).length||this.video.readyState<2)return;const t=this.map.painter.context,n=t.gl;this.boundsBuffer||(this.boundsBuffer=t.createVertexBuffer(this._boundsArray,F.members)),this.boundsSegments||(this.boundsSegments=e.S.simpleSegment(0,0,4,2)),this.texture?this.video.paused||(this.texture.bind(n.LINEAR,n.CLAMP_TO_EDGE),n.texSubImage2D(n.TEXTURE_2D,0,0,0,n.RGBA,n.UNSIGNED_BYTE,this.video)):(this.texture=new y(t,this.video,n.RGBA),this.texture.bind(n.LINEAR,n.CLAMP_TO_EDGE));let r=!1;for(const e in this.tiles){const t=this.tiles[e];"loaded"!==t.state&&(t.state="loaded",t.texture=this.texture,r=!0)}r&&this.fire(new e.k("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))},this.serialize=()=>({type:"video",urls:this.urls,coordinates:this.coordinates}),this.roundZoom=!0,this.type="video",this.options=n}pause(){this.video&&this.video.pause()}play(){this.video&&this.video.play()}seek(t){if(this.video){const n=this.video.seekable;tn.end(0)?this.fire(new e.j(new e.Y("sources."+this.id,null,`Playback for this video can be set only between the ${n.start(0)} and ${n.end(0)}-second mark.`))):this.video.currentTime=t}}getVideo(){return this.video}onAdd(e){this.map||(this.map=e,this.load(),this.video&&(this.video.play(),this.setCoordinates(this.coordinates)))}hasTransition(){return this.video&&!this.video.paused}}class z extends N{constructor(t,n,r,i){super(t,n,r,i),this.load=()=>{this._loaded=!0,this.canvas||(this.canvas=this.options.canvas instanceof HTMLCanvasElement?this.options.canvas:document.getElementById(this.options.canvas)),this.width=this.canvas.width,this.height=this.canvas.height,this._hasInvalidDimensions()?this.fire(new e.j(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())},this.prepare=()=>{let t=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,t=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,t=!0),this._hasInvalidDimensions())return;if(0===Object.keys(this.tiles).length)return;const n=this.map.painter.context,r=n.gl;this.boundsBuffer||(this.boundsBuffer=n.createVertexBuffer(this._boundsArray,F.members)),this.boundsSegments||(this.boundsSegments=e.S.simpleSegment(0,0,4,2)),this.texture?(t||this._playing)&&this.texture.update(this.canvas,{premultiply:!0}):this.texture=new y(n,this.canvas,r.RGBA,{premultiply:!0});let i=!1;for(const e in this.tiles){const t=this.tiles[e];"loaded"!==t.state&&(t.state="loaded",t.texture=this.texture,i=!0)}i&&this.fire(new e.k("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))},this.serialize=()=>({type:"canvas",coordinates:this.coordinates}),n.coordinates?Array.isArray(n.coordinates)&&4===n.coordinates.length&&!n.coordinates.some(e=>!Array.isArray(e)||2!==e.length||e.some(e=>"number"!=typeof e))||this.fire(new e.j(new e.Y("sources."+t,null,'"coordinates" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new e.j(new e.Y("sources."+t,null,'missing required property "coordinates"'))),n.animate&&"boolean"!=typeof n.animate&&this.fire(new e.j(new e.Y("sources."+t,null,'optional "animate" property must be a boolean value'))),n.canvas?"string"==typeof n.canvas||n.canvas instanceof HTMLCanvasElement||this.fire(new e.j(new e.Y("sources."+t,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 e.j(new e.Y("sources."+t,null,'missing required property "canvas"'))),this.options=n,this.animate=void 0===n.animate||n.animate}getCanvas(){return this.canvas}onAdd(e){this.map=e,this.load(),this.canvas&&this.animate&&this.play()}onRemove(){this.pause()}hasTransition(){return this._playing}_hasInvalidDimensions(){for(const e of[this.canvas.width,this.canvas.height])if(isNaN(e)||e<=0)return!0;return!1}}const U={},H=e=>{switch(e){case"geojson":return j;case"image":return N;case"raster":return k;case"raster-dem":return R;case"vector":return D;case"video":return B;case"canvas":return z}return U[e]};function V(t,n){const r=e.Z();return e.$(r,r,[1,1,0]),e.a0(r,r,[.5*t.width,.5*t.height,1]),e.a1(r,r,t.calculatePosMatrix(n.toUnwrapped()))}function G(e,t,n,r,i,o){const a=function(e,t,n){if(e)for(const r of e){const e=t[r];if(e&&e.source===n&&"fill-extrusion"===e.type)return!0}else for(const e in t){const r=t[e];if(r.source===n&&"fill-extrusion"===r.type)return!0}return!1}(i&&i.layers,t,e.id),s=o.maxPitchScaleFactor(),l=e.tilesIn(r,s,a);l.sort(Y);const u=[];for(const r of l)u.push({wrappedTileID:r.tileID.wrapped().key,queryResults:r.tile.queryRenderedFeatures(t,n,e._state,r.queryGeometry,r.cameraQueryGeometry,r.scale,i,o,s,V(e.transform,r.tileID))});const c=function(e){const t={},n={};for(const r of e){const e=r.queryResults,i=r.wrappedTileID,o=n[i]=n[i]||{};for(const n in e){const r=e[n],i=o[n]=o[n]||{},a=t[n]=t[n]||[];for(const e of r)i[e.featureIndex]||(i[e.featureIndex]=!0,a.push(e))}}return t}(u);for(const t in c)c[t].forEach(t=>{const n=t.feature,r=e.getFeatureState(n.layer["source-layer"],n.id);n.source=n.layer.source,n.layer["source-layer"]&&(n.sourceLayer=n.layer["source-layer"]),n.state=r});return c}function Y(e,t){const n=e.tileID,r=t.tileID;return n.overscaledZ-r.overscaledZ||n.canonical.y-r.canonical.y||n.wrap-r.wrap||n.canonical.x-r.canonical.x}class W{constructor(t,n){this.timeAdded=0,this.fadeEndTime=0,this.tileID=t,this.uid=e.a2(),this.uses=0,this.tileSize=n,this.buckets={},this.expirationTime=null,this.queryPadding=0,this.hasSymbolBuckets=!1,this.hasRTLText=!1,this.dependencies={},this.rtt=[],this.rttCoords={},this.expiredRequestCount=0,this.state="loading"}registerFadeDuration(e){const t=e+this.timeAdded;tt.getLayer(e)).filter(Boolean);if(0!==e.length){r.layers=e,r.stateDependentLayerIds&&(r.stateDependentLayers=r.stateDependentLayerIds.map(t=>e.filter(e=>e.id===t)[0]));for(const t of e)n[t.id]=r}}return n}(t.buckets,n.style),this.hasSymbolBuckets=!1;for(const t in this.buckets){const n=this.buckets[t];if(n instanceof e.a4){if(this.hasSymbolBuckets=!0,!r)break;n.justReloaded=!0}}if(this.hasRTLText=!1,this.hasSymbolBuckets)for(const t in this.buckets){const n=this.buckets[t];if(n instanceof e.a4&&n.hasRTLText){this.hasRTLText=!0,e.a5();break}}this.queryPadding=0;for(const e in this.buckets){const t=this.buckets[e];this.queryPadding=Math.max(this.queryPadding,n.style.getLayer(e).queryRadius(t))}t.imageAtlas&&(this.imageAtlas=t.imageAtlas),t.glyphAtlasImage&&(this.glyphAtlasImage=t.glyphAtlasImage)}else this.collisionBoxArray=new e.a3}unloadVectorData(){for(const e in this.buckets)this.buckets[e].destroy();this.buckets={},this.imageAtlasTexture&&this.imageAtlasTexture.destroy(),this.imageAtlas&&(this.imageAtlas=null),this.glyphAtlasTexture&&this.glyphAtlasTexture.destroy(),this.latestFeatureIndex=null,this.state="unloaded"}getBucket(e){return this.buckets[e.id]}upload(e){for(const t in this.buckets){const n=this.buckets[t];n.uploadPending()&&n.upload(e)}const t=e.gl;this.imageAtlas&&!this.imageAtlas.uploaded&&(this.imageAtlasTexture=new y(e,this.imageAtlas.image,t.RGBA),this.imageAtlas.uploaded=!0),this.glyphAtlasImage&&(this.glyphAtlasTexture=new y(e,this.glyphAtlasImage,t.ALPHA),this.glyphAtlasImage=null)}prepare(e){this.imageAtlas&&this.imageAtlas.patchUpdatedImages(e,this.imageAtlasTexture)}queryRenderedFeatures(e,t,n,r,i,o,a,s,l,u){return this.latestFeatureIndex&&this.latestFeatureIndex.rawTileData?this.latestFeatureIndex.query({queryGeometry:r,cameraQueryGeometry:i,scale:o,tileSize:this.tileSize,pixelPosMatrix:u,transform:s,params:a,queryPadding:this.queryPadding*l},e,t,n):{}}querySourceFeatures(t,n){const r=this.latestFeatureIndex;if(!r||!r.rawTileData)return;const i=r.loadVTLayers(),o=n&&n.sourceLayer?n.sourceLayer:"",a=i._geojsonTileLayer||i[o];if(!a)return;const s=e.a6(n&&n.filter),{z:l,x:u,y:c}=this.tileID.canonical,d={z:l,x:u,y:c};for(let n=0;ne)t=!1;else if(n)if(this.expirationTime{this.remove(e,i)},n)),this.data[r].push(i),this.order.push(r),this.order.length>this.max){const e=this._getAndRemoveByKey(this.order[0]);e&&this.onRemove(e)}return this}has(e){return e.wrapped().key in this.data}getAndRemove(e){return this.has(e)?this._getAndRemoveByKey(e.wrapped().key):null}_getAndRemoveByKey(e){const t=this.data[e].shift();return t.timeout&&clearTimeout(t.timeout),0===this.data[e].length&&delete this.data[e],this.order.splice(this.order.indexOf(e),1),t.value}getByKey(e){const t=this.data[e];return t?t[0].value:null}get(e){return this.has(e)?this.data[e.wrapped().key][0].value:null}remove(e,t){if(!this.has(e))return this;const n=e.wrapped().key,r=void 0===t?0:this.data[n].indexOf(t),i=this.data[n][r];return this.data[n].splice(r,1),i.timeout&&clearTimeout(i.timeout),0===this.data[n].length&&delete this.data[n],this.onRemove(i.value),this.order.splice(this.order.indexOf(n),1),this}setMaxSize(e){for(this.max=e;this.order.length>this.max;){const e=this._getAndRemoveByKey(this.order[0]);e&&this.onRemove(e)}return this}filter(e){const t=[];for(const n in this.data)for(const r of this.data[n])e(r.value)||t.push(r);for(const e of t)this.remove(e.value.tileID,e)}}class X{constructor(){this.state={},this.stateChanges={},this.deletedStates={}}updateState(t,n,r){const i=String(n);if(this.stateChanges[t]=this.stateChanges[t]||{},this.stateChanges[t][i]=this.stateChanges[t][i]||{},e.e(this.stateChanges[t][i],r),null===this.deletedStates[t]){this.deletedStates[t]={};for(const e in this.state[t])e!==i&&(this.deletedStates[t][e]=null)}else if(this.deletedStates[t]&&null===this.deletedStates[t][i]){this.deletedStates[t][i]={};for(const e in this.state[t][i])r[e]||(this.deletedStates[t][i][e]=null)}else for(const e in r)this.deletedStates[t]&&this.deletedStates[t][i]&&null===this.deletedStates[t][i][e]&&delete this.deletedStates[t][i][e]}removeFeatureState(e,t,n){if(null===this.deletedStates[e])return;const r=String(t);if(this.deletedStates[e]=this.deletedStates[e]||{},n&&void 0!==t)null!==this.deletedStates[e][r]&&(this.deletedStates[e][r]=this.deletedStates[e][r]||{},this.deletedStates[e][r][n]=null);else if(void 0!==t)if(this.stateChanges[e]&&this.stateChanges[e][r])for(n in this.deletedStates[e][r]={},this.stateChanges[e][r])this.deletedStates[e][r][n]=null;else this.deletedStates[e][r]=null;else this.deletedStates[e]=null}getState(t,n){const r=String(n),i=e.e({},(this.state[t]||{})[r],(this.stateChanges[t]||{})[r]);if(null===this.deletedStates[t])return{};if(this.deletedStates[t]){const e=this.deletedStates[t][n];if(null===e)return{};for(const t in e)delete i[t]}return i}initializeTileState(e,t){e.setFeatureState(this.state,t)}coalesceChanges(t,n){const r={};for(const t in this.stateChanges){this.state[t]=this.state[t]||{};const n={};for(const r in this.stateChanges[t])this.state[t][r]||(this.state[t][r]={}),e.e(this.state[t][r],this.stateChanges[t][r]),n[r]=this.state[t][r];r[t]=n}for(const t in this.deletedStates){this.state[t]=this.state[t]||{};const n={};if(null===this.deletedStates[t])for(const e in this.state[t])n[e]={},this.state[t][e]={};else for(const e in this.deletedStates[t]){if(null===this.deletedStates[t][e])this.state[t][e]={};else for(const n of Object.keys(this.deletedStates[t][e]))delete this.state[t][e][n];n[e]=this.state[t][e]}r[t]=r[t]||{},e.e(r[t],n)}if(this.stateChanges={},this.deletedStates={},0!==Object.keys(r).length)for(const e in t)t[e].setFeatureState(r,n)}}class Z extends e.E{constructor(e,t,n){super(),this.id=e,this.dispatcher=n,this.on("data",e=>{"source"===e.dataType&&"metadata"===e.sourceDataType&&(this._sourceLoaded=!0),this._sourceLoaded&&!this._paused&&"source"===e.dataType&&"content"===e.sourceDataType&&(this.reload(),this.transform&&this.update(this.transform,this.terrain),this._didEmitContent=!0)}),this.on("dataloading",()=>{this._sourceErrored=!1}),this.on("error",()=>{this._sourceErrored=this._source.loaded()}),this._source=((e,t,n,r)=>{const i=new(H(t.type))(e,t,n,r);if(i.id!==e)throw new Error(`Expected Source id to be ${e} instead of ${i.id}`);return i})(e,t,n,this),this._tiles={},this._cache=new q(0,this._unloadTile.bind(this)),this._timers={},this._cacheTimers={},this._maxTileCacheSize=null,this._maxTileCacheZoomLevels=null,this._loadedParentTiles={},this._coveredTiles={},this._state=new X,this._didEmitContent=!1,this._updated=!1}onAdd(e){this.map=e,this._maxTileCacheSize=e?e._maxTileCacheSize:null,this._maxTileCacheZoomLevels=e?e._maxTileCacheZoomLevels:null,this._source&&this._source.onAdd&&this._source.onAdd(e)}onRemove(e){this.clearTiles(),this._source&&this._source.onRemove&&this._source.onRemove(e)}loaded(){if(this._sourceErrored)return!0;if(!this._sourceLoaded)return!1;if(!this._source.loaded())return!1;if(!(void 0===this.used&&void 0===this.usedForTerrain||this.used||this.usedForTerrain))return!0;if(!this._updated)return!1;for(const e in this._tiles){const t=this._tiles[e];if("loaded"!==t.state&&"errored"!==t.state)return!1}return!0}getSource(){return this._source}pause(){this._paused=!0}resume(){if(!this._paused)return;const e=this._shouldReloadOnResume;this._paused=!1,this._shouldReloadOnResume=!1,e&&this.reload(),this.transform&&this.update(this.transform,this.terrain)}_loadTile(e,t){return this._source.loadTile(e,t)}_unloadTile(e){if(this._source.unloadTile)return this._source.unloadTile(e,()=>{})}_abortTile(t){this._source.abortTile&&this._source.abortTile(t,()=>{}),this._source.fire(new e.k("dataabort",{tile:t,coord:t.tileID,dataType:"source"}))}serialize(){return this._source.serialize()}prepare(e){this._source.prepare&&this._source.prepare(),this._state.coalesceChanges(this._tiles,this.map?this.map.painter:null);for(const t in this._tiles){const n=this._tiles[t];n.upload(e),n.prepare(this.map.style.imageManager)}}getIds(){return Object.values(this._tiles).map(e=>e.tileID).sort(K).map(e=>e.key)}getRenderableIds(t){const n=[];for(const e in this._tiles)this._isIdRenderable(e,t)&&n.push(this._tiles[e]);return t?n.sort((t,n)=>{const r=t.tileID,i=n.tileID,o=new e.P(r.canonical.x,r.canonical.y)._rotate(this.transform.angle),a=new e.P(i.canonical.x,i.canonical.y)._rotate(this.transform.angle);return r.overscaledZ-i.overscaledZ||a.y-o.y||a.x-o.x}).map(e=>e.tileID.key):n.map(e=>e.tileID).sort(K).map(e=>e.key)}hasRenderableParent(e){const t=this.findLoadedParent(e,0);return!!t&&this._isIdRenderable(t.tileID.key)}_isIdRenderable(e,t){return this._tiles[e]&&this._tiles[e].hasData()&&!this._coveredTiles[e]&&(t||!this._tiles[e].holdingForFade())}reload(){if(this._paused)this._shouldReloadOnResume=!0;else{this._cache.reset();for(const e in this._tiles)"errored"!==this._tiles[e].state&&this._reloadTile(e,"reloading")}}_reloadTile(e,t){const n=this._tiles[e];n&&("loading"!==n.state&&(n.state=t),this._loadTile(n,this._tileLoaded.bind(this,n,e,t)))}_tileLoaded(t,n,r,i){if(i)return t.state="errored",void(404!==i.status?this._source.fire(new e.j(i,{tile:t})):this.update(this.transform,this.terrain));t.timeAdded=e.h.now(),"expired"===r&&(t.refreshedUponExpiration=!0),this._setTileReloadTimer(n,t),"raster-dem"===this.getSource().type&&t.dem&&this._backfillDEM(t),this._state.initializeTileState(t,this.map?this.map.painter:null),t.aborted||this._source.fire(new e.k("data",{dataType:"source",tile:t,coord:t.tileID}))}_backfillDEM(e){const t=this.getRenderableIds();for(let r=0;r1||(Math.abs(n)>1&&(1===Math.abs(n+i)?n+=i:1===Math.abs(n-i)&&(n-=i)),t.dem&&e.dem&&(e.dem.backfillBorder(t.dem,n,r),e.neighboringTiles&&e.neighboringTiles[o]&&(e.neighboringTiles[o].backfilled=!0)))}}getTile(e){return this.getTileByID(e.key)}getTileByID(e){return this._tiles[e]}_retainLoadedChildren(e,t,n,r){for(const i in this._tiles){let o=this._tiles[i];if(r[i]||!o.hasData()||o.tileID.overscaledZ<=t||o.tileID.overscaledZ>n)continue;let a=o.tileID;for(;o&&o.tileID.overscaledZ>t+1;){const e=o.tileID.scaledTo(o.tileID.overscaledZ-1);o=this._tiles[e.key],o&&o.hasData()&&(a=e)}let s=a;for(;s.overscaledZ>t;)if(s=s.scaledTo(s.overscaledZ-1),e[s.key]){r[a.key]=a;break}}}findLoadedParent(e,t){if(e.key in this._loadedParentTiles){const n=this._loadedParentTiles[e.key];return n&&n.tileID.overscaledZ>=t?n:null}for(let n=e.overscaledZ-1;n>=t;n--){const t=e.scaledTo(n),r=this._getLoadedTile(t);if(r)return r}}_getLoadedTile(e){const t=this._tiles[e.key];return t&&t.hasData()?t:this._cache.getByKey(e.wrapped().key)}updateCacheSize(t){const n=Math.ceil(t.width/this._source.tileSize)+1,r=Math.ceil(t.height/this._source.tileSize)+1,i=Math.floor(n*r*(null===this._maxTileCacheZoomLevels?e.c.MAX_TILE_CACHE_ZOOM_LEVELS:this._maxTileCacheZoomLevels)),o="number"==typeof this._maxTileCacheSize?Math.min(this._maxTileCacheSize,i):i;this._cache.setMaxSize(o)}handleWrapJump(e){const t=Math.round((e-(void 0===this._prevLng?e:this._prevLng))/360);if(this._prevLng=e,t){const e={};for(const n in this._tiles){const r=this._tiles[n];r.tileID=r.tileID.unwrapTo(r.tileID.wrap+t),e[r.tileID.key]=r}this._tiles=e;for(const e in this._timers)clearTimeout(this._timers[e]),delete this._timers[e];for(const e in this._tiles)this._setTileReloadTimer(e,this._tiles[e])}}update(t,n){if(this.transform=t,this.terrain=n,!this._sourceLoaded||this._paused)return;let r;this.updateCacheSize(t),this.handleWrapJump(this.transform.center.lng),this._coveredTiles={},this.used||this.usedForTerrain?this._source.tileID?r=t.getVisibleUnwrappedCoordinates(this._source.tileID).map(t=>new e.O(t.canonical.z,t.wrap,t.canonical.z,t.canonical.x,t.canonical.y)):(r=t.coveringTiles({tileSize:this.usedForTerrain?this.tileSize:this._source.tileSize,minzoom:this._source.minzoom,maxzoom:this._source.maxzoom,roundZoom:!this.usedForTerrain&&this._source.roundZoom,reparseOverscaled:this._source.reparseOverscaled,terrain:n}),this._source.hasTile&&(r=r.filter(e=>this._source.hasTile(e)))):r=[];const i=t.coveringZoomLevel(this._source),o=Math.max(i-Z.maxOverzooming,this._source.minzoom),a=Math.max(i+Z.maxUnderzooming,this._source.minzoom);if(this.usedForTerrain){const e={};for(const t of r)if(t.canonical.z>this._source.minzoom){const n=t.scaledTo(t.canonical.z-1);e[n.key]=n;const r=t.scaledTo(Math.max(this._source.minzoom,Math.min(t.canonical.z,5)));e[r.key]=r}r=r.concat(Object.values(e))}const s=0===r.length&&!this._updated&&this._didEmitContent;this._updated=!0,s&&this.fire(new e.k("data",{sourceDataType:"idle",dataType:"source",sourceId:this.id}));const l=this._updateRetainedTiles(r,i);if(Q(this._source.type)){const t={},s={},u=Object.keys(l),c=e.h.now();for(const e of u){const n=l[e],r=this._tiles[e];if(!r||0!==r.fadeEndTime&&r.fadeEndTime<=c)continue;const i=this.findLoadedParent(n,o);i&&(this._addTile(i.tileID),t[i.tileID.key]=i.tileID),s[e]=n}this._retainLoadedChildren(s,i,a,l);for(const e in t)l[e]||(this._coveredTiles[e]=!0,l[e]=t[e]);if(n){const e={},t={};for(const n of r)this._tiles[n.key].hasData()?e[n.key]=n:t[n.key]=n;for(const n in t){const r=t[n].children(this._source.maxzoom);this._tiles[r[0].key]&&this._tiles[r[1].key]&&this._tiles[r[2].key]&&this._tiles[r[3].key]&&(e[r[0].key]=l[r[0].key]=r[0],e[r[1].key]=l[r[1].key]=r[1],e[r[2].key]=l[r[2].key]=r[2],e[r[3].key]=l[r[3].key]=r[3],delete t[n])}for(const n in t){const r=this.findLoadedParent(t[n],this._source.minzoom);if(r){e[r.tileID.key]=l[r.tileID.key]=r.tileID;for(const t in e)e[t].isChildOf(r.tileID)&&delete e[t]}}for(const t in this._tiles)e[t]||(this._coveredTiles[t]=!0)}}for(const e in l)this._tiles[e].clearFadeHold();const u=e.ab(this._tiles,l);for(const e of u){const t=this._tiles[e];t.hasSymbolBuckets&&!t.holdingForFade()?t.setHoldDuration(this.map._fadeDuration):t.hasSymbolBuckets&&!t.symbolFadeFinished()||this._removeTile(e)}this._updateLoadedParentTileCache()}releaseSymbolFadeTiles(){for(const e in this._tiles)this._tiles[e].holdingForFade()&&this._removeTile(e)}_updateRetainedTiles(e,t){const n={},r={},i=Math.max(t-Z.maxOverzooming,this._source.minzoom),o=Math.max(t+Z.maxUnderzooming,this._source.minzoom),a={};for(const r of e){const e=this._addTile(r);n[r.key]=r,e.hasData()||tthis._source.maxzoom){const e=o.children(this._source.maxzoom)[0],t=this.getTile(e);if(t&&t.hasData()){n[e.key]=e;continue}}else{const e=o.children(this._source.maxzoom);if(n[e[0].key]&&n[e[1].key]&&n[e[2].key]&&n[e[3].key])continue}let a=e.wasRequested();for(let t=o.overscaledZ-1;t>=i;--t){const i=o.scaledTo(t);if(r[i.key])break;if(r[i.key]=!0,e=this.getTile(i),!e&&a&&(e=this._addTile(i)),e){const t=e.hasData();if((a||t)&&(n[i.key]=i),a=e.wasRequested(),t)break}}}return n}_updateLoadedParentTileCache(){this._loadedParentTiles={};for(const e in this._tiles){const t=[];let n,r=this._tiles[e].tileID;for(;r.overscaledZ>0;){if(r.key in this._loadedParentTiles){n=this._loadedParentTiles[r.key];break}t.push(r.key);const e=r.scaledTo(r.overscaledZ-1);if(n=this._getLoadedTile(e),n)break;r=e}for(const e of t)this._loadedParentTiles[e]=n}}_addTile(t){let n=this._tiles[t.key];if(n)return n;n=this._cache.getAndRemove(t),n&&(this._setTileReloadTimer(t.key,n),n.tileID=t,this._state.initializeTileState(n,this.map?this.map.painter:null),this._cacheTimers[t.key]&&(clearTimeout(this._cacheTimers[t.key]),delete this._cacheTimers[t.key],this._setTileReloadTimer(t.key,n)));const r=n;return n||(n=new W(t,this._source.tileSize*t.overscaleFactor()),this._loadTile(n,this._tileLoaded.bind(this,n,t.key,n.state))),n.uses++,this._tiles[t.key]=n,r||this._source.fire(new e.k("dataloading",{tile:n,coord:n.tileID,dataType:"source"})),n}_setTileReloadTimer(e,t){e in this._timers&&(clearTimeout(this._timers[e]),delete this._timers[e]);const n=t.getExpiryTimeout();n&&(this._timers[e]=setTimeout(()=>{this._reloadTile(e,"expired"),delete this._timers[e]},n))}_removeTile(e){const t=this._tiles[e];t&&(t.uses--,delete this._tiles[e],this._timers[e]&&(clearTimeout(this._timers[e]),delete this._timers[e]),t.uses>0||(t.hasData()&&"reloading"!==t.state?this._cache.add(t.tileID,t,t.getExpiryTimeout()):(t.aborted=!0,this._abortTile(t),this._unloadTile(t))))}clearTiles(){this._shouldReloadOnResume=!1,this._paused=!1;for(const e in this._tiles)this._removeTile(e);this._cache.reset()}tilesIn(t,n,r){const i=[],o=this.transform;if(!o)return i;const a=r?o.getCameraQueryGeometry(t):t,s=t.map(e=>o.pointCoordinate(e,this.terrain)),l=a.map(e=>o.pointCoordinate(e,this.terrain)),u=this.getIds();let c=1/0,d=1/0,f=-1/0,h=-1/0;for(const e of l)c=Math.min(c,e.x),d=Math.min(d,e.y),f=Math.max(f,e.x),h=Math.max(h,e.y);for(let t=0;t=0&&g[1].y+A>=0){const e=s.map(e=>a.getTilePoint(e)),t=l.map(e=>a.getTilePoint(e));i.push({tile:r,tileID:a,queryGeometry:e,cameraQueryGeometry:t,scale:p})}}return i}getVisibleCoordinates(e){const t=this.getRenderableIds(e).map(e=>this._tiles[e].tileID);for(const e of t)e.posMatrix=this.transform.calculatePosMatrix(e.toUnwrapped());return t}hasTransition(){if(this._source.hasTransition())return!0;if(Q(this._source.type)){const t=e.h.now();for(const e in this._tiles)if(this._tiles[e].fadeEndTime>=t)return!0}return!1}setFeatureState(e,t,n){this._state.updateState(e=e||"_geojsonTileLayer",t,n)}removeFeatureState(e,t,n){this._state.removeFeatureState(e=e||"_geojsonTileLayer",t,n)}getFeatureState(e,t){return this._state.getState(e=e||"_geojsonTileLayer",t)}setDependencies(e,t,n){const r=this._tiles[e];r&&r.setDependencies(t,n)}reloadTilesForDependencies(e,t){for(const n in this._tiles)this._tiles[n].hasDependency(e,t)&&this._reloadTile(n,"reloading");this._cache.filter(n=>!n.hasDependency(e,t))}}function K(e,t){const n=Math.abs(2*e.wrap)-+(e.wrap<0),r=Math.abs(2*t.wrap)-+(t.wrap<0);return e.overscaledZ-t.overscaledZ||r-n||t.canonical.y-e.canonical.y||t.canonical.x-e.canonical.x}function Q(e){return"raster"===e||"image"===e||"video"===e}Z.maxOverzooming=10,Z.maxUnderzooming=3;const J="mapboxgl_preloaded_worker_pool";class ${constructor(){this.active={}}acquire(t){if(!this.workers)for(this.workers=[];this.workers.length<$.workerCount;)this.workers.push(new Worker(e.c.WORKER_URL));return this.active[t]=!0,this.workers.slice()}release(e){delete this.active[e],0===this.numActive()&&(this.workers.forEach(e=>{e.terminate()}),this.workers=null)}isPreloaded(){return!!this.active[J]}numActive(){return Object.keys(this.active).length}}const ee=Math.floor(e.h.hardwareConcurrency/2);let te;function ne(){return te||(te=new $),te}$.workerCount=e.ac(globalThis)?Math.max(Math.min(ee,3),1):1;class re{constructor(e,t){this.reset(e,t)}reset(e,t){this.points=e||[],this._distances=[0];for(let e=1;e0?(i-a)/s:0;return this.points[o].mult(1-l).add(this.points[n].mult(l))}}function ie(e,t){let n=!0;return"always"===e||"never"!==e&&"never"!==t||(n=!1),n}class oe{constructor(e,t,n){const r=this.boxCells=[],i=this.circleCells=[];this.xCellCount=Math.ceil(e/n),this.yCellCount=Math.ceil(t/n);for(let e=0;ethis.width||r<0||t>this.height)return[];const s=[];if(e<=0&&t<=0&&this.width<=n&&this.height<=r){if(i)return[{key:null,x1:e,y1:t,x2:n,y2:r}];for(let e=0;e0}hitTestCircle(e,t,n,r,i){const o=e-n,a=e+n,s=t-n,l=t+n;if(a<0||o>this.width||l<0||s>this.height)return!1;const u=[];return this._forEachCell(o,s,a,l,this._queryCellCircle,u,{hitTest:!0,overlapMode:r,circle:{x:e,y:t,radius:n},seenUids:{box:{},circle:{}}},i),u.length>0}_queryCell(e,t,n,r,i,o,a,s){const{seenUids:l,hitTest:u,overlapMode:c}=a,d=this.boxCells[i];if(null!==d){const i=this.bboxes;for(const a of d)if(!l.box[a]){l.box[a]=!0;const d=4*a,f=this.boxKeys[a];if(e<=i[d+2]&&t<=i[d+3]&&n>=i[d+0]&&r>=i[d+1]&&(!s||s(f))&&(!u||!ie(c,f.overlapMode))&&(o.push({key:f,x1:i[d],y1:i[d+1],x2:i[d+2],y2:i[d+3]}),u))return!0}}const f=this.circleCells[i];if(null!==f){const i=this.circles;for(const a of f)if(!l.circle[a]){l.circle[a]=!0;const d=3*a,f=this.circleKeys[a];if(this._circleAndRectCollide(i[d],i[d+1],i[d+2],e,t,n,r)&&(!s||s(f))&&(!u||!ie(c,f.overlapMode))){const e=i[d],t=i[d+1],n=i[d+2];if(o.push({key:f,x1:e-n,y1:t-n,x2:e+n,y2:t+n}),u)return!0}}}return!1}_queryCellCircle(e,t,n,r,i,o,a,s){const{circle:l,seenUids:u,overlapMode:c}=a,d=this.boxCells[i];if(null!==d){const e=this.bboxes;for(const t of d)if(!u.box[t]){u.box[t]=!0;const n=4*t,r=this.boxKeys[t];if(this._circleAndRectCollide(l.x,l.y,l.radius,e[n+0],e[n+1],e[n+2],e[n+3])&&(!s||s(r))&&!ie(c,r.overlapMode))return o.push(!0),!0}}const f=this.circleCells[i];if(null!==f){const e=this.circles;for(const t of f)if(!u.circle[t]){u.circle[t]=!0;const n=3*t,r=this.circleKeys[t];if(this._circlesCollide(e[n],e[n+1],e[n+2],l.x,l.y,l.radius)&&(!s||s(r))&&!ie(c,r.overlapMode))return o.push(!0),!0}}}_forEachCell(e,t,n,r,i,o,a,s){const l=this._convertToXCellCoord(e),u=this._convertToYCellCoord(t),c=this._convertToXCellCoord(n),d=this._convertToYCellCoord(r);for(let f=l;f<=c;f++)for(let l=u;l<=d;l++)if(i.call(this,e,t,n,r,this.xCellCount*l+f,o,a,s))return}_convertToXCellCoord(e){return Math.max(0,Math.min(this.xCellCount-1,Math.floor(e*this.xScale)))}_convertToYCellCoord(e){return Math.max(0,Math.min(this.yCellCount-1,Math.floor(e*this.yScale)))}_circlesCollide(e,t,n,r,i,o){const a=r-e,s=i-t,l=n+o;return l*l>a*a+s*s}_circleAndRectCollide(e,t,n,r,i,o,a){const s=(o-r)/2,l=Math.abs(e-(r+s));if(l>s+n)return!1;const u=(a-i)/2,c=Math.abs(t-(i+u));if(c>u+n)return!1;if(l<=s||c<=u)return!0;const d=l-s,f=c-u;return d*d+f*f<=n*n}}function ae(t,n,r,i,o){const a=e.Z();return n?(e.a0(a,a,[1/o,1/o,1]),r||e.ae(a,a,i.angle)):e.a1(a,i.labelPlaneMatrix,t),a}function se(t,n,r,i,o){if(n){const n=e.af(t);return e.a0(n,n,[o,o,1]),r||e.ae(n,n,-i.angle),n}return i.glCoordMatrix}function le(t,n,r){let i;r?(i=[t.x,t.y,r(t.x,t.y),1],e.ag(i,i,n)):(i=[t.x,t.y,0,1],we(i,i,n));const o=i[3];return{point:new e.P(i[0]/o,i[1]/o),signedDistanceFromCamera:o}}function ue(e,t){return.5+e/t*.5}function ce(e,t){const n=e[0]/e[3],r=e[1]/e[3];return n>=-t[0]&&n<=t[0]&&r>=-t[1]&&r<=t[1]}function de(t,n,r,i,o,a,s,l,u,c){const d=i?t.textSizeData:t.iconSizeData,f=e.ah(d,r.transform.zoom),h=[256/r.width*2+1,256/r.height*2+1],p=i?t.text.dynamicLayoutVertexArray:t.icon.dynamicLayoutVertexArray;p.clear();const A=t.lineVertexArray,g=i?t.text.placedSymbolArray:t.icon.placedSymbolArray,m=r.transform.width/r.transform.height;let y=!1;for(let i=0;iMath.abs(r.x-n.x)*i?{useVertical:!0}:(t===e.ai.vertical?n.yr.x)?{needsFlipping:!0}:null}function pe(t,n,r,i,o,a,s,l,u,c,d,f,h,p,A,g){const m=n/24,y=t.lineOffsetX*m,v=t.lineOffsetY*m;let b;if(t.numGlyphs>1){const e=t.glyphStartIndex+t.numGlyphs,n=t.lineStartIndex,o=t.lineStartIndex+t.lineLength,c=fe(m,l,y,v,r,d,f,t,u,a,h,A,g);if(!c)return{notEnoughRoom:!0};const _=le(c.first.point,s,g).point,w=le(c.last.point,s,g).point;if(i&&!r){const e=he(t.writingMode,_,w,p);if(e)return e}b=[c.first];for(let i=t.glyphStartIndex+1;i0?a.point:Ae(f,i,n,1,o,g),l=he(t.writingMode,n,s,p);if(l)return l}const n=ve(m*l.getoffsetX(t.glyphStartIndex),y,v,r,d,f,t.segment,t.lineStartIndex,t.lineStartIndex+t.lineLength,u,a,h,A,g);if(!n)return{notEnoughRoom:!0};b=[n]}for(const t of b)e.ak(c,t.point,t.angle);return{}}function Ae(e,t,n,r,i,o){const a=le(e.add(e.sub(t)._unit()),i,o).point,s=n.sub(a);return n.add(s._mult(r/s.mag()))}function ge(t,n){const{projectionCache:r,lineVertexArray:i,labelPlaneMatrix:o,tileAnchorPoint:a,distanceFromAnchor:s,getElevation:l,previousVertex:u,direction:c,absOffsetX:d}=n;if(r.projections[t])return r.projections[t];const f=new e.P(i.getx(t),i.gety(t)),h=le(f,o,l);if(h.signedDistanceFromCamera>0)return r.projections[t]=h.point,h.point;const p=t-c;return Ae(0===s?a:new e.P(i.getx(p),i.gety(p)),f,u,d-s+1,o,l)}function me(e,t,n){return e._unit()._perp()._mult(t*n)}function ye(t,n,r,i,o,a,s,l){const{projectionCache:u,direction:c}=l;if(u.offsets[t])return u.offsets[t];const d=r.add(n);if(t+c=o)return u.offsets[t]=d,d;const f=ge(t+c,l),h=me(f.sub(r),s,c),p=r.add(h),A=f.add(h);return u.offsets[t]=e.al(a,d,p,A)||d,u.offsets[t]}function ve(e,t,n,r,i,o,a,s,l,u,c,d,f,h){const p=r?e-t:e+t;let A=p>0?1:-1,g=0;r&&(A*=-1,g=Math.PI),A<0&&(g+=Math.PI);let m,y,v=A>0?s+a:s+a+1,b=i,_=i,w=0,x=0;const M=Math.abs(p),E=[];let O;for(;w+x<=M;){if(v+=A,v=l)return null;w+=x,_=b,y=m;const e={projectionCache:d,lineVertexArray:u,labelPlaneMatrix:c,tileAnchorPoint:o,distanceFromAnchor:w,getElevation:h,previousVertex:_,direction:A,absOffsetX:M};if(b=ge(v,e),0===n)E.push(_),O=b.sub(_);else{let t;const r=b.sub(_);t=0===r.mag()?me(ge(v+A,e).sub(b),n,A):me(r,n,A),y||(y=_.add(t)),m=ye(v,t,b,s,l,y,n,e),E.push(y),O=m.sub(y)}x=O.mag()}const S=O._mult((M-w)/x)._add(y||_),T=g+Math.atan2(b.y-_.y,b.x-_.x);return E.push(S),{point:S,angle:f?T:0,path:E}}const be=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function _e(e,t){for(let n=0;n=1;e--)c.push(a.path[e]);for(let e=1;ele(e,l,p));c=e.some(e=>e.signedDistanceFromCamera<=0)?[]:e.map(e=>e.point)}let m=[];if(c.length>0){const t=c[0].clone(),n=c[0].clone();for(let e=1;e=r.x&&n.x<=i.x&&t.y>=r.y&&n.y<=i.y?[c]:n.xi.x||n.yi.y?[]:e.am([c],r.x,r.y,i.x,i.y)}for(const e of m){o.reset(e,.25*n);let r=0;r=o.length<=.5*n?1:Math.ceil(o.paddedLength/g)+1;for(let e=0;e=this.screenRightBoundary||rthis.screenBottomBoundary}isInsideGrid(e,t,n,r){return n>=0&&e=0&&te.collisionGroupID===t}}return this.collisionGroups[e]}}function Ie(t,n,r,i,o){const{horizontalAlign:a,verticalAlign:s}=e.au(t);return new e.P(-(a-.5)*n+i[0]*o,-(s-.5)*r+i[1]*o)}function De(t,n,r,i,o,a){const{x1:s,x2:l,y1:u,y2:c,anchorPointX:d,anchorPointY:f}=t,h=new e.P(n,r);return i&&h._rotate(o?a:-a),{x1:s+h.x,y1:u+h.y,x2:l+h.x,y2:c+h.y,anchorPointX:d,anchorPointY:f}}class ke{constructor(e,t,n,r,i){this.transform=e.clone(),this.terrain=t,this.collisionIndex=new Me(this.transform),this.placements={},this.opacities={},this.variableOffsets={},this.stale=!1,this.commitTime=0,this.fadeDuration=n,this.retainedQueryData={},this.collisionGroups=new Pe(r),this.collisionCircleArrays={},this.prevPlacement=i,i&&(i.prevPlacement=void 0),this.placedOrientations={}}getBucketParts(t,n,r,i){const o=r.getBucket(n),a=r.latestFeatureIndex;if(!o||!a||n.id!==o.layerIds[0])return;const s=r.collisionBoxArray,l=o.layers[0].layout,u=Math.pow(2,this.transform.zoom-r.tileID.overscaledZ),c=r.tileSize/e.N,d=this.transform.calculatePosMatrix(r.tileID.toUnwrapped()),f="map"===l.get("text-pitch-alignment"),h="map"===l.get("text-rotation-alignment"),p=Ee(r,1,this.transform.zoom),A=ae(d,f,h,this.transform,p);let g=null;if(f){const t=se(d,f,h,this.transform,p);g=e.a1([],this.transform.labelPlaneMatrix,t)}this.retainedQueryData[o.bucketInstanceId]=new Le(o.bucketInstanceId,a,o.sourceLayerIndex,o.index,r.tileID);const m={bucket:o,layout:l,posMatrix:d,textLabelPlaneMatrix:A,labelToScreenMatrix:g,scale:u,textPixelRatio:c,holdingForFade:r.holdingForFade(),collisionBoxArray:s,partiallyEvaluatedTextSize:e.ah(o.textSizeData,this.transform.zoom),collisionGroup:this.collisionGroups.get(o.sourceID)};if(i)for(const e of o.sortKeyRanges){const{sortKey:n,symbolInstanceStart:r,symbolInstanceEnd:i}=e;t.push({sortKey:n,symbolInstanceStart:r,symbolInstanceEnd:i,parameters:m})}else t.push({symbolInstanceStart:0,symbolInstanceEnd:o.symbolInstances.length,parameters:m})}attemptAnchorPlacement(t,n,r,i,o,a,s,l,u,c,d,f,h,p,A,g){const m=e.aq[t.textAnchor],y=[t.textOffset0,t.textOffset1],v=Ie(m,r,i,y,o),b=this.collisionIndex.placeCollisionBox(De(n,v.x,v.y,a,s,this.transform.angle),d,l,u,c.predicate,g);if((!A||0!==this.collisionIndex.placeCollisionBox(De(A,v.x,v.y,a,s,this.transform.angle),d,l,u,c.predicate,g).box.length)&&b.box.length>0){let e;if(this.prevPlacement&&this.prevPlacement.variableOffsets[f.crossTileID]&&this.prevPlacement.placements[f.crossTileID]&&this.prevPlacement.placements[f.crossTileID].text&&(e=this.prevPlacement.variableOffsets[f.crossTileID].anchor),0===f.crossTileID)throw new Error("symbolInstance.crossTileID can't be 0");return this.variableOffsets[f.crossTileID]={textOffset:y,width:r,height:i,anchor:m,textBoxScale:o,prevAnchor:e},this.markUsedJustification(h,m,f,p),h.allowVerticalPlacement&&(this.markUsedOrientation(h,p,f),this.placedOrientations[f.crossTileID]=p),{shift:v,placedGlyphBoxes:b}}}placeLayerBucketPart(t,n,r){const{bucket:i,layout:o,posMatrix:a,textLabelPlaneMatrix:s,labelToScreenMatrix:l,textPixelRatio:u,holdingForFade:c,collisionBoxArray:d,partiallyEvaluatedTextSize:f,collisionGroup:h}=t.parameters,p=o.get("text-optional"),A=o.get("icon-optional"),g=e.ar(o,"text-overlap","text-allow-overlap"),m="always"===g,y=e.ar(o,"icon-overlap","icon-allow-overlap"),v="always"===y,b="map"===o.get("text-rotation-alignment"),_="map"===o.get("text-pitch-alignment"),w="none"!==o.get("icon-text-fit"),x="viewport-y"===o.get("symbol-z-order"),M=m&&(v||!i.hasIconData()||A),E=v&&(m||!i.hasTextData()||p);!i.collisionArrays&&d&&i.deserializeCollisionBoxes(d);const O=this.retainedQueryData[i.bucketInstanceId].tileID,S=this.terrain?(e,t)=>this.terrain.getElevation(O,e,t):null,T=(t,d)=>{var v,x;if(n[t.crossTileID])return;if(c)return void(this.placements[t.crossTileID]=new Te(!1,!1,!1));let O=!1,T=!1,C=!0,L=null,P={box:null,offscreen:null},I={box:null,offscreen:null},D=null,k=null,R=null,j=0,F=0,N=0;d.textFeatureIndex?j=d.textFeatureIndex:t.useRuntimeCollisionCircles&&(j=t.featureIndex),d.verticalTextFeatureIndex&&(F=d.verticalTextFeatureIndex);const B=d.textBox;if(B){const n=n=>{let r=e.ai.horizontal;if(i.allowVerticalPlacement&&!n&&this.prevPlacement){const e=this.prevPlacement.placedOrientations[t.crossTileID];e&&(this.placedOrientations[t.crossTileID]=e,r=e,this.markUsedOrientation(i,r,t))}return r},r=(n,r)=>{if(i.allowVerticalPlacement&&t.numVerticalGlyphVertices>0&&d.verticalTextBox){for(const t of i.writingModes)if(t===e.ai.vertical?(P=r(),I=P):P=n(),P&&P.box&&P.box.length)break}else P=n()},o=t.textAnchorOffsetStartIndex,s=t.textAnchorOffsetEndIndex;if(s===o){const o=(e,n)=>{const r=this.collisionIndex.placeCollisionBox(e,g,u,a,h.predicate,S);return r&&r.box&&r.box.length&&(this.markUsedOrientation(i,n,t),this.placedOrientations[t.crossTileID]=n),r};r(()=>o(B,e.ai.horizontal),()=>{const n=d.verticalTextBox;return i.allowVerticalPlacement&&t.numVerticalGlyphVertices>0&&n?o(n,e.ai.vertical):{box:null,offscreen:null}}),n(P&&P.box&&P.box.length)}else{let l=e.aq[null===(x=null===(v=this.prevPlacement)||void 0===v?void 0:v.variableOffsets[t.crossTileID])||void 0===x?void 0:x.anchor];const c=(e,n,r)=>{const c=e.x2-e.x1,d=e.y2-e.y1,f=t.textBoxScale,p=w&&"never"===y?n:null;let A={box:[],offscreen:!1},m="never"===g?1:2,v="never";l&&m++;for(let n=0;nc(B,d.iconBox,e.ai.horizontal),()=>{const n=d.verticalTextBox;return i.allowVerticalPlacement&&!(P&&P.box&&P.box.length)&&t.numVerticalGlyphVertices>0&&n?c(n,d.verticalIconBox,e.ai.vertical):{box:null,offscreen:null}}),P&&(O=P.box,C=P.offscreen);const f=n(P&&P.box);if(!O&&this.prevPlacement){const e=this.prevPlacement.variableOffsets[t.crossTileID];e&&(this.variableOffsets[t.crossTileID]=e,this.markUsedJustification(i,e.anchor,t,f))}}}if(D=P,O=D&&D.box&&D.box.length>0,C=D&&D.offscreen,t.useRuntimeCollisionCircles){const n=i.text.placedSymbolArray.get(t.centerJustifiedTextSymbolIndex),u=e.aj(i.textSizeData,f,n),c=o.get("text-padding");k=this.collisionIndex.placeCollisionCircles(g,n,i.lineVertexArray,i.glyphOffsetArray,u,a,s,l,r,_,h.predicate,t.collisionCircleDiameter,c,S),k.circles.length&&k.collisionDetected&&!r&&e.w("Collisions detected, but collision boxes are not shown"),O=m||k.circles.length>0&&!k.collisionDetected,C=C&&k.offscreen}if(d.iconFeatureIndex&&(N=d.iconFeatureIndex),d.iconBox){const e=e=>{const t=w&&L?De(e,L.x,L.y,b,_,this.transform.angle):e;return this.collisionIndex.placeCollisionBox(t,y,u,a,h.predicate,S)};I&&I.box&&I.box.length&&d.verticalIconBox?(R=e(d.verticalIconBox),T=R.box.length>0):(R=e(d.iconBox),T=R.box.length>0),C=C&&R.offscreen}const z=p||0===t.numHorizontalGlyphVertices&&0===t.numVerticalGlyphVertices,U=A||0===t.numIconVertices;if(z||U?U?z||(T=T&&O):O=T&&O:T=O=T&&O,O&&D&&D.box&&this.collisionIndex.insertCollisionBox(D.box,g,o.get("text-ignore-placement"),i.bucketInstanceId,I&&I.box&&F?F:j,h.ID),T&&R&&this.collisionIndex.insertCollisionBox(R.box,y,o.get("icon-ignore-placement"),i.bucketInstanceId,N,h.ID),k&&(O&&this.collisionIndex.insertCollisionCircles(k.circles,g,o.get("text-ignore-placement"),i.bucketInstanceId,j,h.ID),r)){const e=i.bucketInstanceId;let t=this.collisionCircleArrays[e];void 0===t&&(t=this.collisionCircleArrays[e]=new Ce);for(let e=0;e=0;--t){const n=e[t];T(i.symbolInstances.get(n),i.collisionArrays[n])}}else for(let e=t.symbolInstanceStart;e=0&&(t.text.placedSymbolArray.get(e).crossTileID=o>=0&&e!==o?0:r.crossTileID)}markUsedOrientation(t,n,r){const i=n===e.ai.horizontal||n===e.ai.horizontalOnly?n:0,o=n===e.ai.vertical?n:0,a=[r.leftJustifiedTextSymbolIndex,r.centerJustifiedTextSymbolIndex,r.rightJustifiedTextSymbolIndex];for(const e of a)t.text.placedSymbolArray.get(e).placedOrientation=i;r.verticalPlacedTextSymbolIndex&&(t.text.placedSymbolArray.get(r.verticalPlacedTextSymbolIndex).placedOrientation=o)}commit(e){this.commitTime=e,this.zoomAtLastRecencyCheck=this.transform.zoom;const t=this.prevPlacement;let n=!1;this.prevZoomAdjustment=t?t.zoomAdjustment(this.transform.zoom):0;const r=t?t.symbolFadeChange(e):1,i=t?t.opacities:{},o=t?t.variableOffsets:{},a=t?t.placedOrientations:{};for(const e in this.placements){const t=this.placements[e],o=i[e];o?(this.opacities[e]=new Se(o,r,t.text,t.icon),n=n||t.text!==o.text.placed||t.icon!==o.icon.placed):(this.opacities[e]=new Se(null,r,t.text,t.icon,t.skipFade),n=n||t.text||t.icon)}for(const e in i){const t=i[e];if(!this.opacities[e]){const i=new Se(t,r,!1,!1);i.isHidden()||(this.opacities[e]=i,n=n||t.text.placed||t.icon.placed)}}for(const e in o)this.variableOffsets[e]||!this.opacities[e]||this.opacities[e].isHidden()||(this.variableOffsets[e]=o[e]);for(const e in a)this.placedOrientations[e]||!this.opacities[e]||this.opacities[e].isHidden()||(this.placedOrientations[e]=a[e]);if(t&&void 0===t.lastPlacementChangeTime)throw new Error("Last placement time for previous placement is not defined");n?this.lastPlacementChangeTime=e:"number"!=typeof this.lastPlacementChangeTime&&(this.lastPlacementChangeTime=t?t.lastPlacementChangeTime:e)}updateLayerOpacities(e,t){const n={};for(const r of t){const t=r.getBucket(e);t&&r.latestFeatureIndex&&e.id===t.layerIds[0]&&this.updateBucketOpacities(t,n,r.collisionBoxArray)}}updateBucketOpacities(t,n,r){t.hasTextData()&&(t.text.opacityVertexArray.clear(),t.text.hasVisibleVertices=!1),t.hasIconData()&&(t.icon.opacityVertexArray.clear(),t.icon.hasVisibleVertices=!1),t.hasIconCollisionBoxData()&&t.iconCollisionBox.collisionVertexArray.clear(),t.hasTextCollisionBoxData()&&t.textCollisionBox.collisionVertexArray.clear();const i=t.layers[0],o=i.layout,a=new Se(null,0,!1,!1,!0),s=o.get("text-allow-overlap"),l=o.get("icon-allow-overlap"),u=i._unevaluatedLayout.hasValue("text-variable-anchor")||i._unevaluatedLayout.hasValue("text-variable-anchor-offset"),c="map"===o.get("text-rotation-alignment"),d="map"===o.get("text-pitch-alignment"),f="none"!==o.get("icon-text-fit"),h=new Se(null,0,s&&(l||!t.hasIconData()||o.get("icon-optional")),l&&(s||!t.hasTextData()||o.get("text-optional")),!0);!t.collisionArrays&&r&&(t.hasIconCollisionBoxData()||t.hasTextCollisionBoxData())&&t.deserializeCollisionBoxes(r);const p=(e,t,n)=>{for(let r=0;r0,m=this.placedOrientations[i.crossTileID],y=m===e.ai.vertical,v=m===e.ai.horizontal||m===e.ai.horizontalOnly;if(o>0||s>0){const e=Ve(A.text);p(t.text,o,y?Ge:e),p(t.text,s,v?Ge:e);const n=A.text.isHidden();[i.rightJustifiedTextSymbolIndex,i.centerJustifiedTextSymbolIndex,i.leftJustifiedTextSymbolIndex].forEach(e=>{e>=0&&(t.text.placedSymbolArray.get(e).hidden=n||y?1:0)}),i.verticalPlacedTextSymbolIndex>=0&&(t.text.placedSymbolArray.get(i.verticalPlacedTextSymbolIndex).hidden=n||v?1:0);const r=this.variableOffsets[i.crossTileID];r&&this.markUsedJustification(t,r.anchor,i,m);const a=this.placedOrientations[i.crossTileID];a&&(this.markUsedJustification(t,"left",i,a),this.markUsedOrientation(t,a,i))}if(g){const e=Ve(A.icon),n=!(f&&i.verticalPlacedIconSymbolIndex&&y);i.placedIconSymbolIndex>=0&&(p(t.icon,i.numIconVertices,n?e:Ge),t.icon.placedSymbolArray.get(i.placedIconSymbolIndex).hidden=A.icon.isHidden()),i.verticalPlacedIconSymbolIndex>=0&&(p(t.icon,i.numVerticalIconVertices,n?Ge:e),t.icon.placedSymbolArray.get(i.verticalPlacedIconSymbolIndex).hidden=A.icon.isHidden())}if(t.hasIconCollisionBoxData()||t.hasTextCollisionBoxData()){const n=t.collisionArrays[r];if(n){let r=new e.P(0,0);if(n.textBox||n.verticalTextBox){let e=!0;if(u){const t=this.variableOffsets[l];t?(r=Ie(t.anchor,t.width,t.height,t.textOffset,t.textBoxScale),c&&r._rotate(d?this.transform.angle:-this.transform.angle)):e=!1}n.textBox&&Re(t.textCollisionBox.collisionVertexArray,A.text.placed,!e||y,r.x,r.y),n.verticalTextBox&&Re(t.textCollisionBox.collisionVertexArray,A.text.placed,!e||v,r.x,r.y)}const i=Boolean(!v&&n.verticalIconBox);n.iconBox&&Re(t.iconCollisionBox.collisionVertexArray,A.icon.placed,i,f?r.x:0,f?r.y:0),n.verticalIconBox&&Re(t.iconCollisionBox.collisionVertexArray,A.icon.placed,!i,f?r.x:0,f?r.y:0)}}}if(t.sortFeatures(this.transform.angle),this.retainedQueryData[t.bucketInstanceId]&&(this.retainedQueryData[t.bucketInstanceId].featureSortOrder=t.featureSortOrder),t.hasTextData()&&t.text.opacityVertexBuffer&&t.text.opacityVertexBuffer.updateData(t.text.opacityVertexArray),t.hasIconData()&&t.icon.opacityVertexBuffer&&t.icon.opacityVertexBuffer.updateData(t.icon.opacityVertexArray),t.hasIconCollisionBoxData()&&t.iconCollisionBox.collisionVertexBuffer&&t.iconCollisionBox.collisionVertexBuffer.updateData(t.iconCollisionBox.collisionVertexArray),t.hasTextCollisionBoxData()&&t.textCollisionBox.collisionVertexBuffer&&t.textCollisionBox.collisionVertexBuffer.updateData(t.textCollisionBox.collisionVertexArray),t.text.opacityVertexArray.length!==t.text.layoutVertexArray.length/4)throw new Error(`bucket.text.opacityVertexArray.length (= ${t.text.opacityVertexArray.length}) !== bucket.text.layoutVertexArray.length (= ${t.text.layoutVertexArray.length}) / 4`);if(t.icon.opacityVertexArray.length!==t.icon.layoutVertexArray.length/4)throw new Error(`bucket.icon.opacityVertexArray.length (= ${t.icon.opacityVertexArray.length}) !== bucket.icon.layoutVertexArray.length (= ${t.icon.layoutVertexArray.length}) / 4`);if(t.bucketInstanceId in this.collisionCircleArrays){const e=this.collisionCircleArrays[t.bucketInstanceId];t.placementInvProjMatrix=e.invProjMatrix,t.placementViewportMatrix=e.viewportMatrix,t.collisionCircleArray=e.circles,delete this.collisionCircleArrays[t.bucketInstanceId]}}symbolFadeChange(e){return 0===this.fadeDuration?1:(e-this.commitTime)/this.fadeDuration+this.prevZoomAdjustment}zoomAdjustment(e){return Math.max(0,(this.transform.zoom-e)/1.5)}hasTransitions(e){return this.stale||e-this.lastPlacementChangeTimee}setStale(){this.stale=!0}}function Re(e,t,n,r,i){e.emplaceBack(t?1:0,n?1:0,r||0,i||0),e.emplaceBack(t?1:0,n?1:0,r||0,i||0),e.emplaceBack(t?1:0,n?1:0,r||0,i||0),e.emplaceBack(t?1:0,n?1:0,r||0,i||0)}const je=Math.pow(2,25),Fe=Math.pow(2,24),Ne=Math.pow(2,17),Be=Math.pow(2,16),ze=Math.pow(2,9),Ue=Math.pow(2,8),He=Math.pow(2,1);function Ve(e){if(0===e.opacity&&!e.placed)return 0;if(1===e.opacity&&e.placed)return 4294967295;const t=e.placed?1:0,n=Math.floor(127*e.opacity);return n*je+t*Fe+n*Ne+t*Be+n*ze+t*Ue+n*He+t}const Ge=0;class Ye{constructor(e){this._sortAcrossTiles="viewport-y"!==e.layout.get("symbol-z-order")&&!e.layout.get("symbol-sort-key").isConstant(),this._currentTileIndex=0,this._currentPartIndex=0,this._seenCrossTileIDs={},this._bucketParts=[]}continuePlacement(e,t,n,r,i){const o=this._bucketParts;for(;this._currentTileIndexe.sortKey-t.sortKey));this._currentPartIndex!this._forceFullPlacement&&e.h.now()-i>2;for(;this._currentPlacementIndex>=0;){const e=n[t[this._currentPlacementIndex]],i=this.placement.collisionIndex.transform.zoom;if("symbol"===e.type&&(!e.minzoom||e.minzoom<=i)&&(!e.maxzoom||e.maxzoom>i)){if(this._inProgressLayer||(this._inProgressLayer=new Ye(e)),this._inProgressLayer.continuePlacement(r[e.source],this.placement,this._showCollisionBoxes,e,o))return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0}commit(e){return this.placement.commit(e),this.placement}}const qe=512/e.N/2;class Xe{constructor(t,n,r){this.tileID=t,this.bucketInstanceId=r,this._symbolsByKey={};const i=new Map;for(let e=0;e({x:Math.floor(e.anchorX*qe),y:Math.floor(e.anchorY*qe)})),crossTileIDs:n.map(e=>e.crossTileID)};if(r.positions.length>128){const t=new e.av(r.positions.length,16,Uint16Array);for(const{x:e,y:n}of r.positions)t.add(e,n);t.finish(),delete r.positions,r.index=t}this._symbolsByKey[t]=r}}getScaledCoordinates(t,n){const{x:r,y:i,z:o}=this.tileID.canonical,{x:a,y:s,z:l}=n.canonical,u=qe/Math.pow(2,l-o),c=(s*e.N+t.anchorY)*u,d=i*e.N*qe;return{x:Math.floor((a*e.N+t.anchorX)*u-r*e.N*qe),y:Math.floor(c-d)}}findMatches(e,t,n){const r=this.tileID.canonical.ze)}}class Ze{constructor(){this.maxCrossTileID=0}generate(){return++this.maxCrossTileID}}class Ke{constructor(){this.indexes={},this.usedCrossTileIDs={},this.lng=0}handleWrapJump(e){const t=Math.round((e-this.lng)/360);if(0!==t)for(const e in this.indexes){const n=this.indexes[e],r={};for(const e in n){const i=n[e];i.tileID=i.tileID.unwrapTo(i.tileID.wrap+t),r[i.tileID.key]=i}this.indexes[e]=r}this.lng=e}addBucket(e,t,n){if(this.indexes[e.overscaledZ]&&this.indexes[e.overscaledZ][e.key]){if(this.indexes[e.overscaledZ][e.key].bucketInstanceId===t.bucketInstanceId)return!1;this.removeBucketCrossTileIDs(e.overscaledZ,this.indexes[e.overscaledZ][e.key])}for(let e=0;ee.overscaledZ)for(const n in i){const o=i[n];o.tileID.isChildOf(e)&&o.findMatches(t.symbolInstances,e,r)}else{const o=i[e.scaledTo(Number(n)).key];o&&o.findMatches(t.symbolInstances,e,r)}}for(let e=0;e{t[e]=!0});for(const e in this.layerIndexes)t[e]||delete this.layerIndexes[e]}}const Je=(t,n)=>e.x(t,n&&n.filter(e=>"source.canvas"!==e.identifier)),$e=e.F(e.ax,["addLayer","removeLayer","setPaintProperty","setLayoutProperty","setFilter","addSource","removeSource","setLayerZoomRange","setLight","setTransition","setGeoJSONSourceData","setGlyphs","setSprite"]),et=e.F(e.ax,["setCenter","setZoom","setBearing","setPitch"]),tt=e.aw();class nt extends e.E{constructor(t,n={}){super(),this.map=t,this.dispatcher=new C(ne(),this,t._getMapId()),this.imageManager=new b,this.imageManager.setEventedParent(this),this.glyphManager=new M(t._requestManager,n.localIdeographFontFamily),this.lineAtlas=new T(256,512),this.crossTileSymbolIndex=new Qe,this._spritesImagesIds={},this._layers={},this._order=[],this.sourceCaches={},this.zoomHistory=new e.ay,this._loaded=!1,this._availableImages=[],this._resetUpdates(),this.dispatcher.broadcast("setReferrer",e.az());const r=this;this._rtlTextPluginCallback=nt.registerForPluginStateChange(t=>{r.dispatcher.broadcast("syncRTLPluginState",{pluginStatus:t.pluginStatus,pluginURL:t.pluginURL},(t,n)=>{if(e.aA(t),n&&n.every(e=>e))for(const e in r.sourceCaches){const t=r.sourceCaches[e].getSource().type;"vector"!==t&&"geojson"!==t||r.sourceCaches[e].reload()}})}),this.on("data",e=>{if("source"!==e.dataType||"metadata"!==e.sourceDataType)return;const t=this.sourceCaches[e.sourceId];if(!t)return;const n=t.getSource();if(n&&n.vectorLayerIds)for(const e in this._layers){const t=this._layers[e];t.source===n.id&&this._validateLayer(t)}})}loadURL(t,n={},r){this.fire(new e.k("dataloading",{dataType:"style"})),n.validate="boolean"!=typeof n.validate||n.validate;const i=this.map._requestManager.transformRequest(t,u.Style);this._request=e.f(i,(t,i)=>{this._request=null,t?this.fire(new e.j(t)):i&&this._load(i,n,r)})}loadJSON(t,n={},r){this.fire(new e.k("dataloading",{dataType:"style"})),this._request=e.h.frame(()=>{this._request=null,n.validate=!1!==n.validate,this._load(t,n,r)})}loadEmpty(){this.fire(new e.k("dataloading",{dataType:"style"})),this._load(tt,{validate:!1})}_load(t,n,r){var i;const o=n.transformStyle?n.transformStyle(r,t):t;if(!n.validate||!Je(this,e.y(o))){this._loaded=!0,this.stylesheet=o;for(const e in o.sources)this.addSource(e,o.sources[e],{validate:!1});o.sprite?this._loadSprite(o.sprite):this.imageManager.setLoaded(!0),this.glyphManager.setURL(o.glyphs),this._createLayers(),this.light=new S(this.stylesheet.light),this.map.setTerrain(null!==(i=this.stylesheet.terrain)&&void 0!==i?i:null),this.fire(new e.k("data",{dataType:"style"})),this.fire(new e.k("style.load"))}}_createLayers(){const t=e.aB(this.stylesheet.layers);this.dispatcher.broadcast("setLayers",t),this._order=t.map(e=>e.id),this._layers={},this._serializedLayers=null;for(const n of t){const t=e.aC(n);t.setEventedParent(this,{layer:{id:n.id}}),this._layers[n.id]=t}}_loadSprite(t,n=!1,r){this.imageManager.setLoaded(!1),this._spriteRequest=function(t,n,r,i){const o=g(t),a=o.length,s=r>1?"@2x":"",c={},d={},f={};for(const{id:t,url:r}of o){const o=n.transformRequest(n.normalizeSpriteURL(r,s,".json"),u.SpriteJSON),h=`${t}_${o.url}`;c[h]=e.f(o,(e,n)=>{delete c[h],d[t]=n,m(i,d,f,e,a)});const p=n.transformRequest(n.normalizeSpriteURL(r,s,".png"),u.SpriteImage),A=`${t}_${p.url}`;c[A]=l.getImage(p,(e,n)=>{delete c[A],f[t]=n,m(i,d,f,e,a)})}return{cancel(){for(const e of Object.values(c))e.cancel()}}}(t,this.map._requestManager,this.map.getPixelRatio(),(t,i)=>{if(this._spriteRequest=null,t)this.fire(new e.j(t));else if(i)for(const e in i){this._spritesImagesIds[e]=[];const t=this._spritesImagesIds[e]?this._spritesImagesIds[e].filter(e=>!(e in i)):[];for(const e of t)this.imageManager.removeImage(e),this._changedImages[e]=!0;for(const t in i[e]){const r="default"===e?t:`${e}:${t}`;this._spritesImagesIds[e].push(r),r in this.imageManager.images?this.imageManager.updateImage(r,i[e][t],!1):this.imageManager.addImage(r,i[e][t]),n&&(this._changedImages[r]=!0)}}this.imageManager.setLoaded(!0),this._availableImages=this.imageManager.listImages(),n&&(this._changed=!0),this.dispatcher.broadcast("setImages",this._availableImages),this.fire(new e.k("data",{dataType:"style"})),r&&r(t)})}_unloadSprite(){for(const e of Object.values(this._spritesImagesIds).flat())this.imageManager.removeImage(e),this._changedImages[e]=!0;this._spritesImagesIds={},this._availableImages=this.imageManager.listImages(),this._changed=!0,this.dispatcher.broadcast("setImages",this._availableImages),this.fire(new e.k("data",{dataType:"style"}))}_validateLayer(t){const n=this.sourceCaches[t.source];if(!n)return;const r=t.sourceLayer;if(!r)return;const i=n.getSource();("geojson"===i.type||i.vectorLayerIds&&-1===i.vectorLayerIds.indexOf(r))&&this.fire(new e.j(new Error(`Source layer "${r}" does not exist on source "${i.id}" as specified by style layer "${t.id}".`)))}loaded(){if(!this._loaded)return!1;if(Object.keys(this._updatedSources).length)return!1;for(const e in this.sourceCaches)if(!this.sourceCaches[e].loaded())return!1;return!!this.imageManager.isLoaded()}_serializeByIds(e){const t=this._serializedAllLayers();if(!e||0===e.length)return Object.values(t);const n=[];for(const r of e)t[r]&&n.push(t[r]);return n}_serializedAllLayers(){let e=this._serializedLayers;if(e)return e;e=this._serializedLayers={};const t=Object.keys(this._layers);for(const n of t){const t=this._layers[n];"custom"!==t.type&&(e[n]=t.serialize())}return e}hasTransitions(){if(this.light&&this.light.hasTransition())return!0;for(const e in this.sourceCaches)if(this.sourceCaches[e].hasTransition())return!0;for(const e in this._layers)if(this._layers[e].hasTransition())return!0;return!1}_checkLoaded(){if(!this._loaded)throw new Error("Style is not done loading.")}update(t){if(!this._loaded)return;const n=this._changed;if(this._changed){const e=Object.keys(this._updatedLayers),n=Object.keys(this._removedLayers);(e.length||n.length)&&this._updateWorkerLayers(e,n);for(const e in this._updatedSources){const t=this._updatedSources[e];if("reload"===t)this._reloadSource(e);else{if("clear"!==t)throw new Error("Invalid action "+t);this._clearSource(e)}}this._updateTilesForChangedImages(),this._updateTilesForChangedGlyphs();for(const e in this._updatedPaintProps)this._layers[e].updateTransitions(t);this.light.updateTransitions(t),this._resetUpdates()}const r={};for(const e in this.sourceCaches){const t=this.sourceCaches[e];r[e]=t.used,t.used=!1}for(const e of this._order){const n=this._layers[e];n.recalculate(t,this._availableImages),!n.isHidden(t.zoom)&&n.source&&(this.sourceCaches[n.source].used=!0)}for(const t in r){const n=this.sourceCaches[t];r[t]!==n.used&&n.fire(new e.k("data",{sourceDataType:"visibility",dataType:"source",sourceId:t}))}this.light.recalculate(t),this.z=t.zoom,n&&this.fire(new e.k("data",{dataType:"style"}))}_updateTilesForChangedImages(){const e=Object.keys(this._changedImages);if(e.length){for(const t in this.sourceCaches)this.sourceCaches[t].reloadTilesForDependencies(["icons","patterns"],e);this._changedImages={}}}_updateTilesForChangedGlyphs(){if(this._glyphsDidChange){for(const e in this.sourceCaches)this.sourceCaches[e].reloadTilesForDependencies(["glyphs"],[""]);this._glyphsDidChange=!1}}_updateWorkerLayers(e,t){this.dispatcher.broadcast("updateLayers",{layers:this._serializeByIds(e),removedIds:t})}_resetUpdates(){this._changed=!1,this._updatedLayers={},this._removedLayers={},this._updatedSources={},this._updatedPaintProps={},this._changedImages={},this._glyphsDidChange=!1}setState(t,n={}){this._checkLoaded();const r=this.serialize();if(t=n.transformStyle?n.transformStyle(r,t):t,Je(this,e.y(t)))return!1;(t=e.aD(t)).layers=e.aB(t.layers);const i=e.aE(r,t).filter(e=>!(e.command in et));if(0===i.length)return!1;const o=i.filter(e=>!(e.command in $e));if(o.length>0)throw new Error(`Unimplemented: ${o.map(e=>e.command).join(", ")}.`);for(const e of i)"setTransition"!==e.command&&this[e.command].apply(this,e.args);return this.stylesheet=t,this._serializedLayers=null,!0}addImage(t,n){if(this.getImage(t))return this.fire(new e.j(new Error(`An image named "${t}" already exists.`)));this.imageManager.addImage(t,n),this._afterImageUpdated(t)}updateImage(e,t){this.imageManager.updateImage(e,t)}getImage(e){return this.imageManager.getImage(e)}removeImage(t){if(!this.getImage(t))return this.fire(new e.j(new Error(`An image named "${t}" does not exist.`)));this.imageManager.removeImage(t),this._afterImageUpdated(t)}_afterImageUpdated(t){this._availableImages=this.imageManager.listImages(),this._changedImages[t]=!0,this._changed=!0,this.dispatcher.broadcast("setImages",this._availableImages),this.fire(new e.k("data",{dataType:"style"}))}listImages(){return this._checkLoaded(),this.imageManager.listImages()}addSource(t,n,r={}){if(this._checkLoaded(),void 0!==this.sourceCaches[t])throw new Error(`Source "${t}" already exists.`);if(!n.type)throw new Error(`The type property must be defined, but only the following properties were given: ${Object.keys(n).join(", ")}.`);if(["vector","raster","geojson","video","image"].indexOf(n.type)>=0&&this._validate(e.y.source,"sources."+t,n,null,r))return;this.map&&this.map._collectResourceTiming&&(n.collectResourceTiming=!0);const i=this.sourceCaches[t]=new Z(t,n,this.dispatcher);i.style=this,i.setEventedParent(this,()=>({isSourceLoaded:i.loaded(),source:i.serialize(),sourceId:t})),i.onAdd(this.map),this._changed=!0}removeSource(t){if(this._checkLoaded(),void 0===this.sourceCaches[t])throw new Error("There is no source with this ID");for(const n in this._layers)if(this._layers[n].source===t)return this.fire(new e.j(new Error(`Source "${t}" cannot be removed while layer "${n}" is using it.`)));const n=this.sourceCaches[t];delete this.sourceCaches[t],delete this._updatedSources[t],n.fire(new e.k("data",{sourceDataType:"metadata",dataType:"source",sourceId:t})),n.setEventedParent(null),n.onRemove(this.map),this._changed=!0}setGeoJSONSourceData(e,t){if(this._checkLoaded(),void 0===this.sourceCaches[e])throw new Error("There is no source with this ID="+e);const n=this.sourceCaches[e].getSource();if("geojson"!==n.type)throw new Error(`geojsonSource.type is ${n.type}, which is !== 'geojson`);n.setData(t),this._changed=!0}getSource(e){return this.sourceCaches[e]&&this.sourceCaches[e].getSource()}addLayer(t,n,r={}){this._checkLoaded();const i=t.id;if(this.getLayer(i))return void this.fire(new e.j(new Error(`Layer "${i}" already exists on this map.`)));let o;if("custom"===t.type){if(Je(this,e.aF(t)))return;o=e.aC(t)}else{if("source"in t&&"object"==typeof t.source&&(this.addSource(i,t.source),t=e.aD(t),t=e.e(t,{source:i})),this._validate(e.y.layer,"layers."+i,t,{arrayIndex:-1},r))return;o=e.aC(t),this._validateLayer(o),o.setEventedParent(this,{layer:{id:i}})}const a=n?this._order.indexOf(n):this._order.length;if(n&&-1===a)this.fire(new e.j(new Error(`Cannot add layer "${i}" before non-existing layer "${n}".`)));else{if(this._order.splice(a,0,i),this._layerOrderChanged=!0,this._layers[i]=o,this._removedLayers[i]&&o.source&&"custom"!==o.type){const e=this._removedLayers[i];delete this._removedLayers[i],e.type!==o.type?this._updatedSources[o.source]="clear":(this._updatedSources[o.source]="reload",this.sourceCaches[o.source].pause())}this._updateLayer(o),o.onAdd&&o.onAdd(this.map)}}moveLayer(t,n){if(this._checkLoaded(),this._changed=!0,!this._layers[t])return void this.fire(new e.j(new Error(`The layer '${t}' does not exist in the map's style and cannot be moved.`)));if(t===n)return;const r=this._order.indexOf(t);this._order.splice(r,1);const i=n?this._order.indexOf(n):this._order.length;n&&-1===i?this.fire(new e.j(new Error(`Cannot move layer "${t}" before non-existing layer "${n}".`))):(this._order.splice(i,0,t),this._layerOrderChanged=!0)}removeLayer(t){this._checkLoaded();const n=this._layers[t];if(!n)return void this.fire(new e.j(new Error(`Cannot remove non-existing layer "${t}".`)));n.setEventedParent(null);const r=this._order.indexOf(t);this._order.splice(r,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[t]=n,delete this._layers[t],this._serializedLayers&&delete this._serializedLayers[t],delete this._updatedLayers[t],delete this._updatedPaintProps[t],n.onRemove&&n.onRemove(this.map)}getLayer(e){return this._layers[e]}getLayersOrder(){return[...this._order]}hasLayer(e){return e in this._layers}setLayerZoomRange(t,n,r){this._checkLoaded();const i=this.getLayer(t);i?i.minzoom===n&&i.maxzoom===r||(null!=n&&(i.minzoom=n),null!=r&&(i.maxzoom=r),this._updateLayer(i)):this.fire(new e.j(new Error(`Cannot set the zoom range of non-existing layer "${t}".`)))}setFilter(t,n,r={}){this._checkLoaded();const i=this.getLayer(t);if(i){if(!e.aG(i.filter,n))return null==n?(i.filter=void 0,void this._updateLayer(i)):void(this._validate(e.y.filter,`layers.${i.id}.filter`,n,null,r)||(i.filter=e.aD(n),this._updateLayer(i)))}else this.fire(new e.j(new Error(`Cannot filter non-existing layer "${t}".`)))}getFilter(t){return e.aD(this.getLayer(t).filter)}setLayoutProperty(t,n,r,i={}){this._checkLoaded();const o=this.getLayer(t);o?e.aG(o.getLayoutProperty(n),r)||(o.setLayoutProperty(n,r,i),this._updateLayer(o)):this.fire(new e.j(new Error(`Cannot style non-existing layer "${t}".`)))}getLayoutProperty(t,n){const r=this.getLayer(t);if(r)return r.getLayoutProperty(n);this.fire(new e.j(new Error(`Cannot get style of non-existing layer "${t}".`)))}setPaintProperty(t,n,r,i={}){this._checkLoaded();const o=this.getLayer(t);o?e.aG(o.getPaintProperty(n),r)||(o.setPaintProperty(n,r,i)&&this._updateLayer(o),this._changed=!0,this._updatedPaintProps[t]=!0):this.fire(new e.j(new Error(`Cannot style non-existing layer "${t}".`)))}getPaintProperty(e,t){return this.getLayer(e).getPaintProperty(t)}setFeatureState(t,n){this._checkLoaded();const r=t.source,i=t.sourceLayer,o=this.sourceCaches[r];if(void 0===o)return void this.fire(new e.j(new Error(`The source '${r}' does not exist in the map's style.`)));const a=o.getSource().type;"geojson"===a&&i?this.fire(new e.j(new Error("GeoJSON sources cannot have a sourceLayer parameter."))):"vector"!==a||i?(void 0===t.id&&this.fire(new e.j(new Error("The feature id parameter must be provided."))),o.setFeatureState(i,t.id,n)):this.fire(new e.j(new Error("The sourceLayer parameter must be provided for vector source types.")))}removeFeatureState(t,n){this._checkLoaded();const r=t.source,i=this.sourceCaches[r];if(void 0===i)return void this.fire(new e.j(new Error(`The source '${r}' does not exist in the map's style.`)));const o=i.getSource().type,a="vector"===o?t.sourceLayer:void 0;"vector"!==o||a?n&&"string"!=typeof t.id&&"number"!=typeof t.id?this.fire(new e.j(new Error("A feature id is required to remove its specific state property."))):i.removeFeatureState(a,t.id,n):this.fire(new e.j(new Error("The sourceLayer parameter must be provided for vector source types.")))}getFeatureState(t){this._checkLoaded();const n=t.source,r=t.sourceLayer,i=this.sourceCaches[n];if(void 0!==i)return"vector"!==i.getSource().type||r?(void 0===t.id&&this.fire(new e.j(new Error("The feature id parameter must be provided."))),i.getFeatureState(r,t.id)):void this.fire(new e.j(new Error("The sourceLayer parameter must be provided for vector source types.")));this.fire(new e.j(new Error(`The source '${n}' does not exist in the map's style.`)))}getTransition(){return e.e({duration:300,delay:0},this.stylesheet&&this.stylesheet.transition)}serialize(){if(!this._loaded)return;const t=e.aH(this.sourceCaches,e=>e.serialize()),n=this._serializeByIds(this._order),r=this.map.getTerrain()||void 0,i=this.stylesheet;return e.aI({version:i.version,name:i.name,metadata:i.metadata,light:i.light,center:i.center,zoom:i.zoom,bearing:i.bearing,pitch:i.pitch,sprite:i.sprite,glyphs:i.glyphs,transition:i.transition,sources:t,layers:n,terrain:r},e=>void 0!==e)}_updateLayer(e){this._updatedLayers[e.id]=!0,e.source&&!this._updatedSources[e.source]&&"raster"!==this.sourceCaches[e.source].getSource().type&&(this._updatedSources[e.source]="reload",this.sourceCaches[e.source].pause()),this._serializedLayers=null,this._changed=!0}_flattenAndSortRenderedFeatures(e){const t=e=>"fill-extrusion"===this._layers[e].type,n={},r=[];for(let i=this._order.length-1;i>=0;i--){const o=this._order[i];if(t(o)){n[o]=i;for(const t of e){const e=t[o];if(e)for(const t of e)r.push(t)}}}r.sort((e,t)=>t.intersectionZ-e.intersectionZ);const i=[];for(let o=this._order.length-1;o>=0;o--){const a=this._order[o];if(t(a))for(let e=r.length-1;e>=0;e--){const t=r[e].feature;if(n[t.layer.id]{const r=n.featureSortOrder;if(r){const n=r.indexOf(e.featureIndex);return r.indexOf(t.featureIndex)-n}return t.featureIndex-e.featureIndex});for(const e of i)t.push(e)}}for(const t in s)s[t].forEach(r=>{const i=r.feature,o=n[e[t].source].getFeatureState(i.layer["source-layer"],i.id);i.source=i.layer.source,i.layer["source-layer"]&&(i.sourceLayer=i.layer["source-layer"]),i.state=o});return s}(this._layers,a,this.sourceCaches,t,n,this.placement.collisionIndex,this.placement.retainedQueryData)),this._flattenAndSortRenderedFeatures(o)}querySourceFeatures(t,n){n&&n.filter&&this._validate(e.y.filter,"querySourceFeatures.filter",n.filter,null,n);const r=this.sourceCaches[t];return r?function(e,t){const n=e.getRenderableIds().map(t=>e.getTileByID(t)),r=[],i={};for(let e=0;e{U[e]=t})(e,t),t.workerSourceURL?void this.dispatcher.broadcast("loadWorkerSource",{name:e,url:t.workerSourceURL},n):n(null,null))}getLight(){return this.light.getLight()}setLight(t,n={}){this._checkLoaded();const r=this.light.getLight();let i=!1;for(const n in t)if(!e.aG(t[n],r[n])){i=!0;break}if(!i)return;const o={now:e.h.now(),transition:e.e({duration:300,delay:0},this.stylesheet.transition)};this.light.setLight(t,n),this.light.updateTransitions(o)}_validate(t,n,r,i,o={}){return(!o||!1!==o.validate)&&Je(this,t.call(e.y,e.e({key:n,style:this.serialize(),value:r,styleSpec:e.v},i)))}_remove(t=!0){this._request&&(this._request.cancel(),this._request=null),this._spriteRequest&&(this._spriteRequest.cancel(),this._spriteRequest=null),e.aJ.off("pluginStateChange",this._rtlTextPluginCallback);for(const e in this._layers)this._layers[e].setEventedParent(null);for(const e in this.sourceCaches){const t=this.sourceCaches[e];t.setEventedParent(null),t.onRemove(this.map)}this.imageManager.setEventedParent(null),this.setEventedParent(null),this.dispatcher.remove(t)}_clearSource(e){this.sourceCaches[e].clearTiles()}_reloadSource(e){this.sourceCaches[e].resume(),this.sourceCaches[e].reload()}_updateSources(e){for(const t in this.sourceCaches)this.sourceCaches[t].update(e,this.map.terrain)}_generateCollisionBoxes(){for(const e in this.sourceCaches)this._reloadSource(e)}_updatePlacement(t,n,r,i,o=!1){let a=!1,s=!1;const l={};for(const e of this._order){const n=this._layers[e];if("symbol"!==n.type)continue;if(!l[n.source]){const e=this.sourceCaches[n.source];l[n.source]=e.getRenderableIds(!0).map(t=>e.getTileByID(t)).sort((e,t)=>t.tileID.overscaledZ-e.tileID.overscaledZ||(e.tileID.isLessThan(t.tileID)?-1:1))}const r=this.crossTileSymbolIndex.addLayer(n,l[n.source],t.center.lng);a=a||r}if(this.crossTileSymbolIndex.pruneUnusedLayers(this._order),((o=o||this._layerOrderChanged||0===r)||!this.pauseablePlacement||this.pauseablePlacement.isDone()&&!this.placement.stillRecent(e.h.now(),t.zoom))&&(this.pauseablePlacement=new We(t,this.map.terrain,this._order,o,n,r,i,this.placement),this._layerOrderChanged=!1),this.pauseablePlacement.isDone()?this.placement.setStale():(this.pauseablePlacement.continuePlacement(this._order,this._layers,l),this.pauseablePlacement.isDone()&&(this.placement=this.pauseablePlacement.commit(e.h.now()),s=!0),a&&this.pauseablePlacement.placement.setStale()),s||a)for(const e of this._order){const t=this._layers[e];"symbol"===t.type&&this.placement.updateLayerOpacities(t,l[t.source])}return!this.pauseablePlacement.isDone()||this.placement.hasTransitions(e.h.now())}_releaseSymbolFadeTiles(){for(const e in this.sourceCaches)this.sourceCaches[e].releaseSymbolFadeTiles()}getImages(e,t,n){this.imageManager.getImages(t.icons,n),this._updateTilesForChangedImages();const r=this.sourceCaches[t.source];r&&r.setDependencies(t.tileID.key,t.type,t.icons)}getGlyphs(e,t,n){this.glyphManager.getGlyphs(t.stacks,n);const r=this.sourceCaches[t.source];r&&r.setDependencies(t.tileID.key,t.type,[""])}getResource(t,n,r){return e.m(n,r)}getGlyphsUrl(){return this.stylesheet.glyphs||null}setGlyphs(t,n={}){this._checkLoaded(),t&&this._validate(e.y.glyphs,"glyphs",t,null,n)||(this._glyphsDidChange=!0,this.stylesheet.glyphs=t,this.glyphManager.entries={},this.glyphManager.setURL(t))}addSprite(t,n,r={},i){this._checkLoaded();const o=[{id:t,url:n}],a=[...g(this.stylesheet.sprite),...o];this._validate(e.y.sprite,"sprite",a,null,r)||(this.stylesheet.sprite=a,this._loadSprite(o,!0,i))}removeSprite(t){this._checkLoaded();const n=g(this.stylesheet.sprite);if(n.find(e=>e.id===t)){if(this._spritesImagesIds[t])for(const e of this._spritesImagesIds[t])this.imageManager.removeImage(e),this._changedImages[e]=!0;n.splice(n.findIndex(e=>e.id===t),1),this.stylesheet.sprite=n.length>0?n:void 0,delete this._spritesImagesIds[t],this._availableImages=this.imageManager.listImages(),this._changed=!0,this.dispatcher.broadcast("setImages",this._availableImages),this.fire(new e.k("data",{dataType:"style"}))}else this.fire(new e.j(new Error(`Sprite "${t}" doesn't exists on this map.`)))}getSprite(){return g(this.stylesheet.sprite)}setSprite(t,n={},r){this._checkLoaded(),t&&this._validate(e.y.sprite,"sprite",t,null,n)||(this.stylesheet.sprite=t,t?this._loadSprite(t,!0,r):(this._unloadSprite(),r&&r(null)))}}nt.registerForPluginStateChange=e.aK;var rt=e.Q([{name:"a_pos",type:"Int16",components:2}]),it="attribute vec3 a_pos3d;uniform mat4 u_matrix;uniform float u_ele_delta;varying vec2 v_texture_pos;varying float v_depth;void main() {float extent=8192.0;float ele_delta=a_pos3d.z==1.0 ? u_ele_delta : 0.0;v_texture_pos=a_pos3d.xy/extent;gl_Position=u_matrix*vec4(a_pos3d.xy,get_elevation(a_pos3d.xy)-ele_delta,1.0);v_depth=gl_Position.z/gl_Position.w;}";const ot={prelude:at("#ifdef GL_ES\nprecision mediump float;\n#else\n#if !defined(lowp)\n#define lowp\n#endif\n#if !defined(mediump)\n#define mediump\n#endif\n#if !defined(highp)\n#define highp\n#endif\n#endif\n","#ifdef GL_ES\nprecision highp float;\n#else\n#if !defined(lowp)\n#define lowp\n#endif\n#if !defined(mediump)\n#define mediump\n#endif\n#if !defined(highp)\n#define highp\n#endif\n#endif\nvec2 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\n);}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;}\n#ifdef TERRAIN3D\nuniform sampler2D u_terrain;uniform float u_terrain_dim;uniform mat4 u_terrain_matrix;uniform vec4 u_terrain_unpack;uniform float u_terrain_exaggeration;uniform highp sampler2D u_depth;\n#endif\nconst highp vec4 bitSh=vec4(256.*256.*256.,256.*256.,256.,1.);const highp vec4 bitShifts=vec4(1.)/bitSh;highp float unpack(highp vec4 color) {return dot(color,bitShifts);}highp float depthOpacity(vec3 frag) {\n#ifdef TERRAIN3D\nhighp float d=unpack(texture2D(u_depth,frag.xy*0.5+0.5))+0.0001-frag.z;return 1.0-max(0.0,min(1.0,-d*500.0));\n#else\nreturn 1.0;\n#endif\n}float calculate_visibility(vec4 pos) {\n#ifdef TERRAIN3D\nvec3 frag=pos.xyz/pos.w;highp float d=depthOpacity(frag);if (d > 0.95) return 1.0;return (d+depthOpacity(frag+vec3(0.0,0.01,0.0)))/2.0;\n#else\nreturn 1.0;\n#endif\n}float ele(vec2 pos) {\n#ifdef TERRAIN3D\nvec4 rgb=(texture2D(u_terrain,pos)*255.0)*u_terrain_unpack;return rgb.r+rgb.g+rgb.b-u_terrain_unpack.a;\n#else\nreturn 0.0;\n#endif\n}float get_elevation(vec2 pos) {\n#ifdef TERRAIN3D\nvec2 coord=(u_terrain_matrix*vec4(pos,0.0,1.0)).xy*u_terrain_dim+1.0;vec2 f=fract(coord);vec2 c=(floor(coord)+0.5)/(u_terrain_dim+2.0);float d=1.0/(u_terrain_dim+2.0);float tl=ele(c);float tr=ele(c+vec2(d,0.0));float bl=ele(c+vec2(0.0,d));float br=ele(c+vec2(d,d));float elevation=mix(mix(tl,tr,f.x),mix(bl,br,f.x),f.y);return elevation*u_terrain_exaggeration;\n#else\nreturn 0.0;\n#endif\n}"),background:at("uniform vec4 u_color;uniform float u_opacity;void main() {gl_FragColor=u_color*u_opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","attribute vec2 a_pos;uniform mat4 u_matrix;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);}"),backgroundPattern:at("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;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","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);}"),circle:at("varying vec3 v_data;varying float v_visibility;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define mediump float radius\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define highp vec4 stroke_color\n#pragma mapbox: define mediump float stroke_width\n#pragma mapbox: define lowp float stroke_opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize mediump float radius\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize highp vec4 stroke_color\n#pragma mapbox: initialize mediump float stroke_width\n#pragma mapbox: initialize lowp float stroke_opacity\nvec2 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=v_visibility*opacity_t*mix(color*opacity,stroke_color*stroke_opacity,color_t);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","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;varying float v_visibility;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define mediump float radius\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define highp vec4 stroke_color\n#pragma mapbox: define mediump float stroke_width\n#pragma mapbox: define lowp float stroke_opacity\nvoid main(void) {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize mediump float radius\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize highp vec4 stroke_color\n#pragma mapbox: initialize mediump float stroke_width\n#pragma mapbox: initialize lowp float stroke_opacity\nvec2 extrude=vec2(mod(a_pos,2.0)*2.0-1.0);vec2 circle_center=floor(a_pos*0.5);float ele=get_elevation(circle_center);v_visibility=calculate_visibility(u_matrix*vec4(circle_center,ele,1.0));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,ele,1);} else {gl_Position=u_matrix*vec4(circle_center,ele,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);}"),clippingMask:at("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);}"),heatmap:at("uniform highp float u_intensity;varying vec2 v_extrude;\n#pragma mapbox: define highp float weight\n#define GAUSS_COEF 0.3989422804014327\nvoid main() {\n#pragma mapbox: initialize highp float weight\nfloat 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);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","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;\n#pragma mapbox: define highp float weight\n#pragma mapbox: define mediump float radius\nconst highp float ZERO=1.0/255.0/16.0;\n#define GAUSS_COEF 0.3989422804014327\nvoid main(void) {\n#pragma mapbox: initialize highp float weight\n#pragma mapbox: initialize mediump float radius\nvec2 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;}"),heatmapTexture:at("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;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(0.0);\n#endif\n}","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;}"),collisionBox:at("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,get_elevation(a_pos),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;}"),collisionCircle:at("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);}"),debug:at("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,get_elevation(a_pos),1);}"),fill:at("#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float opacity\ngl_FragColor=color*opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","attribute vec2 a_pos;uniform mat4 u_matrix;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float opacity\ngl_Position=u_matrix*vec4(a_pos,0,1);}"),fillOutline:at("varying vec2 v_pos;\n#pragma mapbox: define highp vec4 outline_color\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 outline_color\n#pragma mapbox: initialize lowp float opacity\nfloat dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);gl_FragColor=outline_color*(alpha*opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","attribute vec2 a_pos;uniform mat4 u_matrix;uniform vec2 u_world;varying vec2 v_pos;\n#pragma mapbox: define highp vec4 outline_color\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 outline_color\n#pragma mapbox: initialize lowp float opacity\ngl_Position=u_matrix*vec4(a_pos,0,1);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;}"),fillOutlinePattern:at("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;\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\nvec2 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;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","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;\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixel_ratio_to\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\n#pragma mapbox: initialize lowp float pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_to\nvec2 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;}"),fillPattern:at("#ifdef GL_ES\nprecision highp float;\n#endif\nuniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\nvec2 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;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","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;\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixel_ratio_to\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\n#pragma mapbox: initialize lowp float pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_to\nvec2 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);}"),fillExtrusion:at("varying vec4 v_color;void main() {gl_FragColor=v_color;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","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;\n#ifdef TERRAIN3D\nattribute vec2 a_centroid;\n#endif\nvarying vec4 v_color;\n#pragma mapbox: define highp float base\n#pragma mapbox: define highp float height\n#pragma mapbox: define highp vec4 color\nvoid main() {\n#pragma mapbox: initialize highp float base\n#pragma mapbox: initialize highp float height\n#pragma mapbox: initialize highp vec4 color\nvec3 normal=a_normal_ed.xyz;\n#ifdef TERRAIN3D\nfloat height_terrain3d_offset=get_elevation(a_centroid);float base_terrain3d_offset=height_terrain3d_offset-(base > 0.0 ? 0.0 : 10.0);\n#else\nfloat height_terrain3d_offset=0.0;float base_terrain3d_offset=0.0;\n#endif\nbase=max(0.0,base)+base_terrain3d_offset;height=max(0.0,height)+height_terrain3d_offset;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;}"),fillExtrusionPattern:at("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;\n#pragma mapbox: define lowp float base\n#pragma mapbox: define lowp float height\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixel_ratio_to\nvoid main() {\n#pragma mapbox: initialize lowp float base\n#pragma mapbox: initialize lowp float height\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\n#pragma mapbox: initialize lowp float pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_to\nvec2 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;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","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;\n#ifdef TERRAIN3D\nattribute vec2 a_centroid;\n#endif\nvarying vec2 v_pos_a;varying vec2 v_pos_b;varying vec4 v_lighting;\n#pragma mapbox: define lowp float base\n#pragma mapbox: define lowp float height\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixel_ratio_to\nvoid main() {\n#pragma mapbox: initialize lowp float base\n#pragma mapbox: initialize lowp float height\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\n#pragma mapbox: initialize lowp float pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_to\nvec2 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;\n#ifdef TERRAIN3D\nfloat height_terrain3d_offset=get_elevation(a_centroid);float base_terrain3d_offset=height_terrain3d_offset-(base > 0.0 ? 0.0 : 10.0);\n#else\nfloat height_terrain3d_offset=0.0;float base_terrain3d_offset=0.0;\n#endif\nbase=max(0.0,base)+base_terrain3d_offset;height=max(0.0,height)+height_terrain3d_offset;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\n? a_pos\n: 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;}"),hillshadePrepare:at("#ifdef GL_ES\nprecision highp float;\n#endif\nuniform 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);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","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;}"),hillshade:at("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;\n#define PI 3.141592653589793\nvoid 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;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","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;}"),line:at("uniform lowp float u_device_pixel_ratio;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\nfloat 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);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","\n#define scale 0.015873016\nattribute 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;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float gapwidth\n#pragma mapbox: define lowp float offset\n#pragma mapbox: define mediump float width\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump float gapwidth\n#pragma mapbox: initialize lowp float offset\n#pragma mapbox: initialize mediump float width\nfloat 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;\n#ifdef TERRAIN3D\nv_gamma_scale=1.0;\n#else\nfloat 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;\n#endif\nv_width2=vec2(outset,inset);}"),lineGradient:at("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;\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\nfloat 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);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","\n#define scale 0.015873016\nattribute 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;\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float gapwidth\n#pragma mapbox: define lowp float offset\n#pragma mapbox: define mediump float width\nvoid main() {\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump float gapwidth\n#pragma mapbox: initialize lowp float offset\n#pragma mapbox: initialize mediump float width\nfloat 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;\n#ifdef TERRAIN3D\nv_gamma_scale=1.0;\n#else\nfloat 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;\n#endif\nv_width2=vec2(outset,inset);}"),linePattern:at("#ifdef GL_ES\nprecision highp float;\n#endif\nuniform 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;\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixel_ratio_to\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\n#pragma mapbox: initialize lowp float pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_to\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\nvec2 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;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","\n#define scale 0.015873016\n#define LINE_DISTANCE_SCALE 2.0\nattribute 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;\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float offset\n#pragma mapbox: define mediump float gapwidth\n#pragma mapbox: define mediump float width\n#pragma mapbox: define lowp float floorwidth\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixel_ratio_to\nvoid main() {\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize lowp float offset\n#pragma mapbox: initialize mediump float gapwidth\n#pragma mapbox: initialize mediump float width\n#pragma mapbox: initialize lowp float floorwidth\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\n#pragma mapbox: initialize lowp float pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_to\nfloat 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;\n#ifdef TERRAIN3D\nv_gamma_scale=1.0;\n#else\nfloat 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;\n#endif\nv_linesofar=a_linesofar;v_width2=vec2(outset,inset);v_width=floorwidth;}"),lineSDF:at("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;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float width\n#pragma mapbox: define lowp float floorwidth\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump float width\n#pragma mapbox: initialize lowp float floorwidth\nfloat 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);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","\n#define scale 0.015873016\n#define LINE_DISTANCE_SCALE 2.0\nattribute 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;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float gapwidth\n#pragma mapbox: define lowp float offset\n#pragma mapbox: define mediump float width\n#pragma mapbox: define lowp float floorwidth\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump float gapwidth\n#pragma mapbox: initialize lowp float offset\n#pragma mapbox: initialize mediump float width\n#pragma mapbox: initialize lowp float floorwidth\nfloat 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;\n#ifdef TERRAIN3D\nv_gamma_scale=1.0;\n#else\nfloat 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;\n#endif\nv_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);}"),raster:at("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);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","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;}"),symbolIcon:at("uniform sampler2D u_texture;varying vec2 v_tex;varying float v_fade_opacity;\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\nlowp float alpha=opacity*v_fade_opacity;gl_FragColor=texture2D(u_texture,v_tex)*alpha;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","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;\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\nvec2 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;float ele=get_elevation(a_pos);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,ele,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?\ncamera_to_anchor_distance/u_camera_to_center_distance :\nu_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),ele,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,ele,1.0);float z=float(u_pitch_with_map)*projected_pos.z/projected_pos.w;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),z,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;float visibility=calculate_visibility(projectedPoint);v_fade_opacity=max(0.0,min(visibility,fade_opacity[0]+fade_change));}"),symbolSDF:at("#define SDF_PX 8.0\nuniform 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;\n#pragma mapbox: define highp vec4 fill_color\n#pragma mapbox: define highp vec4 halo_color\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float halo_width\n#pragma mapbox: define lowp float halo_blur\nvoid main() {\n#pragma mapbox: initialize highp vec4 fill_color\n#pragma mapbox: initialize highp vec4 halo_color\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize lowp float halo_width\n#pragma mapbox: initialize lowp float halo_blur\nfloat 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 inner_edge=(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);inner_edge=inner_edge+gamma*gamma_scale;}lowp float dist=texture2D(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(inner_edge-gamma_scaled,inner_edge+gamma_scaled,dist);if (u_is_halo) {lowp float halo_edge=(6.0-halo_width/fontScale)/SDF_PX;alpha=min(smoothstep(halo_edge-gamma_scaled,halo_edge+gamma_scaled,dist),1.0-alpha);}gl_FragColor=color*(alpha*opacity*fade_opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","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;\n#pragma mapbox: define highp vec4 fill_color\n#pragma mapbox: define highp vec4 halo_color\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float halo_width\n#pragma mapbox: define lowp float halo_blur\nvoid main() {\n#pragma mapbox: initialize highp vec4 fill_color\n#pragma mapbox: initialize highp vec4 halo_color\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize lowp float halo_width\n#pragma mapbox: initialize lowp float halo_blur\nvec2 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;float ele=get_elevation(a_pos);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,ele,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?\ncamera_to_anchor_distance/u_camera_to_center_distance :\nu_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),ele,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,ele,1.0);float z=float(u_pitch_with_map)*projected_pos.z/projected_pos.w;gl_Position=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale+a_pxoffset),z,1.0);float gamma_scale=gl_Position.w;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float visibility=calculate_visibility(projectedPoint);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(visibility,fade_opacity[0]+fade_change));v_data0=a_tex/u_texsize;v_data1=vec3(gamma_scale,size,interpolated_fade_opacity);}"),symbolTextAndIcon:at("#define SDF_PX 8.0\n#define SDF 1.0\n#define ICON 0.0\nuniform 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;\n#pragma mapbox: define highp vec4 fill_color\n#pragma mapbox: define highp vec4 halo_color\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float halo_width\n#pragma mapbox: define lowp float halo_blur\nvoid main() {\n#pragma mapbox: initialize highp vec4 fill_color\n#pragma mapbox: initialize highp vec4 halo_color\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize lowp float halo_width\n#pragma mapbox: initialize lowp float halo_blur\nfloat 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;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\nreturn;}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);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","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;\n#pragma mapbox: define highp vec4 fill_color\n#pragma mapbox: define highp vec4 halo_color\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float halo_width\n#pragma mapbox: define lowp float halo_blur\nvoid main() {\n#pragma mapbox: initialize highp vec4 fill_color\n#pragma mapbox: initialize highp vec4 halo_color\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize lowp float halo_width\n#pragma mapbox: initialize lowp float halo_blur\nvec2 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;float ele=get_elevation(a_pos);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,ele,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?\ncamera_to_anchor_distance/u_camera_to_center_distance :\nu_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),ele,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,ele,1.0);float z=float(u_pitch_with_map)*projected_pos.z/projected_pos.w;gl_Position=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale),z,1.0);float gamma_scale=gl_Position.w;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float visibility=calculate_visibility(projectedPoint);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(visibility,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);}"),terrain:at("uniform sampler2D u_texture;varying vec2 v_texture_pos;void main() {gl_FragColor=texture2D(u_texture,v_texture_pos);}",it),terrainDepth:at("varying float v_depth;const highp vec4 bitSh=vec4(256.*256.*256.,256.*256.,256.,1.);const highp vec4 bitMsk=vec4(0.,vec3(1./256.0));highp vec4 pack(highp float value) {highp vec4 comp=fract(value*bitSh);comp-=comp.xxyz*bitMsk;return comp;}void main() {gl_FragColor=pack(v_depth);}",it),terrainCoords:at("precision mediump float;uniform sampler2D u_texture;uniform float u_terrain_coords_id;varying vec2 v_texture_pos;void main() {vec4 rgba=texture2D(u_texture,v_texture_pos);gl_FragColor=vec4(rgba.r,rgba.g,rgba.b,u_terrain_coords_id);}",it)};function at(e,t){const n=/#pragma mapbox: ([\w]+) ([\w]+) ([\w]+) ([\w]+)/g,r=t.match(/attribute ([\w]+) ([\w]+)/g),i=e.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),o=t.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),a=o?o.concat(i):i,s={};return{fragmentSource:e=e.replace(n,(e,t,n,r,i)=>(s[i]=!0,"define"===t?`\n#ifndef HAS_UNIFORM_u_${i}\nvarying ${n} ${r} ${i};\n#else\nuniform ${n} ${r} u_${i};\n#endif\n`:`\n#ifdef HAS_UNIFORM_u_${i}\n ${n} ${r} ${i} = u_${i};\n#endif\n`)),vertexSource:t=t.replace(n,(e,t,n,r,i)=>{const o="float"===r?"vec2":"vec4",a=i.match(/color/)?"color":o;return s[i]?"define"===t?`\n#ifndef HAS_UNIFORM_u_${i}\nuniform lowp float u_${i}_t;\nattribute ${n} ${o} a_${i};\nvarying ${n} ${r} ${i};\n#else\nuniform ${n} ${r} u_${i};\n#endif\n`:"vec4"===a?`\n#ifndef HAS_UNIFORM_u_${i}\n ${i} = a_${i};\n#else\n ${n} ${r} ${i} = u_${i};\n#endif\n`:`\n#ifndef HAS_UNIFORM_u_${i}\n ${i} = unpack_mix_${a}(a_${i}, u_${i}_t);\n#else\n ${n} ${r} ${i} = u_${i};\n#endif\n`:"define"===t?`\n#ifndef HAS_UNIFORM_u_${i}\nuniform lowp float u_${i}_t;\nattribute ${n} ${o} a_${i};\n#else\nuniform ${n} ${r} u_${i};\n#endif\n`:"vec4"===a?`\n#ifndef HAS_UNIFORM_u_${i}\n ${n} ${r} ${i} = a_${i};\n#else\n ${n} ${r} ${i} = u_${i};\n#endif\n`:`\n#ifndef HAS_UNIFORM_u_${i}\n ${n} ${r} ${i} = unpack_mix_${a}(a_${i}, u_${i}_t);\n#else\n ${n} ${r} ${i} = u_${i};\n#endif\n`}),staticAttributes:r,staticUniforms:a}}class st{constructor(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null}bind(e,t,n,r,i,o,a,s,l){this.context=e;let u=this.boundPaintVertexBuffers.length!==r.length;for(let e=0;!u&&e({u_depth:new e.aL(t,n.u_depth),u_terrain:new e.aL(t,n.u_terrain),u_terrain_dim:new e.aM(t,n.u_terrain_dim),u_terrain_matrix:new e.aN(t,n.u_terrain_matrix),u_terrain_unpack:new e.aO(t,n.u_terrain_unpack),u_terrain_exaggeration:new e.aM(t,n.u_terrain_exaggeration)}))(t,_),this.binderUniforms=r?r.getUniforms(t,_):[]}draw(e,t,n,r,i,o,a,s,l,u,c,d,f,h,p,A,g,m){const y=e.gl;if(this.failedToCreate)return;if(e.program.set(this.program),e.setDepthMode(n),e.setStencilMode(r),e.setColorMode(i),e.setCullFace(o),s){e.activeTexture.set(y.TEXTURE2),y.bindTexture(y.TEXTURE_2D,s.depthTexture),e.activeTexture.set(y.TEXTURE3),y.bindTexture(y.TEXTURE_2D,s.texture);for(const e in this.terrainUniforms)this.terrainUniforms[e].set(s[e])}for(const e in this.fixedUniforms)this.fixedUniforms[e].set(a[e]);p&&p.setUniforms(e,this.binderUniforms,f,{zoom:h});let v=0;switch(t){case y.LINES:v=2;break;case y.TRIANGLES:v=3;break;case y.LINE_STRIP:v=1}for(const n of d.get()){const r=n.vaos||(n.vaos={});(r[l]||(r[l]=new st)).bind(e,this,u,p?p.getPaintVertexBuffers():[],c,n.vertexOffset,A,g,m),y.drawElements(t,n.primitiveLength*v,y.UNSIGNED_SHORT,n.primitiveOffset*v*2)}}}function ct(e,t,n){const r=1/Ee(n,1,t.transform.tileZoom),i=Math.pow(2,n.tileID.overscaledZ),o=n.tileSize*Math.pow(2,t.transform.tileZoom)/i,a=o*(n.tileID.canonical.x+n.tileID.wrap*i),s=o*n.tileID.canonical.y;return{u_image:0,u_texsize:n.imageAtlasTexture.size,u_scale:[r,e.fromScale,e.toScale],u_fade:e.t,u_pixel_coord_upper:[a>>16,s>>16],u_pixel_coord_lower:[65535&a,65535&s]}}const dt=(t,n,r,i)=>{const o=n.style.light,a=o.properties.get("position"),s=[a.x,a.y,a.z],l=function(){var t=new e.A(9);return e.A!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[5]=0,t[6]=0,t[7]=0),t[0]=1,t[4]=1,t[8]=1,t}();"viewport"===o.properties.get("anchor")&&function(e,t){var n=Math.sin(t),r=Math.cos(t);e[0]=r,e[1]=n,e[2]=0,e[3]=-n,e[4]=r,e[5]=0,e[6]=0,e[7]=0,e[8]=1}(l,-n.transform.angle),function(e,t,n){var r=t[0],i=t[1],o=t[2];e[0]=r*n[0]+i*n[3]+o*n[6],e[1]=r*n[1]+i*n[4]+o*n[7],e[2]=r*n[2]+i*n[5]+o*n[8]}(s,s,l);const u=o.properties.get("color");return{u_matrix:t,u_lightpos:s,u_lightintensity:o.properties.get("intensity"),u_lightcolor:[u.r,u.g,u.b],u_vertical_gradient:+r,u_opacity:i}},ft=(t,n,r,i,o,a,s)=>e.e(dt(t,n,r,i),ct(a,n,s),{u_height_factor:-Math.pow(2,o.overscaledZ)/s.tileSize/8}),ht=e=>({u_matrix:e}),pt=(t,n,r,i)=>e.e(ht(t),ct(r,n,i)),At=(e,t)=>({u_matrix:e,u_world:t}),gt=(t,n,r,i,o)=>e.e(pt(t,n,r,i),{u_world:o}),mt=(e,t,n,r)=>{const i=e.transform;let o,a;if("map"===r.paint.get("circle-pitch-alignment")){const e=Ee(n,1,i.zoom);o=!0,a=[e,e]}else o=!1,a=i.pixelsToGLUnits;return{u_camera_to_center_distance:i.cameraToCenterDistance,u_scale_with_map:+("map"===r.paint.get("circle-pitch-scale")),u_matrix:e.translatePosMatrix(t.posMatrix,n,r.paint.get("circle-translate"),r.paint.get("circle-translate-anchor")),u_pitch_with_map:+o,u_device_pixel_ratio:e.pixelRatio,u_extrude_scale:a}},yt=(e,t,n)=>{const r=Ee(n,1,t.zoom),i=Math.pow(2,t.zoom-n.tileID.overscaledZ),o=n.tileID.overscaleFactor();return{u_matrix:e,u_camera_to_center_distance:t.cameraToCenterDistance,u_pixels_to_tile_units:r,u_extrude_scale:[t.pixelsToGLUnits[0]/(r*i),t.pixelsToGLUnits[1]/(r*i)],u_overscale_factor:o}},vt=(e,t,n=1)=>({u_matrix:e,u_color:t,u_overlay:0,u_overlay_scale:n}),bt=e=>({u_matrix:e}),_t=(e,t,n,r)=>({u_matrix:e,u_extrude_scale:Ee(t,1,n),u_intensity:r});function wt(t,n){const r=Math.pow(2,n.canonical.z),i=n.canonical.y;return[new e.U(0,i/r).toLngLat().lat,new e.U(0,(i+1)/r).toLngLat().lat]}const xt=(e,t,n,r)=>{const i=e.transform;return{u_matrix:Tt(e,t,n,r),u_ratio:1/Ee(t,1,i.zoom),u_device_pixel_ratio:e.pixelRatio,u_units_to_pixels:[1/i.pixelsToGLUnits[0],1/i.pixelsToGLUnits[1]]}},Mt=(t,n,r,i,o)=>e.e(xt(t,n,r,o),{u_image:0,u_image_height:i}),Et=(e,t,n,r,i)=>{const o=e.transform,a=St(t,o);return{u_matrix:Tt(e,t,n,i),u_texsize:t.imageAtlasTexture.size,u_ratio:1/Ee(t,1,o.zoom),u_device_pixel_ratio:e.pixelRatio,u_image:0,u_scale:[a,r.fromScale,r.toScale],u_fade:r.t,u_units_to_pixels:[1/o.pixelsToGLUnits[0],1/o.pixelsToGLUnits[1]]}},Ot=(t,n,r,i,o,a)=>{const s=t.lineAtlas,l=St(n,t.transform),u="round"===r.layout.get("line-cap"),c=s.getDash(i.from,u),d=s.getDash(i.to,u),f=c.width*o.fromScale,h=d.width*o.toScale;return e.e(xt(t,n,r,a),{u_patternscale_a:[l/f,-c.height/2],u_patternscale_b:[l/h,-d.height/2],u_sdfgamma:s.width/(256*Math.min(f,h)*t.pixelRatio)/2,u_image:0,u_tex_y_a:c.y,u_tex_y_b:d.y,u_mix:o.t})};function St(e,t){return 1/Ee(e,1,t.tileZoom)}function Tt(e,t,n,r){return e.translatePosMatrix(r?r.posMatrix:t.tileID.posMatrix,t,n.paint.get("line-translate"),n.paint.get("line-translate-anchor"))}const Ct=(e,t,n,r,i)=>{return{u_matrix:e,u_tl_parent:t,u_scale_parent:n,u_buffer_scale:1,u_fade_t:r.mix,u_opacity:r.opacity*i.paint.get("raster-opacity"),u_image0:0,u_image1:1,u_brightness_low:i.paint.get("raster-brightness-min"),u_brightness_high:i.paint.get("raster-brightness-max"),u_saturation_factor:(a=i.paint.get("raster-saturation"),a>0?1-1/(1.001-a):-a),u_contrast_factor:(o=i.paint.get("raster-contrast"),o>0?1/(1-o):1+o),u_spin_weights:Lt(i.paint.get("raster-hue-rotate"))};var o,a};function Lt(e){e*=Math.PI/180;const t=Math.sin(e),n=Math.cos(e);return[(2*n+1)/3,(-Math.sqrt(3)*t-n+1)/3,(Math.sqrt(3)*t-n+1)/3]}const Pt=(e,t,n,r,i,o,a,s,l,u)=>{const c=i.transform;return{u_is_size_zoom_constant:+("constant"===e||"source"===e),u_is_size_feature_constant:+("constant"===e||"camera"===e),u_size_t:t?t.uSizeT:0,u_size:t?t.uSize:0,u_camera_to_center_distance:c.cameraToCenterDistance,u_pitch:c.pitch/360*2*Math.PI,u_rotate_symbol:+n,u_aspect_ratio:c.width/c.height,u_fade_change:i.options.fadeDuration?i.symbolFadeChange:1,u_matrix:o,u_label_plane_matrix:a,u_coord_matrix:s,u_is_text:+l,u_pitch_with_map:+r,u_texsize:u,u_texture:0}},It=(t,n,r,i,o,a,s,l,u,c,d)=>{const f=o.transform;return e.e(Pt(t,n,r,i,o,a,s,l,u,c),{u_gamma_scale:i?Math.cos(f._pitch)*f.cameraToCenterDistance:1,u_device_pixel_ratio:o.pixelRatio,u_is_halo:+d})},Dt=(t,n,r,i,o,a,s,l,u,c)=>e.e(It(t,n,r,i,o,a,s,l,!0,u,!0),{u_texsize_icon:c,u_texture_icon:1}),kt=(e,t,n)=>({u_matrix:e,u_opacity:t,u_color:n}),Rt=(t,n,r,i,o,a)=>e.e(function(e,t,n,r){const i=n.imageManager.getPattern(e.from.toString()),o=n.imageManager.getPattern(e.to.toString()),{width:a,height:s}=n.imageManager.getPixelSize(),l=Math.pow(2,r.tileID.overscaledZ),u=r.tileSize*Math.pow(2,n.transform.tileZoom)/l,c=u*(r.tileID.canonical.x+r.tileID.wrap*l),d=u*r.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:i.tl,u_pattern_br_a:i.br,u_pattern_tl_b:o.tl,u_pattern_br_b:o.br,u_texsize:[a,s],u_mix:t.t,u_pattern_size_a:i.displaySize,u_pattern_size_b:o.displaySize,u_scale_a:t.fromScale,u_scale_b:t.toScale,u_tile_units_to_pixels:1/Ee(r,1,n.transform.tileZoom),u_pixel_coord_upper:[c>>16,d>>16],u_pixel_coord_lower:[65535&c,65535&d]}}(i,a,r,o),{u_matrix:t,u_opacity:n}),jt={fillExtrusion:(t,n)=>({u_matrix:new e.aN(t,n.u_matrix),u_lightpos:new e.aP(t,n.u_lightpos),u_lightintensity:new e.aM(t,n.u_lightintensity),u_lightcolor:new e.aP(t,n.u_lightcolor),u_vertical_gradient:new e.aM(t,n.u_vertical_gradient),u_opacity:new e.aM(t,n.u_opacity)}),fillExtrusionPattern:(t,n)=>({u_matrix:new e.aN(t,n.u_matrix),u_lightpos:new e.aP(t,n.u_lightpos),u_lightintensity:new e.aM(t,n.u_lightintensity),u_lightcolor:new e.aP(t,n.u_lightcolor),u_vertical_gradient:new e.aM(t,n.u_vertical_gradient),u_height_factor:new e.aM(t,n.u_height_factor),u_image:new e.aL(t,n.u_image),u_texsize:new e.aQ(t,n.u_texsize),u_pixel_coord_upper:new e.aQ(t,n.u_pixel_coord_upper),u_pixel_coord_lower:new e.aQ(t,n.u_pixel_coord_lower),u_scale:new e.aP(t,n.u_scale),u_fade:new e.aM(t,n.u_fade),u_opacity:new e.aM(t,n.u_opacity)}),fill:(t,n)=>({u_matrix:new e.aN(t,n.u_matrix)}),fillPattern:(t,n)=>({u_matrix:new e.aN(t,n.u_matrix),u_image:new e.aL(t,n.u_image),u_texsize:new e.aQ(t,n.u_texsize),u_pixel_coord_upper:new e.aQ(t,n.u_pixel_coord_upper),u_pixel_coord_lower:new e.aQ(t,n.u_pixel_coord_lower),u_scale:new e.aP(t,n.u_scale),u_fade:new e.aM(t,n.u_fade)}),fillOutline:(t,n)=>({u_matrix:new e.aN(t,n.u_matrix),u_world:new e.aQ(t,n.u_world)}),fillOutlinePattern:(t,n)=>({u_matrix:new e.aN(t,n.u_matrix),u_world:new e.aQ(t,n.u_world),u_image:new e.aL(t,n.u_image),u_texsize:new e.aQ(t,n.u_texsize),u_pixel_coord_upper:new e.aQ(t,n.u_pixel_coord_upper),u_pixel_coord_lower:new e.aQ(t,n.u_pixel_coord_lower),u_scale:new e.aP(t,n.u_scale),u_fade:new e.aM(t,n.u_fade)}),circle:(t,n)=>({u_camera_to_center_distance:new e.aM(t,n.u_camera_to_center_distance),u_scale_with_map:new e.aL(t,n.u_scale_with_map),u_pitch_with_map:new e.aL(t,n.u_pitch_with_map),u_extrude_scale:new e.aQ(t,n.u_extrude_scale),u_device_pixel_ratio:new e.aM(t,n.u_device_pixel_ratio),u_matrix:new e.aN(t,n.u_matrix)}),collisionBox:(t,n)=>({u_matrix:new e.aN(t,n.u_matrix),u_camera_to_center_distance:new e.aM(t,n.u_camera_to_center_distance),u_pixels_to_tile_units:new e.aM(t,n.u_pixels_to_tile_units),u_extrude_scale:new e.aQ(t,n.u_extrude_scale),u_overscale_factor:new e.aM(t,n.u_overscale_factor)}),collisionCircle:(t,n)=>({u_matrix:new e.aN(t,n.u_matrix),u_inv_matrix:new e.aN(t,n.u_inv_matrix),u_camera_to_center_distance:new e.aM(t,n.u_camera_to_center_distance),u_viewport_size:new e.aQ(t,n.u_viewport_size)}),debug:(t,n)=>({u_color:new e.aR(t,n.u_color),u_matrix:new e.aN(t,n.u_matrix),u_overlay:new e.aL(t,n.u_overlay),u_overlay_scale:new e.aM(t,n.u_overlay_scale)}),clippingMask:(t,n)=>({u_matrix:new e.aN(t,n.u_matrix)}),heatmap:(t,n)=>({u_extrude_scale:new e.aM(t,n.u_extrude_scale),u_intensity:new e.aM(t,n.u_intensity),u_matrix:new e.aN(t,n.u_matrix)}),heatmapTexture:(t,n)=>({u_matrix:new e.aN(t,n.u_matrix),u_world:new e.aQ(t,n.u_world),u_image:new e.aL(t,n.u_image),u_color_ramp:new e.aL(t,n.u_color_ramp),u_opacity:new e.aM(t,n.u_opacity)}),hillshade:(t,n)=>({u_matrix:new e.aN(t,n.u_matrix),u_image:new e.aL(t,n.u_image),u_latrange:new e.aQ(t,n.u_latrange),u_light:new e.aQ(t,n.u_light),u_shadow:new e.aR(t,n.u_shadow),u_highlight:new e.aR(t,n.u_highlight),u_accent:new e.aR(t,n.u_accent)}),hillshadePrepare:(t,n)=>({u_matrix:new e.aN(t,n.u_matrix),u_image:new e.aL(t,n.u_image),u_dimension:new e.aQ(t,n.u_dimension),u_zoom:new e.aM(t,n.u_zoom),u_unpack:new e.aO(t,n.u_unpack)}),line:(t,n)=>({u_matrix:new e.aN(t,n.u_matrix),u_ratio:new e.aM(t,n.u_ratio),u_device_pixel_ratio:new e.aM(t,n.u_device_pixel_ratio),u_units_to_pixels:new e.aQ(t,n.u_units_to_pixels)}),lineGradient:(t,n)=>({u_matrix:new e.aN(t,n.u_matrix),u_ratio:new e.aM(t,n.u_ratio),u_device_pixel_ratio:new e.aM(t,n.u_device_pixel_ratio),u_units_to_pixels:new e.aQ(t,n.u_units_to_pixels),u_image:new e.aL(t,n.u_image),u_image_height:new e.aM(t,n.u_image_height)}),linePattern:(t,n)=>({u_matrix:new e.aN(t,n.u_matrix),u_texsize:new e.aQ(t,n.u_texsize),u_ratio:new e.aM(t,n.u_ratio),u_device_pixel_ratio:new e.aM(t,n.u_device_pixel_ratio),u_image:new e.aL(t,n.u_image),u_units_to_pixels:new e.aQ(t,n.u_units_to_pixels),u_scale:new e.aP(t,n.u_scale),u_fade:new e.aM(t,n.u_fade)}),lineSDF:(t,n)=>({u_matrix:new e.aN(t,n.u_matrix),u_ratio:new e.aM(t,n.u_ratio),u_device_pixel_ratio:new e.aM(t,n.u_device_pixel_ratio),u_units_to_pixels:new e.aQ(t,n.u_units_to_pixels),u_patternscale_a:new e.aQ(t,n.u_patternscale_a),u_patternscale_b:new e.aQ(t,n.u_patternscale_b),u_sdfgamma:new e.aM(t,n.u_sdfgamma),u_image:new e.aL(t,n.u_image),u_tex_y_a:new e.aM(t,n.u_tex_y_a),u_tex_y_b:new e.aM(t,n.u_tex_y_b),u_mix:new e.aM(t,n.u_mix)}),raster:(t,n)=>({u_matrix:new e.aN(t,n.u_matrix),u_tl_parent:new e.aQ(t,n.u_tl_parent),u_scale_parent:new e.aM(t,n.u_scale_parent),u_buffer_scale:new e.aM(t,n.u_buffer_scale),u_fade_t:new e.aM(t,n.u_fade_t),u_opacity:new e.aM(t,n.u_opacity),u_image0:new e.aL(t,n.u_image0),u_image1:new e.aL(t,n.u_image1),u_brightness_low:new e.aM(t,n.u_brightness_low),u_brightness_high:new e.aM(t,n.u_brightness_high),u_saturation_factor:new e.aM(t,n.u_saturation_factor),u_contrast_factor:new e.aM(t,n.u_contrast_factor),u_spin_weights:new e.aP(t,n.u_spin_weights)}),symbolIcon:(t,n)=>({u_is_size_zoom_constant:new e.aL(t,n.u_is_size_zoom_constant),u_is_size_feature_constant:new e.aL(t,n.u_is_size_feature_constant),u_size_t:new e.aM(t,n.u_size_t),u_size:new e.aM(t,n.u_size),u_camera_to_center_distance:new e.aM(t,n.u_camera_to_center_distance),u_pitch:new e.aM(t,n.u_pitch),u_rotate_symbol:new e.aL(t,n.u_rotate_symbol),u_aspect_ratio:new e.aM(t,n.u_aspect_ratio),u_fade_change:new e.aM(t,n.u_fade_change),u_matrix:new e.aN(t,n.u_matrix),u_label_plane_matrix:new e.aN(t,n.u_label_plane_matrix),u_coord_matrix:new e.aN(t,n.u_coord_matrix),u_is_text:new e.aL(t,n.u_is_text),u_pitch_with_map:new e.aL(t,n.u_pitch_with_map),u_texsize:new e.aQ(t,n.u_texsize),u_texture:new e.aL(t,n.u_texture)}),symbolSDF:(t,n)=>({u_is_size_zoom_constant:new e.aL(t,n.u_is_size_zoom_constant),u_is_size_feature_constant:new e.aL(t,n.u_is_size_feature_constant),u_size_t:new e.aM(t,n.u_size_t),u_size:new e.aM(t,n.u_size),u_camera_to_center_distance:new e.aM(t,n.u_camera_to_center_distance),u_pitch:new e.aM(t,n.u_pitch),u_rotate_symbol:new e.aL(t,n.u_rotate_symbol),u_aspect_ratio:new e.aM(t,n.u_aspect_ratio),u_fade_change:new e.aM(t,n.u_fade_change),u_matrix:new e.aN(t,n.u_matrix),u_label_plane_matrix:new e.aN(t,n.u_label_plane_matrix),u_coord_matrix:new e.aN(t,n.u_coord_matrix),u_is_text:new e.aL(t,n.u_is_text),u_pitch_with_map:new e.aL(t,n.u_pitch_with_map),u_texsize:new e.aQ(t,n.u_texsize),u_texture:new e.aL(t,n.u_texture),u_gamma_scale:new e.aM(t,n.u_gamma_scale),u_device_pixel_ratio:new e.aM(t,n.u_device_pixel_ratio),u_is_halo:new e.aL(t,n.u_is_halo)}),symbolTextAndIcon:(t,n)=>({u_is_size_zoom_constant:new e.aL(t,n.u_is_size_zoom_constant),u_is_size_feature_constant:new e.aL(t,n.u_is_size_feature_constant),u_size_t:new e.aM(t,n.u_size_t),u_size:new e.aM(t,n.u_size),u_camera_to_center_distance:new e.aM(t,n.u_camera_to_center_distance),u_pitch:new e.aM(t,n.u_pitch),u_rotate_symbol:new e.aL(t,n.u_rotate_symbol),u_aspect_ratio:new e.aM(t,n.u_aspect_ratio),u_fade_change:new e.aM(t,n.u_fade_change),u_matrix:new e.aN(t,n.u_matrix),u_label_plane_matrix:new e.aN(t,n.u_label_plane_matrix),u_coord_matrix:new e.aN(t,n.u_coord_matrix),u_is_text:new e.aL(t,n.u_is_text),u_pitch_with_map:new e.aL(t,n.u_pitch_with_map),u_texsize:new e.aQ(t,n.u_texsize),u_texsize_icon:new e.aQ(t,n.u_texsize_icon),u_texture:new e.aL(t,n.u_texture),u_texture_icon:new e.aL(t,n.u_texture_icon),u_gamma_scale:new e.aM(t,n.u_gamma_scale),u_device_pixel_ratio:new e.aM(t,n.u_device_pixel_ratio),u_is_halo:new e.aL(t,n.u_is_halo)}),background:(t,n)=>({u_matrix:new e.aN(t,n.u_matrix),u_opacity:new e.aM(t,n.u_opacity),u_color:new e.aR(t,n.u_color)}),backgroundPattern:(t,n)=>({u_matrix:new e.aN(t,n.u_matrix),u_opacity:new e.aM(t,n.u_opacity),u_image:new e.aL(t,n.u_image),u_pattern_tl_a:new e.aQ(t,n.u_pattern_tl_a),u_pattern_br_a:new e.aQ(t,n.u_pattern_br_a),u_pattern_tl_b:new e.aQ(t,n.u_pattern_tl_b),u_pattern_br_b:new e.aQ(t,n.u_pattern_br_b),u_texsize:new e.aQ(t,n.u_texsize),u_mix:new e.aM(t,n.u_mix),u_pattern_size_a:new e.aQ(t,n.u_pattern_size_a),u_pattern_size_b:new e.aQ(t,n.u_pattern_size_b),u_scale_a:new e.aM(t,n.u_scale_a),u_scale_b:new e.aM(t,n.u_scale_b),u_pixel_coord_upper:new e.aQ(t,n.u_pixel_coord_upper),u_pixel_coord_lower:new e.aQ(t,n.u_pixel_coord_lower),u_tile_units_to_pixels:new e.aM(t,n.u_tile_units_to_pixels)}),terrain:(t,n)=>({u_matrix:new e.aN(t,n.u_matrix),u_texture:new e.aL(t,n.u_texture),u_ele_delta:new e.aM(t,n.u_ele_delta)}),terrainDepth:(t,n)=>({u_matrix:new e.aN(t,n.u_matrix),u_ele_delta:new e.aM(t,n.u_ele_delta)}),terrainCoords:(t,n)=>({u_matrix:new e.aN(t,n.u_matrix),u_texture:new e.aL(t,n.u_texture),u_terrain_coords_id:new e.aM(t,n.u_terrain_coords_id),u_ele_delta:new e.aM(t,n.u_ele_delta)})};class Ft{constructor(e,t,n){this.context=e;const r=e.gl;this.buffer=r.createBuffer(),this.dynamicDraw=Boolean(n),this.context.unbindVAO(),e.bindElementBuffer.set(this.buffer),r.bufferData(r.ELEMENT_ARRAY_BUFFER,t.arrayBuffer,this.dynamicDraw?r.DYNAMIC_DRAW:r.STATIC_DRAW),this.dynamicDraw||delete t.arrayBuffer}bind(){this.context.bindElementBuffer.set(this.buffer)}updateData(e){const t=this.context.gl;if(!this.dynamicDraw)throw new Error("Attempted to update data while not in dynamic mode.");this.context.unbindVAO(),this.bind(),t.bufferSubData(t.ELEMENT_ARRAY_BUFFER,0,e.arrayBuffer)}destroy(){this.buffer&&(this.context.gl.deleteBuffer(this.buffer),delete this.buffer)}}const Nt={Int8:"BYTE",Uint8:"UNSIGNED_BYTE",Int16:"SHORT",Uint16:"UNSIGNED_SHORT",Int32:"INT",Uint32:"UNSIGNED_INT",Float32:"FLOAT"};class Bt{constructor(e,t,n,r){this.length=t.length,this.attributes=n,this.itemSize=t.bytesPerElement,this.dynamicDraw=r,this.context=e;const i=e.gl;this.buffer=i.createBuffer(),e.bindVertexBuffer.set(this.buffer),i.bufferData(i.ARRAY_BUFFER,t.arrayBuffer,this.dynamicDraw?i.DYNAMIC_DRAW:i.STATIC_DRAW),this.dynamicDraw||delete t.arrayBuffer}bind(){this.context.bindVertexBuffer.set(this.buffer)}updateData(e){if(e.length!==this.length)throw new Error(`Length of new data is ${e.length}, which doesn't match current length of ${this.length}`);const t=this.context.gl;this.bind(),t.bufferSubData(t.ARRAY_BUFFER,0,e.arrayBuffer)}enableAttributes(e,t){for(let n=0;n0){const n=e.Z(),r=y;e.aU(n,m.placementInvProjMatrix,t.transform.glCoordMatrix),e.aU(n,n,m.placementViewportMatrix),d.push({circleArray:b,circleOffset:h,transform:r,invTransform:n,coord:A}),f+=b.length/4,h=f}v&&c.draw(l,u.LINES,Tn.disabled,Cn.disabled,t.colorModeForRenderPass(),Ln.disabled,yt(y,t.transform,g),t.style.map.terrain&&t.style.map.terrain.getTerrainData(A),r.id,v.layoutVertexBuffer,v.indexBuffer,v.segments,null,t.transform.zoom,null,null,v.collisionVertexBuffer)}if(!s||!d.length)return;const p=t.useProgram("collisionCircle"),A=new e.aV;A.resize(4*f),A._trim();let g=0;for(const e of d)for(let t=0;t=0&&(A[g.associatedIconIndex]={shiftedAnchor:E,angle:O})}else _e(g.numGlyphs,h)}if(c){p.clear();const n=t.icon.placedSymbolArray;for(let t=0;tt.style.map.terrain.getElevation(l,e,n):null,n="map"===r.layout.get("text-rotation-alignment");de(u,l.posMatrix,t,o,j,F,m,c,n,e)}const z=t.translatePosMatrix(l.posMatrix,i,a,s),U=y||o&&x||B?Dn:j,H=t.translatePosMatrix(F,i,a,s,!0),V=h&&0!==r.paint.get(o?"text-halo-width":"icon-halo-width").constantOr(1);let G;G=h?u.iconsInText?Dt(w.kind,S,v,m,t,z,U,H,C,D):It(w.kind,S,v,m,t,z,U,H,o,C,!0):Pt(w.kind,S,v,m,t,z,U,H,o,C);const Y={program:O,buffers:d,uniformValues:G,atlasTexture:L,atlasTextureIcon:k,atlasInterpolation:P,atlasInterpolationIcon:I,isSDF:h,hasHalo:V};if(b&&u.canOverlap){_=!0;const t=d.segments.get();for(const n of t)M.push({segments:new e.S([n]),sortKey:n.sortKey,state:Y,terrainData:T})}else M.push({segments:d.segments,sortKey:0,state:Y,terrainData:T})}_&&M.sort((e,t)=>e.sortKey-t.sortKey);for(const e of M){const n=e.state;if(h.activeTexture.set(p.TEXTURE0),n.atlasTexture.bind(n.atlasInterpolation,p.CLAMP_TO_EDGE),n.atlasTextureIcon&&(h.activeTexture.set(p.TEXTURE1),n.atlasTextureIcon&&n.atlasTextureIcon.bind(n.atlasInterpolationIcon,p.CLAMP_TO_EDGE)),n.isSDF){const i=n.uniformValues;n.hasHalo&&(i.u_is_halo=1,Nn(n.buffers,e.segments,r,t,n.program,w,d,f,i,e.terrainData)),i.u_is_halo=0}Nn(n.buffers,e.segments,r,t,n.program,w,d,f,n.uniformValues,e.terrainData)}}function Nn(e,t,n,r,i,o,a,s,l,u){const c=r.context;i.draw(c,c.gl.TRIANGLES,o,a,s,Ln.disabled,l,u,n.id,e.layoutVertexBuffer,e.indexBuffer,t,n.paint,r.transform.zoom,e.programConfigurations.get(n.id),e.dynamicLayoutVertexBuffer,e.opacityVertexBuffer)}function Bn(e,t,n,r,i){if(!n||!r||!r.imageAtlas)return;const o=r.imageAtlas.patternPositions;let a=o[n.to.toString()],s=o[n.from.toString()];if(!a&&s&&(a=s),!s&&a&&(s=a),!a||!s){const e=i.getPaintProperty(t);a=o[e],s=o[e]}a&&s&&e.setConstantPatternPositions(a,s)}function zn(e,t,n,r,i,o,a){const s=e.context.gl,l="fill-pattern",u=n.paint.get(l),c=u&&u.constantOr(1),d=n.getCrossfadeParameters();let f,h,p,A,g;a?(h=c&&!n.getPaintProperty("fill-outline-color")?"fillOutlinePattern":"fillOutline",f=s.LINES):(h=c?"fillPattern":"fill",f=s.TRIANGLES);const m=u.constantOr(null);for(const u of r){const r=t.getTile(u);if(c&&!r.patternsLoaded())continue;const y=r.getBucket(n);if(!y)continue;const v=y.programConfigurations.get(n.id),b=e.useProgram(h,v),_=e.style.map.terrain&&e.style.map.terrain.getTerrainData(u);c&&(e.context.activeTexture.set(s.TEXTURE0),r.imageAtlasTexture.bind(s.LINEAR,s.CLAMP_TO_EDGE),v.updatePaintBuffers(d)),Bn(v,l,m,r,n);const w=_?u:null,x=e.translatePosMatrix(w?w.posMatrix:u.posMatrix,r,n.paint.get("fill-translate"),n.paint.get("fill-translate-anchor"));if(a){A=y.indexBuffer2,g=y.segments2;const t=[s.drawingBufferWidth,s.drawingBufferHeight];p="fillOutlinePattern"===h&&c?gt(x,e,d,r,t):At(x,t)}else A=y.indexBuffer,g=y.segments,p=c?pt(x,e,d,r):ht(x);b.draw(e.context,f,i,e.stencilModeForClipping(u),o,Ln.disabled,p,_,n.id,y.layoutVertexBuffer,A,g,n.paint,e.transform.zoom,v)}}function Un(e,t,n,r,i,o,a){const s=e.context,l=s.gl,u="fill-extrusion-pattern",c=n.paint.get(u),d=c.constantOr(1),f=n.getCrossfadeParameters(),h=n.paint.get("fill-extrusion-opacity"),p=c.constantOr(null);for(const c of r){const r=t.getTile(c),A=r.getBucket(n);if(!A)continue;const g=e.style.map.terrain&&e.style.map.terrain.getTerrainData(c),m=A.programConfigurations.get(n.id),y=e.useProgram(d?"fillExtrusionPattern":"fillExtrusion",m);d&&(e.context.activeTexture.set(l.TEXTURE0),r.imageAtlasTexture.bind(l.LINEAR,l.CLAMP_TO_EDGE),m.updatePaintBuffers(f)),Bn(m,u,p,r,n);const v=e.translatePosMatrix(c.posMatrix,r,n.paint.get("fill-extrusion-translate"),n.paint.get("fill-extrusion-translate-anchor")),b=n.paint.get("fill-extrusion-vertical-gradient"),_=d?ft(v,e,b,h,c,f,r):dt(v,e,b,h);y.draw(s,s.gl.TRIANGLES,i,o,a,Ln.backCCW,_,g,n.id,A.layoutVertexBuffer,A.indexBuffer,A.segments,n.paint,e.transform.zoom,m,e.style.map.terrain&&A.centroidVertexBuffer)}}function Hn(e,t,n,r,i,o,a){const s=e.context,l=s.gl,u=n.fbo;if(!u)return;const c=e.useProgram("hillshade"),d=e.style.map.terrain&&e.style.map.terrain.getTerrainData(t);s.activeTexture.set(l.TEXTURE0),l.bindTexture(l.TEXTURE_2D,u.colorAttachment.get()),c.draw(s,l.TRIANGLES,i,o,a,Ln.disabled,((e,t,n,r)=>{const i=n.paint.get("hillshade-shadow-color"),o=n.paint.get("hillshade-highlight-color"),a=n.paint.get("hillshade-accent-color");let s=n.paint.get("hillshade-illumination-direction")*(Math.PI/180);"viewport"===n.paint.get("hillshade-illumination-anchor")&&(s-=e.transform.angle);const l=!e.options.moving;return{u_matrix:r?r.posMatrix:e.transform.calculatePosMatrix(t.tileID.toUnwrapped(),l),u_image:0,u_latrange:wt(0,t.tileID),u_light:[n.paint.get("hillshade-exaggeration"),s],u_shadow:i,u_highlight:o,u_accent:a}})(e,n,r,d?t:null),d,r.id,e.rasterBoundsBuffer,e.quadTriangleIndexBuffer,e.rasterBoundsSegments)}function Vn(t,n,r,i,o,a){const s=t.context,l=s.gl,u=n.dem;if(u&&u.data){const c=u.dim,d=u.stride,f=u.getPixels();if(s.activeTexture.set(l.TEXTURE1),s.pixelStoreUnpackPremultiplyAlpha.set(!1),n.demTexture=n.demTexture||t.getTileTexture(d),n.demTexture){const e=n.demTexture;e.update(f,{premultiply:!1}),e.bind(l.NEAREST,l.CLAMP_TO_EDGE)}else n.demTexture=new y(s,f,l.RGBA,{premultiply:!1}),n.demTexture.bind(l.NEAREST,l.CLAMP_TO_EDGE);s.activeTexture.set(l.TEXTURE0);let h=n.fbo;if(!h){const e=new y(s,{width:c,height:c,data:null},l.RGBA);e.bind(l.LINEAR,l.CLAMP_TO_EDGE),h=n.fbo=s.createFramebuffer(c,c,!0,!1),h.colorAttachment.set(e.texture)}s.bindFramebuffer.set(h.framebuffer),s.viewport.set([0,0,c,c]),t.useProgram("hillshadePrepare").draw(s,l.TRIANGLES,i,o,a,Ln.disabled,((t,n)=>{const r=n.stride,i=e.Z();return e.aS(i,0,e.N,-e.N,0,0,1),e.$(i,i,[0,-e.N,0]),{u_matrix:i,u_image:1,u_dimension:[r,r],u_zoom:t.overscaledZ,u_unpack:n.getUnpackVector()}})(n.tileID,u),null,r.id,t.rasterBoundsBuffer,t.quadTriangleIndexBuffer,t.rasterBoundsSegments),n.needsHillshadePrepare=!1}}function Gn(t,n,r,i,o,a){const s=i.paint.get("raster-fade-duration");if(!a&&s>0){const i=e.h.now(),a=(i-t.timeAdded)/s,l=n?(i-n.timeAdded)/s:-1,u=r.getSource(),c=o.coveringZoomLevel({tileSize:u.tileSize,roundZoom:u.roundZoom}),d=!n||Math.abs(n.tileID.overscaledZ-c)>Math.abs(t.tileID.overscaledZ-c),f=d&&t.refreshedUponExpiration?1:e.ad(d?a:1-l,0,1);return t.refreshedUponExpiration&&a>=1&&(t.refreshedUponExpiration=!1),n?{opacity:1,mix:1-f}:{opacity:f,mix:0}}return{opacity:1,mix:0}}const Yn=new e.aT(1,0,0,1),Wn=new e.aT(0,1,0,1),qn=new e.aT(0,0,1,1),Xn=new e.aT(1,0,1,1),Zn=new e.aT(0,1,1,1);function Kn(e,t,n,r){Jn(e,0,t+n/2,e.transform.width,n,r)}function Qn(e,t,n,r){Jn(e,t-n/2,0,n,e.transform.height,r)}function Jn(e,t,n,r,i,o){const a=e.context,s=a.gl;s.enable(s.SCISSOR_TEST),s.scissor(t*e.pixelRatio,n*e.pixelRatio,r*e.pixelRatio,i*e.pixelRatio),a.clear({color:o}),s.disable(s.SCISSOR_TEST)}function $n(t,n,r){const i=t.context,o=i.gl,a=r.posMatrix,s=t.useProgram("debug"),l=Tn.disabled,u=Cn.disabled,c=t.colorModeForRenderPass(),d="$debug",f=t.style.map.terrain&&t.style.map.terrain.getTerrainData(r);i.activeTexture.set(o.TEXTURE0);const h=n.getTileByID(r.key).latestRawTileData,p=Math.floor((h&&h.byteLength||0)/1024),A=n.getTile(r).tileSize,g=512/Math.min(A,512)*(r.overscaledZ/t.transform.zoom)*.5;let m=r.canonical.toString();r.overscaledZ!==r.canonical.z&&(m+=" => "+r.overscaledZ),function(e,t){e.initDebugOverlayCanvas();const n=e.debugOverlayCanvas,r=e.context.gl,i=e.debugOverlayCanvas.getContext("2d");i.clearRect(0,0,n.width,n.height),i.shadowColor="white",i.shadowBlur=2,i.lineWidth=1.5,i.strokeStyle="white",i.textBaseline="top",i.font="bold 36px Open Sans, sans-serif",i.fillText(t,5,5),i.strokeText(t,5,5),e.debugOverlayTexture.update(n),e.debugOverlayTexture.bind(r.LINEAR,r.CLAMP_TO_EDGE)}(t,`${m} ${p}kB`),s.draw(i,o.TRIANGLES,l,u,On.alphaBlended,Ln.disabled,vt(a,e.aT.transparent,g),null,d,t.debugBuffer,t.quadTriangleIndexBuffer,t.debugSegments),s.draw(i,o.LINE_STRIP,l,u,c,Ln.disabled,vt(a,e.aT.red),f,d,t.debugBuffer,t.tileBorderIndexBuffer,t.debugSegments)}function er(e,t,n){const r=e.context,i=r.gl,o=e.colorModeForRenderPass(),a=new Tn(i.LEQUAL,Tn.ReadWrite,e.depthRangeFor3D),s=e.useProgram("terrain"),l=t.getTerrainMesh();r.bindFramebuffer.set(null),r.viewport.set([0,0,e.width,e.height]);for(const u of n){const n=e.renderToTexture.getTexture(u),c=t.getTerrainData(u.tileID);r.activeTexture.set(i.TEXTURE0),i.bindTexture(i.TEXTURE_2D,n.texture);const d={u_matrix:e.transform.calculatePosMatrix(u.tileID.toUnwrapped()),u_texture:0,u_ele_delta:t.getMeshFrameDelta(e.transform.zoom)};s.draw(r,i.TRIANGLES,a,Cn.disabled,o,Ln.backCCW,d,c,"terrain",l.vertexBuffer,l.indexBuffer,l.segments)}}class tr{constructor(t,n){this.context=new Sn(t),this.transform=n,this._tileTextures={},this.terrainFacilitator={dirty:!0,matrix:e.Z(),renderTime:0},this.setup(),this.numSublayers=Z.maxUnderzooming+Z.maxOverzooming+1,this.depthEpsilon=1/Math.pow(2,16),this.crossTileSymbolIndex=new Qe}resize(e,t,n){if(this.width=Math.floor(e*n),this.height=Math.floor(t*n),this.pixelRatio=n,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(const e of this.style._order)this.style._layers[e].resize()}setup(){const t=this.context,n=new e.a_;n.emplaceBack(0,0),n.emplaceBack(e.N,0),n.emplaceBack(0,e.N),n.emplaceBack(e.N,e.N),this.tileExtentBuffer=t.createVertexBuffer(n,rt.members),this.tileExtentSegments=e.S.simpleSegment(0,0,4,2);const r=new e.a_;r.emplaceBack(0,0),r.emplaceBack(e.N,0),r.emplaceBack(0,e.N),r.emplaceBack(e.N,e.N),this.debugBuffer=t.createVertexBuffer(r,rt.members),this.debugSegments=e.S.simpleSegment(0,0,4,5);const i=new e.V;i.emplaceBack(0,0,0,0),i.emplaceBack(e.N,0,e.N,0),i.emplaceBack(0,e.N,0,e.N),i.emplaceBack(e.N,e.N,e.N,e.N),this.rasterBoundsBuffer=t.createVertexBuffer(i,F.members),this.rasterBoundsSegments=e.S.simpleSegment(0,0,4,2);const o=new e.a_;o.emplaceBack(0,0),o.emplaceBack(1,0),o.emplaceBack(0,1),o.emplaceBack(1,1),this.viewportBuffer=t.createVertexBuffer(o,rt.members),this.viewportSegments=e.S.simpleSegment(0,0,4,2);const a=new e.a$;a.emplaceBack(0),a.emplaceBack(1),a.emplaceBack(3),a.emplaceBack(2),a.emplaceBack(0),this.tileBorderIndexBuffer=t.createIndexBuffer(a);const s=new e.b0;s.emplaceBack(0,1,2),s.emplaceBack(2,1,3),this.quadTriangleIndexBuffer=t.createIndexBuffer(s);const l=this.context.gl;this.stencilClearMode=new Cn({func:l.ALWAYS,mask:0},0,255,l.ZERO,l.ZERO,l.ZERO)}clearStencil(){const t=this.context,n=t.gl;this.nextStencilID=1,this.currentStencilSource=void 0;const r=e.Z();e.aS(r,0,this.width,this.height,0,0,1),e.a0(r,r,[n.drawingBufferWidth,n.drawingBufferHeight,0]),this.useProgram("clippingMask").draw(t,n.TRIANGLES,Tn.disabled,this.stencilClearMode,On.disabled,Ln.disabled,bt(r),null,"$clipping",this.viewportBuffer,this.quadTriangleIndexBuffer,this.viewportSegments)}_renderTileClippingMasks(e,t){if(this.currentStencilSource===e.source||!e.isTileClipped()||!t||!t.length)return;this.currentStencilSource=e.source;const n=this.context,r=n.gl;this.nextStencilID+t.length>256&&this.clearStencil(),n.setColorMode(On.disabled),n.setDepthMode(Tn.disabled);const i=this.useProgram("clippingMask");this._tileClippingMaskIDs={};for(const e of t){const t=this._tileClippingMaskIDs[e.key]=this.nextStencilID++,o=this.style.map.terrain&&this.style.map.terrain.getTerrainData(e);i.draw(n,r.TRIANGLES,Tn.disabled,new Cn({func:r.ALWAYS,mask:0},t,255,r.KEEP,r.KEEP,r.REPLACE),On.disabled,Ln.disabled,bt(e.posMatrix),o,"$clipping",this.tileExtentBuffer,this.quadTriangleIndexBuffer,this.tileExtentSegments)}}stencilModeFor3D(){this.currentStencilSource=void 0,this.nextStencilID+1>256&&this.clearStencil();const e=this.nextStencilID++,t=this.context.gl;return new Cn({func:t.NOTEQUAL,mask:255},e,255,t.KEEP,t.KEEP,t.REPLACE)}stencilModeForClipping(e){const t=this.context.gl;return new Cn({func:t.EQUAL,mask:255},this._tileClippingMaskIDs[e.key],0,t.KEEP,t.KEEP,t.REPLACE)}stencilConfigForOverlap(e){const t=this.context.gl,n=e.sort((e,t)=>t.overscaledZ-e.overscaledZ),r=n[n.length-1].overscaledZ,i=n[0].overscaledZ-r+1;if(i>1){this.currentStencilSource=void 0,this.nextStencilID+i>256&&this.clearStencil();const e={};for(let n=0;n=0;this.currentLayer--){const e=this.style._layers[r[this.currentLayer]],t=i[e.source],n=o[e.source];this._renderTileClippingMasks(e,n),this.renderLayer(this,t,e,n)}for(this.renderPass="translucent",this.currentLayer=0;this.currentLayern.source&&!n.isHidden(t)?[e.sourceCaches[n.source]]:[]),i=r.filter(e=>"vector"===e.getSource().type),o=r.filter(e=>"vector"!==e.getSource().type),a=e=>{(!n||n.getSource().maxzooma(e)),n||o.forEach(e=>a(e)),n}(this.style,this.transform.zoom);e&&function(e,t,n){for(let r=0;rn.style.map.terrain.getElevation(o,e,t):null)}}}(i,t,r,n,r.layout.get("text-rotation-alignment"),r.layout.get("text-pitch-alignment"),o),0!==r.paint.get("icon-opacity").constantOr(1)&&Fn(t,n,r,i,!1,r.paint.get("icon-translate"),r.paint.get("icon-translate-anchor"),r.layout.get("icon-rotation-alignment"),r.layout.get("icon-pitch-alignment"),r.layout.get("icon-keep-upright"),a,s),0!==r.paint.get("text-opacity").constantOr(1)&&Fn(t,n,r,i,!0,r.paint.get("text-translate"),r.paint.get("text-translate-anchor"),r.layout.get("text-rotation-alignment"),r.layout.get("text-pitch-alignment"),r.layout.get("text-keep-upright"),a,s),n.map.showCollisionBoxes&&(In(t,n,r,i,r.paint.get("text-translate"),r.paint.get("text-translate-anchor"),!0),In(t,n,r,i,r.paint.get("icon-translate"),r.paint.get("icon-translate-anchor"),!1))}(t,n,r,i,this.style.placement.variableOffsets);break;case"circle":!function(t,n,r,i){if("translucent"!==t.renderPass)return;const o=r.paint.get("circle-opacity"),a=r.paint.get("circle-stroke-width"),s=r.paint.get("circle-stroke-opacity"),l=!r.layout.get("circle-sort-key").isConstant();if(0===o.constantOr(1)&&(0===a.constantOr(1)||0===s.constantOr(1)))return;const u=t.context,c=u.gl,d=t.depthModeForSublayer(0,Tn.ReadOnly),f=Cn.disabled,h=t.colorModeForRenderPass(),p=[];for(let o=0;oe.sortKey-t.sortKey);for(const e of p){const{programConfiguration:n,program:i,layoutVertexBuffer:o,indexBuffer:a,uniformValues:s,terrainData:l}=e.state;i.draw(u,c.TRIANGLES,d,f,h,Ln.disabled,s,l,r.id,o,a,e.segments,r.paint,t.transform.zoom,n)}}(t,n,r,i);break;case"heatmap":!function(t,n,r,i){if(0!==r.paint.get("heatmap-opacity"))if("offscreen"===t.renderPass){const o=t.context,a=o.gl,s=Cn.disabled,l=new On([a.ONE,a.ONE],e.aT.transparent,[!0,!0,!0,!0]);!function(e,t,n){const r=e.gl;e.activeTexture.set(r.TEXTURE1),e.viewport.set([0,0,t.width/4,t.height/4]);let i=n.heatmapFbo;if(i)r.bindTexture(r.TEXTURE_2D,i.colorAttachment.get()),e.bindFramebuffer.set(i.framebuffer);else{const o=r.createTexture();r.bindTexture(r.TEXTURE_2D,o),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_S,r.CLAMP_TO_EDGE),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_T,r.CLAMP_TO_EDGE),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_MIN_FILTER,r.LINEAR),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_MAG_FILTER,r.LINEAR),i=n.heatmapFbo=e.createFramebuffer(t.width/4,t.height/4,!1,!1),function(e,t,n,r){var i,o;const a=e.gl,s=null!==(i=e.HALF_FLOAT)&&void 0!==i?i:a.UNSIGNED_BYTE,l=null!==(o=e.RGBA16F)&&void 0!==o?o:a.RGBA;a.texImage2D(a.TEXTURE_2D,0,l,t.width/4,t.height/4,0,a.RGBA,s,null),r.colorAttachment.set(n)}(e,t,o,i)}}(o,t,r),o.clear({color:e.aT.transparent});for(let e=0;e{const o=e.Z();e.aS(o,0,t.width,t.height,0,0,1);const a=t.context.gl;return{u_matrix:o,u_world:[a.drawingBufferWidth,a.drawingBufferHeight],u_image:0,u_color_ramp:1,u_opacity:n.paint.get("heatmap-opacity")}})(t,n),null,n.id,t.viewportBuffer,t.quadTriangleIndexBuffer,t.viewportSegments,n.paint,t.transform.zoom)}(t,r))}(t,n,r,i);break;case"line":!function(t,n,r,i){if("translucent"!==t.renderPass)return;const o=r.paint.get("line-opacity"),a=r.paint.get("line-width");if(0===o.constantOr(1)||0===a.constantOr(1))return;const s=t.depthModeForSublayer(0,Tn.ReadOnly),l=t.colorModeForRenderPass(),u=r.paint.get("line-dasharray"),c=r.paint.get("line-pattern"),d=c.constantOr(1),f=r.paint.get("line-gradient"),h=r.getCrossfadeParameters(),p=d?"linePattern":u?"lineSDF":f?"lineGradient":"line",A=t.context,g=A.gl;let m=!0;for(const o of i){const i=n.getTile(o);if(d&&!i.patternsLoaded())continue;const a=i.getBucket(r);if(!a)continue;const v=a.programConfigurations.get(r.id),b=t.context.program.get(),_=t.useProgram(p,v),w=m||_.program!==b,x=t.style.map.terrain&&t.style.map.terrain.getTerrainData(o),M=c.constantOr(null);if(M&&i.imageAtlas){const e=i.imageAtlas,t=e.patternPositions[M.to.toString()],n=e.patternPositions[M.from.toString()];t&&n&&v.setConstantPatternPositions(t,n)}const E=x?o:null,O=d?Et(t,i,r,h,E):u?Ot(t,i,r,u,h,E):f?Mt(t,i,r,a.lineClipsArray.length,E):xt(t,i,r,E);if(d)A.activeTexture.set(g.TEXTURE0),i.imageAtlasTexture.bind(g.LINEAR,g.CLAMP_TO_EDGE),v.updatePaintBuffers(h);else if(u&&(w||t.lineAtlas.dirty))A.activeTexture.set(g.TEXTURE0),t.lineAtlas.bind(A);else if(f){const i=a.gradients[r.id];let s=i.texture;if(r.gradientVersion!==i.version){let l=256;if(r.stepInterpolant){const r=n.getSource().maxzoom,i=o.canonical.z===r?Math.ceil(1<0?t.pop():null}isPatternMissing(e){if(!e)return!1;if(!e.from||!e.to)return!0;const t=this.imageManager.getPattern(e.from.toString()),n=this.imageManager.getPattern(e.to.toString());return!t||!n}useProgram(e,t){this.cache=this.cache||{};const n=e+(t?t.cacheKey:"")+(this._showOverdrawInspector?"/overdraw":"")+(this.style.map.terrain?"/terrain":"");return this.cache[n]||(this.cache[n]=new ut(this.context,ot[e],t,jt[e],this._showOverdrawInspector,this.style.map.terrain)),this.cache[n]}setCustomLayerDefaults(){this.context.unbindVAO(),this.context.cullFace.setDefault(),this.context.activeTexture.setDefault(),this.context.pixelStoreUnpack.setDefault(),this.context.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.context.pixelStoreUnpackFlipY.setDefault()}setBaseState(){const e=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(e.FUNC_ADD)}initDebugOverlayCanvas(){null==this.debugOverlayCanvas&&(this.debugOverlayCanvas=document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512,this.debugOverlayTexture=new y(this.context,this.debugOverlayCanvas,this.context.gl.RGBA))}destroy(){this.debugOverlayTexture&&this.debugOverlayTexture.destroy()}overLimit(){const{drawingBufferWidth:e,drawingBufferHeight:t}=this.context.gl;return this.width!==e||this.height!==t}}class nr{constructor(e,t){this.points=e,this.planes=t}static fromInvProjectionMatrix(t,n,r){const i=Math.pow(2,r),o=[[-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(r=>{const o=1/(r=e.ag([],r,t))[3]/n*i;return e.b3(r,r,[o,o,1/r[3],o])}),a=[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]].map(e=>{const t=function(e,t){var n=t[0],r=t[1],i=t[2],o=n*n+r*r+i*i;return o>0&&(o=1/Math.sqrt(o)),e[0]=t[0]*o,e[1]=t[1]*o,e[2]=t[2]*o,e}([],function(e,t,n){var r=t[0],i=t[1],o=t[2],a=n[0],s=n[1],l=n[2];return e[0]=i*l-o*s,e[1]=o*a-r*l,e[2]=r*s-i*a,e}([],p([],o[e[0]],o[e[1]]),p([],o[e[2]],o[e[1]]))),n=-((r=t)[0]*(i=o[e[1]])[0]+r[1]*i[1]+r[2]*i[2]);var r,i;return t.concat(n)});return new nr(o,a)}}class rr{constructor(e,t){this.min=e,this.max=t,this.center=function(e,t,n){return e[0]=.5*t[0],e[1]=.5*t[1],e[2]=.5*t[2],e}([],function(e,t,n){return e[0]=t[0]+n[0],e[1]=t[1]+n[1],e[2]=t[2]+n[2],e}([],this.min,this.max))}quadrant(e){const t=[e%2==0,e<2],n=f(this.min),r=f(this.max);for(let e=0;e=0&&a++;if(0===a)return 0;a!==n.length&&(r=!1)}if(r)return 2;for(let e=0;e<3;e++){let n=Number.MAX_VALUE,r=-Number.MAX_VALUE;for(let i=0;ithis.max[e]-this.min[e])return 0}return 1}}class ir{constructor(e=0,t=0,n=0,r=0){if(isNaN(e)||e<0||isNaN(t)||t<0||isNaN(n)||n<0||isNaN(r)||r<0)throw new Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=e,this.bottom=t,this.left=n,this.right=r}interpolate(t,n,r){return null!=n.top&&null!=t.top&&(this.top=e.B.number(t.top,n.top,r)),null!=n.bottom&&null!=t.bottom&&(this.bottom=e.B.number(t.bottom,n.bottom,r)),null!=n.left&&null!=t.left&&(this.left=e.B.number(t.left,n.left,r)),null!=n.right&&null!=t.right&&(this.right=e.B.number(t.right,n.right,r)),this}getCenter(t,n){const r=e.ad((this.left+t-this.right)/2,0,t),i=e.ad((this.top+n-this.bottom)/2,0,n);return new e.P(r,i)}equals(e){return this.top===e.top&&this.bottom===e.bottom&&this.left===e.left&&this.right===e.right}clone(){return new ir(this.top,this.bottom,this.left,this.right)}toJSON(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}}}class or{constructor(t,n,r,i,o){this.tileSize=512,this.maxValidLatitude=85.051129,this._renderWorldCopies=void 0===o||!!o,this._minZoom=t||0,this._maxZoom=n||22,this._minPitch=null==r?0:r,this._maxPitch=null==i?60:i,this.setMaxBounds(),this.width=0,this.height=0,this._center=new e.L(0,0),this._elevation=0,this.zoom=0,this.angle=0,this._fov=.6435011087932844,this._pitch=0,this._unmodified=!0,this._edgeInsets=new ir,this._posMatrixCache={},this._alignedPosMatrixCache={},this._minEleveationForCurrentTile=0}clone(){const e=new or(this._minZoom,this._maxZoom,this._minPitch,this.maxPitch,this._renderWorldCopies);return e.apply(this),e}apply(e){this.tileSize=e.tileSize,this.latRange=e.latRange,this.width=e.width,this.height=e.height,this._center=e._center,this._elevation=e._elevation,this._minEleveationForCurrentTile=e._minEleveationForCurrentTile,this.zoom=e.zoom,this.angle=e.angle,this._fov=e._fov,this._pitch=e._pitch,this._unmodified=e._unmodified,this._edgeInsets=e._edgeInsets.clone(),this._calcMatrices()}get minZoom(){return this._minZoom}set minZoom(e){this._minZoom!==e&&(this._minZoom=e,this.zoom=Math.max(this.zoom,e))}get maxZoom(){return this._maxZoom}set maxZoom(e){this._maxZoom!==e&&(this._maxZoom=e,this.zoom=Math.min(this.zoom,e))}get minPitch(){return this._minPitch}set minPitch(e){this._minPitch!==e&&(this._minPitch=e,this.pitch=Math.max(this.pitch,e))}get maxPitch(){return this._maxPitch}set maxPitch(e){this._maxPitch!==e&&(this._maxPitch=e,this.pitch=Math.min(this.pitch,e))}get renderWorldCopies(){return this._renderWorldCopies}set renderWorldCopies(e){void 0===e?e=!0:null===e&&(e=!1),this._renderWorldCopies=e}get worldSize(){return this.tileSize*this.scale}get centerOffset(){return this.centerPoint._sub(this.size._div(2))}get size(){return new e.P(this.width,this.height)}get bearing(){return-this.angle/Math.PI*180}set bearing(t){const n=-e.b5(t,-180,180)*Math.PI/180;this.angle!==n&&(this._unmodified=!1,this.angle=n,this._calcMatrices(),this.rotationMatrix=function(){var t=new e.A(4);return e.A!=Float32Array&&(t[1]=0,t[2]=0),t[0]=1,t[3]=1,t}(),function(e,t,n){var r=t[0],i=t[1],o=t[2],a=t[3],s=Math.sin(n),l=Math.cos(n);e[0]=r*l+o*s,e[1]=i*l+a*s,e[2]=r*-s+o*l,e[3]=i*-s+a*l}(this.rotationMatrix,this.rotationMatrix,this.angle))}get pitch(){return this._pitch/Math.PI*180}set pitch(t){const n=e.ad(t,this.minPitch,this.maxPitch)/180*Math.PI;this._pitch!==n&&(this._unmodified=!1,this._pitch=n,this._calcMatrices())}get fov(){return this._fov/Math.PI*180}set fov(e){e=Math.max(.01,Math.min(60,e)),this._fov!==e&&(this._unmodified=!1,this._fov=e/180*Math.PI,this._calcMatrices())}get zoom(){return this._zoom}set zoom(e){const t=Math.min(Math.max(e,this.minZoom),this.maxZoom);this._zoom!==t&&(this._unmodified=!1,this._zoom=t,this.tileZoom=Math.max(0,Math.floor(t)),this.scale=this.zoomScale(t),this._constrain(),this._calcMatrices())}get center(){return this._center}set center(e){e.lat===this._center.lat&&e.lng===this._center.lng||(this._unmodified=!1,this._center=e,this._constrain(),this._calcMatrices())}get elevation(){return this._elevation}set elevation(e){e!==this._elevation&&(this._elevation=e,this._constrain(),this._calcMatrices())}get padding(){return this._edgeInsets.toJSON()}set padding(e){this._edgeInsets.equals(e)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,e,1),this._calcMatrices())}get centerPoint(){return this._edgeInsets.getCenter(this.width,this.height)}isPaddingEqual(e){return this._edgeInsets.equals(e)}interpolatePadding(e,t,n){this._unmodified=!1,this._edgeInsets.interpolate(e,t,n),this._constrain(),this._calcMatrices()}coveringZoomLevel(e){const t=(e.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/e.tileSize));return Math.max(0,t)}getVisibleUnwrappedCoordinates(t){const n=[new e.b6(0,t)];if(this._renderWorldCopies){const r=this.pointCoordinate(new e.P(0,0)),i=this.pointCoordinate(new e.P(this.width,0)),o=this.pointCoordinate(new e.P(this.width,this.height)),a=this.pointCoordinate(new e.P(0,this.height)),s=Math.floor(Math.min(r.x,i.x,o.x,a.x)),l=Math.floor(Math.max(r.x,i.x,o.x,a.x)),u=1;for(let r=s-u;r<=l+u;r++)0!==r&&n.push(new e.b6(r,t))}return n}coveringTiles(t){var n,r;let i=this.coveringZoomLevel(t);const o=i;if(void 0!==t.minzoom&&it.maxzoom&&(i=t.maxzoom);const a=this.pointCoordinate(this.getCameraPoint()),s=e.U.fromLngLat(this.center),l=Math.pow(2,i),u=[l*a.x,l*a.y,0],c=[l*s.x,l*s.y,0],d=nr.fromInvProjectionMatrix(this.invProjMatrix,this.worldSize,i);let f=t.minzoom||0;!t.terrain&&this.pitch<=60&&this._edgeInsets.top<.1&&(f=i);const h=t.terrain?2/Math.min(this.tileSize,t.tileSize)*this.tileSize:3,p=e=>({aabb:new rr([e*l,0,0],[(e+1)*l,l,0]),zoom:0,x:0,y:0,wrap:e,fullyVisible:!1}),g=[],m=[],y=i,v=t.reparseOverscaled?o:i;if(this._renderWorldCopies)for(let e=1;e<=3;e++)g.push(p(-e)),g.push(p(e));for(g.push(p(0));g.length>0;){const i=g.pop(),o=i.x,a=i.y;let s=i.fullyVisible;if(!s){const e=i.aabb.intersects(d);if(0===e)continue;s=2===e}const l=t.terrain?u:c,p=i.aabb.distanceX(l),b=i.aabb.distanceY(l),_=Math.max(Math.abs(p),Math.abs(b));if(i.zoom===y||_>h+(1<=f){const t=y-i.zoom,n=u[0]-.5-(o<>1),d=i.zoom+1;let f=i.aabb.quadrant(l);if(t.terrain){const o=new e.O(d,i.wrap,d,u,c),a=t.terrain.getMinMaxElevation(o),s=null!==(n=a.minElevation)&&void 0!==n?n:this.elevation,l=null!==(r=a.maxElevation)&&void 0!==r?r:this.elevation;f=new rr([f.min[0],f.min[1],s],[f.max[0],f.max[1],l])}g.push({aabb:f,zoom:d,x:u,y:c,wrap:i.wrap,fullyVisible:s})}}return m.sort((e,t)=>e.distanceSq-t.distanceSq).map(e=>e.tileID)}resize(e,t){this.width=e,this.height=t,this.pixelsToGLUnits=[2/e,-2/t],this._constrain(),this._calcMatrices()}get unmodified(){return this._unmodified}zoomScale(e){return Math.pow(2,e)}scaleZoom(e){return Math.log(e)/Math.LN2}project(t){const n=e.ad(t.lat,-this.maxValidLatitude,this.maxValidLatitude);return new e.P(e.G(t.lng)*this.worldSize,e.H(n)*this.worldSize)}unproject(t){return new e.U(t.x/this.worldSize,t.y/this.worldSize).toLngLat()}get point(){return this.project(this.center)}getCameraPosition(){return{lngLat:this.pointLocation(this.getCameraPoint()),altitude:Math.cos(this._pitch)*this.cameraToCenterDistance/this._pixelPerMeter+this.elevation}}recalculateZoom(t){const n=this.pointLocation(this.centerPoint,t),r=t.getElevationForLngLatZoom(n,this.tileZoom);if(!(this.elevation-r))return;const i=this.getCameraPosition(),o=e.U.fromLngLat(i.lngLat,i.altitude),a=e.U.fromLngLat(n,r),s=o.x-a.x,l=o.y-a.y,u=o.z-a.z,c=Math.sqrt(s*s+l*l+u*u),d=this.scaleZoom(this.cameraToCenterDistance/c/this.tileSize);this._elevation=r,this._center=n,this.zoom=d}setLocationAtPoint(t,n){const r=this.pointCoordinate(n),i=this.pointCoordinate(this.centerPoint),o=this.locationCoordinate(t),a=new e.U(o.x-(r.x-i.x),o.y-(r.y-i.y));this.center=this.coordinateLocation(a),this._renderWorldCopies&&(this.center=this.center.wrap())}locationPoint(e,t){return t?this.coordinatePoint(this.locationCoordinate(e),t.getElevationForLngLatZoom(e,this.tileZoom),this.pixelMatrix3D):this.coordinatePoint(this.locationCoordinate(e))}pointLocation(e,t){return this.coordinateLocation(this.pointCoordinate(e,t))}locationCoordinate(t){return e.U.fromLngLat(t)}coordinateLocation(e){return e&&e.toLngLat()}pointCoordinate(t,n){if(n){const e=n.pointCoordinate(t);if(null!=e)return e}const r=[t.x,t.y,0,1],i=[t.x,t.y,1,1];e.ag(r,r,this.pixelMatrixInverse),e.ag(i,i,this.pixelMatrixInverse);const o=r[3],a=i[3],s=r[1]/o,l=i[1]/a,u=r[2]/o,c=i[2]/a,d=u===c?0:(0-u)/(c-u);return new e.U(e.B.number(r[0]/o,i[0]/a,d)/this.worldSize,e.B.number(s,l,d)/this.worldSize)}coordinatePoint(t,n=0,r=this.pixelMatrix){const i=[t.x*this.worldSize,t.y*this.worldSize,n,1];return e.ag(i,i,r),new e.P(i[0]/i[3],i[1]/i[3])}getBounds(){const t=Math.max(0,this.height/2-this.getHorizon());return(new P).extend(this.pointLocation(new e.P(0,t))).extend(this.pointLocation(new e.P(this.width,t))).extend(this.pointLocation(new e.P(this.width,this.height))).extend(this.pointLocation(new e.P(0,this.height)))}getMaxBounds(){return this.latRange&&2===this.latRange.length&&this.lngRange&&2===this.lngRange.length?new P([this.lngRange[0],this.latRange[0]],[this.lngRange[1],this.latRange[1]]):null}getHorizon(){return Math.tan(Math.PI/2-this._pitch)*this.cameraToCenterDistance*.85}setMaxBounds(e){e?(this.lngRange=[e.getWest(),e.getEast()],this.latRange=[e.getSouth(),e.getNorth()],this._constrain()):(this.lngRange=null,this.latRange=[-this.maxValidLatitude,this.maxValidLatitude])}calculatePosMatrix(t,n=!1){const r=t.key,i=n?this._alignedPosMatrixCache:this._posMatrixCache;if(i[r])return i[r];const o=t.canonical,a=this.worldSize/this.zoomScale(o.z),s=o.x+Math.pow(2,o.z)*t.wrap,l=e.ao(new Float64Array(16));return e.$(l,l,[s*a,o.y*a,0]),e.a0(l,l,[a/e.N,a/e.N,1]),e.a1(l,n?this.alignedProjMatrix:this.projMatrix,l),i[r]=new Float32Array(l),i[r]}customLayerMatrix(){return this.mercatorMatrix.slice()}_constrain(){if(!this.center||!this.width||!this.height||this._constraining)return;this._constraining=!0;let t,n,r,i,o=-90,a=90,s=-180,l=180;const u=this.size,c=this._unmodified;if(this.latRange){const n=this.latRange;o=e.H(n[1])*this.worldSize,a=e.H(n[0])*this.worldSize,t=a-oa&&(i=a-t)}if(this.lngRange){const t=(s+l)/2,n=e.b5(d.x,t-this.worldSize/2,t+this.worldSize/2),i=u.x/2;n-il&&(r=l-i)}void 0===r&&void 0===i||(this.center=this.unproject(new e.P(void 0!==r?r:d.x,void 0!==i?i:d.y)).wrap()),this._unmodified=c,this._constraining=!1}_calcMatrices(){if(!this.height)return;const t=this.centerOffset,n=this.point.x,r=this.point.y;this.cameraToCenterDistance=.5/Math.tan(this._fov/2)*this.height,this._pixelPerMeter=e.b7(1,this.center.lat)*this.worldSize;let i=e.ao(new Float64Array(16));e.a0(i,i,[this.width/2,-this.height/2,1]),e.$(i,i,[1,-1,0]),this.labelPlaneMatrix=i,i=e.ao(new Float64Array(16)),e.a0(i,i,[1,-1,1]),e.$(i,i,[-1,-1,0]),e.a0(i,i,[2/this.width,2/this.height,1]),this.glCoordMatrix=i;const o=this.cameraToCenterDistance+this._elevation*this._pixelPerMeter/Math.cos(this._pitch),a=Math.min(this.elevation,this._minEleveationForCurrentTile),s=o-a*this._pixelPerMeter/Math.cos(this._pitch),l=a<0?s:o,u=Math.PI/2+this._pitch,c=this._fov*(.5+t.y/this.height),d=Math.sin(c)*l/Math.sin(e.ad(Math.PI-u-c,.01,Math.PI-.01)),f=this.getHorizon(),h=2*Math.atan(f/this.cameraToCenterDistance)*(.5+t.y/(2*f)),p=Math.sin(h)*l/Math.sin(e.ad(Math.PI-u-h,.01,Math.PI-.01)),A=Math.min(d,p),g=1.01*(Math.cos(Math.PI/2-this._pitch)*A+l),m=this.height/50;i=new Float64Array(16),e.b8(i,this._fov,this.width/this.height,m,g),i[8]=2*-t.x/this.width,i[9]=2*t.y/this.height,e.a0(i,i,[1,-1,1]),e.$(i,i,[0,0,-this.cameraToCenterDistance]),e.b9(i,i,this._pitch),e.ae(i,i,this.angle),e.$(i,i,[-n,-r,0]),this.mercatorMatrix=e.a0([],i,[this.worldSize,this.worldSize,this.worldSize]),e.a0(i,i,[1,1,this._pixelPerMeter]),this.pixelMatrix=e.a1(new Float64Array(16),this.labelPlaneMatrix,i),e.$(i,i,[0,0,-this.elevation]),this.projMatrix=i,this.invProjMatrix=e.as([],i),this.pixelMatrix3D=e.a1(new Float64Array(16),this.labelPlaneMatrix,i);const y=this.width%2/2,v=this.height%2/2,b=Math.cos(this.angle),_=Math.sin(this.angle),w=n-Math.round(n)+b*y+_*v,x=r-Math.round(r)+b*v+_*y,M=new Float64Array(i);if(e.$(M,M,[w>.5?w-1:w,x>.5?x-1:x,0]),this.alignedProjMatrix=M,i=e.as(new Float64Array(16),this.pixelMatrix),!i)throw new Error("failed to invert matrix");this.pixelMatrixInverse=i,this._posMatrixCache={},this._alignedPosMatrixCache={}}maxPitchScaleFactor(){if(!this.pixelMatrixInverse)return 1;const t=this.pointCoordinate(new e.P(0,0)),n=[t.x*this.worldSize,t.y*this.worldSize,0,1];return e.ag(n,n,this.pixelMatrix)[3]/this.cameraToCenterDistance}getCameraPoint(){const t=Math.tan(this._pitch)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new e.P(0,t))}getCameraQueryGeometry(t){const n=this.getCameraPoint();if(1===t.length)return[t[0],n];{let r=n.x,i=n.y,o=n.x,a=n.y;for(const e of t)r=Math.min(r,e.x),i=Math.min(i,e.y),o=Math.max(o,e.x),a=Math.max(a,e.y);return[new e.P(r,i),new e.P(o,i),new e.P(o,a),new e.P(r,a),new e.P(r,i)]}}}function ar(e,t){let n,r=!1,i=null,o=null;const a=()=>{i=null,r&&(e.apply(o,n),i=setTimeout(a,t),r=!1)};return(...e)=>(r=!0,o=this,n=e,i||a(),i)}class sr{constructor(e){this._getCurrentHash=()=>{const e=window.location.hash.replace("#","");if(this._hashName){let t;return e.split("&").map(e=>e.split("=")).forEach(e=>{e[0]===this._hashName&&(t=e)}),(t&&t[1]||"").split("/")}return e.split("/")},this._onHashChange=()=>{const e=this._getCurrentHash();if(e.length>=3&&!e.some(e=>isNaN(e))){const t=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(e[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+e[2],+e[1]],zoom:+e[0],bearing:t,pitch:+(e[4]||0)}),!0}return!1},this._updateHashUnthrottled=()=>{const e=window.location.href.replace(/(#.+)?$/,this.getHashString());try{window.history.replaceState(window.history.state,null,e)}catch(e){}},this._updateHash=ar(this._updateHashUnthrottled,300),this._hashName=e&&encodeURIComponent(e)}addTo(e){return this._map=e,addEventListener("hashchange",this._onHashChange,!1),this._map.on("moveend",this._updateHash),this}remove(){return removeEventListener("hashchange",this._onHashChange,!1),this._map.off("moveend",this._updateHash),clearTimeout(this._updateHash()),delete this._map,this}getHashString(e){const t=this._map.getCenter(),n=Math.round(100*this._map.getZoom())/100,r=Math.ceil((n*Math.LN2+Math.log(512/360/.5))/Math.LN10),i=Math.pow(10,r),o=Math.round(t.lng*i)/i,a=Math.round(t.lat*i)/i,s=this._map.getBearing(),l=this._map.getPitch();let u="";if(u+=e?`/${o}/${a}/${n}`:`${n}/${a}/${o}`,(s||l)&&(u+="/"+Math.round(10*s)/10),l&&(u+="/"+Math.round(l)),this._hashName){const e=this._hashName;let t=!1;const n=window.location.hash.slice(1).split("&").map(n=>{const r=n.split("=")[0];return r===e?(t=!0,`${r}=${u}`):n}).filter(e=>e);return t||n.push(`${e}=${u}`),"#"+n.join("&")}return"#"+u}}const lr={linearity:.3,easing:e.ba(0,0,.3,1)},ur=e.e({deceleration:2500,maxSpeed:1400},lr),cr=e.e({deceleration:20,maxSpeed:1400},lr),dr=e.e({deceleration:1e3,maxSpeed:360},lr),fr=e.e({deceleration:1e3,maxSpeed:90},lr);class hr{constructor(e){this._map=e,this.clear()}clear(){this._inertiaBuffer=[]}record(t){this._drainInertiaBuffer(),this._inertiaBuffer.push({time:e.h.now(),settings:t})}_drainInertiaBuffer(){const t=this._inertiaBuffer,n=e.h.now();for(;t.length>0&&n-t[0].time>160;)t.shift()}_onMoveEnd(t){if(this._drainInertiaBuffer(),this._inertiaBuffer.length<2)return;const n={zoom:0,bearing:0,pitch:0,pan:new e.P(0,0),pinchAround:void 0,around:void 0};for(const{settings:e}of this._inertiaBuffer)n.zoom+=e.zoomDelta||0,n.bearing+=e.bearingDelta||0,n.pitch+=e.pitchDelta||0,e.panDelta&&n.pan._add(e.panDelta),e.around&&(n.around=e.around),e.pinchAround&&(n.pinchAround=e.pinchAround);const r=this._inertiaBuffer[this._inertiaBuffer.length-1].time-this._inertiaBuffer[0].time,i={};if(n.pan.mag()){const o=Ar(n.pan.mag(),r,e.e({},ur,t||{}));i.offset=n.pan.mult(o.amount/n.pan.mag()),i.center=this._map.transform.center,pr(i,o)}if(n.zoom){const e=Ar(n.zoom,r,cr);i.zoom=this._map.transform.zoom+e.amount,pr(i,e)}if(n.bearing){const t=Ar(n.bearing,r,dr);i.bearing=this._map.transform.bearing+e.ad(t.amount,-179,179),pr(i,t)}if(n.pitch){const e=Ar(n.pitch,r,fr);i.pitch=this._map.transform.pitch+e.amount,pr(i,e)}if(i.zoom||i.bearing){const e=void 0===n.pinchAround?n.around:n.pinchAround;i.around=e?this._map.unproject(e):this._map.getCenter()}return this.clear(),e.e(i,{noMoveStart:!0})}}function pr(e,t){(!e.duration||e.durationr.unproject(e)),l=a.reduce((e,t,n,r)=>e.add(t.div(r.length)),new e.P(0,0));super(n,{points:a,point:l,lngLats:s,lngLat:r.unproject(l),originalEvent:i}),this._defaultPrevented=!1}}class yr extends e.k{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(e,t,n){super(e,{originalEvent:n}),this._defaultPrevented=!1}}class vr{constructor(e,t){this._map=e,this._clickTolerance=t.clickTolerance}reset(){delete this._mousedownPos}wheel(e){return this._firePreventable(new yr(e.type,this._map,e))}mousedown(e,t){return this._mousedownPos=t,this._firePreventable(new gr(e.type,this._map,e))}mouseup(e){this._map.fire(new gr(e.type,this._map,e))}click(e,t){this._mousedownPos&&this._mousedownPos.dist(t)>=this._clickTolerance||this._map.fire(new gr(e.type,this._map,e))}dblclick(e){return this._firePreventable(new gr(e.type,this._map,e))}mouseover(e){this._map.fire(new gr(e.type,this._map,e))}mouseout(e){this._map.fire(new gr(e.type,this._map,e))}touchstart(e){return this._firePreventable(new mr(e.type,this._map,e))}touchmove(e){this._map.fire(new mr(e.type,this._map,e))}touchend(e){this._map.fire(new mr(e.type,this._map,e))}touchcancel(e){this._map.fire(new mr(e.type,this._map,e))}_firePreventable(e){if(this._map.fire(e),e.defaultPrevented)return{}}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class br{constructor(e){this._map=e}reset(){this._delayContextMenu=!1,this._ignoreContextMenu=!0,delete this._contextMenuEvent}mousemove(e){this._map.fire(new gr(e.type,this._map,e))}mousedown(){this._delayContextMenu=!0,this._ignoreContextMenu=!1}mouseup(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new gr("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)}contextmenu(e){this._delayContextMenu?this._contextMenuEvent=e:this._ignoreContextMenu||this._map.fire(new gr(e.type,this._map,e)),this._map.listens("contextmenu")&&e.preventDefault()}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class _r{constructor(e){this._map=e}get transform(){return this._map._requestedCameraState||this._map.transform}get center(){return{lng:this.transform.center.lng,lat:this.transform.center.lat}}get zoom(){return this.transform.zoom}get pitch(){return this.transform.pitch}get bearing(){return this.transform.bearing}unproject(t){return this.transform.pointLocation(e.P.convert(t),this._map.terrain)}}class wr{constructor(e,t){this._map=e,this._tr=new _r(e),this._el=e.getCanvasContainer(),this._container=e.getContainer(),this._clickTolerance=t.clickTolerance||1}isEnabled(){return!!this._enabled}isActive(){return!!this._active}enable(){this.isEnabled()||(this._enabled=!0)}disable(){this.isEnabled()&&(this._enabled=!1)}mousedown(e,n){this.isEnabled()&&e.shiftKey&&0===e.button&&(t.disableDrag(),this._startPos=this._lastPos=n,this._active=!0)}mousemoveWindow(e,n){if(!this._active)return;const r=n;if(this._lastPos.equals(r)||!this._box&&r.dist(this._startPos)e.fitScreenCoordinates(i,o,this._tr.bearing,{linear:!0})};this._fireEvent("boxzoomcancel",n)}keydown(e){this._active&&27===e.keyCode&&(this.reset(),this._fireEvent("boxzoomcancel",e))}reset(){this._active=!1,this._container.classList.remove("maplibregl-crosshair"),this._box&&(t.remove(this._box),this._box=null),t.enableDrag(),delete this._startPos,delete this._lastPos}_fireEvent(t,n){return this._map.fire(new e.k(t,{originalEvent:n}))}}function xr(e,t){if(e.length!==t.length)throw new Error(`The number of touches and points are not equal - touches ${e.length}, points ${t.length}`);const n={};for(let r=0;rthis.numTouches)&&(this.aborted=!0),this.aborted||(void 0===this.startTime&&(this.startTime=t.timeStamp),r.length===this.numTouches&&(this.centroid=function(t){const n=new e.P(0,0);for(const e of t)n._add(e);return n.div(t.length)}(n),this.touches=xr(r,n)))}touchmove(e,t,n){if(this.aborted||!this.centroid)return;const r=xr(n,t);for(const e in this.touches){const t=r[e];(!t||t.dist(this.touches[e])>30)&&(this.aborted=!0)}}touchend(e,t,n){if((!this.centroid||e.timeStamp-this.startTime>500)&&(this.aborted=!0),0===n.length){const e=!this.aborted&&this.centroid;if(this.reset(),e)return e}}}class Er{constructor(e){this.singleTap=new Mr(e),this.numTaps=e.numTaps,this.reset()}reset(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()}touchstart(e,t,n){this.singleTap.touchstart(e,t,n)}touchmove(e,t,n){this.singleTap.touchmove(e,t,n)}touchend(e,t,n){const r=this.singleTap.touchend(e,t,n);if(r){const t=e.timeStamp-this.lastTime<500,n=!this.lastTap||this.lastTap.dist(r)<30;if(t&&n||this.reset(),this.count++,this.lastTime=e.timeStamp,this.lastTap=r,this.count===this.numTaps)return this.reset(),r}}}class Or{constructor(e){this._tr=new _r(e),this._zoomIn=new Er({numTouches:1,numTaps:2}),this._zoomOut=new Er({numTouches:2,numTaps:1}),this.reset()}reset(){this._active=!1,this._zoomIn.reset(),this._zoomOut.reset()}touchstart(e,t,n){this._zoomIn.touchstart(e,t,n),this._zoomOut.touchstart(e,t,n)}touchmove(e,t,n){this._zoomIn.touchmove(e,t,n),this._zoomOut.touchmove(e,t,n)}touchend(e,t,n){const r=this._zoomIn.touchend(e,t,n),i=this._zoomOut.touchend(e,t,n),o=this._tr;return r?(this._active=!0,e.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:t=>t.easeTo({duration:300,zoom:o.zoom+1,around:o.unproject(r)},{originalEvent:e})}):i?(this._active=!0,e.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:t=>t.easeTo({duration:300,zoom:o.zoom-1,around:o.unproject(i)},{originalEvent:e})}):void 0}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class Sr{constructor(e){this._enabled=!!e.enable,this._moveStateManager=e.moveStateManager,this._clickTolerance=e.clickTolerance||1,this._moveFunction=e.move,this._activateOnStart=!!e.activateOnStart,e.assignEvents(this),this.reset()}reset(e){this._active=!1,this._moved=!1,delete this._lastPoint,this._moveStateManager.endMove(e)}_move(...e){const t=this._moveFunction(...e);if(t.bearingDelta||t.pitchDelta||t.around||t.panDelta)return this._active=!0,t}dragStart(e,t){this.isEnabled()&&!this._lastPoint&&this._moveStateManager.isValidStartEvent(e)&&(this._moveStateManager.startMove(e),this._lastPoint=t.length?t[0]:t,this._activateOnStart&&this._lastPoint&&(this._active=!0))}dragMove(e,t){if(!this.isEnabled())return;const n=this._lastPoint;if(!n)return;if(e.preventDefault(),!this._moveStateManager.isValidMoveEvent(e))return void this.reset(e);const r=t.length?t[0]:t;return!this._moved&&r.dist(n){e.mousedown=e.dragStart,e.mousemoveWindow=e.dragMove,e.mouseup=e.dragEnd,e.contextmenu=function(e){e.preventDefault()}},Ir=({enable:e,clickTolerance:n,bearingDegreesPerPixelMoved:r=.8})=>{const i=new Cr({checkCorrectEvent:e=>0===t.mouseButton(e)&&e.ctrlKey||2===t.mouseButton(e)});return new Sr({clickTolerance:n,move:(e,t)=>({bearingDelta:(t.x-e.x)*r}),moveStateManager:i,enable:e,assignEvents:Pr})},Dr=({enable:e,clickTolerance:n,pitchDegreesPerPixelMoved:r=-.5})=>{const i=new Cr({checkCorrectEvent:e=>0===t.mouseButton(e)&&e.ctrlKey||2===t.mouseButton(e)});return new Sr({clickTolerance:n,move:(e,t)=>({pitchDelta:(t.y-e.y)*r}),moveStateManager:i,enable:e,assignEvents:Pr})};class kr{constructor(e,t){this._minTouches=e.cooperativeGestures?2:1,this._clickTolerance=e.clickTolerance||1,this._map=t,this.reset()}reset(){this._active=!1,this._touches={},this._sum=new e.P(0,0),setTimeout(()=>{this._cancelCooperativeMessage=!1},200)}touchstart(e,t,n){return this._calculateTransform(e,t,n)}touchmove(e,t,n){if(this._map._cooperativeGestures&&(2===this._minTouches&&n.length<2&&!this._cancelCooperativeMessage?this._map._onCooperativeGesture(e,!1,n.length):this._cancelCooperativeMessage||(this._cancelCooperativeMessage=!0)),this._active&&!(n.length0&&(this._active=!0);const i=xr(r,n),o=new e.P(0,0),a=new e.P(0,0);let s=0;for(const e in i){const t=i[e],n=this._touches[e];n&&(o._add(t),a._add(t.sub(n)),s++,i[e]=t)}if(this._touches=i,sMath.abs(e.x)}class Hr extends Rr{constructor(e){super(),this._map=e}reset(){super.reset(),this._valid=void 0,delete this._firstMove,delete this._lastPoints}touchstart(e,t,n){super.touchstart(e,t,n),this._currentTouchCount=n.length}_start(e){this._lastPoints=e,Ur(e[0].sub(e[1]))&&(this._valid=!1)}_move(e,t,n){if(this._map._cooperativeGestures&&this._currentTouchCount<3)return;const r=e[0].sub(this._lastPoints[0]),i=e[1].sub(this._lastPoints[1]);return this._valid=this.gestureBeginsVertically(r,i,n.timeStamp),this._valid?(this._lastPoints=e,this._active=!0,{pitchDelta:(r.y+i.y)/2*-.5}):void 0}gestureBeginsVertically(e,t,n){if(void 0!==this._valid)return this._valid;const r=e.mag()>=2,i=t.mag()>=2;if(!r&&!i)return;if(!r||!i)return void 0===this._firstMove&&(this._firstMove=n),n-this._firstMove<100&&void 0;const o=e.y>0==t.y>0;return Ur(e)&&Ur(t)&&o}}const Vr={panStep:100,bearingStep:15,pitchStep:10};class Gr{constructor(e){this._tr=new _r(e);const t=Vr;this._panStep=t.panStep,this._bearingStep=t.bearingStep,this._pitchStep=t.pitchStep,this._rotationDisabled=!1}reset(){this._active=!1}keydown(e){if(e.altKey||e.ctrlKey||e.metaKey)return;let t=0,n=0,r=0,i=0,o=0;switch(e.keyCode){case 61:case 107:case 171:case 187:t=1;break;case 189:case 109:case 173:t=-1;break;case 37:e.shiftKey?n=-1:(e.preventDefault(),i=-1);break;case 39:e.shiftKey?n=1:(e.preventDefault(),i=1);break;case 38:e.shiftKey?r=1:(e.preventDefault(),o=-1);break;case 40:e.shiftKey?r=-1:(e.preventDefault(),o=1);break;default:return}return this._rotationDisabled&&(n=0,r=0),{cameraAnimation:a=>{const s=this._tr;a.easeTo({duration:300,easeId:"keyboardHandler",easing:Yr,zoom:t?Math.round(s.zoom)+t*(e.shiftKey?2:1):s.zoom,bearing:s.bearing+n*this._bearingStep,pitch:s.pitch+r*this._pitchStep,offset:[-i*this._panStep,-o*this._panStep],center:s.center},{originalEvent:e})}}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}disableRotation(){this._rotationDisabled=!0}enableRotation(){this._rotationDisabled=!1}}function Yr(e){return e*(2-e)}const Wr=4.000244140625;class qr{constructor(e,t){this._onTimeout=e=>{this._type="wheel",this._delta-=this._lastValue,this._active||this._start(e)},this._map=e,this._tr=new _r(e),this._el=e.getCanvasContainer(),this._triggerRenderFrame=t,this._delta=0,this._defaultZoomRate=.01,this._wheelZoomRate=.0022222222222222222}setZoomRate(e){this._defaultZoomRate=e}setWheelZoomRate(e){this._wheelZoomRate=e}isEnabled(){return!!this._enabled}isActive(){return!!this._active||void 0!==this._finishTimeout}isZooming(){return!!this._zooming}enable(e){this.isEnabled()||(this._enabled=!0,this._aroundCenter=!!e&&"center"===e.around)}disable(){this.isEnabled()&&(this._enabled=!1)}wheel(t){if(!this.isEnabled())return;if(this._map._cooperativeGestures){if(!t[this._map._metaKey])return;t.preventDefault()}let n=t.deltaMode===WheelEvent.DOM_DELTA_LINE?40*t.deltaY:t.deltaY;const r=e.h.now(),i=r-(this._lastWheelEventTime||0);this._lastWheelEventTime=r,0!==n&&n%Wr==0?this._type="wheel":0!==n&&Math.abs(n)<4?this._type="trackpad":i>400?(this._type=null,this._lastValue=n,this._timeout=setTimeout(this._onTimeout,40,t)):this._type||(this._type=Math.abs(i*n)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,n+=this._lastValue)),t.shiftKey&&n&&(n/=4),this._type&&(this._lastWheelEvent=t,this._delta-=n,this._active||this._start(t)),t.preventDefault()}_start(n){if(!this._delta)return;this._frameId&&(this._frameId=null),this._active=!0,this.isZooming()||(this._zooming=!0),this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout);const r=t.mousePos(this._el,n),i=this._tr;this._around=e.L.convert(this._aroundCenter?i.center:i.unproject(r)),this._aroundPoint=i.transform.locationPoint(this._around),this._frameId||(this._frameId=!0,this._triggerRenderFrame())}renderFrame(){if(!this._frameId)return;if(this._frameId=null,!this.isActive())return;const t=this._tr.transform;if(0!==this._delta){const e="wheel"===this._type&&Math.abs(this._delta)>Wr?this._wheelZoomRate:this._defaultZoomRate;let n=2/(1+Math.exp(-Math.abs(this._delta*e)));this._delta<0&&0!==n&&(n=1/n);const r="number"==typeof this._targetZoom?t.zoomScale(this._targetZoom):t.scale;this._targetZoom=Math.min(t.maxZoom,Math.max(t.minZoom,t.scaleZoom(r*n))),"wheel"===this._type&&(this._startZoom=t.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}const n="number"==typeof this._targetZoom?this._targetZoom:t.zoom,r=this._startZoom,i=this._easing;let o,a=!1;if("wheel"===this._type&&r&&i){const t=Math.min((e.h.now()-this._lastWheelEventTime)/200,1),s=i(t);o=e.B.number(r,n,s),t<1?this._frameId||(this._frameId=!0):a=!0}else o=n,a=!0;return this._active=!0,a&&(this._active=!1,this._finishTimeout=setTimeout(()=>{this._zooming=!1,this._triggerRenderFrame(),delete this._targetZoom,delete this._finishTimeout},200)),{noInertia:!0,needsRenderFrame:!a,zoomDelta:o-t.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}_smoothOutEasing(t){let n=e.bb;if(this._prevEase){const t=this._prevEase,r=(e.h.now()-t.start)/t.duration,i=t.easing(r+.01)-t.easing(r),o=.27/Math.sqrt(i*i+1e-4)*.01,a=Math.sqrt(.0729-o*o);n=e.ba(o,a,.25,1)}return this._prevEase={start:e.h.now(),duration:t,easing:n},n}reset(){this._active=!1,this._zooming=!1,delete this._targetZoom,this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout)}}class Xr{constructor(e,t){this._clickZoom=e,this._tapZoom=t}enable(){this._clickZoom.enable(),this._tapZoom.enable()}disable(){this._clickZoom.disable(),this._tapZoom.disable()}isEnabled(){return this._clickZoom.isEnabled()&&this._tapZoom.isEnabled()}isActive(){return this._clickZoom.isActive()||this._tapZoom.isActive()}}class Zr{constructor(e){this._tr=new _r(e),this.reset()}reset(){this._active=!1}dblclick(e,t){return e.preventDefault(),{cameraAnimation:n=>{n.easeTo({duration:300,zoom:this._tr.zoom+(e.shiftKey?-1:1),around:this._tr.unproject(t)},{originalEvent:e})}}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class Kr{constructor(){this._tap=new Er({numTouches:1,numTaps:1}),this.reset()}reset(){this._active=!1,delete this._swipePoint,delete this._swipeTouch,delete this._tapTime,delete this._tapPoint,this._tap.reset()}touchstart(e,t,n){if(!this._swipePoint)if(this._tapTime){const r=t[0],i=e.timeStamp-this._tapTime<500,o=this._tapPoint.dist(r)<30;i&&o?n.length>0&&(this._swipePoint=r,this._swipeTouch=n[0].identifier):this.reset()}else this._tap.touchstart(e,t,n)}touchmove(e,t,n){if(this._tapTime){if(this._swipePoint){if(n[0].identifier!==this._swipeTouch)return;const r=t[0],i=r.y-this._swipePoint.y;return this._swipePoint=r,e.preventDefault(),this._active=!0,{zoomDelta:i/128}}}else this._tap.touchmove(e,t,n)}touchend(e,t,n){if(this._tapTime)this._swipePoint&&0===n.length&&this.reset();else{const r=this._tap.touchend(e,t,n);r&&(this._tapTime=e.timeStamp,this._tapPoint=r)}}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class Qr{constructor(e,t,n){this._el=e,this._mousePan=t,this._touchPan=n}enable(e){this._inertiaOptions=e||{},this._mousePan.enable(),this._touchPan.enable(),this._el.classList.add("maplibregl-touch-drag-pan")}disable(){this._mousePan.disable(),this._touchPan.disable(),this._el.classList.remove("maplibregl-touch-drag-pan")}isEnabled(){return this._mousePan.isEnabled()&&this._touchPan.isEnabled()}isActive(){return this._mousePan.isActive()||this._touchPan.isActive()}}class Jr{constructor(e,t,n){this._pitchWithRotate=e.pitchWithRotate,this._mouseRotate=t,this._mousePitch=n}enable(){this._mouseRotate.enable(),this._pitchWithRotate&&this._mousePitch.enable()}disable(){this._mouseRotate.disable(),this._mousePitch.disable()}isEnabled(){return this._mouseRotate.isEnabled()&&(!this._pitchWithRotate||this._mousePitch.isEnabled())}isActive(){return this._mouseRotate.isActive()||this._mousePitch.isActive()}}class $r{constructor(e,t,n,r){this._el=e,this._touchZoom=t,this._touchRotate=n,this._tapDragZoom=r,this._rotationDisabled=!1,this._enabled=!0}enable(e){this._touchZoom.enable(e),this._rotationDisabled||this._touchRotate.enable(e),this._tapDragZoom.enable(),this._el.classList.add("maplibregl-touch-zoom-rotate")}disable(){this._touchZoom.disable(),this._touchRotate.disable(),this._tapDragZoom.disable(),this._el.classList.remove("maplibregl-touch-zoom-rotate")}isEnabled(){return this._touchZoom.isEnabled()&&(this._rotationDisabled||this._touchRotate.isEnabled())&&this._tapDragZoom.isEnabled()}isActive(){return this._touchZoom.isActive()||this._touchRotate.isActive()||this._tapDragZoom.isActive()}disableRotation(){this._rotationDisabled=!0,this._touchRotate.disable()}enableRotation(){this._rotationDisabled=!1,this._touchZoom.isEnabled()&&this._touchRotate.enable()}}const ei=e=>e.zoom||e.drag||e.pitch||e.rotate;class ti extends e.k{}function ni(e){return e.panDelta&&e.panDelta.mag()||e.zoomDelta||e.bearingDelta||e.pitchDelta}class ri{constructor(e,n){this.handleWindowEvent=e=>{this.handleEvent(e,e.type+"Window")},this.handleEvent=(e,n)=>{if("blur"===e.type)return void this.stop(!0);this._updatingCamera=!0;const r="renderFrame"===e.type?void 0:e,i={needsRenderFrame:!1},o={},a={},s=e.touches,l=s?this._getMapTouches(s):void 0,u=l?t.touchPos(this._el,l):t.mousePos(this._el,e);for(const{handlerName:t,handler:s,allowed:c}of this._handlers){if(!s.isEnabled())continue;let d;this._blockedByActive(a,c,t)?s.reset():s[n||e.type]&&(d=s[n||e.type](e,u,l),this.mergeHandlerResult(i,o,d,t,r),d&&d.needsRenderFrame&&this._triggerRenderFrame()),(d||s.isActive())&&(a[t]=s)}const c={};for(const e in this._previousActiveHandlers)a[e]||(c[e]=r);this._previousActiveHandlers=a,(Object.keys(c).length||ni(i))&&(this._changes.push([i,o,c]),this._triggerRenderFrame()),(Object.keys(a).length||ni(i))&&this._map._stop(!0),this._updatingCamera=!1;const{cameraAnimation:d}=i;d&&(this._inertia.clear(),this._fireEvents({},{},!0),this._changes=[],d(this._map))},this._map=e,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new hr(e),this._bearingSnap=n.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(n);const r=this._el;this._listeners=[[r,"touchstart",{passive:!0}],[r,"touchmove",{passive:!1}],[r,"touchend",void 0],[r,"touchcancel",void 0],[r,"mousedown",void 0],[r,"mousemove",void 0],[r,"mouseup",void 0],[document,"mousemove",{capture:!0}],[document,"mouseup",void 0],[r,"mouseover",void 0],[r,"mouseout",void 0],[r,"dblclick",void 0],[r,"click",void 0],[r,"keydown",{capture:!1}],[r,"keyup",void 0],[r,"wheel",{passive:!1}],[r,"contextmenu",void 0],[window,"blur",void 0]];for(const[e,n,r]of this._listeners)t.addEventListener(e,n,e===document?this.handleWindowEvent:this.handleEvent,r)}destroy(){for(const[e,n,r]of this._listeners)t.removeEventListener(e,n,e===document?this.handleWindowEvent:this.handleEvent,r)}_addDefaultHandlers(e){const n=this._map,r=n.getCanvasContainer();this._add("mapEvent",new vr(n,e));const i=n.boxZoom=new wr(n,e);this._add("boxZoom",i),e.interactive&&e.boxZoom&&i.enable();const o=new Or(n),a=new Zr(n);n.doubleClickZoom=new Xr(a,o),this._add("tapZoom",o),this._add("clickZoom",a),e.interactive&&e.doubleClickZoom&&n.doubleClickZoom.enable();const s=new Kr;this._add("tapDragZoom",s);const l=n.touchPitch=new Hr(n);this._add("touchPitch",l),e.interactive&&e.touchPitch&&n.touchPitch.enable(e.touchPitch);const u=Ir(e),c=Dr(e);n.dragRotate=new Jr(e,u,c),this._add("mouseRotate",u,["mousePitch"]),this._add("mousePitch",c,["mouseRotate"]),e.interactive&&e.dragRotate&&n.dragRotate.enable();const d=(({enable:e,clickTolerance:n})=>{const r=new Cr({checkCorrectEvent:e=>0===t.mouseButton(e)&&!e.ctrlKey});return new Sr({clickTolerance:n,move:(e,t)=>({around:t,panDelta:t.sub(e)}),activateOnStart:!0,moveStateManager:r,enable:e,assignEvents:Pr})})(e),f=new kr(e,n);n.dragPan=new Qr(r,d,f),this._add("mousePan",d),this._add("touchPan",f,["touchZoom","touchRotate"]),e.interactive&&e.dragPan&&n.dragPan.enable(e.dragPan);const h=new zr,p=new Nr;n.touchZoomRotate=new $r(r,p,h,s),this._add("touchRotate",h,["touchPan","touchZoom"]),this._add("touchZoom",p,["touchPan","touchRotate"]),e.interactive&&e.touchZoomRotate&&n.touchZoomRotate.enable(e.touchZoomRotate);const A=n.scrollZoom=new qr(n,()=>this._triggerRenderFrame());this._add("scrollZoom",A,["mousePan"]),e.interactive&&e.scrollZoom&&n.scrollZoom.enable(e.scrollZoom);const g=n.keyboard=new Gr(n);this._add("keyboard",g),e.interactive&&e.keyboard&&n.keyboard.enable(),this._add("blockableMapEvent",new br(n))}_add(e,t,n){this._handlers.push({handlerName:e,handler:t,allowed:n}),this._handlersById[e]=t}stop(e){if(!this._updatingCamera){for(const{handler:e}of this._handlers)e.reset();this._inertia.clear(),this._fireEvents({},{},e),this._changes=[]}}isActive(){for(const{handler:e}of this._handlers)if(e.isActive())return!0;return!1}isZooming(){return!!this._eventsInProgress.zoom||this._map.scrollZoom.isZooming()}isRotating(){return!!this._eventsInProgress.rotate}isMoving(){return Boolean(ei(this._eventsInProgress))||this.isZooming()}_blockedByActive(e,t,n){for(const r in e)if(r!==n&&(!t||t.indexOf(r)<0))return!0;return!1}_getMapTouches(e){const t=[];for(const n of e)this._el.contains(n.target)&&t.push(n);return t}mergeHandlerResult(t,n,r,i,o){if(!r)return;e.e(t,r);const a={handlerName:i,originalEvent:r.originalEvent||o};void 0!==r.zoomDelta&&(n.zoom=a),void 0!==r.panDelta&&(n.drag=a),void 0!==r.pitchDelta&&(n.pitch=a),void 0!==r.bearingDelta&&(n.rotate=a)}_applyChanges(){const t={},n={},r={};for(const[i,o,a]of this._changes)i.panDelta&&(t.panDelta=(t.panDelta||new e.P(0,0))._add(i.panDelta)),i.zoomDelta&&(t.zoomDelta=(t.zoomDelta||0)+i.zoomDelta),i.bearingDelta&&(t.bearingDelta=(t.bearingDelta||0)+i.bearingDelta),i.pitchDelta&&(t.pitchDelta=(t.pitchDelta||0)+i.pitchDelta),void 0!==i.around&&(t.around=i.around),void 0!==i.pinchAround&&(t.pinchAround=i.pinchAround),i.noInertia&&(t.noInertia=i.noInertia),e.e(n,o),e.e(r,a);this._updateMapTransform(t,n,r),this._changes=[]}_updateMapTransform(e,t,n){const r=this._map,i=r._getTransformForUpdate(),o=r.terrain;if(!(ni(e)||o&&this._terrainMovement))return this._fireEvents(t,n,!0);let{panDelta:a,zoomDelta:s,bearingDelta:l,pitchDelta:u,around:c,pinchAround:d}=e;void 0!==d&&(c=d),r._stop(!0),c=c||r.transform.centerPoint;const f=i.pointLocation(a?c.sub(a):c);l&&(i.bearing+=l),u&&(i.pitch+=u),s&&(i.zoom+=s),o?this._terrainMovement||!t.drag&&!t.zoom?t.drag&&this._terrainMovement?i.center=i.pointLocation(i.centerPoint.sub(a)):i.setLocationAtPoint(f,c):(this._terrainMovement=!0,this._map._elevationFreeze=!0,i.setLocationAtPoint(f,c),this._map.once("moveend",()=>{this._map._elevationFreeze=!1,this._terrainMovement=!1,i.recalculateZoom(r.terrain)})):i.setLocationAtPoint(f,c),r._applyUpdatedTransform(i),this._map._update(),e.noInertia||this._inertia.record(e),this._fireEvents(t,n,!0)}_fireEvents(t,n,r){const i=ei(this._eventsInProgress),o=ei(t),a={};for(const e in t){const{originalEvent:n}=t[e];this._eventsInProgress[e]||(a[e+"start"]=n),this._eventsInProgress[e]=t[e]}!i&&o&&this._fireEvent("movestart",o.originalEvent);for(const e in a)this._fireEvent(e,a[e]);o&&this._fireEvent("move",o.originalEvent);for(const e in t){const{originalEvent:n}=t[e];this._fireEvent(e,n)}const s={};let l;for(const e in this._eventsInProgress){const{handlerName:t,originalEvent:r}=this._eventsInProgress[e];this._handlersById[t].isActive()||(delete this._eventsInProgress[e],l=n[t]||r,s[e+"end"]=l)}for(const e in s)this._fireEvent(e,s[e]);const u=ei(this._eventsInProgress);if(r&&(i||o)&&!u){this._updatingCamera=!0;const t=this._inertia._onMoveEnd(this._map.dragPan._inertiaOptions),n=e=>0!==e&&-this._bearingSnap{delete this._frameId,this.handleEvent(new ti("renderFrame",{timeStamp:e})),this._applyChanges()})}_triggerRenderFrame(){void 0===this._frameId&&(this._frameId=this._requestFrame())}}class ii extends e.E{constructor(t,n){super(),this._renderFrameCallback=()=>{const t=Math.min((e.h.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(t)),t<1&&this._easeFrameId?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},this._moving=!1,this._zooming=!1,this.transform=t,this._bearingSnap=n.bearingSnap,this.on("moveend",()=>{delete this._requestedCameraState})}getCenter(){return new e.L(this.transform.center.lng,this.transform.center.lat)}setCenter(e,t){return this.jumpTo({center:e},t)}panBy(t,n,r){return t=e.P.convert(t).mult(-1),this.panTo(this.transform.center,e.e({offset:t},n),r)}panTo(t,n,r){return this.easeTo(e.e({center:t},n),r)}getZoom(){return this.transform.zoom}setZoom(e,t){return this.jumpTo({zoom:e},t),this}zoomTo(t,n,r){return this.easeTo(e.e({zoom:t},n),r)}zoomIn(e,t){return this.zoomTo(this.getZoom()+1,e,t),this}zoomOut(e,t){return this.zoomTo(this.getZoom()-1,e,t),this}getBearing(){return this.transform.bearing}setBearing(e,t){return this.jumpTo({bearing:e},t),this}getPadding(){return this.transform.padding}setPadding(e,t){return this.jumpTo({padding:e},t),this}rotateTo(t,n,r){return this.easeTo(e.e({bearing:t},n),r)}resetNorth(t,n){return this.rotateTo(0,e.e({duration:1e3},t),n),this}resetNorthPitch(t,n){return this.easeTo(e.e({bearing:0,pitch:0,duration:1e3},t),n),this}snapToNorth(e,t){return Math.abs(this.getBearing()){if(this._zooming&&(r.zoom=e.B.number(i,l,p)),this._rotating&&(r.bearing=e.B.number(o,u,p)),this._pitching&&(r.pitch=e.B.number(a,c,p)),this._padding&&(r.interpolatePadding(s,d,p),h=r.centerPoint.add(f)),this.terrain&&!t.freezeElevation&&this._updateElevation(p),v)r.setLocationAtPoint(v,b);else{const e=r.zoomScale(r.zoom-i),t=l>i?Math.min(2,y):Math.max(.5,y),n=Math.pow(t,1-p),o=r.unproject(g.add(m.mult(p*n)).mult(e));r.setLocationAtPoint(r.renderWorldCopies?o.wrap():o,h)}this._applyUpdatedTransform(r),this._fireMoveEvents(n)},e=>{this.terrain&&this._finalizeElevation(),this._afterEase(n,e)},t),this}_prepareEase(t,n,r={}){this._moving=!0,n||r.moving||this.fire(new e.k("movestart",t)),this._zooming&&!r.zooming&&this.fire(new e.k("zoomstart",t)),this._rotating&&!r.rotating&&this.fire(new e.k("rotatestart",t)),this._pitching&&!r.pitching&&this.fire(new e.k("pitchstart",t))}_prepareElevation(e){this._elevationCenter=e,this._elevationStart=this.transform.elevation,this._elevationTarget=this.terrain.getElevationForLngLatZoom(e,this.transform.tileZoom),this._elevationFreeze=!0}_updateElevation(t){this.transform._minEleveationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom);const n=this.terrain.getElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom);if(t<1&&n!==this._elevationTarget){const e=this._elevationTarget-this._elevationStart;this._elevationStart+=t*(e-(n-(e*t+this._elevationStart))/(1-t)),this._elevationTarget=n}this.transform.elevation=e.B.number(this._elevationStart,this._elevationTarget,t)}_finalizeElevation(){this._elevationFreeze=!1,this.transform.recalculateZoom(this.terrain)}_getTransformForUpdate(){return this.transformCameraUpdate?(this._requestedCameraState||(this._requestedCameraState=this.transform.clone()),this._requestedCameraState):this.transform}_applyUpdatedTransform(e){if(!this.transformCameraUpdate)return;const t=e.clone(),{center:n,zoom:r,pitch:i,bearing:o,elevation:a}=this.transformCameraUpdate(t);n&&(t.center=n),void 0!==r&&(t.zoom=r),void 0!==i&&(t.pitch=i),void 0!==o&&(t.bearing=o),void 0!==a&&(t.elevation=a),this.transform.apply(t)}_fireMoveEvents(t){this.fire(new e.k("move",t)),this._zooming&&this.fire(new e.k("zoom",t)),this._rotating&&this.fire(new e.k("rotate",t)),this._pitching&&this.fire(new e.k("pitch",t))}_afterEase(t,n){if(this._easeId&&n&&this._easeId===n)return;delete this._easeId;const r=this._zooming,i=this._rotating,o=this._pitching;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._padding=!1,r&&this.fire(new e.k("zoomend",t)),i&&this.fire(new e.k("rotateend",t)),o&&this.fire(new e.k("pitchend",t)),this.fire(new e.k("moveend",t))}flyTo(t,n){if(!t.essential&&e.h.prefersReducedMotion){const r=e.F(t,["center","zoom","bearing","pitch","around"]);return this.jumpTo(r,n)}this.stop(),t=e.e({offset:[0,0],speed:1.2,curve:1.42,easing:e.bb},t);const r=this._getTransformForUpdate(),i=this.getZoom(),o=this.getBearing(),a=this.getPitch(),s=this.getPadding(),l="zoom"in t?e.ad(+t.zoom,r.minZoom,r.maxZoom):i,u="bearing"in t?this._normalizeBearing(t.bearing,o):o,c="pitch"in t?+t.pitch:a,d="padding"in t?t.padding:r.padding,f=r.zoomScale(l-i),h=e.P.convert(t.offset);let p=r.centerPoint.add(h);const A=r.pointLocation(p),g=e.L.convert(t.center||A);this._normalizeCenter(g);const m=r.project(A),y=r.project(g).sub(m);let v=t.curve;const b=Math.max(r.width,r.height),_=b/f,w=y.mag();if("minZoom"in t){const n=e.ad(Math.min(t.minZoom,i,l),r.minZoom,r.maxZoom),o=b/r.zoomScale(n-i);v=Math.sqrt(o/w*2)}const x=v*v;function M(e){const t=(_*_-b*b+(e?-1:1)*x*x*w*w)/(2*(e?_:b)*x*w);return Math.log(Math.sqrt(t*t+1)-t)}function E(e){return(Math.exp(e)-Math.exp(-e))/2}function O(e){return(Math.exp(e)+Math.exp(-e))/2}const S=M(!1);let T=function(e){return O(S)/O(S+v*e)},C=function(e){return b*((O(S)*(E(t=S+v*e)/O(t))-E(S))/x)/w;var t},L=(M(!0)-S)/v;if(Math.abs(w)<1e-6||!isFinite(L)){if(Math.abs(b-_)<1e-6)return this.easeTo(t,n);const e=_t.maxDuration&&(t.duration=0),this._zooming=!0,this._rotating=o!==u,this._pitching=c!==a,this._padding=!r.isPaddingEqual(d),this._prepareEase(n,!1),this.terrain&&this._prepareElevation(g),this._ease(f=>{const A=f*L,v=1/T(A);r.zoom=1===f?l:i+r.scaleZoom(v),this._rotating&&(r.bearing=e.B.number(o,u,f)),this._pitching&&(r.pitch=e.B.number(a,c,f)),this._padding&&(r.interpolatePadding(s,d,f),p=r.centerPoint.add(h)),this.terrain&&!t.freezeElevation&&this._updateElevation(f);const b=1===f?g:r.unproject(m.add(y.mult(C(A))).mult(v));r.setLocationAtPoint(r.renderWorldCopies?b.wrap():b,p),this._applyUpdatedTransform(r),this._fireMoveEvents(n)},()=>{this.terrain&&this._finalizeElevation(),this._afterEase(n)},t),this}isEasing(){return!!this._easeFrameId}stop(){return this._stop()}_stop(e,t){if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){const e=this._onEaseEnd;delete this._onEaseEnd,e.call(this,t)}if(!e){const e=this.handlers;e&&e.stop(!1)}return this}_ease(t,n,r){!1===r.animate||0===r.duration?(t(1),n()):(this._easeStart=e.h.now(),this._easeOptions=r,this._onEaseFrame=t,this._onEaseEnd=n,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))}_normalizeBearing(t,n){t=e.b5(t,-180,180);const r=Math.abs(t-n);return Math.abs(t-360-n)180?-360:n<-180?360:0}queryTerrainElevation(t){return this.terrain?this.terrain.getElevationForLngLatZoom(e.L.convert(t),this.transform.tileZoom)-this.transform.elevation:null}}class oi{constructor(e={}){this._toggleAttribution=()=>{this._container.classList.contains("maplibregl-compact")&&(this._container.classList.contains("maplibregl-compact-show")?(this._container.setAttribute("open",""),this._container.classList.remove("maplibregl-compact-show")):(this._container.classList.add("maplibregl-compact-show"),this._container.removeAttribute("open")))},this._updateData=e=>{!e||"metadata"!==e.sourceDataType&&"visibility"!==e.sourceDataType&&"style"!==e.dataType&&"terrain"!==e.type||this._updateAttributions()},this._updateCompact=()=>{this._map.getCanvasContainer().offsetWidth<=640||this._compact?!1===this._compact?this._container.setAttribute("open",""):this._container.classList.contains("maplibregl-compact")||this._container.classList.contains("maplibregl-attrib-empty")||(this._container.setAttribute("open",""),this._container.classList.add("maplibregl-compact","maplibregl-compact-show")):(this._container.setAttribute("open",""),this._container.classList.contains("maplibregl-compact")&&this._container.classList.remove("maplibregl-compact","maplibregl-compact-show"))},this._updateCompactMinimize=()=>{this._container.classList.contains("maplibregl-compact")&&this._container.classList.contains("maplibregl-compact-show")&&this._container.classList.remove("maplibregl-compact-show")},this.options=e}getDefaultPosition(){return"bottom-right"}onAdd(e){return this._map=e,this._compact=this.options&&this.options.compact,this._container=t.create("details","maplibregl-ctrl maplibregl-ctrl-attrib"),this._compactButton=t.create("summary","maplibregl-ctrl-attrib-button",this._container),this._compactButton.addEventListener("click",this._toggleAttribution),this._setElementTitle(this._compactButton,"ToggleAttribution"),this._innerContainer=t.create("div","maplibregl-ctrl-attrib-inner",this._container),this._updateAttributions(),this._updateCompact(),this._map.on("styledata",this._updateData),this._map.on("sourcedata",this._updateData),this._map.on("terrain",this._updateData),this._map.on("resize",this._updateCompact),this._map.on("drag",this._updateCompactMinimize),this._container}onRemove(){t.remove(this._container),this._map.off("styledata",this._updateData),this._map.off("sourcedata",this._updateData),this._map.off("terrain",this._updateData),this._map.off("resize",this._updateCompact),this._map.off("drag",this._updateCompactMinimize),this._map=void 0,this._compact=void 0,this._attribHTML=void 0}_setElementTitle(e,t){const n=this._map._getUIString("AttributionControl."+t);e.title=n,e.setAttribute("aria-label",n)}_updateAttributions(){if(!this._map.style)return;let e=[];if(this.options.customAttribution&&(Array.isArray(this.options.customAttribution)?e=e.concat(this.options.customAttribution.map(e=>"string"!=typeof e?"":e)):"string"==typeof this.options.customAttribution&&e.push(this.options.customAttribution)),this._map.style.stylesheet){const e=this._map.style.stylesheet;this.styleOwner=e.owner,this.styleId=e.id}const t=this._map.style.sourceCaches;for(const n in t){const r=t[n];if(r.used||r.usedForTerrain){const t=r.getSource();t.attribution&&e.indexOf(t.attribution)<0&&e.push(t.attribution)}}e=e.filter(e=>String(e).trim()),e.sort((e,t)=>e.length-t.length),e=e.filter((t,n)=>{for(let r=n+1;r=0)return!1;return!0});const n=e.join(" | ");n!==this._attribHTML&&(this._attribHTML=n,e.length?(this._innerContainer.innerHTML=n,this._container.classList.remove("maplibregl-attrib-empty")):this._container.classList.add("maplibregl-attrib-empty"),this._updateCompact(),this._editLink=null)}}class ai{constructor(e={}){this._updateCompact=()=>{const e=this._container.children;if(e.length){const t=e[0];this._map.getCanvasContainer().offsetWidth<=640||this._compact?!1!==this._compact&&t.classList.add("maplibregl-compact"):t.classList.remove("maplibregl-compact")}},this.options=e}getDefaultPosition(){return"bottom-left"}onAdd(e){this._map=e,this._compact=this.options&&this.options.compact,this._container=t.create("div","maplibregl-ctrl");const n=t.create("a","maplibregl-ctrl-logo");return n.target="_blank",n.rel="noopener nofollow",n.href="https://maplibre.org/",n.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),n.setAttribute("rel","noopener nofollow"),this._container.appendChild(n),this._container.style.display="block",this._map.on("resize",this._updateCompact),this._updateCompact(),this._container}onRemove(){t.remove(this._container),this._map.off("resize",this._updateCompact),this._map=void 0,this._compact=void 0}}class si{constructor(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1}add(e){const t=++this._id;return this._queue.push({callback:e,id:t,cancelled:!1}),t}remove(e){const t=this._currentlyRunning,n=t?this._queue.concat(t):this._queue;for(const t of n)if(t.id===e)return void(t.cancelled=!0)}run(e=0){if(this._currentlyRunning)throw new Error("Attempting to run(), but is already running.");const t=this._currentlyRunning=this._queue;this._queue=[];for(const n of t)if(!n.cancelled&&(n.callback(e),this._cleared))break;this._cleared=!1,this._currentlyRunning=!1}clear(){this._currentlyRunning&&(this._cleared=!0),this._queue=[]}}const li={"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","TerrainControl.enableTerrain":"Enable terrain","TerrainControl.disableTerrain":"Disable terrain"};var ui=e.Q([{name:"a_pos3d",type:"Int16",components:3}]);class ci extends e.E{constructor(e){super(),this.sourceCache=e,this._tiles={},this._renderableTilesKeys=[],this._sourceTileCache={},this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.deltaZoom=1,e.usedForTerrain=!0,e.tileSize=this.tileSize*2**this.deltaZoom}destruct(){this.sourceCache.usedForTerrain=!1,this.sourceCache.tileSize=null}update(t,n){this.sourceCache.update(t,n),this._renderableTilesKeys=[];const r={};for(const i of t.coveringTiles({tileSize:this.tileSize,minzoom:this.minzoom,maxzoom:this.maxzoom,reparseOverscaled:!1,terrain:n}))r[i.key]=!0,this._renderableTilesKeys.push(i.key),this._tiles[i.key]||(i.posMatrix=new Float64Array(16),e.aS(i.posMatrix,0,e.N,0,e.N,0,1),this._tiles[i.key]=new W(i,this.tileSize));for(const e in this._tiles)r[e]||delete this._tiles[e]}freeRtt(e){for(const t in this._tiles){const n=this._tiles[t];(!e||n.tileID.equals(e)||n.tileID.isChildOf(e)||e.isChildOf(n.tileID))&&(n.rtt=[])}}getRenderableTiles(){return this._renderableTilesKeys.map(e=>this.getTileByID(e))}getTileByID(e){return this._tiles[e]}getTerrainCoords(t){const n={};for(const r of this._renderableTilesKeys){const i=this._tiles[r].tileID;if(i.canonical.equals(t.canonical)){const i=t.clone();i.posMatrix=new Float64Array(16),e.aS(i.posMatrix,0,e.N,0,e.N,0,1),n[r]=i}else if(i.canonical.isChildOf(t.canonical)){const o=t.clone();o.posMatrix=new Float64Array(16);const a=i.canonical.z-t.canonical.z,s=i.canonical.x-(i.canonical.x>>a<>a<>a;e.aS(o.posMatrix,0,u,0,u,0,1),e.$(o.posMatrix,o.posMatrix,[-s*u,-l*u,0]),n[r]=o}else if(t.canonical.isChildOf(i.canonical)){const o=t.clone();o.posMatrix=new Float64Array(16);const a=t.canonical.z-i.canonical.z,s=t.canonical.x-(t.canonical.x>>a<>a<>a;e.aS(o.posMatrix,0,e.N,0,e.N,0,1),e.$(o.posMatrix,o.posMatrix,[s*u,l*u,0]),e.a0(o.posMatrix,o.posMatrix,[1/2**a,1/2**a,0]),n[r]=o}}return n}getSourceTile(e,t){const n=this.sourceCache._source;let r=e.overscaledZ-this.deltaZoom;if(r>n.maxzoom&&(r=n.maxzoom),r=n.minzoom&&(!i||!i.dem);)i=this.sourceCache.getTileByID(e.scaledTo(r--).key);return i}tilesAfterTime(e=Date.now()){return Object.values(this._tiles).filter(t=>t.timeAdded>=e)}}class di{constructor(e,t,n){this.painter=e,this.sourceCache=new ci(t),this.options=n,this.exaggeration="number"==typeof n.exaggeration?n.exaggeration:1,this.qualityFactor=2,this.meshSize=128,this._demMatrixCache={},this.coordsIndex=[],this._coordsTextureSize=1024}getDEMElevation(t,n,r,i=e.N){var o;if(!(n>=0&&n=0&&rt.canonical.z&&(t.canonical.z>=r?i=t.canonical.z-r:e.w("cannot calculate elevation if elevation maxzoom > source.maxzoom"));const o=t.canonical.x-(t.canonical.x>>i<>i<>8<<4|e>>8,n[t+3]=0;const r=new e.R({width:this._coordsTextureSize,height:this._coordsTextureSize},new Uint8Array(n.buffer)),i=new y(t,r,t.gl.RGBA,{premultiply:!1});return i.bind(t.gl.NEAREST,t.gl.CLAMP_TO_EDGE),this._coordsTexture=i,i}pointCoordinate(t){const n=new Uint8Array(4),r=this.painter.context,i=r.gl;r.bindFramebuffer.set(this.getFramebuffer("coords").framebuffer),i.readPixels(t.x,this.painter.height/devicePixelRatio-t.y-1,1,1,i.RGBA,i.UNSIGNED_BYTE,n),r.bindFramebuffer.set(null);const o=n[0]+(n[2]>>4<<8),a=n[1]+((15&n[2])<<8),s=this.coordsIndex[255-n[3]],l=s&&this.sourceCache.getTileByID(s);if(!l)return null;const u=this._coordsTextureSize,c=(1<0&&Math.sign(o)<0||!r&&Math.sign(i)<0&&Math.sign(o)>0?(i=360*Math.sign(o)+i,e.G(i)):n}}class fi{constructor(e,t,n){this._context=e,this._size=t,this._tileSize=n,this._objects=[],this._recentlyUsed=[],this._stamp=0}destruct(){for(const e of this._objects)e.texture.destroy(),e.fbo.destroy()}_createObject(e){const t=this._context.createFramebuffer(this._tileSize,this._tileSize,!0,!0),n=new y(this._context,{width:this._tileSize,height:this._tileSize,data:null},this._context.gl.RGBA);return n.bind(this._context.gl.LINEAR,this._context.gl.CLAMP_TO_EDGE),t.depthAttachment.set(this._context.createRenderbuffer(this._context.gl.DEPTH_STENCIL,this._tileSize,this._tileSize)),t.colorAttachment.set(n.texture),{id:e,fbo:t,texture:n,stamp:-1,inUse:!1}}getObjectForId(e){return this._objects[e]}useObject(e){e.inUse=!0,this._recentlyUsed=this._recentlyUsed.filter(t=>e.id!==t),this._recentlyUsed.push(e.id)}stampObject(e){e.stamp=++this._stamp}getOrCreateFreeObject(){for(const e of this._recentlyUsed)if(!this._objects[e].inUse)return this._objects[e];if(this._objects.length>=this._size)throw new Error("No free RenderPool available, call freeAllObjects() required!");const e=this._createObject(this._objects.length);return this._objects.push(e),e}freeObject(e){e.inUse=!1}freeAllObjects(){for(const e of this._objects)this.freeObject(e)}isFull(){return!(this._objects.length!e.inUse)}}const hi={background:!0,fill:!0,line:!0,raster:!0,hillshade:!0};class pi{constructor(e,t){this.painter=e,this.terrain=t,this.pool=new fi(e.context,30,t.sourceCache.tileSize*t.qualityFactor)}destruct(){this.pool.destruct()}getTexture(e){return this.pool.getObjectForId(e.rtt[this._stacks.length-1].id).texture}prepareForRender(e,t){this._stacks=[],this._prevType=null,this._rttTiles=[],this._renderableTiles=this.terrain.sourceCache.getRenderableTiles(),this._renderableLayerIds=e._order.filter(n=>!e._layers[n].isHidden(t)),this._coordsDescendingInv={};for(const t in e.sourceCaches){this._coordsDescendingInv[t]={};const n=e.sourceCaches[t].getVisibleCoordinates();for(const e of n){const n=this.terrain.sourceCache.getTerrainCoords(e);for(const e in n)this._coordsDescendingInv[t][e]||(this._coordsDescendingInv[t][e]=[]),this._coordsDescendingInv[t][e].push(n[e])}}this._coordsDescendingInvStr={};for(const t of e._order){const n=e._layers[t],r=n.source;if(hi[n.type]&&!this._coordsDescendingInvStr[r]){this._coordsDescendingInvStr[r]={};for(const e in this._coordsDescendingInv[r])this._coordsDescendingInvStr[r][e]=this._coordsDescendingInv[r][e].map(e=>e.key).sort().join()}}for(const e of this._renderableTiles)for(const t in this._coordsDescendingInvStr){const n=this._coordsDescendingInvStr[t][e.tileID.key];n&&n!==e.rttCoords[t]&&(e.rtt=[])}}renderLayer(t){if(t.isHidden(this.painter.transform.zoom))return!1;const n=t.type,r=this.painter,i=this._renderableLayerIds[this._renderableLayerIds.length-1]===t.id;if(hi[n]&&(this._prevType&&hi[this._prevType]||this._stacks.push([]),this._prevType=n,this._stacks[this._stacks.length-1].push(t.id),!i))return!0;if(hi[this._prevType]||hi[n]&&i){this._prevType=n;const t=this._stacks.length-1,i=this._stacks[t]||[];for(const n of this._renderableTiles){if(this.pool.isFull()&&(er(this.painter,this.terrain,this._rttTiles),this._rttTiles=[],this.pool.freeAllObjects()),this._rttTiles.push(n),n.rtt[t]){const e=this.pool.getObjectForId(n.rtt[t].id);if(e.stamp===n.rtt[t].stamp){this.pool.useObject(e);continue}}const o=this.pool.getOrCreateFreeObject();this.pool.useObject(o),this.pool.stampObject(o),n.rtt[t]={id:o.id,stamp:o.stamp},r.context.bindFramebuffer.set(o.fbo.framebuffer),r.context.clear({color:e.aT.transparent,stencil:0}),r.currentStencilSource=void 0;for(let e=0;e{e.touchstart=e.dragStart,e.touchmoveWindow=e.dragMove,e.touchend=e.dragEnd},mi={showCompass:!0,showZoom:!0,visualizePitch:!1};class yi{constructor(n,r,i=!1){this.mousedown=n=>{this.startMouse(e.e({},n,{ctrlKey:!0,preventDefault:()=>n.preventDefault()}),t.mousePos(this.element,n)),t.addEventListener(window,"mousemove",this.mousemove),t.addEventListener(window,"mouseup",this.mouseup)},this.mousemove=e=>{this.moveMouse(e,t.mousePos(this.element,e))},this.mouseup=e=>{this.mouseRotate.dragEnd(e),this.mousePitch&&this.mousePitch.dragEnd(e),this.offTemp()},this.touchstart=e=>{1!==e.targetTouches.length?this.reset():(this._startPos=this._lastPos=t.touchPos(this.element,e.targetTouches)[0],this.startTouch(e,this._startPos),t.addEventListener(window,"touchmove",this.touchmove,{passive:!1}),t.addEventListener(window,"touchend",this.touchend))},this.touchmove=e=>{1!==e.targetTouches.length?this.reset():(this._lastPos=t.touchPos(this.element,e.targetTouches)[0],this.moveTouch(e,this._lastPos))},this.touchend=e=>{0===e.targetTouches.length&&this._startPos&&this._lastPos&&this._startPos.dist(this._lastPos){this.mouseRotate.reset(),this.mousePitch&&this.mousePitch.reset(),this.touchRotate.reset(),this.touchPitch&&this.touchPitch.reset(),delete this._startPos,delete this._lastPos,this.offTemp()},this._clickTolerance=10;const o=n.dragRotate._mouseRotate.getClickTolerance(),a=n.dragRotate._mousePitch.getClickTolerance();this.element=r,this.mouseRotate=Ir({clickTolerance:o,enable:!0}),this.touchRotate=(({enable:e,clickTolerance:t,bearingDegreesPerPixelMoved:n=.8})=>{const r=new Lr;return new Sr({clickTolerance:t,move:(e,t)=>({bearingDelta:(t.x-e.x)*n}),moveStateManager:r,enable:e,assignEvents:gi})})({clickTolerance:o,enable:!0}),this.map=n,i&&(this.mousePitch=Dr({clickTolerance:a,enable:!0}),this.touchPitch=(({enable:e,clickTolerance:t,pitchDegreesPerPixelMoved:n=-.5})=>{const r=new Lr;return new Sr({clickTolerance:t,move:(e,t)=>({pitchDelta:(t.y-e.y)*n}),moveStateManager:r,enable:e,assignEvents:gi})})({clickTolerance:a,enable:!0})),t.addEventListener(r,"mousedown",this.mousedown),t.addEventListener(r,"touchstart",this.touchstart,{passive:!1}),t.addEventListener(r,"touchcancel",this.reset)}startMouse(e,n){this.mouseRotate.dragStart(e,n),this.mousePitch&&this.mousePitch.dragStart(e,n),t.disableDrag()}startTouch(e,n){this.touchRotate.dragStart(e,n),this.touchPitch&&this.touchPitch.dragStart(e,n),t.disableDrag()}moveMouse(e,t){const n=this.map,{bearingDelta:r}=this.mouseRotate.dragMove(e,t)||{};if(r&&n.setBearing(n.getBearing()+r),this.mousePitch){const{pitchDelta:r}=this.mousePitch.dragMove(e,t)||{};r&&n.setPitch(n.getPitch()+r)}}moveTouch(e,t){const n=this.map,{bearingDelta:r}=this.touchRotate.dragMove(e,t)||{};if(r&&n.setBearing(n.getBearing()+r),this.touchPitch){const{pitchDelta:r}=this.touchPitch.dragMove(e,t)||{};r&&n.setPitch(n.getPitch()+r)}}off(){const e=this.element;t.removeEventListener(e,"mousedown",this.mousedown),t.removeEventListener(e,"touchstart",this.touchstart,{passive:!1}),t.removeEventListener(window,"touchmove",this.touchmove,{passive:!1}),t.removeEventListener(window,"touchend",this.touchend),t.removeEventListener(e,"touchcancel",this.reset),this.offTemp()}offTemp(){t.enableDrag(),t.removeEventListener(window,"mousemove",this.mousemove),t.removeEventListener(window,"mouseup",this.mouseup),t.removeEventListener(window,"touchmove",this.touchmove,{passive:!1}),t.removeEventListener(window,"touchend",this.touchend)}}let vi;function bi(t,n,r){if(t=new e.L(t.lng,t.lat),n){const i=new e.L(t.lng-360,t.lat),o=new e.L(t.lng+360,t.lat),a=r.locationPoint(t).distSqr(n);r.locationPoint(i).distSqr(n)180;){const e=r.locationPoint(t);if(e.x>=0&&e.y>=0&&e.x<=r.width&&e.y<=r.height)break;t.lng>r.center.lng?t.lng-=360:t.lng+=360}return t}const _i={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 wi(e,t,n){const r=e.classList;for(const e in _i)r.remove(`maplibregl-${n}-anchor-${e}`);r.add(`maplibregl-${n}-anchor-${t}`)}class xi extends e.E{constructor(n){if(super(),this._onKeyPress=e=>{const t=e.code,n=e.charCode||e.keyCode;"Space"!==t&&"Enter"!==t&&32!==n&&13!==n||this.togglePopup()},this._onMapClick=e=>{const t=e.originalEvent.target,n=this._element;this._popup&&(t===n||n.contains(t))&&this.togglePopup()},this._update=e=>{if(!this._map)return;const n=this._map.loaded()&&!this._map.isMoving();("terrain"===(null==e?void 0:e.type)||"render"===(null==e?void 0:e.type)&&!n)&&this._map.once("render",this._update),this._map.transform.renderWorldCopies&&(this._lngLat=bi(this._lngLat,this._pos,this._map.transform)),this._pos=this._map.project(this._lngLat)._add(this._offset);let r="";"viewport"===this._rotationAlignment||"auto"===this._rotationAlignment?r=`rotateZ(${this._rotation}deg)`:"map"===this._rotationAlignment&&(r=`rotateZ(${this._rotation-this._map.getBearing()}deg)`);let i="";"viewport"===this._pitchAlignment||"auto"===this._pitchAlignment?i="rotateX(0deg)":"map"===this._pitchAlignment&&(i=`rotateX(${this._map.getPitch()}deg)`),e&&"moveend"!==e.type||(this._pos=this._pos.round()),t.setTransform(this._element,`${_i[this._anchor]} translate(${this._pos.x}px, ${this._pos.y}px) ${i} ${r}`),this._map.terrain&&!this._opacityTimeout&&(this._opacityTimeout=setTimeout(()=>{const e=this._map.unproject(this._pos),t=40075016.686*Math.abs(Math.cos(this._lngLat.lat*Math.PI/180))/Math.pow(2,this._map.transform.tileZoom+8);this._element.style.opacity=e.distanceTo(this._lngLat)>20*t?"0.2":"1.0",this._opacityTimeout=null},100))},this._onMove=t=>{if(!this._isDragging){const e=this._clickTolerance||this._map._clickTolerance;this._isDragging=t.point.dist(this._pointerdownPos)>=e}this._isDragging&&(this._pos=t.point.sub(this._positionDelta),this._lngLat=this._map.unproject(this._pos),this.setLngLat(this._lngLat),this._element.style.pointerEvents="none","pending"===this._state&&(this._state="active",this.fire(new e.k("dragstart"))),this.fire(new e.k("drag")))},this._onUp=()=>{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),"active"===this._state&&this.fire(new e.k("dragend")),this._state="inactive"},this._addDragHandler=e=>{this._element.contains(e.originalEvent.target)&&(e.preventDefault(),this._positionDelta=e.point.sub(this._pos).add(this._offset),this._pointerdownPos=e.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))},this._anchor=n&&n.anchor||"center",this._color=n&&n.color||"#3FB1CE",this._scale=n&&n.scale||1,this._draggable=n&&n.draggable||!1,this._clickTolerance=n&&n.clickTolerance||0,this._isDragging=!1,this._state="inactive",this._rotation=n&&n.rotation||0,this._rotationAlignment=n&&n.rotationAlignment||"auto",this._pitchAlignment=n&&n.pitchAlignment&&"auto"!==n.pitchAlignment?n.pitchAlignment:this._rotationAlignment,n&&n.element)this._element=n.element,this._offset=e.P.convert(n&&n.offset||[0,0]);else{this._defaultMarker=!0,this._element=t.create("div"),this._element.setAttribute("aria-label","Map marker");const r=t.createNS("http://www.w3.org/2000/svg","svg"),i=41,o=27;r.setAttributeNS(null,"display","block"),r.setAttributeNS(null,"height",i+"px"),r.setAttributeNS(null,"width",o+"px"),r.setAttributeNS(null,"viewBox",`0 0 ${o} ${i}`);const a=t.createNS("http://www.w3.org/2000/svg","g");a.setAttributeNS(null,"stroke","none"),a.setAttributeNS(null,"stroke-width","1"),a.setAttributeNS(null,"fill","none"),a.setAttributeNS(null,"fill-rule","evenodd");const s=t.createNS("http://www.w3.org/2000/svg","g");s.setAttributeNS(null,"fill-rule","nonzero");const l=t.createNS("http://www.w3.org/2000/svg","g");l.setAttributeNS(null,"transform","translate(3.0, 29.0)"),l.setAttributeNS(null,"fill","#000000");const u=[{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"}];for(const e of u){const n=t.createNS("http://www.w3.org/2000/svg","ellipse");n.setAttributeNS(null,"opacity","0.04"),n.setAttributeNS(null,"cx","10.5"),n.setAttributeNS(null,"cy","5.80029008"),n.setAttributeNS(null,"rx",e.rx),n.setAttributeNS(null,"ry",e.ry),l.appendChild(n)}const c=t.createNS("http://www.w3.org/2000/svg","g");c.setAttributeNS(null,"fill",this._color);const d=t.createNS("http://www.w3.org/2000/svg","path");d.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"),c.appendChild(d);const f=t.createNS("http://www.w3.org/2000/svg","g");f.setAttributeNS(null,"opacity","0.25"),f.setAttributeNS(null,"fill","#000000");const h=t.createNS("http://www.w3.org/2000/svg","path");h.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"),f.appendChild(h);const p=t.createNS("http://www.w3.org/2000/svg","g");p.setAttributeNS(null,"transform","translate(6.0, 7.0)"),p.setAttributeNS(null,"fill","#FFFFFF");const A=t.createNS("http://www.w3.org/2000/svg","g");A.setAttributeNS(null,"transform","translate(8.0, 8.0)");const g=t.createNS("http://www.w3.org/2000/svg","circle");g.setAttributeNS(null,"fill","#000000"),g.setAttributeNS(null,"opacity","0.25"),g.setAttributeNS(null,"cx","5.5"),g.setAttributeNS(null,"cy","5.5"),g.setAttributeNS(null,"r","5.4999962");const m=t.createNS("http://www.w3.org/2000/svg","circle");m.setAttributeNS(null,"fill","#FFFFFF"),m.setAttributeNS(null,"cx","5.5"),m.setAttributeNS(null,"cy","5.5"),m.setAttributeNS(null,"r","5.4999962"),A.appendChild(g),A.appendChild(m),s.appendChild(l),s.appendChild(c),s.appendChild(f),s.appendChild(p),s.appendChild(A),r.appendChild(s),r.setAttributeNS(null,"height",i*this._scale+"px"),r.setAttributeNS(null,"width",o*this._scale+"px"),this._element.appendChild(r),this._offset=e.P.convert(n&&n.offset||[0,-14])}if(this._element.classList.add("maplibregl-marker"),this._element.addEventListener("dragstart",e=>{e.preventDefault()}),this._element.addEventListener("mousedown",e=>{e.preventDefault()}),wi(this._element,this._anchor,"marker"),n&&n.className)for(const e of n.className.split(" "))this._element.classList.add(e);this._popup=null}addTo(e){return this.remove(),this._map=e,e.getCanvasContainer().appendChild(this._element),e.on("move",this._update),e.on("moveend",this._update),e.on("terrain",this._update),this.setDraggable(this._draggable),this._update(),this._map.on("click",this._onMapClick),this}remove(){return this._opacityTimeout&&(clearTimeout(this._opacityTimeout),delete this._opacityTimeout),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),t.remove(this._element),this._popup&&this._popup.remove(),this}getLngLat(){return this._lngLat}setLngLat(t){return this._lngLat=e.L.convert(t),this._pos=null,this._popup&&this._popup.setLngLat(this._lngLat),this._update(),this}getElement(){return this._element}setPopup(e){if(this._popup&&(this._popup.remove(),this._popup=null,this._element.removeEventListener("keypress",this._onKeyPress),this._originalTabIndex||this._element.removeAttribute("tabindex")),e){if(!("offset"in e.options)){const t=38.1,n=13.5,r=Math.abs(n)/Math.SQRT2;e.options.offset=this._defaultMarker?{top:[0,0],"top-left":[0,0],"top-right":[0,0],bottom:[0,-t],"bottom-left":[r,-1*(t-n+r)],"bottom-right":[-r,-1*(t-n+r)],left:[n,-1*(t-n)],right:[-n,-1*(t-n)]}:this._offset}this._popup=e,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}getPopup(){return this._popup}togglePopup(){const e=this._popup;return e?(e.isOpen()?e.remove():e.addTo(this._map),this):this}getOffset(){return this._offset}setOffset(t){return this._offset=e.P.convert(t),this._update(),this}addClassName(e){this._element.classList.add(e)}removeClassName(e){this._element.classList.remove(e)}toggleClassName(e){return this._element.classList.toggle(e)}setDraggable(e){return this._draggable=!!e,this._map&&(e?(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}isDraggable(){return this._draggable}setRotation(e){return this._rotation=e||0,this._update(),this}getRotation(){return this._rotation}setRotationAlignment(e){return this._rotationAlignment=e||"auto",this._update(),this}getRotationAlignment(){return this._rotationAlignment}setPitchAlignment(e){return this._pitchAlignment=e&&"auto"!==e?e:this._rotationAlignment,this._update(),this}getPitchAlignment(){return this._pitchAlignment}}const Mi={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0};let Ei=0,Oi=!1;const Si={maxWidth:100,unit:"metric"};function Ti(e,t,n){const r=n&&n.maxWidth||100,i=e._container.clientHeight/2,o=e.unproject([0,i]),a=e.unproject([r,i]),s=o.distanceTo(a);if(n&&"imperial"===n.unit){const n=3.2808*s;n>5280?Ci(t,r,n/5280,e._getUIString("ScaleControl.Miles")):Ci(t,r,n,e._getUIString("ScaleControl.Feet"))}else n&&"nautical"===n.unit?Ci(t,r,s/1852,e._getUIString("ScaleControl.NauticalMiles")):s>=1e3?Ci(t,r,s/1e3,e._getUIString("ScaleControl.Kilometers")):Ci(t,r,s,e._getUIString("ScaleControl.Meters"))}function Ci(e,t,n,r){const i=function(e){const t=Math.pow(10,(""+Math.floor(e)).length-1);let n=e/t;return n=n>=10?10:n>=5?5:n>=3?3:n>=2?2:n>=1?1:function(e){const t=Math.pow(10,Math.ceil(-Math.log(e)/Math.LN10));return Math.round(e*t)/t}(n),t*n}(n);e.style.width=t*(i/n)+"px",e.innerHTML=`${i} ${r}`}const Li={closeButton:!0,closeOnClick:!0,focusAfterOpen:!0,className:"",maxWidth:"240px"},Pi=["a[href]","[tabindex]:not([tabindex='-1'])","[contenteditable]:not([contenteditable='false'])","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].join(", ");function Ii(t){if(t){if("number"==typeof t){const n=Math.round(Math.abs(t)/Math.SQRT2);return{center:new e.P(0,0),top:new e.P(0,t),"top-left":new e.P(n,n),"top-right":new e.P(-n,n),bottom:new e.P(0,-t),"bottom-left":new e.P(n,-n),"bottom-right":new e.P(-n,-n),left:new e.P(t,0),right:new e.P(-t,0)}}if(t instanceof e.P||Array.isArray(t)){const n=e.P.convert(t);return{center:n,top:n,"top-left":n,"top-right":n,bottom:n,"bottom-left":n,"bottom-right":n,left:n,right:n}}return{center:e.P.convert(t.center||[0,0]),top:e.P.convert(t.top||[0,0]),"top-left":e.P.convert(t["top-left"]||[0,0]),"top-right":e.P.convert(t["top-right"]||[0,0]),bottom:e.P.convert(t.bottom||[0,0]),"bottom-left":e.P.convert(t["bottom-left"]||[0,0]),"bottom-right":e.P.convert(t["bottom-right"]||[0,0]),left:e.P.convert(t.left||[0,0]),right:e.P.convert(t.right||[0,0])}}return Ii(new e.P(0,0))}const Di={extend:(t,...n)=>e.e(t,...n),run(e){e()},logToElement(e,t=!1,n="log"){const r=window.document.getElementById(n);r&&(t&&(r.innerHTML=""),r.innerHTML+="
"+e)}};class ki{static get version(){return"3.6.2"}static get workerCount(){return $.workerCount}static set workerCount(e){$.workerCount=e}static get maxParallelImageRequests(){return e.c.MAX_PARALLEL_IMAGE_REQUESTS}static set maxParallelImageRequests(t){e.c.MAX_PARALLEL_IMAGE_REQUESTS=t}static get workerUrl(){return e.c.WORKER_URL}static set workerUrl(t){e.c.WORKER_URL=t}static addProtocol(t,n){e.c.REGISTERED_PROTOCOLS[t]=n}static removeProtocol(t){delete e.c.REGISTERED_PROTOCOLS[t]}}return ki.Map=class extends ii{constructor(t){if(e.bg.mark(e.bh.create),null!=(t=e.e({},Ai,t)).minZoom&&null!=t.maxZoom&&t.minZoom>t.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(null!=t.minPitch&&null!=t.maxPitch&&t.minPitch>t.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(null!=t.minPitch&&t.minPitch<0)throw new Error("minPitch must be greater than or equal to 0");if(null!=t.maxPitch&&t.maxPitch>85)throw new Error("maxPitch must be less than or equal to 85");if(super(new or(t.minZoom,t.maxZoom,t.minPitch,t.maxPitch,t.renderWorldCopies),{bearingSnap:t.bearingSnap}),this._cooperativeGesturesOnWheel=e=>{this._onCooperativeGesture(e,e[this._metaKey],1)},this._contextLost=t=>{t.preventDefault(),this._frame&&(this._frame.cancel(),this._frame=null),this.fire(new e.k("webglcontextlost",{originalEvent:t}))},this._contextRestored=t=>{this._setupPainter(),this.resize(),this._update(),this.fire(new e.k("webglcontextrestored",{originalEvent:t}))},this._onMapScroll=e=>{if(e.target===this._container)return this._container.scrollTop=0,this._container.scrollLeft=0,!1},this._onWindowOnline=()=>{this._update()},this._interactive=t.interactive,this._cooperativeGestures=t.cooperativeGestures,this._metaKey=0===navigator.platform.indexOf("Mac")?"metaKey":"ctrlKey",this._maxTileCacheSize=t.maxTileCacheSize,this._maxTileCacheZoomLevels=t.maxTileCacheZoomLevels,this._failIfMajorPerformanceCaveat=t.failIfMajorPerformanceCaveat,this._preserveDrawingBuffer=t.preserveDrawingBuffer,this._antialias=t.antialias,this._trackResize=t.trackResize,this._bearingSnap=t.bearingSnap,this._refreshExpiredTiles=t.refreshExpiredTiles,this._fadeDuration=t.fadeDuration,this._crossSourceCollisions=t.crossSourceCollisions,this._crossFadingFactor=1,this._collectResourceTiming=t.collectResourceTiming,this._renderTaskQueue=new si,this._controls=[],this._mapId=e.a2(),this._locale=e.e({},li,t.locale),this._clickTolerance=t.clickTolerance,this._overridePixelRatio=t.pixelRatio,this._maxCanvasSize=t.maxCanvasSize,this.transformCameraUpdate=t.transformCameraUpdate,this._imageQueueHandle=l.addThrottleControl(()=>this.isMoving()),this._requestManager=new c(t.transformRequest),"string"==typeof t.container){if(this._container=document.getElementById(t.container),!this._container)throw new Error(`Container '${t.container}' not found.`)}else{if(!(t.container instanceof HTMLElement))throw new Error("Invalid type: 'container' must be a String or HTMLElement.");this._container=t.container}if(t.maxBounds&&this.setMaxBounds(t.maxBounds),this._setupContainer(),this._setupPainter(),this.on("move",()=>this._update(!1)),this.on("moveend",()=>this._update(!1)),this.on("zoom",()=>this._update(!0)),this.on("terrain",()=>{this.painter.terrainFacilitator.dirty=!0,this._update(!0)}),this.once("idle",()=>{this._idleTriggered=!0}),"undefined"!=typeof window){addEventListener("online",this._onWindowOnline,!1);let e=!1;const t=ar(e=>{this._trackResize&&!this._removed&&this.resize(e)._update()},50);this._resizeObserver=new ResizeObserver(n=>{e?t(n):e=!0}),this._resizeObserver.observe(this._container)}this.handlers=new ri(this,t),this._cooperativeGestures&&this._setupCooperativeGestures(),this._hash=t.hash&&new sr("string"==typeof t.hash&&t.hash||void 0).addTo(this),this._hash&&this._hash._onHashChange()||(this.jumpTo({center:t.center,zoom:t.zoom,bearing:t.bearing,pitch:t.pitch}),t.bounds&&(this.resize(),this.fitBounds(t.bounds,e.e({},t.fitBoundsOptions,{duration:0})))),this.resize(),this._localIdeographFontFamily=t.localIdeographFontFamily,this._validateStyle=t.validateStyle,t.style&&this.setStyle(t.style,{localIdeographFontFamily:t.localIdeographFontFamily}),t.attributionControl&&this.addControl(new oi({customAttribution:t.customAttribution})),t.maplibreLogo&&this.addControl(new ai,t.logoPosition),this.on("style.load",()=>{this.transform.unmodified&&this.jumpTo(this.style.stylesheet)}),this.on("data",t=>{this._update("style"===t.dataType),this.fire(new e.k(t.dataType+"data",t))}),this.on("dataloading",t=>{this.fire(new e.k(t.dataType+"dataloading",t))}),this.on("dataabort",t=>{this.fire(new e.k("sourcedataabort",t))})}_getMapId(){return this._mapId}addControl(t,n){if(void 0===n&&(n=t.getDefaultPosition?t.getDefaultPosition():"top-right"),!t||!t.onAdd)return this.fire(new e.j(new Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));const r=t.onAdd(this);this._controls.push(t);const i=this._controlPositions[n];return-1!==n.indexOf("bottom")?i.insertBefore(r,i.firstChild):i.appendChild(r),this}removeControl(t){if(!t||!t.onRemove)return this.fire(new e.j(new Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));const n=this._controls.indexOf(t);return n>-1&&this._controls.splice(n,1),t.onRemove(this),this}hasControl(e){return this._controls.indexOf(e)>-1}calculateCameraOptionsFromTo(e,t,n,r){return null==r&&this.terrain&&(r=this.terrain.getElevationForLngLatZoom(n,this.transform.tileZoom)),super.calculateCameraOptionsFromTo(e,t,n,r)}resize(t){var n;const r=this._containerDimensions(),i=r[0],o=r[1],a=this._getClampedPixelRatio(i,o);if(this._resizeCanvas(i,o,a),this.painter.resize(i,o,a),this.painter.overLimit()){const e=this.painter.context.gl;this._maxCanvasSize=[e.drawingBufferWidth,e.drawingBufferHeight];const t=this._getClampedPixelRatio(i,o);this._resizeCanvas(i,o,t),this.painter.resize(i,o,t)}this.transform.resize(i,o),null===(n=this._requestedCameraState)||void 0===n||n.resize(i,o);const s=!this._moving;return s&&(this.stop(),this.fire(new e.k("movestart",t)).fire(new e.k("move",t))),this.fire(new e.k("resize",t)),s&&this.fire(new e.k("moveend",t)),this}_getClampedPixelRatio(e,t){const{0:n,1:r}=this._maxCanvasSize,i=this.getPixelRatio(),o=e*i,a=t*i;return Math.min(o>n?n/o:1,a>r?r/a:1)*i}getPixelRatio(){var e;return null!==(e=this._overridePixelRatio)&&void 0!==e?e:devicePixelRatio}setPixelRatio(e){this._overridePixelRatio=e,this.resize()}getBounds(){return this.transform.getBounds()}getMaxBounds(){return this.transform.getMaxBounds()}setMaxBounds(e){return this.transform.setMaxBounds(P.convert(e)),this._update()}setMinZoom(e){if((e=null==e?-2:e)>=-2&&e<=this.transform.maxZoom)return this.transform.minZoom=e,this._update(),this.getZoom()=this.transform.minZoom)return this.transform.maxZoom=e,this._update(),this.getZoom()>e&&this.setZoom(e),this;throw new Error("maxZoom must be greater than the current minZoom")}getMaxZoom(){return this.transform.maxZoom}setMinPitch(e){if((e=null==e?0:e)<0)throw new Error("minPitch must be greater than or equal to 0");if(e>=0&&e<=this.transform.maxPitch)return this.transform.minPitch=e,this._update(),this.getPitch()85)throw new Error("maxPitch must be less than or equal to 85");if(e>=this.transform.minPitch)return this.transform.maxPitch=e,this._update(),this.getPitch()>e&&this.setPitch(e),this;throw new Error("maxPitch must be greater than the current minPitch")}getMaxPitch(){return this.transform.maxPitch}getRenderWorldCopies(){return this.transform.renderWorldCopies}setRenderWorldCopies(e){return this.transform.renderWorldCopies=e,this._update()}getCooperativeGestures(){return this._cooperativeGestures}setCooperativeGestures(e){return this._cooperativeGestures=e,this._cooperativeGestures?this._setupCooperativeGestures():this._destroyCooperativeGestures(),this}project(t){return this.transform.locationPoint(e.L.convert(t),this.style&&this.terrain)}unproject(t){return this.transform.pointLocation(e.P.convert(t),this.terrain)}isMoving(){var e;return this._moving||(null===(e=this.handlers)||void 0===e?void 0:e.isMoving())}isZooming(){var e;return this._zooming||(null===(e=this.handlers)||void 0===e?void 0:e.isZooming())}isRotating(){var e;return this._rotating||(null===(e=this.handlers)||void 0===e?void 0:e.isRotating())}_createDelegatedListener(e,t,n){if("mouseenter"===e||"mouseover"===e){let r=!1;const i=i=>{const o=this.getLayer(t)?this.queryRenderedFeatures(i.point,{layers:[t]}):[];o.length?r||(r=!0,n.call(this,new gr(e,this,i.originalEvent,{features:o}))):r=!1};return{layer:t,listener:n,delegates:{mousemove:i,mouseout:()=>{r=!1}}}}if("mouseleave"===e||"mouseout"===e){let r=!1;const i=i=>{(this.getLayer(t)?this.queryRenderedFeatures(i.point,{layers:[t]}):[]).length?r=!0:r&&(r=!1,n.call(this,new gr(e,this,i.originalEvent)))},o=t=>{r&&(r=!1,n.call(this,new gr(e,this,t.originalEvent)))};return{layer:t,listener:n,delegates:{mousemove:i,mouseout:o}}}{const r=e=>{const r=this.getLayer(t)?this.queryRenderedFeatures(e.point,{layers:[t]}):[];r.length&&(e.features=r,n.call(this,e),delete e.features)};return{layer:t,listener:n,delegates:{[e]:r}}}}on(e,t,n){if(void 0===n)return super.on(e,t);const r=this._createDelegatedListener(e,t,n);this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[e]=this._delegatedListeners[e]||[],this._delegatedListeners[e].push(r);for(const e in r.delegates)this.on(e,r.delegates[e]);return this}once(e,t,n){if(void 0===n)return super.once(e,t);const r=this._createDelegatedListener(e,t,n);for(const e in r.delegates)this.once(e,r.delegates[e]);return this}off(e,t,n){return void 0===n?super.off(e,t):(this._delegatedListeners&&this._delegatedListeners[e]&&(r=>{const i=this._delegatedListeners[e];for(let e=0;ethis._updateStyle(e,t));const n=this.style&&t.transformStyle?this.style.serialize():void 0;return this.style&&(this.style.setEventedParent(null),this.style._remove(!e)),e?(this.style=new nt(this,t||{}),this.style.setEventedParent(this,{style:this.style}),"string"==typeof e?this.style.loadURL(e,t,n):this.style.loadJSON(e,t,n),this):(delete this.style,this)}_lazyInitEmptyStyle(){this.style||(this.style=new nt(this,{}),this.style.setEventedParent(this,{style:this.style}),this.style.loadEmpty())}_diffStyle(t,n){if("string"==typeof t){const r=this._requestManager.transformRequest(t,u.Style);e.f(r,(t,r)=>{t?this.fire(new e.j(t)):r&&this._updateDiff(r,n)})}else"object"==typeof t&&this._updateDiff(t,n)}_updateDiff(t,n){try{this.style.setState(t,n)&&this._update(!0)}catch(r){e.w(`Unable to perform style diff: ${r.message||r.error||r}. Rebuilding the style from scratch.`),this._updateStyle(t,n)}}getStyle(){if(this.style)return this.style.serialize()}isStyleLoaded(){return this.style?this.style.loaded():e.w("There is no style added to the map.")}addSource(e,t){return this._lazyInitEmptyStyle(),this.style.addSource(e,t),this._update(!0)}isSourceLoaded(t){const n=this.style&&this.style.sourceCaches[t];if(void 0!==n)return n.loaded();this.fire(new e.j(new Error(`There is no source with ID '${t}'`)))}setTerrain(t){if(this.style._checkLoaded(),this._terrainDataCallback&&this.style.off("data",this._terrainDataCallback),t){const n=this.style.sourceCaches[t.source];if(!n)throw new Error("cannot load terrain, because there exists no source with ID: "+t.source);for(const n in this.style._layers){const r=this.style._layers[n];"hillshade"===r.type&&r.source===t.source&&e.w("You are using the same source for a hillshade layer and for 3D terrain. Please consider using two separate sources to improve rendering quality.")}this.terrain=new di(this.painter,n,t),this.painter.renderToTexture=new pi(this.painter,this.terrain),this.transform._minEleveationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this.transform.elevation=this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this._terrainDataCallback=e=>{"style"===e.dataType?this.terrain.sourceCache.freeRtt():"source"===e.dataType&&e.tile&&(e.sourceId!==t.source||this._elevationFreeze||(this.transform._minEleveationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this.transform.elevation=this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom)),this.terrain.sourceCache.freeRtt(e.tile.tileID))},this.style.on("data",this._terrainDataCallback)}else this.terrain&&this.terrain.sourceCache.destruct(),this.terrain=null,this.painter.renderToTexture&&this.painter.renderToTexture.destruct(),this.painter.renderToTexture=null,this.transform._minEleveationForCurrentTile=0,this.transform.elevation=0;return this.fire(new e.k("terrain",{terrain:t})),this}getTerrain(){var e,t;return null!==(t=null===(e=this.terrain)||void 0===e?void 0:e.options)&&void 0!==t?t:null}areTilesLoaded(){const e=this.style&&this.style.sourceCaches;for(const t in e){const n=e[t]._tiles;for(const e in n){const t=n[e];if("loaded"!==t.state&&"errored"!==t.state)return!1}}return!0}addSourceType(e,t,n){return this._lazyInitEmptyStyle(),this.style.addSourceType(e,t,n)}removeSource(e){return this.style.removeSource(e),this._update(!0)}getSource(e){return this.style.getSource(e)}addImage(t,n,r={}){const{pixelRatio:i=1,sdf:o=!1,stretchX:a,stretchY:s,content:l}=r;if(this._lazyInitEmptyStyle(),!(n instanceof HTMLImageElement||e.a(n))){if(void 0===n.width||void 0===n.height)return this.fire(new e.j(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`")));{const{width:r,height:u,data:c}=n,d=n;return this.style.addImage(t,{data:new e.R({width:r,height:u},new Uint8Array(c)),pixelRatio:i,stretchX:a,stretchY:s,content:l,sdf:o,version:0,userImage:d}),d.onAdd&&d.onAdd(this,t),this}}{const{width:r,height:u,data:c}=e.h.getImageData(n);this.style.addImage(t,{data:new e.R({width:r,height:u},c),pixelRatio:i,stretchX:a,stretchY:s,content:l,sdf:o,version:0})}}updateImage(t,n){const r=this.style.getImage(t);if(!r)return this.fire(new e.j(new Error("The map has no image with that id. If you are adding a new image use `map.addImage(...)` instead.")));const i=n instanceof HTMLImageElement||e.a(n)?e.h.getImageData(n):n,{width:o,height:a,data:s}=i;if(void 0===o||void 0===a)return this.fire(new e.j(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`")));if(o!==r.data.width||a!==r.data.height)return this.fire(new e.j(new Error("The width and height of the updated image must be that same as the previous version of the image")));const l=!(n instanceof HTMLImageElement||e.a(n));return r.data.replace(s,l),this.style.updateImage(t,r),this}getImage(e){return this.style.getImage(e)}hasImage(t){return t?!!this.style.getImage(t):(this.fire(new e.j(new Error("Missing required image id"))),!1)}removeImage(e){this.style.removeImage(e)}loadImage(e,t){l.getImage(this._requestManager.transformRequest(e,u.Image),t)}listImages(){return this.style.listImages()}addLayer(e,t){return this._lazyInitEmptyStyle(),this.style.addLayer(e,t),this._update(!0)}moveLayer(e,t){return this.style.moveLayer(e,t),this._update(!0)}removeLayer(e){return this.style.removeLayer(e),this._update(!0)}getLayer(e){return this.style.getLayer(e)}getLayersOrder(){return this.style.getLayersOrder()}setLayerZoomRange(e,t,n){return this.style.setLayerZoomRange(e,t,n),this._update(!0)}setFilter(e,t,n={}){return this.style.setFilter(e,t,n),this._update(!0)}getFilter(e){return this.style.getFilter(e)}setPaintProperty(e,t,n,r={}){return this.style.setPaintProperty(e,t,n,r),this._update(!0)}getPaintProperty(e,t){return this.style.getPaintProperty(e,t)}setLayoutProperty(e,t,n,r={}){return this.style.setLayoutProperty(e,t,n,r),this._update(!0)}getLayoutProperty(e,t){return this.style.getLayoutProperty(e,t)}setGlyphs(e,t={}){return this._lazyInitEmptyStyle(),this.style.setGlyphs(e,t),this._update(!0)}getGlyphs(){return this.style.getGlyphsUrl()}addSprite(e,t,n={}){return this._lazyInitEmptyStyle(),this.style.addSprite(e,t,n,e=>{e||this._update(!0)}),this}removeSprite(e){return this._lazyInitEmptyStyle(),this.style.removeSprite(e),this._update(!0)}getSprite(){return this.style.getSprite()}setSprite(e,t={}){return this._lazyInitEmptyStyle(),this.style.setSprite(e,t,e=>{e||this._update(!0)}),this}setLight(e,t={}){return this._lazyInitEmptyStyle(),this.style.setLight(e,t),this._update(!0)}getLight(){return this.style.getLight()}setFeatureState(e,t){return this.style.setFeatureState(e,t),this._update()}removeFeatureState(e,t){return this.style.removeFeatureState(e,t),this._update()}getFeatureState(e){return this.style.getFeatureState(e)}getContainer(){return this._container}getCanvasContainer(){return this._canvasContainer}getCanvas(){return this._canvas}_containerDimensions(){let e=0,t=0;return this._container&&(e=this._container.clientWidth||400,t=this._container.clientHeight||300),[e,t]}_setupContainer(){const e=this._container;e.classList.add("maplibregl-map");const n=this._canvasContainer=t.create("div","maplibregl-canvas-container",e);this._interactive&&n.classList.add("maplibregl-interactive"),this._canvas=t.create("canvas","maplibregl-canvas",n),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");const r=this._containerDimensions(),i=this._getClampedPixelRatio(r[0],r[1]);this._resizeCanvas(r[0],r[1],i);const o=this._controlContainer=t.create("div","maplibregl-control-container",e),a=this._controlPositions={};["top-left","top-right","bottom-left","bottom-right"].forEach(e=>{a[e]=t.create("div",`maplibregl-ctrl-${e} `,o)}),this._container.addEventListener("scroll",this._onMapScroll,!1)}_setupCooperativeGestures(){this._cooperativeGesturesScreen=t.create("div","maplibregl-cooperative-gesture-screen",this._container);let e="boolean"!=typeof this._cooperativeGestures&&this._cooperativeGestures.windowsHelpText?this._cooperativeGestures.windowsHelpText:"Use Ctrl + scroll to zoom the map";0===navigator.platform.indexOf("Mac")&&(e="boolean"!=typeof this._cooperativeGestures&&this._cooperativeGestures.macHelpText?this._cooperativeGestures.macHelpText:"Use ⌘ + scroll to zoom the map"),this._cooperativeGesturesScreen.innerHTML=`\n
${e}
\n
${"boolean"!=typeof this._cooperativeGestures&&this._cooperativeGestures.mobileHelpText?this._cooperativeGestures.mobileHelpText:"Use two fingers to move the map"}
\n `,this._cooperativeGesturesScreen.setAttribute("aria-hidden","true"),this._canvasContainer.addEventListener("wheel",this._cooperativeGesturesOnWheel,!1),this._canvasContainer.classList.add("maplibregl-cooperative-gestures")}_destroyCooperativeGestures(){t.remove(this._cooperativeGesturesScreen),this._canvasContainer.removeEventListener("wheel",this._cooperativeGesturesOnWheel,!1),this._canvasContainer.classList.remove("maplibregl-cooperative-gestures")}_resizeCanvas(e,t,n){this._canvas.width=Math.floor(n*e),this._canvas.height=Math.floor(n*t),this._canvas.style.width=e+"px",this._canvas.style.height=t+"px"}_setupPainter(){const e={alpha:!0,stencil:!0,depth:!0,failIfMajorPerformanceCaveat:this._failIfMajorPerformanceCaveat,preserveDrawingBuffer:this._preserveDrawingBuffer,antialias:this._antialias||!1};let t=null;this._canvas.addEventListener("webglcontextcreationerror",n=>{t={requestedAttributes:e},n&&(t.statusMessage=n.statusMessage,t.type=n.type)},{once:!0});const r=this._canvas.getContext("webgl2",e)||this._canvas.getContext("webgl",e);if(!r){const e="Failed to initialize WebGL";throw t?(t.message=e,new Error(JSON.stringify(t))):new Error(e)}this.painter=new tr(r,this.transform),n.testSupport(r)}_onCooperativeGesture(e,t,n){return!t&&n<2&&(this._cooperativeGesturesScreen.classList.add("maplibregl-show"),setTimeout(()=>{this._cooperativeGesturesScreen.classList.remove("maplibregl-show")},100)),!1}loaded(){return!this._styleDirty&&!this._sourcesDirty&&!!this.style&&this.style.loaded()}_update(e){return this.style&&this.style._loaded?(this._styleDirty=this._styleDirty||e,this._sourcesDirty=!0,this.triggerRepaint(),this):this}_requestRenderFrame(e){return this._update(),this._renderTaskQueue.add(e)}_cancelRenderFrame(e){this._renderTaskQueue.remove(e)}_render(t){const n=this._idleTriggered?this._fadeDuration:0;if(this.painter.context.setDirty(),this.painter.setBaseState(),this._renderTaskQueue.run(t),this._removed)return;let r=!1;if(this.style&&this._styleDirty){this._styleDirty=!1;const t=this.transform.zoom,i=e.h.now();this.style.zoomHistory.update(t,i);const o=new e.a8(t,{now:i,fadeDuration:n,zoomHistory:this.style.zoomHistory,transition:this.style.getTransition()}),a=o.crossFadingFactor();1===a&&a===this._crossFadingFactor||(r=!0,this._crossFadingFactor=a),this.style.update(o)}this.style&&this._sourcesDirty&&(this._sourcesDirty=!1,this.style._updateSources(this.transform)),this.terrain?(this.terrain.sourceCache.update(this.transform,this.terrain),this.transform._minEleveationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this._elevationFreeze||(this.transform.elevation=this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom))):(this.transform._minEleveationForCurrentTile=0,this.transform.elevation=0),this._placementDirty=this.style&&this.style._updatePlacement(this.painter.transform,this.showCollisionBoxes,n,this._crossSourceCollisions),this.painter.render(this.style,{showTileBoundaries:this.showTileBoundaries,showOverdrawInspector:this._showOverdrawInspector,rotating:this.isRotating(),zooming:this.isZooming(),moving:this.isMoving(),fadeDuration:n,showPadding:this.showPadding}),this.fire(new e.k("render")),this.loaded()&&!this._loaded&&(this._loaded=!0,e.bg.mark(e.bh.load),this.fire(new e.k("load"))),this.style&&(this.style.hasTransitions()||r)&&(this._styleDirty=!0),this.style&&!this._placementDirty&&this.style._releaseSymbolFadeTiles();const i=this._sourcesDirty||this._styleDirty||this._placementDirty;return i||this._repaint?this.triggerRepaint():!this.isMoving()&&this.loaded()&&this.fire(new e.k("idle")),!this._loaded||this._fullyLoaded||i||(this._fullyLoaded=!0,e.bg.mark(e.bh.fullLoad)),this}redraw(){return this.style&&(this._frame&&(this._frame.cancel(),this._frame=null),this._render(0)),this}remove(){var n;this._hash&&this._hash.remove();for(const e of this._controls)e.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),"undefined"!=typeof window&&removeEventListener("online",this._onWindowOnline,!1),l.removeThrottleControl(this._imageQueueHandle),null===(n=this._resizeObserver)||void 0===n||n.disconnect();const r=this.painter.context.gl.getExtension("WEBGL_lose_context");r&&r.loseContext(),this._canvas.removeEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.removeEventListener("webglcontextlost",this._contextLost,!1),t.remove(this._canvasContainer),t.remove(this._controlContainer),this._cooperativeGestures&&this._destroyCooperativeGestures(),this._container.classList.remove("maplibregl-map"),e.bg.clearMetrics(),this._removed=!0,this.fire(new e.k("remove"))}triggerRepaint(){this.style&&!this._frame&&(this._frame=e.h.frame(t=>{e.bg.frame(t),this._frame=null,this._render(t)}))}get showTileBoundaries(){return!!this._showTileBoundaries}set showTileBoundaries(e){this._showTileBoundaries!==e&&(this._showTileBoundaries=e,this._update())}get showPadding(){return!!this._showPadding}set showPadding(e){this._showPadding!==e&&(this._showPadding=e,this._update())}get showCollisionBoxes(){return!!this._showCollisionBoxes}set showCollisionBoxes(e){this._showCollisionBoxes!==e&&(this._showCollisionBoxes=e,e?this.style._generateCollisionBoxes():this._update())}get showOverdrawInspector(){return!!this._showOverdrawInspector}set showOverdrawInspector(e){this._showOverdrawInspector!==e&&(this._showOverdrawInspector=e,this._update())}get repaint(){return!!this._repaint}set repaint(e){this._repaint!==e&&(this._repaint=e,this.triggerRepaint())}get vertices(){return!!this._vertices}set vertices(e){this._vertices=e,this._update()}get version(){return"3.6.2"}getCameraTargetElevation(){return this.transform.elevation}},ki.NavigationControl=class{constructor(n){this._updateZoomButtons=()=>{const e=this._map.getZoom(),t=e===this._map.getMaxZoom(),n=e===this._map.getMinZoom();this._zoomInButton.disabled=t,this._zoomOutButton.disabled=n,this._zoomInButton.setAttribute("aria-disabled",t.toString()),this._zoomOutButton.setAttribute("aria-disabled",n.toString())},this._rotateCompassArrow=()=>{const e=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=e},this._setButtonTitle=(e,t)=>{const n=this._map._getUIString("NavigationControl."+t);e.title=n,e.setAttribute("aria-label",n)},this.options=e.e({},mi,n),this._container=t.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._container.addEventListener("contextmenu",e=>e.preventDefault()),this.options.showZoom&&(this._zoomInButton=this._createButton("maplibregl-ctrl-zoom-in",e=>this._map.zoomIn({},{originalEvent:e})),t.create("span","maplibregl-ctrl-icon",this._zoomInButton).setAttribute("aria-hidden","true"),this._zoomOutButton=this._createButton("maplibregl-ctrl-zoom-out",e=>this._map.zoomOut({},{originalEvent:e})),t.create("span","maplibregl-ctrl-icon",this._zoomOutButton).setAttribute("aria-hidden","true")),this.options.showCompass&&(this._compass=this._createButton("maplibregl-ctrl-compass",e=>{this.options.visualizePitch?this._map.resetNorthPitch({},{originalEvent:e}):this._map.resetNorth({},{originalEvent:e})}),this._compassIcon=t.create("span","maplibregl-ctrl-icon",this._compass),this._compassIcon.setAttribute("aria-hidden","true"))}onAdd(e){return this._map=e,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 yi(this._map,this._compass,this.options.visualizePitch)),this._container}onRemove(){t.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}_createButton(e,n){const r=t.create("button",e,this._container);return r.type="button",r.addEventListener("click",n),r}},ki.GeolocateControl=class extends e.E{constructor(n){super(),this._onSuccess=t=>{if(this._map){if(this._isOutOfMapMaxBounds(t))return this._setErrorState(),this.fire(new e.k("outofmaxbounds",t)),this._updateMarker(),void this._finish();if(this.options.trackUserLocation)switch(this._lastKnownPosition=t,this._watchState){case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"BACKGROUND":case"BACKGROUND_ERROR":this._watchState="BACKGROUND",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background");break;default:throw new Error("Unexpected watchState "+this._watchState)}this.options.showUserLocation&&"OFF"!==this._watchState&&this._updateMarker(t),this.options.trackUserLocation&&"ACTIVE_LOCK"!==this._watchState||this._updateCamera(t),this.options.showUserLocation&&this._dotElement.classList.remove("maplibregl-user-location-dot-stale"),this.fire(new e.k("geolocate",t)),this._finish()}},this._updateCamera=t=>{const n=new e.L(t.coords.longitude,t.coords.latitude),r=t.coords.accuracy,i=this._map.getBearing(),o=e.e({bearing:i},this.options.fitBoundsOptions),a=P.fromLngLat(n,r);this._map.fitBounds(a,o,{geolocateSource:!0})},this._updateMarker=t=>{if(t){const n=new e.L(t.coords.longitude,t.coords.latitude);this._accuracyCircleMarker.setLngLat(n).addTo(this._map),this._userLocationDotMarker.setLngLat(n).addTo(this._map),this._accuracy=t.coords.accuracy,this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()},this._onZoom=()=>{this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()},this._onError=t=>{if(this._map){if(this.options.trackUserLocation)if(1===t.code){this._watchState="OFF",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.disabled=!0;const e=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=e,this._geolocateButton.setAttribute("aria-label",e),void 0!==this._geolocationWatchID&&this._clearWatch()}else{if(3===t.code&&Oi)return;this._setErrorState()}"OFF"!==this._watchState&&this.options.showUserLocation&&this._dotElement.classList.add("maplibregl-user-location-dot-stale"),this.fire(new e.k("error",t)),this._finish()}},this._finish=()=>{this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},this._setupUI=n=>{if(this._map){if(this._container.addEventListener("contextmenu",e=>e.preventDefault()),this._geolocateButton=t.create("button","maplibregl-ctrl-geolocate",this._container),t.create("span","maplibregl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden","true"),this._geolocateButton.type="button",!1===n){e.w("Geolocation support is not available so the GeolocateControl will be disabled.");const t=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=t,this._geolocateButton.setAttribute("aria-label",t)}else{const e=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.title=e,this._geolocateButton.setAttribute("aria-label",e)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=t.create("div","maplibregl-user-location-dot"),this._userLocationDotMarker=new xi({element:this._dotElement}),this._circleElement=t.create("div","maplibregl-user-location-accuracy-circle"),this._accuracyCircleMarker=new xi({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",t=>{t.geolocateSource||"ACTIVE_LOCK"!==this._watchState||t.originalEvent&&"resize"===t.originalEvent.type||(this._watchState="BACKGROUND",this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this.fire(new e.k("trackuserlocationend")))})}},this.options=e.e({},Mi,n)}onAdd(e){return this._map=e,this._container=t.create("div","maplibregl-ctrl maplibregl-ctrl-group"),function(e,t=!1){void 0===vi||t?void 0!==window.navigator.permissions?window.navigator.permissions.query({name:"geolocation"}).then(t=>{vi="denied"!==t.state,e(vi)}).catch(()=>{vi=!!window.navigator.geolocation,e(vi)}):(vi=!!window.navigator.geolocation,e(vi)):e(vi)}(this._setupUI),this._container}onRemove(){void 0!==this._geolocationWatchID&&(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(),t.remove(this._container),this._map.off("zoom",this._onZoom),this._map=void 0,Ei=0,Oi=!1}_isOutOfMapMaxBounds(e){const t=this._map.getMaxBounds(),n=e.coords;return t&&(n.longitudet.getEast()||n.latitudet.getNorth())}_setErrorState(){switch(this._watchState){case"WAITING_ACTIVE":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active-error");break;case"ACTIVE_LOCK":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting");break;case"BACKGROUND":this._watchState="BACKGROUND_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting");break;case"ACTIVE_ERROR":break;default:throw new Error("Unexpected watchState "+this._watchState)}}_updateCircleRadius(){const e=this._map.getBounds(),t=e.getSouthEast(),n=e.getNorthEast(),r=t.distanceTo(n),i=Math.ceil(this._accuracy/(r/this._map._container.clientHeight)*2);this._circleElement.style.width=i+"px",this._circleElement.style.height=i+"px"}trigger(){if(!this._setup)return e.w("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 e.k("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":Ei--,Oi=!1,this._watchState="OFF",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"),this.fire(new e.k("trackuserlocationend"));break;case"BACKGROUND":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._lastKnownPosition&&this._updateCamera(this._lastKnownPosition),this.fire(new e.k("trackuserlocationstart"));break;default:throw new Error("Unexpected watchState "+this._watchState)}switch(this._watchState){case"WAITING_ACTIVE":this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"ACTIVE_LOCK":this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"OFF":break;default:throw new Error("Unexpected watchState "+this._watchState)}if("OFF"===this._watchState&&void 0!==this._geolocationWatchID)this._clearWatch();else if(void 0===this._geolocationWatchID){let e;this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),Ei++,Ei>1?(e={maximumAge:6e5,timeout:0},Oi=!0):(e=this.options.positionOptions,Oi=!1),this._geolocationWatchID=window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,e)}}else window.navigator.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=setTimeout(this._finish,1e4);return!0}_clearWatch(){window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0,this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","false"),this.options.showUserLocation&&this._updateMarker(null)}},ki.AttributionControl=oi,ki.LogoControl=ai,ki.ScaleControl=class{constructor(t){this._onMove=()=>{Ti(this._map,this._container,this.options)},this.setUnit=e=>{this.options.unit=e,Ti(this._map,this._container,this.options)},this.options=e.e({},Si,t)}getDefaultPosition(){return"bottom-left"}onAdd(e){return this._map=e,this._container=t.create("div","maplibregl-ctrl maplibregl-ctrl-scale",e.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container}onRemove(){t.remove(this._container),this._map.off("move",this._onMove),this._map=void 0}},ki.FullscreenControl=class extends e.E{constructor(t={}){super(),this._onFullscreenChange=()=>{(window.document.fullscreenElement||window.document.mozFullScreenElement||window.document.webkitFullscreenElement||window.document.msFullscreenElement)===this._container!==this._fullscreen&&this._handleFullscreenChange()},this._onClickFullscreen=()=>{this._isFullscreen()?this._exitFullscreen():this._requestFullscreen()},this._fullscreen=!1,t&&t.container&&(t.container instanceof HTMLElement?this._container=t.container:e.w("Full screen control 'container' must be a DOM element.")),"onfullscreenchange"in document?this._fullscreenchange="fullscreenchange":"onmozfullscreenchange"in document?this._fullscreenchange="mozfullscreenchange":"onwebkitfullscreenchange"in document?this._fullscreenchange="webkitfullscreenchange":"onmsfullscreenchange"in document&&(this._fullscreenchange="MSFullscreenChange")}onAdd(e){return this._map=e,this._container||(this._container=this._map.getContainer()),this._controlContainer=t.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),this._controlContainer}onRemove(){t.remove(this._controlContainer),this._map=null,window.document.removeEventListener(this._fullscreenchange,this._onFullscreenChange)}_setupUI(){const e=this._fullscreenButton=t.create("button","maplibregl-ctrl-fullscreen",this._controlContainer);t.create("span","maplibregl-ctrl-icon",e).setAttribute("aria-hidden","true"),e.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),window.document.addEventListener(this._fullscreenchange,this._onFullscreenChange)}_updateTitle(){const e=this._getTitle();this._fullscreenButton.setAttribute("aria-label",e),this._fullscreenButton.title=e}_getTitle(){return this._map._getUIString(this._isFullscreen()?"FullscreenControl.Exit":"FullscreenControl.Enter")}_isFullscreen(){return this._fullscreen}_handleFullscreenChange(){this._fullscreen=!this._fullscreen,this._fullscreenButton.classList.toggle("maplibregl-ctrl-shrink"),this._fullscreenButton.classList.toggle("maplibregl-ctrl-fullscreen"),this._updateTitle(),this._fullscreen?(this.fire(new e.k("fullscreenstart")),this._map._cooperativeGestures&&(this._prevCooperativeGestures=this._map._cooperativeGestures,this._map.setCooperativeGestures())):(this.fire(new e.k("fullscreenend")),this._prevCooperativeGestures&&(this._map.setCooperativeGestures(this._prevCooperativeGestures),delete this._prevCooperativeGestures))}_exitFullscreen(){window.document.exitFullscreen?window.document.exitFullscreen():window.document.mozCancelFullScreen?window.document.mozCancelFullScreen():window.document.msExitFullscreen?window.document.msExitFullscreen():window.document.webkitCancelFullScreen?window.document.webkitCancelFullScreen():this._togglePseudoFullScreen()}_requestFullscreen(){this._container.requestFullscreen?this._container.requestFullscreen():this._container.mozRequestFullScreen?this._container.mozRequestFullScreen():this._container.msRequestFullscreen?this._container.msRequestFullscreen():this._container.webkitRequestFullscreen?this._container.webkitRequestFullscreen():this._togglePseudoFullScreen()}_togglePseudoFullScreen(){this._container.classList.toggle("maplibregl-pseudo-fullscreen"),this._handleFullscreenChange(),this._map.resize()}},ki.TerrainControl=class{constructor(e){this._toggleTerrain=()=>{this._map.getTerrain()?this._map.setTerrain(null):this._map.setTerrain(this.options),this._updateTerrainIcon()},this._updateTerrainIcon=()=>{this._terrainButton.classList.remove("maplibregl-ctrl-terrain"),this._terrainButton.classList.remove("maplibregl-ctrl-terrain-enabled"),this._map.terrain?(this._terrainButton.classList.add("maplibregl-ctrl-terrain-enabled"),this._terrainButton.title=this._map._getUIString("TerrainControl.disableTerrain")):(this._terrainButton.classList.add("maplibregl-ctrl-terrain"),this._terrainButton.title=this._map._getUIString("TerrainControl.enableTerrain"))},this.options=e}onAdd(e){return this._map=e,this._container=t.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._terrainButton=t.create("button","maplibregl-ctrl-terrain",this._container),t.create("span","maplibregl-ctrl-icon",this._terrainButton).setAttribute("aria-hidden","true"),this._terrainButton.type="button",this._terrainButton.addEventListener("click",this._toggleTerrain),this._updateTerrainIcon(),this._map.on("terrain",this._updateTerrainIcon),this._container}onRemove(){t.remove(this._container),this._map.off("terrain",this._updateTerrainIcon),this._map=void 0}},ki.Popup=class extends e.E{constructor(n){super(),this.remove=()=>(this._content&&t.remove(this._content),this._container&&(t.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 e.k("close")),this),this._onMouseUp=e=>{this._update(e.point)},this._onMouseMove=e=>{this._update(e.point)},this._onDrag=e=>{this._update(e.point)},this._update=e=>{if(!this._map||!this._lngLat&&!this._trackPointer||!this._content)return;if(!this._container){if(this._container=t.create("div","maplibregl-popup",this._map.getContainer()),this._tip=t.create("div","maplibregl-popup-tip",this._container),this._container.appendChild(this._content),this.options.className)for(const e of this.options.className.split(" "))this._container.classList.add(e);this._trackPointer&&this._container.classList.add("maplibregl-popup-track-pointer")}if(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=bi(this._lngLat,this._pos,this._map.transform)),this._trackPointer&&!e)return;const n=this._pos=this._trackPointer&&e?e:this._map.project(this._lngLat);let r=this.options.anchor;const i=Ii(this.options.offset);if(!r){const e=this._container.offsetWidth,t=this._container.offsetHeight;let o;o=n.y+i.bottom.ythis._map.transform.height-t?["bottom"]:[],n.xthis._map.transform.width-e/2&&o.push("right"),r=0===o.length?"bottom":o.join("-")}const o=n.add(i[r]).round();t.setTransform(this._container,`${_i[r]} translate(${o.x}px,${o.y}px)`),wi(this._container,r,"popup")},this._onClose=()=>{this.remove()},this.options=e.e(Object.create(Li),n)}addTo(t){return this._map&&this.remove(),this._map=t,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("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.add("maplibregl-track-pointer")):this._map.on("move",this._update),this.fire(new e.k("open")),this}isOpen(){return!!this._map}getLngLat(){return this._lngLat}setLngLat(t){return this._lngLat=e.L.convert(t),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("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.remove("maplibregl-track-pointer")),this}trackPointer(){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("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.add("maplibregl-track-pointer")),this}getElement(){return this._container}setText(e){return this.setDOMContent(document.createTextNode(e))}setHTML(e){const t=document.createDocumentFragment(),n=document.createElement("body");let r;for(n.innerHTML=e;r=n.firstChild,r;)t.appendChild(r);return this.setDOMContent(t)}getMaxWidth(){var e;return null===(e=this._container)||void 0===e?void 0:e.style.maxWidth}setMaxWidth(e){return this.options.maxWidth=e,this._update(),this}setDOMContent(e){if(this._content)for(;this._content.hasChildNodes();)this._content.firstChild&&this._content.removeChild(this._content.firstChild);else this._content=t.create("div","maplibregl-popup-content",this._container);return this._content.appendChild(e),this._createCloseButton(),this._update(),this._focusFirstElement(),this}addClassName(e){this._container&&this._container.classList.add(e)}removeClassName(e){this._container&&this._container.classList.remove(e)}setOffset(e){return this.options.offset=e,this._update(),this}toggleClassName(e){if(this._container)return this._container.classList.toggle(e)}_createCloseButton(){this.options.closeButton&&(this._closeButton=t.create("button","maplibregl-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))}_focusFirstElement(){if(!this.options.focusAfterOpen||!this._container)return;const e=this._container.querySelector(Pi);e&&e.focus()}},ki.Marker=xi,ki.Style=nt,ki.LngLat=e.L,ki.LngLatBounds=P,ki.Point=e.P,ki.MercatorCoordinate=e.U,ki.Evented=e.E,ki.AJAXError=e.bi,ki.config=e.c,ki.CanvasSource=z,ki.GeoJSONSource=j,ki.ImageSource=N,ki.RasterDEMTileSource=R,ki.RasterTileSource=k,ki.VectorTileSource=D,ki.VideoSource=B,ki.setRTLTextPlugin=e.bj,ki.getRTLTextPluginStatus=e.bk,ki.prewarm=function(){ne().acquire(J)},ki.clearPrewarmedResources=function(){const e=te;e&&(e.isPreloaded()&&1===e.numActive()?(e.release(J),te=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()"))},Di.extend(ki,{isSafari:e.ac,getPerformanceMetrics:e.bg.getPerformanceMetrics}),ki})),n}()},function(e,t,n){"use strict";var r=n(3),i=n(6);Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.StyledLayerName=void 0;var o,a,s,l=r(n(15)),u=i(n(0)),c=r(n(14)),d=n(29),f=n(43),h=r(n(2)),p=n(24),A=n(166),g=n(79),m=(0,c.default)(d.CenterFlexbox)(o||(o=(0,l.default)(["\n color: ",";\n font-size: 12px;\n letter-spacing: 0.43px;\n text-transform: capitalize;\n\n svg {\n margin-right: 4px;\n }\n"])),(function(e){return e.theme.textColorHl}));t.StyledLayerName=m;var y=c.default.table(a||(a=(0,l.default)(["\n & .row__delta-value {\n text-align: right;\n margin-left: 6px;\n\n &.positive {\n color: ",";\n }\n\n &.negative {\n color: ",";\n }\n }\n & .row__value,\n & .row__name {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: no-wrap;\n }\n"])),(function(e){return e.theme.notificationColors.success}),(function(e){return e.theme.negativeBtnActBgd})),v=c.default.div(s||(s=(0,l.default)(["\n // offset divider to reach popover edge\n margin-left: -14px;\n margin-right: -14px;\n border-bottom: 1px solid ",";\n"])),(function(e){return e.theme.panelBorderColor})),b=function(e){var t=e.name,n=e.value,r=e.deltaValue,i=e.url;!i&&n&&"string"==typeof n&&n.match(/^http/)&&(i=n);var o=//.test(t);return u.default.createElement("tr",{className:"layer-hover-info__row",key:t},u.default.createElement("td",{className:"row__name"},o?t.replace("",""):t),u.default.createElement("td",{className:"row__value"},o?u.default.createElement("img",{src:n}):i?u.default.createElement("a",{target:"_blank",rel:"noopener noreferrer",href:i},n):u.default.createElement(u.default.Fragment,null,u.default.createElement("span",null,n),(0,p.notNullorUndefined)(r)?u.default.createElement("span",{className:"row__delta-value ".concat("+"===r.toString().charAt(0)?"positive":"negative")},r):null)))},_=function(e){var t=e.fieldsToShow,n=e.fields,r=e.data,i=e.primaryData,o=e.compareType;return u.default.createElement("tbody",null,t.map((function(e){return u.default.createElement(w,{key:e.name,item:e,fields:n,data:r,primaryData:i,compareType:o})})))},w=function(e){var t=e.item,n=e.fields,r=e.data,i=e.primaryData,o=e.compareType,a=n.findIndex((function(e){return e.name===t.name}));if(a<0)return null;var s=n[a],l=r.valueAt(a),c=(0,A.getTooltipDisplayValue)({item:t,field:s,value:l}),d=i?(0,A.getTooltipDisplayDeltaValue)({field:s,data:r,fieldIdx:a,primaryData:i,compareType:o}):null;return u.default.createElement(b,{name:s.displayName||s.name,value:c,deltaValue:d})},x=function(e){var t=e.fieldsToShow,n=e.data,r=e.layer,i=r.config,o=i.colorField,a=i.sizeField,s=(0,u.useMemo)((function(){if(o&&r.visualChannels.color){var e=t.find((function(e){return e.name===o.name}));return(0,A.getTooltipDisplayValue)({item:e,field:o,value:n.colorValue})}return null}),[t,o,r,n.colorValue]),l=(0,u.useMemo)((function(){if(a&&r.visualChannels.size){var e=t.find((function(e){return e.name===a.name}));return(0,A.getTooltipDisplayValue)({item:e,field:a,value:n.elevationValue})}return null}),[t,a,r,n.elevationValue]),c=r.getVisualChannelDescription("color").measure,d=r.getVisualChannelDescription("size").measure;return u.default.createElement("tbody",null,u.default.createElement(b,{name:"total points",key:"count",value:String(n.points&&n.points.length)}),o&&r.visualChannels.color&&c?u.default.createElement(b,{name:c,key:"color",value:s||"N/A"}):null,a&&r.visualChannels.size&&d?u.default.createElement(b,{name:d,key:"size",value:l||"N/A"}):null)},M=function(){var e=function(e){var t=e.data,n=e.layer,r=(0,g.useIntl)();if(!t||!n)return null;var i=t.fieldValues&&Object.keys(t.fieldValues).length>0||e.fieldsToShow&&e.fieldsToShow.length>0;return u.default.createElement("div",{className:"map-popover__layer-info"},u.default.createElement(m,{className:"map-popover__layer-name"},u.default.createElement(f.Layers,{height:"12px"}),e.layer.config.label),i&&u.default.createElement(v,null),u.default.createElement(y,null,t.fieldValues?u.default.createElement("tbody",null,t.fieldValues.map((function(e,t){var n=e.labelMessage,i=e.value;return u.default.createElement(b,{key:t,name:r.formatMessage({id:n}),value:i})}))):e.layer.isAggregated?u.default.createElement(x,e):u.default.createElement(_,e)),i&&u.default.createElement(v,null))};return e.propTypes={fields:h.default.arrayOf(h.default.any),fieldsToShow:h.default.arrayOf(h.default.any),layer:h.default.object,data:h.default.oneOfType([h.default.arrayOf(h.default.any),h.default.object])},e};t.default=M},function(e,t,n){"use strict";var r=n(3),i=n(6);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o,a,s,l,u,c,d,f,h=r(n(15)),p=i(n(0)),A=r(n(14)),g=n(36),m=n(29),y=n(43),v=r(n(197)),b=A.default.div(o||(o=(0,h.default)(["\n background-color: ",";\n flex-grow: 1;\n z-index: 1;\n p {\n margin-bottom: 0;\n }\n"])),(function(e){return e.theme.mapPanelBackgroundColor})),_=A.default.div.attrs({className:"map-control__panel-content"})(a||(a=(0,h.default)(["\n ",";\n max-height: 500px;\n min-height: 100px;\n min-width: ","px;\n overflow: overlay;\n"])),(function(e){return e.theme.dropdownScrollBar}),(function(e){return e.theme.mapControl.width})),w=A.default.div.attrs({className:"map-control__panel-header"})(s||(s=(0,h.default)(["\n display: flex;\n justify-content: space-between;\n background-color: ",";\n height: 32px;\n padding: 6px 12px;\n font-family: ",";\n font-size: 11px;\n color: ",";\n position: relative;\n box-sizing: border-box;\n\n button {\n width: 18px;\n height: 18px;\n }\n"])),(function(e){return e.theme.mapPanelHeaderBackgroundColor}),(function(e){return e.theme.fontFamily}),(function(e){return e.theme.titleTextColor})),x=(0,A.default)(w).attrs({className:"map-control__panel-split-viewport-tools"})(l||(l=(0,h.default)(["\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n align-items: self-start;\n height: unset;\n"]))),M=(0,A.default)(m.CenterFlexbox)(u||(u=(0,h.default)(["\n width: 100%;\n justify-content: space-between;\n flex-direction: row;\n"]))),E=A.default.span(c||(c=(0,h.default)(["\n opacity: ",";\n pointer-events: ",";\n"])),(function(e){return e.disabled?.4:1}),(function(e){return e.disabled?"none":"all"})),O=(0,A.default)(v.default)(d||(d=(0,h.default)(["\n opacity: ",";\n pointer-events: ",";\n"])),(function(e){return e.disabled?.4:1}),(function(e){return e.disabled?"none":"all"})),S=(0,A.default)(m.IconRoundSmall)(f||(f=(0,h.default)(["\n color: ",";\n background-color: transparent;\n\n :hover {\n cursor: pointer;\n background-color: transparent;\n color: ",";\n }\n"])),(function(e){return e.theme.activeColor}),(function(e){return e.theme.linkBtnColor}));var T=function(){var e=p.default.memo((function(e){var t=e.children,n=e.header,r=e.pinnable,i=e.disableClose,o=e.onPinClick,a=e.onClick,s=e.scale,l=void 0===s?1:s,u=e.isExport,c=e.logoComponent,d=e.mapState,f=e.onToggleSplitMapViewport,h=e.isViewportUnsyncAllowed,A=d||{},m=A.isViewportSynced,v=A.isZoomLocked,T=(0,p.useCallback)((function(){null==f||f({isViewportSynced:!m})}),[m,f]),C=(0,p.useCallback)((function(){null==f||f({isZoomLocked:!v})}),[v,f]);return p.default.createElement(b,{className:"map-control-panel",style:{transform:"scale(".concat(l,")"),marginBottom:"8px !important"}},null!=d&&d.isSplit&&h?p.default.createElement(x,null,p.default.createElement(M,{style:{paddingBottom:"6px"}},p.default.createElement(g.FormattedMessage,{id:"Unlock Viewport"}),p.default.createElement(O,{checked:!(null!=d&&d.isViewportSynced),id:"unlock-viewport-toggle",onChange:T})),p.default.createElement(M,null,p.default.createElement(E,{disabled:null==d?void 0:d.isViewportSynced},p.default.createElement(g.FormattedMessage,{id:"Sync Zoom"})),p.default.createElement(O,{checked:null==d?void 0:d.isZoomLocked,id:"sync-zoom-toggle",onChange:C,disabled:null==d?void 0:d.isViewportSynced}))):null,p.default.createElement(w,null,u&&c?c:n?p.default.createElement("span",{style:{verticalAlign:"middle"}},p.default.createElement(g.FormattedMessage,{id:n})):null,u?null:p.default.createElement(p.default.Fragment,null,r&&p.default.createElement(S,{className:"pin-map-control-item",onClick:o},p.default.createElement(y.Pin,{height:"16px"})),i?null:p.default.createElement(S,{className:"close-map-control-item",onClick:a},p.default.createElement(y.Close,{height:"16px"})))),p.default.createElement(_,null,t))}));return e.displayName="MapControlPanel",e};t.default=T},function(e,t,n){"use strict";var r=n(3);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i,o=r(n(15)),a=r(n(14)),s=r(n(1051));var l=function(){return(0,a.default)(s.default)(i||(i=(0,o.default)(["\n position: absolute;\n right: 32px;\n transform: translateX(calc(-50% + 45px));\n\n .toolbar-item {\n width: 120px;\n padding: 13px 16px;\n flex-direction: row;\n justify-content: flex-start;\n\n .toolbar-item__svg-container {\n width: 16px;\n height: 16px;\n margin-right: 10px;\n }\n\n .toolbar-item__title {\n margin-left: auto;\n margin-right: auto;\n }\n }\n "])))};t.default=l},function(e,t,n){"use strict";var r=n(3);Object.defineProperty(t,"__esModule",{value:!0}),t.default=g;var i,o=r(n(7)),a=r(n(8)),s=r(n(10)),l=r(n(11)),u=r(n(9)),c=r(n(15)),d=r(n(14)),f=r(n(0)),h=n(475);function p(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=(0,u.default)(e);if(t){var i=(0,u.default)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return(0,l.default)(this,n)}}var A=d.default.div(i||(i=(0,c.default)(["\n position: relative;\n display: flex;\n width: 100%;\n height: 100%;\n"])));function g(){return function(e){(0,s.default)(n,e);var t=p(n);function n(){return(0,o.default)(this,n),t.apply(this,arguments)}return(0,a.default)(n,[{key:"render",value:function(){return f.default.createElement(A,{className:this.props.className},f.default.createElement(h.MapViewStateContextProvider,{mapState:this.props.mapState},this.props.children))}}]),n}(f.default.Component)}g.deps=[]},function(e,t,n){"use strict";var r=n(3);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=r(n(8)),o=r(n(13)),a=r(n(4)),s=r(n(7)),l=r(n(10)),u=r(n(11)),c=r(n(9)),d=n(0),f=n(75),h=n(73),p=r(n(143)),A=n(21);function g(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=(0,c.default)(e);if(t){var i=(0,c.default)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return(0,u.default)(this,n)}}d.Component;var m=function(){var e=function(e){(0,l.default)(n,e);var t=g(n);function n(){var e;(0,s.default)(this,n);for(var r=arguments.length,i=new Array(r),l=0;l=t?(e._nextFrame(),e._startTime=(new Date).getTime()):e._timer=(0,h.requestAnimationFrame)(n)}))})),(0,a.default)((0,o.default)(e),"_resetAnimationByDomain",(function(){var t=e.props,n=t.domain,r=t.value,i=t.animationWindow,o=t.updateAnimation;if(n){var a=o||e.props.setTimelineValue;Array.isArray(r)?i===A.ANIMATION_WINDOW.incremental?a([r[0],r[0]+1]):a([n[0],n[0]+r[1]-r[0]]):a(n[0])}})),(0,a.default)((0,o.default)(e),"_resetAnimationByTimeStep",(function(){var t=e.props,n=t.steps,r=void 0===n?null:n,i=t.updateAnimation;r&&(i||e.props.setTimelineValue)([r[0],0])})),(0,a.default)((0,o.default)(e),"_resetAnimation",(function(){e.props.animationWindow===A.ANIMATION_WINDOW.interval?e._resetAnimationByTimeStep():e._resetAnimationByDomain()})),(0,a.default)((0,o.default)(e),"_startAnimation",(function(){var t=e.props.speed,n=void 0===t?1:t;if(e._clearTimer(),n>0)if(e.props.animationWindow===A.ANIMATION_WINDOW.interval){var r=e.props.steps;if(!Array.isArray(r)||!r.length)return void p.default.warn("animation steps should be an array");var i=A.BASE_SPEED*(1e3/A.FPS)/r.length/(n||1);e._animate(i)}else e._timer=(0,h.requestAnimationFrame)(e._nextFrame);e.setState({isAnimating:!0})})),(0,a.default)((0,o.default)(e),"_clearTimer",(function(){e._timer&&((0,h.cancelAnimationFrame)(e._timer),e._timer=null)})),(0,a.default)((0,o.default)(e),"_pauseAnimation",(function(){e._clearTimer(),e.setState({isAnimating:!1})})),(0,a.default)((0,o.default)(e),"_nextFrame",(function(){e._timer=null;var t=e.props.animationWindow===A.ANIMATION_WINDOW.interval?e._nextFrameByTimeStep():e._nextFrameByDomain();(e.props.updateAnimation||e.props.setTimelineValue)(t)})),e}return(0,i.default)(n,[{key:"componentDidMount",value:function(){this._startOrPauseAnimation()}},{key:"componentDidUpdate",value:function(){this._startOrPauseAnimation()}},{key:"componentWillUnmount",value:function(){this._timer&&(0,h.cancelAnimationFrame)(this._timer)}},{key:"_startOrPauseAnimation",value:function(){var e=this.props,t=e.isAnimating,n=e.speed,r=void 0===n?1:n;!this._timer&&t&&r>0?this._startAnimation():this._timer&&!t&&this._pauseAnimation()}},{key:"_nextFrameByDomain",value:function(){var e=this.props,t=e.domain,n=e.value,r=e.speed,i=void 0===r?1:r,o=e.baseSpeed,a=void 0===o?600:o,s=e.animationWindow;if(t){var l=(t[1]-t[0])/a*i;if(Array.isArray(n)){var u,c;if(s===A.ANIMATION_WINDOW.incremental){var d=n[1]+l>t[1];u=n[0],c=d?n[0]+1:n[1]+l}else{c=(u=n[0]+l>t[1]?t[0]:n[0]+l)+n[1]-n[0]}return[u,c]}return Number(n)+l>t[1]?t[0]:Number(n)+l}}},{key:"_nextFrameByTimeStep",value:function(){var e=this.props,t=e.steps,n=void 0===t?null:t,r=e.value;if(n){var i=Array.isArray(r)?r[0]:Number(r),o=(0,f.bisectLeft)(n,i),a=o>=n.length-1?0:o+1;return[n[a],a]}}},{key:"render",value:function(){var e=this.state.isAnimating,t=this.props.children;return"function"==typeof t?t(e,this._startAnimation,this._pauseAnimation,this._resetAnimation,this.props.timeline,this.props.setTimelineValue):null}}]),n}(d.Component);return(0,a.default)(e,"defaultProps",{baseSpeed:A.BASE_SPEED,speed:1,steps:null,animationWindow:A.ANIMATION_WINDOW.free}),e};t.default=m},function(e,t,n){"use strict";var r=n(3);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i,o=r(n(15)),a=r(n(0)),s=r(n(14)),l=n(29),u=s.default.div.attrs({className:"dataset-name"})(i||(i=(0,o.default)(["\n font-weight: 500;\n font-size: 12px;\n color: ",";\n white-space: nowrap;\n"])),(function(e){return e.theme.titleColorLT})),c=function(e){var t=e.dataset;return a.default.createElement(l.CenterFlexbox,null,a.default.createElement(l.DatasetSquare,{className:"dataset-color",backgroundColor:t.color}),a.default.createElement(u,null,t.label))};t.default=c},function(e,t,n){"use strict";var r=n(3),i=n(6);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){return function(e){(0,p.default)(i,e);var t,n,r=(t=i,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=(0,g.default)(t);if(n){var i=(0,g.default)(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return(0,A.default)(this,e)});function i(){var e;(0,d.default)(this,i);for(var t=arguments.length,n=new Array(t),o=0;o1?v.default.createElement(S,{type:n.type,theme:this.props.theme},n.count):null,v.default.createElement(E,{className:"notification-item",type:n.type,isExpanded:i,onClick:function(){return e.setState({isExpanded:!i})}},v.default.createElement(C,{className:"notification-item--icon"},L[n.type]),v.default.createElement(T,{isExpanded:i,theme:this.props.theme},v.default.createElement(w.default,{source:n.message,renderers:{link:P}})),"function"==typeof r?v.default.createElement("div",{className:"notification-item--action"},v.default.createElement(O,{height:"10px",onClick:function(){return r(n.id)}})):null))}}]),i}(v.Component)};var o,a,s,l,u,c,d=r(n(7)),f=r(n(8)),h=r(n(13)),p=r(n(10)),A=r(n(11)),g=r(n(9)),m=r(n(4)),y=r(n(15)),v=i(n(0)),b=r(n(14)),_=n(43),w=r(n(1065)),x=n(21);var M=b.default.div.attrs({className:"notification-item--content-block"})(o||(o=(0,y.default)(["\n display: block;\n position: relative;\n width: ","px;\n margin-left: auto;\n"])),(function(e){return e.theme.notificationPanelItemWidth*(1+Number(e.isExpanded))})),E=b.default.div(a||(a=(0,y.default)(["\n background-color: ",";\n color: #fff;\n display: flex;\n flex-direction: row;\n width: ","px;\n height: ","px;\n font-size: 11px;\n margin-bottom: 1rem;\n padding: 1em;\n border-radius: 4px;\n box-shadow: ",";\n cursor: pointer;\n"])),(function(e){return e.theme.notificationColors[e.type]||"#000"}),(function(e){return e.theme.notificationPanelItemWidth*(1+Number(e.isExpanded))}),(function(e){return e.theme.notificationPanelItemHeight*(1+Number(e.isExpanded))}),(function(e){return e.theme.boxShadow})),O=(0,b.default)(_.Delete)(s||(s=(0,y.default)(["\n cursor: pointer;\n width: 13px;\n height: 13px;\n"]))),S=b.default.div.attrs({className:"notification-item--counter"})(l||(l=(0,y.default)(["\n position: absolute;\n font-size: 11px;\n font-weight: bold;\n text-align: center;\n left: -4px;\n bottom: -4px;\n border-radius: 50%;\n width: 20px;\n height: 20px;\n background-color: #ffffff;\n border: 1px solid ",";\n color: ",";\n box-shadow: ",";\n"])),(function(e){return e.theme.notificationColors[e.type]||"#000"}),(function(e){return e.theme.notificationColors[e.type]||"#000"}),(function(e){return e.theme.boxShadow})),T=b.default.div.attrs({className:"notification-item--message"})(u||(u=(0,y.default)(["\n flex-grow: 2;\n width: ","px;\n margin: 0 1em;\n overflow: ",";\n padding-right: ",";\n\n p {\n margin-top: 0;\n a {\n color: #fff;\n text-decoration: underline;\n }\n }\n"])),(function(e){return e.theme.notificationPanelItemWidth}),(function(e){return e.isExpanded?"auto":"hidden"}),(function(e){return e.isExpanded?"1em":0})),C=b.default.div(c||(c=(0,y.default)(["\n svg {\n vertical-align: text-top;\n }\n"]))),L={info:v.default.createElement(_.Info,{"data-testid":x.dataTestIds.infoIcon}),warning:v.default.createElement(_.Warning,{"data-testid":x.dataTestIds.warningIcon}),error:v.default.createElement(_.Warning,{"data-testid":x.dataTestIds.errorIcon}),success:v.default.createElement(_.Checkmark,{"data-testid":x.dataTestIds.successIcon})},P=function(e){return v.default.createElement("a",{href:e.href,target:"_blank",rel:"noopener noreferrer"},e.children)}},function(e,t,n){"use strict";e.exports=function(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}},function(e,t,n){"use strict";e.exports=function(e){return null==e?[]:"length"in e?e:[e]}},function(e,t,n){"use strict";var r=n(254);e.exports=function(e,t){return e.length?(r(e,e.length,0,t),e):t}},function(e,t,n){"use strict";e.exports=function(e,t,n){for(var r,i=[],o=-1;++o-1,e.enter("labelEnd"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelEnd"),l)};function l(n){return 40===n?e.attempt(p,t,i?t:u)(n):91===n?e.attempt(A,t,i?e.attempt(g,t,u):u)(n):i?t(n):u(n)}function u(e){return r._balanced=!0,n(e)}},resolveTo:function(e,t){var n,r,a,u,c,d,f,h=e.length,p=0;for(;h--;)if(u=e[h][1],c){if("link"===u.type||"labelLink"===u.type&&u._inactive)break;"enter"===e[h][0]&&"labelLink"===u.type&&(u._inactive=!0)}else if(d){if("enter"===e[h][0]&&("labelImage"===u.type||"labelLink"===u.type)&&!u._balanced&&(c=h,"labelLink"!==u.type)){p=2;break}}else"labelEnd"===u.type&&(d=h);return n={type:"labelLink"===e[c][1].type?"link":"image",start:l(e[c][1].start),end:l(e[e.length-1][1].end)},r={type:"label",start:l(e[c][1].start),end:l(e[d][1].end)},a={type:"labelText",start:l(e[c+p+2][1].end),end:l(e[d-2][1].start)},f=i(f=[["enter",n,t],["enter",r,t]],e.slice(c+1,c+p+3)),f=i(f,[["enter",a,t]]),f=i(f,s(t.parser.constructs.insideSpan.null,e.slice(c+p+4,d-3),t)),f=i(f,[["exit",a,t],e[d-2],e[d-1],["exit",r,t]]),f=i(f,e.slice(d+1)),f=i(f,[["exit",n,t]]),o(e,c,e.length,f),e},resolveAll:function(e){var t,n=-1;for(;++n div {\n display: flex;\n align-items: center;\n flex-direction: row;\n justify-content: flex-start;\n line-height: 18px;\n\n svg {\n margin-right: 5px;\n }\n\n .data-ex-icons-hash {\n width: 10px;\n height: 10px;\n stroke-width: 1px;\n margin-left: 2px;\n margin-right: 6px;\n }\n }\n"]))),_=d.default.div(a||(a=(0,u.default)(["\n width: 184px;\n height: 160px;\n z-index: 101;\n .list-selector {\n max-height: 160px;\n }\n .hover:after {\n content: '\\2713';\n margin-left: 5px;\n }\n"],["\n width: 184px;\n height: 160px;\n z-index: 101;\n .list-selector {\n max-height: 160px;\n }\n .hover:after {\n content: '\\\\2713';\n margin-left: 5px;\n }\n"]))),w=function(e){var t=e.left,n=e.top,r=e.isOpened,i=e.displayFormat,o=void 0===i?"None":i,a=e.setDisplayFormat,s=e.onClose,l=e.formatLabels,u=l.findIndex((function(e){return e.format===o})),d=(0,c.useCallback)((function(e,t){a(e),s()}),[a,s]);return c.default.createElement(f.default,{left:t,top:n,isOpened:r,onClose:s},c.default.createElement(_,{className:"formatter-popover"},c.default.createElement(h.default,{options:l,selectionIndex:u,displayOption:function(e){return e.label},onOptionSelected:d,light:!0})))};t.FormatterDropdown=w;var x=function(e){var t,n=e.isOpened,r=e.column,i=e.colMeta,o=e.toggleMoreOptions,a=e.sortTableColumn,s=e.pinTableColumn,u=e.copyTableColumn,d=e.setDisplayFormat,m=(0,c.useState)(!1),_=(0,l.default)(m,2),x=_[0],M=_[1],E=(0,c.useCallback)((function(e){switch(e.value){case p.TABLE_OPTION.SORT_ASC:a(p.SORT_ORDER.ASCENDING);break;case p.TABLE_OPTION.SORT_DES:a(p.SORT_ORDER.DESCENDING);break;case p.TABLE_OPTION.UNSORT:a(p.SORT_ORDER.UNSORT);break;case p.TABLE_OPTION.PIN:case p.TABLE_OPTION.UNPIN:s();break;case p.TABLE_OPTION.COPY:u();break;case p.TABLE_OPTION.FORMAT_COLUMN:return void M(!0)}o(r)}),[r,a,s,u,o]),O={Pin:g.Pin,ArrowDown:g.ArrowDown,ArrowUp:g.ArrowUp,Clipboard:g.Clipboard,Cancel:g.Cancel,Hash:g.Hash},S=(0,A.getFieldFormatLabels)(i[r].type),T=p.TABLE_OPTION_LIST.filter((function(t){var n=t.value!==p.TABLE_OPTION.FORMAT_COLUMN||S.length;return(!t.condition||t.condition(e))&&n})).map((function(e){return y(y({},e),{},{icon:O[e.icon]})})),C=(0,c.useCallback)((function(){M(!1),o(r)}),[r,o]);return c.default.createElement(f.default,{right:120,top:20,isOpened:n,onClose:C},c.default.createElement(b,{className:"more-options"},c.default.createElement(h.default,{displayOption:function(e){return e.display},options:T,customListItemComponent:v,onOptionSelected:E,light:!0}),c.default.createElement(w,{left:120,top:-10,isOpened:Boolean(n&&x),formatLabels:S,displayFormat:null===(t=i[r])||void 0===t?void 0:t.displayFormat,setDisplayFormat:d,onClose:C})))};t.default=x},function(e,t,n){"use strict";var r=n(3);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i,o,a=r(n(15)),s=r(n(0)),l=r(n(14)),u=r(n(651)),c=n(36),d=l.default.div(i||(i=(0,a.default)(["\n text-align: center;\n\n span {\n margin: 0 auto;\n }\n"]))),f=l.default.div.attrs({className:"data-loading-dialog"})(o||(o=(0,a.default)(["\n display: flex;\n align-items: center;\n justify-content: center;\n flex-grow: 1;\n\n .loading-content {\n display: flex;\n justify-content: center;\n align-items: center;\n }\n\n .loading-message {\n margin-left: 32px;\n color: ",";\n font-weight: 500;\n font-size: 14px;\n }\n"])),(function(e){return e.theme.titleColorLT})),h=function(e){var t=e.size,n=void 0===t?64:t,r=e.message,i=void 0===r?"modal.loadingDialog.loading":r;return s.default.createElement(f,null,s.default.createElement("div",{className:"loading-content"},s.default.createElement(d,null,s.default.createElement(u.default,{size:n})),s.default.createElement("div",{className:"loading-message"},s.default.createElement(c.FormattedMessage,{id:i}))))};t.default=h},function(e,t,n){"use strict";var r=n(3),i=n(6);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o,a,s,l=r(n(15)),u=r(n(0)),c=i(n(14)),d=(0,c.keyframes)(o||(o=(0,l.default)(["\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n"]))),f=c.default.span(a||(a=(0,l.default)(["\n border-left-color: ",";\n animation: _preloader_spin_ 500ms linear infinite;\n border-radius: 50%;\n border-top-color: transparent;\n border-bottom-color: transparent;\n border-right-color: transparent;\n cursor: wait;\n border-style: solid;\n display: block;\n animation-name: ",";\n}"])),(function(e){return e.color||e.theme.primaryBtnBgd}),d),h=c.default.div(s||(s=(0,l.default)(["\n border-radius: 50%;\n border: 3px solid ",";\n padding: 2px;\n"])),(function(e){return e.borderColor||e.theme.borderColorLT})),p=function(e){var t=e.size,n=void 0===t?32:t,r=e.color,i=void 0===r?"":r,o=e.strokeWidth,a=void 0===o?3:o,s=e.gap,l=void 0===s?2:s;return u.default.createElement(h,{style:{width:"".concat(n,"px"),height:"".concat(n,"px"),padding:"".concat(l,"px")}},u.default.createElement(f,{color:i,style:{width:"".concat(n-2*a-2*l,"px"),height:"".concat(n-2*a-2*l,"px")}}))};t.default=p},function(e,t,n){"use strict";var r=n(3);Object.defineProperty(t,"__esModule",{value:!0}),t.FlexContainerGrow=t.FlexColContainer=t.FlexContainer=void 0;var i,o,a,s=r(n(15)),l=r(n(14)),u=l.default.div(i||(i=(0,s.default)(["\n display: flex;\n gap: 8px;\n flex-wrap: wrap;\n"])));t.FlexContainer=u;var c=(0,l.default)(u)(o||(o=(0,s.default)(["\n flex-direction: column;\n"])));t.FlexColContainer=c;var d=(0,l.default)(u)(a||(a=(0,s.default)(["\n flex-grow: 1;\n"])));t.FlexContainerGrow=d},function(e,t,n){"use strict";var r=n(3);Object.defineProperty(t,"__esModule",{value:!0}),t.ProviderSelect=void 0;var i,o=r(n(15)),a=r(n(1094)),s=r(n(0)),l=r(n(14)),u=n(21),c=l.default.div.attrs({className:"provider-selection"})(i||(i=(0,o.default)(["\n display: flex;\n gap: 8px;\n"])));t.ProviderSelect=function(e){var t=e.cloudProviders,n=void 0===t?[]:t;return s.default.createElement("div",{"data-testid":u.dataTestIds.providerSelect},n.length?s.default.createElement(c,null,n.map((function(e){return s.default.createElement(a.default,{key:e.name,provider:e})}))):s.default.createElement("p",null,"No storage provider available"))}},function(e,t,n){"use strict";var r=n(3);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i,o=r(n(15)),a=r(n(0)),s=r(n(14)),l=r(n(651)),u=s.default.div.attrs({className:"image-preview"})(i||(i=(0,o.default)(["\n align-items: center;\n display: flex;\n flex-direction: column;\n flex: 1;\n justify-content: center;\n padding: 30px;\n\n .dimension,\n .instruction {\n padding: 8px 0px;\n }\n\n .preview-image {\n background: #e2e2e2;\n border-radius: 4px;\n box-shadow: 0 8px 16px 0 rgba(0, 0, 0, 0.18);\n width: 100%;\n position: relative;\n }\n\n .preview-image-placeholder {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n }\n\n .preview-image-spinner {\n position: absolute;\n left: calc(50% - 25px);\n top: calc(50% - 25px);\n }\n\n .preview-image--error {\n font-size: 12px;\n padding: 12px;\n color: ",";\n text-align: center;\n }\n"])),(function(e){return e.theme.errorColor})),c=function(e){var t=e.exportImage,n=e.width,r=void 0===n?400:n,i=e.showDimension,o=void 0!==i&&i,s=t||{},c=s.error,d=s.imageDataUri,f=s.processing,h=s.imageSize,p=(h=void 0===h?{}:h).imageW,A=void 0===p?0:p,g=h.imageH,m=void 0===g?0:g,y={width:"".concat(r,"px"),height:"".concat(m/(A||1)*r,"px")};return a.default.createElement(u,null,o?a.default.createElement("div",{className:"dimension"},A," pixel x ",m," pixel"):null,a.default.createElement("div",{className:"preview-image",style:y},f?a.default.createElement("div",{className:"preview-image-spinner"},a.default.createElement(l.default,null)):c?a.default.createElement("div",{className:"preview-image--error"},a.default.createElement("span",null,c.message||"Generate map image failed!")):a.default.createElement("img",{className:"preview-image-placeholder",src:d})))};t.default=c},function(e,t,n){"use strict";var r=n(3);Object.defineProperty(t,"__esModule",{value:!0}),t.ExportMapLink=t.StyledExportLink=t.StyledWarning=t.StyledExportMapSection=void 0;var i,o,a,s=r(n(33)),l=r(n(72)),u=r(n(15)),c=r(n(0)),d=r(n(14)),f=n(29),h=(0,d.default)(f.StyledExportSection)(i||(i=(0,u.default)(["\n margin-top: ","px;\n"])),(function(e){return e.theme.exportIntraSectionMargin}));t.StyledExportMapSection=h;var p=d.default.span(o||(o=(0,u.default)(["\n color: ",";\n font-weight: ",";\n"])),(function(e){return e.theme.errorColor}),(function(e){return e.theme.selectFontWeightBold}));t.StyledWarning=p;var A=d.default.a(a||(a=(0,u.default)(["\n text-decoration-line: underline !important;\n"])));t.StyledExportLink=A;t.ExportMapLink=function(e){var t=e.children,n=(0,l.default)(e,["children"]);return c.default.createElement(A,(0,s.default)({target:"_blank",rel:"noopener noreferrer"},n),t)}},function(e,t,n){"use strict";n.r(t);function r(e,t,n){if(null!==e)for(var i,o,a,s,l,u,c,d,f=0,h=0,p=e.type,A="FeatureCollection"===p,g="Feature"===p,m=A?e.features.length:1,y=0;ye[0]&&(t[0]=e[0]),t[1]>e[1]&&(t[1]=e[1]),t[2]=Math.abs(d)?c>0?a0?s=Math.abs(d)?c>0?a<=i&&i0?s<=o&&o=Math.abs(d)?c>0?a0?s=Math.abs(d)?c>0?a<=i&&i<=l:l<=i&&i<=a:d>0?s<=o&&o<=u:u<=o&&o<=s)}var s=function(e,t,n){void 0===n&&(n={});for(var r=function(e){if(!e)throw new Error("coord is required");if(!Array.isArray(e)){if("Feature"===e.type&&null!==e.geometry&&"Point"===e.geometry.type)return e.geometry.coordinates;if("Point"===e.type)return e.coordinates}if(Array.isArray(e)&&e.length>=2&&!Array.isArray(e[0])&&!Array.isArray(e[1]))return e;throw new Error("coord must be GeoJSON Point or an Array of numbers")}(e),i=function(e){if(Array.isArray(e))return e;if("Feature"===e.type){if(null!==e.geometry)return e.geometry.coordinates}else if(e.coordinates)return e.coordinates;throw new Error("coords must be GeoJSON Feature, Geometry Object or an Array")}(t),o=0;o=2&&!Array.isArray(e[0])&&!Array.isArray(e[1]))return e;throw new Error("coord must be GeoJSON Point or an Array of numbers")}(e),i=l(t),o=i.type,a=t.bbox,s=i.coordinates;if(a&&!1===function(e,t){return t[0]<=e[0]&&t[1]<=e[1]&&t[2]>=e[0]&&t[3]>=e[1]}(r,a))return!1;"Polygon"===o&&(s=[s]);for(var u=!1,d=0;de[1]!=u>e[1]&&e[0]<(l-a)*(e[1]-s)/(u-s)+a&&(r=!r)}return r}function d(e,t){return!(e[0]>t[0])&&(!(e[2]t[1])&&!(e[3]1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;const r=Math.fround(e),i=e-r;return t[n]=r,t[n+1]=i,t}function i(e){return e-Math.fround(e)}function o(e){const t=new Float32Array(32);for(let n=0;n<4;++n)for(let i=0;i<4;++i){const o=4*n+i;r(e[4*i+n],t,2*o)}return t}n.d(t,"b",(function(){return s})),n.d(t,"a",(function(){return l}));const a={ONE:1};const s={name:"fp64-arithmetic",vs:"uniform float ONE;\nvec2 split(float a) {\n const float SPLIT = 4097.0;\n float t = a * SPLIT;\n#if defined(LUMA_FP64_CODE_ELIMINATION_WORKAROUND)\n float a_hi = t * ONE - (t - a);\n float a_lo = a * ONE - a_hi;\n#else\n float a_hi = t - (t - a);\n float a_lo = a - a_hi;\n#endif\n return vec2(a_hi, a_lo);\n}\nvec2 split2(vec2 a) {\n vec2 b = split(a.x);\n b.y += a.y;\n return b;\n}\nvec2 quickTwoSum(float a, float b) {\n#if defined(LUMA_FP64_CODE_ELIMINATION_WORKAROUND)\n float sum = (a + b) * ONE;\n float err = b - (sum - a) * ONE;\n#else\n float sum = a + b;\n float err = b - (sum - a);\n#endif\n return vec2(sum, err);\n}\nvec2 twoSum(float a, float b) {\n float s = (a + b);\n#if defined(LUMA_FP64_CODE_ELIMINATION_WORKAROUND)\n float v = (s * ONE - a) * ONE;\n float err = (a - (s - v) * ONE) * ONE * ONE * ONE + (b - v);\n#else\n float v = s - a;\n float err = (a - (s - v)) + (b - v);\n#endif\n return vec2(s, err);\n}\n\nvec2 twoSub(float a, float b) {\n float s = (a - b);\n#if defined(LUMA_FP64_CODE_ELIMINATION_WORKAROUND)\n float v = (s * ONE - a) * ONE;\n float err = (a - (s - v) * ONE) * ONE * ONE * ONE - (b + v);\n#else\n float v = s - a;\n float err = (a - (s - v)) - (b + v);\n#endif\n return vec2(s, err);\n}\n\nvec2 twoSqr(float a) {\n float prod = a * a;\n vec2 a_fp64 = split(a);\n#if defined(LUMA_FP64_CODE_ELIMINATION_WORKAROUND)\n float err = ((a_fp64.x * a_fp64.x - prod) * ONE + 2.0 * a_fp64.x *\n a_fp64.y * ONE * ONE) + a_fp64.y * a_fp64.y * ONE * ONE * ONE;\n#else\n float err = ((a_fp64.x * a_fp64.x - prod) + 2.0 * a_fp64.x * a_fp64.y) + a_fp64.y * a_fp64.y;\n#endif\n return vec2(prod, err);\n}\n\nvec2 twoProd(float a, float b) {\n float prod = a * b;\n vec2 a_fp64 = split(a);\n vec2 b_fp64 = split(b);\n float err = ((a_fp64.x * b_fp64.x - prod) + a_fp64.x * b_fp64.y +\n a_fp64.y * b_fp64.x) + a_fp64.y * b_fp64.y;\n return vec2(prod, err);\n}\n\nvec2 sum_fp64(vec2 a, vec2 b) {\n vec2 s, t;\n s = twoSum(a.x, b.x);\n t = twoSum(a.y, b.y);\n s.y += t.x;\n s = quickTwoSum(s.x, s.y);\n s.y += t.y;\n s = quickTwoSum(s.x, s.y);\n return s;\n}\n\nvec2 sub_fp64(vec2 a, vec2 b) {\n vec2 s, t;\n s = twoSub(a.x, b.x);\n t = twoSub(a.y, b.y);\n s.y += t.x;\n s = quickTwoSum(s.x, s.y);\n s.y += t.y;\n s = quickTwoSum(s.x, s.y);\n return s;\n}\n\nvec2 mul_fp64(vec2 a, vec2 b) {\n vec2 prod = twoProd(a.x, b.x);\n prod.y += a.x * b.y;\n#if defined(LUMA_FP64_HIGH_BITS_OVERFLOW_WORKAROUND)\n prod = split2(prod);\n#endif\n prod = quickTwoSum(prod.x, prod.y);\n prod.y += a.y * b.x;\n#if defined(LUMA_FP64_HIGH_BITS_OVERFLOW_WORKAROUND)\n prod = split2(prod);\n#endif\n prod = quickTwoSum(prod.x, prod.y);\n return prod;\n}\n\nvec2 div_fp64(vec2 a, vec2 b) {\n float xn = 1.0 / b.x;\n#if defined(LUMA_FP64_HIGH_BITS_OVERFLOW_WORKAROUND)\n vec2 yn = mul_fp64(a, vec2(xn, 0));\n#else\n vec2 yn = a * xn;\n#endif\n float diff = (sub_fp64(a, mul_fp64(b, yn))).x;\n vec2 prod = twoProd(xn, diff);\n return sum_fp64(yn, prod);\n}\n\nvec2 sqrt_fp64(vec2 a) {\n if (a.x == 0.0 && a.y == 0.0) return vec2(0.0, 0.0);\n if (a.x < 0.0) return vec2(0.0 / 0.0, 0.0 / 0.0);\n\n float x = 1.0 / sqrt(a.x);\n float yn = a.x * x;\n#if defined(LUMA_FP64_CODE_ELIMINATION_WORKAROUND)\n vec2 yn_sqr = twoSqr(yn) * ONE;\n#else\n vec2 yn_sqr = twoSqr(yn);\n#endif\n float diff = sub_fp64(a, yn_sqr).x;\n vec2 prod = twoProd(x * 0.5, diff);\n#if defined(LUMA_FP64_HIGH_BITS_OVERFLOW_WORKAROUND)\n return sum_fp64(split(yn), prod);\n#else\n return sum_fp64(vec2(yn, 0.0), prod);\n#endif\n}\n",fs:null,getUniforms:function(){return a},fp64ify:r,fp64LowPart:i,fp64ifyMatrix4:o},l={name:"fp64",vs:"const vec2 E_FP64 = vec2(2.7182817459106445e+00, 8.254840366817007e-08);\nconst vec2 LOG2_FP64 = vec2(0.6931471824645996e+00, -1.9046542121259336e-09);\nconst vec2 PI_FP64 = vec2(3.1415927410125732, -8.742278012618954e-8);\nconst vec2 TWO_PI_FP64 = vec2(6.2831854820251465, -1.7484556025237907e-7);\nconst vec2 PI_2_FP64 = vec2(1.5707963705062866, -4.371139006309477e-8);\nconst vec2 PI_4_FP64 = vec2(0.7853981852531433, -2.1855695031547384e-8);\nconst vec2 PI_16_FP64 = vec2(0.19634954631328583, -5.463923757886846e-9);\nconst vec2 PI_16_2_FP64 = vec2(0.39269909262657166, -1.0927847515773692e-8);\nconst vec2 PI_16_3_FP64 = vec2(0.5890486240386963, -1.4906100798128818e-9);\nconst vec2 PI_180_FP64 = vec2(0.01745329238474369, 1.3519960498364902e-10);\n\nconst vec2 SIN_TABLE_0_FP64 = vec2(0.19509032368659973, -1.6704714833615242e-9);\nconst vec2 SIN_TABLE_1_FP64 = vec2(0.3826834261417389, 6.22335089017767e-9);\nconst vec2 SIN_TABLE_2_FP64 = vec2(0.5555702447891235, -1.1769521357507529e-8);\nconst vec2 SIN_TABLE_3_FP64 = vec2(0.7071067690849304, 1.2101617041793133e-8);\n\nconst vec2 COS_TABLE_0_FP64 = vec2(0.9807852506637573, 2.9739473106360492e-8);\nconst vec2 COS_TABLE_1_FP64 = vec2(0.9238795042037964, 2.8307490351764386e-8);\nconst vec2 COS_TABLE_2_FP64 = vec2(0.8314695954322815, 1.6870263741530778e-8);\nconst vec2 COS_TABLE_3_FP64 = vec2(0.7071067690849304, 1.2101617152815436e-8);\n\nconst vec2 INVERSE_FACTORIAL_3_FP64 = vec2(1.666666716337204e-01, -4.967053879312289e-09);\nconst vec2 INVERSE_FACTORIAL_4_FP64 = vec2(4.16666679084301e-02, -1.2417634698280722e-09);\nconst vec2 INVERSE_FACTORIAL_5_FP64 = vec2(8.333333767950535e-03, -4.34617203337595e-10);\nconst vec2 INVERSE_FACTORIAL_6_FP64 = vec2(1.3888889225199819e-03, -3.3631094437103215e-11);\nconst vec2 INVERSE_FACTORIAL_7_FP64 = vec2(1.9841270113829523e-04, -2.725596874933456e-12);\nconst vec2 INVERSE_FACTORIAL_8_FP64 = vec2(2.4801587642286904e-05, -3.406996025904184e-13);\nconst vec2 INVERSE_FACTORIAL_9_FP64 = vec2(2.75573188446287533e-06, 3.7935713937038186e-14);\nconst vec2 INVERSE_FACTORIAL_10_FP64 = vec2(2.755731998149713e-07, -7.575112367869873e-15);\n\nfloat nint(float d) {\n if (d == floor(d)) return d;\n return floor(d + 0.5);\n}\n\nvec2 nint_fp64(vec2 a) {\n float hi = nint(a.x);\n float lo;\n vec2 tmp;\n if (hi == a.x) {\n lo = nint(a.y);\n tmp = quickTwoSum(hi, lo);\n } else {\n lo = 0.0;\n if (abs(hi - a.x) == 0.5 && a.y < 0.0) {\n hi -= 1.0;\n }\n tmp = vec2(hi, lo);\n }\n return tmp;\n}\n\nvec2 exp_fp64(vec2 a) {\n\n const int k_power = 4;\n const float k = 16.0;\n\n const float inv_k = 1.0 / k;\n\n if (a.x <= -88.0) return vec2(0.0, 0.0);\n if (a.x >= 88.0) return vec2(1.0 / 0.0, 1.0 / 0.0);\n if (a.x == 0.0 && a.y == 0.0) return vec2(1.0, 0.0);\n if (a.x == 1.0 && a.y == 0.0) return E_FP64;\n\n float m = floor(a.x / LOG2_FP64.x + 0.5);\n vec2 r = sub_fp64(a, mul_fp64(LOG2_FP64, vec2(m, 0.0))) * inv_k;\n vec2 s, t, p;\n\n p = mul_fp64(r, r);\n s = sum_fp64(r, p * 0.5);\n p = mul_fp64(p, r);\n t = mul_fp64(p, INVERSE_FACTORIAL_3_FP64);\n\n s = sum_fp64(s, t);\n p = mul_fp64(p, r);\n t = mul_fp64(p, INVERSE_FACTORIAL_4_FP64);\n\n s = sum_fp64(s, t);\n p = mul_fp64(p, r);\n t = mul_fp64(p, INVERSE_FACTORIAL_5_FP64);\n\n\n\n\n\n\n s = sum_fp64(s, t);\n for (int i = 0; i < k_power; i++) {\n s = sum_fp64(s * 2.0, mul_fp64(s, s));\n }\n\n#if defined(NVIDIA_FP64_WORKAROUND) || defined(INTEL_FP64_WORKAROUND)\n s = sum_fp64(s, vec2(ONE, 0.0));\n#else\n s = sum_fp64(s, vec2(1.0, 0.0));\n#endif\n\n return s * pow(2.0, m);\n}\n\nvec2 log_fp64(vec2 a)\n{\n if (a.x == 1.0 && a.y == 0.0) return vec2(0.0, 0.0);\n if (a.x <= 0.0) return vec2(0.0 / 0.0, 0.0 / 0.0);\n vec2 x = vec2(log(a.x), 0.0);\n vec2 s;\n#if defined(NVIDIA_FP64_WORKAROUND) || defined(INTEL_FP64_WORKAROUND)\n s = vec2(ONE, 0.0);\n#else\n s = vec2(1.0, 0.0);\n#endif\n\n x = sub_fp64(sum_fp64(x, mul_fp64(a, exp_fp64(-x))), s);\n return x;\n}\n\nvec2 sin_taylor_fp64(vec2 a) {\n vec2 r, s, t, x;\n\n if (a.x == 0.0 && a.y == 0.0) {\n return vec2(0.0, 0.0);\n }\n\n x = -mul_fp64(a, a);\n s = a;\n r = a;\n\n r = mul_fp64(r, x);\n t = mul_fp64(r, INVERSE_FACTORIAL_3_FP64);\n s = sum_fp64(s, t);\n\n r = mul_fp64(r, x);\n t = mul_fp64(r, INVERSE_FACTORIAL_5_FP64);\n s = sum_fp64(s, t);\n\n\n\n\n\n\n return s;\n}\n\nvec2 cos_taylor_fp64(vec2 a) {\n vec2 r, s, t, x;\n\n if (a.x == 0.0 && a.y == 0.0) {\n return vec2(1.0, 0.0);\n }\n\n x = -mul_fp64(a, a);\n r = x;\n s = sum_fp64(vec2(1.0, 0.0), r * 0.5);\n\n r = mul_fp64(r, x);\n t = mul_fp64(r, INVERSE_FACTORIAL_4_FP64);\n s = sum_fp64(s, t);\n\n r = mul_fp64(r, x);\n t = mul_fp64(r, INVERSE_FACTORIAL_6_FP64);\n s = sum_fp64(s, t);\n\n\n\n\n\n\n return s;\n}\n\nvoid sincos_taylor_fp64(vec2 a, out vec2 sin_t, out vec2 cos_t) {\n if (a.x == 0.0 && a.y == 0.0) {\n sin_t = vec2(0.0, 0.0);\n cos_t = vec2(1.0, 0.0);\n }\n\n sin_t = sin_taylor_fp64(a);\n cos_t = sqrt_fp64(sub_fp64(vec2(1.0, 0.0), mul_fp64(sin_t, sin_t)));\n}\n\nvec2 sin_fp64(vec2 a) {\n if (a.x == 0.0 && a.y == 0.0) {\n return vec2(0.0, 0.0);\n }\n vec2 z = nint_fp64(div_fp64(a, TWO_PI_FP64));\n vec2 r = sub_fp64(a, mul_fp64(TWO_PI_FP64, z));\n\n vec2 t;\n float q = floor(r.x / PI_2_FP64.x + 0.5);\n int j = int(q);\n\n if (j < -2 || j > 2) {\n return vec2(0.0 / 0.0, 0.0 / 0.0);\n }\n\n t = sub_fp64(r, mul_fp64(PI_2_FP64, vec2(q, 0.0)));\n\n q = floor(t.x / PI_16_FP64.x + 0.5);\n int k = int(q);\n\n if (k == 0) {\n if (j == 0) {\n return sin_taylor_fp64(t);\n } else if (j == 1) {\n return cos_taylor_fp64(t);\n } else if (j == -1) {\n return -cos_taylor_fp64(t);\n } else {\n return -sin_taylor_fp64(t);\n }\n }\n\n int abs_k = int(abs(float(k)));\n\n if (abs_k > 4) {\n return vec2(0.0 / 0.0, 0.0 / 0.0);\n } else {\n t = sub_fp64(t, mul_fp64(PI_16_FP64, vec2(q, 0.0)));\n }\n\n vec2 u = vec2(0.0, 0.0);\n vec2 v = vec2(0.0, 0.0);\n\n#if defined(NVIDIA_FP64_WORKAROUND) || defined(INTEL_FP64_WORKAROUND)\n if (abs(float(abs_k) - 1.0) < 0.5) {\n u = COS_TABLE_0_FP64;\n v = SIN_TABLE_0_FP64;\n } else if (abs(float(abs_k) - 2.0) < 0.5) {\n u = COS_TABLE_1_FP64;\n v = SIN_TABLE_1_FP64;\n } else if (abs(float(abs_k) - 3.0) < 0.5) {\n u = COS_TABLE_2_FP64;\n v = SIN_TABLE_2_FP64;\n } else if (abs(float(abs_k) - 4.0) < 0.5) {\n u = COS_TABLE_3_FP64;\n v = SIN_TABLE_3_FP64;\n }\n#else\n if (abs_k == 1) {\n u = COS_TABLE_0_FP64;\n v = SIN_TABLE_0_FP64;\n } else if (abs_k == 2) {\n u = COS_TABLE_1_FP64;\n v = SIN_TABLE_1_FP64;\n } else if (abs_k == 3) {\n u = COS_TABLE_2_FP64;\n v = SIN_TABLE_2_FP64;\n } else if (abs_k == 4) {\n u = COS_TABLE_3_FP64;\n v = SIN_TABLE_3_FP64;\n }\n#endif\n\n vec2 sin_t, cos_t;\n sincos_taylor_fp64(t, sin_t, cos_t);\n\n\n\n vec2 result = vec2(0.0, 0.0);\n if (j == 0) {\n if (k > 0) {\n result = sum_fp64(mul_fp64(u, sin_t), mul_fp64(v, cos_t));\n } else {\n result = sub_fp64(mul_fp64(u, sin_t), mul_fp64(v, cos_t));\n }\n } else if (j == 1) {\n if (k > 0) {\n result = sub_fp64(mul_fp64(u, cos_t), mul_fp64(v, sin_t));\n } else {\n result = sum_fp64(mul_fp64(u, cos_t), mul_fp64(v, sin_t));\n }\n } else if (j == -1) {\n if (k > 0) {\n result = sub_fp64(mul_fp64(v, sin_t), mul_fp64(u, cos_t));\n } else {\n result = -sum_fp64(mul_fp64(v, sin_t), mul_fp64(u, cos_t));\n }\n } else {\n if (k > 0) {\n result = -sum_fp64(mul_fp64(u, sin_t), mul_fp64(v, cos_t));\n } else {\n result = sub_fp64(mul_fp64(v, cos_t), mul_fp64(u, sin_t));\n }\n }\n\n return result;\n}\n\nvec2 cos_fp64(vec2 a) {\n if (a.x == 0.0 && a.y == 0.0) {\n return vec2(1.0, 0.0);\n }\n vec2 z = nint_fp64(div_fp64(a, TWO_PI_FP64));\n vec2 r = sub_fp64(a, mul_fp64(TWO_PI_FP64, z));\n\n vec2 t;\n float q = floor(r.x / PI_2_FP64.x + 0.5);\n int j = int(q);\n\n if (j < -2 || j > 2) {\n return vec2(0.0 / 0.0, 0.0 / 0.0);\n }\n\n t = sub_fp64(r, mul_fp64(PI_2_FP64, vec2(q, 0.0)));\n\n q = floor(t.x / PI_16_FP64.x + 0.5);\n int k = int(q);\n\n if (k == 0) {\n if (j == 0) {\n return cos_taylor_fp64(t);\n } else if (j == 1) {\n return -sin_taylor_fp64(t);\n } else if (j == -1) {\n return sin_taylor_fp64(t);\n } else {\n return -cos_taylor_fp64(t);\n }\n }\n\n int abs_k = int(abs(float(k)));\n\n if (abs_k > 4) {\n return vec2(0.0 / 0.0, 0.0 / 0.0);\n } else {\n t = sub_fp64(t, mul_fp64(PI_16_FP64, vec2(q, 0.0)));\n }\n\n vec2 u = vec2(0.0, 0.0);\n vec2 v = vec2(0.0, 0.0);\n\n#if defined(NVIDIA_FP64_WORKAROUND) || defined(INTEL_FP64_WORKAROUND)\n if (abs(float(abs_k) - 1.0) < 0.5) {\n u = COS_TABLE_0_FP64;\n v = SIN_TABLE_0_FP64;\n } else if (abs(float(abs_k) - 2.0) < 0.5) {\n u = COS_TABLE_1_FP64;\n v = SIN_TABLE_1_FP64;\n } else if (abs(float(abs_k) - 3.0) < 0.5) {\n u = COS_TABLE_2_FP64;\n v = SIN_TABLE_2_FP64;\n } else if (abs(float(abs_k) - 4.0) < 0.5) {\n u = COS_TABLE_3_FP64;\n v = SIN_TABLE_3_FP64;\n }\n#else\n if (abs_k == 1) {\n u = COS_TABLE_0_FP64;\n v = SIN_TABLE_0_FP64;\n } else if (abs_k == 2) {\n u = COS_TABLE_1_FP64;\n v = SIN_TABLE_1_FP64;\n } else if (abs_k == 3) {\n u = COS_TABLE_2_FP64;\n v = SIN_TABLE_2_FP64;\n } else if (abs_k == 4) {\n u = COS_TABLE_3_FP64;\n v = SIN_TABLE_3_FP64;\n }\n#endif\n\n vec2 sin_t, cos_t;\n sincos_taylor_fp64(t, sin_t, cos_t);\n\n vec2 result = vec2(0.0, 0.0);\n if (j == 0) {\n if (k > 0) {\n result = sub_fp64(mul_fp64(u, cos_t), mul_fp64(v, sin_t));\n } else {\n result = sum_fp64(mul_fp64(u, cos_t), mul_fp64(v, sin_t));\n }\n } else if (j == 1) {\n if (k > 0) {\n result = -sum_fp64(mul_fp64(u, sin_t), mul_fp64(v, cos_t));\n } else {\n result = sub_fp64(mul_fp64(v, cos_t), mul_fp64(u, sin_t));\n }\n } else if (j == -1) {\n if (k > 0) {\n result = sum_fp64(mul_fp64(u, sin_t), mul_fp64(v, cos_t));\n } else {\n result = sub_fp64(mul_fp64(u, sin_t), mul_fp64(v, cos_t));\n }\n } else {\n if (k > 0) {\n result = sub_fp64(mul_fp64(v, sin_t), mul_fp64(u, cos_t));\n } else {\n result = -sum_fp64(mul_fp64(u, cos_t), mul_fp64(v, sin_t));\n }\n }\n\n return result;\n}\n\nvec2 tan_fp64(vec2 a) {\n vec2 sin_a;\n vec2 cos_a;\n\n if (a.x == 0.0 && a.y == 0.0) {\n return vec2(0.0, 0.0);\n }\n vec2 z = nint_fp64(div_fp64(a, TWO_PI_FP64));\n vec2 r = sub_fp64(a, mul_fp64(TWO_PI_FP64, z));\n\n vec2 t;\n float q = floor(r.x / PI_2_FP64.x + 0.5);\n int j = int(q);\n\n\n if (j < -2 || j > 2) {\n return vec2(0.0 / 0.0, 0.0 / 0.0);\n }\n\n t = sub_fp64(r, mul_fp64(PI_2_FP64, vec2(q, 0.0)));\n\n q = floor(t.x / PI_16_FP64.x + 0.5);\n int k = int(q);\n int abs_k = int(abs(float(k)));\n\n if (abs_k > 4) {\n return vec2(0.0 / 0.0, 0.0 / 0.0);\n } else {\n t = sub_fp64(t, mul_fp64(PI_16_FP64, vec2(q, 0.0)));\n }\n\n\n vec2 u = vec2(0.0, 0.0);\n vec2 v = vec2(0.0, 0.0);\n\n vec2 sin_t, cos_t;\n vec2 s, c;\n sincos_taylor_fp64(t, sin_t, cos_t);\n\n if (k == 0) {\n s = sin_t;\n c = cos_t;\n } else {\n#if defined(NVIDIA_FP64_WORKAROUND) || defined(INTEL_FP64_WORKAROUND)\n if (abs(float(abs_k) - 1.0) < 0.5) {\n u = COS_TABLE_0_FP64;\n v = SIN_TABLE_0_FP64;\n } else if (abs(float(abs_k) - 2.0) < 0.5) {\n u = COS_TABLE_1_FP64;\n v = SIN_TABLE_1_FP64;\n } else if (abs(float(abs_k) - 3.0) < 0.5) {\n u = COS_TABLE_2_FP64;\n v = SIN_TABLE_2_FP64;\n } else if (abs(float(abs_k) - 4.0) < 0.5) {\n u = COS_TABLE_3_FP64;\n v = SIN_TABLE_3_FP64;\n }\n#else\n if (abs_k == 1) {\n u = COS_TABLE_0_FP64;\n v = SIN_TABLE_0_FP64;\n } else if (abs_k == 2) {\n u = COS_TABLE_1_FP64;\n v = SIN_TABLE_1_FP64;\n } else if (abs_k == 3) {\n u = COS_TABLE_2_FP64;\n v = SIN_TABLE_2_FP64;\n } else if (abs_k == 4) {\n u = COS_TABLE_3_FP64;\n v = SIN_TABLE_3_FP64;\n }\n#endif\n if (k > 0) {\n s = sum_fp64(mul_fp64(u, sin_t), mul_fp64(v, cos_t));\n c = sub_fp64(mul_fp64(u, cos_t), mul_fp64(v, sin_t));\n } else {\n s = sub_fp64(mul_fp64(u, sin_t), mul_fp64(v, cos_t));\n c = sum_fp64(mul_fp64(u, cos_t), mul_fp64(v, sin_t));\n }\n }\n\n if (j == 0) {\n sin_a = s;\n cos_a = c;\n } else if (j == 1) {\n sin_a = c;\n cos_a = -s;\n } else if (j == -1) {\n sin_a = -c;\n cos_a = s;\n } else {\n sin_a = -s;\n cos_a = -c;\n }\n return div_fp64(sin_a, cos_a);\n}\n\nvec2 radians_fp64(vec2 degree) {\n return mul_fp64(degree, PI_180_FP64);\n}\n\nvec2 mix_fp64(vec2 a, vec2 b, float x) {\n vec2 range = sub_fp64(b, a);\n return sum_fp64(a, mul_fp64(range, vec2(x, 0.0)));\n}\n\nvoid vec2_sum_fp64(vec2 a[2], vec2 b[2], out vec2 out_val[2]) {\n out_val[0] = sum_fp64(a[0], b[0]);\n out_val[1] = sum_fp64(a[1], b[1]);\n}\n\nvoid vec2_sub_fp64(vec2 a[2], vec2 b[2], out vec2 out_val[2]) {\n out_val[0] = sub_fp64(a[0], b[0]);\n out_val[1] = sub_fp64(a[1], b[1]);\n}\n\nvoid vec2_mul_fp64(vec2 a[2], vec2 b[2], out vec2 out_val[2]) {\n out_val[0] = mul_fp64(a[0], b[0]);\n out_val[1] = mul_fp64(a[1], b[1]);\n}\n\nvoid vec2_div_fp64(vec2 a[2], vec2 b[2], out vec2 out_val[2]) {\n out_val[0] = div_fp64(a[0], b[0]);\n out_val[1] = div_fp64(a[1], b[1]);\n}\n\nvoid vec2_mix_fp64(vec2 x[2], vec2 y[2], float a, out vec2 out_val[2]) {\n vec2 range[2];\n vec2_sub_fp64(y, x, range);\n vec2 portion[2];\n portion[0] = range[0] * a;\n portion[1] = range[1] * a;\n vec2_sum_fp64(x, portion, out_val);\n}\n\nvec2 vec2_length_fp64(vec2 x[2]) {\n return sqrt_fp64(sum_fp64(mul_fp64(x[0], x[0]), mul_fp64(x[1], x[1])));\n}\n\nvoid vec2_normalize_fp64(vec2 x[2], out vec2 out_val[2]) {\n vec2 length = vec2_length_fp64(x);\n vec2 length_vec2[2];\n length_vec2[0] = length;\n length_vec2[1] = length;\n\n vec2_div_fp64(x, length_vec2, out_val);\n}\n\nvec2 vec2_distance_fp64(vec2 x[2], vec2 y[2]) {\n vec2 diff[2];\n vec2_sub_fp64(x, y, diff);\n return vec2_length_fp64(diff);\n}\n\nvec2 vec2_dot_fp64(vec2 a[2], vec2 b[2]) {\n vec2 v[2];\n\n v[0] = mul_fp64(a[0], b[0]);\n v[1] = mul_fp64(a[1], b[1]);\n\n return sum_fp64(v[0], v[1]);\n}\nvoid vec3_sub_fp64(vec2 a[3], vec2 b[3], out vec2 out_val[3]) {\n for (int i = 0; i < 3; i++) {\n out_val[i] = sum_fp64(a[i], b[i]);\n }\n}\n\nvoid vec3_sum_fp64(vec2 a[3], vec2 b[3], out vec2 out_val[3]) {\n for (int i = 0; i < 3; i++) {\n out_val[i] = sum_fp64(a[i], b[i]);\n }\n}\n\nvec2 vec3_length_fp64(vec2 x[3]) {\n return sqrt_fp64(sum_fp64(sum_fp64(mul_fp64(x[0], x[0]), mul_fp64(x[1], x[1])),\n mul_fp64(x[2], x[2])));\n}\n\nvec2 vec3_distance_fp64(vec2 x[3], vec2 y[3]) {\n vec2 diff[3];\n vec3_sub_fp64(x, y, diff);\n return vec3_length_fp64(diff);\n}\nvoid vec4_fp64(vec4 a, out vec2 out_val[4]) {\n out_val[0].x = a[0];\n out_val[0].y = 0.0;\n\n out_val[1].x = a[1];\n out_val[1].y = 0.0;\n\n out_val[2].x = a[2];\n out_val[2].y = 0.0;\n\n out_val[3].x = a[3];\n out_val[3].y = 0.0;\n}\n\nvoid vec4_scalar_mul_fp64(vec2 a[4], vec2 b, out vec2 out_val[4]) {\n out_val[0] = mul_fp64(a[0], b);\n out_val[1] = mul_fp64(a[1], b);\n out_val[2] = mul_fp64(a[2], b);\n out_val[3] = mul_fp64(a[3], b);\n}\n\nvoid vec4_sum_fp64(vec2 a[4], vec2 b[4], out vec2 out_val[4]) {\n for (int i = 0; i < 4; i++) {\n out_val[i] = sum_fp64(a[i], b[i]);\n }\n}\n\nvoid vec4_dot_fp64(vec2 a[4], vec2 b[4], out vec2 out_val) {\n vec2 v[4];\n\n v[0] = mul_fp64(a[0], b[0]);\n v[1] = mul_fp64(a[1], b[1]);\n v[2] = mul_fp64(a[2], b[2]);\n v[3] = mul_fp64(a[3], b[3]);\n\n out_val = sum_fp64(sum_fp64(v[0], v[1]), sum_fp64(v[2], v[3]));\n}\n\nvoid mat4_vec4_mul_fp64(vec2 b[16], vec2 a[4], out vec2 out_val[4]) {\n vec2 tmp[4];\n\n for (int i = 0; i < 4; i++)\n {\n for (int j = 0; j < 4; j++)\n {\n tmp[j] = b[j + i * 4];\n }\n vec4_dot_fp64(a, tmp, out_val[i]);\n }\n}\n",fs:null,dependencies:[s],fp64ify:r,fp64LowPart:i,fp64ifyMatrix4:o}},function(e,t,n){"use strict";n.r(t),n.d(t,"dsvFormat",(function(){return r.a})),n.d(t,"csvParse",(function(){return i.f})),n.d(t,"csvParseRows",(function(){return i.g})),n.d(t,"csvFormat",(function(){return i.a})),n.d(t,"csvFormatBody",(function(){return i.b})),n.d(t,"csvFormatRows",(function(){return i.d})),n.d(t,"csvFormatRow",(function(){return i.c})),n.d(t,"csvFormatValue",(function(){return i.e})),n.d(t,"tsvParse",(function(){return a})),n.d(t,"tsvParseRows",(function(){return s})),n.d(t,"tsvFormat",(function(){return l})),n.d(t,"tsvFormatBody",(function(){return u})),n.d(t,"tsvFormatRows",(function(){return c})),n.d(t,"tsvFormatRow",(function(){return d})),n.d(t,"tsvFormatValue",(function(){return f})),n.d(t,"autoType",(function(){return h}));var r=n(349),i=n(248),o=Object(r.a)("\t"),a=o.parse,s=o.parseRows,l=o.format,u=o.formatBody,c=o.formatRows,d=o.formatRow,f=o.formatValue;function h(e){for(var t in e){var n,r,i=e[t].trim();if(i)if("true"===i)i=!0;else if("false"===i)i=!1;else if("NaN"===i)i=NaN;else if(isNaN(n=+i)){if(!(r=i.match(/^([-+]\d{2})?\d{4}(-\d{2}(-\d{2})?)?(T\d{2}:\d{2}(:\d{2}(\.\d{3})?)?(Z|[-+]\d{2}:\d{2})?)?$/)))continue;p&&r[4]&&!r[7]&&(i=i.replace(/-/g,"/").replace(/T/," ")),i=new Date(i)}else i=n;else i=null;e[t]=i}return e}const p=new Date("2019-01-01T00:00").getHours()||new Date("2019-07-01T00:00").getHours()},function(e,t,n){"use strict";t.a=function(e,t,n){e=+e,t=+t,n=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+n;for(var r=-1,i=0|Math.max(0,Math.ceil((t-e)/n)),o=new Array(i);++r 0.001;\n}\n\nbool isVertexPicked(vec3 vertexColor) {\n return\n picking_uSelectedColorValid &&\n !picking_isColorValid(abs(vertexColor - picking_uSelectedColor));\n}\n\nvoid picking_setPickingColor(vec3 pickingColor) {\n if (picking_uActive) {\n picking_vRGBcolor_Avalid.a = float(picking_isColorValid(pickingColor));\n\n if (!picking_uAttribute) {\n picking_vRGBcolor_Avalid.rgb = pickingColor * COLOR_SCALE;\n }\n } else {\n picking_vRGBcolor_Avalid.a = float(isVertexPicked(pickingColor));\n }\n}\n\nvoid picking_setPickingAttribute(float value) {\n if (picking_uAttribute) {\n picking_vRGBcolor_Avalid.r = value;\n }\n}\nvoid picking_setPickingAttribute(vec2 value) {\n if (picking_uAttribute) {\n picking_vRGBcolor_Avalid.rg = value;\n }\n}\nvoid picking_setPickingAttribute(vec3 value) {\n if (picking_uAttribute) {\n picking_vRGBcolor_Avalid.rgb = value;\n }\n}\n",fs:"uniform bool picking_uActive;\nuniform vec3 picking_uSelectedColor;\nuniform vec4 picking_uHighlightColor;\n\nin vec4 picking_vRGBcolor_Avalid;\nvec4 picking_filterHighlightColor(vec4 color) {\n if (picking_uActive) {\n return color;\n }\n bool selected = bool(picking_vRGBcolor_Avalid.a);\n\n if (selected) {\n float highLightAlpha = picking_uHighlightColor.a;\n float blendedAlpha = highLightAlpha + color.a * (1.0 - highLightAlpha);\n float highLightRatio = highLightAlpha / blendedAlpha;\n\n vec3 blendedRGB = mix(color.rgb, picking_uHighlightColor.rgb, highLightRatio);\n return vec4(blendedRGB, blendedAlpha);\n } else {\n return color;\n }\n}\nvec4 picking_filterPickingColor(vec4 color) {\n if (picking_uActive) {\n if (picking_vRGBcolor_Avalid.a == 0.0) {\n discard;\n }\n return picking_vRGBcolor_Avalid;\n }\n return color;\n}\nvec4 picking_filterColor(vec4 color) {\n vec4 highightColor = picking_filterHighlightColor(color);\n return picking_filterPickingColor(highightColor);\n}\n\n",getUniforms:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:r;const t={};if(void 0!==e.pickingSelectedColor)if(e.pickingSelectedColor){const n=e.pickingSelectedColor.slice(0,3);t.picking_uSelectedColorValid=1,t.picking_uSelectedColor=n}else t.picking_uSelectedColorValid=0;if(e.pickingHighlightColor){const n=Array.from(e.pickingHighlightColor,e=>e/255);Number.isFinite(n[3])||(n[3]=1),t.picking_uHighlightColor=n}return void 0!==e.pickingActive&&(t.picking_uActive=Boolean(e.pickingActive),t.picking_uAttribute=Boolean(e.pickingAttribute)),t}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(671);const i=[n(308).a],o=["vs:DECKGL_FILTER_SIZE(inout vec3 size, VertexGeometry geometry)","vs:DECKGL_FILTER_GL_POSITION(inout vec4 position, VertexGeometry geometry)","vs:DECKGL_FILTER_COLOR(inout vec4 color, VertexGeometry geometry)","fs:DECKGL_FILTER_COLOR(inout vec4 color, FragmentGeometry geometry)"];function a(e){const t=r.a.getDefaultProgramManager(e);for(const e of i)t.addDefaultModule(e);for(const e of o)t.addShaderHook(e);return t}},function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var r=n(1),i=n(519),o=n(92),a=n(184),s=n(50);class l extends i.a{get isComposite(){return!0}get isLoaded(){return super.isLoaded&&this.getSubLayers().every(e=>e.isLoaded)}getSubLayers(){return this.internalState&&this.internalState.subLayers||[]}initializeState(e){}setState(e){super.setState(e),this.setNeedsUpdate()}getPickingInfo({info:e}){const{object:t}=e;return t&&t.__source&&t.__source.parent&&t.__source.parent.id===this.id?(e.object=t.__source.object,e.index=t.__source.index,e):e}filterSubLayer(e){return!0}shouldRenderSubLayer(e,t){return t&&t.length}getSubLayerClass(e,t){const{_subLayerProps:n}=this.props;return n&&n[e]&&n[e].type||t}getSubLayerRow(e,t,n){return e.__source={parent:this,object:t,index:n},e}getSubLayerAccessor(e){if("function"==typeof e){const t={index:-1,data:this.props.data,target:[]};return(n,r)=>n&&n.__source?(t.index=n.__source.index,e(n.__source.object,t)):e(n,r)}return e}getSubLayerProps(e={}){var t;const{opacity:n,pickable:r,visible:i,parameters:o,getPolygonOffset:a,highlightedObjectIndex:l,autoHighlight:u,highlightColor:c,coordinateSystem:d,coordinateOrigin:f,wrapLongitude:h,positionFormat:p,modelMatrix:A,extensions:g,fetch:m,operation:y,_subLayerProps:v}=this.props,b={id:"",updateTriggers:{},opacity:n,pickable:r,visible:i,parameters:o,getPolygonOffset:a,highlightedObjectIndex:l,autoHighlight:u,highlightColor:c,coordinateSystem:d,coordinateOrigin:f,wrapLongitude:h,positionFormat:p,modelMatrix:A,extensions:g,fetch:m,operation:y},_=v&&e.id&&v[e.id],w=_&&_.updateTriggers,x=e.id||"sublayer";if(_){const t=this.props[s.g],n=e.type?e.type._propTypes:{};for(const e in _){const r=n[e]||t[e];r&&"accessor"===r.type&&(_[e]=this.getSubLayerAccessor(_[e]))}}Object.assign(b,e,_),b.id="".concat(this.props.id,"-").concat(x),b.updateTriggers={all:null===(t=this.props.updateTriggers)||void 0===t?void 0:t.all,...e.updateTriggers,...w};for(const e of g){const t=e.getSubLayerProps.call(this,e);t&&Object.assign(b,t,{updateTriggers:Object.assign(b.updateTriggers,t.updateTriggers)})}return b}_updateAutoHighlight(e){for(const t of this.getSubLayers())t.updateAutoHighlight(e)}_getAttributeManager(){return null}_postUpdate(e,t){let n=this.internalState.subLayers;const r=!n||this.needsUpdate();if(r){const e=this.renderLayers();n=Object(a.b)(e,Boolean),this.internalState.subLayers=n}Object(o.a)("compositeLayer.renderLayers",this,r,n);for(const e of n)e.parent=this}}Object(r.a)(l,"layerName","CompositeLayer")},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(1),i=n(122);class o{static get componentName(){return Object.prototype.hasOwnProperty.call(this,"extensionName")?this.extensionName:""}constructor(e){Object(r.a)(this,"opts",void 0),e&&(this.opts=e)}equals(e){return this===e||this.constructor===e.constructor&&Object(i.a)(this.opts,e.opts,1)}getShaders(e){return null}getSubLayerProps(e){const{defaultProps:t}=e.constructor,n={updateTriggers:{}};for(const e in t)if(e in this.props){const r=t[e],i=this.props[e];n[e]=i,r&&"accessor"===r.type&&(n.updateTriggers[e]=this.props.updateTriggers[e],"function"==typeof i&&(n[e]=this.getSubLayerAccessor(i)))}return n}initializeState(e,t){}updateState(e,t){}onNeedsRedraw(e){}getNeedsPickingBuffer(e){return!1}draw(e,t){}finalizeState(e,t){}}Object(r.a)(o,"defaultProps",{}),Object(r.a)(o,"extensionName","LayerExtension")},function(e,t,n){"use strict";n.r(t);var r=n(302),i=n(546),o=n(372),a=n(234),s=n(269),l=n(64),u=n(35),c=n(18);t.default=function(e,t,n){if(n=n||{},!Object(c.isObject)(n))throw new Error("options is invalid");var d=n.pivot,f=n.mutate;if(!e)throw new Error("geojson is required");if(null==t||isNaN(t))throw new Error("angle is required");return 0===t||(d||(d=Object(r.default)(e)),!1!==f&&void 0!==f||(e=Object(s.a)(e)),Object(l.coordEach)(e,(function(e){var n=Object(i.a)(d,e)+t,r=Object(o.a)(d,e),s=Object(u.getCoords)(Object(a.a)(d,r,n));e[0]=s[0],e[1]=s[1]}))),e}},function(e,t,n){"use strict";n.d(t,"a",(function(){return L}));var r=n(214),i=n(426),o=n(323);function a(e){return s(function e(t,n){return t.map(t=>(t instanceof i.a||(Object(o.a)("string"!=typeof t,"Shader module use by name is deprecated. Import shader module '".concat(t,"' and use it directly.")),Object(o.a)(t.name,"shader module has no name"),(t=new i.a(t)).dependencies=e(t.dependencies)),t))}(e))}function s(e){const t={},n={};return l({modules:e,level:0,moduleMap:t,moduleDepth:n}),Object.keys(n).sort((e,t)=>n[t]-n[e]).map(e=>t[e])}function l(e){let{modules:t,level:n,moduleMap:r,moduleDepth:i}=e;if(n>=5)throw new Error("Possible loop in shader dependency graph");for(const e of t)r[e.name]=e,(void 0===i[e.name]||i[e.name]0&&void 0!==arguments[0]?arguments[0]:{};const t="undefined"!=typeof window&&window.navigator||{},n=e.userAgent||t.userAgent||"",r=-1!==n.indexOf("MSIE "),i=-1!==n.indexOf("Trident/");return r||i}const c={GLSL_FRAG_DATA:["WEBGL_draw_buffers",!0],GLSL_FRAG_DEPTH:["EXT_frag_depth",!0],GLSL_DERIVATIVES:["OES_standard_derivatives",!0],GLSL_TEXTURE_LOD:["EXT_shader_texture_lod",!0]},d={};Object.keys(c).forEach(e=>{d[e]=e});const f={};function h(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=c[t];if(Object(o.a)(r,t),!u(n))return!0;if(t in f)return f[t];const i=r[0],a=n.behavior||"enable",s="#extension GL_".concat(i," : ").concat(a,"\nvoid main(void) {}"),l=e.createShader(35633);e.shaderSource(l,s),e.compileShader(l);const d=e.getShaderParameter(l,35713);return e.deleteShader(l),f[t]=d,d}function p(e,t){const n=c[t];Object(o.a)(n,t);const r=function(e){return"undefined"!=typeof WebGL2RenderingContext&&e instanceof WebGL2RenderingContext||Boolean(e&&2===e._version)}(e)&&n[1]||n[0],i="string"==typeof r?Boolean(e.getExtension(r)):r;return Object(o.a)(!1===i||!0===i),i}function A(e,t){return(t=Array.isArray(t)?t:[t]).every(t=>p(e,t))}var g=n(376);function m(e){return new RegExp("\\b".concat(e,"[ \\t]+(\\w+[ \\t]+\\w+(\\[\\w+\\])?;)"),"g")}const y=[[/^(#version[ \t]+(100|300[ \t]+es))?[ \t]*\n/,"#version 300 es\n"],[/\btexture(2D|2DProj|Cube)Lod(EXT)?\(/g,"textureLod("],[/\btexture(2D|2DProj|Cube)(EXT)?\(/g,"texture("]],v=[...y,[m("attribute"),"in $1"],[m("varying"),"out $1"]],b=[...y,[m("varying"),"in $1"]],_=[[/^#version[ \t]+300[ \t]+es/,"#version 100"],[/\btexture(2D|2DProj|Cube)Lod\(/g,"texture$1LodEXT("],[/\btexture\(/g,"texture2D("],[/\btextureLod\(/g,"texture2DLodEXT("]],w=[..._,[m("in"),"attribute $1"],[m("out"),"varying $1"]],x=[..._,[m("in"),"varying $1"]],M=/\bout[ \t]+vec4[ \t]+(\w+)[ \t]*;\n?/,E=/void\s+main\s*\([^)]*\)\s*\{\n?/;function O(e,t,n){switch(t){case 300:return n?S(e,v):function(e){const t=(e=S(e,b)).match(M);if(t){const n=t[1];e=e.replace(new RegExp("\\b".concat("gl_FragColor","\\b"),"g"),n)}else{const t="fragmentColor";e=e.replace(E,e=>"out vec4 ".concat(t,";\n").concat(e)).replace(new RegExp("\\b".concat("gl_FragColor","\\b"),"g"),t)}return e}(e);case 100:return n?S(e,w):function(e){const t=(e=S(e,x)).match(M);if(t){const n=t[1];e=e.replace(M,"").replace(new RegExp("\\b".concat(n,"\\b"),"g"),"gl_FragColor")}return e}(e);default:throw new Error("unknown GLSL version ".concat(t))}}function S(e,t){for(const[n,r]of t)e=e.replace(n,r);return e}const T="\n\n".concat(g.a,"\n\n"),C={[r.b]:"vertex",[r.a]:"fragment"};function L(e,t){const{vs:n,fs:i}=t,o=a(t.modules||[]);return{gl:e,vs:P(e,Object.assign({},t,{source:n,type:r.b,modules:o})),fs:P(e,Object.assign({},t,{source:i,type:r.a,modules:o})),getUniforms:I(o)}}function P(e,t){let{id:n,source:i,type:a,modules:s,defines:l={},hookFunctions:u=[],inject:c={},transpileToGLSL100:f=!1,prologue:p=!0,log:m}=t;Object(o.a)("string"==typeof i,"shader source must be a string");const y=a===r.b,v=i.split("\n");let b=100,_="",w=i;0===v[0].indexOf("#version ")?(b=300,_=v[0],w=v.slice(1).join("\n")):_="#version ".concat(b);const x={};s.forEach(e=>{Object.assign(x,e.getDefines())}),Object.assign(x,l);let M=p?"".concat(_,"\n").concat(function(e){let{id:t,source:n,type:r}=e;return t&&"string"==typeof t&&-1===n.indexOf("SHADER_NAME")?"\n#define SHADER_NAME ".concat(t,"_").concat(C[r],"\n\n"):""}({id:n,source:i,type:a}),"\n").concat(function(e){let{type:t}=e;return"\n#define SHADER_TYPE_".concat(C[t].toUpperCase(),"\n")}({type:a}),"\n").concat(function(e){switch(function(e){const t=e.getExtension("WEBGL_debug_renderer_info"),n=e.getParameter(t&&t.UNMASKED_VENDOR_WEBGL||7936),r=e.getParameter(t&&t.UNMASKED_RENDERER_WEBGL||7937);return{gpuVendor:function(e,t){if(e.match(/NVIDIA/i)||t.match(/NVIDIA/i))return"NVIDIA";if(e.match(/INTEL/i)||t.match(/INTEL/i))return"INTEL";if(e.match(/AMD/i)||t.match(/AMD/i)||e.match(/ATI/i)||t.match(/ATI/i))return"AMD";return"UNKNOWN GPU"}(n,r),vendor:n,renderer:r,version:e.getParameter(7938),shadingLanguageVersion:e.getParameter(35724)}}(e).gpuVendor.toLowerCase()){case"nvidia":return"#define NVIDIA_GPU\n// Nvidia optimizes away the calculation necessary for emulated fp64\n#define LUMA_FP64_CODE_ELIMINATION_WORKAROUND 1\n";case"intel":return"#define INTEL_GPU\n// Intel optimizes away the calculation necessary for emulated fp64\n#define LUMA_FP64_CODE_ELIMINATION_WORKAROUND 1\n// Intel's built-in 'tan' function doesn't have acceptable precision\n#define LUMA_FP32_TAN_PRECISION_WORKAROUND 1\n// Intel GPU doesn't have full 32 bits precision in same cases, causes overflow\n#define LUMA_FP64_HIGH_BITS_OVERFLOW_WORKAROUND 1\n";case"amd":return"#define AMD_GPU\n";default:return"#define DEFAULT_GPU\n// Prevent driver from optimizing away the calculation necessary for emulated fp64\n#define LUMA_FP64_CODE_ELIMINATION_WORKAROUND 1\n// Intel's built-in 'tan' function doesn't have acceptable precision\n#define LUMA_FP32_TAN_PRECISION_WORKAROUND 1\n// Intel GPU doesn't have full 32 bits precision in same cases, causes overflow\n#define LUMA_FP64_HIGH_BITS_OVERFLOW_WORKAROUND 1\n"}}(e),"\n").concat(function(e,t,n){let r="#if (__VERSION__ > 120)\n\n# define FEATURE_GLSL_DERIVATIVES\n# define FEATURE_GLSL_DRAW_BUFFERS\n# define FEATURE_GLSL_FRAG_DEPTH\n# define FEATURE_GLSL_TEXTURE_LOD\n\n// DEPRECATED FLAGS, remove in v9\n# define FRAG_DEPTH\n# define DERIVATIVES\n# define DRAW_BUFFERS\n# define TEXTURE_LOD\n\n#endif // __VERSION\n";return A(e,d.GLSL_FRAG_DEPTH)&&(r+="\n// FRAG_DEPTH => gl_FragDepth is available\n#ifdef GL_EXT_frag_depth\n#extension GL_EXT_frag_depth : enable\n# define FEATURE_GLSL_FRAG_DEPTH\n# define FRAG_DEPTH\n# define gl_FragDepth gl_FragDepthEXT\n#endif\n"),A(e,d.GLSL_DERIVATIVES)&&h(e,d.GLSL_DERIVATIVES)&&(r+="\n// DERIVATIVES => dxdF, dxdY and fwidth are available\n#ifdef GL_OES_standard_derivatives\n#extension GL_OES_standard_derivatives : enable\n# define FEATURE_GLSL_DERIVATIVES\n# define DERIVATIVES\n#endif\n"),A(e,d.GLSL_FRAG_DATA)&&h(e,d.GLSL_FRAG_DATA,{behavior:"require"})&&(r+="\n// DRAW_BUFFERS => gl_FragData[] is available\n#ifdef GL_EXT_draw_buffers\n#extension GL_EXT_draw_buffers : require\n#define FEATURE_GLSL_DRAW_BUFFERS\n#define DRAW_BUFFERS\n#endif\n"),A(e,d.GLSL_TEXTURE_LOD)&&(r+="// TEXTURE_LOD => texture2DLod etc are available\n#ifdef GL_EXT_shader_texture_lod\n#extension GL_EXT_shader_texture_lod : enable\n\n# define FEATURE_GLSL_TEXTURE_LOD\n# define TEXTURE_LOD\n\n#endif\n"),r}(e),"\n").concat(function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=0,n="";for(const r in e){0===t&&(n+="\n// APPLICATION DEFINES\n"),t++;const i=e[r];(i||Number.isFinite(i))&&(n+="#define ".concat(r.toUpperCase()," ").concat(e[r],"\n"))}0===t&&(n+="\n");return n}(x),"\n").concat(y?"":"precision highp float;\n\n","\n"):"".concat(_,"\n");const E=function(e){const t={vs:{},fs:{}};return e.forEach(e=>{let n;"string"!=typeof e?(n=e,e=n.hook):n={},e=e.trim();const[r,i]=e.split(":"),o=e.replace(/\(.+/,"");t[r][o]=Object.assign(n,{signature:i})}),t}(u),S={},L={},P={};for(const e in c){const t="string"==typeof c[e]?{injection:c[e],order:0}:c[e],n=e.match(/^(v|f)s:(#)?([\w-]+)$/);if(n){const r=n[2],i=n[3];r?"decl"===i?L[e]=[t]:P[e]=[t]:S[e]=[t]}else P[e]=[t]}for(const e of s){m&&e.checkDeprecations(w,m);M+=e.getModuleSource(a,b);const t=e.injections[a];for(const e in t){const n=e.match(/^(v|f)s:#([\w-]+)$/);if(n){const r="decl"===n[2]?L:P;r[e]=r[e]||[],r[e].push(t[e])}else S[e]=S[e]||[],S[e].push(t[e])}}return M+=T,M=Object(g.c)(M,a,L),M+=function(e,t){let n="";for(const r in e){const i=e[r];if(n+="void ".concat(i.signature," {\n"),i.header&&(n+=" ".concat(i.header)),t[r]){const e=t[r];e.sort((e,t)=>e.order-t.order);for(const t of e)n+=" ".concat(t.injection,"\n")}i.footer&&(n+=" ".concat(i.footer)),n+="}\n"}return n}(E[a],S),M+=w,M=Object(g.c)(M,a,P),M=O(M,f?100:b,y),M}function I(e){return function(t){const n={};for(const r of e){const e=r.getUniforms(t,n);Object.assign(n,e)}return n}}},function(e,t,n){"use strict";function r(e){return function(t){var n=t.dispatch,r=t.getState;return function(t){return function(i){return"function"==typeof i?i(n,r,e):t(i)}}}}var i=r();i.withExtraArgument=r,t.a=i},function(e,t,n){var r=n(1212);e.exports=function(e){return r(e).replace(/\s(\w)/g,(function(e,t){return t.toUpperCase()}))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(668),i=n(1804);class o{static getDefaultProgramManager(e){return e.luma=e.luma||{},e.luma.defaultProgramManager=e.luma.defaultProgramManager||new o(e),e.luma.defaultProgramManager}constructor(e){this.gl=e,this._programCache={},this._getUniforms={},this._registeredModules={},this._hookFunctions=[],this._defaultModules=[],this._hashes={},this._hashCounter=0,this.stateHash=0,this._useCounts={}}addDefaultModule(e){this._defaultModules.find(t=>t.name===e.name)||this._defaultModules.push(e),this.stateHash++}removeDefaultModule(e){const t="string"==typeof e?e:e.name;this._defaultModules=this._defaultModules.filter(e=>e.name!==t),this.stateHash++}addShaderHook(e,t){t&&(e=Object.assign(t,{hook:e})),this._hookFunctions.push(e),this.stateHash++}get(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{vs:t="",fs:n="",defines:o={},inject:a={},varyings:s=[],bufferMode:l=35981,transpileToGLSL100:u=!1}=e,c=this._getModuleList(e.modules),d=this._getHash(t),f=this._getHash(n),h=c.map(e=>this._getHash(e.name)).sort(),p=s.map(e=>this._getHash(e)),A=Object.keys(o).sort(),g=Object.keys(a).sort(),m=[],y=[];for(const e of A)m.push(this._getHash(e)),m.push(this._getHash(o[e]));for(const e of g)y.push(this._getHash(e)),y.push(this._getHash(a[e]));const v="".concat(d,"/").concat(f,"D").concat(m.join("/"),"M").concat(h.join("/"),"I").concat(y.join("/"),"V").concat(p.join("/"),"H").concat(this.stateHash,"B").concat(l).concat(u?"T":"");if(!this._programCache[v]){const e=Object(r.a)(this.gl,{vs:t,fs:n,modules:c,inject:a,defines:o,hookFunctions:this._hookFunctions,transpileToGLSL100:u});this._programCache[v]=new i.a(this.gl,{hash:v,vs:e.vs,fs:e.fs,varyings:s,bufferMode:l}),this._getUniforms[v]=e.getUniforms||(e=>{}),this._useCounts[v]=0}return this._useCounts[v]++,this._programCache[v]}getUniforms(e){return this._getUniforms[e.hash]||null}release(e){const t=e.hash;this._useCounts[t]--,0===this._useCounts[t]&&(this._programCache[t].delete(),delete this._programCache[t],delete this._getUniforms[t],delete this._useCounts[t])}_getHash(e){return void 0===this._hashes[e]&&(this._hashes[e]=this._hashCounter++),this._hashes[e]}_getModuleList(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];const t=new Array(this._defaultModules.length+e.length),n={};let r=0;for(let e=0,i=this._defaultModules.length;e2&&void 0!==arguments[2]&&arguments[2],i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:new Map;Object(r.a)(this,"name",void 0),Object(r.a)(this,"type",void 0),Object(r.a)(this,"nullable",void 0),Object(r.a)(this,"metadata",void 0),this.name=e,this.type=t,this.nullable=n,this.metadata=i}get typeId(){return this.type&&this.type.typeId}clone(){return new i(this.name,this.type,this.nullable,this.metadata)}compareTo(e){return this.name===e.name&&this.type===e.type&&this.nullable===e.nullable&&this.metadata===e.metadata}toString(){return"".concat(this.type).concat(this.nullable?", nullable":"").concat(this.metadata?", metadata: ".concat(this.metadata):"")}}},function(e,t,n){"use strict";var r=n(900),i={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},o={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};function l(e){return r.isMemo(e)?a:s[e.$$typeof]||i}s[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s[r.Memo]=a;var u=Object.defineProperty,c=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,f=Object.getOwnPropertyDescriptor,h=Object.getPrototypeOf,p=Object.prototype;e.exports=function e(t,n,r){if("string"!=typeof n){if(p){var i=h(n);i&&i!==p&&e(t,i,r)}var a=c(n);d&&(a=a.concat(d(n)));for(var s=l(t),A=l(n),g=0;g=1?(n=1,t-1):Math.floor(n*t),o=e[r],a=e[r+1],s=r>0?e[r-1]:2*o-a,l=r1&&void 0!==arguments[1]?arguments[1]:{};const{sourceX:n=0,sourceY:r=0,sourceFormat:i=6408}=t;let{sourceAttachment:o=36064,target:a=null,sourceWidth:u,sourceHeight:c,sourceType:d}=t;const{framebuffer:f,deleteFramebuffer:h}=A(e);Object(l.a)(f);const{gl:p,handle:m,attachments:y}=f;u=u||f.width,c=c||f.height,36064===o&&null===m&&(o=1028),Object(l.a)(y[o]),d=d||y[o].type,a=g(a,d,i,u,c),d=d||Object(s.b)(a);const v=p.bindFramebuffer(36160,m);return p.readPixels(n,r,u,c,i,d,a),p.bindFramebuffer(36160,v||null),h&&f.delete(),a}function f(e,t){let{sourceX:n=0,sourceY:i=0,sourceFormat:o=6408,target:s=null,targetByteOffset:c=0,sourceWidth:d,sourceHeight:f,sourceType:h}=t;const{framebuffer:p,deleteFramebuffer:g}=A(e);Object(l.a)(p),d=d||p.width,f=f||p.height;const m=Object(a.a)(p.gl);if(h=h||(s?s.type:5121),!s){const e=u(o),t=function(e){switch(e){case 5121:return 1;case 33635:case 32819:case 32820:return 2;case 5126:return 4;default:return Object(l.a)(!1),0}}(h),n=c+d*f*e*t;s=new r.a(m,{byteLength:n,accessor:{type:h,size:e}})}return s.bind({target:35051}),Object(a.o)(m,{framebuffer:p},()=>{m.readPixels(n,i,d,f,o,h,c)}),s.unbind({target:35051}),g&&p.delete(),s}function h(e){let{sourceAttachment:t=36064,targetMaxHeight:n=Number.MAX_SAFE_INTEGER}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=d(e,{sourceAttachment:t}),{width:i,height:o}=e;for(;o>n;)({data:r,width:i,height:o}=Object(s.d)({data:r,width:i,height:o}));Object(s.a)({data:r,width:i,height:o});const a=document.createElement("canvas");a.width=i,a.height=o;const l=a.getContext("2d"),u=l.createImageData(i,o);return u.data.set(r),l.putImageData(u,0,0),a.toDataURL()}function p(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{sourceX:r=0,sourceY:i=0,targetMipmaplevel:s=0,targetInternalFormat:u=6408}=n;let{targetX:c,targetY:d,targetZ:f,width:h,height:p}=n;const{framebuffer:g,deleteFramebuffer:m}=A(e);Object(l.a)(g);const{gl:y,handle:v}=g,b=void 0!==c||void 0!==d||void 0!==f;c=c||0,d=d||0,f=f||0;const _=y.bindFramebuffer(36160,v);Object(l.a)(t);let w=null;if(t instanceof o.a&&(w=t,h=Number.isFinite(h)?h:w.width,p=Number.isFinite(p)?p:w.height,w.bind(0),t=w.target),b)switch(t){case 3553:case 34067:y.copyTexSubImage2D(t,s,c,d,r,i,h,p);break;case 35866:case 32879:Object(a.a)(y).copyTexSubImage3D(t,s,c,d,f,r,i,h,p)}else y.copyTexImage2D(t,s,u,r,i,h,p,0);return w&&w.unbind(),y.bindFramebuffer(36160,_||null),m&&g.delete(),w}function A(e){return e instanceof i.a?{framebuffer:e,deleteFramebuffer:!1}:{framebuffer:Object(c.b)(e),deleteFramebuffer:!0}}function g(e,t,n,r,i){if(e)return e;t=t||5121;return new(Object(s.c)(t,{clamped:!1}))(r*i*u(n))}},,,,,,,,,,,,,,,,function(e,t){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,o.combineReducers)(h({visState:(0,a.visStateReducerFactory)(e.visState),mapState:(0,s.mapStateReducerFactory)(e.mapState),mapStyle:(0,l.mapStyleReducerFactory)(e.mapStyle),uiState:(0,u.uiStateReducerFactory)(e.uiState),providerState:(0,c.providerStateReducerFactory)(e.providerState)},t))},A=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(n,r){return d.default[r.type]?d.default[r.type](n,r):p(e,t)(n,r)}};t.coreReducerFactory=A;var g=A();t.default=g;t.mapStateLens=function(e){return{mapState:e.mapState}};t.mapStyleLens=function(e){return{mapStyle:e.mapStyle}};t.visStateLens=function(e){return{visState:e.visState}};t.uiStateLens=function(e){return{uiState:e.uiState}};t.providerStateLens=function(e){return{providerState:e.providerState}}},function(e,t,n){"use strict";var r=n(3),i=n(6);Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.visStateReducerFactory=void 0;var o,a=r(n(4)),s=n(126),l=n(345),u=i(n(563));function c(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function d(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{};return(0,l.handleActions)(f,d(d(d({},u.INITIAL_VIS_STATE),e),{},{initialState:e}))};t.visStateReducerFactory=h;var p=h();t.default=p},function(e,t,n){var r=n(698),i=n(694),o=n(562),a=n(699);e.exports=function(e){return r(e)||i(e)||o(e)||a()},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=function(e){if(Array.isArray(e))return e},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){"use strict";var r=n(3),i=n(6);Object.defineProperty(t,"__esModule",{value:!0}),t.processCsvData=_,t.parseRowsByFields=w,t.parseCsvRowsByFieldType=M,t.processRowObject=E,t.processGeojson=O,t.processKeplerglJSON=S,t.processKeplerglDataset=T,t.processArrowTable=C,t.processArrowBatches=L,t.Processors=t.DATASET_HANDLERS=t.PARSE_FIELD_VALUE_FROM_STRING=t.CSV_NULLS=void 0;var o,a,s=r(n(44)),l=r(n(4)),u=i(n(200)),c=n(658),d=n(396),f=r(n(707)),h=n(21),p=n(24),A=n(446);function g(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function m(e){for(var t=1;t-1&&(0,p.isPlainObject)(e[t])&&(0,p.hasOwnProperty)(e[t],"properties")&&(e[t].properties[n.name]=e[r]))}))}}function E(e){if(!Array.isArray(e))return null;if(!e.length)return{fields:[],rows:[]};var t=Object.keys(e[0]),n=e.map((function(e){return t.map((function(t){return e[t]}))}));return x(n),_(n,t)}function O(e){var t=(0,f.default)(e);if(!t||!Array.isArray(t.features))throw new Error("Read File Failed: File is not a valid GeoJSON. Read more about [supported file format](".concat(h.GUIDES_FILE_FORMAT_DOC,")"));for(var n=[],r=0;r1&&void 0!==arguments[1]?arguments[1]:A.KeplerGlSchema;return e?t.load(e.datasets,e.config):null}function T(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:A.KeplerGlSchema;if(!e)return null;var n=t.parseSavedData((0,p.toArray)(e));return n?Array.isArray(e)?n:n[0]:null}function C(e){return L(e.data.batches)}function L(e){if(0===e.length)return null;var t=new u.Table(e),n=[];t.schema.fields.forEach((function(e,t){var r,i=null===(r=e.metadata.get("ARROW:extension:name"))||void 0===r?void 0:r.startsWith("geoarrow");n.push({name:e.name,id:e.name,displayName:e.name,format:"",fieldIdx:t,type:i?h.ALL_FIELD_TYPES.geoarrow:(0,p.arrowDataTypeToFieldType)(e.type),analyzerType:i?d.DATA_TYPES.GEOMETRY:(0,p.arrowDataTypeToAnalyzerDataType)(e.type),valueAccessor:function(e){return function(n){return e.valueAt(n.index,t)}},metadata:e.metadata})}));var r=(0,s.default)(Array(t.numCols).keys()).map((function(e){return t.getChildAt(e)}));return{fields:n,rows:[],cols:r,metadata:t.schema.metadata}}t.PARSE_FIELD_VALUE_FROM_STRING=b;var P=(a={},(0,l.default)(a,h.DATASET_FORMATS.row,E),(0,l.default)(a,h.DATASET_FORMATS.geojson,O),(0,l.default)(a,h.DATASET_FORMATS.csv,_),(0,l.default)(a,h.DATASET_FORMATS.arrow,C),(0,l.default)(a,h.DATASET_FORMATS.keplergl,T),a);t.DATASET_HANDLERS=P;var I={processGeojson:O,processCsvData:_,processArrowTable:C,processArrowBatches:L,processRowObject:E,processKeplerglJSON:S,processKeplerglDataset:T,analyzerTypeToFieldType:p.analyzerTypeToFieldType,getFieldsFromData:p.getFieldsFromData,parseCsvRowsByFieldType:M};t.Processors=I},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isLittleEndian=t.float64=t.float32=t.int32=void 0,t.int32=new Int32Array(2),t.float32=new Float32Array(t.int32.buffer),t.float64=new Float64Array(t.int32.buffer),t.isLittleEndian=1===new Uint16Array(new Uint8Array([1,0]).buffer)[0]},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Encoding=void 0,function(e){e[e.UTF8_BYTES=1]="UTF8_BYTES",e[e.UTF16_STRING=2]="UTF16_STRING"}(t.Encoding||(t.Encoding={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ByteBuffer=void 0;const r=n(333),i=n(701),o=n(702);class a{constructor(e){this.bytes_=e,this.position_=0,this.text_decoder_=new TextDecoder}static allocate(e){return new a(new Uint8Array(e))}clear(){this.position_=0}bytes(){return this.bytes_}position(){return this.position_}setPosition(e){this.position_=e}capacity(){return this.bytes_.length}readInt8(e){return this.readUint8(e)<<24>>24}readUint8(e){return this.bytes_[e]}readInt16(e){return this.readUint16(e)<<16>>16}readUint16(e){return this.bytes_[e]|this.bytes_[e+1]<<8}readInt32(e){return this.bytes_[e]|this.bytes_[e+1]<<8|this.bytes_[e+2]<<16|this.bytes_[e+3]<<24}readUint32(e){return this.readInt32(e)>>>0}readInt64(e){return BigInt.asIntN(64,BigInt(this.readUint32(e))+(BigInt(this.readUint32(e+4))<>8}writeUint16(e,t){this.bytes_[e]=t,this.bytes_[e+1]=t>>8}writeInt32(e,t){this.bytes_[e]=t,this.bytes_[e+1]=t>>8,this.bytes_[e+2]=t>>16,this.bytes_[e+3]=t>>24}writeUint32(e,t){this.bytes_[e]=t,this.bytes_[e+1]=t>>8,this.bytes_[e+2]=t>>16,this.bytes_[e+3]=t>>24}writeInt64(e,t){this.writeInt32(e,Number(BigInt.asIntN(32,t))),this.writeInt32(e+4,Number(BigInt.asIntN(32,t>>BigInt(32))))}writeUint64(e,t){this.writeUint32(e,Number(BigInt.asUintN(32,t))),this.writeUint32(e+4,Number(BigInt.asUintN(32,t>>BigInt(32))))}writeFloat32(e,t){i.float32[0]=t,this.writeInt32(e,i.int32[0])}writeFloat64(e,t){i.float64[0]=t,this.writeInt32(e,i.int32[i.isLittleEndian?0:1]),this.writeInt32(e+4,i.int32[i.isLittleEndian?1:0])}getBufferIdentifier(){if(this.bytes_.length-1},isGeographic:function(e){return Boolean(e)&&"object"==typeof e&&e.hasOwnProperty("type")&&e.hasOwnProperty("coordinates")},isString:d,isArray:function(e){return Boolean(h(e)||function(e){if(!d(e))return!1;if(!i.isArray.test(e))return!1;const t=c(e);return Boolean(t&&h(t))}(e))},isDateObject:function(e){return e instanceof Date},isObject:function(e){return Boolean(f(e)||function(e){if(!d(e))return!1;if(!i.isObject.test(e))return!1;const t=c(e);return Boolean(t&&f(t))}(e))},whichFormatTime:s,whichFormatDate:l,whichFormatDateTime:u};e.exports=p},function(e,t,n){"use strict";var r=n(706),i={isNumber:/^(\+|\-)?\$?[\d,]*\.?\d+((e|E)(\+|\-)\d+)?%?$/,isInt:/^(\+|\-)?[\d,]+$/,isFloat:/^(\+|\-)?[\d,]*\.\d+?$/,isCurrency:/(?=.)^\$(([1-9][0-9]{0,2}(,[0-9]{3})*)|0)?(\.[0-9]{1,2})?$/,isPercentage:/^(\+|\-)?[\d,]*\.?\d+%$/,isZipCode:/(^\d{5}$)|(^\d{5}-\d{4}$)|(^\d{6}$)|(^\d{6}-\d{2}$)/,isTime:r.ALL_TIME_FORMAT_REGEX,isDate:r.DATE_FORMAT_REGEX,isDateTime:r.ALL_DATE_TIME_REGEX,isStringGeometry:/^(POINT|LINESTRING|POLYGON|MULTIPOINT|MULTILINESTRING|MULTIPOLYGON)/,isPairwisePointGeometry:/(\+|\-)?\d*\.\d*,( )?(\+|\-)?\d*\.\d*/,isObject:/^{([\s\S]*)}$/,isArray:/^\[([\s\S]*)\]$/};e.exports=i},function(e,t,n){"use strict";function r(e){return"("+e.join("|")+")"}var i="\\d{1,2}",o="\\d{1,2}",a="\\d{1,2}",s="\\d{1,2}",l="\\d{2}",u="\\d{2}",c="(\\+|-)(\\d{4}|\\d{1,2}:\\d{2})",d="(am|pm)",f=["X","x","H:m","HH:mmZ","h:m a","H:m:s","h:m:s a","HH:mm:ssZZ","HH:mm:ss.SSSS","HH:mm:ss.SSSSZZ"].reverse(),h=["\\b\\d{12,13}\\b","\\b\\d{9,10}(\\.\\d{1,3})?\\b",o+":"+a,i+":"+u+"(\\+|-)\\d{1,2}:\\d{1,2}","\\d{1,2}:"+a+" "+d,o+":"+a+":"+s,o+":"+a+":"+s+" "+d,i+":"+u+":"+l+c,i+":"+u+":"+l+"(\\.\\d{1,6})",i+":"+u+":"+l+"(\\.\\d{1,6})"+c].reverse(),p=f.reduce((function(e,t,n){return e[h[n]]=t,e}),{}),A=r(Object.keys(p)),g=new RegExp("^"+A+"$","i"),m="\\d{2,4}",y="\\d{1,2}",v=r(["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]),b=r(["January","February","March","April","May","June","July","August","September","October","November","December"]),_="\\d{1,2}",w="\\d{1,2}(st|nd|rd|th)",x=[m+"-"+y+"-"+_,m+"\\/"+y+"\\/"+_,y+"\\/"+_+"\\/"+m,b+" \\d{2}, "+m,v+" \\d{2}, "+m,b+" "+w+", "+m,v+" "+w+", "+m],M=new RegExp("^"+r(x)+"$","i"),E=["YYYY-M-D","YYYY/M/D","M/D/YYYY","MMMM DD, YYYY","MMM DD, YYYY","MMMM Do, YYYY","MMM Do, YYYY"].reduce((function(e,t,n){return e[x[n]]=t,e}),{}),O=Object.keys(E).reduce((function(e,t){var n=E[t];return Object.keys(p).forEach((function(r){var i=p[r];e[t+" "+r]=n+" "+i,e[t+"T"+r]=n+"T"+i,e[r+"T"+t]=i+"T"+n,e[r+" "+t]=i+" "+n})),e}),{}),S=new RegExp(r(Object.keys(O)));e.exports={ALL_TIME_FORMAT_REGEX:g,TIME_FORMAT_REGEX_MAP:p,DATE_FORMAT_REGEX:M,DATE_FORMAT_REGEX_MAP:E,ALL_DATE_TIME_REGEX:S,DATE_TIME_MAP:O}},function(e,t){e.exports=function(e){if(!e||!e.type)return null;var t=n[e.type];if(!t)return null;if("geometry"===t)return{type:"FeatureCollection",features:[{type:"Feature",properties:{},geometry:e}]};if("feature"===t)return{type:"FeatureCollection",features:[e]};if("featurecollection"===t)return e};var n={Point:"geometry",MultiPoint:"geometry",LineString:"geometry",MultiLineString:"geometry",Polygon:"geometry",MultiPolygon:"geometry",GeometryCollection:"geometry",Feature:"feature",FeatureCollection:"featurecollection"}},function(e,t,n){"use strict";var r=n(3);Object.defineProperty(t,"__esModule",{value:!0}),t.DEFAULT_COLOR_RANGE=t.COLOR_RANGES=void 0;var i=r(n(44)),o=r(n(4)),a=r(n(40)),s=r(n(1228)),l=n(709);function u(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function c(e){for(var t=1;t{let{transform:n}=t;return{...n,x:Math.ceil(n.x/e)*e,y:Math.ceil(n.y/e)*e}}}const o=e=>{let{transform:t}=e;return{...t,y:0}};function a(e,t,n){const r={...e};return t.top+e.y<=n.top?r.y=n.top-t.top:t.bottom+e.y>=n.top+n.height&&(r.y=n.top+n.height-t.bottom),t.left+e.x<=n.left?r.x=n.left-t.left:t.right+e.x>=n.left+n.width&&(r.x=n.left+n.width-t.right),r}const s=e=>{let{containerNodeRect:t,draggingNodeRect:n,transform:r}=e;return n&&t?a(r,n,t):r},l=e=>{let{draggingNodeRect:t,transform:n,scrollableAncestorRects:r}=e;const i=r[0];return t&&i?a(n,t,i):n},u=e=>{let{transform:t}=e;return{...t,x:0}},c=e=>{let{transform:t,draggingNodeRect:n,windowRect:r}=e;return n&&r?a(t,n,r):t},d=e=>{let{activatorEvent:t,draggingNodeRect:n,transform:i}=e;if(n&&t){const e=Object(r.getEventCoordinates)(t);if(!e)return i;const o=e.x-n.left,a=e.y-n.top;return{...i,x:i.x+o-n.width/2,y:i.y+a-n.height/2}}return i}},function(e,t,n){"use strict";var r=n(3);Object.defineProperty(t,"__esModule",{value:!0}),t.hexToRgb=function(e){var t=u(e);if(!t)return[0,0,0];var n=parseInt(t[1],16),r=parseInt(t[2],16),i=parseInt(t[3],16);return[n,r,i]},t.isHexColor=u,t.rgbToHex=function(e){var t=(0,o.default)(e,3),n=t[0],r=t[1],i=t[2];return"#".concat([n,r,i].map((function(e){return 1===(t=e.toString(16)).length?"0".concat(t):t;var t})).join("")).toUpperCase()},t.getColorGroupByName=function(e){if(!e||"string"!=typeof e.name)return null;return e.name.replace(/\b[^a-zA-Z]+$/,"")},t.reverseColorRange=function(e,t){return t?l(l({},t),{},{reversed:e,colors:t.colors.slice().reverse()}):null},t.createLinearGradient=function(e,t){var n=parseFloat((100/t.length).toFixed(2)),r=t.map((function(e,t){return"rgba(".concat(e.join(","),", 1) ").concat(n*t,"%, rgba(").concat(e.join(","),", 1) ").concat(n*(t+1),"%")}));return"linear-gradient(to ".concat(e,", ").concat(r.join(","),")")},t.colorMaybeToRGB=function(e){if(c(e))return e;if("string"==typeof e){var t=(0,a.rgb)(e);if(Number.isFinite(null==t?void 0:t.r)&&Number.isFinite(null==t?void 0:t.g)&&Number.isFinite(null==t?void 0:t.b))return[t.r,t.g,t.b]}return null},t.isRgbColor=c,t.normalizeColor=function(e){return e.map((function(e){return e/255}))};var i=r(n(4)),o=r(n(40)),a=n(294);function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function l(e){for(var t=1;t=0})))}},function(e,t,n){"use strict";var r=n(3);Object.defineProperty(t,"__esModule",{value:!0}),t.processClone=function(e,t){if(!(t instanceof a.default.Element))return t;function n(e,t){var n,r;e.cssText?(t.cssText=e.cssText,e.font&&(t.font=e.font)):(r=t,u(n=e).forEach((function(e){r.setProperty(e,n.getPropertyValue(e),n.getPropertyPriority(e))})))}function r(e,t,n){var r=a.default.getComputedStyle(e,n),i=r.getPropertyValue("content");if(""!==i&&"none"!==i){var o=d();t.className="".concat(t.className," ").concat(o);var l=s.default.createElement("style");l.appendChild(function(e,t,n){var r,i=function(e){return"".concat(e,":").concat(n.getPropertyValue(e)).concat(n.getPropertyPriority(e)?" !important":"")},o=".".concat(e,":").concat(t),a=n.cssText?(r=n.getPropertyValue("content"),"".concat(n.cssText," content: ").concat(r,";")):"".concat(u(n).map(i).join("; "),";");return s.default.createTextNode("".concat(o,"{").concat(a,"}"))}(o,n,r)),t.appendChild(l)}}return Promise.resolve([e,t]).then((function(e){var t=(0,i.default)(e,2),r=t[0],o=t[1];return function(e,t){n(a.default.getComputedStyle(e),t.style)}(r,o),[r,o]})).then((function(e){var t=(0,i.default)(e,2),n=t[0],o=t[1];return function(e){var t=(0,i.default)(e,2),n=t[0],o=t[1];[":before",":after"].forEach((function(e){return r(n,o,e)}))}([n,o]),[n,o]})).then((function(e){var t=(0,i.default)(e,2),n=t[0],r=t[1];return function(e){var t=(0,i.default)(e,2),n=t[0],r=t[1];n instanceof a.default.HTMLTextAreaElement&&(r.innerHTML=n.value),n instanceof a.default.HTMLInputElement&&r.setAttribute("value",n.value)}([n,r]),[n,r]})).then((function(e){var t=(0,i.default)(e,2),n=t[0],r=t[1];return function(e){e instanceof a.default.SVGElement&&(e.setAttribute("xmlns","http://www.w3.org/2000/svg"),e instanceof a.default.SVGRectElement&&["width","height"].forEach((function(t){var n=e.getAttribute(t);n&&e.style.setProperty(t,n)})))}(r),[n,r]})).then((function(e){var t=(0,i.default)(e,2);t[0];return t[1]}))},t.asArray=u,t.fourRandomChars=c,t.uid=d,t.makeImage=function(e){return new Promise((function(t,n){var r=new a.default.Image;r.onload=function(){t(r)},r.onerror=function(t){var r=l.IMAGE_EXPORT_ERRORS.dataUri;o.default.log(e),n({event:t,message:r})},r.src=e}))},t.isDataUrl=function(e){return-1!==e.search(/^(data:)/)},t.mimeType=function(e){var t=function(e){var t=/\.([^\.\/]*?)$/g.exec(e);if(t)return t[1];return""}(e).toLowerCase();return(n="application/font-woff",{woff:n,woff2:n,ttf:"application/font-truetype",eot:"application/vnd.ms-fontobject",png:"image/png",jpg:"image/jpeg",jpeg:"image/jpeg",gif:"image/gif",tiff:"image/tiff",svg:"image/svg+xml"})[t]||"";var n},t.dataAsUrl=function(e,t){return"data:".concat(t,";base64,").concat(e)},t.escape=function(e){return e.replace(/([.*+?^${}()|\[\]\/\\])/g,"\\$1")},t.delay=function(e){return function(t){return new Promise((function(n){a.default.setTimeout((function(){n(t)}),e)}))}},t.isSrcAsDataUrl=f,t.canvasToBlob=function(e){return e.toBlob?new Promise((function(t){e.toBlob(t)})):function(e){return new Promise((function(t){for(var n=a.default.atob(e.toDataURL().split(",")[1]),r=n.length,i=new Uint8Array(r),o=0;o3&&void 0!==arguments[3])||arguments[3];return Promise.resolve(e).then((function(e){e.setAttribute("xmlns","http://www.w3.org/1999/xhtml");var i=(new o.default.XMLSerializer).serializeToString(e),a=r?(0,c.escapeXhtml)(i):i,s=''.concat(a,""),u='').concat(s,"");return(0,l.default)(u)}))}(n,t.width||(0,c.getWidth)(e),t.height||(0,c.getHeight)(e),t.escapeXhtmlForWebpack)}))}function m(e,t){return g(e,t).then(c.makeImage).then((0,c.delay)(100)).then((function(n){var r=function(e){var n=a.default.createElement("canvas");if(n.width=t.width||(0,c.getWidth)(e),n.height=t.height||(0,c.getHeight)(e),t.bgcolor){var r=n.getContext("2d");r.fillStyle=t.bgcolor,r.fillRect(0,0,n.width,n.height)}return n}(e);return r.getContext("2d").drawImage(n,0,0),r}))}function y(e){return f.resolveAll().then((function(t){var n=a.default.createElement("style");return e.appendChild(n),n.appendChild(a.default.createTextNode(t)),e}))}function v(e){return h.inlineAll(e).then((function(){return e}))}var b=A;t.default=b},function(e,t,n){"use strict";function r(e){return Array.from(function*(e){for(const t of e)yield*t}(e))}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";function r(e,t){let n=0;if(void 0===t)for(let t of e)(t=+t)&&(n+=t);else{let r=-1;for(let i of e)(i=+t(i,++r,e))&&(n+=i)}return n}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";(function(t){var r=n(1239); +/*! + * The buffer module from node.js, for the browser. + * + * @author Feross Aboukhadijeh + * @license MIT + */function i(e,t){if(e===t)return 0;for(var n=e.length,r=t.length,i=0,o=Math.min(n,r);i=0;u--)if(c[u]!==d[u])return!1;for(u=c.length-1;u>=0;u--)if(s=c[u],!v(e[s],t[s],n,r))return!1;return!0}(e,t,n,r))}return n?e===t:e==t}function b(e){return"[object Arguments]"==Object.prototype.toString.call(e)}function _(e,t){if(!e||!t)return!1;if("[object RegExp]"==Object.prototype.toString.call(t))return t.test(e);try{if(e instanceof t)return!0}catch(e){}return!Error.isPrototypeOf(t)&&!0===t.call({},e)}function w(e,t,n,r){var i;if("function"!=typeof t)throw new TypeError('"block" argument must be a function');"string"==typeof n&&(r=n,n=null),i=function(e){var t;try{e()}catch(e){t=e}return t}(t),r=(n&&n.name?" ("+n.name+").":".")+(r?" "+r:"."),e&&!i&&m(i,n,"Missing expected exception"+r);var o="string"==typeof r,s=!e&&i&&!n;if((!e&&a.isError(i)&&o&&_(i,n)||s)&&m(i,n,"Got unwanted exception"+r),e&&i&&n&&!_(i,n)||!e&&i)throw i}f.AssertionError=function(e){this.name="AssertionError",this.actual=e.actual,this.expected=e.expected,this.operator=e.operator,e.message?(this.message=e.message,this.generatedMessage=!1):(this.message=function(e){return A(g(e.actual),128)+" "+e.operator+" "+A(g(e.expected),128)}(this),this.generatedMessage=!0);var t=e.stackStartFunction||m;if(Error.captureStackTrace)Error.captureStackTrace(this,t);else{var n=new Error;if(n.stack){var r=n.stack,i=p(t),o=r.indexOf("\n"+i);if(o>=0){var a=r.indexOf("\n",o+1);r=r.substring(a+1)}this.stack=r}}},a.inherits(f.AssertionError,Error),f.fail=m,f.ok=y,f.equal=function(e,t,n){e!=t&&m(e,t,n,"==",f.equal)},f.notEqual=function(e,t,n){e==t&&m(e,t,n,"!=",f.notEqual)},f.deepEqual=function(e,t,n){v(e,t,!1)||m(e,t,n,"deepEqual",f.deepEqual)},f.deepStrictEqual=function(e,t,n){v(e,t,!0)||m(e,t,n,"deepStrictEqual",f.deepStrictEqual)},f.notDeepEqual=function(e,t,n){v(e,t,!1)&&m(e,t,n,"notDeepEqual",f.notDeepEqual)},f.notDeepStrictEqual=function e(t,n,r){v(t,n,!0)&&m(t,n,r,"notDeepStrictEqual",e)},f.strictEqual=function(e,t,n){e!==t&&m(e,t,n,"===",f.strictEqual)},f.notStrictEqual=function(e,t,n){e===t&&m(e,t,n,"!==",f.notStrictEqual)},f.throws=function(e,t,n){w(!0,e,t,n)},f.doesNotThrow=function(e,t,n){w(!1,e,t,n)},f.ifError=function(e){if(e)throw e},f.strict=r((function e(t,n){t||m(t,!0,n,"==",e)}),f,{equal:f.strictEqual,deepEqual:f.deepStrictEqual,notEqual:f.notStrictEqual,notDeepEqual:f.notDeepStrictEqual}),f.strict.strict=f.strict;var x=Object.keys||function(e){var t=[];for(var n in e)s.call(e,n)&&t.push(n);return t}}).call(this,n(68))},function(e,t,n){!function(e){"use strict"; +//! moment.js locale configuration +e.defineLocale("af",{months:"Januarie_Februarie_Maart_April_Mei_Junie_Julie_Augustus_September_Oktober_November_Desember".split("_"),monthsShort:"Jan_Feb_Mrt_Apr_Mei_Jun_Jul_Aug_Sep_Okt_Nov_Des".split("_"),weekdays:"Sondag_Maandag_Dinsdag_Woensdag_Donderdag_Vrydag_Saterdag".split("_"),weekdaysShort:"Son_Maa_Din_Woe_Don_Vry_Sat".split("_"),weekdaysMin:"So_Ma_Di_Wo_Do_Vr_Sa".split("_"),meridiemParse:/vm|nm/i,isPM:function(e){return/^nm$/i.test(e)},meridiem:function(e,t,n){return e<12?n?"vm":"VM":n?"nm":"NM"},longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Vandag om] LT",nextDay:"[Môre om] LT",nextWeek:"dddd [om] LT",lastDay:"[Gister om] LT",lastWeek:"[Laas] dddd [om] LT",sameElse:"L"},relativeTime:{future:"oor %s",past:"%s gelede",s:"'n paar sekondes",ss:"%d sekondes",m:"'n minuut",mm:"%d minute",h:"'n uur",hh:"%d ure",d:"'n dag",dd:"%d dae",M:"'n maand",MM:"%d maande",y:"'n jaar",yy:"%d jaar"},dayOfMonthOrdinalParse:/\d{1,2}(ste|de)/,ordinal:function(e){return e+(1===e||8===e||e>=20?"ste":"de")},week:{dow:1,doy:4}})}(n(19))},function(e,t,n){!function(e){"use strict"; +//! moment.js locale configuration +var t={1:"١",2:"٢",3:"٣",4:"٤",5:"٥",6:"٦",7:"٧",8:"٨",9:"٩",0:"٠"},n={"١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","٠":"0"},r=function(e){return 0===e?0:1===e?1:2===e?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5},i={s:["أقل من ثانية","ثانية واحدة",["ثانيتان","ثانيتين"],"%d ثوان","%d ثانية","%d ثانية"],m:["أقل من دقيقة","دقيقة واحدة",["دقيقتان","دقيقتين"],"%d دقائق","%d دقيقة","%d دقيقة"],h:["أقل من ساعة","ساعة واحدة",["ساعتان","ساعتين"],"%d ساعات","%d ساعة","%d ساعة"],d:["أقل من يوم","يوم واحد",["يومان","يومين"],"%d أيام","%d يومًا","%d يوم"],M:["أقل من شهر","شهر واحد",["شهران","شهرين"],"%d أشهر","%d شهرا","%d شهر"],y:["أقل من عام","عام واحد",["عامان","عامين"],"%d أعوام","%d عامًا","%d عام"]},o=function(e){return function(t,n,o,a){var s=r(t),l=i[e][r(t)];return 2===s&&(l=l[n?0:1]),l.replace(/%d/i,t)}},a=["يناير","فبراير","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوفمبر","ديسمبر"];e.defineLocale("ar",{months:a,monthsShort:a,weekdays:"الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"D/‏M/‏YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiemParse:/ص|م/,isPM:function(e){return"م"===e},meridiem:function(e,t,n){return e<12?"ص":"م"},calendar:{sameDay:"[اليوم عند الساعة] LT",nextDay:"[غدًا عند الساعة] LT",nextWeek:"dddd [عند الساعة] LT",lastDay:"[أمس عند الساعة] LT",lastWeek:"dddd [عند الساعة] LT",sameElse:"L"},relativeTime:{future:"بعد %s",past:"منذ %s",s:o("s"),ss:o("s"),m:o("m"),mm:o("m"),h:o("h"),hh:o("h"),d:o("d"),dd:o("d"),M:o("M"),MM:o("M"),y:o("y"),yy:o("y")},preparse:function(e){return e.replace(/[١٢٣٤٥٦٧٨٩٠]/g,(function(e){return n[e]})).replace(/،/g,",")},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]})).replace(/,/g,"،")},week:{dow:6,doy:12}})}(n(19))},function(e,t,n){!function(e){"use strict"; +//! moment.js locale configuration +var t=function(e){return 0===e?0:1===e?1:2===e?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5},n={s:["أقل من ثانية","ثانية واحدة",["ثانيتان","ثانيتين"],"%d ثوان","%d ثانية","%d ثانية"],m:["أقل من دقيقة","دقيقة واحدة",["دقيقتان","دقيقتين"],"%d دقائق","%d دقيقة","%d دقيقة"],h:["أقل من ساعة","ساعة واحدة",["ساعتان","ساعتين"],"%d ساعات","%d ساعة","%d ساعة"],d:["أقل من يوم","يوم واحد",["يومان","يومين"],"%d أيام","%d يومًا","%d يوم"],M:["أقل من شهر","شهر واحد",["شهران","شهرين"],"%d أشهر","%d شهرا","%d شهر"],y:["أقل من عام","عام واحد",["عامان","عامين"],"%d أعوام","%d عامًا","%d عام"]},r=function(e){return function(r,i,o,a){var s=t(r),l=n[e][t(r)];return 2===s&&(l=l[i?0:1]),l.replace(/%d/i,r)}},i=["جانفي","فيفري","مارس","أفريل","ماي","جوان","جويلية","أوت","سبتمبر","أكتوبر","نوفمبر","ديسمبر"];e.defineLocale("ar-dz",{months:i,monthsShort:i,weekdays:"الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"D/‏M/‏YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiemParse:/ص|م/,isPM:function(e){return"م"===e},meridiem:function(e,t,n){return e<12?"ص":"م"},calendar:{sameDay:"[اليوم عند الساعة] LT",nextDay:"[غدًا عند الساعة] LT",nextWeek:"dddd [عند الساعة] LT",lastDay:"[أمس عند الساعة] LT",lastWeek:"dddd [عند الساعة] LT",sameElse:"L"},relativeTime:{future:"بعد %s",past:"منذ %s",s:r("s"),ss:r("s"),m:r("m"),mm:r("m"),h:r("h"),hh:r("h"),d:r("d"),dd:r("d"),M:r("M"),MM:r("M"),y:r("y"),yy:r("y")},postformat:function(e){return e.replace(/,/g,"،")},week:{dow:0,doy:4}})}(n(19))},function(e,t,n){!function(e){"use strict"; +//! moment.js locale configuration +e.defineLocale("ar-kw",{months:"يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر".split("_"),monthsShort:"يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر".split("_"),weekdays:"الأحد_الإتنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"احد_اتنين_ثلاثاء_اربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[اليوم على الساعة] LT",nextDay:"[غدا على الساعة] LT",nextWeek:"dddd [على الساعة] LT",lastDay:"[أمس على الساعة] LT",lastWeek:"dddd [على الساعة] LT",sameElse:"L"},relativeTime:{future:"في %s",past:"منذ %s",s:"ثوان",ss:"%d ثانية",m:"دقيقة",mm:"%d دقائق",h:"ساعة",hh:"%d ساعات",d:"يوم",dd:"%d أيام",M:"شهر",MM:"%d أشهر",y:"سنة",yy:"%d سنوات"},week:{dow:0,doy:12}})}(n(19))},function(e,t,n){!function(e){"use strict"; +//! moment.js locale configuration +var t={1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",0:"0"},n=function(e){return 0===e?0:1===e?1:2===e?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5},r={s:["أقل من ثانية","ثانية واحدة",["ثانيتان","ثانيتين"],"%d ثوان","%d ثانية","%d ثانية"],m:["أقل من دقيقة","دقيقة واحدة",["دقيقتان","دقيقتين"],"%d دقائق","%d دقيقة","%d دقيقة"],h:["أقل من ساعة","ساعة واحدة",["ساعتان","ساعتين"],"%d ساعات","%d ساعة","%d ساعة"],d:["أقل من يوم","يوم واحد",["يومان","يومين"],"%d أيام","%d يومًا","%d يوم"],M:["أقل من شهر","شهر واحد",["شهران","شهرين"],"%d أشهر","%d شهرا","%d شهر"],y:["أقل من عام","عام واحد",["عامان","عامين"],"%d أعوام","%d عامًا","%d عام"]},i=function(e){return function(t,i,o,a){var s=n(t),l=r[e][n(t)];return 2===s&&(l=l[i?0:1]),l.replace(/%d/i,t)}},o=["يناير","فبراير","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوفمبر","ديسمبر"];e.defineLocale("ar-ly",{months:o,monthsShort:o,weekdays:"الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"D/‏M/‏YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiemParse:/ص|م/,isPM:function(e){return"م"===e},meridiem:function(e,t,n){return e<12?"ص":"م"},calendar:{sameDay:"[اليوم عند الساعة] LT",nextDay:"[غدًا عند الساعة] LT",nextWeek:"dddd [عند الساعة] LT",lastDay:"[أمس عند الساعة] LT",lastWeek:"dddd [عند الساعة] LT",sameElse:"L"},relativeTime:{future:"بعد %s",past:"منذ %s",s:i("s"),ss:i("s"),m:i("m"),mm:i("m"),h:i("h"),hh:i("h"),d:i("d"),dd:i("d"),M:i("M"),MM:i("M"),y:i("y"),yy:i("y")},preparse:function(e){return e.replace(/،/g,",")},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]})).replace(/,/g,"،")},week:{dow:6,doy:12}})}(n(19))},function(e,t,n){!function(e){"use strict"; +//! moment.js locale configuration +e.defineLocale("ar-ma",{months:"يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر".split("_"),monthsShort:"يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر".split("_"),weekdays:"الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"احد_اثنين_ثلاثاء_اربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[اليوم على الساعة] LT",nextDay:"[غدا على الساعة] LT",nextWeek:"dddd [على الساعة] LT",lastDay:"[أمس على الساعة] LT",lastWeek:"dddd [على الساعة] LT",sameElse:"L"},relativeTime:{future:"في %s",past:"منذ %s",s:"ثوان",ss:"%d ثانية",m:"دقيقة",mm:"%d دقائق",h:"ساعة",hh:"%d ساعات",d:"يوم",dd:"%d أيام",M:"شهر",MM:"%d أشهر",y:"سنة",yy:"%d سنوات"},week:{dow:1,doy:4}})}(n(19))},function(e,t,n){!function(e){"use strict"; +//! moment.js locale configuration +var t={1:"١",2:"٢",3:"٣",4:"٤",5:"٥",6:"٦",7:"٧",8:"٨",9:"٩",0:"٠"},n={"١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","٠":"0"};e.defineLocale("ar-sa",{months:"يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر".split("_"),monthsShort:"يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر".split("_"),weekdays:"الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiemParse:/ص|م/,isPM:function(e){return"م"===e},meridiem:function(e,t,n){return e<12?"ص":"م"},calendar:{sameDay:"[اليوم على الساعة] LT",nextDay:"[غدا على الساعة] LT",nextWeek:"dddd [على الساعة] LT",lastDay:"[أمس على الساعة] LT",lastWeek:"dddd [على الساعة] LT",sameElse:"L"},relativeTime:{future:"في %s",past:"منذ %s",s:"ثوان",ss:"%d ثانية",m:"دقيقة",mm:"%d دقائق",h:"ساعة",hh:"%d ساعات",d:"يوم",dd:"%d أيام",M:"شهر",MM:"%d أشهر",y:"سنة",yy:"%d سنوات"},preparse:function(e){return e.replace(/[١٢٣٤٥٦٧٨٩٠]/g,(function(e){return n[e]})).replace(/،/g,",")},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]})).replace(/,/g,"،")},week:{dow:0,doy:6}})}(n(19))},function(e,t,n){!function(e){"use strict"; +//! moment.js locale configuration +e.defineLocale("ar-tn",{months:"جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر".split("_"),monthsShort:"جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر".split("_"),weekdays:"الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[اليوم على الساعة] LT",nextDay:"[غدا على الساعة] LT",nextWeek:"dddd [على الساعة] LT",lastDay:"[أمس على الساعة] LT",lastWeek:"dddd [على الساعة] LT",sameElse:"L"},relativeTime:{future:"في %s",past:"منذ %s",s:"ثوان",ss:"%d ثانية",m:"دقيقة",mm:"%d دقائق",h:"ساعة",hh:"%d ساعات",d:"يوم",dd:"%d أيام",M:"شهر",MM:"%d أشهر",y:"سنة",yy:"%d سنوات"},week:{dow:1,doy:4}})}(n(19))},function(e,t,n){!function(e){"use strict"; +//! moment.js locale configuration +var t={1:"-inci",5:"-inci",8:"-inci",70:"-inci",80:"-inci",2:"-nci",7:"-nci",20:"-nci",50:"-nci",3:"-üncü",4:"-üncü",100:"-üncü",6:"-ncı",9:"-uncu",10:"-uncu",30:"-uncu",60:"-ıncı",90:"-ıncı"};e.defineLocale("az",{months:"yanvar_fevral_mart_aprel_may_iyun_iyul_avqust_sentyabr_oktyabr_noyabr_dekabr".split("_"),monthsShort:"yan_fev_mar_apr_may_iyn_iyl_avq_sen_okt_noy_dek".split("_"),weekdays:"Bazar_Bazar ertəsi_Çərşənbə axşamı_Çərşənbə_Cümə axşamı_Cümə_Şənbə".split("_"),weekdaysShort:"Baz_BzE_ÇAx_Çər_CAx_Cüm_Şən".split("_"),weekdaysMin:"Bz_BE_ÇA_Çə_CA_Cü_Şə".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[bugün saat] LT",nextDay:"[sabah saat] LT",nextWeek:"[gələn həftə] dddd [saat] LT",lastDay:"[dünən] LT",lastWeek:"[keçən həftə] dddd [saat] LT",sameElse:"L"},relativeTime:{future:"%s sonra",past:"%s əvvəl",s:"bir neçə saniyə",ss:"%d saniyə",m:"bir dəqiqə",mm:"%d dəqiqə",h:"bir saat",hh:"%d saat",d:"bir gün",dd:"%d gün",M:"bir ay",MM:"%d ay",y:"bir il",yy:"%d il"},meridiemParse:/gecə|səhər|gündüz|axşam/,isPM:function(e){return/^(gündüz|axşam)$/.test(e)},meridiem:function(e,t,n){return e<4?"gecə":e<12?"səhər":e<17?"gündüz":"axşam"},dayOfMonthOrdinalParse:/\d{1,2}-(ıncı|inci|nci|üncü|ncı|uncu)/,ordinal:function(e){if(0===e)return e+"-ıncı";var n=e%10;return e+(t[n]||t[e%100-n]||t[e>=100?100:null])},week:{dow:1,doy:7}})}(n(19))},function(e,t,n){!function(e){"use strict"; +//! moment.js locale configuration +function t(e,t,n){var r,i;return"m"===n?t?"хвіліна":"хвіліну":"h"===n?t?"гадзіна":"гадзіну":e+" "+(r=+e,i={ss:t?"секунда_секунды_секунд":"секунду_секунды_секунд",mm:t?"хвіліна_хвіліны_хвілін":"хвіліну_хвіліны_хвілін",hh:t?"гадзіна_гадзіны_гадзін":"гадзіну_гадзіны_гадзін",dd:"дзень_дні_дзён",MM:"месяц_месяцы_месяцаў",yy:"год_гады_гадоў"}[n].split("_"),r%10==1&&r%100!=11?i[0]:r%10>=2&&r%10<=4&&(r%100<10||r%100>=20)?i[1]:i[2])}e.defineLocale("be",{months:{format:"студзеня_лютага_сакавіка_красавіка_траўня_чэрвеня_ліпеня_жніўня_верасня_кастрычніка_лістапада_снежня".split("_"),standalone:"студзень_люты_сакавік_красавік_травень_чэрвень_ліпень_жнівень_верасень_кастрычнік_лістапад_снежань".split("_")},monthsShort:"студ_лют_сак_крас_трав_чэрв_ліп_жнів_вер_каст_ліст_снеж".split("_"),weekdays:{format:"нядзелю_панядзелак_аўторак_сераду_чацвер_пятніцу_суботу".split("_"),standalone:"нядзеля_панядзелак_аўторак_серада_чацвер_пятніца_субота".split("_"),isFormat:/\[ ?[Ууў] ?(?:мінулую|наступную)? ?\] ?dddd/},weekdaysShort:"нд_пн_ат_ср_чц_пт_сб".split("_"),weekdaysMin:"нд_пн_ат_ср_чц_пт_сб".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY г.",LLL:"D MMMM YYYY г., HH:mm",LLLL:"dddd, D MMMM YYYY г., HH:mm"},calendar:{sameDay:"[Сёння ў] LT",nextDay:"[Заўтра ў] LT",lastDay:"[Учора ў] LT",nextWeek:function(){return"[У] dddd [ў] LT"},lastWeek:function(){switch(this.day()){case 0:case 3:case 5:case 6:return"[У мінулую] dddd [ў] LT";case 1:case 2:case 4:return"[У мінулы] dddd [ў] LT"}},sameElse:"L"},relativeTime:{future:"праз %s",past:"%s таму",s:"некалькі секунд",m:t,mm:t,h:t,hh:t,d:"дзень",dd:t,M:"месяц",MM:t,y:"год",yy:t},meridiemParse:/ночы|раніцы|дня|вечара/,isPM:function(e){return/^(дня|вечара)$/.test(e)},meridiem:function(e,t,n){return e<4?"ночы":e<12?"раніцы":e<17?"дня":"вечара"},dayOfMonthOrdinalParse:/\d{1,2}-(і|ы|га)/,ordinal:function(e,t){switch(t){case"M":case"d":case"DDD":case"w":case"W":return e%10!=2&&e%10!=3||e%100==12||e%100==13?e+"-ы":e+"-і";case"D":return e+"-га";default:return e}},week:{dow:1,doy:7}})}(n(19))},function(e,t,n){!function(e){"use strict"; +//! moment.js locale configuration +e.defineLocale("bg",{months:"януари_февруари_март_април_май_юни_юли_август_септември_октомври_ноември_декември".split("_"),monthsShort:"яну_фев_мар_апр_май_юни_юли_авг_сеп_окт_ное_дек".split("_"),weekdays:"неделя_понеделник_вторник_сряда_четвъртък_петък_събота".split("_"),weekdaysShort:"нед_пон_вто_сря_чет_пет_съб".split("_"),weekdaysMin:"нд_пн_вт_ср_чт_пт_сб".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"D.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY H:mm",LLLL:"dddd, D MMMM YYYY H:mm"},calendar:{sameDay:"[Днес в] LT",nextDay:"[Утре в] LT",nextWeek:"dddd [в] LT",lastDay:"[Вчера в] LT",lastWeek:function(){switch(this.day()){case 0:case 3:case 6:return"[Миналата] dddd [в] LT";case 1:case 2:case 4:case 5:return"[Миналия] dddd [в] LT"}},sameElse:"L"},relativeTime:{future:"след %s",past:"преди %s",s:"няколко секунди",ss:"%d секунди",m:"минута",mm:"%d минути",h:"час",hh:"%d часа",d:"ден",dd:"%d дена",w:"седмица",ww:"%d седмици",M:"месец",MM:"%d месеца",y:"година",yy:"%d години"},dayOfMonthOrdinalParse:/\d{1,2}-(ев|ен|ти|ви|ри|ми)/,ordinal:function(e){var t=e%10,n=e%100;return 0===e?e+"-ев":0===n?e+"-ен":n>10&&n<20?e+"-ти":1===t?e+"-ви":2===t?e+"-ри":7===t||8===t?e+"-ми":e+"-ти"},week:{dow:1,doy:7}})}(n(19))},function(e,t,n){!function(e){"use strict"; +//! moment.js locale configuration +e.defineLocale("bm",{months:"Zanwuyekalo_Fewuruyekalo_Marisikalo_Awirilikalo_Mɛkalo_Zuwɛnkalo_Zuluyekalo_Utikalo_Sɛtanburukalo_ɔkutɔburukalo_Nowanburukalo_Desanburukalo".split("_"),monthsShort:"Zan_Few_Mar_Awi_Mɛ_Zuw_Zul_Uti_Sɛt_ɔku_Now_Des".split("_"),weekdays:"Kari_Ntɛnɛn_Tarata_Araba_Alamisa_Juma_Sibiri".split("_"),weekdaysShort:"Kar_Ntɛ_Tar_Ara_Ala_Jum_Sib".split("_"),weekdaysMin:"Ka_Nt_Ta_Ar_Al_Ju_Si".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"MMMM [tile] D [san] YYYY",LLL:"MMMM [tile] D [san] YYYY [lɛrɛ] HH:mm",LLLL:"dddd MMMM [tile] D [san] YYYY [lɛrɛ] HH:mm"},calendar:{sameDay:"[Bi lɛrɛ] LT",nextDay:"[Sini lɛrɛ] LT",nextWeek:"dddd [don lɛrɛ] LT",lastDay:"[Kunu lɛrɛ] LT",lastWeek:"dddd [tɛmɛnen lɛrɛ] LT",sameElse:"L"},relativeTime:{future:"%s kɔnɔ",past:"a bɛ %s bɔ",s:"sanga dama dama",ss:"sekondi %d",m:"miniti kelen",mm:"miniti %d",h:"lɛrɛ kelen",hh:"lɛrɛ %d",d:"tile kelen",dd:"tile %d",M:"kalo kelen",MM:"kalo %d",y:"san kelen",yy:"san %d"},week:{dow:1,doy:4}})}(n(19))},function(e,t,n){!function(e){"use strict"; +//! moment.js locale configuration +var t={1:"১",2:"২",3:"৩",4:"৪",5:"৫",6:"৬",7:"৭",8:"৮",9:"৯",0:"০"},n={"১":"1","২":"2","৩":"3","৪":"4","৫":"5","৬":"6","৭":"7","৮":"8","৯":"9","০":"0"};e.defineLocale("bn",{months:"জানুয়ারি_ফেব্রুয়ারি_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্টেম্বর_অক্টোবর_নভেম্বর_ডিসেম্বর".split("_"),monthsShort:"জানু_ফেব্রু_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্ট_অক্টো_নভে_ডিসে".split("_"),weekdays:"রবিবার_সোমবার_মঙ্গলবার_বুধবার_বৃহস্পতিবার_শুক্রবার_শনিবার".split("_"),weekdaysShort:"রবি_সোম_মঙ্গল_বুধ_বৃহস্পতি_শুক্র_শনি".split("_"),weekdaysMin:"রবি_সোম_মঙ্গল_বুধ_বৃহ_শুক্র_শনি".split("_"),longDateFormat:{LT:"A h:mm সময়",LTS:"A h:mm:ss সময়",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm সময়",LLLL:"dddd, D MMMM YYYY, A h:mm সময়"},calendar:{sameDay:"[আজ] LT",nextDay:"[আগামীকাল] LT",nextWeek:"dddd, LT",lastDay:"[গতকাল] LT",lastWeek:"[গত] dddd, LT",sameElse:"L"},relativeTime:{future:"%s পরে",past:"%s আগে",s:"কয়েক সেকেন্ড",ss:"%d সেকেন্ড",m:"এক মিনিট",mm:"%d মিনিট",h:"এক ঘন্টা",hh:"%d ঘন্টা",d:"এক দিন",dd:"%d দিন",M:"এক মাস",MM:"%d মাস",y:"এক বছর",yy:"%d বছর"},preparse:function(e){return e.replace(/[১২৩৪৫৬৭৮৯০]/g,(function(e){return n[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]}))},meridiemParse:/রাত|সকাল|দুপুর|বিকাল|রাত/,meridiemHour:function(e,t){return 12===e&&(e=0),"রাত"===t&&e>=4||"দুপুর"===t&&e<5||"বিকাল"===t?e+12:e},meridiem:function(e,t,n){return e<4?"রাত":e<10?"সকাল":e<17?"দুপুর":e<20?"বিকাল":"রাত"},week:{dow:0,doy:6}})}(n(19))},function(e,t,n){!function(e){"use strict"; +//! moment.js locale configuration +var t={1:"১",2:"২",3:"৩",4:"৪",5:"৫",6:"৬",7:"৭",8:"৮",9:"৯",0:"০"},n={"১":"1","২":"2","৩":"3","৪":"4","৫":"5","৬":"6","৭":"7","৮":"8","৯":"9","০":"0"};e.defineLocale("bn-bd",{months:"জানুয়ারি_ফেব্রুয়ারি_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্টেম্বর_অক্টোবর_নভেম্বর_ডিসেম্বর".split("_"),monthsShort:"জানু_ফেব্রু_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্ট_অক্টো_নভে_ডিসে".split("_"),weekdays:"রবিবার_সোমবার_মঙ্গলবার_বুধবার_বৃহস্পতিবার_শুক্রবার_শনিবার".split("_"),weekdaysShort:"রবি_সোম_মঙ্গল_বুধ_বৃহস্পতি_শুক্র_শনি".split("_"),weekdaysMin:"রবি_সোম_মঙ্গল_বুধ_বৃহ_শুক্র_শনি".split("_"),longDateFormat:{LT:"A h:mm সময়",LTS:"A h:mm:ss সময়",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm সময়",LLLL:"dddd, D MMMM YYYY, A h:mm সময়"},calendar:{sameDay:"[আজ] LT",nextDay:"[আগামীকাল] LT",nextWeek:"dddd, LT",lastDay:"[গতকাল] LT",lastWeek:"[গত] dddd, LT",sameElse:"L"},relativeTime:{future:"%s পরে",past:"%s আগে",s:"কয়েক সেকেন্ড",ss:"%d সেকেন্ড",m:"এক মিনিট",mm:"%d মিনিট",h:"এক ঘন্টা",hh:"%d ঘন্টা",d:"এক দিন",dd:"%d দিন",M:"এক মাস",MM:"%d মাস",y:"এক বছর",yy:"%d বছর"},preparse:function(e){return e.replace(/[১২৩৪৫৬৭৮৯০]/g,(function(e){return n[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]}))},meridiemParse:/রাত|ভোর|সকাল|দুপুর|বিকাল|সন্ধ্যা|রাত/,meridiemHour:function(e,t){return 12===e&&(e=0),"রাত"===t?e<4?e:e+12:"ভোর"===t||"সকাল"===t?e:"দুপুর"===t?e>=3?e:e+12:"বিকাল"===t||"সন্ধ্যা"===t?e+12:void 0},meridiem:function(e,t,n){return e<4?"রাত":e<6?"ভোর":e<12?"সকাল":e<15?"দুপুর":e<18?"বিকাল":e<20?"সন্ধ্যা":"রাত"},week:{dow:0,doy:6}})}(n(19))},function(e,t,n){!function(e){"use strict"; +//! moment.js locale configuration +var t={1:"༡",2:"༢",3:"༣",4:"༤",5:"༥",6:"༦",7:"༧",8:"༨",9:"༩",0:"༠"},n={"༡":"1","༢":"2","༣":"3","༤":"4","༥":"5","༦":"6","༧":"7","༨":"8","༩":"9","༠":"0"};e.defineLocale("bo",{months:"ཟླ་བ་དང་པོ_ཟླ་བ་གཉིས་པ_ཟླ་བ་གསུམ་པ_ཟླ་བ་བཞི་པ_ཟླ་བ་ལྔ་པ_ཟླ་བ་དྲུག་པ_ཟླ་བ་བདུན་པ_ཟླ་བ་བརྒྱད་པ_ཟླ་བ་དགུ་པ_ཟླ་བ་བཅུ་པ_ཟླ་བ་བཅུ་གཅིག་པ_ཟླ་བ་བཅུ་གཉིས་པ".split("_"),monthsShort:"ཟླ་1_ཟླ་2_ཟླ་3_ཟླ་4_ཟླ་5_ཟླ་6_ཟླ་7_ཟླ་8_ཟླ་9_ཟླ་10_ཟླ་11_ཟླ་12".split("_"),monthsShortRegex:/^(ཟླ་\d{1,2})/,monthsParseExact:!0,weekdays:"གཟའ་ཉི་མ་_གཟའ་ཟླ་བ་_གཟའ་མིག་དམར་_གཟའ་ལྷག་པ་_གཟའ་ཕུར་བུ_གཟའ་པ་སངས་_གཟའ་སྤེན་པ་".split("_"),weekdaysShort:"ཉི་མ་_ཟླ་བ་_མིག་དམར་_ལྷག་པ་_ཕུར་བུ_པ་སངས་_སྤེན་པ་".split("_"),weekdaysMin:"ཉི_ཟླ_མིག_ལྷག_ཕུར_སངས_སྤེན".split("_"),longDateFormat:{LT:"A h:mm",LTS:"A h:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm",LLLL:"dddd, D MMMM YYYY, A h:mm"},calendar:{sameDay:"[དི་རིང] LT",nextDay:"[སང་ཉིན] LT",nextWeek:"[བདུན་ཕྲག་རྗེས་མ], LT",lastDay:"[ཁ་སང] LT",lastWeek:"[བདུན་ཕྲག་མཐའ་མ] dddd, LT",sameElse:"L"},relativeTime:{future:"%s ལ་",past:"%s སྔན་ལ",s:"ལམ་སང",ss:"%d སྐར་ཆ།",m:"སྐར་མ་གཅིག",mm:"%d སྐར་མ",h:"ཆུ་ཚོད་གཅིག",hh:"%d ཆུ་ཚོད",d:"ཉིན་གཅིག",dd:"%d ཉིན་",M:"ཟླ་བ་གཅིག",MM:"%d ཟླ་བ",y:"ལོ་གཅིག",yy:"%d ལོ"},preparse:function(e){return e.replace(/[༡༢༣༤༥༦༧༨༩༠]/g,(function(e){return n[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]}))},meridiemParse:/མཚན་མོ|ཞོགས་ཀས|ཉིན་གུང|དགོང་དག|མཚན་མོ/,meridiemHour:function(e,t){return 12===e&&(e=0),"མཚན་མོ"===t&&e>=4||"ཉིན་གུང"===t&&e<5||"དགོང་དག"===t?e+12:e},meridiem:function(e,t,n){return e<4?"མཚན་མོ":e<10?"ཞོགས་ཀས":e<17?"ཉིན་གུང":e<20?"དགོང་དག":"མཚན་མོ"},week:{dow:0,doy:6}})}(n(19))},function(e,t,n){!function(e){"use strict"; +//! moment.js locale configuration +function t(e,t,n){return e+" "+function(e,t){return 2===t?function(e){var t={m:"v",b:"v",d:"z"};return void 0===t[e.charAt(0)]?e:t[e.charAt(0)]+e.substring(1)}(e):e}({mm:"munutenn",MM:"miz",dd:"devezh"}[n],e)}var n=[/^gen/i,/^c[ʼ\']hwe/i,/^meu/i,/^ebr/i,/^mae/i,/^(mez|eve)/i,/^gou/i,/^eos/i,/^gwe/i,/^her/i,/^du/i,/^ker/i],r=/^(genver|c[ʼ\']hwevrer|meurzh|ebrel|mae|mezheven|gouere|eost|gwengolo|here|du|kerzu|gen|c[ʼ\']hwe|meu|ebr|mae|eve|gou|eos|gwe|her|du|ker)/i,i=[/^Su/i,/^Lu/i,/^Me([^r]|$)/i,/^Mer/i,/^Ya/i,/^Gw/i,/^Sa/i];e.defineLocale("br",{months:"Genver_Cʼhwevrer_Meurzh_Ebrel_Mae_Mezheven_Gouere_Eost_Gwengolo_Here_Du_Kerzu".split("_"),monthsShort:"Gen_Cʼhwe_Meu_Ebr_Mae_Eve_Gou_Eos_Gwe_Her_Du_Ker".split("_"),weekdays:"Sul_Lun_Meurzh_Mercʼher_Yaou_Gwener_Sadorn".split("_"),weekdaysShort:"Sul_Lun_Meu_Mer_Yao_Gwe_Sad".split("_"),weekdaysMin:"Su_Lu_Me_Mer_Ya_Gw_Sa".split("_"),weekdaysParse:i,fullWeekdaysParse:[/^sul/i,/^lun/i,/^meurzh/i,/^merc[ʼ\']her/i,/^yaou/i,/^gwener/i,/^sadorn/i],shortWeekdaysParse:[/^Sul/i,/^Lun/i,/^Meu/i,/^Mer/i,/^Yao/i,/^Gwe/i,/^Sad/i],minWeekdaysParse:i,monthsRegex:r,monthsShortRegex:r,monthsStrictRegex:/^(genver|c[ʼ\']hwevrer|meurzh|ebrel|mae|mezheven|gouere|eost|gwengolo|here|du|kerzu)/i,monthsShortStrictRegex:/^(gen|c[ʼ\']hwe|meu|ebr|mae|eve|gou|eos|gwe|her|du|ker)/i,monthsParse:n,longMonthsParse:n,shortMonthsParse:n,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D [a viz] MMMM YYYY",LLL:"D [a viz] MMMM YYYY HH:mm",LLLL:"dddd, D [a viz] MMMM YYYY HH:mm"},calendar:{sameDay:"[Hiziv da] LT",nextDay:"[Warcʼhoazh da] LT",nextWeek:"dddd [da] LT",lastDay:"[Decʼh da] LT",lastWeek:"dddd [paset da] LT",sameElse:"L"},relativeTime:{future:"a-benn %s",past:"%s ʼzo",s:"un nebeud segondennoù",ss:"%d eilenn",m:"ur vunutenn",mm:t,h:"un eur",hh:"%d eur",d:"un devezh",dd:t,M:"ur miz",MM:t,y:"ur bloaz",yy:function(e){switch(function e(t){return t>9?e(t%10):t}(e)){case 1:case 3:case 4:case 5:case 9:return e+" bloaz";default:return e+" vloaz"}}},dayOfMonthOrdinalParse:/\d{1,2}(añ|vet)/,ordinal:function(e){return e+(1===e?"añ":"vet")},week:{dow:1,doy:4},meridiemParse:/a.m.|g.m./,isPM:function(e){return"g.m."===e},meridiem:function(e,t,n){return e<12?"a.m.":"g.m."}})}(n(19))},function(e,t,n){!function(e){"use strict"; +//! moment.js locale configuration +function t(e,t,n){var r=e+" ";switch(n){case"ss":return r+=1===e?"sekunda":2===e||3===e||4===e?"sekunde":"sekundi";case"m":return t?"jedna minuta":"jedne minute";case"mm":return r+=1===e?"minuta":2===e||3===e||4===e?"minute":"minuta";case"h":return t?"jedan sat":"jednog sata";case"hh":return r+=1===e?"sat":2===e||3===e||4===e?"sata":"sati";case"dd":return r+=1===e?"dan":"dana";case"MM":return r+=1===e?"mjesec":2===e||3===e||4===e?"mjeseca":"mjeseci";case"yy":return r+=1===e?"godina":2===e||3===e||4===e?"godine":"godina"}}e.defineLocale("bs",{months:"januar_februar_mart_april_maj_juni_juli_august_septembar_oktobar_novembar_decembar".split("_"),monthsShort:"jan._feb._mar._apr._maj._jun._jul._aug._sep._okt._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota".split("_"),weekdaysShort:"ned._pon._uto._sri._čet._pet._sub.".split("_"),weekdaysMin:"ne_po_ut_sr_če_pe_su".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[danas u] LT",nextDay:"[sutra u] LT",nextWeek:function(){switch(this.day()){case 0:return"[u] [nedjelju] [u] LT";case 3:return"[u] [srijedu] [u] LT";case 6:return"[u] [subotu] [u] LT";case 1:case 2:case 4:case 5:return"[u] dddd [u] LT"}},lastDay:"[jučer u] LT",lastWeek:function(){switch(this.day()){case 0:case 3:return"[prošlu] dddd [u] LT";case 6:return"[prošle] [subote] [u] LT";case 1:case 2:case 4:case 5:return"[prošli] dddd [u] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"prije %s",s:"par sekundi",ss:t,m:t,mm:t,h:t,hh:t,d:"dan",dd:t,M:"mjesec",MM:t,y:"godinu",yy:t},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}})}(n(19))},function(e,t,n){!function(e){"use strict"; +//! moment.js locale configuration +e.defineLocale("ca",{months:{standalone:"gener_febrer_març_abril_maig_juny_juliol_agost_setembre_octubre_novembre_desembre".split("_"),format:"de gener_de febrer_de març_d'abril_de maig_de juny_de juliol_d'agost_de setembre_d'octubre_de novembre_de desembre".split("_"),isFormat:/D[oD]?(\s)+MMMM/},monthsShort:"gen._febr._març_abr._maig_juny_jul._ag._set._oct._nov._des.".split("_"),monthsParseExact:!0,weekdays:"diumenge_dilluns_dimarts_dimecres_dijous_divendres_dissabte".split("_"),weekdaysShort:"dg._dl._dt._dc._dj._dv._ds.".split("_"),weekdaysMin:"dg_dl_dt_dc_dj_dv_ds".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM [de] YYYY",ll:"D MMM YYYY",LLL:"D MMMM [de] YYYY [a les] H:mm",lll:"D MMM YYYY, H:mm",LLLL:"dddd D MMMM [de] YYYY [a les] H:mm",llll:"ddd D MMM YYYY, H:mm"},calendar:{sameDay:function(){return"[avui a "+(1!==this.hours()?"les":"la")+"] LT"},nextDay:function(){return"[demà a "+(1!==this.hours()?"les":"la")+"] LT"},nextWeek:function(){return"dddd [a "+(1!==this.hours()?"les":"la")+"] LT"},lastDay:function(){return"[ahir a "+(1!==this.hours()?"les":"la")+"] LT"},lastWeek:function(){return"[el] dddd [passat a "+(1!==this.hours()?"les":"la")+"] LT"},sameElse:"L"},relativeTime:{future:"d'aquí %s",past:"fa %s",s:"uns segons",ss:"%d segons",m:"un minut",mm:"%d minuts",h:"una hora",hh:"%d hores",d:"un dia",dd:"%d dies",M:"un mes",MM:"%d mesos",y:"un any",yy:"%d anys"},dayOfMonthOrdinalParse:/\d{1,2}(r|n|t|è|a)/,ordinal:function(e,t){var n=1===e?"r":2===e?"n":3===e?"r":4===e?"t":"è";return"w"!==t&&"W"!==t||(n="a"),e+n},week:{dow:1,doy:4}})}(n(19))},function(e,t,n){!function(e){"use strict"; +//! moment.js locale configuration +var t="leden_únor_březen_duben_květen_červen_červenec_srpen_září_říjen_listopad_prosinec".split("_"),n="led_úno_bře_dub_kvě_čvn_čvc_srp_zář_říj_lis_pro".split("_"),r=[/^led/i,/^úno/i,/^bře/i,/^dub/i,/^kvě/i,/^(čvn|červen$|června)/i,/^(čvc|červenec|července)/i,/^srp/i,/^zář/i,/^říj/i,/^lis/i,/^pro/i],i=/^(leden|únor|březen|duben|květen|červenec|července|červen|června|srpen|září|říjen|listopad|prosinec|led|úno|bře|dub|kvě|čvn|čvc|srp|zář|říj|lis|pro)/i;function o(e){return e>1&&e<5&&1!=~~(e/10)}function a(e,t,n,r){var i=e+" ";switch(n){case"s":return t||r?"pár sekund":"pár sekundami";case"ss":return t||r?i+(o(e)?"sekundy":"sekund"):i+"sekundami";case"m":return t?"minuta":r?"minutu":"minutou";case"mm":return t||r?i+(o(e)?"minuty":"minut"):i+"minutami";case"h":return t?"hodina":r?"hodinu":"hodinou";case"hh":return t||r?i+(o(e)?"hodiny":"hodin"):i+"hodinami";case"d":return t||r?"den":"dnem";case"dd":return t||r?i+(o(e)?"dny":"dní"):i+"dny";case"M":return t||r?"měsíc":"měsícem";case"MM":return t||r?i+(o(e)?"měsíce":"měsíců"):i+"měsíci";case"y":return t||r?"rok":"rokem";case"yy":return t||r?i+(o(e)?"roky":"let"):i+"lety"}}e.defineLocale("cs",{months:t,monthsShort:n,monthsRegex:i,monthsShortRegex:i,monthsStrictRegex:/^(leden|ledna|února|únor|březen|března|duben|dubna|květen|května|červenec|července|červen|června|srpen|srpna|září|říjen|října|listopadu|listopad|prosinec|prosince)/i,monthsShortStrictRegex:/^(led|úno|bře|dub|kvě|čvn|čvc|srp|zář|říj|lis|pro)/i,monthsParse:r,longMonthsParse:r,shortMonthsParse:r,weekdays:"neděle_pondělí_úterý_středa_čtvrtek_pátek_sobota".split("_"),weekdaysShort:"ne_po_út_st_čt_pá_so".split("_"),weekdaysMin:"ne_po_út_st_čt_pá_so".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd D. MMMM YYYY H:mm",l:"D. M. YYYY"},calendar:{sameDay:"[dnes v] LT",nextDay:"[zítra v] LT",nextWeek:function(){switch(this.day()){case 0:return"[v neděli v] LT";case 1:case 2:return"[v] dddd [v] LT";case 3:return"[ve středu v] LT";case 4:return"[ve čtvrtek v] LT";case 5:return"[v pátek v] LT";case 6:return"[v sobotu v] LT"}},lastDay:"[včera v] LT",lastWeek:function(){switch(this.day()){case 0:return"[minulou neděli v] LT";case 1:case 2:return"[minulé] dddd [v] LT";case 3:return"[minulou středu v] LT";case 4:case 5:return"[minulý] dddd [v] LT";case 6:return"[minulou sobotu v] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"před %s",s:a,ss:a,m:a,mm:a,h:a,hh:a,d:a,dd:a,M:a,MM:a,y:a,yy:a},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n(19))},function(e,t,n){!function(e){"use strict"; +//! moment.js locale configuration +e.defineLocale("cv",{months:"кӑрлач_нарӑс_пуш_ака_май_ҫӗртме_утӑ_ҫурла_авӑн_юпа_чӳк_раштав".split("_"),monthsShort:"кӑр_нар_пуш_ака_май_ҫӗр_утӑ_ҫур_авн_юпа_чӳк_раш".split("_"),weekdays:"вырсарникун_тунтикун_ытларикун_юнкун_кӗҫнерникун_эрнекун_шӑматкун".split("_"),weekdaysShort:"выр_тун_ытл_юн_кӗҫ_эрн_шӑм".split("_"),weekdaysMin:"вр_тн_ыт_юн_кҫ_эр_шм".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD-MM-YYYY",LL:"YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ]",LLL:"YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ], HH:mm",LLLL:"dddd, YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ], HH:mm"},calendar:{sameDay:"[Паян] LT [сехетре]",nextDay:"[Ыран] LT [сехетре]",lastDay:"[Ӗнер] LT [сехетре]",nextWeek:"[Ҫитес] dddd LT [сехетре]",lastWeek:"[Иртнӗ] dddd LT [сехетре]",sameElse:"L"},relativeTime:{future:function(e){return e+(/сехет$/i.exec(e)?"рен":/ҫул$/i.exec(e)?"тан":"ран")},past:"%s каялла",s:"пӗр-ик ҫеккунт",ss:"%d ҫеккунт",m:"пӗр минут",mm:"%d минут",h:"пӗр сехет",hh:"%d сехет",d:"пӗр кун",dd:"%d кун",M:"пӗр уйӑх",MM:"%d уйӑх",y:"пӗр ҫул",yy:"%d ҫул"},dayOfMonthOrdinalParse:/\d{1,2}-мӗш/,ordinal:"%d-мӗш",week:{dow:1,doy:7}})}(n(19))},function(e,t,n){!function(e){"use strict"; +//! moment.js locale configuration +e.defineLocale("cy",{months:"Ionawr_Chwefror_Mawrth_Ebrill_Mai_Mehefin_Gorffennaf_Awst_Medi_Hydref_Tachwedd_Rhagfyr".split("_"),monthsShort:"Ion_Chwe_Maw_Ebr_Mai_Meh_Gor_Aws_Med_Hyd_Tach_Rhag".split("_"),weekdays:"Dydd Sul_Dydd Llun_Dydd Mawrth_Dydd Mercher_Dydd Iau_Dydd Gwener_Dydd Sadwrn".split("_"),weekdaysShort:"Sul_Llun_Maw_Mer_Iau_Gwe_Sad".split("_"),weekdaysMin:"Su_Ll_Ma_Me_Ia_Gw_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Heddiw am] LT",nextDay:"[Yfory am] LT",nextWeek:"dddd [am] LT",lastDay:"[Ddoe am] LT",lastWeek:"dddd [diwethaf am] LT",sameElse:"L"},relativeTime:{future:"mewn %s",past:"%s yn ôl",s:"ychydig eiliadau",ss:"%d eiliad",m:"munud",mm:"%d munud",h:"awr",hh:"%d awr",d:"diwrnod",dd:"%d diwrnod",M:"mis",MM:"%d mis",y:"blwyddyn",yy:"%d flynedd"},dayOfMonthOrdinalParse:/\d{1,2}(fed|ain|af|il|ydd|ed|eg)/,ordinal:function(e){var t="";return e>20?t=40===e||50===e||60===e||80===e||100===e?"fed":"ain":e>0&&(t=["","af","il","ydd","ydd","ed","ed","ed","fed","fed","fed","eg","fed","eg","eg","fed","eg","eg","fed","eg","fed"][e]),e+t},week:{dow:1,doy:4}})}(n(19))},function(e,t,n){!function(e){"use strict"; +//! moment.js locale configuration +e.defineLocale("da",{months:"januar_februar_marts_april_maj_juni_juli_august_september_oktober_november_december".split("_"),monthsShort:"jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec".split("_"),weekdays:"søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag".split("_"),weekdaysShort:"søn_man_tir_ons_tor_fre_lør".split("_"),weekdaysMin:"sø_ma_ti_on_to_fr_lø".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd [d.] D. MMMM YYYY [kl.] HH:mm"},calendar:{sameDay:"[i dag kl.] LT",nextDay:"[i morgen kl.] LT",nextWeek:"på dddd [kl.] LT",lastDay:"[i går kl.] LT",lastWeek:"[i] dddd[s kl.] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"%s siden",s:"få sekunder",ss:"%d sekunder",m:"et minut",mm:"%d minutter",h:"en time",hh:"%d timer",d:"en dag",dd:"%d dage",M:"en måned",MM:"%d måneder",y:"et år",yy:"%d år"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n(19))},function(e,t,n){!function(e){"use strict"; +//! moment.js locale configuration +function t(e,t,n,r){var i={m:["eine Minute","einer Minute"],h:["eine Stunde","einer Stunde"],d:["ein Tag","einem Tag"],dd:[e+" Tage",e+" Tagen"],w:["eine Woche","einer Woche"],M:["ein Monat","einem Monat"],MM:[e+" Monate",e+" Monaten"],y:["ein Jahr","einem Jahr"],yy:[e+" Jahre",e+" Jahren"]};return t?i[n][0]:i[n][1]}e.defineLocale("de",{months:"Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jan._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.".split("_"),monthsParseExact:!0,weekdays:"Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag".split("_"),weekdaysShort:"So._Mo._Di._Mi._Do._Fr._Sa.".split("_"),weekdaysMin:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd, D. MMMM YYYY HH:mm"},calendar:{sameDay:"[heute um] LT [Uhr]",sameElse:"L",nextDay:"[morgen um] LT [Uhr]",nextWeek:"dddd [um] LT [Uhr]",lastDay:"[gestern um] LT [Uhr]",lastWeek:"[letzten] dddd [um] LT [Uhr]"},relativeTime:{future:"in %s",past:"vor %s",s:"ein paar Sekunden",ss:"%d Sekunden",m:t,mm:"%d Minuten",h:t,hh:"%d Stunden",d:t,dd:t,w:t,ww:"%d Wochen",M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n(19))},function(e,t,n){!function(e){"use strict"; +//! moment.js locale configuration +function t(e,t,n,r){var i={m:["eine Minute","einer Minute"],h:["eine Stunde","einer Stunde"],d:["ein Tag","einem Tag"],dd:[e+" Tage",e+" Tagen"],w:["eine Woche","einer Woche"],M:["ein Monat","einem Monat"],MM:[e+" Monate",e+" Monaten"],y:["ein Jahr","einem Jahr"],yy:[e+" Jahre",e+" Jahren"]};return t?i[n][0]:i[n][1]}e.defineLocale("de-at",{months:"Jänner_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jän._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.".split("_"),monthsParseExact:!0,weekdays:"Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag".split("_"),weekdaysShort:"So._Mo._Di._Mi._Do._Fr._Sa.".split("_"),weekdaysMin:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd, D. MMMM YYYY HH:mm"},calendar:{sameDay:"[heute um] LT [Uhr]",sameElse:"L",nextDay:"[morgen um] LT [Uhr]",nextWeek:"dddd [um] LT [Uhr]",lastDay:"[gestern um] LT [Uhr]",lastWeek:"[letzten] dddd [um] LT [Uhr]"},relativeTime:{future:"in %s",past:"vor %s",s:"ein paar Sekunden",ss:"%d Sekunden",m:t,mm:"%d Minuten",h:t,hh:"%d Stunden",d:t,dd:t,w:t,ww:"%d Wochen",M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n(19))},function(e,t,n){!function(e){"use strict"; +//! moment.js locale configuration +function t(e,t,n,r){var i={m:["eine Minute","einer Minute"],h:["eine Stunde","einer Stunde"],d:["ein Tag","einem Tag"],dd:[e+" Tage",e+" Tagen"],w:["eine Woche","einer Woche"],M:["ein Monat","einem Monat"],MM:[e+" Monate",e+" Monaten"],y:["ein Jahr","einem Jahr"],yy:[e+" Jahre",e+" Jahren"]};return t?i[n][0]:i[n][1]}e.defineLocale("de-ch",{months:"Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jan._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.".split("_"),monthsParseExact:!0,weekdays:"Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag".split("_"),weekdaysShort:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),weekdaysMin:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd, D. MMMM YYYY HH:mm"},calendar:{sameDay:"[heute um] LT [Uhr]",sameElse:"L",nextDay:"[morgen um] LT [Uhr]",nextWeek:"dddd [um] LT [Uhr]",lastDay:"[gestern um] LT [Uhr]",lastWeek:"[letzten] dddd [um] LT [Uhr]"},relativeTime:{future:"in %s",past:"vor %s",s:"ein paar Sekunden",ss:"%d Sekunden",m:t,mm:"%d Minuten",h:t,hh:"%d Stunden",d:t,dd:t,w:t,ww:"%d Wochen",M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n(19))},function(e,t,n){!function(e){"use strict"; +//! moment.js locale configuration +var t=["ޖެނުއަރީ","ފެބްރުއަރީ","މާރިޗު","އޭޕްރީލު","މޭ","ޖޫން","ޖުލައި","އޯގަސްޓު","ސެޕްޓެމްބަރު","އޮކްޓޯބަރު","ނޮވެމްބަރު","ޑިސެމްބަރު"],n=["އާދިއްތަ","ހޯމަ","އަންގާރަ","ބުދަ","ބުރާސްފަތި","ހުކުރު","ހޮނިހިރު"];e.defineLocale("dv",{months:t,monthsShort:t,weekdays:n,weekdaysShort:n,weekdaysMin:"އާދި_ހޯމަ_އަން_ބުދަ_ބުރާ_ހުކު_ހޮނި".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"D/M/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiemParse:/މކ|މފ/,isPM:function(e){return"މފ"===e},meridiem:function(e,t,n){return e<12?"މކ":"މފ"},calendar:{sameDay:"[މިއަދު] LT",nextDay:"[މާދަމާ] LT",nextWeek:"dddd LT",lastDay:"[އިއްޔެ] LT",lastWeek:"[ފާއިތުވި] dddd LT",sameElse:"L"},relativeTime:{future:"ތެރޭގައި %s",past:"ކުރިން %s",s:"ސިކުންތުކޮޅެއް",ss:"d% ސިކުންތު",m:"މިނިޓެއް",mm:"މިނިޓު %d",h:"ގަޑިއިރެއް",hh:"ގަޑިއިރު %d",d:"ދުވަހެއް",dd:"ދުވަސް %d",M:"މަހެއް",MM:"މަސް %d",y:"އަހަރެއް",yy:"އަހަރު %d"},preparse:function(e){return e.replace(/،/g,",")},postformat:function(e){return e.replace(/,/g,"،")},week:{dow:7,doy:12}})}(n(19))},function(e,t,n){!function(e){"use strict"; +//! moment.js locale configuration +e.defineLocale("el",{monthsNominativeEl:"Ιανουάριος_Φεβρουάριος_Μάρτιος_Απρίλιος_Μάιος_Ιούνιος_Ιούλιος_Αύγουστος_Σεπτέμβριος_Οκτώβριος_Νοέμβριος_Δεκέμβριος".split("_"),monthsGenitiveEl:"Ιανουαρίου_Φεβρουαρίου_Μαρτίου_Απριλίου_Μαΐου_Ιουνίου_Ιουλίου_Αυγούστου_Σεπτεμβρίου_Οκτωβρίου_Νοεμβρίου_Δεκεμβρίου".split("_"),months:function(e,t){return e?"string"==typeof t&&/D/.test(t.substring(0,t.indexOf("MMMM")))?this._monthsGenitiveEl[e.month()]:this._monthsNominativeEl[e.month()]:this._monthsNominativeEl},monthsShort:"Ιαν_Φεβ_Μαρ_Απρ_Μαϊ_Ιουν_Ιουλ_Αυγ_Σεπ_Οκτ_Νοε_Δεκ".split("_"),weekdays:"Κυριακή_Δευτέρα_Τρίτη_Τετάρτη_Πέμπτη_Παρασκευή_Σάββατο".split("_"),weekdaysShort:"Κυρ_Δευ_Τρι_Τετ_Πεμ_Παρ_Σαβ".split("_"),weekdaysMin:"Κυ_Δε_Τρ_Τε_Πε_Πα_Σα".split("_"),meridiem:function(e,t,n){return e>11?n?"μμ":"ΜΜ":n?"πμ":"ΠΜ"},isPM:function(e){return"μ"===(e+"").toLowerCase()[0]},meridiemParse:/[ΠΜ]\.?Μ?\.?/i,longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendarEl:{sameDay:"[Σήμερα {}] LT",nextDay:"[Αύριο {}] LT",nextWeek:"dddd [{}] LT",lastDay:"[Χθες {}] LT",lastWeek:function(){switch(this.day()){case 6:return"[το προηγούμενο] dddd [{}] LT";default:return"[την προηγούμενη] dddd [{}] LT"}},sameElse:"L"},calendar:function(e,t){var n,r=this._calendarEl[e],i=t&&t.hours();return n=r,("undefined"!=typeof Function&&n instanceof Function||"[object Function]"===Object.prototype.toString.call(n))&&(r=r.apply(t)),r.replace("{}",i%12==1?"στη":"στις")},relativeTime:{future:"σε %s",past:"%s πριν",s:"λίγα δευτερόλεπτα",ss:"%d δευτερόλεπτα",m:"ένα λεπτό",mm:"%d λεπτά",h:"μία ώρα",hh:"%d ώρες",d:"μία μέρα",dd:"%d μέρες",M:"ένας μήνας",MM:"%d μήνες",y:"ένας χρόνος",yy:"%d χρόνια"},dayOfMonthOrdinalParse:/\d{1,2}η/,ordinal:"%dη",week:{dow:1,doy:4}})}(n(19))},function(e,t,n){!function(e){"use strict"; +//! moment.js locale configuration +e.defineLocale("en-au",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")},week:{dow:0,doy:4}})}(n(19))},function(e,t,n){!function(e){"use strict"; +//! moment.js locale configuration +e.defineLocale("en-ca",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"YYYY-MM-DD",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")}})}(n(19))},function(e,t,n){!function(e){"use strict"; +//! moment.js locale configuration +e.defineLocale("en-gb",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")},week:{dow:1,doy:4}})}(n(19))},function(e,t,n){!function(e){"use strict"; +//! moment.js locale configuration +e.defineLocale("en-ie",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")},week:{dow:1,doy:4}})}(n(19))},function(e,t,n){!function(e){"use strict"; +//! moment.js locale configuration +e.defineLocale("en-il",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")}})}(n(19))},function(e,t,n){!function(e){"use strict"; +//! moment.js locale configuration +e.defineLocale("en-in",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")},week:{dow:0,doy:6}})}(n(19))},function(e,t,n){!function(e){"use strict"; +//! moment.js locale configuration +e.defineLocale("en-nz",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")},week:{dow:1,doy:4}})}(n(19))},function(e,t,n){!function(e){"use strict"; +//! moment.js locale configuration +e.defineLocale("en-sg",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")},week:{dow:1,doy:4}})}(n(19))},function(e,t,n){!function(e){"use strict"; +//! moment.js locale configuration +e.defineLocale("eo",{months:"januaro_februaro_marto_aprilo_majo_junio_julio_aŭgusto_septembro_oktobro_novembro_decembro".split("_"),monthsShort:"jan_feb_mart_apr_maj_jun_jul_aŭg_sept_okt_nov_dec".split("_"),weekdays:"dimanĉo_lundo_mardo_merkredo_ĵaŭdo_vendredo_sabato".split("_"),weekdaysShort:"dim_lun_mard_merk_ĵaŭ_ven_sab".split("_"),weekdaysMin:"di_lu_ma_me_ĵa_ve_sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"[la] D[-an de] MMMM, YYYY",LLL:"[la] D[-an de] MMMM, YYYY HH:mm",LLLL:"dddd[n], [la] D[-an de] MMMM, YYYY HH:mm",llll:"ddd, [la] D[-an de] MMM, YYYY HH:mm"},meridiemParse:/[ap]\.t\.m/i,isPM:function(e){return"p"===e.charAt(0).toLowerCase()},meridiem:function(e,t,n){return e>11?n?"p.t.m.":"P.T.M.":n?"a.t.m.":"A.T.M."},calendar:{sameDay:"[Hodiaŭ je] LT",nextDay:"[Morgaŭ je] LT",nextWeek:"dddd[n je] LT",lastDay:"[Hieraŭ je] LT",lastWeek:"[pasintan] dddd[n je] LT",sameElse:"L"},relativeTime:{future:"post %s",past:"antaŭ %s",s:"kelkaj sekundoj",ss:"%d sekundoj",m:"unu minuto",mm:"%d minutoj",h:"unu horo",hh:"%d horoj",d:"unu tago",dd:"%d tagoj",M:"unu monato",MM:"%d monatoj",y:"unu jaro",yy:"%d jaroj"},dayOfMonthOrdinalParse:/\d{1,2}a/,ordinal:"%da",week:{dow:1,doy:7}})}(n(19))},function(e,t,n){!function(e){"use strict"; +//! moment.js locale configuration +var t="ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.".split("_"),n="ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic".split("_"),r=[/^ene/i,/^feb/i,/^mar/i,/^abr/i,/^may/i,/^jun/i,/^jul/i,/^ago/i,/^sep/i,/^oct/i,/^nov/i,/^dic/i],i=/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i;e.defineLocale("es",{months:"enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre".split("_"),monthsShort:function(e,r){return e?/-MMM-/.test(r)?n[e.month()]:t[e.month()]:t},monthsRegex:i,monthsShortRegex:i,monthsStrictRegex:/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,monthsShortStrictRegex:/^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,monthsParse:r,longMonthsParse:r,shortMonthsParse:r,weekdays:"domingo_lunes_martes_miércoles_jueves_viernes_sábado".split("_"),weekdaysShort:"dom._lun._mar._mié._jue._vie._sáb.".split("_"),weekdaysMin:"do_lu_ma_mi_ju_vi_sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY H:mm",LLLL:"dddd, D [de] MMMM [de] YYYY H:mm"},calendar:{sameDay:function(){return"[hoy a la"+(1!==this.hours()?"s":"")+"] LT"},nextDay:function(){return"[mañana a la"+(1!==this.hours()?"s":"")+"] LT"},nextWeek:function(){return"dddd [a la"+(1!==this.hours()?"s":"")+"] LT"},lastDay:function(){return"[ayer a la"+(1!==this.hours()?"s":"")+"] LT"},lastWeek:function(){return"[el] dddd [pasado a la"+(1!==this.hours()?"s":"")+"] LT"},sameElse:"L"},relativeTime:{future:"en %s",past:"hace %s",s:"unos segundos",ss:"%d segundos",m:"un minuto",mm:"%d minutos",h:"una hora",hh:"%d horas",d:"un día",dd:"%d días",w:"una semana",ww:"%d semanas",M:"un mes",MM:"%d meses",y:"un año",yy:"%d años"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4},invalidDate:"Fecha inválida"})}(n(19))},function(e,t,n){!function(e){"use strict"; +//! moment.js locale configuration +var t="ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.".split("_"),n="ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic".split("_"),r=[/^ene/i,/^feb/i,/^mar/i,/^abr/i,/^may/i,/^jun/i,/^jul/i,/^ago/i,/^sep/i,/^oct/i,/^nov/i,/^dic/i],i=/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i;e.defineLocale("es-do",{months:"enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre".split("_"),monthsShort:function(e,r){return e?/-MMM-/.test(r)?n[e.month()]:t[e.month()]:t},monthsRegex:i,monthsShortRegex:i,monthsStrictRegex:/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,monthsShortStrictRegex:/^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,monthsParse:r,longMonthsParse:r,shortMonthsParse:r,weekdays:"domingo_lunes_martes_miércoles_jueves_viernes_sábado".split("_"),weekdaysShort:"dom._lun._mar._mié._jue._vie._sáb.".split("_"),weekdaysMin:"do_lu_ma_mi_ju_vi_sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY h:mm A",LLLL:"dddd, D [de] MMMM [de] YYYY h:mm A"},calendar:{sameDay:function(){return"[hoy a la"+(1!==this.hours()?"s":"")+"] LT"},nextDay:function(){return"[mañana a la"+(1!==this.hours()?"s":"")+"] LT"},nextWeek:function(){return"dddd [a la"+(1!==this.hours()?"s":"")+"] LT"},lastDay:function(){return"[ayer a la"+(1!==this.hours()?"s":"")+"] LT"},lastWeek:function(){return"[el] dddd [pasado a la"+(1!==this.hours()?"s":"")+"] LT"},sameElse:"L"},relativeTime:{future:"en %s",past:"hace %s",s:"unos segundos",ss:"%d segundos",m:"un minuto",mm:"%d minutos",h:"una hora",hh:"%d horas",d:"un día",dd:"%d días",w:"una semana",ww:"%d semanas",M:"un mes",MM:"%d meses",y:"un año",yy:"%d años"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}})}(n(19))},function(e,t,n){!function(e){"use strict"; +//! moment.js locale configuration +var t="ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.".split("_"),n="ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic".split("_"),r=[/^ene/i,/^feb/i,/^mar/i,/^abr/i,/^may/i,/^jun/i,/^jul/i,/^ago/i,/^sep/i,/^oct/i,/^nov/i,/^dic/i],i=/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i;e.defineLocale("es-mx",{months:"enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre".split("_"),monthsShort:function(e,r){return e?/-MMM-/.test(r)?n[e.month()]:t[e.month()]:t},monthsRegex:i,monthsShortRegex:i,monthsStrictRegex:/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,monthsShortStrictRegex:/^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,monthsParse:r,longMonthsParse:r,shortMonthsParse:r,weekdays:"domingo_lunes_martes_miércoles_jueves_viernes_sábado".split("_"),weekdaysShort:"dom._lun._mar._mié._jue._vie._sáb.".split("_"),weekdaysMin:"do_lu_ma_mi_ju_vi_sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY H:mm",LLLL:"dddd, D [de] MMMM [de] YYYY H:mm"},calendar:{sameDay:function(){return"[hoy a la"+(1!==this.hours()?"s":"")+"] LT"},nextDay:function(){return"[mañana a la"+(1!==this.hours()?"s":"")+"] LT"},nextWeek:function(){return"dddd [a la"+(1!==this.hours()?"s":"")+"] LT"},lastDay:function(){return"[ayer a la"+(1!==this.hours()?"s":"")+"] LT"},lastWeek:function(){return"[el] dddd [pasado a la"+(1!==this.hours()?"s":"")+"] LT"},sameElse:"L"},relativeTime:{future:"en %s",past:"hace %s",s:"unos segundos",ss:"%d segundos",m:"un minuto",mm:"%d minutos",h:"una hora",hh:"%d horas",d:"un día",dd:"%d días",w:"una semana",ww:"%d semanas",M:"un mes",MM:"%d meses",y:"un año",yy:"%d años"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:0,doy:4},invalidDate:"Fecha inválida"})}(n(19))},function(e,t,n){!function(e){"use strict"; +//! moment.js locale configuration +var t="ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.".split("_"),n="ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic".split("_"),r=[/^ene/i,/^feb/i,/^mar/i,/^abr/i,/^may/i,/^jun/i,/^jul/i,/^ago/i,/^sep/i,/^oct/i,/^nov/i,/^dic/i],i=/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i;e.defineLocale("es-us",{months:"enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre".split("_"),monthsShort:function(e,r){return e?/-MMM-/.test(r)?n[e.month()]:t[e.month()]:t},monthsRegex:i,monthsShortRegex:i,monthsStrictRegex:/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,monthsShortStrictRegex:/^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,monthsParse:r,longMonthsParse:r,shortMonthsParse:r,weekdays:"domingo_lunes_martes_miércoles_jueves_viernes_sábado".split("_"),weekdaysShort:"dom._lun._mar._mié._jue._vie._sáb.".split("_"),weekdaysMin:"do_lu_ma_mi_ju_vi_sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"MM/DD/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY h:mm A",LLLL:"dddd, D [de] MMMM [de] YYYY h:mm A"},calendar:{sameDay:function(){return"[hoy a la"+(1!==this.hours()?"s":"")+"] LT"},nextDay:function(){return"[mañana a la"+(1!==this.hours()?"s":"")+"] LT"},nextWeek:function(){return"dddd [a la"+(1!==this.hours()?"s":"")+"] LT"},lastDay:function(){return"[ayer a la"+(1!==this.hours()?"s":"")+"] LT"},lastWeek:function(){return"[el] dddd [pasado a la"+(1!==this.hours()?"s":"")+"] LT"},sameElse:"L"},relativeTime:{future:"en %s",past:"hace %s",s:"unos segundos",ss:"%d segundos",m:"un minuto",mm:"%d minutos",h:"una hora",hh:"%d horas",d:"un día",dd:"%d días",w:"una semana",ww:"%d semanas",M:"un mes",MM:"%d meses",y:"un año",yy:"%d años"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:0,doy:6}})}(n(19))},function(e,t,n){!function(e){"use strict"; +//! moment.js locale configuration +function t(e,t,n,r){var i={s:["mõne sekundi","mõni sekund","paar sekundit"],ss:[e+"sekundi",e+"sekundit"],m:["ühe minuti","üks minut"],mm:[e+" minuti",e+" minutit"],h:["ühe tunni","tund aega","üks tund"],hh:[e+" tunni",e+" tundi"],d:["ühe päeva","üks päev"],M:["kuu aja","kuu aega","üks kuu"],MM:[e+" kuu",e+" kuud"],y:["ühe aasta","aasta","üks aasta"],yy:[e+" aasta",e+" aastat"]};return t?i[n][2]?i[n][2]:i[n][1]:r?i[n][0]:i[n][1]}e.defineLocale("et",{months:"jaanuar_veebruar_märts_aprill_mai_juuni_juuli_august_september_oktoober_november_detsember".split("_"),monthsShort:"jaan_veebr_märts_apr_mai_juuni_juuli_aug_sept_okt_nov_dets".split("_"),weekdays:"pühapäev_esmaspäev_teisipäev_kolmapäev_neljapäev_reede_laupäev".split("_"),weekdaysShort:"P_E_T_K_N_R_L".split("_"),weekdaysMin:"P_E_T_K_N_R_L".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[Täna,] LT",nextDay:"[Homme,] LT",nextWeek:"[Järgmine] dddd LT",lastDay:"[Eile,] LT",lastWeek:"[Eelmine] dddd LT",sameElse:"L"},relativeTime:{future:"%s pärast",past:"%s tagasi",s:t,ss:t,m:t,mm:t,h:t,hh:t,d:t,dd:"%d päeva",M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n(19))},function(e,t,n){!function(e){"use strict"; +//! moment.js locale configuration +e.defineLocale("eu",{months:"urtarrila_otsaila_martxoa_apirila_maiatza_ekaina_uztaila_abuztua_iraila_urria_azaroa_abendua".split("_"),monthsShort:"urt._ots._mar._api._mai._eka._uzt._abu._ira._urr._aza._abe.".split("_"),monthsParseExact:!0,weekdays:"igandea_astelehena_asteartea_asteazkena_osteguna_ostirala_larunbata".split("_"),weekdaysShort:"ig._al._ar._az._og._ol._lr.".split("_"),weekdaysMin:"ig_al_ar_az_og_ol_lr".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"YYYY[ko] MMMM[ren] D[a]",LLL:"YYYY[ko] MMMM[ren] D[a] HH:mm",LLLL:"dddd, YYYY[ko] MMMM[ren] D[a] HH:mm",l:"YYYY-M-D",ll:"YYYY[ko] MMM D[a]",lll:"YYYY[ko] MMM D[a] HH:mm",llll:"ddd, YYYY[ko] MMM D[a] HH:mm"},calendar:{sameDay:"[gaur] LT[etan]",nextDay:"[bihar] LT[etan]",nextWeek:"dddd LT[etan]",lastDay:"[atzo] LT[etan]",lastWeek:"[aurreko] dddd LT[etan]",sameElse:"L"},relativeTime:{future:"%s barru",past:"duela %s",s:"segundo batzuk",ss:"%d segundo",m:"minutu bat",mm:"%d minutu",h:"ordu bat",hh:"%d ordu",d:"egun bat",dd:"%d egun",M:"hilabete bat",MM:"%d hilabete",y:"urte bat",yy:"%d urte"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}})}(n(19))},function(e,t,n){!function(e){"use strict"; +//! moment.js locale configuration +var t={1:"۱",2:"۲",3:"۳",4:"۴",5:"۵",6:"۶",7:"۷",8:"۸",9:"۹",0:"۰"},n={"۱":"1","۲":"2","۳":"3","۴":"4","۵":"5","۶":"6","۷":"7","۸":"8","۹":"9","۰":"0"};e.defineLocale("fa",{months:"ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر".split("_"),monthsShort:"ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر".split("_"),weekdays:"یک‌شنبه_دوشنبه_سه‌شنبه_چهارشنبه_پنج‌شنبه_جمعه_شنبه".split("_"),weekdaysShort:"یک‌شنبه_دوشنبه_سه‌شنبه_چهارشنبه_��نج‌شنبه_جمعه_شنبه".split("_"),weekdaysMin:"ی_د_س_چ_پ_ج_ش".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},meridiemParse:/قبل از ظهر|بعد از ظهر/,isPM:function(e){return/بعد از ظهر/.test(e)},meridiem:function(e,t,n){return e<12?"قبل از ظهر":"بعد از ظهر"},calendar:{sameDay:"[امروز ساعت] LT",nextDay:"[فردا ساعت] LT",nextWeek:"dddd [ساعت] LT",lastDay:"[دیروز ساعت] LT",lastWeek:"dddd [پیش] [ساعت] LT",sameElse:"L"},relativeTime:{future:"در %s",past:"%s پیش",s:"چند ثانیه",ss:"%d ثانیه",m:"یک دقیقه",mm:"%d دقیقه",h:"یک ساعت",hh:"%d ساعت",d:"یک روز",dd:"%d روز",M:"یک ماه",MM:"%d ماه",y:"یک سال",yy:"%d سال"},preparse:function(e){return e.replace(/[۰-۹]/g,(function(e){return n[e]})).replace(/،/g,",")},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]})).replace(/,/g,"،")},dayOfMonthOrdinalParse:/\d{1,2}م/,ordinal:"%dم",week:{dow:6,doy:12}})}(n(19))},function(e,t,n){!function(e){"use strict"; +//! moment.js locale configuration +var t="nolla yksi kaksi kolme neljä viisi kuusi seitsemän kahdeksan yhdeksän".split(" "),n=["nolla","yhden","kahden","kolmen","neljän","viiden","kuuden",t[7],t[8],t[9]];function r(e,r,i,o){var a="";switch(i){case"s":return o?"muutaman sekunnin":"muutama sekunti";case"ss":a=o?"sekunnin":"sekuntia";break;case"m":return o?"minuutin":"minuutti";case"mm":a=o?"minuutin":"minuuttia";break;case"h":return o?"tunnin":"tunti";case"hh":a=o?"tunnin":"tuntia";break;case"d":return o?"päivän":"päivä";case"dd":a=o?"päivän":"päivää";break;case"M":return o?"kuukauden":"kuukausi";case"MM":a=o?"kuukauden":"kuukautta";break;case"y":return o?"vuoden":"vuosi";case"yy":a=o?"vuoden":"vuotta"}return a=function(e,r){return e<10?r?n[e]:t[e]:e}(e,o)+" "+a}e.defineLocale("fi",{months:"tammikuu_helmikuu_maaliskuu_huhtikuu_toukokuu_kesäkuu_heinäkuu_elokuu_syyskuu_lokakuu_marraskuu_joulukuu".split("_"),monthsShort:"tammi_helmi_maalis_huhti_touko_kesä_heinä_elo_syys_loka_marras_joulu".split("_"),weekdays:"sunnuntai_maanantai_tiistai_keskiviikko_torstai_perjantai_lauantai".split("_"),weekdaysShort:"su_ma_ti_ke_to_pe_la".split("_"),weekdaysMin:"su_ma_ti_ke_to_pe_la".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD.MM.YYYY",LL:"Do MMMM[ta] YYYY",LLL:"Do MMMM[ta] YYYY, [klo] HH.mm",LLLL:"dddd, Do MMMM[ta] YYYY, [klo] HH.mm",l:"D.M.YYYY",ll:"Do MMM YYYY",lll:"Do MMM YYYY, [klo] HH.mm",llll:"ddd, Do MMM YYYY, [klo] HH.mm"},calendar:{sameDay:"[tänään] [klo] LT",nextDay:"[huomenna] [klo] LT",nextWeek:"dddd [klo] LT",lastDay:"[eilen] [klo] LT",lastWeek:"[viime] dddd[na] [klo] LT",sameElse:"L"},relativeTime:{future:"%s päästä",past:"%s sitten",s:r,ss:r,m:r,mm:r,h:r,hh:r,d:r,dd:r,M:r,MM:r,y:r,yy:r},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n(19))},function(e,t,n){!function(e){"use strict"; +//! moment.js locale configuration +e.defineLocale("fil",{months:"Enero_Pebrero_Marso_Abril_Mayo_Hunyo_Hulyo_Agosto_Setyembre_Oktubre_Nobyembre_Disyembre".split("_"),monthsShort:"Ene_Peb_Mar_Abr_May_Hun_Hul_Ago_Set_Okt_Nob_Dis".split("_"),weekdays:"Linggo_Lunes_Martes_Miyerkules_Huwebes_Biyernes_Sabado".split("_"),weekdaysShort:"Lin_Lun_Mar_Miy_Huw_Biy_Sab".split("_"),weekdaysMin:"Li_Lu_Ma_Mi_Hu_Bi_Sab".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"MM/D/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY HH:mm",LLLL:"dddd, MMMM DD, YYYY HH:mm"},calendar:{sameDay:"LT [ngayong araw]",nextDay:"[Bukas ng] LT",nextWeek:"LT [sa susunod na] dddd",lastDay:"LT [kahapon]",lastWeek:"LT [noong nakaraang] dddd",sameElse:"L"},relativeTime:{future:"sa loob ng %s",past:"%s ang nakalipas",s:"ilang segundo",ss:"%d segundo",m:"isang minuto",mm:"%d minuto",h:"isang oras",hh:"%d oras",d:"isang araw",dd:"%d araw",M:"isang buwan",MM:"%d buwan",y:"isang taon",yy:"%d taon"},dayOfMonthOrdinalParse:/\d{1,2}/,ordinal:function(e){return e},week:{dow:1,doy:4}})}(n(19))},function(e,t,n){!function(e){"use strict"; +//! moment.js locale configuration +e.defineLocale("fo",{months:"januar_februar_mars_apríl_mai_juni_juli_august_september_oktober_november_desember".split("_"),monthsShort:"jan_feb_mar_apr_mai_jun_jul_aug_sep_okt_nov_des".split("_"),weekdays:"sunnudagur_mánadagur_týsdagur_mikudagur_hósdagur_fríggjadagur_leygardagur".split("_"),weekdaysShort:"sun_mán_týs_mik_hós_frí_ley".split("_"),weekdaysMin:"su_má_tý_mi_hó_fr_le".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D. MMMM, YYYY HH:mm"},calendar:{sameDay:"[Í dag kl.] LT",nextDay:"[Í morgin kl.] LT",nextWeek:"dddd [kl.] LT",lastDay:"[Í gjár kl.] LT",lastWeek:"[síðstu] dddd [kl] LT",sameElse:"L"},relativeTime:{future:"um %s",past:"%s síðani",s:"fá sekund",ss:"%d sekundir",m:"ein minuttur",mm:"%d minuttir",h:"ein tími",hh:"%d tímar",d:"ein dagur",dd:"%d dagar",M:"ein mánaður",MM:"%d mánaðir",y:"eitt ár",yy:"%d ár"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n(19))},function(e,t,n){!function(e){"use strict"; +//! moment.js locale configuration +var t=/(janv\.?|févr\.?|mars|avr\.?|mai|juin|juil\.?|août|sept\.?|oct\.?|nov\.?|déc\.?|janvier|février|mars|avril|mai|juin|juillet|août|septembre|octobre|novembre|décembre)/i,n=[/^janv/i,/^févr/i,/^mars/i,/^avr/i,/^mai/i,/^juin/i,/^juil/i,/^août/i,/^sept/i,/^oct/i,/^nov/i,/^déc/i];e.defineLocale("fr",{months:"janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre".split("_"),monthsShort:"janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.".split("_"),monthsRegex:t,monthsShortRegex:t,monthsStrictRegex:/^(janvier|février|mars|avril|mai|juin|juillet|août|septembre|octobre|novembre|décembre)/i,monthsShortStrictRegex:/(janv\.?|févr\.?|mars|avr\.?|mai|juin|juil\.?|août|sept\.?|oct\.?|nov\.?|déc\.?)/i,monthsParse:n,longMonthsParse:n,shortMonthsParse:n,weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),weekdaysMin:"di_lu_ma_me_je_ve_sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Aujourd’hui à] LT",nextDay:"[Demain à] LT",nextWeek:"dddd [à] LT",lastDay:"[Hier à] LT",lastWeek:"dddd [dernier à] LT",sameElse:"L"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",ss:"%d secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",w:"une semaine",ww:"%d semaines",M:"un mois",MM:"%d mois",y:"un an",yy:"%d ans"},dayOfMonthOrdinalParse:/\d{1,2}(er|)/,ordinal:function(e,t){switch(t){case"D":return e+(1===e?"er":"");default:case"M":case"Q":case"DDD":case"d":return e+(1===e?"er":"e");case"w":case"W":return e+(1===e?"re":"e")}},week:{dow:1,doy:4}})}(n(19))},function(e,t,n){!function(e){"use strict"; +//! moment.js locale configuration +e.defineLocale("fr-ca",{months:"janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre".split("_"),monthsShort:"janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.".split("_"),monthsParseExact:!0,weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),weekdaysMin:"di_lu_ma_me_je_ve_sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Aujourd’hui à] LT",nextDay:"[Demain à] LT",nextWeek:"dddd [à] LT",lastDay:"[Hier à] LT",lastWeek:"dddd [dernier à] LT",sameElse:"L"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",ss:"%d secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",M:"un mois",MM:"%d mois",y:"un an",yy:"%d ans"},dayOfMonthOrdinalParse:/\d{1,2}(er|e)/,ordinal:function(e,t){switch(t){default:case"M":case"Q":case"D":case"DDD":case"d":return e+(1===e?"er":"e");case"w":case"W":return e+(1===e?"re":"e")}}})}(n(19))},function(e,t,n){!function(e){"use strict"; +//! moment.js locale configuration +e.defineLocale("fr-ch",{months:"janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre".split("_"),monthsShort:"janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.".split("_"),monthsParseExact:!0,weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),weekdaysMin:"di_lu_ma_me_je_ve_sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Aujourd’hui à] LT",nextDay:"[Demain à] LT",nextWeek:"dddd [à] LT",lastDay:"[Hier à] LT",lastWeek:"dddd [dernier à] LT",sameElse:"L"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",ss:"%d secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",M:"un mois",MM:"%d mois",y:"un an",yy:"%d ans"},dayOfMonthOrdinalParse:/\d{1,2}(er|e)/,ordinal:function(e,t){switch(t){default:case"M":case"Q":case"D":case"DDD":case"d":return e+(1===e?"er":"e");case"w":case"W":return e+(1===e?"re":"e")}},week:{dow:1,doy:4}})}(n(19))},function(e,t,n){!function(e){"use strict"; +//! moment.js locale configuration +var t="jan._feb._mrt._apr._mai_jun._jul._aug._sep._okt._nov._des.".split("_"),n="jan_feb_mrt_apr_mai_jun_jul_aug_sep_okt_nov_des".split("_");e.defineLocale("fy",{months:"jannewaris_febrewaris_maart_april_maaie_juny_july_augustus_septimber_oktober_novimber_desimber".split("_"),monthsShort:function(e,r){return e?/-MMM-/.test(r)?n[e.month()]:t[e.month()]:t},monthsParseExact:!0,weekdays:"snein_moandei_tiisdei_woansdei_tongersdei_freed_sneon".split("_"),weekdaysShort:"si._mo._ti._wo._to._fr._so.".split("_"),weekdaysMin:"Si_Mo_Ti_Wo_To_Fr_So".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[hjoed om] LT",nextDay:"[moarn om] LT",nextWeek:"dddd [om] LT",lastDay:"[juster om] LT",lastWeek:"[ôfrûne] dddd [om] LT",sameElse:"L"},relativeTime:{future:"oer %s",past:"%s lyn",s:"in pear sekonden",ss:"%d sekonden",m:"ien minút",mm:"%d minuten",h:"ien oere",hh:"%d oeren",d:"ien dei",dd:"%d dagen",M:"ien moanne",MM:"%d moannen",y:"ien jier",yy:"%d jierren"},dayOfMonthOrdinalParse:/\d{1,2}(ste|de)/,ordinal:function(e){return e+(1===e||8===e||e>=20?"ste":"de")},week:{dow:1,doy:4}})}(n(19))},function(e,t,n){!function(e){"use strict"; +//! moment.js locale configuration +e.defineLocale("ga",{months:["Eanáir","Feabhra","Márta","Aibreán","Bealtaine","Meitheamh","Iúil","Lúnasa","Meán Fómhair","Deireadh Fómhair","Samhain","Nollaig"],monthsShort:["Ean","Feabh","Márt","Aib","Beal","Meith","Iúil","Lún","M.F.","D.F.","Samh","Noll"],monthsParseExact:!0,weekdays:["Dé Domhnaigh","Dé Luain","Dé Máirt","Dé Céadaoin","Déardaoin","Dé hAoine","Dé Sathairn"],weekdaysShort:["Domh","Luan","Máirt","Céad","Déar","Aoine","Sath"],weekdaysMin:["Do","Lu","Má","Cé","Dé","A","Sa"],longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Inniu ag] LT",nextDay:"[Amárach ag] LT",nextWeek:"dddd [ag] LT",lastDay:"[Inné ag] LT",lastWeek:"dddd [seo caite] [ag] LT",sameElse:"L"},relativeTime:{future:"i %s",past:"%s ó shin",s:"cúpla soicind",ss:"%d soicind",m:"nóiméad",mm:"%d nóiméad",h:"uair an chloig",hh:"%d uair an chloig",d:"lá",dd:"%d lá",M:"mí",MM:"%d míonna",y:"bliain",yy:"%d bliain"},dayOfMonthOrdinalParse:/\d{1,2}(d|na|mh)/,ordinal:function(e){return e+(1===e?"d":e%10==2?"na":"mh")},week:{dow:1,doy:4}})}(n(19))},function(e,t,n){!function(e){"use strict"; +//! moment.js locale configuration +e.defineLocale("gd",{months:["Am Faoilleach","An Gearran","Am Màrt","An Giblean","An Cèitean","An t-Ògmhios","An t-Iuchar","An Lùnastal","An t-Sultain","An Dàmhair","An t-Samhain","An Dùbhlachd"],monthsShort:["Faoi","Gear","Màrt","Gibl","Cèit","Ògmh","Iuch","Lùn","Sult","Dàmh","Samh","Dùbh"],monthsParseExact:!0,weekdays:["Didòmhnaich","Diluain","Dimàirt","Diciadain","Diardaoin","Dihaoine","Disathairne"],weekdaysShort:["Did","Dil","Dim","Dic","Dia","Dih","Dis"],weekdaysMin:["Dò","Lu","Mà","Ci","Ar","Ha","Sa"],longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[An-diugh aig] LT",nextDay:"[A-màireach aig] LT",nextWeek:"dddd [aig] LT",lastDay:"[An-dè aig] LT",lastWeek:"dddd [seo chaidh] [aig] LT",sameElse:"L"},relativeTime:{future:"ann an %s",past:"bho chionn %s",s:"beagan diogan",ss:"%d diogan",m:"mionaid",mm:"%d mionaidean",h:"uair",hh:"%d uairean",d:"latha",dd:"%d latha",M:"mìos",MM:"%d mìosan",y:"bliadhna",yy:"%d bliadhna"},dayOfMonthOrdinalParse:/\d{1,2}(d|na|mh)/,ordinal:function(e){return e+(1===e?"d":e%10==2?"na":"mh")},week:{dow:1,doy:4}})}(n(19))},function(e,t,n){!function(e){"use strict"; +//! moment.js locale configuration +e.defineLocale("gl",{months:"xaneiro_febreiro_marzo_abril_maio_xuño_xullo_agosto_setembro_outubro_novembro_decembro".split("_"),monthsShort:"xan._feb._mar._abr._mai._xuñ._xul._ago._set._out._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"domingo_luns_martes_mércores_xoves_venres_sábado".split("_"),weekdaysShort:"dom._lun._mar._mér._xov._ven._sáb.".split("_"),weekdaysMin:"do_lu_ma_mé_xo_ve_sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY H:mm",LLLL:"dddd, D [de] MMMM [de] YYYY H:mm"},calendar:{sameDay:function(){return"[hoxe "+(1!==this.hours()?"ás":"á")+"] LT"},nextDay:function(){return"[mañá "+(1!==this.hours()?"ás":"á")+"] LT"},nextWeek:function(){return"dddd ["+(1!==this.hours()?"ás":"a")+"] LT"},lastDay:function(){return"[onte "+(1!==this.hours()?"á":"a")+"] LT"},lastWeek:function(){return"[o] dddd [pasado "+(1!==this.hours()?"ás":"a")+"] LT"},sameElse:"L"},relativeTime:{future:function(e){return 0===e.indexOf("un")?"n"+e:"en "+e},past:"hai %s",s:"uns segundos",ss:"%d segundos",m:"un minuto",mm:"%d minutos",h:"unha hora",hh:"%d horas",d:"un día",dd:"%d días",M:"un mes",MM:"%d meses",y:"un ano",yy:"%d anos"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}})}(n(19))},function(e,t,n){!function(e){"use strict"; +//! moment.js locale configuration +function t(e,t,n,r){var i={s:["थोडया सॅकंडांनी","थोडे सॅकंड"],ss:[e+" सॅकंडांनी",e+" सॅकंड"],m:["एका मिणटान","एक मिनूट"],mm:[e+" मिणटांनी",e+" मिणटां"],h:["एका वरान","एक वर"],hh:[e+" वरांनी",e+" वरां"],d:["एका दिसान","एक दीस"],dd:[e+" दिसांनी",e+" दीस"],M:["एका म्हयन्यान","एक म्हयनो"],MM:[e+" म्हयन्यानी",e+" म्हयने"],y:["एका वर्सान","एक वर्स"],yy:[e+" वर्सांनी",e+" वर्सां"]};return r?i[n][0]:i[n][1]}e.defineLocale("gom-deva",{months:{standalone:"जानेवारी_फेब्रुवारी_मार्च_एप्रील_मे_जून_जुलय_ऑगस्ट_सप्टेंबर_ऑक्टोबर_नोव्हेंबर_डिसेंबर".split("_"),format:"जानेवारीच्या_फेब्रुवारीच्या_मार्चाच्या_एप्रीलाच्या_मेयाच्या_जूनाच्या_जुलयाच्या_ऑगस्टाच्या_सप्टेंबराच्या_ऑक्टोबराच्या_नोव्हेंबराच्या_डिसेंबराच्या".split("_"),isFormat:/MMMM(\s)+D[oD]?/},monthsShort:"जाने._फेब्रु._मार्च_एप्री._मे_जून_जुल._ऑग._सप्टें._ऑक्टो._नोव्हें._डिसें.".split("_"),monthsParseExact:!0,weekdays:"आयतार_सोमार_मंगळार_बुधवार_बिरेस्तार_सुक्रार_शेनवार".split("_"),weekdaysShort:"आयत._सोम._मंगळ._बुध._ब्रेस्त._सुक्र._शेन.".split("_"),weekdaysMin:"आ_सो_मं_बु_ब्रे_सु_शे".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"A h:mm [वाजतां]",LTS:"A h:mm:ss [वाजतां]",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY A h:mm [वाजतां]",LLLL:"dddd, MMMM Do, YYYY, A h:mm [वाजतां]",llll:"ddd, D MMM YYYY, A h:mm [वाजतां]"},calendar:{sameDay:"[आयज] LT",nextDay:"[फाल्यां] LT",nextWeek:"[फुडलो] dddd[,] LT",lastDay:"[काल] LT",lastWeek:"[फाटलो] dddd[,] LT",sameElse:"L"},relativeTime:{future:"%s",past:"%s आदीं",s:t,ss:t,m:t,mm:t,h:t,hh:t,d:t,dd:t,M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2}(वेर)/,ordinal:function(e,t){switch(t){case"D":return e+"वेर";default:case"M":case"Q":case"DDD":case"d":case"w":case"W":return e}},week:{dow:0,doy:3},meridiemParse:/राती|सकाळीं|दनपारां|सांजे/,meridiemHour:function(e,t){return 12===e&&(e=0),"राती"===t?e<4?e:e+12:"सकाळीं"===t?e:"दनपारां"===t?e>12?e:e+12:"सांजे"===t?e+12:void 0},meridiem:function(e,t,n){return e<4?"राती":e<12?"सकाळीं":e<16?"दनपारां":e<20?"सांजे":"राती"}})}(n(19))},function(e,t,n){!function(e){"use strict"; +//! moment.js locale configuration +function t(e,t,n,r){var i={s:["thoddea sekondamni","thodde sekond"],ss:[e+" sekondamni",e+" sekond"],m:["eka mintan","ek minut"],mm:[e+" mintamni",e+" mintam"],h:["eka voran","ek vor"],hh:[e+" voramni",e+" voram"],d:["eka disan","ek dis"],dd:[e+" disamni",e+" dis"],M:["eka mhoinean","ek mhoino"],MM:[e+" mhoineamni",e+" mhoine"],y:["eka vorsan","ek voros"],yy:[e+" vorsamni",e+" vorsam"]};return r?i[n][0]:i[n][1]}e.defineLocale("gom-latn",{months:{standalone:"Janer_Febrer_Mars_Abril_Mai_Jun_Julai_Agost_Setembr_Otubr_Novembr_Dezembr".split("_"),format:"Janerachea_Febrerachea_Marsachea_Abrilachea_Maiachea_Junachea_Julaiachea_Agostachea_Setembrachea_Otubrachea_Novembrachea_Dezembrachea".split("_"),isFormat:/MMMM(\s)+D[oD]?/},monthsShort:"Jan._Feb._Mars_Abr._Mai_Jun_Jul._Ago._Set._Otu._Nov._Dez.".split("_"),monthsParseExact:!0,weekdays:"Aitar_Somar_Mongllar_Budhvar_Birestar_Sukrar_Son'var".split("_"),weekdaysShort:"Ait._Som._Mon._Bud._Bre._Suk._Son.".split("_"),weekdaysMin:"Ai_Sm_Mo_Bu_Br_Su_Sn".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"A h:mm [vazta]",LTS:"A h:mm:ss [vazta]",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY A h:mm [vazta]",LLLL:"dddd, MMMM Do, YYYY, A h:mm [vazta]",llll:"ddd, D MMM YYYY, A h:mm [vazta]"},calendar:{sameDay:"[Aiz] LT",nextDay:"[Faleam] LT",nextWeek:"[Fuddlo] dddd[,] LT",lastDay:"[Kal] LT",lastWeek:"[Fattlo] dddd[,] LT",sameElse:"L"},relativeTime:{future:"%s",past:"%s adim",s:t,ss:t,m:t,mm:t,h:t,hh:t,d:t,dd:t,M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2}(er)/,ordinal:function(e,t){switch(t){case"D":return e+"er";default:case"M":case"Q":case"DDD":case"d":case"w":case"W":return e}},week:{dow:0,doy:3},meridiemParse:/rati|sokallim|donparam|sanje/,meridiemHour:function(e,t){return 12===e&&(e=0),"rati"===t?e<4?e:e+12:"sokallim"===t?e:"donparam"===t?e>12?e:e+12:"sanje"===t?e+12:void 0},meridiem:function(e,t,n){return e<4?"rati":e<12?"sokallim":e<16?"donparam":e<20?"sanje":"rati"}})}(n(19))},function(e,t,n){!function(e){"use strict"; +//! moment.js locale configuration +var t={1:"૧",2:"૨",3:"૩",4:"૪",5:"૫",6:"૬",7:"૭",8:"૮",9:"૯",0:"૦"},n={"૧":"1","૨":"2","૩":"3","૪":"4","૫":"5","૬":"6","૭":"7","૮":"8","૯":"9","૦":"0"};e.defineLocale("gu",{months:"જાન્યુઆરી_ફેબ્રુઆરી_માર્ચ_એપ્રિલ_મે_જૂન_જુલાઈ_ઑગસ્ટ_સપ્ટેમ્બર_ઑક્ટ્બર_નવેમ્બર_ડિસેમ્બર".split("_"),monthsShort:"જાન્યુ._ફેબ્રુ._માર્ચ_એપ્રિ._મે_જૂન_જુલા._ઑગ._સપ્ટે._ઑક્ટ્._નવે._ડિસે.".split("_"),monthsParseExact:!0,weekdays:"રવિવાર_સોમવાર_મંગળવાર_બુધ્વાર_ગુરુવાર_શુક્રવાર_શનિવાર".split("_"),weekdaysShort:"રવિ_સોમ_મંગળ_બુધ્_ગુરુ_શુક્ર_શનિ".split("_"),weekdaysMin:"ર_સો_મં_બુ_ગુ_શુ_શ".split("_"),longDateFormat:{LT:"A h:mm વાગ્યે",LTS:"A h:mm:ss વાગ્યે",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm વાગ્યે",LLLL:"dddd, D MMMM YYYY, A h:mm વાગ્યે"},calendar:{sameDay:"[આજ] LT",nextDay:"[કાલે] LT",nextWeek:"dddd, LT",lastDay:"[ગઇકાલે] LT",lastWeek:"[પાછલા] dddd, LT",sameElse:"L"},relativeTime:{future:"%s મા",past:"%s પહેલા",s:"અમુક પળો",ss:"%d સેકંડ",m:"એક મિનિટ",mm:"%d મિનિટ",h:"એક કલાક",hh:"%d કલાક",d:"એક દિવસ",dd:"%d દિવસ",M:"એક મહિનો",MM:"%d મહિનો",y:"એક વર્ષ",yy:"%d વર્ષ"},preparse:function(e){return e.replace(/[૧૨૩૪૫૬૭૮૯૦]/g,(function(e){return n[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]}))},meridiemParse:/રાત|બપોર|સવાર|સાંજ/,meridiemHour:function(e,t){return 12===e&&(e=0),"રાત"===t?e<4?e:e+12:"સવાર"===t?e:"બપોર"===t?e>=10?e:e+12:"સાંજ"===t?e+12:void 0},meridiem:function(e,t,n){return e<4?"રાત":e<10?"સવાર":e<17?"બપોર":e<20?"સાંજ":"રાત"},week:{dow:0,doy:6}})}(n(19))},function(e,t,n){!function(e){"use strict"; +//! moment.js locale configuration +e.defineLocale("he",{months:"ינואר_פברואר_מרץ_אפריל_מאי_יוני_יולי_אוגוסט_ספטמבר_אוקטובר_נובמבר_דצמבר".split("_"),monthsShort:"ינו׳_פבר׳_מרץ_אפר׳_מאי_יוני_יולי_אוג׳_ספט׳_אוק׳_נוב׳_דצמ׳".split("_"),weekdays:"ראשון_שני_שלישי_רביעי_חמישי_שישי_שבת".split("_"),weekdaysShort:"א׳_ב׳_ג׳_ד׳_ה׳_ו׳_ש׳".split("_"),weekdaysMin:"א_ב_ג_ד_ה_ו_ש".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D [ב]MMMM YYYY",LLL:"D [ב]MMMM YYYY HH:mm",LLLL:"dddd, D [ב]MMMM YYYY HH:mm",l:"D/M/YYYY",ll:"D MMM YYYY",lll:"D MMM YYYY HH:mm",llll:"ddd, D MMM YYYY HH:mm"},calendar:{sameDay:"[היום ב־]LT",nextDay:"[מחר ב־]LT",nextWeek:"dddd [בשעה] LT",lastDay:"[אתמול ב־]LT",lastWeek:"[ביום] dddd [האחרון בשעה] LT",sameElse:"L"},relativeTime:{future:"בעוד %s",past:"לפני %s",s:"מספר שניות",ss:"%d שניות",m:"דקה",mm:"%d דקות",h:"שעה",hh:function(e){return 2===e?"שעתיים":e+" שעות"},d:"יום",dd:function(e){return 2===e?"יומיים":e+" ימים"},M:"חודש",MM:function(e){return 2===e?"חודשיים":e+" חודשים"},y:"שנה",yy:function(e){return 2===e?"שנתיים":e%10==0&&10!==e?e+" שנה":e+" שנים"}},meridiemParse:/אחה"צ|לפנה"צ|אחרי הצהריים|לפני הצהריים|לפנות בוקר|בבוקר|בערב/i,isPM:function(e){return/^(אחה"צ|אחרי הצהריים|בערב)$/.test(e)},meridiem:function(e,t,n){return e<5?"לפנות בוקר":e<10?"בבוקר":e<12?n?'לפנה"צ':"לפני הצהריים":e<18?n?'אחה"צ':"אחרי הצהריים":"בערב"}})}(n(19))},function(e,t,n){!function(e){"use strict"; +//! moment.js locale configuration +var t={1:"१",2:"२",3:"३",4:"४",5:"५",6:"६",7:"७",8:"८",9:"९",0:"०"},n={"१":"1","२":"2","३":"3","४":"4","५":"5","६":"6","७":"7","८":"8","९":"9","०":"0"},r=[/^जन/i,/^फ़र|फर/i,/^मार्च/i,/^अप्रै/i,/^मई/i,/^जून/i,/^जुल/i,/^अग/i,/^सितं|सित/i,/^अक्टू/i,/^नव|नवं/i,/^दिसं|दिस/i];e.defineLocale("hi",{months:{format:"जनवरी_फ़रवरी_मार्च_अप्रैल_मई_जून_जुलाई_अगस्त_सितम्बर_अक्टूबर_नवम्बर_दिसम्बर".split("_"),standalone:"जनवरी_फरवरी_मार्च_अप्रैल_मई_जून_जुलाई_अगस्त_सितंबर_अक्टूबर_नवंबर_दिसंबर".split("_")},monthsShort:"जन._फ़र._मार्च_अप्रै._मई_जून_जुल._अग._सित._अक्टू._नव._दिस.".split("_"),weekdays:"रविवार_सोमवार_मंगलवार_बुधवार_गुरूवार_शुक्रवार_शनिवार".split("_"),weekdaysShort:"रवि_सोम_मंगल_बुध_गुरू_शुक्र_शनि".split("_"),weekdaysMin:"र_सो_मं_बु_गु_शु_श".split("_"),longDateFormat:{LT:"A h:mm बजे",LTS:"A h:mm:ss बजे",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm बजे",LLLL:"dddd, D MMMM YYYY, A h:mm बजे"},monthsParse:r,longMonthsParse:r,shortMonthsParse:[/^जन/i,/^फ़र/i,/^मार्च/i,/^अप्रै/i,/^मई/i,/^जून/i,/^जुल/i,/^अग/i,/^सित/i,/^अक्टू/i,/^नव/i,/^दिस/i],monthsRegex:/^(जनवरी|जन\.?|फ़रवरी|फरवरी|फ़र\.?|मार्च?|अप्रैल|अप्रै\.?|मई?|जून?|जुलाई|जुल\.?|अगस्त|अग\.?|सितम्बर|सितंबर|सित\.?|अक्टूबर|अक्टू\.?|नवम्बर|नवंबर|नव\.?|दिसम्बर|दिसंबर|दिस\.?)/i,monthsShortRegex:/^(जनवरी|जन\.?|फ़रवरी|फरवरी|फ़र\.?|मार्च?|अप्रैल|अप्रै\.?|मई?|जून?|जुलाई|जुल\.?|अगस्त|अग\.?|सितम्बर|सितंबर|सित\.?|अक्टूबर|अक्टू\.?|नवम्बर|नवंबर|नव\.?|दिसम्बर|दिसंबर|दिस\.?)/i,monthsStrictRegex:/^(जनवरी?|फ़रवरी|फरवरी?|मार्च?|अप्रैल?|मई?|जून?|जुलाई?|अगस्त?|सितम्बर|सितंबर|सित?\.?|अक्टूबर|अक्टू\.?|नवम्बर|नवंबर?|दिसम्बर|दिसंबर?)/i,monthsShortStrictRegex:/^(जन\.?|फ़र\.?|मार्च?|अप्रै\.?|मई?|जून?|जुल\.?|अग\.?|सित\.?|अक्टू\.?|नव\.?|दिस\.?)/i,calendar:{sameDay:"[आज] LT",nextDay:"[कल] LT",nextWeek:"dddd, LT",lastDay:"[कल] LT",lastWeek:"[पिछले] dddd, LT",sameElse:"L"},relativeTime:{future:"%s में",past:"%s पहले",s:"कुछ ही क्षण",ss:"%d सेकंड",m:"एक मिनट",mm:"%d मिनट",h:"एक घंटा",hh:"%d घंटे",d:"एक दिन",dd:"%d दिन",M:"एक महीने",MM:"%d महीने",y:"एक वर्ष",yy:"%d वर्ष"},preparse:function(e){return e.replace(/[१२३४५६७८९०]/g,(function(e){return n[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]}))},meridiemParse:/रात|सुबह|दोपहर|शाम/,meridiemHour:function(e,t){return 12===e&&(e=0),"रात"===t?e<4?e:e+12:"सुबह"===t?e:"दोपहर"===t?e>=10?e:e+12:"शाम"===t?e+12:void 0},meridiem:function(e,t,n){return e<4?"रात":e<10?"सुबह":e<17?"दोपहर":e<20?"शाम":"रात"},week:{dow:0,doy:6}})}(n(19))},function(e,t,n){!function(e){"use strict"; +//! moment.js locale configuration +function t(e,t,n){var r=e+" ";switch(n){case"ss":return r+=1===e?"sekunda":2===e||3===e||4===e?"sekunde":"sekundi";case"m":return t?"jedna minuta":"jedne minute";case"mm":return r+=1===e?"minuta":2===e||3===e||4===e?"minute":"minuta";case"h":return t?"jedan sat":"jednog sata";case"hh":return r+=1===e?"sat":2===e||3===e||4===e?"sata":"sati";case"dd":return r+=1===e?"dan":"dana";case"MM":return r+=1===e?"mjesec":2===e||3===e||4===e?"mjeseca":"mjeseci";case"yy":return r+=1===e?"godina":2===e||3===e||4===e?"godine":"godina"}}e.defineLocale("hr",{months:{format:"siječnja_veljače_ožujka_travnja_svibnja_lipnja_srpnja_kolovoza_rujna_listopada_studenoga_prosinca".split("_"),standalone:"siječanj_veljača_ožujak_travanj_svibanj_lipanj_srpanj_kolovoz_rujan_listopad_studeni_prosinac".split("_")},monthsShort:"sij._velj._ožu._tra._svi._lip._srp._kol._ruj._lis._stu._pro.".split("_"),monthsParseExact:!0,weekdays:"nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota".split("_"),weekdaysShort:"ned._pon._uto._sri._čet._pet._sub.".split("_"),weekdaysMin:"ne_po_ut_sr_če_pe_su".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"Do MMMM YYYY",LLL:"Do MMMM YYYY H:mm",LLLL:"dddd, Do MMMM YYYY H:mm"},calendar:{sameDay:"[danas u] LT",nextDay:"[sutra u] LT",nextWeek:function(){switch(this.day()){case 0:return"[u] [nedjelju] [u] LT";case 3:return"[u] [srijedu] [u] LT";case 6:return"[u] [subotu] [u] LT";case 1:case 2:case 4:case 5:return"[u] dddd [u] LT"}},lastDay:"[jučer u] LT",lastWeek:function(){switch(this.day()){case 0:return"[prošlu] [nedjelju] [u] LT";case 3:return"[prošlu] [srijedu] [u] LT";case 6:return"[prošle] [subote] [u] LT";case 1:case 2:case 4:case 5:return"[prošli] dddd [u] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"prije %s",s:"par sekundi",ss:t,m:t,mm:t,h:t,hh:t,d:"dan",dd:t,M:"mjesec",MM:t,y:"godinu",yy:t},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}})}(n(19))},function(e,t,n){!function(e){"use strict"; +//! moment.js locale configuration +var t="vasárnap hétfőn kedden szerdán csütörtökön pénteken szombaton".split(" ");function n(e,t,n,r){var i=e;switch(n){case"s":return r||t?"néhány másodperc":"néhány másodperce";case"ss":return i+(r||t)?" másodperc":" másodperce";case"m":return"egy"+(r||t?" perc":" perce");case"mm":return i+(r||t?" perc":" perce");case"h":return"egy"+(r||t?" óra":" órája");case"hh":return i+(r||t?" óra":" órája");case"d":return"egy"+(r||t?" nap":" napja");case"dd":return i+(r||t?" nap":" napja");case"M":return"egy"+(r||t?" hónap":" hónapja");case"MM":return i+(r||t?" hónap":" hónapja");case"y":return"egy"+(r||t?" év":" éve");case"yy":return i+(r||t?" év":" éve")}return""}function r(e){return(e?"":"[múlt] ")+"["+t[this.day()]+"] LT[-kor]"}e.defineLocale("hu",{months:"január_február_március_április_május_június_július_augusztus_szeptember_október_november_december".split("_"),monthsShort:"jan._feb._márc._ápr._máj._jún._júl._aug._szept._okt._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"vasárnap_hétfő_kedd_szerda_csütörtök_péntek_szombat".split("_"),weekdaysShort:"vas_hét_kedd_sze_csüt_pén_szo".split("_"),weekdaysMin:"v_h_k_sze_cs_p_szo".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"YYYY.MM.DD.",LL:"YYYY. MMMM D.",LLL:"YYYY. MMMM D. H:mm",LLLL:"YYYY. MMMM D., dddd H:mm"},meridiemParse:/de|du/i,isPM:function(e){return"u"===e.charAt(1).toLowerCase()},meridiem:function(e,t,n){return e<12?!0===n?"de":"DE":!0===n?"du":"DU"},calendar:{sameDay:"[ma] LT[-kor]",nextDay:"[holnap] LT[-kor]",nextWeek:function(){return r.call(this,!0)},lastDay:"[tegnap] LT[-kor]",lastWeek:function(){return r.call(this,!1)},sameElse:"L"},relativeTime:{future:"%s múlva",past:"%s",s:n,ss:n,m:n,mm:n,h:n,hh:n,d:n,dd:n,M:n,MM:n,y:n,yy:n},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n(19))},function(e,t,n){!function(e){"use strict"; +//! moment.js locale configuration +e.defineLocale("hy-am",{months:{format:"հունվարի_փետրվարի_մարտի_ապրիլի_մայիսի_հունիսի_հուլիսի_օգոստոսի_սեպտեմբերի_հոկտեմբերի_նոյեմբերի_դեկտեմբերի".split("_"),standalone:"հունվար_փետրվար_մարտ_ապրիլ_մայիս_հունիս_հուլիս_օգոստոս_սեպտեմբեր_հոկտեմբեր_նոյեմբեր_դեկտեմբեր".split("_")},monthsShort:"հնվ_փտր_մրտ_ապր_մյս_հնս_հլս_օգս_սպտ_հկտ_նմբ_դկտ".split("_"),weekdays:"կիրակի_երկուշաբթի_երեքշաբթի_չորեքշաբթի_հինգշաբթի_ուրբաթ_շաբաթ".split("_"),weekdaysShort:"կրկ_երկ_երք_չրք_հնգ_ուրբ_շբթ".split("_"),weekdaysMin:"կրկ_երկ_երք_չրք_հնգ_ուրբ_շբթ".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY թ.",LLL:"D MMMM YYYY թ., HH:mm",LLLL:"dddd, D MMMM YYYY թ., HH:mm"},calendar:{sameDay:"[այսօր] LT",nextDay:"[վաղը] LT",lastDay:"[երեկ] LT",nextWeek:function(){return"dddd [օրը ժամը] LT"},lastWeek:function(){return"[անցած] dddd [օրը ժամը] LT"},sameElse:"L"},relativeTime:{future:"%s հետո",past:"%s առաջ",s:"մի քանի վայրկյան",ss:"%d վայրկյան",m:"րոպե",mm:"%d րոպե",h:"ժամ",hh:"%d ժամ",d:"օր",dd:"%d օր",M:"ամիս",MM:"%d ամիս",y:"տարի",yy:"%d տարի"},meridiemParse:/գիշերվա|առավոտվա|ցերեկվա|երեկոյան/,isPM:function(e){return/^(ցերեկվա|երեկոյան)$/.test(e)},meridiem:function(e){return e<4?"գիշերվա":e<12?"առավոտվա":e<17?"ցերեկվա":"երեկոյան"},dayOfMonthOrdinalParse:/\d{1,2}|\d{1,2}-(ին|րդ)/,ordinal:function(e,t){switch(t){case"DDD":case"w":case"W":case"DDDo":return 1===e?e+"-ին":e+"-րդ";default:return e}},week:{dow:1,doy:7}})}(n(19))},function(e,t,n){!function(e){"use strict"; +//! moment.js locale configuration +e.defineLocale("id",{months:"Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_November_Desember".split("_"),monthsShort:"Jan_Feb_Mar_Apr_Mei_Jun_Jul_Agt_Sep_Okt_Nov_Des".split("_"),weekdays:"Minggu_Senin_Selasa_Rabu_Kamis_Jumat_Sabtu".split("_"),weekdaysShort:"Min_Sen_Sel_Rab_Kam_Jum_Sab".split("_"),weekdaysMin:"Mg_Sn_Sl_Rb_Km_Jm_Sb".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [pukul] HH.mm",LLLL:"dddd, D MMMM YYYY [pukul] HH.mm"},meridiemParse:/pagi|siang|sore|malam/,meridiemHour:function(e,t){return 12===e&&(e=0),"pagi"===t?e:"siang"===t?e>=11?e:e+12:"sore"===t||"malam"===t?e+12:void 0},meridiem:function(e,t,n){return e<11?"pagi":e<15?"siang":e<19?"sore":"malam"},calendar:{sameDay:"[Hari ini pukul] LT",nextDay:"[Besok pukul] LT",nextWeek:"dddd [pukul] LT",lastDay:"[Kemarin pukul] LT",lastWeek:"dddd [lalu pukul] LT",sameElse:"L"},relativeTime:{future:"dalam %s",past:"%s yang lalu",s:"beberapa detik",ss:"%d detik",m:"semenit",mm:"%d menit",h:"sejam",hh:"%d jam",d:"sehari",dd:"%d hari",M:"sebulan",MM:"%d bulan",y:"setahun",yy:"%d tahun"},week:{dow:0,doy:6}})}(n(19))},function(e,t,n){!function(e){"use strict"; +//! moment.js locale configuration +function t(e){return e%100==11||e%10!=1}function n(e,n,r,i){var o=e+" ";switch(r){case"s":return n||i?"nokkrar sekúndur":"nokkrum sekúndum";case"ss":return t(e)?o+(n||i?"sekúndur":"sekúndum"):o+"sekúnda";case"m":return n?"mínúta":"mínútu";case"mm":return t(e)?o+(n||i?"mínútur":"mínútum"):n?o+"mínúta":o+"mínútu";case"hh":return t(e)?o+(n||i?"klukkustundir":"klukkustundum"):o+"klukkustund";case"d":return n?"dagur":i?"dag":"degi";case"dd":return t(e)?n?o+"dagar":o+(i?"daga":"dögum"):n?o+"dagur":o+(i?"dag":"degi");case"M":return n?"mánuður":i?"mánuð":"mánuði";case"MM":return t(e)?n?o+"mánuðir":o+(i?"mánuði":"mánuðum"):n?o+"mánuður":o+(i?"mánuð":"mánuði");case"y":return n||i?"ár":"ári";case"yy":return t(e)?o+(n||i?"ár":"árum"):o+(n||i?"ár":"ári")}}e.defineLocale("is",{months:"janúar_febrúar_mars_apríl_maí_júní_júlí_ágúst_september_október_nóvember_desember".split("_"),monthsShort:"jan_feb_mar_apr_maí_jún_júl_ágú_sep_okt_nóv_des".split("_"),weekdays:"sunnudagur_mánudagur_þriðjudagur_miðvikudagur_fimmtudagur_föstudagur_laugardagur".split("_"),weekdaysShort:"sun_mán_þri_mið_fim_fös_lau".split("_"),weekdaysMin:"Su_Má_Þr_Mi_Fi_Fö_La".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY [kl.] H:mm",LLLL:"dddd, D. MMMM YYYY [kl.] H:mm"},calendar:{sameDay:"[í dag kl.] LT",nextDay:"[á morgun kl.] LT",nextWeek:"dddd [kl.] LT",lastDay:"[í gær kl.] LT",lastWeek:"[síðasta] dddd [kl.] LT",sameElse:"L"},relativeTime:{future:"eftir %s",past:"fyrir %s síðan",s:n,ss:n,m:n,mm:n,h:"klukkustund",hh:n,d:n,dd:n,M:n,MM:n,y:n,yy:n},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n(19))},function(e,t,n){!function(e){"use strict"; +//! moment.js locale configuration +e.defineLocale("it",{months:"gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre".split("_"),monthsShort:"gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic".split("_"),weekdays:"domenica_lunedì_martedì_mercoledì_giovedì_venerdì_sabato".split("_"),weekdaysShort:"dom_lun_mar_mer_gio_ven_sab".split("_"),weekdaysMin:"do_lu_ma_me_gi_ve_sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:function(){return"[Oggi a"+(this.hours()>1?"lle ":0===this.hours()?" ":"ll'")+"]LT"},nextDay:function(){return"[Domani a"+(this.hours()>1?"lle ":0===this.hours()?" ":"ll'")+"]LT"},nextWeek:function(){return"dddd [a"+(this.hours()>1?"lle ":0===this.hours()?" ":"ll'")+"]LT"},lastDay:function(){return"[Ieri a"+(this.hours()>1?"lle ":0===this.hours()?" ":"ll'")+"]LT"},lastWeek:function(){switch(this.day()){case 0:return"[La scorsa] dddd [a"+(this.hours()>1?"lle ":0===this.hours()?" ":"ll'")+"]LT";default:return"[Lo scorso] dddd [a"+(this.hours()>1?"lle ":0===this.hours()?" ":"ll'")+"]LT"}},sameElse:"L"},relativeTime:{future:"tra %s",past:"%s fa",s:"alcuni secondi",ss:"%d secondi",m:"un minuto",mm:"%d minuti",h:"un'ora",hh:"%d ore",d:"un giorno",dd:"%d giorni",w:"una settimana",ww:"%d settimane",M:"un mese",MM:"%d mesi",y:"un anno",yy:"%d anni"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}})}(n(19))},function(e,t,n){!function(e){"use strict"; +//! moment.js locale configuration +e.defineLocale("it-ch",{months:"gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre".split("_"),monthsShort:"gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic".split("_"),weekdays:"domenica_lunedì_martedì_mercoledì_giovedì_venerdì_sabato".split("_"),weekdaysShort:"dom_lun_mar_mer_gio_ven_sab".split("_"),weekdaysMin:"do_lu_ma_me_gi_ve_sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Oggi alle] LT",nextDay:"[Domani alle] LT",nextWeek:"dddd [alle] LT",lastDay:"[Ieri alle] LT",lastWeek:function(){switch(this.day()){case 0:return"[la scorsa] dddd [alle] LT";default:return"[lo scorso] dddd [alle] LT"}},sameElse:"L"},relativeTime:{future:function(e){return(/^[0-9].+$/.test(e)?"tra":"in")+" "+e},past:"%s fa",s:"alcuni secondi",ss:"%d secondi",m:"un minuto",mm:"%d minuti",h:"un'ora",hh:"%d ore",d:"un giorno",dd:"%d giorni",M:"un mese",MM:"%d mesi",y:"un anno",yy:"%d anni"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}})}(n(19))},function(e,t,n){!function(e){"use strict"; +//! moment.js locale configuration +e.defineLocale("ja",{eras:[{since:"2019-05-01",offset:1,name:"令和",narrow:"㋿",abbr:"R"},{since:"1989-01-08",until:"2019-04-30",offset:1,name:"平成",narrow:"㍻",abbr:"H"},{since:"1926-12-25",until:"1989-01-07",offset:1,name:"昭和",narrow:"㍼",abbr:"S"},{since:"1912-07-30",until:"1926-12-24",offset:1,name:"大正",narrow:"㍽",abbr:"T"},{since:"1873-01-01",until:"1912-07-29",offset:6,name:"明治",narrow:"㍾",abbr:"M"},{since:"0001-01-01",until:"1873-12-31",offset:1,name:"西暦",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"紀元前",narrow:"BC",abbr:"BC"}],eraYearOrdinalRegex:/(元|\d+)年/,eraYearOrdinalParse:function(e,t){return"元"===t[1]?1:parseInt(t[1]||e,10)},months:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"日曜日_月曜日_火曜日_水曜日_木曜日_金曜日_土曜日".split("_"),weekdaysShort:"日_月_火_水_木_金_土".split("_"),weekdaysMin:"日_月_火_水_木_金_土".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日 HH:mm",LLLL:"YYYY年M月D日 dddd HH:mm",l:"YYYY/MM/DD",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日(ddd) HH:mm"},meridiemParse:/午前|午後/i,isPM:function(e){return"午後"===e},meridiem:function(e,t,n){return e<12?"午前":"午後"},calendar:{sameDay:"[今日] LT",nextDay:"[明日] LT",nextWeek:function(e){return e.week()!==this.week()?"[来週]dddd LT":"dddd LT"},lastDay:"[昨日] LT",lastWeek:function(e){return this.week()!==e.week()?"[先週]dddd LT":"dddd LT"},sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}日/,ordinal:function(e,t){switch(t){case"y":return 1===e?"元年":e+"年";case"d":case"D":case"DDD":return e+"日";default:return e}},relativeTime:{future:"%s後",past:"%s前",s:"数秒",ss:"%d秒",m:"1分",mm:"%d分",h:"1時間",hh:"%d時間",d:"1日",dd:"%d日",M:"1ヶ月",MM:"%dヶ月",y:"1年",yy:"%d年"}})}(n(19))},function(e,t,n){!function(e){"use strict"; +//! moment.js locale configuration +e.defineLocale("jv",{months:"Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_Nopember_Desember".split("_"),monthsShort:"Jan_Feb_Mar_Apr_Mei_Jun_Jul_Ags_Sep_Okt_Nop_Des".split("_"),weekdays:"Minggu_Senen_Seloso_Rebu_Kemis_Jemuwah_Septu".split("_"),weekdaysShort:"Min_Sen_Sel_Reb_Kem_Jem_Sep".split("_"),weekdaysMin:"Mg_Sn_Sl_Rb_Km_Jm_Sp".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [pukul] HH.mm",LLLL:"dddd, D MMMM YYYY [pukul] HH.mm"},meridiemParse:/enjing|siyang|sonten|ndalu/,meridiemHour:function(e,t){return 12===e&&(e=0),"enjing"===t?e:"siyang"===t?e>=11?e:e+12:"sonten"===t||"ndalu"===t?e+12:void 0},meridiem:function(e,t,n){return e<11?"enjing":e<15?"siyang":e<19?"sonten":"ndalu"},calendar:{sameDay:"[Dinten puniko pukul] LT",nextDay:"[Mbenjang pukul] LT",nextWeek:"dddd [pukul] LT",lastDay:"[Kala wingi pukul] LT",lastWeek:"dddd [kepengker pukul] LT",sameElse:"L"},relativeTime:{future:"wonten ing %s",past:"%s ingkang kepengker",s:"sawetawis detik",ss:"%d detik",m:"setunggal menit",mm:"%d menit",h:"setunggal jam",hh:"%d jam",d:"sedinten",dd:"%d dinten",M:"sewulan",MM:"%d wulan",y:"setaun",yy:"%d taun"},week:{dow:1,doy:7}})}(n(19))},function(e,t,n){!function(e){"use strict"; +//! moment.js locale configuration +e.defineLocale("ka",{months:"იანვარი_თებერვალი_მარტი_აპრილი_მაისი_ივნისი_ივლისი_აგვისტო_სექტემბერი_ოქტომბერი_ნოემბერი_დეკემბერი".split("_"),monthsShort:"იან_თებ_მარ_აპრ_მაი_ივნ_ივლ_აგვ_სექ_ოქტ_ნოე_დეკ".split("_"),weekdays:{standalone:"კვირა_ორშაბათი_სამშაბათი_ოთხშაბათი_ხუთშაბათი_პარასკევი_შაბათი".split("_"),format:"კვირას_ორშაბათს_სამშაბათს_ოთხშაბათს_ხუთშაბათს_პარასკევს_შაბათს".split("_"),isFormat:/(წინა|შემდეგ)/},weekdaysShort:"კვი_ორშ_სამ_ოთხ_ხუთ_პარ_შაბ".split("_"),weekdaysMin:"კვ_ორ_სა_ოთ_ხუ_პა_შა".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[დღეს] LT[-ზე]",nextDay:"[ხვალ] LT[-ზე]",lastDay:"[გუშინ] LT[-ზე]",nextWeek:"[შემდეგ] dddd LT[-ზე]",lastWeek:"[წინა] dddd LT-ზე",sameElse:"L"},relativeTime:{future:function(e){return e.replace(/(წამ|წუთ|საათ|წელ|დღ|თვ)(ი|ე)/,(function(e,t,n){return"ი"===n?t+"ში":t+n+"ში"}))},past:function(e){return/(წამი|წუთი|საათი|დღე|თვე)/.test(e)?e.replace(/(ი|ე)$/,"ის წინ"):/წელი/.test(e)?e.replace(/წელი$/,"წლის წინ"):e},s:"რამდენიმე წამი",ss:"%d წამი",m:"წუთი",mm:"%d წუთი",h:"საათი",hh:"%d საათ��",d:"დღე",dd:"%d დღე",M:"თვე",MM:"%d თვე",y:"წელი",yy:"%d წელი"},dayOfMonthOrdinalParse:/0|1-ლი|მე-\d{1,2}|\d{1,2}-ე/,ordinal:function(e){return 0===e?e:1===e?e+"-ლი":e<20||e<=100&&e%20==0||e%100==0?"მე-"+e:e+"-ე"},week:{dow:1,doy:7}})}(n(19))},function(e,t,n){!function(e){"use strict"; +//! moment.js locale configuration +var t={0:"-ші",1:"-ші",2:"-ші",3:"-ші",4:"-ші",5:"-ші",6:"-шы",7:"-ші",8:"-ші",9:"-шы",10:"-шы",20:"-шы",30:"-шы",40:"-шы",50:"-ші",60:"-шы",70:"-ші",80:"-ші",90:"-шы",100:"-ші"};e.defineLocale("kk",{months:"қаңтар_ақпан_наурыз_сәуір_мамыр_маусым_шілде_тамыз_қыркүйек_қазан_қараша_желтоқсан".split("_"),monthsShort:"қаң_ақп_нау_сәу_мам_мау_шіл_там_қыр_қаз_қар_жел".split("_"),weekdays:"жексенбі_дүйсенбі_сейсенбі_сәрсенбі_бейсенбі_жұма_сенбі".split("_"),weekdaysShort:"жек_дүй_сей_сәр_бей_жұм_сен".split("_"),weekdaysMin:"жк_дй_сй_ср_бй_жм_сн".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Бүгін сағат] LT",nextDay:"[Ертең сағат] LT",nextWeek:"dddd [сағат] LT",lastDay:"[Кеше сағат] LT",lastWeek:"[Өткен аптаның] dddd [сағат] LT",sameElse:"L"},relativeTime:{future:"%s ішінде",past:"%s бұрын",s:"бірнеше секунд",ss:"%d секунд",m:"бір минут",mm:"%d минут",h:"бір сағат",hh:"%d сағат",d:"бір күн",dd:"%d күн",M:"бір ай",MM:"%d ай",y:"бір жыл",yy:"%d жыл"},dayOfMonthOrdinalParse:/\d{1,2}-(ші|шы)/,ordinal:function(e){return e+(t[e]||t[e%10]||t[e>=100?100:null])},week:{dow:1,doy:7}})}(n(19))},function(e,t,n){!function(e){"use strict"; +//! moment.js locale configuration +var t={1:"១",2:"២",3:"៣",4:"៤",5:"៥",6:"៦",7:"៧",8:"៨",9:"៩",0:"០"},n={"១":"1","២":"2","៣":"3","៤":"4","៥":"5","៦":"6","៧":"7","៨":"8","៩":"9","០":"0"};e.defineLocale("km",{months:"មករា_កុម្ភៈ_មីនា_មេសា_ឧសភា_មិថុនា_កក្កដា_សីហា_កញ្ញា_តុលា_វិច្ឆិកា_ធ្នូ".split("_"),monthsShort:"មករា_កុម្ភៈ_មីនា_មេសា_ឧសភា_មិថុនា_កក្កដា_សីហា_កញ្ញា_តុលា_វិច្ឆិកា_ធ្នូ".split("_"),weekdays:"អាទិត្យ_ច័ន្ទ_អង្គារ_ពុធ_ព្រហស្បតិ៍_សុក្រ_សៅរ៍".split("_"),weekdaysShort:"អា_ច_អ_ព_ព្រ_សុ_ស".split("_"),weekdaysMin:"អា_ច_អ_ព_ព្រ_សុ_ស".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},meridiemParse:/ព្រឹក|ល្ងាច/,isPM:function(e){return"ល្ងាច"===e},meridiem:function(e,t,n){return e<12?"ព្រឹក":"ល្ងាច"},calendar:{sameDay:"[ថ្ងៃនេះ ម៉ោង] LT",nextDay:"[ស្អែក ម៉ោង] LT",nextWeek:"dddd [ម៉ោង] LT",lastDay:"[ម្សិលមិញ ម៉ោង] LT",lastWeek:"dddd [សប្តាហ៍មុន] [ម៉ោង] LT",sameElse:"L"},relativeTime:{future:"%sទៀត",past:"%sមុន",s:"ប៉ុន្មានវិនាទី",ss:"%d វិនាទី",m:"មួយនាទី",mm:"%d នាទី",h:"មួយម៉ោង",hh:"%d ម៉ោង",d:"មួយថ្ងៃ",dd:"%d ថ្ងៃ",M:"មួយខែ",MM:"%d ខែ",y:"មួយឆ្នាំ",yy:"%d ឆ្នាំ"},dayOfMonthOrdinalParse:/ទី\d{1,2}/,ordinal:"ទី%d",preparse:function(e){return e.replace(/[១២៣៤៥៦៧៨៩០]/g,(function(e){return n[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]}))},week:{dow:1,doy:4}})}(n(19))},function(e,t,n){!function(e){"use strict"; +//! moment.js locale configuration +var t={1:"೧",2:"೨",3:"೩",4:"೪",5:"೫",6:"೬",7:"೭",8:"೮",9:"೯",0:"೦"},n={"೧":"1","೨":"2","೩":"3","೪":"4","೫":"5","೬":"6","೭":"7","೮":"8","೯":"9","೦":"0"};e.defineLocale("kn",{months:"ಜನವರಿ_ಫೆಬ್ರವರಿ_ಮಾರ್ಚ್_ಏಪ್ರಿಲ್_ಮೇ_ಜೂನ್_ಜುಲೈ_ಆಗಸ್ಟ್_ಸೆಪ್ಟೆಂಬರ್_ಅಕ್ಟೋಬರ್_ನವೆಂಬರ್_ಡಿಸೆಂಬರ್".split("_"),monthsShort:"ಜನ_ಫೆಬ್ರ_ಮಾರ್ಚ್_ಏಪ್ರಿಲ್_ಮೇ_ಜೂನ್_ಜುಲೈ_ಆಗಸ್ಟ್_ಸೆಪ್ಟೆಂ_ಅಕ್ಟೋ_ನವೆಂ_ಡಿಸೆಂ".split("_"),monthsParseExact:!0,weekdays:"ಭಾನುವಾರ_ಸೋಮವಾರ_ಮಂಗಳವಾರ_ಬುಧವಾರ_ಗುರುವಾರ_ಶುಕ್ರವಾರ_���ನಿವಾರ".split("_"),weekdaysShort:"ಭಾನು_ಸೋಮ_ಮಂಗಳ_ಬುಧ_ಗುರು_ಶುಕ್ರ_ಶನಿ".split("_"),weekdaysMin:"ಭಾ_ಸೋ_ಮಂ_ಬು_ಗು_ಶು_ಶ".split("_"),longDateFormat:{LT:"A h:mm",LTS:"A h:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm",LLLL:"dddd, D MMMM YYYY, A h:mm"},calendar:{sameDay:"[ಇಂದು] LT",nextDay:"[ನಾಳೆ] LT",nextWeek:"dddd, LT",lastDay:"[ನಿನ್ನೆ] LT",lastWeek:"[ಕೊನೆಯ] dddd, LT",sameElse:"L"},relativeTime:{future:"%s ನಂತರ",past:"%s ಹಿಂದೆ",s:"ಕೆಲವು ಕ್ಷಣಗಳು",ss:"%d ಸೆಕೆಂಡುಗಳು",m:"ಒಂದು ನಿಮಿಷ",mm:"%d ನಿಮಿಷ",h:"ಒಂದು ಗಂಟೆ",hh:"%d ಗಂಟೆ",d:"ಒಂದು ದಿನ",dd:"%d ದಿನ",M:"ಒಂದು ತಿಂಗಳು",MM:"%d ತಿಂಗಳು",y:"ಒಂದು ವರ್ಷ",yy:"%d ವರ್ಷ"},preparse:function(e){return e.replace(/[೧೨೩೪೫೬೭೮೯೦]/g,(function(e){return n[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]}))},meridiemParse:/ರಾತ್ರಿ|ಬೆಳಿಗ್ಗೆ|ಮಧ್ಯಾಹ್ನ|ಸಂಜೆ/,meridiemHour:function(e,t){return 12===e&&(e=0),"ರಾತ್ರಿ"===t?e<4?e:e+12:"ಬೆಳಿಗ್ಗೆ"===t?e:"ಮಧ್ಯಾಹ್ನ"===t?e>=10?e:e+12:"ಸಂಜೆ"===t?e+12:void 0},meridiem:function(e,t,n){return e<4?"ರಾತ್ರಿ":e<10?"ಬೆಳಿಗ್ಗೆ":e<17?"ಮಧ್ಯಾಹ್ನ":e<20?"ಸಂಜೆ":"ರಾತ್ರಿ"},dayOfMonthOrdinalParse:/\d{1,2}(ನೇ)/,ordinal:function(e){return e+"ನೇ"},week:{dow:0,doy:6}})}(n(19))},function(e,t,n){!function(e){"use strict"; +//! moment.js locale configuration +e.defineLocale("ko",{months:"1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월".split("_"),monthsShort:"1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월".split("_"),weekdays:"일요일_월요일_화요일_수요일_목요일_금요일_토요일".split("_"),weekdaysShort:"일_월_화_수_목_금_토".split("_"),weekdaysMin:"일_월_화_수_목_금_토".split("_"),longDateFormat:{LT:"A h:mm",LTS:"A h:mm:ss",L:"YYYY.MM.DD.",LL:"YYYY년 MMMM D일",LLL:"YYYY년 MMMM D일 A h:mm",LLLL:"YYYY년 MMMM D일 dddd A h:mm",l:"YYYY.MM.DD.",ll:"YYYY년 MMMM D일",lll:"YYYY년 MMMM D일 A h:mm",llll:"YYYY년 MMMM D일 dddd A h:mm"},calendar:{sameDay:"오늘 LT",nextDay:"내일 LT",nextWeek:"dddd LT",lastDay:"어제 LT",lastWeek:"지난주 dddd LT",sameElse:"L"},relativeTime:{future:"%s 후",past:"%s 전",s:"몇 초",ss:"%d초",m:"1분",mm:"%d분",h:"한 시간",hh:"%d시간",d:"하루",dd:"%d일",M:"한 달",MM:"%d달",y:"일 년",yy:"%d년"},dayOfMonthOrdinalParse:/\d{1,2}(일|월|주)/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+"일";case"M":return e+"월";case"w":case"W":return e+"주";default:return e}},meridiemParse:/오전|오후/,isPM:function(e){return"오후"===e},meridiem:function(e,t,n){return e<12?"오전":"오후"}})}(n(19))},function(e,t,n){!function(e){"use strict"; +//! moment.js locale configuration +var t={1:"١",2:"٢",3:"٣",4:"٤",5:"٥",6:"٦",7:"٧",8:"٨",9:"٩",0:"٠"},n={"١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","٠":"0"},r=["کانونی دووەم","شوبات","ئازار","نیسان","ئایار","حوزەیران","تەمموز","ئاب","ئەیلوول","تشرینی یەكەم","تشرینی دووەم","كانونی یەکەم"];e.defineLocale("ku",{months:r,monthsShort:r,weekdays:"یه‌كشه‌ممه‌_دووشه‌ممه‌_سێشه‌ممه‌_چوارشه‌ممه‌_پێنجشه‌ممه‌_هه‌ینی_شه‌ممه‌".split("_"),weekdaysShort:"یه‌كشه‌م_دووشه‌م_سێشه‌م_چوارشه‌م_پێنجشه‌م_هه‌ینی_شه‌ممه‌".split("_"),weekdaysMin:"ی_د_س_چ_پ_ه_ش".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},meridiemParse:/ئێواره‌|به‌یانی/,isPM:function(e){return/ئێواره‌/.test(e)},meridiem:function(e,t,n){return e<12?"به‌یانی":"ئێواره‌"},calendar:{sameDay:"[ئه‌مرۆ كاتژمێر] LT",nextDay:"[به‌یانی كاتژمێر] LT",nextWeek:"dddd [كاتژمێر] LT",lastDay:"[دوێنێ كاتژمێر] LT",lastWeek:"dddd [كاتژمێر] LT",sameElse:"L"},relativeTime:{future:"له‌ %s",past:"%s",s:"چه‌ند چركه‌یه‌ك",ss:"چركه‌ %d",m:"یه‌ك خوله‌ك",mm:"%d خوله‌ك",h:"یه‌ك كاتژمێر",hh:"%d كاتژمێر",d:"یه‌ك ڕۆژ",dd:"%d ڕۆژ",M:"یه‌ك مانگ",MM:"%d مانگ",y:"یه‌ك ساڵ",yy:"%d ساڵ"},preparse:function(e){return e.replace(/[١٢٣٤٥٦٧٨٩٠]/g,(function(e){return n[e]})).replace(/،/g,",")},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]})).replace(/,/g,"،")},week:{dow:6,doy:12}})}(n(19))},function(e,t,n){!function(e){"use strict"; +//! moment.js locale configuration +var t={0:"-чү",1:"-чи",2:"-чи",3:"-чү",4:"-чү",5:"-чи",6:"-чы",7:"-чи",8:"-чи",9:"-чу",10:"-чу",20:"-чы",30:"-чу",40:"-чы",50:"-чү",60:"-чы",70:"-чи",80:"-чи",90:"-чу",100:"-чү"};e.defineLocale("ky",{months:"январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь".split("_"),monthsShort:"янв_фев_март_апр_май_июнь_июль_авг_сен_окт_ноя_дек".split("_"),weekdays:"Жекшемби_Дүйшөмбү_Шейшемби_Шаршемби_Бейшемби_Жума_Ишемби".split("_"),weekdaysShort:"Жек_Дүй_Шей_Шар_Бей_Жум_Ише".split("_"),weekdaysMin:"Жк_Дй_Шй_Шр_Бй_Жм_Иш".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Бүгүн саат] LT",nextDay:"[Эртең саат] LT",nextWeek:"dddd [саат] LT",lastDay:"[Кечээ саат] LT",lastWeek:"[Өткөн аптанын] dddd [күнү] [саат] LT",sameElse:"L"},relativeTime:{future:"%s ичинде",past:"%s мурун",s:"бирнече секунд",ss:"%d секунд",m:"бир мүнөт",mm:"%d мүнөт",h:"бир саат",hh:"%d саат",d:"бир күн",dd:"%d күн",M:"бир ай",MM:"%d ай",y:"бир жыл",yy:"%d жыл"},dayOfMonthOrdinalParse:/\d{1,2}-(чи|чы|чү|чу)/,ordinal:function(e){return e+(t[e]||t[e%10]||t[e>=100?100:null])},week:{dow:1,doy:7}})}(n(19))},function(e,t,n){!function(e){"use strict"; +//! moment.js locale configuration +function t(e,t,n,r){var i={m:["eng Minutt","enger Minutt"],h:["eng Stonn","enger Stonn"],d:["een Dag","engem Dag"],M:["ee Mount","engem Mount"],y:["ee Joer","engem Joer"]};return t?i[n][0]:i[n][1]}function n(e){if(e=parseInt(e,10),isNaN(e))return!1;if(e<0)return!0;if(e<10)return 4<=e&&e<=7;if(e<100){var t=e%10;return n(0===t?e/10:t)}if(e<1e4){for(;e>=10;)e/=10;return n(e)}return n(e/=1e3)}e.defineLocale("lb",{months:"Januar_Februar_Mäerz_Abrëll_Mee_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jan._Febr._Mrz._Abr._Mee_Jun._Jul._Aug._Sept._Okt._Nov._Dez.".split("_"),monthsParseExact:!0,weekdays:"Sonndeg_Méindeg_Dënschdeg_Mëttwoch_Donneschdeg_Freideg_Samschdeg".split("_"),weekdaysShort:"So._Mé._Dë._Më._Do._Fr._Sa.".split("_"),weekdaysMin:"So_Mé_Dë_Më_Do_Fr_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm [Auer]",LTS:"H:mm:ss [Auer]",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm [Auer]",LLLL:"dddd, D. MMMM YYYY H:mm [Auer]"},calendar:{sameDay:"[Haut um] LT",sameElse:"L",nextDay:"[Muer um] LT",nextWeek:"dddd [um] LT",lastDay:"[Gëschter um] LT",lastWeek:function(){switch(this.day()){case 2:case 4:return"[Leschten] dddd [um] LT";default:return"[Leschte] dddd [um] LT"}}},relativeTime:{future:function(e){return n(e.substr(0,e.indexOf(" ")))?"a "+e:"an "+e},past:function(e){return n(e.substr(0,e.indexOf(" ")))?"viru "+e:"virun "+e},s:"e puer Sekonnen",ss:"%d Sekonnen",m:t,mm:"%d Minutten",h:t,hh:"%d Stonnen",d:t,dd:"%d Deeg",M:t,MM:"%d Méint",y:t,yy:"%d Joer"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n(19))},function(e,t,n){!function(e){"use strict"; +//! moment.js locale configuration +e.defineLocale("lo",{months:"ມັງກອນ_ກຸມພາ_ມີນາ_ເມສາ_ພຶດສະພາ_ມິຖຸນາ_ກໍລະກົດ_ສິງຫາ_ກັນຍາ_ຕຸລາ_ພະຈິກ_ທັນວາ".split("_"),monthsShort:"ມັງກອນ_ກຸມພາ_ມີນາ_ເມສາ_ພຶດສະພາ_ມິຖຸນາ_ກໍລະກົດ_ສິງຫາ_ກັນຍາ_ຕຸລາ_ພະຈິກ_ທັນວາ".split("_"),weekdays:"ອາທິດ_ຈັນ_ອັງຄານ_ພຸດ_ພະຫັດ_ສຸກ_ເສົາ".split("_"),weekdaysShort:"ທິດ_ຈັນ_ອັງຄານ_ພຸດ_ພະຫັດ_ສຸກ_ເສົາ".split("_"),weekdaysMin:"ທ_ຈ_ອຄ_ພ_ພຫ_ສກ_ສ".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"ວັນdddd D MMMM YYYY HH:mm"},meridiemParse:/ຕອນເຊົ້າ|ຕອນແລງ/,isPM:function(e){return"ຕອນແລງ"===e},meridiem:function(e,t,n){return e<12?"ຕອນເຊົ້າ":"ຕອນແລງ"},calendar:{sameDay:"[ມື້ນີ້ເວລາ] LT",nextDay:"[ມື້ອື່ນເວລາ] LT",nextWeek:"[ວັນ]dddd[ໜ້າເວລາ] LT",lastDay:"[ມື້ວານນີ້ເວລາ] LT",lastWeek:"[ວັນ]dddd[ແລ້ວນີ້ເວລາ] LT",sameElse:"L"},relativeTime:{future:"ອີກ %s",past:"%sຜ່ານມາ",s:"ບໍ່ເທົ່າໃດວິນາທີ",ss:"%d ວິນາທີ",m:"1 ນາທີ",mm:"%d ນາທີ",h:"1 ຊົ່ວໂມງ",hh:"%d ຊົ່ວໂມງ",d:"1 ມື້",dd:"%d ມື້",M:"1 ເດືອນ",MM:"%d ເດືອນ",y:"1 ປ���",yy:"%d ປີ"},dayOfMonthOrdinalParse:/(ທີ່)\d{1,2}/,ordinal:function(e){return"ທີ່"+e}})}(n(19))},function(e,t,n){!function(e){"use strict"; +//! moment.js locale configuration +var t={ss:"sekundė_sekundžių_sekundes",m:"minutė_minutės_minutę",mm:"minutės_minučių_minutes",h:"valanda_valandos_valandą",hh:"valandos_valandų_valandas",d:"diena_dienos_dieną",dd:"dienos_dienų_dienas",M:"mėnuo_mėnesio_mėnesį",MM:"mėnesiai_mėnesių_mėnesius",y:"metai_metų_metus",yy:"metai_metų_metus"};function n(e,t,n,r){return t?i(n)[0]:r?i(n)[1]:i(n)[2]}function r(e){return e%10==0||e>10&&e<20}function i(e){return t[e].split("_")}function o(e,t,o,a){var s=e+" ";return 1===e?s+n(0,t,o[0],a):t?s+(r(e)?i(o)[1]:i(o)[0]):a?s+i(o)[1]:s+(r(e)?i(o)[1]:i(o)[2])}e.defineLocale("lt",{months:{format:"sausio_vasario_kovo_balandžio_gegužės_birželio_liepos_rugpjūčio_rugsėjo_spalio_lapkričio_gruodžio".split("_"),standalone:"sausis_vasaris_kovas_balandis_gegužė_birželis_liepa_rugpjūtis_rugsėjis_spalis_lapkritis_gruodis".split("_"),isFormat:/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?|MMMM?(\[[^\[\]]*\]|\s)+D[oD]?/},monthsShort:"sau_vas_kov_bal_geg_bir_lie_rgp_rgs_spa_lap_grd".split("_"),weekdays:{format:"sekmadienį_pirmadienį_antradienį_trečiadienį_ketvirtadienį_penktadienį_šeštadienį".split("_"),standalone:"sekmadienis_pirmadienis_antradienis_trečiadienis_ketvirtadienis_penktadienis_šeštadienis".split("_"),isFormat:/dddd HH:mm/},weekdaysShort:"Sek_Pir_Ant_Tre_Ket_Pen_Šeš".split("_"),weekdaysMin:"S_P_A_T_K_Pn_Š".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"YYYY [m.] MMMM D [d.]",LLL:"YYYY [m.] MMMM D [d.], HH:mm [val.]",LLLL:"YYYY [m.] MMMM D [d.], dddd, HH:mm [val.]",l:"YYYY-MM-DD",ll:"YYYY [m.] MMMM D [d.]",lll:"YYYY [m.] MMMM D [d.], HH:mm [val.]",llll:"YYYY [m.] MMMM D [d.], ddd, HH:mm [val.]"},calendar:{sameDay:"[Šiandien] LT",nextDay:"[Rytoj] LT",nextWeek:"dddd LT",lastDay:"[Vakar] LT",lastWeek:"[Praėjusį] dddd LT",sameElse:"L"},relativeTime:{future:"po %s",past:"prieš %s",s:function(e,t,n,r){return t?"kelios sekundės":r?"kelių sekundžių":"kelias sekundes"},ss:o,m:n,mm:o,h:n,hh:o,d:n,dd:o,M:n,MM:o,y:n,yy:o},dayOfMonthOrdinalParse:/\d{1,2}-oji/,ordinal:function(e){return e+"-oji"},week:{dow:1,doy:4}})}(n(19))},function(e,t,n){!function(e){"use strict"; +//! moment.js locale configuration +var t={ss:"sekundes_sekundēm_sekunde_sekundes".split("_"),m:"minūtes_minūtēm_minūte_minūtes".split("_"),mm:"minūtes_minūtēm_minūte_minūtes".split("_"),h:"stundas_stundām_stunda_stundas".split("_"),hh:"stundas_stundām_stunda_stundas".split("_"),d:"dienas_dienām_diena_dienas".split("_"),dd:"dienas_dienām_diena_dienas".split("_"),M:"mēneša_mēnešiem_mēnesis_mēneši".split("_"),MM:"mēneša_mēnešiem_mēnesis_mēneši".split("_"),y:"gada_gadiem_gads_gadi".split("_"),yy:"gada_gadiem_gads_gadi".split("_")};function n(e,t,n){return n?t%10==1&&t%100!=11?e[2]:e[3]:t%10==1&&t%100!=11?e[0]:e[1]}function r(e,r,i){return e+" "+n(t[i],e,r)}function i(e,r,i){return n(t[i],e,r)}e.defineLocale("lv",{months:"janvāris_februāris_marts_aprīlis_maijs_jūnijs_jūlijs_augusts_septembris_oktobris_novembris_decembris".split("_"),monthsShort:"jan_feb_mar_apr_mai_jūn_jūl_aug_sep_okt_nov_dec".split("_"),weekdays:"svētdiena_pirmdiena_otrdiena_trešdiena_ceturtdiena_piektdiena_sestdiena".split("_"),weekdaysShort:"Sv_P_O_T_C_Pk_S".split("_"),weekdaysMin:"Sv_P_O_T_C_Pk_S".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY.",LL:"YYYY. [gada] D. MMMM",LLL:"YYYY. [gada] D. MMMM, HH:mm",LLLL:"YYYY. [gada] D. MMMM, dddd, HH:mm"},calendar:{sameDay:"[Šodien pulksten] LT",nextDay:"[Rīt pulksten] LT",nextWeek:"dddd [pulksten] LT",lastDay:"[Vakar pulksten] LT",lastWeek:"[Pagājušā] dddd [pulksten] LT",sameElse:"L"},relativeTime:{future:"pēc %s",past:"pirms %s",s:function(e,t){return t?"dažas sekundes":"dažām sekundēm"},ss:r,m:i,mm:r,h:i,hh:r,d:i,dd:r,M:i,MM:r,y:i,yy:r},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n(19))},function(e,t,n){!function(e){"use strict"; +//! moment.js locale configuration +var t={words:{ss:["sekund","sekunda","sekundi"],m:["jedan minut","jednog minuta"],mm:["minut","minuta","minuta"],h:["jedan sat","jednog sata"],hh:["sat","sata","sati"],dd:["dan","dana","dana"],MM:["mjesec","mjeseca","mjeseci"],yy:["godina","godine","godina"]},correctGrammaticalCase:function(e,t){return 1===e?t[0]:e>=2&&e<=4?t[1]:t[2]},translate:function(e,n,r){var i=t.words[r];return 1===r.length?n?i[0]:i[1]:e+" "+t.correctGrammaticalCase(e,i)}};e.defineLocale("me",{months:"januar_februar_mart_april_maj_jun_jul_avgust_septembar_oktobar_novembar_decembar".split("_"),monthsShort:"jan._feb._mar._apr._maj_jun_jul_avg._sep._okt._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota".split("_"),weekdaysShort:"ned._pon._uto._sri._čet._pet._sub.".split("_"),weekdaysMin:"ne_po_ut_sr_če_pe_su".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[danas u] LT",nextDay:"[sjutra u] LT",nextWeek:function(){switch(this.day()){case 0:return"[u] [nedjelju] [u] LT";case 3:return"[u] [srijedu] [u] LT";case 6:return"[u] [subotu] [u] LT";case 1:case 2:case 4:case 5:return"[u] dddd [u] LT"}},lastDay:"[juče u] LT",lastWeek:function(){return["[prošle] [nedjelje] [u] LT","[prošlog] [ponedjeljka] [u] LT","[prošlog] [utorka] [u] LT","[prošle] [srijede] [u] LT","[prošlog] [četvrtka] [u] LT","[prošlog] [petka] [u] LT","[prošle] [subote] [u] LT"][this.day()]},sameElse:"L"},relativeTime:{future:"za %s",past:"prije %s",s:"nekoliko sekundi",ss:t.translate,m:t.translate,mm:t.translate,h:t.translate,hh:t.translate,d:"dan",dd:t.translate,M:"mjesec",MM:t.translate,y:"godinu",yy:t.translate},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}})}(n(19))},function(e,t,n){!function(e){"use strict"; +//! moment.js locale configuration +e.defineLocale("mi",{months:"Kohi-tāte_Hui-tanguru_Poutū-te-rangi_Paenga-whāwhā_Haratua_Pipiri_Hōngoingoi_Here-turi-kōkā_Mahuru_Whiringa-ā-nuku_Whiringa-ā-rangi_Hakihea".split("_"),monthsShort:"Kohi_Hui_Pou_Pae_Hara_Pipi_Hōngoi_Here_Mahu_Whi-nu_Whi-ra_Haki".split("_"),monthsRegex:/(?:['a-z\u0101\u014D\u016B]+\-?){1,3}/i,monthsStrictRegex:/(?:['a-z\u0101\u014D\u016B]+\-?){1,3}/i,monthsShortRegex:/(?:['a-z\u0101\u014D\u016B]+\-?){1,3}/i,monthsShortStrictRegex:/(?:['a-z\u0101\u014D\u016B]+\-?){1,2}/i,weekdays:"Rātapu_Mane_Tūrei_Wenerei_Tāite_Paraire_Hātarei".split("_"),weekdaysShort:"Ta_Ma_Tū_We_Tāi_Pa_Hā".split("_"),weekdaysMin:"Ta_Ma_Tū_We_Tāi_Pa_Hā".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [i] HH:mm",LLLL:"dddd, D MMMM YYYY [i] HH:mm"},calendar:{sameDay:"[i teie mahana, i] LT",nextDay:"[apopo i] LT",nextWeek:"dddd [i] LT",lastDay:"[inanahi i] LT",lastWeek:"dddd [whakamutunga i] LT",sameElse:"L"},relativeTime:{future:"i roto i %s",past:"%s i mua",s:"te hēkona ruarua",ss:"%d hēkona",m:"he meneti",mm:"%d meneti",h:"te haora",hh:"%d haora",d:"he ra",dd:"%d ra",M:"he marama",MM:"%d marama",y:"he tau",yy:"%d tau"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}})}(n(19))},function(e,t,n){!function(e){"use strict"; +//! moment.js locale configuration +e.defineLocale("mk",{months:"јануари_февруари_март_април_мај_јуни_јули_август_септември_октомври_ноември_декември".split("_"),monthsShort:"јан_фев_мар_апр_мај_јун_јул_авг_сеп_окт_ное_дек".split("_"),weekdays:"недела_понеделник_вторник_среда_четврток_петок_сабота".split("_"),weekdaysShort:"нед_пон_вто_сре_чет_пет_саб".split("_"),weekdaysMin:"нe_пo_вт_ср_че_пе_сa".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"D.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY H:mm",LLLL:"dddd, D MMMM YYYY H:mm"},calendar:{sameDay:"[Денес во] LT",nextDay:"[Утре во] LT",nextWeek:"[Во] dddd [во] LT",lastDay:"[Вчера во] LT",lastWeek:function(){switch(this.day()){case 0:case 3:case 6:return"[Изминатата] dddd [во] LT";case 1:case 2:case 4:case 5:return"[Изминатиот] dddd [во] LT"}},sameElse:"L"},relativeTime:{future:"за %s",past:"пред %s",s:"неколку секунди",ss:"%d секунди",m:"една минута",mm:"%d минути",h:"еден час",hh:"%d часа",d:"еден ден",dd:"%d дена",M:"еден месец",MM:"%d месеци",y:"една година",yy:"%d години"},dayOfMonthOrdinalParse:/\d{1,2}-(ев|ен|ти|ви|ри|ми)/,ordinal:function(e){var t=e%10,n=e%100;return 0===e?e+"-ев":0===n?e+"-ен":n>10&&n<20?e+"-ти":1===t?e+"-ви":2===t?e+"-ри":7===t||8===t?e+"-ми":e+"-ти"},week:{dow:1,doy:7}})}(n(19))},function(e,t,n){!function(e){"use strict"; +//! moment.js locale configuration +e.defineLocale("ml",{months:"ജനുവരി_ഫെബ്രുവരി_മാർച്ച്_ഏപ്രിൽ_മേയ്_ജൂൺ_ജൂലൈ_ഓഗസ്റ്റ്_സെപ്റ്റംബർ_ഒക്ടോബർ_നവംബർ_ഡിസംബർ".split("_"),monthsShort:"ജനു._ഫെബ്രു._മാർ._ഏപ്രി._മേയ്_ജൂൺ_ജൂലൈ._ഓഗ._സെപ്റ്റ._ഒക്ടോ._നവം._ഡിസം.".split("_"),monthsParseExact:!0,weekdays:"ഞായറാഴ്ച_തിങ്കളാഴ്ച_ചൊവ്വാഴ്ച_ബുധനാഴ്ച_വ്യാഴാഴ്ച_വെള്ളിയാഴ്ച_ശനിയാഴ്ച".split("_"),weekdaysShort:"ഞായർ_തിങ്കൾ_ചൊവ്വ_ബുധൻ_വ്യാഴം_വെള്ളി_ശനി".split("_"),weekdaysMin:"ഞാ_തി_ചൊ_ബു_വ്യാ_വെ_ശ".split("_"),longDateFormat:{LT:"A h:mm -നു",LTS:"A h:mm:ss -നു",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm -നു",LLLL:"dddd, D MMMM YYYY, A h:mm -നു"},calendar:{sameDay:"[ഇന്ന്] LT",nextDay:"[നാളെ] LT",nextWeek:"dddd, LT",lastDay:"[ഇന്നലെ] LT",lastWeek:"[കഴിഞ്ഞ] dddd, LT",sameElse:"L"},relativeTime:{future:"%s കഴിഞ്ഞ്",past:"%s മുൻപ്",s:"അൽപ നിമിഷങ്ങൾ",ss:"%d സെക്കൻഡ്",m:"ഒരു മിനിറ്റ്",mm:"%d മിനിറ്റ്",h:"ഒരു മണിക്കൂർ",hh:"%d മണിക്കൂർ",d:"ഒരു ദിവസം",dd:"%d ദിവസം",M:"ഒരു മാസം",MM:"%d മാസം",y:"ഒരു വർഷം",yy:"%d വർഷം"},meridiemParse:/രാത്രി|രാവിലെ|ഉച്ച കഴിഞ്ഞ്|വൈകുന്നേരം|രാത്രി/i,meridiemHour:function(e,t){return 12===e&&(e=0),"രാത്രി"===t&&e>=4||"ഉച്ച കഴിഞ്ഞ്"===t||"വൈകുന്നേരം"===t?e+12:e},meridiem:function(e,t,n){return e<4?"രാത്രി":e<12?"രാവിലെ":e<17?"ഉച്ച കഴിഞ്ഞ്":e<20?"വൈകുന്നേരം":"രാത്രി"}})}(n(19))},function(e,t,n){!function(e){"use strict"; +//! moment.js locale configuration +function t(e,t,n,r){switch(n){case"s":return t?"хэдхэн секунд":"хэдхэн секундын";case"ss":return e+(t?" секунд":" секундын");case"m":case"mm":return e+(t?" минут":" минутын");case"h":case"hh":return e+(t?" цаг":" цагийн");case"d":case"dd":return e+(t?" өдөр":" өдрийн");case"M":case"MM":return e+(t?" сар":" сарын");case"y":case"yy":return e+(t?" жил":" жилийн");default:return e}}e.defineLocale("mn",{months:"Нэгдүгээр сар_Хоёрдугаар сар_Гуравдугаар сар_Дөрөвдүгээр сар_Тавдугаар сар_Зургадугаар сар_Долдугаар сар_Наймдугаар сар_Есдүгээр сар_Аравдугаар сар_Арван нэгдүгээр сар_Арван хоёрдугаар сар".split("_"),monthsShort:"1 сар_2 сар_3 сар_4 сар_5 сар_6 сар_7 сар_8 сар_9 сар_10 сар_11 сар_12 сар".split("_"),monthsParseExact:!0,weekdays:"Ням_Даваа_Мягмар_Лхагва_Пүрэв_Баасан_Бямба".split("_"),weekdaysShort:"Ням_Дав_Мяг_Лха_Пүр_Баа_Бям".split("_"),weekdaysMin:"Ня_Да_Мя_Лх_Пү_Ба_Бя".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"YYYY оны MMMMын D",LLL:"YYYY оны MMMMын D HH:mm",LLLL:"dddd, YYYY оны MMMMын D HH:mm"},meridiemParse:/ҮӨ|ҮХ/i,isPM:function(e){return"ҮХ"===e},meridiem:function(e,t,n){return e<12?"ҮӨ":"ҮХ"},calendar:{sameDay:"[Өнөөдөр] LT",nextDay:"[Маргааш] LT",nextWeek:"[Ирэх] dddd LT",lastDay:"[Өчигдөр] LT",lastWeek:"[Өнгөрсөн] dddd LT",sameElse:"L"},relativeTime:{future:"%s дараа",past:"%s өмнө",s:t,ss:t,m:t,mm:t,h:t,hh:t,d:t,dd:t,M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2} өдөр/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+" өдөр";default:return e}}})}(n(19))},function(e,t,n){!function(e){"use strict"; +//! moment.js locale configuration +var t={1:"१",2:"२",3:"३",4:"४",5:"५",6:"६",7:"७",8:"८",9:"९",0:"०"},n={"१":"1","२":"2","३":"3","४":"4","५":"5","६":"6","७":"7","८":"8","९":"9","०":"0"};function r(e,t,n,r){var i="";if(t)switch(n){case"s":i="काही सेकंद";break;case"ss":i="%d सेकंद";break;case"m":i="एक मिनिट";break;case"mm":i="%d मिनिटे";break;case"h":i="एक तास";break;case"hh":i="%d तास";break;case"d":i="एक दिवस";break;case"dd":i="%d दिवस";break;case"M":i="एक महिना";break;case"MM":i="%d महिने";break;case"y":i="एक वर्ष";break;case"yy":i="%d वर्षे"}else switch(n){case"s":i="काही सेकंदां";break;case"ss":i="%d सेकंदां";break;case"m":i="एका मिनिटा";break;case"mm":i="%d मिनिटां";break;case"h":i="एका तासा";break;case"hh":i="%d तासां";break;case"d":i="एका दिवसा";break;case"dd":i="%d दिवसां";break;case"M":i="एका महिन्या";break;case"MM":i="%d महिन्यां";break;case"y":i="एका वर्षा";break;case"yy":i="%d वर्षां"}return i.replace(/%d/i,e)}e.defineLocale("mr",{months:"जानेवारी_फेब्रुवारी_मार्च_एप्रिल_मे_जून_जुलै_ऑगस्ट_सप्टेंबर_ऑक्टोबर_नोव्हेंबर_डिसेंबर".split("_"),monthsShort:"जाने._फेब्रु._मार्च._एप्रि._मे._जून._जुलै._ऑग._सप्टें._ऑक्टो._नोव्हें._डिसें.".split("_"),monthsParseExact:!0,weekdays:"रविवार_सोमवार_मंगळवार_बुधवार_गुरूवार_शुक्रवार_शनिवार".split("_"),weekdaysShort:"रवि_सोम_मंगळ_बुध_गुरू_शुक्र_शनि".split("_"),weekdaysMin:"र_सो_मं_बु_गु_शु_श".split("_"),longDateFormat:{LT:"A h:mm वाजता",LTS:"A h:mm:ss वाजता",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm वाजता",LLLL:"dddd, D MMMM YYYY, A h:mm वाजता"},calendar:{sameDay:"[आज] LT",nextDay:"[उद्या] LT",nextWeek:"dddd, LT",lastDay:"[काल] LT",lastWeek:"[मागील] dddd, LT",sameElse:"L"},relativeTime:{future:"%sमध्ये",past:"%sपूर्वी",s:r,ss:r,m:r,mm:r,h:r,hh:r,d:r,dd:r,M:r,MM:r,y:r,yy:r},preparse:function(e){return e.replace(/[१२३४५६७८९०]/g,(function(e){return n[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]}))},meridiemParse:/पहाटे|सकाळी|दुपारी|सायंकाळी|रात्री/,meridiemHour:function(e,t){return 12===e&&(e=0),"पहाटे"===t||"सकाळी"===t?e:"दुपारी"===t||"सायंकाळी"===t||"रात्री"===t?e>=12?e:e+12:void 0},meridiem:function(e,t,n){return e>=0&&e<6?"पहाटे":e<12?"सकाळी":e<17?"दुपारी":e<20?"सायंकाळी":"रात्री"},week:{dow:0,doy:6}})}(n(19))},function(e,t,n){!function(e){"use strict"; +//! moment.js locale configuration +e.defineLocale("ms",{months:"Januari_Februari_Mac_April_Mei_Jun_Julai_Ogos_September_Oktober_November_Disember".split("_"),monthsShort:"Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ogs_Sep_Okt_Nov_Dis".split("_"),weekdays:"Ahad_Isnin_Selasa_Rabu_Khamis_Jumaat_Sabtu".split("_"),weekdaysShort:"Ahd_Isn_Sel_Rab_Kha_Jum_Sab".split("_"),weekdaysMin:"Ah_Is_Sl_Rb_Km_Jm_Sb".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [pukul] HH.mm",LLLL:"dddd, D MMMM YYYY [pukul] HH.mm"},meridiemParse:/pagi|tengahari|petang|malam/,meridiemHour:function(e,t){return 12===e&&(e=0),"pagi"===t?e:"tengahari"===t?e>=11?e:e+12:"petang"===t||"malam"===t?e+12:void 0},meridiem:function(e,t,n){return e<11?"pagi":e<15?"tengahari":e<19?"petang":"malam"},calendar:{sameDay:"[Hari ini pukul] LT",nextDay:"[Esok pukul] LT",nextWeek:"dddd [pukul] LT",lastDay:"[Kelmarin pukul] LT",lastWeek:"dddd [lepas pukul] LT",sameElse:"L"},relativeTime:{future:"dalam %s",past:"%s yang lepas",s:"beberapa saat",ss:"%d saat",m:"seminit",mm:"%d minit",h:"sejam",hh:"%d jam",d:"sehari",dd:"%d hari",M:"sebulan",MM:"%d bulan",y:"setahun",yy:"%d tahun"},week:{dow:1,doy:7}})}(n(19))},function(e,t,n){!function(e){"use strict"; +//! moment.js locale configuration +e.defineLocale("ms-my",{months:"Januari_Februari_Mac_April_Mei_Jun_Julai_Ogos_September_Oktober_November_Disember".split("_"),monthsShort:"Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ogs_Sep_Okt_Nov_Dis".split("_"),weekdays:"Ahad_Isnin_Selasa_Rabu_Khamis_Jumaat_Sabtu".split("_"),weekdaysShort:"Ahd_Isn_Sel_Rab_Kha_Jum_Sab".split("_"),weekdaysMin:"Ah_Is_Sl_Rb_Km_Jm_Sb".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [pukul] HH.mm",LLLL:"dddd, D MMMM YYYY [pukul] HH.mm"},meridiemParse:/pagi|tengahari|petang|malam/,meridiemHour:function(e,t){return 12===e&&(e=0),"pagi"===t?e:"tengahari"===t?e>=11?e:e+12:"petang"===t||"malam"===t?e+12:void 0},meridiem:function(e,t,n){return e<11?"pagi":e<15?"tengahari":e<19?"petang":"malam"},calendar:{sameDay:"[Hari ini pukul] LT",nextDay:"[Esok pukul] LT",nextWeek:"dddd [pukul] LT",lastDay:"[Kelmarin pukul] LT",lastWeek:"dddd [lepas pukul] LT",sameElse:"L"},relativeTime:{future:"dalam %s",past:"%s yang lepas",s:"beberapa saat",ss:"%d saat",m:"seminit",mm:"%d minit",h:"sejam",hh:"%d jam",d:"sehari",dd:"%d hari",M:"sebulan",MM:"%d bulan",y:"setahun",yy:"%d tahun"},week:{dow:1,doy:7}})}(n(19))},function(e,t,n){!function(e){"use strict"; +//! moment.js locale configuration +e.defineLocale("mt",{months:"Jannar_Frar_Marzu_April_Mejju_Ġunju_Lulju_Awwissu_Settembru_Ottubru_Novembru_Diċembru".split("_"),monthsShort:"Jan_Fra_Mar_Apr_Mej_Ġun_Lul_Aww_Set_Ott_Nov_Diċ".split("_"),weekdays:"Il-Ħadd_It-Tnejn_It-Tlieta_L-Erbgħa_Il-Ħamis_Il-Ġimgħa_Is-Sibt".split("_"),weekdaysShort:"Ħad_Tne_Tli_Erb_Ħam_Ġim_Sib".split("_"),weekdaysMin:"Ħa_Tn_Tl_Er_Ħa_Ġi_Si".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Illum fil-]LT",nextDay:"[Għada fil-]LT",nextWeek:"dddd [fil-]LT",lastDay:"[Il-bieraħ fil-]LT",lastWeek:"dddd [li għadda] [fil-]LT",sameElse:"L"},relativeTime:{future:"f’ %s",past:"%s ilu",s:"ftit sekondi",ss:"%d sekondi",m:"minuta",mm:"%d minuti",h:"siegħa",hh:"%d siegħat",d:"ġurnata",dd:"%d ġranet",M:"xahar",MM:"%d xhur",y:"sena",yy:"%d sni"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}})}(n(19))},function(e,t,n){!function(e){"use strict"; +//! moment.js locale configuration +var t={1:"၁",2:"၂",3:"၃",4:"၄",5:"၅",6:"၆",7:"၇",8:"၈",9:"၉",0:"၀"},n={"၁":"1","၂":"2","၃":"3","၄":"4","၅":"5","၆":"6","၇":"7","၈":"8","၉":"9","၀":"0"};e.defineLocale("my",{months:"ဇန်နဝါရီ_ဖေဖော်ဝါရီ_မတ်_ဧပြီ_မေ_ဇွန်_ဇူလိုင်_သြဂုတ်_စက်တင်ဘာ_အောက်တိုဘာ_နိုဝင်ဘာ_ဒီဇင်ဘာ".split("_"),monthsShort:"ဇန်_ဖေ_မတ်_ပြီ_မေ_ဇွန်_လိုင်_သြ_စက်_အောက်_နို_ဒီ".split("_"),weekdays:"တနင်္ဂနွေ_တနင်္လာ_အင်္ဂါ_ဗုဒ္ဓဟူး_ကြာသပတေး_သောကြာ_စနေ".split("_"),weekdaysShort:"နွေ_လာ_ဂါ_ဟူး_ကြာ_သော_နေ".split("_"),weekdaysMin:"နွေ_လာ_ဂါ_ဟူး_ကြာ_သော_နေ".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[ယနေ.] LT [မှာ]",nextDay:"[မနက်ဖြန်] LT [မှာ]",nextWeek:"dddd LT [မှာ]",lastDay:"[မနေ.က] LT [မှာ]",lastWeek:"[ပြီးခဲ့သော] dddd LT [မှာ]",sameElse:"L"},relativeTime:{future:"လာမည့် %s မှာ",past:"လွန်ခဲ့သော %s က",s:"စက္ကန်.အနည်းငယ်",ss:"%d စက္ကန့်",m:"တစ်မိနစ်",mm:"%d မိနစ်",h:"တစ်နာရီ",hh:"%d နာရီ",d:"တစ်ရက်",dd:"%d ရက်",M:"တစ်လ",MM:"%d လ",y:"တစ်နှစ်",yy:"%d နှစ်"},preparse:function(e){return e.replace(/[၁၂၃၄၅၆၇၈၉၀]/g,(function(e){return n[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]}))},week:{dow:1,doy:4}})}(n(19))},function(e,t,n){!function(e){"use strict"; +//! moment.js locale configuration +e.defineLocale("nb",{months:"januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember".split("_"),monthsShort:"jan._feb._mars_apr._mai_juni_juli_aug._sep._okt._nov._des.".split("_"),monthsParseExact:!0,weekdays:"søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag".split("_"),weekdaysShort:"sø._ma._ti._on._to._fr._lø.".split("_"),weekdaysMin:"sø_ma_ti_on_to_fr_lø".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY [kl.] HH:mm",LLLL:"dddd D. MMMM YYYY [kl.] HH:mm"},calendar:{sameDay:"[i dag kl.] LT",nextDay:"[i morgen kl.] LT",nextWeek:"dddd [kl.] LT",lastDay:"[i går kl.] LT",lastWeek:"[forrige] dddd [kl.] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"%s siden",s:"noen sekunder",ss:"%d sekunder",m:"ett minutt",mm:"%d minutter",h:"en time",hh:"%d timer",d:"en dag",dd:"%d dager",w:"en uke",ww:"%d uker",M:"en måned",MM:"%d måneder",y:"ett år",yy:"%d år"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n(19))},function(e,t,n){!function(e){"use strict"; +//! moment.js locale configuration +var t={1:"१",2:"२",3:"३",4:"४",5:"५",6:"६",7:"७",8:"८",9:"९",0:"०"},n={"१":"1","२":"2","३":"3","४":"4","५":"5","६":"6","७":"7","८":"8","९":"9","०":"0"};e.defineLocale("ne",{months:"जनवरी_फेब्रुवरी_मार्च_अप्रिल_मई_जुन_जुलाई_अगष्ट_सेप्टेम्बर_अक्टोबर_नोभेम्बर_डिसेम्बर".split("_"),monthsShort:"जन._फेब्रु._मार्च_अप्रि._मई_जुन_जुलाई._अग._सेप्ट._अक्टो._नोभे._डिसे.".split("_"),monthsParseExact:!0,weekdays:"आइतबार_सोमबार_मङ्गलबार_बुधबार_बिहिबार_शुक्रबार_शनिबार".split("_"),weekdaysShort:"आइत._सोम._मङ्गल._बुध._बिहि._शुक्र._शनि.".split("_"),weekdaysMin:"आ._सो._मं._बु._बि._शु._श.".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"Aको h:mm बजे",LTS:"Aको h:mm:ss बजे",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, Aको h:mm बजे",LLLL:"dddd, D MMMM YYYY, Aको h:mm बजे"},preparse:function(e){return e.replace(/[१२३४५६७८९०]/g,(function(e){return n[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]}))},meridiemParse:/राति|बिहान|दिउँसो|साँझ/,meridiemHour:function(e,t){return 12===e&&(e=0),"राति"===t?e<4?e:e+12:"बिहान"===t?e:"दिउँसो"===t?e>=10?e:e+12:"साँझ"===t?e+12:void 0},meridiem:function(e,t,n){return e<3?"राति":e<12?"बिहान":e<16?"दिउँसो":e<20?"साँझ":"राति"},calendar:{sameDay:"[आज] LT",nextDay:"[भोलि] LT",nextWeek:"[आउँदो] dddd[,] LT",lastDay:"[हिजो] LT",lastWeek:"[गएको] dddd[,] LT",sameElse:"L"},relativeTime:{future:"%sमा",past:"%s अगाडि",s:"केही क्षण",ss:"%d सेकेण्ड",m:"एक मिनेट",mm:"%d मिनेट",h:"एक घण्टा",hh:"%d घण्टा",d:"एक दिन",dd:"%d दिन",M:"एक महिना",MM:"%d महिना",y:"एक बर्ष",yy:"%d बर्ष"},week:{dow:0,doy:6}})}(n(19))},function(e,t,n){!function(e){"use strict"; +//! moment.js locale configuration +var t="jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.".split("_"),n="jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec".split("_"),r=[/^jan/i,/^feb/i,/^maart|mrt.?$/i,/^apr/i,/^mei$/i,/^jun[i.]?$/i,/^jul[i.]?$/i,/^aug/i,/^sep/i,/^okt/i,/^nov/i,/^dec/i],i=/^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december|jan\.?|feb\.?|mrt\.?|apr\.?|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i;e.defineLocale("nl",{months:"januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december".split("_"),monthsShort:function(e,r){return e?/-MMM-/.test(r)?n[e.month()]:t[e.month()]:t},monthsRegex:i,monthsShortRegex:i,monthsStrictRegex:/^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december)/i,monthsShortStrictRegex:/^(jan\.?|feb\.?|mrt\.?|apr\.?|mei|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i,monthsParse:r,longMonthsParse:r,shortMonthsParse:r,weekdays:"zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag".split("_"),weekdaysShort:"zo._ma._di._wo._do._vr._za.".split("_"),weekdaysMin:"zo_ma_di_wo_do_vr_za".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[vandaag om] LT",nextDay:"[morgen om] LT",nextWeek:"dddd [om] LT",lastDay:"[gisteren om] LT",lastWeek:"[afgelopen] dddd [om] LT",sameElse:"L"},relativeTime:{future:"over %s",past:"%s geleden",s:"een paar seconden",ss:"%d seconden",m:"één minuut",mm:"%d minuten",h:"één uur",hh:"%d uur",d:"één dag",dd:"%d dagen",w:"één week",ww:"%d weken",M:"één maand",MM:"%d maanden",y:"één jaar",yy:"%d jaar"},dayOfMonthOrdinalParse:/\d{1,2}(ste|de)/,ordinal:function(e){return e+(1===e||8===e||e>=20?"ste":"de")},week:{dow:1,doy:4}})}(n(19))},function(e,t,n){!function(e){"use strict"; +//! moment.js locale configuration +var t="jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.".split("_"),n="jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec".split("_"),r=[/^jan/i,/^feb/i,/^maart|mrt.?$/i,/^apr/i,/^mei$/i,/^jun[i.]?$/i,/^jul[i.]?$/i,/^aug/i,/^sep/i,/^okt/i,/^nov/i,/^dec/i],i=/^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december|jan\.?|feb\.?|mrt\.?|apr\.?|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i;e.defineLocale("nl-be",{months:"januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december".split("_"),monthsShort:function(e,r){return e?/-MMM-/.test(r)?n[e.month()]:t[e.month()]:t},monthsRegex:i,monthsShortRegex:i,monthsStrictRegex:/^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december)/i,monthsShortStrictRegex:/^(jan\.?|feb\.?|mrt\.?|apr\.?|mei|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i,monthsParse:r,longMonthsParse:r,shortMonthsParse:r,weekdays:"zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag".split("_"),weekdaysShort:"zo._ma._di._wo._do._vr._za.".split("_"),weekdaysMin:"zo_ma_di_wo_do_vr_za".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[vandaag om] LT",nextDay:"[morgen om] LT",nextWeek:"dddd [om] LT",lastDay:"[gisteren om] LT",lastWeek:"[afgelopen] dddd [om] LT",sameElse:"L"},relativeTime:{future:"over %s",past:"%s geleden",s:"een paar seconden",ss:"%d seconden",m:"één minuut",mm:"%d minuten",h:"één uur",hh:"%d uur",d:"één dag",dd:"%d dagen",M:"één maand",MM:"%d maanden",y:"één jaar",yy:"%d jaar"},dayOfMonthOrdinalParse:/\d{1,2}(ste|de)/,ordinal:function(e){return e+(1===e||8===e||e>=20?"ste":"de")},week:{dow:1,doy:4}})}(n(19))},function(e,t,n){!function(e){"use strict"; +//! moment.js locale configuration +e.defineLocale("nn",{months:"januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember".split("_"),monthsShort:"jan._feb._mars_apr._mai_juni_juli_aug._sep._okt._nov._des.".split("_"),monthsParseExact:!0,weekdays:"sundag_måndag_tysdag_onsdag_torsdag_fredag_laurdag".split("_"),weekdaysShort:"su._må._ty._on._to._fr._lau.".split("_"),weekdaysMin:"su_må_ty_on_to_fr_la".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY [kl.] H:mm",LLLL:"dddd D. MMMM YYYY [kl.] HH:mm"},calendar:{sameDay:"[I dag klokka] LT",nextDay:"[I morgon klokka] LT",nextWeek:"dddd [klokka] LT",lastDay:"[I går klokka] LT",lastWeek:"[Føregåande] dddd [klokka] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"%s sidan",s:"nokre sekund",ss:"%d sekund",m:"eit minutt",mm:"%d minutt",h:"ein time",hh:"%d timar",d:"ein dag",dd:"%d dagar",w:"ei veke",ww:"%d veker",M:"ein månad",MM:"%d månader",y:"eit år",yy:"%d år"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n(19))},function(e,t,n){!function(e){"use strict"; +//! moment.js locale configuration +e.defineLocale("oc-lnc",{months:{standalone:"genièr_febrièr_març_abril_mai_junh_julhet_agost_setembre_octòbre_novembre_decembre".split("_"),format:"de genièr_de febrièr_de març_d'abril_de mai_de junh_de julhet_d'agost_de setembre_d'octòbre_de novembre_de decembre".split("_"),isFormat:/D[oD]?(\s)+MMMM/},monthsShort:"gen._febr._març_abr._mai_junh_julh._ago._set._oct._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"dimenge_diluns_dimars_dimècres_dijòus_divendres_dissabte".split("_"),weekdaysShort:"dg._dl._dm._dc._dj._dv._ds.".split("_"),weekdaysMin:"dg_dl_dm_dc_dj_dv_ds".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM [de] YYYY",ll:"D MMM YYYY",LLL:"D MMMM [de] YYYY [a] H:mm",lll:"D MMM YYYY, H:mm",LLLL:"dddd D MMMM [de] YYYY [a] H:mm",llll:"ddd D MMM YYYY, H:mm"},calendar:{sameDay:"[uèi a] LT",nextDay:"[deman a] LT",nextWeek:"dddd [a] LT",lastDay:"[ièr a] LT",lastWeek:"dddd [passat a] LT",sameElse:"L"},relativeTime:{future:"d'aquí %s",past:"fa %s",s:"unas segondas",ss:"%d segondas",m:"una minuta",mm:"%d minutas",h:"una ora",hh:"%d oras",d:"un jorn",dd:"%d jorns",M:"un mes",MM:"%d meses",y:"un an",yy:"%d ans"},dayOfMonthOrdinalParse:/\d{1,2}(r|n|t|è|a)/,ordinal:function(e,t){var n=1===e?"r":2===e?"n":3===e?"r":4===e?"t":"è";return"w"!==t&&"W"!==t||(n="a"),e+n},week:{dow:1,doy:4}})}(n(19))},function(e,t,n){!function(e){"use strict"; +//! moment.js locale configuration +var t={1:"੧",2:"੨",3:"੩",4:"੪",5:"੫",6:"੬",7:"੭",8:"੮",9:"੯",0:"੦"},n={"੧":"1","੨":"2","੩":"3","੪":"4","੫":"5","੬":"6","੭":"7","੮":"8","੯":"9","੦":"0"};e.defineLocale("pa-in",{months:"ਜਨਵਰੀ_ਫ਼ਰਵਰੀ_ਮਾਰਚ_ਅਪ੍ਰੈਲ_ਮਈ_ਜੂਨ_ਜੁਲਾਈ_ਅਗਸਤ_ਸਤੰਬਰ_ਅਕਤੂਬਰ_ਨਵੰਬਰ_ਦਸੰਬਰ".split("_"),monthsShort:"ਜਨਵਰੀ_ਫ਼ਰਵਰੀ_ਮਾਰਚ_ਅਪ੍ਰੈਲ_ਮਈ_ਜੂਨ_ਜੁਲਾਈ_ਅਗਸਤ_ਸਤੰਬਰ_ਅਕਤੂਬਰ_ਨਵੰਬਰ_ਦਸੰਬਰ".split("_"),weekdays:"ਐਤਵਾਰ_ਸੋਮਵਾਰ_ਮੰਗਲਵਾਰ_ਬੁਧਵਾਰ_ਵੀਰਵਾਰ_ਸ਼ੁੱਕਰਵਾਰ_ਸ਼ਨੀਚਰਵਾਰ".split("_"),weekdaysShort:"ਐਤ_ਸੋਮ_ਮੰਗਲ_ਬੁਧ_ਵੀਰ_ਸ਼ੁਕਰ_ਸ਼ਨੀ".split("_"),weekdaysMin:"ਐਤ_ਸੋਮ_ਮੰਗਲ_ਬੁਧ_ਵੀਰ_ਸ਼ੁਕਰ_ਸ਼ਨੀ".split("_"),longDateFormat:{LT:"A h:mm ਵਜੇ",LTS:"A h:mm:ss ਵਜੇ",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm ਵਜੇ",LLLL:"dddd, D MMMM YYYY, A h:mm ਵਜੇ"},calendar:{sameDay:"[ਅਜ] LT",nextDay:"[ਕਲ] LT",nextWeek:"[ਅਗਲਾ] dddd, LT",lastDay:"[ਕਲ] LT",lastWeek:"[ਪਿਛਲੇ] dddd, LT",sameElse:"L"},relativeTime:{future:"%s ਵਿੱਚ",past:"%s ਪਿਛਲੇ",s:"ਕੁਝ ਸਕਿੰਟ",ss:"%d ਸਕਿੰਟ",m:"ਇਕ ਮਿੰਟ",mm:"%d ਮਿੰਟ",h:"ਇੱਕ ਘੰਟਾ",hh:"%d ਘੰਟੇ",d:"ਇੱਕ ਦਿਨ",dd:"%d ਦਿਨ",M:"ਇੱਕ ਮਹੀਨਾ",MM:"%d ਮਹੀਨੇ",y:"ਇੱਕ ਸਾਲ",yy:"%d ਸਾਲ"},preparse:function(e){return e.replace(/[੧੨੩੪੫੬੭੮੯੦]/g,(function(e){return n[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]}))},meridiemParse:/ਰਾਤ|ਸਵੇਰ|ਦੁਪਹਿਰ|ਸ਼ਾਮ/,meridiemHour:function(e,t){return 12===e&&(e=0),"ਰਾਤ"===t?e<4?e:e+12:"ਸਵੇਰ"===t?e:"ਦੁਪਹਿਰ"===t?e>=10?e:e+12:"ਸ਼ਾਮ"===t?e+12:void 0},meridiem:function(e,t,n){return e<4?"ਰਾਤ":e<10?"ਸਵੇਰ":e<17?"ਦੁਪਹਿਰ":e<20?"ਸ਼ਾਮ":"ਰਾਤ"},week:{dow:0,doy:6}})}(n(19))},function(e,t,n){!function(e){"use strict"; +//! moment.js locale configuration +var t="styczeń_luty_marzec_kwiecień_maj_czerwiec_lipiec_sierpień_wrzesień_październik_listopad_grudzień".split("_"),n="stycznia_lutego_marca_kwietnia_maja_czerwca_lipca_sierpnia_września_października_listopada_grudnia".split("_"),r=[/^sty/i,/^lut/i,/^mar/i,/^kwi/i,/^maj/i,/^cze/i,/^lip/i,/^sie/i,/^wrz/i,/^paź/i,/^lis/i,/^gru/i];function i(e){return e%10<5&&e%10>1&&~~(e/10)%10!=1}function o(e,t,n){var r=e+" ";switch(n){case"ss":return r+(i(e)?"sekundy":"sekund");case"m":return t?"minuta":"minutę";case"mm":return r+(i(e)?"minuty":"minut");case"h":return t?"godzina":"godzinę";case"hh":return r+(i(e)?"godziny":"godzin");case"ww":return r+(i(e)?"tygodnie":"tygodni");case"MM":return r+(i(e)?"miesiące":"miesięcy");case"yy":return r+(i(e)?"lata":"lat")}}e.defineLocale("pl",{months:function(e,r){return e?/D MMMM/.test(r)?n[e.month()]:t[e.month()]:t},monthsShort:"sty_lut_mar_kwi_maj_cze_lip_sie_wrz_paź_lis_gru".split("_"),monthsParse:r,longMonthsParse:r,shortMonthsParse:r,weekdays:"niedziela_poniedziałek_wtorek_środa_czwartek_piątek_sobota".split("_"),weekdaysShort:"ndz_pon_wt_śr_czw_pt_sob".split("_"),weekdaysMin:"Nd_Pn_Wt_Śr_Cz_Pt_So".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Dziś o] LT",nextDay:"[Jutro o] LT",nextWeek:function(){switch(this.day()){case 0:return"[W niedzielę o] LT";case 2:return"[We wtorek o] LT";case 3:return"[W środę o] LT";case 6:return"[W sobotę o] LT";default:return"[W] dddd [o] LT"}},lastDay:"[Wczoraj o] LT",lastWeek:function(){switch(this.day()){case 0:return"[W zeszłą niedzielę o] LT";case 3:return"[W zeszłą środę o] LT";case 6:return"[W zeszłą sobotę o] LT";default:return"[W zeszły] dddd [o] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"%s temu",s:"kilka sekund",ss:o,m:o,mm:o,h:o,hh:o,d:"1 dzień",dd:"%d dni",w:"tydzień",ww:o,M:"miesiąc",MM:o,y:"rok",yy:o},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n(19))},function(e,t,n){!function(e){"use strict"; +//! moment.js locale configuration +e.defineLocale("pt",{months:"janeiro_fevereiro_março_abril_maio_junho_julho_agosto_setembro_outubro_novembro_dezembro".split("_"),monthsShort:"jan_fev_mar_abr_mai_jun_jul_ago_set_out_nov_dez".split("_"),weekdays:"Domingo_Segunda-feira_Terça-feira_Quarta-feira_Quinta-feira_Sexta-feira_Sábado".split("_"),weekdaysShort:"Dom_Seg_Ter_Qua_Qui_Sex_Sáb".split("_"),weekdaysMin:"Do_2ª_3ª_4ª_5ª_6ª_Sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY HH:mm",LLLL:"dddd, D [de] MMMM [de] YYYY HH:mm"},calendar:{sameDay:"[Hoje às] LT",nextDay:"[Amanhã às] LT",nextWeek:"dddd [às] LT",lastDay:"[Ontem às] LT",lastWeek:function(){return 0===this.day()||6===this.day()?"[Último] dddd [às] LT":"[Última] dddd [às] LT"},sameElse:"L"},relativeTime:{future:"em %s",past:"há %s",s:"segundos",ss:"%d segundos",m:"um minuto",mm:"%d minutos",h:"uma hora",hh:"%d horas",d:"um dia",dd:"%d dias",w:"uma semana",ww:"%d semanas",M:"um mês",MM:"%d meses",y:"um ano",yy:"%d anos"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}})}(n(19))},function(e,t,n){!function(e){"use strict"; +//! moment.js locale configuration +e.defineLocale("pt-br",{months:"janeiro_fevereiro_março_abril_maio_junho_julho_agosto_setembro_outubro_novembro_dezembro".split("_"),monthsShort:"jan_fev_mar_abr_mai_jun_jul_ago_set_out_nov_dez".split("_"),weekdays:"domingo_segunda-feira_terça-feira_quarta-feira_quinta-feira_sexta-feira_sábado".split("_"),weekdaysShort:"dom_seg_ter_qua_qui_sex_sáb".split("_"),weekdaysMin:"do_2ª_3ª_4ª_5ª_6ª_sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY [às] HH:mm",LLLL:"dddd, D [de] MMMM [de] YYYY [às] HH:mm"},calendar:{sameDay:"[Hoje às] LT",nextDay:"[Amanhã às] LT",nextWeek:"dddd [às] LT",lastDay:"[Ontem às] LT",lastWeek:function(){return 0===this.day()||6===this.day()?"[Último] dddd [às] LT":"[Última] dddd [às] LT"},sameElse:"L"},relativeTime:{future:"em %s",past:"há %s",s:"poucos segundos",ss:"%d segundos",m:"um minuto",mm:"%d minutos",h:"uma hora",hh:"%d horas",d:"um dia",dd:"%d dias",M:"um mês",MM:"%d meses",y:"um ano",yy:"%d anos"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",invalidDate:"Data inválida"})}(n(19))},function(e,t,n){!function(e){"use strict"; +//! moment.js locale configuration +function t(e,t,n){var r=" ";return(e%100>=20||e>=100&&e%100==0)&&(r=" de "),e+r+{ss:"secunde",mm:"minute",hh:"ore",dd:"zile",ww:"săptămâni",MM:"luni",yy:"ani"}[n]}e.defineLocale("ro",{months:"ianuarie_februarie_martie_aprilie_mai_iunie_iulie_august_septembrie_octombrie_noiembrie_decembrie".split("_"),monthsShort:"ian._feb._mart._apr._mai_iun._iul._aug._sept._oct._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"duminică_luni_marți_miercuri_joi_vineri_sâmbătă".split("_"),weekdaysShort:"Dum_Lun_Mar_Mie_Joi_Vin_Sâm".split("_"),weekdaysMin:"Du_Lu_Ma_Mi_Jo_Vi_Sâ".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY H:mm",LLLL:"dddd, D MMMM YYYY H:mm"},calendar:{sameDay:"[azi la] LT",nextDay:"[mâine la] LT",nextWeek:"dddd [la] LT",lastDay:"[ieri la] LT",lastWeek:"[fosta] dddd [la] LT",sameElse:"L"},relativeTime:{future:"peste %s",past:"%s în urmă",s:"câteva secunde",ss:t,m:"un minut",mm:t,h:"o oră",hh:t,d:"o zi",dd:t,w:"o săptămână",ww:t,M:"o lună",MM:t,y:"un an",yy:t},week:{dow:1,doy:7}})}(n(19))},function(e,t,n){!function(e){"use strict"; +//! moment.js locale configuration +function t(e,t,n){var r,i;return"m"===n?t?"минута":"минуту":e+" "+(r=+e,i={ss:t?"секунда_секунды_секунд":"секунду_секунды_секунд",mm:t?"минута_минуты_минут":"минуту_минуты_минут",hh:"час_часа_часов",dd:"день_дня_дней",ww:"неделя_недели_недель",MM:"месяц_месяца_месяцев",yy:"год_года_лет"}[n].split("_"),r%10==1&&r%100!=11?i[0]:r%10>=2&&r%10<=4&&(r%100<10||r%100>=20)?i[1]:i[2])}var n=[/^янв/i,/^фев/i,/^мар/i,/^апр/i,/^ма[йя]/i,/^июн/i,/^июл/i,/^авг/i,/^сен/i,/^окт/i,/^ноя/i,/^дек/i];e.defineLocale("ru",{months:{format:"января_февраля_марта_апреля_мая_июня_июля_августа_сентября_октября_ноября_декабря".split("_"),standalone:"январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь".split("_")},monthsShort:{format:"янв._февр._мар._апр._мая_июня_июля_авг._сент._окт._нояб._дек.".split("_"),standalone:"янв._февр._март_апр._май_июнь_июль_авг._сент._окт._нояб._дек.".split("_")},weekdays:{standalone:"воскресенье_понедельник_вторник_среда_четверг_пятница_суббота".split("_"),format:"воскресенье_понедельник_вторник_среду_четверг_пятницу_субботу".split("_"),isFormat:/\[ ?[Вв] ?(?:прошлую|следующую|эту)? ?] ?dddd/},weekdaysShort:"вс_пн_вт_ср_чт_пт_сб".split("_"),weekdaysMin:"вс_пн_вт_ср_чт_пт_сб".split("_"),monthsParse:n,longMonthsParse:n,shortMonthsParse:n,monthsRegex:/^(январ[ья]|янв\.?|феврал[ья]|февр?\.?|марта?|мар\.?|апрел[ья]|апр\.?|ма[йя]|июн[ья]|июн\.?|июл[ья]|июл\.?|августа?|авг\.?|сентябр[ья]|сент?\.?|октябр[ья]|окт\.?|ноябр[ья]|нояб?\.?|декабр[ья]|дек\.?)/i,monthsShortRegex:/^(январ[ья]|янв\.?|феврал[ья]|февр?\.?|марта?|мар\.?|апрел[ья]|апр\.?|ма[йя]|июн[ья]|июн\.?|июл[ья]|июл\.?|августа?|авг\.?|сентябр[ья]|сент?\.?|октябр[ья]|окт\.?|ноябр[ья]|нояб?\.?|декабр[ья]|дек\.?)/i,monthsStrictRegex:/^(январ[яь]|феврал[яь]|марта?|апрел[яь]|ма[яй]|июн[яь]|июл[яь]|августа?|сентябр[яь]|октябр[яь]|ноябр[яь]|декабр[яь])/i,monthsShortStrictRegex:/^(янв\.|февр?\.|мар[т.]|апр\.|ма[яй]|июн[ья.]|июл[ья.]|авг\.|сент?\.|окт\.|нояб?\.|дек\.)/i,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY г.",LLL:"D MMMM YYYY г., H:mm",LLLL:"dddd, D MMMM YYYY г., H:mm"},calendar:{sameDay:"[Сегодня, в] LT",nextDay:"[Завтра, в] LT",lastDay:"[Вчера, в] LT",nextWeek:function(e){if(e.week()===this.week())return 2===this.day()?"[Во] dddd, [в] LT":"[В] dddd, [в] LT";switch(this.day()){case 0:return"[В следующее] dddd, [в] LT";case 1:case 2:case 4:return"[В следующий] dddd, [в] LT";case 3:case 5:case 6:return"[В следующую] dddd, [в] LT"}},lastWeek:function(e){if(e.week()===this.week())return 2===this.day()?"[Во] dddd, [в] LT":"[В] dddd, [в] LT";switch(this.day()){case 0:return"[В прошлое] dddd, [в] LT";case 1:case 2:case 4:return"[В прошлый] dddd, [в] LT";case 3:case 5:case 6:return"[В прошлую] dddd, [в] LT"}},sameElse:"L"},relativeTime:{future:"через %s",past:"%s назад",s:"несколько секунд",ss:t,m:t,mm:t,h:"час",hh:t,d:"день",dd:t,w:"неделя",ww:t,M:"месяц",MM:t,y:"год",yy:t},meridiemParse:/ночи|утра|дня|вечера/i,isPM:function(e){return/^(дня|вечера)$/.test(e)},meridiem:function(e,t,n){return e<4?"ночи":e<12?"утра":e<17?"дня":"вечера"},dayOfMonthOrdinalParse:/\d{1,2}-(й|го|я)/,ordinal:function(e,t){switch(t){case"M":case"d":case"DDD":return e+"-й";case"D":return e+"-го";case"w":case"W":return e+"-я";default:return e}},week:{dow:1,doy:4}})}(n(19))},function(e,t,n){!function(e){"use strict"; +//! moment.js locale configuration +var t=["جنوري","فيبروري","مارچ","اپريل","مئي","جون","جولاءِ","آگسٽ","سيپٽمبر","آڪٽوبر","نومبر","ڊسمبر"],n=["آچر","سومر","اڱارو","اربع","خميس","جمع","ڇنڇر"];e.defineLocale("sd",{months:t,monthsShort:t,weekdays:n,weekdaysShort:n,weekdaysMin:n,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd، D MMMM YYYY HH:mm"},meridiemParse:/صبح|شام/,isPM:function(e){return"شام"===e},meridiem:function(e,t,n){return e<12?"صبح":"شام"},calendar:{sameDay:"[اڄ] LT",nextDay:"[سڀاڻي] LT",nextWeek:"dddd [اڳين هفتي تي] LT",lastDay:"[ڪالهه] LT",lastWeek:"[گزريل هفتي] dddd [تي] LT",sameElse:"L"},relativeTime:{future:"%s پوء",past:"%s اڳ",s:"چند سيڪنڊ",ss:"%d سيڪنڊ",m:"هڪ منٽ",mm:"%d منٽ",h:"هڪ ڪلاڪ",hh:"%d ڪلاڪ",d:"هڪ ڏينهن",dd:"%d ڏينهن",M:"هڪ مهينو",MM:"%d مهينا",y:"هڪ سال",yy:"%d سال"},preparse:function(e){return e.replace(/،/g,",")},postformat:function(e){return e.replace(/,/g,"،")},week:{dow:1,doy:4}})}(n(19))},function(e,t,n){!function(e){"use strict"; +//! moment.js locale configuration +e.defineLocale("se",{months:"ođđajagemánnu_guovvamánnu_njukčamánnu_cuoŋománnu_miessemánnu_geassemánnu_suoidnemánnu_borgemánnu_čakčamánnu_golggotmánnu_skábmamánnu_juovlamánnu".split("_"),monthsShort:"ođđj_guov_njuk_cuo_mies_geas_suoi_borg_čakč_golg_skáb_juov".split("_"),weekdays:"sotnabeaivi_vuossárga_maŋŋebárga_gaskavahkku_duorastat_bearjadat_lávvardat".split("_"),weekdaysShort:"sotn_vuos_maŋ_gask_duor_bear_láv".split("_"),weekdaysMin:"s_v_m_g_d_b_L".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"MMMM D. [b.] YYYY",LLL:"MMMM D. [b.] YYYY [ti.] HH:mm",LLLL:"dddd, MMMM D. [b.] YYYY [ti.] HH:mm"},calendar:{sameDay:"[otne ti] LT",nextDay:"[ihttin ti] LT",nextWeek:"dddd [ti] LT",lastDay:"[ikte ti] LT",lastWeek:"[ovddit] dddd [ti] LT",sameElse:"L"},relativeTime:{future:"%s geažes",past:"maŋit %s",s:"moadde sekunddat",ss:"%d sekunddat",m:"okta minuhta",mm:"%d minuhtat",h:"okta diimmu",hh:"%d diimmut",d:"okta beaivi",dd:"%d beaivvit",M:"okta mánnu",MM:"%d mánut",y:"okta jahki",yy:"%d jagit"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n(19))},function(e,t,n){!function(e){"use strict"; +//! moment.js locale configuration +e.defineLocale("si",{months:"ජනවාරි_පෙබරවාරි_මාර්තු_අප්‍රේල්_මැයි_ජූනි_ජූලි_අගෝස්තු_සැප්තැම්බර්_ඔක්තෝබර්_නොවැම්බර්_දෙසැම්බර්".split("_"),monthsShort:"ජන_පෙබ_මාර්_අප්_මැයි_ජූනි_ජූලි_අගෝ_සැප්_ඔක්_නොවැ_දෙසැ".split("_"),weekdays:"ඉරිදා_සඳුදා_අඟහරුවාදා_බදාදා_බ්‍රහස්පතින්දා_සිකුරාදා_සෙනසුරාදා".split("_"),weekdaysShort:"ඉරි_සඳු_අඟ_බදා_බ්‍රහ_සිකු_සෙන".split("_"),weekdaysMin:"ඉ_ස_අ_බ_බ්‍ර_සි_සෙ".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"a h:mm",LTS:"a h:mm:ss",L:"YYYY/MM/DD",LL:"YYYY MMMM D",LLL:"YYYY MMMM D, a h:mm",LLLL:"YYYY MMMM D [වැනි] dddd, a h:mm:ss"},calendar:{sameDay:"[අද] LT[ට]",nextDay:"[හෙට] LT[ට]",nextWeek:"dddd LT[ට]",lastDay:"[ඊයේ] LT[ට]",lastWeek:"[පසුගිය] dddd LT[ට]",sameElse:"L"},relativeTime:{future:"%sකින්",past:"%sකට පෙර",s:"තත්පර කිහිපය",ss:"තත්පර %d",m:"මිනිත්තුව",mm:"මිනිත්තු %d",h:"පැය",hh:"පැය %d",d:"දිනය",dd:"දින %d",M:"මාසය",MM:"මාස %d",y:"වසර",yy:"වසර %d"},dayOfMonthOrdinalParse:/\d{1,2} වැනි/,ordinal:function(e){return e+" වැනි"},meridiemParse:/පෙර වරු|පස් වරු|පෙ.ව|ප.ව./,isPM:function(e){return"ප.ව."===e||"පස් වරු"===e},meridiem:function(e,t,n){return e>11?n?"ප.ව.":"පස් වරු":n?"පෙ.ව.":"පෙර වරු"}})}(n(19))},function(e,t,n){!function(e){"use strict"; +//! moment.js locale configuration +var t="január_február_marec_apríl_máj_jún_júl_august_september_október_november_december".split("_"),n="jan_feb_mar_apr_máj_jún_júl_aug_sep_okt_nov_dec".split("_");function r(e){return e>1&&e<5}function i(e,t,n,i){var o=e+" ";switch(n){case"s":return t||i?"pár sekúnd":"pár sekundami";case"ss":return t||i?o+(r(e)?"sekundy":"sekúnd"):o+"sekundami";case"m":return t?"minúta":i?"minútu":"minútou";case"mm":return t||i?o+(r(e)?"minúty":"minút"):o+"minútami";case"h":return t?"hodina":i?"hodinu":"hodinou";case"hh":return t||i?o+(r(e)?"hodiny":"hodín"):o+"hodinami";case"d":return t||i?"deň":"dňom";case"dd":return t||i?o+(r(e)?"dni":"dní"):o+"dňami";case"M":return t||i?"mesiac":"mesiacom";case"MM":return t||i?o+(r(e)?"mesiace":"mesiacov"):o+"mesiacmi";case"y":return t||i?"rok":"rokom";case"yy":return t||i?o+(r(e)?"roky":"rokov"):o+"rokmi"}}e.defineLocale("sk",{months:t,monthsShort:n,weekdays:"nedeľa_pondelok_utorok_streda_štvrtok_piatok_sobota".split("_"),weekdaysShort:"ne_po_ut_st_št_pi_so".split("_"),weekdaysMin:"ne_po_ut_st_št_pi_so".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd D. MMMM YYYY H:mm"},calendar:{sameDay:"[dnes o] LT",nextDay:"[zajtra o] LT",nextWeek:function(){switch(this.day()){case 0:return"[v nedeľu o] LT";case 1:case 2:return"[v] dddd [o] LT";case 3:return"[v stredu o] LT";case 4:return"[vo štvrtok o] LT";case 5:return"[v piatok o] LT";case 6:return"[v sobotu o] LT"}},lastDay:"[včera o] LT",lastWeek:function(){switch(this.day()){case 0:return"[minulú nedeľu o] LT";case 1:case 2:return"[minulý] dddd [o] LT";case 3:return"[minulú stredu o] LT";case 4:case 5:return"[minulý] dddd [o] LT";case 6:return"[minulú sobotu o] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"pred %s",s:i,ss:i,m:i,mm:i,h:i,hh:i,d:i,dd:i,M:i,MM:i,y:i,yy:i},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n(19))},function(e,t,n){!function(e){"use strict"; +//! moment.js locale configuration +function t(e,t,n,r){var i=e+" ";switch(n){case"s":return t||r?"nekaj sekund":"nekaj sekundami";case"ss":return i+=1===e?t?"sekundo":"sekundi":2===e?t||r?"sekundi":"sekundah":e<5?t||r?"sekunde":"sekundah":"sekund";case"m":return t?"ena minuta":"eno minuto";case"mm":return i+=1===e?t?"minuta":"minuto":2===e?t||r?"minuti":"minutama":e<5?t||r?"minute":"minutami":t||r?"minut":"minutami";case"h":return t?"ena ura":"eno uro";case"hh":return i+=1===e?t?"ura":"uro":2===e?t||r?"uri":"urama":e<5?t||r?"ure":"urami":t||r?"ur":"urami";case"d":return t||r?"en dan":"enim dnem";case"dd":return i+=1===e?t||r?"dan":"dnem":2===e?t||r?"dni":"dnevoma":t||r?"dni":"dnevi";case"M":return t||r?"en mesec":"enim mesecem";case"MM":return i+=1===e?t||r?"mesec":"mesecem":2===e?t||r?"meseca":"mesecema":e<5?t||r?"mesece":"meseci":t||r?"mesecev":"meseci";case"y":return t||r?"eno leto":"enim letom";case"yy":return i+=1===e?t||r?"leto":"letom":2===e?t||r?"leti":"letoma":e<5?t||r?"leta":"leti":t||r?"let":"leti"}}e.defineLocale("sl",{months:"januar_februar_marec_april_maj_junij_julij_avgust_september_oktober_november_december".split("_"),monthsShort:"jan._feb._mar._apr._maj._jun._jul._avg._sep._okt._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"nedelja_ponedeljek_torek_sreda_četrtek_petek_sobota".split("_"),weekdaysShort:"ned._pon._tor._sre._čet._pet._sob.".split("_"),weekdaysMin:"ne_po_to_sr_če_pe_so".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD. MM. YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[danes ob] LT",nextDay:"[jutri ob] LT",nextWeek:function(){switch(this.day()){case 0:return"[v] [nedeljo] [ob] LT";case 3:return"[v] [sredo] [ob] LT";case 6:return"[v] [soboto] [ob] LT";case 1:case 2:case 4:case 5:return"[v] dddd [ob] LT"}},lastDay:"[včeraj ob] LT",lastWeek:function(){switch(this.day()){case 0:return"[prejšnjo] [nedeljo] [ob] LT";case 3:return"[prejšnjo] [sredo] [ob] LT";case 6:return"[prejšnjo] [soboto] [ob] LT";case 1:case 2:case 4:case 5:return"[prejšnji] dddd [ob] LT"}},sameElse:"L"},relativeTime:{future:"čez %s",past:"pred %s",s:t,ss:t,m:t,mm:t,h:t,hh:t,d:t,dd:t,M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}})}(n(19))},function(e,t,n){!function(e){"use strict"; +//! moment.js locale configuration +e.defineLocale("sq",{months:"Janar_Shkurt_Mars_Prill_Maj_Qershor_Korrik_Gusht_Shtator_Tetor_Nëntor_Dhjetor".split("_"),monthsShort:"Jan_Shk_Mar_Pri_Maj_Qer_Kor_Gus_Sht_Tet_Nën_Dhj".split("_"),weekdays:"E Diel_E Hënë_E Martë_E Mërkurë_E Enjte_E Premte_E Shtunë".split("_"),weekdaysShort:"Die_Hën_Mar_Mër_Enj_Pre_Sht".split("_"),weekdaysMin:"D_H_Ma_Më_E_P_Sh".split("_"),weekdaysParseExact:!0,meridiemParse:/PD|MD/,isPM:function(e){return"M"===e.charAt(0)},meridiem:function(e,t,n){return e<12?"PD":"MD"},longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Sot në] LT",nextDay:"[Nesër në] LT",nextWeek:"dddd [në] LT",lastDay:"[Dje në] LT",lastWeek:"dddd [e kaluar në] LT",sameElse:"L"},relativeTime:{future:"në %s",past:"%s më parë",s:"disa sekonda",ss:"%d sekonda",m:"një minutë",mm:"%d minuta",h:"një orë",hh:"%d orë",d:"një ditë",dd:"%d ditë",M:"një muaj",MM:"%d muaj",y:"një vit",yy:"%d vite"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n(19))},function(e,t,n){!function(e){"use strict"; +//! moment.js locale configuration +var t={words:{ss:["sekunda","sekunde","sekundi"],m:["jedan minut","jedne minute"],mm:["minut","minute","minuta"],h:["jedan sat","jednog sata"],hh:["sat","sata","sati"],dd:["dan","dana","dana"],MM:["mesec","meseca","meseci"],yy:["godina","godine","godina"]},correctGrammaticalCase:function(e,t){return 1===e?t[0]:e>=2&&e<=4?t[1]:t[2]},translate:function(e,n,r){var i=t.words[r];return 1===r.length?n?i[0]:i[1]:e+" "+t.correctGrammaticalCase(e,i)}};e.defineLocale("sr",{months:"januar_februar_mart_april_maj_jun_jul_avgust_septembar_oktobar_novembar_decembar".split("_"),monthsShort:"jan._feb._mar._apr._maj_jun_jul_avg._sep._okt._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"nedelja_ponedeljak_utorak_sreda_četvrtak_petak_subota".split("_"),weekdaysShort:"ned._pon._uto._sre._čet._pet._sub.".split("_"),weekdaysMin:"ne_po_ut_sr_če_pe_su".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"D. M. YYYY.",LL:"D. MMMM YYYY.",LLL:"D. MMMM YYYY. H:mm",LLLL:"dddd, D. MMMM YYYY. H:mm"},calendar:{sameDay:"[danas u] LT",nextDay:"[sutra u] LT",nextWeek:function(){switch(this.day()){case 0:return"[u] [nedelju] [u] LT";case 3:return"[u] [sredu] [u] LT";case 6:return"[u] [subotu] [u] LT";case 1:case 2:case 4:case 5:return"[u] dddd [u] LT"}},lastDay:"[juče u] LT",lastWeek:function(){return["[prošle] [nedelje] [u] LT","[prošlog] [ponedeljka] [u] LT","[prošlog] [utorka] [u] LT","[prošle] [srede] [u] LT","[prošlog] [četvrtka] [u] LT","[prošlog] [petka] [u] LT","[prošle] [subote] [u] LT"][this.day()]},sameElse:"L"},relativeTime:{future:"za %s",past:"pre %s",s:"nekoliko sekundi",ss:t.translate,m:t.translate,mm:t.translate,h:t.translate,hh:t.translate,d:"dan",dd:t.translate,M:"mesec",MM:t.translate,y:"godinu",yy:t.translate},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}})}(n(19))},function(e,t,n){!function(e){"use strict"; +//! moment.js locale configuration +var t={words:{ss:["секунда","секунде","секунди"],m:["један минут","једне минуте"],mm:["минут","минуте","минута"],h:["један сат","једног сата"],hh:["сат","сата","сати"],dd:["дан","дана","дана"],MM:["месец","месеца","месеци"],yy:["година","године","година"]},correctGrammaticalCase:function(e,t){return 1===e?t[0]:e>=2&&e<=4?t[1]:t[2]},translate:function(e,n,r){var i=t.words[r];return 1===r.length?n?i[0]:i[1]:e+" "+t.correctGrammaticalCase(e,i)}};e.defineLocale("sr-cyrl",{months:"јануар_фебруар_март_април_мај_јун_јул_август_септембар_октобар_новембар_децембар".split("_"),monthsShort:"јан._феб._мар._апр._мај_јун_јул_авг._сеп._окт._нов._дец.".split("_"),monthsParseExact:!0,weekdays:"недеља_понедељак_уторак_среда_четвртак_петак_субота".split("_"),weekdaysShort:"нед._пон._уто._сре._чет._пет._суб.".split("_"),weekdaysMin:"не_по_ут_ср_че_пе_су".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"D. M. YYYY.",LL:"D. MMMM YYYY.",LLL:"D. MMMM YYYY. H:mm",LLLL:"dddd, D. MMMM YYYY. H:mm"},calendar:{sameDay:"[данас у] LT",nextDay:"[сутра у] LT",nextWeek:function(){switch(this.day()){case 0:return"[у] [недељу] [у] LT";case 3:return"[у] [среду] [у] LT";case 6:return"[у] [суботу] [у] LT";case 1:case 2:case 4:case 5:return"[у] dddd [у] LT"}},lastDay:"[јуче у] LT",lastWeek:function(){return["[прошле] [недеље] [у] LT","[прошлог] [понедељка] [у] LT","[прошлог] [уторка] [у] LT","[прошле] [среде] [у] LT","[прошлог] [четвртка] [у] LT","[прошлог] [петка] [у] LT","[прошле] [суботе] [у] LT"][this.day()]},sameElse:"L"},relativeTime:{future:"за %s",past:"пре %s",s:"неколико секунди",ss:t.translate,m:t.translate,mm:t.translate,h:t.translate,hh:t.translate,d:"дан",dd:t.translate,M:"месец",MM:t.translate,y:"годину",yy:t.translate},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}})}(n(19))},function(e,t,n){!function(e){"use strict"; +//! moment.js locale configuration +e.defineLocale("ss",{months:"Bhimbidvwane_Indlovana_Indlov'lenkhulu_Mabasa_Inkhwekhweti_Inhlaba_Kholwane_Ingci_Inyoni_Imphala_Lweti_Ingongoni".split("_"),monthsShort:"Bhi_Ina_Inu_Mab_Ink_Inh_Kho_Igc_Iny_Imp_Lwe_Igo".split("_"),weekdays:"Lisontfo_Umsombuluko_Lesibili_Lesitsatfu_Lesine_Lesihlanu_Umgcibelo".split("_"),weekdaysShort:"Lis_Umb_Lsb_Les_Lsi_Lsh_Umg".split("_"),weekdaysMin:"Li_Us_Lb_Lt_Ls_Lh_Ug".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendar:{sameDay:"[Namuhla nga] LT",nextDay:"[Kusasa nga] LT",nextWeek:"dddd [nga] LT",lastDay:"[Itolo nga] LT",lastWeek:"dddd [leliphelile] [nga] LT",sameElse:"L"},relativeTime:{future:"nga %s",past:"wenteka nga %s",s:"emizuzwana lomcane",ss:"%d mzuzwana",m:"umzuzu",mm:"%d emizuzu",h:"lihora",hh:"%d emahora",d:"lilanga",dd:"%d emalanga",M:"inyanga",MM:"%d tinyanga",y:"umnyaka",yy:"%d iminyaka"},meridiemParse:/ekuseni|emini|entsambama|ebusuku/,meridiem:function(e,t,n){return e<11?"ekuseni":e<15?"emini":e<19?"entsambama":"ebusuku"},meridiemHour:function(e,t){return 12===e&&(e=0),"ekuseni"===t?e:"emini"===t?e>=11?e:e+12:"entsambama"===t||"ebusuku"===t?0===e?0:e+12:void 0},dayOfMonthOrdinalParse:/\d{1,2}/,ordinal:"%d",week:{dow:1,doy:4}})}(n(19))},function(e,t,n){!function(e){"use strict"; +//! moment.js locale configuration +e.defineLocale("sv",{months:"januari_februari_mars_april_maj_juni_juli_augusti_september_oktober_november_december".split("_"),monthsShort:"jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec".split("_"),weekdays:"söndag_måndag_tisdag_onsdag_torsdag_fredag_lördag".split("_"),weekdaysShort:"sön_mån_tis_ons_tor_fre_lör".split("_"),weekdaysMin:"sö_må_ti_on_to_fr_lö".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [kl.] HH:mm",LLLL:"dddd D MMMM YYYY [kl.] HH:mm",lll:"D MMM YYYY HH:mm",llll:"ddd D MMM YYYY HH:mm"},calendar:{sameDay:"[Idag] LT",nextDay:"[Imorgon] LT",lastDay:"[Igår] LT",nextWeek:"[På] dddd LT",lastWeek:"[I] dddd[s] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"för %s sedan",s:"några sekunder",ss:"%d sekunder",m:"en minut",mm:"%d minuter",h:"en timme",hh:"%d timmar",d:"en dag",dd:"%d dagar",M:"en månad",MM:"%d månader",y:"ett år",yy:"%d år"},dayOfMonthOrdinalParse:/\d{1,2}(\:e|\:a)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?":e":1===t||2===t?":a":":e")},week:{dow:1,doy:4}})}(n(19))},function(e,t,n){!function(e){"use strict"; +//! moment.js locale configuration +e.defineLocale("sw",{months:"Januari_Februari_Machi_Aprili_Mei_Juni_Julai_Agosti_Septemba_Oktoba_Novemba_Desemba".split("_"),monthsShort:"Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ago_Sep_Okt_Nov_Des".split("_"),weekdays:"Jumapili_Jumatatu_Jumanne_Jumatano_Alhamisi_Ijumaa_Jumamosi".split("_"),weekdaysShort:"Jpl_Jtat_Jnne_Jtan_Alh_Ijm_Jmos".split("_"),weekdaysMin:"J2_J3_J4_J5_Al_Ij_J1".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"hh:mm A",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[leo saa] LT",nextDay:"[kesho saa] LT",nextWeek:"[wiki ijayo] dddd [saat] LT",lastDay:"[jana] LT",lastWeek:"[wiki iliyopita] dddd [saat] LT",sameElse:"L"},relativeTime:{future:"%s baadaye",past:"tokea %s",s:"hivi punde",ss:"sekunde %d",m:"dakika moja",mm:"dakika %d",h:"saa limoja",hh:"masaa %d",d:"siku moja",dd:"siku %d",M:"mwezi mmoja",MM:"miezi %d",y:"mwaka mmoja",yy:"miaka %d"},week:{dow:1,doy:7}})}(n(19))},function(e,t,n){!function(e){"use strict"; +//! moment.js locale configuration +var t={1:"௧",2:"௨",3:"௩",4:"௪",5:"௫",6:"௬",7:"௭",8:"௮",9:"௯",0:"௦"},n={"௧":"1","௨":"2","௩":"3","௪":"4","௫":"5","௬":"6","௭":"7","௮":"8","௯":"9","௦":"0"};e.defineLocale("ta",{months:"ஜனவரி_பிப்ரவரி_மார்ச்_ஏப்ரல்_மே_ஜூன்_ஜூலை_ஆகஸ்ட்_செப்டெம்பர்_அக்டோபர்_நவம்பர்_டிசம்பர்".split("_"),monthsShort:"ஜனவரி_பிப்ரவரி_மார்ச்_ஏப்ரல்_மே_ஜூன்_ஜூலை_ஆகஸ்ட்_செப்டெம்பர்_அக்டோபர்_நவம்பர்_டிசம்பர்".split("_"),weekdays:"ஞாயிற்றுக்கிழமை_திங்கட்கிழமை_செவ்வாய்கிழமை_புதன்கிழமை_வியாழக்கிழமை_வெள்ளிக்கிழமை_சனிக்கிழமை".split("_"),weekdaysShort:"ஞாயிறு_திங்கள்_செவ்வாய்_புதன்_வியாழன்_வெள்ளி_சனி".split("_"),weekdaysMin:"ஞா_தி_செ_பு_வி_வெ_ச".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, HH:mm",LLLL:"dddd, D MMMM YYYY, HH:mm"},calendar:{sameDay:"[இன்று] LT",nextDay:"[நாளை] LT",nextWeek:"dddd, LT",lastDay:"[நேற்று] LT",lastWeek:"[கடந்த வாரம்] dddd, LT",sameElse:"L"},relativeTime:{future:"%s இல்",past:"%s முன்",s:"ஒரு சில விநாடிகள்",ss:"%d விநாடிகள்",m:"ஒரு நிமிடம்",mm:"%d நிமிடங்கள்",h:"ஒரு மணி நேரம்",hh:"%d மணி நேரம்",d:"ஒரு நாள்",dd:"%d நாட்கள்",M:"ஒரு மாதம்",MM:"%d மாதங்கள்",y:"ஒரு வருடம்",yy:"%d ஆண்டுகள்"},dayOfMonthOrdinalParse:/\d{1,2}வது/,ordinal:function(e){return e+"வது"},preparse:function(e){return e.replace(/[௧௨௩௪௫௬௭௮௯௦]/g,(function(e){return n[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]}))},meridiemParse:/யாமம்|வைகறை|காலை|நண்பகல்|எற்பாடு|மாலை/,meridiem:function(e,t,n){return e<2?" யாமம்":e<6?" வைகறை":e<10?" காலை":e<14?" நண்பகல்":e<18?" எற்பாடு":e<22?" மாலை":" யாமம்"},meridiemHour:function(e,t){return 12===e&&(e=0),"யாமம்"===t?e<2?e:e+12:"வைகறை"===t||"காலை"===t||"நண்பகல்"===t&&e>=10?e:e+12},week:{dow:0,doy:6}})}(n(19))},function(e,t,n){!function(e){"use strict"; +//! moment.js locale configuration +e.defineLocale("te",{months:"జనవరి_ఫిబ్రవరి_మార్చి_ఏప్రిల్_మే_జూన్_జులై_ఆగస్టు_సెప్టెంబర్_అక్టోబర్_నవంబర్_డిసెంబర్".split("_"),monthsShort:"జన._ఫిబ్ర._మార్చి_ఏప్రి._మే_జూన్_జులై_ఆగ._సెప్._అక్టో._నవ._డిసె.".split("_"),monthsParseExact:!0,weekdays:"ఆదివారం_సోమవారం_మంగళవార��_బుధవారం_గురువారం_శుక్రవారం_శనివారం".split("_"),weekdaysShort:"ఆది_సోమ_మంగళ_బుధ_గురు_శుక్ర_శని".split("_"),weekdaysMin:"ఆ_సో_మం_బు_గు_శు_శ".split("_"),longDateFormat:{LT:"A h:mm",LTS:"A h:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm",LLLL:"dddd, D MMMM YYYY, A h:mm"},calendar:{sameDay:"[నేడు] LT",nextDay:"[రేపు] LT",nextWeek:"dddd, LT",lastDay:"[నిన్న] LT",lastWeek:"[గత] dddd, LT",sameElse:"L"},relativeTime:{future:"%s లో",past:"%s క్రితం",s:"కొన్ని క్షణాలు",ss:"%d సెకన్లు",m:"ఒక నిమిషం",mm:"%d నిమిషాలు",h:"ఒక గంట",hh:"%d గంటలు",d:"ఒక రోజు",dd:"%d రోజులు",M:"ఒక నెల",MM:"%d నెలలు",y:"ఒక సంవత్సరం",yy:"%d సంవత్సరాలు"},dayOfMonthOrdinalParse:/\d{1,2}వ/,ordinal:"%dవ",meridiemParse:/రాత్రి|ఉదయం|మధ్యాహ్నం|సాయంత్రం/,meridiemHour:function(e,t){return 12===e&&(e=0),"రాత్రి"===t?e<4?e:e+12:"ఉదయం"===t?e:"మధ్యాహ్నం"===t?e>=10?e:e+12:"సాయంత్రం"===t?e+12:void 0},meridiem:function(e,t,n){return e<4?"రాత్రి":e<10?"ఉదయం":e<17?"మధ్యాహ్నం":e<20?"సాయంత్రం":"రాత్రి"},week:{dow:0,doy:6}})}(n(19))},function(e,t,n){!function(e){"use strict"; +//! moment.js locale configuration +e.defineLocale("tet",{months:"Janeiru_Fevereiru_Marsu_Abril_Maiu_Juñu_Jullu_Agustu_Setembru_Outubru_Novembru_Dezembru".split("_"),monthsShort:"Jan_Fev_Mar_Abr_Mai_Jun_Jul_Ago_Set_Out_Nov_Dez".split("_"),weekdays:"Domingu_Segunda_Tersa_Kuarta_Kinta_Sesta_Sabadu".split("_"),weekdaysShort:"Dom_Seg_Ters_Kua_Kint_Sest_Sab".split("_"),weekdaysMin:"Do_Seg_Te_Ku_Ki_Ses_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Ohin iha] LT",nextDay:"[Aban iha] LT",nextWeek:"dddd [iha] LT",lastDay:"[Horiseik iha] LT",lastWeek:"dddd [semana kotuk] [iha] LT",sameElse:"L"},relativeTime:{future:"iha %s",past:"%s liuba",s:"segundu balun",ss:"segundu %d",m:"minutu ida",mm:"minutu %d",h:"oras ida",hh:"oras %d",d:"loron ida",dd:"loron %d",M:"fulan ida",MM:"fulan %d",y:"tinan ida",yy:"tinan %d"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")},week:{dow:1,doy:4}})}(n(19))},function(e,t,n){!function(e){"use strict"; +//! moment.js locale configuration +var t={0:"-ум",1:"-ум",2:"-юм",3:"-юм",4:"-ум",5:"-ум",6:"-ум",7:"-ум",8:"-ум",9:"-ум",10:"-ум",12:"-ум",13:"-ум",20:"-ум",30:"-юм",40:"-ум",50:"-ум",60:"-ум",70:"-ум",80:"-ум",90:"-ум",100:"-ум"};e.defineLocale("tg",{months:{format:"январи_феврали_марти_апрели_майи_июни_июли_августи_сентябри_октябри_ноябри_декабри".split("_"),standalone:"январ_феврал_март_апрел_май_июн_июл_август_сентябр_октябр_ноябр_декабр".split("_")},monthsShort:"янв_фев_мар_апр_май_июн_июл_авг_сен_окт_ноя_дек".split("_"),weekdays:"якшанбе_душанбе_сешанбе_чоршанбе_панҷшанбе_ҷумъа_шанбе".split("_"),weekdaysShort:"яшб_дшб_сшб_чшб_пшб_ҷум_шнб".split("_"),weekdaysMin:"яш_дш_сш_чш_пш_ҷм_шб".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Имрӯз соати] LT",nextDay:"[Фардо соати] LT",lastDay:"[Дирӯз соати] LT",nextWeek:"dddd[и] [ҳафтаи оянда соати] LT",lastWeek:"dddd[и] [ҳафтаи гузашта соати] LT",sameElse:"L"},relativeTime:{future:"баъди %s",past:"%s пеш",s:"якчанд сония",m:"як дақиқа",mm:"%d дақиқа",h:"як соат",hh:"%d соат",d:"як рӯз",dd:"%d рӯз",M:"як моҳ",MM:"%d моҳ",y:"як сол",yy:"%d сол"},meridiemParse:/шаб|субҳ|рӯз|бегоҳ/,meridiemHour:function(e,t){return 12===e&&(e=0),"шаб"===t?e<4?e:e+12:"субҳ"===t?e:"рӯз"===t?e>=11?e:e+12:"бегоҳ"===t?e+12:void 0},meridiem:function(e,t,n){return e<4?"шаб":e<11?"субҳ":e<16?"рӯз":e<19?"бегоҳ":"шаб"},dayOfMonthOrdinalParse:/\d{1,2}-(ум|юм)/,ordinal:function(e){return e+(t[e]||t[e%10]||t[e>=100?100:null])},week:{dow:1,doy:7}})}(n(19))},function(e,t,n){!function(e){"use strict"; +//! moment.js locale configuration +e.defineLocale("th",{months:"มกราคม_กุมภาพันธ์_มีนาคม_เมษายน_พฤษภาคม_มิถุนายน_กรกฎาคม_สิงหาคม_���ันยายน_ตุลาคม_พฤศจิกายน_ธันวาคม".split("_"),monthsShort:"ม.ค._ก.พ._มี.ค._เม.ย._พ.ค._มิ.ย._ก.ค._ส.ค._ก.ย._ต.ค._พ.ย._ธ.ค.".split("_"),monthsParseExact:!0,weekdays:"อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัสบดี_ศุกร์_เสาร์".split("_"),weekdaysShort:"อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัส_ศุกร์_เสาร์".split("_"),weekdaysMin:"อา._จ._อ._พ._พฤ._ศ._ส.".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY เวลา H:mm",LLLL:"วันddddที่ D MMMM YYYY เวลา H:mm"},meridiemParse:/ก่อนเที่ยง|หลังเที่ยง/,isPM:function(e){return"หลังเที่ยง"===e},meridiem:function(e,t,n){return e<12?"ก่อนเที่ยง":"หลังเที่ยง"},calendar:{sameDay:"[วันนี้ เวลา] LT",nextDay:"[พรุ่งนี้ เวลา] LT",nextWeek:"dddd[หน้า เวลา] LT",lastDay:"[เมื่อวานนี้ เวลา] LT",lastWeek:"[วัน]dddd[ที่แล้ว เวลา] LT",sameElse:"L"},relativeTime:{future:"อีก %s",past:"%sที่แล้ว",s:"ไม่กี่วินาที",ss:"%d วินาที",m:"1 นาที",mm:"%d นาที",h:"1 ชั่วโมง",hh:"%d ชั่วโมง",d:"1 วัน",dd:"%d วัน",w:"1 สัปดาห์",ww:"%d สัปดาห์",M:"1 เดือน",MM:"%d เดือน",y:"1 ปี",yy:"%d ปี"}})}(n(19))},function(e,t,n){!function(e){"use strict"; +//! moment.js locale configuration +var t={1:"'inji",5:"'inji",8:"'inji",70:"'inji",80:"'inji",2:"'nji",7:"'nji",20:"'nji",50:"'nji",3:"'ünji",4:"'ünji",100:"'ünji",6:"'njy",9:"'unjy",10:"'unjy",30:"'unjy",60:"'ynjy",90:"'ynjy"};e.defineLocale("tk",{months:"Ýanwar_Fewral_Mart_Aprel_Maý_Iýun_Iýul_Awgust_Sentýabr_Oktýabr_Noýabr_Dekabr".split("_"),monthsShort:"Ýan_Few_Mar_Apr_Maý_Iýn_Iýl_Awg_Sen_Okt_Noý_Dek".split("_"),weekdays:"Ýekşenbe_Duşenbe_Sişenbe_Çarşenbe_Penşenbe_Anna_Şenbe".split("_"),weekdaysShort:"Ýek_Duş_Siş_Çar_Pen_Ann_Şen".split("_"),weekdaysMin:"Ýk_Dş_Sş_Çr_Pn_An_Şn".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[bugün sagat] LT",nextDay:"[ertir sagat] LT",nextWeek:"[indiki] dddd [sagat] LT",lastDay:"[düýn] LT",lastWeek:"[geçen] dddd [sagat] LT",sameElse:"L"},relativeTime:{future:"%s soň",past:"%s öň",s:"birnäçe sekunt",m:"bir minut",mm:"%d minut",h:"bir sagat",hh:"%d sagat",d:"bir gün",dd:"%d gün",M:"bir aý",MM:"%d aý",y:"bir ýyl",yy:"%d ýyl"},ordinal:function(e,n){switch(n){case"d":case"D":case"Do":case"DD":return e;default:if(0===e)return e+"'unjy";var r=e%10;return e+(t[r]||t[e%100-r]||t[e>=100?100:null])}},week:{dow:1,doy:7}})}(n(19))},function(e,t,n){!function(e){"use strict"; +//! moment.js locale configuration +e.defineLocale("tl-ph",{months:"Enero_Pebrero_Marso_Abril_Mayo_Hunyo_Hulyo_Agosto_Setyembre_Oktubre_Nobyembre_Disyembre".split("_"),monthsShort:"Ene_Peb_Mar_Abr_May_Hun_Hul_Ago_Set_Okt_Nob_Dis".split("_"),weekdays:"Linggo_Lunes_Martes_Miyerkules_Huwebes_Biyernes_Sabado".split("_"),weekdaysShort:"Lin_Lun_Mar_Miy_Huw_Biy_Sab".split("_"),weekdaysMin:"Li_Lu_Ma_Mi_Hu_Bi_Sab".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"MM/D/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY HH:mm",LLLL:"dddd, MMMM DD, YYYY HH:mm"},calendar:{sameDay:"LT [ngayong araw]",nextDay:"[Bukas ng] LT",nextWeek:"LT [sa susunod na] dddd",lastDay:"LT [kahapon]",lastWeek:"LT [noong nakaraang] dddd",sameElse:"L"},relativeTime:{future:"sa loob ng %s",past:"%s ang nakalipas",s:"ilang segundo",ss:"%d segundo",m:"isang minuto",mm:"%d minuto",h:"isang oras",hh:"%d oras",d:"isang araw",dd:"%d araw",M:"isang buwan",MM:"%d buwan",y:"isang taon",yy:"%d taon"},dayOfMonthOrdinalParse:/\d{1,2}/,ordinal:function(e){return e},week:{dow:1,doy:4}})}(n(19))},function(e,t,n){!function(e){"use strict"; +//! moment.js locale configuration +var t="pagh_wa’_cha’_wej_loS_vagh_jav_Soch_chorgh_Hut".split("_");function n(e,n,r,i){var o=function(e){var n=Math.floor(e%1e3/100),r=Math.floor(e%100/10),i=e%10,o="";return n>0&&(o+=t[n]+"vatlh"),r>0&&(o+=(""!==o?" ":"")+t[r]+"maH"),i>0&&(o+=(""!==o?" ":"")+t[i]),""===o?"pagh":o}(e);switch(r){case"ss":return o+" lup";case"mm":return o+" tup";case"hh":return o+" rep";case"dd":return o+" jaj";case"MM":return o+" jar";case"yy":return o+" DIS"}}e.defineLocale("tlh",{months:"tera’ jar wa’_tera’ jar cha’_tera’ jar wej_tera’ jar loS_tera’ jar vagh_tera’ jar jav_tera’ jar Soch_tera’ jar chorgh_tera’ jar Hut_tera’ jar wa’maH_tera’ jar wa’maH wa’_tera’ jar wa’maH cha’".split("_"),monthsShort:"jar wa’_jar cha’_jar wej_jar loS_jar vagh_jar jav_jar Soch_jar chorgh_jar Hut_jar wa’maH_jar wa’maH wa’_jar wa’maH cha’".split("_"),monthsParseExact:!0,weekdays:"lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj".split("_"),weekdaysShort:"lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj".split("_"),weekdaysMin:"lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[DaHjaj] LT",nextDay:"[wa’leS] LT",nextWeek:"LLL",lastDay:"[wa’Hu’] LT",lastWeek:"LLL",sameElse:"L"},relativeTime:{future:function(e){var t=e;return t=-1!==e.indexOf("jaj")?t.slice(0,-3)+"leS":-1!==e.indexOf("jar")?t.slice(0,-3)+"waQ":-1!==e.indexOf("DIS")?t.slice(0,-3)+"nem":t+" pIq"},past:function(e){var t=e;return t=-1!==e.indexOf("jaj")?t.slice(0,-3)+"Hu’":-1!==e.indexOf("jar")?t.slice(0,-3)+"wen":-1!==e.indexOf("DIS")?t.slice(0,-3)+"ben":t+" ret"},s:"puS lup",ss:n,m:"wa’ tup",mm:n,h:"wa’ rep",hh:n,d:"wa’ jaj",dd:n,M:"wa’ jar",MM:n,y:"wa’ DIS",yy:n},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n(19))},function(e,t,n){!function(e){"use strict"; +//! moment.js locale configuration +var t={1:"'inci",5:"'inci",8:"'inci",70:"'inci",80:"'inci",2:"'nci",7:"'nci",20:"'nci",50:"'nci",3:"'üncü",4:"'üncü",100:"'üncü",6:"'ncı",9:"'uncu",10:"'uncu",30:"'uncu",60:"'ıncı",90:"'ıncı"};e.defineLocale("tr",{months:"Ocak_Şubat_Mart_Nisan_Mayıs_Haziran_Temmuz_Ağustos_Eylül_Ekim_Kasım_Aralık".split("_"),monthsShort:"Oca_Şub_Mar_Nis_May_Haz_Tem_Ağu_Eyl_Eki_Kas_Ara".split("_"),weekdays:"Pazar_Pazartesi_Salı_Çarşamba_Perşembe_Cuma_Cumartesi".split("_"),weekdaysShort:"Paz_Pts_Sal_Çar_Per_Cum_Cts".split("_"),weekdaysMin:"Pz_Pt_Sa_Ça_Pe_Cu_Ct".split("_"),meridiem:function(e,t,n){return e<12?n?"öö":"ÖÖ":n?"ös":"ÖS"},meridiemParse:/öö|ÖÖ|ös|ÖS/,isPM:function(e){return"ös"===e||"ÖS"===e},longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[bugün saat] LT",nextDay:"[yarın saat] LT",nextWeek:"[gelecek] dddd [saat] LT",lastDay:"[dün] LT",lastWeek:"[geçen] dddd [saat] LT",sameElse:"L"},relativeTime:{future:"%s sonra",past:"%s önce",s:"birkaç saniye",ss:"%d saniye",m:"bir dakika",mm:"%d dakika",h:"bir saat",hh:"%d saat",d:"bir gün",dd:"%d gün",w:"bir hafta",ww:"%d hafta",M:"bir ay",MM:"%d ay",y:"bir yıl",yy:"%d yıl"},ordinal:function(e,n){switch(n){case"d":case"D":case"Do":case"DD":return e;default:if(0===e)return e+"'ıncı";var r=e%10;return e+(t[r]||t[e%100-r]||t[e>=100?100:null])}},week:{dow:1,doy:7}})}(n(19))},function(e,t,n){!function(e){"use strict"; +//! moment.js locale configuration +function t(e,t,n,r){var i={s:["viensas secunds","'iensas secunds"],ss:[e+" secunds",e+" secunds"],m:["'n míut","'iens míut"],mm:[e+" míuts",e+" míuts"],h:["'n þora","'iensa þora"],hh:[e+" þoras",e+" þoras"],d:["'n ziua","'iensa ziua"],dd:[e+" ziuas",e+" ziuas"],M:["'n mes","'iens mes"],MM:[e+" mesen",e+" mesen"],y:["'n ar","'iens ar"],yy:[e+" ars",e+" ars"]};return r||t?i[n][0]:i[n][1]}e.defineLocale("tzl",{months:"Januar_Fevraglh_Març_Avrïu_Mai_Gün_Julia_Guscht_Setemvar_Listopäts_Noemvar_Zecemvar".split("_"),monthsShort:"Jan_Fev_Mar_Avr_Mai_Gün_Jul_Gus_Set_Lis_Noe_Zec".split("_"),weekdays:"Súladi_Lúneçi_Maitzi_Márcuri_Xhúadi_Viénerçi_Sáturi".split("_"),weekdaysShort:"Súl_Lún_Mai_Már_Xhú_Vié_Sát".split("_"),weekdaysMin:"Sú_Lú_Ma_Má_Xh_Vi_Sá".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD.MM.YYYY",LL:"D. MMMM [dallas] YYYY",LLL:"D. MMMM [dallas] YYYY HH.mm",LLLL:"dddd, [li] D. MMMM [dallas] YYYY HH.mm"},meridiemParse:/d\'o|d\'a/i,isPM:function(e){return"d'o"===e.toLowerCase()},meridiem:function(e,t,n){return e>11?n?"d'o":"D'O":n?"d'a":"D'A"},calendar:{sameDay:"[oxhi à] LT",nextDay:"[demà à] LT",nextWeek:"dddd [à] LT",lastDay:"[ieiri à] LT",lastWeek:"[sür el] dddd [lasteu à] LT",sameElse:"L"},relativeTime:{future:"osprei %s",past:"ja%s",s:t,ss:t,m:t,mm:t,h:t,hh:t,d:t,dd:t,M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n(19))},function(e,t,n){!function(e){"use strict"; +//! moment.js locale configuration +e.defineLocale("tzm",{months:"ⵉⵏⵏⴰⵢⵔ_ⴱⵕⴰⵢⵕ_ⵎⴰⵕⵚ_ⵉⴱⵔⵉⵔ_ⵎⴰⵢⵢⵓ_ⵢⵓⵏⵢⵓ_ⵢⵓⵍⵢⵓⵣ_ⵖⵓⵛⵜ_ⵛⵓⵜⴰⵏⴱⵉⵔ_ⴽⵟⵓⴱⵕ_ⵏⵓⵡⴰⵏⴱⵉⵔ_ⴷⵓⵊⵏⴱⵉⵔ".split("_"),monthsShort:"ⵉⵏⵏⴰⵢⵔ_ⴱⵕⴰⵢⵕ_ⵎⴰⵕⵚ_ⵉⴱⵔⵉⵔ_ⵎⴰⵢⵢⵓ_ⵢⵓⵏⵢⵓ_ⵢⵓⵍⵢⵓⵣ_ⵖⵓⵛⵜ_ⵛⵓⵜⴰⵏⴱⵉⵔ_ⴽⵟⵓⴱⵕ_ⵏⵓⵡⴰⵏⴱⵉⵔ_ⴷⵓⵊⵏⴱⵉⵔ".split("_"),weekdays:"ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ".split("_"),weekdaysShort:"ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ".split("_"),weekdaysMin:"ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[ⴰⵙⴷⵅ ⴴ] LT",nextDay:"[ⴰⵙⴽⴰ ⴴ] LT",nextWeek:"dddd [ⴴ] LT",lastDay:"[ⴰⵚⴰⵏⵜ ⴴ] LT",lastWeek:"dddd [ⴴ] LT",sameElse:"L"},relativeTime:{future:"ⴷⴰⴷⵅ ⵙ ⵢⴰⵏ %s",past:"ⵢⴰⵏ %s",s:"ⵉⵎⵉⴽ",ss:"%d ⵉⵎⵉⴽ",m:"ⵎⵉⵏⵓⴺ",mm:"%d ⵎⵉⵏⵓⴺ",h:"ⵙⴰⵄⴰ",hh:"%d ⵜⴰⵙⵙⴰⵄⵉⵏ",d:"ⴰⵙⵙ",dd:"%d oⵙⵙⴰⵏ",M:"ⴰⵢoⵓⵔ",MM:"%d ⵉⵢⵢⵉⵔⵏ",y:"ⴰⵙⴳⴰⵙ",yy:"%d ⵉⵙⴳⴰⵙⵏ"},week:{dow:6,doy:12}})}(n(19))},function(e,t,n){!function(e){"use strict"; +//! moment.js locale configuration +e.defineLocale("tzm-latn",{months:"innayr_brˤayrˤ_marˤsˤ_ibrir_mayyw_ywnyw_ywlywz_ɣwšt_šwtanbir_ktˤwbrˤ_nwwanbir_dwjnbir".split("_"),monthsShort:"innayr_brˤayrˤ_marˤsˤ_ibrir_mayyw_ywnyw_ywlywz_ɣwšt_šwtanbir_ktˤwbrˤ_nwwanbir_dwjnbir".split("_"),weekdays:"asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas".split("_"),weekdaysShort:"asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas".split("_"),weekdaysMin:"asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[asdkh g] LT",nextDay:"[aska g] LT",nextWeek:"dddd [g] LT",lastDay:"[assant g] LT",lastWeek:"dddd [g] LT",sameElse:"L"},relativeTime:{future:"dadkh s yan %s",past:"yan %s",s:"imik",ss:"%d imik",m:"minuḍ",mm:"%d minuḍ",h:"saɛa",hh:"%d tassaɛin",d:"ass",dd:"%d ossan",M:"ayowr",MM:"%d iyyirn",y:"asgas",yy:"%d isgasn"},week:{dow:6,doy:12}})}(n(19))},function(e,t,n){!function(e){"use strict"; +//! moment.js locale configuration +e.defineLocale("ug-cn",{months:"يانۋار_فېۋرال_مارت_ئاپرېل_ماي_ئىيۇن_ئىيۇل_ئاۋغۇست_سېنتەبىر_ئۆكتەبىر_نويابىر_دېكابىر".split("_"),monthsShort:"يانۋار_فېۋرال_مارت_ئاپرېل_ماي_ئىيۇن_ئىيۇل_ئاۋغۇست_سېنتەبىر_ئۆكتەبىر_نويابىر_دېكابىر".split("_"),weekdays:"يەكشەنبە_دۈشەنبە_سەيشەنبە_چارشەنبە_پەيشەنبە_جۈمە_شەنبە".split("_"),weekdaysShort:"يە_دۈ_سە_چا_پە_جۈ_شە".split("_"),weekdaysMin:"يە_دۈ_سە_چا_پە_جۈ_شە".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"YYYY-يىلىM-ئاينىڭD-كۈنى",LLL:"YYYY-يىلىM-ئاينىڭD-كۈنى، HH:mm",LLLL:"dddd، YYYY-يىلىM-ئاينىڭD-كۈنى، HH:mm"},meridiemParse:/يېرىم كېچە|سەھەر|چۈشتىن بۇرۇن|چۈش|چۈشتىن كېيىن|كەچ/,meridiemHour:function(e,t){return 12===e&&(e=0),"يېرىم كېچە"===t||"سەھەر"===t||"چۈشتىن بۇرۇن"===t?e:"چۈشتىن كېيىن"===t||"كەچ"===t?e+12:e>=11?e:e+12},meridiem:function(e,t,n){var r=100*e+t;return r<600?"يېرىم كېچە":r<900?"سەھەر":r<1130?"چۈشتىن بۇرۇن":r<1230?"چۈش":r<1800?"چۈشتىن كېيىن":"كەچ"},calendar:{sameDay:"[بۈگۈن سائەت] LT",nextDay:"[ئەتە سائەت] LT",nextWeek:"[كېلەركى] dddd [سائەت] LT",lastDay:"[تۆنۈگۈن] LT",lastWeek:"[ئالدىنقى] dddd [سائەت] LT",sameElse:"L"},relativeTime:{future:"%s كېيىن",past:"%s بۇرۇن",s:"نەچچە سېكونت",ss:"%d سېكونت",m:"بىر مىنۇت",mm:"%d مىنۇت",h:"بىر سائەت",hh:"%d سائەت",d:"بىر كۈن",dd:"%d كۈن",M:"بىر ئاي",MM:"%d ئاي",y:"بىر يىل",yy:"%d يىل"},dayOfMonthOrdinalParse:/\d{1,2}(-كۈنى|-ئاي|-ھەپتە)/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+"-كۈنى";case"w":case"W":return e+"-ھەپتە";default:return e}},preparse:function(e){return e.replace(/،/g,",")},postformat:function(e){return e.replace(/,/g,"،")},week:{dow:1,doy:7}})}(n(19))},function(e,t,n){!function(e){"use strict"; +//! moment.js locale configuration +function t(e,t,n){var r,i;return"m"===n?t?"хвилина":"хвилину":"h"===n?t?"година":"годину":e+" "+(r=+e,i={ss:t?"секунда_секунди_секунд":"секунду_секунди_секунд",mm:t?"хвилина_хвилини_хвилин":"хвилину_хвилини_хвилин",hh:t?"година_години_годин":"годину_години_годин",dd:"день_дні_днів",MM:"місяць_місяці_місяців",yy:"рік_роки_років"}[n].split("_"),r%10==1&&r%100!=11?i[0]:r%10>=2&&r%10<=4&&(r%100<10||r%100>=20)?i[1]:i[2])}function n(e){return function(){return e+"о"+(11===this.hours()?"б":"")+"] LT"}}e.defineLocale("uk",{months:{format:"січня_лютого_березня_квітня_травня_червня_липня_серпня_вересня_жовтня_листопада_грудня".split("_"),standalone:"січень_лютий_березень_квітень_травень_червень_липень_серпень_вересень_жовтень_листопад_грудень".split("_")},monthsShort:"січ_лют_бер_квіт_трав_черв_лип_серп_вер_жовт_лист_груд".split("_"),weekdays:function(e,t){var n={nominative:"неділя_понеділок_вівторок_середа_четвер_п’ятниця_субота".split("_"),accusative:"неділю_понеділок_вівторок_середу_четвер_п’ятницю_суботу".split("_"),genitive:"неділі_понеділка_вівторка_середи_четверга_п’ятниці_суботи".split("_")};return!0===e?n.nominative.slice(1,7).concat(n.nominative.slice(0,1)):e?n[/(\[[ВвУу]\]) ?dddd/.test(t)?"accusative":/\[?(?:минулої|наступної)? ?\] ?dddd/.test(t)?"genitive":"nominative"][e.day()]:n.nominative},weekdaysShort:"нд_пн_вт_ср_чт_пт_сб".split("_"),weekdaysMin:"нд_пн_вт_ср_чт_пт_сб".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY р.",LLL:"D MMMM YYYY р., HH:mm",LLLL:"dddd, D MMMM YYYY р., HH:mm"},calendar:{sameDay:n("[Сьогодні "),nextDay:n("[Завтра "),lastDay:n("[Вчора "),nextWeek:n("[У] dddd ["),lastWeek:function(){switch(this.day()){case 0:case 3:case 5:case 6:return n("[Минулої] dddd [").call(this);case 1:case 2:case 4:return n("[Минулого] dddd [").call(this)}},sameElse:"L"},relativeTime:{future:"за %s",past:"%s тому",s:"декілька секунд",ss:t,m:t,mm:t,h:"годину",hh:t,d:"день",dd:t,M:"місяць",MM:t,y:"рік",yy:t},meridiemParse:/ночі|ранку|дня|вечора/,isPM:function(e){return/^(дня|вечора)$/.test(e)},meridiem:function(e,t,n){return e<4?"ночі":e<12?"ранку":e<17?"дня":"вечора"},dayOfMonthOrdinalParse:/\d{1,2}-(й|го)/,ordinal:function(e,t){switch(t){case"M":case"d":case"DDD":case"w":case"W":return e+"-й";case"D":return e+"-го";default:return e}},week:{dow:1,doy:7}})}(n(19))},function(e,t,n){!function(e){"use strict"; +//! moment.js locale configuration +var t=["جنوری","فروری","مارچ","اپریل","مئی","جون","جولائی","اگست","ستمبر","اکتوبر","نومبر","دسمبر"],n=["اتوار","پیر","منگل","بدھ","جمعرات","جمعہ","ہفتہ"];e.defineLocale("ur",{months:t,monthsShort:t,weekdays:n,weekdaysShort:n,weekdaysMin:n,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd، D MMMM YYYY HH:mm"},meridiemParse:/صبح|شام/,isPM:function(e){return"شام"===e},meridiem:function(e,t,n){return e<12?"صبح":"شام"},calendar:{sameDay:"[آج بوقت] LT",nextDay:"[کل بوقت] LT",nextWeek:"dddd [بوقت] LT",lastDay:"[گذشتہ روز بوقت] LT",lastWeek:"[گذشتہ] dddd [بوقت] LT",sameElse:"L"},relativeTime:{future:"%s بعد",past:"%s قبل",s:"چند سیکنڈ",ss:"%d سیکنڈ",m:"ایک منٹ",mm:"%d منٹ",h:"ایک گھنٹہ",hh:"%d گھنٹے",d:"ایک دن",dd:"%d دن",M:"ایک ماہ",MM:"%d ماہ",y:"ایک سال",yy:"%d سال"},preparse:function(e){return e.replace(/،/g,",")},postformat:function(e){return e.replace(/,/g,"،")},week:{dow:1,doy:4}})}(n(19))},function(e,t,n){!function(e){"use strict"; +//! moment.js locale configuration +e.defineLocale("uz",{months:"январ_феврал_март_апрел_май_июн_июл_август_сентябр_октябр_ноябр_декабр".split("_"),monthsShort:"янв_фев_мар_апр_май_июн_июл_авг_сен_окт_ноя_дек".split("_"),weekdays:"Якшанба_Душанба_Сешанба_Чоршанба_Пайшанба_Жума_Шанба".split("_"),weekdaysShort:"Якш_Душ_Сеш_Чор_Пай_Жум_Шан".split("_"),weekdaysMin:"Як_Ду_Се_Чо_Па_Жу_Ша".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"D MMMM YYYY, dddd HH:mm"},calendar:{sameDay:"[Бугун соат] LT [да]",nextDay:"[Эртага] LT [да]",nextWeek:"dddd [куни соат] LT [да]",lastDay:"[Кеча соат] LT [да]",lastWeek:"[Утган] dddd [куни соат] LT [да]",sameElse:"L"},relativeTime:{future:"Якин %s ичида",past:"Бир неча %s олдин",s:"фурсат",ss:"%d фурсат",m:"бир дакика",mm:"%d дакика",h:"бир соат",hh:"%d соат",d:"бир кун",dd:"%d кун",M:"бир ой",MM:"%d ой",y:"бир йил",yy:"%d йил"},week:{dow:1,doy:7}})}(n(19))},function(e,t,n){!function(e){"use strict"; +//! moment.js locale configuration +e.defineLocale("uz-latn",{months:"Yanvar_Fevral_Mart_Aprel_May_Iyun_Iyul_Avgust_Sentabr_Oktabr_Noyabr_Dekabr".split("_"),monthsShort:"Yan_Fev_Mar_Apr_May_Iyun_Iyul_Avg_Sen_Okt_Noy_Dek".split("_"),weekdays:"Yakshanba_Dushanba_Seshanba_Chorshanba_Payshanba_Juma_Shanba".split("_"),weekdaysShort:"Yak_Dush_Sesh_Chor_Pay_Jum_Shan".split("_"),weekdaysMin:"Ya_Du_Se_Cho_Pa_Ju_Sha".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"D MMMM YYYY, dddd HH:mm"},calendar:{sameDay:"[Bugun soat] LT [da]",nextDay:"[Ertaga] LT [da]",nextWeek:"dddd [kuni soat] LT [da]",lastDay:"[Kecha soat] LT [da]",lastWeek:"[O'tgan] dddd [kuni soat] LT [da]",sameElse:"L"},relativeTime:{future:"Yaqin %s ichida",past:"Bir necha %s oldin",s:"soniya",ss:"%d soniya",m:"bir daqiqa",mm:"%d daqiqa",h:"bir soat",hh:"%d soat",d:"bir kun",dd:"%d kun",M:"bir oy",MM:"%d oy",y:"bir yil",yy:"%d yil"},week:{dow:1,doy:7}})}(n(19))},function(e,t,n){!function(e){"use strict"; +//! moment.js locale configuration +e.defineLocale("vi",{months:"tháng 1_tháng 2_tháng 3_tháng 4_tháng 5_tháng 6_tháng 7_tháng 8_tháng 9_tháng 10_tháng 11_tháng 12".split("_"),monthsShort:"Thg 01_Thg 02_Thg 03_Thg 04_Thg 05_Thg 06_Thg 07_Thg 08_Thg 09_Thg 10_Thg 11_Thg 12".split("_"),monthsParseExact:!0,weekdays:"chủ nhật_thứ hai_thứ ba_thứ tư_thứ năm_thứ sáu_thứ bảy".split("_"),weekdaysShort:"CN_T2_T3_T4_T5_T6_T7".split("_"),weekdaysMin:"CN_T2_T3_T4_T5_T6_T7".split("_"),weekdaysParseExact:!0,meridiemParse:/sa|ch/i,isPM:function(e){return/^ch$/i.test(e)},meridiem:function(e,t,n){return e<12?n?"sa":"SA":n?"ch":"CH"},longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM [năm] YYYY",LLL:"D MMMM [năm] YYYY HH:mm",LLLL:"dddd, D MMMM [năm] YYYY HH:mm",l:"DD/M/YYYY",ll:"D MMM YYYY",lll:"D MMM YYYY HH:mm",llll:"ddd, D MMM YYYY HH:mm"},calendar:{sameDay:"[Hôm nay lúc] LT",nextDay:"[Ngày mai lúc] LT",nextWeek:"dddd [tuần tới lúc] LT",lastDay:"[Hôm qua lúc] LT",lastWeek:"dddd [tuần trước lúc] LT",sameElse:"L"},relativeTime:{future:"%s tới",past:"%s trước",s:"vài giây",ss:"%d giây",m:"một phút",mm:"%d phút",h:"một giờ",hh:"%d giờ",d:"một ngày",dd:"%d ngày",w:"một tuần",ww:"%d tuần",M:"một tháng",MM:"%d tháng",y:"một năm",yy:"%d năm"},dayOfMonthOrdinalParse:/\d{1,2}/,ordinal:function(e){return e},week:{dow:1,doy:4}})}(n(19))},function(e,t,n){!function(e){"use strict"; +//! moment.js locale configuration +e.defineLocale("x-pseudo",{months:"J~áñúá~rý_F~ébrú~árý_~Márc~h_Áp~ríl_~Máý_~Júñé~_Júl~ý_Áú~gúst~_Sép~témb~ér_Ó~ctób~ér_Ñ~óvém~bér_~Décé~mbér".split("_"),monthsShort:"J~áñ_~Féb_~Már_~Ápr_~Máý_~Júñ_~Júl_~Áúg_~Sép_~Óct_~Ñóv_~Déc".split("_"),monthsParseExact:!0,weekdays:"S~úñdá~ý_Mó~ñdáý~_Túé~sdáý~_Wéd~ñésd~áý_T~húrs~dáý_~Fríd~áý_S~átúr~dáý".split("_"),weekdaysShort:"S~úñ_~Móñ_~Túé_~Wéd_~Thú_~Frí_~Sát".split("_"),weekdaysMin:"S~ú_Mó~_Tú_~Wé_T~h_Fr~_Sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[T~ódá~ý át] LT",nextDay:"[T~ómó~rró~w át] LT",nextWeek:"dddd [át] LT",lastDay:"[Ý~ést~érdá~ý át] LT",lastWeek:"[L~ást] dddd [át] LT",sameElse:"L"},relativeTime:{future:"í~ñ %s",past:"%s á~gó",s:"á ~féw ~sécó~ñds",ss:"%d s~écóñ~ds",m:"á ~míñ~úté",mm:"%d m~íñú~tés",h:"á~ñ hó~úr",hh:"%d h~óúrs",d:"á ~dáý",dd:"%d d~áýs",M:"á ~móñ~th",MM:"%d m~óñt~hs",y:"á ~ýéár",yy:"%d ý~éárs"},dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")},week:{dow:1,doy:4}})}(n(19))},function(e,t,n){!function(e){"use strict"; +//! moment.js locale configuration +e.defineLocale("yo",{months:"Sẹ́rẹ́_Èrèlè_Ẹrẹ̀nà_Ìgbé_Èbibi_Òkùdu_Agẹmo_Ògún_Owewe_Ọ̀wàrà_Bélú_Ọ̀pẹ̀̀".split("_"),monthsShort:"Sẹ́r_Èrl_Ẹrn_Ìgb_Èbi_Òkù_Agẹ_Ògú_Owe_Ọ̀wà_Bél_Ọ̀pẹ̀̀".split("_"),weekdays:"Àìkú_Ajé_Ìsẹ́gun_Ọjọ́rú_Ọjọ́bọ_Ẹtì_Àbámẹ́ta".split("_"),weekdaysShort:"Àìk_Ajé_Ìsẹ́_Ọjr_Ọjb_Ẹtì_Àbá".split("_"),weekdaysMin:"Àì_Aj_Ìs_Ọr_Ọb_Ẹt_Àb".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendar:{sameDay:"[Ònì ni] LT",nextDay:"[Ọ̀la ni] LT",nextWeek:"dddd [Ọsẹ̀ tón'bọ] [ni] LT",lastDay:"[Àna ni] LT",lastWeek:"dddd [Ọsẹ̀ tólọ́] [ni] LT",sameElse:"L"},relativeTime:{future:"ní %s",past:"%s kọjá",s:"ìsẹjú aayá die",ss:"aayá %d",m:"ìsẹjú kan",mm:"ìsẹjú %d",h:"wákati kan",hh:"wákati %d",d:"ọjọ́ kan",dd:"ọjọ́ %d",M:"osù kan",MM:"osù %d",y:"ọdún kan",yy:"ọdún %d"},dayOfMonthOrdinalParse:/ọjọ́\s\d{1,2}/,ordinal:"ọjọ́ %d",week:{dow:1,doy:4}})}(n(19))},function(e,t,n){!function(e){"use strict"; +//! moment.js locale configuration +e.defineLocale("zh-cn",{months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"周日_周一_周二_周三_周四_周五_周六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日Ah点mm分",LLLL:"YYYY年M月D日ddddAh点mm分",l:"YYYY/M/D",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},meridiemParse:/凌晨|早上|上午|中午|下午|晚上/,meridiemHour:function(e,t){return 12===e&&(e=0),"凌晨"===t||"早上"===t||"上午"===t?e:"下午"===t||"晚上"===t?e+12:e>=11?e:e+12},meridiem:function(e,t,n){var r=100*e+t;return r<600?"凌晨":r<900?"早上":r<1130?"上午":r<1230?"中午":r<1800?"下午":"晚上"},calendar:{sameDay:"[今天]LT",nextDay:"[明天]LT",nextWeek:function(e){return e.week()!==this.week()?"[下]dddLT":"[本]dddLT"},lastDay:"[昨天]LT",lastWeek:function(e){return this.week()!==e.week()?"[上]dddLT":"[本]dddLT"},sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}(日|月|周)/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+"日";case"M":return e+"月";case"w":case"W":return e+"周";default:return e}},relativeTime:{future:"%s后",past:"%s前",s:"几秒",ss:"%d 秒",m:"1 分钟",mm:"%d 分钟",h:"1 小时",hh:"%d 小时",d:"1 天",dd:"%d 天",w:"1 周",ww:"%d 周",M:"1 个月",MM:"%d 个月",y:"1 年",yy:"%d 年"},week:{dow:1,doy:4}})}(n(19))},function(e,t,n){!function(e){"use strict"; +//! moment.js locale configuration +e.defineLocale("zh-hk",{months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"週日_週一_週二_週三_週四_週五_週六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日 HH:mm",LLLL:"YYYY年M月D日dddd HH:mm",l:"YYYY/M/D",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},meridiemParse:/凌晨|早上|上午|中午|下午|晚上/,meridiemHour:function(e,t){return 12===e&&(e=0),"凌晨"===t||"早上"===t||"上午"===t?e:"中午"===t?e>=11?e:e+12:"下午"===t||"晚上"===t?e+12:void 0},meridiem:function(e,t,n){var r=100*e+t;return r<600?"凌晨":r<900?"早上":r<1200?"上午":1200===r?"中午":r<1800?"下午":"晚上"},calendar:{sameDay:"[今天]LT",nextDay:"[明天]LT",nextWeek:"[下]ddddLT",lastDay:"[昨天]LT",lastWeek:"[上]ddddLT",sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}(日|月|週)/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+"日";case"M":return e+"月";case"w":case"W":return e+"週";default:return e}},relativeTime:{future:"%s後",past:"%s前",s:"幾秒",ss:"%d 秒",m:"1 分鐘",mm:"%d 分鐘",h:"1 小時",hh:"%d 小時",d:"1 天",dd:"%d 天",M:"1 個月",MM:"%d 個月",y:"1 年",yy:"%d 年"}})}(n(19))},function(e,t,n){!function(e){"use strict"; +//! moment.js locale configuration +e.defineLocale("zh-mo",{months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"週日_週一_週二_週三_週四_週五_週六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"YYYY年M月D日",LLL:"YYYY年M月D日 HH:mm",LLLL:"YYYY年M月D日dddd HH:mm",l:"D/M/YYYY",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},meridiemParse:/凌晨|早上|上午|中午|下午|晚上/,meridiemHour:function(e,t){return 12===e&&(e=0),"凌晨"===t||"早上"===t||"上午"===t?e:"中午"===t?e>=11?e:e+12:"下午"===t||"晚上"===t?e+12:void 0},meridiem:function(e,t,n){var r=100*e+t;return r<600?"凌晨":r<900?"早上":r<1130?"上午":r<1230?"中午":r<1800?"下午":"晚上"},calendar:{sameDay:"[今天] LT",nextDay:"[明天] LT",nextWeek:"[下]dddd LT",lastDay:"[昨天] LT",lastWeek:"[上]dddd LT",sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}(日|月|週)/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+"日";case"M":return e+"月";case"w":case"W":return e+"週";default:return e}},relativeTime:{future:"%s內",past:"%s前",s:"幾秒",ss:"%d 秒",m:"1 分鐘",mm:"%d 分鐘",h:"1 小時",hh:"%d 小時",d:"1 天",dd:"%d 天",M:"1 個月",MM:"%d 個月",y:"1 年",yy:"%d 年"}})}(n(19))},function(e,t,n){!function(e){"use strict"; +//! moment.js locale configuration +e.defineLocale("zh-tw",{months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"週日_週一_週二_週三_週四_週五_週六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日 HH:mm",LLLL:"YYYY年M月D日dddd HH:mm",l:"YYYY/M/D",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},meridiemParse:/凌晨|早上|上午|中午|下午|晚上/,meridiemHour:function(e,t){return 12===e&&(e=0),"凌晨"===t||"早上"===t||"上午"===t?e:"中午"===t?e>=11?e:e+12:"下午"===t||"晚上"===t?e+12:void 0},meridiem:function(e,t,n){var r=100*e+t;return r<600?"凌晨":r<900?"早上":r<1130?"上午":r<1230?"中午":r<1800?"下午":"晚上"},calendar:{sameDay:"[今天] LT",nextDay:"[明天] LT",nextWeek:"[下]dddd LT",lastDay:"[昨天] LT",lastWeek:"[上]dddd LT",sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}(日|月|週)/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+"日";case"M":return e+"月";case"w":case"W":return e+"週";default:return e}},relativeTime:{future:"%s後",past:"%s前",s:"幾秒",ss:"%d 秒",m:"1 分鐘",mm:"%d 分鐘",h:"1 小時",hh:"%d 小時",d:"1 天",dd:"%d 天",M:"1 個月",MM:"%d 個月",y:"1 年",yy:"%d 年"}})}(n(19))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.snapToMarks=function(e,t){var n=(0,r.bisectLeft)(t,e);if(0===n)return t[n];if(n===t.length)return t[n-1];var i=t[n]-e1&&void 0!==arguments[1]?arguments[1]:r.KEPLER_GL_VERSION;return'\n \n \n \n \n Kepler.gl embedded map\n\n \x3c!--Uber Font--\x3e\n \n\n \x3c!--MapBox css--\x3e\n \n\n \n \n \n \n \n \n \n \n\n \n \n \n \n \n \n\n \x3c!-- Load React/Redux --\x3e\n