From 89070f1a734664c4b599aecb692f57fbebe2e1ce Mon Sep 17 00:00:00 2001 From: phobal Date: Fri, 23 Aug 2024 16:25:21 +0800 Subject: [PATCH] Update dist directory with latest build --- dist/index.html | 2 +- dist/static/js/163.74a1800b.chunk.js | 1 + dist/static/js/638.02fc1f68.js | 1 + dist/static/js/940.2f1dda0a.js | 1 + dist/static/js/layerdata-processor-worker.1e5acea4.chunk.js | 1 + dist/static/js/main.79af735c.js | 1 + dist/static/js/spatial-analysis-worker.e14a256d.chunk.js | 1 + dist/static/js/static/js/163.74a1800b.chunk.js | 1 + dist/static/js/static/js/638.02fc1f68.js | 1 + dist/static/js/static/js/940.2f1dda0a.js | 1 + .../js/static/js/layerdata-processor-worker.1e5acea4.chunk.js | 1 + dist/static/js/static/js/main.79af735c.js | 1 + .../js/static/js/spatial-analysis-worker.e14a256d.chunk.js | 1 + 13 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 dist/static/js/163.74a1800b.chunk.js create mode 100644 dist/static/js/638.02fc1f68.js create mode 100644 dist/static/js/940.2f1dda0a.js create mode 100644 dist/static/js/layerdata-processor-worker.1e5acea4.chunk.js create mode 100644 dist/static/js/main.79af735c.js create mode 100644 dist/static/js/spatial-analysis-worker.e14a256d.chunk.js create mode 100644 dist/static/js/static/js/163.74a1800b.chunk.js create mode 100644 dist/static/js/static/js/638.02fc1f68.js create mode 100644 dist/static/js/static/js/940.2f1dda0a.js create mode 100644 dist/static/js/static/js/layerdata-processor-worker.1e5acea4.chunk.js create mode 100644 dist/static/js/static/js/main.79af735c.js create mode 100644 dist/static/js/static/js/spatial-analysis-worker.e14a256d.chunk.js diff --git a/dist/index.html b/dist/index.html index a4051e9..97fbb59 100644 --- a/dist/index.html +++ b/dist/index.html @@ -1 +1 @@ -Maptable
\ No newline at end of file +Maptable
\ No newline at end of file diff --git a/dist/static/js/163.74a1800b.chunk.js b/dist/static/js/163.74a1800b.chunk.js new file mode 100644 index 0000000..f65c92f --- /dev/null +++ b/dist/static/js/163.74a1800b.chunk.js @@ -0,0 +1 @@ +(self.webpackChunkmaptable_frontend=self.webpackChunkmaptable_frontend||[]).push([[163],{17646:(t,e,n)=>{var i=n(27622),r=n(12641),o=n(41017),s=n(78587);t.exports=function(t,e){return(s(t)?i:r)(t,o(e))}},74720:(t,e,n)=>{var i=n(39578);t.exports=function(t,e,n){var r=null==t?void 0:i(t,e);return void 0===r?n:r}},78587:t=>{var e=Array.isArray;t.exports=e},88716:(t,e,n)=>{var i=n(591),r=n(14055),o=n(73171),s=n(78587),a=n(99290),u=n(3970),l=n(24385),c=n(78031),p=Object.prototype.hasOwnProperty;t.exports=function(t){if(null==t)return!0;if(a(t)&&(s(t)||"string"==typeof t||"function"==typeof t.splice||u(t)||c(t)||o(t)))return!t.length;var e=r(t);if("[object Map]"==e||"[object Set]"==e)return!t.size;if(l(t))return!i(t).length;for(var n in t)if(p.call(t,n))return!1;return!0}},75091:t=>{t.exports=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}},49623:(t,e,n)=>{var i=n(96320),r=n(97882),o=n(79501),s=Function.prototype,a=Object.prototype,u=s.toString,l=a.hasOwnProperty,c=u.call(Object);t.exports=function(t){if(!o(t)||"[object Object]"!=i(t))return!1;var e=r(t);if(null===e)return!0;var n=l.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&u.call(n)==c}},15972:(t,e,n)=>{var i=n(66211),r=n(63552)((function(t,e,n){i(t,e,n)}));t.exports=r},15196:(t,e,n)=>{var i=n(63336)((function(t,e,n){t[n?0:1].push(e)}),(function(){return[[],[]]}));t.exports=i},38981:(t,e,n)=>{var i=n(18315);t.exports=function(t){return null==t?"":i(t)}},26625:function(t){t.exports=function(){"use strict";function t(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function e(t,e){for(var n=0;ne?1:t0))break;if(null===e.right)break;if(n(t,e.right.key)>0&&(u=e.right,e.right=u.left,u.left=e,null===(e=u).right))break;o.right=e,o=e,e=e.right}}return o.right=e.left,s.left=e.right,e.left=r.right,e.right=r.left,e}function s(t,e,n,r){var s=new i(t,e);if(null===n)return s.left=s.right=null,s;var a=r(t,(n=o(t,n,r)).key);return a<0?(s.left=n.left,s.right=n,n.left=null):a>=0&&(s.right=n.right,s.left=n,n.right=null),s}function a(t,e,n){var i=null,r=null;if(e){var s=n((e=o(t,e,n)).key,t);0===s?(i=e.left,r=e.right):s<0?(r=e.right,e.right=null,i=e):(i=e.left,e.left=null,r=e)}return{left:i,right:r}}function u(t,e,n){return null===e?t:(null===t||((e=o(t.key,e,n)).left=t),e)}function l(t,e,n,i,r){if(t){i(e+(n?"\u2514\u2500\u2500 ":"\u251c\u2500\u2500 ")+r(t)+"\n");var o=e+(n?" ":"\u2502 ");t.left&&l(t.left,o,!1,i,r),t.right&&l(t.right,o,!0,i,r)}}var c=function(){function t(t){void 0===t&&(t=r),this._root=null,this._size=0,this._comparator=t}return t.prototype.insert=function(t,e){return this._size++,this._root=s(t,e,this._root,this._comparator)},t.prototype.add=function(t,e){var n=new i(t,e);null===this._root&&(n.left=n.right=null,this._size++,this._root=n);var r=this._comparator,s=o(t,this._root,r),a=r(t,s.key);return 0===a?this._root=s:(a<0?(n.left=s.left,n.right=s,s.left=null):a>0&&(n.right=s.right,n.left=s,s.right=null),this._size++,this._root=n),this._root},t.prototype.remove=function(t){this._root=this._remove(t,this._root,this._comparator)},t.prototype._remove=function(t,e,n){var i;return null===e?null:0===n(t,(e=o(t,e,n)).key)?(null===e.left?i=e.right:(i=o(t,e.left,n)).right=e.right,this._size--,i):e},t.prototype.pop=function(){var t=this._root;if(t){for(;t.left;)t=t.left;return this._root=o(t.key,this._root,this._comparator),this._root=this._remove(t.key,this._root,this._comparator),{key:t.key,data:t.data}}return null},t.prototype.findStatic=function(t){for(var e=this._root,n=this._comparator;e;){var i=n(t,e.key);if(0===i)return e;e=i<0?e.left:e.right}return null},t.prototype.find=function(t){return this._root&&(this._root=o(t,this._root,this._comparator),0!==this._comparator(t,this._root.key))?null:this._root},t.prototype.contains=function(t){for(var e=this._root,n=this._comparator;e;){var i=n(t,e.key);if(0===i)return!0;e=i<0?e.left:e.right}return!1},t.prototype.forEach=function(t,e){for(var n=this._root,i=[],r=!1;!r;)null!==n?(i.push(n),n=n.left):0!==i.length?(n=i.pop(),t.call(e,n),n=n.right):r=!0;return this},t.prototype.range=function(t,e,n,i){for(var r=[],o=this._comparator,s=this._root;0!==r.length||s;)if(s)r.push(s),s=s.left;else{if(o((s=r.pop()).key,e)>0)break;if(o(s.key,t)>=0&&n.call(i,s))return this;s=s.right}return this},t.prototype.keys=function(){var t=[];return this.forEach((function(e){var n=e.key;return t.push(n)})),t},t.prototype.values=function(){var t=[];return this.forEach((function(e){var n=e.data;return t.push(n)})),t},t.prototype.min=function(){return this._root?this.minNode(this._root).key:null},t.prototype.max=function(){return this._root?this.maxNode(this._root).key:null},t.prototype.minNode=function(t){if(void 0===t&&(t=this._root),t)for(;t.left;)t=t.left;return t},t.prototype.maxNode=function(t){if(void 0===t&&(t=this._root),t)for(;t.right;)t=t.right;return t},t.prototype.at=function(t){for(var e=this._root,n=!1,i=0,r=[];!n;)if(e)r.push(e),e=e.left;else if(r.length>0){if(e=r.pop(),i===t)return e;i++,e=e.right}else n=!0;return null},t.prototype.next=function(t){var e=this._root,n=null;if(t.right){for(n=t.right;n.left;)n=n.left;return n}for(var i=this._comparator;e;){var r=i(t.key,e.key);if(0===r)break;r<0?(n=e,e=e.left):e=e.right}return n},t.prototype.prev=function(t){var e=this._root,n=null;if(null!==t.left){for(n=t.left;n.right;)n=n.right;return n}for(var i=this._comparator;e;){var r=i(t.key,e.key);if(0===r)break;r<0?e=e.left:(n=e,e=e.right)}return n},t.prototype.clear=function(){return this._root=null,this._size=0,this},t.prototype.toList=function(){return f(this._root)},t.prototype.load=function(t,e,n){void 0===e&&(e=[]),void 0===n&&(n=!1);var i=t.length,r=this._comparator;if(n&&d(t,e,0,i-1,r),null===this._root)this._root=p(t,e,0,i),this._size=i;else{var o=y(this.toList(),h(t,e),r);i=this._size+i,this._root=g({head:o},0,i)}return this},t.prototype.isEmpty=function(){return null===this._root},Object.defineProperty(t.prototype,"size",{get:function(){return this._size},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"root",{get:function(){return this._root},enumerable:!0,configurable:!0}),t.prototype.toString=function(t){void 0===t&&(t=function(t){return String(t.key)});var e=[];return l(this._root,"",!0,(function(t){return e.push(t)}),t),e.join("")},t.prototype.update=function(t,e,n){var i=this._comparator,r=a(t,this._root,i),o=r.left,l=r.right;i(t,e)<0?l=s(e,n,l,i):o=s(e,n,o,i),this._root=u(o,l,i)},t.prototype.split=function(t){return a(t,this._root,this._comparator)},t}();function p(t,e,n,r){var o=r-n;if(o>0){var s=n+Math.floor(o/2),a=t[s],u=e[s],l=new i(a,u);return l.left=p(t,e,n,s),l.right=p(t,e,s+1,r),l}return null}function h(t,e){for(var n=new i(null,null),r=n,o=0;o0?e=(e=s=s.next=n.pop()).right:r=!0;return s.next=null,o.next}function g(t,e,n){var i=n-e;if(i>0){var r=e+Math.floor(i/2),o=g(t,e,r),s=t.head;return s.left=o,t.head=t.head.next,s.right=g(t,r+1,n),s}return null}function y(t,e,n){for(var r=new i(null,null),o=r,s=t,a=e;null!==s&&null!==a;)n(s.key,a.key)<0?(o.next=s,s=s.next):(o.next=a,a=a.next),o=o.next;return null!==s?o.next=s:null!==a&&(o.next=a),r.next}function d(t,e,n,i,r){if(!(n>=i)){for(var o=t[n+i>>1],s=n-1,a=i+1;;){do{s++}while(r(t[s],o)<0);do{a--}while(r(t[a],o)>0);if(s>=a)break;var u=t[s];t[s]=t[a],t[a]=u,u=e[s],e[s]=e[a],e[a]=u}d(t,e,n,a,r),d(t,e,a+1,i,r)}}var _=function(t,e){return t.ll.x<=e.x&&e.x<=t.ur.x&&t.ll.y<=e.y&&e.y<=t.ur.y},m=function(t,e){if(e.ur.xe.x?1:t.ye.y?1:0}}]),n(e,[{key:"link",value:function(t){if(t.point===this.point)throw new Error("Tried to link already linked events");for(var e=t.point.events,n=0,i=e.length;n=0&&u>=0?sl?-1:0:o<0&&u<0?sl?1:0:uo?1:0}}}]),e}(),M=0,F=function(){function e(n,i,r,o){t(this,e),this.id=++M,this.leftSE=n,n.segment=this,n.otherSE=i,this.rightSE=i,i.segment=this,i.otherSE=n,this.rings=r,this.windings=o}return n(e,null,[{key:"compare",value:function(t,e){var n=t.leftSE.point.x,i=e.leftSE.point.x,r=t.rightSE.point.x,o=e.rightSE.point.x;if(os&&a>u)return-1;var c=t.comparePoint(e.leftSE.point);if(c<0)return 1;if(c>0)return-1;var p=e.comparePoint(t.rightSE.point);return 0!==p?p:-1}if(n>i){if(sa&&s>l)return 1;var h=e.comparePoint(t.leftSE.point);if(0!==h)return h;var f=t.comparePoint(e.rightSE.point);return f<0?1:f>0?-1:1}if(sa)return 1;if(ro){var y=t.comparePoint(e.rightSE.point);if(y<0)return 1;if(y>0)return-1}if(r!==o){var d=u-s,_=r-n,m=l-a,v=o-i;if(d>_&&mv)return-1}return r>o?1:rl?1:t.ide.id?1:0}}]),n(e,[{key:"replaceRightSE",value:function(t){this.rightSE=t,this.rightSE.segment=this,this.rightSE.otherSE=this.leftSE,this.leftSE.otherSE=this.rightSE}},{key:"bbox",value:function(){var t=this.leftSE.point.y,e=this.rightSE.point.y;return{ll:{x:this.leftSE.point.x,y:te?t:e}}}},{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(t){return t.x===this.leftSE.point.x&&t.y===this.leftSE.point.y||t.x===this.rightSE.point.x&&t.y===this.rightSE.point.y}},{key:"comparePoint",value:function(t){if(this.isAnEndpoint(t))return 0;var e=this.leftSE.point,n=this.rightSE.point,i=this.vector();if(e.x===n.x)return t.x===e.x?0:t.x0&&a.swapEvents(),D.comparePoints(this.leftSE.point,this.rightSE.point)>0&&this.swapEvents(),i&&(r.checkForConsuming(),o.checkForConsuming()),n}},{key:"swapEvents",value:function(){var t=this.rightSE;this.rightSE=this.leftSE,this.leftSE=t,this.leftSE.isLeft=!0,this.rightSE.isLeft=!1;for(var e=0,n=this.windings.length;e0){var o=n;n=i,i=o}if(n.prev===i){var s=n;n=i,i=s}for(var a=0,u=i.rings.length;a0))throw new Error("Tried to create degenerate segment at [".concat(t.x,", ").concat(t.y,"]"));r=n,o=t,s=-1}return new e(new D(r,!0),new D(o,!1),[i],[s])}}]),e}(),G=function(){function e(n,i,r){if(t(this,e),!Array.isArray(n)||0===n.length)throw new Error("Input geometry is not a valid Polygon or MultiPolygon");if(this.poly=i,this.isExterior=r,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=C.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 s=o,a=1,u=n.length;athis.bbox.ur.x&&(this.bbox.ur.x=l.x),l.y>this.bbox.ur.y&&(this.bbox.ur.y=l.y),s=l)}o.x===s.x&&o.y===s.y||this.segments.push(F.fromRing(s,o,this))}return n(e,[{key:"getSweepEvents",value:function(){for(var t=[],e=0,n=this.segments.length;ethis.bbox.ur.x&&(this.bbox.ur.x=s.bbox.ur.x),s.bbox.ur.y>this.bbox.ur.y&&(this.bbox.ur.y=s.bbox.ur.y),this.interiorRings.push(s)}this.multiPoly=i}return n(e,[{key:"getSweepEvents",value:function(){for(var t=this.exteriorRing.getSweepEvents(),e=0,n=this.interiorRings.length;ethis.bbox.ur.x&&(this.bbox.ur.x=s.bbox.ur.x),s.bbox.ur.y>this.bbox.ur.y&&(this.bbox.ur.y=s.bbox.ur.y),this.polys.push(s)}this.isSubject=i}return n(e,[{key:"getSweepEvents",value:function(){for(var t=[],e=0,n=this.polys.length;e0&&(t=i)}for(var r=t.segment.prevInResult(),o=r?r.prevInResult():null;;){if(!r)return null;if(!o)return r.ringOut;if(o.ringOut!==r.ringOut)return o.ringOut.enclosingRing()!==r.ringOut?r.ringOut:r.ringOut.enclosingRing();r=o.prevInResult(),o=r?r.prevInResult():null}}}]),e}(),k=function(){function e(n){t(this,e),this.exteriorRing=n,n.poly=this,this.interiorRings=[]}return n(e,[{key:"addInterior",value:function(t){this.interiorRings.push(t),t.poly=this}},{key:"getGeom",value:function(){var t=[this.exteriorRing.getGeom()];if(null===t[0])return null;for(var e=0,n=this.interiorRings.length;e1&&void 0!==arguments[1]?arguments[1]:F.compare;t(this,e),this.queue=n,this.tree=new c(i),this.segments=[]}return n(e,[{key:"process",value:function(t){var e=t.segment,n=[];if(t.consumedBy)return t.isLeft?this.queue.remove(t.otherSE):this.tree.remove(e),n;var i=t.isLeft?this.tree.insert(e):this.tree.find(e);if(!i)throw new Error("Unable to find segment #".concat(e.id," ")+"[".concat(e.leftSE.point.x,", ").concat(e.leftSE.point.y,"] -> ")+"[".concat(e.rightSE.point.x,", ").concat(e.rightSE.point.y,"] ")+"in SweepLine tree. Please submit a bug report.");for(var r=i,o=i,s=void 0,a=void 0;void 0===s;)null===(r=this.tree.prev(r))?s=null:void 0===r.key.consumedBy&&(s=r.key);for(;void 0===a;)null===(o=this.tree.next(o))?a=null:void 0===o.key.consumedBy&&(a=o.key);if(t.isLeft){var u=null;if(s){var l=s.getIntersection(e);if(null!==l&&(e.isAnEndpoint(l)||(u=l),!s.isAnEndpoint(l)))for(var c=this._splitSafely(s,l),p=0,h=c.length;p0?(this.tree.remove(e),n.push(t)):(this.segments.push(e),e.prev=s)}else{if(s&&a){var I=s.getIntersection(a);if(null!==I){if(!s.isAnEndpoint(I))for(var N=this._splitSafely(s,I),C=0,b=N.length;CY)throw new Error("Infinite loop when putting segment endpoints in a priority queue (queue size too big). Please file a bug report.");for(var x=new V(g),I=g.size,N=g.pop();N;){var b=N.key;if(g.size===I){var S=b.segment;throw new Error("Unable to pop() ".concat(b.isLeft?"left":"right"," SweepEvent ")+"[".concat(b.point.x,", ").concat(b.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(g.size>Y)throw new Error("Infinite loop when passing sweep line over endpoints (queue size too big). Please file a bug report.");if(x.segments.length>X)throw new Error("Infinite loop when passing sweep line over endpoints (too many sweep line segments). Please file a bug report.");for(var w=x.process(b),L=0,P=w.length;L1?e-1:0),i=1;i1?e-1:0),i=1;i1?e-1:0),i=1;i1?e-1:0),i=1;ie.x?1:this.ye.y?1:0},C.prototype.clone=function(){},C.prototype.copy=function(){return new C(this)},C.prototype.toString=function(){return"("+this.x+", "+this.y+", "+this.z+")"},C.prototype.distance3D=function(t){var e=this.x-t.x,n=this.y-t.y,i=this.z-t.z;return Math.sqrt(e*e+n*n+i*i)},C.prototype.distance=function(t){var e=this.x-t.x,n=this.y-t.y;return Math.sqrt(e*e+n*n)},C.prototype.hashCode=function(){var t=17;return 37*(t=37*t+C.hashCode(this.x))+C.hashCode(this.y)},C.prototype.setCoordinate=function(t){this.x=t.x,this.y=t.y,this.z=t.z},C.prototype.interfaces_=function(){return[x,I,e]},C.prototype.getClass=function(){return C},C.hashCode=function(){if(1===arguments.length){var t=arguments[0],e=v.doubleToLongBits(t);return Math.trunc((e^e)>>>32)}},b.DimensionalComparator.get=function(){return S},b.serialVersionUID.get=function(){return 0x5cbf2c235c7e5800},b.NULL_ORDINATE.get=function(){return v.NaN},b.X.get=function(){return 0},b.Y.get=function(){return 1},b.Z.get=function(){return 2},Object.defineProperties(C,b);var S=function(t){if(this._dimensionsToTest=2,0===arguments.length);else if(1===arguments.length){var e=arguments[0];if(2!==e&&3!==e)throw new m("only 2 or 3 dimensions may be specified");this._dimensionsToTest=e}};S.prototype.compare=function(t,e){var n=t,i=e,r=S.compare(n.x,i.x);if(0!==r)return r;var o=S.compare(n.y,i.y);return 0!==o?o:this._dimensionsToTest<=2?0:S.compare(n.z,i.z)},S.prototype.interfaces_=function(){return[N]},S.prototype.getClass=function(){return S},S.compare=function(t,e){return te?1:v.isNaN(t)?v.isNaN(e)?0:-1:v.isNaN(e)?1:0};var w=function(){};w.prototype.create=function(){},w.prototype.interfaces_=function(){return[]},w.prototype.getClass=function(){return w};var L=function(){},P={INTERIOR:{configurable:!0},BOUNDARY:{configurable:!0},EXTERIOR:{configurable:!0},NONE:{configurable:!0}};L.prototype.interfaces_=function(){return[]},L.prototype.getClass=function(){return L},L.toLocationSymbol=function(t){switch(t){case L.EXTERIOR:return"e";case L.BOUNDARY:return"b";case L.INTERIOR:return"i";case L.NONE:return"-"}throw new m("Unknown location value: "+t)},P.INTERIOR.get=function(){return 0},P.BOUNDARY.get=function(){return 1},P.EXTERIOR.get=function(){return 2},P.NONE.get=function(){return-1},Object.defineProperties(L,P);var R=function(t,e){return t.interfaces_&&t.interfaces_().indexOf(e)>-1},O=function(){},T={LOG_10:{configurable:!0}};O.prototype.interfaces_=function(){return[]},O.prototype.getClass=function(){return O},O.log10=function(t){var e=Math.log(t);return v.isInfinite(e)||v.isNaN(e)?e:e/O.LOG_10},O.min=function(t,e,n,i){var r=t;return en?n:t}if(Number.isInteger(arguments[2])&&Number.isInteger(arguments[0])&&Number.isInteger(arguments[1])){var i=arguments[0],r=arguments[1],o=arguments[2];return io?o:i}},O.wrap=function(t,e){return t<0?e- -t%e:t%e},O.max=function(){if(3===arguments.length){var t=arguments[1],e=arguments[2],n=arguments[0];return t>n&&(n=t),e>n&&(n=e),n}if(4===arguments.length){var i=arguments[1],r=arguments[2],o=arguments[3],s=arguments[0];return i>s&&(s=i),r>s&&(s=r),o>s&&(s=o),s}},O.average=function(t,e){return(t+e)/2},T.LOG_10.get=function(){return Math.log(10)},Object.defineProperties(O,T);var A=function(t){this.str=t};A.prototype.append=function(t){this.str+=t},A.prototype.setCharAt=function(t,e){this.str=this.str.substr(0,t)+e+this.str.substr(t+1)},A.prototype.toString=function(t){return this.str};var D=function(t){this.value=t};D.prototype.intValue=function(){return this.value},D.prototype.compareTo=function(t){return this.valuet?1:0},D.isNaN=function(t){return Number.isNaN(t)};var M=function(){};M.isWhitespace=function(t){return t<=32&&t>=0||127===t},M.toUpperCase=function(t){return t.toUpperCase()};var F=function t(){if(this._hi=0,this._lo=0,0===arguments.length)this.init(0);else if(1===arguments.length)if("number"==typeof arguments[0]){var e=arguments[0];this.init(e)}else if(arguments[0]instanceof t){var n=arguments[0];this.init(n)}else"string"==typeof arguments[0]&&t.call(this,t.parse(arguments[0]));else if(2===arguments.length){var i=arguments[0],r=arguments[1];this.init(i,r)}},G={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}};F.prototype.le=function(t){return(this._hi9?(c=!0,p="9"):p="0"+l,s.append(p),n=n.subtract(F.valueOf(l)).multiply(F.TEN),c&&n.selfAdd(F.TEN);var h=!0,f=F.magnitude(n._hi);if(f<0&&Math.abs(f)>=a-u&&(h=!1),!h)break}return e[0]=i,s.toString()},F.prototype.sqr=function(){return this.multiply(this)},F.prototype.doubleValue=function(){return this._hi+this._lo},F.prototype.subtract=function(){if(arguments[0]instanceof F){var t=arguments[0];return this.add(t.negate())}if("number"==typeof arguments[0]){var e=arguments[0];return this.add(-e)}},F.prototype.equals=function(){if(1===arguments.length){var t=arguments[0];return this._hi===t._hi&&this._lo===t._lo}},F.prototype.isZero=function(){return 0===this._hi&&0===this._lo},F.prototype.selfSubtract=function(){if(arguments[0]instanceof F){var t=arguments[0];return this.isNaN()?this:this.selfAdd(-t._hi,-t._lo)}if("number"==typeof arguments[0]){var e=arguments[0];return this.isNaN()?this:this.selfAdd(-e,0)}},F.prototype.getSpecialNumberString=function(){return this.isZero()?"0.0":this.isNaN()?"NaN ":null},F.prototype.min=function(t){return this.le(t)?this:t},F.prototype.selfDivide=function(){if(1===arguments.length){if(arguments[0]instanceof F){var t=arguments[0];return this.selfDivide(t._hi,t._lo)}if("number"==typeof arguments[0]){var e=arguments[0];return this.selfDivide(e,0)}}else if(2===arguments.length){var n=arguments[0],i=arguments[1],r=null,o=null,s=null,a=null,u=null,l=null,c=null,p=null;return u=this._hi/n,p=(r=(l=F.SPLIT*u)-(r=l-u))*(s=(p=F.SPLIT*n)-(s=p-n))-(c=u*n)+r*(a=n-s)+(o=u-r)*s+o*a,p=u+(l=(this._hi-c-p+this._lo-u*i)/n),this._hi=p,this._lo=u-p+l,this}},F.prototype.dump=function(){return"DD<"+this._hi+", "+this._lo+">"},F.prototype.divide=function(){if(arguments[0]instanceof F){var t=arguments[0],e=null,n=null,i=null,r=null,o=null,s=null,a=null,u=null;return n=(o=this._hi/t._hi)-(e=(s=F.SPLIT*o)-(e=s-o)),u=e*(i=(u=F.SPLIT*t._hi)-(i=u-t._hi))-(a=o*t._hi)+e*(r=t._hi-i)+n*i+n*r,s=(this._hi-a-u+this._lo-o*t._lo)/t._hi,new F(u=o+s,o-u+s)}if("number"==typeof arguments[0]){var l=arguments[0];return v.isNaN(l)?F.createNaN():F.copy(this).selfDivide(l,0)}},F.prototype.ge=function(t){return(this._hi>t._hi||this._hi===t._hi)&&this._lo>=t._lo},F.prototype.pow=function(t){if(0===t)return F.valueOf(1);var e=new F(this),n=F.valueOf(1),i=Math.abs(t);if(i>1)for(;i>0;)i%2==1&&n.selfMultiply(e),(i/=2)>0&&(e=e.sqr());else n=e;return t<0?n.reciprocal():n},F.prototype.ceil=function(){if(this.isNaN())return F.NaN;var t=Math.ceil(this._hi),e=0;return t===this._hi&&(e=Math.ceil(this._lo)),new F(t,e)},F.prototype.compareTo=function(t){var e=t;return this._hie._hi?1:this._loe._lo?1:0},F.prototype.rint=function(){return this.isNaN()?this:this.add(.5).floor()},F.prototype.setValue=function(){if(arguments[0]instanceof F){var t=arguments[0];return this.init(t),this}if("number"==typeof arguments[0]){var e=arguments[0];return this.init(e),this}},F.prototype.max=function(t){return this.ge(t)?this:t},F.prototype.sqrt=function(){if(this.isZero())return F.valueOf(0);if(this.isNegative())return F.NaN;var t=1/Math.sqrt(this._hi),e=this._hi*t,n=F.valueOf(e),i=this.subtract(n.sqr())._hi*(.5*t);return n.add(i)},F.prototype.selfAdd=function(){if(1===arguments.length){if(arguments[0]instanceof F){var t=arguments[0];return this.selfAdd(t._hi,t._lo)}if("number"==typeof arguments[0]){var e=arguments[0],n=null,i=null,r=null,o=null,s=null,a=null;return o=(r=this._hi+e)-(s=r-this._hi),i=(a=(o=e-s+(this._hi-o))+this._lo)+(r-(n=r+a)),this._hi=n+i,this._lo=i+(n-this._hi),this}}else if(2===arguments.length){var u=arguments[0],l=arguments[1],c=null,p=null,h=null,f=null,g=null,y=null,d=null;f=this._hi+u,p=this._lo+l,g=f-(y=f-this._hi),h=p-(d=p-this._lo);var _=(c=f+(y=(g=u-y+(this._hi-g))+p))+(y=(h=l-d+(this._lo-h))+(y+(f-c))),m=y+(c-_);return this._hi=_,this._lo=m,this}},F.prototype.selfMultiply=function(){if(1===arguments.length){if(arguments[0]instanceof F){var t=arguments[0];return this.selfMultiply(t._hi,t._lo)}if("number"==typeof arguments[0]){var e=arguments[0];return this.selfMultiply(e,0)}}else if(2===arguments.length){var n=arguments[0],i=arguments[1],r=null,o=null,s=null,a=null,u=null,l=null;r=(u=F.SPLIT*this._hi)-this._hi,l=F.SPLIT*n,r=u-r,o=this._hi-r,s=l-n;var c=(u=this._hi*n)+(l=r*(s=l-s)-u+r*(a=n-s)+o*s+o*a+(this._hi*i+this._lo*n)),p=l+(r=u-c);return this._hi=c,this._lo=p,this}},F.prototype.selfSqr=function(){return this.selfMultiply(this)},F.prototype.floor=function(){if(this.isNaN())return F.NaN;var t=Math.floor(this._hi),e=0;return t===this._hi&&(e=Math.floor(this._lo)),new F(t,e)},F.prototype.negate=function(){return this.isNaN()?this:new F(-this._hi,-this._lo)},F.prototype.clone=function(){},F.prototype.multiply=function(){if(arguments[0]instanceof F){var t=arguments[0];return t.isNaN()?F.createNaN():F.copy(this).selfMultiply(t)}if("number"==typeof arguments[0]){var e=arguments[0];return v.isNaN(e)?F.createNaN():F.copy(this).selfMultiply(e,0)}},F.prototype.isNaN=function(){return v.isNaN(this._hi)},F.prototype.intValue=function(){return Math.trunc(this._hi)},F.prototype.toString=function(){var t=F.magnitude(this._hi);return t>=-3&&t<=20?this.toStandardNotation():this.toSciNotation()},F.prototype.toStandardNotation=function(){var t=this.getSpecialNumberString();if(null!==t)return t;var e=new Array(1).fill(null),n=this.extractSignificantDigits(!0,e),i=e[0]+1,r=n;if("."===n.charAt(0))r="0"+n;else if(i<0)r="0."+F.stringOfChar("0",-i)+n;else if(-1===n.indexOf(".")){var o=i-n.length;r=n+F.stringOfChar("0",o)+".0"}return this.isNegative()?"-"+r:r},F.prototype.reciprocal=function(){var t=null,e=null,n=null,i=null,r=null,o=null,s=null,a=null;e=(r=1/this._hi)-(t=(o=F.SPLIT*r)-(t=o-r)),n=(a=F.SPLIT*this._hi)-this._hi;var u=r+(o=(1-(s=r*this._hi)-(a=t*(n=a-n)-s+t*(i=this._hi-n)+e*n+e*i)-r*this._lo)/this._hi);return new F(u,r-u+o)},F.prototype.toSciNotation=function(){if(this.isZero())return F.SCI_NOT_ZERO;var t=this.getSpecialNumberString();if(null!==t)return t;var e=new Array(1).fill(null),n=this.extractSignificantDigits(!1,e),i=F.SCI_NOT_EXPONENT_CHAR+e[0];if("0"===n.charAt(0))throw new Error("Found leading zero: "+n);var r="";n.length>1&&(r=n.substring(1));var o=n.charAt(0)+"."+r;return this.isNegative()?"-"+o+i:o+i},F.prototype.abs=function(){return this.isNaN()?F.NaN:this.isNegative()?this.negate():new F(this)},F.prototype.isPositive=function(){return(this._hi>0||0===this._hi)&&this._lo>0},F.prototype.lt=function(t){return(this._hit._hi||this._hi===t._hi)&&this._lo>t._lo},F.prototype.isNegative=function(){return(this._hi<0||0===this._hi)&&this._lo<0},F.prototype.trunc=function(){return this.isNaN()?F.NaN:this.isPositive()?this.floor():this.ceil()},F.prototype.signum=function(){return this._hi>0?1:this._hi<0?-1:this._lo>0?1:this._lo<0?-1:0},F.prototype.interfaces_=function(){return[e,x,I]},F.prototype.getClass=function(){return F},F.sqr=function(t){return F.valueOf(t).selfMultiply(t)},F.valueOf=function(){if("string"==typeof arguments[0]){var t=arguments[0];return F.parse(t)}if("number"==typeof arguments[0])return new F(arguments[0])},F.sqrt=function(t){return F.valueOf(t).sqrt()},F.parse=function(t){for(var e=0,n=t.length;M.isWhitespace(t.charAt(e));)e++;var i=!1;if(e=n);){var l=t.charAt(e);if(e++,M.isDigit(l)){var c=l-"0";o.selfMultiply(F.TEN),o.selfAdd(c),s++}else{if("."!==l){if("e"===l||"E"===l){var p=t.substring(e);try{u=D.parseInt(p)}catch(e){throw e instanceof Error?new Error("Invalid exponent "+p+" in string "+t):e}break}throw new Error("Unexpected character '"+l+"' at position "+e+" in string "+t)}a=s}}var h=o,f=s-a-u;if(0===f)h=o;else if(f>0){var g=F.TEN.pow(f);h=o.divide(g)}else if(f<0){var y=F.TEN.pow(-f);h=o.multiply(y)}return i?h.negate():h},F.createNaN=function(){return new F(v.NaN,v.NaN)},F.copy=function(t){return new F(t)},F.magnitude=function(t){var e=Math.abs(t),n=Math.log(e)/Math.log(10),i=Math.trunc(Math.floor(n));return 10*Math.pow(10,i)<=e&&(i+=1),i},F.stringOfChar=function(t,e){for(var n=new A,i=0;i0){if(o<=0)return B.signum(s);i=r+o}else{if(!(r<0))return B.signum(s);if(o>=0)return B.signum(s);i=-r-o}var a=B.DP_SAFE_EPSILON*i;return s>=a||-s>=a?B.signum(s):2},B.signum=function(t){return t>0?1:t<0?-1:0},q.DP_SAFE_EPSILON.get=function(){return 1e-15},Object.defineProperties(B,q);var U=function(){},k={X:{configurable:!0},Y:{configurable:!0},Z:{configurable:!0},M:{configurable:!0}};k.X.get=function(){return 0},k.Y.get=function(){return 1},k.Z.get=function(){return 2},k.M.get=function(){return 3},U.prototype.setOrdinate=function(t,e,n){},U.prototype.size=function(){},U.prototype.getOrdinate=function(t,e){},U.prototype.getCoordinate=function(){},U.prototype.getCoordinateCopy=function(t){},U.prototype.getDimension=function(){},U.prototype.getX=function(t){},U.prototype.clone=function(){},U.prototype.expandEnvelope=function(t){},U.prototype.copy=function(){},U.prototype.getY=function(t){},U.prototype.toCoordinateArray=function(){},U.prototype.interfaces_=function(){return[I]},U.prototype.getClass=function(){return U},Object.defineProperties(U,k);var z=function(){},V=function(t){function e(){t.call(this,"Projective point not representable on the Cartesian plane.")}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(z),Y=function(){};Y.arraycopy=function(t,e,n,i,r){for(var o=0,s=e;st._minx?this._minx:t._minx,n=this._miny>t._miny?this._miny:t._miny,i=this._maxx=this._minx&&e.getMaxX()<=this._maxx&&e.getMinY()>=this._miny&&e.getMaxY()<=this._maxy}}else if(2===arguments.length){var n=arguments[0],i=arguments[1];return!this.isNull()&&n>=this._minx&&n<=this._maxx&&i>=this._miny&&i<=this._maxy}},j.prototype.intersects=function(){if(1===arguments.length){if(arguments[0]instanceof j){var t=arguments[0];return!this.isNull()&&!t.isNull()&&!(t._minx>this._maxx||t._maxxthis._maxy||t._maxythis._maxx||nthis._maxy||ithis._maxx&&(this._maxx=e._maxx),e._minythis._maxy&&(this._maxy=e._maxy))}}else if(2===arguments.length){var n=arguments[0],i=arguments[1];this.isNull()?(this._minx=n,this._maxx=n,this._miny=i,this._maxy=i):(nthis._maxx&&(this._maxx=n),ithis._maxy&&(this._maxy=i))}},j.prototype.minExtent=function(){if(this.isNull())return 0;var t=this.getWidth(),e=this.getHeight();return te._minx?1:this._minye._miny?1:this._maxxe._maxx?1:this._maxye._maxy?1:0},j.prototype.translate=function(t,e){if(this.isNull())return null;this.init(this.getMinX()+t,this.getMaxX()+t,this.getMinY()+e,this.getMaxY()+e)},j.prototype.toString=function(){return"Env["+this._minx+" : "+this._maxx+", "+this._miny+" : "+this._maxy+"]"},j.prototype.setToNull=function(){this._minx=0,this._maxx=-1,this._miny=0,this._maxy=-1},j.prototype.getHeight=function(){return this.isNull()?0:this._maxy-this._miny},j.prototype.maxExtent=function(){if(this.isNull())return 0;var t=this.getWidth(),e=this.getHeight();return t>e?t:e},j.prototype.expandBy=function(){if(1===arguments.length){var t=arguments[0];this.expandBy(t,t)}else if(2===arguments.length){var e=arguments[0],n=arguments[1];if(this.isNull())return null;this._minx-=e,this._maxx+=e,this._miny-=n,this._maxy+=n,(this._minx>this._maxx||this._miny>this._maxy)&&this.setToNull()}},j.prototype.contains=function(){if(1===arguments.length){if(arguments[0]instanceof j){var t=arguments[0];return this.covers(t)}if(arguments[0]instanceof C){var e=arguments[0];return this.covers(e)}}else if(2===arguments.length){var n=arguments[0],i=arguments[1];return this.covers(n,i)}},j.prototype.centre=function(){return this.isNull()?null:new C((this.getMinX()+this.getMaxX())/2,(this.getMinY()+this.getMaxY())/2)},j.prototype.init=function(){if(0===arguments.length)this.setToNull();else if(1===arguments.length){if(arguments[0]instanceof C){var t=arguments[0];this.init(t.x,t.x,t.y,t.y)}else if(arguments[0]instanceof j){var e=arguments[0];this._minx=e._minx,this._maxx=e._maxx,this._miny=e._miny,this._maxy=e._maxy}}else if(2===arguments.length){var n=arguments[0],i=arguments[1];this.init(n.x,i.x,n.y,i.y)}else if(4===arguments.length){var r=arguments[0],o=arguments[1],s=arguments[2],a=arguments[3];rt._maxx&&(e=this._minx-t._maxx);var n=0;return this._maxyt._maxy&&(n=this._miny-t._maxy),0===e?n:0===n?e:Math.sqrt(e*e+n*n)},j.prototype.hashCode=function(){var t=17;return 37*(t=37*(t=37*(t=37*t+C.hashCode(this._minx))+C.hashCode(this._maxx))+C.hashCode(this._miny))+C.hashCode(this._maxy)},j.prototype.interfaces_=function(){return[x,e]},j.prototype.getClass=function(){return j},j.intersects=function(){if(3===arguments.length){var t=arguments[0],e=arguments[1],n=arguments[2];return n.x>=(t.xe.x?t.x:e.x)&&n.y>=(t.ye.y?t.y:e.y)}if(4===arguments.length){var i=arguments[0],r=arguments[1],o=arguments[2],s=arguments[3],a=Math.min(o.x,s.x),u=Math.max(o.x,s.x),l=Math.min(i.x,r.x),c=Math.max(i.x,r.x);return!(l>u)&&!(cu)&&!(cthis.getEdgeDistance(t,1)?(this._intLineIndex[t][0]=0,this._intLineIndex[t][1]=1):(this._intLineIndex[t][0]=1,this._intLineIndex[t][1]=0)}},nt.prototype.isProper=function(){return this.hasIntersection()&&this._isProper},nt.prototype.setPrecisionModel=function(t){this._precisionModel=t},nt.prototype.isInteriorIntersection=function(){if(0===arguments.length)return!!this.isInteriorIntersection(0)||!!this.isInteriorIntersection(1);if(1===arguments.length){for(var t=arguments[0],e=0;er?i:r;else{var s=Math.abs(t.x-e.x),a=Math.abs(t.y-e.y);0!==(o=i>r?s:a)||t.equals(e)||(o=Math.max(s,a))}return et.isTrue(!(0===o&&!t.equals(e)),"Bad distance calculation"),o},nt.nonRobustComputeEdgeDistance=function(t,e,n){var i=t.x-e.x,r=t.y-e.y,o=Math.sqrt(i*i+r*r);return et.isTrue(!(0===o&&!t.equals(e)),"Invalid distance calculation"),o},it.DONT_INTERSECT.get=function(){return 0},it.DO_INTERSECT.get=function(){return 1},it.COLLINEAR.get=function(){return 2},it.NO_INTERSECTION.get=function(){return 0},it.POINT_INTERSECTION.get=function(){return 1},it.COLLINEAR_INTERSECTION.get=function(){return 2},Object.defineProperties(nt,it);var rt=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.isInSegmentEnvelopes=function(t){var e=new j(this._inputLines[0][0],this._inputLines[0][1]),n=new j(this._inputLines[1][0],this._inputLines[1][1]);return e.contains(t)&&n.contains(t)},e.prototype.computeIntersection=function(){if(3!==arguments.length)return t.prototype.computeIntersection.apply(this,arguments);var e=arguments[0],n=arguments[1],i=arguments[2];if(this._isProper=!1,j.intersects(n,i,e)&&0===at.orientationIndex(n,i,e)&&0===at.orientationIndex(i,n,e))return this._isProper=!0,(e.equals(n)||e.equals(i))&&(this._isProper=!1),this._result=t.POINT_INTERSECTION,null;this._result=t.NO_INTERSECTION},e.prototype.normalizeToMinimum=function(t,e,n,i,r){r.x=this.smallestInAbsValue(t.x,e.x,n.x,i.x),r.y=this.smallestInAbsValue(t.y,e.y,n.y,i.y),t.x-=r.x,t.y-=r.y,e.x-=r.x,e.y-=r.y,n.x-=r.x,n.y-=r.y,i.x-=r.x,i.y-=r.y},e.prototype.safeHCoordinateIntersection=function(t,n,i,r){var o=null;try{o=X.intersection(t,n,i,r)}catch(s){if(!(s instanceof V))throw s;o=e.nearestEndpoint(t,n,i,r)}return o},e.prototype.intersection=function(t,n,i,r){var o=this.intersectionWithNormalization(t,n,i,r);return this.isInSegmentEnvelopes(o)||(o=new C(e.nearestEndpoint(t,n,i,r))),null!==this._precisionModel&&this._precisionModel.makePrecise(o),o},e.prototype.smallestInAbsValue=function(t,e,n,i){var r=t,o=Math.abs(r);return Math.abs(e)1e-4&&Y.out.println("Distance = "+r.distance(o))},e.prototype.intersectionWithNormalization=function(t,e,n,i){var r=new C(t),o=new C(e),s=new C(n),a=new C(i),u=new C;this.normalizeToEnvCentre(r,o,s,a,u);var l=this.safeHCoordinateIntersection(r,o,s,a);return l.x+=u.x,l.y+=u.y,l},e.prototype.computeCollinearIntersection=function(e,n,i,r){var o=j.intersects(e,n,i),s=j.intersects(e,n,r),a=j.intersects(i,r,e),u=j.intersects(i,r,n);return o&&s?(this._intPt[0]=i,this._intPt[1]=r,t.COLLINEAR_INTERSECTION):a&&u?(this._intPt[0]=e,this._intPt[1]=n,t.COLLINEAR_INTERSECTION):o&&a?(this._intPt[0]=i,this._intPt[1]=e,!i.equals(e)||s||u?t.COLLINEAR_INTERSECTION:t.POINT_INTERSECTION):o&&u?(this._intPt[0]=i,this._intPt[1]=n,!i.equals(n)||s||a?t.COLLINEAR_INTERSECTION:t.POINT_INTERSECTION):s&&a?(this._intPt[0]=r,this._intPt[1]=e,!r.equals(e)||o||u?t.COLLINEAR_INTERSECTION:t.POINT_INTERSECTION):s&&u?(this._intPt[0]=r,this._intPt[1]=n,!r.equals(n)||o||a?t.COLLINEAR_INTERSECTION:t.POINT_INTERSECTION):t.NO_INTERSECTION},e.prototype.normalizeToEnvCentre=function(t,e,n,i,r){var o=t.xe.x?t.x:e.x,u=t.y>e.y?t.y:e.y,l=n.xi.x?n.x:i.x,h=n.y>i.y?n.y:i.y,f=((o>l?o:l)+(ac?s:c)+(u0&&s>0||o<0&&s<0)return t.NO_INTERSECTION;var a=at.orientationIndex(i,r,e),u=at.orientationIndex(i,r,n);return a>0&&u>0||a<0&&u<0?t.NO_INTERSECTION:0===o&&0===s&&0===a&&0===u?this.computeCollinearIntersection(e,n,i,r):(0===o||0===s||0===a||0===u?(this._isProper=!1,e.equals2D(i)||e.equals2D(r)?this._intPt[0]=e:n.equals2D(i)||n.equals2D(r)?this._intPt[0]=n:0===o?this._intPt[0]=new C(i):0===s?this._intPt[0]=new C(r):0===a?this._intPt[0]=new C(e):0===u&&(this._intPt[0]=new C(n))):(this._isProper=!0,this._intPt[0]=this.intersection(e,n,i,r)),t.POINT_INTERSECTION)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e.nearestEndpoint=function(t,e,n,i){var r=t,o=at.distancePointLine(t,n,i),s=at.distancePointLine(e,n,i);return s0?n>0?-r:r:n>0?r:-r;if(0===e||0===n)return i>0?t>0?r:-r:t>0?-r:r;if(e>0?i>0?e<=i||(r=-r,o=t,t=n,n=o,o=e,e=i,i=o):e<=-i?(r=-r,n=-n,i=-i):(o=t,t=-n,n=o,o=e,e=-i,i=o):i>0?-e<=i?(r=-r,t=-t,e=-e):(o=-t,t=n,n=o,o=-e,e=i,i=o):e>=i?(t=-t,e=-e,n=-n,i=-i):(r=-r,o=-t,t=-n,n=o,o=-e,e=-i,i=o),t>0){if(!(n>0))return r;if(!(t<=n))return r}else{if(n>0)return-r;if(!(t>=n))return-r;r=-r,t=-t,n=-n}for(;;){if((i-=(s=Math.floor(n/t))*e)<0)return-r;if(i>e)return r;if(t>(n-=s*t)+n){if(ei+i)return-r;n=t-n,i=e-i,r=-r}if(0===i)return 0===n?0:-r;if(0===n)return r;if((e-=(s=Math.floor(t/n))*i)<0)return r;if(e>i)return-r;if(n>(t-=s*n)+t){if(ie+e)return r;t=n-t,e=i-e,r=-r}if(0===e)return 0===t?0:r;if(0===t)return-r}};var st=function(){this._p=null,this._crossingCount=0,this._isPointOnSegment=!1;var t=arguments[0];this._p=t};st.prototype.countSegment=function(t,e){if(t.xi&&(n=e.x,i=t.x),this._p.x>=n&&this._p.x<=i&&(this._isPointOnSegment=!0),null}if(t.y>this._p.y&&e.y<=this._p.y||e.y>this._p.y&&t.y<=this._p.y){var r=t.x-this._p.x,o=t.y-this._p.y,s=e.x-this._p.x,a=e.y-this._p.y,u=ot.signOfDet2x2(r,o,s,a);if(0===u)return this._isPointOnSegment=!0,null;a0&&this._crossingCount++}},st.prototype.isPointInPolygon=function(){return this.getLocation()!==L.EXTERIOR},st.prototype.getLocation=function(){return this._isPointOnSegment?L.BOUNDARY:this._crossingCount%2==1?L.INTERIOR:L.EXTERIOR},st.prototype.isOnSegment=function(){return this._isPointOnSegment},st.prototype.interfaces_=function(){return[]},st.prototype.getClass=function(){return st},st.locatePointInRing=function(){if(arguments[0]instanceof C&&R(arguments[1],U)){for(var t=arguments[1],e=new st(arguments[0]),n=new C,i=new C,r=1;r1||a<0||a>1)&&(r=!0)}}else r=!0;return r?O.min(at.distancePointLine(t,n,i),at.distancePointLine(e,n,i),at.distancePointLine(n,t,e),at.distancePointLine(i,t,e)):0},at.isPointInRing=function(t,e){return at.locatePointInRing(t,e)!==L.EXTERIOR},at.computeLength=function(t){var e=t.size();if(e<=1)return 0;var n=0,i=new C;t.getCoordinate(0,i);for(var r=i.x,o=i.y,s=1;sn.y&&(n=o,i=r)}var s=i;do{(s-=1)<0&&(s=e)}while(t[s].equals2D(n)&&s!==i);var a=i;do{a=(a+1)%e}while(t[a].equals2D(n)&&a!==i);var u=t[s],l=t[a];if(u.equals2D(n)||l.equals2D(n)||u.equals2D(l))return!1;var c=at.computeOrientation(u,n,l);return 0===c?u.x>l.x:c>0},at.locatePointInRing=function(t,e){return st.locatePointInRing(t,e)},at.distancePointLinePerpendicular=function(t,e,n){var i=(n.x-e.x)*(n.x-e.x)+(n.y-e.y)*(n.y-e.y),r=((e.y-t.y)*(n.x-e.x)-(e.x-t.x)*(n.y-e.y))/i;return Math.abs(r)*Math.sqrt(i)},at.computeOrientation=function(t,e,n){return at.orientationIndex(t,e,n)},at.distancePointLine=function(){if(2===arguments.length){var t=arguments[0],e=arguments[1];if(0===e.length)throw new m("Line array must contain at least one vertex");for(var n=t.distance(e[0]),i=0;i=1)return o.distance(a);var c=((s.y-o.y)*(a.x-s.x)-(s.x-o.x)*(a.y-s.y))/u;return Math.abs(c)*Math.sqrt(u)}},at.isOnLine=function(t,e){for(var n=new rt,i=1;i0},_t.prototype.interfaces_=function(){return[gt]},_t.prototype.getClass=function(){return _t};var mt=function(){};mt.prototype.isInBoundary=function(t){return t>1},mt.prototype.interfaces_=function(){return[gt]},mt.prototype.getClass=function(){return mt};var vt=function(){};vt.prototype.isInBoundary=function(t){return 1===t},vt.prototype.interfaces_=function(){return[gt]},vt.prototype.getClass=function(){return vt};var Et=function(){};Et.prototype.add=function(){},Et.prototype.addAll=function(){},Et.prototype.isEmpty=function(){},Et.prototype.iterator=function(){},Et.prototype.size=function(){},Et.prototype.toArray=function(){},Et.prototype.remove=function(){},(n.prototype=new Error).name="IndexOutOfBoundsException";var xt=function(){};xt.prototype.hasNext=function(){},xt.prototype.next=function(){},xt.prototype.remove=function(){};var It=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.get=function(){},e.prototype.set=function(){},e.prototype.isEmpty=function(){},e}(Et);(i.prototype=new Error).name="NoSuchElementException";var Nt=function(t){function e(){t.call(this),this.array_=[],arguments[0]instanceof Et&&this.addAll(arguments[0])}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.ensureCapacity=function(){},e.prototype.interfaces_=function(){return[t,Et]},e.prototype.add=function(t){return 1===arguments.length?this.array_.push(t):this.array_.splice(arguments[0],arguments[1]),!0},e.prototype.clear=function(){this.array_=[]},e.prototype.addAll=function(t){for(var e=t.iterator();e.hasNext();)this.add(e.next());return!0},e.prototype.set=function(t,e){var n=this.array_[t];return this.array_[t]=e,n},e.prototype.iterator=function(){return new Ct(this)},e.prototype.get=function(t){if(t<0||t>=this.size())throw new n;return this.array_[t]},e.prototype.isEmpty=function(){return 0===this.array_.length},e.prototype.size=function(){return this.array_.length},e.prototype.toArray=function(){for(var t=[],e=0,n=this.array_.length;e=1&&this.get(this.size()-1).equals2D(r))return null;t.prototype.add.call(this,r)}else if(arguments[0]instanceof Object&&"boolean"==typeof arguments[1]){var o=arguments[0],s=arguments[1];return this.add(o,s),!0}}else if(3===arguments.length){if("boolean"==typeof arguments[2]&&arguments[0]instanceof Array&&"boolean"==typeof arguments[1]){var a=arguments[0],u=arguments[1];if(arguments[2])for(var l=0;l=0;c--)this.add(a[c],u);return!0}if("boolean"==typeof arguments[2]&&Number.isInteger(arguments[0])&&arguments[1]instanceof C){var p=arguments[0],h=arguments[1];if(!arguments[2]){var f=this.size();if(f>0){if(p>0&&this.get(p-1).equals2D(h))return null;if(p_&&(m=-1);for(var v=d;v!==_;v+=m)this.add(g[v],y);return!0}},e.prototype.closeRing=function(){this.size()>0&&this.add(new C(this.get(0)),!1)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},Object.defineProperties(e,n),e}(Nt),St=function(){},wt={ForwardComparator:{configurable:!0},BidirectionalComparator:{configurable:!0},coordArrayType:{configurable:!0}};wt.ForwardComparator.get=function(){return Lt},wt.BidirectionalComparator.get=function(){return Pt},wt.coordArrayType.get=function(){return new Array(0).fill(null)},St.prototype.interfaces_=function(){return[]},St.prototype.getClass=function(){return St},St.isRing=function(t){return!(t.length<4)&&!!t[0].equals2D(t[t.length-1])},St.ptNotInList=function(t,e){for(var n=0;n=t?e:[]},St.indexOf=function(t,e){for(var n=0;n0)&&(e=t[n]);return e},St.extract=function(t,e,n){e=O.clamp(e,0,t.length);var i=(n=O.clamp(n,-1,t.length))-e+1;n<0&&(i=0),e>=t.length&&(i=0),ni.length)return 1;if(0===n.length)return 0;var r=St.compare(n,i);return St.isEqualReversed(n,i)?0:r},Pt.prototype.OLDcompare=function(t,e){var n=t,i=e;if(n.lengthi.length)return 1;if(0===n.length)return 0;for(var r=St.increasingDirection(n),o=St.increasingDirection(i),s=r>0?0:n.length-1,a=o>0?0:n.length-1,u=0;u0))return e.value;e=e.right}}return null},p.prototype.put=function(t,e){if(null===this.root_)return this.root_={key:t,value:e,left:null,right:null,parent:null,color:Dt,getValue:function(){return this.value},getKey:function(){return this.key}},this.size_=1,null;var n,i,r=this.root_;do{if(n=r,(i=t.compareTo(r.key))<0)r=r.left;else{if(!(i>0)){var o=r.value;return r.value=e,o}r=r.right}}while(null!==r);var s={key:t,left:null,right:null,value:e,parent:n,color:Dt,getValue:function(){return this.value},getKey:function(){return this.key}};return i<0?n.left=s:n.right=s,this.fixAfterInsertion(s),this.size_++,null},p.prototype.fixAfterInsertion=function(t){for(t.color=1;null!=t&&t!==this.root_&&1===t.parent.color;)if(a(t)===l(a(a(t)))){var e=c(a(a(t)));1===s(e)?(u(a(t),Dt),u(e,Dt),u(a(a(t)),1),t=a(a(t))):(t===c(a(t))&&(t=a(t),this.rotateLeft(t)),u(a(t),Dt),u(a(a(t)),1),this.rotateRight(a(a(t))))}else{var n=l(a(a(t)));1===s(n)?(u(a(t),Dt),u(n,Dt),u(a(a(t)),1),t=a(a(t))):(t===l(a(t))&&(t=a(t),this.rotateRight(t)),u(a(t),Dt),u(a(a(t)),1),this.rotateLeft(a(a(t))))}this.root_.color=Dt},p.prototype.values=function(){var t=new Nt,e=this.getFirstEntry();if(null!==e)for(t.add(e.value);null!==(e=p.successor(e));)t.add(e.value);return t},p.prototype.entrySet=function(){var t=new Tt,e=this.getFirstEntry();if(null!==e)for(t.add(e);null!==(e=p.successor(e));)t.add(e);return t},p.prototype.rotateLeft=function(t){if(null!=t){var e=t.right;t.right=e.left,null!=e.left&&(e.left.parent=t),e.parent=t.parent,null===t.parent?this.root_=e:t.parent.left===t?t.parent.left=e:t.parent.right=e,e.left=t,t.parent=e}},p.prototype.rotateRight=function(t){if(null!=t){var e=t.left;t.left=e.right,null!=e.right&&(e.right.parent=t),e.parent=t.parent,null===t.parent?this.root_=e:t.parent.right===t?t.parent.right=e:t.parent.left=e,e.right=t,t.parent=e}},p.prototype.getFirstEntry=function(){var t=this.root_;if(null!=t)for(;null!=t.left;)t=t.left;return t},p.successor=function(t){if(null===t)return null;if(null!==t.right){for(var e=t.right;null!==e.left;)e=e.left;return e}for(var n=t.parent,i=t;null!==n&&i===n.right;)i=n,n=n.parent;return n},p.prototype.size=function(){return this.size_};var Mt=function(){};Mt.prototype.interfaces_=function(){return[]},Mt.prototype.getClass=function(){return Mt},h.prototype=new o,(f.prototype=new h).contains=function(t){for(var e=0,n=this.array_.length;e=0;){var s=r.substring(0,o);i.add(s),o=(r=r.substring(o+n)).indexOf(e)}r.length>0&&i.add(r);for(var a=new Array(i.size()).fill(null),u=0;u0)for(var o=r;o0&&i.append(" ");for(var o=0;o0&&i.append(","),i.append(jt.toString(t.getOrdinate(r,o)))}return i.append(")"),i.toString()}},Wt.ensureValidRing=function(t,e){var n=e.size();return 0===n?e:n<=3?Wt.createClosedRing(t,e,4):e.getOrdinate(0,U.X)===e.getOrdinate(n-1,U.X)&&e.getOrdinate(0,U.Y)===e.getOrdinate(n-1,U.Y)?e:Wt.createClosedRing(t,e,n+1)},Wt.createClosedRing=function(t,e,n){var i=t.create(n,e.getDimension()),r=e.size();Wt.copy(e,0,i,0,r);for(var o=r;o0&&Wt.reverse(this._points),null}},e.prototype.getCoordinate=function(){return this.isEmpty()?null:this._points.getCoordinate(0)},e.prototype.getBoundaryDimension=function(){return this.isClosed()?Bt.FALSE:0},e.prototype.isClosed=function(){return!this.isEmpty()&&this.getCoordinateN(0).equals2D(this.getCoordinateN(this.getNumPoints()-1))},e.prototype.getEndPoint=function(){return this.isEmpty()?null:this.getPointN(this.getNumPoints()-1)},e.prototype.getDimension=function(){return 1},e.prototype.getLength=function(){return at.computeLength(this._points)},e.prototype.getNumPoints=function(){return this._points.size()},e.prototype.reverse=function(){var t=this._points.copy();return Wt.reverse(t),this.getFactory().createLineString(t)},e.prototype.compareToSameClass=function(){if(1===arguments.length){for(var t=arguments[0],e=0,n=0;e= 2)");this._points=t},e.prototype.isCoordinate=function(t){for(var e=0;e=1&&this.getCoordinateSequence().size()= 4)")},e.prototype.getGeometryType=function(){return"LinearRing"},e.prototype.copy=function(){return new e(this._points.copy(),this._factory)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},n.MINIMUM_VALID_SIZE.get=function(){return 4},n.serialVersionUID.get=function(){return-0x3b229e262367a600},Object.defineProperties(e,n),e}(Zt),ne=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e;var n={serialVersionUID:{configurable:!0}};return e.prototype.getSortIndex=function(){return ct.SORTINDEX_MULTIPOLYGON},e.prototype.equalsExact=function(){if(2===arguments.length){var e=arguments[0],n=arguments[1];return!!this.isEquivalentClass(e)&&t.prototype.equalsExact.call(this,e,n)}return t.prototype.equalsExact.apply(this,arguments)},e.prototype.getBoundaryDimension=function(){return 1},e.prototype.getDimension=function(){return 2},e.prototype.reverse=function(){for(var t=this._geometries.length,e=new Array(t).fill(null),n=0;n0?e.createPoint(n[0]):e.createPoint():t},se.prototype.interfaces_=function(){return[ie.GeometryEditorOperation]},se.prototype.getClass=function(){return se};var ae=function(){};ae.prototype.edit=function(t,e){return t instanceof ee?e.createLinearRing(this.edit(t.getCoordinateSequence(),t)):t instanceof Zt?e.createLineString(this.edit(t.getCoordinateSequence(),t)):t instanceof Jt?e.createPoint(this.edit(t.getCoordinateSequence(),t)):t},ae.prototype.interfaces_=function(){return[ie.GeometryEditorOperation]},ae.prototype.getClass=function(){return ae};var ue=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 t=arguments[0];this._coordinates=new Array(t).fill(null);for(var e=0;e0){var t=new A(17*this._coordinates.length);t.append("("),t.append(this._coordinates[0]);for(var e=1;e3&&(e=3),e<2?new ue(t):new ue(t,e)}},ce.prototype.interfaces_=function(){return[w,e]},ce.prototype.getClass=function(){return ce},ce.instance=function(){return ce.instanceObject},pe.serialVersionUID.get=function(){return-0x38e49fa6cf6f2e00},pe.instanceObject.get=function(){return new ce},Object.defineProperties(ce,pe);var he=function(t){function e(){t.call(this),this.map_=new Map}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.get=function(t){return this.map_.get(t)||null},e.prototype.put=function(t,e){return this.map_.set(t,e),e},e.prototype.values=function(){for(var t=new Nt,e=this.map_.values(),n=e.next();!n.done;)t.add(n.value),n=e.next();return t},e.prototype.entrySet=function(){var t=new Tt;return this.map_.entries().forEach((function(e){return t.add(e)})),t},e.prototype.size=function(){return this.map_.size()},e}(Rt),fe=function t(){if(this._modelType=null,this._scale=null,0===arguments.length)this._modelType=t.FLOATING;else if(1===arguments.length)if(arguments[0]instanceof ye){var e=arguments[0];this._modelType=e,e===t.FIXED&&this.setScale(1)}else if("number"==typeof arguments[0]){var n=arguments[0];this._modelType=t.FIXED,this.setScale(n)}else if(arguments[0]instanceof t){var i=arguments[0];this._modelType=i._modelType,this._scale=i._scale}},ge={serialVersionUID:{configurable:!0},maximumPreciseValue:{configurable:!0}};fe.prototype.equals=function(t){if(!(t instanceof fe))return!1;var e=t;return this._modelType===e._modelType&&this._scale===e._scale},fe.prototype.compareTo=function(t){var e=t,n=this.getMaximumSignificantDigits(),i=e.getMaximumSignificantDigits();return new D(n).compareTo(new D(i))},fe.prototype.getScale=function(){return this._scale},fe.prototype.isFloating=function(){return this._modelType===fe.FLOATING||this._modelType===fe.FLOATING_SINGLE},fe.prototype.getType=function(){return this._modelType},fe.prototype.toString=function(){var t="UNKNOWN";return this._modelType===fe.FLOATING?t="Floating":this._modelType===fe.FLOATING_SINGLE?t="Floating-Single":this._modelType===fe.FIXED&&(t="Fixed (Scale="+this.getScale()+")"),t},fe.prototype.makePrecise=function(){if("number"==typeof arguments[0]){var t=arguments[0];return v.isNaN(t)||this._modelType===fe.FLOATING_SINGLE?t:this._modelType===fe.FIXED?Math.round(t*this._scale)/this._scale:t}if(arguments[0]instanceof C){var e=arguments[0];if(this._modelType===fe.FLOATING)return null;e.x=this.makePrecise(e.x),e.y=this.makePrecise(e.y)}},fe.prototype.getMaximumSignificantDigits=function(){var t=16;return this._modelType===fe.FLOATING?t=16:this._modelType===fe.FLOATING_SINGLE?t=6:this._modelType===fe.FIXED&&(t=1+Math.trunc(Math.ceil(Math.log(this.getScale())/Math.log(10)))),t},fe.prototype.setScale=function(t){this._scale=Math.abs(t)},fe.prototype.interfaces_=function(){return[e,x]},fe.prototype.getClass=function(){return fe},fe.mostPrecise=function(t,e){return t.compareTo(e)>=0?t:e},ge.serialVersionUID.get=function(){return 0x6bee6404e9a25c00},ge.maximumPreciseValue.get=function(){return 9007199254740992},Object.defineProperties(fe,ge);var ye=function t(e){this._name=e||null,t.nameToTypeMap.put(e,this)},de={serialVersionUID:{configurable:!0},nameToTypeMap:{configurable:!0}};ye.prototype.readResolve=function(){return ye.nameToTypeMap.get(this._name)},ye.prototype.toString=function(){return this._name},ye.prototype.interfaces_=function(){return[e]},ye.prototype.getClass=function(){return ye},de.serialVersionUID.get=function(){return-552860263173159e4},de.nameToTypeMap.get=function(){return new he},Object.defineProperties(ye,de),fe.Type=ye,fe.FIXED=new ye("FIXED"),fe.FLOATING=new ye("FLOATING"),fe.FLOATING_SINGLE=new ye("FLOATING SINGLE");var _e=function t(){this._precisionModel=new fe,this._SRID=0,this._coordinateSequenceFactory=t.getDefaultCoordinateSequenceFactory(),0===arguments.length||(1===arguments.length?R(arguments[0],w)?this._coordinateSequenceFactory=arguments[0]:arguments[0]instanceof fe&&(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]))},me={serialVersionUID:{configurable:!0}};_e.prototype.toGeometry=function(t){return t.isNull()?this.createPoint(null):t.getMinX()===t.getMaxX()&&t.getMinY()===t.getMaxY()?this.createPoint(new C(t.getMinX(),t.getMinY())):t.getMinX()===t.getMaxX()||t.getMinY()===t.getMaxY()?this.createLineString([new C(t.getMinX(),t.getMinY()),new C(t.getMaxX(),t.getMaxY())]):this.createPolygon(this.createLinearRing([new C(t.getMinX(),t.getMinY()),new C(t.getMinX(),t.getMaxY()),new C(t.getMaxX(),t.getMaxY()),new C(t.getMaxX(),t.getMinY()),new C(t.getMinX(),t.getMinY())]),null)},_e.prototype.createLineString=function(t){return t?t instanceof Array?new Zt(this.getCoordinateSequenceFactory().create(t),this):R(t,U)?new Zt(t,this):void 0:new Zt(this.getCoordinateSequenceFactory().create([]),this)},_e.prototype.createMultiLineString=function(){return 0===arguments.length?new Vt(null,this):1===arguments.length?new Vt(arguments[0],this):void 0},_e.prototype.buildGeometry=function(t){for(var e=null,n=!1,i=!1,r=t.iterator();r.hasNext();){var o=r.next(),s=o.getClass();null===e&&(e=s),s!==e&&(n=!0),o.isGeometryCollectionOrDerived()&&(i=!0)}if(null===e)return this.createGeometryCollection();if(n||i)return this.createGeometryCollection(_e.toGeometryArray(t));var a=t.iterator().next();if(t.size()>1){if(a instanceof $t)return this.createMultiPolygon(_e.toPolygonArray(t));if(a instanceof Zt)return this.createMultiLineString(_e.toLineStringArray(t));if(a instanceof Jt)return this.createMultiPoint(_e.toPointArray(t));et.shouldNeverReachHere("Unhandled class: "+a.getClass().getName())}return a},_e.prototype.createMultiPointFromCoords=function(t){return this.createMultiPoint(null!==t?this.getCoordinateSequenceFactory().create(t):null)},_e.prototype.createPoint=function(){if(0===arguments.length)return this.createPoint(this.getCoordinateSequenceFactory().create([]));if(1===arguments.length){if(arguments[0]instanceof C){var t=arguments[0];return this.createPoint(null!==t?this.getCoordinateSequenceFactory().create([t]):null)}if(R(arguments[0],U))return new Jt(arguments[0],this)}},_e.prototype.getCoordinateSequenceFactory=function(){return this._coordinateSequenceFactory},_e.prototype.createPolygon=function(){if(0===arguments.length)return new $t(null,null,this);if(1===arguments.length){if(R(arguments[0],U)){var t=arguments[0];return this.createPolygon(this.createLinearRing(t))}if(arguments[0]instanceof Array){var e=arguments[0];return this.createPolygon(this.createLinearRing(e))}if(arguments[0]instanceof ee){var n=arguments[0];return this.createPolygon(n,null)}}else if(2===arguments.length)return new $t(arguments[0],arguments[1],this)},_e.prototype.getSRID=function(){return this._SRID},_e.prototype.createGeometryCollection=function(){return 0===arguments.length?new zt(null,this):1===arguments.length?new zt(arguments[0],this):void 0},_e.prototype.createGeometry=function(t){return new ie(this).edit(t,{edit:function(){if(2===arguments.length){var t=arguments[0];return this._coordinateSequenceFactory.create(t)}}})},_e.prototype.getPrecisionModel=function(){return this._precisionModel},_e.prototype.createLinearRing=function(){if(0===arguments.length)return this.createLinearRing(this.getCoordinateSequenceFactory().create([]));if(1===arguments.length){if(arguments[0]instanceof Array){var t=arguments[0];return this.createLinearRing(null!==t?this.getCoordinateSequenceFactory().create(t):null)}if(R(arguments[0],U))return new ee(arguments[0],this)}},_e.prototype.createMultiPolygon=function(){return 0===arguments.length?new ne(null,this):1===arguments.length?new ne(arguments[0],this):void 0},_e.prototype.createMultiPoint=function(){if(0===arguments.length)return new te(null,this);if(1===arguments.length){if(arguments[0]instanceof Array)return new te(arguments[0],this);if(arguments[0]instanceof Array){var t=arguments[0];return this.createMultiPoint(null!==t?this.getCoordinateSequenceFactory().create(t):null)}if(R(arguments[0],U)){var e=arguments[0];if(null===e)return this.createMultiPoint(new Array(0).fill(null));for(var n=new Array(e.size()).fill(null),i=0;i=this.size())throw new Error;return this.array_[t]},d.prototype.push=function(t){return this.array_.push(t),t},d.prototype.pop=function(t){if(0===this.array_.length)throw new y;return this.array_.pop()},d.prototype.peek=function(){if(0===this.array_.length)throw new y;return this.array_[this.array_.length-1]},d.prototype.empty=function(){return 0===this.array_.length},d.prototype.isEmpty=function(){return this.empty()},d.prototype.search=function(t){return this.array_.indexOf(t)},d.prototype.size=function(){return this.array_.length},d.prototype.toArray=function(){for(var t=[],e=0,n=this.array_.length;e0&&this._minIndexthis._minCoord.y&&n.y>this._minCoord.y&&i===at.CLOCKWISE)&&(r=!0),r&&(this._minIndex=this._minIndex-1)},we.prototype.getRightmostSideOfSegment=function(t,e){var n=t.getEdge().getCoordinates();if(e<0||e+1>=n.length)return-1;if(n[e].y===n[e+1].y)return-1;var i=be.LEFT;return n[e].ythis._minCoord.x)&&(this._minDe=t,this._minIndex=n,this._minCoord=e[n])},we.prototype.findRightmostEdgeAtNode=function(){var t=this._minDe.getNode().getEdges();this._minDe=t.getRightmostEdge(),this._minDe.isForward()||(this._minDe=this._minDe.getSym(),this._minIndex=this._minDe.getEdge().getCoordinates().length-1)},we.prototype.findEdge=function(t){for(var e=t.iterator();e.hasNext();){var n=e.next();n.isForward()&&this.checkForRightmostCoordinate(n)}et.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)===be.LEFT&&(this._orientedDe=this._minDe.getSym())},we.prototype.interfaces_=function(){return[]},we.prototype.getClass=function(){return we};var Le=function(t){function e(n,i){t.call(this,e.msgWithCoord(n,i)),this.pt=i?new C(i):null,this.name="TopologyException"}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getCoordinate=function(){return this.pt},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e.msgWithCoord=function(t,e){return e?t:t+" [ "+e+" ]"},e}($),Pe=function(){this.array_=[]};Pe.prototype.addLast=function(t){this.array_.push(t)},Pe.prototype.removeFirst=function(){return this.array_.shift()},Pe.prototype.isEmpty=function(){return 0===this.array_.length};var Re=function(){this._finder=null,this._dirEdgeList=new Nt,this._nodes=new Nt,this._rightMostCoord=null,this._env=null,this._finder=new we};Re.prototype.clearVisitedEdges=function(){for(var t=this._dirEdgeList.iterator();t.hasNext();)t.next().setVisited(!1)},Re.prototype.getRightmostCoordinate=function(){return this._rightMostCoord},Re.prototype.computeNodeDepth=function(t){for(var e=null,n=t.getEdges().iterator();n.hasNext();){var i=n.next();if(i.isVisited()||i.getSym().isVisited()){e=i;break}}if(null===e)throw new Le("unable to find edge to compute depths at "+t.getCoordinate());t.getEdges().computeDepths(e);for(var r=t.getEdges().iterator();r.hasNext();){var o=r.next();o.setVisited(!0),this.copySymDepths(o)}},Re.prototype.computeDepth=function(t){this.clearVisitedEdges();var e=this._finder.getEdge();e.setEdgeDepths(be.RIGHT,t),this.copySymDepths(e),this.computeDepths(e)},Re.prototype.create=function(t){this.addReachable(t),this._finder.findEdge(this._dirEdgeList),this._rightMostCoord=this._finder.getCoordinate()},Re.prototype.findResultEdges=function(){for(var t=this._dirEdgeList.iterator();t.hasNext();){var e=t.next();e.getDepth(be.RIGHT)>=1&&e.getDepth(be.LEFT)<=0&&!e.isInteriorAreaEdge()&&e.setInResult(!0)}},Re.prototype.computeDepths=function(t){var e=new Tt,n=new Pe,i=t.getNode();for(n.addLast(i),e.add(i),t.setVisited(!0);!n.isEmpty();){var r=n.removeFirst();e.add(r),this.computeNodeDepth(r);for(var o=r.getEdges().iterator();o.hasNext();){var s=o.next().getSym();if(!s.isVisited()){var a=s.getNode();e.contains(a)||(n.addLast(a),e.add(a))}}}},Re.prototype.compareTo=function(t){var e=t;return this._rightMostCoord.xe._rightMostCoord.x?1:0},Re.prototype.getEnvelope=function(){if(null===this._env){for(var t=new j,e=this._dirEdgeList.iterator();e.hasNext();)for(var n=e.next().getEdge().getCoordinates(),i=0;ithis.location.length){var e=new Array(3).fill(null);e[be.ON]=this.location[be.ON],e[be.LEFT]=L.NONE,e[be.RIGHT]=L.NONE,this.location=e}for(var n=0;n1&&t.append(L.toLocationSymbol(this.location[be.LEFT])),t.append(L.toLocationSymbol(this.location[be.ON])),this.location.length>1&&t.append(L.toLocationSymbol(this.location[be.RIGHT])),t.toString()},Oe.prototype.setLocations=function(t,e,n){this.location[be.ON]=t,this.location[be.LEFT]=e,this.location[be.RIGHT]=n},Oe.prototype.get=function(t){return t1},Oe.prototype.isAnyNull=function(){for(var t=0;tthis._maxNodeDegree&&(this._maxNodeDegree=e),t=this.getNext(t)}while(t!==this._startDe);this._maxNodeDegree*=2},Ae.prototype.addPoints=function(t,e,n){var i=t.getCoordinates();if(e){var r=1;n&&(r=0);for(var o=r;o=0;a--)this._pts.add(i[a])}},Ae.prototype.isHole=function(){return this._isHole},Ae.prototype.setInResult=function(){var t=this._startDe;do{t.getEdge().setInResult(!0),t=t.getNext()}while(t!==this._startDe)},Ae.prototype.containsPoint=function(t){var e=this.getLinearRing();if(!e.getEnvelopeInternal().contains(t))return!1;if(!at.isPointInRing(t,e.getCoordinates()))return!1;for(var n=this._holes.iterator();n.hasNext();)if(n.next().containsPoint(t))return!1;return!0},Ae.prototype.addHole=function(t){this._holes.add(t)},Ae.prototype.isShell=function(){return null===this._shell},Ae.prototype.getLabel=function(){return this._label},Ae.prototype.getEdges=function(){return this._edges},Ae.prototype.getMaxNodeDegree=function(){return this._maxNodeDegree<0&&this.computeMaxNodeDegree(),this._maxNodeDegree},Ae.prototype.getShell=function(){return this._shell},Ae.prototype.mergeLabel=function(){if(1===arguments.length){var t=arguments[0];this.mergeLabel(t,0),this.mergeLabel(t,1)}else if(2===arguments.length){var e=arguments[1],n=arguments[0].getLocation(e,be.RIGHT);if(n===L.NONE)return null;if(this._label.getLocation(e)===L.NONE)return this._label.setLocation(e,n),null}},Ae.prototype.setShell=function(t){this._shell=t,null!==t&&t.addHole(this)},Ae.prototype.toPolygon=function(t){for(var e=new Array(this._holes.size()).fill(null),n=0;n=2,"found partial label"),this.computeIM(t)},Fe.prototype.isInResult=function(){return this._isInResult},Fe.prototype.isVisited=function(){return this._isVisited},Fe.prototype.interfaces_=function(){return[]},Fe.prototype.getClass=function(){return Fe};var Ge=function(t){function e(){t.call(this),this._coord=null,this._edges=null;var e=arguments[0],n=arguments[1];this._coord=e,this._edges=n,this._label=new Te(0,L.NONE)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.isIncidentEdgeInResult=function(){for(var t=this.getEdges().getEdges().iterator();t.hasNext();)if(t.next().getEdge().isInResult())return!0;return!1},e.prototype.isIsolated=function(){return 1===this._label.getGeometryCount()},e.prototype.getCoordinate=function(){return this._coord},e.prototype.print=function(t){t.println("node "+this._coord+" lbl: "+this._label)},e.prototype.computeIM=function(t){},e.prototype.computeMergedLocation=function(t,e){var n=L.NONE;if(n=this._label.getLocation(e),!t.isNull(e)){var i=t.getLocation(e);n!==L.BOUNDARY&&(n=i)}return n},e.prototype.setLabel=function(){if(2!==arguments.length)return t.prototype.setLabel.apply(this,arguments);var e=arguments[0],n=arguments[1];null===this._label?this._label=new Te(e,n):this._label.setLocation(e,n)},e.prototype.getEdges=function(){return this._edges},e.prototype.mergeLabel=function(){if(arguments[0]instanceof e){var t=arguments[0];this.mergeLabel(t._label)}else if(arguments[0]instanceof Te)for(var n=arguments[0],i=0;i<2;i++){var r=this.computeMergedLocation(n,i);this._label.getLocation(i)===L.NONE&&this._label.setLocation(i,r)}},e.prototype.add=function(t){this._edges.insert(t),t.setNode(this)},e.prototype.setLabelBoundary=function(t){if(null===this._label)return null;var e=L.NONE;null!==this._label&&(e=this._label.getLocation(t));var n=null;switch(e){case L.BOUNDARY:n=L.INTERIOR;break;case L.INTERIOR:default:n=L.BOUNDARY}this._label.setLocation(t,n)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(Fe),Be=function(){this.nodeMap=new p,this.nodeFact=null;var t=arguments[0];this.nodeFact=t};Be.prototype.find=function(t){return this.nodeMap.get(t)},Be.prototype.addNode=function(){if(arguments[0]instanceof C){var t=arguments[0],e=this.nodeMap.get(t);return null===e&&(e=this.nodeFact.createNode(t),this.nodeMap.put(t,e)),e}if(arguments[0]instanceof Ge){var n=arguments[0],i=this.nodeMap.get(n.getCoordinate());return null===i?(this.nodeMap.put(n.getCoordinate(),n),n):(i.mergeLabel(n),i)}},Be.prototype.print=function(t){for(var e=this.iterator();e.hasNext();)e.next().print(t)},Be.prototype.iterator=function(){return this.nodeMap.values().iterator()},Be.prototype.values=function(){return this.nodeMap.values()},Be.prototype.getBoundaryNodes=function(t){for(var e=new Nt,n=this.iterator();n.hasNext();){var i=n.next();i.getLabel().getLocation(t)===L.BOUNDARY&&e.add(i)}return e},Be.prototype.add=function(t){var e=t.getCoordinate();this.addNode(e).add(t)},Be.prototype.interfaces_=function(){return[]},Be.prototype.getClass=function(){return Be};var qe=function(){},Ue={NE:{configurable:!0},NW:{configurable:!0},SW:{configurable:!0},SE:{configurable:!0}};qe.prototype.interfaces_=function(){return[]},qe.prototype.getClass=function(){return qe},qe.isNorthern=function(t){return t===qe.NE||t===qe.NW},qe.isOpposite=function(t,e){return t!==e&&2===(t-e+4)%4},qe.commonHalfPlane=function(t,e){if(t===e)return t;if(2===(t-e+4)%4)return-1;var n=te?t:e)?3:n},qe.isInHalfPlane=function(t,e){return e===qe.SE?t===qe.SE||t===qe.SW:t===e||t===e+1},qe.quadrant=function(){if("number"==typeof arguments[0]&&"number"==typeof arguments[1]){var t=arguments[0],e=arguments[1];if(0===t&&0===e)throw new m("Cannot compute the quadrant for point ( "+t+", "+e+" )");return t>=0?e>=0?qe.NE:qe.SE:e>=0?qe.NW:qe.SW}if(arguments[0]instanceof C&&arguments[1]instanceof C){var n=arguments[0],i=arguments[1];if(i.x===n.x&&i.y===n.y)throw new m("Cannot compute the quadrant for two identical points "+n);return i.x>=n.x?i.y>=n.y?qe.NE:qe.SE:i.y>=n.y?qe.NW:qe.SW}},Ue.NE.get=function(){return 0},Ue.NW.get=function(){return 1},Ue.SW.get=function(){return 2},Ue.SE.get=function(){return 3},Object.defineProperties(qe,Ue);var ke=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 t=arguments[0];this._edge=t}else if(3===arguments.length){var e=arguments[0],n=arguments[1],i=arguments[2];this._edge=e,this.init(n,i),this._label=null}else if(4===arguments.length){var r=arguments[0],o=arguments[1],s=arguments[2],a=arguments[3];this._edge=r,this.init(o,s),this._label=a}};ke.prototype.compareDirection=function(t){return this._dx===t._dx&&this._dy===t._dy?0:this._quadrant>t._quadrant?1:this._quadrant2){o.linkDirectedEdgesForMinimalEdgeRings();var s=o.buildMinimalRings(),a=this.findShell(s);null!==a?(this.placePolygonHoles(a,s),e.add(a)):n.addAll(s)}else i.add(o)}return i},Xe.prototype.containsPoint=function(t){for(var e=this._shellList.iterator();e.hasNext();)if(e.next().containsPoint(t))return!0;return!1},Xe.prototype.buildMaximalEdgeRings=function(t){for(var e=new Nt,n=t.iterator();n.hasNext();){var i=n.next();if(i.isInResult()&&i.getLabel().isArea()&&null===i.getEdgeRing()){var r=new Me(i,this._geometryFactory);e.add(r),r.setInResult()}}return e},Xe.prototype.placePolygonHoles=function(t,e){for(var n=e.iterator();n.hasNext();){var i=n.next();i.isHole()&&i.setShell(t)}},Xe.prototype.getPolygons=function(){return this.computePolygons(this._shellList)},Xe.prototype.findEdgeRingContaining=function(t,e){for(var n=t.getLinearRing(),i=n.getEnvelopeInternal(),r=n.getCoordinateN(0),o=null,s=null,a=e.iterator();a.hasNext();){var u=a.next(),l=u.getLinearRing(),c=l.getEnvelopeInternal();null!==o&&(s=o.getLinearRing().getEnvelopeInternal());var p=!1;c.contains(i)&&at.isPointInRing(r,l.getCoordinates())&&(p=!0),p&&(null===o||s.contains(c))&&(o=u)}return o},Xe.prototype.findShell=function(t){for(var e=0,n=null,i=t.iterator();i.hasNext();){var r=i.next();r.isHole()||(n=r,e++)}return et.isTrue(e<=1,"found two shells in MinimalEdgeRing list"),n},Xe.prototype.add=function(){if(1===arguments.length){var t=arguments[0];this.add(t.getEdgeEnds(),t.getNodes())}else if(2===arguments.length){var e=arguments[0],n=arguments[1];Ye.linkResultDirectedEdges(n);var i=this.buildMaximalEdgeRings(e),r=new Nt,o=this.buildMinimalEdgeRings(i,this._shellList,r);this.sortShellsAndHoles(o,this._shellList,r),this.placeFreeHoles(this._shellList,r)}},Xe.prototype.interfaces_=function(){return[]},Xe.prototype.getClass=function(){return Xe};var je=function(){};je.prototype.getBounds=function(){},je.prototype.interfaces_=function(){return[]},je.prototype.getClass=function(){return je};var He=function(){this._bounds=null,this._item=null;var t=arguments[0],e=arguments[1];this._bounds=t,this._item=e};He.prototype.getItem=function(){return this._item},He.prototype.getBounds=function(){return this._bounds},He.prototype.interfaces_=function(){return[je,e]},He.prototype.getClass=function(){return He};var We=function(){this._size=null,this._items=null,this._size=0,this._items=new Nt,this._items.add(null)};We.prototype.poll=function(){if(this.isEmpty())return null;var t=this._items.get(1);return this._items.set(1,this._items.get(this._size)),this._size-=1,this.reorder(1),t},We.prototype.size=function(){return this._size},We.prototype.reorder=function(t){for(var e=null,n=this._items.get(t);2*t<=this._size&&((e=2*t)!==this._size&&this._items.get(e+1).compareTo(this._items.get(e))<0&&e++,this._items.get(e).compareTo(n)<0);t=e)this._items.set(t,this._items.get(e));this._items.set(t,n)},We.prototype.clear=function(){this._size=0,this._items.clear()},We.prototype.isEmpty=function(){return 0===this._size},We.prototype.add=function(t){this._items.add(null),this._size+=1;var e=this._size;for(this._items.set(0,t);t.compareTo(this._items.get(Math.trunc(e/2)))<0;e/=2)this._items.set(e,this._items.get(Math.trunc(e/2)));this._items.set(e,t)},We.prototype.interfaces_=function(){return[]},We.prototype.getClass=function(){return We};var Ze=function(){};Ze.prototype.visitItem=function(t){},Ze.prototype.interfaces_=function(){return[]},Ze.prototype.getClass=function(){return Ze};var Ke=function(){};Ke.prototype.insert=function(t,e){},Ke.prototype.remove=function(t,e){},Ke.prototype.query=function(){},Ke.prototype.interfaces_=function(){return[]},Ke.prototype.getClass=function(){return Ke};var Je=function(){if(this._childBoundables=new Nt,this._bounds=null,this._level=null,0===arguments.length);else if(1===arguments.length){var t=arguments[0];this._level=t}},Qe={serialVersionUID:{configurable:!0}};Je.prototype.getLevel=function(){return this._level},Je.prototype.size=function(){return this._childBoundables.size()},Je.prototype.getChildBoundables=function(){return this._childBoundables},Je.prototype.addChildBoundable=function(t){et.isTrue(null===this._bounds),this._childBoundables.add(t)},Je.prototype.isEmpty=function(){return this._childBoundables.isEmpty()},Je.prototype.getBounds=function(){return null===this._bounds&&(this._bounds=this.computeBounds()),this._bounds},Je.prototype.interfaces_=function(){return[je,e]},Je.prototype.getClass=function(){return Je},Qe.serialVersionUID.get=function(){return 0x5a1e55ec41369800},Object.defineProperties(Je,Qe);var $e=function(){};$e.reverseOrder=function(){return{compare:function(t,e){return e.compareTo(t)}}},$e.min=function(t){return $e.sort(t),t.get(0)},$e.sort=function(t,e){var n=t.toArray();e?Gt.sort(n,e):Gt.sort(n);for(var i=t.iterator(),r=0,o=n.length;rtn.area(this._boundable2)?(this.expand(this._boundable1,this._boundable2,t,e),null):(this.expand(this._boundable2,this._boundable1,t,e),null);if(n)return this.expand(this._boundable1,this._boundable2,t,e),null;if(i)return this.expand(this._boundable2,this._boundable1,t,e),null;throw new m("neither boundable is composite")},tn.prototype.isLeaves=function(){return!(tn.isComposite(this._boundable1)||tn.isComposite(this._boundable2))},tn.prototype.compareTo=function(t){var e=t;return this._distancee._distance?1:0},tn.prototype.expand=function(t,e,n,i){for(var r=t.getChildBoundables().iterator();r.hasNext();){var o=r.next(),s=new tn(o,e,this._itemDistance);s.getDistance()1,"Node capacity must be greater than 1"),this._nodeCapacity=n}},nn={IntersectsOp:{configurable:!0},serialVersionUID:{configurable:!0},DEFAULT_NODE_CAPACITY:{configurable:!0}};en.prototype.getNodeCapacity=function(){return this._nodeCapacity},en.prototype.lastNode=function(t){return t.get(t.size()-1)},en.prototype.size=function(){if(0===arguments.length)return this.isEmpty()?0:(this.build(),this.size(this._root));if(1===arguments.length){for(var t=0,e=arguments[0].getChildBoundables().iterator();e.hasNext();){var n=e.next();n instanceof Je?t+=this.size(n):n instanceof He&&(t+=1)}return t}},en.prototype.removeItem=function(t,e){for(var n=null,i=t.getChildBoundables().iterator();i.hasNext();){var r=i.next();r instanceof He&&r.getItem()===e&&(n=r)}return null!==n&&(t.getChildBoundables().remove(n),!0)},en.prototype.itemsTree=function(){if(0===arguments.length){this.build();var t=this.itemsTree(this._root);return null===t?new Nt:t}if(1===arguments.length){for(var e=arguments[0],n=new Nt,i=e.getChildBoundables().iterator();i.hasNext();){var r=i.next();if(r instanceof Je){var o=this.itemsTree(r);null!==o&&n.add(o)}else r instanceof He?n.add(r.getItem()):et.shouldNeverReachHere()}return n.size()<=0?null:n}},en.prototype.insert=function(t,e){et.isTrue(!this._built,"Cannot insert items into an STR packed R-tree after it has been built."),this._itemBoundables.add(new He(t,e))},en.prototype.boundablesAtLevel=function(){if(1===arguments.length){var t=arguments[0],e=new Nt;return this.boundablesAtLevel(t,this._root,e),e}if(3===arguments.length){var n=arguments[0],i=arguments[1],r=arguments[2];if(et.isTrue(n>-2),i.getLevel()===n)return r.add(i),null;for(var o=i.getChildBoundables().iterator();o.hasNext();){var s=o.next();s instanceof Je?this.boundablesAtLevel(n,s,r):(et.isTrue(s instanceof He),-1===n&&r.add(s))}return null}},en.prototype.query=function(){if(1===arguments.length){var t=arguments[0];this.build();var e=new Nt;return this.isEmpty()||this.getIntersectsOp().intersects(this._root.getBounds(),t)&&this.query(t,this._root,e),e}if(2===arguments.length){var n=arguments[0],i=arguments[1];if(this.build(),this.isEmpty())return null;this.getIntersectsOp().intersects(this._root.getBounds(),n)&&this.query(n,this._root,i)}else if(3===arguments.length)if(R(arguments[2],Ze)&&arguments[0]instanceof Object&&arguments[1]instanceof Je)for(var r=arguments[0],o=arguments[2],s=arguments[1].getChildBoundables(),a=0;at&&(t=i)}}return t+1}},en.prototype.createParentBoundables=function(t,e){et.isTrue(!t.isEmpty());var n=new Nt;n.add(this.createNode(e));var i=new Nt(t);$e.sort(i,this.getComparator());for(var r=i.iterator();r.hasNext();){var o=r.next();this.lastNode(n).getChildBoundables().size()===this.getNodeCapacity()&&n.add(this.createNode(e)),this.lastNode(n).addChildBoundable(o)}return n},en.prototype.isEmpty=function(){return this._built?this._root.isEmpty():this._itemBoundables.isEmpty()},en.prototype.interfaces_=function(){return[e]},en.prototype.getClass=function(){return en},en.compareDoubles=function(t,e){return t>e?1:t0);for(var n=new Nt,i=0;i0;){var p=c.poll(),h=p.getDistance();if(h>=u)break;p.isLeaves()?(u=h,l=p):p.expandToQueue(c,u)}return[l.getBoundable(0).getItem(),l.getBoundable(1).getItem()]}}else if(3===arguments.length){var f=arguments[2],g=new He(arguments[0],arguments[1]),y=new tn(this.getRoot(),g,f);return this.nearestNeighbour(y)[0]}},n.prototype.interfaces_=function(){return[Ke,e]},n.prototype.getClass=function(){return n},n.centreX=function(t){return n.avg(t.getMinX(),t.getMaxX())},n.avg=function(t,e){return(t+e)/2},n.centreY=function(t){return n.avg(t.getMinY(),t.getMaxY())},i.STRtreeNode.get=function(){return an},i.serialVersionUID.get=function(){return 0x39920f7d5f261e0},i.xComparator.get=function(){return{interfaces_:function(){return[N]},compare:function(e,i){return t.compareDoubles(n.centreX(e.getBounds()),n.centreX(i.getBounds()))}}},i.yComparator.get=function(){return{interfaces_:function(){return[N]},compare:function(e,i){return t.compareDoubles(n.centreY(e.getBounds()),n.centreY(i.getBounds()))}}},i.intersectsOp.get=function(){return{interfaces_:function(){return[t.IntersectsOp]},intersects:function(t,e){return t.intersects(e)}}},i.DEFAULT_NODE_CAPACITY.get=function(){return 10},Object.defineProperties(n,i),n}(en),an=function(t){function e(){var e=arguments[0];t.call(this,e)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.computeBounds=function(){for(var t=null,e=this.getChildBoundables().iterator();e.hasNext();){var n=e.next();null===t?t=new j(n.getBounds()):t.expandToInclude(n.getBounds())}return t},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(Je),un=function(){};un.prototype.interfaces_=function(){return[]},un.prototype.getClass=function(){return un},un.relativeSign=function(t,e){return te?1:0},un.compare=function(t,e,n){if(e.equals2D(n))return 0;var i=un.relativeSign(e.x,n.x),r=un.relativeSign(e.y,n.y);switch(t){case 0:return un.compareValue(i,r);case 1:return un.compareValue(r,i);case 2:return un.compareValue(r,-i);case 3:return un.compareValue(-i,r);case 4:return un.compareValue(-i,-r);case 5:return un.compareValue(-r,-i);case 6:return un.compareValue(-r,i);case 7:return un.compareValue(i,-r)}return et.shouldNeverReachHere("invalid octant value"),0},un.compareValue=function(t,e){return t<0?-1:t>0?1:e<0?-1:e>0?1:0};var ln=function(){this._segString=null,this.coord=null,this.segmentIndex=null,this._segmentOctant=null,this._isInterior=null;var t=arguments[0],e=arguments[1],n=arguments[2],i=arguments[3];this._segString=t,this.coord=new C(e),this.segmentIndex=n,this._segmentOctant=i,this._isInterior=!e.equals2D(t.getCoordinate(n))};ln.prototype.getCoordinate=function(){return this.coord},ln.prototype.print=function(t){t.print(this.coord),t.print(" seg # = "+this.segmentIndex)},ln.prototype.compareTo=function(t){var e=t;return this.segmentIndexe.segmentIndex?1:this.coord.equals2D(e.coord)?0:un.compare(this._segmentOctant,this.coord,e.coord)},ln.prototype.isEndPoint=function(t){return 0===this.segmentIndex&&!this._isInterior||this.segmentIndex===t},ln.prototype.isInterior=function(){return this._isInterior},ln.prototype.interfaces_=function(){return[x]},ln.prototype.getClass=function(){return ln};var cn=function(){this._nodeMap=new p,this._edge=null;var t=arguments[0];this._edge=t};cn.prototype.getSplitCoordinates=function(){var t=new bt;this.addEndpoints();for(var e=this.iterator(),n=e.next();e.hasNext();){var i=e.next();this.addEdgeCoordinates(n,i,t),n=i}return t.toCoordinateArray()},cn.prototype.addCollapsedNodes=function(){var t=new Nt;this.findCollapsesFromInsertedNodes(t),this.findCollapsesFromExistingVertices(t);for(var e=t.iterator();e.hasNext();){var n=e.next().intValue();this.add(this._edge.getCoordinate(n),n)}},cn.prototype.print=function(t){t.println("Intersections:");for(var e=this.iterator();e.hasNext();)e.next().print(t)},cn.prototype.findCollapsesFromExistingVertices=function(t){for(var e=0;e=0?e>=0?n>=i?0:1:n>=i?7:6:e>=0?n>=i?3:2:n>=i?4:5}if(arguments[0]instanceof C&&arguments[1]instanceof C){var r=arguments[0],o=arguments[1],s=o.x-r.x,a=o.y-r.y;if(0===s&&0===a)throw new m("Cannot compute the octant for two identical points "+r);return pn.octant(s,a)}};var hn=function(){};hn.prototype.getCoordinates=function(){},hn.prototype.size=function(){},hn.prototype.getCoordinate=function(t){},hn.prototype.isClosed=function(){},hn.prototype.setData=function(t){},hn.prototype.getData=function(){},hn.prototype.interfaces_=function(){return[]},hn.prototype.getClass=function(){return hn};var fn=function(){};fn.prototype.addIntersection=function(t,e){},fn.prototype.interfaces_=function(){return[hn]},fn.prototype.getClass=function(){return fn};var gn=function(){this._nodeList=new cn(this),this._pts=null,this._data=null;var t=arguments[0],e=arguments[1];this._pts=t,this._data=e};gn.prototype.getCoordinates=function(){return this._pts},gn.prototype.size=function(){return this._pts.length},gn.prototype.getCoordinate=function(t){return this._pts[t]},gn.prototype.isClosed=function(){return this._pts[0].equals(this._pts[this._pts.length-1])},gn.prototype.getSegmentOctant=function(t){return t===this._pts.length-1?-1:this.safeOctant(this.getCoordinate(t),this.getCoordinate(t+1))},gn.prototype.setData=function(t){this._data=t},gn.prototype.safeOctant=function(t,e){return t.equals2D(e)?0:pn.octant(t,e)},gn.prototype.getData=function(){return this._data},gn.prototype.addIntersection=function(){if(2===arguments.length){var t=arguments[0],e=arguments[1];this.addIntersectionNode(t,e)}else if(4===arguments.length){var n=arguments[1],i=arguments[3],r=new C(arguments[0].getIntersection(i));this.addIntersection(r,n)}},gn.prototype.toString=function(){return Q.toLineString(new ue(this._pts))},gn.prototype.getNodeList=function(){return this._nodeList},gn.prototype.addIntersectionNode=function(t,e){var n=e,i=n+1;if(i=0&&n>=0||e<=0&&n<=0?Math.max(e,n):0}if(arguments[0]instanceof C){var i=arguments[0];return at.orientationIndex(this.p0,this.p1,i)}},yn.prototype.toGeometry=function(t){return t.createLineString([this.p0,this.p1])},yn.prototype.isVertical=function(){return this.p0.x===this.p1.x},yn.prototype.equals=function(t){if(!(t instanceof yn))return!1;var e=t;return this.p0.equals(e.p0)&&this.p1.equals(e.p1)},yn.prototype.intersection=function(t){var e=new rt;return e.computeIntersection(this.p0,this.p1,t.p0,t.p1),e.hasIntersection()?e.getIntersection(0):null},yn.prototype.project=function(){if(arguments[0]instanceof C){var t=arguments[0];if(t.equals(this.p0)||t.equals(this.p1))return new C(t);var e=this.projectionFactor(t),n=new C;return n.x=this.p0.x+e*(this.p1.x-this.p0.x),n.y=this.p0.y+e*(this.p1.y-this.p0.y),n}if(arguments[0]instanceof yn){var i=arguments[0],r=this.projectionFactor(i.p0),o=this.projectionFactor(i.p1);if(r>=1&&o>=1)return null;if(r<=0&&o<=0)return null;var s=this.project(i.p0);r<0&&(s=this.p0),r>1&&(s=this.p1);var a=this.project(i.p1);return o<0&&(a=this.p0),o>1&&(a=this.p1),new yn(s,a)}},yn.prototype.normalize=function(){this.p1.compareTo(this.p0)<0&&this.reverse()},yn.prototype.angle=function(){return Math.atan2(this.p1.y-this.p0.y,this.p1.x-this.p0.x)},yn.prototype.getCoordinate=function(t){return 0===t?this.p0:this.p1},yn.prototype.distancePerpendicular=function(t){return at.distancePointLinePerpendicular(t,this.p0,this.p1)},yn.prototype.minY=function(){return Math.min(this.p0.y,this.p1.y)},yn.prototype.midPoint=function(){return yn.midPoint(this.p0,this.p1)},yn.prototype.projectionFactor=function(t){if(t.equals(this.p0))return 0;if(t.equals(this.p1))return 1;var e=this.p1.x-this.p0.x,n=this.p1.y-this.p0.y,i=e*e+n*n;return i<=0?v.NaN:((t.x-this.p0.x)*e+(t.y-this.p0.y)*n)/i},yn.prototype.closestPoints=function(t){var e=this.intersection(t);if(null!==e)return[e,e];var n=new Array(2).fill(null),i=v.MAX_VALUE,r=null,o=this.closestPoint(t.p0);i=o.distance(t.p0),n[0]=o,n[1]=t.p0;var s=this.closestPoint(t.p1);(r=s.distance(t.p1))0&&e<1?this.project(t):this.p0.distance(t)1||v.isNaN(e))&&(e=1),e},yn.prototype.toString=function(){return"LINESTRING( "+this.p0.x+" "+this.p0.y+", "+this.p1.x+" "+this.p1.y+")"},yn.prototype.isHorizontal=function(){return this.p0.y===this.p1.y},yn.prototype.distance=function(){if(arguments[0]instanceof yn){var t=arguments[0];return at.distanceLineLine(this.p0,this.p1,t.p0,t.p1)}if(arguments[0]instanceof C){var e=arguments[0];return at.distancePointLine(e,this.p0,this.p1)}},yn.prototype.pointAlong=function(t){var e=new C;return e.x=this.p0.x+t*(this.p1.x-this.p0.x),e.y=this.p0.y+t*(this.p1.y-this.p0.y),e},yn.prototype.hashCode=function(){var t=v.doubleToLongBits(this.p0.x);t^=31*v.doubleToLongBits(this.p0.y);var e=Math.trunc(t)^Math.trunc(t>>32),n=v.doubleToLongBits(this.p1.x);return n^=31*v.doubleToLongBits(this.p1.y),e^Math.trunc(n)^Math.trunc(n>>32)},yn.prototype.interfaces_=function(){return[x,e]},yn.prototype.getClass=function(){return yn},yn.midPoint=function(t,e){return new C((t.x+e.x)/2,(t.y+e.y)/2)},dn.serialVersionUID.get=function(){return 0x2d2172135f411c00},Object.defineProperties(yn,dn);var _n=function(){this.tempEnv1=new j,this.tempEnv2=new j,this._overlapSeg1=new yn,this._overlapSeg2=new yn};_n.prototype.overlap=function(){if(2===arguments.length);else if(4===arguments.length){var t=arguments[1],e=arguments[2],n=arguments[3];arguments[0].getLineSegment(t,this._overlapSeg1),e.getLineSegment(n,this._overlapSeg2),this.overlap(this._overlapSeg1,this._overlapSeg2)}},_n.prototype.interfaces_=function(){return[]},_n.prototype.getClass=function(){return _n};var mn=function(){this._pts=null,this._start=null,this._end=null,this._env=null,this._context=null,this._id=null;var t=arguments[0],e=arguments[1],n=arguments[2],i=arguments[3];this._pts=t,this._start=e,this._end=n,this._context=i};mn.prototype.getLineSegment=function(t,e){e.p0=this._pts[t],e.p1=this._pts[t+1]},mn.prototype.computeSelect=function(t,e,n,i){var r=this._pts[e],o=this._pts[n];if(i.tempEnv1.init(r,o),n-e==1)return i.select(this,e),null;if(!t.intersects(i.tempEnv1))return null;var s=Math.trunc((e+n)/2);e=t.length-1)return t.length-1;for(var i=qe.quadrant(t[n],t[n+1]),r=e+1;rn.getId()&&(n.computeOverlaps(r,t),this._nOverlaps++),this._segInt.isDone())return null}},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},n.SegmentOverlapAction.get=function(){return Nn},Object.defineProperties(e,n),e}(xn),Nn=function(t){function e(){t.call(this),this._si=null;var e=arguments[0];this._si=e}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.overlap=function(){if(4!==arguments.length)return t.prototype.overlap.apply(this,arguments);var e=arguments[1],n=arguments[2],i=arguments[3],r=arguments[0].getContext(),o=n.getContext();this._si.processIntersections(r,e,o,i)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(_n),Cn=function t(){if(this._quadrantSegments=t.DEFAULT_QUADRANT_SEGMENTS,this._endCapStyle=t.CAP_ROUND,this._joinStyle=t.JOIN_ROUND,this._mitreLimit=t.DEFAULT_MITRE_LIMIT,this._isSingleSided=!1,this._simplifyFactor=t.DEFAULT_SIMPLIFY_FACTOR,0===arguments.length);else if(1===arguments.length){var e=arguments[0];this.setQuadrantSegments(e)}else if(2===arguments.length){var n=arguments[0],i=arguments[1];this.setQuadrantSegments(n),this.setEndCapStyle(i)}else if(4===arguments.length){var r=arguments[0],o=arguments[1],s=arguments[2],a=arguments[3];this.setQuadrantSegments(r),this.setEndCapStyle(o),this.setJoinStyle(s),this.setMitreLimit(a)}},bn={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}};Cn.prototype.getEndCapStyle=function(){return this._endCapStyle},Cn.prototype.isSingleSided=function(){return this._isSingleSided},Cn.prototype.setQuadrantSegments=function(t){this._quadrantSegments=t,0===this._quadrantSegments&&(this._joinStyle=Cn.JOIN_BEVEL),this._quadrantSegments<0&&(this._joinStyle=Cn.JOIN_MITRE,this._mitreLimit=Math.abs(this._quadrantSegments)),t<=0&&(this._quadrantSegments=1),this._joinStyle!==Cn.JOIN_ROUND&&(this._quadrantSegments=Cn.DEFAULT_QUADRANT_SEGMENTS)},Cn.prototype.getJoinStyle=function(){return this._joinStyle},Cn.prototype.setJoinStyle=function(t){this._joinStyle=t},Cn.prototype.setSimplifyFactor=function(t){this._simplifyFactor=t<0?0:t},Cn.prototype.getSimplifyFactor=function(){return this._simplifyFactor},Cn.prototype.getQuadrantSegments=function(){return this._quadrantSegments},Cn.prototype.setEndCapStyle=function(t){this._endCapStyle=t},Cn.prototype.getMitreLimit=function(){return this._mitreLimit},Cn.prototype.setMitreLimit=function(t){this._mitreLimit=t},Cn.prototype.setSingleSided=function(t){this._isSingleSided=t},Cn.prototype.interfaces_=function(){return[]},Cn.prototype.getClass=function(){return Cn},Cn.bufferDistanceError=function(t){var e=Math.PI/2/t;return 1-Math.cos(e/2)},bn.CAP_ROUND.get=function(){return 1},bn.CAP_FLAT.get=function(){return 2},bn.CAP_SQUARE.get=function(){return 3},bn.JOIN_ROUND.get=function(){return 1},bn.JOIN_MITRE.get=function(){return 2},bn.JOIN_BEVEL.get=function(){return 3},bn.DEFAULT_QUADRANT_SEGMENTS.get=function(){return 8},bn.DEFAULT_MITRE_LIMIT.get=function(){return 5},bn.DEFAULT_SIMPLIFY_FACTOR.get=function(){return.01},Object.defineProperties(Cn,bn);var Sn=function(t){this._distanceTol=null,this._isDeleted=null,this._angleOrientation=at.COUNTERCLOCKWISE,this._inputLine=t||null},wn={INIT:{configurable:!0},DELETE:{configurable:!0},KEEP:{configurable:!0},NUM_PTS_TO_CHECK:{configurable:!0}};Sn.prototype.isDeletable=function(t,e,n,i){var r=this._inputLine[t],o=this._inputLine[e],s=this._inputLine[n];return!!this.isConcave(r,o,s)&&!!this.isShallow(r,o,s,i)&&this.isShallowSampled(r,o,t,n,i)},Sn.prototype.deleteShallowConcavities=function(){for(var t=1,e=this.findNextNonDeletedIndex(t),n=this.findNextNonDeletedIndex(e),i=!1;n=0;i--)this.addPt(t[i])},Ln.prototype.isRedundant=function(t){if(this._ptList.size()<1)return!1;var e=this._ptList.get(this._ptList.size()-1);return t.distance(e)Math.PI;)t-=Rn.PI_TIMES_2;for(;t<=-Math.PI;)t+=Rn.PI_TIMES_2;return t},Rn.angle=function(){if(1===arguments.length){var t=arguments[0];return Math.atan2(t.y,t.x)}if(2===arguments.length){var e=arguments[0],n=arguments[1],i=n.x-e.x,r=n.y-e.y;return Math.atan2(r,i)}},Rn.isAcute=function(t,e,n){var i=t.x-e.x,r=t.y-e.y;return i*(n.x-e.x)+r*(n.y-e.y)>0},Rn.isObtuse=function(t,e,n){var i=t.x-e.x,r=t.y-e.y;return i*(n.x-e.x)+r*(n.y-e.y)<0},Rn.interiorAngle=function(t,e,n){var i=Rn.angle(e,t),r=Rn.angle(e,n);return Math.abs(r-i)},Rn.normalizePositive=function(t){if(t<0){for(;t<0;)t+=Rn.PI_TIMES_2;t>=Rn.PI_TIMES_2&&(t=0)}else{for(;t>=Rn.PI_TIMES_2;)t-=Rn.PI_TIMES_2;t<0&&(t=0)}return t},Rn.angleBetween=function(t,e,n){var i=Rn.angle(e,t),r=Rn.angle(e,n);return Rn.diff(i,r)},Rn.diff=function(t,e){var n=null;return(n=tMath.PI&&(n=2*Math.PI-n),n},Rn.toRadians=function(t){return t*Math.PI/180},Rn.getTurn=function(t,e){var n=Math.sin(e-t);return n>0?Rn.COUNTERCLOCKWISE:n<0?Rn.CLOCKWISE:Rn.NONE},Rn.angleBetweenOriented=function(t,e,n){var i=Rn.angle(e,t),r=Rn.angle(e,n)-i;return r<=-Math.PI?r+Rn.PI_TIMES_2:r>Math.PI?r-Rn.PI_TIMES_2:r},On.PI_TIMES_2.get=function(){return 2*Math.PI},On.PI_OVER_2.get=function(){return Math.PI/2},On.PI_OVER_4.get=function(){return Math.PI/4},On.COUNTERCLOCKWISE.get=function(){return at.COUNTERCLOCKWISE},On.CLOCKWISE.get=function(){return at.CLOCKWISE},On.NONE.get=function(){return at.COLLINEAR},Object.defineProperties(Rn,On);var Tn=function t(){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 yn,this._seg1=new yn,this._offset0=new yn,this._offset1=new yn,this._side=0,this._hasNarrowConcaveAngle=!1;var e=arguments[0],n=arguments[1],i=arguments[2];this._precisionModel=e,this._bufParams=n,this._li=new rt,this._filletAngleQuantum=Math.PI/2/n.getQuadrantSegments(),n.getQuadrantSegments()>=8&&n.getJoinStyle()===Cn.JOIN_ROUND&&(this._closingSegLengthFactor=t.MAX_CLOSING_SEG_LEN_FACTOR),this.init(i)},An={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}};Tn.prototype.addNextSegment=function(t,e){if(this._s0=this._s1,this._s1=this._s2,this._s2=t,this._seg0.setCoordinates(this._s0,this._s1),this.computeOffsetSegment(this._seg0,this._side,this._distance,this._offset0),this._seg1.setCoordinates(this._s1,this._s2),this.computeOffsetSegment(this._seg1,this._side,this._distance,this._offset1),this._s1.equals(this._s2))return null;var n=at.computeOrientation(this._s0,this._s1,this._s2),i=n===at.CLOCKWISE&&this._side===be.LEFT||n===at.COUNTERCLOCKWISE&&this._side===be.RIGHT;0===n?this.addCollinear(e):i?this.addOutsideTurn(n,e):this.addInsideTurn(n,e)},Tn.prototype.addLineEndCap=function(t,e){var n=new yn(t,e),i=new yn;this.computeOffsetSegment(n,be.LEFT,this._distance,i);var r=new yn;this.computeOffsetSegment(n,be.RIGHT,this._distance,r);var o=e.x-t.x,s=e.y-t.y,a=Math.atan2(s,o);switch(this._bufParams.getEndCapStyle()){case Cn.CAP_ROUND:this._segList.addPt(i.p1),this.addFilletArc(e,a+Math.PI/2,a-Math.PI/2,at.CLOCKWISE,this._distance),this._segList.addPt(r.p1);break;case Cn.CAP_FLAT:this._segList.addPt(i.p1),this._segList.addPt(r.p1);break;case Cn.CAP_SQUARE:var u=new C;u.x=Math.abs(this._distance)*Math.cos(a),u.y=Math.abs(this._distance)*Math.sin(a);var l=new C(i.p1.x+u.x,i.p1.y+u.y),c=new C(r.p1.x+u.x,r.p1.y+u.y);this._segList.addPt(l),this._segList.addPt(c)}},Tn.prototype.getCoordinates=function(){return this._segList.getCoordinates()},Tn.prototype.addMitreJoin=function(t,e,n,i){var r=!0,o=null;try{o=X.intersection(e.p0,e.p1,n.p0,n.p1),(i<=0?1:o.distance(t)/Math.abs(i))>this._bufParams.getMitreLimit()&&(r=!1)}catch(t){if(!(t instanceof V))throw t;o=new C(0,0),r=!1}r?this._segList.addPt(o):this.addLimitedMitreJoin(e,n,i,this._bufParams.getMitreLimit())},Tn.prototype.addFilletCorner=function(t,e,n,i,r){var o=e.x-t.x,s=e.y-t.y,a=Math.atan2(s,o),u=n.x-t.x,l=n.y-t.y,c=Math.atan2(l,u);i===at.CLOCKWISE?a<=c&&(a+=2*Math.PI):a>=c&&(a-=2*Math.PI),this._segList.addPt(e),this.addFilletArc(t,a,c,i,r),this._segList.addPt(n)},Tn.prototype.addOutsideTurn=function(t,e){if(this._offset0.p1.distance(this._offset1.p0)0){var n=new C((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 i=new C((this._closingSegLengthFactor*this._offset1.p0.x+this._s1.x)/(this._closingSegLengthFactor+1),(this._closingSegLengthFactor*this._offset1.p0.y+this._s1.y)/(this._closingSegLengthFactor+1));this._segList.addPt(i)}else this._segList.addPt(this._s1);this._segList.addPt(this._offset1.p0)}},Tn.prototype.createCircle=function(t){var e=new C(t.x+this._distance,t.y);this._segList.addPt(e),this.addFilletArc(t,0,2*Math.PI,-1,this._distance),this._segList.closeRing()},Tn.prototype.addBevelJoin=function(t,e){this._segList.addPt(t.p1),this._segList.addPt(e.p0)},Tn.prototype.init=function(t){this._distance=t,this._maxCurveSegmentError=t*(1-Math.cos(this._filletAngleQuantum/2)),this._segList=new Ln,this._segList.setPrecisionModel(this._precisionModel),this._segList.setMinimumVertexDistance(t*Tn.CURVE_VERTEX_SNAP_DISTANCE_FACTOR)},Tn.prototype.addCollinear=function(t){this._li.computeIntersection(this._s0,this._s1,this._s1,this._s2),this._li.getIntersectionNum()>=2&&(this._bufParams.getJoinStyle()===Cn.JOIN_BEVEL||this._bufParams.getJoinStyle()===Cn.JOIN_MITRE?(t&&this._segList.addPt(this._offset0.p1),this._segList.addPt(this._offset1.p0)):this.addFilletCorner(this._s1,this._offset0.p1,this._offset1.p0,at.CLOCKWISE,this._distance))},Tn.prototype.closeRing=function(){this._segList.closeRing()},Tn.prototype.hasNarrowConcaveAngle=function(){return this._hasNarrowConcaveAngle},Tn.prototype.interfaces_=function(){return[]},Tn.prototype.getClass=function(){return Tn},An.OFFSET_SEGMENT_SEPARATION_FACTOR.get=function(){return.001},An.INSIDE_TURN_VERTEX_SNAP_DISTANCE_FACTOR.get=function(){return.001},An.CURVE_VERTEX_SNAP_DISTANCE_FACTOR.get=function(){return 1e-6},An.MAX_CLOSING_SEG_LEN_FACTOR.get=function(){return 80},Object.defineProperties(Tn,An);var Dn=function(){this._distance=0,this._precisionModel=null,this._bufParams=null;var t=arguments[0],e=arguments[1];this._precisionModel=t,this._bufParams=e};Dn.prototype.getOffsetCurve=function(t,e){if(this._distance=e,0===e)return null;var n=e<0,i=Math.abs(e),r=this.getSegGen(i);t.length<=1?this.computePointCurve(t[0],r):this.computeOffsetCurve(t,n,r);var o=r.getCoordinates();return n&&St.reverse(o),o},Dn.prototype.computeSingleSidedBufferCurve=function(t,e,n){var i=this.simplifyTolerance(this._distance);if(e){n.addSegments(t,!0);var r=Sn.simplify(t,-i),o=r.length-1;n.initSideSegments(r[o],r[o-1],be.LEFT),n.addFirstSegment();for(var s=o-2;s>=0;s--)n.addNextSegment(r[s],!0)}else{n.addSegments(t,!1);var a=Sn.simplify(t,i),u=a.length-1;n.initSideSegments(a[0],a[1],be.LEFT),n.addFirstSegment();for(var l=2;l<=u;l++)n.addNextSegment(a[l],!0)}n.addLastSegment(),n.closeRing()},Dn.prototype.computeRingBufferCurve=function(t,e,n){var i=this.simplifyTolerance(this._distance);e===be.RIGHT&&(i=-i);var r=Sn.simplify(t,i),o=r.length-1;n.initSideSegments(r[o-1],r[0],e);for(var s=1;s<=o;s++){var a=1!==s;n.addNextSegment(r[s],a)}n.closeRing()},Dn.prototype.computeLineBufferCurve=function(t,e){var n=this.simplifyTolerance(this._distance),i=Sn.simplify(t,n),r=i.length-1;e.initSideSegments(i[0],i[1],be.LEFT);for(var o=2;o<=r;o++)e.addNextSegment(i[o],!0);e.addLastSegment(),e.addLineEndCap(i[r-1],i[r]);var s=Sn.simplify(t,-n),a=s.length-1;e.initSideSegments(s[a],s[a-1],be.LEFT);for(var u=a-2;u>=0;u--)e.addNextSegment(s[u],!0);e.addLastSegment(),e.addLineEndCap(s[1],s[0]),e.closeRing()},Dn.prototype.computePointCurve=function(t,e){switch(this._bufParams.getEndCapStyle()){case Cn.CAP_ROUND:e.createCircle(t);break;case Cn.CAP_SQUARE:e.createSquare(t)}},Dn.prototype.getLineCurve=function(t,e){if(this._distance=e,e<0&&!this._bufParams.isSingleSided())return null;if(0===e)return null;var n=Math.abs(e),i=this.getSegGen(n);if(t.length<=1)this.computePointCurve(t[0],i);else if(this._bufParams.isSingleSided()){var r=e<0;this.computeSingleSidedBufferCurve(t,r,i)}else this.computeLineBufferCurve(t,i);return i.getCoordinates()},Dn.prototype.getBufferParameters=function(){return this._bufParams},Dn.prototype.simplifyTolerance=function(t){return t*this._bufParams.getSimplifyFactor()},Dn.prototype.getRingCurve=function(t,e,n){if(this._distance=n,t.length<=2)return this.getLineCurve(t,n);if(0===n)return Dn.copyCoordinates(t);var i=this.getSegGen(n);return this.computeRingBufferCurve(t,e,i),i.getCoordinates()},Dn.prototype.computeOffsetCurve=function(t,e,n){var i=this.simplifyTolerance(this._distance);if(e){var r=Sn.simplify(t,-i),o=r.length-1;n.initSideSegments(r[o],r[o-1],be.LEFT),n.addFirstSegment();for(var s=o-2;s>=0;s--)n.addNextSegment(r[s],!0)}else{var a=Sn.simplify(t,i),u=a.length-1;n.initSideSegments(a[0],a[1],be.LEFT),n.addFirstSegment();for(var l=2;l<=u;l++)n.addNextSegment(a[l],!0)}n.addLastSegment()},Dn.prototype.getSegGen=function(t){return new Tn(this._precisionModel,this._bufParams,t)},Dn.prototype.interfaces_=function(){return[]},Dn.prototype.getClass=function(){return Dn},Dn.copyCoordinates=function(t){for(var e=new Array(t.length).fill(null),n=0;nr.getMaxY()||this.findStabbedSegments(t,i.getDirectedEdges(),e)}return e}if(3===arguments.length)if(R(arguments[2],It)&&arguments[0]instanceof C&&arguments[1]instanceof ze){for(var o=arguments[0],s=arguments[1],a=arguments[2],u=s.getEdge().getCoordinates(),l=0;lthis._seg.p1.y&&this._seg.reverse(),!(Math.max(this._seg.p0.x,this._seg.p1.x)this._seg.p1.y||at.computeOrientation(this._seg.p0,this._seg.p1,o)===at.RIGHT)){var c=s.getDepth(be.LEFT);this._seg.p0.equals(u[l])||(c=s.getDepth(be.RIGHT));var p=new Gn(this._seg,c);a.add(p)}}else if(R(arguments[2],It)&&arguments[0]instanceof C&&R(arguments[1],It))for(var h=arguments[0],f=arguments[2],g=arguments[1].iterator();g.hasNext();){var y=g.next();y.isForward()&&this.findStabbedSegments(h,y,f)}},Mn.prototype.getDepth=function(t){var e=this.findStabbedSegments(t);return 0===e.size()?0:$e.min(e)._leftDepth},Mn.prototype.interfaces_=function(){return[]},Mn.prototype.getClass=function(){return Mn},Fn.DepthSegment.get=function(){return Gn},Object.defineProperties(Mn,Fn);var Gn=function(){this._upwardSeg=null,this._leftDepth=null;var t=arguments[0],e=arguments[1];this._upwardSeg=new yn(t),this._leftDepth=e};Gn.prototype.compareTo=function(t){var e=t;if(this._upwardSeg.minX()>=e._upwardSeg.maxX())return 1;if(this._upwardSeg.maxX()<=e._upwardSeg.minX())return-1;var n=this._upwardSeg.orientationIndex(e._upwardSeg);return 0!==n||0!=(n=-1*e._upwardSeg.orientationIndex(this._upwardSeg))?n:this._upwardSeg.compareTo(e._upwardSeg)},Gn.prototype.compareX=function(t,e){var n=t.p0.compareTo(e.p0);return 0!==n?n:t.p1.compareTo(e.p1)},Gn.prototype.toString=function(){return this._upwardSeg.toString()},Gn.prototype.interfaces_=function(){return[x]},Gn.prototype.getClass=function(){return Gn};var Bn=function(t,e,n){this.p0=t||null,this.p1=e||null,this.p2=n||null};Bn.prototype.area=function(){return Bn.area(this.p0,this.p1,this.p2)},Bn.prototype.signedArea=function(){return Bn.signedArea(this.p0,this.p1,this.p2)},Bn.prototype.interpolateZ=function(t){if(null===t)throw new m("Supplied point is null.");return Bn.interpolateZ(t,this.p0,this.p1,this.p2)},Bn.prototype.longestSideLength=function(){return Bn.longestSideLength(this.p0,this.p1,this.p2)},Bn.prototype.isAcute=function(){return Bn.isAcute(this.p0,this.p1,this.p2)},Bn.prototype.circumcentre=function(){return Bn.circumcentre(this.p0,this.p1,this.p2)},Bn.prototype.area3D=function(){return Bn.area3D(this.p0,this.p1,this.p2)},Bn.prototype.centroid=function(){return Bn.centroid(this.p0,this.p1,this.p2)},Bn.prototype.inCentre=function(){return Bn.inCentre(this.p0,this.p1,this.p2)},Bn.prototype.interfaces_=function(){return[]},Bn.prototype.getClass=function(){return Bn},Bn.area=function(t,e,n){return Math.abs(((n.x-t.x)*(e.y-t.y)-(e.x-t.x)*(n.y-t.y))/2)},Bn.signedArea=function(t,e,n){return((n.x-t.x)*(e.y-t.y)-(e.x-t.x)*(n.y-t.y))/2},Bn.det=function(t,e,n,i){return t*i-e*n},Bn.interpolateZ=function(t,e,n,i){var r=e.x,o=e.y,s=n.x-r,a=i.x-r,u=n.y-o,l=i.y-o,c=s*l-a*u,p=t.x-r,h=t.y-o,f=(l*p-a*h)/c,g=(-u*p+s*h)/c;return e.z+f*(n.z-e.z)+g*(i.z-e.z)},Bn.longestSideLength=function(t,e,n){var i=t.distance(e),r=e.distance(n),o=n.distance(t),s=i;return r>s&&(s=r),o>s&&(s=o),s},Bn.isAcute=function(t,e,n){return!!Rn.isAcute(t,e,n)&&!!Rn.isAcute(e,n,t)&&!!Rn.isAcute(n,t,e)},Bn.circumcentre=function(t,e,n){var i=n.x,r=n.y,o=t.x-i,s=t.y-r,a=e.x-i,u=e.y-r,l=2*Bn.det(o,s,a,u),c=Bn.det(s,o*o+s*s,u,a*a+u*u),p=Bn.det(o,o*o+s*s,a,a*a+u*u);return new C(i-c/l,r+p/l)},Bn.perpendicularBisector=function(t,e){var n=e.x-t.x,i=e.y-t.y,r=new X(t.x+n/2,t.y+i/2,1),o=new X(t.x-i+n/2,t.y+n+i/2,1);return new X(r,o)},Bn.angleBisector=function(t,e,n){var i=e.distance(t),r=i/(i+e.distance(n)),o=n.x-t.x,s=n.y-t.y;return new C(t.x+r*o,t.y+r*s)},Bn.area3D=function(t,e,n){var i=e.x-t.x,r=e.y-t.y,o=e.z-t.z,s=n.x-t.x,a=n.y-t.y,u=n.z-t.z,l=r*u-o*a,c=o*s-i*u,p=i*a-r*s,h=l*l+c*c+p*p;return Math.sqrt(h)/2},Bn.centroid=function(t,e,n){var i=(t.x+e.x+n.x)/3,r=(t.y+e.y+n.y)/3;return new C(i,r)},Bn.inCentre=function(t,e,n){var i=e.distance(n),r=t.distance(n),o=t.distance(e),s=i+r+o,a=(i*t.x+r*e.x+o*n.x)/s,u=(i*t.y+r*e.y+o*n.y)/s;return new C(a,u)};var qn=function(){this._inputGeom=null,this._distance=null,this._curveBuilder=null,this._curveList=new Nt;var t=arguments[0],e=arguments[1],n=arguments[2];this._inputGeom=t,this._distance=e,this._curveBuilder=n};qn.prototype.addPoint=function(t){if(this._distance<=0)return null;var e=t.getCoordinates(),n=this._curveBuilder.getLineCurve(e,this._distance);this.addCurve(n,L.EXTERIOR,L.INTERIOR)},qn.prototype.addPolygon=function(t){var e=this._distance,n=be.LEFT;this._distance<0&&(e=-this._distance,n=be.RIGHT);var i=t.getExteriorRing(),r=St.removeRepeatedPoints(i.getCoordinates());if(this._distance<0&&this.isErodedCompletely(i,this._distance))return null;if(this._distance<=0&&r.length<3)return null;this.addPolygonRing(r,e,n,L.EXTERIOR,L.INTERIOR);for(var o=0;o0&&this.isErodedCompletely(s,-this._distance)||this.addPolygonRing(a,e,be.opposite(n),L.INTERIOR,L.EXTERIOR)}},qn.prototype.isTriangleErodedCompletely=function(t,e){var n=new Bn(t[0],t[1],t[2]),i=n.inCentre();return at.distancePointLine(i,n.p0,n.p1)=ee.MINIMUM_VALID_SIZE&&at.isCCW(t)&&(o=r,s=i,n=be.opposite(n));var a=this._curveBuilder.getRingCurve(t,n,e);this.addCurve(a,o,s)},qn.prototype.add=function(t){if(t.isEmpty())return null;t instanceof $t?this.addPolygon(t):t instanceof Zt?this.addLineString(t):t instanceof Jt?this.addPoint(t):(t instanceof te||t instanceof Vt||t instanceof ne||t instanceof zt)&&this.addCollection(t)},qn.prototype.isErodedCompletely=function(t,e){var n=t.getCoordinates();if(n.length<4)return e<0;if(4===n.length)return this.isTriangleErodedCompletely(n,e);var i=t.getEnvelopeInternal(),r=Math.min(i.getHeight(),i.getWidth());return e<0&&2*Math.abs(e)>r},qn.prototype.addCollection=function(t){for(var e=0;e=this._max)throw new i;var t=this._parent.getGeometryN(this._index++);return t instanceof zt?(this._subcollectionIterator=new kn(t),this._subcollectionIterator.next()):t},kn.prototype.remove=function(){throw new Error(this.getClass().getName())},kn.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)},kn.prototype.interfaces_=function(){return[xt]},kn.prototype.getClass=function(){return kn},kn.isAtomic=function(t){return!(t instanceof zt)};var zn=function(){this._geom=null;var t=arguments[0];this._geom=t};zn.prototype.locate=function(t){return zn.locate(t,this._geom)},zn.prototype.interfaces_=function(){return[Un]},zn.prototype.getClass=function(){return zn},zn.isPointInRing=function(t,e){return!!e.getEnvelopeInternal().intersects(t)&&at.isPointInRing(t,e.getCoordinates())},zn.containsPointInPolygon=function(t,e){if(e.isEmpty())return!1;var n=e.getExteriorRing();if(!zn.isPointInRing(t,n))return!1;for(var i=0;i=0;n--){var i=this._edgeList.get(n),r=i.getSym();null===e&&(e=r),null!==t&&r.setNext(t),t=i}e.setNext(t)},e.prototype.computeDepths=function(){if(1===arguments.length){var t=arguments[0],e=this.findIndex(t),n=t.getDepth(be.LEFT),i=t.getDepth(be.RIGHT),r=this.computeDepths(e+1,this._edgeList.size(),n);if(this.computeDepths(0,e,r)!==i)throw new Le("depth mismatch at "+t.getCoordinate())}else if(3===arguments.length){for(var o=arguments[1],s=arguments[2],a=arguments[0];a=0;r--){var o=this._resultAreaEdgeList.get(r),s=o.getSym();switch(null===e&&o.getEdgeRing()===t&&(e=o),i){case this._SCANNING_FOR_INCOMING:if(s.getEdgeRing()!==t)continue;n=s,i=this._LINKING_TO_OUTGOING;break;case this._LINKING_TO_OUTGOING:if(o.getEdgeRing()!==t)continue;n.setNextMin(o),i=this._SCANNING_FOR_INCOMING}}i===this._LINKING_TO_OUTGOING&&(et.isTrue(null!==e,"found null for first outgoing dirEdge"),et.isTrue(e.getEdgeRing()===t,"unable to link last incoming dirEdge"),n.setNextMin(e))},e.prototype.getOutgoingDegree=function(){if(0===arguments.length){for(var t=0,e=this.iterator();e.hasNext();)e.next().isInResult()&&t++;return t}if(1===arguments.length){for(var n=arguments[0],i=0,r=this.iterator();r.hasNext();)r.next().getEdgeRing()===n&&i++;return i}},e.prototype.getLabel=function(){return this._label},e.prototype.findCoveredLineEdges=function(){for(var t=L.NONE,e=this.iterator();e.hasNext();){var n=e.next(),i=n.getSym();if(!n.isLineEdge()){if(n.isInResult()){t=L.INTERIOR;break}if(i.isInResult()){t=L.EXTERIOR;break}}}if(t===L.NONE)return null;for(var r=t,o=this.iterator();o.hasNext();){var s=o.next(),a=s.getSym();s.isLineEdge()?s.getEdge().setCovered(r===L.INTERIOR):(s.isInResult()&&(r=L.EXTERIOR),a.isInResult()&&(r=L.INTERIOR))}},e.prototype.computeLabelling=function(e){t.prototype.computeLabelling.call(this,e),this._label=new Te(L.NONE);for(var n=this.iterator();n.hasNext();)for(var i=n.next().getEdge().getLabel(),r=0;r<2;r++){var o=i.getLocation(r);o!==L.INTERIOR&&o!==L.BOUNDARY||this._label.setLocation(r,L.INTERIOR)}},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(Vn),Xn=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createNode=function(t){return new Ge(t,new Yn)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(Ve),jn=function t(){this._pts=null,this._orientation=null;var e=arguments[0];this._pts=e,this._orientation=t.orientation(e)};jn.prototype.compareTo=function(t){var e=t;return jn.compareOriented(this._pts,this._orientation,e._pts,e._orientation)},jn.prototype.interfaces_=function(){return[x]},jn.prototype.getClass=function(){return jn},jn.orientation=function(t){return 1===St.increasingDirection(t)},jn.compareOriented=function(t,e,n,i){for(var r=e?1:-1,o=i?1:-1,s=e?t.length:-1,a=i?n.length:-1,u=e?0:t.length-1,l=i?0:n.length-1;;){var c=t[u].compareTo(n[l]);if(0!==c)return c;var p=(u+=r)===s,h=(l+=o)===a;if(p&&!h)return-1;if(!p&&h)return 1;if(p&&h)return 0}};var Hn=function(){this._edges=new Nt,this._ocaMap=new p};Hn.prototype.print=function(t){t.print("MULTILINESTRING ( ");for(var e=0;e0&&t.print(","),t.print("(");for(var i=n.getCoordinates(),r=0;r0&&t.print(","),t.print(i[r].x+" "+i[r].y);t.println(")")}t.print(") ")},Hn.prototype.addAll=function(t){for(var e=t.iterator();e.hasNext();)this.add(e.next())},Hn.prototype.findEdgeIndex=function(t){for(var e=0;e0||!e.coord.equals2D(i);r||n--;var o=new Array(n).fill(null),s=0;o[s++]=new C(t.coord);for(var a=t.segmentIndex+1;a<=e.segmentIndex;a++)o[s++]=this.edge.pts[a];return r&&(o[s]=e.coord),new ni(o,new Te(this.edge._label))},Jn.prototype.add=function(t,e,n){var i=new Kn(t,e,n),r=this._nodeMap.get(i);return null!==r?r:(this._nodeMap.put(i,i),i)},Jn.prototype.isIntersection=function(t){for(var e=this.iterator();e.hasNext();)if(e.next().coord.equals(t))return!0;return!1},Jn.prototype.interfaces_=function(){return[]},Jn.prototype.getClass=function(){return Jn};var Qn=function(){};Qn.prototype.getChainStartIndices=function(t){var e=0,n=new Nt;n.add(new D(e));do{var i=this.findChainEnd(t,e);n.add(new D(i)),e=i}while(en?e:n},$n.prototype.getMinX=function(t){var e=this.pts[this.startIndex[t]].x,n=this.pts[this.startIndex[t+1]].x;return ee&&(i=1),this._depth[t][n]=i}}},ti.prototype.getDelta=function(t){return this._depth[t][be.RIGHT]-this._depth[t][be.LEFT]},ti.prototype.getLocation=function(t,e){return this._depth[t][e]<=0?L.EXTERIOR:L.INTERIOR},ti.prototype.toString=function(){return"A: "+this._depth[0][1]+","+this._depth[0][2]+" B: "+this._depth[1][1]+","+this._depth[1][2]},ti.prototype.add=function(){if(1===arguments.length)for(var t=arguments[0],e=0;e<2;e++)for(var n=1;n<3;n++){var i=t.getLocation(e,n);i!==L.EXTERIOR&&i!==L.INTERIOR||(this.isNull(e,n)?this._depth[e][n]=ti.depthAtLocation(i):this._depth[e][n]+=ti.depthAtLocation(i))}else if(3===arguments.length){var r=arguments[0],o=arguments[1];arguments[2]===L.INTERIOR&&this._depth[r][o]++}},ti.prototype.interfaces_=function(){return[]},ti.prototype.getClass=function(){return ti},ti.depthAtLocation=function(t){return t===L.EXTERIOR?0:t===L.INTERIOR?1:ti.NULL_VALUE},ei.NULL_VALUE.get=function(){return-1},Object.defineProperties(ti,ei);var ni=function(t){function e(){if(t.call(this),this.pts=null,this._env=null,this.eiList=new Jn(this),this._name=null,this._mce=null,this._isIsolated=!0,this._depth=new ti,this._depthDelta=0,1===arguments.length){var n=arguments[0];e.call(this,n,null)}else if(2===arguments.length){var i=arguments[0],r=arguments[1];this.pts=i,this._label=r}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDepth=function(){return this._depth},e.prototype.getCollapsedEdge=function(){var t=new Array(2).fill(null);return t[0]=this.pts[0],t[1]=this.pts[1],new e(t,Te.toLineLabel(this._label))},e.prototype.isIsolated=function(){return this._isIsolated},e.prototype.getCoordinates=function(){return this.pts},e.prototype.setIsolated=function(t){this._isIsolated=t},e.prototype.setName=function(t){this._name=t},e.prototype.equals=function(t){if(!(t instanceof e))return!1;var n=t;if(this.pts.length!==n.pts.length)return!1;for(var i=!0,r=!0,o=this.pts.length,s=0;s0?this.pts[0]:null;if(1===arguments.length){var t=arguments[0];return this.pts[t]}},e.prototype.print=function(t){t.print("edge "+this._name+": "),t.print("LINESTRING (");for(var e=0;e0&&t.print(","),t.print(this.pts[e].x+" "+this.pts[e].y);t.print(") "+this._label+" "+this._depthDelta)},e.prototype.computeIM=function(t){e.updateIM(this._label,t)},e.prototype.isCollapsed=function(){return!!this._label.isArea()&&3===this.pts.length&&!!this.pts[0].equals(this.pts[2])},e.prototype.isClosed=function(){return this.pts[0].equals(this.pts[this.pts.length-1])},e.prototype.getMaximumSegmentIndex=function(){return this.pts.length-1},e.prototype.getDepthDelta=function(){return this._depthDelta},e.prototype.getNumPoints=function(){return this.pts.length},e.prototype.printReverse=function(t){t.print("edge "+this._name+": ");for(var e=this.pts.length-1;e>=0;e--)t.print(this.pts[e]+" ");t.println("")},e.prototype.getMonotoneChainEdge=function(){return null===this._mce&&(this._mce=new $n(this)),this._mce},e.prototype.getEnvelope=function(){if(null===this._env){this._env=new j;for(var t=0;t0&&t.append(","),t.append(this.pts[e].x+" "+this.pts[e].y);return t.append(") "+this._label+" "+this._depthDelta),t.toString()},e.prototype.isPointwiseEqual=function(t){if(this.pts.length!==t.pts.length)return!1;for(var e=0;ei||this._maxyo;if(s)return!1;var a=this.intersectsToleranceSquare(t,e);return et.isTrue(!(s&&a),"Found bad envelope test"),a},ai.prototype.initCorners=function(t){this._minx=t.x-.5,this._maxx=t.x+.5,this._miny=t.y-.5,this._maxy=t.y+.5,this._corner[0]=new C(this._maxx,this._maxy),this._corner[1]=new C(this._minx,this._maxy),this._corner[2]=new C(this._minx,this._miny),this._corner[3]=new C(this._maxx,this._miny)},ai.prototype.intersects=function(t,e){return 1===this._scaleFactor?this.intersectsScaled(t,e):(this.copyScaled(t,this._p0Scaled),this.copyScaled(e,this._p1Scaled),this.intersectsScaled(this._p0Scaled,this._p1Scaled))},ai.prototype.scale=function(t){return Math.round(t*this._scaleFactor)},ai.prototype.getCoordinate=function(){return this._originalPt},ai.prototype.copyScaled=function(t,e){e.x=this.scale(t.x),e.y=this.scale(t.y)},ai.prototype.getSafeEnvelope=function(){if(null===this._safeEnv){var t=ai.SAFE_ENV_EXPANSION_FACTOR/this._scaleFactor;this._safeEnv=new j(this._originalPt.x-t,this._originalPt.x+t,this._originalPt.y-t,this._originalPt.y+t)}return this._safeEnv},ai.prototype.intersectsPixelClosure=function(t,e){return this._li.computeIntersection(t,e,this._corner[0],this._corner[1]),!!this._li.hasIntersection()||(this._li.computeIntersection(t,e,this._corner[1],this._corner[2]),!!this._li.hasIntersection()||(this._li.computeIntersection(t,e,this._corner[2],this._corner[3]),!!this._li.hasIntersection()||(this._li.computeIntersection(t,e,this._corner[3],this._corner[0]),!!this._li.hasIntersection())))},ai.prototype.intersectsToleranceSquare=function(t,e){var n=!1,i=!1;return this._li.computeIntersection(t,e,this._corner[0],this._corner[1]),!!this._li.isProper()||(this._li.computeIntersection(t,e,this._corner[1],this._corner[2]),!!this._li.isProper()||(this._li.hasIntersection()&&(n=!0),this._li.computeIntersection(t,e,this._corner[2],this._corner[3]),!!this._li.isProper()||(this._li.hasIntersection()&&(i=!0),this._li.computeIntersection(t,e,this._corner[3],this._corner[0]),!!this._li.isProper()||!(!n||!i)||!!t.equals(this._pt)||!!e.equals(this._pt))))},ai.prototype.addSnappedNode=function(t,e){var n=t.getCoordinate(e),i=t.getCoordinate(e+1);return!!this.intersects(n,i)&&(t.addIntersection(this.getCoordinate(),e),!0)},ai.prototype.interfaces_=function(){return[]},ai.prototype.getClass=function(){return ai},ui.SAFE_ENV_EXPANSION_FACTOR.get=function(){return.75},Object.defineProperties(ai,ui);var li=function(){this.tempEnv1=new j,this.selectedSegment=new yn};li.prototype.select=function(){if(1===arguments.length);else if(2===arguments.length){var t=arguments[1];arguments[0].getLineSegment(t,this.selectedSegment),this.select(this.selectedSegment)}},li.prototype.interfaces_=function(){return[]},li.prototype.getClass=function(){return li};var ci=function(){this._index=null;var t=arguments[0];this._index=t},pi={HotPixelSnapAction:{configurable:!0}};ci.prototype.snap=function(){if(1===arguments.length){var t=arguments[0];return this.snap(t,null,-1)}if(3===arguments.length){var e=arguments[0],n=arguments[1],i=arguments[2],r=e.getSafeEnvelope(),o=new hi(e,n,i);return this._index.query(r,{interfaces_:function(){return[Ze]},visitItem:function(t){t.select(r,o)}}),o.isNodeAdded()}},ci.prototype.interfaces_=function(){return[]},ci.prototype.getClass=function(){return ci},pi.HotPixelSnapAction.get=function(){return hi},Object.defineProperties(ci,pi);var hi=function(t){function e(){t.call(this),this._hotPixel=null,this._parentEdge=null,this._hotPixelVertexIndex=null,this._isNodeAdded=!1;var e=arguments[0],n=arguments[1],i=arguments[2];this._hotPixel=e,this._parentEdge=n,this._hotPixelVertexIndex=i}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.isNodeAdded=function(){return this._isNodeAdded},e.prototype.select=function(){if(2!==arguments.length)return t.prototype.select.apply(this,arguments);var e=arguments[1],n=arguments[0].getContext();if(null!==this._parentEdge&&n===this._parentEdge&&e===this._hotPixelVertexIndex)return null;this._isNodeAdded=this._hotPixel.addSnappedNode(n,e)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(li),fi=function(){this._li=null,this._interiorIntersections=null;var t=arguments[0];this._li=t,this._interiorIntersections=new Nt};fi.prototype.processIntersections=function(t,e,n,i){if(t===n&&e===i)return null;var r=t.getCoordinates()[e],o=t.getCoordinates()[e+1],s=n.getCoordinates()[i],a=n.getCoordinates()[i+1];if(this._li.computeIntersection(r,o,s,a),this._li.hasIntersection()&&this._li.isInteriorIntersection()){for(var u=0;u=0;e--){try{t.bufferReducedPrecision(e)}catch(e){if(!(e instanceof Le))throw e;t._saveException=e}if(null!==t._resultGeometry)return null}throw this._saveException}if(1===arguments.length){var n=arguments[0],i=yi.precisionScaleFactor(this._argGeom,this._distance,n),r=new fe(i);this.bufferFixedPrecision(r)}},yi.prototype.computeGeometry=function(){if(this.bufferOriginalPrecision(),null!==this._resultGeometry)return null;var t=this._argGeom.getFactory().getPrecisionModel();t.getType()===fe.FIXED?this.bufferFixedPrecision(t):this.bufferReducedPrecision()},yi.prototype.setQuadrantSegments=function(t){this._bufParams.setQuadrantSegments(t)},yi.prototype.bufferOriginalPrecision=function(){try{var t=new ii(this._bufParams);this._resultGeometry=t.buffer(this._argGeom,this._distance)}catch(t){if(!(t instanceof $))throw t;this._saveException=t}},yi.prototype.getResultGeometry=function(t){return this._distance=t,this.computeGeometry(),this._resultGeometry},yi.prototype.setEndCapStyle=function(t){this._bufParams.setEndCapStyle(t)},yi.prototype.interfaces_=function(){return[]},yi.prototype.getClass=function(){return yi},yi.bufferOp=function(){if(2===arguments.length){var t=arguments[1];return new yi(arguments[0]).getResultGeometry(t)}if(3===arguments.length){if(Number.isInteger(arguments[2])&&arguments[0]instanceof ct&&"number"==typeof arguments[1]){var e=arguments[1],n=arguments[2],i=new yi(arguments[0]);return i.setQuadrantSegments(n),i.getResultGeometry(e)}if(arguments[2]instanceof Cn&&arguments[0]instanceof ct&&"number"==typeof arguments[1]){var r=arguments[1];return new yi(arguments[0],arguments[2]).getResultGeometry(r)}}else if(4===arguments.length){var o=arguments[1],s=arguments[2],a=arguments[3],u=new yi(arguments[0]);return u.setQuadrantSegments(s),u.setEndCapStyle(a),u.getResultGeometry(o)}},yi.precisionScaleFactor=function(t,e,n){var i=t.getEnvelopeInternal(),r=O.max(Math.abs(i.getMaxX()),Math.abs(i.getMaxY()),Math.abs(i.getMinX()),Math.abs(i.getMinY()))+2*(e>0?e:0),o=n-Math.trunc(Math.log(r)/Math.log(10)+1);return Math.pow(10,o)},di.CAP_ROUND.get=function(){return Cn.CAP_ROUND},di.CAP_BUTT.get=function(){return Cn.CAP_FLAT},di.CAP_FLAT.get=function(){return Cn.CAP_FLAT},di.CAP_SQUARE.get=function(){return Cn.CAP_SQUARE},di.MAX_PRECISION_DIGITS.get=function(){return 12},Object.defineProperties(yi,di);var _i=function(){this._pt=[new C,new C],this._distance=v.NaN,this._isNull=!0};_i.prototype.getCoordinates=function(){return this._pt},_i.prototype.getCoordinate=function(t){return this._pt[t]},_i.prototype.setMinimum=function(){if(1===arguments.length){var t=arguments[0];this.setMinimum(t._pt[0],t._pt[1])}else if(2===arguments.length){var e=arguments[0],n=arguments[1];if(this._isNull)return this.initialize(e,n),null;var i=e.distance(n);ithis._distance&&this.initialize(e,n,i)}},_i.prototype.interfaces_=function(){return[]},_i.prototype.getClass=function(){return _i};var mi=function(){};mi.prototype.interfaces_=function(){return[]},mi.prototype.getClass=function(){return mi},mi.computeDistance=function(){if(arguments[2]instanceof _i&&arguments[0]instanceof Zt&&arguments[1]instanceof C)for(var t=arguments[1],e=arguments[2],n=arguments[0].getCoordinates(),i=new yn,r=0;r0||this._isIn?L.INTERIOR:L.EXTERIOR)},bi.prototype.interfaces_=function(){return[]},bi.prototype.getClass=function(){return bi};var Si=function t(){if(this._component=null,this._segIndex=null,this._pt=null,2===arguments.length)t.call(this,arguments[0],t.INSIDE_AREA,arguments[1]);else if(3===arguments.length){var e=arguments[0],n=arguments[1],i=arguments[2];this._component=e,this._segIndex=n,this._pt=i}},wi={INSIDE_AREA:{configurable:!0}};Si.prototype.isInsideArea=function(){return this._segIndex===Si.INSIDE_AREA},Si.prototype.getCoordinate=function(){return this._pt},Si.prototype.getGeometryComponent=function(){return this._component},Si.prototype.getSegmentIndex=function(){return this._segIndex},Si.prototype.interfaces_=function(){return[]},Si.prototype.getClass=function(){return Si},wi.INSIDE_AREA.get=function(){return-1},Object.defineProperties(Si,wi);var Li=function(t){this._pts=t||null};Li.prototype.filter=function(t){t instanceof Jt&&this._pts.add(t)},Li.prototype.interfaces_=function(){return[Ut]},Li.prototype.getClass=function(){return Li},Li.getPoints=function(){if(1===arguments.length){var t=arguments[0];return t instanceof Jt?$e.singletonList(t):Li.getPoints(t,new Nt)}if(2===arguments.length){var e=arguments[0],n=arguments[1];return e instanceof Jt?n.add(e):e instanceof zt&&e.apply(new Li(n)),n}};var Pi=function(){this._locations=null;var t=arguments[0];this._locations=t};Pi.prototype.filter=function(t){(t instanceof Jt||t instanceof Zt||t instanceof $t)&&this._locations.add(new Si(t,0,t.getCoordinate()))},Pi.prototype.interfaces_=function(){return[Ut]},Pi.prototype.getClass=function(){return Pi},Pi.getLocations=function(t){var e=new Nt;return t.apply(new Pi(e)),e};var Ri=function(){if(this._geom=null,this._terminateDistance=0,this._ptLocator=new bi,this._minDistanceLocation=null,this._minDistance=v.MAX_VALUE,2===arguments.length){var t=arguments[0],e=arguments[1];this._geom=[t,e],this._terminateDistance=0}else if(3===arguments.length){var n=arguments[0],i=arguments[1],r=arguments[2];this._geom=new Array(2).fill(null),this._geom[0]=n,this._geom[1]=i,this._terminateDistance=r}};Ri.prototype.computeContainmentDistance=function(){if(0===arguments.length){var t=new Array(2).fill(null);if(this.computeContainmentDistance(0,t),this._minDistance<=this._terminateDistance)return null;this.computeContainmentDistance(1,t)}else if(2===arguments.length){var e=arguments[0],n=arguments[1],i=1-e,r=Ni.getPolygons(this._geom[e]);if(r.size()>0){var o=Pi.getLocations(this._geom[i]);if(this.computeContainmentDistance(o,r,n),this._minDistance<=this._terminateDistance)return this._minDistanceLocation[i]=n[0],this._minDistanceLocation[e]=n[1],null}}else if(3===arguments.length)if(arguments[2]instanceof Array&&R(arguments[0],It)&&R(arguments[1],It)){for(var s=arguments[0],a=arguments[1],u=arguments[2],l=0;lthis._minDistance)return null;for(var i=t.getCoordinates(),r=e.getCoordinate(),o=0;othis._minDistance)return null;for(var p=u.getCoordinates(),h=l.getCoordinates(),f=0;fthis._distance&&this.initialize(e,n,i)}},Oi.prototype.interfaces_=function(){return[]},Oi.prototype.getClass=function(){return Oi};var Ti=function(){};Ti.prototype.interfaces_=function(){return[]},Ti.prototype.getClass=function(){return Ti},Ti.computeDistance=function(){if(arguments[2]instanceof Oi&&arguments[0]instanceof Zt&&arguments[1]instanceof C)for(var t=arguments[0],e=arguments[1],n=arguments[2],i=new yn,r=t.getCoordinates(),o=0;o1||t<=0)throw new m("Fraction is not in range (0.0 - 1.0]");this._densifyFrac=t},Ai.prototype.compute=function(t,e){this.computeOrientedDistance(t,e,this._ptDist),this.computeOrientedDistance(e,t,this._ptDist)},Ai.prototype.distance=function(){return this.compute(this._g0,this._g1),this._ptDist.getDistance()},Ai.prototype.computeOrientedDistance=function(t,e,n){var i=new Mi(e);if(t.apply(i),n.setMaximum(i.getMaxPointDistance()),this._densifyFrac>0){var r=new Fi(e,this._densifyFrac);t.apply(r),n.setMaximum(r.getMaxPointDistance())}},Ai.prototype.orientedDistance=function(){return this.computeOrientedDistance(this._g0,this._g1,this._ptDist),this._ptDist.getDistance()},Ai.prototype.interfaces_=function(){return[]},Ai.prototype.getClass=function(){return Ai},Ai.distance=function(){if(2===arguments.length)return new Ai(arguments[0],arguments[1]).distance();if(3===arguments.length){var t=arguments[2],e=new Ai(arguments[0],arguments[1]);return e.setDensifyFraction(t),e.distance()}},Di.MaxPointDistanceFilter.get=function(){return Mi},Di.MaxDensifiedByFractionDistanceFilter.get=function(){return Fi},Object.defineProperties(Ai,Di);var Mi=function(){this._maxPtDist=new Oi,this._minPtDist=new Oi,this._euclideanDist=new Ti,this._geom=null;var t=arguments[0];this._geom=t};Mi.prototype.filter=function(t){this._minPtDist.initialize(),Ti.computeDistance(this._geom,t,this._minPtDist),this._maxPtDist.setMaximum(this._minPtDist)},Mi.prototype.getMaxPointDistance=function(){return this._maxPtDist},Mi.prototype.interfaces_=function(){return[ft]},Mi.prototype.getClass=function(){return Mi};var Fi=function(){this._maxPtDist=new Oi,this._minPtDist=new Oi,this._geom=null,this._numSubSegs=0;var t=arguments[0],e=arguments[1];this._geom=t,this._numSubSegs=Math.trunc(Math.round(1/e))};Fi.prototype.filter=function(t,e){if(0===e)return null;for(var n=t.getCoordinate(e-1),i=t.getCoordinate(e),r=(i.x-n.x)/this._numSubSegs,o=(i.y-n.y)/this._numSubSegs,s=0;sn){this._isValid=!1;var r=i.getCoordinates();this._errorLocation=r[1],this._errorIndicator=t.getFactory().createLineString(r),this._errMsg="Distance between buffer curve and input is too large ("+this._maxDistanceFound+" at "+Q.toLineString(r[0],r[1])+")"}},Gi.prototype.isValid=function(){var t=Math.abs(this._bufDistance),e=Gi.MAX_DISTANCE_DIFF_FRAC*t;return this._minValidDistance=t-e,this._maxValidDistance=t+e,!(!this._input.isEmpty()&&!this._result.isEmpty())||(this._bufDistance>0?this.checkPositiveValid():this.checkNegativeValid(),Gi.VERBOSE&&Y.out.println("Min Dist= "+this._minDistanceFound+" err= "+(1-this._minDistanceFound/this._bufDistance)+" Max Dist= "+this._maxDistanceFound+" err= "+(this._maxDistanceFound/this._bufDistance-1)),this._isValid)},Gi.prototype.checkNegativeValid=function(){if(!(this._input instanceof $t||this._input instanceof ne||this._input instanceof zt))return null;var t=this.getPolygonLines(this._input);if(this.checkMinimumDistance(t,this._result,this._minValidDistance),!this._isValid)return null;this.checkMaximumDistance(t,this._result,this._maxValidDistance)},Gi.prototype.getErrorIndicator=function(){return this._errorIndicator},Gi.prototype.checkMinimumDistance=function(t,e,n){var i=new Ri(t,e,n);if(this._minDistanceFound=i.distance(),this._minDistanceFound0&&t>e&&(this._isValid=!1,this._errorMsg="Area of positive buffer is smaller than input",this._errorIndicator=this._result),this._distance<0&&t=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"))},qi.prototype.report=function(t){if(!qi.VERBOSE)return null;Y.out.println("Check "+t+": "+(this._isValid?"passed":"FAILED"))},qi.prototype.getErrorMessage=function(){return this._errorMsg},qi.prototype.interfaces_=function(){return[]},qi.prototype.getClass=function(){return qi},qi.isValidMsg=function(t,e,n){var i=new qi(t,e,n);return i.isValid()?null:i.getErrorMessage()},qi.isValid=function(t,e,n){return!!new qi(t,e,n).isValid()},Ui.VERBOSE.get=function(){return!1},Ui.MAX_ENV_DIFF_FRAC.get=function(){return.012},Object.defineProperties(qi,Ui);var ki=function(){this._pts=null,this._data=null;var t=arguments[0],e=arguments[1];this._pts=t,this._data=e};ki.prototype.getCoordinates=function(){return this._pts},ki.prototype.size=function(){return this._pts.length},ki.prototype.getCoordinate=function(t){return this._pts[t]},ki.prototype.isClosed=function(){return this._pts[0].equals(this._pts[this._pts.length-1])},ki.prototype.getSegmentOctant=function(t){return t===this._pts.length-1?-1:pn.octant(this.getCoordinate(t),this.getCoordinate(t+1))},ki.prototype.setData=function(t){this._data=t},ki.prototype.getData=function(){return this._data},ki.prototype.toString=function(){return Q.toLineString(new ue(this._pts))},ki.prototype.interfaces_=function(){return[hn]},ki.prototype.getClass=function(){return ki};var zi=function(){this._findAllIntersections=!1,this._isCheckEndSegmentsOnly=!1,this._li=null,this._interiorIntersection=null,this._intSegments=null,this._intersections=new Nt,this._intersectionCount=0,this._keepIntersections=!0;var t=arguments[0];this._li=t,this._interiorIntersection=null};zi.prototype.getInteriorIntersection=function(){return this._interiorIntersection},zi.prototype.setCheckEndSegmentsOnly=function(t){this._isCheckEndSegmentsOnly=t},zi.prototype.getIntersectionSegments=function(){return this._intSegments},zi.prototype.count=function(){return this._intersectionCount},zi.prototype.getIntersections=function(){return this._intersections},zi.prototype.setFindAllIntersections=function(t){this._findAllIntersections=t},zi.prototype.setKeepIntersections=function(t){this._keepIntersections=t},zi.prototype.processIntersections=function(t,e,n,i){if(!this._findAllIntersections&&this.hasIntersection())return null;if(t===n&&e===i)return null;if(this._isCheckEndSegmentsOnly&&!this.isEndSegment(t,e)&&!this.isEndSegment(n,i))return null;var r=t.getCoordinates()[e],o=t.getCoordinates()[e+1],s=n.getCoordinates()[i],a=n.getCoordinates()[i+1];this._li.computeIntersection(r,o,s,a),this._li.hasIntersection()&&this._li.isInteriorIntersection()&&(this._intSegments=new Array(4).fill(null),this._intSegments[0]=r,this._intSegments[1]=o,this._intSegments[2]=s,this._intSegments[3]=a,this._interiorIntersection=this._li.getIntersection(0),this._keepIntersections&&this._intersections.add(this._interiorIntersection),this._intersectionCount++)},zi.prototype.isEndSegment=function(t,e){return 0===e||e>=t.size()-2},zi.prototype.hasIntersection=function(){return null!==this._interiorIntersection},zi.prototype.isDone=function(){return!this._findAllIntersections&&null!==this._interiorIntersection},zi.prototype.interfaces_=function(){return[Wn]},zi.prototype.getClass=function(){return zi},zi.createAllIntersectionsFinder=function(t){var e=new zi(t);return e.setFindAllIntersections(!0),e},zi.createAnyIntersectionFinder=function(t){return new zi(t)},zi.createIntersectionCounter=function(t){var e=new zi(t);return e.setFindAllIntersections(!0),e.setKeepIntersections(!1),e};var Vi=function(){this._li=new rt,this._segStrings=null,this._findAllIntersections=!1,this._segInt=null,this._isValid=!0;var t=arguments[0];this._segStrings=t};Vi.prototype.execute=function(){if(null!==this._segInt)return null;this.checkInteriorIntersections()},Vi.prototype.getIntersections=function(){return this._segInt.getIntersections()},Vi.prototype.isValid=function(){return this.execute(),this._isValid},Vi.prototype.setFindAllIntersections=function(t){this._findAllIntersections=t},Vi.prototype.checkInteriorIntersections=function(){this._isValid=!0,this._segInt=new zi(this._li),this._segInt.setFindAllIntersections(this._findAllIntersections);var t=new In;if(t.setSegmentIntersector(this._segInt),t.computeNodes(this._segStrings),this._segInt.hasIntersection())return this._isValid=!1,null},Vi.prototype.checkValid=function(){if(this.execute(),!this._isValid)throw new Le(this.getErrorMessage(),this._segInt.getInteriorIntersection())},Vi.prototype.getErrorMessage=function(){if(this._isValid)return"no intersections found";var t=this._segInt.getIntersectionSegments();return"found non-noded intersection between "+Q.toLineString(t[0],t[1])+" and "+Q.toLineString(t[2],t[3])},Vi.prototype.interfaces_=function(){return[]},Vi.prototype.getClass=function(){return Vi},Vi.computeIntersections=function(t){var e=new Vi(t);return e.setFindAllIntersections(!0),e.isValid(),e.getIntersections()};var Yi=function t(){this._nv=null;var e=arguments[0];this._nv=new Vi(t.toSegmentStrings(e))};Yi.prototype.checkValid=function(){this._nv.checkValid()},Yi.prototype.interfaces_=function(){return[]},Yi.prototype.getClass=function(){return Yi},Yi.toSegmentStrings=function(t){for(var e=new Nt,n=t.iterator();n.hasNext();){var i=n.next();e.add(new ki(i.getCoordinates(),i))}return e},Yi.checkValid=function(t){new Yi(t).checkValid()};var Xi=function(t){this._mapOp=t};Xi.prototype.map=function(t){for(var e=new Nt,n=0;n0&&i<4&&!this._preserveType?this._factory.createLineString(n):this._factory.createLinearRing(n)},Wi.prototype.interfaces_=function(){return[]},Wi.prototype.getClass=function(){return Wi};var Zi=function t(){if(this._snapTolerance=0,this._srcPts=null,this._seg=new yn,this._allowSnappingToSourceVertices=!1,this._isClosed=!1,arguments[0]instanceof Zt&&"number"==typeof arguments[1]){var e=arguments[1];t.call(this,arguments[0].getCoordinates(),e)}else if(arguments[0]instanceof Array&&"number"==typeof arguments[1]){var n=arguments[0],i=arguments[1];this._srcPts=n,this._isClosed=t.isClosed(n),this._snapTolerance=i}};Zi.prototype.snapVertices=function(t,e){for(var n=this._isClosed?t.size()-1:t.size(),i=0;i=0&&t.add(o+1,new C(r),!1)}},Zi.prototype.findSegmentIndexToSnap=function(t,e){for(var n=v.MAX_VALUE,i=-1,r=0;re&&(e=i)}return e}if(2===arguments.length){var r=arguments[0],o=arguments[1];return Math.min(Ki.computeOverlaySnapTolerance(r),Ki.computeOverlaySnapTolerance(o))}},Ki.computeSizeBasedSnapTolerance=function(t){var e=t.getEnvelopeInternal();return Math.min(e.getHeight(),e.getWidth())*Ki.SNAP_PRECISION_FACTOR},Ki.snapToSelf=function(t,e,n){return new Ki(t).snapToSelf(e,n)},Ji.SNAP_PRECISION_FACTOR.get=function(){return 1e-9},Object.defineProperties(Ki,Ji);var Qi=function(t){function e(e,n,i){t.call(this),this._snapTolerance=e||null,this._snapPts=n||null,this._isSelfSnap=void 0!==i&&i}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.snapLine=function(t,e){var n=new Zi(t,this._snapTolerance);return n.setAllowSnappingToSourceVertices(this._isSelfSnap),n.snapTo(e)},e.prototype.transformCoordinates=function(t,e){var n=t.toCoordinateArray(),i=this.snapLine(n,this._snapPts);return this._factory.getCoordinateSequenceFactory().create(i)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(Wi),$i=function(){this._isFirst=!0,this._commonMantissaBitsCount=53,this._commonBits=0,this._commonSignExp=null};$i.prototype.getCommon=function(){return v.longBitsToDouble(this._commonBits)},$i.prototype.add=function(t){var e=v.doubleToLongBits(t);return this._isFirst?(this._commonBits=e,this._commonSignExp=$i.signExpBits(this._commonBits),this._isFirst=!1,null):$i.signExpBits(e)!==this._commonSignExp?(this._commonBits=0,null):(this._commonMantissaBitsCount=$i.numCommonMostSigMantissaBits(this._commonBits,e),void(this._commonBits=$i.zeroLowerBits(this._commonBits,64-(12+this._commonMantissaBitsCount))))},$i.prototype.toString=function(){if(1===arguments.length){var t=arguments[0],e=v.longBitsToDouble(t),n="0000000000000000000000000000000000000000000000000000000000000000"+v.toBinaryString(t),i=n.substring(n.length-64);return i.substring(0,1)+" "+i.substring(1,12)+"(exp) "+i.substring(12)+" [ "+e+" ]"}},$i.prototype.interfaces_=function(){return[]},$i.prototype.getClass=function(){return $i},$i.getBit=function(t,e){return 0!=(t&1<>52},$i.zeroLowerBits=function(t,e){return t&~((1<=0;i--){if($i.getBit(t,i)!==$i.getBit(e,i))return n;n++}return 52};var tr=function(){this._commonCoord=null,this._ccFilter=new nr},er={CommonCoordinateFilter:{configurable:!0},Translater:{configurable:!0}};tr.prototype.addCommonBits=function(t){var e=new ir(this._commonCoord);t.apply(e),t.geometryChanged()},tr.prototype.removeCommonBits=function(t){if(0===this._commonCoord.x&&0===this._commonCoord.y)return t;var e=new C(this._commonCoord);e.x=-e.x,e.y=-e.y;var n=new ir(e);return t.apply(n),t.geometryChanged(),t},tr.prototype.getCommonCoordinate=function(){return this._commonCoord},tr.prototype.add=function(t){t.apply(this._ccFilter),this._commonCoord=this._ccFilter.getCommonCoordinate()},tr.prototype.interfaces_=function(){return[]},tr.prototype.getClass=function(){return tr},er.CommonCoordinateFilter.get=function(){return nr},er.Translater.get=function(){return ir},Object.defineProperties(tr,er);var nr=function(){this._commonBitsX=new $i,this._commonBitsY=new $i};nr.prototype.filter=function(t){this._commonBitsX.add(t.x),this._commonBitsY.add(t.y)},nr.prototype.getCommonCoordinate=function(){return new C(this._commonBitsX.getCommon(),this._commonBitsY.getCommon())},nr.prototype.interfaces_=function(){return[ft]},nr.prototype.getClass=function(){return nr};var ir=function(){this.trans=null;var t=arguments[0];this.trans=t};ir.prototype.filter=function(t,e){var n=t.getOrdinate(e,0)+this.trans.x,i=t.getOrdinate(e,1)+this.trans.y;t.setOrdinate(e,0,n),t.setOrdinate(e,1,i)},ir.prototype.isDone=function(){return!1},ir.prototype.isGeometryChanged=function(){return!0},ir.prototype.interfaces_=function(){return[kt]},ir.prototype.getClass=function(){return ir};var rr=function(t,e){this._geom=new Array(2).fill(null),this._snapTolerance=null,this._cbr=null,this._geom[0]=t,this._geom[1]=e,this.computeSnapTolerance()};rr.prototype.selfSnap=function(t){return new Ki(t).snapTo(t,this._snapTolerance)},rr.prototype.removeCommonBits=function(t){this._cbr=new tr,this._cbr.add(t[0]),this._cbr.add(t[1]);var e=new Array(2).fill(null);return e[0]=this._cbr.removeCommonBits(t[0].copy()),e[1]=this._cbr.removeCommonBits(t[1].copy()),e},rr.prototype.prepareResult=function(t){return this._cbr.addCommonBits(t),t},rr.prototype.getResultGeometry=function(t){var e=this.snap(this._geom),n=Sr.overlayOp(e[0],e[1],t);return this.prepareResult(n)},rr.prototype.checkValid=function(t){t.isValid()||Y.out.println("Snapped geometry is invalid")},rr.prototype.computeSnapTolerance=function(){this._snapTolerance=Ki.computeOverlaySnapTolerance(this._geom[0],this._geom[1])},rr.prototype.snap=function(t){var e=this.removeCommonBits(t);return Ki.snap(e[0],e[1],this._snapTolerance)},rr.prototype.interfaces_=function(){return[]},rr.prototype.getClass=function(){return rr},rr.overlayOp=function(t,e,n){return new rr(t,e).getResultGeometry(n)},rr.union=function(t,e){return rr.overlayOp(t,e,Sr.UNION)},rr.intersection=function(t,e){return rr.overlayOp(t,e,Sr.INTERSECTION)},rr.symDifference=function(t,e){return rr.overlayOp(t,e,Sr.SYMDIFFERENCE)},rr.difference=function(t,e){return rr.overlayOp(t,e,Sr.DIFFERENCE)};var or=function(t,e){this._geom=new Array(2).fill(null),this._geom[0]=t,this._geom[1]=e};or.prototype.getResultGeometry=function(t){var e=null,n=!1,i=null;try{e=Sr.overlayOp(this._geom[0],this._geom[1],t),n=!0}catch(t){if(!(t instanceof $))throw t;i=t}if(!n)try{e=rr.overlayOp(this._geom[0],this._geom[1],t)}catch(t){throw t instanceof $?i:t}return e},or.prototype.interfaces_=function(){return[]},or.prototype.getClass=function(){return or},or.overlayOp=function(t,e,n){return new or(t,e).getResultGeometry(n)},or.union=function(t,e){return or.overlayOp(t,e,Sr.UNION)},or.intersection=function(t,e){return or.overlayOp(t,e,Sr.INTERSECTION)},or.symDifference=function(t,e){return or.overlayOp(t,e,Sr.SYMDIFFERENCE)},or.difference=function(t,e){return or.overlayOp(t,e,Sr.DIFFERENCE)};var sr=function(){this.mce=null,this.chainIndex=null;var t=arguments[0],e=arguments[1];this.mce=t,this.chainIndex=e};sr.prototype.computeIntersections=function(t,e){this.mce.computeIntersectsForChain(this.chainIndex,t.mce,t.chainIndex,e)},sr.prototype.interfaces_=function(){return[]},sr.prototype.getClass=function(){return sr};var ar=function t(){if(this._label=null,this._xValue=null,this._eventType=null,this._insertEvent=null,this._deleteEventIndex=null,this._obj=null,2===arguments.length){var e=arguments[0],n=arguments[1];this._eventType=t.DELETE,this._xValue=e,this._insertEvent=n}else if(3===arguments.length){var i=arguments[0],r=arguments[1],o=arguments[2];this._eventType=t.INSERT,this._label=i,this._xValue=r,this._obj=o}},ur={INSERT:{configurable:!0},DELETE:{configurable:!0}};ar.prototype.isDelete=function(){return this._eventType===ar.DELETE},ar.prototype.setDeleteEventIndex=function(t){this._deleteEventIndex=t},ar.prototype.getObject=function(){return this._obj},ar.prototype.compareTo=function(t){var e=t;return this._xValuee._xValue?1:this._eventTypee._eventType?1:0},ar.prototype.getInsertEvent=function(){return this._insertEvent},ar.prototype.isInsert=function(){return this._eventType===ar.INSERT},ar.prototype.isSameLabel=function(t){return null!==this._label&&this._label===t._label},ar.prototype.getDeleteEventIndex=function(){return this._deleteEventIndex},ar.prototype.interfaces_=function(){return[x]},ar.prototype.getClass=function(){return ar},ur.INSERT.get=function(){return 1},ur.DELETE.get=function(){return 2},Object.defineProperties(ar,ur);var lr=function(){};lr.prototype.interfaces_=function(){return[]},lr.prototype.getClass=function(){return lr};var cr=function(){this._hasIntersection=!1,this._hasProper=!1,this._hasProperInterior=!1,this._properIntersectionPoint=null,this._li=null,this._includeProper=null,this._recordIsolated=null,this._isSelfIntersection=null,this._numIntersections=0,this.numTests=0,this._bdyNodes=null,this._isDone=!1,this._isDoneWhenProperInt=!1;var t=arguments[0],e=arguments[1],n=arguments[2];this._li=t,this._includeProper=e,this._recordIsolated=n};cr.prototype.isTrivialIntersection=function(t,e,n,i){if(t===n&&1===this._li.getIntersectionNum()){if(cr.isAdjacentSegments(e,i))return!0;if(t.isClosed()){var r=t.getNumPoints()-1;if(0===e&&i===r||0===i&&e===r)return!0}}return!1},cr.prototype.getProperIntersectionPoint=function(){return this._properIntersectionPoint},cr.prototype.setIsDoneIfProperInt=function(t){this._isDoneWhenProperInt=t},cr.prototype.hasProperInteriorIntersection=function(){return this._hasProperInterior},cr.prototype.isBoundaryPointInternal=function(t,e){for(var n=e.iterator();n.hasNext();){var i=n.next().getCoordinate();if(t.isIntersection(i))return!0}return!1},cr.prototype.hasProperIntersection=function(){return this._hasProper},cr.prototype.hasIntersection=function(){return this._hasIntersection},cr.prototype.isDone=function(){return this._isDone},cr.prototype.isBoundaryPoint=function(t,e){return null!==e&&(!!this.isBoundaryPointInternal(t,e[0])||!!this.isBoundaryPointInternal(t,e[1]))},cr.prototype.setBoundaryNodes=function(t,e){this._bdyNodes=new Array(2).fill(null),this._bdyNodes[0]=t,this._bdyNodes[1]=e},cr.prototype.addIntersections=function(t,e,n,i){if(t===n&&e===i)return null;this.numTests++;var r=t.getCoordinates()[e],o=t.getCoordinates()[e+1],s=n.getCoordinates()[i],a=n.getCoordinates()[i+1];this._li.computeIntersection(r,o,s,a),this._li.hasIntersection()&&(this._recordIsolated&&(t.setIsolated(!1),n.setIsolated(!1)),this._numIntersections++,this.isTrivialIntersection(t,e,n,i)||(this._hasIntersection=!0,!this._includeProper&&this._li.isProper()||(t.addIntersections(this._li,e,0),n.addIntersections(this._li,i,1)),this._li.isProper()&&(this._properIntersectionPoint=this._li.getIntersection(0).copy(),this._hasProper=!0,this._isDoneWhenProperInt&&(this._isDone=!0),this.isBoundaryPoint(this._li,this._bdyNodes)||(this._hasProperInterior=!0))))},cr.prototype.interfaces_=function(){return[]},cr.prototype.getClass=function(){return cr},cr.isAdjacentSegments=function(t,e){return 1===Math.abs(t-e)};var pr=function(t){function e(){t.call(this),this.events=new Nt,this.nOverlaps=null}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.prepareEvents=function(){$e.sort(this.events);for(var t=0;te||this._maxo?1:0},gr.prototype.interfaces_=function(){return[N]},gr.prototype.getClass=function(){return gr};var yr=function(t){function e(){t.call(this),this._item=null;var e=arguments[0],n=arguments[1],i=arguments[2];this._min=e,this._max=n,this._item=i}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.query=function(t,e,n){if(!this.intersects(t,e))return null;n.visitItem(this._item)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(hr),dr=function(t){function e(){t.call(this),this._node1=null,this._node2=null;var e=arguments[0],n=arguments[1];this._node1=e,this._node2=n,this.buildExtent(this._node1,this._node2)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.buildExtent=function(t,e){this._min=Math.min(t._min,e._min),this._max=Math.max(t._max,e._max)},e.prototype.query=function(t,e,n){if(!this.intersects(t,e))return null;null!==this._node1&&this._node1.query(t,e,n),null!==this._node2&&this._node2.query(t,e,n)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(hr),_r=function(){this._leaves=new Nt,this._root=null,this._level=0};_r.prototype.buildTree=function(){$e.sort(this._leaves,new hr.NodeComparator);for(var t=this._leaves,e=null,n=new Nt;;){if(this.buildLevel(t,n),1===n.size())return n.get(0);e=t,t=n,n=e}},_r.prototype.insert=function(t,e,n){if(null!==this._root)throw new Error("Index cannot be added to once it has been queried");this._leaves.add(new yr(t,e,n))},_r.prototype.query=function(t,e,n){this.init(),this._root.query(t,e,n)},_r.prototype.buildRoot=function(){if(null!==this._root)return null;this._root=this.buildTree()},_r.prototype.printNode=function(t){Y.out.println(Q.toLineString(new C(t._min,this._level),new C(t._max,this._level)))},_r.prototype.init=function(){if(null!==this._root)return null;this.buildRoot()},_r.prototype.buildLevel=function(t,e){this._level++,e.clear();for(var n=0;n=2,"found LineString with single point"),this.insertBoundaryPoint(this._argIndex,e[0]),this.insertBoundaryPoint(this._argIndex,e[e.length-1])},e.prototype.getInvalidPoint=function(){return this._invalidPoint},e.prototype.getBoundaryPoints=function(){for(var t=this.getBoundaryNodes(),e=new Array(t.size()).fill(null),n=0,i=t.iterator();i.hasNext();){var r=i.next();e[n++]=r.getCoordinate().copy()}return e},e.prototype.getBoundaryNodes=function(){return null===this._boundaryNodes&&(this._boundaryNodes=this._nodes.getBoundaryNodes(this._argIndex)),this._boundaryNodes},e.prototype.addSelfIntersectionNode=function(t,e,n){if(this.isBoundaryNode(t,e))return null;n===L.BOUNDARY&&this._useBoundaryDeterminationRule?this.insertBoundaryPoint(t,e):this.insertPoint(t,e,n)},e.prototype.addPolygonRing=function(t,e,n){if(t.isEmpty())return null;var i=St.removeRepeatedPoints(t.getCoordinates());if(i.length<4)return this._hasTooFewPoints=!0,this._invalidPoint=i[0],null;var r=e,o=n;at.isCCW(i)&&(r=n,o=e);var s=new ni(i,new Te(this._argIndex,L.BOUNDARY,r,o));this._lineEdgeMap.put(t,s),this.insertEdge(s),this.insertPoint(this._argIndex,i[0],L.BOUNDARY)},e.prototype.insertPoint=function(t,e,n){var i=this._nodes.addNode(e),r=i.getLabel();null===r?i._label=new Te(t,n):r.setLocation(t,n)},e.prototype.createEdgeSetIntersector=function(){return new pr},e.prototype.addSelfIntersectionNodes=function(t){for(var e=this._edges.iterator();e.hasNext();)for(var n=e.next(),i=n.getLabel().getLocation(t),r=n.eiList.iterator();r.hasNext();){var o=r.next();this.addSelfIntersectionNode(t,o.coord,i)}},e.prototype.add=function(){if(1!==arguments.length)return t.prototype.add.apply(this,arguments);var e=arguments[0];if(e.isEmpty())return null;if(e instanceof ne&&(this._useBoundaryDeterminationRule=!1),e instanceof $t)this.addPolygon(e);else if(e instanceof Zt)this.addLineString(e);else if(e instanceof Jt)this.addPoint(e);else if(e instanceof te)this.addCollection(e);else if(e instanceof Vt)this.addCollection(e);else if(e instanceof ne)this.addCollection(e);else{if(!(e instanceof zt))throw new Error(e.getClass().getName());this.addCollection(e)}},e.prototype.addCollection=function(t){for(var e=0;e50?(null===this._areaPtLocator&&(this._areaPtLocator=new vr(this._parentGeom)),this._areaPtLocator.locate(t)):this._ptLocator.locate(t,this._parentGeom)},e.prototype.findEdge=function(){if(1===arguments.length){var e=arguments[0];return this._lineEdgeMap.get(e)}return t.prototype.findEdge.apply(this,arguments)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e.determineBoundary=function(t,e){return t.isInBoundary(e)?L.BOUNDARY:L.INTERIOR},e}(Ye),Cr=function(){if(this._li=new rt,this._resultPrecisionModel=null,this._arg=null,1===arguments.length){var t=arguments[0];this.setComputationPrecision(t.getPrecisionModel()),this._arg=new Array(1).fill(null),this._arg[0]=new Nr(0,t)}else if(2===arguments.length){var e=arguments[0],n=arguments[1],i=gt.OGC_SFS_BOUNDARY_RULE;e.getPrecisionModel().compareTo(n.getPrecisionModel())>=0?this.setComputationPrecision(e.getPrecisionModel()):this.setComputationPrecision(n.getPrecisionModel()),this._arg=new Array(2).fill(null),this._arg[0]=new Nr(0,e,i),this._arg[1]=new Nr(1,n,i)}else if(3===arguments.length){var r=arguments[0],o=arguments[1],s=arguments[2];r.getPrecisionModel().compareTo(o.getPrecisionModel())>=0?this.setComputationPrecision(r.getPrecisionModel()):this.setComputationPrecision(o.getPrecisionModel()),this._arg=new Array(2).fill(null),this._arg[0]=new Nr(0,r,s),this._arg[1]=new Nr(1,o,s)}};Cr.prototype.getArgGeometry=function(t){return this._arg[t].getGeometry()},Cr.prototype.setComputationPrecision=function(t){this._resultPrecisionModel=t,this._li.setPrecisionModel(this._resultPrecisionModel)},Cr.prototype.interfaces_=function(){return[]},Cr.prototype.getClass=function(){return Cr};var br=function(){};br.prototype.interfaces_=function(){return[]},br.prototype.getClass=function(){return br},br.map=function(){if(arguments[0]instanceof ct&&R(arguments[1],br.MapOp)){for(var t=arguments[0],e=arguments[1],n=new Nt,i=0;i=t.size()?null:t.get(e)},Ar.union=function(t){return new Ar(t).union()},Dr.STRTREE_NODE_CAPACITY.get=function(){return 4},Object.defineProperties(Ar,Dr);var Mr=function(){};Mr.prototype.interfaces_=function(){return[]},Mr.prototype.getClass=function(){return Mr},Mr.union=function(t,e){if(t.isEmpty()||e.isEmpty()){if(t.isEmpty()&&e.isEmpty())return Sr.createEmptyResult(Sr.UNION,t,e,t.getFactory());if(t.isEmpty())return e.copy();if(e.isEmpty())return t.copy()}return t.checkNotGeometryCollection(t),t.checkNotGeometryCollection(e),or.overlayOp(t,e,Sr.UNION)},t.GeoJSONReader=Ne,t.GeoJSONWriter=Ce,t.OverlayOp=Sr,t.UnionOp=Mr,t.BufferOp=yi,Object.defineProperty(t,"__esModule",{value:!0})}(e)},58205:t=>{let e=/[-+]?([0-9]*\.[0-9]+|[0-9]+)([eE][-+]?[0-9]+)?/,n=new RegExp("^"+e.source+"(\\s"+e.source+"){1,}");const i=t=>{function e(t){return t.join(" ")}function n(t){return t.map(e).join(", ")}function r(t){return t.map(n).map(s).join(", ")}function o(t){return t.map(r).map(s).join(", ")}function s(t){return"("+t+")"}"Feature"===t.type&&(t=t.geometry);let a=t;switch(a.type){case"Point":return a.coordinates&&3===a.coordinates.length?"POINT Z ("+e(a.coordinates)+")":"POINT ("+e(a.coordinates)+")";case"LineString":return a.coordinates&&a.coordinates[0]&&3===a.coordinates[0].length?"LINESTRING Z ("+n(a.coordinates)+")":"LINESTRING ("+n(a.coordinates)+")";case"Polygon":return a.coordinates&&a.coordinates[0]&&a.coordinates[0][0]&&3===a.coordinates[0][0].length?"POLYGON Z ("+r(a.coordinates)+")":"POLYGON ("+r(a.coordinates)+")";case"MultiPoint":return a.coordinates&&a.coordinates[0]&&3===a.coordinates[0].length?"MULTIPOINT Z ("+n(a.coordinates)+")":"MULTIPOINT ("+n(a.coordinates)+")";case"MultiLineString":return a.coordinates&&a.coordinates[0]&&a.coordinates[0][0]&&3===a.coordinates[0][0].length?"MULTILINESTRING Z ("+r(a.coordinates)+")":"MULTILINESTRING ("+r(a.coordinates)+")";case"MultiPolygon":return a.coordinates&&a.coordinates[0]&&a.coordinates[0][0]&&a.coordinates[0][0]&&3===a.coordinates[0][0][0].length?"MULTIPOLYGON Z ("+o(a.coordinates)+")":"MULTIPOLYGON ("+o(a.coordinates)+")";case"GeometryCollection":return"GEOMETRYCOLLECTION ("+a.geometries.map(i).join(", ")+")";default:throw new Error("stringify requires a valid GeoJSON Feature or geometry object as input")}};t.exports={parse:t=>{let e=t.split(";"),i=e.pop(),r=(e.shift()||"").split("=").pop(),o=0;function s(t){let e=i.substring(o).match(t);return e?(o+=e[0].length,e[0]):null}function a(){s(/^\s*/)}function u(){a();let t,e=0,i=[],r=[i],o=i;for(;t=s(/^(\()/)||s(/^(\))/)||s(/^(,)/)||s(n);){if("("===t)r.push(o),o=[],r[r.length-1].push(o),e++;else if(")"===t){if(0===o.length)return null;if(o=r.pop(),!o)return null;if(e--,0===e)break}else if(","===t)o=[],r[r.length-1].push(o);else{if(t.split(/\s/g).some(isNaN))return null;Array.prototype.push.apply(o,t.split(/\s/g).map(parseFloat))}a()}return 0!==e?null:i}function l(){let t,e,i=[];for(;e=s(n)||s(/^(,)/);)","===e?(i.push(t),t=[]):e.split(/\s/g).some(isNaN)||(t||(t=[]),Array.prototype.push.apply(t,e.split(/\s/g).map(parseFloat))),a();return t?(i.push(t),i.length?i:null):null}function c(){return function(){if(!s(/^(point(\sz)?)/i))return null;if(a(),!s(/^(\()/))return null;let t=l();return t?(a(),s(/^(\))/)?{type:"Point",coordinates:t[0]}:null):null}()||function(){if(!s(/^(linestring(\sz)?)/i))return null;if(a(),!s(/^(\()/))return null;let t=l();return t&&s(/^(\))/)?{type:"LineString",coordinates:t}:null}()||function(){if(!s(/^(polygon(\sz)?)/i))return null;a();let t=u();return t?{type:"Polygon",coordinates:t}:null}()||function(){if(!s(/^(multipoint(\sz)?)/i))return null;a();let t=i.substring(i.indexOf("(")+1,i.length-1).replace(/\(/g,"").replace(/\)/g,"");i="MULTIPOINT ("+t+")";let e=u();return e?(a(),{type:"MultiPoint",coordinates:e}):null}()||function(){if(!s(/^(multilinestring(\sz)?)/i))return null;a();let t=u();return t?(a(),{type:"MultiLineString",coordinates:t}):null}()||function(){if(!s(/^(multipolygon(\sz)?)/i))return null;a();let t=u();return t?{type:"MultiPolygon",coordinates:t}:null}()||function(){let t,e=[];if(!s(/^(geometrycollection)/i))return null;if(a(),!s(/^(\()/))return null;for(;t=c();)e.push(t),a(),s(/^(,)/),a();return s(/^(\))/)?{type:"GeometryCollection",geometries:e}:null}()}return(p=c())&&r.match(/\d+/)&&(p.crs={type:"name",properties:{name:"urn:ogc:def:crs:EPSG::"+r}}),p;var p},stringify:i}},17527:(t,e,n)=>{"use strict";n.d(e,{Z:()=>r});var i=n(40517);function r(t,e){void 0===e&&(e={});var n=Number(t[0]),r=Number(t[1]),o=Number(t[2]),s=Number(t[3]);if(6===t.length)throw new Error("@turf/bbox-polygon does not support BBox with 6 positions");var a=[n,r],u=[n,s],l=[o,s],c=[o,r];return(0,i.yu)([[a,c,l,u,a]],e.properties,{bbox:t,id:e.id})}},82086:(t,e,n)=>{"use strict";n.d(e,{Z:()=>o});var i=n(48024);function r(t){var e=[1/0,1/0,-1/0,-1/0];return(0,i.pZ)(t,(function(t){e[0]>t[0]&&(e[0]=t[0]),e[1]>t[1]&&(e[1]=t[1]),e[2]{"use strict";n.d(e,{Z:()=>r});var i=n(81011);function r(t,e,n){if(void 0===n&&(n={}),!t)throw new Error("point is required");if(!e)throw new Error("polygon is required");var r=(0,i.c9)(t),s=(0,i.wA)(e),a=s.type,u=e.bbox,l=s.coordinates;if(u&&!1===function(t,e){return e[0]<=t[0]&&e[1]<=t[1]&&e[2]>=t[0]&&e[3]>=t[1]}(r,u))return!1;"Polygon"===a&&(l=[l]);for(var c=!1,p=0;pt[1]!==l>t[1]&&t[0]<(u-s)*(t[1]-a)/(l-a)+s&&(i=!i)}return i}},936:(t,e,n)=>{"use strict";n.d(e,{Z:()=>jt});var i=n(40590),r=n(28774),o=n(48024);function s(){return new a}function a(){this.reset()}a.prototype={constructor:a,reset:function(){this.s=this.t=0},add:function(t){l(u,t,this.t),l(this,u.s,this.s),this.s?this.t+=u.t:this.s=u.t},valueOf:function(){return this.s}};var u=new a;function l(t,e,n){var i=t.s=e+n,r=i-e,o=i-r;t.t=e-o+(n-r)}var c=1e-6,p=Math.PI,h=p/2,f=p/4,g=2*p,y=180/p,d=p/180,_=Math.abs,m=Math.atan,v=Math.atan2,E=Math.cos,x=(Math.ceil,Math.exp),I=(Math.floor,Math.log),N=(Math.pow,Math.sin),C=(Math.sign,Math.sqrt),b=Math.tan;function S(t){return t>1?0:t<-1?p:Math.acos(t)}function w(t){return t>1?h:t<-1?-h:Math.asin(t)}function L(){}function P(t,e){t&&O.hasOwnProperty(t.type)&&O[t.type](t,e)}var R={Feature:function(t,e){P(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,i=-1,r=n.length;++ip?t-g:t<-p?t+g:t,e]}function Y(t,e,n){return(t%=g)?e||n?z(j(t),H(e,n)):j(t):e||n?H(e,n):V}function X(t){return function(e,n){return[(e+=t)>p?e-g:e<-p?e+g:e,n]}}function j(t){var e=X(t);return e.invert=X(-t),e}function H(t,e){var n=E(t),i=N(t),r=E(e),o=N(e);function s(t,e){var s=E(e),a=E(t)*s,u=N(t)*s,l=N(e),c=l*n+a*i;return[v(u*r-c*o,a*n-l*i),w(c*r+u*o)]}return s.invert=function(t,e){var s=E(e),a=E(t)*s,u=N(t)*s,l=N(e),c=l*r-u*o;return[v(u*r+l*o,a*n+c*i),w(c*n-a*i)]},s}function W(t,e,n,i,r,o){if(n){var s=E(e),a=N(e),u=i*n;null==r?(r=e+i*g,o=e-u/2):(r=Z(s,r),o=Z(s,o),(i>0?ro)&&(r+=i*g));for(var l,c=r;i>0?c>o:c1&&e.push(e.pop().concat(e.shift()))},result:function(){var n=e;return e=[],t=null,n}}}function J(t,e){return _(t[0]-e[0])=0;--o)r.point((c=l[o])[0],c[1]);else i(h.x,h.p.x,-1,r);h=h.p}l=(h=h.o).z,f=!f}while(!h.v);r.lineEnd()}}}function tt(t){if(e=t.length){for(var e,n,i=0,r=t[0];++ie?1:t>=e?0:NaN}V.invert=V;var nt=function(t){var e;return 1===t.length&&(e=t,t=function(t,n){return et(e(t),n)}),{left:function(e,n,i,r){for(null==i&&(i=0),null==r&&(r=e.length);i>>1;t(e[o],n)<0?i=o+1:r=o}return i},right:function(e,n,i,r){for(null==i&&(i=0),null==r&&(r=e.length);i>>1;t(e[o],n)>0?r=o:i=o+1}return i}}}(et);nt.right,nt.left;var it=Array.prototype;it.slice,it.map,Math.sqrt(50),Math.sqrt(10),Math.sqrt(2);function rt(t){for(var e,n,i,r=t.length,o=-1,s=0;++o=0;)for(e=(i=t[r]).length;--e>=0;)n[--s]=i[e];return n}var ot=1e9,st=-ot;function at(t,e,n,i){function r(r,o){return t<=r&&r<=n&&e<=o&&o<=i}function o(r,o,a,l){var c=0,p=0;if(null==r||(c=s(r,a))!==(p=s(o,a))||u(r,o)<0^a>0)do{l.point(0===c||3===c?t:n,c>1?i:e)}while((c=(c+a+4)%4)!==p);else l.point(o[0],o[1])}function s(i,r){return _(i[0]-t)0?0:3:_(i[0]-n)0?2:1:_(i[1]-e)0?1:0:r>0?3:2}function a(t,e){return u(t.x,e.x)}function u(t,e){var n=s(t,1),i=s(e,1);return n!==i?n-i:0===n?e[1]-t[1]:1===n?t[0]-e[0]:2===n?t[1]-e[1]:e[0]-t[0]}return function(s){var u,l,c,p,h,f,g,y,d,_,m,v=s,E=K(),x={point:I,lineStart:function(){x.point=N,l&&l.push(c=[]);_=!0,d=!1,g=y=NaN},lineEnd:function(){u&&(N(p,h),f&&d&&E.rejoin(),u.push(E.result()));x.point=I,d&&v.lineEnd()},polygonStart:function(){v=E,u=[],l=[],m=!0},polygonEnd:function(){var e=function(){for(var e=0,n=0,r=l.length;ni&&(h-o)*(i-s)>(f-s)*(t-o)&&++e:f<=i&&(h-o)*(i-s)<(f-s)*(t-o)&&--e;return e}(),n=m&&e,r=(u=rt(u)).length;(n||r)&&(s.polygonStart(),n&&(s.lineStart(),o(null,null,1,s),s.lineEnd()),r&&$(u,a,e,o,s),s.polygonEnd());v=s,u=l=c=null}};function I(t,e){r(t,e)&&v.point(t,e)}function N(o,s){var a=r(o,s);if(l&&c.push([o,s]),_)p=o,h=s,f=a,_=!1,a&&(v.lineStart(),v.point(o,s));else if(a&&d)v.point(o,s);else{var u=[g=Math.max(st,Math.min(ot,g)),y=Math.max(st,Math.min(ot,y))],E=[o=Math.max(st,Math.min(ot,o)),s=Math.max(st,Math.min(ot,s))];!function(t,e,n,i,r,o){var s,a=t[0],u=t[1],l=0,c=1,p=e[0]-a,h=e[1]-u;if(s=n-a,p||!(s>0)){if(s/=p,p<0){if(s0){if(s>c)return;s>l&&(l=s)}if(s=r-a,p||!(s<0)){if(s/=p,p<0){if(s>c)return;s>l&&(l=s)}else if(p>0){if(s0)){if(s/=h,h<0){if(s0){if(s>c)return;s>l&&(l=s)}if(s=o-u,h||!(s<0)){if(s/=h,h<0){if(s>c)return;s>l&&(l=s)}else if(h>0){if(s0&&(t[0]=a+l*p,t[1]=u+l*h),c<1&&(e[0]=a+c*p,e[1]=u+c*h),!0}}}}}(u,E,t,e,n,i)?a&&(v.lineStart(),v.point(o,s),m=!1):(d||(v.lineStart(),v.point(u[0],u[1])),v.point(E[0],E[1]),a||v.lineEnd(),m=!1)}g=o,y=s,d=a}return x}}var ut=s();function lt(t,e){var n=e[0],i=e[1],r=[N(n),-E(n),0],o=0,s=0;ut.reset();for(var a=0,u=t.length;a=0?1:-1,T=O*R,A=T>p,D=m*L;if(ut.add(v(D*O*N(T),x*P+D*E(T))),o+=A?R+O*g:R,A^d>=n^b>=n){var M=B(F(y),F(C));k(M);var G=B(r,M);k(G);var q=(A^R>=0?-1:1)*w(G[2]);(i>q||i===q&&(M[0]||M[1]))&&(s+=A^R>=0?1:-1)}}return(o<-c||oht&&(ht=t);eft&&(ft=e)},lineStart:L,lineEnd:L,polygonStart:L,polygonEnd:L,result:function(){var t=[[ct,pt],[ht,ft]];return ht=ft=-(pt=ct=1/0),t}};const yt=gt;s();function dt(t){return"m0,"+t+"a"+t+","+t+" 0 1,1 0,"+-2*t+"a"+t+","+t+" 0 1,1 0,"+2*t+"z"}function _t(t,e,n,i){return function(r,o){var s,a,u,l=e(o),c=r.invert(i[0],i[1]),p=K(),h=e(p),f=!1,g={point:y,lineStart:_,lineEnd:m,polygonStart:function(){g.point=v,g.lineStart=E,g.lineEnd=x,a=[],s=[]},polygonEnd:function(){g.point=y,g.lineStart=_,g.lineEnd=m,a=rt(a);var t=lt(s,c);a.length?(f||(o.polygonStart(),f=!0),$(a,vt,t,n,o)):t&&(f||(o.polygonStart(),f=!0),o.lineStart(),n(null,null,1,o),o.lineEnd()),f&&(o.polygonEnd(),f=!1),a=s=null},sphere:function(){o.polygonStart(),o.lineStart(),n(null,null,1,o),o.lineEnd(),o.polygonEnd()}};function y(e,n){var i=r(e,n);t(e=i[0],n=i[1])&&o.point(e,n)}function d(t,e){var n=r(t,e);l.point(n[0],n[1])}function _(){g.point=d,l.lineStart()}function m(){g.point=y,l.lineEnd()}function v(t,e){u.push([t,e]);var n=r(t,e);h.point(n[0],n[1])}function E(){h.lineStart(),u=[]}function x(){v(u[0][0],u[0][1]),h.lineEnd();var t,e,n,i,r=h.clean(),l=p.result(),c=l.length;if(u.pop(),s.push(u),u=null,c)if(1&r){if((e=(n=l[0]).length-1)>0){for(f||(o.polygonStart(),f=!0),o.lineStart(),t=0;t1&&2&r&&l.push(l.pop().concat(l.shift())),a.push(l.filter(mt))}return g}}function mt(t){return t.length>1}function vt(t,e){return((t=t.x)[0]<0?t[1]-h-c:h-t[1])-((e=e.x)[0]<0?e[1]-h-c:h-e[1])}dt(4.5);const Et=_t((function(){return!0}),(function(t){var e,n=NaN,i=NaN,r=NaN;return{lineStart:function(){t.lineStart(),e=1},point:function(o,s){var a=o>0?p:-p,u=_(o-n);_(u-p)0?h:-h),t.point(r,i),t.lineEnd(),t.lineStart(),t.point(a,i),t.point(o,i),e=0):r!==a&&u>=p&&(_(n-r)c?m((N(e)*(o=E(i))*N(n)-N(i)*(r=E(e))*N(t))/(r*o*s)):(e+i)/2}(n,i,o,s),t.point(r,i),t.lineEnd(),t.lineStart(),t.point(a,i),e=0),t.point(n=o,i=s),r=a},lineEnd:function(){t.lineEnd(),n=i=NaN},clean:function(){return 2-e}}}),(function(t,e,n,i){var r;if(null==t)r=n*h,i.point(-p,r),i.point(0,r),i.point(p,r),i.point(p,0),i.point(p,-r),i.point(0,-r),i.point(-p,-r),i.point(-p,0),i.point(-p,r);else if(_(t[0]-e[0])>c){var o=t[0]4*e&&d--){var N=s+f,b=a+g,S=u+y,L=C(N*N+b*b+S*S),P=w(S/=L),R=_(_(S)-1)e||_((E*D+x*M)/I-.5)>.3||s*f+a*g+u*y0,r=_(n)>c;function o(t,e){return E(t)*E(e)>n}function s(t,e,i){var r=[1,0,0],o=B(F(t),F(e)),s=G(o,o),a=o[0],u=s-a*a;if(!u)return!i&&t;var l=n*s/u,h=-n*a/u,f=B(r,o),g=U(r,l);q(g,U(o,h));var y=f,d=G(g,y),m=G(y,y),v=d*d-m*(G(g,g)-1);if(!(v<0)){var E=C(v),x=U(y,(-d-E)/m);if(q(x,g),x=M(x),!i)return x;var I,N=t[0],b=e[0],S=t[1],w=e[1];b0^x[1]<(_(x[0]-N)p^(N<=x[0]&&x[0]<=b)){var R=U(y,(-d+E)/m);return q(R,g),[x,M(R)]}}}function a(e,n){var r=i?t:p-t,o=0;return e<-r?o|=1:e>r&&(o|=2),n<-r?o|=4:n>r&&(o|=8),o}return _t(o,(function(t){var e,n,u,l,h;return{lineStart:function(){l=u=!1,h=1},point:function(f,g){var y,d=[f,g],_=o(f,g),m=i?_?0:a(f,g):_?a(f+(f<0?p:-p),g):0;if(!e&&(l=u=_)&&t.lineStart(),_!==u&&(!(y=s(e,d))||J(e,y)||J(d,y))&&(d[0]+=c,d[1]+=c,_=o(d[0],d[1])),_!==u)h=0,_?(t.lineStart(),y=s(d,e),t.point(y[0],y[1])):(y=s(e,d),t.point(y[0],y[1]),t.lineEnd()),e=y;else if(r&&e&&i^_){var v;m&n||!(v=s(d,e,!0))||(h=0,i?(t.lineStart(),t.point(v[0][0],v[0][1]),t.point(v[1][0],v[1][1]),t.lineEnd()):(t.point(v[1][0],v[1][1]),t.lineEnd(),t.lineStart(),t.point(v[0][0],v[0][1])))}!_||e&&J(e,d)||t.point(d[0],d[1]),e=d,u=_,n=m},lineEnd:function(){u&&t.lineEnd(),e=null},clean:function(){return h|(l&&u)<<1}}}),(function(n,i,r,o){W(o,t,e,r,n,i)}),i?[0,-t]:[-p,t-p])}(S=t*d,6*d):(S=null,Et),V()):S*y},T.clipExtent=function(t){return arguments.length?(P=null==t?(L=s=a=u=null,xt):at(L=+t[0][0],s=+t[0][1],a=+t[1][0],u=+t[1][1]),V()):null==L?null:[[L,s],[a,u]]},T.scale=function(t){return arguments.length?(f=+t,k()):f},T.translate=function(t){return arguments.length?(g=+t[0],m=+t[1],k()):[g,m]},T.center=function(t){return arguments.length?(v=t[0]%360*d,x=t[1]%360*d,k()):[v*y,x*y]},T.rotate=function(t){return arguments.length?(I=t[0]%360*d,N=t[1]%360*d,b=t.length>2?t[2]%360*d:0,k()):[I*y,N*y,b*y]},T.precision=function(t){return arguments.length?(O=wt(D,R=t*t),V()):C(R)},T.fitExtent=function(t,e){return Ct(T,t,e)},T.fitSize=function(t,e){return function(t,e,n){return Ct(t,[[0,0],e],n)}(T,t,e)},function(){return e=t.apply(this,arguments),T.invert=e.invert&&A,k()}}((function(){return t}))()}function Rt(t){return function(e,n){var i=E(e),r=E(n),o=t(i*r);return[o*r*N(e),o*N(n)]}}function Ot(t){return function(e,n){var i=C(e*e+n*n),r=t(i),o=N(r),s=E(r);return[v(e*o,i*s),w(i&&n*o/i)]}}var Tt=Rt((function(t){return C(2/(1+t))}));Tt.invert=Ot((function(t){return 2*w(t/2)}));var At=Rt((function(t){return(t=S(t))&&t/N(t)}));function Dt(t,e){return[t,I(b((h+e)/2))]}function Mt(t,e){return[t,e]}function Ft(t,e){var n=E(e),i=E(t)*n;return[n*N(t)/i,N(e)/i]}function Gt(t,e){var n=e*e,i=n*n;return[t*(.8707-.131979*n+i*(i*(.003971*n-.001529*i)-.013791)),e*(1.007226+n*(.015085+i*(.028874*n-.044475-.005916*i)))]}function Bt(t,e){return[E(e)*N(t),N(e)]}function qt(t,e){var n=E(e),i=1+E(t)*n;return[n*N(t)/i,N(e)/i]}function Ut(t,e){return[I(b((h+e)/2)),-t]}At.invert=Ot((function(t){return t})),Dt.invert=function(t,e){return[t,2*m(x(e))-h]},Mt.invert=Mt,Ft.invert=Ot(m),Gt.invert=function(t,e){var n,i=e,r=25;do{var o=i*i,s=o*o;i-=n=(i*(1.007226+o*(.015085+s*(.028874*o-.044475-.005916*s)))-e)/(1.007226+o*(.045255+s*(.259866*o-.311325-.005916*11*s)))}while(_(n)>c&&--r>0);return[t/(.8707+(o=i*i)*(o*(o*o*o*(.003971-.001529*o)-.013791)-.131979)),i]},Bt.invert=Ot(w),qt.invert=Ot((function(t){return 2*m(t)})),Ut.invert=function(t,e){return[-e,2*m(x(t))-h]};var kt=n(40517);function zt(t,e,n,s){var a=t.properties||{},u="Feature"===t.type?t.geometry:t;if("GeometryCollection"===u.type){var l=[];return(0,o.on)(t,(function(t){var i=zt(t,e,n,s);i&&l.push(i)})),(0,kt.uf)(l)}var c=function(t){var e=(0,i.Z)(t).geometry.coordinates,n=[-e[0],-e[1]];return Pt(At).scale(79.4188).clipAngle(179.999).rotate(n).scale(kt.rQ)}(u),p={type:u.type,coordinates:Yt(u.coordinates,c)},h=(new r.GeoJSONReader).read(p),f=(0,kt.DL)((0,kt.lF)(e,n),"meters"),g=r.BufferOp.bufferOp(h,f,s);if(!Vt((g=(new r.GeoJSONWriter).write(g)).coordinates)){var y={type:g.type,coordinates:Xt(g.coordinates,c)};return(0,kt.zL)(y,a)}}function Vt(t){return Array.isArray(t[0])?Vt(t[0]):isNaN(t[0])}function Yt(t,e){return"object"!==typeof t[0]?e(t):t.map((function(t){return Yt(t,e)}))}function Xt(t,e){return"object"!==typeof t[0]?e.invert(t):t.map((function(t){return Xt(t,e)}))}const jt=function(t,e,n){var i=(n=n||{}).units||"kilometers",r=n.steps||8;if(!t)throw new Error("geojson is required");if("object"!==typeof n)throw new Error("options must be an object");if("number"!==typeof r)throw new Error("steps must be an number");if(void 0===e)throw new Error("radius is required");if(r<=0)throw new Error("steps must be greater than 0");var s=[];switch(t.type){case"GeometryCollection":return(0,o.on)(t,(function(t){var n=zt(t,e,i,r);n&&s.push(n)})),(0,kt.uf)(s);case"FeatureCollection":return(0,o.By)(t,(function(t){var n=zt(t,e,i,r);n&&(0,o.By)(n,(function(t){t&&s.push(t)}))})),(0,kt.uf)(s)}return zt(t,e,i,r)}},40590:(t,e,n)=>{"use strict";n.d(e,{Z:()=>o});var i=n(82086),r=n(40517);const o=function(t,e){void 0===e&&(e={});var n=(0,i.Z)(t),o=(n[0]+n[2])/2,s=(n[1]+n[3])/2;return(0,r.xm)([o,s],e.properties,e)}},56720:(t,e,n)=>{"use strict";n.d(e,{Z:()=>o});var i=n(40517),r=n(48024);const o=function(t){var e={MultiPoint:{coordinates:[],properties:[]},MultiLineString:{coordinates:[],properties:[]},MultiPolygon:{coordinates:[],properties:[]}};return(0,r.By)(t,(function(t){var n,i,r,o;switch(null===(o=t.geometry)||void 0===o?void 0:o.type){case"Point":e.MultiPoint.coordinates.push(t.geometry.coordinates),e.MultiPoint.properties.push(t.properties);break;case"MultiPoint":(n=e.MultiPoint.coordinates).push.apply(n,t.geometry.coordinates),e.MultiPoint.properties.push(t.properties);break;case"LineString":e.MultiLineString.coordinates.push(t.geometry.coordinates),e.MultiLineString.properties.push(t.properties);break;case"MultiLineString":(i=e.MultiLineString.coordinates).push.apply(i,t.geometry.coordinates),e.MultiLineString.properties.push(t.properties);break;case"Polygon":e.MultiPolygon.coordinates.push(t.geometry.coordinates),e.MultiPolygon.properties.push(t.properties);break;case"MultiPolygon":(r=e.MultiPolygon.coordinates).push.apply(r,t.geometry.coordinates),e.MultiPolygon.properties.push(t.properties)}})),(0,i.uf)(Object.keys(e).filter((function(t){return e[t].coordinates.length})).sort().map((function(t){var n={type:t,coordinates:e[t].coordinates},r={collectedProperties:e[t].properties};return(0,i.zL)(n,r)})))}},31890:(t,e,n)=>{"use strict";n.d(e,{Z:()=>u});var i=n(40517),r=n(81011),o=n(48024),s=n(52675),a=n(26625);const u=function(t,e){if(e=e||{},!(0,i.Kn)(e))throw new Error("options is invalid");var n=e.propertyName;(0,r.qI)(t,"Polygon","dissolve");var u=[];if(!e.propertyName)return(0,s.Z)((0,i.tw)(a.union.apply(null,t.features.map((function(t){return t.geometry.coordinates})))));var l={};(0,o.By)(t,(function(t){Object.prototype.hasOwnProperty.call(l,t.properties[n])||(l[t.properties[n]]=[]),l[t.properties[n]].push(t)}));for(var c=Object.keys(l),p=0;p{"use strict";n.d(e,{Z:()=>o});var i=n(81011),r=n(40517);const o=function(t,e,n){void 0===n&&(n={});var o=(0,i.c9)(t),s=(0,i.c9)(e),a=(0,r.Ht)(s[1]-o[1]),u=(0,r.Ht)(s[0]-o[0]),l=(0,r.Ht)(o[1]),c=(0,r.Ht)(s[1]),p=Math.pow(Math.sin(a/2),2)+Math.pow(Math.sin(u/2),2)*Math.cos(l)*Math.cos(c);return(0,r.DL)(2*Math.atan2(Math.sqrt(p),Math.sqrt(1-p)),n.units)}},52675:(t,e,n)=>{"use strict";n.d(e,{Z:()=>o});var i=n(48024),r=n(40517);const o=function(t){if(!t)throw new Error("geojson is required");var e=[];return(0,i.nG)(t,(function(t){e.push(t)})),(0,r.uf)(e)}},40517:(t,e,n)=>{"use strict";n.d(e,{DL:()=>f,Ht:()=>d,Kn:()=>m,Tu:()=>u,_R:()=>c,lF:()=>g,ot:()=>p,rQ:()=>i,tw:()=>h,uf:()=>l,vi:()=>y,xm:()=>s,yu:()=>a,zL:()=>o});var i=6371008.8,r={centimeters:100*i,centimetres:100*i,degrees:i/111325,feet:3.28084*i,inches:39.37*i,kilometers:i/1e3,kilometres:i/1e3,meters:i,metres:i,miles:i/1609.344,millimeters:1e3*i,millimetres:1e3*i,nauticalmiles:i/1852,radians:1,yards:1.0936*i};function o(t,e,n){void 0===n&&(n={});var i={type:"Feature"};return(0===n.id||n.id)&&(i.id=n.id),n.bbox&&(i.bbox=n.bbox),i.properties=e||{},i.geometry=t,i}function s(t,e,n){if(void 0===n&&(n={}),!t)throw new Error("coordinates is required");if(!Array.isArray(t))throw new Error("coordinates must be an Array");if(t.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!_(t[0])||!_(t[1]))throw new Error("coordinates must contain numbers");return o({type:"Point",coordinates:t},e,n)}function a(t,e,n){void 0===n&&(n={});for(var i=0,r=t;i{"use strict";n.d(e,{Z:()=>s});var i=n(40517),r=n(81011),o=n(26625);function s(t,e,n){void 0===n&&(n={});var s=(0,r.wA)(t),a=(0,r.wA)(e),u=o.intersection(s.coordinates,a.coordinates);return 0===u.length?null:1===u.length?(0,i.yu)(u[0],n.properties):(0,i.tw)(u,n.properties)}},81011:(t,e,n)=>{"use strict";n.d(e,{c9:()=>i,oL:()=>a,qI:()=>o,r7:()=>r,wA:()=>s});n(40517);function i(t){if(!t)throw new Error("coord is required");if(!Array.isArray(t)){if("Feature"===t.type&&null!==t.geometry&&"Point"===t.geometry.type)return t.geometry.coordinates;if("Point"===t.type)return t.coordinates}if(Array.isArray(t)&&t.length>=2&&!Array.isArray(t[0])&&!Array.isArray(t[1]))return t;throw new Error("coord must be GeoJSON Point or an Array of numbers")}function r(t){if(Array.isArray(t))return t;if("Feature"===t.type){if(null!==t.geometry)return t.geometry.coordinates}else if(t.coordinates)return t.coordinates;throw new Error("coords must be GeoJSON Feature, Geometry Object or an Array")}function o(t,e,n){if(!t)throw new Error("No featureCollection passed");if(!n)throw new Error(".collectionOf() requires a name");if(!t||"FeatureCollection"!==t.type)throw new Error("Invalid input to "+n+", FeatureCollection required");for(var i=0,r=t.features;i{"use strict";n.d(e,{By:()=>o,nG:()=>u,on:()=>a,pZ:()=>r,pl:()=>s});var i=n(40517);function r(t,e,n){if(null!==t)for(var i,o,s,a,u,l,c,p,h=0,f=0,g=t.type,y="FeatureCollection"===g,d="Feature"===g,_=y?t.features.length:1,m=0;m<_;m++){u=(p=!!(c=y?t.features[m].geometry:d?t.geometry:t)&&"GeometryCollection"===c.type)?c.geometries.length:1;for(var v=0;v{"use strict";n.d(e,{Z:()=>h});var i=n(48024),r=n(40517);const o=function(t){var e=[];return"FeatureCollection"===t.type?(0,i.By)(t,(function(t){(0,i.pZ)(t,(function(n){e.push((0,r.xm)(n,t.properties))}))})):(0,i.pZ)(t,(function(n){e.push((0,r.xm)(n,t.properties))})),(0,r.uf)(e)};var s=n(40590),a=n(56875),u=n(64505);const l=function(t,e){if(!t)throw new Error("targetPoint is required");if(!e)throw new Error("points is required");var n,r=1/0,o=0;return(0,i.By)(e,(function(e,n){var i=(0,u.Z)(t,e);i{"use strict";function*i(t,e){if(void 0===e)for(let n of t)null!=n&&(n=+n)>=n&&(yield n);else{let n=-1;for(let i of t)null!=(i=e(i,++n,t))&&(i=+i)>=i&&(yield i)}}n.d(e,{K:()=>i})},31600:(t,e,n)=>{"use strict";n.d(e,{ZP:()=>a});var i=n(6200),r=n(42514),o=n(14755),s=n(20639);function a(t,e,n){if((a=(t=Float64Array.from((0,s.K)(t,n))).length)&&!isNaN(e=+e)){if(e<=0||a<2)return(0,r.Z)(t);if(e>=1)return(0,i.Z)(t);var a,u=(a-1)*e,l=Math.floor(u),c=(0,i.Z)((0,o.Z)(t,l).subarray(0,l+1));return c+((0,r.Z)(t.subarray(l+1))-c)*(u-l)}}}}]); \ No newline at end of file diff --git a/dist/static/js/638.02fc1f68.js b/dist/static/js/638.02fc1f68.js new file mode 100644 index 0000000..3c03d78 --- /dev/null +++ b/dist/static/js/638.02fc1f68.js @@ -0,0 +1 @@ +(self.webpackChunkmaptable_frontend=self.webpackChunkmaptable_frontend||[]).push([[638],{74128:(A,e,r)=>{"use strict";function t(A){return A}r.d(e,{Em:()=>t})},98968:(A,e,r)=>{"use strict";r.d(e,{Z:()=>t});const t={schemeGroups:{sequential:["BuGn","BuPu","GnBu","OrRd","PuBu","PuBuGn","PuRd","RdPu","YlGn","YlGnBu","YlOrBr","YlOrRd"],singlehue:["Blues","Greens","Greys","Oranges","Purples","Reds"],diverging:["BrBG","PiYG","PRGn","PuOr","RdBu","RdGy","RdYlBu","RdYlGn","Spectral"],qualitative:["Accent","Dark2","Paired","Pastel1","Pastel2","Set1","Set2","Set3"]},YlGn:{3:["#f7fcb9","#addd8e","#31a354"],4:["#ffffcc","#c2e699","#78c679","#238443"],5:["#ffffcc","#c2e699","#78c679","#31a354","#006837"],6:["#ffffcc","#d9f0a3","#addd8e","#78c679","#31a354","#006837"],7:["#ffffcc","#d9f0a3","#addd8e","#78c679","#41ab5d","#238443","#005a32"],8:["#ffffe5","#f7fcb9","#d9f0a3","#addd8e","#78c679","#41ab5d","#238443","#005a32"],9:["#ffffe5","#f7fcb9","#d9f0a3","#addd8e","#78c679","#41ab5d","#238443","#006837","#004529"]},YlGnBu:{3:["#edf8b1","#7fcdbb","#2c7fb8"],4:["#ffffcc","#a1dab4","#41b6c4","#225ea8"],5:["#ffffcc","#a1dab4","#41b6c4","#2c7fb8","#253494"],6:["#ffffcc","#c7e9b4","#7fcdbb","#41b6c4","#2c7fb8","#253494"],7:["#ffffcc","#c7e9b4","#7fcdbb","#41b6c4","#1d91c0","#225ea8","#0c2c84"],8:["#ffffd9","#edf8b1","#c7e9b4","#7fcdbb","#41b6c4","#1d91c0","#225ea8","#0c2c84"],9:["#ffffd9","#edf8b1","#c7e9b4","#7fcdbb","#41b6c4","#1d91c0","#225ea8","#253494","#081d58"]},GnBu:{3:["#e0f3db","#a8ddb5","#43a2ca"],4:["#f0f9e8","#bae4bc","#7bccc4","#2b8cbe"],5:["#f0f9e8","#bae4bc","#7bccc4","#43a2ca","#0868ac"],6:["#f0f9e8","#ccebc5","#a8ddb5","#7bccc4","#43a2ca","#0868ac"],7:["#f0f9e8","#ccebc5","#a8ddb5","#7bccc4","#4eb3d3","#2b8cbe","#08589e"],8:["#f7fcf0","#e0f3db","#ccebc5","#a8ddb5","#7bccc4","#4eb3d3","#2b8cbe","#08589e"],9:["#f7fcf0","#e0f3db","#ccebc5","#a8ddb5","#7bccc4","#4eb3d3","#2b8cbe","#0868ac","#084081"]},BuGn:{3:["#e5f5f9","#99d8c9","#2ca25f"],4:["#edf8fb","#b2e2e2","#66c2a4","#238b45"],5:["#edf8fb","#b2e2e2","#66c2a4","#2ca25f","#006d2c"],6:["#edf8fb","#ccece6","#99d8c9","#66c2a4","#2ca25f","#006d2c"],7:["#edf8fb","#ccece6","#99d8c9","#66c2a4","#41ae76","#238b45","#005824"],8:["#f7fcfd","#e5f5f9","#ccece6","#99d8c9","#66c2a4","#41ae76","#238b45","#005824"],9:["#f7fcfd","#e5f5f9","#ccece6","#99d8c9","#66c2a4","#41ae76","#238b45","#006d2c","#00441b"]},PuBuGn:{3:["#ece2f0","#a6bddb","#1c9099"],4:["#f6eff7","#bdc9e1","#67a9cf","#02818a"],5:["#f6eff7","#bdc9e1","#67a9cf","#1c9099","#016c59"],6:["#f6eff7","#d0d1e6","#a6bddb","#67a9cf","#1c9099","#016c59"],7:["#f6eff7","#d0d1e6","#a6bddb","#67a9cf","#3690c0","#02818a","#016450"],8:["#fff7fb","#ece2f0","#d0d1e6","#a6bddb","#67a9cf","#3690c0","#02818a","#016450"],9:["#fff7fb","#ece2f0","#d0d1e6","#a6bddb","#67a9cf","#3690c0","#02818a","#016c59","#014636"]},PuBu:{3:["#ece7f2","#a6bddb","#2b8cbe"],4:["#f1eef6","#bdc9e1","#74a9cf","#0570b0"],5:["#f1eef6","#bdc9e1","#74a9cf","#2b8cbe","#045a8d"],6:["#f1eef6","#d0d1e6","#a6bddb","#74a9cf","#2b8cbe","#045a8d"],7:["#f1eef6","#d0d1e6","#a6bddb","#74a9cf","#3690c0","#0570b0","#034e7b"],8:["#fff7fb","#ece7f2","#d0d1e6","#a6bddb","#74a9cf","#3690c0","#0570b0","#034e7b"],9:["#fff7fb","#ece7f2","#d0d1e6","#a6bddb","#74a9cf","#3690c0","#0570b0","#045a8d","#023858"]},BuPu:{3:["#e0ecf4","#9ebcda","#8856a7"],4:["#edf8fb","#b3cde3","#8c96c6","#88419d"],5:["#edf8fb","#b3cde3","#8c96c6","#8856a7","#810f7c"],6:["#edf8fb","#bfd3e6","#9ebcda","#8c96c6","#8856a7","#810f7c"],7:["#edf8fb","#bfd3e6","#9ebcda","#8c96c6","#8c6bb1","#88419d","#6e016b"],8:["#f7fcfd","#e0ecf4","#bfd3e6","#9ebcda","#8c96c6","#8c6bb1","#88419d","#6e016b"],9:["#f7fcfd","#e0ecf4","#bfd3e6","#9ebcda","#8c96c6","#8c6bb1","#88419d","#810f7c","#4d004b"]},RdPu:{3:["#fde0dd","#fa9fb5","#c51b8a"],4:["#feebe2","#fbb4b9","#f768a1","#ae017e"],5:["#feebe2","#fbb4b9","#f768a1","#c51b8a","#7a0177"],6:["#feebe2","#fcc5c0","#fa9fb5","#f768a1","#c51b8a","#7a0177"],7:["#feebe2","#fcc5c0","#fa9fb5","#f768a1","#dd3497","#ae017e","#7a0177"],8:["#fff7f3","#fde0dd","#fcc5c0","#fa9fb5","#f768a1","#dd3497","#ae017e","#7a0177"],9:["#fff7f3","#fde0dd","#fcc5c0","#fa9fb5","#f768a1","#dd3497","#ae017e","#7a0177","#49006a"]},PuRd:{3:["#e7e1ef","#c994c7","#dd1c77"],4:["#f1eef6","#d7b5d8","#df65b0","#ce1256"],5:["#f1eef6","#d7b5d8","#df65b0","#dd1c77","#980043"],6:["#f1eef6","#d4b9da","#c994c7","#df65b0","#dd1c77","#980043"],7:["#f1eef6","#d4b9da","#c994c7","#df65b0","#e7298a","#ce1256","#91003f"],8:["#f7f4f9","#e7e1ef","#d4b9da","#c994c7","#df65b0","#e7298a","#ce1256","#91003f"],9:["#f7f4f9","#e7e1ef","#d4b9da","#c994c7","#df65b0","#e7298a","#ce1256","#980043","#67001f"]},OrRd:{3:["#fee8c8","#fdbb84","#e34a33"],4:["#fef0d9","#fdcc8a","#fc8d59","#d7301f"],5:["#fef0d9","#fdcc8a","#fc8d59","#e34a33","#b30000"],6:["#fef0d9","#fdd49e","#fdbb84","#fc8d59","#e34a33","#b30000"],7:["#fef0d9","#fdd49e","#fdbb84","#fc8d59","#ef6548","#d7301f","#990000"],8:["#fff7ec","#fee8c8","#fdd49e","#fdbb84","#fc8d59","#ef6548","#d7301f","#990000"],9:["#fff7ec","#fee8c8","#fdd49e","#fdbb84","#fc8d59","#ef6548","#d7301f","#b30000","#7f0000"]},YlOrRd:{3:["#ffeda0","#feb24c","#f03b20"],4:["#ffffb2","#fecc5c","#fd8d3c","#e31a1c"],5:["#ffffb2","#fecc5c","#fd8d3c","#f03b20","#bd0026"],6:["#ffffb2","#fed976","#feb24c","#fd8d3c","#f03b20","#bd0026"],7:["#ffffb2","#fed976","#feb24c","#fd8d3c","#fc4e2a","#e31a1c","#b10026"],8:["#ffffcc","#ffeda0","#fed976","#feb24c","#fd8d3c","#fc4e2a","#e31a1c","#b10026"],9:["#ffffcc","#ffeda0","#fed976","#feb24c","#fd8d3c","#fc4e2a","#e31a1c","#bd0026","#800026"]},YlOrBr:{3:["#fff7bc","#fec44f","#d95f0e"],4:["#ffffd4","#fed98e","#fe9929","#cc4c02"],5:["#ffffd4","#fed98e","#fe9929","#d95f0e","#993404"],6:["#ffffd4","#fee391","#fec44f","#fe9929","#d95f0e","#993404"],7:["#ffffd4","#fee391","#fec44f","#fe9929","#ec7014","#cc4c02","#8c2d04"],8:["#ffffe5","#fff7bc","#fee391","#fec44f","#fe9929","#ec7014","#cc4c02","#8c2d04"],9:["#ffffe5","#fff7bc","#fee391","#fec44f","#fe9929","#ec7014","#cc4c02","#993404","#662506"]},Purples:{3:["#efedf5","#bcbddc","#756bb1"],4:["#f2f0f7","#cbc9e2","#9e9ac8","#6a51a3"],5:["#f2f0f7","#cbc9e2","#9e9ac8","#756bb1","#54278f"],6:["#f2f0f7","#dadaeb","#bcbddc","#9e9ac8","#756bb1","#54278f"],7:["#f2f0f7","#dadaeb","#bcbddc","#9e9ac8","#807dba","#6a51a3","#4a1486"],8:["#fcfbfd","#efedf5","#dadaeb","#bcbddc","#9e9ac8","#807dba","#6a51a3","#4a1486"],9:["#fcfbfd","#efedf5","#dadaeb","#bcbddc","#9e9ac8","#807dba","#6a51a3","#54278f","#3f007d"]},Blues:{3:["#deebf7","#9ecae1","#3182bd"],4:["#eff3ff","#bdd7e7","#6baed6","#2171b5"],5:["#eff3ff","#bdd7e7","#6baed6","#3182bd","#08519c"],6:["#eff3ff","#c6dbef","#9ecae1","#6baed6","#3182bd","#08519c"],7:["#eff3ff","#c6dbef","#9ecae1","#6baed6","#4292c6","#2171b5","#084594"],8:["#f7fbff","#deebf7","#c6dbef","#9ecae1","#6baed6","#4292c6","#2171b5","#084594"],9:["#f7fbff","#deebf7","#c6dbef","#9ecae1","#6baed6","#4292c6","#2171b5","#08519c","#08306b"]},Greens:{3:["#e5f5e0","#a1d99b","#31a354"],4:["#edf8e9","#bae4b3","#74c476","#238b45"],5:["#edf8e9","#bae4b3","#74c476","#31a354","#006d2c"],6:["#edf8e9","#c7e9c0","#a1d99b","#74c476","#31a354","#006d2c"],7:["#edf8e9","#c7e9c0","#a1d99b","#74c476","#41ab5d","#238b45","#005a32"],8:["#f7fcf5","#e5f5e0","#c7e9c0","#a1d99b","#74c476","#41ab5d","#238b45","#005a32"],9:["#f7fcf5","#e5f5e0","#c7e9c0","#a1d99b","#74c476","#41ab5d","#238b45","#006d2c","#00441b"]},Oranges:{3:["#fee6ce","#fdae6b","#e6550d"],4:["#feedde","#fdbe85","#fd8d3c","#d94701"],5:["#feedde","#fdbe85","#fd8d3c","#e6550d","#a63603"],6:["#feedde","#fdd0a2","#fdae6b","#fd8d3c","#e6550d","#a63603"],7:["#feedde","#fdd0a2","#fdae6b","#fd8d3c","#f16913","#d94801","#8c2d04"],8:["#fff5eb","#fee6ce","#fdd0a2","#fdae6b","#fd8d3c","#f16913","#d94801","#8c2d04"],9:["#fff5eb","#fee6ce","#fdd0a2","#fdae6b","#fd8d3c","#f16913","#d94801","#a63603","#7f2704"]},Reds:{3:["#fee0d2","#fc9272","#de2d26"],4:["#fee5d9","#fcae91","#fb6a4a","#cb181d"],5:["#fee5d9","#fcae91","#fb6a4a","#de2d26","#a50f15"],6:["#fee5d9","#fcbba1","#fc9272","#fb6a4a","#de2d26","#a50f15"],7:["#fee5d9","#fcbba1","#fc9272","#fb6a4a","#ef3b2c","#cb181d","#99000d"],8:["#fff5f0","#fee0d2","#fcbba1","#fc9272","#fb6a4a","#ef3b2c","#cb181d","#99000d"],9:["#fff5f0","#fee0d2","#fcbba1","#fc9272","#fb6a4a","#ef3b2c","#cb181d","#a50f15","#67000d"]},Greys:{3:["#f0f0f0","#bdbdbd","#636363"],4:["#f7f7f7","#cccccc","#969696","#525252"],5:["#f7f7f7","#cccccc","#969696","#636363","#252525"],6:["#f7f7f7","#d9d9d9","#bdbdbd","#969696","#636363","#252525"],7:["#f7f7f7","#d9d9d9","#bdbdbd","#969696","#737373","#525252","#252525"],8:["#ffffff","#f0f0f0","#d9d9d9","#bdbdbd","#969696","#737373","#525252","#252525"],9:["#ffffff","#f0f0f0","#d9d9d9","#bdbdbd","#969696","#737373","#525252","#252525","#000000"]},PuOr:{3:["#f1a340","#f7f7f7","#998ec3"],4:["#e66101","#fdb863","#b2abd2","#5e3c99"],5:["#e66101","#fdb863","#f7f7f7","#b2abd2","#5e3c99"],6:["#b35806","#f1a340","#fee0b6","#d8daeb","#998ec3","#542788"],7:["#b35806","#f1a340","#fee0b6","#f7f7f7","#d8daeb","#998ec3","#542788"],8:["#b35806","#e08214","#fdb863","#fee0b6","#d8daeb","#b2abd2","#8073ac","#542788"],9:["#b35806","#e08214","#fdb863","#fee0b6","#f7f7f7","#d8daeb","#b2abd2","#8073ac","#542788"],10:["#7f3b08","#b35806","#e08214","#fdb863","#fee0b6","#d8daeb","#b2abd2","#8073ac","#542788","#2d004b"],11:["#7f3b08","#b35806","#e08214","#fdb863","#fee0b6","#f7f7f7","#d8daeb","#b2abd2","#8073ac","#542788","#2d004b"]},BrBG:{3:["#d8b365","#f5f5f5","#5ab4ac"],4:["#a6611a","#dfc27d","#80cdc1","#018571"],5:["#a6611a","#dfc27d","#f5f5f5","#80cdc1","#018571"],6:["#8c510a","#d8b365","#f6e8c3","#c7eae5","#5ab4ac","#01665e"],7:["#8c510a","#d8b365","#f6e8c3","#f5f5f5","#c7eae5","#5ab4ac","#01665e"],8:["#8c510a","#bf812d","#dfc27d","#f6e8c3","#c7eae5","#80cdc1","#35978f","#01665e"],9:["#8c510a","#bf812d","#dfc27d","#f6e8c3","#f5f5f5","#c7eae5","#80cdc1","#35978f","#01665e"],10:["#543005","#8c510a","#bf812d","#dfc27d","#f6e8c3","#c7eae5","#80cdc1","#35978f","#01665e","#003c30"],11:["#543005","#8c510a","#bf812d","#dfc27d","#f6e8c3","#f5f5f5","#c7eae5","#80cdc1","#35978f","#01665e","#003c30"]},PRGn:{3:["#af8dc3","#f7f7f7","#7fbf7b"],4:["#7b3294","#c2a5cf","#a6dba0","#008837"],5:["#7b3294","#c2a5cf","#f7f7f7","#a6dba0","#008837"],6:["#762a83","#af8dc3","#e7d4e8","#d9f0d3","#7fbf7b","#1b7837"],7:["#762a83","#af8dc3","#e7d4e8","#f7f7f7","#d9f0d3","#7fbf7b","#1b7837"],8:["#762a83","#9970ab","#c2a5cf","#e7d4e8","#d9f0d3","#a6dba0","#5aae61","#1b7837"],9:["#762a83","#9970ab","#c2a5cf","#e7d4e8","#f7f7f7","#d9f0d3","#a6dba0","#5aae61","#1b7837"],10:["#40004b","#762a83","#9970ab","#c2a5cf","#e7d4e8","#d9f0d3","#a6dba0","#5aae61","#1b7837","#00441b"],11:["#40004b","#762a83","#9970ab","#c2a5cf","#e7d4e8","#f7f7f7","#d9f0d3","#a6dba0","#5aae61","#1b7837","#00441b"]},PiYG:{3:["#e9a3c9","#f7f7f7","#a1d76a"],4:["#d01c8b","#f1b6da","#b8e186","#4dac26"],5:["#d01c8b","#f1b6da","#f7f7f7","#b8e186","#4dac26"],6:["#c51b7d","#e9a3c9","#fde0ef","#e6f5d0","#a1d76a","#4d9221"],7:["#c51b7d","#e9a3c9","#fde0ef","#f7f7f7","#e6f5d0","#a1d76a","#4d9221"],8:["#c51b7d","#de77ae","#f1b6da","#fde0ef","#e6f5d0","#b8e186","#7fbc41","#4d9221"],9:["#c51b7d","#de77ae","#f1b6da","#fde0ef","#f7f7f7","#e6f5d0","#b8e186","#7fbc41","#4d9221"],10:["#8e0152","#c51b7d","#de77ae","#f1b6da","#fde0ef","#e6f5d0","#b8e186","#7fbc41","#4d9221","#276419"],11:["#8e0152","#c51b7d","#de77ae","#f1b6da","#fde0ef","#f7f7f7","#e6f5d0","#b8e186","#7fbc41","#4d9221","#276419"]},RdBu:{3:["#ef8a62","#f7f7f7","#67a9cf"],4:["#ca0020","#f4a582","#92c5de","#0571b0"],5:["#ca0020","#f4a582","#f7f7f7","#92c5de","#0571b0"],6:["#b2182b","#ef8a62","#fddbc7","#d1e5f0","#67a9cf","#2166ac"],7:["#b2182b","#ef8a62","#fddbc7","#f7f7f7","#d1e5f0","#67a9cf","#2166ac"],8:["#b2182b","#d6604d","#f4a582","#fddbc7","#d1e5f0","#92c5de","#4393c3","#2166ac"],9:["#b2182b","#d6604d","#f4a582","#fddbc7","#f7f7f7","#d1e5f0","#92c5de","#4393c3","#2166ac"],10:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#d1e5f0","#92c5de","#4393c3","#2166ac","#053061"],11:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#f7f7f7","#d1e5f0","#92c5de","#4393c3","#2166ac","#053061"]},RdGy:{3:["#ef8a62","#ffffff","#999999"],4:["#ca0020","#f4a582","#bababa","#404040"],5:["#ca0020","#f4a582","#ffffff","#bababa","#404040"],6:["#b2182b","#ef8a62","#fddbc7","#e0e0e0","#999999","#4d4d4d"],7:["#b2182b","#ef8a62","#fddbc7","#ffffff","#e0e0e0","#999999","#4d4d4d"],8:["#b2182b","#d6604d","#f4a582","#fddbc7","#e0e0e0","#bababa","#878787","#4d4d4d"],9:["#b2182b","#d6604d","#f4a582","#fddbc7","#ffffff","#e0e0e0","#bababa","#878787","#4d4d4d"],10:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#e0e0e0","#bababa","#878787","#4d4d4d","#1a1a1a"],11:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#ffffff","#e0e0e0","#bababa","#878787","#4d4d4d","#1a1a1a"]},RdYlBu:{3:["#fc8d59","#ffffbf","#91bfdb"],4:["#d7191c","#fdae61","#abd9e9","#2c7bb6"],5:["#d7191c","#fdae61","#ffffbf","#abd9e9","#2c7bb6"],6:["#d73027","#fc8d59","#fee090","#e0f3f8","#91bfdb","#4575b4"],7:["#d73027","#fc8d59","#fee090","#ffffbf","#e0f3f8","#91bfdb","#4575b4"],8:["#d73027","#f46d43","#fdae61","#fee090","#e0f3f8","#abd9e9","#74add1","#4575b4"],9:["#d73027","#f46d43","#fdae61","#fee090","#ffffbf","#e0f3f8","#abd9e9","#74add1","#4575b4"],10:["#a50026","#d73027","#f46d43","#fdae61","#fee090","#e0f3f8","#abd9e9","#74add1","#4575b4","#313695"],11:["#a50026","#d73027","#f46d43","#fdae61","#fee090","#ffffbf","#e0f3f8","#abd9e9","#74add1","#4575b4","#313695"]},Spectral:{3:["#fc8d59","#ffffbf","#99d594"],4:["#d7191c","#fdae61","#abdda4","#2b83ba"],5:["#d7191c","#fdae61","#ffffbf","#abdda4","#2b83ba"],6:["#d53e4f","#fc8d59","#fee08b","#e6f598","#99d594","#3288bd"],7:["#d53e4f","#fc8d59","#fee08b","#ffffbf","#e6f598","#99d594","#3288bd"],8:["#d53e4f","#f46d43","#fdae61","#fee08b","#e6f598","#abdda4","#66c2a5","#3288bd"],9:["#d53e4f","#f46d43","#fdae61","#fee08b","#ffffbf","#e6f598","#abdda4","#66c2a5","#3288bd"],10:["#9e0142","#d53e4f","#f46d43","#fdae61","#fee08b","#e6f598","#abdda4","#66c2a5","#3288bd","#5e4fa2"],11:["#9e0142","#d53e4f","#f46d43","#fdae61","#fee08b","#ffffbf","#e6f598","#abdda4","#66c2a5","#3288bd","#5e4fa2"]},RdYlGn:{3:["#fc8d59","#ffffbf","#91cf60"],4:["#d7191c","#fdae61","#a6d96a","#1a9641"],5:["#d7191c","#fdae61","#ffffbf","#a6d96a","#1a9641"],6:["#d73027","#fc8d59","#fee08b","#d9ef8b","#91cf60","#1a9850"],7:["#d73027","#fc8d59","#fee08b","#ffffbf","#d9ef8b","#91cf60","#1a9850"],8:["#d73027","#f46d43","#fdae61","#fee08b","#d9ef8b","#a6d96a","#66bd63","#1a9850"],9:["#d73027","#f46d43","#fdae61","#fee08b","#ffffbf","#d9ef8b","#a6d96a","#66bd63","#1a9850"],10:["#a50026","#d73027","#f46d43","#fdae61","#fee08b","#d9ef8b","#a6d96a","#66bd63","#1a9850","#006837"],11:["#a50026","#d73027","#f46d43","#fdae61","#fee08b","#ffffbf","#d9ef8b","#a6d96a","#66bd63","#1a9850","#006837"]},Accent:{3:["#7fc97f","#beaed4","#fdc086"],4:["#7fc97f","#beaed4","#fdc086","#ffff99"],5:["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0"],6:["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0","#f0027f"],7:["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0","#f0027f","#bf5b17"],8:["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0","#f0027f","#bf5b17","#666666"]},Dark2:{3:["#1b9e77","#d95f02","#7570b3"],4:["#1b9e77","#d95f02","#7570b3","#e7298a"],5:["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e"],6:["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e","#e6ab02"],7:["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e","#e6ab02","#a6761d"],8:["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e","#e6ab02","#a6761d","#666666"]},Paired:{3:["#a6cee3","#1f78b4","#b2df8a"],4:["#a6cee3","#1f78b4","#b2df8a","#33a02c"],5:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99"],6:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c"],7:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f"],8:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00"],9:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6"],10:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6","#6a3d9a"],11:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6","#6a3d9a","#ffff99"],12:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6","#6a3d9a","#ffff99","#b15928"]},Pastel1:{3:["#fbb4ae","#b3cde3","#ccebc5"],4:["#fbb4ae","#b3cde3","#ccebc5","#decbe4"],5:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6"],6:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc"],7:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc","#e5d8bd"],8:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc","#e5d8bd","#fddaec"],9:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc","#e5d8bd","#fddaec","#f2f2f2"]},Pastel2:{3:["#b3e2cd","#fdcdac","#cbd5e8"],4:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4"],5:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9"],6:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9","#fff2ae"],7:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9","#fff2ae","#f1e2cc"],8:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9","#fff2ae","#f1e2cc","#cccccc"]},Set1:{3:["#e41a1c","#377eb8","#4daf4a"],4:["#e41a1c","#377eb8","#4daf4a","#984ea3"],5:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00"],6:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33"],7:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33","#a65628"],8:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33","#a65628","#f781bf"],9:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33","#a65628","#f781bf","#999999"]},Set2:{3:["#66c2a5","#fc8d62","#8da0cb"],4:["#66c2a5","#fc8d62","#8da0cb","#e78ac3"],5:["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854"],6:["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854","#ffd92f"],7:["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854","#ffd92f","#e5c494"],8:["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854","#ffd92f","#e5c494","#b3b3b3"]},Set3:{3:["#8dd3c7","#ffffb3","#bebada"],4:["#8dd3c7","#ffffb3","#bebada","#fb8072"],5:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3"],6:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462"],7:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69"],8:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5"],9:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9"],10:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9","#bc80bd"],11:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9","#bc80bd","#ccebc5"],12:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9","#bc80bd","#ccebc5","#ffed6f"]}}},65235:function(A){A.exports=function(){"use strict";var A=1e3,e=6e4,r=36e5,t="millisecond",n="second",i="minute",f="hour",a="day",o="week",u="month",c="quarter",s="year",l="date",d="Invalid Date",b=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,h=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,g={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(A){var e=["th","st","nd","rd"],r=A%100;return"["+A+(e[(r-20)%10]||e[r]||e[0])+"]"}},v=function(A,e,r){var t=String(A);return!t||t.length>=e?A:""+Array(e+1-t.length).join(r)+A},p={s:v,z:function(A){var e=-A.utcOffset(),r=Math.abs(e),t=Math.floor(r/60),n=r%60;return(e<=0?"+":"-")+v(t,2,"0")+":"+v(n,2,"0")},m:function A(e,r){if(e.date()1)return A(f[0])}else{var a=e.name;_[a]=e,n=a}return!t&&n&&(w=n),n||!t&&w},k=function(A,e){if(y(A))return A.clone();var r="object"==typeof e?e:{};return r.date=A,r.args=arguments,new D(r)},m=p;m.l=B,m.i=y,m.w=function(A,e){return k(A,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var D=function(){function g(A){this.$L=B(A.locale,null,!0),this.parse(A),this.$x=this.$x||A.x||{},this[E]=!0}var v=g.prototype;return v.parse=function(A){this.$d=function(A){var e=A.date,r=A.utc;if(null===e)return new Date(NaN);if(m.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var t=e.match(b);if(t){var n=t[2]-1||0,i=(t[7]||"0").substring(0,3);return r?new Date(Date.UTC(t[1],n,t[3]||1,t[4]||0,t[5]||0,t[6]||0,i)):new Date(t[1],n,t[3]||1,t[4]||0,t[5]||0,t[6]||0,i)}}return new Date(e)}(A),this.init()},v.init=function(){var A=this.$d;this.$y=A.getFullYear(),this.$M=A.getMonth(),this.$D=A.getDate(),this.$W=A.getDay(),this.$H=A.getHours(),this.$m=A.getMinutes(),this.$s=A.getSeconds(),this.$ms=A.getMilliseconds()},v.$utils=function(){return m},v.isValid=function(){return!(this.$d.toString()===d)},v.isSame=function(A,e){var r=k(A);return this.startOf(e)<=r&&r<=this.endOf(e)},v.isAfter=function(A,e){return k(A)=0&&(i[s]=parseInt(c,10))}var l=i[3],d=24===l?0:l,b=i[0]+"-"+i[1]+"-"+i[2]+" "+d+":"+i[4]+":"+i[5]+":000",h=+e;return(n.utc(b).valueOf()-(h-=h%1e3))/6e4},o=t.prototype;o.tz=function(A,e){void 0===A&&(A=i);var r=this.utcOffset(),t=this.toDate(),f=t.toLocaleString("en-US",{timeZone:A}),a=Math.round((t-new Date(f))/1e3/60),o=n(f,{locale:this.$L}).$set("millisecond",this.$ms).utcOffset(15*-Math.round(t.getTimezoneOffset()/15)-a,!0);if(e){var u=o.utcOffset();o=o.add(r-u,"minute")}return o.$x.$timezone=A,o},o.offsetName=function(A){var e=this.$x.$timezone||n.tz.guess(),r=f(this.valueOf(),e,{timeZoneName:A}).find((function(A){return"timezonename"===A.type.toLowerCase()}));return r&&r.value};var u=o.startOf;o.startOf=function(A,e){if(!this.$x||!this.$x.$timezone)return u.call(this,A,e);var r=n(this.format("YYYY-MM-DD HH:mm:ss:SSS"),{locale:this.$L});return u.call(r,A,e).tz(this.$x.$timezone,!0)},n.tz=function(A,e,r){var t=r&&e,f=r||e||i,o=a(+n(),f);if("string"!=typeof A)return n(A).tz(f);var u=function(A,e,r){var t=A-60*e*1e3,n=a(t,r);if(e===n)return[t,e];var i=a(t-=60*(n-e)*1e3,r);return n===i?[t,n]:[A-60*Math.min(n,i)*1e3,Math.max(n,i)]}(n.utc(A,t).valueOf(),o,f),c=u[0],s=u[1],l=n(c).utcOffset(s);return l.$x.$timezone=f,l},n.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},n.tz.setDefault=function(A){i=A}}}()},9944:function(A){A.exports=function(){"use strict";var A="minute",e=/[+-]\d\d(?::?\d\d)?/g,r=/([+-]|\d\d)/g;return function(t,n,i){var f=n.prototype;i.utc=function(A){return new n({date:A,utc:!0,args:arguments})},f.utc=function(e){var r=i(this.toDate(),{locale:this.$L,utc:!0});return e?r.add(this.utcOffset(),A):r},f.local=function(){return i(this.toDate(),{locale:this.$L,utc:!1})};var a=f.parse;f.parse=function(A){A.utc&&(this.$u=!0),this.$utils().u(A.$offset)||(this.$offset=A.$offset),a.call(this,A)};var o=f.init;f.init=function(){if(this.$u){var A=this.$d;this.$y=A.getUTCFullYear(),this.$M=A.getUTCMonth(),this.$D=A.getUTCDate(),this.$W=A.getUTCDay(),this.$H=A.getUTCHours(),this.$m=A.getUTCMinutes(),this.$s=A.getUTCSeconds(),this.$ms=A.getUTCMilliseconds()}else o.call(this)};var u=f.utcOffset;f.utcOffset=function(t,n){var i=this.$utils().u;if(i(t))return this.$u?0:i(this.$offset)?u.call(this):this.$offset;if("string"==typeof t&&(t=function(A){void 0===A&&(A="");var t=A.match(e);if(!t)return null;var n=(""+t[0]).match(r)||["-",0,0],i=n[0],f=60*+n[1]+ +n[2];return 0===f?0:"+"===i?f:-f}(t),null===t))return this;var f=Math.abs(t)<=16?60*t:t,a=this;if(n)return a.$offset=f,a.$u=0===t,a;if(0!==t){var o=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(a=this.local().add(f+o,A)).$offset=f,a.$x.$localOffset=o}else a=this.utc();return a};var c=f.format;f.format=function(A){var e=A||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return c.call(this,e)},f.valueOf=function(){var A=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*A},f.isUTC=function(){return!!this.$u},f.toISOString=function(){return this.toDate().toISOString()},f.toString=function(){return this.toDate().toUTCString()};var s=f.toDate;f.toDate=function(A){return"s"===A&&this.$offset?i(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():s.call(this)};var l=f.diff;f.diff=function(A,e,r){if(A&&this.$u===A.$u)return l.call(this,A,e,r);var t=this.local(),n=i(A).local();return l.call(t,n,e,r)}}}()},78062:(A,e,r)=>{"use strict";r.d(e,{rS:()=>k});var t=function(A){var e,r="undefined"!==typeof(A=A||{})?A:{},t={};for(e in r)r.hasOwnProperty(e)&&(t[e]=r[e]);var n,i=[],f="";"undefined"!==typeof document&&document.currentScript&&(f=document.currentScript.src),f=0!==f.indexOf("blob:")?f.substr(0,f.lastIndexOf("/")+1):"",n=function(A,e,r){var t=new XMLHttpRequest;t.open("GET",A,!0),t.responseType="arraybuffer",t.onload=function(){if(200==t.status||0==t.status&&t.response)e(t.response);else{var n=W(A);n?e(n.buffer):r()}},t.onerror=r,t.send(null)};var a=r.print||console.log.bind(console),o=r.printErr||console.warn.bind(console);for(e in t)t.hasOwnProperty(e)&&(r[e]=t[e]);t=null,r.arguments&&(i=r.arguments);var u=0;var c=!1;function s(A){var e,t=r["_"+A];return e="Cannot call unknown function "+A+", make sure it is exported",t||aA("Assertion failed: "+e),t}function l(A,e,r,t,n){var i={string:function(A){var e=0;if(null!==A&&void 0!==A&&0!==A){var r=1+(A.length<<2);(function(A,e,r){(function(A,e,r,t){if(!(t>0))return 0;for(var n=r,i=r+t-1,f=0;f=55296&&a<=57343)a=65536+((1023&a)<<10)|1023&A.charCodeAt(++f);if(a<=127){if(r>=i)break;e[r++]=a}else if(a<=2047){if(r+1>=i)break;e[r++]=192|a>>6,e[r++]=128|63&a}else if(a<=65535){if(r+2>=i)break;e[r++]=224|a>>12,e[r++]=128|a>>6&63,e[r++]=128|63&a}else{if(r+3>=i)break;e[r++]=240|a>>18,e[r++]=128|a>>12&63,e[r++]=128|a>>6&63,e[r++]=128|63&a}}e[r]=0})(A,v,e,r)})(A,e=q(r),r)}return e},array:function(A){var e=q(A.length);return function(A,e){g.set(A,e)}(A,e),e}};var f=s(A),a=[],o=0;if(t)for(var u=0;u=t);)++n;if(n-e>16&&A.subarray&&d)return d.decode(A.subarray(e,n));for(var i="";e>10,56320|1023&u)}}else i+=String.fromCharCode((31&f)<<6|a)}else i+=String.fromCharCode(f)}return i}(v,A,e):""}var h,g,v,p,w,_,E;"undefined"!==typeof TextDecoder&&new TextDecoder("utf-16le");function y(A,e){return A%e>0&&(A+=e-A%e),A}function B(A){h=A,r.HEAP8=g=new Int8Array(A),r.HEAP16=p=new Int16Array(A),r.HEAP32=w=new Int32Array(A),r.HEAPU8=v=new Uint8Array(A),r.HEAPU16=new Uint16Array(A),r.HEAPU32=new Uint32Array(A),r.HEAPF32=_=new Float32Array(A),r.HEAPF64=E=new Float64Array(A)}var k=r.TOTAL_MEMORY||33554432;function m(A){for(;A.length>0;){var e=A.shift();if("function"!=typeof e){var t=e.func;"number"===typeof t?void 0===e.arg?r.dynCall_v(t):r.dynCall_vi(t,e.arg):t(void 0===e.arg?null:e.arg)}else e()}}k=(h=r.buffer?r.buffer:new ArrayBuffer(k)).byteLength,B(h),w[6032]=5267040;var D=[],x=[],M=[],Q=[];var C=Math.abs,P=Math.ceil,I=Math.floor,S=Math.min,R=0,T=null,G=null;r.preloadedImages={},r.preloadedAudios={};var L,F,O=null,U="data:application/octet-stream;base64,";function N(A){return String.prototype.startsWith?A.startsWith(U):0===A.indexOf(U)}O="data:application/octet-stream;base64,AAAAAAAAAAAAAAAAAQAAAAIAAAADAAAABAAAAAUAAAAGAAAAAQAAAAQAAAADAAAABgAAAAUAAAACAAAAAAAAAAIAAAADAAAAAQAAAAQAAAAGAAAAAAAAAAUAAAADAAAABgAAAAQAAAAFAAAAAAAAAAEAAAACAAAABAAAAAUAAAAGAAAAAAAAAAIAAAADAAAAAQAAAAUAAAACAAAAAAAAAAEAAAADAAAABgAAAAQAAAAGAAAAAAAAAAUAAAACAAAAAQAAAAQAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAEAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAIAAAADAAAAAAAAAAAAAAACAAAAAAAAAAEAAAADAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAABAAAAAYAAAAAAAAABQAAAAAAAAAAAAAABAAAAAUAAAAAAAAAAAAAAAAAAAACAAAAAAAAAAYAAAAAAAAABgAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAgAAAAMAAAAEAAAABQAAAAYAAAABAAAAAgAAAAMAAAAEAAAABQAAAAYAAAAAAAAAAgAAAAMAAAAEAAAABQAAAAYAAAAAAAAAAQAAAAMAAAAEAAAABQAAAAYAAAAAAAAAAQAAAAIAAAAEAAAABQAAAAYAAAAAAAAAAQAAAAIAAAADAAAABQAAAAYAAAAAAAAAAQAAAAIAAAADAAAABAAAAAYAAAAAAAAAAQAAAAIAAAADAAAABAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAwAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAgAAAAIAAAAAAAAAAAAAAAYAAAAAAAAAAwAAAAIAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAFAAAABAAAAAAAAAABAAAAAAAAAAAAAAAFAAAABQAAAAAAAAAAAAAAAAAAAAYAAAAAAAAABAAAAAAAAAAGAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAFAAAAAgAAAAQAAAADAAAACAAAAAEAAAAHAAAABgAAAAkAAAAAAAAAAwAAAAIAAAACAAAABgAAAAoAAAALAAAAAAAAAAEAAAAFAAAAAwAAAA0AAAABAAAABwAAAAQAAAAMAAAAAAAAAAQAAAB/AAAADwAAAAgAAAADAAAAAAAAAAwAAAAFAAAAAgAAABIAAAAKAAAACAAAAAAAAAAQAAAABgAAAA4AAAALAAAAEQAAAAEAAAAJAAAAAgAAAAcAAAAVAAAACQAAABMAAAADAAAADQAAAAEAAAAIAAAABQAAABYAAAAQAAAABAAAAAAAAAAPAAAACQAAABMAAAAOAAAAFAAAAAEAAAAHAAAABgAAAAoAAAALAAAAGAAAABcAAAAFAAAAAgAAABIAAAALAAAAEQAAABcAAAAZAAAAAgAAAAYAAAAKAAAADAAAABwAAAANAAAAGgAAAAQAAAAPAAAAAwAAAA0AAAAaAAAAFQAAAB0AAAADAAAADAAAAAcAAAAOAAAAfwAAABEAAAAbAAAACQAAABQAAAAGAAAADwAAABYAAAAcAAAAHwAAAAQAAAAIAAAADAAAABAAAAASAAAAIQAAAB4AAAAIAAAABQAAABYAAAARAAAACwAAAA4AAAAGAAAAIwAAABkAAAAbAAAAEgAAABgAAAAeAAAAIAAAAAUAAAAKAAAAEAAAABMAAAAiAAAAFAAAACQAAAAHAAAAFQAAAAkAAAAUAAAADgAAABMAAAAJAAAAKAAAABsAAAAkAAAAFQAAACYAAAATAAAAIgAAAA0AAAAdAAAABwAAABYAAAAQAAAAKQAAACEAAAAPAAAACAAAAB8AAAAXAAAAGAAAAAsAAAAKAAAAJwAAACUAAAAZAAAAGAAAAH8AAAAgAAAAJQAAAAoAAAAXAAAAEgAAABkAAAAXAAAAEQAAAAsAAAAtAAAAJwAAACMAAAAaAAAAKgAAAB0AAAArAAAADAAAABwAAAANAAAAGwAAACgAAAAjAAAALgAAAA4AAAAUAAAAEQAAABwAAAAfAAAAKgAAACwAAAAMAAAADwAAABoAAAAdAAAAKwAAACYAAAAvAAAADQAAABoAAAAVAAAAHgAAACAAAAAwAAAAMgAAABAAAAASAAAAIQAAAB8AAAApAAAALAAAADUAAAAPAAAAFgAAABwAAAAgAAAAHgAAABgAAAASAAAANAAAADIAAAAlAAAAIQAAAB4AAAAxAAAAMAAAABYAAAAQAAAAKQAAACIAAAATAAAAJgAAABUAAAA2AAAAJAAAADMAAAAjAAAALgAAAC0AAAA4AAAAEQAAABsAAAAZAAAAJAAAABQAAAAiAAAAEwAAADcAAAAoAAAANgAAACUAAAAnAAAANAAAADkAAAAYAAAAFwAAACAAAAAmAAAAfwAAACIAAAAzAAAAHQAAAC8AAAAVAAAAJwAAACUAAAAZAAAAFwAAADsAAAA5AAAALQAAACgAAAAbAAAAJAAAABQAAAA8AAAALgAAADcAAAApAAAAMQAAADUAAAA9AAAAFgAAACEAAAAfAAAAKgAAADoAAAArAAAAPgAAABwAAAAsAAAAGgAAACsAAAA+AAAALwAAAEAAAAAaAAAAKgAAAB0AAAAsAAAANQAAADoAAABBAAAAHAAAAB8AAAAqAAAALQAAACcAAAAjAAAAGQAAAD8AAAA7AAAAOAAAAC4AAAA8AAAAOAAAAEQAAAAbAAAAKAAAACMAAAAvAAAAJgAAACsAAAAdAAAARQAAADMAAABAAAAAMAAAADEAAAAeAAAAIQAAAEMAAABCAAAAMgAAADEAAAB/AAAAPQAAAEIAAAAhAAAAMAAAACkAAAAyAAAAMAAAACAAAAAeAAAARgAAAEMAAAA0AAAAMwAAAEUAAAA2AAAARwAAACYAAAAvAAAAIgAAADQAAAA5AAAARgAAAEoAAAAgAAAAJQAAADIAAAA1AAAAPQAAAEEAAABLAAAAHwAAACkAAAAsAAAANgAAAEcAAAA3AAAASQAAACIAAAAzAAAAJAAAADcAAAAoAAAANgAAACQAAABIAAAAPAAAAEkAAAA4AAAARAAAAD8AAABNAAAAIwAAAC4AAAAtAAAAOQAAADsAAABKAAAATgAAACUAAAAnAAAANAAAADoAAAB/AAAAPgAAAEwAAAAsAAAAQQAAACoAAAA7AAAAPwAAAE4AAABPAAAAJwAAAC0AAAA5AAAAPAAAAEgAAABEAAAAUAAAACgAAAA3AAAALgAAAD0AAAA1AAAAMQAAACkAAABRAAAASwAAAEIAAAA+AAAAKwAAADoAAAAqAAAAUgAAAEAAAABMAAAAPwAAAH8AAAA4AAAALQAAAE8AAAA7AAAATQAAAEAAAAAvAAAAPgAAACsAAABUAAAARQAAAFIAAABBAAAAOgAAADUAAAAsAAAAVgAAAEwAAABLAAAAQgAAAEMAAABRAAAAVQAAADEAAAAwAAAAPQAAAEMAAABCAAAAMgAAADAAAABXAAAAVQAAAEYAAABEAAAAOAAAADwAAAAuAAAAWgAAAE0AAABQAAAARQAAADMAAABAAAAALwAAAFkAAABHAAAAVAAAAEYAAABDAAAANAAAADIAAABTAAAAVwAAAEoAAABHAAAAWQAAAEkAAABbAAAAMwAAAEUAAAA2AAAASAAAAH8AAABJAAAANwAAAFAAAAA8AAAAWAAAAEkAAABbAAAASAAAAFgAAAA2AAAARwAAADcAAABKAAAATgAAAFMAAABcAAAANAAAADkAAABGAAAASwAAAEEAAAA9AAAANQAAAF4AAABWAAAAUQAAAEwAAABWAAAAUgAAAGAAAAA6AAAAQQAAAD4AAABNAAAAPwAAAEQAAAA4AAAAXQAAAE8AAABaAAAATgAAAEoAAAA7AAAAOQAAAF8AAABcAAAATwAAAE8AAABOAAAAPwAAADsAAABdAAAAXwAAAE0AAABQAAAARAAAAEgAAAA8AAAAYwAAAFoAAABYAAAAUQAAAFUAAABeAAAAZQAAAD0AAABCAAAASwAAAFIAAABgAAAAVAAAAGIAAAA+AAAATAAAAEAAAABTAAAAfwAAAEoAAABGAAAAZAAAAFcAAABcAAAAVAAAAEUAAABSAAAAQAAAAGEAAABZAAAAYgAAAFUAAABXAAAAZQAAAGYAAABCAAAAQwAAAFEAAABWAAAATAAAAEsAAABBAAAAaAAAAGAAAABeAAAAVwAAAFMAAABmAAAAZAAAAEMAAABGAAAAVQAAAFgAAABIAAAAWwAAAEkAAABjAAAAUAAAAGkAAABZAAAAYQAAAFsAAABnAAAARQAAAFQAAABHAAAAWgAAAE0AAABQAAAARAAAAGoAAABdAAAAYwAAAFsAAABJAAAAWQAAAEcAAABpAAAAWAAAAGcAAABcAAAAUwAAAE4AAABKAAAAbAAAAGQAAABfAAAAXQAAAE8AAABaAAAATQAAAG0AAABfAAAAagAAAF4AAABWAAAAUQAAAEsAAABrAAAAaAAAAGUAAABfAAAAXAAAAE8AAABOAAAAbQAAAGwAAABdAAAAYAAAAGgAAABiAAAAbgAAAEwAAABWAAAAUgAAAGEAAAB/AAAAYgAAAFQAAABnAAAAWQAAAG8AAABiAAAAbgAAAGEAAABvAAAAUgAAAGAAAABUAAAAYwAAAFAAAABpAAAAWAAAAGoAAABaAAAAcQAAAGQAAABmAAAAUwAAAFcAAABsAAAAcgAAAFwAAABlAAAAZgAAAGsAAABwAAAAUQAAAFUAAABeAAAAZgAAAGUAAABXAAAAVQAAAHIAAABwAAAAZAAAAGcAAABbAAAAYQAAAFkAAAB0AAAAaQAAAG8AAABoAAAAawAAAG4AAABzAAAAVgAAAF4AAABgAAAAaQAAAFgAAABnAAAAWwAAAHEAAABjAAAAdAAAAGoAAABdAAAAYwAAAFoAAAB1AAAAbQAAAHEAAABrAAAAfwAAAGUAAABeAAAAcwAAAGgAAABwAAAAbAAAAGQAAABfAAAAXAAAAHYAAAByAAAAbQAAAG0AAABsAAAAXQAAAF8AAAB1AAAAdgAAAGoAAABuAAAAYgAAAGgAAABgAAAAdwAAAG8AAABzAAAAbwAAAGEAAABuAAAAYgAAAHQAAABnAAAAdwAAAHAAAABrAAAAZgAAAGUAAAB4AAAAcwAAAHIAAABxAAAAYwAAAHQAAABpAAAAdQAAAGoAAAB5AAAAcgAAAHAAAABkAAAAZgAAAHYAAAB4AAAAbAAAAHMAAABuAAAAawAAAGgAAAB4AAAAdwAAAHAAAAB0AAAAZwAAAHcAAABvAAAAcQAAAGkAAAB5AAAAdQAAAH8AAABtAAAAdgAAAHEAAAB5AAAAagAAAHYAAAB4AAAAbAAAAHIAAAB1AAAAeQAAAG0AAAB3AAAAbwAAAHMAAABuAAAAeQAAAHQAAAB4AAAAeAAAAHMAAAByAAAAcAAAAHkAAAB3AAAAdgAAAHkAAAB0AAAAeAAAAHcAAAB1AAAAcQAAAHYAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAABAAAABQAAAAEAAAAAAAAAAAAAAAEAAAAAAAAAAQAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAACAAAABQAAAAEAAAAAAAAA/////wEAAAAAAAAAAwAAAAQAAAACAAAAAAAAAAAAAAABAAAAAAAAAAEAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAMAAAAFAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAFAAAAAQAAAAAAAAAAAAAAAQAAAAMAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAEAAAADAAAAAAAAAAAAAAABAAAAAAAAAAMAAAADAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAADAAAABQAAAAEAAAAAAAAAAAAAAAEAAAAAAAAAAQAAAAAAAAABAAAAAAAAAP////8DAAAAAAAAAAUAAAACAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAEAAAABQAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAMAAAADAAAAAwAAAAMAAAAAAAAAAwAAAAAAAAAAAAAAAAAAAAMAAAAFAAAABQAAAAAAAAAAAAAAAwAAAAMAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAADAAAAAwAAAAAAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAFAAAABQAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAQAAAAAAAAABAAAAAAAAAAMAAAADAAAAAwAAAAAAAAADAAAAAAAAAAAAAAD/////AwAAAAAAAAAFAAAAAgAAAAAAAAAAAAAAAAAAAAAAAAADAAAAAAAAAAAAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAADAAAAAAAAAAAAAAAAAAAAAwAAAAMAAAAAAAAAAAAAAAEAAAAAAAAAAQAAAAAAAAABAAAAAAAAAAAAAAABAAAAAwAAAAAAAAAAAAAAAQAAAAAAAAADAAAAAwAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAMAAAADAAAAAwAAAAMAAAAAAAAAAwAAAAAAAAAAAAAAAQAAAAMAAAAAAAAAAAAAAAEAAAAAAAAAAwAAAAMAAAADAAAAAwAAAAAAAAADAAAAAAAAAAAAAAADAAAAAAAAAAMAAAAAAAAAAwAAAAAAAAAAAAAAAAAAAAMAAAAAAAAAAAAAAAMAAAAAAAAAAwAAAAAAAAAAAAAAAAAAAAMAAAADAAAAAAAAAP////8DAAAAAAAAAAUAAAACAAAAAAAAAAAAAAADAAAAAAAAAAAAAAADAAAAAwAAAAAAAAAAAAAAAwAAAAAAAAAAAAAAAwAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAAUAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAFAAAABQAAAAAAAAAAAAAAAwAAAAMAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAwAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAwAAAAAAAAAAAAAAAwAAAAMAAAAAAAAAAAAAAAAAAAADAAAAAAAAAAMAAAAAAAAAAAAAAAMAAAADAAAAAwAAAAAAAAADAAAAAAAAAAAAAAADAAAAAwAAAAMAAAAAAAAAAwAAAAAAAAAAAAAA/////wMAAAAAAAAABQAAAAIAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAAAAAAAAAAAAAwAAAAAAAAADAAAAAAAAAAAAAAAAAAAAAwAAAAMAAAAAAAAAAAAAAAMAAAAAAAAAAwAAAAAAAAADAAAAAAAAAAMAAAADAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAAAAAAADAAAAAAAAAAMAAAAAAAAAAAAAAAMAAAAAAAAAAAAAAAMAAAADAAAAAAAAAAMAAAADAAAAAwAAAAAAAAAAAAAAAwAAAAAAAAAAAAAAAAAAAAMAAAAAAAAAAwAAAAAAAAAAAAAA/////wMAAAAAAAAABQAAAAIAAAAAAAAAAAAAAAMAAAADAAAAAwAAAAMAAAADAAAAAAAAAAAAAAADAAAAAwAAAAMAAAADAAAAAwAAAAAAAAAAAAAAAwAAAAMAAAADAAAAAwAAAAAAAAADAAAAAAAAAAMAAAADAAAAAwAAAAMAAAAAAAAAAwAAAAAAAAD/////AwAAAAAAAAAFAAAAAgAAAAAAAAAAAAAAAAAAAAAAAAADAAAAAAAAAAAAAAADAAAAAAAAAAMAAAADAAAAAwAAAAAAAAADAAAAAAAAAAAAAAADAAAAAAAAAAAAAAAAAAAAAwAAAAMAAAAAAAAAAwAAAAAAAAAAAAAAAwAAAAMAAAAAAAAAAAAAAAMAAAADAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAADAAAAAAAAAAAAAAADAAAAAwAAAAAAAAAAAAAAAAAAAAMAAAAAAAAAAAAAAAMAAAADAAAAAAAAAAAAAAAAAAAAAwAAAAAAAAADAAAAAAAAAAAAAAD/////AwAAAAAAAAAFAAAAAgAAAAAAAAAAAAAAAwAAAAMAAAADAAAAAAAAAAAAAAADAAAAAAAAAAMAAAADAAAAAwAAAAAAAAAAAAAAAwAAAAAAAAAAAAAAAAAAAAMAAAAAAAAAAAAAAAMAAAAAAAAAAwAAAAAAAAAAAAAAAAAAAAMAAAADAAAAAAAAAAAAAAAAAAAAAwAAAAAAAAAFAAAAAAAAAAAAAAADAAAAAwAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAADAAAAAQAAAAAAAAABAAAAAAAAAAAAAAABAAAAAwAAAAEAAAAAAAAAAQAAAAAAAAAAAAAAAwAAAAAAAAADAAAAAAAAAAMAAAAAAAAAAAAAAAMAAAAAAAAAAwAAAAAAAAADAAAAAAAAAP////8DAAAAAAAAAAUAAAACAAAAAAAAAAAAAAAAAAAAAwAAAAAAAAAAAAAAAwAAAAMAAAAAAAAAAAAAAAAAAAADAAAAAAAAAAMAAAAAAAAAAAAAAAMAAAAAAAAAAAAAAAMAAAADAAAAAAAAAAAAAAADAAAAAwAAAAMAAAADAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAADAAAAAAAAAAUAAAAAAAAAAAAAAAMAAAADAAAAAwAAAAMAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAwAAAAMAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAAAAAAAFAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAFAAAABQAAAAAAAAAAAAAAAAAAAAMAAAAAAAAAAAAAAAMAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAMAAAAAAAAAAwAAAAAAAAAAAAAA/////wMAAAAAAAAABQAAAAIAAAAAAAAAAAAAAAMAAAADAAAAAwAAAAAAAAAAAAAAAwAAAAAAAAAFAAAAAAAAAAAAAAAFAAAABQAAAAAAAAAAAAAAAAAAAAEAAAADAAAAAQAAAAAAAAABAAAAAAAAAAMAAAADAAAAAwAAAAAAAAAAAAAAAwAAAAAAAAADAAAAAwAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAADAAAAAQAAAAAAAAABAAAAAAAAAAMAAAADAAAAAwAAAAMAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAEAAAAAAAAAAwAAAAUAAAABAAAAAAAAAP////8DAAAAAAAAAAUAAAACAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAFAAAABQAAAAAAAAAAAAAAAAAAAAEAAAAAAAAABAAAAAUAAAABAAAAAAAAAAMAAAADAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAADAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAIAAAAFAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAEAAAADAAAAAQAAAAAAAAABAAAAAAAAAAUAAAAAAAAAAAAAAAUAAAAFAAAAAAAAAAAAAAD/////AQAAAAAAAAADAAAABAAAAAIAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAUAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAFAAAAAAAAAAAAAAAFAAAABQAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAQAAAAUAAAABAAAAAAAAAAAAAAABAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAAEAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAAAAAAAAAAAAAEAAAD//////////wEAAAABAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAQAAAAEAAAAAAAAAAAAAAAAAAAADAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAAEAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAsAAAACAAAAAAAAAAAAAAABAAAAAgAAAAYAAAAEAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAYAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAgAAAAAAAAABAAAAAQAAAAAAAAAAAAAAAAAAAAcAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAACAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAYAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAKAAAAAgAAAAAAAAAAAAAAAQAAAAEAAAAFAAAABgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAALAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAEAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAABAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAABwAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAsAAAABAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACgAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAACAAAAAAAAAAAAAAABAAAAAwAAAAcAAAAGAAAAAQAAAAAAAAABAAAAAAAAAAAAAAAAAAAABwAAAAEAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAADAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAwAAAAAAAAABAAAAAQAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAGAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAADgAAAAIAAAAAAAAAAAAAAAEAAAAAAAAACQAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACgAAAAEAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAQAAAAEAAAAAAAAAAAAAAAAAAAAMAAAAAQAAAAEAAAAAAAAAAAAAAAAAAAAAAAAABwAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAsAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAKAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADQAAAAIAAAAAAAAAAAAAAAEAAAAEAAAACAAAAAoAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAALAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAACQAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAGAAAAAgAAAAAAAAAAAAAAAQAAAAsAAAAPAAAACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAkAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAOAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAEAAAAAAAAAAQAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAQAAAAEAAAAAAAAAAAAAAAAAAAAIAAAAAQAAAAAAAAABAAAAAAAAAAAAAAAAAAAABQAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAAAAgAAAAAAAAAAAAAAAQAAAAwAAAAQAAAADAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAoAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAJAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADQAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAPAAAAAAAAAAEAAAABAAAAAAAAAAAAAAAAAAAADwAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAQAAAAEAAAAAAAAAAAAAAAAAAAAAAAAADQAAAAEAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAACAAAAAAAAAAAAAAABAAAACgAAABMAAAAIAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAkAAAABAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAEQAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAwAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEQAAAAAAAAABAAAAAQAAAAAAAAAAAAAAAAAAAA8AAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAQAAAAAQAAAAAAAAABAAAAAAAAAAAAAAAAAAAACQAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAANAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAAAAIAAAAAAAAAAAAAAAEAAAANAAAAEQAAAA0AAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAARAAAAAQAAAAAAAAABAAAAAAAAAAAAAAAAAAAAEwAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAA4AAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAATAAAAAAAAAAEAAAABAAAAAAAAAAAAAAAAAAAAEQAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAA0AAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAARAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAkAAAACAAAAAAAAAAAAAAABAAAADgAAABIAAAAPAAAAAQAAAAAAAAABAAAAAAAAAAAAAAAAAAAADwAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABIAAAAAAAAAAQAAAAEAAAAAAAAAAAAAAAAAAAASAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAEwAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAABEAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAATAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEgAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAABIAAAABAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAATAAAAAgAAAAAAAAAAAAAAAQAAAP//////////EwAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAATAAAAAQAAAAAAAAABAAAAAAAAAAAAAAAAAAAAEgAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAASAAAAAAAAABgAAAAAAAAAIQAAAAAAAAAeAAAAAAAAACAAAAADAAAAMQAAAAEAAAAwAAAAAwAAADIAAAADAAAACAAAAAAAAAAFAAAABQAAAAoAAAAFAAAAFgAAAAAAAAAQAAAAAAAAABIAAAAAAAAAKQAAAAEAAAAhAAAAAAAAAB4AAAAAAAAABAAAAAAAAAAAAAAABQAAAAIAAAAFAAAADwAAAAEAAAAIAAAAAAAAAAUAAAAFAAAAHwAAAAEAAAAWAAAAAAAAABAAAAAAAAAAAgAAAAAAAAAGAAAAAAAAAA4AAAAAAAAACgAAAAAAAAALAAAAAAAAABEAAAADAAAAGAAAAAEAAAAXAAAAAwAAABkAAAADAAAAAAAAAAAAAAABAAAABQAAAAkAAAAFAAAABQAAAAAAAAACAAAAAAAAAAYAAAAAAAAAEgAAAAEAAAAKAAAAAAAAAAsAAAAAAAAABAAAAAEAAAADAAAABQAAAAcAAAAFAAAACAAAAAEAAAAAAAAAAAAAAAEAAAAFAAAAEAAAAAEAAAAFAAAAAAAAAAIAAAAAAAAABwAAAAAAAAAVAAAAAAAAACYAAAAAAAAACQAAAAAAAAATAAAAAAAAACIAAAADAAAADgAAAAEAAAAUAAAAAwAAACQAAAADAAAAAwAAAAAAAAANAAAABQAAAB0AAAAFAAAAAQAAAAAAAAAHAAAAAAAAABUAAAAAAAAABgAAAAEAAAAJAAAAAAAAABMAAAAAAAAABAAAAAIAAAAMAAAABQAAABoAAAAFAAAAAAAAAAEAAAADAAAAAAAAAA0AAAAFAAAAAgAAAAEAAAABAAAAAAAAAAcAAAAAAAAAGgAAAAAAAAAqAAAAAAAAADoAAAAAAAAAHQAAAAAAAAArAAAAAAAAAD4AAAADAAAAJgAAAAEAAAAvAAAAAwAAAEAAAAADAAAADAAAAAAAAAAcAAAABQAAACwAAAAFAAAADQAAAAAAAAAaAAAAAAAAACoAAAAAAAAAFQAAAAEAAAAdAAAAAAAAACsAAAAAAAAABAAAAAMAAAAPAAAABQAAAB8AAAAFAAAAAwAAAAEAAAAMAAAAAAAAABwAAAAFAAAABwAAAAEAAAANAAAAAAAAABoAAAAAAAAAHwAAAAAAAAApAAAAAAAAADEAAAAAAAAALAAAAAAAAAA1AAAAAAAAAD0AAAADAAAAOgAAAAEAAABBAAAAAwAAAEsAAAADAAAADwAAAAAAAAAWAAAABQAAACEAAAAFAAAAHAAAAAAAAAAfAAAAAAAAACkAAAAAAAAAKgAAAAEAAAAsAAAAAAAAADUAAAAAAAAABAAAAAQAAAAIAAAABQAAABAAAAAFAAAADAAAAAEAAAAPAAAAAAAAABYAAAAFAAAAGgAAAAEAAAAcAAAAAAAAAB8AAAAAAAAAMgAAAAAAAAAwAAAAAAAAADEAAAADAAAAIAAAAAAAAAAeAAAAAwAAACEAAAADAAAAGAAAAAMAAAASAAAAAwAAABAAAAADAAAARgAAAAAAAABDAAAAAAAAAEIAAAADAAAANAAAAAMAAAAyAAAAAAAAADAAAAAAAAAAJQAAAAMAAAAgAAAAAAAAAB4AAAADAAAAUwAAAAAAAABXAAAAAwAAAFUAAAADAAAASgAAAAMAAABGAAAAAAAAAEMAAAAAAAAAOQAAAAEAAAA0AAAAAwAAADIAAAAAAAAAGQAAAAAAAAAXAAAAAAAAABgAAAADAAAAEQAAAAAAAAALAAAAAwAAAAoAAAADAAAADgAAAAMAAAAGAAAAAwAAAAIAAAADAAAALQAAAAAAAAAnAAAAAAAAACUAAAADAAAAIwAAAAMAAAAZAAAAAAAAABcAAAAAAAAAGwAAAAMAAAARAAAAAAAAAAsAAAADAAAAPwAAAAAAAAA7AAAAAwAAADkAAAADAAAAOAAAAAMAAAAtAAAAAAAAACcAAAAAAAAALgAAAAMAAAAjAAAAAwAAABkAAAAAAAAAJAAAAAAAAAAUAAAAAAAAAA4AAAADAAAAIgAAAAAAAAATAAAAAwAAAAkAAAADAAAAJgAAAAMAAAAVAAAAAwAAAAcAAAADAAAANwAAAAAAAAAoAAAAAAAAABsAAAADAAAANgAAAAMAAAAkAAAAAAAAABQAAAAAAAAAMwAAAAMAAAAiAAAAAAAAABMAAAADAAAASAAAAAAAAAA8AAAAAwAAAC4AAAADAAAASQAAAAMAAAA3AAAAAAAAACgAAAAAAAAARwAAAAMAAAA2AAAAAwAAACQAAAAAAAAAQAAAAAAAAAAvAAAAAAAAACYAAAADAAAAPgAAAAAAAAArAAAAAwAAAB0AAAADAAAAOgAAAAMAAAAqAAAAAwAAABoAAAADAAAAVAAAAAAAAABFAAAAAAAAADMAAAADAAAAUgAAAAMAAABAAAAAAAAAAC8AAAAAAAAATAAAAAMAAAA+AAAAAAAAACsAAAADAAAAYQAAAAAAAABZAAAAAwAAAEcAAAADAAAAYgAAAAMAAABUAAAAAAAAAEUAAAAAAAAAYAAAAAMAAABSAAAAAwAAAEAAAAAAAAAASwAAAAAAAABBAAAAAAAAADoAAAADAAAAPQAAAAAAAAA1AAAAAwAAACwAAAADAAAAMQAAAAMAAAApAAAAAwAAAB8AAAADAAAAXgAAAAAAAABWAAAAAAAAAEwAAAADAAAAUQAAAAMAAABLAAAAAAAAAEEAAAAAAAAAQgAAAAMAAAA9AAAAAAAAADUAAAADAAAAawAAAAAAAABoAAAAAwAAAGAAAAADAAAAZQAAAAMAAABeAAAAAAAAAFYAAAAAAAAAVQAAAAMAAABRAAAAAwAAAEsAAAAAAAAAOQAAAAAAAAA7AAAAAAAAAD8AAAADAAAASgAAAAAAAABOAAAAAwAAAE8AAAADAAAAUwAAAAMAAABcAAAAAwAAAF8AAAADAAAAJQAAAAAAAAAnAAAAAwAAAC0AAAADAAAANAAAAAAAAAA5AAAAAAAAADsAAAAAAAAARgAAAAMAAABKAAAAAAAAAE4AAAADAAAAGAAAAAAAAAAXAAAAAwAAABkAAAADAAAAIAAAAAMAAAAlAAAAAAAAACcAAAADAAAAMgAAAAMAAAA0AAAAAAAAADkAAAAAAAAALgAAAAAAAAA8AAAAAAAAAEgAAAADAAAAOAAAAAAAAABEAAAAAwAAAFAAAAADAAAAPwAAAAMAAABNAAAAAwAAAFoAAAADAAAAGwAAAAAAAAAoAAAAAwAAADcAAAADAAAAIwAAAAAAAAAuAAAAAAAAADwAAAAAAAAALQAAAAMAAAA4AAAAAAAAAEQAAAADAAAADgAAAAAAAAAUAAAAAwAAACQAAAADAAAAEQAAAAMAAAAbAAAAAAAAACgAAAADAAAAGQAAAAMAAAAjAAAAAAAAAC4AAAAAAAAARwAAAAAAAABZAAAAAAAAAGEAAAADAAAASQAAAAAAAABbAAAAAwAAAGcAAAADAAAASAAAAAMAAABYAAAAAwAAAGkAAAADAAAAMwAAAAAAAABFAAAAAwAAAFQAAAADAAAANgAAAAAAAABHAAAAAAAAAFkAAAAAAAAANwAAAAMAAABJAAAAAAAAAFsAAAADAAAAJgAAAAAAAAAvAAAAAwAAAEAAAAADAAAAIgAAAAMAAAAzAAAAAAAAAEUAAAADAAAAJAAAAAMAAAA2AAAAAAAAAEcAAAAAAAAAYAAAAAAAAABoAAAAAAAAAGsAAAADAAAAYgAAAAAAAABuAAAAAwAAAHMAAAADAAAAYQAAAAMAAABvAAAAAwAAAHcAAAADAAAATAAAAAAAAABWAAAAAwAAAF4AAAADAAAAUgAAAAAAAABgAAAAAAAAAGgAAAAAAAAAVAAAAAMAAABiAAAAAAAAAG4AAAADAAAAOgAAAAAAAABBAAAAAwAAAEsAAAADAAAAPgAAAAMAAABMAAAAAAAAAFYAAAADAAAAQAAAAAMAAABSAAAAAAAAAGAAAAAAAAAAVQAAAAAAAABXAAAAAAAAAFMAAAADAAAAZQAAAAAAAABmAAAAAwAAAGQAAAADAAAAawAAAAMAAABwAAAAAwAAAHIAAAADAAAAQgAAAAAAAABDAAAAAwAAAEYAAAADAAAAUQAAAAAAAABVAAAAAAAAAFcAAAAAAAAAXgAAAAMAAABlAAAAAAAAAGYAAAADAAAAMQAAAAAAAAAwAAAAAwAAADIAAAADAAAAPQAAAAMAAABCAAAAAAAAAEMAAAADAAAASwAAAAMAAABRAAAAAAAAAFUAAAAAAAAAXwAAAAAAAABcAAAAAAAAAFMAAAAAAAAATwAAAAAAAABOAAAAAAAAAEoAAAADAAAAPwAAAAEAAAA7AAAAAwAAADkAAAADAAAAbQAAAAAAAABsAAAAAAAAAGQAAAAFAAAAXQAAAAEAAABfAAAAAAAAAFwAAAAAAAAATQAAAAEAAABPAAAAAAAAAE4AAAAAAAAAdQAAAAQAAAB2AAAABQAAAHIAAAAFAAAAagAAAAEAAABtAAAAAAAAAGwAAAAAAAAAWgAAAAEAAABdAAAAAQAAAF8AAAAAAAAAWgAAAAAAAABNAAAAAAAAAD8AAAAAAAAAUAAAAAAAAABEAAAAAAAAADgAAAADAAAASAAAAAEAAAA8AAAAAwAAAC4AAAADAAAAagAAAAAAAABdAAAAAAAAAE8AAAAFAAAAYwAAAAEAAABaAAAAAAAAAE0AAAAAAAAAWAAAAAEAAABQAAAAAAAAAEQAAAAAAAAAdQAAAAMAAABtAAAABQAAAF8AAAAFAAAAcQAAAAEAAABqAAAAAAAAAF0AAAAAAAAAaQAAAAEAAABjAAAAAQAAAFoAAAAAAAAAaQAAAAAAAABYAAAAAAAAAEgAAAAAAAAAZwAAAAAAAABbAAAAAAAAAEkAAAADAAAAYQAAAAEAAABZAAAAAwAAAEcAAAADAAAAcQAAAAAAAABjAAAAAAAAAFAAAAAFAAAAdAAAAAEAAABpAAAAAAAAAFgAAAAAAAAAbwAAAAEAAABnAAAAAAAAAFsAAAAAAAAAdQAAAAIAAABqAAAABQAAAFoAAAAFAAAAeQAAAAEAAABxAAAAAAAAAGMAAAAAAAAAdwAAAAEAAAB0AAAAAQAAAGkAAAAAAAAAdwAAAAAAAABvAAAAAAAAAGEAAAAAAAAAcwAAAAAAAABuAAAAAAAAAGIAAAADAAAAawAAAAEAAABoAAAAAwAAAGAAAAADAAAAeQAAAAAAAAB0AAAAAAAAAGcAAAAFAAAAeAAAAAEAAAB3AAAAAAAAAG8AAAAAAAAAcAAAAAEAAABzAAAAAAAAAG4AAAAAAAAAdQAAAAEAAABxAAAABQAAAGkAAAAFAAAAdgAAAAEAAAB5AAAAAAAAAHQAAAAAAAAAcgAAAAEAAAB4AAAAAQAAAHcAAAAAAAAAcgAAAAAAAABwAAAAAAAAAGsAAAAAAAAAZAAAAAAAAABmAAAAAAAAAGUAAAADAAAAUwAAAAEAAABXAAAAAwAAAFUAAAADAAAAdgAAAAAAAAB4AAAAAAAAAHMAAAAFAAAAbAAAAAEAAAByAAAAAAAAAHAAAAAAAAAAXAAAAAEAAABkAAAAAAAAAGYAAAAAAAAAdQAAAAAAAAB5AAAABQAAAHcAAAAFAAAAbQAAAAEAAAB2AAAAAAAAAHgAAAAAAAAAXwAAAAEAAABsAAAAAQAAAHIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAEAAAAAAAAAAAAAAAEAAAABAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAABAAAAAQAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAGAAAAAgAAAAUAAAABAAAABAAAAAAAAAAAAAAABQAAAAMAAAABAAAABgAAAAQAAAACAAAAAAAAAH6iBfbytuk/Gq6akm/58z/Xrm0Liez0P5doSdOpSwRAWs602ULg8D/dT7Rcbo/1v1N1RQHFNOM/g9Snx7HW3L8HWsP8Q3jfP6VwOLosutk/9rjk1YQcxj+gnmKMsNn6P/HDeuPFY+M/YHwDjqKhB0Ci19/fCVrbP4UxKkDWOP6/pvljWa09tL9wi7wrQXjnv/Z6yLImkM2/3yTlOzY14D+m+WNZrT20PzwKVQnrQwNA9nrIsiaQzT/g40rFrRQFwPa45NWEHMa/kbslHEZq97/xw3rjxWPjv4cLC2SMBci/otff3wla27+rKF5oIAv0P1N1RQHFNOO/iDJPGyWHBUAHWsP8Q3jfvwQf/by16gXAfqIF9vK26b8XrO0Vh0r+v9eubQuJ7PS/BxLrA0ZZ479azrTZQuDwv1MK1EuItPw/yscgV9Z6FkAwHBR2WjQMQJNRzXsQ5vY/GlUHVJYKF0DONuFv2lMNQNCGZ28QJfk/0WUwoIL36D8ggDOMQuATQNqMOeAy/wZAWFYOYM+M2z/LWC4uH3oSQDE+LyTsMgRAkJzhRGWFGEDd4soovCQQQKqk0DJMEP8/rGmNdwOLBUAW2X/9xCbjP4hu3dcqJhNAzuYItRvdB0CgzW3zJW/sPxotm/Y2TxRAQAk9XmdDDEC1Kx9MKgT3P1M+NctcghZAFVqcLlb0C0Bgzd3sB2b2P77mZDPUWhZAFROHJpUGCEDAfma5CxXtPz1DWq/zYxRAmhYY5824F0DOuQKWSbAOQNCMqrvu3fs/L6DR22K2wT9nAAxPBU8RQGiN6mW43AFAZhu25b633D8c1YgmzowSQNM25BRKWARArGS08/lNxD+LFssHwmMRQLC5aNcxBgJABL9HT0WRF0CjCmJmOGEOQHsuaVzMP/s/TWJCaGGwBUCeu1PAPLzjP9nqN9DZOBNAKE4JcydbCkCGtbd1qjPzP8dgm9U8jhVAtPeKTkVwDkCeCLss5l37P401XMPLmBdAFd29VMVQDUBg0yA55h75Pz6odcYLCRdApBM4rBrkAkDyAVWgQxbRP4XDMnK20hFAymLlF7EmzD8GUgo9XBHlP3lbK7T9COc/k+OhPthhy7+YGEpnrOvCPzBFhLs15u4/epbqB6H4uz9IuuLF5svev6lzLKY31es/CaQ0envF5z8ZY0xlUADXv7zaz7HYEuI/CfbK1sn16T8uAQfWwxLWPzKn/YuFN94/5KdbC1AFu793fyCSnlfvPzK2y4doAMY/NRg5t1/X6b/shq4QJaHDP5yNIAKPOeI/vpn7BSE30r/X4YQrO6nrv78Ziv/Thto/DqJ1Y6+y5z9l51NaxFrlv8QlA65HOLS/86dxiEc96z+Hj0+LFjneP6LzBZ8LTc2/DaJ1Y6+y579l51NaxFrlP8QlA65HOLQ/8qdxiEc967+Jj0+LFjnev6LzBZ8LTc0/1qdbC1AFuz93fyCSnlfvvzK2y4doAMa/NRg5t1/X6T/vhq4QJaHDv5yNIAKPOeK/wJn7BSE30j/W4YQrO6nrP78Ziv/Thtq/CaQ0envF578XY0xlUADXP7zaz7HYEuK/CvbK1sn16b8rAQfWwxLWvzKn/YuFN96/zWLlF7EmzL8GUgo9XBHlv3lbK7T9COe/kOOhPthhyz+cGEpnrOvCvzBFhLs15u6/c5bqB6H4u79IuuLF5sveP6lzLKY31eu/AQAAAP////8HAAAA/////zEAAAD/////VwEAAP////9hCQAA/////6dBAAD/////kcsBAP/////3kAwA/////8H2VwAAAAAAAAAAAAAAAAACAAAA/////w4AAAD/////YgAAAP////+uAgAA/////8ISAAD/////ToMAAP////8ilwMA/////+4hGQD/////gu2vAAAAAAAAAAAAAAAAAAAAAAACAAAA//////////8BAAAAAwAAAP//////////////////////////////////////////////////////////////////////////AQAAAAAAAAACAAAA////////////////AwAAAP//////////////////////////////////////////////////////////////////////////AQAAAAAAAAACAAAA////////////////AwAAAP//////////////////////////////////////////////////////////////////////////AQAAAAAAAAACAAAA////////////////AwAAAP//////////////////////////////////////////////////////////AgAAAP//////////AQAAAAAAAAD/////////////////////AwAAAP////////////////////////////////////////////////////8DAAAA/////////////////////wAAAAD/////////////////////AQAAAP///////////////wIAAAD///////////////////////////////8DAAAA/////////////////////wAAAAD///////////////8CAAAAAQAAAP////////////////////////////////////////////////////8DAAAA/////////////////////wAAAAD///////////////8CAAAAAQAAAP////////////////////////////////////////////////////8DAAAA/////////////////////wAAAAD///////////////8CAAAAAQAAAP////////////////////////////////////////////////////8DAAAA/////////////////////wAAAAD///////////////8CAAAAAQAAAP////////////////////////////////////////////////////8BAAAAAgAAAP///////////////wAAAAD/////////////////////AwAAAP////////////////////////////////////////////////////8BAAAAAgAAAP///////////////wAAAAD/////////////////////AwAAAP////////////////////////////////////////////////////8BAAAAAgAAAP///////////////wAAAAD/////////////////////AwAAAP////////////////////////////////////////////////////8BAAAAAgAAAP///////////////wAAAAD/////////////////////AwAAAP///////////////////////////////wIAAAD///////////////8BAAAA/////////////////////wAAAAD/////////////////////AwAAAP////////////////////////////////////////////////////8DAAAA/////////////////////wAAAAABAAAA//////////8CAAAA//////////////////////////////////////////////////////////8DAAAA////////////////AgAAAAAAAAABAAAA//////////////////////////////////////////////////////////////////////////8DAAAA////////////////AgAAAAAAAAABAAAA//////////////////////////////////////////////////////////////////////////8DAAAA////////////////AgAAAAAAAAABAAAA//////////////////////////////////////////////////////////////////////////8DAAAAAQAAAP//////////AgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAACAAAAAAAAAAIAAAABAAAAAQAAAAIAAAACAAAAAAAAAAUAAAAFAAAAAAAAAAIAAAACAAAAAwAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAAAAAAAAgAAAAEAAAACAAAAAgAAAAIAAAAAAAAABQAAAAYAAAAAAAAAAgAAAAIAAAADAAAAAgAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAgAAAAAAAAACAAAAAQAAAAMAAAACAAAAAgAAAAAAAAAFAAAABwAAAAAAAAACAAAAAgAAAAMAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAACAAAAAAAAAAIAAAABAAAABAAAAAIAAAACAAAAAAAAAAUAAAAIAAAAAAAAAAIAAAACAAAAAwAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAAIAAAAAAAAAAgAAAAEAAAAAAAAAAgAAAAIAAAAAAAAABQAAAAkAAAAAAAAAAgAAAAIAAAADAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAKAAAAAgAAAAIAAAAAAAAAAwAAAA4AAAACAAAAAAAAAAIAAAADAAAAAAAAAAAAAAACAAAAAgAAAAMAAAAGAAAAAAAAAAAAAAAAAAAAAAAAAAsAAAACAAAAAgAAAAAAAAADAAAACgAAAAIAAAAAAAAAAgAAAAMAAAABAAAAAAAAAAIAAAACAAAAAwAAAAcAAAAAAAAAAAAAAAAAAAAAAAAADAAAAAIAAAACAAAAAAAAAAMAAAALAAAAAgAAAAAAAAACAAAAAwAAAAIAAAAAAAAAAgAAAAIAAAADAAAACAAAAAAAAAAAAAAAAAAAAAAAAAANAAAAAgAAAAIAAAAAAAAAAwAAAAwAAAACAAAAAAAAAAIAAAADAAAAAwAAAAAAAAACAAAAAgAAAAMAAAAJAAAAAAAAAAAAAAAAAAAAAAAAAA4AAAACAAAAAgAAAAAAAAADAAAADQAAAAIAAAAAAAAAAgAAAAMAAAAEAAAAAAAAAAIAAAACAAAAAwAAAAoAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAIAAAACAAAAAAAAAAMAAAAGAAAAAgAAAAAAAAACAAAAAwAAAA8AAAAAAAAAAgAAAAIAAAADAAAACwAAAAAAAAAAAAAAAAAAAAAAAAAGAAAAAgAAAAIAAAAAAAAAAwAAAAcAAAACAAAAAAAAAAIAAAADAAAAEAAAAAAAAAACAAAAAgAAAAMAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAcAAAACAAAAAgAAAAAAAAADAAAACAAAAAIAAAAAAAAAAgAAAAMAAAARAAAAAAAAAAIAAAACAAAAAwAAAA0AAAAAAAAAAAAAAAAAAAAAAAAACAAAAAIAAAACAAAAAAAAAAMAAAAJAAAAAgAAAAAAAAACAAAAAwAAABIAAAAAAAAAAgAAAAIAAAADAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAJAAAAAgAAAAIAAAAAAAAAAwAAAAUAAAACAAAAAAAAAAIAAAADAAAAEwAAAAAAAAACAAAAAgAAAAMAAAAPAAAAAAAAAAAAAAAAAAAAAAAAABAAAAACAAAAAAAAAAIAAAABAAAAEwAAAAIAAAACAAAAAAAAAAUAAAAKAAAAAAAAAAIAAAACAAAAAwAAABAAAAAAAAAAAAAAAAAAAAAAAAAAEQAAAAIAAAAAAAAAAgAAAAEAAAAPAAAAAgAAAAIAAAAAAAAABQAAAAsAAAAAAAAAAgAAAAIAAAADAAAAEQAAAAAAAAAAAAAAAAAAAAAAAAASAAAAAgAAAAAAAAACAAAAAQAAABAAAAACAAAAAgAAAAAAAAAFAAAADAAAAAAAAAACAAAAAgAAAAMAAAASAAAAAAAAAAAAAAAAAAAAAAAAABMAAAACAAAAAAAAAAIAAAABAAAAEQAAAAIAAAACAAAAAAAAAAUAAAANAAAAAAAAAAIAAAACAAAAAwAAABMAAAAAAAAAAAAAAAAAAAAAAAAADwAAAAIAAAAAAAAAAgAAAAEAAAASAAAAAgAAAAIAAAAAAAAABQAAAA4AAAAAAAAAAgAAAAIAAAADAAAAAgAAAAEAAAAAAAAAAQAAAAIAAAAAAAAAAAAAAAIAAAABAAAAAAAAAAEAAAACAAAAAQAAAAAAAAACAAAAAAAAAAUAAAAEAAAAAAAAAAEAAAAFAAAAAAAAAAAAAAAFAAAABAAAAAAAAAABAAAABQAAAAQAAAAAAAAABQAAAAAAAAACAAAAAQAAAAAAAAABAAAAAgAAAAAAAAAAAAAAAgAAAAEAAAAAAAAAAQAAAAIAAAABAAAAAAAAAAIAAAACAAAAAAAAAAEAAAAAAAAAAAAAAAUAAAAEAAAAAAAAAAEAAAAFAAAAAAAAAAAAAAAFAAAABAAAAAAAAAABAAAABQAAAAQAAAAAAAAABQAAAAUAAAAAAAAAAQAAAAAAAAAAAAAAOgehWlKfUEEz1zLi+JsiQa2og3wcMfVAWCbHorc0yEDi+Yn/Y6mbQJ11/mfsnG9At6bnG4UQQkBvMCQWKqUUQJVmwwswmOc/3hVgVBL3uj//qqOEOdGOPw/WDN4gnGE/H3ANkCUgND+AA8btKgAHPwTXBqJVSdo+XfRQAqsKrj4fc+zLYbSPQklEmCZHv2FCUP+uDso1NEKYtPhwphUHQptxnyFXYdpB7CddZAMmrkGAt1AxSTqBQUibBVdTsFNBSuX3MV+AJkFocv82SLf5QAqmgj7AY81A23VDSEnLoEDGEJVSeDFzQDYrqvBk70VA8U157pcRGUBWfEF+ZKbsP7KBdLHZTpFAqKYk69AqekDbeGY41MdjQD8AZzHK501A1vcrrjubNkD5LnquvBYhQCbiRRD71QlAqt72EbOH8z8Eu+jL1YbdP4uaox/xUcY/abedg1XfsD+BsUdzJ4KZP5wE9YFySIM/rW1kAKMpbT+rZFthVRhWPy4PKlXIs0A/qMZLlwDnMEHByqEF0I0ZQQYSFD8lUQNBPpY+dFs07UAH8BZImBPWQN9RY0I0sMBA2T7kLfc6qUByFYvfhBKTQMq+0Mis1XxA0XQbeQXMZUBJJ5aEGXpQQP7/SY0a6ThAaMD92b/UIkAs8s8yqXoMQNIegOvCk/U/aOi7NZJP4D8AAAAA/////wAAAAAAAAAAAAAAAAAAAAAAAAAA/////////////////////////////////////wAAAAD/////AAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAA/////wAAAAAAAAAAAQAAAAEAAAAAAAAAAAAAAP////8AAAAABQAAAAAAAAAAAAAAAAAAAAAAAAD/////BQAAAAUAAAAAAAAAAAAAAAAAAAAAAAAA/////wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP////////////////////////////////////8AAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD/////////////////////////////////////AAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAABQAAAAEAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA/////////////////////////////////////wAAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAEAAAABAAAAAQAAAAAAAAABAAAAAAAAAAUAAAABAAAAAQAAAAAAAAAAAAAAAQAAAAEAAAAAAAAAAQAAAAEAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQEAAAAAAAEAAQAAAQEAAAAAAAEAAAABAAAAAQABAAAAAAAAAAAAAAAAAAAAAAcAAAAHAAAAAQAAAAIAAAAEAAAAAwAAAAAAAAAAAAAABwAAAAMAAAABAAAAAgAAAAUAAAAEAAAAAAAAAAAAAAAEAAAABAAAAAAAAAACAAAAAQAAAAMAAAAOAAAABgAAAAsAAAACAAAABwAAAAEAAAAYAAAABQAAAAoAAAABAAAABgAAAAAAAAAmAAAABwAAAAwAAAADAAAACAAAAAIAAAAxAAAACQAAAA4AAAAAAAAABQAAAAQAAAA6AAAACAAAAA0AAAAEAAAACQAAAAMAAAA/AAAACwAAAAYAAAAPAAAACgAAABAAAABIAAAADAAAAAcAAAAQAAAACwAAABEAAABTAAAACgAAAAUAAAATAAAADgAAAA8AAABhAAAADQAAAAgAAAARAAAADAAAABIAAABrAAAADgAAAAkAAAASAAAADQAAABMAAAB1AAAADwAAABMAAAARAAAAEgAAABAAAAAGAAAAAgAAAAMAAAAFAAAABAAAAAAAAAAAAAAAAAAAAAYAAAACAAAAAwAAAAEAAAAFAAAABAAAAAAAAAAAAAAABwAAAAUAAAADAAAABAAAAAEAAAAAAAAAAgAAAAAAAAACAAAAAwAAAAEAAAAFAAAABAAAAAYAAAAAAAAAAAAAAGFsZ29zLmMAaDNOZWlnaGJvclJvdGF0aW9ucwBjb29yZGlqay5jAF91cEFwN0NoZWNrZWQAX3VwQXA3ckNoZWNrZWQAZGlyZWN0ZWRFZGdlLmMAZGlyZWN0ZWRFZGdlVG9Cb3VuZGFyeQBhZGphY2VudEZhY2VEaXJbdG1wRmlqay5mYWNlXVtmaWprLmZhY2VdID09IEtJAGZhY2VpamsuYwBfZmFjZUlqa1BlbnRUb0NlbGxCb3VuZGFyeQBhZGphY2VudEZhY2VEaXJbY2VudGVySUpLLmZhY2VdW2ZhY2UyXSA9PSBLSQBfZmFjZUlqa1RvQ2VsbEJvdW5kYXJ5AGgzSW5kZXguYwBjb21wYWN0Q2VsbHMAbGF0TG5nVG9DZWxsAGNlbGxUb0NoaWxkUG9zAHZhbGlkYXRlQ2hpbGRQb3MAbGF0TG5nLmMAY2VsbEFyZWFSYWRzMgBwb2x5Z29uLT5uZXh0ID09IE5VTEwAbGlua2VkR2VvLmMAYWRkTmV3TGlua2VkUG9seWdvbgBuZXh0ICE9IE5VTEwAbG9vcCAhPSBOVUxMAGFkZE5ld0xpbmtlZExvb3AAcG9seWdvbi0+Zmlyc3QgPT0gTlVMTABhZGRMaW5rZWRMb29wAGNvb3JkICE9IE5VTEwAYWRkTGlua2VkQ29vcmQAbG9vcC0+Zmlyc3QgPT0gTlVMTABpbm5lckxvb3BzICE9IE5VTEwAbm9ybWFsaXplTXVsdGlQb2x5Z29uAGJib3hlcyAhPSBOVUxMAGNhbmRpZGF0ZXMgIT0gTlVMTABmaW5kUG9seWdvbkZvckhvbGUAY2FuZGlkYXRlQkJveGVzICE9IE5VTEwAcmV2RGlyICE9IElOVkFMSURfRElHSVQAbG9jYWxpai5jAGNlbGxUb0xvY2FsSWprAGJhc2VDZWxsICE9IG9yaWdpbkJhc2VDZWxsACEob3JpZ2luT25QZW50ICYmIGluZGV4T25QZW50KQBiYXNlQ2VsbCA9PSBvcmlnaW5CYXNlQ2VsbABiYXNlQ2VsbCAhPSBJTlZBTElEX0JBU0VfQ0VMTABsb2NhbElqa1RvQ2VsbAAhX2lzQmFzZUNlbGxQZW50YWdvbihiYXNlQ2VsbCkAYmFzZUNlbGxSb3RhdGlvbnMgPj0gMABncmlkUGF0aENlbGxzADAAdmVydGV4LmMAY2VsbFRvVmVydGV4AGdyYXBoLT5idWNrZXRzICE9IE5VTEwAdmVydGV4R3JhcGguYwBpbml0VmVydGV4R3JhcGgAbm9kZSAhPSBOVUxMAGFkZFZlcnRleE5vZGU=";function Y(A){return A}function z(A){return A.replace(/\b__Z[\w\d_]+/g,(function(A){return A===A?A:A+" ["+A+"]"}))}function Z(){var A=new Error;if(!A.stack){try{throw new Error(0)}catch(e){A=e}if(!A.stack)return"(no stack trace available)"}return A.stack.toString()}function H(){return g.length}function V(A){try{var e=new ArrayBuffer(A);if(e.byteLength!=A)return;return new Int8Array(e).set(g),X(e),B(e),1}catch(r){}}var $="function"===typeof atob?atob:function(A){var e,r,t,n,i,f,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",o="",u=0;A=A.replace(/[^A-Za-z0-9\+\/\=]/g,"");do{e=a.indexOf(A.charAt(u++))<<2|(n=a.indexOf(A.charAt(u++)))>>4,r=(15&n)<<4|(i=a.indexOf(A.charAt(u++)))>>2,t=(3&i)<<6|(f=a.indexOf(A.charAt(u++))),o+=String.fromCharCode(e),64!==i&&(o+=String.fromCharCode(r)),64!==f&&(o+=String.fromCharCode(t))}while(u=0){if((0|r)>13780509){if(0|(a=0|ee(15,o)))break;o=0|n[(u=o)>>2],u=0|n[u+4>>2]}else c=0|Le(0|r,0|(a=((0|r)<0)<<31>>31),3,0),u=0|m(),a=0|Ie(0|r,0|a,1,0),a=0|Ie(0|(a=0|Le(0|c,0|u,0|a,0|m())),0|m(),1,0),u=0|m(),n[o>>2]=a,n[o+4>>2]=u,o=a;if($e(0|t,0,o<<3|0),0|i){$e(0|i,0,o<<2|0),a=0|G(A,e,r,t,i,o,u,0);break}(a=0|Pe(o,4))?(c=0|G(A,e,r,t,a,o,u,0),Ce(a),a=c):a=13}else a=2}while(0);return I=f,0|(c=a)}function T(A,e,r,t,i){A|=0,e|=0,r|=0,t|=0,i|=0;var f,a,o=0,u=0,c=0,s=0,l=0,d=0,b=0,h=0,g=0;if(a=I,I=I+16|0,g=a+8|0,n[(h=f=a)>>2]=A,n[h+4>>2]=e,(0|r)<0)return I=a,0|(g=2);if(n[(o=t)>>2]=A,n[o+4>>2]=e,(o=0!=(0|i))&&(n[i>>2]=0),0|LA(A,e))return I=a,0|(g=9);n[g>>2]=0;A:do{if((0|r)>=1)if(o)for(d=1,l=0,b=0,h=1,o=A;;){if(!(l|b)){if(0|(o=0|L(o,e,4,g,f)))break A;if(0|LA(o=0|n[(e=f)>>2],e=0|n[e+4>>2])){o=9;break A}}if(0|(o=0|L(o,e,0|n[22384+(b<<2)>>2],g,f)))break A;if(o=0|n[(e=f)>>2],e=0|n[e+4>>2],n[(A=t+(d<<3)|0)>>2]=o,n[A+4>>2]=e,n[i+(d<<2)>>2]=h,u=(0|(A=l+1|0))==(0|h),s=6==(0|(c=b+1|0)),0|LA(o,e)){o=9;break A}if((0|(h=h+(s&u&1)|0))>(0|r)){o=0;break}d=d+1|0,l=u?0:A,b=u?s?0:c:b}else for(d=1,l=0,b=0,h=1,o=A;;){if(!(l|b)){if(0|(o=0|L(o,e,4,g,f)))break A;if(0|LA(o=0|n[(e=f)>>2],e=0|n[e+4>>2])){o=9;break A}}if(0|(o=0|L(o,e,0|n[22384+(b<<2)>>2],g,f)))break A;if(o=0|n[(e=f)>>2],e=0|n[e+4>>2],n[(A=t+(d<<3)|0)>>2]=o,n[A+4>>2]=e,u=(0|(A=l+1|0))==(0|h),s=6==(0|(c=b+1|0)),0|LA(o,e)){o=9;break A}if((0|(h=h+(s&u&1)|0))>(0|r)){o=0;break}d=d+1|0,l=u?0:A,b=u?s?0:c:b}else o=0}while(0);return I=a,0|(g=o)}function G(A,e,r,t,i,f,a,o){r|=0,t|=0,i|=0,o|=0;var u,c,s,l=0,d=0,b=0,h=0,g=0,v=0,p=0;if(s=I,I=I+16|0,u=s+8|0,c=s,l=0|Oe(0|(A|=0),0|(e|=0),0|(f|=0),0|(a|=0)),b=0|m(),!(0==(0|(p=0|n[(v=h=t+(l<<3)|0)>>2]))&0==(0|(v=0|n[v+4>>2]))|(d=(0|p)==(0|A)&(0|v)==(0|e))))do{l=0|Fe(0|(l=0|Ie(0|l,0|b,1,0)),0|m(),0|f,0|a),b=0|m(),d=(0|(v=0|n[(p=h=t+(l<<3)|0)>>2]))==(0|A)&(0|(p=0|n[p+4>>2]))==(0|e)}while(!(0==(0|v)&0==(0|p)|d));if(l=i+(l<<2)|0,d&&(0|n[l>>2])<=(0|o))return I=s,0|(p=0);if(n[(p=h)>>2]=A,n[p+4>>2]=e,n[l>>2]=o,(0|o)>=(0|r))return I=s,0|(p=0);switch(d=o+1|0,n[u>>2]=0,0|(l=0|L(A,e,2,u,c))){case 9:g=9;break;case 0:(l=0|G(0|n[(l=c)>>2],0|n[l+4>>2],r,t,i,f,a,d))||(g=9)}A:do{if(9==(0|g)){switch(n[u>>2]=0,0|(l=0|L(A,e,3,u,c))){case 9:break;case 0:if(0|(l=0|G(0|n[(l=c)>>2],0|n[l+4>>2],r,t,i,f,a,d)))break A;break;default:break A}switch(n[u>>2]=0,0|(l=0|L(A,e,1,u,c))){case 9:break;case 0:if(0|(l=0|G(0|n[(l=c)>>2],0|n[l+4>>2],r,t,i,f,a,d)))break A;break;default:break A}switch(n[u>>2]=0,0|(l=0|L(A,e,5,u,c))){case 9:break;case 0:if(0|(l=0|G(0|n[(l=c)>>2],0|n[l+4>>2],r,t,i,f,a,d)))break A;break;default:break A}switch(n[u>>2]=0,0|(l=0|L(A,e,4,u,c))){case 9:break;case 0:if(0|(l=0|G(0|n[(l=c)>>2],0|n[l+4>>2],r,t,i,f,a,d)))break A;break;default:break A}switch(n[u>>2]=0,0|(l=0|L(A,e,6,u,c))){case 9:break;case 0:if(0|(l=0|G(0|n[(l=c)>>2],0|n[l+4>>2],r,t,i,f,a,d)))break A;break;default:break A}return I=s,0|(p=0)}}while(0);return I=s,0|(p=l)}function L(A,e,r,t,i){A|=0,e|=0,i|=0;var f,a,o=0,u=0,c=0,s=0,l=0,d=0,b=0;if((r|=0)>>>0>6)return 0|(i=1);if(l=(0|n[(t|=0)>>2])%6|0,n[t>>2]=l,(0|l)>0){o=0;do{r=0|bA(r),o=o+1|0}while((0|o)<(0|n[t>>2]))}if(l=0|Ne(0|A,0|e,45),m(),(a=127&l)>>>0>121)return 0|(i=5);f=0|FA(A,e),o=0|Ne(0|A,0|e,52),m(),o&=15;A:do{if(o){for(;;){if(c=0|Ne(0|A,0|e,0|(u=3*(15-o|0)|0)),m(),7==(0|(c&=7))){e=5;break}if(b=0==(0|zA(o)),o=o+-1|0,d=0|Ye(7,0,0|u),e&=~(0|m()),A=0|Ye(0|n[(b?432:16)+(28*c|0)+(r<<2)>>2],0,0|u)|A&~d,e|=u=0|m(),!(r=0|n[(b?640:224)+(28*c|0)+(r<<2)>>2])){r=0;break A}if(!o){s=8;break A}}return 0|e}s=8}while(0);8==(0|s)&&(A|=0|Ye(0|(b=0|n[848+(28*a|0)+(r<<2)>>2]),0,45),e=0|m()|-1040385&e,r=0|n[4272+(28*a|0)+(r<<2)>>2],127==(127&b|0)&&(b=0|Ye(0|n[848+(28*a|0)+20>>2],0,45),e=0|m()|-1040385&e,r=0|n[4272+(28*a|0)+20>>2],A=0|UA(b|A,e),e=0|m(),n[t>>2]=1+(0|n[t>>2]))),c=0|Ne(0|A,0|e,45),m(),c&=127;A:do{if(0|U(c)){e:do{if(1==(0|FA(A,e))){if((0|a)!=(0|c)){if(0|Z(c,0|n[7696+(28*a|0)>>2])){A=0|YA(A,e),u=1,e=0|m();break}D(23313,22416,436,22424)}switch(0|f){case 3:A=0|UA(A,e),e=0|m(),n[t>>2]=1+(0|n[t>>2]),u=0;break e;case 5:A=0|YA(A,e),e=0|m(),n[t>>2]=5+(0|n[t>>2]),u=0;break e;case 0:return 0|(b=9);default:return 0|(b=1)}}else u=0}while(0);if((0|r)>0){o=0;do{A=0|OA(A,e),e=0|m(),o=o+1|0}while((0|o)!=(0|r))}if((0|a)!=(0|c)){if(!(0|N(c))){if(0!=(0|u)|5!=(0|FA(A,e)))break;n[t>>2]=1+(0|n[t>>2]);break}switch(127&l){case 8:case 118:break A}3!=(0|FA(A,e))&&(n[t>>2]=1+(0|n[t>>2]))}}else if((0|r)>0){o=0;do{A=0|UA(A,e),e=0|m(),o=o+1|0}while((0|o)!=(0|r))}}while(0);return n[t>>2]=((0|n[t>>2])+r|0)%6|0,n[(b=i)>>2]=A,n[b+4>>2]=e,0|(b=0)}function F(A,e,r,t){r|=0,t|=0;var i,f,a,o=0,u=0;for(a=I,I=I+16|0,i=a,f=a+8|0,o=(o=0==(0|LA(A|=0,e|=0)))?1:2;;){if(n[f>>2]=0,0==(0|L(A,e,o,f,i))&((0|n[(u=i)>>2])==(0|r)?(0|n[u+4>>2])==(0|t):0)){A=4;break}if((o=o+1|0)>>>0>=7){o=7,A=4;break}}return 4==(0|A)?(I=a,0|o):0}function O(A,e,r,t,f,a,o){e|=0,r|=0,t|=0,f|=0,a|=0,o|=0;var u,c,s,l,d,b,h,g,v,p,w=0,_=0,E=0,y=0,B=0,k=0,D=0,x=0,M=0,Q=0,C=0,P=0,S=0,R=0,T=0,G=0,L=0,F=0,O=0;if(p=I,I=I+64|0,h=p+48|0,g=p+32|0,v=p+24|0,u=p+8|0,c=p,(0|(_=0|n[(A|=0)>>2]))<=0)return I=p,0|(T=0);for(s=A+4|0,l=h+8|0,d=g+8|0,b=u+8|0,w=0,S=0;;){P=(E=0|n[s>>2])+(S<<4)|0,n[h>>2]=n[P>>2],n[h+4>>2]=n[P+4>>2],n[h+8>>2]=n[P+8>>2],n[h+12>>2]=n[P+12>>2],(0|S)==(_+-1|0)?(n[g>>2]=n[E>>2],n[g+4>>2]=n[E+4>>2],n[g+8>>2]=n[E+8>>2],n[g+12>>2]=n[E+12>>2]):(P=E+(S+1<<4)|0,n[g>>2]=n[P>>2],n[g+4>>2]=n[P+4>>2],n[g+8>>2]=n[P+8>>2],n[g+12>>2]=n[P+12>>2]),_=0|j(h,g,t,v);A:do{if(_)E=0,w=_;else if(_=0|n[(E=v)>>2],(0|(E=0|n[E+4>>2]))>0|0==(0|E)&_>>>0>0){C=0,P=0;e:for(;;){if(O=+i[h>>3],F=+((Q=0|Se(0|_,0|E,0|C,0|P))>>>0)+4294967296*+(0|m()),G=+(_>>>0)+4294967296*+(0|E),L=+(C>>>0)+4294967296*+(0|P),i[u>>3]=O*F/G+ +i[g>>3]*L/G,i[b>>3]=+i[l>>3]*F/G+ +i[d>>3]*L/G,0|(_=0|ZA(u,t,c))){w=_;break}k=0|Oe(0|(M=0|n[(Q=c)>>2]),0|(Q=0|n[Q+4>>2]),0|e,0|r),y=0|m(),E=0|n[(B=_=o+(k<<3)|0)>>2],B=0|n[B+4>>2];r:do{if(0==(0|E)&0==(0|B))R=_,T=16;else for(D=0,x=0;;){if((0|D)>(0|r)|(0|D)==(0|r)&x>>>0>e>>>0){w=1;break e}if((0|E)==(0|M)&(0|B)==(0|Q))break r;if(k=0|Fe(0|(_=0|Ie(0|k,0|y,1,0)),0|m(),0|e,0|r),y=0|m(),x=0|Ie(0|x,0|D,1,0),D=0|m(),0==(0|(E=0|n[(B=_=o+(k<<3)|0)>>2]))&0==(0|(B=0|n[B+4>>2]))){R=_,T=16;break}}}while(0);if(16!=(0|T)||(T=0,0==(0|M)&0==(0|Q))||(n[(x=R)>>2]=M,n[x+4>>2]=Q,x=a+(n[f>>2]<<3)|0,n[x>>2]=M,n[x+4>>2]=Q,x=0|Ie(0|n[(x=f)>>2],0|n[x+4>>2],1,0),M=0|m(),n[(Q=f)>>2]=x,n[Q+4>>2]=M),C=0|Ie(0|C,0|P,1,0),P=0|m(),_=0|n[(E=v)>>2],!((0|(E=0|n[E+4>>2]))>(0|P)|(0|E)==(0|P)&_>>>0>C>>>0)){E=1;break A}}E=0}else E=1}while(0);if(S=S+1|0,!E){T=21;break}if((0|S)>=(0|(_=0|n[A>>2]))){w=0,T=21;break}}return 21==(0|T)?(I=p,0|w):0}function U(A){return(A|=0)>>>0>121?0|(A=0):0|(A=0|n[7696+(28*A|0)+16>>2])}function N(A){return 4==(0|(A|=0))|117==(0|A)|0}function Y(A){return 0|n[11120+(216*(0|n[(A|=0)>>2])|0)+(72*(0|n[A+4>>2])|0)+(24*(0|n[A+8>>2])|0)+(n[A+12>>2]<<3)>>2]}function z(A){return 0|n[11120+(216*(0|n[(A|=0)>>2])|0)+(72*(0|n[A+4>>2])|0)+(24*(0|n[A+8>>2])|0)+(n[A+12>>2]<<3)+4>>2]}function Z(A,e){return e|=0,(0|n[7696+(28*(A|=0)|0)+20>>2])==(0|e)?0|(e=1):0|(e=(0|n[7696+(28*A|0)+24>>2])==(0|e))}function H(A,e){return 0|n[848+(28*(A|=0)|0)+((e|=0)<<2)>>2]}function V(A,e){return e|=0,(0|n[848+(28*(A|=0)|0)>>2])==(0|e)?0|(e=0):(0|n[848+(28*A|0)+4>>2])==(0|e)?0|(e=1):(0|n[848+(28*A|0)+8>>2])==(0|e)?0|(e=2):(0|n[848+(28*A|0)+12>>2])==(0|e)?0|(e=3):(0|n[848+(28*A|0)+16>>2])==(0|e)?0|(e=4):(0|n[848+(28*A|0)+20>>2])==(0|e)?0|(e=5):0|((0|n[848+(28*A|0)+24>>2])==(0|e)?6:7)}function $(A){return+i[(A|=0)+16>>3]<+i[A+24>>3]|0}function W(A,e){A|=0;var r,t,n=0;return(n=+i[(e|=0)>>3])>=+i[A+8>>3]&&n<=+i[A>>3]?(r=+i[A+16>>3],n=+i[A+24>>3],e=(t=+i[e+8>>3])>=n,A=t<=r&1,r>2]=0,h=h+4|0}while((0|h)<(0|g));return 0|(e=0|KA(e,v))?(I=d,0|(y=e)):($A(v=0|n[(g=v)>>2],g=0|n[g+4>>2],l),WA(v,g,p),s=+Ae(l,p+8|0),i[l>>3]=+i[A>>3],i[(g=l+8|0)>>3]=+i[A+16>>3],i[p>>3]=+i[A+8>>3],i[(v=p+8|0)>>3]=+i[A+24>>3],a=+Ae(l,p),B=+i[g>>3]-+i[v>>3],c=+u(+B),b=+i[l>>3]-+i[p>>3],t=+u(+b),0==B|0==b||(B=+ze(+c,+t),B=+w(+a*a/+Ze(+B/+Ze(+c,+t),3)/(s*(2.59807621135*s)*.8)),i[f>>3]=B,_=~~B>>>0,y=+u(B)>=1?B>0?~~+E(+o(B/4294967296),4294967295)>>>0:~~+w((B-+(~~B>>>0))/4294967296)>>>0:0,2146435072==(2146435072&n[f+4>>2]|0))?e=1:(p=0==(0|_)&0==(0|y),n[(e=r)>>2]=p?1:_,n[e+4>>2]=p?0:y,e=0),I=d,0|(y=e))}function j(A,e,r,t){A|=0,e|=0,r|=0,t|=0;var a,c,s,l,d=0,b=0,h=0;l=I,I=I+288|0,c=l+264|0,s=l+96|0,a=(d=b=l)+96|0;do{n[d>>2]=0,d=d+4|0}while((0|d)<(0|a));return 0|(r=0|KA(r,b))?(I=l,0|(t=r)):($A(d=0|n[(r=b)>>2],r=0|n[r+4>>2],c),WA(d,r,s),h=+Ae(c,s+8|0),h=+w(+ +Ae(A,e)/(2*h)),i[f>>3]=h,r=~~h>>>0,d=+u(h)>=1?h>0?~~+E(+o(h/4294967296),4294967295)>>>0:~~+w((h-+(~~h>>>0))/4294967296)>>>0:0,2146435072==(2146435072&n[f+4>>2]|0)?(I=l,0|(t=1)):(b=0==(0|r)&0==(0|d),n[t>>2]=b?1:r,n[t+4>>2]=b?0:d,I=l,0|(t=0)))}function J(A,e,r,t){e|=0,r|=0,t|=0,n[(A|=0)>>2]=e,n[A+4>>2]=r,n[A+8>>2]=t}function X(A,e){A|=0;var r,t,f,a,o=0,c=0,s=0,l=0,d=0,b=0,h=0;n[(a=(e|=0)+8|0)>>2]=0,t=+i[A>>3],l=+u(+t),f=+i[A+8>>3],l+=.5*(d=+u(+f)/.8660254037844386),l-=+(0|(o=~~l)),d-=+(0|(A=~~d));do{if(l<.5){if(l<.3333333333333333){if(n[e>>2]=o,d<.5*(l+1)){n[e+4>>2]=A;break}A=A+1|0,n[e+4>>2]=A;break}if(A=(1&!(d<(h=1-l)))+A|0,n[e+4>>2]=A,h<=d&d<2*l){o=o+1|0,n[e>>2]=o;break}n[e>>2]=o;break}if(!(l<.6666666666666666)){if(o=o+1|0,n[e>>2]=o,d<.5*l){n[e+4>>2]=A;break}A=A+1|0,n[e+4>>2]=A;break}if(d<1-l){if(n[e+4>>2]=A,2*l-1>2]=o;break}}else A=A+1|0,n[e+4>>2]=A;o=o+1|0,n[e>>2]=o}while(0);do{if(t<0){if(1&A){o=~~(+(0|o)-(2*(+((b=0|Se(0|o,((0|o)<0)<<31>>31|0,0|(b=(A+1|0)/2|0),((0|b)<0)<<31>>31|0))>>>0)+4294967296*+(0|m()))+1)),n[e>>2]=o;break}o=~~(+(0|o)-2*(+((b=0|Se(0|o,((0|o)<0)<<31>>31|0,0|(b=(0|A)/2|0),((0|b)<0)<<31>>31|0))>>>0)+4294967296*+(0|m()))),n[e>>2]=o;break}}while(0);b=e+4|0,f<0&&(o=o-((1|A<<1)/2|0)|0,n[e>>2]=o,A=0-A|0,n[b>>2]=A),c=A-o|0,(0|o)<0?(s=0-o|0,n[b>>2]=c,n[a>>2]=s,n[e>>2]=0,A=c,o=0):s=0,(0|A)<0&&(o=o-A|0,n[e>>2]=o,s=s-A|0,n[a>>2]=s,n[b>>2]=0,A=0),r=o-s|0,c=A-s|0,(0|s)<0&&(n[e>>2]=r,n[b>>2]=c,n[a>>2]=0,A=c,o=r,s=0),(0|(c=(0|s)<(0|(c=(0|A)<(0|o)?A:o))?s:c))<=0||(n[e>>2]=o-c,n[b>>2]=A-c,n[a>>2]=s-c)}function q(A){var e,r=0,t=0,i=0,f=0,a=0;r=0|n[(A|=0)>>2],t=0|n[(e=A+4|0)>>2],(0|r)<0&&(t=t-r|0,n[e>>2]=t,n[(a=A+8|0)>>2]=(0|n[a>>2])-r,n[A>>2]=0,r=0),(0|t)<0?(r=r-t|0,n[A>>2]=r,f=(0|n[(a=A+8|0)>>2])-t|0,n[a>>2]=f,n[e>>2]=0,t=0):(a=f=A+8|0,f=0|n[f>>2]),(0|f)<0&&(r=r-f|0,n[A>>2]=r,t=t-f|0,n[e>>2]=t,n[a>>2]=0,f=0),(0|(i=(0|f)<(0|(i=(0|t)<(0|r)?t:r))?f:i))<=0||(n[A>>2]=r-i,n[e>>2]=t-i,n[a>>2]=f-i)}function AA(A,e){e|=0;var r,t;t=0|n[(A|=0)+8>>2],r=+((0|n[A+4>>2])-t|0),i[e>>3]=+((0|n[A>>2])-t|0)-.5*r,i[e+8>>3]=.8660254037844386*r}function eA(A,e,r){A|=0,e|=0,n[(r|=0)>>2]=(0|n[e>>2])+(0|n[A>>2]),n[r+4>>2]=(0|n[e+4>>2])+(0|n[A+4>>2]),n[r+8>>2]=(0|n[e+8>>2])+(0|n[A+8>>2])}function rA(A,e,r){A|=0,e|=0,n[(r|=0)>>2]=(0|n[A>>2])-(0|n[e>>2]),n[r+4>>2]=(0|n[A+4>>2])-(0|n[e+4>>2]),n[r+8>>2]=(0|n[A+8>>2])-(0|n[e+8>>2])}function tA(A,e){e|=0;var r,t=0;t=0|_(0|n[(A|=0)>>2],e),n[A>>2]=t,r=0|_(0|n[(t=A+4|0)>>2],e),n[t>>2]=r,e=0|_(0|n[(A=A+8|0)>>2],e),n[A>>2]=e}function nA(A){var e,r,t=0,i=0,f=0,a=0,o=0;o=(0|(r=0|n[(A|=0)>>2]))<0,A=(A=(i=(0|(a=((e=(0|(f=(0|n[A+4>>2])-(o?r:0)|0))<0)?0-f|0:0)+((0|n[A+8>>2])-(o?r:0))|0))<0)?0:a)-((f=(0|(i=(0|A)<(0|(i=(0|(t=(e?0:f)-(i?a:0)|0))<(0|(a=(o?0:r)-(e?f:0)-(i?a:0)|0))?t:a))?A:i))>0)?i:0)|0,t=t-(f?i:0)|0;A:do{switch(a-(f?i:0)|0){case 0:switch(0|t){case 0:return 0|(o=0==(0|A)?0:1==(0|A)?1:7);case 1:return 0|(o=0==(0|A)?2:1==(0|A)?3:7);default:break A}case 1:switch(0|t){case 0:return 0|(o=0==(0|A)?4:1==(0|A)?5:7);case 1:if(A)break A;return 0|(A=6);default:break A}}}while(0);return 0|(o=7)}function iA(A){var e,r=0,t=0,i=0,f=0,a=0,o=0;f=0|n[(e=(A|=0)+8|0)>>2],a=(0|n[A>>2])-f|0,f=(0|n[(o=A+4|0)>>2])-f|0;do{if(a>>>0>715827881|f>>>0>715827881){if(t=(0|a)>0){if((2147483647-a|0)<(0|a))return 0|(o=1);if((2147483647-(a<<1)|0)<(0|a))return 0|(o=1)}else{if((-2147483648-a|0)>(0|a))return 0|(o=1);if((-2147483648-(a<<1)|0)>(0|a))return 0|(o=1)}if(r=3*a|0,(0|f)>0){if((2147483647-f|0)<(0|f))return 0|(o=1)}else if((-2147483648-f|0)>(0|f))return 0|(o=1);if(i=f<<1,(0|a)>-1){if((-2147483648|r|0)>=(0|f))return 0|(o=1)}else if((-2147483648^r|0)<(0|f))return 0|(o=1);if(t){if(!((2147483647-a|0)<(0|i))){t=i;break}return 0|(r=1)}if(!((-2147483648-a|0)>(0|i))){t=i;break}return 0|(r=1)}t=f<<1,r=3*a|0}while(0);i=0|Me(+(r-f|0)/7),n[A>>2]=i,f=0|Me(+(t+a|0)/7),n[o>>2]=f,n[e>>2]=0,r=(t=(0|f)<(0|i))?i:f,t=t?f:i;do{if((0|t)<0){if((0|r)>0){if((-2147483648|r|0)<(0|t)&-2147483648!=(0|t)&(2147483647-r|0)>=(0|t))break;D(23313,22444,355,22455)}if(-2147483648==(0|t)|(-2147483648-r|0)>(0|t)&&D(23313,22444,355,22455),(0|r)>-1){if((-2147483648|r|0)<(0|t))break;D(23313,22444,355,22455)}else{if((-2147483648^r|0)>=(0|t))break;D(23313,22444,355,22455)}}}while(0);return r=f-i|0,(0|i)<0?(t=0-i|0,n[o>>2]=r,n[e>>2]=t,n[A>>2]=0,i=0):(r=f,t=0),(0|r)<0&&(i=i-r|0,n[A>>2]=i,t=t-r|0,n[e>>2]=t,n[o>>2]=0,r=0),a=i-t|0,f=r-t|0,(0|t)<0?(n[A>>2]=a,n[o>>2]=f,n[e>>2]=0,r=f,f=a,t=0):f=i,(0|(i=(0|t)<(0|(i=(0|r)<(0|f)?r:f))?t:i))<=0||(n[A>>2]=f-i,n[o>>2]=r-i,n[e>>2]=t-i),0|(o=0)}function fA(A){var e,r=0,t=0,i=0,f=0,a=0,o=0;f=0|n[(e=(A|=0)+8|0)>>2],a=(0|n[A>>2])-f|0,f=(0|n[(o=A+4|0)>>2])-f|0;do{if(a>>>0>715827881|f>>>0>715827881){if(t=(0|a)>0){if((2147483647-a|0)<(0|a))return 0|(o=1)}else if((-2147483648-a|0)>(0|a))return 0|(o=1);if(r=a<<1,(0|f)>0){if((2147483647-f|0)<(0|f))return 0|(o=1);if((2147483647-(f<<1)|0)<(0|f))return 0|(o=1)}else{if((-2147483648-f|0)>(0|f))return 0|(o=1);if((-2147483648-(f<<1)|0)>(0|f))return 0|(o=1)}if(i=3*f|0,t){if((2147483647-r|0)<(0|f))return 0|(o=1)}else if((-2147483648-r|0)>(0|f))return 0|(o=1);if((0|f)>-1){if((-2147483648|i|0)<(0|a)){t=i;break}return 0|(r=1)}if(!((-2147483648^i|0)<(0|a))){t=i;break}return 0|(r=1)}t=3*f|0,r=a<<1}while(0);i=0|Me(+(r+f|0)/7),n[A>>2]=i,f=0|Me(+(t-a|0)/7),n[o>>2]=f,n[e>>2]=0,r=(t=(0|f)<(0|i))?i:f,t=t?f:i;do{if((0|t)<0){if((0|r)>0){if((-2147483648|r|0)<(0|t)&-2147483648!=(0|t)&(2147483647-r|0)>=(0|t))break;D(23313,22444,404,22469)}if(-2147483648==(0|t)|(-2147483648-r|0)>(0|t)&&D(23313,22444,404,22469),(0|r)>-1){if((-2147483648|r|0)<(0|t))break;D(23313,22444,404,22469)}else{if((-2147483648^r|0)>=(0|t))break;D(23313,22444,404,22469)}}}while(0);return r=f-i|0,(0|i)<0?(t=0-i|0,n[o>>2]=r,n[e>>2]=t,n[A>>2]=0,i=0):(r=f,t=0),(0|r)<0&&(i=i-r|0,n[A>>2]=i,t=t-r|0,n[e>>2]=t,n[o>>2]=0,r=0),a=i-t|0,f=r-t|0,(0|t)<0?(n[A>>2]=a,n[o>>2]=f,n[e>>2]=0,r=f,f=a,t=0):f=i,(0|(i=(0|t)<(0|(i=(0|r)<(0|f)?r:f))?t:i))<=0||(n[A>>2]=f-i,n[o>>2]=r-i,n[e>>2]=t-i),0|(o=0)}function aA(A){var e,r,t=0,i=0,f=0,a=0,o=0;i=0|n[(e=(A|=0)+8|0)>>2],f=0|Me(+((3*(t=(0|n[A>>2])-i|0)|0)-(i=(0|n[(r=A+4|0)>>2])-i|0)|0)/7),n[A>>2]=f,t=0|Me(+((i<<1)+t|0)/7),n[r>>2]=t,n[e>>2]=0,i=t-f|0,(0|f)<0?(o=0-f|0,n[r>>2]=i,n[e>>2]=o,n[A>>2]=0,t=i,f=0,i=o):i=0,(0|t)<0&&(f=f-t|0,n[A>>2]=f,i=i-t|0,n[e>>2]=i,n[r>>2]=0,t=0),o=f-i|0,a=t-i|0,(0|i)<0?(n[A>>2]=o,n[r>>2]=a,n[e>>2]=0,t=a,a=o,i=0):a=f,(0|(f=(0|i)<(0|(f=(0|t)<(0|a)?t:a))?i:f))<=0||(n[A>>2]=a-f,n[r>>2]=t-f,n[e>>2]=i-f)}function oA(A){var e,r,t=0,i=0,f=0,a=0,o=0;i=0|n[(e=(A|=0)+8|0)>>2],f=0|Me(+(((t=(0|n[A>>2])-i|0)<<1)+(i=(0|n[(r=A+4|0)>>2])-i|0)|0)/7),n[A>>2]=f,t=0|Me(+((3*i|0)-t|0)/7),n[r>>2]=t,n[e>>2]=0,i=t-f|0,(0|f)<0?(o=0-f|0,n[r>>2]=i,n[e>>2]=o,n[A>>2]=0,t=i,f=0,i=o):i=0,(0|t)<0&&(f=f-t|0,n[A>>2]=f,i=i-t|0,n[e>>2]=i,n[r>>2]=0,t=0),o=f-i|0,a=t-i|0,(0|i)<0?(n[A>>2]=o,n[r>>2]=a,n[e>>2]=0,t=a,a=o,i=0):a=f,(0|(f=(0|i)<(0|(f=(0|t)<(0|a)?t:a))?i:f))<=0||(n[A>>2]=a-f,n[r>>2]=t-f,n[e>>2]=i-f)}function uA(A){var e,r,t,i=0,f=0,a=0,o=0;i=0|n[(A|=0)>>2],f=0|n[(r=A+4|0)>>2],a=0|n[(t=A+8|0)>>2],o=f+(3*i|0)|0,n[A>>2]=o,f=a+(3*f|0)|0,n[r>>2]=f,i=(3*a|0)+i|0,n[t>>2]=i,a=f-o|0,(0|o)<0?(i=i-o|0,n[r>>2]=a,n[t>>2]=i,n[A>>2]=0,f=a,a=0):a=o,(0|f)<0&&(a=a-f|0,n[A>>2]=a,i=i-f|0,n[t>>2]=i,n[r>>2]=0,f=0),e=a-i|0,o=f-i|0,(0|i)<0?(n[A>>2]=e,n[r>>2]=o,n[t>>2]=0,a=e,i=0):o=f,(0|(f=(0|i)<(0|(f=(0|o)<(0|a)?o:a))?i:f))<=0||(n[A>>2]=a-f,n[r>>2]=o-f,n[t>>2]=i-f)}function cA(A){var e,r,t,i=0,f=0,a=0,o=0;o=0|n[(A|=0)>>2],a=(3*(i=0|n[(r=A+4|0)>>2])|0)+o|0,o=(f=0|n[(t=A+8|0)>>2])+(3*o|0)|0,n[A>>2]=o,n[r>>2]=a,i=(3*f|0)+i|0,n[t>>2]=i,f=a-o|0,(0|o)<0?(i=i-o|0,n[r>>2]=f,n[t>>2]=i,n[A>>2]=0,o=0):f=a,(0|f)<0&&(o=o-f|0,n[A>>2]=o,i=i-f|0,n[t>>2]=i,n[r>>2]=0,f=0),e=o-i|0,a=f-i|0,(0|i)<0?(n[A>>2]=e,n[r>>2]=a,n[t>>2]=0,o=e,i=0):a=f,(0|(f=(0|i)<(0|(f=(0|a)<(0|o)?a:o))?i:f))<=0||(n[A>>2]=o-f,n[r>>2]=a-f,n[t>>2]=i-f)}function sA(A,e){A|=0;var r,t,i,f=0,a=0,o=0;((e|=0)+-1|0)>>>0>=6||(o=(0|n[15440+(12*e|0)>>2])+(0|n[A>>2])|0,n[A>>2]=o,i=A+4|0,a=(0|n[15440+(12*e|0)+4>>2])+(0|n[i>>2])|0,n[i>>2]=a,t=A+8|0,e=(0|n[15440+(12*e|0)+8>>2])+(0|n[t>>2])|0,n[t>>2]=e,f=a-o|0,(0|o)<0?(e=e-o|0,n[i>>2]=f,n[t>>2]=e,n[A>>2]=0,a=0):(f=a,a=o),(0|f)<0&&(a=a-f|0,n[A>>2]=a,e=e-f|0,n[t>>2]=e,n[i>>2]=0,f=0),r=a-e|0,o=f-e|0,(0|e)<0?(n[A>>2]=r,n[i>>2]=o,n[t>>2]=0,a=r,e=0):o=f,(0|(f=(0|e)<(0|(f=(0|o)<(0|a)?o:a))?e:f))<=0||(n[A>>2]=a-f,n[i>>2]=o-f,n[t>>2]=e-f))}function lA(A){var e,r,t,i=0,f=0,a=0,o=0;o=0|n[(A|=0)>>2],a=(i=0|n[(r=A+4|0)>>2])+o|0,o=(f=0|n[(t=A+8|0)>>2])+o|0,n[A>>2]=o,n[r>>2]=a,i=f+i|0,n[t>>2]=i,f=a-o|0,(0|o)<0?(i=i-o|0,n[r>>2]=f,n[t>>2]=i,n[A>>2]=0,a=0):(f=a,a=o),(0|f)<0&&(a=a-f|0,n[A>>2]=a,i=i-f|0,n[t>>2]=i,n[r>>2]=0,f=0),e=a-i|0,o=f-i|0,(0|i)<0?(n[A>>2]=e,n[r>>2]=o,n[t>>2]=0,a=e,i=0):o=f,(0|(f=(0|i)<(0|(f=(0|o)<(0|a)?o:a))?i:f))<=0||(n[A>>2]=a-f,n[r>>2]=o-f,n[t>>2]=i-f)}function dA(A){var e,r,t,i=0,f=0,a=0,o=0;i=0|n[(A|=0)>>2],a=0|n[(r=A+4|0)>>2],f=0|n[(t=A+8|0)>>2],o=a+i|0,n[A>>2]=o,a=f+a|0,n[r>>2]=a,i=f+i|0,n[t>>2]=i,f=a-o|0,(0|o)<0?(i=i-o|0,n[r>>2]=f,n[t>>2]=i,n[A>>2]=0,a=0):(f=a,a=o),(0|f)<0&&(a=a-f|0,n[A>>2]=a,i=i-f|0,n[t>>2]=i,n[r>>2]=0,f=0),e=a-i|0,o=f-i|0,(0|i)<0?(n[A>>2]=e,n[r>>2]=o,n[t>>2]=0,a=e,i=0):o=f,(0|(f=(0|i)<(0|(f=(0|o)<(0|a)?o:a))?i:f))<=0||(n[A>>2]=a-f,n[r>>2]=o-f,n[t>>2]=i-f)}function bA(A){switch(0|(A|=0)){case 1:A=5;break;case 5:A=4;break;case 4:A=6;break;case 6:A=2;break;case 2:A=3;break;case 3:A=1}return 0|A}function hA(A){switch(0|(A|=0)){case 1:A=3;break;case 3:A=2;break;case 2:A=6;break;case 6:A=4;break;case 4:A=5;break;case 5:A=1}return 0|A}function gA(A){var e,r,t,i=0,f=0,a=0,o=0;i=0|n[(A|=0)>>2],f=0|n[(r=A+4|0)>>2],a=0|n[(t=A+8|0)>>2],o=f+(i<<1)|0,n[A>>2]=o,f=a+(f<<1)|0,n[r>>2]=f,i=(a<<1)+i|0,n[t>>2]=i,a=f-o|0,(0|o)<0?(i=i-o|0,n[r>>2]=a,n[t>>2]=i,n[A>>2]=0,f=a,a=0):a=o,(0|f)<0&&(a=a-f|0,n[A>>2]=a,i=i-f|0,n[t>>2]=i,n[r>>2]=0,f=0),e=a-i|0,o=f-i|0,(0|i)<0?(n[A>>2]=e,n[r>>2]=o,n[t>>2]=0,a=e,i=0):o=f,(0|(f=(0|i)<(0|(f=(0|o)<(0|a)?o:a))?i:f))<=0||(n[A>>2]=a-f,n[r>>2]=o-f,n[t>>2]=i-f)}function vA(A){var e,r,t,i=0,f=0,a=0,o=0;o=0|n[(A|=0)>>2],a=((i=0|n[(r=A+4|0)>>2])<<1)+o|0,o=(f=0|n[(t=A+8|0)>>2])+(o<<1)|0,n[A>>2]=o,n[r>>2]=a,i=(f<<1)+i|0,n[t>>2]=i,f=a-o|0,(0|o)<0?(i=i-o|0,n[r>>2]=f,n[t>>2]=i,n[A>>2]=0,o=0):f=a,(0|f)<0&&(o=o-f|0,n[A>>2]=o,i=i-f|0,n[t>>2]=i,n[r>>2]=0,f=0),e=o-i|0,a=f-i|0,(0|i)<0?(n[A>>2]=e,n[r>>2]=a,n[t>>2]=0,o=e,i=0):a=f,(0|(f=(0|i)<(0|(f=(0|a)<(0|o)?a:o))?i:f))<=0||(n[A>>2]=o-f,n[r>>2]=a-f,n[t>>2]=i-f)}function pA(A,e){e|=0;var r,t,i,f=0,a=0,o=0;return i=(0|(t=(0|n[(A|=0)>>2])-(0|n[e>>2])|0))<0,r=(0|(a=(0|n[A+4>>2])-(0|n[e+4>>2])-(i?t:0)|0))<0,e=(e=(A=(0|(o=(i?0-t|0:0)+(0|n[A+8>>2])-(0|n[e+8>>2])+(r?0-a|0:0)|0))<0)?0:o)-((a=(0|(A=(0|e)<(0|(A=(0|(f=(r?0:a)-(A?o:0)|0))<(0|(o=(i?0:t)-(r?a:0)-(A?o:0)|0))?f:o))?e:A))>0)?A:0)|0,f=f-(a?A:0)|0,0|((0|(A=(0|(A=o-(a?A:0)|0))>-1?A:0-A|0))>(0|(e=(0|(f=(0|f)>-1?f:0-f|0))>(0|(e=(0|e)>-1?e:0-e|0))?f:e))?A:e)}function wA(A,e){e|=0;var r;r=0|n[(A|=0)+8>>2],n[e>>2]=(0|n[A>>2])-r,n[e+4>>2]=(0|n[A+4>>2])-r}function _A(A,e){e|=0;var r,t,i,f=0,a=0,o=0;a=0|n[(A|=0)>>2],n[e>>2]=a,o=0|n[A+4>>2],n[(t=e+4|0)>>2]=o,n[(i=e+8|0)>>2]=0,A=(f=(0|o)<(0|a))?a:o,f=f?o:a;do{if((0|f)<0){if((0|A)>0){if((-2147483648|A|0)<(0|f)&-2147483648!=(0|f)&(2147483647-A|0)>=(0|f))break;return 0|(A=1)}if(-2147483648==(0|f)|(-2147483648-A|0)>(0|f))return 0|(e=1);if((0|A)>-1){if((-2147483648|A|0)<(0|f))break;return 0|(A=1)}if(!((-2147483648^A|0)<(0|f)))break;return 0|(A=1)}}while(0);return A=o-a|0,(0|a)<0?(f=0-a|0,n[t>>2]=A,n[i>>2]=f,n[e>>2]=0,a=0):(A=o,f=0),(0|A)<0&&(a=a-A|0,n[e>>2]=a,f=f-A|0,n[i>>2]=f,n[t>>2]=0,A=0),r=a-f|0,o=A-f|0,(0|f)<0?(n[e>>2]=r,n[t>>2]=o,n[i>>2]=0,A=o,o=r,f=0):o=a,(0|(a=(0|f)<(0|(a=(0|A)<(0|o)?A:o))?f:a))<=0||(n[e>>2]=o-a,n[t>>2]=A-a,n[i>>2]=f-a),0|(e=0)}function EA(A){var e,r,t,i;r=(i=0|n[(e=(A|=0)+8|0)>>2])-(0|n[A>>2])|0,n[A>>2]=r,A=(0|n[(t=A+4|0)>>2])-i|0,n[t>>2]=A,n[e>>2]=0-(A+r)}function yA(A){var e,r,t=0,i=0,f=0,a=0,o=0;t=0-(i=0|n[(A|=0)>>2])|0,n[A>>2]=t,n[(e=A+8|0)>>2]=0,a=(f=0|n[(r=A+4|0)>>2])+i|0,(0|i)>0?(n[r>>2]=a,n[e>>2]=i,n[A>>2]=0,t=0,f=a):i=0,(0|f)<0?(o=t-f|0,n[A>>2]=o,i=i-f|0,n[e>>2]=i,n[r>>2]=0,a=o-i|0,t=0-i|0,(0|i)<0?(n[A>>2]=a,n[r>>2]=t,n[e>>2]=0,f=t,i=0):(f=0,a=o)):a=t,(0|(t=(0|i)<(0|(t=(0|f)<(0|a)?f:a))?i:t))<=0||(n[A>>2]=a-t,n[r>>2]=f-t,n[e>>2]=i-t)}function BA(A,e,r){r|=0;var t,i,f=0,a=0;return i=I,I=I+16|0,t=i,a=-2130706433&(e|=0)|134217728,!0&268435456==(2013265920&e|0)?(f=0|Ne(0|(A|=0),0|e,56),m(),f=0|function(A,e,r){A|=0,e|=0,r|=0;var t=0,i=0,f=0;if(f=I,I=I+16|0,i=f,t=0|LA(A,e),(r+-1|0)>>>0>5)return I=f,0|(i=-1);if(t=0!=(0|t),1==(0|r)&t)return I=f,0|(i=-1);do{if(!(0|we(A,e,i))){if(t){t=(5+(0|n[21936+(r<<2)>>2])-(0|n[i>>2])|0)%5|0;break}t=(6+(0|n[21968+(r<<2)>>2])-(0|n[i>>2])|0)%6|0;break}t=-1}while(0);return i=t,I=f,0|i}(A,a,7&f),-1==(0|f)?(n[r>>2]=0,I=i,0|(a=6)):(0|VA(A,a,t)&&D(23313,22484,282,22499),e=0|Ne(0|A,0|e,52),m(),e&=15,0|LA(A,a)?xA(t,e,f,2,r):PA(t,e,f,2,r),I=i,0|(a=0))):(I=i,0|(a=6))}function kA(A,e,r,t){e|=0,t|=0;var f,a=0,o=0,u=0,c=0;if(f=I,I=I+16|0,function(A,e,r){A|=0,e|=0,r|=0;var t=0,f=0,a=0;a=I,I=I+32|0,f=a,function(A,e){A|=0,e|=0;var r=0,t=0,n=0;r=+i[A>>3],t=+l(+r),r=+d(+r),i[e+16>>3]=r,r=+i[A+8>>3],n=t*+l(+r),i[e>>3]=n,r=t*+d(+r),i[e+8>>3]=r}(A,f),n[e>>2]=0,i[r>>3]=5,t=+pe(16400,f),t<+i[r>>3]&&(n[e>>2]=0,i[r>>3]=t);t=+pe(16424,f),t<+i[r>>3]&&(n[e>>2]=1,i[r>>3]=t);t=+pe(16448,f),t<+i[r>>3]&&(n[e>>2]=2,i[r>>3]=t);t=+pe(16472,f),t<+i[r>>3]&&(n[e>>2]=3,i[r>>3]=t);t=+pe(16496,f),t<+i[r>>3]&&(n[e>>2]=4,i[r>>3]=t);t=+pe(16520,f),t<+i[r>>3]&&(n[e>>2]=5,i[r>>3]=t);t=+pe(16544,f),t<+i[r>>3]&&(n[e>>2]=6,i[r>>3]=t);t=+pe(16568,f),t<+i[r>>3]&&(n[e>>2]=7,i[r>>3]=t);t=+pe(16592,f),t<+i[r>>3]&&(n[e>>2]=8,i[r>>3]=t);t=+pe(16616,f),t<+i[r>>3]&&(n[e>>2]=9,i[r>>3]=t);t=+pe(16640,f),t<+i[r>>3]&&(n[e>>2]=10,i[r>>3]=t);t=+pe(16664,f),t<+i[r>>3]&&(n[e>>2]=11,i[r>>3]=t);t=+pe(16688,f),t<+i[r>>3]&&(n[e>>2]=12,i[r>>3]=t);t=+pe(16712,f),t<+i[r>>3]&&(n[e>>2]=13,i[r>>3]=t);t=+pe(16736,f),t<+i[r>>3]&&(n[e>>2]=14,i[r>>3]=t);t=+pe(16760,f),t<+i[r>>3]&&(n[e>>2]=15,i[r>>3]=t);t=+pe(16784,f),t<+i[r>>3]&&(n[e>>2]=16,i[r>>3]=t);t=+pe(16808,f),t<+i[r>>3]&&(n[e>>2]=17,i[r>>3]=t);t=+pe(16832,f),t<+i[r>>3]&&(n[e>>2]=18,i[r>>3]=t);if(t=+pe(16856,f),!(t<+i[r>>3]))return void(I=a);n[e>>2]=19,i[r>>3]=t,I=a}(A|=0,r|=0,c=f),(o=+h(+(1-.5*+i[c>>3])))<1e-16)return n[t>>2]=0,n[t+4>>2]=0,n[t+8>>2]=0,n[t+12>>2]=0,void(I=f);if(c=0|n[r>>2],a=+XA((a=+i[15920+(24*c|0)>>3])-+XA(+function(A,e){A|=0,e|=0;var r=0,t=0,n=0,f=0,a=0;return f=+i[e>>3],t=+l(+f),n=+i[e+8>>3]-+i[A+8>>3],a=t*+d(+n),r=+i[A>>3],+ +p(+a,+(+d(+f)*+l(+r)-+l(+n)*(t*+d(+r))))}(15600+(c<<4)|0,A))),u=0|zA(e)?+XA(a+-.3334731722518321):a,a=+b(+o)/.381966011250105,(0|e)>0){A=0;do{a*=2.6457513110645907,A=A+1|0}while((0|A)!=(0|e))}o=+l(+u)*a,i[t>>3]=o,u=+d(+u)*a,i[t+8>>3]=u,I=f}function mA(A,e,r,t,f){e|=0,r|=0,t|=0,f|=0;var a=0,o=0;if(a=+function(A){A|=0;var e=0,r=0;return r=+i[A>>3],e=+i[A+8>>3],+ +c(+(r*r+e*e))}(A|=0),a<1e-16)return e=15600+(e<<4)|0,n[f>>2]=n[e>>2],n[f+4>>2]=n[e+4>>2],n[f+8>>2]=n[e+8>>2],void(n[f+12>>2]=n[e+12>>2]);if(o=+p(+ +i[A+8>>3],+ +i[A>>3]),(0|r)>0){A=0;do{a/=2.6457513110645907,A=A+1|0}while((0|A)!=(0|r))}t?(a/=3,r=0==(0|zA(r)),a=+v(.381966011250105*(r?a:a/2.6457513110645907))):(a=+v(.381966011250105*a),0|zA(r)&&(o=+XA(o+.3334731722518321))),function(A,e,r,t){A|=0,e=+e,r=+r,t|=0;var f=0,a=0,o=0,c=0;if(r<1e-16)return n[t>>2]=n[A>>2],n[t+4>>2]=n[A+4>>2],n[t+8>>2]=n[A+8>>2],void(n[t+12>>2]=n[A+12>>2]);a=e<0?e+6.283185307179586:e,a=e>=6.283185307179586?a+-6.283185307179586:a;do{if(!(a<1e-16)){if(f=+u(+(a+-3.141592653589793))<1e-16,e=+i[A>>3],f){e-=r,i[t>>3]=e,f=t;break}if(o=+l(+r),r=+d(+r),e=o*+d(+e)+ +l(+a)*(r*+l(+e)),e=+g(+((e=e>1?1:e)<-1?-1:e)),i[t>>3]=e,+u(+(e+-1.5707963267948966))<1e-16)return i[t>>3]=1.5707963267948966,void(i[t+8>>3]=0);if(+u(+(e+1.5707963267948966))<1e-16)return i[t>>3]=-1.5707963267948966,void(i[t+8>>3]=0);if(c=+l(+e),a=r*+d(+a)/c,r=+i[A>>3],e=(o-+d(+e)*+d(+r))/+l(+r)/c,o=a>1?1:a,e=e>1?1:e,(e=+i[A+8>>3]+ +p(+(o<-1?-1:o),+(e<-1?-1:e)))>3.141592653589793)do{e+=-6.283185307179586}while(e>3.141592653589793);if(e<-3.141592653589793)do{e+=6.283185307179586}while(e<-3.141592653589793);return void(i[t+8>>3]=e)}e=+i[A>>3]+r,i[t>>3]=e,f=t}while(0);if(+u(+(e+-1.5707963267948966))<1e-16)return i[f>>3]=1.5707963267948966,void(i[t+8>>3]=0);if(+u(+(e+1.5707963267948966))<1e-16)return i[f>>3]=-1.5707963267948966,void(i[t+8>>3]=0);if(e=+i[A+8>>3],e>3.141592653589793)do{e+=-6.283185307179586}while(e>3.141592653589793);if(e<-3.141592653589793)do{e+=6.283185307179586}while(e<-3.141592653589793);i[t+8>>3]=e}(15600+(e<<4)|0,+XA(+i[15920+(24*e|0)>>3]-o),a,f)}function DA(A,e,r){e|=0,r|=0;var t,i;t=I,I=I+16|0,AA((A|=0)+4|0,i=t),mA(i,0|n[A>>2],e,0,r),I=t}function xA(A,e,r,t,f){A|=0,e|=0,r|=0,t|=0,f|=0;var a,o,u,c,s,l,d,b,h,g,v,p,w,_,E,y,B,k,m,x,M,Q,C=0,P=0,S=0,R=0,T=0,G=0;if(Q=I,I=I+272|0,R=Q+240|0,m=Q,x=Q+224|0,M=Q+208|0,v=Q+176|0,p=Q+160|0,w=Q+192|0,_=Q+144|0,E=Q+128|0,y=Q+112|0,B=Q+96|0,k=Q+80|0,n[(C=Q+256|0)>>2]=e,n[R>>2]=n[A>>2],n[R+4>>2]=n[A+4>>2],n[R+8>>2]=n[A+8>>2],n[R+12>>2]=n[A+12>>2],MA(R,C,m),n[f>>2]=0,(0|(R=t+r+(5==(0|t)&1)|0))<=(0|r))I=Q;else{o=x+4|0,u=v+4|0,c=r+5|0,s=16880+((a=0|n[C>>2])<<2)|0,l=16960+(a<<2)|0,d=E+8|0,b=y+8|0,h=B+8|0,g=M+4|0,S=r;A:for(;;){P=m+(((0|S)%5|0)<<4)|0,n[M>>2]=n[P>>2],n[M+4>>2]=n[P+4>>2],n[M+8>>2]=n[P+8>>2],n[M+12>>2]=n[P+12>>2];do{}while(2==(0|QA(M,a,0,1)));if((0|S)>(0|r)&0!=(0|zA(e))){if(n[v>>2]=n[M>>2],n[v+4>>2]=n[M+4>>2],n[v+8>>2]=n[M+8>>2],n[v+12>>2]=n[M+12>>2],AA(o,p),t=0|n[v>>2],C=0|n[17040+(80*t|0)+(n[x>>2]<<2)>>2],n[v>>2]=n[18640+(80*t|0)+(20*C|0)>>2],(0|(P=0|n[18640+(80*t|0)+(20*C|0)+16>>2]))>0){A=0;do{lA(u),A=A+1|0}while((0|A)<(0|P))}switch(P=18640+(80*t|0)+(20*C|0)+4|0,n[w>>2]=n[P>>2],n[w+4>>2]=n[P+4>>2],n[w+8>>2]=n[P+8>>2],tA(w,3*(0|n[s>>2])|0),eA(u,w,u),q(u),AA(u,_),T=+(0|n[l>>2]),i[E>>3]=3*T,i[d>>3]=0,G=-1.5*T,i[y>>3]=G,i[b>>3]=2.598076211353316*T,i[B>>3]=G,i[h>>3]=-2.598076211353316*T,0|n[17040+(80*(0|n[v>>2])|0)+(n[M>>2]<<2)>>2]){case 1:A=y,t=E;break;case 3:A=B,t=y;break;case 2:A=E,t=B;break;default:A=12;break A}ge(p,_,t,A,k),mA(k,0|n[v>>2],a,1,f+8+(n[f>>2]<<4)|0),n[f>>2]=1+(0|n[f>>2])}if((0|S)<(0|c)&&(AA(g,v),mA(v,0|n[M>>2],a,1,f+8+(n[f>>2]<<4)|0),n[f>>2]=1+(0|n[f>>2])),n[x>>2]=n[M>>2],n[x+4>>2]=n[M+4>>2],n[x+8>>2]=n[M+8>>2],n[x+12>>2]=n[M+12>>2],(0|(S=S+1|0))>=(0|R)){A=3;break}}3!=(0|A)?12==(0|A)&&D(22522,22569,571,22579):I=Q}}function MA(A,e,r){A|=0,e|=0,r|=0;var t,i=0,f=0,a=0,o=0,u=0;t=I,I=I+128|0,f=t,o=20240,u=(a=i=t+64|0)+60|0;do{n[a>>2]=n[o>>2],a=a+4|0,o=o+4|0}while((0|a)<(0|u));o=20304,u=(a=f)+60|0;do{n[a>>2]=n[o>>2],a=a+4|0,o=o+4|0}while((0|a)<(0|u));i=(u=0==(0|zA(0|n[e>>2])))?i:f,gA(f=A+4|0),vA(f),0|zA(0|n[e>>2])&&(cA(f),n[e>>2]=1+(0|n[e>>2])),n[r>>2]=n[A>>2],eA(f,i,e=r+4|0),q(e),n[r+16>>2]=n[A>>2],eA(f,i+12|0,e=r+20|0),q(e),n[r+32>>2]=n[A>>2],eA(f,i+24|0,e=r+36|0),q(e),n[r+48>>2]=n[A>>2],eA(f,i+36|0,e=r+52|0),q(e),n[r+64>>2]=n[A>>2],eA(f,i+48|0,r=r+68|0),q(r),I=t}function QA(A,e,r,t){r|=0,t|=0;var i,f,a,o,u,c,s=0,l=0,d=0,b=0,h=0;if(c=I,I=I+32|0,u=c+12|0,f=c,h=(A|=0)+4|0,b=0|n[16960+((e|=0)<<2)>>2],b=(o=0!=(0|t))?3*b|0:b,s=0|n[h>>2],i=0|n[(a=A+8|0)>>2],o){if((0|(s=i+s+(t=0|n[(l=A+12|0)>>2])|0))==(0|b))return I=c,0|(h=1);d=l}else s=i+s+(t=0|n[(d=A+12|0)>>2])|0;if((0|s)<=(0|b))return I=c,0|(h=0);do{if((0|t)>0){if(t=0|n[A>>2],(0|i)>0){l=18640+(80*t|0)+60|0,t=A;break}t=18640+(80*t|0)+40|0,r?(J(u,b,0,0),rA(h,u,f),dA(f),eA(f,u,h),l=t,t=A):(l=t,t=A)}else l=18640+(80*(0|n[A>>2])|0)+20|0,t=A}while(0);if(n[t>>2]=n[l>>2],(0|n[(s=l+16|0)>>2])>0){t=0;do{lA(h),t=t+1|0}while((0|t)<(0|n[s>>2]))}return A=l+4|0,n[u>>2]=n[A>>2],n[u+4>>2]=n[A+4>>2],n[u+8>>2]=n[A+8>>2],e=0|n[16880+(e<<2)>>2],tA(u,o?3*e|0:e),eA(h,u,h),q(h),t=o&&((0|n[a>>2])+(0|n[h>>2])+(0|n[d>>2])|0)==(0|b)?1:2,I=c,0|(h=t)}function CA(A,e){A|=0,e|=0;var r=0;do{r=0|QA(A,e,0,1)}while(2==(0|r));return 0|r}function PA(A,e,r,t,f){A|=0,e|=0,r|=0,t|=0,f|=0;var a,o,u,c,s,l,d,b,h,g,v,p,w,_,E,y,B,k,m=0,x=0,M=0,Q=0,C=0;if(k=I,I=I+240|0,_=k+208|0,E=k,y=k+192|0,B=k+176|0,h=k+160|0,g=k+144|0,v=k+128|0,p=k+112|0,w=k+96|0,n[(m=k+224|0)>>2]=e,n[_>>2]=n[A>>2],n[_+4>>2]=n[A+4>>2],n[_+8>>2]=n[A+8>>2],n[_+12>>2]=n[A+12>>2],IA(_,m,E),n[f>>2]=0,(0|(b=t+r+(6==(0|t)&1)|0))<=(0|r))I=k;else{o=r+6|0,u=16960+((a=0|n[m>>2])<<2)|0,c=g+8|0,s=v+8|0,l=p+8|0,d=y+4|0,x=0,M=r,t=-1;A:for(;;){if(A=E+((m=(0|M)%6|0)<<4)|0,n[y>>2]=n[A>>2],n[y+4>>2]=n[A+4>>2],n[y+8>>2]=n[A+8>>2],n[y+12>>2]=n[A+12>>2],A=x,x=0|QA(y,a,0,1),(0|M)>(0|r)&0!=(0|zA(e))&&(1!=(0|A)&&(0|n[y>>2])!=(0|t))){switch(AA(E+(((m+5|0)%6|0)<<4)+4|0,B),AA(E+(m<<4)+4|0,h),Q=+(0|n[u>>2]),i[g>>3]=3*Q,i[c>>3]=0,C=-1.5*Q,i[v>>3]=C,i[s>>3]=2.598076211353316*Q,i[p>>3]=C,i[l>>3]=-2.598076211353316*Q,m=0|n[_>>2],0|n[17040+(80*m|0)+(((0|t)==(0|m)?0|n[y>>2]:t)<<2)>>2]){case 1:A=v,t=g;break;case 3:A=p,t=v;break;case 2:A=g,t=p;break;default:A=8;break A}ge(B,h,t,A,w),0|ve(B,w)||0|ve(h,w)||(mA(w,0|n[_>>2],a,1,f+8+(n[f>>2]<<4)|0),n[f>>2]=1+(0|n[f>>2]))}if((0|M)<(0|o)&&(AA(d,B),mA(B,0|n[y>>2],a,1,f+8+(n[f>>2]<<4)|0),n[f>>2]=1+(0|n[f>>2])),(0|(M=M+1|0))>=(0|b)){A=3;break}t=0|n[y>>2]}3!=(0|A)?8==(0|A)&&D(22606,22569,736,22651):I=k}}function IA(A,e,r){A|=0,e|=0,r|=0;var t,i=0,f=0,a=0,o=0,u=0;t=I,I=I+160|0,f=t,o=20368,u=(a=i=t+80|0)+72|0;do{n[a>>2]=n[o>>2],a=a+4|0,o=o+4|0}while((0|a)<(0|u));o=20448,u=(a=f)+72|0;do{n[a>>2]=n[o>>2],a=a+4|0,o=o+4|0}while((0|a)<(0|u));i=(u=0==(0|zA(0|n[e>>2])))?i:f,gA(f=A+4|0),vA(f),0|zA(0|n[e>>2])&&(cA(f),n[e>>2]=1+(0|n[e>>2])),n[r>>2]=n[A>>2],eA(f,i,e=r+4|0),q(e),n[r+16>>2]=n[A>>2],eA(f,i+12|0,e=r+20|0),q(e),n[r+32>>2]=n[A>>2],eA(f,i+24|0,e=r+36|0),q(e),n[r+48>>2]=n[A>>2],eA(f,i+36|0,e=r+52|0),q(e),n[r+64>>2]=n[A>>2],eA(f,i+48|0,e=r+68|0),q(e),n[r+80>>2]=n[A>>2],eA(f,i+60|0,r=r+84|0),q(r),I=t}function SA(A,e){return e=0|Ne(0|(A|=0),0|(e|=0),45),m(),127&e|0}function RA(A,e){var r=0,t=0,n=0,i=0,f=0,a=0;if(!(!0&134217728==(-16777216&(e|=0)|0)))return 0|(e=0);if(f=0|Ne(0|(A|=0),0|e,45),m(),(f&=127)>>>0>121)return 0|(e=0);r=0|Ne(0|A,0|e,52),m(),r&=15;do{if(0|r){for(n=1,t=0;;){if(i=0|Ne(0|A,0|e,3*(15-n|0)|0),m(),0!=(0|(i&=7))&(1^t)){if(1==(0|i)&0!=(0|U(f))){a=0,t=13;break}t=1}if(7==(0|i)){a=0,t=13;break}if(!(n>>>0>>0)){t=9;break}n=n+1|0}if(9==(0|t)){if(15!=(0|r))break;return 0|(a=1)}if(13==(0|t))return 0|a}}while(0);for(;;){if(a=0|Ne(0|A,0|e,3*(14-r|0)|0),m(),!(7==(7&a|0)&!0)){a=0,t=13;break}if(!(r>>>0<14)){a=1,t=13;break}r=r+1|0}return 13==(0|t)?0|a:0}function TA(A,e,r,t){r|=0,t|=0;var i=0,f=0;if(f=0|Ne(0|(A|=0),0|(e|=0),52),m(),r>>>0>15)return 0|(t=4);if((0|(f&=15))<(0|r))return 0|(t=12);if((0|f)==(0|r))return n[t>>2]=A,n[t+4>>2]=e,0|(t=0);if(i=0|Ye(0|r,0,52),i|=A,A=0|m()|-15728641&e,(0|f)>(0|r))do{e=0|Ye(7,0,3*(14-r|0)|0),r=r+1|0,i|=e,A=0|m()|A}while((0|r)<(0|f));return n[t>>2]=i,n[t+4>>2]=A,0|(t=0)}function GA(A,e,r,t){r|=0,t|=0;var i=0,f=0,a=0;if(f=0|Ne(0|(A|=0),0|(e|=0),52),m(),!((0|r)<16&(0|(f&=15))<=(0|r)))return 0|(t=4);i=r-f|0,r=0|Ne(0|A,0|e,45),m();A:do{if(0|U(127&r)){e:do{if(0|f){for(r=1;0==((a=0|Ye(7,0,3*(15-r|0)|0))&A|0)&0==((0|m())&e|0);){if(!(r>>>0>>0))break e;r=r+1|0}r=0|se(7,0,i,((0|i)<0)<<31>>31),i=0|m();break A}}while(0);r=0|Ie(0|(r=0|Le(0|(r=0|se(7,0,i,((0|i)<0)<<31>>31)),0|m(),5,0)),0|m(),-5,-1),r=0|Ie(0|(r=0|Ge(0|r,0|m(),6,0)),0|m(),1,0),i=0|m()}else r=0|se(7,0,i,((0|i)<0)<<31>>31),i=0|m()}while(0);return n[(a=t)>>2]=r,n[a+4>>2]=i,0|(a=0)}function LA(A,e){var r=0,t=0,n=0;if(n=0|Ne(0|(A|=0),0|(e|=0),45),m(),!(0|U(127&n)))return 0|(n=0);n=0|Ne(0|A,0|e,52),m(),n&=15;A:do{if(n)for(t=1;;){if(r=0|Ne(0|A,0|e,3*(15-t|0)|0),m(),0|(r&=7))break A;if(!(t>>>0>>0)){r=0;break}t=t+1|0}else r=0}while(0);return 0|(n=0==(0|r)&1)}function FA(A,e){var r=0,t=0,n=0;if(n=0|Ne(0|(A|=0),0|(e|=0),52),m(),!(n&=15))return 0|(n=0);for(t=1;;){if(r=0|Ne(0|A,0|e,3*(15-t|0)|0),m(),0|(r&=7)){t=5;break}if(!(t>>>0>>0)){r=0,t=5;break}t=t+1|0}return 5==(0|t)?0|r:0}function OA(A,e){var r=0,t=0,n=0,i=0,f=0,a=0,o=0;if(o=0|Ne(0|(A|=0),0|(e|=0),52),m(),!(o&=15))return o=A,k(0|(a=e)),0|o;for(a=1,r=0;;){t=0|Ye(7,0,0|(i=3*(15-a|0)|0)),n=0|m(),f=0|Ne(0|A,0|e,0|i),m(),A=(i=0|Ye(0|bA(7&f),0,0|i))|A&~t,e=(f=0|m())|e&~n;A:do{if(!r)if(0==(i&t|0)&0==(f&n|0))r=0;else if(t=0|Ne(0|A,0|e,52),m(),t&=15){r=1;e:for(;;){switch(f=0|Ne(0|A,0|e,3*(15-r|0)|0),m(),7&f){case 1:break e;case 0:break;default:r=1;break A}if(!(r>>>0>>0)){r=1;break A}r=r+1|0}for(r=1;;){if(n=0|Ne(0|A,0|e,0|(f=3*(15-r|0)|0)),m(),i=0|Ye(7,0,0|f),e&=~(0|m()),A=A&~i|(f=0|Ye(0|bA(7&n),0,0|f)),e=0|e|m(),!(r>>>0>>0)){r=1;break}r=r+1|0}}else r=1}while(0);if(!(a>>>0>>0))break;a=a+1|0}return k(0|e),0|A}function UA(A,e){var r=0,t=0,n=0,i=0,f=0;if(t=0|Ne(0|(A|=0),0|(e|=0),52),m(),!(t&=15))return t=A,k(0|(r=e)),0|t;for(r=1;f=0|Ne(0|A,0|e,0|(i=3*(15-r|0)|0)),m(),n=0|Ye(7,0,0|i),e&=~(0|m()),A=(i=0|Ye(0|bA(7&f),0,0|i))|A&~n,e=0|m()|e,r>>>0>>0;)r=r+1|0;return k(0|e),0|A}function NA(A,e){var r=0,t=0,n=0,i=0,f=0,a=0,o=0;if(o=0|Ne(0|(A|=0),0|(e|=0),52),m(),!(o&=15))return o=A,k(0|(a=e)),0|o;for(a=1,r=0;;){t=0|Ye(7,0,0|(i=3*(15-a|0)|0)),n=0|m(),f=0|Ne(0|A,0|e,0|i),m(),A=(i=0|Ye(0|hA(7&f),0,0|i))|A&~t,e=(f=0|m())|e&~n;A:do{if(!r)if(0==(i&t|0)&0==(f&n|0))r=0;else if(t=0|Ne(0|A,0|e,52),m(),t&=15){r=1;e:for(;;){switch(f=0|Ne(0|A,0|e,3*(15-r|0)|0),m(),7&f){case 1:break e;case 0:break;default:r=1;break A}if(!(r>>>0>>0)){r=1;break A}r=r+1|0}for(r=1;;){if(i=0|Ye(7,0,0|(n=3*(15-r|0)|0)),f=e&~(0|m()),e=0|Ne(0|A,0|e,0|n),m(),A=A&~i|(e=0|Ye(0|hA(7&e),0,0|n)),e=0|f|m(),!(r>>>0>>0)){r=1;break}r=r+1|0}}else r=1}while(0);if(!(a>>>0>>0))break;a=a+1|0}return k(0|e),0|A}function YA(A,e){var r=0,t=0,n=0,i=0,f=0;if(t=0|Ne(0|(A|=0),0|(e|=0),52),m(),!(t&=15))return t=A,k(0|(r=e)),0|t;for(r=1;i=0|Ye(7,0,0|(f=3*(15-r|0)|0)),n=e&~(0|m()),e=0|Ne(0|A,0|e,0|f),m(),A=(e=0|Ye(0|hA(7&e),0,0|f))|A&~i,e=0|m()|n,r>>>0>>0;)r=r+1|0;return k(0|e),0|A}function zA(A){return 0|(0|(A|=0))%2}function ZA(A,e,r){r|=0;var t,i=0;return t=I,I=I+16|0,i=t,(e|=0)>>>0>15?(I=t,0|(i=4)):2146435072==(2146435072&n[(A|=0)+4>>2]|0)||2146435072==(2146435072&n[A+8+4>>2]|0)?(I=t,0|(i=3)):(function(A,e,r){var t,n;t=I,I=I+16|0,kA(A|=0,e|=0,r|=0,n=t),X(n,r+4|0),I=t}(A,e,i),e=0|function(A,e){A|=0;var r,t=0,i=0,f=0,a=0,o=0,u=0,c=0,s=0;if(r=I,I=I+64|0,u=r+40|0,i=r+24|0,f=r+12|0,a=r,Ye(0|(e|=0),0,52),t=134225919|m(),!e)return(0|n[A+4>>2])>2||(0|n[A+8>>2])>2||(0|n[A+12>>2])>2?(u=0,k(0|(o=0)),I=r,0|u):(Ye(0|Y(A),0,45),o=0|m()|t,u=-1,k(0|o),I=r,0|u);if(n[u>>2]=n[A>>2],n[u+4>>2]=n[A+4>>2],n[u+8>>2]=n[A+8>>2],n[u+12>>2]=n[A+12>>2],o=u+4|0,(0|e)>0)for(A=-1;n[i>>2]=n[o>>2],n[i+4>>2]=n[o+4>>2],n[i+8>>2]=n[o+8>>2],1&e?(aA(o),n[f>>2]=n[o>>2],n[f+4>>2]=n[o+4>>2],n[f+8>>2]=n[o+8>>2],uA(f)):(oA(o),n[f>>2]=n[o>>2],n[f+4>>2]=n[o+4>>2],n[f+8>>2]=n[o+8>>2],cA(f)),rA(i,f,a),q(a),c=0|Ye(7,0,0|(s=3*(15-e|0)|0)),t&=~(0|m()),A=(s=0|Ye(0|nA(a),0,0|s))|A&~c,t=0|m()|t,(0|e)>1;)e=e+-1|0;else A=-1;A:do{if((0|n[o>>2])<=2&&(0|n[u+8>>2])<=2&&(0|n[u+12>>2])<=2){if(e=0|Ye(0|(i=0|Y(u)),0,45),e|=A,A=0|m()|-1040385&t,a=0|z(u),!(0|U(i))){if((0|a)<=0)break;for(f=0;;){if(i=0|Ne(0|e,0|A,52),m(),i&=15)for(t=1;u=0|Ne(0|e,0|A,0|(s=3*(15-t|0)|0)),m(),c=0|Ye(7,0,0|s),A&=~(0|m()),e=e&~c|(s=0|Ye(0|bA(7&u),0,0|s)),A=0|A|m(),t>>>0>>0;)t=t+1|0;if((0|(f=f+1|0))==(0|a))break A}}f=0|Ne(0|e,0|A,52),m(),f&=15;e:do{if(f){t=1;r:for(;;){switch(s=0|Ne(0|e,0|A,3*(15-t|0)|0),m(),7&s){case 1:break r;case 0:break;default:break e}if(!(t>>>0>>0))break e;t=t+1|0}if(0|Z(i,0|n[u>>2]))for(t=1;c=0|Ye(7,0,0|(u=3*(15-t|0)|0)),s=A&~(0|m()),A=0|Ne(0|e,0|A,0|u),m(),e=e&~c|(A=0|Ye(0|hA(7&A),0,0|u)),A=0|s|m(),t>>>0>>0;)t=t+1|0;else for(t=1;u=0|Ne(0|e,0|A,0|(s=3*(15-t|0)|0)),m(),c=0|Ye(7,0,0|s),A&=~(0|m()),e=e&~c|(s=0|Ye(0|bA(7&u),0,0|s)),A=0|A|m(),t>>>0>>0;)t=t+1|0}}while(0);if((0|a)>0){t=0;do{e=0|OA(e,A),A=0|m(),t=t+1|0}while((0|t)!=(0|a))}}else e=0,A=0}while(0);return s=e,k(0|(c=A)),I=r,0|s}(i,e),i=0|m(),n[r>>2]=e,n[r+4>>2]=i,0==(0|e)&0==(0|i)&&D(23313,22674,786,22697),I=t,0|(i=0))}function HA(A,e,r){var t,i=0,f=0,a=0;if(t=(r|=0)+4|0,f=0|Ne(0|(A|=0),0|(e|=0),52),m(),f&=15,a=0|Ne(0|A,0|e,45),m(),i=0==(0|f),0|U(127&a)){if(i)return 0|(a=1);i=1}else{if(i)return 0|(a=0);i=0==(0|n[t>>2])&&0==(0|n[r+8>>2])?0!=(0|n[r+12>>2])&1:1}for(r=1;1&r?uA(t):cA(t),a=0|Ne(0|A,0|e,3*(15-r|0)|0),m(),sA(t,7&a),r>>>0>>0;)r=r+1|0;return 0|i}function VA(A,e,r){r|=0;var t,i,f=0,a=0,o=0,u=0,c=0,s=0;if(i=I,I=I+16|0,t=i,s=0|Ne(0|(A|=0),0|(e|=0),45),m(),(s&=127)>>>0>121)return n[r>>2]=0,n[r+4>>2]=0,n[r+8>>2]=0,n[r+12>>2]=0,I=i,0|(s=5);A:do{if(0!=(0|U(s))&&(o=0|Ne(0|A,0|e,52),m(),0!=(0|(o&=15)))){f=1;e:for(;;){switch(c=0|Ne(0|A,0|e,3*(15-f|0)|0),m(),7&c){case 5:break e;case 0:break;default:f=e;break A}if(!(f>>>0>>0)){f=e;break A}f=f+1|0}for(a=1,f=e;u=0|Ye(7,0,0|(e=3*(15-a|0)|0)),c=f&~(0|m()),f=0|Ne(0|A,0|f,0|e),m(),A=A&~u|(f=0|Ye(0|hA(7&f),0,0|e)),f=0|c|m(),a>>>0>>0;)a=a+1|0}else f=e}while(0);if(c=7696+(28*s|0)|0,n[r>>2]=n[c>>2],n[r+4>>2]=n[c+4>>2],n[r+8>>2]=n[c+8>>2],n[r+12>>2]=n[c+12>>2],!(0|HA(A,f,r)))return I=i,0|(s=0);if(u=r+4|0,n[t>>2]=n[u>>2],n[t+4>>2]=n[u+4>>2],n[t+8>>2]=n[u+8>>2],o=0|Ne(0|A,0|f,52),m(),c=15&o,1&o?(cA(u),o=c+1|0):o=c,0|U(s)){A:do{if(c)for(e=1;;){if(a=0|Ne(0|A,0|f,3*(15-e|0)|0),m(),0|(a&=7)){f=a;break A}if(!(e>>>0>>0)){f=0;break}e=e+1|0}else f=0}while(0);f=4==(0|f)&1}else f=0;if(0|QA(r,o,f,0)){if(0|U(s))do{}while(0!=(0|QA(r,o,0,0)));(0|o)!=(0|c)&&oA(u)}else(0|o)!=(0|c)&&(n[u>>2]=n[t>>2],n[u+4>>2]=n[t+4>>2],n[u+8>>2]=n[t+8>>2]);return I=i,0|(s=0)}function $A(A,e,r){r|=0;var t,n,i=0;return n=I,I=I+16|0,0|(i=0|VA(A|=0,e|=0,t=n))?(I=n,0|i):(i=0|Ne(0|A,0|e,52),m(),DA(t,15&i,r),I=n,0|(i=0))}function WA(A,e,r){r|=0;var t,n=0,i=0,f=0;if(t=I,I=I+16|0,0|(n=0|VA(A|=0,e|=0,f=t)))return I=t,0|(f=n);n=0|Ne(0|A,0|e,45),m(),n=0==(0|U(127&n)),i=0|Ne(0|A,0|e,52),m(),i&=15;A:do{if(!n){if(0|i)for(n=1;;){if(!(0==((0|Ye(7,0,3*(15-n|0)|0))&A|0)&0==((0|m())&e|0)))break A;if(!(n>>>0>>0))break;n=n+1|0}return xA(f,i,0,5,r),I=t,0|0}}while(0);return PA(f,i,0,6,r),I=t,0|0}function KA(A,e){e|=0;var r=0,t=0,i=0,f=0,a=0,o=0,u=0;if((A|=0)>>>0>15)return 0|(o=4);if(Ye(0|A,0,52),o=134225919|m(),!A){r=0,t=0;do{0|U(t)&&(Ye(0|t,0,45),a=0|o|m(),n[(A=e+(r<<3)|0)>>2]=-1,n[A+4>>2]=a,r=r+1|0),t=t+1|0}while(122!=(0|t));return 0|(r=0)}r=0,a=0;do{if(0|U(a)){for(Ye(0|a,0,45),t=1,i=-1,f=0|o|m();i&=~(u=0|Ye(7,0,3*(15-t|0)|0)),f&=~(0|m()),(0|t)!=(0|A);)t=t+1|0;n[(u=e+(r<<3)|0)>>2]=i,n[u+4>>2]=f,r=r+1|0}a=a+1|0}while(122!=(0|a));return 0|(r=0)}function jA(A,e,r,t){A|=0,t|=0;var i=0,f=0;i=0|Ne(0|(e|=0),0|(r|=0),52),m(),0==(0|e)&0==(0|r)|(0|t)>15|(0|(i&=15))>(0|t)?(t=-1,i=-1,e=0,r=0):(f=0|function(A,e,r,t){return A|=0,e|=0,(0|(t|=0))<(0|(r|=0))?(t=A,k(0|(r=e)),0|t):(r=0|Ye(-1,-1,3+(3*(t-r|0)|0)|0),t=0|Ye(0|~r,0|~(0|m()),3*(15-t|0)|0),r=~(0|m())&e,t=~t&A,k(0|r),0|t)}(e,r,i+1|0,t),r=-15728641&(0|m()),e=0|Ye(0|t,0,52),t=(f=0==(0|LA(e|=f,r=0|r|m())))?-1:t),n[(f=A)>>2]=e,n[f+4>>2]=r,n[A+8>>2]=i,n[A+12>>2]=t}function JA(A){var e,r=0,t=0,i=0,f=0,a=0,o=0,u=0,c=0;if(!(0==(0|(r=0|n[(t=A|=0)>>2]))&0==(0|(t=0|n[t+4>>2])))&&(i=0|Ne(0|r,0|t,52),m(),r=0|Ie(0|(u=0|Ye(1,0,3*(15^(i&=15))|0)),0|m(),0|r,0|t),t=0|m(),n[(u=A)>>2]=r,n[u+4>>2]=t,!((0|i)<(0|(o=0|n[(u=A+8|0)>>2]))))){for(e=A+12|0,a=i;;){if((0|a)==(0|o)){i=5;break}if(c=(0|a)==(0|n[e>>2]),i=0|Ne(0|r,0|t,0|(f=3*(15-a|0)|0)),m(),c&1==(0|(i&=7))&!0){i=7;break}if(!(7==(0|i)&!0)){i=10;break}if(r=0|Ie(0|r,0|t,0|(c=0|Ye(1,0,0|f)),0|m()),t=0|m(),n[(c=A)>>2]=r,n[c+4>>2]=t,!((0|a)>(0|o))){i=10;break}a=a+-1|0}if(5==(0|i))return n[(c=A)>>2]=0,n[c+4>>2]=0,n[u>>2]=-1,void(n[e>>2]=-1);if(7==(0|i))return o=0|Ie(0|r,0|t,0|(o=0|Ye(1,0,0|f)),0|m()),u=0|m(),n[(c=A)>>2]=o,n[c+4>>2]=u,void(n[e>>2]=a+-1)}}function XA(A){var e;return e=(A=+A)<0?A+6.283185307179586:A,+(A>=6.283185307179586?e+-6.283185307179586:e)}function qA(A,e){return e|=0,+u(+(+i[(A|=0)>>3]-+i[e>>3]))<17453292519943298e-27?0|(e=+u(+(+i[A+8>>3]-+i[e+8>>3]))<17453292519943298e-27):0|(e=0)}function Ae(A,e){A|=0;var r,t,n,f=0;return t=+i[(e|=0)>>3],r=+i[A>>3],f=(n=+d(.5*(t-r)))*n+(f=+d(.5*(+i[e+8>>3]-+i[A+8>>3])))*(+l(+t)*+l(+r)*f),2*+p(+ +c(+f),+ +c(+(1-f)))*6371.007180918475}function ee(A,e){e|=0;var r=0;return(A|=0)>>>0>15?0|(e=4):(r=0|Le(0|(r=0|se(7,0,A,((0|A)<0)<<31>>31)),0|m(),120,0),A=0|m(),n[e>>2]=2|r,n[e+4>>2]=A,0|(e=0))}function re(A,e,r){A|=0,r|=0;var t,n,f,a,o=0,u=0,s=0,h=0,g=0,w=0;return w=+i[(e|=0)>>3],f=+i[A>>3],g=+d(.5*(w-f)),s=+i[e+8>>3],n=+i[A+8>>3],h=+d(.5*(s-n)),t=+l(+f),a=+l(+w),h=2*+p(+ +c(+(h=g*g+h*(a*t*h))),+ +c(+(1-h))),g=+i[r>>3],w=+d(.5*(g-w)),o=+i[r+8>>3],s=+d(.5*(o-s)),u=+l(+g),s=2*+p(+ +c(+(s=w*w+s*(a*u*s))),+ +c(+(1-s))),g=+d(.5*(f-g)),o=+d(.5*(n-o)),o=2*+p(+ +c(+(o=g*g+o*(t*u*o))),+ +c(+(1-o))),4*+v(+ +c(+ +b(.5*(u=.5*(h+s+o)))*+b(.5*(u-h))*+b(.5*(u-s))*+b(.5*(u-o))))}function te(A,e,r){r|=0;var t,f,a,o=0,u=0;if(a=I,I=I+192|0,f=a,0|(u=0|$A(A|=0,e|=0,t=a+168|0)))return I=a,0|(r=u);if(0|WA(A,e,f)&&D(23313,22742,386,22751),(0|(e=0|n[f>>2]))>0){if(o=+re(f+8|0,f+8+((1!=(0|e)&1)<<4)|0,t)+0,1!=(0|e)){A=1;do{o+=+re(f+8+((u=A)<<4)|0,f+8+(((0|(A=A+1|0))%(0|e)|0)<<4)|0,t)}while((0|A)<(0|e))}}else o=0;return i[r>>3]=o,I=a,0|(r=0)}function ne(A){A|=0;var e,r,t=0;return(e=0|Pe(1,12))||D(22832,22787,49,22845),0|(t=0|n[(r=A+4|0)>>2])?(n[(t=t+8|0)>>2]=e,n[r>>2]=e,0|e):(0|n[A>>2]&&D(22862,22787,61,22885),n[(t=A)>>2]=e,n[r>>2]=e,0|e)}function ie(A,e){A|=0,e|=0;var r,t;return(t=0|Qe(24))||D(22899,22787,78,22913),n[t>>2]=n[e>>2],n[t+4>>2]=n[e+4>>2],n[t+8>>2]=n[e+8>>2],n[t+12>>2]=n[e+12>>2],n[t+16>>2]=0,0|(r=0|n[(e=A+4|0)>>2])?(n[r+16>>2]=t,n[e>>2]=t,0|t):(0|n[A>>2]&&D(22928,22787,82,22913),n[A>>2]=t,n[e>>2]=t,0|t)}function fe(A){var e=0,r=0,t=0,i=0;if(A|=0)for(t=1;;){if(0|(e=0|n[A>>2]))do{if(0|(r=0|n[e>>2]))do{i=r,r=0|n[r+16>>2],Ce(i)}while(0!=(0|r));i=e,e=0|n[e+8>>2],Ce(i)}while(0!=(0|e));if(e=A,A=0|n[A+8>>2],t||Ce(e),!A)break;t=0}}function ae(A){var e,r,t=0,f=0,a=0,o=0,c=0,s=0,l=0,d=0,b=0,h=0,g=0,v=0,p=0,w=0,_=0,E=0,y=0,B=0,k=0,m=0,x=0,M=0,Q=0,C=0,P=0,I=0,S=0,R=0,T=0,G=0;if(0|n[(o=(A|=0)+8|0)>>2])return 0|(G=1);if(!(a=0|n[A>>2]))return 0|(G=0);t=a,f=0;do{f=f+1|0,t=0|n[t+8>>2]}while(0!=(0|t));if(f>>>0<2)return 0|(G=0);(r=0|Qe(f<<2))||D(22948,22787,317,22967),(e=0|Qe(f<<5))||D(22989,22787,321,22967),n[A>>2]=0,n[(M=A+4|0)>>2]=0,n[o>>2]=0,f=0,R=0,x=0,g=0;A:for(;;){if(h=0|n[a>>2]){c=0,s=h;do{if(d=+i[s+8>>3],t=s,s=0|n[s+16>>2],l=+i[(o=(b=0==(0|s))?h:s)+8>>3],+u(+(d-l))>3.141592653589793){G=14;break}c+=(l-d)*(+i[t>>3]+ +i[o>>3])}while(!b);if(14==(0|G)){G=0,c=0,t=h;do{m=+i[t+8>>3],I=0|n[(S=t+16|0)>>2],k=+i[(I=0==(0|I)?h:I)+8>>3],c+=(+i[t>>3]+ +i[I>>3])*((k<0?k+6.283185307179586:k)-(m<0?m+6.283185307179586:m)),t=0|n[(0==(0|t)?a:S)>>2]}while(0!=(0|t))}c>0?(n[r+(R<<2)>>2]=a,R=R+1|0,o=x,t=g):G=19}else G=19;if(19==(0|G)){G=0;do{if(!f){if(g){o=M,s=g+8|0,t=a,f=A;break}if(0|n[A>>2]){G=27;break A}o=M,s=A,t=a,f=A;break}if(0|n[(t=f+8|0)>>2]){G=21;break A}if(!(f=0|Pe(1,12))){G=23;break A}n[t>>2]=f,o=f+4|0,s=f,t=g}while(0);if(n[s>>2]=a,n[o>>2]=a,s=e+(x<<5)|0,b=0|n[a>>2]){for(i[(h=e+(x<<5)+8|0)>>3]=17976931348623157e292,i[(g=e+(x<<5)+24|0)>>3]=17976931348623157e292,i[s>>3]=-17976931348623157e292,i[(v=e+(x<<5)+16|0)>>3]=-17976931348623157e292,y=17976931348623157e292,B=-17976931348623157e292,o=0,p=b,d=17976931348623157e292,_=17976931348623157e292,E=-17976931348623157e292,l=-17976931348623157e292;c=+i[p>>3],m=+i[p+8>>3],p=0|n[p+16>>2],k=+i[((w=0==(0|p))?b:p)+8>>3],c>3]=c,d=c),m<_&&(i[g>>3]=m,_=m),c>E?i[s>>3]=c:c=E,m>l&&(i[v>>3]=m,l=m),y=m>0&mB?m:B,o|=+u(+(m-k))>3.141592653589793,!w;)E=c;o&&(i[v>>3]=B,i[g>>3]=y)}else n[s>>2]=0,n[s+4>>2]=0,n[s+8>>2]=0,n[s+12>>2]=0,n[s+16>>2]=0,n[s+20>>2]=0,n[s+24>>2]=0,n[s+28>>2]=0;o=x+1|0}if(a=0|n[(S=a+8|0)>>2],n[S>>2]=0,!a){G=45;break}x=o,g=t}if(21==(0|G))D(22765,22787,35,22799);else if(23==(0|G))D(22819,22787,37,22799);else if(27==(0|G))D(22862,22787,61,22885);else if(45==(0|G)){A:do{if((0|R)>0){for(S=0==(0|o),P=o<<2,I=0==(0|A),C=0,t=0;;){if(Q=0|n[r+(C<<2)>>2],S)G=73;else{if(!(x=0|Qe(P))){G=50;break}if(!(M=0|Qe(P))){G=52;break}e:do{if(I)f=0;else{for(o=0,f=0,s=A;a=e+(o<<5)|0,0|oe(0|n[s>>2],a,0|n[Q>>2])?(n[x+(f<<2)>>2]=s,n[M+(f<<2)>>2]=a,w=f+1|0):w=f,s=0|n[s+8>>2];)o=o+1|0,f=w;if((0|w)>0)if(a=0|n[x>>2],1==(0|w))f=a;else for(v=0,p=-1,f=a,g=a;;){for(b=0|n[g>>2],a=0,s=0;h=(0|(o=0|n[n[x+(s<<2)>>2]>>2]))==(0|b)?a:a+(1&(0|oe(o,0|n[M+(s<<2)>>2],0|n[b>>2])))|0,(0|(s=s+1|0))!=(0|w);)a=h;if(f=(o=(0|h)>(0|p))?g:f,(0|(a=v+1|0))==(0|w))break e;v=a,p=o?h:p,g=0|n[x+(a<<2)>>2]}else f=0}}while(0);if(Ce(x),Ce(M),f){if(a=0|n[(o=f+4|0)>>2])f=a+8|0;else if(0|n[f>>2]){G=70;break}n[f>>2]=Q,n[o>>2]=Q}else G=73}if(73==(0|G)){if(G=0,0|(t=0|n[Q>>2]))do{M=t,t=0|n[t+16>>2],Ce(M)}while(0!=(0|t));Ce(Q),t=1}if((0|(C=C+1|0))>=(0|R)){T=t;break A}}50==(0|G)?D(23004,22787,249,23023):52==(0|G)?D(23042,22787,252,23023):70==(0|G)&&D(22862,22787,61,22885)}else T=0}while(0);return Ce(r),Ce(e),0|(G=T)}return 0}function oe(A,e,r){A|=0;var t=0,f=0,a=0,o=0,u=0,c=0,s=0,l=0;if(!(0|W(e|=0,r|=0)))return 0|(A=0);if(e=0|$(e),t=+i[r>>3],f=e&(f=+i[r+8>>3])<0?f+6.283185307179586:f,!(A=0|n[A>>2]))return 0|(A=0);if(e){e=0,s=f,r=A;A:for(;;){for(;o=+i[r>>3],f=+i[r+8>>3],l=0|n[(r=r+16|0)>>2],a=+i[(l=0==(0|l)?A:l)>>3],u=+i[l+8>>3],o>a?(c=o,o=u):(c=a,a=o,o=f,f=u),(t=t==a|t==c?t+2220446049250313e-31:t)c;)if(!(r=0|n[r>>2])){r=22;break A}if(((c=(u=o<0?o+6.283185307179586:o)+(t-a)/(c-a)*((o=f<0?f+6.283185307179586:f)-u))<0?c+6.283185307179586:c)>(s=u==s|o==s?s+-2220446049250313e-31:s)&&(e^=1),!(r=0|n[r>>2])){r=22;break}}if(22==(0|r))return 0|e}else{e=0,s=f,r=A;A:for(;;){for(;o=+i[r>>3],f=+i[r+8>>3],l=0|n[(r=r+16|0)>>2],a=+i[(l=0==(0|l)?A:l)>>3],u=+i[l+8>>3],o>a?(c=o,o=u):(c=a,a=o,o=f,f=u),(t=t==a|t==c?t+2220446049250313e-31:t)c;)if(!(r=0|n[r>>2])){r=22;break A}if(o+(t-a)/(c-a)*(f-o)>(s=o==s|f==s?s+-2220446049250313e-31:s)&&(e^=1),!(r=0|n[r>>2])){r=22;break}}if(22==(0|r))return 0|e}return 0}function ue(A,e,r,i,f){r|=0,i|=0,f|=0;var a,o,u,c,s=0,l=0,d=0,b=0,h=0,g=0,v=0,p=0,w=0,_=0;if(c=I,I=I+32|0,_=c+16|0,u=c,s=0|Ne(0|(A|=0),0|(e|=0),52),m(),s&=15,v=0|Ne(0|r,0|i,52),m(),(0|s)!=(15&v|0))return I=c,0|(_=12);if(h=0|Ne(0|A,0|e,45),m(),h&=127,g=0|Ne(0|r,0|i,45),m(),h>>>0>121|(g&=127)>>>0>121)return I=c,0|(_=5);if(v=(0|h)!=(0|g)){if(7==(0|(d=0|V(h,g))))return I=c,0|(_=1);7==(0|(b=0|V(g,h)))?D(23066,23090,161,23100):(p=d,l=b)}else p=0,l=0;a=0|U(h),o=0|U(g),n[_>>2]=0,n[_+4>>2]=0,n[_+8>>2]=0,n[_+12>>2]=0;do{if(p){if(d=(0|(g=0|n[4272+(28*h|0)+(p<<2)>>2]))>0,o)if(d){h=0,b=r,d=i;do{b=0|NA(b,d),d=0|m(),1==(0|(l=0|hA(l)))&&(l=0|hA(1)),h=h+1|0}while((0|h)!=(0|g));g=l,h=b,b=d}else g=l,h=r,b=i;else if(d){h=0,b=r,d=i;do{b=0|YA(b,d),d=0|m(),l=0|hA(l),h=h+1|0}while((0|h)!=(0|g));g=l,h=b,b=d}else g=l,h=r,b=i;if(HA(h,b,_),v||D(23115,23090,191,23100),(d=0!=(0|a))&(l=0!=(0|o))&&D(23142,23090,192,23100),d){if(7==(0|(l=0|FA(A,e)))){s=5;break}if(0|t[21872+(7*l|0)+p>>0]){s=1;break}h=b=0|n[21040+(28*l|0)+(p<<2)>>2]}else if(l){if(7==(0|(l=0|FA(h,b)))){s=5;break}if(0|t[21872+(7*l|0)+g>>0]){s=1;break}h=0,b=0|n[21040+(28*g|0)+(l<<2)>>2]}else h=0,b=0;if((h|b|0)<0)s=5;else{if((0|b)>0){d=_+4|0,l=0;do{dA(d),l=l+1|0}while((0|l)!=(0|b))}if(n[u>>2]=0,n[u+4>>2]=0,n[u+8>>2]=0,sA(u,p),0|s)for(;0|zA(s)?uA(u):cA(u),(0|s)>1;)s=s+-1|0;if((0|h)>0){s=0;do{dA(u),s=s+1|0}while((0|s)!=(0|h))}eA(w=_+4|0,u,w),q(w),w=51}}else if(HA(r,i,_),0!=(0|a)&0!=(0|o))if((0|g)!=(0|h)&&D(23173,23090,261,23100),7==(0|(l=0|FA(A,e)))|7==(0|(s=0|FA(r,i))))s=5;else if(0|t[21872+(7*l|0)+s>>0])s=1;else if((0|(l=0|n[21040+(28*l|0)+(s<<2)>>2]))>0){d=_+4|0,s=0;do{dA(d),s=s+1|0}while((0|s)!=(0|l));w=51}else w=51;else w=51}while(0);return 51==(0|w)&&(s=_+4|0,n[f>>2]=n[s>>2],n[f+4>>2]=n[s+4>>2],n[f+8>>2]=n[s+8>>2],s=0),I=c,0|(_=s)}function ce(A,e,r,t){r|=0,t|=0;var i,f,a,o=0,u=0,c=0,s=0,l=0,d=0,b=0,h=0,g=0,v=0,p=0,w=0,_=0;if(a=I,I=I+48|0,i=a+36|0,c=a+24|0,s=a+12|0,l=a,o=0|Ne(0|(A|=0),0|(e|=0),52),m(),o&=15,b=0|Ne(0|A,0|e,45),m(),(b&=127)>>>0>121)return I=a,0|(t=5);if(f=0|U(b),Ye(0|o,0,52),v=134225919|m(),n[(u=t)>>2]=-1,n[u+4>>2]=v,!o)return 7==(0|(o=0|nA(r)))||127==(0|(o=0|H(b,o)))?(I=a,0|(v=1)):(h=0|Ye(0|o,0,45),g=0|m(),g=-1040385&n[(b=t)+4>>2]|g,n[(v=t)>>2]=n[b>>2]|h,n[v+4>>2]=g,I=a,0|(v=0));for(n[i>>2]=n[r>>2],n[i+4>>2]=n[r+4>>2],n[i+8>>2]=n[r+8>>2],r=o;;){if(u=r,r=r+-1|0,n[c>>2]=n[i>>2],n[c+4>>2]=n[i+4>>2],n[c+8>>2]=n[i+8>>2],0|zA(u)){if(0|(o=0|iA(i))){r=13;break}n[s>>2]=n[i>>2],n[s+4>>2]=n[i+4>>2],n[s+8>>2]=n[i+8>>2],uA(s)}else{if(0|(o=0|fA(i))){r=13;break}n[s>>2]=n[i>>2],n[s+4>>2]=n[i+4>>2],n[s+8>>2]=n[i+8>>2],cA(s)}if(rA(c,s,l),q(l),w=0|n[(o=t)>>2],o=0|n[o+4>>2],p=0|Ye(7,0,0|(_=3*(15-u|0)|0)),o&=~(0|m()),_=0|Ye(0|nA(l),0,0|_),o=0|m()|o,n[(v=t)>>2]=_|w&~p,n[v+4>>2]=o,(0|u)<=1){r=14;break}}A:do{if(13!=(0|r)&&14==(0|r))if((0|n[i>>2])<=1&&(0|n[i+4>>2])<=1&&(0|n[i+8>>2])<=1){l=127==(0|(o=0|H(b,r=0|nA(i))))?0:0|U(o);e:do{if(r){if(f){if(7==(0|(o=0|FA(A,e)))){o=5;break A}if((0|(u=0|n[21248+(28*o|0)+(r<<2)>>2]))>0){o=r,r=0;do{o=0|bA(o),r=r+1|0}while((0|r)!=(0|u))}else o=r;if(1==(0|o)){o=9;break A}127==(0|(r=0|H(b,o)))&&D(23200,23090,411,23230),0|U(r)?D(23245,23090,412,23230):(g=r,h=u,d=o)}else g=o,h=0,d=r;if((0|(s=0|n[4272+(28*b|0)+(d<<2)>>2]))<=-1&&D(23276,23090,419,23230),!l){if((0|h)<0){o=5;break A}if(0|h){o=0,r=0|n[(u=t)>>2],u=0|n[u+4>>2];do{r=0|UA(r,u),u=0|m(),n[(_=t)>>2]=r,n[_+4>>2]=u,o=o+1|0}while((0|o)<(0|h))}if((0|s)<=0){o=g,r=58;break}for(o=0,r=0|n[(u=t)>>2],u=0|n[u+4>>2];;)if(r=0|UA(r,u),u=0|m(),n[(_=t)>>2]=r,n[_+4>>2]=u,(0|(o=o+1|0))==(0|s)){o=g,r=58;break e}}if(7==(0|(c=0|V(g,b)))&&D(23066,23090,428,23230),r=0|n[(o=t)>>2],o=0|n[o+4>>2],(0|s)>0){u=0;do{r=0|UA(r,o),o=0|m(),n[(_=t)>>2]=r,n[_+4>>2]=o,u=u+1|0}while((0|u)!=(0|s))}if(7==(0|(o=0|FA(r,o)))&&D(23313,23090,440,23230),r=0|N(g),(0|(r=0|n[(r?21664:21456)+(28*c|0)+(o<<2)>>2]))<0&&D(23313,23090,454,23230),r){o=0,u=0|n[(c=t)>>2],c=0|n[c+4>>2];do{u=0|OA(u,c),c=0|m(),n[(_=t)>>2]=u,n[_+4>>2]=c,o=o+1|0}while((0|o)<(0|r));o=g,r=58}else o=g,r=58}else if(0!=(0|f)&0!=(0|l)){if(7==(0|(r=0|FA(A,e)))|7==(0|(u=0|FA(0|n[(u=t)>>2],0|n[u+4>>2])))){o=5;break A}if((0|(u=0|n[21248+(28*r|0)+(u<<2)>>2]))<0){o=5;break A}if(u){r=0,c=0|n[(s=t)>>2],s=0|n[s+4>>2];do{c=0|UA(c,s),s=0|m(),n[(_=t)>>2]=c,n[_+4>>2]=s,r=r+1|0}while((0|r)<(0|u));r=58}else r=59}else r=58}while(0);if(58==(0|r)&&l&&(r=59),59==(0|r)&&1==(0|FA(0|n[(_=t)>>2],0|n[_+4>>2]))){o=9;break}p=0|n[(_=t)>>2],_=-1040385&n[_+4>>2],w=0|Ye(0|o,0,45),_=0|_|m(),n[(o=t)>>2]=p|w,n[o+4>>2]=_,o=0}else o=1}while(0);return I=a,0|(_=o)}function se(A,e,r,t){A|=0,e|=0;var n=0,i=0,f=0;if(0==(0|(r|=0))&0==(0|(t|=0)))return i=1,k(0|(n=0)),0|i;i=A,n=e,A=1,e=0;do{A=0|Le(0|((f=0==(1&r|0)&!0)?1:i),0|(f?0:n),0|A,0|e),e=0|m(),r=0|Ue(0|r,0|t,1),t=0|m(),i=0|Le(0|i,0|n,0|i,0|n),n=0|m()}while(!(0==(0|r)&0==(0|t)));return k(0|e),0|A}function le(A,e,r){A|=0;var t,f=0,a=0,o=0,u=0,c=0,s=0,l=0,d=0,b=0;if(!(0|W(e|=0,r|=0)))return 0|(b=0);if(e=0|$(e),f=+i[r>>3],a=e&(a=+i[r+8>>3])<0?a+6.283185307179586:a,(0|(b=0|n[A>>2]))<=0)return 0|(b=0);if(t=0|n[A+4>>2],e){e=0,d=a,r=-1,A=0;A:for(;;){for(l=A;u=+i[t+(l<<4)>>3],a=+i[t+(l<<4)+8>>3],o=+i[t+((A=(r+2|0)%(0|b)|0)<<4)>>3],c=+i[t+(A<<4)+8>>3],u>o?(s=u,u=c):(s=o,o=u,u=a,a=c),(f=f==o|f==s?f+2220446049250313e-31:f)s;){if((0|(r=l+1|0))>=(0|b)){r=22;break A}A=l,l=r,r=A}if(((s=(c=u<0?u+6.283185307179586:u)+(f-o)/(s-o)*((u=a<0?a+6.283185307179586:a)-c))<0?s+6.283185307179586:s)>(d=c==d|u==d?d+-2220446049250313e-31:d)&&(e^=1),(0|(A=l+1|0))>=(0|b)){r=22;break}r=l}if(22==(0|r))return 0|e}else{e=0,d=a,r=-1,A=0;A:for(;;){for(l=A;u=+i[t+(l<<4)>>3],a=+i[t+(l<<4)+8>>3],o=+i[t+((A=(r+2|0)%(0|b)|0)<<4)>>3],c=+i[t+(A<<4)+8>>3],u>o?(s=u,u=c):(s=o,o=u,u=a,a=c),(f=f==o|f==s?f+2220446049250313e-31:f)s;){if((0|(r=l+1|0))>=(0|b)){r=22;break A}A=l,l=r,r=A}if(u+(f-o)/(s-o)*(a-u)>(d=u==d|a==d?d+-2220446049250313e-31:d)&&(e^=1),(0|(A=l+1|0))>=(0|b)){r=22;break}r=l}if(22==(0|r))return 0|e}return 0}function de(A,e){e|=0;var r,t,f,a,o,c=0,s=0,l=0,d=0,b=0,h=0,g=0,v=0,p=0,w=0,_=0,E=0;if(!(t=0|n[(A|=0)>>2]))return n[e>>2]=0,n[e+4>>2]=0,n[e+8>>2]=0,n[e+12>>2]=0,n[e+16>>2]=0,n[e+20>>2]=0,n[e+24>>2]=0,void(n[e+28>>2]=0);if(i[(f=e+8|0)>>3]=17976931348623157e292,i[(a=e+24|0)>>3]=17976931348623157e292,i[e>>3]=-17976931348623157e292,i[(o=e+16|0)>>3]=-17976931348623157e292,!((0|t)<=0)){for(r=0|n[A+4>>2],v=17976931348623157e292,p=-17976931348623157e292,w=0,A=-1,d=17976931348623157e292,b=17976931348623157e292,g=-17976931348623157e292,s=-17976931348623157e292,_=0;c=+i[r+(_<<4)>>3],h=+i[r+(_<<4)+8>>3],l=+i[r+(((0|(A=A+2|0))==(0|t)?0:A)<<4)+8>>3],c>3]=c,d=c),h>3]=h,b=h),c>g?i[e>>3]=c:c=g,h>s&&(i[o>>3]=h,s=h),v=h>0&hp?h:p,w|=+u(+(h-l))>3.141592653589793,(0|(A=_+1|0))!=(0|t);)E=_,g=c,_=A,A=E;w&&(i[o>>3]=p,i[a>>3]=v)}}function be(A,e){e|=0;var r,t=0,f=0,a=0,o=0,c=0,s=0,l=0,d=0,b=0,h=0,g=0,v=0,p=0,w=0,_=0,E=0,y=0,B=0,k=0,m=0,D=0;if(p=0|n[(A|=0)>>2]){if(i[(w=e+8|0)>>3]=17976931348623157e292,i[(_=e+24|0)>>3]=17976931348623157e292,i[e>>3]=-17976931348623157e292,i[(E=e+16|0)>>3]=-17976931348623157e292,(0|p)>0){for(a=0|n[A+4>>2],g=17976931348623157e292,v=-17976931348623157e292,f=0,t=-1,l=17976931348623157e292,d=17976931348623157e292,h=-17976931348623157e292,c=-17976931348623157e292,y=0;o=+i[a+(y<<4)>>3],b=+i[a+(y<<4)+8>>3],s=+i[a+(((0|(m=t+2|0))==(0|p)?0:m)<<4)+8>>3],o>3]=o,l=o),b>3]=b,d=b),o>h?i[e>>3]=o:o=h,b>c&&(i[E>>3]=b,c=b),g=b>0&bv?b:v,f|=+u(+(b-s))>3.141592653589793,(0|(t=y+1|0))!=(0|p);)m=y,h=o,y=t,t=m;f&&(i[E>>3]=v,i[_>>3]=g)}}else n[e>>2]=0,n[e+4>>2]=0,n[e+8>>2]=0,n[e+12>>2]=0,n[e+16>>2]=0,n[e+20>>2]=0,n[e+24>>2]=0,n[e+28>>2]=0;if(!((0|(t=0|n[(m=A+8|0)>>2]))<=0)){r=A+12|0,k=0;do{if(a=0|n[r>>2],f=k,_=e+((k=k+1|0)<<5)|0,E=0|n[a+(f<<3)>>2]){if(i[(y=e+(k<<5)+8|0)>>3]=17976931348623157e292,i[(A=e+(k<<5)+24|0)>>3]=17976931348623157e292,i[_>>3]=-17976931348623157e292,i[(B=e+(k<<5)+16|0)>>3]=-17976931348623157e292,(0|E)>0){for(p=0|n[a+(f<<3)+4>>2],g=17976931348623157e292,v=-17976931348623157e292,a=0,f=-1,w=0,l=17976931348623157e292,d=17976931348623157e292,b=-17976931348623157e292,c=-17976931348623157e292;o=+i[p+(w<<4)>>3],h=+i[p+(w<<4)+8>>3],s=+i[p+(((0|(f=f+2|0))==(0|E)?0:f)<<4)+8>>3],o>3]=o,l=o),h>3]=h,d=h),o>b?i[_>>3]=o:o=b,h>c&&(i[B>>3]=h,c=h),g=h>0&hv?h:v,a|=+u(+(h-s))>3.141592653589793,(0|(f=w+1|0))!=(0|E);)D=w,w=f,b=o,f=D;a&&(i[B>>3]=v,i[A>>3]=g)}}else n[_>>2]=0,n[_+4>>2]=0,n[_+8>>2]=0,n[_+12>>2]=0,n[_+16>>2]=0,n[_+20>>2]=0,n[_+24>>2]=0,n[_+28>>2]=0,t=0|n[m>>2]}while((0|k)<(0|t))}}function he(A,e,r){var t=0,i=0,f=0;if(!(0|le(A|=0,e|=0,r|=0)))return 0|(i=0);if((0|n[(i=A+8|0)>>2])<=0)return 0|(i=1);for(t=A+12|0,A=0;;){if(f=A,A=A+1|0,0|le((0|n[t>>2])+(f<<3)|0,e+(A<<5)|0,r)){A=0,t=6;break}if((0|A)>=(0|n[i>>2])){A=1,t=6;break}}return 6==(0|t)?0|A:0}function ge(A,e,r,t,n){e|=0,r|=0,t|=0,n|=0;var f,a,o,u,c,s,l,d=0;u=+i[(A|=0)>>3],o=+i[e>>3]-u,a=+i[A+8>>3],f=+i[e+8>>3]-a,s=+i[r>>3],d=((d=+i[t>>3]-s)*(a-(l=+i[r+8>>3]))-(u-s)*(c=+i[t+8>>3]-l))/(o*c-f*d),i[n>>3]=u+o*d,i[n+8>>3]=a+f*d}function ve(A,e){return e|=0,+u(+(+i[(A|=0)>>3]-+i[e>>3]))<1.1920928955078125e-7?0|(e=+u(+(+i[A+8>>3]-+i[e+8>>3]))<1.1920928955078125e-7):0|(e=0)}function pe(A,e){e|=0;var r,t,n;return+((n=+i[(A|=0)>>3]-+i[e>>3])*n+(t=+i[A+8>>3]-+i[e+8>>3])*t+(r=+i[A+16>>3]-+i[e+16>>3])*r)}function we(A,e,r){r|=0;var t,i,f,a,o=0,u=0,c=0;if(a=I,I=I+32|0,c=a,0|(o=0|VA(A|=0,e|=0,i=a+16|0)))return I=a,0|(r=o);t=0|SA(A,e),f=0|FA(A,e),function(A,e){A=7696+(28*(A|=0)|0)|0,n[(e|=0)>>2]=n[A>>2],n[e+4>>2]=n[A+4>>2],n[e+8>>2]=n[A+8>>2],n[e+12>>2]=n[A+12>>2]}(t,c),o=0|function(A,e){A|=0;var r=0,t=0;if((e|=0)>>>0>20)return-1;do{if((0|n[11120+(216*e|0)>>2])!=(0|A))if((0|n[11120+(216*e|0)+8>>2])!=(0|A))if((0|n[11120+(216*e|0)+16>>2])!=(0|A))if((0|n[11120+(216*e|0)+24>>2])!=(0|A))if((0|n[11120+(216*e|0)+32>>2])!=(0|A))if((0|n[11120+(216*e|0)+40>>2])!=(0|A))if((0|n[11120+(216*e|0)+48>>2])!=(0|A))if((0|n[11120+(216*e|0)+56>>2])!=(0|A))if((0|n[11120+(216*e|0)+64>>2])!=(0|A))if((0|n[11120+(216*e|0)+72>>2])!=(0|A))if((0|n[11120+(216*e|0)+80>>2])!=(0|A))if((0|n[11120+(216*e|0)+88>>2])!=(0|A))if((0|n[11120+(216*e|0)+96>>2])!=(0|A))if((0|n[11120+(216*e|0)+104>>2])!=(0|A))if((0|n[11120+(216*e|0)+112>>2])!=(0|A))if((0|n[11120+(216*e|0)+120>>2])!=(0|A))if((0|n[11120+(216*e|0)+128>>2])!=(0|A)){if((0|n[11120+(216*e|0)+136>>2])!=(0|A)){if((0|n[11120+(216*e|0)+144>>2])==(0|A)){A=0,r=2,t=0;break}if((0|n[11120+(216*e|0)+152>>2])==(0|A)){A=0,r=2,t=1;break}if((0|n[11120+(216*e|0)+160>>2])==(0|A)){A=0,r=2,t=2;break}if((0|n[11120+(216*e|0)+168>>2])==(0|A)){A=1,r=2,t=0;break}if((0|n[11120+(216*e|0)+176>>2])==(0|A)){A=1,r=2,t=1;break}if((0|n[11120+(216*e|0)+184>>2])==(0|A)){A=1,r=2,t=2;break}if((0|n[11120+(216*e|0)+192>>2])==(0|A)){A=2,r=2,t=0;break}if((0|n[11120+(216*e|0)+200>>2])==(0|A)){A=2,r=2,t=1;break}if((0|n[11120+(216*e|0)+208>>2])==(0|A)){A=2,r=2,t=2;break}return-1}A=2,r=1,t=2}else A=2,r=1,t=1;else A=2,r=1,t=0;else A=1,r=1,t=2;else A=1,r=1,t=1;else A=1,r=1,t=0;else A=0,r=1,t=2;else A=0,r=1,t=1;else A=0,r=1,t=0;else A=2,r=0,t=2;else A=2,r=0,t=1;else A=2,r=0,t=0;else A=1,r=0,t=2;else A=1,r=0,t=1;else A=1,r=0,t=0;else A=0,r=0,t=2;else A=0,r=0,t=1;else A=0,r=0,t=0}while(0);return 0|n[11120+(216*e|0)+(72*r|0)+(24*A|0)+(t<<3)+4>>2]}(t,0|n[i>>2]);A:do{if(0|U(t)){switch(0|t){case 4:A=0;break;case 14:A=1;break;case 24:A=2;break;case 38:A=3;break;case 49:A=4;break;case 58:A=5;break;case 63:A=6;break;case 72:A=7;break;case 83:A=8;break;case 97:A=9;break;case 107:A=10;break;case 117:A=11;break;default:o=1;break A}if(u=0|n[22e3+(24*A|0)+8>>2],e=0|n[22e3+(24*A|0)+16>>2],(0|(A=0|n[i>>2]))!=(0|n[c>>2])&&(c=0|N(t))|(0|(A=0|n[i>>2]))==(0|e)&&(o=(o+1|0)%6|0),3==(0|f)&(0|A)==(0|e)){o=(o+5|0)%6|0,u=22;break}5==(0|f)&(0|A)==(0|u)?(o=(o+1|0)%6|0,u=22):u=22}else u=22}while(0);return 22==(0|u)&&(n[r>>2]=o,o=0),I=a,0|(r=o)}function _e(A,e,r,t){r|=0,t|=0;var i,f,a,o,u,c=0,s=0,l=0,d=0,b=0,h=0,g=0,v=0,p=0,w=0,_=0;if(u=I,I=I+32|0,_=u+24|0,o=u+20|0,a=u+8|0,f=u+16|0,i=u,b=(b=0==(0|LA(A|=0,e|=0)))?6:5,g=0|Ne(0|A,0|e,52),m(),b>>>0<=r>>>0)return I=u,0|(t=2);!(v=0==(0|(g&=15)))&&0==((p=0|Ye(7,0,3*(15^g)|0))&A|0)&0==((0|m())&e|0)?c=r:s=4;A:do{if(4==(0|s)){if((0|((c=0!=(0|LA(A,e)))?4:5))<(0|r))return I=u,0|(t=1);if(0|we(A,e,_))return I=u,0|(t=1);if(s=(0|n[_>>2])+r|0,7==(0|(p=0|n[(c=c?22288+(((0|s)%5|0)<<2)|0:22320+(((0|s)%6|0)<<2)|0)>>2])))return I=u,0|(t=1);n[o>>2]=0,c=0|L(A,e,p,o,a);do{if(!c){if(h=0|n[(d=a)>>2],s=(l=(d=0|n[d+4>>2])>>>0>>0|(0|d)==(0|e)&h>>>0>>0)?h:A,l=l?d:e,!v&&0==(h&(v=0|Ye(7,0,3*(15^g)|0))|0)&0==(d&(0|m())|0))c=r;else{if(d=(r+-1+b|0)%(0|b)|0,c=0|LA(A,e),(0|d)<0&&D(23313,23315,245,23324),(0|((b=0!=(0|c))?4:5))<(0|d)&&D(23313,23315,245,23324),0|we(A,e,_)&&D(23313,23315,245,23324),c=(0|n[_>>2])+d|0,7==(0|(d=0|n[(c=b?22288+(((0|c)%5|0)<<2)|0:22320+(((0|c)%6|0)<<2)|0)>>2]))&&D(23313,23315,245,23324),n[f>>2]=0,0|(c=0|L(A,e,d,f,i)))break;b=0|n[(h=i)>>2],h=0|n[h+4>>2];do{if(h>>>0>>0|(0|h)==(0|l)&b>>>0>>0){if(s=0|LA(b,h)?0|F(b,h,A,e):0|n[22384+((((0|n[f>>2])+(0|n[22352+(d<<2)>>2])|0)%6|0)<<2)>>2],c=0|LA(b,h),(s+-1|0)>>>0>5){c=-1,s=b,l=h;break}if(1==(0|s)&(c=0!=(0|c))){c=-1,s=b,l=h;break}do{if(!(0|we(b,h,_))){if(c){c=(5+(0|n[21936+(s<<2)>>2])-(0|n[_>>2])|0)%5|0;break}c=(6+(0|n[21968+(s<<2)>>2])-(0|n[_>>2])|0)%6|0;break}c=-1}while(0);s=b,l=h}else c=r}while(0);h=0|n[(d=a)>>2],d=0|n[d+4>>2]}if((0|s)==(0|h)&(0|l)==(0|d)){if(A=(b=0!=(0|LA(h,d)))?0|F(h,d,A,e):0|n[22384+((((0|n[o>>2])+(0|n[22352+(p<<2)>>2])|0)%6|0)<<2)>>2],c=0|LA(h,d),(A+-1|0)>>>0<=5&&!(1==(0|A)&(w=0!=(0|c))))do{if(!(0|we(h,d,_))){if(w){c=(5+(0|n[21936+(A<<2)>>2])-(0|n[_>>2])|0)%5|0;break}c=(6+(0|n[21968+(A<<2)>>2])-(0|n[_>>2])|0)%6|0;break}c=-1}while(0);else c=-1;c=6==(0|(c=c+1|0))|b&5==(0|c)?0:c}e=l,A=s;break A}}while(0);return I=u,0|(t=c)}}while(0);return w=0|Ye(0|c,0,56),_=0|m()|-2130706433&e|536870912,n[t>>2]=w|A,n[t+4>>2]=_,I=u,0|(t=0)}function Ee(A,e,r){A|=0,r|=0;var t=0;(0|(e|=0))>0?(t=0|Pe(e,4),n[A>>2]=t,t||D(23337,23360,40,23374)):n[A>>2]=0,n[A+4>>2]=e,n[A+8>>2]=0,n[A+12>>2]=r}function ye(A){var e,r,t,f=0,a=0,o=0,c=0;e=(A|=0)+4|0,r=A+12|0,t=A+8|0;A:for(;;){for(a=0|n[e>>2],f=0;;){if((0|f)>=(0|a))break A;if(o=0|n[A>>2],c=0|n[o+(f<<2)>>2])break;f=f+1|0}f=o+(~~(+u(+ +s(10,+ +(15-(0|n[r>>2])|0))*(+i[c>>3]+ +i[c+8>>3]))%+(0|a))>>>0<<2)|0,a=0|n[f>>2];e:do{if(0|a){if(o=c+32|0,(0|a)==(0|c))n[f>>2]=n[o>>2];else{if(!(f=0|n[(a=a+32|0)>>2]))break;for(;(0|f)!=(0|c);)if(!(f=0|n[(a=f+32|0)>>2]))break e;n[a>>2]=n[o>>2]}Ce(c),n[t>>2]=(0|n[t>>2])-1}}while(0)}Ce(0|n[A>>2])}function Be(A){var e,r=0,t=0;for(e=0|n[(A|=0)+4>>2],t=0;;){if((0|t)>=(0|e)){r=0,t=4;break}if(r=0|n[(0|n[A>>2])+(t<<2)>>2]){t=4;break}t=t+1|0}return 4==(0|t)?0|r:0}function ke(A,e){e|=0;var r=0,t=0,f=0,a=0;if(r=~~(+u(+ +s(10,+ +(15-(0|n[(A|=0)+12>>2])|0))*(+i[e>>3]+ +i[e+8>>3]))%+(0|n[A+4>>2]))>>>0,r=(0|n[A>>2])+(r<<2)|0,!(t=0|n[r>>2]))return 0|(a=1);a=e+32|0;do{if((0|t)!=(0|e)){if(!(r=0|n[t+32>>2]))return 0|(a=1);for(f=r;;){if((0|f)==(0|e)){f=8;break}if(!(r=0|n[f+32>>2])){r=1,f=10;break}t=f,f=r}if(8==(0|f)){n[t+32>>2]=n[a>>2];break}if(10==(0|f))return 0|r}else n[r>>2]=n[a>>2]}while(0);return Ce(e),n[(a=A+8|0)>>2]=(0|n[a>>2])-1,0|(a=0)}function me(A,e,r){A|=0,e|=0,r|=0;var t,f=0,a=0,o=0;(t=0|Qe(40))||D(23390,23360,98,23403),n[t>>2]=n[e>>2],n[t+4>>2]=n[e+4>>2],n[t+8>>2]=n[e+8>>2],n[t+12>>2]=n[e+12>>2],n[(a=t+16|0)>>2]=n[r>>2],n[a+4>>2]=n[r+4>>2],n[a+8>>2]=n[r+8>>2],n[a+12>>2]=n[r+12>>2],n[t+32>>2]=0,a=~~(+u(+ +s(10,+ +(15-(0|n[A+12>>2])|0))*(+i[e>>3]+ +i[e+8>>3]))%+(0|n[A+4>>2]))>>>0,a=(0|n[A>>2])+(a<<2)|0,f=0|n[a>>2];do{if(f){for(;!(0|qA(f,e)&&0|qA(f+16|0,r));)if(a=0|n[f+32>>2],!(0|n[(f=0==(0|a)?f:a)+32>>2])){o=10;break}if(10==(0|o)){n[f+32>>2]=t;break}return Ce(t),0|(o=f)}n[a>>2]=t}while(0);return n[(o=A+8|0)>>2]=1+(0|n[o>>2]),0|(o=t)}function De(A,e,r){e|=0,r|=0;var t=0,f=0;if(f=~~(+u(+ +s(10,+ +(15-(0|n[(A|=0)+12>>2])|0))*(+i[e>>3]+ +i[e+8>>3]))%+(0|n[A+4>>2]))>>>0,!(f=0|n[(0|n[A>>2])+(f<<2)>>2]))return 0|(r=0);if(!r){for(A=f;;){if(0|qA(A,e)){t=10;break}if(!(A=0|n[A+32>>2])){A=0,t=10;break}}if(10==(0|t))return 0|A}for(A=f;;){if(0|qA(A,e)&&0|qA(A+16|0,r)){t=10;break}if(!(A=0|n[A+32>>2])){A=0,t=10;break}}return 10==(0|t)?0|A:0}function xe(A,e){e|=0;var r=0;if(r=~~(+u(+ +s(10,+ +(15-(0|n[(A|=0)+12>>2])|0))*(+i[e>>3]+ +i[e+8>>3]))%+(0|n[A+4>>2]))>>>0,!(A=0|n[(0|n[A>>2])+(r<<2)>>2]))return 0|(r=0);for(;;){if(0|qA(A,e)){e=5;break}if(!(A=0|n[A+32>>2])){A=0,e=5;break}}return 5==(0|e)?0|A:0}function Me(A){return 0|~~+function(A){return+ +We(+(A=+A))}(A=+A)}function Qe(A){A|=0;var e,r=0,t=0,i=0,f=0,a=0,o=0,u=0,c=0,s=0,l=0,d=0,b=0,h=0,g=0,v=0,p=0,w=0,_=0,E=0,y=0;e=I,I=I+16|0,b=e;do{if(A>>>0<245){if(A=(s=A>>>0<11?16:A+11&-8)>>>3,3&(t=(d=0|n[5857])>>>A)|0)return i=0|n[(t=(A=23468+((r=(1&t^1)+A|0)<<1<<2)|0)+8|0)>>2],(0|(a=0|n[(f=i+8|0)>>2]))==(0|A)?n[5857]=d&~(1<>2]=A,n[t>>2]=a),y=r<<3,n[i+4>>2]=3|y,n[(y=i+y+4|0)>>2]=1|n[y>>2],I=e,0|(y=f);if(s>>>0>(l=0|n[5859])>>>0){if(0|t)return r=((r=t<>>=u=r>>>12&16)>>>5&8)|u|(a=(r>>>=t)>>>2&4)|(A=(r>>>=a)>>>1&2)|(i=(r>>>=A)>>>1&1))+(r>>>i)|0)<<1<<2)|0)+8|0)>>2],(0|(t=0|n[(u=a+8|0)>>2]))==(0|r)?(A=d&~(1<>2]=r,n[A>>2]=t,A=d),o=(y=i<<3)-s|0,n[a+4>>2]=3|s,n[(f=a+s|0)+4>>2]=1|o,n[a+y>>2]=o,0|l&&(i=0|n[5862],t=23468+((r=l>>>3)<<1<<2)|0,A&(r=1<>2]:(n[5857]=A|r,r=t,A=t+8|0),n[A>>2]=i,n[r+12>>2]=i,n[i+8>>2]=r,n[i+12>>2]=t),n[5859]=o,n[5862]=f,I=e,0|(y=u);if(a=0|n[5858]){for(t=(a&0-a)-1|0,t=c=0|n[23732+(((i=(t>>>=f=t>>>12&16)>>>5&8)|f|(o=(t>>>=i)>>>2&4)|(u=(t>>>=o)>>>1&2)|(c=(t>>>=u)>>>1&1))+(t>>>c)<<2)>>2],u=c,c=(-8&n[c+4>>2])-s|0;(A=0|n[t+16>>2])||(A=0|n[t+20>>2]);)t=A,u=(f=(o=(-8&n[A+4>>2])-s|0)>>>0>>0)?A:u,c=f?o:c;if((o=u+s|0)>>>0>u>>>0){f=0|n[u+24>>2],r=0|n[u+12>>2];do{if((0|r)==(0|u)){if(!(r=0|n[(A=u+20|0)>>2])&&!(r=0|n[(A=u+16|0)>>2])){t=0;break}for(;;)if(t=0|n[(i=r+20|0)>>2])r=t,A=i;else{if(!(t=0|n[(i=r+16|0)>>2]))break;r=t,A=i}n[A>>2]=0,t=r}else t=0|n[u+8>>2],n[t+12>>2]=r,n[r+8>>2]=t,t=r}while(0);do{if(0|f){if(r=0|n[u+28>>2],(0|u)==(0|n[(A=23732+(r<<2)|0)>>2])){if(n[A>>2]=t,!t){n[5858]=a&~(1<>2])==(0|u)?y:f+20|0)>>2]=t,!t)break;n[t+24>>2]=f,0|(r=0|n[u+16>>2])&&(n[t+16>>2]=r,n[r+24>>2]=t),0|(r=0|n[u+20>>2])&&(n[t+20>>2]=r,n[r+24>>2]=t)}}while(0);return c>>>0<16?(y=c+s|0,n[u+4>>2]=3|y,n[(y=u+y+4|0)>>2]=1|n[y>>2]):(n[u+4>>2]=3|s,n[o+4>>2]=1|c,n[o+c>>2]=c,0|l&&(i=0|n[5862],t=23468+((r=l>>>3)<<1<<2)|0,(r=1<>2]:(n[5857]=r|d,r=t,A=t+8|0),n[A>>2]=i,n[r+12>>2]=i,n[i+8>>2]=r,n[i+12>>2]=t),n[5859]=c,n[5862]=o),I=e,0|(y=u+8|0)}d=s}else d=s}else d=s}else if(A>>>0<=4294967231)if(s=-8&(A=A+11|0),i=0|n[5858]){f=0-s|0,c=(A>>>=8)?s>>>0>16777215?31:s>>>((c=14-((u=((v=A<<(d=(A+1048320|0)>>>16&8))+520192|0)>>>16&4)|d|(c=((v<<=u)+245760|0)>>>16&2))+(v<>>15)|0)+7|0)&1|c<<1:0,t=0|n[23732+(c<<2)>>2];A:do{if(t)for(A=0,u=s<<(31==(0|c)?0:25-(c>>>1)|0),a=0;;){if((o=(-8&n[t+4>>2])-s|0)>>>0>>0){if(!o){A=t,f=0,v=65;break A}A=t,f=o}if(a=0==(0|(v=0|n[t+20>>2]))|(0|v)==(0|(t=0|n[t+16+(u>>>31<<2)>>2]))?a:v,!t){t=a,v=61;break}u<<=1}else t=0,A=0,v=61}while(0);if(61==(0|v)){if(0==(0|t)&0==(0|A)){if(!(A=((A=2<>>=o=d>>>12&16)>>>5&8)|o|(u=(d>>>=a)>>>2&4)|(c=(d>>>=u)>>>1&2)|(t=(d>>>=c)>>>1&1))+(d>>>t)<<2)>>2]}t?v=65:(u=A,o=f)}if(65==(0|v))for(a=t;;){if(f=(t=(d=(-8&n[a+4>>2])-s|0)>>>0>>0)?d:f,A=t?a:A,(t=0|n[a+16>>2])||(t=0|n[a+20>>2]),!t){u=A,o=f;break}a=t}if(0!=(0|u)&&o>>>0<((0|n[5859])-s|0)>>>0&&(l=u+s|0)>>>0>u>>>0){a=0|n[u+24>>2],r=0|n[u+12>>2];do{if((0|r)==(0|u)){if(!(r=0|n[(A=u+20|0)>>2])&&!(r=0|n[(A=u+16|0)>>2])){r=0;break}for(;;)if(t=0|n[(f=r+20|0)>>2])r=t,A=f;else{if(!(t=0|n[(f=r+16|0)>>2]))break;r=t,A=f}n[A>>2]=0}else y=0|n[u+8>>2],n[y+12>>2]=r,n[r+8>>2]=y}while(0);do{if(a){if(A=0|n[u+28>>2],(0|u)==(0|n[(t=23732+(A<<2)|0)>>2])){if(n[t>>2]=r,!r){i&=~(1<>2])==(0|u)?y:a+20|0)>>2]=r,!r)break;n[r+24>>2]=a,0|(A=0|n[u+16>>2])&&(n[r+16>>2]=A,n[A+24>>2]=r),(A=0|n[u+20>>2])&&(n[r+20>>2]=A,n[A+24>>2]=r)}}while(0);A:do{if(o>>>0<16)y=o+s|0,n[u+4>>2]=3|y,n[(y=u+y+4|0)>>2]=1|n[y>>2];else{if(n[u+4>>2]=3|s,n[l+4>>2]=1|o,n[l+o>>2]=o,r=o>>>3,o>>>0<256){t=23468+(r<<1<<2)|0,(A=0|n[5857])&(r=1<>2]:(n[5857]=A|r,r=t,A=t+8|0),n[A>>2]=l,n[r+12>>2]=l,n[l+8>>2]=r,n[l+12>>2]=t;break}if(r=23732+((t=(r=o>>>8)?o>>>0>16777215?31:o>>>((t=14-((_=((y=r<<(E=(r+1048320|0)>>>16&8))+520192|0)>>>16&4)|E|(t=((y<<=_)+245760|0)>>>16&2))+(y<>>15)|0)+7|0)&1|t<<1:0)<<2)|0,n[l+28>>2]=t,n[(A=l+16|0)+4>>2]=0,n[A>>2]=0,!(i&(A=1<>2]=l,n[l+24>>2]=r,n[l+12>>2]=l,n[l+8>>2]=l;break}r=0|n[r>>2];e:do{if((-8&n[r+4>>2]|0)!=(0|o)){for(i=o<<(31==(0|t)?0:25-(t>>>1)|0);A=0|n[(t=r+16+(i>>>31<<2)|0)>>2];){if((-8&n[A+4>>2]|0)==(0|o)){r=A;break e}i<<=1,r=A}n[t>>2]=l,n[l+24>>2]=r,n[l+12>>2]=l,n[l+8>>2]=l;break A}}while(0);y=0|n[(E=r+8|0)>>2],n[y+12>>2]=l,n[E>>2]=l,n[l+8>>2]=y,n[l+12>>2]=r,n[l+24>>2]=0}}while(0);return I=e,0|(y=u+8|0)}d=s}else d=s;else d=-1}while(0);if((t=0|n[5859])>>>0>=d>>>0)return r=t-d|0,A=0|n[5862],r>>>0>15?(y=A+d|0,n[5862]=y,n[5859]=r,n[y+4>>2]=1|r,n[A+t>>2]=r,n[A+4>>2]=3|d):(n[5859]=0,n[5862]=0,n[A+4>>2]=3|t,n[(y=A+t+4|0)>>2]=1|n[y>>2]),I=e,0|(y=A+8|0);if((o=0|n[5860])>>>0>d>>>0)return _=o-d|0,n[5860]=_,E=(y=0|n[5863])+d|0,n[5863]=E,n[E+4>>2]=1|_,n[y+4>>2]=3|d,I=e,0|(y=y+8|0);if(0|n[5975]?A=0|n[5977]:(n[5977]=4096,n[5976]=4096,n[5978]=-1,n[5979]=-1,n[5980]=0,n[5968]=0,n[5975]=-16&b^1431655768,A=4096),u=d+48|0,(s=(a=A+(c=d+47|0)|0)&(f=0-A|0))>>>0<=d>>>0)return I=e,0|(y=0);if(0|(A=0|n[5967])&&(b=(l=0|n[5965])+s|0)>>>0<=l>>>0|b>>>0>A>>>0)return I=e,0|(y=0);A:do{if(4&n[5968])r=0,v=143;else{t=0|n[5863];e:do{if(t){for(i=23876;!((b=0|n[i>>2])>>>0<=t>>>0&&(b+(0|n[i+4>>2])|0)>>>0>t>>>0);){if(!(A=0|n[i+8>>2])){v=128;break e}i=A}if((r=a-o&f)>>>0<2147483647)if((0|(A=0|Ke(0|r)))==((0|n[i>>2])+(0|n[i+4>>2])|0)){if(-1!=(0|A)){o=r,a=A,v=145;break A}}else i=A,v=136;else r=0}else v=128}while(0);do{if(128==(0|v))if(-1!=(0|(t=0|Ke(0)))&&(r=t,g=(r=(0==((g=(h=0|n[5976])+-1|0)&r|0)?0:(g+r&0-h)-r|0)+s|0)+(h=0|n[5965])|0,r>>>0>d>>>0&r>>>0<2147483647)){if(0|(b=0|n[5967])&&g>>>0<=h>>>0|g>>>0>b>>>0){r=0;break}if((0|(A=0|Ke(0|r)))==(0|t)){o=r,a=t,v=145;break A}i=A,v=136}else r=0}while(0);do{if(136==(0|v)){if(t=0-r|0,!(u>>>0>r>>>0&r>>>0<2147483647&-1!=(0|i))){if(-1==(0|i)){r=0;break}o=r,a=i,v=145;break A}if((A=c-r+(A=0|n[5977])&0-A)>>>0>=2147483647){o=r,a=i,v=145;break A}if(-1==(0|Ke(0|A))){Ke(0|t),r=0;break}o=A+r|0,a=i,v=145;break A}}while(0);n[5968]=4|n[5968],v=143}}while(0);if(143==(0|v)&&s>>>0<2147483647&&!(-1==(0|(_=0|Ke(0|s)))|1^(w=(p=(g=0|Ke(0))-_|0)>>>0>(d+40|0)>>>0)|_>>>0>>0&-1!=(0|_)&-1!=(0|g)^1)&&(o=w?p:r,a=_,v=145),145==(0|v)){r=(0|n[5965])+o|0,n[5965]=r,r>>>0>(0|n[5966])>>>0&&(n[5966]=r),c=0|n[5863];A:do{if(c){for(r=23876;;){if((0|a)==((A=0|n[r>>2])+(t=0|n[r+4>>2])|0)){v=154;break}if(!(i=0|n[r+8>>2]))break;r=i}if(154==(0|v)&&(E=r+4|0,0==(8&n[r+12>>2]|0))&&a>>>0>c>>>0&A>>>0<=c>>>0){n[E>>2]=t+o,E=c+(_=0==(7&(_=c+8|0)|0)?0:0-_&7)|0,_=(y=(0|n[5860])+o|0)-_|0,n[5863]=E,n[5860]=_,n[E+4>>2]=1|_,n[c+y+4>>2]=40,n[5864]=n[5979];break}for(a>>>0<(0|n[5861])>>>0&&(n[5861]=a),t=a+o|0,r=23876;;){if((0|n[r>>2])==(0|t)){v=162;break}if(!(A=0|n[r+8>>2]))break;r=A}if(162==(0|v)&&0==(8&n[r+12>>2]|0)){n[r>>2]=a,n[(l=r+4|0)>>2]=(0|n[l>>2])+o,s=(l=a+(0==(7&(l=a+8|0)|0)?0:0-l&7)|0)+d|0,u=(r=t+(0==(7&(r=t+8|0)|0)?0:0-r&7)|0)-l-d|0,n[l+4>>2]=3|d;e:do{if((0|c)==(0|r))y=(0|n[5860])+u|0,n[5860]=y,n[5863]=s,n[s+4>>2]=1|y;else{if((0|n[5862])==(0|r)){y=(0|n[5859])+u|0,n[5859]=y,n[5862]=s,n[s+4>>2]=1|y,n[s+y>>2]=y;break}if(1==(3&(A=0|n[r+4>>2])|0)){o=-8&A,i=A>>>3;r:do{if(A>>>0<256){if(A=0|n[r+8>>2],(0|(t=0|n[r+12>>2]))==(0|A)){n[5857]=n[5857]&~(1<>2]=t,n[t+8>>2]=A;break}a=0|n[r+24>>2],A=0|n[r+12>>2];do{if((0|A)==(0|r)){if(A=0|n[(i=(t=r+16|0)+4|0)>>2])t=i;else if(!(A=0|n[t>>2])){A=0;break}for(;;)if(i=0|n[(f=A+20|0)>>2])A=i,t=f;else{if(!(i=0|n[(f=A+16|0)>>2]))break;A=i,t=f}n[t>>2]=0}else y=0|n[r+8>>2],n[y+12>>2]=A,n[A+8>>2]=y}while(0);if(!a)break;i=23732+((t=0|n[r+28>>2])<<2)|0;do{if((0|n[i>>2])==(0|r)){if(n[i>>2]=A,0|A)break;n[5858]=n[5858]&~(1<>2])==(0|r)?y:a+20|0)>>2]=A,!A)break r}while(0);if(n[A+24>>2]=a,0|(i=0|n[(t=r+16|0)>>2])&&(n[A+16>>2]=i,n[i+24>>2]=A),!(t=0|n[t+4>>2]))break;n[A+20>>2]=t,n[t+24>>2]=A}while(0);r=r+o|0,f=o+u|0}else f=u;if(n[(r=r+4|0)>>2]=-2&n[r>>2],n[s+4>>2]=1|f,n[s+f>>2]=f,r=f>>>3,f>>>0<256){t=23468+(r<<1<<2)|0,(A=0|n[5857])&(r=1<>2]:(n[5857]=A|r,r=t,A=t+8|0),n[A>>2]=s,n[r+12>>2]=s,n[s+8>>2]=r,n[s+12>>2]=t;break}r=f>>>8;do{if(r){if(f>>>0>16777215){i=31;break}i=f>>>((i=14-((_=((y=r<<(E=(r+1048320|0)>>>16&8))+520192|0)>>>16&4)|E|(i=((y<<=_)+245760|0)>>>16&2))+(y<>>15)|0)+7|0)&1|i<<1}else i=0}while(0);if(r=23732+(i<<2)|0,n[s+28>>2]=i,n[(A=s+16|0)+4>>2]=0,n[A>>2]=0,!((A=0|n[5858])&(t=1<>2]=s,n[s+24>>2]=r,n[s+12>>2]=s,n[s+8>>2]=s;break}r=0|n[r>>2];r:do{if((-8&n[r+4>>2]|0)!=(0|f)){for(i=f<<(31==(0|i)?0:25-(i>>>1)|0);A=0|n[(t=r+16+(i>>>31<<2)|0)>>2];){if((-8&n[A+4>>2]|0)==(0|f)){r=A;break r}i<<=1,r=A}n[t>>2]=s,n[s+24>>2]=r,n[s+12>>2]=s,n[s+8>>2]=s;break e}}while(0);y=0|n[(E=r+8|0)>>2],n[y+12>>2]=s,n[E>>2]=s,n[s+8>>2]=y,n[s+12>>2]=r,n[s+24>>2]=0}}while(0);return I=e,0|(y=l+8|0)}for(r=23876;!((A=0|n[r>>2])>>>0<=c>>>0&&(y=A+(0|n[r+4>>2])|0)>>>0>c>>>0);)r=0|n[r+8>>2];r=(A=(A=(f=y+-47|0)+(0==(7&(A=f+8|0)|0)?0:0-A&7)|0)>>>0<(f=c+16|0)>>>0?c:A)+8|0,E=a+(_=0==(7&(_=a+8|0)|0)?0:0-_&7)|0,_=(t=o+-40|0)-_|0,n[5863]=E,n[5860]=_,n[E+4>>2]=1|_,n[a+t+4>>2]=40,n[5864]=n[5979],n[(t=A+4|0)>>2]=27,n[r>>2]=n[5969],n[r+4>>2]=n[5970],n[r+8>>2]=n[5971],n[r+12>>2]=n[5972],n[5969]=a,n[5970]=o,n[5972]=0,n[5971]=r,r=A+24|0;do{E=r,n[(r=r+4|0)>>2]=7}while((E+8|0)>>>0>>0);if((0|A)!=(0|c)){if(a=A-c|0,n[t>>2]=-2&n[t>>2],n[c+4>>2]=1|a,n[A>>2]=a,r=a>>>3,a>>>0<256){t=23468+(r<<1<<2)|0,(A=0|n[5857])&(r=1<>2]:(n[5857]=A|r,r=t,A=t+8|0),n[A>>2]=c,n[r+12>>2]=c,n[c+8>>2]=r,n[c+12>>2]=t;break}if(t=23732+((i=(r=a>>>8)?a>>>0>16777215?31:a>>>((i=14-((_=((y=r<<(E=(r+1048320|0)>>>16&8))+520192|0)>>>16&4)|E|(i=((y<<=_)+245760|0)>>>16&2))+(y<>>15)|0)+7|0)&1|i<<1:0)<<2)|0,n[c+28>>2]=i,n[c+20>>2]=0,n[f>>2]=0,!((r=0|n[5858])&(A=1<>2]=c,n[c+24>>2]=t,n[c+12>>2]=c,n[c+8>>2]=c;break}r=0|n[t>>2];e:do{if((-8&n[r+4>>2]|0)!=(0|a)){for(i=a<<(31==(0|i)?0:25-(i>>>1)|0);A=0|n[(t=r+16+(i>>>31<<2)|0)>>2];){if((-8&n[A+4>>2]|0)==(0|a)){r=A;break e}i<<=1,r=A}n[t>>2]=c,n[c+24>>2]=r,n[c+12>>2]=c,n[c+8>>2]=c;break A}}while(0);y=0|n[(E=r+8|0)>>2],n[y+12>>2]=c,n[E>>2]=c,n[c+8>>2]=y,n[c+12>>2]=r,n[c+24>>2]=0}}else 0==(0|(y=0|n[5861]))|a>>>0>>0&&(n[5861]=a),n[5969]=a,n[5970]=o,n[5972]=0,n[5866]=n[5975],n[5865]=-1,n[5870]=23468,n[5869]=23468,n[5872]=23476,n[5871]=23476,n[5874]=23484,n[5873]=23484,n[5876]=23492,n[5875]=23492,n[5878]=23500,n[5877]=23500,n[5880]=23508,n[5879]=23508,n[5882]=23516,n[5881]=23516,n[5884]=23524,n[5883]=23524,n[5886]=23532,n[5885]=23532,n[5888]=23540,n[5887]=23540,n[5890]=23548,n[5889]=23548,n[5892]=23556,n[5891]=23556,n[5894]=23564,n[5893]=23564,n[5896]=23572,n[5895]=23572,n[5898]=23580,n[5897]=23580,n[5900]=23588,n[5899]=23588,n[5902]=23596,n[5901]=23596,n[5904]=23604,n[5903]=23604,n[5906]=23612,n[5905]=23612,n[5908]=23620,n[5907]=23620,n[5910]=23628,n[5909]=23628,n[5912]=23636,n[5911]=23636,n[5914]=23644,n[5913]=23644,n[5916]=23652,n[5915]=23652,n[5918]=23660,n[5917]=23660,n[5920]=23668,n[5919]=23668,n[5922]=23676,n[5921]=23676,n[5924]=23684,n[5923]=23684,n[5926]=23692,n[5925]=23692,n[5928]=23700,n[5927]=23700,n[5930]=23708,n[5929]=23708,n[5932]=23716,n[5931]=23716,E=a+(_=0==(7&(_=a+8|0)|0)?0:0-_&7)|0,_=(y=o+-40|0)-_|0,n[5863]=E,n[5860]=_,n[E+4>>2]=1|_,n[a+y+4>>2]=40,n[5864]=n[5979]}while(0);if((r=0|n[5860])>>>0>d>>>0)return _=r-d|0,n[5860]=_,E=(y=0|n[5863])+d|0,n[5863]=E,n[E+4>>2]=1|_,n[y+4>>2]=3|d,I=e,0|(y=y+8|0)}return n[(y=23424)>>2]=12,I=e,0|(y=0)}function Ce(A){var e=0,r=0,t=0,i=0,f=0,a=0,o=0,u=0;if(A|=0){r=A+-8|0,i=0|n[5861],u=r+(e=-8&(A=0|n[A+-4>>2]))|0;do{if(1&A)o=r,a=r;else{if(t=0|n[r>>2],!(3&A))return;if(f=t+e|0,(a=r+(0-t)|0)>>>0>>0)return;if((0|n[5862])==(0|a)){if(3!=(3&(e=0|n[(A=u+4|0)>>2])|0)){o=a,e=f;break}return n[5859]=f,n[A>>2]=-2&e,n[a+4>>2]=1|f,void(n[a+f>>2]=f)}if(r=t>>>3,t>>>0<256){if(A=0|n[a+8>>2],(0|(e=0|n[a+12>>2]))==(0|A)){n[5857]=n[5857]&~(1<>2]=e,n[e+8>>2]=A,o=a,e=f;break}i=0|n[a+24>>2],A=0|n[a+12>>2];do{if((0|A)==(0|a)){if(A=0|n[(r=(e=a+16|0)+4|0)>>2])e=r;else if(!(A=0|n[e>>2])){A=0;break}for(;;)if(r=0|n[(t=A+20|0)>>2])A=r,e=t;else{if(!(r=0|n[(t=A+16|0)>>2]))break;A=r,e=t}n[e>>2]=0}else o=0|n[a+8>>2],n[o+12>>2]=A,n[A+8>>2]=o}while(0);if(i){if(e=0|n[a+28>>2],(0|n[(r=23732+(e<<2)|0)>>2])==(0|a)){if(n[r>>2]=A,!A){n[5858]=n[5858]&~(1<>2])==(0|a)?o:i+20|0)>>2]=A,!A){o=a,e=f;break}n[A+24>>2]=i,0|(r=0|n[(e=a+16|0)>>2])&&(n[A+16>>2]=r,n[r+24>>2]=A),(e=0|n[e+4>>2])?(n[A+20>>2]=e,n[e+24>>2]=A,o=a,e=f):(o=a,e=f)}else o=a,e=f}}while(0);if(!(a>>>0>=u>>>0)&&1&(t=0|n[(A=u+4|0)>>2])){if(2&t)n[A>>2]=-2&t,n[o+4>>2]=1|e,n[a+e>>2]=e,i=e;else{if((0|n[5863])==(0|u)){if(u=(0|n[5860])+e|0,n[5860]=u,n[5863]=o,n[o+4>>2]=1|u,(0|o)!=(0|n[5862]))return;return n[5862]=0,void(n[5859]=0)}if((0|n[5862])==(0|u))return u=(0|n[5859])+e|0,n[5859]=u,n[5862]=a,n[o+4>>2]=1|u,void(n[a+u>>2]=u);i=(-8&t)+e|0,r=t>>>3;do{if(t>>>0<256){if(e=0|n[u+8>>2],(0|(A=0|n[u+12>>2]))==(0|e)){n[5857]=n[5857]&~(1<>2]=A,n[A+8>>2]=e;break}f=0|n[u+24>>2],A=0|n[u+12>>2];do{if((0|A)==(0|u)){if(A=0|n[(r=(e=u+16|0)+4|0)>>2])e=r;else if(!(A=0|n[e>>2])){r=0;break}for(;;)if(r=0|n[(t=A+20|0)>>2])A=r,e=t;else{if(!(r=0|n[(t=A+16|0)>>2]))break;A=r,e=t}n[e>>2]=0,r=A}else r=0|n[u+8>>2],n[r+12>>2]=A,n[A+8>>2]=r,r=A}while(0);if(0|f){if(A=0|n[u+28>>2],(0|n[(e=23732+(A<<2)|0)>>2])==(0|u)){if(n[e>>2]=r,!r){n[5858]=n[5858]&~(1<>2])==(0|u)?t:f+20|0)>>2]=r,!r)break;n[r+24>>2]=f,0|(e=0|n[(A=u+16|0)>>2])&&(n[r+16>>2]=e,n[e+24>>2]=r),0|(A=0|n[A+4>>2])&&(n[r+20>>2]=A,n[A+24>>2]=r)}}while(0);if(n[o+4>>2]=1|i,n[a+i>>2]=i,(0|o)==(0|n[5862]))return void(n[5859]=i)}if(A=i>>>3,i>>>0<256)return r=23468+(A<<1<<2)|0,(e=0|n[5857])&(A=1<>2]:(n[5857]=e|A,A=r,e=r+8|0),n[e>>2]=o,n[A+12>>2]=o,n[o+8>>2]=A,void(n[o+12>>2]=r);A=23732+((t=(A=i>>>8)?i>>>0>16777215?31:i>>>((t=14-((f=((u=A<<(a=(A+1048320|0)>>>16&8))+520192|0)>>>16&4)|a|(t=((u<<=f)+245760|0)>>>16&2))+(u<>>15)|0)+7|0)&1|t<<1:0)<<2)|0,n[o+28>>2]=t,n[o+20>>2]=0,n[o+16>>2]=0,e=0|n[5858],r=1<>2];e:do{if((-8&n[A+4>>2]|0)!=(0|i)){for(t=i<<(31==(0|t)?0:25-(t>>>1)|0);e=0|n[(r=A+16+(t>>>31<<2)|0)>>2];){if((-8&n[e+4>>2]|0)==(0|i)){A=e;break e}t<<=1,A=e}n[r>>2]=o,n[o+24>>2]=A,n[o+12>>2]=o,n[o+8>>2]=o;break A}}while(0);u=0|n[(a=A+8|0)>>2],n[u+12>>2]=o,n[a>>2]=o,n[o+8>>2]=u,n[o+12>>2]=A,n[o+24>>2]=0}else n[5858]=e|r,n[A>>2]=o,n[o+24>>2]=A,n[o+12>>2]=o,n[o+8>>2]=o}while(0);if(u=(0|n[5865])-1|0,n[5865]=u,!(0|u)){for(A=23884;A=0|n[A>>2];)A=A+8|0;n[5865]=-1}}}}function Pe(A,e){e|=0;var r=0;return(A|=0)?(r=0|_(e,A),(e|A)>>>0>65535&&(r=(0|(r>>>0)/(A>>>0))==(0|e)?r:-1)):r=0,(A=0|Qe(r))&&3&n[A+-4>>2]?($e(0|A,0,0|r),0|A):0|A}function Ie(A,e,r,t){return 0|(k((e|=0)+(t|=0)+((r=(A|=0)+(r|=0)>>>0)>>>0>>0|0)>>>0|0),0|r)}function Se(A,e,r,t){return 0|(k(0|(t=(e|=0)-(t|=0)-((r|=0)>>>0>(A|=0)>>>0|0)>>>0)),A-r>>>0|0)}function Re(A){return 0|((A|=0)?31-(0|B(A^A-1))|0:32)}function Te(A,e,r,t,i){i|=0;var f=0,a=0,o=0,u=0,c=0,s=0,l=0,d=0,b=0,h=0;if(s=A|=0,a=r|=0,o=d=t|=0,!(c=u=e|=0))return f=0!=(0|i),o?f?(n[i>>2]=0|A,n[i+4>>2]=0&e,i=0,0|(k(0|(d=0)),i)):(i=0,0|(k(0|(d=0)),i)):(f&&(n[i>>2]=(s>>>0)%(a>>>0),n[i+4>>2]=0),i=(s>>>0)/(a>>>0)>>>0,0|(k(0|(d=0)),i));f=0==(0|o);do{if(a){if(!f){if((f=(0|B(0|o))-(0|B(0|c))|0)>>>0<=31){a=l=f+1|0,A=s>>>(l>>>0)&(e=f-31>>31)|c<<(o=31-f|0),e&=c>>>(l>>>0),f=0,o=s<>2]=0|A,n[i+4>>2]=u|0&e,i=0,0|(k(0|(d=0)),i)):(i=0,0|(k(0|(d=0)),i))}if((f=a-1|0)&a|0){a=o=33+(0|B(0|a))-(0|B(0|c))|0,A=(l=32-o|0)-1>>31&c>>>((b=o-32|0)>>>0)|(c<>>(o>>>0))&(e=b>>31),e&=c>>>(o>>>0),f=s<<(h=64-o|0)&(u=l>>31),o=(c<>>(b>>>0))&u|s<>31;break}return 0|i&&(n[i>>2]=f&s,n[i+4>>2]=0),1==(0|a)?(h=0|A,0|(k(0|(b=u|0&e)),h)):(b=c>>>((h=0|Re(0|a))>>>0)|0,h=c<<32-h|s>>>(h>>>0)|0,0|(k(0|b),h))}if(f)return 0|i&&(n[i>>2]=(c>>>0)%(a>>>0),n[i+4>>2]=0),h=(c>>>0)/(a>>>0)>>>0,0|(k(0|(b=0)),h);if(!s)return 0|i&&(n[i>>2]=0,n[i+4>>2]=(c>>>0)%(o>>>0)),h=(c>>>0)/(o>>>0)>>>0,0|(k(0|(b=0)),h);if(!((f=o-1|0)&o))return 0|i&&(n[i>>2]=0|A,n[i+4>>2]=f&c|0&e),b=0,h=c>>>((0|Re(0|o))>>>0),0|(k(0|b),h);if((f=(0|B(0|o))-(0|B(0|c))|0)>>>0<=30){a=e=f+1|0,A=c<<(o=31-f|0)|s>>>(e>>>0),e=c>>>(e>>>0),f=0,o=s<>2]=0|A,n[i+4>>2]=u|0&e,h=0,0|(k(0|(b=0)),h)):(h=0,0|(k(0|(b=0)),h))}while(0);if(a){c=0|Ie(0|(l=0|r),0|(s=d|0&t),-1,-1),r=0|m(),u=o,o=0;do{t=u,u=f>>>31|u<<1,f=o|f<<1,Se(0|c,0|r,0|(t=A<<1|t>>>31|0),0|(d=A>>>31|e<<1|0)),o=1&(b=(h=0|m())>>31|((0|h)<0?-1:0)<<1),A=0|Se(0|t,0|d,b&l|0,(((0|h)<0?-1:0)>>31|((0|h)<0?-1:0)<<1)&s|0),e=0|m(),a=a-1|0}while(0!=(0|a));c=u,u=0}else c=o,u=0,o=0;return a=0,0|i&&(n[i>>2]=A,n[i+4>>2]=e),h=-2&(f<<1|0)|o,0|(k(0|(b=(0|f)>>>31|(c|a)<<1|0&(a<<1|f>>>31)|u)),h)}function Ge(A,e,r,t){r|=0;var n,i,f,a,o;return i=(t|=0)>>31|((0|t)<0?-1:0)<<1,n=((0|t)<0?-1:0)>>31|((0|t)<0?-1:0)<<1,f=0|Se((o=(e|=0)>>31|((0|e)<0?-1:0)<<1)^(A|=0)|0,(a=((0|e)<0?-1:0)>>31|((0|e)<0?-1:0)<<1)^e|0,0|o,0|a),A=i^o,e=n^a,0|Se((0|Te(f,0|m(),0|Se(i^r|0,n^t|0,0|i,0|n),0|m(),0))^A|0,(0|m())^e|0,0|A,0|e)}function Le(A,e,r,t){e|=0,t|=0;var n,i;return r=0|function(A,e){var r,t,n,i=0;return A=((r=0|_(i=65535&(e|=0),n=65535&(A|=0)))>>>16)+(0|_(i,t=A>>>16))|0,e=0|_(i=e>>>16,n),0|(k((A>>>16)+(0|_(i,t))+(((65535&A)+e|0)>>>16)|0),A+e<<16|65535&r|0)}(n=A|=0,i=r|=0),A=0|m(),0|(k((0|_(e,i))+(0|_(t,n))+A|0&A|0),0|r)}function Fe(A,e,r,t){r|=0;var i,f,a,o,u,c;return i=I,I=I+16|0,o=0|i,c=(t|=0)>>31|((0|t)<0?-1:0)<<1,u=((0|t)<0?-1:0)>>31|((0|t)<0?-1:0)<<1,Te(A=0|Se((a=(e|=0)>>31|((0|e)<0?-1:0)<<1)^(A|=0)|0,(f=((0|e)<0?-1:0)>>31|((0|e)<0?-1:0)<<1)^e|0,0|a,0|f),e=0|m(),0|Se(c^r|0,u^t|0,0|c,0|u),0|m(),o),t=0|Se(n[o>>2]^a|0,n[o+4>>2]^f|0,0|a,0|f),r=0|m(),I=i,0|(k(0|r),t)}function Oe(A,e,r,t){var i,f;return f=I,I=I+16|0,Te(A|=0,e|=0,r|=0,t|=0,i=0|f),I=f,0|(k(0|n[i+4>>2]),0|n[i>>2])}function Ue(A,e,r){return A|=0,e|=0,(0|(r|=0))<32?(k(e>>r|0),A>>>r|(e&(1<>r-32|0)}function Ne(A,e,r){return A|=0,e|=0,(0|(r|=0))<32?(k(e>>>r|0),A>>>r|(e&(1<>>r-32|0)}function Ye(A,e,r){return A|=0,e|=0,(0|(r|=0))<32?(k(e<>>32-r|0),A<=0?+o(A+.5):+w(A-.5)}function Ve(A,e,r){A|=0,e|=0;var i,f,a=0;if((0|(r|=0))>=8192)return Q(0|A,0|e,0|r),0|A;if(f=0|A,i=A+r|0,(3&A)==(3&e)){for(;3&A;){if(!r)return 0|f;t[A>>0]=0|t[e>>0],A=A+1|0,e=e+1|0,r=r-1|0}for(a=(r=-4&i|0)-64|0;(0|A)<=(0|a);)n[A>>2]=n[e>>2],n[A+4>>2]=n[e+4>>2],n[A+8>>2]=n[e+8>>2],n[A+12>>2]=n[e+12>>2],n[A+16>>2]=n[e+16>>2],n[A+20>>2]=n[e+20>>2],n[A+24>>2]=n[e+24>>2],n[A+28>>2]=n[e+28>>2],n[A+32>>2]=n[e+32>>2],n[A+36>>2]=n[e+36>>2],n[A+40>>2]=n[e+40>>2],n[A+44>>2]=n[e+44>>2],n[A+48>>2]=n[e+48>>2],n[A+52>>2]=n[e+52>>2],n[A+56>>2]=n[e+56>>2],n[A+60>>2]=n[e+60>>2],A=A+64|0,e=e+64|0;for(;(0|A)<(0|r);)n[A>>2]=n[e>>2],A=A+4|0,e=e+4|0}else for(r=i-4|0;(0|A)<(0|r);)t[A>>0]=0|t[e>>0],t[A+1>>0]=0|t[e+1>>0],t[A+2>>0]=0|t[e+2>>0],t[A+3>>0]=0|t[e+3>>0],A=A+4|0,e=e+4|0;for(;(0|A)<(0|i);)t[A>>0]=0|t[e>>0],A=A+1|0,e=e+1|0;return 0|f}function $e(A,e,r){e|=0;var i,f=0,a=0,o=0;if(i=(A|=0)+(r|=0)|0,e&=255,(0|r)>=67){for(;3&A;)t[A>>0]=e,A=A+1|0;for(o=e|e<<8|e<<16|e<<24,a=(f=-4&i|0)-64|0;(0|A)<=(0|a);)n[A>>2]=o,n[A+4>>2]=o,n[A+8>>2]=o,n[A+12>>2]=o,n[A+16>>2]=o,n[A+20>>2]=o,n[A+24>>2]=o,n[A+28>>2]=o,n[A+32>>2]=o,n[A+36>>2]=o,n[A+40>>2]=o,n[A+44>>2]=o,n[A+48>>2]=o,n[A+52>>2]=o,n[A+56>>2]=o,n[A+60>>2]=o,A=A+64|0;for(;(0|A)<(0|f);)n[A>>2]=o,A=A+4|0}for(;(0|A)<(0|i);)t[A>>0]=e,A=A+1|0;return i-r|0}function We(A){return(A=+A)>=0?+o(A+.5):+w(A-.5)}function Ke(A){A|=0;var e,r,t;return t=0|M(),(0|A)>0&(0|(e=(r=0|n[a>>2])+A|0))<(0|r)|(0|e)<0?(P(0|e),x(12),-1):(0|e)>(0|t)&&!(0|C(0|e))?(x(12),-1):(n[a>>2]=e,0|r)}return{___divdi3:Ge,___muldi3:Le,___remdi3:Fe,___uremdi3:Oe,_areNeighborCells:function(A,e,r,t,i){i|=0;var f,a,o,u=0,c=0,s=0,l=0;if(o=I,I=I+64|0,a=o,f=o+56|0,!(!0&134217728==(2013265920&(e|=0)|0)&!0&134217728==(2013265920&(t|=0)|0)))return I=o,0|(i=5);if((0|(A|=0))==(0|(r|=0))&(0|e)==(0|t))return n[i>>2]=0,I=o,0|(i=0);if(c=0|Ne(0|A,0|e,52),m(),c&=15,l=0|Ne(0|r,0|t,52),m(),(0|c)!=(15&l|0))return I=o,0|(i=12);if(u=c+-1|0,c>>>0>1){TA(A,e,u,a),TA(r,t,u,f),s=0|n[(l=a)>>2],l=0|n[l+4>>2];A:do{if((0|s)==(0|n[f>>2])&&(0|l)==(0|n[f+4>>2])){u=0|Ne(0|A,0|e,0|(c=3*(15^c)|0)),m(),u&=7,c=0|Ne(0|r,0|t,0|c),m(),c&=7;do{if(0==(0|u)|0==(0|c))n[i>>2]=1,u=0;else if(7==(0|u))u=5;else{if(1==(0|u)|1==(0|c)&&0|LA(s,l)){u=5;break}if((0|n[15536+(u<<2)>>2])!=(0|c)&&(0|n[15568+(u<<2)>>2])!=(0|c))break A;n[i>>2]=1,u=0}}while(0);return I=o,0|(i=u)}}while(0)}c=(u=a)+56|0;do{n[u>>2]=0,u=u+4|0}while((0|u)<(0|c));return S(A,e,1,a),u=(0|n[(e=a)>>2])==(0|r)&&(0|n[e+4>>2])==(0|t)||(0|n[(e=a+8|0)>>2])==(0|r)&&(0|n[e+4>>2])==(0|t)||(0|n[(e=a+16|0)>>2])==(0|r)&&(0|n[e+4>>2])==(0|t)||(0|n[(e=a+24|0)>>2])==(0|r)&&(0|n[e+4>>2])==(0|t)||(0|n[(e=a+32|0)>>2])==(0|r)&&(0|n[e+4>>2])==(0|t)||(0|n[(e=a+40|0)>>2])==(0|r)&&(0|n[e+4>>2])==(0|t)?1:1&((0|n[(u=a+48|0)>>2])==(0|r)?(0|n[u+4>>2])==(0|t):0),n[i>>2]=u,I=o,0|(i=0)},_bitshift64Ashr:Ue,_bitshift64Lshr:Ne,_bitshift64Shl:Ye,_calloc:Pe,_cellAreaKm2:function(A,e,r){return 0|(A=0|te(A|=0,e|=0,r|=0))||(i[r>>3]=6371.007180918475*+i[r>>3]*6371.007180918475),0|A},_cellAreaM2:function(A,e,r){return 0|(A=0|te(A|=0,e|=0,r|=0))||(i[r>>3]=6371.007180918475*+i[r>>3]*6371.007180918475*1e3*1e3),0|A},_cellAreaRads2:te,_cellToBoundary:WA,_cellToCenterChild:function(A,e,r,t){r|=0,t|=0;var i=0;return i=0|Ne(0|(A|=0),0|(e|=0),52),m(),(0|r)<16&(0|(i&=15))<=(0|r)?((0|i)<(0|r)&&(i=0|Ye(-1,-1,3+(3*(r+-1-i|0)|0)|0),i=0|Ye(0|~i,0|~(0|m()),3*(15-r|0)|0),e=~(0|m())&e,A&=~i),i=0|Ye(0|r,0,52),r=-15728641&e|0|m(),n[t>>2]=A|i,n[t+4>>2]=r,0|(t=0)):0|(t=4)},_cellToChildPos:function(A,e,r,t){r|=0,t|=0;var i,f=0,a=0,o=0,u=0,c=0,s=0,l=0,d=0,b=0,h=0,g=0,v=0,p=0,w=0;if(i=I,I=I+16|0,p=i,w=0|Ne(0|(A|=0),0|(e|=0),52),m(),w&=15,r>>>0>15)return I=i,0|(w=4);if((0|w)<(0|r))return I=i,0|(w=12);if((0|w)!=(0|r))if(a=0|Ye(0|r,0,52),a|=A,u=0|m()|-15728641&e,(0|w)>(0|r)){c=r;do{v=0|Ye(7,0,3*(14-c|0)|0),c=c+1|0,a|=v,u=0|m()|u}while((0|c)<(0|w));v=a}else v=a;else v=A,u=e;g=0|Ne(0|v,0|u,45),m();A:do{if(0|U(127&g)){if(c=0|Ne(0|v,0|u,52),m(),0|(c&=15))for(a=1;;){if(!(0==((g=0|Ye(7,0,3*(15-a|0)|0))&v|0)&0==((0|m())&u|0))){s=33;break A}if(!(a>>>0>>0))break;a=a+1|0}if(n[(g=t)>>2]=0,n[g+4>>2]=0,(0|w)>(0|r)){for(g=-15728641&e,h=w;;){if(b=h,(h=h+-1|0)>>>0>15|(0|w)<(0|h)){s=19;break}if((0|w)!=(0|h))if(a=0|Ye(0|h,0,52),a|=A,c=0|m()|g,(0|w)<(0|b))d=a;else{s=h;do{d=0|Ye(7,0,3*(14-s|0)|0),s=s+1|0,a|=d,c=0|m()|c}while((0|s)<(0|w));d=a}else d=A,c=e;if(l=0|Ne(0|d,0|c,45),m(),0|U(127&l)){l=0|Ne(0|d,0|c,52),m(),l&=15;e:do{if(l)for(s=1;;){if(a=0|Ne(0|d,0|c,3*(15-s|0)|0),m(),0|(a&=7))break e;if(!(s>>>0>>0)){a=0;break}s=s+1|0}else a=0}while(0);a=0==(0|a)&1}else a=0;if(c=0|Ne(0|A,0|e,3*(15-b|0)|0),m(),7==(0|(c&=7))){f=5,s=42;break}if(1==(0|c)&(a=0!=(0|a))){f=5,s=42;break}if(0|(d=c+((0!=(0|c)&a)<<31>>31)|0)&&(s=0|se(7,0,s=w-b|0,((0|s)<0)<<31>>31),l=0|m(),a?(a=0|Ie(0|(a=0|Le(0|s,0|l,5,0)),0|m(),-5,-1),a=0|Ie(0|(a=0|Ge(0|a,0|m(),6,0)),0|m(),1,0),c=0|m()):(a=s,c=l),b=0|Ie(0|a,0|c,0|(b=0|Le(0|s,0|l,0|(b=d+-1|0),((0|b)<0)<<31>>31|0)),0|m()),l=0|Ie(0|b,0|(d=0|m()),0|n[(l=t)>>2],0|n[l+4>>2]),d=0|m(),n[(b=t)>>2]=l,n[b+4>>2]=d),(0|h)<=(0|r)){s=37;break}}if(19==(0|s))D(23313,22674,1099,22710);else{if(37==(0|s)){f=0|n[(o=t)+4>>2],o=0|n[o>>2];break}if(42==(0|s))return I=i,0|f}}else f=0,o=0}else s=33}while(0);A:do{if(33==(0|s)){if(n[(g=t)>>2]=0,n[g+4>>2]=0,(0|w)>(0|r)){for(a=w;;){if(f=0|Ne(0|A,0|e,3*(15-a|0)|0),m(),7==(0|(f&=7))){f=5;break}if(f=0|Le(0|(o=0|se(7,0,o=w-a|0,((0|o)<0)<<31>>31)),0|m(),0|f,0),o=0|m(),o=0|Ie(0|n[(g=t)>>2],0|n[g+4>>2],0|f,0|o),f=0|m(),n[(g=t)>>2]=o,n[g+4>>2]=f,(0|(a=a+-1|0))<=(0|r))break A}return I=i,0|f}f=0,o=0}}while(0);return 0|GA(v,u,w,p)&&D(23313,22674,1063,22725),((0|f)>-1|-1==(0|f)&o>>>0>4294967295)&((0|(p=0|n[(w=p)+4>>2]))>(0|f)|((0|p)==(0|f)?(0|n[w>>2])>>>0>o>>>0:0))?(I=i,0|(w=0)):(D(23313,22674,1139,22710),0)},_cellToChildren:function(A,e,r,t){t|=0;var i,f,a=0,o=0;if(f=I,I=I+16|0,jA(i=f,A|=0,e|=0,r|=0),0==(0|(A=0|n[(e=i)>>2]))&0==(0|(e=0|n[e+4>>2])))return I=f,0;a=0,r=0;do{n[(o=t+(a<<3)|0)>>2]=A,n[o+4>>2]=e,a=0|Ie(0|a,0|r,1,0),r=0|m(),JA(i),A=0|n[(o=i)>>2],e=0|n[o+4>>2]}while(!(0==(0|A)&0==(0|e)));return I=f,0},_cellToChildrenSize:GA,_cellToLatLng:$A,_cellToLocalIj:function(A,e,r,t,n,i){var f,a;return A|=0,e|=0,r|=0,t|=0,i|=0,a=I,I=I+16|0,f=a,(n|=0)?A=15:(A=0|ue(A,e,r,t,f))||(wA(f,i),A=0),I=a,0|A},_cellToParent:TA,_cellToVertex:_e,_cellToVertexes:function(A,e,r){r|=0;var t,i=0,f=0;return f=0==(0|LA(A|=0,e|=0)),t=0==(0|(i=0|_e(A,e,0,r))),f?t?0|(i=0|_e(A,e,1,r+8|0))||0|(i=0|_e(A,e,2,r+16|0))||0|(i=0|_e(A,e,3,r+24|0))||(i=0|_e(A,e,4,r+32|0))?0|(f=i):0|_e(A,e,5,r+40|0):0|(f=i):t?0|(i=0|_e(A,e,1,r+8|0))||0|(i=0|_e(A,e,2,r+16|0))||0|(i=0|_e(A,e,3,r+24|0))||0|(i=0|_e(A,e,4,r+32|0))?0|(f=i):(n[(f=r+40|0)>>2]=0,n[f+4>>2]=0,0|(f=0)):0|(f=i)},_cellsToDirectedEdge:function(A,e,r,t,i){return i|=0,7==(0|(r=0|F(A|=0,e|=0,r|=0,t|=0)))?0|(i=11):(t=0|Ye(0|r,0,56),e=-2130706433&e|0|m()|268435456,n[i>>2]=A|t,n[i+4>>2]=e,0|(i=0))},_cellsToLinkedMultiPolygon:function(A,e,r){r|=0;var t,i,f,a=0;if(f=I,I=I+32|0,t=f,A=0|function(A,e,r){A|=0,r|=0;var t,i,f=0,a=0,o=0,u=0,c=0,s=0;if(i=I,I=I+176|0,t=i,(0|(e|=0))<1)return Ee(r,0,0),I=i,0;for(c=0|Ne(0|n[(c=A)>>2],0|n[c+4>>2],52),m(),Ee(r,(0|e)>6?e:6,15&c),c=0;!(0|(f=0|WA(0|n[(f=A+(c<<3)|0)>>2],0|n[f+4>>2],t)));){if((0|(f=0|n[t>>2]))>0){u=0;do{o=t+8+(u<<4)|0,(a=0|De(r,f=t+8+(((0|(u=u+1|0))%(0|f)|0)<<4)|0,o))?ke(r,a):me(r,o,f),f=0|n[t>>2]}while((0|u)<(0|f))}if((0|(c=c+1|0))>=(0|e)){f=0,s=13;break}}return 13==(0|s)?(I=i,0|f):(ye(r),I=i,0|(s=f))}(A|=0,e|=0,i=f+16|0),0|A)return I=f,0|(r=A);if(n[r>>2]=0,n[r+4>>2]=0,n[r+8>>2]=0,0|(A=0|Be(i)))do{e=0|ne(r);do{ie(e,A),a=A+16|0,n[t>>2]=n[a>>2],n[t+4>>2]=n[a+4>>2],n[t+8>>2]=n[a+8>>2],n[t+12>>2]=n[a+12>>2],ke(i,A),A=0|xe(i,t)}while(0!=(0|A));A=0|Be(i)}while(0!=(0|A));return ye(i),(A=0|ae(r))?(fe(r),I=f,0|(a=A)):(I=f,0|(a=0))},_childPosToCell:function(A,e,r,t,i,f){A|=0,e|=0,f|=0;var a,o=0,u=0,c=0,s=0,l=0,d=0,b=0,h=0,g=0;if(a=I,I=I+16|0,o=a,(i|=0)>>>0>15)return I=a,0|(f=4);if(u=0|Ne(0|(r|=0),0|(t|=0),52),m(),(0|(u&=15))>(0|i))return I=a,0|(f=12);if(0|GA(r,t,i,o)&&D(23313,22674,1063,22725),!(((0|e)>-1|-1==(0|e)&A>>>0>4294967295)&((0|(s=0|n[(l=o)+4>>2]))>(0|e)|((0|s)==(0|e)?(0|n[l>>2])>>>0>A>>>0:0))))return I=a,0|(f=2);l=i-u|0,i=0|Ye(0|i,0,52),c=0|m()|-15728641&t,n[(s=f)>>2]=i|r,n[s+4>>2]=c,s=0|Ne(0|r,0|t,45),m();A:do{if(0|U(127&s)){if(0|u)for(o=1;;){if(!(0==((s=0|Ye(7,0,3*(15-o|0)|0))&r|0)&0==((0|m())&t|0)))break A;if(!(o>>>0>>0))break;o=o+1|0}if((0|l)<1)return I=a,0|(f=0);for(s=15^u,t=-1,c=1,o=1;;){u=0|se(7,0,u=l-c|0,((0|u)<0)<<31>>31),r=0|m();do{if(o){if(o=0|Ge(0|(o=0|Ie(0|(o=0|Le(0|u,0|r,5,0)),0|m(),-5,-1)),0|m(),6,0),(0|e)>(0|(i=0|m()))|(0|e)==(0|i)&A>>>0>o>>>0){e=0|Se(0|(e=0|Ie(0|A,0|e,-1,-1)),0|m(),0|o,0|i),o=0|m(),h=0|n[(d=f)>>2],d=0|n[d+4>>2],b=0|Ye(7,0,0|(g=3*(s+t|0)|0)),d&=~(0|m()),g=0|Ye(0|(i=0|Ie(0|(t=0|Ge(0|e,0|o,0|u,0|r)),0|(A=0|m()),2,0)),0|m(),0|g),d=0|m()|d,n[(i=f)>>2]=g|h&~b,n[i+4>>2]=d,A=0|Se(0|e,0|o,0|(A=0|Le(0|t,0|A,0|u,0|r)),0|m()),o=0,e=0|m();break}b=0|n[(g=f)>>2],g=0|n[g+4>>2],h=0|Ye(7,0,3*(s+t|0)|0),g&=~(0|m()),n[(o=f)>>2]=b&~h,n[o+4>>2]=g,o=1;break}i=0|n[(b=f)>>2],b=0|n[b+4>>2],d=0|Ye(7,0,0|(t=3*(s+t|0)|0)),b&=~(0|m()),t=0|Ye(0|(g=0|Ge(0|A,0|e,0|u,0|r)),0|(o=0|m()),0|t),b=0|m()|b,n[(h=f)>>2]=t|i&~d,n[h+4>>2]=b,A=0|Se(0|A,0|e,0|(o=0|Le(0|g,0|o,0|u,0|r)),0|m()),o=0,e=0|m()}while(0);if(!((0|l)>(0|c))){e=0;break}t=~c,c=c+1|0}return I=a,0|e}}while(0);if((0|l)<1)return I=a,0|(g=0);for(i=15^u,o=1;;){if(h=0|se(7,0,h=l-o|0,((0|h)<0)<<31>>31),g=0|m(),r=0|n[(c=f)>>2],c=0|n[c+4>>2],t=0|Ye(7,0,0|(u=3*(i-o|0)|0)),c&=~(0|m()),u=0|Ye(0|(d=0|Ge(0|A,0|e,0|h,0|g)),0|(b=0|m()),0|u),c=0|m()|c,n[(s=f)>>2]=u|r&~t,n[s+4>>2]=c,A=0|Se(0|A,0|e,0|(g=0|Le(0|d,0|b,0|h,0|g)),0|m()),e=0|m(),(0|l)<=(0|o)){e=0;break}o=o+1|0}return I=a,0|e},_compactCells:function(A,e,r,t){e|=0;var i,f=0,a=0,o=0,u=0,c=0,s=0,l=0,d=0,b=0,h=0,g=0,v=0,p=0,w=0,_=0,E=0,y=0,B=0,k=0,x=0;if(0==(0|(r|=0))&0==(0|(t|=0)))return 0|(k=0);if(a=0|n[(f=A|=0)>>2],!0&0==(15728640&(f=0|n[f+4>>2])|0)){if(!((0|t)>0|0==(0|t)&r>>>0>0))return 0|(k=0);if(n[(k=e)>>2]=a,n[k+4>>2]=f,1==(0|r)&0==(0|t))return 0|(k=0);f=1;do{B=0|n[(y=A+(f<<3)|0)+4>>2],n[(k=e+(f<<3)|0)>>2]=n[y>>2],n[k+4>>2]=B,f=f+1|0}while(0<(0|t)|0==(0|t)&f>>>0>>0);return 0|(f=0)}if(!(B=0|Qe(i=r<<3)))return 0|(k=13);if(Ve(0|B,0|A,0|i),!(y=0|Pe(r,8)))return Ce(B),0|(k=13);A:do{if(0|r){e:for(;;){_=0|Ne(0|(w=0|n[(f=B)>>2]),0|(f=0|n[f+4>>2]),52),m(),E=(_&=15)+-1|0,p=(0|r)>0;r:do{if(0!=(0|_)&p){if(h=((0|r)<0)<<31>>31,g=0|Ye(0|E,0,52),v=0|m(),E>>>0>15){if(!(0==(0|w)&0==(0|f))){k=17;break e}for(a=0;;){if((0|(a=a+1|0))>=(0|r))break r;if(!(0==(0|(v=0|n[(t=B+(a<<3)|0)>>2]))&0==(0|(t=0|n[t+4>>2])))){f=t,k=17;break e}}}for(a=0,A=w,t=f;;){if(!(0==(0|A)&0==(0|t))){if(!(!0&0==(117440512&t|0))){k=22;break e}if(u=0|Ne(0|A,0|t,52),m(),(0|(u&=15))<(0|E)){f=12,k=28;break e}if((0|u)!=(0|E)&&(A|=g,t=-15728641&t|v,u>>>0>=_>>>0)){o=E;do{b=0|Ye(7,0,3*(14-o|0)|0),o=o+1|0,A|=b,t=0|m()|t}while(o>>>0>>0)}if(o=0|Oe(0|A,0|t,0|r,0|h),m(),0==(0|(c=0|n[(u=s=y+(o<<3)|0)>>2]))&0==(0|(u=0|n[u+4>>2])))o=s;else for(b=0;;){if((0|b)>(0|r)){k=32;break e}if((0|c)==(0|A)&(-117440513&u|0)==(0|t)){l=0|Ne(0|c,0|u,56),m(),d=(l&=7)+1|0,x=0|Ne(0|c,0|u,45),m();t:do{if(0|U(127&x)){if(c=0|Ne(0|c,0|u,52),m(),!(c&=15)){u=6;break}for(u=1;;){if(!(0==((x=0|Ye(7,0,3*(15-u|0)|0))&A|0)&0==((0|m())&t|0))){u=7;break t}if(!(u>>>0>>0)){u=6;break}u=u+1|0}}else u=7}while(0);if((l+2|0)>>>0>u>>>0){k=42;break e}x=0|Ye(0|d,0,56),t=0|m()|-117440513&t,n[(d=s)>>2]=0,n[d+4>>2]=0,A|=x}else o=(o+1|0)%(0|r)|0;if(0==(0|(c=0|n[(u=s=y+(o<<3)|0)>>2]))&0==(0|(u=0|n[u+4>>2]))){o=s;break}b=b+1|0}n[(x=o)>>2]=A,n[x+4>>2]=t}if((0|(a=a+1|0))>=(0|r))break r;A=0|n[(t=B+(a<<3)|0)>>2],t=0|n[t+4>>2]}}}while(0);if((r+5|0)>>>0<11){k=85;break}if(!(v=0|Pe((0|r)/6|0,8))){k=49;break}r:do{if(p){b=0,d=0;do{if(!(0==(0|(a=0|n[(t=u=y+(b<<3)|0)>>2]))&0==(0|(t=0|n[t+4>>2])))){c=0|Ne(0|a,0|t,56),m(),A=(c&=7)+1|0,s=-117440513&t,x=0|Ne(0|a,0|t,45),m();t:do{if(0|U(127&x)){if(l=0|Ne(0|a,0|t,52),m(),0|(l&=15))for(o=1;;){if(!(0==(a&(x=0|Ye(7,0,3*(15-o|0)|0))|0)&0==(s&(0|m())|0)))break t;if(!(o>>>0>>0))break;o=o+1|0}a|=t=0|Ye(0|A,0,56),t=0|m()|s,n[(A=u)>>2]=a,n[A+4>>2]=t,A=c+2|0}}while(0);7==(0|A)&&(n[(x=v+(d<<3)|0)>>2]=a,n[x+4>>2]=-117440513&t,d=d+1|0)}b=b+1|0}while((0|b)!=(0|r));if(p){if(b=((0|r)<0)<<31>>31,h=0|Ye(0|E,0,52),g=0|m(),E>>>0>15){if(!(0==(0|w)&0==(0|f))){f=4,k=84;break e}for(f=0;;){if((0|(f=f+1|0))>=(0|r)){a=0,f=d;break r}if(!(0==(0|n[(x=B+(f<<3)|0)>>2])&0==(0|n[x+4>>2]))){f=4,k=84;break e}}}for(l=0,a=0,s=w;;){do{if(!(0==(0|s)&0==(0|f))){if(u=0|Ne(0|s,0|f,52),m(),(0|(u&=15))<(0|E)){f=12,k=84;break e}do{if((0|u)==(0|E))t=s,u=f;else{if(t=s|h,A=-15728641&f|g,u>>>0<_>>>0){u=A;break}o=E;do{x=0|Ye(7,0,3*(14-o|0)|0),o=o+1|0,t|=x,A=0|m()|A}while(o>>>0>>0);u=A}}while(0);for(o=0|Oe(0|t,0|u,0|r,0|b),m(),A=0;;){if((0|A)>(0|r)){k=77;break e}if((-117440513&(c=0|n[(x=y+(o<<3)|0)+4>>2])|0)==(0|u)&&(0|n[x>>2])==(0|t)){k=79;break}if((0|n[(x=y+((o=(o+1|0)%(0|r)|0)<<3)|0)>>2])==(0|t)&&(0|n[x+4>>2])==(0|u))break;A=A+1|0}if(79==(0|k)&&(k=0,!0&100663296==(117440512&c|0)))break;n[(x=e+(a<<3)|0)>>2]=s,n[x+4>>2]=f,a=a+1|0}}while(0);if((0|(f=l+1|0))>=(0|r)){f=d;break r}l=f,s=0|n[(x=B+(f<<3)|0)>>2],f=0|n[x+4>>2]}}else a=0,f=d}else a=0,f=0}while(0);if($e(0|y,0,0|i),Ve(0|B,0|v,f<<3|0),Ce(v),!f)break A;e=e+(a<<3)|0,r=f}if(17==(0|k))!0&0==(117440512&f|0)?(f=4,k=28):k=22;else if(32==(0|k))D(23313,22674,362,22684);else{if(42==(0|k))return Ce(B),Ce(y),0|(x=10);if(49==(0|k))return Ce(B),Ce(y),0|(x=13);if(77==(0|k))D(23313,22674,462,22684);else{if(84==(0|k))return Ce(v),Ce(B),Ce(y),0|(x=f);if(85==(0|k)){Ve(0|e,0|B,r<<3|0);break}}}if(22==(0|k))return Ce(B),Ce(y),0|(x=5);if(28==(0|k))return Ce(B),Ce(y),0|(x=f)}}while(0);return Ce(B),Ce(y),0|(x=0)},_destroyLinkedMultiPolygon:fe,_directedEdgeToBoundary:BA,_directedEdgeToCells:function(A,e,r){A|=0;var t,i,f,a=0;return t=I,I=I+16|0,a=t,!0&268435456==(2013265920&(e|=0)|0)?(i=-2130706433&e|134217728,n[(f=r|=0)>>2]=A,n[f+4>>2]=i,n[a>>2]=0,e=0|Ne(0|A,0|e,56),m(),a=0|L(A,i,7&e,a,r+8|0),I=t,0|a):(I=t,0|(a=6))},_edgeLengthKm:function(A,e,r){r|=0;var t,f=0,a=0,o=0,u=0,s=0,b=0,h=0;if(t=I,I=I+176|0,0|(A=0|BA(A|=0,e|=0,u=t)))return u=A,o=+i[r>>3],o*=6371.007180918475,i[r>>3]=o,I=t,0|u;if(i[r>>3]=0,(0|(A=0|n[u>>2]))<=1)return u=0,o=0,o*=6371.007180918475,i[r>>3]=o,I=t,0|u;e=A+-1|0,A=0,f=+i[u+8>>3],a=+i[u+16>>3],o=0;do{b=f,f=+i[u+8+((A=A+1|0)<<4)>>3],h=+d(.5*(f-b)),s=a,a=+i[u+8+(A<<4)+8>>3],s=h*h+(s=+d(.5*(a-s)))*(+l(+b)*+l(+f)*s),o+=2*+p(+ +c(+s),+ +c(+(1-s)))}while((0|A)!=(0|e));return i[r>>3]=o,u=0,h=o,h*=6371.007180918475,i[r>>3]=h,I=t,0|u},_edgeLengthM:function(A,e,r){r|=0;var t,f=0,a=0,o=0,u=0,s=0,b=0,h=0;if(t=I,I=I+176|0,0|(A=0|BA(A|=0,e|=0,u=t)))return u=A,o=+i[r>>3],o*=6371.007180918475,o*=1e3,i[r>>3]=o,I=t,0|u;if(i[r>>3]=0,(0|(A=0|n[u>>2]))<=1)return u=0,o=0,o*=6371.007180918475,o*=1e3,i[r>>3]=o,I=t,0|u;e=A+-1|0,A=0,f=+i[u+8>>3],a=+i[u+16>>3],o=0;do{b=f,f=+i[u+8+((A=A+1|0)<<4)>>3],h=+d(.5*(f-b)),s=a,a=+i[u+8+(A<<4)+8>>3],s=h*h+(s=+d(.5*(a-s)))*(+l(+b)*+l(+f)*s),o+=2*+p(+ +c(+s),+ +c(+(1-s)))}while((0|A)!=(0|e));return i[r>>3]=o,u=0,h=o,h*=6371.007180918475,h*=1e3,i[r>>3]=h,I=t,0|u},_edgeLengthRads:function(A,e,r){r|=0;var t,f=0,a=0,o=0,u=0,s=0,b=0,h=0;if(t=I,I=I+176|0,0|(A=0|BA(A|=0,e|=0,u=t)))return I=t,0|(u=A);if(i[r>>3]=0,(0|(A=0|n[u>>2]))<=1)return I=t,0|(u=0);e=A+-1|0,A=0,f=+i[u+8>>3],a=+i[u+16>>3],o=0;do{b=f,f=+i[u+8+((A=A+1|0)<<4)>>3],h=+d(.5*(f-b)),s=a,a=+i[u+8+(A<<4)+8>>3],s=h*h+(s=+d(.5*(a-s)))*(+l(+f)*+l(+b)*s),o+=2*+p(+ +c(+s),+ +c(+(1-s)))}while((0|A)<(0|e));return i[r>>3]=o,I=t,0|(u=0)},_emscripten_replace_memory:function(A){return t=new Int8Array(A),new Uint8Array(A),n=new Int32Array(A),new Float32Array(A),i=new Float64Array(A),r=A,!0},_free:Ce,_getBaseCellNumber:SA,_getDirectedEdgeDestination:function(A,e,r){A|=0,e|=0,r|=0;var t,i,f=0;return t=I,I=I+16|0,n[(f=t)>>2]=0,!0&268435456==(2013265920&e|0)?(i=0|Ne(0|A,0|e,56),m(),f=0|L(A,-2130706433&e|134217728,7&i,f,r),I=t,0|f):(I=t,0|(f=6))},_getDirectedEdgeOrigin:function(A,e,r){return A|=0,r|=0,!0&268435456==(2013265920&(e|=0)|0)?(n[r>>2]=A,n[r+4>>2]=-2130706433&e|134217728,0|(r=0)):0|(r=6)},_getHexagonAreaAvgKm2:function(A,e){return e|=0,(A|=0)>>>0>15?0|(e=4):(i[e>>3]=+i[20528+(A<<3)>>3],0|(e=0))},_getHexagonAreaAvgM2:function(A,e){return e|=0,(A|=0)>>>0>15?0|(e=4):(i[e>>3]=+i[20656+(A<<3)>>3],0|(e=0))},_getHexagonEdgeLengthAvgKm:function(A,e){return e|=0,(A|=0)>>>0>15?0|(e=4):(i[e>>3]=+i[20784+(A<<3)>>3],0|(e=0))},_getHexagonEdgeLengthAvgM:function(A,e){return e|=0,(A|=0)>>>0>15?0|(e=4):(i[e>>3]=+i[20912+(A<<3)>>3],0|(e=0))},_getIcosahedronFaces:function A(e,r,t){t|=0;var i,f=0,a=0,o=0,u=0,c=0,s=0,l=0,d=0;i=I,I=I+128|0,l=i+112|0,o=i+96|0,d=i,a=0|Ne(0|(e|=0),0|(r|=0),52),m(),c=15&a,n[l>>2]=c,u=0|Ne(0|e,0|r,45),m(),u&=127;A:do{if(0|U(u)){if(0|c)for(f=1;;){if(!(0==((s=0|Ye(7,0,3*(15-f|0)|0))&e|0)&0==((0|m())&r|0))){a=0;break A}if(!(f>>>0>>0))break;f=f+1|0}if(!(1&a))return s=0|Ye(c+1|0,0,52),d=0|m()|-15728641&r,d=0|A((s|e)&~(l=0|Ye(7,0,3*(14-c|0)|0)),d&~(0|m()),t),I=i,0|d;a=1}else a=0}while(0);if(!(f=0|VA(e,r,o))){a?(MA(o,l,d),s=5):(IA(o,l,d),s=6);A:do{if(0|U(u))if(c)for(f=1;;){if(!(0==((u=0|Ye(7,0,3*(15-f|0)|0))&e|0)&0==((0|m())&r|0))){e=2;break A}if(!(f>>>0>>0)){e=5;break}f=f+1|0}else e=5;else e=2}while(0);$e(0|t,-1,e<<2|0);A:do{if(a)for(o=0;;){if(CA(u=d+(o<<4)|0,0|n[l>>2]),u=0|n[u>>2],-1==(0|(c=0|n[t>>2]))|(0|c)==(0|u))f=t;else{a=0;do{if((a=a+1|0)>>>0>=e>>>0){f=1;break A}c=0|n[(f=t+(a<<2)|0)>>2]}while(!(-1==(0|c)|(0|c)==(0|u)))}if(n[f>>2]=u,(o=o+1|0)>>>0>=s>>>0){f=0;break}}else for(o=0;;){if(QA(u=d+(o<<4)|0,0|n[l>>2],0,1),u=0|n[u>>2],-1==(0|(c=0|n[t>>2]))|(0|c)==(0|u))f=t;else{a=0;do{if((a=a+1|0)>>>0>=e>>>0){f=1;break A}c=0|n[(f=t+(a<<2)|0)>>2]}while(!(-1==(0|c)|(0|c)==(0|u)))}if(n[f>>2]=u,(o=o+1|0)>>>0>=s>>>0){f=0;break}}}while(0)}return I=i,0|(d=f)},_getNumCells:ee,_getPentagons:KA,_getRes0Cells:function(A){A|=0;var e=0,r=0,t=0;e=0;do{Ye(0|e,0,45),t=134225919|m(),n[(r=A+(e<<3)|0)>>2]=-1,n[r+4>>2]=t,e=e+1|0}while(122!=(0|e));return 0},_getResolution:function(A,e){return e=0|Ne(0|(A|=0),0|(e|=0),52),m(),15&e|0},_greatCircleDistanceKm:Ae,_greatCircleDistanceM:function(A,e){A|=0;var r,t,n,f=0;return t=+i[(e|=0)>>3],r=+i[A>>3],f=(n=+d(.5*(t-r)))*n+(f=+d(.5*(+i[e+8>>3]-+i[A+8>>3])))*(+l(+t)*+l(+r)*f),2*+p(+ +c(+f),+ +c(+(1-f)))*6371.007180918475*1e3},_greatCircleDistanceRads:function(A,e){A|=0;var r,t,n,f=0;return t=+i[(e|=0)>>3],r=+i[A>>3],f=(n=+d(.5*(t-r)))*n+(f=+d(.5*(+i[e+8>>3]-+i[A+8>>3])))*(+l(+t)*+l(+r)*f),2*+p(+ +c(+f),+ +c(+(1-f)))},_gridDisk:S,_gridDiskDistances:R,_gridDistance:function(A,e,r,t,i){r|=0,t|=0,i|=0;var f,a,o=0,u=0;return a=I,I=I+32|0,u=a,0|(f=0|ue(A|=0,e|=0,A,e,o=a+12|0))?(I=a,0|(u=f)):0|(A=0|ue(A,e,r,t,u))?(I=a,0|(u=A)):(o=0|pA(o,u),n[(u=i)>>2]=o,n[u+4>>2]=((0|o)<0)<<31>>31,I=a,0|(u=0))},_gridPathCells:function(A,e,r,t,i){r|=0,t|=0,i|=0;var f,a=0,o=0,c=0,s=0,l=0,d=0,b=0,h=0,g=0,v=0,p=0,w=0,_=0,E=0,y=0,B=0,k=0,x=0,M=0;if(f=I,I=I+48|0,c=f+12|0,x=f,!(a=0|ue(A|=0,e|=0,A,e,o=f+24|0))&&!(a=0|ue(A,e,r,t,c))){k=((0|(B=0|pA(o,c)))<0)<<31>>31,n[o>>2]=0,n[o+4>>2]=0,n[o+8>>2]=0,n[c>>2]=0,n[c+4>>2]=0,n[c+8>>2]=0,0|ue(A,e,A,e,o)&&D(23313,23090,691,23299),0|ue(A,e,r,t,c)&&D(23313,23090,696,23299),EA(o),EA(c),B?(v=+(0|B),y=o,t=b=0|n[o>>2],a=h=0|n[(_=o+4|0)>>2],r=g=0|n[(E=o+8|0)>>2],p=+((0|n[c>>2])-b|0)/v,w=+((0|n[c+4>>2])-h|0)/v,v=+((0|n[c+8>>2])-g|0)/v):(_=a=o+4|0,E=r=o+8|0,y=o,t=0|n[o>>2],a=0|n[a>>2],r=0|n[r>>2],p=0,w=0,v=0),n[x>>2]=t,n[(g=x+4|0)>>2]=a,n[(h=x+8|0)>>2]=r;A:do{if((0|B)<0)a=0;else for(d=0,b=0,a=t;;){M=p*(l=+(b>>>0)+4294967296*+(0|d))+ +(0|a),s=w*l+ +(0|n[_>>2]),l=v*l+ +(0|n[E>>2]),r=~~+He(+M),o=~~+He(+s),a=~~+He(+l),M=+u(+(+(0|r)-M)),s=+u(+(+(0|o)-s)),l=+u(+(+(0|a)-l));do{if(!(M>s&M>l)){if(c=0-r|0,s>l){t=c-a|0;break}t=o,a=c-o|0;break}r=0-(o+a)|0,t=o}while(0);if(n[x>>2]=r,n[g>>2]=t,n[h>>2]=a,yA(x),0|(a=0|ce(A,e,x,i+(b<<3)|0)))break A;if(!((0|d)<(0|k)|(0|d)==(0|k)&b>>>0>>0)){a=0;break A}a=0|Ie(0|b,0|d,1,0),d=c=0|m(),b=a,a=0|n[y>>2]}}while(0);return I=f,0|(x=a)}return I=f,0|(x=a)},_gridPathCellsSize:function(A,e,r,t,i){r|=0,t|=0,i|=0;var f,a=0,o=0,u=0;return f=I,I=I+32|0,u=f,(a=0|ue(A|=0,e|=0,A,e,o=f+12|0))||(a=0|ue(A,e,r,t,u))?(I=f,0|(u=a)):(t=0|Ie(0|(t=0|pA(o,u)),((0|t)<0)<<31>>31|0,1,0),o=0|m(),n[(u=i)>>2]=t,n[u+4>>2]=o,I=f,0|(u=0))},_gridRingUnsafe:function(A,e,r,t){A|=0,e|=0,r|=0,t|=0;var i,f,a=0,o=0,u=0,c=0,s=0,l=0,d=0,b=0,h=0;if(f=I,I=I+16|0,h=f+8|0,n[(b=i=f)>>2]=A,n[b+4>>2]=e,!r)return n[(h=t)>>2]=A,n[h+4>>2]=e,I=f,0|(h=0);n[h>>2]=0;A:do{if(0|LA(A,e))A=9;else{if(o=(0|r)>0){a=0,b=A;do{if(0|(A=0|L(b,e,4,h,i)))break A;if(a=a+1|0,0|LA(b=0|n[(e=i)>>2],e=0|n[e+4>>2])){A=9;break A}}while((0|a)<(0|r));if(n[(d=t)>>2]=b,n[d+4>>2]=e,d=r+-1|0,o){l=0,A=1;do{if(a=22384+(l<<2)|0,5==(0|l))for(u=0|n[a>>2],o=0,a=A;;){if(0|(A=0|L(0|n[(A=i)>>2],0|n[A+4>>2],u,h,i)))break A;if((0|o)!=(0|d)){if(c=0|n[(s=i)>>2],s=0|n[s+4>>2],n[(A=t+(a<<3)|0)>>2]=c,n[A+4>>2]=s,0|LA(c,s)){A=9;break A}A=a+1|0}else A=a;if((0|(o=o+1|0))>=(0|r))break;a=A}else for(u=i,s=0|n[a>>2],c=0,a=A,o=0|n[u>>2],u=0|n[u+4>>2];;){if(0|(A=0|L(o,u,s,h,i)))break A;if(o=0|n[(u=i)>>2],u=0|n[u+4>>2],n[(A=t+(a<<3)|0)>>2]=o,n[A+4>>2]=u,A=a+1|0,0|LA(o,u)){A=9;break A}if((0|(c=c+1|0))>=(0|r))break;a=A}l=l+1|0}while(l>>>0<6);u=b,a=0|n[(A=i)>>2],o=e,A=0|n[A+4>>2]}else u=b,a=b,o=e,A=e}else n[(u=t)>>2]=A,n[u+4>>2]=e,u=A,a=A,o=e,A=e;A=(0|u)==(0|a)&(0|o)==(0|A)?0:9}}while(0);return I=f,0|(h=A)},_i64Add:Ie,_i64Subtract:Se,_isPentagon:LA,_isResClassIII:function(A,e){return e=0|Ne(0|(A|=0),0|(e|=0),52),m(),1&e|0},_isValidCell:RA,_isValidDirectedEdge:function(A,e){var r=0;switch(r=0|Ne(0|(A|=0),0|(e|=0),56),m(),7&r){case 0:case 7:return 0|(r=0)}return r=-2130706433&e|134217728,!0&268435456==(2013265920&e|0)?!0&16777216==(117440512&e|0)&0!=(0|LA(A,r))?0|(r=0):0|(r=0|RA(A,r)):0|(r=0)},_isValidVertex:function(A,e){A|=0;var r,t,i=0,f=0;return t=I,I=I+16|0,r=t,!0&536870912==(2013265920&(e|=0)|0)&&0|RA(A,i=-2130706433&e|134217728)?(f=0|Ne(0|A,0|e,56),m(),i=(f=0==(0|_e(A,i,7&f,r)))&((0|n[(i=r)>>2])==(0|A)?(0|n[i+4>>2])==(0|e):0)&1,I=t,0|i):(I=t,0|(i=0))},_latLngToCell:ZA,_llvm_maxnum_f64:ze,_llvm_minnum_f64:Ze,_llvm_round_f64:He,_localIjToCell:function(A,e,r,t,n){var i,f;return A|=0,e|=0,r|=0,n|=0,f=I,I=I+16|0,i=f,(t|=0)?r=15:(r=0|_A(r,i))||(r=0|ce(A,e,i,n)),I=f,0|r},_malloc:Qe,_maxFaceCount:function(A,e,r){r|=0;var t=0,i=0;if(i=0|Ne(0|(A|=0),0|(e|=0),45),m(),!(0|U(127&i)))return i=2,n[r>>2]=i,0;if(i=0|Ne(0|A,0|e,52),m(),!(i&=15))return i=5,n[r>>2]=i,0;for(t=1;;){if(!(0==((0|Ye(7,0,3*(15-t|0)|0))&A|0)&0==((0|m())&e|0))){t=2,A=6;break}if(!(t>>>0>>0)){t=5,A=6;break}t=t+1|0}return 6==(0|A)?(n[r>>2]=t,0):0},_maxGridDiskSize:function(A,e){e|=0;var r=0,t=0,i=0;return(0|(A|=0))<0?0|(e=2):(0|A)>13780509?0|(e=0|ee(15,e)):(i=0|Le(0|A,0|(r=((0|A)<0)<<31>>31),3,0),t=0|m(),r=0|Ie(0|A,0|r,1,0),r=0|Ie(0|(r=0|Le(0|i,0|t,0|r,0|m())),0|m(),1,0),A=0|m(),n[e>>2]=r,n[e+4>>2]=A,0|(e=0))},_maxPolygonToCellsSize:function(A,e,r,t){e|=0,t|=0;var i,f=0,a=0,o=0,u=0,c=0;if(i=I,I=I+48|0,f=i+16|0,a=i+8|0,o=i,0|(r|=0))return I=i,0|(o=15);if(u=0|n[(c=A|=0)+4>>2],n[(r=a)>>2]=n[c>>2],n[r+4>>2]=u,de(a,f),!(e=0|K(f,e,o))){if(r=0|n[a>>2],(0|(a=0|n[A+8>>2]))>0){f=0|n[A+12>>2],e=0;do{r=(0|n[f+(e<<3)>>2])+r|0,e=e+1|0}while((0|e)<(0|a))}f=0|n[(e=o)>>2],(0|(e=0|n[e+4>>2]))<(0|(a=((0|r)<0)<<31>>31))|(0|e)==(0|a)&f>>>0>>0?(n[(e=o)>>2]=r,n[e+4>>2]=a,e=a):r=f,u=0|Ie(0|r,0|e,12,0),c=0|m(),n[(e=o)>>2]=u,n[e+4>>2]=c,n[(e=t)>>2]=u,n[e+4>>2]=c,e=0}return I=i,0|(c=e)},_memcpy:Ve,_memset:$e,_originToDirectedEdges:function(A,e,r){r|=0;var t,i=0;return t=0==(0|LA(A|=0,e|=0)),e&=-2130706433,n[(i=r)>>2]=t?A:0,n[i+4>>2]=t?285212672|e:0,n[(i=r+8|0)>>2]=A,n[i+4>>2]=301989888|e,n[(i=r+16|0)>>2]=A,n[i+4>>2]=318767104|e,n[(i=r+24|0)>>2]=A,n[i+4>>2]=335544320|e,n[(i=r+32|0)>>2]=A,n[i+4>>2]=352321536|e,n[(r=r+40|0)>>2]=A,n[r+4>>2]=369098752|e,0},_pentagonCount:function(){return 12},_polygonToCells:function(A,e,r,t){e|=0,t|=0;var i,f,a,o,u=0,c=0,s=0,l=0,d=0,b=0,h=0,g=0,v=0,p=0,w=0,_=0,E=0,y=0,B=0,k=0,D=0,x=0,M=0,Q=0,C=0,P=0,S=0,R=0,L=0,F=0,U=0;if(o=I,I=I+112|0,i=o+80|0,d=o+72|0,f=o,a=o+56|0,0|(r|=0))return I=o,0|(U=15);if(!(U=0|Qe(32+(n[(b=(A|=0)+8|0)>>2]<<5)|0)))return I=o,0|(U=13);if(be(A,U),F=0|n[(L=A)+4>>2],n[(r=d)>>2]=n[L>>2],n[r+4>>2]=F,de(d,i),r=0|K(i,e,f))L=0,F=0;else{if(r=0|n[d>>2],(0|(c=0|n[b>>2]))>0){s=0|n[A+12>>2],u=0;do{r=(0|n[s+(u<<3)>>2])+r|0,u=u+1|0}while((0|u)!=(0|c));u=r}else u=r;c=0|n[(r=f)>>2],(0|(r=0|n[r+4>>2]))<(0|(s=((0|u)<0)<<31>>31))|(0|r)==(0|s)&c>>>0>>0?(n[(r=f)>>2]=u,n[r+4>>2]=s,r=s):u=c,L=0|Ie(0|u,0|r,12,0),F=0|m(),n[(r=f)>>2]=L,n[r+4>>2]=F,r=0}if(0|r)return Ce(U),I=o,0|(U=r);if(!(u=0|Pe(L,8)))return Ce(U),I=o,0|(U=13);if(!(l=0|Pe(L,8)))return Ce(U),Ce(u),I=o,0|(U=13);n[(S=i)>>2]=0,n[S+4>>2]=0,R=0|n[(S=A)+4>>2],n[(r=d)>>2]=n[S>>2],n[r+4>>2]=R,r=0|O(d,L,F,e,i,u,l);A:do{if(r)Ce(u),Ce(l),Ce(U);else{e:do{if((0|n[b>>2])>0){for(s=A+12|0,c=0;r=0|O((0|n[s>>2])+(c<<3)|0,L,F,e,i,u,l),c=c+1|0,!(0|r);)if((0|c)>=(0|n[b>>2]))break e;Ce(u),Ce(l),Ce(U);break A}}while(0);(0|F)>0|0==(0|F)&L>>>0>0&&$e(0|l,0,L<<3|0),S=0|n[(R=i)+4>>2];e:do{if((0|S)>0|0==(0|S)&(0|n[R>>2])>>>0>0){Q=u,C=l,P=u,S=l,R=u,r=u,D=u,x=l,M=l,u=l;r:for(;;){for(E=0,y=0,B=0,k=0,c=0,s=0;;){d=(l=f)+56|0;do{n[l>>2]=0,l=l+4|0}while((0|l)<(0|d));if(0|T(b=0|n[(e=Q+(E<<3)|0)>>2],e=0|n[e+4>>2],1,f,0)){d=(l=f)+56|0;do{n[l>>2]=0,l=l+4|0}while((0|l)<(0|d));0|(l=0|Pe(7,4))&&(G(b,e,1,f,l,7,0,0),Ce(l))}for(_=0;;){p=0|n[(w=f+(_<<3)|0)>>2],w=0|n[w+4>>2];t:do{if(0==(0|p)&0==(0|w))l=c,d=s;else{if(h=0|Oe(0|p,0|w,0|L,0|F),b=0|m(),!(0==(0|(d=0|n[(e=l=t+(h<<3)|0)>>2]))&0==(0|(e=0|n[e+4>>2])))){g=0,v=0;do{if((0|g)>(0|F)|(0|g)==(0|F)&v>>>0>L>>>0)break r;if((0|d)==(0|p)&(0|e)==(0|w)){l=c,d=s;break t}h=0|Fe(0|(l=0|Ie(0|h,0|b,1,0)),0|m(),0|L,0|F),b=0|m(),v=0|Ie(0|v,0|g,1,0),g=0|m(),d=0|n[(e=l=t+(h<<3)|0)>>2],e=0|n[e+4>>2]}while(!(0==(0|d)&0==(0|e)))}0==(0|p)&0==(0|w)?(l=c,d=s):($A(p,w,a),0|he(A,U,a)&&(v=0|Ie(0|c,0|s,1,0),s=0|m(),n[(g=l)>>2]=p,n[g+4>>2]=w,n[(c=C+(c<<3)|0)>>2]=p,n[c+4>>2]=w,c=v),l=c,d=s)}}while(0);if((_=_+1|0)>>>0>=7)break;c=l,s=d}if(E=0|Ie(0|E,0|y,1,0),y=0|m(),B=0|Ie(0|B,0|k,1,0),k=0|m(),c=0|n[(s=i)>>2],!((0|k)<(0|(s=0|n[s+4>>2]))|(0|k)==(0|s)&B>>>0>>0))break;c=l,s=d}if((0|s)>0|0==(0|s)&c>>>0>0){c=0,s=0;do{n[(k=Q+(c<<3)|0)>>2]=0,n[k+4>>2]=0,c=0|Ie(0|c,0|s,1,0),s=0|m(),B=0|n[(k=i)+4>>2]}while((0|s)<(0|B)|((0|s)==(0|B)?c>>>0<(0|n[k>>2])>>>0:0))}if(n[(k=i)>>2]=l,n[k+4>>2]=d,!((0|d)>0|0==(0|d)&l>>>0>0))break e;_=u,E=M,y=R,B=x,k=C,u=D,M=r,x=P,D=_,r=E,R=S,S=y,P=B,C=Q,Q=k}Ce(P),Ce(S),Ce(U),r=1;break A}r=l}while(0);Ce(U),Ce(u),Ce(r),r=0}}while(0);return I=o,0|(U=r)},_readInt64AsDoubleFromPointer:function(A){return+(+((0|n[(A|=0)>>2])>>>0)+4294967296*+(0|n[A+4>>2]))},_res0CellCount:function(){return 122},_round:We,_sbrk:Ke,_sizeOfCellBoundary:function(){return 168},_sizeOfCoordIJ:function(){return 8},_sizeOfGeoLoop:function(){return 8},_sizeOfGeoPolygon:function(){return 16},_sizeOfH3Index:function(){return 8},_sizeOfLatLng:function(){return 16},_sizeOfLinkedGeoPolygon:function(){return 12},_uncompactCells:function(A,e,r,t,i,f,a){A|=0,t|=0,i|=0,f|=0;var o,u=0,c=0,s=0,l=0,d=0,b=0,h=0,g=0;if(o=I,I=I+16|0,g=o,!((0|(r|=0))>0|0==(0|r)&(e|=0)>>>0>0))return I=o,0|(g=0);if((0|(a|=0))>=16)return I=o,0|(g=12);b=0,h=0,d=0,u=0;A:for(;;){if(l=0|Ne(0|(c=0|n[(s=A+(b<<3)|0)>>2]),0|(s=0|n[s+4>>2]),52),m(),(15&l|0)>(0|a)){u=12,c=11;break}if(jA(g,c,s,a),0==(0|(s=0|n[(l=g)>>2]))&0==(0|(l=0|n[l+4>>2])))c=d;else{c=d;do{if(!((0|u)<(0|f)|(0|u)==(0|f)&c>>>0>>0)){c=10;break A}n[(d=t+(c<<3)|0)>>2]=s,n[d+4>>2]=l,c=0|Ie(0|c,0|u,1,0),u=0|m(),JA(g),s=0|n[(d=g)>>2],l=0|n[d+4>>2]}while(!(0==(0|s)&0==(0|l)))}if(b=0|Ie(0|b,0|h,1,0),!((0|(h=0|m()))<(0|r)|(0|h)==(0|r)&b>>>0>>0)){u=0,c=11;break}d=c}return 10==(0|c)?(I=o,0|(g=14)):11==(0|c)?(I=o,0|u):0},_uncompactCellsSize:function(A,e,r,t,i){A|=0,e|=0,r|=0,t|=0,i|=0;var f,a,o=0,u=0,c=0,s=0,l=0,d=0;a=I,I=I+16|0,f=a;A:do{if((0|r)>0|0==(0|r)&e>>>0>0){for(l=0,u=0,o=0,d=0;;){if(!(0==(0|(c=0|n[(s=A+(l<<3)|0)>>2]))&0==(0|(s=0|n[s+4>>2])))&&(s=0==(0|GA(c,s,t,f)),u=0|Ie(0|n[(c=f)>>2],0|n[c+4>>2],0|u,0|o),o=0|m(),!s)){o=12;break}if(l=0|Ie(0|l,0|d,1,0),!((0|(d=0|m()))<(0|r)|(0|d)==(0|r)&l>>>0>>0))break A}return I=a,0|o}u=0,o=0}while(0);return n[i>>2]=u,n[i+4>>2]=o,I=a,0|(i=0)},_vertexToLatLng:function(A,e,r){r|=0;var t,i,f,a,o=0,u=0;return a=I,I=I+192|0,i=a,f=a+168|0,o=0|Ne(0|(A|=0),0|(e|=0),56),m(),o&=7,0|(t=0|VA(A,u=-2130706433&e|134217728,f))?(I=a,0|(u=t)):(e=0|Ne(0|A,0|e,52),m(),e&=15,0|LA(A,u)?xA(f,e,o,1,i):PA(f,e,o,1,i),u=i+8|0,n[r>>2]=n[u>>2],n[r+4>>2]=n[u+4>>2],n[r+8>>2]=n[u+8>>2],n[r+12>>2]=n[u+12>>2],I=a,0|(u=0))},establishStackSpace:function(A,e){I=A|=0},stackAlloc:function(A){var e;return e=I,I=(I=I+(A|=0)|0)+15&-16,0|e},stackRestore:function(A){I=A|=0},stackSave:function(){return 0|I}}}({Math:Math,Int8Array:Int8Array,Int32Array:Int32Array,Uint8Array:Uint8Array,Float32Array:Float32Array,Float64Array:Float64Array},{a:aA,b:function(A){u=A},c:function(){return u},d:function(A,e,r,t){aA("Assertion failed: "+b(A)+", at: "+[e?b(e):"unknown filename",r,t?b(t):"unknown function"])},e:function(A){return r.___errno_location&&(w[r.___errno_location()>>2]=A),A},f:H,g:function(A,e,r){v.set(v.subarray(e,e+r),A)},h:function(A){var e=H(),r=16777216,t=2130706432;if(A>t)return!1;for(var n=Math.max(e,16777216);n>0]=e;break;case"i16":p[A>>1]=e;break;case"i32":w[A>>2]=e;break;case"i64":F=[e>>>0,(L=e,+C(L)>=1?L>0?(0|S(+I(L/4294967296),4294967295))>>>0:~~+P((L-+(~~L>>>0))/4294967296)>>>0:0)],w[A>>2]=F[0],w[A+4>>2]=F[1];break;case"float":_[A>>2]=e;break;case"double":E[A>>3]=e;break;default:aA("invalid type for setValue: "+r)}},r.getValue=function(A,e,r){switch("*"===(e=e||"i8").charAt(e.length-1)&&(e="i32"),e){case"i1":case"i8":return g[A>>0];case"i16":return p[A>>1];case"i32":case"i64":return w[A>>2];case"float":return _[A>>2];case"double":return E[A>>3];default:aA("invalid type for getValue: "+e)}return null},O){N(O)||(K=O,O=r.locateFile?r.locateFile(K,f):f+K),R++,r.monitorRunDependencies&&r.monitorRunDependencies(R);var rA=function(A){A.byteLength&&(A=new Uint8Array(A)),v.set(A,8),r.memoryInitializerRequest&&delete r.memoryInitializerRequest.response,function(A){if(R--,r.monitorRunDependencies&&r.monitorRunDependencies(R),0==R&&(null!==T&&(clearInterval(T),T=null),G)){var e=G;G=null,e()}}()},tA=function(){n(O,rA,(function(){throw"could not load memory initializer "+O}))},nA=W(O);if(nA)rA(nA.buffer);else if(r.memoryInitializerRequest){var iA=function(){var A=r.memoryInitializerRequest,e=A.response;if(200!==A.status&&0!==A.status){var t=W(r.memoryInitializerRequestURL);if(!t)return console.warn("a problem seems to have happened with Module.memoryInitializerRequest, status: "+A.status+", retrying "+O),void tA();e=t.buffer}rA(e)};r.memoryInitializerRequest.response?setTimeout(iA,0):r.memoryInitializerRequest.addEventListener("load",iA)}else tA()}function fA(A){function e(){j||(j=!0,c||(m(x),m(M),r.onRuntimeInitialized&&r.onRuntimeInitialized(),function(){if(r.postRun)for("function"==typeof r.postRun&&(r.postRun=[r.postRun]);r.postRun.length;)A=r.postRun.shift(),Q.unshift(A);var A;m(Q)}()))}A=A||i,R>0||(!function(){if(r.preRun)for("function"==typeof r.preRun&&(r.preRun=[r.preRun]);r.preRun.length;)A=r.preRun.shift(),D.unshift(A);var A;m(D)}(),R>0||(r.setStatus?(r.setStatus("Running..."),setTimeout((function(){setTimeout((function(){r.setStatus("")}),1),e()}),1)):e()))}function aA(A){throw r.onAbort&&r.onAbort(A),a(A+=""),o(A),c=!0,"abort("+A+"). Build with -s ASSERTIONS=1 for more info."}if(G=function A(){j||fA(),j||(G=A)},r.run=fA,r.abort=aA,r.preInit)for("function"==typeof r.preInit&&(r.preInit=[r.preInit]);r.preInit.length>0;)r.preInit.pop()();return fA(),A}("object"===typeof t?t:{}),n="number",i=[["sizeOfH3Index",n],["sizeOfLatLng",n],["sizeOfCellBoundary",n],["sizeOfGeoLoop",n],["sizeOfGeoPolygon",n],["sizeOfLinkedGeoPolygon",n],["sizeOfCoordIJ",n],["readInt64AsDoubleFromPointer",n],["isValidCell",n,[n,n]],["latLngToCell",n,[n,n,n,n]],["cellToLatLng",n,[n,n,n]],["cellToBoundary",n,[n,n,n]],["maxGridDiskSize",n,[n,n]],["gridDisk",n,[n,n,n,n]],["gridDiskDistances",n,[n,n,n,n,n]],["gridRingUnsafe",n,[n,n,n,n]],["maxPolygonToCellsSize",n,[n,n,n,n]],["polygonToCells",n,[n,n,n,n]],["cellsToLinkedMultiPolygon",n,[n,n,n]],["destroyLinkedMultiPolygon",null,[n]],["compactCells",n,[n,n,n,n]],["uncompactCells",n,[n,n,n,n,n,n]],["uncompactCellsSize",n,[n,n,n,n,n]],["isPentagon",n,[n,n]],["isResClassIII",n,[n,n]],["getBaseCellNumber",n,[n,n]],["getResolution",n,[n,n]],["maxFaceCount",n,[n,n,n]],["getIcosahedronFaces",n,[n,n,n]],["cellToParent",n,[n,n,n,n]],["cellToChildren",n,[n,n,n,n]],["cellToCenterChild",n,[n,n,n,n]],["cellToChildrenSize",n,[n,n,n,n]],["cellToChildPos",n,[n,n,n,n]],["childPosToCell",n,[n,n,n,n,n,n]],["areNeighborCells",n,[n,n,n,n,n]],["cellsToDirectedEdge",n,[n,n,n,n,n]],["getDirectedEdgeOrigin",n,[n,n,n]],["getDirectedEdgeDestination",n,[n,n,n]],["isValidDirectedEdge",n,[n,n]],["directedEdgeToCells",n,[n,n,n]],["originToDirectedEdges",n,[n,n,n]],["directedEdgeToBoundary",n,[n,n,n]],["gridDistance",n,[n,n,n,n,n]],["gridPathCells",n,[n,n,n,n,n]],["gridPathCellsSize",n,[n,n,n,n,n]],["cellToLocalIj",n,[n,n,n,n,n,n]],["localIjToCell",n,[n,n,n,n,n]],["getHexagonAreaAvgM2",n,[n,n]],["getHexagonAreaAvgKm2",n,[n,n]],["getHexagonEdgeLengthAvgM",n,[n,n]],["getHexagonEdgeLengthAvgKm",n,[n,n]],["greatCircleDistanceM",n,[n,n]],["greatCircleDistanceKm",n,[n,n]],["greatCircleDistanceRads",n,[n,n]],["cellAreaM2",n,[n,n,n]],["cellAreaKm2",n,[n,n,n]],["cellAreaRads2",n,[n,n,n]],["edgeLengthM",n,[n,n,n]],["edgeLengthKm",n,[n,n,n]],["edgeLengthRads",n,[n,n,n]],["getNumCells",n,[n,n]],["getRes0Cells",n,[n]],["res0CellCount",n],["getPentagons",n,[n,n]],["pentagonCount",n],["cellToVertex",n,[n,n,n,n]],["cellToVertexes",n,[n,n,n]],["vertexToLatLng",n,[n,n,n]],["isValidVertex",n,[n,n]]],f=4,a=5,o={0:"Success",1:"The operation failed but a more specific error is not available",2:"Argument was outside of acceptable range",3:"Latitude or longitude arguments were outside of acceptable range"};o[f]="Resolution argument was outside of acceptable range",o[a]="Cell argument was not valid",o[6]="Directed edge argument was not valid",o[7]="Undirected edge argument was not valid",o[8]="Vertex argument was not valid",o[9]="Pentagon distortion was encountered",o[10]="Duplicate input",o[11]="Cell arguments were not neighbors",o[12]="Cell arguments had incompatible resolutions",o[13]="Memory allocation failed",o[14]="Bounds of provided memory were insufficient",o[15]="Mode or flags argument was not valid";var u=1001,c=1002,s={1e3:"Unknown unit"};s[u]="Array length out of bounds",s[c]="Got unexpected null value for H3 index";var l="Unknown error";function d(A,e,r){var t=r&&"value"in r,n=new Error((A[e]||l)+" (code: "+e+(t?", value: "+r.value:"")+")");return n.code=e,n}function b(A,e){return d(o,A,2===arguments.length?{value:e}:{})}function h(A){if(0!==A)throw b(A)}var g={};i.forEach((function(A){g[A[0]]=t.cwrap.apply(t,A)}));var v=16,p=8,w=(g.sizeOfH3Index(),g.sizeOfLatLng());g.sizeOfCellBoundary(),g.sizeOfGeoPolygon(),g.sizeOfGeoLoop(),g.sizeOfLinkedGeoPolygon(),g.sizeOfCoordIJ();Math.pow(2,32);var _=/[^0-9a-fA-F]/;function E(A){if(Array.isArray(A)&&2===A.length&&Number.isInteger(A[0])&&Number.isInteger(A[1]))return A;if("string"!==typeof A||_.test(A))return[0,0];var e=parseInt(A.substring(0,A.length-8),v);return[parseInt(A.substring(A.length-8),v),e]}Math.pow(2,32);function y(A){return 180*t.getValue(A,"double")/Math.PI}function B(A){return[y(A),y(A+p)]}function k(A){var e=t._malloc(w),r=E(A),n=r[0],i=r[1];try{return h(g.cellToLatLng(n,i,e)),B(e)}finally{t._free(e)}}},69820:(A,e,r)=>{var t=r(57552),n=r(15969);function i(A){this.__wrapped__=A,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}i.prototype=t(n.prototype),i.prototype.constructor=i,A.exports=i},72293:(A,e,r)=>{var t=r(57552),n=r(15969);function i(A,e){this.__wrapped__=A,this.__actions__=[],this.__chain__=!!e,this.__index__=0,this.__values__=void 0}i.prototype=t(n.prototype),i.prototype.constructor=i,A.exports=i},56467:A=>{A.exports=function(A){return A.split("")}},72101:(A,e,r)=>{var t=r(72475),n=r(10519),i=r(17717),f=r(8067),a=r(86113),o=r(16952);A.exports=function(A,e,r,u){var c=-1,s=n,l=!0,d=A.length,b=[],h=e.length;if(!d)return b;r&&(e=f(e,a(r))),u?(s=i,l=!1):e.length>=200&&(s=o,l=!1,e=new t(e));A:for(;++c{var t=r(12641);A.exports=function(A,e){var r=[];return t(A,(function(A,t,n){e(A,t,n)&&r.push(A)})),r}},19708:A=>{A.exports=function(A,e,r){var t;return r(A,(function(A,r,n){if(e(A,r,n))return t=r,!1})),t}},6824:(A,e,r)=>{var t=r(96320),n=r(79501);A.exports=function(A){return n(A)&&"[object RegExp]"==t(A)}},15969:A=>{A.exports=function(){}},5162:(A,e,r)=>{var t=r(12641),n=r(99290);A.exports=function(A,e){var r=-1,i=n(A)?Array(A.length):[];return t(A,(function(A,t,n){i[++r]=e(A,t,n)})),i}},8506:(A,e,r)=>{var t=r(8067),n=r(39578),i=r(25258),f=r(5162),a=r(32572),o=r(86113),u=r(92442),c=r(82675),s=r(78587);A.exports=function(A,e,r){e=e.length?t(e,(function(A){return s(A)?function(e){return n(e,1===A.length?A[0]:A)}:A})):[c];var l=-1;e=t(e,o(i));var d=f(A,(function(A,r,n){return{criteria:t(e,(function(e){return e(A)})),index:++l,value:A}}));return a(d,(function(A,e){return u(A,e,r)}))}},41894:(A,e,r)=>{var t=r(22729),n=r(22819);A.exports=function(A,e){return t(A,e,(function(e,r){return n(A,r)}))}},22729:(A,e,r)=>{var t=r(39578),n=r(11231),i=r(65469);A.exports=function(A,e,r){for(var f=-1,a=e.length,o={};++f{var e=Math.ceil,r=Math.max;A.exports=function(A,t,n,i){for(var f=-1,a=r(e((t-A)/(n||1)),0),o=Array(a);a--;)o[i?a:++f]=A,A+=n;return o}},93850:A=>{var e=Math.floor;A.exports=function(A,r){var t="";if(!A||r<1||r>9007199254740991)return t;do{r%2&&(t+=A),(r=e(r/2))&&(A+=A)}while(r);return t}},11231:(A,e,r)=>{var t=r(51104),n=r(65469),i=r(54940),f=r(75091),a=r(79813);A.exports=function(A,e,r,o){if(!f(A))return A;for(var u=-1,c=(e=n(e,A)).length,s=c-1,l=A;null!=l&&++u{var t=r(82675),n=r(82197),i=n?function(A,e){return n.set(A,e),A}:t;A.exports=i},32572:A=>{A.exports=function(A,e){var r=A.length;for(A.sort(e);r--;)A[r]=A[r].value;return A}},91504:(A,e,r)=>{var t=r(64742),n=/^\s+/;A.exports=function(A){return A?A.slice(0,t(A)+1).replace(n,""):A}},10977:(A,e,r)=>{var t=r(867);A.exports=function(A,e,r){var n=A.length;return r=void 0===r?n:r,!e&&r>=n?A:t(A,e,r)}},75397:(A,e,r)=>{var t=r(84193);A.exports=function(A,e){if(A!==e){var r=void 0!==A,n=null===A,i=A===A,f=t(A),a=void 0!==e,o=null===e,u=e===e,c=t(e);if(!o&&!c&&!f&&A>e||f&&a&&u&&!o&&!c||n&&a&&u||!r&&u||!i)return 1;if(!n&&!f&&!c&&A{var t=r(75397);A.exports=function(A,e,r){for(var n=-1,i=A.criteria,f=e.criteria,a=i.length,o=r.length;++n=o?u:u*("desc"==r[n]?-1:1)}return A.index-e.index}},99013:A=>{var e=Math.max;A.exports=function(A,r,t,n){for(var i=-1,f=A.length,a=t.length,o=-1,u=r.length,c=e(f-a,0),s=Array(u+c),l=!n;++o{var e=Math.max;A.exports=function(A,r,t,n){for(var i=-1,f=A.length,a=-1,o=t.length,u=-1,c=r.length,s=e(f-o,0),l=Array(s+c),d=!n;++i{A.exports=function(A,e){for(var r=A.length,t=0;r--;)A[r]===e&&++t;return t}},81190:(A,e,r)=>{var t=r(59462),n=r(89570);A.exports=function(A,e,r){var i=1&e,f=t(A);return function e(){return(this&&this!==n&&this instanceof e?f:A).apply(i?r:this,arguments)}}},59462:(A,e,r)=>{var t=r(57552),n=r(75091);A.exports=function(A){return function(){var e=arguments;switch(e.length){case 0:return new A;case 1:return new A(e[0]);case 2:return new A(e[0],e[1]);case 3:return new A(e[0],e[1],e[2]);case 4:return new A(e[0],e[1],e[2],e[3]);case 5:return new A(e[0],e[1],e[2],e[3],e[4]);case 6:return new A(e[0],e[1],e[2],e[3],e[4],e[5]);case 7:return new A(e[0],e[1],e[2],e[3],e[4],e[5],e[6])}var r=t(A.prototype),i=A.apply(r,e);return n(i)?i:r}}},33673:(A,e,r)=>{var t=r(51105),n=r(59462),i=r(73447),f=r(55424),a=r(21310),o=r(4280),u=r(89570);A.exports=function(A,e,r){var c=n(A);return function n(){for(var s=arguments.length,l=Array(s),d=s,b=a(n);d--;)l[d]=arguments[d];var h=s<3&&l[0]!==b&&l[s-1]!==b?[]:o(l,b);return(s-=h.length){var t=r(25258),n=r(99290),i=r(65301);A.exports=function(A){return function(e,r,f){var a=Object(e);if(!n(e)){var o=t(r,3);e=i(e),r=function(A){return o(a[A],A,a)}}var u=A(e,r,f);return u>-1?a[o?e[u]:u]:void 0}}},73447:(A,e,r)=>{var t=r(99013),n=r(98462),i=r(3879),f=r(59462),a=r(55424),o=r(21310),u=r(32039),c=r(4280),s=r(89570);A.exports=function A(e,r,l,d,b,h,g,v,p,w){var _=128&r,E=1&r,y=2&r,B=24&r,k=512&r,m=y?void 0:f(e);return function D(){for(var x=arguments.length,M=Array(x),Q=x;Q--;)M[Q]=arguments[Q];if(B)var C=o(D),P=i(M,C);if(d&&(M=t(M,d,b,B)),h&&(M=n(M,h,g,B)),x-=P,B&&x1&&M.reverse(),_&&p{var t=r(93850),n=r(18315),i=r(10977),f=r(86794),a=r(57105),o=r(57820),u=Math.ceil;A.exports=function(A,e){var r=(e=void 0===e?" ":n(e)).length;if(r<2)return r?t(e,A):e;var c=t(e,u(A/a(e)));return f(e)?i(o(c),0,A).join(""):c.slice(0,A)}},84322:(A,e,r)=>{var t=r(51105),n=r(59462),i=r(89570);A.exports=function(A,e,r,f){var a=1&e,o=n(A);return function e(){for(var n=-1,u=arguments.length,c=-1,s=f.length,l=Array(s+u),d=this&&this!==i&&this instanceof e?o:A;++c{var t=r(33723),n=r(787),i=r(41655);A.exports=function(A){return function(e,r,f){return f&&"number"!=typeof f&&n(e,r,f)&&(r=f=void 0),e=i(e),void 0===r?(r=e,e=0):r=i(r),f=void 0===f?e{var t=r(66718),n=r(25958),i=r(66522);A.exports=function(A,e,r,f,a,o,u,c,s,l){var d=8&e;e|=d?32:64,4&(e&=~(d?64:32))||(e&=-4);var b=[A,e,a,d?o:void 0,d?u:void 0,d?void 0:o,d?void 0:u,c,s,l],h=r.apply(void 0,b);return t(A)&&n(h,b),h.placeholder=f,i(h,A,e)}},98585:(A,e,r)=>{var t=r(40492),n=r(81190),i=r(33673),f=r(73447),a=r(84322),o=r(62007),u=r(58349),c=r(25958),s=r(66522),l=r(41873),d=Math.max;A.exports=function(A,e,r,b,h,g,v,p){var w=2&e;if(!w&&"function"!=typeof A)throw new TypeError("Expected a function");var _=b?b.length:0;if(_||(e&=-97,b=h=void 0),v=void 0===v?v:d(l(v),0),p=void 0===p?p:l(p),_-=h?h.length:0,64&e){var E=b,y=h;b=h=void 0}var B=w?void 0:o(A),k=[A,e,r,b,h,E,y,g,v,p];if(B&&u(k,B),A=k[0],e=k[1],r=k[2],b=k[3],h=k[4],!(p=k[9]=void 0===k[9]?w?0:A.length:d(k[9]-_,0))&&24&e&&(e&=-25),e&&1!=e)m=8==e||16==e?i(A,e,p):32!=e&&33!=e||h.length?f.apply(void 0,k):a(A,e,r,b);else var m=n(A,e,r);return s((B?t:c)(m,k),A,e)}},62007:(A,e,r)=>{var t=r(82197),n=r(19087),i=t?function(A){return t.get(A)}:n;A.exports=i},35710:(A,e,r)=>{var t=r(32638),n=Object.prototype.hasOwnProperty;A.exports=function(A){for(var e=A.name+"",r=t[e],i=n.call(t,e)?r.length:0;i--;){var f=r[i],a=f.func;if(null==a||a==A)return f.name}return e}},21310:A=>{A.exports=function(A){return A.placeholder}},50018:A=>{var e=/\{\n\/\* \[wrapped with (.+)\] \*/,r=/,? & /;A.exports=function(A){var t=A.match(e);return t?t[1].split(r):[]}},40206:A=>{var e=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/;A.exports=function(A,r){var t=r.length;if(!t)return A;var n=t-1;return r[n]=(t>1?"& ":"")+r[n],r=r.join(t>2?", ":" "),A.replace(e,"{\n/* [wrapped with "+r+"] */\n")}},66718:(A,e,r)=>{var t=r(69820),n=r(62007),i=r(35710),f=r(3849);A.exports=function(A){var e=i(A),r=f[e];if("function"!=typeof r||!(e in t.prototype))return!1;if(A===r)return!0;var a=n(r);return!!a&&A===a[0]}},58349:(A,e,r)=>{var t=r(99013),n=r(98462),i=r(4280),f="__lodash_placeholder__",a=128,o=Math.min;A.exports=function(A,e){var r=A[1],u=e[1],c=r|u,s=c<131,l=u==a&&8==r||u==a&&256==r&&A[7].length<=e[8]||384==u&&e[7].length<=e[8]&&8==r;if(!s&&!l)return A;1&u&&(A[2]=e[2],c|=1&r?0:4);var d=e[3];if(d){var b=A[3];A[3]=b?t(b,d,e[4]):d,A[4]=b?i(A[3],f):e[4]}return(d=e[5])&&(b=A[5],A[5]=b?n(b,d,e[6]):d,A[6]=b?i(A[5],f):e[6]),(d=e[7])&&(A[7]=d),u&a&&(A[8]=null==A[8]?e[8]:o(A[8],e[8])),null==A[9]&&(A[9]=e[9]),A[0]=e[0],A[1]=c,A}},82197:(A,e,r)=>{var t=r(88036),n=t&&new t;A.exports=n},32638:A=>{A.exports={}},32039:(A,e,r)=>{var t=r(46344),n=r(54940),i=Math.min;A.exports=function(A,e){for(var r=A.length,f=i(e.length,r),a=t(A);f--;){var o=e[f];A[f]=n(o,r)?a[o]:void 0}return A}},4280:A=>{var e="__lodash_placeholder__";A.exports=function(A,r){for(var t=-1,n=A.length,i=0,f=[];++t{var t=r(40492),n=r(92531)(t);A.exports=n},66522:(A,e,r)=>{var t=r(50018),n=r(40206),i=r(26725),f=r(94468);A.exports=function(A,e,r){var a=e+"";return i(A,n(a,f(t(a),r)))}},57820:(A,e,r)=>{var t=r(56467),n=r(86794),i=r(74206);A.exports=function(A){return n(A)?i(A):t(A)}},64742:A=>{var e=/\s/;A.exports=function(A){for(var r=A.length;r--&&e.test(A.charAt(r)););return r}},74206:A=>{var e="\\ud800-\\udfff",r="["+e+"]",t="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",n="\\ud83c[\\udffb-\\udfff]",i="[^"+e+"]",f="(?:\\ud83c[\\udde6-\\uddff]){2}",a="[\\ud800-\\udbff][\\udc00-\\udfff]",o="(?:"+t+"|"+n+")"+"?",u="[\\ufe0e\\ufe0f]?",c=u+o+("(?:\\u200d(?:"+[i,f,a].join("|")+")"+u+o+")*"),s="(?:"+[i+t+"?",t,f,a,r].join("|")+")",l=RegExp(n+"(?="+n+")|"+s+c,"g");A.exports=function(A){return A.match(l)||[]}},94468:(A,e,r)=>{var t=r(27622),n=r(10519),i=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]];A.exports=function(A,e){return t(i,(function(r){var t="_."+r[0];e&r[1]&&!n(A,t)&&A.push(t)})),A.sort()}},42945:(A,e,r)=>{var t=r(69820),n=r(72293),i=r(46344);A.exports=function(A){if(A instanceof t)return A.clone();var e=new n(A.__wrapped__,A.__chain__);return e.__actions__=i(A.__actions__),e.__index__=A.__index__,e.__values__=A.__values__,e}},23903:(A,e,r)=>{var t=r(31456)(r(63679));A.exports=t},63679:(A,e,r)=>{var t=r(35620),n=r(25258),i=r(41873),f=Math.max;A.exports=function(A,e,r){var a=null==A?0:A.length;if(!a)return-1;var o=null==r?0:i(r);return o<0&&(o=f(a+o,0)),t(A,n(e,3),o)}},46881:(A,e,r)=>{var t=r(19708),n=r(66429),i=r(25258);A.exports=function(A,e){return t(A,i(e,3),n)}},88716:(A,e,r)=>{var t=r(591),n=r(14055),i=r(73171),f=r(78587),a=r(99290),o=r(3970),u=r(24385),c=r(78031),s=Object.prototype.hasOwnProperty;A.exports=function(A){if(null==A)return!0;if(a(A)&&(f(A)||"string"==typeof A||"function"==typeof A.splice||o(A)||c(A)||i(A)))return!A.length;var e=n(A);if("[object Map]"==e||"[object Set]"==e)return!A.size;if(u(A))return!t(A).length;for(var r in A)if(s.call(A,r))return!1;return!0}},55349:A=>{A.exports=function(A){return null==A}},85942:(A,e,r)=>{var t=r(6824),n=r(86113),i=r(26426),f=i&&i.isRegExp,a=f?n(f):t;A.exports=a},74933:(A,e,r)=>{var t=r(19267),n=r(63336)((function(A,e,r){t(A,r,e)}));A.exports=n},15288:(A,e,r)=>{var t=r(19267),n=r(66429),i=r(25258);A.exports=function(A,e){var r={};return e=i(e,3),n(A,(function(A,n,i){t(r,n,e(A,n,i))})),r}},82285:A=>{A.exports=function(A){if("function"!=typeof A)throw new TypeError("Expected a function");return function(){var e=arguments;switch(e.length){case 0:return!A.call(this);case 1:return!A.call(this,e[0]);case 2:return!A.call(this,e[0],e[1]);case 3:return!A.call(this,e[0],e[1],e[2])}return!A.apply(this,e)}}},84527:(A,e,r)=>{var t=r(41894),n=r(57170)((function(A,e){return null==A?{}:t(A,e)}));A.exports=n},65066:(A,e,r)=>{var t=r(8067),n=r(25258),i=r(22729),f=r(29758);A.exports=function(A,e){if(null==A)return{};var r=t(f(A),(function(A){return[A]}));return e=n(e),i(A,r,(function(A,r){return e(A,r[0])}))}},18263:(A,e,r)=>{var t=r(36430)();A.exports=t},41655:(A,e,r)=>{var t=r(99540),n=1/0;A.exports=function(A){return A?(A=t(A))===n||A===-1/0?17976931348623157e292*(A<0?-1:1):A===A?A:0:0===A?A:0}},41873:(A,e,r)=>{var t=r(41655);A.exports=function(A){var e=t(A),r=e%1;return e===e?r?e-r:e:0}},99540:(A,e,r)=>{var t=r(91504),n=r(75091),i=r(84193),f=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,o=/^0o[0-7]+$/i,u=parseInt;A.exports=function(A){if("number"==typeof A)return A;if(i(A))return NaN;if(n(A)){var e="function"==typeof A.valueOf?A.valueOf():A;A=n(e)?e+"":e}if("string"!=typeof A)return 0===A?A:+A;A=t(A);var r=a.test(A);return r||o.test(A)?u(A.slice(2),r?2:8):f.test(A)?NaN:+A}},58674:(A,e,r)=>{var t=r(72101),n=r(97477),i=r(51680),f=n((function(A,e){return i(A)?t(A,e):[]}));A.exports=f},3849:(A,e,r)=>{var t=r(69820),n=r(72293),i=r(15969),f=r(78587),a=r(79501),o=r(42945),u=Object.prototype.hasOwnProperty;function c(A){if(a(A)&&!f(A)&&!(A instanceof t)){if(A instanceof n)return A;if(u.call(A,"__wrapped__"))return o(A)}return new n(A)}c.prototype=i.prototype,c.prototype.constructor=c,A.exports=c},26625:function(A){A.exports=function(){"use strict";function A(A,e){if(!(A instanceof e))throw new TypeError("Cannot call a class as a function")}function e(A,e){for(var r=0;re?1:A0))break;if(null===e.right)break;if(r(A,e.right.key)>0&&(o=e.right,e.right=o.left,o.left=e,null===(e=o).right))break;i.right=e,i=e,e=e.right}}return i.right=e.left,f.left=e.right,e.left=n.right,e.right=n.left,e}function f(A,e,r,n){var f=new t(A,e);if(null===r)return f.left=f.right=null,f;var a=n(A,(r=i(A,r,n)).key);return a<0?(f.left=r.left,f.right=r,r.left=null):a>=0&&(f.right=r.right,f.left=r,r.right=null),f}function a(A,e,r){var t=null,n=null;if(e){var f=r((e=i(A,e,r)).key,A);0===f?(t=e.left,n=e.right):f<0?(n=e.right,e.right=null,t=e):(t=e.left,e.left=null,n=e)}return{left:t,right:n}}function o(A,e,r){return null===e?A:(null===A||((e=i(A.key,e,r)).left=A),e)}function u(A,e,r,t,n){if(A){t(e+(r?"\u2514\u2500\u2500 ":"\u251c\u2500\u2500 ")+n(A)+"\n");var i=e+(r?" ":"\u2502 ");A.left&&u(A.left,i,!1,t,n),A.right&&u(A.right,i,!0,t,n)}}var c=function(){function A(A){void 0===A&&(A=n),this._root=null,this._size=0,this._comparator=A}return A.prototype.insert=function(A,e){return this._size++,this._root=f(A,e,this._root,this._comparator)},A.prototype.add=function(A,e){var r=new t(A,e);null===this._root&&(r.left=r.right=null,this._size++,this._root=r);var n=this._comparator,f=i(A,this._root,n),a=n(A,f.key);return 0===a?this._root=f:(a<0?(r.left=f.left,r.right=f,f.left=null):a>0&&(r.right=f.right,r.left=f,f.right=null),this._size++,this._root=r),this._root},A.prototype.remove=function(A){this._root=this._remove(A,this._root,this._comparator)},A.prototype._remove=function(A,e,r){var t;return null===e?null:0===r(A,(e=i(A,e,r)).key)?(null===e.left?t=e.right:(t=i(A,e.left,r)).right=e.right,this._size--,t):e},A.prototype.pop=function(){var A=this._root;if(A){for(;A.left;)A=A.left;return this._root=i(A.key,this._root,this._comparator),this._root=this._remove(A.key,this._root,this._comparator),{key:A.key,data:A.data}}return null},A.prototype.findStatic=function(A){for(var e=this._root,r=this._comparator;e;){var t=r(A,e.key);if(0===t)return e;e=t<0?e.left:e.right}return null},A.prototype.find=function(A){return this._root&&(this._root=i(A,this._root,this._comparator),0!==this._comparator(A,this._root.key))?null:this._root},A.prototype.contains=function(A){for(var e=this._root,r=this._comparator;e;){var t=r(A,e.key);if(0===t)return!0;e=t<0?e.left:e.right}return!1},A.prototype.forEach=function(A,e){for(var r=this._root,t=[],n=!1;!n;)null!==r?(t.push(r),r=r.left):0!==t.length?(r=t.pop(),A.call(e,r),r=r.right):n=!0;return this},A.prototype.range=function(A,e,r,t){for(var n=[],i=this._comparator,f=this._root;0!==n.length||f;)if(f)n.push(f),f=f.left;else{if(i((f=n.pop()).key,e)>0)break;if(i(f.key,A)>=0&&r.call(t,f))return this;f=f.right}return this},A.prototype.keys=function(){var A=[];return this.forEach((function(e){var r=e.key;return A.push(r)})),A},A.prototype.values=function(){var A=[];return this.forEach((function(e){var r=e.data;return A.push(r)})),A},A.prototype.min=function(){return this._root?this.minNode(this._root).key:null},A.prototype.max=function(){return this._root?this.maxNode(this._root).key:null},A.prototype.minNode=function(A){if(void 0===A&&(A=this._root),A)for(;A.left;)A=A.left;return A},A.prototype.maxNode=function(A){if(void 0===A&&(A=this._root),A)for(;A.right;)A=A.right;return A},A.prototype.at=function(A){for(var e=this._root,r=!1,t=0,n=[];!r;)if(e)n.push(e),e=e.left;else if(n.length>0){if(e=n.pop(),t===A)return e;t++,e=e.right}else r=!0;return null},A.prototype.next=function(A){var e=this._root,r=null;if(A.right){for(r=A.right;r.left;)r=r.left;return r}for(var t=this._comparator;e;){var n=t(A.key,e.key);if(0===n)break;n<0?(r=e,e=e.left):e=e.right}return r},A.prototype.prev=function(A){var e=this._root,r=null;if(null!==A.left){for(r=A.left;r.right;)r=r.right;return r}for(var t=this._comparator;e;){var n=t(A.key,e.key);if(0===n)break;n<0?e=e.left:(r=e,e=e.right)}return r},A.prototype.clear=function(){return this._root=null,this._size=0,this},A.prototype.toList=function(){return d(this._root)},A.prototype.load=function(A,e,r){void 0===e&&(e=[]),void 0===r&&(r=!1);var t=A.length,n=this._comparator;if(r&&g(A,e,0,t-1,n),null===this._root)this._root=s(A,e,0,t),this._size=t;else{var i=h(this.toList(),l(A,e),n);t=this._size+t,this._root=b({head:i},0,t)}return this},A.prototype.isEmpty=function(){return null===this._root},Object.defineProperty(A.prototype,"size",{get:function(){return this._size},enumerable:!0,configurable:!0}),Object.defineProperty(A.prototype,"root",{get:function(){return this._root},enumerable:!0,configurable:!0}),A.prototype.toString=function(A){void 0===A&&(A=function(A){return String(A.key)});var e=[];return u(this._root,"",!0,(function(A){return e.push(A)}),A),e.join("")},A.prototype.update=function(A,e,r){var t=this._comparator,n=a(A,this._root,t),i=n.left,u=n.right;t(A,e)<0?u=f(e,r,u,t):i=f(e,r,i,t),this._root=o(i,u,t)},A.prototype.split=function(A){return a(A,this._root,this._comparator)},A}();function s(A,e,r,n){var i=n-r;if(i>0){var f=r+Math.floor(i/2),a=A[f],o=e[f],u=new t(a,o);return u.left=s(A,e,r,f),u.right=s(A,e,f+1,n),u}return null}function l(A,e){for(var r=new t(null,null),n=r,i=0;i0?e=(e=f=f.next=r.pop()).right:n=!0;return f.next=null,i.next}function b(A,e,r){var t=r-e;if(t>0){var n=e+Math.floor(t/2),i=b(A,e,n),f=A.head;return f.left=i,A.head=A.head.next,f.right=b(A,n+1,r),f}return null}function h(A,e,r){for(var n=new t(null,null),i=n,f=A,a=e;null!==f&&null!==a;)r(f.key,a.key)<0?(i.next=f,f=f.next):(i.next=a,a=a.next),i=i.next;return null!==f?i.next=f:null!==a&&(i.next=a),n.next}function g(A,e,r,t,n){if(!(r>=t)){for(var i=A[r+t>>1],f=r-1,a=t+1;;){do{f++}while(n(A[f],i)<0);do{a--}while(n(A[a],i)>0);if(f>=a)break;var o=A[f];A[f]=A[a],A[a]=o,o=e[f],e[f]=e[a],e[a]=o}g(A,e,r,a,n),g(A,e,a+1,t,n)}}var v=function(A,e){return A.ll.x<=e.x&&e.x<=A.ur.x&&A.ll.y<=e.y&&e.y<=A.ur.y},p=function(A,e){if(e.ur.xe.x?1:A.ye.y?1:0}}]),r(e,[{key:"link",value:function(A){if(A.point===this.point)throw new Error("Tried to link already linked events");for(var e=A.point.events,r=0,t=e.length;r=0&&o>=0?fu?-1:0:i<0&&o<0?fu?1:0:oi?1:0}}}]),e}(),T=0,G=function(){function e(r,t,n,i){A(this,e),this.id=++T,this.leftSE=r,r.segment=this,r.otherSE=t,this.rightSE=t,t.segment=this,t.otherSE=r,this.rings=n,this.windings=i}return r(e,null,[{key:"compare",value:function(A,e){var r=A.leftSE.point.x,t=e.leftSE.point.x,n=A.rightSE.point.x,i=e.rightSE.point.x;if(if&&a>o)return-1;var c=A.comparePoint(e.leftSE.point);if(c<0)return 1;if(c>0)return-1;var s=e.comparePoint(A.rightSE.point);return 0!==s?s:-1}if(r>t){if(fa&&f>u)return 1;var l=e.comparePoint(A.leftSE.point);if(0!==l)return l;var d=A.comparePoint(e.rightSE.point);return d<0?1:d>0?-1:1}if(fa)return 1;if(ni){var h=A.comparePoint(e.rightSE.point);if(h<0)return 1;if(h>0)return-1}if(n!==i){var g=o-f,v=n-r,p=u-a,w=i-t;if(g>v&&pw)return-1}return n>i?1:nu?1:A.ide.id?1:0}}]),r(e,[{key:"replaceRightSE",value:function(A){this.rightSE=A,this.rightSE.segment=this,this.rightSE.otherSE=this.leftSE,this.leftSE.otherSE=this.rightSE}},{key:"bbox",value:function(){var A=this.leftSE.point.y,e=this.rightSE.point.y;return{ll:{x:this.leftSE.point.x,y:Ae?A:e}}}},{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(A){return A.x===this.leftSE.point.x&&A.y===this.leftSE.point.y||A.x===this.rightSE.point.x&&A.y===this.rightSE.point.y}},{key:"comparePoint",value:function(A){if(this.isAnEndpoint(A))return 0;var e=this.leftSE.point,r=this.rightSE.point,t=this.vector();if(e.x===r.x)return A.x===e.x?0:A.x0&&a.swapEvents(),R.comparePoints(this.leftSE.point,this.rightSE.point)>0&&this.swapEvents(),t&&(n.checkForConsuming(),i.checkForConsuming()),r}},{key:"swapEvents",value:function(){var A=this.rightSE;this.rightSE=this.leftSE,this.leftSE=A,this.leftSE.isLeft=!0,this.rightSE.isLeft=!1;for(var e=0,r=this.windings.length;e0){var i=r;r=t,t=i}if(r.prev===t){var f=r;r=t,t=f}for(var a=0,o=t.rings.length;a0))throw new Error("Tried to create degenerate segment at [".concat(A.x,", ").concat(A.y,"]"));n=r,i=A,f=-1}return new e(new R(n,!0),new R(i,!1),[t],[f])}}]),e}(),L=function(){function e(r,t,n){if(A(this,e),!Array.isArray(r)||0===r.length)throw new Error("Input geometry is not a valid Polygon or MultiPolygon");if(this.poly=t,this.isExterior=n,this.segments=[],"number"!==typeof r[0][0]||"number"!==typeof r[0][1])throw new Error("Input geometry is not a valid Polygon or MultiPolygon");var i=k.round(r[0][0],r[0][1]);this.bbox={ll:{x:i.x,y:i.y},ur:{x:i.x,y:i.y}};for(var f=i,a=1,o=r.length;athis.bbox.ur.x&&(this.bbox.ur.x=u.x),u.y>this.bbox.ur.y&&(this.bbox.ur.y=u.y),f=u)}i.x===f.x&&i.y===f.y||this.segments.push(G.fromRing(f,i,this))}return r(e,[{key:"getSweepEvents",value:function(){for(var A=[],e=0,r=this.segments.length;ethis.bbox.ur.x&&(this.bbox.ur.x=f.bbox.ur.x),f.bbox.ur.y>this.bbox.ur.y&&(this.bbox.ur.y=f.bbox.ur.y),this.interiorRings.push(f)}this.multiPoly=t}return r(e,[{key:"getSweepEvents",value:function(){for(var A=this.exteriorRing.getSweepEvents(),e=0,r=this.interiorRings.length;ethis.bbox.ur.x&&(this.bbox.ur.x=f.bbox.ur.x),f.bbox.ur.y>this.bbox.ur.y&&(this.bbox.ur.y=f.bbox.ur.y),this.polys.push(f)}this.isSubject=t}return r(e,[{key:"getSweepEvents",value:function(){for(var A=[],e=0,r=this.polys.length;e0&&(A=t)}for(var n=A.segment.prevInResult(),i=n?n.prevInResult():null;;){if(!n)return null;if(!i)return n.ringOut;if(i.ringOut!==n.ringOut)return i.ringOut.enclosingRing()!==n.ringOut?n.ringOut:n.ringOut.enclosingRing();n=i.prevInResult(),i=n?n.prevInResult():null}}}]),e}(),N=function(){function e(r){A(this,e),this.exteriorRing=r,r.poly=this,this.interiorRings=[]}return r(e,[{key:"addInterior",value:function(A){this.interiorRings.push(A),A.poly=this}},{key:"getGeom",value:function(){var A=[this.exteriorRing.getGeom()];if(null===A[0])return null;for(var e=0,r=this.interiorRings.length;e1&&void 0!==arguments[1]?arguments[1]:G.compare;A(this,e),this.queue=r,this.tree=new c(t),this.segments=[]}return r(e,[{key:"process",value:function(A){var e=A.segment,r=[];if(A.consumedBy)return A.isLeft?this.queue.remove(A.otherSE):this.tree.remove(e),r;var t=A.isLeft?this.tree.insert(e):this.tree.find(e);if(!t)throw new Error("Unable to find segment #".concat(e.id," ")+"[".concat(e.leftSE.point.x,", ").concat(e.leftSE.point.y,"] -> ")+"[".concat(e.rightSE.point.x,", ").concat(e.rightSE.point.y,"] ")+"in SweepLine tree. Please submit a bug report.");for(var n=t,i=t,f=void 0,a=void 0;void 0===f;)null===(n=this.tree.prev(n))?f=null:void 0===n.key.consumedBy&&(f=n.key);for(;void 0===a;)null===(i=this.tree.next(i))?a=null:void 0===i.key.consumedBy&&(a=i.key);if(A.isLeft){var o=null;if(f){var u=f.getIntersection(e);if(null!==u&&(e.isAnEndpoint(u)||(o=u),!f.isAnEndpoint(u)))for(var c=this._splitSafely(f,u),s=0,l=c.length;s0?(this.tree.remove(e),r.push(A)):(this.segments.push(e),e.prev=f)}else{if(f&&a){var y=f.getIntersection(a);if(null!==y){if(!f.isAnEndpoint(y))for(var B=this._splitSafely(f,y),k=0,m=B.length;kZ)throw new Error("Infinite loop when putting segment endpoints in a priority queue (queue size too big). Please file a bug report.");for(var E=new z(b),y=b.size,B=b.pop();B;){var m=B.key;if(b.size===y){var D=m.segment;throw new Error("Unable to pop() ".concat(m.isLeft?"left":"right"," SweepEvent ")+"[".concat(m.point.x,", ").concat(m.point.y,"] from segment #").concat(D.id," ")+"[".concat(D.leftSE.point.x,", ").concat(D.leftSE.point.y,"] -> ")+"[".concat(D.rightSE.point.x,", ").concat(D.rightSE.point.y,"] from queue. ")+"Please file a bug report.")}if(b.size>Z)throw new Error("Infinite loop when passing sweep line over endpoints (queue size too big). Please file a bug report.");if(E.segments.length>H)throw new Error("Infinite loop when passing sweep line over endpoints (too many sweep line segments). Please file a bug report.");for(var x=E.process(m),M=0,Q=x.length;M1?e-1:0),t=1;t1?e-1:0),t=1;t1?e-1:0),t=1;t1?e-1:0),t=1;t{let e=/[-+]?([0-9]*\.[0-9]+|[0-9]+)([eE][-+]?[0-9]+)?/,r=new RegExp("^"+e.source+"(\\s"+e.source+"){1,}");const t=A=>{function e(A){return A.join(" ")}function r(A){return A.map(e).join(", ")}function n(A){return A.map(r).map(f).join(", ")}function i(A){return A.map(n).map(f).join(", ")}function f(A){return"("+A+")"}"Feature"===A.type&&(A=A.geometry);let a=A;switch(a.type){case"Point":return a.coordinates&&3===a.coordinates.length?"POINT Z ("+e(a.coordinates)+")":"POINT ("+e(a.coordinates)+")";case"LineString":return a.coordinates&&a.coordinates[0]&&3===a.coordinates[0].length?"LINESTRING Z ("+r(a.coordinates)+")":"LINESTRING ("+r(a.coordinates)+")";case"Polygon":return a.coordinates&&a.coordinates[0]&&a.coordinates[0][0]&&3===a.coordinates[0][0].length?"POLYGON Z ("+n(a.coordinates)+")":"POLYGON ("+n(a.coordinates)+")";case"MultiPoint":return a.coordinates&&a.coordinates[0]&&3===a.coordinates[0].length?"MULTIPOINT Z ("+r(a.coordinates)+")":"MULTIPOINT ("+r(a.coordinates)+")";case"MultiLineString":return a.coordinates&&a.coordinates[0]&&a.coordinates[0][0]&&3===a.coordinates[0][0].length?"MULTILINESTRING Z ("+n(a.coordinates)+")":"MULTILINESTRING ("+n(a.coordinates)+")";case"MultiPolygon":return a.coordinates&&a.coordinates[0]&&a.coordinates[0][0]&&a.coordinates[0][0]&&3===a.coordinates[0][0][0].length?"MULTIPOLYGON Z ("+i(a.coordinates)+")":"MULTIPOLYGON ("+i(a.coordinates)+")";case"GeometryCollection":return"GEOMETRYCOLLECTION ("+a.geometries.map(t).join(", ")+")";default:throw new Error("stringify requires a valid GeoJSON Feature or geometry object as input")}};A.exports={parse:A=>{let e=A.split(";"),t=e.pop(),n=(e.shift()||"").split("=").pop(),i=0;function f(A){let e=t.substring(i).match(A);return e?(i+=e[0].length,e[0]):null}function a(){f(/^\s*/)}function o(){a();let A,e=0,t=[],n=[t],i=t;for(;A=f(/^(\()/)||f(/^(\))/)||f(/^(,)/)||f(r);){if("("===A)n.push(i),i=[],n[n.length-1].push(i),e++;else if(")"===A){if(0===i.length)return null;if(i=n.pop(),!i)return null;if(e--,0===e)break}else if(","===A)i=[],n[n.length-1].push(i);else{if(A.split(/\s/g).some(isNaN))return null;Array.prototype.push.apply(i,A.split(/\s/g).map(parseFloat))}a()}return 0!==e?null:t}function u(){let A,e,t=[];for(;e=f(r)||f(/^(,)/);)","===e?(t.push(A),A=[]):e.split(/\s/g).some(isNaN)||(A||(A=[]),Array.prototype.push.apply(A,e.split(/\s/g).map(parseFloat))),a();return A?(t.push(A),t.length?t:null):null}function c(){return function(){if(!f(/^(point(\sz)?)/i))return null;if(a(),!f(/^(\()/))return null;let A=u();return A?(a(),f(/^(\))/)?{type:"Point",coordinates:A[0]}:null):null}()||function(){if(!f(/^(linestring(\sz)?)/i))return null;if(a(),!f(/^(\()/))return null;let A=u();return A&&f(/^(\))/)?{type:"LineString",coordinates:A}:null}()||function(){if(!f(/^(polygon(\sz)?)/i))return null;a();let A=o();return A?{type:"Polygon",coordinates:A}:null}()||function(){if(!f(/^(multipoint(\sz)?)/i))return null;a();let A=t.substring(t.indexOf("(")+1,t.length-1).replace(/\(/g,"").replace(/\)/g,"");t="MULTIPOINT ("+A+")";let e=o();return e?(a(),{type:"MultiPoint",coordinates:e}):null}()||function(){if(!f(/^(multilinestring(\sz)?)/i))return null;a();let A=o();return A?(a(),{type:"MultiLineString",coordinates:A}):null}()||function(){if(!f(/^(multipolygon(\sz)?)/i))return null;a();let A=o();return A?{type:"MultiPolygon",coordinates:A}:null}()||function(){let A,e=[];if(!f(/^(geometrycollection)/i))return null;if(a(),!f(/^(\()/))return null;for(;A=c();)e.push(A),a(),f(/^(,)/),a();return f(/^(\))/)?{type:"GeometryCollection",geometries:e}:null}()}return(s=c())&&n.match(/\d+/)&&(s.crs={type:"name",properties:{name:"urn:ogc:def:crs:EPSG::"+n}}),s;var s},stringify:t}},17527:(A,e,r)=>{"use strict";r(40517)},82086:(A,e,r)=>{"use strict";r.d(e,{Z:()=>i});var t=r(48024);function n(A){var e=[1/0,1/0,-1/0,-1/0];return(0,t.pZ)(A,(function(A){e[0]>A[0]&&(e[0]=A[0]),e[1]>A[1]&&(e[1]=A[1]),e[2]{"use strict";r.d(e,{Z:()=>n});var t=r(81011);function n(A,e,r){if(void 0===r&&(r={}),!A)throw new Error("point is required");if(!e)throw new Error("polygon is required");var n=(0,t.c9)(A),f=(0,t.wA)(e),a=f.type,o=e.bbox,u=f.coordinates;if(o&&!1===function(A,e){return e[0]<=A[0]&&e[1]<=A[1]&&e[2]>=A[0]&&e[3]>=A[1]}(n,o))return!1;"Polygon"===a&&(u=[u]);for(var c=!1,s=0;sA[1]!==u>A[1]&&A[0]<(o-f)*(A[1]-a)/(u-a)+f&&(t=!t)}return t}},31890:(A,e,r)=>{"use strict";r(40517),r(81011),r(48024),r(52675),r(26625)},52675:(A,e,r)=>{"use strict";r(48024),r(40517)},88874:(A,e,r)=>{"use strict";r.d(e,{Z:()=>i});var t=r(25945),n=r(52593);function i(A){let e,r,i;function a(A,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:A.length;if(n>>1;r(A[e],t)<0?n=e+1:i=e}while(n(0,t.Z)(A(e),r),i=(e,r)=>A(e)-r):(e=A===t.Z||A===n.Z?A:f,r=A,i=A),{left:a,center:function(A,e){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;const t=a(A,e,r,(arguments.length>3&&void 0!==arguments[3]?arguments[3]:A.length)-1);return t>r&&i(A[t-1],e)>-i(A[t],e)?t-1:t},right:function(A,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:A.length;if(n>>1;r(A[e],t)<=0?n=e+1:i=e}while(n{"use strict";function t(A,e){return null==A||null==e?NaN:eA?1:e>=A?0:NaN}r.d(e,{Z:()=>t})},6072:(A,e,r)=>{"use strict";r.d(e,{G9:()=>o,ZP:()=>a,ly:()=>u});const t=Math.sqrt(50),n=Math.sqrt(10),i=Math.sqrt(2);function f(A,e,r){const a=(e-A)/Math.max(0,r),o=Math.floor(Math.log10(a)),u=a/Math.pow(10,o),c=u>=t?10:u>=n?5:u>=i?2:1;let s,l,d;return o<0?(d=Math.pow(10,-o)/c,s=Math.round(A*d),l=Math.round(e*d),s/de&&--l,d=-d):(d=Math.pow(10,o)*c,s=Math.round(A/d),l=Math.round(e/d),s*de&&--l),l0))return[];if((A=+A)===(e=+e))return[A];const t=e=n))return[];const o=i-n+1,u=new Array(o);if(t)if(a<0)for(let f=0;f{"use strict";r.d(e,{WU:()=>s,jH:()=>l});var t=r(94657);var n=r(8674);var i,f=r(36142);function a(A,e){var r=(0,f.V)(A,e);if(!r)return A+"";var t=r[0],n=r[1];return n<0?"0."+new Array(-n).join("0")+t:t.length>n+1?t.slice(0,n+1)+"."+t.slice(n+1):t+new Array(n-t.length+2).join("0")}const o={"%":(A,e)=>(100*A).toFixed(e),b:A=>Math.round(A).toString(2),c:A=>A+"",d:f.Z,e:(A,e)=>A.toExponential(e),f:(A,e)=>A.toFixed(e),g:(A,e)=>A.toPrecision(e),o:A=>Math.round(A).toString(8),p:(A,e)=>a(100*A,e),r:a,s:function(A,e){var r=(0,f.V)(A,e);if(!r)return A+"";var t=r[0],n=r[1],a=n-(i=3*Math.max(-8,Math.min(8,Math.floor(n/3))))+1,o=t.length;return a===o?t:a>o?t+new Array(a-o+1).join("0"):a>0?t.slice(0,a)+"."+t.slice(a):"0."+new Array(1-a).join("0")+(0,f.V)(A,Math.max(0,e+a-1))[0]},X:A=>Math.round(A).toString(16).toUpperCase(),x:A=>Math.round(A).toString(16)};function u(A){return A}var c,s,l,d=Array.prototype.map,b=["y","z","a","f","p","n","\xb5","m","","k","M","G","T","P","E","Z","Y"];function h(A){var e,r,f=void 0===A.grouping||void 0===A.thousands?u:(e=d.call(A.grouping,Number),r=A.thousands+"",function(A,t){for(var n=A.length,i=[],f=0,a=e[0],o=0;n>0&&a>0&&(o+a+1>t&&(a=Math.max(1,t-o)),i.push(A.substring(n-=a,n+a)),!((o+=a+1)>t));)a=e[f=(f+1)%e.length];return i.reverse().join(r)}),a=void 0===A.currency?"":A.currency[0]+"",c=void 0===A.currency?"":A.currency[1]+"",s=void 0===A.decimal?".":A.decimal+"",l=void 0===A.numerals?u:function(A){return function(e){return e.replace(/[0-9]/g,(function(e){return A[+e]}))}}(d.call(A.numerals,String)),h=void 0===A.percent?"%":A.percent+"",g=void 0===A.minus?"\u2212":A.minus+"",v=void 0===A.nan?"NaN":A.nan+"";function p(A){var e=(A=(0,n.Z)(A)).fill,r=A.align,t=A.sign,u=A.symbol,d=A.zero,p=A.width,w=A.comma,_=A.precision,E=A.trim,y=A.type;"n"===y?(w=!0,y="g"):o[y]||(void 0===_&&(_=12),E=!0,y="g"),(d||"0"===e&&"="===r)&&(d=!0,e="0",r="=");var B="$"===u?a:"#"===u&&/[boxX]/.test(y)?"0"+y.toLowerCase():"",k="$"===u?c:/[%p]/.test(y)?h:"",m=o[y],D=/[defgprs%]/.test(y);function x(A){var n,a,o,u=B,c=k;if("c"===y)c=m(A)+c,A="";else{var h=(A=+A)<0||1/A<0;if(A=isNaN(A)?v:m(Math.abs(A),_),E&&(A=function(A){A:for(var e,r=A.length,t=1,n=-1;t0&&(n=0)}return n>0?A.slice(0,n)+A.slice(e+1):A}(A)),h&&0===+A&&"+"!==t&&(h=!1),u=(h?"("===t?t:g:"-"===t||"("===t?"":t)+u,c=("s"===y?b[8+i/3]:"")+c+(h&&"("===t?")":""),D)for(n=-1,a=A.length;++n(o=A.charCodeAt(n))||o>57){c=(46===o?s+A.slice(n+1):A.slice(n))+c,A=A.slice(0,n);break}}w&&!d&&(A=f(A,1/0));var x=u.length+A.length+c.length,M=x>1)+u+A+c+M.slice(x);break;default:A=M+u+A+c}return l(A)}return _=void 0===_?6:/[gprs]/.test(y)?Math.max(1,Math.min(21,_)):Math.max(0,Math.min(20,_)),x.toString=function(){return A+""},x}return{format:p,formatPrefix:function(A,e){var r=p(((A=(0,n.Z)(A)).type="f",A)),i=3*Math.max(-8,Math.min(8,Math.floor((0,t.Z)(e)/3))),f=Math.pow(10,-i),a=b[8+i/3];return function(A){return r(f*A)+a}}}}c=h({thousands:",",grouping:[3],currency:["$",""]}),s=c.format,l=c.formatPrefix},94657:(A,e,r)=>{"use strict";r.d(e,{Z:()=>n});var t=r(36142);function n(A){return(A=(0,t.V)(Math.abs(A)))?A[1]:NaN}},36142:(A,e,r)=>{"use strict";function t(A){return Math.abs(A=Math.round(A))>=1e21?A.toLocaleString("en").replace(/,/g,""):A.toString(10)}function n(A,e){if((r=(A=e?A.toExponential(e-1):A.toExponential()).indexOf("e"))<0)return null;var r,t=A.slice(0,r);return[t.length>1?t[0]+t.slice(2):t,+A.slice(r+1)]}r.d(e,{V:()=>n,Z:()=>t})},8674:(A,e,r)=>{"use strict";r.d(e,{Z:()=>n});var t=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function n(A){if(!(e=t.exec(A)))throw new Error("invalid format: "+A);var e;return new i({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}function i(A){this.fill=void 0===A.fill?" ":A.fill+"",this.align=void 0===A.align?">":A.align+"",this.sign=void 0===A.sign?"-":A.sign+"",this.symbol=void 0===A.symbol?"":A.symbol+"",this.zero=!!A.zero,this.width=void 0===A.width?void 0:+A.width,this.comma=!!A.comma,this.precision=void 0===A.precision?void 0:+A.precision,this.trim=!!A.trim,this.type=void 0===A.type?"":A.type+""}n.prototype=i.prototype,i.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}},86183:(A,e,r)=>{"use strict";r.d(e,{Z:()=>a});var t=r(31600),n=r(62145),i=r(25945),f=r(23263);function a(){var A,e=[],r=[],o=[];function u(){var A=0,n=Math.max(1,r.length);for(o=new Array(n-1);++A0?o[t-1]:e[0],t{"use strict";r.d(e,{Z:()=>f});var t=r(62145),n=r(29449),i=r(23263);function f(){var A,e=0,r=1,a=1,o=[.5],u=[0,1];function c(e){return null!=e&&e<=e?u[(0,t.ZP)(o,e,0,a)]:A}function s(){var A=-1;for(o=new Array(a);++A=a?[o[a-1],r]:[o[t-1],o[t]]},c.unknown=function(e){return arguments.length?(A=e,c):c},c.thresholds=function(){return o.slice()},c.copy=function(){return f().domain([e,r]).range(u).unknown(A)},i.o.apply((0,n.Q)(c),arguments)}},56585:(A,e,r)=>{"use strict";r.d(e,{Z:()=>a});var t=r(6072),n=r(8674),i=r(94657);var f=r(56867);function a(A,e,r,a){var o,u=(0,t.ly)(A,e,r);switch((a=(0,n.Z)(null==a?",f":a)).type){case"s":var c=Math.max(Math.abs(A),Math.abs(e));return null!=a.precision||isNaN(o=function(A,e){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor((0,i.Z)(e)/3)))-(0,i.Z)(Math.abs(A)))}(u,c))||(a.precision=o),(0,f.jH)(a,c);case"":case"e":case"g":case"p":case"r":null!=a.precision||isNaN(o=function(A,e){return A=Math.abs(A),e=Math.abs(e)-A,Math.max(0,(0,i.Z)(e)-(0,i.Z)(A))+1}(u,Math.max(Math.abs(A),Math.abs(e))))||(a.precision=o-("e"===a.type));break;case"f":case"%":null!=a.precision||isNaN(o=function(A){return Math.max(0,-(0,i.Z)(Math.abs(A)))}(u))||(a.precision=o-2*("%"===a.type))}return(0,f.WU)(a)}},42552:(A,e,r)=>{"use strict";r.d(e,{kP:()=>n});let t=A=>crypto.getRandomValues(new Uint8Array(A)),n=function(A){return((A,e,r)=>{let t=(2<0&&void 0!==arguments[0]?arguments[0]:e,f="";for(;;){let e=r(n),a=n;for(;a--;)if(f+=A[e[a]&t]||"",f.length===i)return f}}})(A,arguments.length>1&&void 0!==arguments[1]?arguments[1]:21,t)}},31343:(A,e,r)=>{"use strict";r.d(e,{Q:()=>t});let t="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"}}]); \ No newline at end of file diff --git a/dist/static/js/940.2f1dda0a.js b/dist/static/js/940.2f1dda0a.js new file mode 100644 index 0000000..ccbf5e6 --- /dev/null +++ b/dist/static/js/940.2f1dda0a.js @@ -0,0 +1 @@ +(self.webpackChunkmaptable_frontend=self.webpackChunkmaptable_frontend||[]).push([[940,156],{70363:function(e){"use strict";e.exports=function(){function e(e){var r=[];return e.AMapUI&&r.push(t(e.AMapUI)),e.Loca&&r.push(n(e.Loca)),Promise.all(r)}function t(e){return new Promise((function(t,n){var s=[];if(e.plugins)for(var l=0;l{e.exports={}},62810:(e,t,n)=>{"use strict";n.d(t,{iN:()=>x,R_:()=>A,EV:()=>w,ez:()=>y});var r=n(76471),i=n(18948),o=2,a=.16,s=.05,l=.05,c=.15,u=5,d=4,f=[{index:7,opacity:.15},{index:6,opacity:.25},{index:5,opacity:.3},{index:5,opacity:.45},{index:5,opacity:.65},{index:5,opacity:.85},{index:4,opacity:.9},{index:3,opacity:.95},{index:2,opacity:.97},{index:1,opacity:.98}];function h(e){var t=e.r,n=e.g,i=e.b,o=(0,r.py)(t,n,i);return{h:360*o.h,s:o.s,v:o.v}}function p(e){var t=e.r,n=e.g,i=e.b;return"#".concat((0,r.vq)(t,n,i,!1))}function g(e,t,n){var r;return(r=Math.round(e.h)>=60&&Math.round(e.h)<=240?n?Math.round(e.h)-o*t:Math.round(e.h)+o*t:n?Math.round(e.h)+o*t:Math.round(e.h)-o*t)<0?r+=360:r>=360&&(r-=360),r}function m(e,t,n){return 0===e.h&&0===e.s?e.s:((r=n?e.s-a*t:t===d?e.s+a:e.s+s*t)>1&&(r=1),n&&t===u&&r>.1&&(r=.1),r<.06&&(r=.06),Number(r.toFixed(2)));var r}function v(e,t,n){var r;return(r=n?e.v+l*t:e.v-c*t)>1&&(r=1),Number(r.toFixed(2))}function A(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=[],r=(0,i.uA)(e),o=u;o>0;o-=1){var a=h(r),s=p((0,i.uA)({h:g(a,o,!0),s:m(a,o,!0),v:v(a,o,!0)}));n.push(s)}n.push(p(r));for(var l=1;l<=d;l+=1){var c=h(r),A=p((0,i.uA)({h:g(c,l),s:m(c,l),v:v(c,l)}));n.push(A)}return"dark"===t.theme?f.map((function(e){var r=e.index,o=e.opacity;return p(function(e,t,n){var r=n/100;return{r:(t.r-e.r)*r+e.r,g:(t.g-e.g)*r+e.g,b:(t.b-e.b)*r+e.b}}((0,i.uA)(t.backgroundColor||"#141414"),(0,i.uA)(n[r]),100*o))})):n}var y={red:"#F5222D",volcano:"#FA541C",orange:"#FA8C16",gold:"#FAAD14",yellow:"#FADB14",lime:"#A0D911",green:"#52C41A",cyan:"#13C2C2",blue:"#1677FF",geekblue:"#2F54EB",purple:"#722ED1",magenta:"#EB2F96",grey:"#666666"},b={},_={};Object.keys(y).forEach((function(e){b[e]=A(y[e]),b[e].primary=b[e][5],_[e]=A(y[e],{theme:"dark",backgroundColor:"#141414"}),_[e].primary=_[e][5]}));b.red,b.volcano;var w=b.gold,x=(b.orange,b.yellow,b.lime,b.green,b.cyan,b.blue);b.geekblue,b.purple,b.magenta,b.grey,b.grey},16831:(e,t,n)=>{"use strict";n.d(t,{E4:()=>st,jG:()=>k,ks:()=>j,bf:()=>D,CI:()=>ot,fp:()=>ee,xy:()=>rt});var r=n(68185),i=n(13747),o=n(22368),a=n(35194);const s=function(e){for(var t,n=0,r=0,i=e.length;i>=4;++r,i-=4)t=1540483477*(65535&(t=255&e.charCodeAt(r)|(255&e.charCodeAt(++r))<<8|(255&e.charCodeAt(++r))<<16|(255&e.charCodeAt(++r))<<24))+(59797*(t>>>16)<<16),n=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(i){case 3:n^=(255&e.charCodeAt(r+2))<<16;case 2:n^=(255&e.charCodeAt(r+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(r)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)};var l=n(86263),c=n(57435),u=n.t(c,2),d=(n(22121),n(46032),n(66375)),f=n(1959),h="%";function p(e){return e.join(h)}const g=function(){function e(t){(0,d.Z)(this,e),(0,r.Z)(this,"instanceId",void 0),(0,r.Z)(this,"cache",new Map),this.instanceId=t}return(0,f.Z)(e,[{key:"get",value:function(e){return this.opGet(p(e))}},{key:"opGet",value:function(e){return this.cache.get(e)||null}},{key:"update",value:function(e,t){return this.opUpdate(p(e),t)}},{key:"opUpdate",value:function(e,t){var n=t(this.cache.get(e));null===n?this.cache.delete(e):this.cache.set(e,n)}}]),e}();var m="data-token-hash",v="data-css-hash",A="__cssinjs_instance__";function y(){var e=Math.random().toString(12).slice(2);if("undefined"!==typeof document&&document.head&&document.body){var t=document.body.querySelectorAll("style[".concat(v,"]"))||[],n=document.head.firstChild;Array.from(t).forEach((function(t){t[A]=t[A]||e,t[A]===e&&document.head.insertBefore(t,n)}));var r={};Array.from(document.querySelectorAll("style[".concat(v,"]"))).forEach((function(t){var n,i=t.getAttribute(v);r[i]?t[A]===e&&(null===(n=t.parentNode)||void 0===n||n.removeChild(t)):r[i]=!0}))}return new g(e)}var b=c.createContext({hashPriority:"low",cache:y(),defaultCache:!0});const _=b;var w=n(69223),x=n(20749);var E=function(){function e(){(0,d.Z)(this,e),(0,r.Z)(this,"cache",void 0),(0,r.Z)(this,"keys",void 0),(0,r.Z)(this,"cacheCallTimes",void 0),this.cache=new Map,this.keys=[],this.cacheCallTimes=0}return(0,f.Z)(e,[{key:"size",value:function(){return this.keys.length}},{key:"internalGet",value:function(e){var t,n,r=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i={map:this.cache};return e.forEach((function(e){var t;i?i=null===(t=i)||void 0===t||null===(t=t.map)||void 0===t?void 0:t.get(e):i=void 0})),null!==(t=i)&&void 0!==t&&t.value&&r&&(i.value[1]=this.cacheCallTimes++),null===(n=i)||void 0===n?void 0:n.value}},{key:"get",value:function(e){var t;return null===(t=this.internalGet(e,!0))||void 0===t?void 0:t[0]}},{key:"has",value:function(e){return!!this.internalGet(e)}},{key:"set",value:function(t,n){var r=this;if(!this.has(t)){if(this.size()+1>e.MAX_CACHE_SIZE+e.MAX_CACHE_OFFSET){var o=this.keys.reduce((function(e,t){var n=(0,i.Z)(e,2)[1];return r.internalGet(t)[1]0,"[Ant Design CSS-in-JS] Theme should have at least one derivative function."),C+=1}return(0,f.Z)(e,[{key:"getDerivativeToken",value:function(e){return this.derivatives.reduce((function(t,n){return n(e,t)}),void 0)}}]),e}(),T=new E;function k(e){var t=Array.isArray(e)?e:[e];return T.has(t)||T.set(t,new P(t)),T.get(t)}var M=new WeakMap,O={};var R=new WeakMap;function I(e){var t=R.get(e)||"";return t||(Object.keys(e).forEach((function(n){var r=e[n];t+=n,r instanceof P?t+=r.id:r&&"object"===(0,w.Z)(r)?t+=I(r):t+=r})),R.set(e,t)),t}function L(e,t){return s("".concat(t,"_").concat(I(e)))}"random-".concat(Date.now(),"-").concat(Math.random()).replace(/\./g,"");var N=(0,x.Z)();function D(e){return"number"===typeof e?"".concat(e,"px"):e}function F(e,t,n){var i,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};if(arguments.length>4&&void 0!==arguments[4]&&arguments[4])return e;var s=(0,a.Z)((0,a.Z)({},o),{},(i={},(0,r.Z)(i,m,t),(0,r.Z)(i,v,n),i)),l=Object.keys(s).map((function(e){var t=s[e];return t?"".concat(e,'="').concat(t,'"'):null})).filter((function(e){return e})).join(" ");return"")}var j=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return"--".concat(t?"".concat(t,"-"):"").concat(e).replace(/([a-z0-9])([A-Z])/g,"$1-$2").replace(/([A-Z]+)([A-Z][a-z0-9]+)/g,"$1-$2").replace(/([a-z])([A-Z0-9])/g,"$1-$2").toLowerCase()},B=function(e,t,n){return Object.keys(e).length?".".concat(t).concat(null!==n&&void 0!==n&&n.scope?".".concat(n.scope):"","{").concat(Object.entries(e).map((function(e){var t=(0,i.Z)(e,2),n=t[0],r=t[1];return"".concat(n,":").concat(r,";")})).join(""),"}"):""},Z=function(e,t,n){var r={},o={};return Object.entries(e).forEach((function(e){var t,a,s=(0,i.Z)(e,2),l=s[0],c=s[1];if(null!==n&&void 0!==n&&null!==(t=n.preserve)&&void 0!==t&&t[l])o[l]=c;else if(("string"===typeof c||"number"===typeof c)&&(null===n||void 0===n||null===(a=n.ignore)||void 0===a||!a[l])){var u,d=j(l,null===n||void 0===n?void 0:n.prefix);r[d]="number"!==typeof c||null!==n&&void 0!==n&&null!==(u=n.unitless)&&void 0!==u&&u[l]?String(c):"".concat(c,"px"),o[l]="var(".concat(d,")")}})),[o,B(r,t,{scope:null===n||void 0===n?void 0:n.scope})]},z=n(12750),U=(0,a.Z)({},u).useInsertionEffect;const H=U?function(e,t,n){return U((function(){return e(),t()}),n)}:function(e,t,n){c.useMemo(e,n),(0,z.Z)((function(){return t(!0)}),n)};const V="undefined"!==typeof(0,a.Z)({},u).useInsertionEffect?function(e){var t=[],n=!1;return c.useEffect((function(){return n=!1,function(){n=!0,t.length&&t.forEach((function(e){return e()}))}}),e),function(e){n||t.push(e)}}:function(){return function(e){e()}};const W=function(){return!1};function G(e,t,n,r,a){var s=c.useContext(_).cache,l=p([e].concat((0,o.Z)(t))),u=V([l]),d=(W(),function(e){s.opUpdate(l,(function(t){var r=t||[void 0,void 0],o=(0,i.Z)(r,2),a=o[0];var s=[void 0===a?0:a,o[1]||n()];return e?e(s):s}))});c.useMemo((function(){d()}),[l]);var f=s.opGet(l)[1];return H((function(){null===a||void 0===a||a(f)}),(function(e){return d((function(t){var n=(0,i.Z)(t,2),r=n[0],o=n[1];return e&&0===r&&(null===a||void 0===a||a(f)),[r+1,o]})),function(){s.opUpdate(l,(function(t){var n=t||[],o=(0,i.Z)(n,2),a=o[0],c=void 0===a?0:a,d=o[1];return 0===c-1?(u((function(){!e&&s.opGet(l)||null===r||void 0===r||r(d,!1)})),null):[c-1,d]}))}}),[l]),f}var K={},q="css",Y=new Map;var X=0;function $(e,t){Y.set(e,(Y.get(e)||0)-1);var n=Array.from(Y.keys()),r=n.filter((function(e){return(Y.get(e)||0)<=0}));n.length-r.length>X&&r.forEach((function(e){!function(e,t){"undefined"!==typeof document&&document.querySelectorAll("style[".concat(m,'="').concat(e,'"]')).forEach((function(e){var n;e[A]===t&&(null===(n=e.parentNode)||void 0===n||n.removeChild(e))}))}(e,t),Y.delete(e)}))}var Q=function(e,t,n,r){var i=n.getDerivativeToken(e),o=(0,a.Z)((0,a.Z)({},i),t);return r&&(o=r(o)),o},J="token";function ee(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=(0,c.useContext)(_),u=r.cache.instanceId,d=r.container,f=n.salt,h=void 0===f?"":f,p=n.override,g=void 0===p?K:p,y=n.formatToken,b=n.getComputedToken,w=n.cssVar,x=function(e,t){for(var n=M,r=0;r0?pe(Se,--xe):0,_e--,10===Ee&&(_e=1,be--),Ee}function Te(){return Ee=xe2||Re(Ee)>3?"":" "}function Fe(e,t){for(;--t&&Te()&&!(Ee<48||Ee>102||Ee>57&&Ee<65||Ee>70&&Ee<97););return Oe(e,Me()+(t<6&&32==ke()&&32==Te()))}function je(e){for(;Te();)switch(Ee){case e:return xe;case 34:case 39:34!==e&&39!==e&&je(Ee);break;case 40:41===e&&je(e);break;case 92:Te()}return xe}function Be(e,t){for(;Te()&&e+Ee!==57&&(e+Ee!==84||47!==ke()););return"/*"+Oe(t,xe-1)+"*"+ue(47===e?e:Te())}function Ze(e){for(;!Re(ke());)Te();return Oe(e,xe)}function ze(e){return Le(Ue("",null,null,null,[""],e=Ie(e),0,[0],e))}function Ue(e,t,n,r,i,o,a,s,l){for(var c=0,u=0,d=a,f=0,h=0,p=0,g=1,m=1,v=1,A=0,y="",b=i,_=o,w=r,x=y;m;)switch(p=A,A=Te()){case 40:if(108!=p&&58==pe(x,d-1)){-1!=he(x+=fe(Ne(A),"&","&\f"),"&\f")&&(v=-1);break}case 34:case 39:case 91:x+=Ne(A);break;case 9:case 10:case 13:case 32:x+=De(p);break;case 92:x+=Fe(Me()-1,7);continue;case 47:switch(ke()){case 42:case 47:ve(Ve(Be(Te(),Me()),t,n,l),l);break;default:x+="/"}break;case 123*g:s[c++]=me(x)*v;case 125*g:case 59:case 0:switch(A){case 0:case 125:m=0;case 59+u:-1==v&&(x=fe(x,/\f/g,"")),h>0&&me(x)-d&&ve(h>32?We(x+";",r,n,d-1,l):We(fe(x," ","")+";",r,n,d-2,l),l);break;case 59:x+=";";default:if(ve(w=He(x,t,n,c,u,i,s,y,b=[],_=[],d,o),o),123===A)if(0===u)Ue(x,t,w,w,b,o,d,s,_);else switch(99===f&&110===pe(x,3)?100:f){case 100:case 108:case 109:case 115:Ue(e,w,w,r&&ve(He(e,w,w,0,0,i,s,y,i,b=[],d,_),_),i,_,d,s,r?b:_);break;default:Ue(x,w,w,w,[""],_,0,s,_)}}c=u=h=0,g=v=1,y=x="",d=a;break;case 58:d=1+me(x),h=p;default:if(g<1)if(123==A)--g;else if(125==A&&0==g++&&125==Pe())continue;switch(x+=ue(A),A*g){case 38:v=u>0?1:(x+="\f",-1);break;case 44:s[c++]=(me(x)-1)*v,v=1;break;case 64:45===ke()&&(x+=Ne(Te())),f=ke(),u=d=me(y=x+=Ze(Me())),A++;break;case 45:45===p&&2==me(x)&&(g=0)}}return o}function He(e,t,n,r,i,o,a,s,l,c,u,d){for(var f=i-1,h=0===i?o:[""],p=function(e){return e.length}(h),g=0,m=0,v=0;g0?h[A]+" "+y:fe(y,/&\f/g,h[A])))&&(l[v++]=b);return Ce(e,t,n,0===i?ie:s,l,c,u,d)}function Ve(e,t,n,r){return Ce(e,t,n,re,ue(Ee),ge(e,2,-2),0,r)}function We(e,t,n,r,i){return Ce(e,t,n,oe,ge(e,0,r),ge(e,r+1,-1),r,i)}var Ge,Ke="data-ant-cssinjs-cache-path",qe="_FILE_STYLE__";var Ye=!0;function Xe(e){return function(){if(!Ge&&(Ge={},(0,x.Z)())){var e=document.createElement("div");e.className=Ke,e.style.position="fixed",e.style.visibility="hidden",e.style.top="-9999px",document.body.appendChild(e);var t=getComputedStyle(e).content||"";(t=t.replace(/^"/,"").replace(/"$/,"")).split(";").forEach((function(e){var t=e.split(":"),n=(0,i.Z)(t,2),r=n[0],o=n[1];Ge[r]=o}));var n,r=document.querySelector("style[".concat(Ke,"]"));r&&(Ye=!1,null===(n=r.parentNode)||void 0===n||n.removeChild(r)),document.body.removeChild(e)}}(),!!Ge[e]}var $e="_multi_value_";function Qe(e){return Ae(ze(e),ye).replace(/\{%%%\:[^;];}/g,";")}var Je=function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{root:!0,parentSelectors:[]},s=r.root,l=r.injectHash,c=r.parentSelectors,u=n.hashId,d=n.layer,f=(n.path,n.hashPriority),h=n.transformers,p=void 0===h?[]:h,g=(n.linters,""),m={};function v(t){var r=t.getName(u);if(!m[r]){var o=e(t.style,n,{root:!1,parentSelectors:c}),a=(0,i.Z)(o,1)[0];m[r]="@keyframes ".concat(t.getName(u)).concat(a)}}var A=function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return t.forEach((function(t){Array.isArray(t)?e(t,n):t&&n.push(t)})),n}(Array.isArray(t)?t:[t]);return A.forEach((function(t){var r="string"!==typeof t||s?t:{};if("string"===typeof r)g+="".concat(r,"\n");else if(r._keyframe)v(r);else{var d=p.reduce((function(e,t){var n;return(null===t||void 0===t||null===(n=t.visit)||void 0===n?void 0:n.call(t,e))||e}),r);Object.keys(d).forEach((function(t){var r=d[t];if("object"!==(0,w.Z)(r)||!r||"animationName"===t&&r._keyframe||function(e){return"object"===(0,w.Z)(e)&&e&&("_skip_check_"in e||$e in e)}(r)){var h;function C(e,t){var n=e.replace(/[A-Z]/g,(function(e){return"-".concat(e.toLowerCase())})),r=t;ne[e]||"number"!==typeof r||0===r||(r="".concat(r,"px")),"animationName"===e&&null!==t&&void 0!==t&&t._keyframe&&(v(t),r=t.getName(u)),g+="".concat(n,":").concat(r,";")}var p=null!==(h=null===r||void 0===r?void 0:r.value)&&void 0!==h?h:r;"object"===(0,w.Z)(r)&&null!==r&&void 0!==r&&r[$e]&&Array.isArray(p)?p.forEach((function(e){C(t,e)})):C(t,p)}else{var A=!1,y=t.trim(),b=!1;(s||l)&&u?y.startsWith("@")?A=!0:y=function(e,t,n){if(!t)return e;var r=".".concat(t),i="low"===n?":where(".concat(r,")"):r;return e.split(",").map((function(e){var t,n=e.trim().split(/\s+/),r=n[0]||"",a=(null===(t=r.match(/^\w+/))||void 0===t?void 0:t[0])||"";return[r="".concat(a).concat(i).concat(r.slice(a.length))].concat((0,o.Z)(n.slice(1))).join(" ")})).join(",")}(t,u,f):!s||u||"&"!==y&&""!==y||(y="",b=!0);var _=e(r,n,{root:b,injectHash:A,parentSelectors:[].concat((0,o.Z)(c),[y])}),x=(0,i.Z)(_,2),E=x[0],S=x[1];m=(0,a.Z)((0,a.Z)({},m),S),g+="".concat(y).concat(E)}}))}})),s?d&&(g="@layer ".concat(d.name," {").concat(g,"}"),d.dependencies&&(m["@layer ".concat(d.name)]=d.dependencies.map((function(e){return"@layer ".concat(e,", ").concat(d.name,";")})).join("\n"))):g="{".concat(g,"}"),[g,m]};function et(e,t){return s("".concat(e.join("%")).concat(t))}function tt(){return null}var nt="style";function rt(e,t){var n=e.token,s=e.path,u=e.hashId,d=e.layer,f=e.nonce,h=e.clientOnly,p=e.order,g=void 0===p?0:p,y=c.useContext(_),b=y.autoClear,w=(y.mock,y.defaultCache),E=y.hashPriority,S=y.container,C=y.ssrInline,P=y.transformers,T=y.linters,k=y.cache,M=y.layer,O=n._tokenKey,R=[O];M&&R.push("layer"),R.push.apply(R,(0,o.Z)(s));var I=N;var L=G(nt,R,(function(){var e=R.join("|");if(Xe(e)){var n=function(e){var t=Ge[e],n=null;if(t&&(0,x.Z)())if(Ye)n=qe;else{var r=document.querySelector("style[".concat(v,'="').concat(Ge[e],'"]'));r?n=r.innerHTML:delete Ge[e]}return[n,t]}(e),r=(0,i.Z)(n,2),o=r[0],a=r[1];if(o)return[o,O,a,{},h,g]}var l=t(),c=Je(l,{hashId:u,hashPriority:E,layer:M?d:void 0,path:s.join("-"),transformers:P,linters:T}),f=(0,i.Z)(c,2),p=f[0],m=f[1],A=Qe(p),y=et(R,A);return[A,O,y,m,h,g]}),(function(e,t){var n=(0,i.Z)(e,3)[2];(t||b)&&N&&(0,l.jL)(n,{mark:v})}),(function(e){var t=(0,i.Z)(e,4),n=t[0],r=(t[1],t[2]),o=t[3];if(I&&n!==qe){var s={mark:v,prepend:!M&&"queue",attachTo:S,priority:g},c="function"===typeof f?f():f;c&&(s.csp={nonce:c});var u=[],d=[];Object.keys(o).forEach((function(e){e.startsWith("@layer")?u.push(e):d.push(e)})),u.forEach((function(e){(0,l.hq)(Qe(o[e]),"_layer-".concat(e),(0,a.Z)((0,a.Z)({},s),{},{prepend:!0}))}));var h=(0,l.hq)(n,r,s);h[A]=k.instanceId,h.setAttribute(m,O),d.forEach((function(e){(0,l.hq)(Qe(o[e]),"_effect-".concat(e),s)}))}})),D=(0,i.Z)(L,3),F=D[0],j=D[1],B=D[2];return function(e){var t,n;C&&!I&&w?t=c.createElement("style",(0,te.Z)({},(n={},(0,r.Z)(n,m,j),(0,r.Z)(n,v,B),n),{dangerouslySetInnerHTML:{__html:F}})):t=c.createElement(tt,null);return c.createElement(c.Fragment,null,t,e)}}var it="cssVar";const ot=function(e,t){var n=e.key,r=e.prefix,a=e.unitless,s=e.ignore,u=e.token,d=e.scope,f=void 0===d?"":d,h=(0,c.useContext)(_),p=h.cache.instanceId,g=h.container,y=u._tokenKey,b=[].concat((0,o.Z)(e.path),[n,f,y]);return G(it,b,(function(){var e=t(),o=Z(e,n,{prefix:r,unitless:a,ignore:s,scope:f}),l=(0,i.Z)(o,2),c=l[0],u=l[1];return[c,u,et(b,u),n]}),(function(e){var t=(0,i.Z)(e,3)[2];N&&(0,l.jL)(t,{mark:v})}),(function(e){var t=(0,i.Z)(e,3),r=t[1],o=t[2];if(r){var a=(0,l.hq)(r,o,{mark:v,prepend:"queue",attachTo:g,priority:-999});a[A]=p,a.setAttribute(m,n)}}))};var at;at={},(0,r.Z)(at,nt,(function(e,t,n){var r=(0,i.Z)(e,6),o=r[0],a=r[1],s=r[2],l=r[3],c=r[4],u=r[5],d=(n||{}).plain;if(c)return null;var f=o,h={"data-rc-order":"prependQueue","data-rc-priority":"".concat(u)};return f=F(o,a,s,h,d),l&&Object.keys(l).forEach((function(e){if(!t[e]){t[e]=!0;var n=F(Qe(l[e]),a,"_effect-".concat(e),h,d);e.startsWith("@layer")?f=n+f:f+=n}})),[u,s,f]})),(0,r.Z)(at,J,(function(e,t,n){var r=(0,i.Z)(e,5),o=r[2],a=r[3],s=r[4],l=(n||{}).plain;if(!a)return null;var c=o._tokenKey;return[-999,c,F(a,s,c,{"data-rc-order":"prependQueue","data-rc-priority":"".concat(-999)},l)]})),(0,r.Z)(at,it,(function(e,t,n){var r=(0,i.Z)(e,4),o=r[1],a=r[2],s=r[3],l=(n||{}).plain;if(!o)return null;return[-999,a,F(o,s,a,{"data-rc-order":"prependQueue","data-rc-priority":"".concat(-999)},l)]}));const st=function(){function e(t,n){(0,d.Z)(this,e),(0,r.Z)(this,"name",void 0),(0,r.Z)(this,"style",void 0),(0,r.Z)(this,"_keyframe",!0),this.name=t,this.style=n}return(0,f.Z)(e,[{key:"getName",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return e?"".concat(e,"-").concat(this.name):this.name}}]),e}();function lt(e){return e.notSplit=!0,e}lt(["borderTop","borderBottom"]),lt(["borderTop"]),lt(["borderBottom"]),lt(["borderLeft","borderRight"]),lt(["borderLeft"]),lt(["borderRight"])},2567:(e,t,n)=>{"use strict";n.d(t,{Z:()=>k});var r=n(91010),i=n(13747),o=n(68185),a=n(99309),s=n(57435),l=n(12356),c=n.n(l),u=n(62810),d=n(92255),f=n(35194),h=n(69223),p=n(86263),g=n(13834),m=n(98162);function v(e){return"object"===(0,h.Z)(e)&&"string"===typeof e.name&&"string"===typeof e.theme&&("object"===(0,h.Z)(e.icon)||"function"===typeof e.icon)}function A(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object.keys(e).reduce((function(t,n){var r,i=e[n];if("class"===n)t.className=i,delete t.class;else delete t[n],t[(r=n,r.replace(/-(.)/g,(function(e,t){return t.toUpperCase()})))]=i;return t}),{})}function y(e,t,n){return n?s.createElement(e.tag,(0,f.Z)((0,f.Z)({key:t},A(e.attrs)),n),(e.children||[]).map((function(n,r){return y(n,"".concat(t,"-").concat(e.tag,"-").concat(r))}))):s.createElement(e.tag,(0,f.Z)({key:t},A(e.attrs)),(e.children||[]).map((function(n,r){return y(n,"".concat(t,"-").concat(e.tag,"-").concat(r))})))}function b(e){return(0,u.R_)(e)[0]}function _(e){return e?Array.isArray(e)?e:[e]:[]}var w=["icon","className","onClick","style","primaryColor","secondaryColor"],x={primaryColor:"#333",secondaryColor:"#E6E6E6",calculated:!1};var E=function(e){var t,n,r=e.icon,i=e.className,o=e.onClick,l=e.style,c=e.primaryColor,u=e.secondaryColor,h=(0,a.Z)(e,w),A=s.useRef(),_=x;if(c&&(_={primaryColor:c,secondaryColor:u||b(c)}),function(e){var t=(0,s.useContext)(d.Z),n=t.csp,r=t.prefixCls,i="\n.anticon {\n display: inline-flex;\n alignItems: center;\n color: inherit;\n font-style: normal;\n line-height: 0;\n text-align: center;\n text-transform: none;\n vertical-align: -0.125em;\n text-rendering: optimizeLegibility;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n\n.anticon > * {\n line-height: 1;\n}\n\n.anticon svg {\n display: inline-block;\n}\n\n.anticon::before {\n display: none;\n}\n\n.anticon .anticon-icon {\n display: block;\n}\n\n.anticon[tabindex] {\n cursor: pointer;\n}\n\n.anticon-spin::before,\n.anticon-spin {\n display: inline-block;\n -webkit-animation: loadingCircle 1s infinite linear;\n animation: loadingCircle 1s infinite linear;\n}\n\n@-webkit-keyframes loadingCircle {\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n\n@keyframes loadingCircle {\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n";r&&(i=i.replace(/anticon/g,r)),(0,s.useEffect)((function(){var t=e.current,r=(0,g.A)(t);(0,p.hq)(i,"@ant-design-icons",{prepend:!0,csp:n,attachTo:r})}),[])}(A),t=v(r),n="icon should be icon definiton, but got ".concat(r),(0,m.ZP)(t,"[@ant-design/icons] ".concat(n)),!v(r))return null;var E=r;return E&&"function"===typeof E.icon&&(E=(0,f.Z)((0,f.Z)({},E),{},{icon:E.icon(_.primaryColor,_.secondaryColor)})),y(E.icon,"svg-".concat(E.name),(0,f.Z)((0,f.Z)({className:i,onClick:o,style:l,"data-icon":E.name,width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},h),{},{ref:A}))};E.displayName="IconReact",E.getTwoToneColors=function(){return(0,f.Z)({},x)},E.setTwoToneColors=function(e){var t=e.primaryColor,n=e.secondaryColor;x.primaryColor=t,x.secondaryColor=n||b(t),x.calculated=!!n};const S=E;function C(e){var t=_(e),n=(0,i.Z)(t,2),r=n[0],o=n[1];return S.setTwoToneColors({primaryColor:r,secondaryColor:o})}var P=["className","icon","spin","rotate","tabIndex","onClick","twoToneColor"];C(u.iN.primary);var T=s.forwardRef((function(e,t){var n=e.className,l=e.icon,u=e.spin,f=e.rotate,h=e.tabIndex,p=e.onClick,g=e.twoToneColor,m=(0,a.Z)(e,P),v=s.useContext(d.Z),A=v.prefixCls,y=void 0===A?"anticon":A,b=v.rootClassName,w=c()(b,y,(0,o.Z)((0,o.Z)({},"".concat(y,"-").concat(l.name),!!l.name),"".concat(y,"-spin"),!!u||"loading"===l.name),n),x=h;void 0===x&&p&&(x=-1);var E=f?{msTransform:"rotate(".concat(f,"deg)"),transform:"rotate(".concat(f,"deg)")}:void 0,C=_(g),T=(0,i.Z)(C,2),k=T[0],M=T[1];return s.createElement("span",(0,r.Z)({role:"img","aria-label":l.name},m,{ref:t,tabIndex:x,onClick:p,className:w}),s.createElement(S,{icon:l,primaryColor:k,secondaryColor:M,style:E}))}));T.displayName="AntdIcon",T.getTwoToneColor=function(){var e=S.getTwoToneColors();return e.calculated?[e.primaryColor,e.secondaryColor]:e.primaryColor},T.setTwoToneColor=C;const k=T},92255:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=(0,n(57435).createContext)({})},3891:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(91010),i=n(57435);const o={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64c247.42 0 448 200.58 448 448S759.42 960 512 960 64 759.42 64 512 264.58 64 512 64m32.5 168c-69.67 0-86.06 16.84-86.72 39.08l-.02 1.43v46.62H291.45c-9.92 0-14.28 23.05-14.27 39.3 0 2.7 2.08 4.93 4.77 4.93h175.81v58.3h-116.5c-9.96 0-14.3 23.76-14.27 39.47a4.77 4.77 0 004.77 4.76h233.45c-4.53 41.06-15.43 77.59-30.72 109.32l-1.22 2.5-.32-.28c-60.24-28.47-120.43-52.57-194.4-52.57l-2.62.01c-84.98 1.11-144.71 56.5-145.91 127.04l-.02 1.22.02 2.13c1.24 70.4 63.56 126.45 148.52 126.45 61.25 0 116.38-16.85 163.46-45.02a138.58 138.58 0 0014.07-7.96 345.6 345.6 0 0050.3-41.16l9.45 6.35 12.46 8.32c57.53 38.26 113.76 72.62 169.86 79.27a142.62 142.62 0 0018.31 1.16c43.02 0 55-52.68 57.39-95.51l.14-2.84c.4-8.46-6.2-15.6-14.65-15.86-75.46-2.37-136.45-22.05-192-46.11l-6.27-2.75c35.15-56.8 56.66-121.81 57.15-186.66l.09-1.08c.4-5.51-4-10.2-9.52-10.2H549.33v-58.3h165.73c9.92 0 14.28-22.12 14.27-39.31a4.85 4.85 0 00-4.78-4.92H549.32v-82.35a4.8 4.8 0 00-4.83-4.78M328 583.85c54.63 0 107.08 22.41 158.1 52.19l5.76 3.4c-103.57 119.84-247.17 95.9-261.72 26.37a66.89 66.89 0 01-1.14-9.83l-.06-2.34.02-.9c.97-40.12 45.33-68.9 99.04-68.9"}}]},name:"alipay-circle",theme:"outlined"};var a=n(2567),s=function(e,t){return i.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:o}))};const l=i.forwardRef(s)},55201:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(91010),i=n(57435);const o={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M912 192H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 284H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 284H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM104 228a56 56 0 10112 0 56 56 0 10-112 0zm0 284a56 56 0 10112 0 56 56 0 10-112 0zm0 284a56 56 0 10112 0 56 56 0 10-112 0z"}}]},name:"bars",theme:"outlined"};var a=n(2567),s=function(e,t){return i.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:o}))};const l=i.forwardRef(s)},94964:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(91010),i=n(57435);const o={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M840.4 300H183.6c-19.7 0-30.7 20.8-18.5 35l328.4 380.8c9.4 10.9 27.5 10.9 37 0L858.9 335c12.2-14.2 1.2-35-18.5-35z"}}]},name:"caret-down",theme:"filled"};var a=n(2567),s=function(e,t){return i.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:o}))};const l=i.forwardRef(s)},77022:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(91010),i=n(57435);const o={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M880 184H712v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H384v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H144c-17.7 0-32 14.3-32 32v664c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V216c0-17.7-14.3-32-32-32zm-40 656H184V256h128v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h256v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h128v584zM688 420h-55.2c-5.1 0-10 2.5-13 6.6L468.9 634.4l-64.7-89c-3-4.1-7.8-6.6-13-6.6H336c-6.5 0-10.3 7.4-6.5 12.7l126.4 174a16.1 16.1 0 0026 0l212.6-292.7c3.8-5.4 0-12.8-6.5-12.8z"}}]},name:"carry-out",theme:"outlined"};var a=n(2567),s=function(e,t){return i.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:o}))};const l=i.forwardRef(s)},672:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(91010),i=n(57435);const o={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm193.5 301.7l-210.6 292a31.8 31.8 0 01-51.7 0L318.5 484.9c-3.8-5.3 0-12.7 6.5-12.7h46.9c10.2 0 19.9 4.9 25.9 13.3l71.2 98.8 157.2-218c6-8.3 15.6-13.3 25.9-13.3H699c6.5 0 10.3 7.4 6.5 12.7z"}}]},name:"check-circle",theme:"filled"};var a=n(2567),s=function(e,t){return i.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:o}))};const l=i.forwardRef(s)},49527:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(91010),i=n(57435);const o={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M912 190h-69.9c-9.8 0-19.1 4.5-25.1 12.2L404.7 724.5 207 474a32 32 0 00-25.1-12.2H112c-6.7 0-10.4 7.7-6.3 12.9l273.9 347c12.8 16.2 37.4 16.2 50.3 0l488.4-618.9c4.1-5.1.4-12.8-6.3-12.8z"}}]},name:"check",theme:"outlined"};var a=n(2567),s=function(e,t){return i.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:o}))};const l=i.forwardRef(s)},15215:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(91010),i=n(57435);const o={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64c247.4 0 448 200.6 448 448S759.4 960 512 960 64 759.4 64 512 264.6 64 512 64zm127.98 274.82h-.04l-.08.06L512 466.75 384.14 338.88c-.04-.05-.06-.06-.08-.06a.12.12 0 00-.07 0c-.03 0-.05.01-.09.05l-45.02 45.02a.2.2 0 00-.05.09.12.12 0 000 .07v.02a.27.27 0 00.06.06L466.75 512 338.88 639.86c-.05.04-.06.06-.06.08a.12.12 0 000 .07c0 .03.01.05.05.09l45.02 45.02a.2.2 0 00.09.05.12.12 0 00.07 0c.02 0 .04-.01.08-.05L512 557.25l127.86 127.87c.04.04.06.05.08.05a.12.12 0 00.07 0c.03 0 .05-.01.09-.05l45.02-45.02a.2.2 0 00.05-.09.12.12 0 000-.07v-.02a.27.27 0 00-.05-.06L557.25 512l127.87-127.86c.04-.04.05-.06.05-.08a.12.12 0 000-.07c0-.03-.01-.05-.05-.09l-45.02-45.02a.2.2 0 00-.09-.05.12.12 0 00-.07 0z"}}]},name:"close-circle",theme:"filled"};var a=n(2567),s=function(e,t){return i.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:o}))};const l=i.forwardRef(s)},16094:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(91010),i=n(57435);const o={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M799.86 166.31c.02 0 .04.02.08.06l57.69 57.7c.04.03.05.05.06.08a.12.12 0 010 .06c0 .03-.02.05-.06.09L569.93 512l287.7 287.7c.04.04.05.06.06.09a.12.12 0 010 .07c0 .02-.02.04-.06.08l-57.7 57.69c-.03.04-.05.05-.07.06a.12.12 0 01-.07 0c-.03 0-.05-.02-.09-.06L512 569.93l-287.7 287.7c-.04.04-.06.05-.09.06a.12.12 0 01-.07 0c-.02 0-.04-.02-.08-.06l-57.69-57.7c-.04-.03-.05-.05-.06-.07a.12.12 0 010-.07c0-.03.02-.05.06-.09L454.07 512l-287.7-287.7c-.04-.04-.05-.06-.06-.09a.12.12 0 010-.07c0-.02.02-.04.06-.08l57.7-57.69c.03-.04.05-.05.07-.06a.12.12 0 01.07 0c.03 0 .05.02.09.06L512 454.07l287.7-287.7c.04-.04.06-.05.09-.06a.12.12 0 01.07 0z"}}]},name:"close",theme:"outlined"};var a=n(2567),s=function(e,t){return i.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:o}))};const l=i.forwardRef(s)},83480:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(91010),i=n(57435);const o={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z"}}]},name:"copy",theme:"outlined"};var a=n(2567),s=function(e,t){return i.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:o}))};const l=i.forwardRef(s)},52451:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(91010),i=n(57435);const o={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M928 160H96c-17.7 0-32 14.3-32 32v640c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32zm-792 72h752v120H136V232zm752 560H136V440h752v352zm-237-64h165c4.4 0 8-3.6 8-8v-72c0-4.4-3.6-8-8-8H651c-4.4 0-8 3.6-8 8v72c0 4.4 3.6 8 8 8z"}}]},name:"credit-card",theme:"outlined"};var a=n(2567),s=function(e,t){return i.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:o}))};const l=i.forwardRef(s)},94574:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(91010),i=n(57435);const o={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z"}}]},name:"delete",theme:"outlined"};var a=n(2567),s=function(e,t){return i.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:o}))};const l=i.forwardRef(s)},8662:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(91010),i=n(57435);const o={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"}}]},name:"down",theme:"outlined"};var a=n(2567),s=function(e,t){return i.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:o}))};const l=i.forwardRef(s)},55159:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(91010),i=n(57435);const o={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M505.7 661a8 8 0 0012.6 0l112-141.7c4.1-5.2.4-12.9-6.3-12.9h-74.1V168c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v338.3H400c-6.7 0-10.4 7.7-6.3 12.9l112 141.8zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z"}}]},name:"download",theme:"outlined"};var a=n(2567),s=function(e,t){return i.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:o}))};const l=i.forwardRef(s)},33049:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(91010),i=n(57435);const o={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M257.7 752c2 0 4-.2 6-.5L431.9 722c2-.4 3.9-1.3 5.3-2.8l423.9-423.9a9.96 9.96 0 000-14.1L694.9 114.9c-1.9-1.9-4.4-2.9-7.1-2.9s-5.2 1-7.1 2.9L256.8 538.8c-1.5 1.5-2.4 3.3-2.8 5.3l-29.5 168.2a33.5 33.5 0 009.4 29.8c6.6 6.4 14.9 9.9 23.8 9.9zm67.4-174.4L687.8 215l73.3 73.3-362.7 362.6-88.9 15.7 15.6-89zM880 836H144c-17.7 0-32 14.3-32 32v36c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-36c0-17.7-14.3-32-32-32z"}}]},name:"edit",theme:"outlined"};var a=n(2567),s=function(e,t){return i.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:o}))};const l=i.forwardRef(s)},88966:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(91010),i=n(57435);const o={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M176 511a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0z"}}]},name:"ellipsis",theme:"outlined"};var a=n(2567),s=function(e,t){return i.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:o}))};const l=i.forwardRef(s)},1625:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(91010),i=n(57435);const o={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M864 170h-60c-4.4 0-8 3.6-8 8v518H310v-73c0-6.7-7.8-10.5-13-6.3l-141.9 112a8 8 0 000 12.6l141.9 112c5.3 4.2 13 .4 13-6.3v-75h498c35.3 0 64-28.7 64-64V178c0-4.4-3.6-8-8-8z"}}]},name:"enter",theme:"outlined"};var a=n(2567),s=function(e,t){return i.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:o}))};const l=i.forwardRef(s)},51701:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(91010),i=n(57435);const o={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm-32 232c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V296zm32 440a48.01 48.01 0 010-96 48.01 48.01 0 010 96z"}}]},name:"exclamation-circle",theme:"filled"};var a=n(2567),s=function(e,t){return i.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:o}))};const l=i.forwardRef(s)},46779:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(91010),i=n(57435);const o={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M942.2 486.2Q889.47 375.11 816.7 305l-50.88 50.88C807.31 395.53 843.45 447.4 874.7 512 791.5 684.2 673.4 766 512 766q-72.67 0-133.87-22.38L323 798.75Q408 838 512 838q288.3 0 430.2-300.3a60.29 60.29 0 000-51.5zm-63.57-320.64L836 122.88a8 8 0 00-11.32 0L715.31 232.2Q624.86 186 512 186q-288.3 0-430.2 300.3a60.3 60.3 0 000 51.5q56.69 119.4 136.5 191.41L112.48 835a8 8 0 000 11.31L155.17 889a8 8 0 0011.31 0l712.15-712.12a8 8 0 000-11.32zM149.3 512C232.6 339.8 350.7 258 512 258c54.54 0 104.13 9.36 149.12 28.39l-70.3 70.3a176 176 0 00-238.13 238.13l-83.42 83.42C223.1 637.49 183.3 582.28 149.3 512zm246.7 0a112.11 112.11 0 01146.2-106.69L401.31 546.2A112 112 0 01396 512z"}},{tag:"path",attrs:{d:"M508 624c-3.46 0-6.87-.16-10.25-.47l-52.82 52.82a176.09 176.09 0 00227.42-227.42l-52.82 52.82c.31 3.38.47 6.79.47 10.25a111.94 111.94 0 01-112 112z"}}]},name:"eye-invisible",theme:"outlined"};var a=n(2567),s=function(e,t){return i.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:o}))};const l=i.forwardRef(s)},73558:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(91010),i=n(57435);const o={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M942.2 486.2C847.4 286.5 704.1 186 512 186c-192.2 0-335.4 100.5-430.2 300.3a60.3 60.3 0 000 51.5C176.6 737.5 319.9 838 512 838c192.2 0 335.4-100.5 430.2-300.3 7.7-16.2 7.7-35 0-51.5zM512 766c-161.3 0-279.4-81.8-362.7-254C232.6 339.8 350.7 258 512 258c161.3 0 279.4 81.8 362.7 254C791.5 684.2 673.4 766 512 766zm-4-430c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm0 288c-61.9 0-112-50.1-112-112s50.1-112 112-112 112 50.1 112 112-50.1 112-112 112z"}}]},name:"eye",theme:"outlined"};var a=n(2567),s=function(e,t){return i.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:o}))};const l=i.forwardRef(s)},74682:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(91010),i=n(57435);const o={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494z"}}]},name:"file",theme:"outlined"};var a=n(2567),s=function(e,t){return i.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:o}))};const l=i.forwardRef(s)},6069:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(91010),i=n(57435);const o={icon:function(e,t){return{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M534 352V136H232v752h560V394H576a42 42 0 01-42-42z",fill:t}},{tag:"path",attrs:{d:"M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM602 137.8L790.2 326H602V137.8zM792 888H232V136h302v216a42 42 0 0042 42h216v494z",fill:e}}]}},name:"file",theme:"twotone"};var a=n(2567),s=function(e,t){return i.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:o}))};const l=i.forwardRef(s)},25065:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(91010),i=n(57435);const o={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm32 664c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V456c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272zm-32-344a48.01 48.01 0 010-96 48.01 48.01 0 010 96z"}}]},name:"info-circle",theme:"filled"};var a=n(2567),s=function(e,t){return i.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:o}))};const l=i.forwardRef(s)},72557:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(91010),i=n(57435);const o={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M724 218.3V141c0-6.7-7.7-10.4-12.9-6.3L260.3 486.8a31.86 31.86 0 000 50.3l450.8 352.1c5.3 4.1 12.9.4 12.9-6.3v-77.3c0-4.9-2.3-9.6-6.1-12.6l-360-281 360-281.1c3.8-3 6.1-7.7 6.1-12.6z"}}]},name:"left",theme:"outlined"};var a=n(2567),s=function(e,t){return i.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:o}))};const l=i.forwardRef(s)},90918:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(91010),i=n(57435);const o={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M988 548c-19.9 0-36-16.1-36-36 0-59.4-11.6-117-34.6-171.3a440.45 440.45 0 00-94.3-139.9 437.71 437.71 0 00-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.3C772.3 66 827 103 874 150c47 47 83.9 101.8 109.7 162.7 26.7 63.1 40.2 130.2 40.2 199.3.1 19.9-16 36-35.9 36z"}}]},name:"loading",theme:"outlined"};var a=n(2567),s=function(e,t){return i.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:o}))};const l=i.forwardRef(s)},68088:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(91010),i=n(57435);const o={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M328 544h368c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8z"}},{tag:"path",attrs:{d:"M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z"}}]},name:"minus-square",theme:"outlined"};var a=n(2567),s=function(e,t){return i.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:o}))};const l=i.forwardRef(s)},84415:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(91010),i=n(57435);const o={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M779.3 196.6c-94.2-94.2-247.6-94.2-341.7 0l-261 260.8c-1.7 1.7-2.6 4-2.6 6.4s.9 4.7 2.6 6.4l36.9 36.9a9 9 0 0012.7 0l261-260.8c32.4-32.4 75.5-50.2 121.3-50.2s88.9 17.8 121.2 50.2c32.4 32.4 50.2 75.5 50.2 121.2 0 45.8-17.8 88.8-50.2 121.2l-266 265.9-43.1 43.1c-40.3 40.3-105.8 40.3-146.1 0-19.5-19.5-30.2-45.4-30.2-73s10.7-53.5 30.2-73l263.9-263.8c6.7-6.6 15.5-10.3 24.9-10.3h.1c9.4 0 18.1 3.7 24.7 10.3 6.7 6.7 10.3 15.5 10.3 24.9 0 9.3-3.7 18.1-10.3 24.7L372.4 653c-1.7 1.7-2.6 4-2.6 6.4s.9 4.7 2.6 6.4l36.9 36.9a9 9 0 0012.7 0l215.6-215.6c19.9-19.9 30.8-46.3 30.8-74.4s-11-54.6-30.8-74.4c-41.1-41.1-107.9-41-149 0L463 364 224.8 602.1A172.22 172.22 0 00174 724.8c0 46.3 18.1 89.8 50.8 122.5 33.9 33.8 78.3 50.7 122.7 50.7 44.4 0 88.8-16.9 122.6-50.7l309.2-309C824.8 492.7 850 432 850 367.5c.1-64.6-25.1-125.3-70.7-170.9z"}}]},name:"paper-clip",theme:"outlined"};var a=n(2567),s=function(e,t){return i.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:o}))};const l=i.forwardRef(s)},37215:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(91010),i=n(57435);const o={icon:function(e,t){return{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M928 160H96c-17.7 0-32 14.3-32 32v640c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32zm-40 632H136v-39.9l138.5-164.3 150.1 178L658.1 489 888 761.6V792zm0-129.8L664.2 396.8c-3.2-3.8-9-3.8-12.2 0L424.6 666.4l-144-170.7c-3.2-3.8-9-3.8-12.2 0L136 652.7V232h752v430.2z",fill:e}},{tag:"path",attrs:{d:"M424.6 765.8l-150.1-178L136 752.1V792h752v-30.4L658.1 489z",fill:t}},{tag:"path",attrs:{d:"M136 652.7l132.4-157c3.2-3.8 9-3.8 12.2 0l144 170.7L652 396.8c3.2-3.8 9-3.8 12.2 0L888 662.2V232H136v420.7zM304 280a88 88 0 110 176 88 88 0 010-176z",fill:t}},{tag:"path",attrs:{d:"M276 368a28 28 0 1056 0 28 28 0 10-56 0z",fill:t}},{tag:"path",attrs:{d:"M304 456a88 88 0 100-176 88 88 0 000 176zm0-116c15.5 0 28 12.5 28 28s-12.5 28-28 28-28-12.5-28-28 12.5-28 28-28z",fill:e}}]}},name:"picture",theme:"twotone"};var a=n(2567),s=function(e,t){return i.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:o}))};const l=i.forwardRef(s)},91434:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(91010),i=n(57435);const o={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M482 152h60q8 0 8 8v704q0 8-8 8h-60q-8 0-8-8V160q0-8 8-8z"}},{tag:"path",attrs:{d:"M192 474h672q8 0 8 8v60q0 8-8 8H160q-8 0-8-8v-60q0-8 8-8z"}}]},name:"plus",theme:"outlined"};var a=n(2567),s=function(e,t){return i.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:o}))};const l=i.forwardRef(s)},88266:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(91010),i=n(57435);const o={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M328 544h152v152c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V544h152c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H544V328c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v152H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8z"}},{tag:"path",attrs:{d:"M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z"}}]},name:"plus-square",theme:"outlined"};var a=n(2567),s=function(e,t){return i.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:o}))};const l=i.forwardRef(s)},90304:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(91010),i=n(57435);const o={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M623.6 316.7C593.6 290.4 554 276 512 276s-81.6 14.5-111.6 40.7C369.2 344 352 380.7 352 420v7.6c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V420c0-44.1 43.1-80 96-80s96 35.9 96 80c0 31.1-22 59.6-56.1 72.7-21.2 8.1-39.2 22.3-52.1 40.9-13.1 19-19.9 41.8-19.9 64.9V620c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8v-22.7a48.3 48.3 0 0130.9-44.8c59-22.7 97.1-74.7 97.1-132.5.1-39.3-17.1-76-48.3-103.3zM472 732a40 40 0 1080 0 40 40 0 10-80 0z"}}]},name:"question-circle",theme:"outlined"};var a=n(2567),s=function(e,t){return i.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:o}))};const l=i.forwardRef(s)},79564:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(91010),i=n(57435);const o={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M909.1 209.3l-56.4 44.1C775.8 155.1 656.2 92 521.9 92 290 92 102.3 279.5 102 511.5 101.7 743.7 289.8 932 521.9 932c181.3 0 335.8-115 394.6-276.1 1.5-4.2-.7-8.9-4.9-10.3l-56.7-19.5a8 8 0 00-10.1 4.8c-1.8 5-3.8 10-5.9 14.9-17.3 41-42.1 77.8-73.7 109.4A344.77 344.77 0 01655.9 829c-42.3 17.9-87.4 27-133.8 27-46.5 0-91.5-9.1-133.8-27A341.5 341.5 0 01279 755.2a342.16 342.16 0 01-73.7-109.4c-17.9-42.4-27-87.4-27-133.9s9.1-91.5 27-133.9c17.3-41 42.1-77.8 73.7-109.4 31.6-31.6 68.4-56.4 109.3-73.8 42.3-17.9 87.4-27 133.8-27 46.5 0 91.5 9.1 133.8 27a341.5 341.5 0 01109.3 73.8c9.9 9.9 19.2 20.4 27.8 31.4l-60.2 47a8 8 0 003 14.1l175.6 43c5 1.2 9.9-2.6 9.9-7.7l.8-180.9c-.1-6.6-7.8-10.3-13-6.2z"}}]},name:"reload",theme:"outlined"};var a=n(2567),s=function(e,t){return i.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:o}))};const l=i.forwardRef(s)},81774:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(91010),i=n(57435);const o={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M765.7 486.8L314.9 134.7A7.97 7.97 0 00302 141v77.3c0 4.9 2.3 9.6 6.1 12.6l360 281.1-360 281.1c-3.9 3-6.1 7.7-6.1 12.6V883c0 6.7 7.7 10.4 12.9 6.3l450.8-352.1a31.96 31.96 0 000-50.4z"}}]},name:"right",theme:"outlined"};var a=n(2567),s=function(e,t){return i.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:o}))};const l=i.forwardRef(s)},10786:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(91010),i=n(57435);const o={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M909.6 854.5L649.9 594.8C690.2 542.7 712 479 712 412c0-80.2-31.3-155.4-87.9-212.1-56.6-56.7-132-87.9-212.1-87.9s-155.5 31.3-212.1 87.9C143.2 256.5 112 331.8 112 412c0 80.1 31.3 155.5 87.9 212.1C256.5 680.8 331.8 712 412 712c67 0 130.6-21.8 182.7-62l259.7 259.6a8.2 8.2 0 0011.6 0l43.6-43.5a8.2 8.2 0 000-11.6zM570.4 570.4C528 612.7 471.8 636 412 636s-116-23.3-158.4-65.6C211.3 528 188 471.8 188 412s23.3-116.1 65.6-158.4C296 211.3 352.2 188 412 188s116.1 23.2 158.4 65.6S636 352.2 636 412s-23.3 116.1-65.6 158.4z"}}]},name:"search",theme:"outlined"};var a=n(2567),s=function(e,t){return i.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:o}))};const l=i.forwardRef(s)},85268:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(91010),i=n(57435);const o={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M890.5 755.3L537.9 269.2c-12.8-17.6-39-17.6-51.7 0L133.5 755.3A8 8 0 00140 768h75c5.1 0 9.9-2.5 12.9-6.6L512 369.8l284.1 391.6c3 4.1 7.8 6.6 12.9 6.6h75c6.5 0 10.3-7.4 6.5-12.7z"}}]},name:"up",theme:"outlined"};var a=n(2567),s=function(e,t){return i.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:o}))};const l=i.forwardRef(s)},81114:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(91010),i=n(57435);const o={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M690.1 377.4c5.9 0 11.8.2 17.6.5-24.4-128.7-158.3-227.1-319.9-227.1C209 150.8 64 271.4 64 420.2c0 81.1 43.6 154.2 111.9 203.6a21.5 21.5 0 019.1 17.6c0 2.4-.5 4.6-1.1 6.9-5.5 20.3-14.2 52.8-14.6 54.3-.7 2.6-1.7 5.2-1.7 7.9 0 5.9 4.8 10.8 10.8 10.8 2.3 0 4.2-.9 6.2-2l70.9-40.9c5.3-3.1 11-5 17.2-5 3.2 0 6.4.5 9.5 1.4 33.1 9.5 68.8 14.8 105.7 14.8 6 0 11.9-.1 17.8-.4-7.1-21-10.9-43.1-10.9-66 0-135.8 132.2-245.8 295.3-245.8zm-194.3-86.5c23.8 0 43.2 19.3 43.2 43.1s-19.3 43.1-43.2 43.1c-23.8 0-43.2-19.3-43.2-43.1s19.4-43.1 43.2-43.1zm-215.9 86.2c-23.8 0-43.2-19.3-43.2-43.1s19.3-43.1 43.2-43.1 43.2 19.3 43.2 43.1-19.4 43.1-43.2 43.1zm586.8 415.6c56.9-41.2 93.2-102 93.2-169.7 0-124-120.8-224.5-269.9-224.5-149 0-269.9 100.5-269.9 224.5S540.9 847.5 690 847.5c30.8 0 60.6-4.4 88.1-12.3 2.6-.8 5.2-1.2 7.9-1.2 5.2 0 9.9 1.6 14.3 4.1l59.1 34c1.7 1 3.3 1.7 5.2 1.7a9 9 0 006.4-2.6 9 9 0 002.6-6.4c0-2.2-.9-4.4-1.4-6.6-.3-1.2-7.6-28.3-12.2-45.3-.5-1.9-.9-3.8-.9-5.7.1-5.9 3.1-11.2 7.6-14.5zM600.2 587.2c-19.9 0-36-16.1-36-35.9 0-19.8 16.1-35.9 36-35.9s36 16.1 36 35.9c0 19.8-16.2 35.9-36 35.9zm179.9 0c-19.9 0-36-16.1-36-35.9 0-19.8 16.1-35.9 36-35.9s36 16.1 36 35.9a36.08 36.08 0 01-36 35.9z"}}]},name:"wechat",theme:"outlined"};var a=n(2567),s=function(e,t){return i.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:o}))};const l=i.forwardRef(s)},66746:(e,t,n)=>{"use strict";n.d(t,{Z:()=>oe});var r=n(91010),i=n(35194),o=n(66375),a=n(1959),s=n(4041),l=n(22935),c=n(72693),u=n(64648),d=n(68185),f=n(57435),h=n(69223),p=n(99309);const g={animating:!1,autoplaying:null,currentDirection:0,currentLeft:null,currentSlide:0,direction:1,dragging:!1,edgeDragged:!1,initialized:!1,lazyLoadedList:[],listHeight:null,listWidth:null,scrolling:!1,slideCount:null,slideHeight:null,slideWidth:null,swipeLeft:null,swiped:!1,swiping:!1,touchObject:{startX:0,startY:0,curX:0,curY:0},trackStyle:{},trackWidth:0,targetSlide:0};var m=n(38078),v=n(12356),A=n.n(v);const y={accessibility:!0,adaptiveHeight:!1,afterChange:null,appendDots:function(e){return f.createElement("ul",{style:{display:"block"}},e)},arrows:!0,autoplay:!1,autoplaySpeed:3e3,beforeChange:null,centerMode:!1,centerPadding:"50px",className:"",cssEase:"ease",customPaging:function(e){return f.createElement("button",null,e+1)},dots:!1,dotsClass:"slick-dots",draggable:!0,easing:"linear",edgeFriction:.35,fade:!1,focusOnSelect:!1,infinite:!0,initialSlide:0,lazyLoad:null,nextArrow:null,onEdge:null,onInit:null,onLazyLoadError:null,onReInit:null,pauseOnDotsHover:!1,pauseOnFocus:!1,pauseOnHover:!0,prevArrow:null,responsive:null,rows:1,rtl:!1,slide:"div",slidesPerRow:1,slidesToScroll:1,slidesToShow:1,speed:500,swipe:!0,swipeEvent:null,swipeToSlide:!1,touchMove:!0,touchThreshold:5,useCSS:!0,useTransform:!0,variableWidth:!1,vertical:!1,waitForAnimate:!0,asNavFor:null};function b(e,t,n){return Math.max(t,Math.min(e,n))}var _=function(e){["onTouchStart","onTouchMove","onWheel"].includes(e._reactName)||e.preventDefault()},w=function(e){for(var t=[],n=x(e),r=E(e),i=n;i0?1:0):0},C=function(e){return e.centerMode?Math.floor((e.slidesToShow-1)/2)+1+(parseInt(e.centerPadding)>0?1:0):e.slidesToShow},P=function(e){return e&&e.offsetWidth||0},T=function(e){return e&&e.offsetHeight||0},k=function(e){var t,n,r,i,o=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return t=e.startX-e.curX,n=e.startY-e.curY,r=Math.atan2(n,t),(i=Math.round(180*r/Math.PI))<0&&(i=360-Math.abs(i)),i<=45&&i>=0||i<=360&&i>=315?"left":i>=135&&i<=225?"right":!0===o?i>=35&&i<=135?"up":"down":"vertical"},M=function(e){var t=!0;return e.infinite||(e.centerMode&&e.currentSlide>=e.slideCount-1||e.slideCount<=e.slidesToShow||e.currentSlide>=e.slideCount-e.slidesToShow)&&(t=!1),t},O=function(e,t){var n={};return t.forEach((function(t){return n[t]=e[t]})),n},R=function(e,t){var n=function(e){for(var t=e.infinite?2*e.slideCount:e.slideCount,n=e.infinite?-1*e.slidesToShow:0,r=e.infinite?-1*e.slidesToShow:0,i=[];nn[n.length-1])t=n[n.length-1];else for(var i in n){if(t-1*e.swipeLeft)return n=r,!1}else if(r.offsetLeft-t+P(r)/2>-1*e.swipeLeft)return n=r,!1;return!0})),!n)return 0;var o=!0===e.rtl?e.slideCount-e.currentSlide:e.currentSlide;return Math.abs(n.dataset.index-o)||1}return e.slidesToScroll},L=function(e,t){return t.reduce((function(t,n){return t&&e.hasOwnProperty(n)}),!0)?null:console.error("Keys Missing:",e)},N=function(e){var t,n;(L(e,["left","variableWidth","slideCount","slidesToShow","slideWidth"]),e.vertical)?n=(e.unslick?e.slideCount:e.slideCount+2*e.slidesToShow)*e.slideHeight:t=Z(e)*e.slideWidth;var r={opacity:1,transition:"",WebkitTransition:""};if(e.useTransform){var o=e.vertical?"translate3d(0px, "+e.left+"px, 0px)":"translate3d("+e.left+"px, 0px, 0px)",a=e.vertical?"translate3d(0px, "+e.left+"px, 0px)":"translate3d("+e.left+"px, 0px, 0px)",s=e.vertical?"translateY("+e.left+"px)":"translateX("+e.left+"px)";r=(0,i.Z)((0,i.Z)({},r),{},{WebkitTransform:o,transform:a,msTransform:s})}else e.vertical?r.top=e.left:r.left=e.left;return e.fade&&(r={opacity:1}),t&&(r.width=t),n&&(r.height=n),window&&!window.addEventListener&&window.attachEvent&&(e.vertical?r.marginTop=e.left+"px":r.marginLeft=e.left+"px"),r},D=function(e){L(e,["left","variableWidth","slideCount","slidesToShow","slideWidth","speed","cssEase"]);var t=N(e);return e.useTransform?(t.WebkitTransition="-webkit-transform "+e.speed+"ms "+e.cssEase,t.transition="transform "+e.speed+"ms "+e.cssEase):e.vertical?t.transition="top "+e.speed+"ms "+e.cssEase:t.transition="left "+e.speed+"ms "+e.cssEase,t},F=function(e){if(e.unslick)return 0;L(e,["slideIndex","trackRef","infinite","centerMode","slideCount","slidesToShow","slidesToScroll","slideWidth","listWidth","variableWidth","slideHeight"]);var t,n,r=e.slideIndex,i=e.trackRef,o=e.infinite,a=e.centerMode,s=e.slideCount,l=e.slidesToShow,c=e.slidesToScroll,u=e.slideWidth,d=e.listWidth,f=e.variableWidth,h=e.slideHeight,p=e.fade,g=e.vertical;if(p||1===e.slideCount)return 0;var m=0;if(o?(m=-j(e),s%c!==0&&r+c>s&&(m=-(r>s?l-(r-s):s%c)),a&&(m+=parseInt(l/2))):(s%c!==0&&r+c>s&&(m=l-s%c),a&&(m=parseInt(l/2))),t=g?r*h*-1+m*h:r*u*-1+m*u,!0===f){var v,A=i&&i.node;if(v=r+j(e),t=(n=A&&A.childNodes[v])?-1*n.offsetLeft:0,!0===a){v=o?r+j(e):r,n=A&&A.children[v],t=0;for(var y=0;ye.currentSlide?e.targetSlide>e.currentSlide+U(e)?"left":"right":e.targetSlide0&&(o+=1),r&&t%2===0&&(o+=1),o}return r?0:t-1},H=function(e){var t=e.slidesToShow,n=e.centerMode,r=e.rtl,i=e.centerPadding;if(n){var o=(t-1)/2+1;return parseInt(i)>0&&(o+=1),r||t%2!==0||(o+=1),o}return r?t-1:0},V=function(){return!("undefined"===typeof window||!window.document||!window.document.createElement)},W=Object.keys(y);var G=function(e){var t,n,r,i,o;return r=(o=e.rtl?e.slideCount-1-e.index:e.index)<0||o>=e.slideCount,e.centerMode?(i=Math.floor(e.slidesToShow/2),n=(o-e.currentSlide)%e.slideCount===0,o>e.currentSlide-i-1&&o<=e.currentSlide+i&&(t=!0)):t=e.currentSlide<=o&&o=e.slideCount?e.targetSlide-e.slideCount:e.targetSlide)}},K=function(e,t){return e.key+"-"+t},q=function(e){var t,n=[],r=[],o=[],a=f.Children.count(e.children),s=x(e),l=E(e);return f.Children.forEach(e.children,(function(c,u){var d,h={message:"children",index:u,slidesToScroll:e.slidesToScroll,currentSlide:e.currentSlide};d=!e.lazyLoad||e.lazyLoad&&e.lazyLoadedList.indexOf(u)>=0?c:f.createElement("div",null);var p=function(e){var t={};return void 0!==e.variableWidth&&!1!==e.variableWidth||(t.width=e.slideWidth),e.fade&&(t.position="relative",e.vertical&&e.slideHeight?t.top=-e.index*parseInt(e.slideHeight):t.left=-e.index*parseInt(e.slideWidth),t.opacity=e.currentSlide===e.index?1:0,t.zIndex=e.currentSlide===e.index?999:998,e.useCSS&&(t.transition="opacity "+e.speed+"ms "+e.cssEase+", visibility "+e.speed+"ms "+e.cssEase)),t}((0,i.Z)((0,i.Z)({},e),{},{index:u})),g=d.props.className||"",m=G((0,i.Z)((0,i.Z)({},e),{},{index:u}));if(n.push(f.cloneElement(d,{key:"original"+K(d,u),"data-index":u,className:A()(m,g),tabIndex:"-1","aria-hidden":!m["slick-active"],style:(0,i.Z)((0,i.Z)({outline:"none"},d.props.style||{}),p),onClick:function(t){d.props&&d.props.onClick&&d.props.onClick(t),e.focusOnSelect&&e.focusOnSelect(h)}})),e.infinite&&a>1&&!1===e.fade&&!e.unslick){var v=a-u;v<=j(e)&&((t=-v)>=s&&(d=c),m=G((0,i.Z)((0,i.Z)({},e),{},{index:t})),r.push(f.cloneElement(d,{key:"precloned"+K(d,t),"data-index":t,tabIndex:"-1",className:A()(m,g),"aria-hidden":!m["slick-active"],style:(0,i.Z)((0,i.Z)({},d.props.style||{}),p),onClick:function(t){d.props&&d.props.onClick&&d.props.onClick(t),e.focusOnSelect&&e.focusOnSelect(h)}}))),(t=a+u)=_&&u<=v:u===_}),x={message:"dots",index:g,slidesToScroll:s,currentSlide:u},E=this.clickHandler.bind(this,x);p=p.concat(f.createElement("li",{key:g,className:w},f.cloneElement(this.props.customPaging(g),{onClick:E})))}return f.cloneElement(this.props.appendDots(p),(0,i.Z)({className:this.props.dotsClass},h))}}])}(f.PureComponent);function $(e,t,n){return t=(0,c.Z)(t),(0,s.Z)(e,(0,l.Z)()?Reflect.construct(t,n||[],(0,c.Z)(e).constructor):t.apply(e,n))}var Q=function(e){function t(){return(0,o.Z)(this,t),$(this,t,arguments)}return(0,u.Z)(t,e),(0,a.Z)(t,[{key:"clickHandler",value:function(e,t){t&&t.preventDefault(),this.props.clickHandler(e,t)}},{key:"render",value:function(){var e={"slick-arrow":!0,"slick-prev":!0},t=this.clickHandler.bind(this,{message:"previous"});!this.props.infinite&&(0===this.props.currentSlide||this.props.slideCount<=this.props.slidesToShow)&&(e["slick-disabled"]=!0,t=null);var n={key:"0","data-role":"none",className:A()(e),style:{display:"block"},onClick:t},o={currentSlide:this.props.currentSlide,slideCount:this.props.slideCount};return this.props.prevArrow?f.cloneElement(this.props.prevArrow,(0,i.Z)((0,i.Z)({},n),o)):f.createElement("button",(0,r.Z)({key:"0",type:"button"},n)," ","Previous")}}])}(f.PureComponent),J=function(e){function t(){return(0,o.Z)(this,t),$(this,t,arguments)}return(0,u.Z)(t,e),(0,a.Z)(t,[{key:"clickHandler",value:function(e,t){t&&t.preventDefault(),this.props.clickHandler(e,t)}},{key:"render",value:function(){var e={"slick-arrow":!0,"slick-next":!0},t=this.clickHandler.bind(this,{message:"next"});M(this.props)||(e["slick-disabled"]=!0,t=null);var n={key:"1","data-role":"none",className:A()(e),style:{display:"block"},onClick:t},o={currentSlide:this.props.currentSlide,slideCount:this.props.slideCount};return this.props.nextArrow?f.cloneElement(this.props.nextArrow,(0,i.Z)((0,i.Z)({},n),o)):f.createElement("button",(0,r.Z)({key:"1",type:"button"},n)," ","Next")}}])}(f.PureComponent),ee=n(46890),te=["animating"];var ne=function(e){function t(e){var n;(0,o.Z)(this,t),n=function(e,t,n){return t=(0,c.Z)(t),(0,s.Z)(e,(0,l.Z)()?Reflect.construct(t,n||[],(0,c.Z)(e).constructor):t.apply(e,n))}(this,t,[e]),(0,d.Z)(n,"listRefHandler",(function(e){return n.list=e})),(0,d.Z)(n,"trackRefHandler",(function(e){return n.track=e})),(0,d.Z)(n,"adaptHeight",(function(){if(n.props.adaptiveHeight&&n.list){var e=n.list.querySelector('[data-index="'.concat(n.state.currentSlide,'"]'));n.list.style.height=T(e)+"px"}})),(0,d.Z)(n,"componentDidMount",(function(){if(n.props.onInit&&n.props.onInit(),n.props.lazyLoad){var e=w((0,i.Z)((0,i.Z)({},n.props),n.state));e.length>0&&(n.setState((function(t){return{lazyLoadedList:t.lazyLoadedList.concat(e)}})),n.props.onLazyLoad&&n.props.onLazyLoad(e))}var t=(0,i.Z)({listRef:n.list,trackRef:n.track},n.props);n.updateState(t,!0,(function(){n.adaptHeight(),n.props.autoplay&&n.autoPlay("playing")})),"progressive"===n.props.lazyLoad&&(n.lazyLoadTimer=setInterval(n.progressiveLazyLoad,1e3)),n.ro=new ee.Z((function(){n.state.animating?(n.onWindowResized(!1),n.callbackTimers.push(setTimeout((function(){return n.onWindowResized()}),n.props.speed))):n.onWindowResized()})),n.ro.observe(n.list),document.querySelectorAll&&Array.prototype.forEach.call(document.querySelectorAll(".slick-slide"),(function(e){e.onfocus=n.props.pauseOnFocus?n.onSlideFocus:null,e.onblur=n.props.pauseOnFocus?n.onSlideBlur:null})),window.addEventListener?window.addEventListener("resize",n.onWindowResized):window.attachEvent("onresize",n.onWindowResized)})),(0,d.Z)(n,"componentWillUnmount",(function(){n.animationEndCallback&&clearTimeout(n.animationEndCallback),n.lazyLoadTimer&&clearInterval(n.lazyLoadTimer),n.callbackTimers.length&&(n.callbackTimers.forEach((function(e){return clearTimeout(e)})),n.callbackTimers=[]),window.addEventListener?window.removeEventListener("resize",n.onWindowResized):window.detachEvent("onresize",n.onWindowResized),n.autoplayTimer&&clearInterval(n.autoplayTimer),n.ro.disconnect()})),(0,d.Z)(n,"componentDidUpdate",(function(e){if(n.checkImagesLoad(),n.props.onReInit&&n.props.onReInit(),n.props.lazyLoad){var t=w((0,i.Z)((0,i.Z)({},n.props),n.state));t.length>0&&(n.setState((function(e){return{lazyLoadedList:e.lazyLoadedList.concat(t)}})),n.props.onLazyLoad&&n.props.onLazyLoad(t))}n.adaptHeight();var r=(0,i.Z)((0,i.Z)({listRef:n.list,trackRef:n.track},n.props),n.state),o=n.didPropsChange(e);o&&n.updateState(r,o,(function(){n.state.currentSlide>=f.Children.count(n.props.children)&&n.changeSlide({message:"index",index:f.Children.count(n.props.children)-n.props.slidesToShow,currentSlide:n.state.currentSlide}),e.autoplay===n.props.autoplay&&e.autoplaySpeed===n.props.autoplaySpeed||(!e.autoplay&&n.props.autoplay?n.autoPlay("playing"):n.props.autoplay?n.autoPlay("update"):n.pause("paused"))}))})),(0,d.Z)(n,"onWindowResized",(function(e){n.debouncedResize&&n.debouncedResize.cancel(),n.debouncedResize=(0,m.D)(50,(function(){return n.resizeWindow(e)})),n.debouncedResize()})),(0,d.Z)(n,"resizeWindow",(function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];if(Boolean(n.track&&n.track.node)){var t=(0,i.Z)((0,i.Z)({listRef:n.list,trackRef:n.track},n.props),n.state);n.updateState(t,e,(function(){n.props.autoplay?n.autoPlay("update"):n.pause("paused")})),n.setState({animating:!1}),clearTimeout(n.animationEndCallback),delete n.animationEndCallback}})),(0,d.Z)(n,"updateState",(function(e,t,r){var o=function(e){var t,n=f.Children.count(e.children),r=e.listRef,o=Math.ceil(P(r)),a=e.trackRef&&e.trackRef.node,s=Math.ceil(P(a));if(e.vertical)t=o;else{var l=e.centerMode&&2*parseInt(e.centerPadding);"string"===typeof e.centerPadding&&"%"===e.centerPadding.slice(-1)&&(l*=o/100),t=Math.ceil((o-l)/e.slidesToShow)}var c=r&&T(r.querySelector('[data-index="0"]')),u=c*e.slidesToShow,d=void 0===e.currentSlide?e.initialSlide:e.currentSlide;e.rtl&&void 0===e.currentSlide&&(d=n-1-e.initialSlide);var h=e.lazyLoadedList||[],p=w((0,i.Z)((0,i.Z)({},e),{},{currentSlide:d,lazyLoadedList:h})),g={slideCount:n,slideWidth:t,listWidth:o,trackWidth:s,currentSlide:d,slideHeight:c,listHeight:u,lazyLoadedList:h=h.concat(p)};return null===e.autoplaying&&e.autoplay&&(g.autoplaying="playing"),g}(e);e=(0,i.Z)((0,i.Z)((0,i.Z)({},e),o),{},{slideIndex:o.currentSlide});var a=F(e);e=(0,i.Z)((0,i.Z)({},e),{},{left:a});var s=N(e);(t||f.Children.count(n.props.children)!==f.Children.count(e.children))&&(o.trackStyle=s),n.setState(o,r)})),(0,d.Z)(n,"ssrInit",(function(){if(n.props.variableWidth){var e=0,t=0,r=[],o=j((0,i.Z)((0,i.Z)((0,i.Z)({},n.props),n.state),{},{slideCount:n.props.children.length})),a=B((0,i.Z)((0,i.Z)((0,i.Z)({},n.props),n.state),{},{slideCount:n.props.children.length}));n.props.children.forEach((function(t){r.push(t.props.style.width),e+=t.props.style.width}));for(var s=0;s=t&&n.onWindowResized()};if(e.onclick){var o=e.onclick;e.onclick=function(t){o(t),e.parentNode.focus()}}else e.onclick=function(){return e.parentNode.focus()};e.onload||(n.props.lazyLoad?e.onload=function(){n.adaptHeight(),n.callbackTimers.push(setTimeout(n.onWindowResized,n.props.speed))}:(e.onload=i,e.onerror=function(){i(),n.props.onLazyLoadError&&n.props.onLazyLoadError()}))}))})),(0,d.Z)(n,"progressiveLazyLoad",(function(){for(var e=[],t=(0,i.Z)((0,i.Z)({},n.props),n.state),r=n.state.currentSlide;r=-j(t);o--)if(n.state.lazyLoadedList.indexOf(o)<0){e.push(o);break}e.length>0?(n.setState((function(t){return{lazyLoadedList:t.lazyLoadedList.concat(e)}})),n.props.onLazyLoad&&n.props.onLazyLoad(e)):n.lazyLoadTimer&&(clearInterval(n.lazyLoadTimer),delete n.lazyLoadTimer)})),(0,d.Z)(n,"slideHandler",(function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=n.props,o=r.asNavFor,a=r.beforeChange,s=r.onLazyLoad,l=r.speed,c=r.afterChange,u=n.state.currentSlide,d=function(e){var t=e.waitForAnimate,n=e.animating,r=e.fade,o=e.infinite,a=e.index,s=e.slideCount,l=e.lazyLoad,c=e.currentSlide,u=e.centerMode,d=e.slidesToScroll,f=e.slidesToShow,h=e.useCSS,p=e.lazyLoadedList;if(t&&n)return{};var g,m,v,A=a,y={},_={},x=o?a:b(a,0,s-1);if(r){if(!o&&(a<0||a>=s))return{};a<0?A=a+s:a>=s&&(A=a-s),l&&p.indexOf(A)<0&&(p=p.concat(A)),y={animating:!0,currentSlide:A,lazyLoadedList:p,targetSlide:A},_={animating:!1,targetSlide:A}}else g=A,A<0?(g=A+s,o?s%d!==0&&(g=s-s%d):g=0):!M(e)&&A>c?A=g=c:u&&A>=s?(A=o?s:s-1,g=o?0:s-1):A>=s&&(g=A-s,o?s%d!==0&&(g=0):g=s-f),!o&&A+f>=s&&(g=s-f),m=F((0,i.Z)((0,i.Z)({},e),{},{slideIndex:A})),v=F((0,i.Z)((0,i.Z)({},e),{},{slideIndex:g})),o||(m===v&&(A=g),m=v),l&&(p=p.concat(w((0,i.Z)((0,i.Z)({},e),{},{currentSlide:A})))),h?(y={animating:!0,currentSlide:g,trackStyle:D((0,i.Z)((0,i.Z)({},e),{},{left:m})),lazyLoadedList:p,targetSlide:x},_={animating:!1,currentSlide:g,trackStyle:N((0,i.Z)((0,i.Z)({},e),{},{left:v})),swipeLeft:null,targetSlide:x}):y={currentSlide:g,trackStyle:N((0,i.Z)((0,i.Z)({},e),{},{left:v})),lazyLoadedList:p,targetSlide:x};return{state:y,nextState:_}}((0,i.Z)((0,i.Z)((0,i.Z)({index:e},n.props),n.state),{},{trackRef:n.track,useCSS:n.props.useCSS&&!t})),f=d.state,h=d.nextState;if(f){a&&a(u,f.currentSlide);var g=f.lazyLoadedList.filter((function(e){return n.state.lazyLoadedList.indexOf(e)<0}));s&&g.length>0&&s(g),!n.props.waitForAnimate&&n.animationEndCallback&&(clearTimeout(n.animationEndCallback),c&&c(u),delete n.animationEndCallback),n.setState(f,(function(){o&&n.asNavForIndex!==e&&(n.asNavForIndex=e,o.innerSlider.slideHandler(e)),h&&(n.animationEndCallback=setTimeout((function(){var e=h.animating,t=(0,p.Z)(h,te);n.setState(t,(function(){n.callbackTimers.push(setTimeout((function(){return n.setState({animating:e})}),10)),c&&c(f.currentSlide),delete n.animationEndCallback}))}),l))}))}})),(0,d.Z)(n,"changeSlide",(function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=function(e,t){var n,r,o,a,s=e.slidesToScroll,l=e.slidesToShow,c=e.slideCount,u=e.currentSlide,d=e.targetSlide,f=e.lazyLoad,h=e.infinite;if(n=c%s!==0?0:(c-u)%s,"previous"===t.message)a=u-(o=0===n?s:l-n),f&&!h&&(a=-1===(r=u-o)?c-1:r),h||(a=d-s);else if("next"===t.message)a=u+(o=0===n?s:n),f&&!h&&(a=(u+s)%c+n),h||(a=d+s);else if("dots"===t.message)a=t.index*t.slidesToScroll;else if("children"===t.message){if(a=t.index,h){var p=z((0,i.Z)((0,i.Z)({},e),{},{targetSlide:a}));a>t.currentSlide&&"left"===p?a-=c:a10)return{scrolling:!0};s&&(A.swipeLength=C);var P=(l?-1:1)*(A.curX>A.startX?1:-1);s&&(P=A.curY>A.startY?1:-1);var T=Math.ceil(g/m),O=k(t.touchObject,s),R=A.swipeLength;return v||(0===c&&("right"===O||"down"===O)||c+1>=T&&("left"===O||"up"===O)||!M(t)&&("left"===O||"up"===O))&&(R=A.swipeLength*u,!1===d&&f&&(f(O),E.edgeDragged=!0)),!h&&y&&(y(O),E.swiped=!0),x=o?S+R*(b/w)*P:l?S-R*P:S+R*P,s&&(x=S+R*P),E=(0,i.Z)((0,i.Z)({},E),{},{touchObject:A,swipeLeft:x,trackStyle:N((0,i.Z)((0,i.Z)({},t),{},{left:x}))}),Math.abs(A.curX-A.startX)<.8*Math.abs(A.curY-A.startY)||A.swipeLength>10&&(E.swiping=!0,_(e)),E}}(e,(0,i.Z)((0,i.Z)((0,i.Z)({},n.props),n.state),{},{trackRef:n.track,listRef:n.list,slideIndex:n.state.currentSlide}));t&&(t.swiping&&(n.clickable=!1),n.setState(t))})),(0,d.Z)(n,"swipeEnd",(function(e){var t=function(e,t){var n=t.dragging,r=t.swipe,o=t.touchObject,a=t.listWidth,s=t.touchThreshold,l=t.verticalSwiping,c=t.listHeight,u=t.swipeToSlide,d=t.scrolling,f=t.onSwipe,h=t.targetSlide,p=t.currentSlide,g=t.infinite;if(!n)return r&&_(e),{};var m=l?c/s:a/s,v=k(o,l),A={dragging:!1,edgeDragged:!1,scrolling:!1,swiping:!1,swiped:!1,swipeLeft:null,touchObject:{}};if(d)return A;if(!o.swipeLength)return A;if(o.swipeLength>m){var y,b;_(e),f&&f(v);var w=g?p:h;switch(v){case"left":case"up":b=w+I(t),y=u?R(t,b):b,A.currentDirection=0;break;case"right":case"down":b=w-I(t),y=u?R(t,b):b,A.currentDirection=1;break;default:y=w}A.triggerSlideHandler=y}else{var x=F(t);A.trackStyle=D((0,i.Z)((0,i.Z)({},t),{},{left:x}))}return A}(e,(0,i.Z)((0,i.Z)((0,i.Z)({},n.props),n.state),{},{trackRef:n.track,listRef:n.list,slideIndex:n.state.currentSlide}));if(t){var r=t.triggerSlideHandler;delete t.triggerSlideHandler,n.setState(t),void 0!==r&&(n.slideHandler(r),n.props.verticalSwiping&&n.enableBodyScroll())}})),(0,d.Z)(n,"touchEnd",(function(e){n.swipeEnd(e),n.clickable=!0})),(0,d.Z)(n,"slickPrev",(function(){n.callbackTimers.push(setTimeout((function(){return n.changeSlide({message:"previous"})}),0))})),(0,d.Z)(n,"slickNext",(function(){n.callbackTimers.push(setTimeout((function(){return n.changeSlide({message:"next"})}),0))})),(0,d.Z)(n,"slickGoTo",(function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(e=Number(e),isNaN(e))return"";n.callbackTimers.push(setTimeout((function(){return n.changeSlide({message:"index",index:e,currentSlide:n.state.currentSlide},t)}),0))})),(0,d.Z)(n,"play",(function(){var e;if(n.props.rtl)e=n.state.currentSlide-n.props.slidesToScroll;else{if(!M((0,i.Z)((0,i.Z)({},n.props),n.state)))return!1;e=n.state.currentSlide+n.props.slidesToScroll}n.slideHandler(e)})),(0,d.Z)(n,"autoPlay",(function(e){n.autoplayTimer&&clearInterval(n.autoplayTimer);var t=n.state.autoplaying;if("update"===e){if("hovered"===t||"focused"===t||"paused"===t)return}else if("leave"===e){if("paused"===t||"focused"===t)return}else if("blur"===e&&("paused"===t||"hovered"===t))return;n.autoplayTimer=setInterval(n.play,n.props.autoplaySpeed+50),n.setState({autoplaying:"playing"})})),(0,d.Z)(n,"pause",(function(e){n.autoplayTimer&&(clearInterval(n.autoplayTimer),n.autoplayTimer=null);var t=n.state.autoplaying;"paused"===e?n.setState({autoplaying:"paused"}):"focused"===e?"hovered"!==t&&"playing"!==t||n.setState({autoplaying:"focused"}):"playing"===t&&n.setState({autoplaying:"hovered"})})),(0,d.Z)(n,"onDotsOver",(function(){return n.props.autoplay&&n.pause("hovered")})),(0,d.Z)(n,"onDotsLeave",(function(){return n.props.autoplay&&"hovered"===n.state.autoplaying&&n.autoPlay("leave")})),(0,d.Z)(n,"onTrackOver",(function(){return n.props.autoplay&&n.pause("hovered")})),(0,d.Z)(n,"onTrackLeave",(function(){return n.props.autoplay&&"hovered"===n.state.autoplaying&&n.autoPlay("leave")})),(0,d.Z)(n,"onSlideFocus",(function(){return n.props.autoplay&&n.pause("focused")})),(0,d.Z)(n,"onSlideBlur",(function(){return n.props.autoplay&&"focused"===n.state.autoplaying&&n.autoPlay("blur")})),(0,d.Z)(n,"render",(function(){var e,t,o,a=A()("slick-slider",n.props.className,{"slick-vertical":n.props.vertical,"slick-initialized":!0}),s=(0,i.Z)((0,i.Z)({},n.props),n.state),l=O(s,["fade","cssEase","speed","infinite","centerMode","focusOnSelect","currentSlide","lazyLoad","lazyLoadedList","rtl","slideWidth","slideHeight","listHeight","vertical","slidesToShow","slidesToScroll","slideCount","trackStyle","variableWidth","unslick","centerPadding","targetSlide","useCSS"]),c=n.props.pauseOnHover;if(l=(0,i.Z)((0,i.Z)({},l),{},{onMouseEnter:c?n.onTrackOver:null,onMouseLeave:c?n.onTrackLeave:null,onMouseOver:c?n.onTrackOver:null,focusOnSelect:n.props.focusOnSelect&&n.clickable?n.selectHandler:null}),!0===n.props.dots&&n.state.slideCount>=n.props.slidesToShow){var u=O(s,["dotsClass","slideCount","slidesToShow","currentSlide","slidesToScroll","clickHandler","children","customPaging","infinite","appendDots"]),d=n.props.pauseOnDotsHover;u=(0,i.Z)((0,i.Z)({},u),{},{clickHandler:n.changeSlide,onMouseEnter:d?n.onDotsLeave:null,onMouseOver:d?n.onDotsOver:null,onMouseLeave:d?n.onDotsLeave:null}),e=f.createElement(X,u)}var h=O(s,["infinite","centerMode","currentSlide","slideCount","slidesToShow","prevArrow","nextArrow"]);h.clickHandler=n.changeSlide,n.props.arrows&&(t=f.createElement(Q,h),o=f.createElement(J,h));var p=null;n.props.vertical&&(p={height:n.state.listHeight});var g=null;!1===n.props.vertical?!0===n.props.centerMode&&(g={padding:"0px "+n.props.centerPadding}):!0===n.props.centerMode&&(g={padding:n.props.centerPadding+" 0px"});var m=(0,i.Z)((0,i.Z)({},p),g),v=n.props.touchMove,y={className:"slick-list",style:m,onClick:n.clickHandler,onMouseDown:v?n.swipeStart:null,onMouseMove:n.state.dragging&&v?n.swipeMove:null,onMouseUp:v?n.swipeEnd:null,onMouseLeave:n.state.dragging&&v?n.swipeEnd:null,onTouchStart:v?n.swipeStart:null,onTouchMove:n.state.dragging&&v?n.swipeMove:null,onTouchEnd:v?n.touchEnd:null,onTouchCancel:n.state.dragging&&v?n.swipeEnd:null,onKeyDown:n.props.accessibility?n.keyHandler:null},b={className:a,dir:"ltr",style:n.props.style};return n.props.unslick&&(y={className:"slick-list"},b={className:a,style:n.props.style}),f.createElement("div",b,n.props.unslick?"":t,f.createElement("div",(0,r.Z)({ref:n.listRefHandler},y),f.createElement(Y,(0,r.Z)({ref:n.trackRefHandler},l),n.props.children)),n.props.unslick?"":o,n.props.unslick?"":e)})),n.list=null,n.track=null,n.state=(0,i.Z)((0,i.Z)({},g),{},{currentSlide:n.props.initialSlide,targetSlide:n.props.initialSlide?n.props.initialSlide:0,slideCount:f.Children.count(n.props.children)}),n.callbackTimers=[],n.clickable=!0,n.debouncedResize=null;var a=n.ssrInit();return n.state=(0,i.Z)((0,i.Z)({},n.state),a),n}return(0,u.Z)(t,e),(0,a.Z)(t,[{key:"didPropsChange",value:function(e){for(var t=!1,n=0,r=Object.keys(this.props);n1&&void 0!==arguments[1]&&arguments[1];return n.innerSlider.slickGoTo(e,t)})),(0,d.Z)(n,"slickPause",(function(){return n.innerSlider.pause("paused")})),(0,d.Z)(n,"slickPlay",(function(){return n.innerSlider.autoPlay("play")})),n.state={breakpoint:null},n._responsiveMediaHandlers=[],n}return(0,u.Z)(t,e),(0,a.Z)(t,[{key:"media",value:function(e,t){var n=window.matchMedia(e),r=function(e){e.matches&&t()};n.addListener(r),r(n),this._responsiveMediaHandlers.push({mql:n,query:e,listener:r})}},{key:"componentDidMount",value:function(){var e=this;if(this.props.responsive){var t=this.props.responsive.map((function(e){return e.breakpoint}));t.sort((function(e,t){return e-t})),t.forEach((function(n,r){var i;i=0===r?ie()({minWidth:0,maxWidth:n}):ie()({minWidth:t[r-1]+1,maxWidth:n}),V()&&e.media(i,(function(){e.setState({breakpoint:n})}))}));var n=ie()({minWidth:t.slice(-1)[0]});V()&&this.media(n,(function(){e.setState({breakpoint:null})}))}}},{key:"componentWillUnmount",value:function(){this._responsiveMediaHandlers.forEach((function(e){e.mql.removeListener(e.listener)}))}},{key:"render",value:function(){var e,t,n=this;(e=this.state.breakpoint?"unslick"===(t=this.props.responsive.filter((function(e){return e.breakpoint===n.state.breakpoint})))[0].settings?"unslick":(0,i.Z)((0,i.Z)((0,i.Z)({},y),this.props),t[0].settings):(0,i.Z)((0,i.Z)({},y),this.props)).centerMode&&(e.slidesToScroll,e.slidesToScroll=1),e.fade&&(e.slidesToShow,e.slidesToScroll,e.slidesToShow=1,e.slidesToScroll=1);var o=f.Children.toArray(this.props.children);o=o.filter((function(e){return"string"===typeof e?!!e.trim():!!e})),e.variableWidth&&(e.rows>1||e.slidesPerRow>1)&&(console.warn("variableWidth is not supported in case of rows > 1 or slidesPerRow > 1"),e.variableWidth=!1);for(var a=[],s=null,l=0;l=o.length));h+=1)d.push(f.cloneElement(o[h],{key:100*l+10*u+h,tabIndex:-1,style:{width:"".concat(100/e.slidesPerRow,"%"),display:"inline-block"}}));c.push(f.createElement("div",{key:10*l+u},d))}e.variableWidth?a.push(f.createElement("div",{key:l,style:{width:s}},c)):a.push(f.createElement("div",{key:l},c))}if("unslick"===e){var p="regular slider "+(this.props.className||"");return f.createElement("div",{className:p},o)}return a.length<=e.slidesToShow&&!e.infinite&&(e.unslick=!0),f.createElement(ne,(0,r.Z)({style:this.props.style,ref:this.innerSliderRefHandler},function(e){return W.reduce((function(t,n){return e.hasOwnProperty(n)&&(t[n]=e[n]),t}),{})}(e)),a)}}])}(f.Component)},76471:(e,t,n)=>{"use strict";n.d(t,{T6:()=>h,VD:()=>p,WE:()=>c,Yt:()=>g,lC:()=>o,py:()=>l,rW:()=>i,s:()=>d,ve:()=>s,vq:()=>u});var r=n(39553);function i(e,t,n){return{r:255*(0,r.sh)(e,255),g:255*(0,r.sh)(t,255),b:255*(0,r.sh)(n,255)}}function o(e,t,n){e=(0,r.sh)(e,255),t=(0,r.sh)(t,255),n=(0,r.sh)(n,255);var i=Math.max(e,t,n),o=Math.min(e,t,n),a=0,s=0,l=(i+o)/2;if(i===o)s=0,a=0;else{var c=i-o;switch(s=l>.5?c/(2-i-o):c/(i+o),i){case e:a=(t-n)/c+(t1&&(n-=1),n<1/6?e+6*n*(t-e):n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function s(e,t,n){var i,o,s;if(e=(0,r.sh)(e,360),t=(0,r.sh)(t,100),n=(0,r.sh)(n,100),0===t)o=n,s=n,i=n;else{var l=n<.5?n*(1+t):n+t-n*t,c=2*n-l;i=a(c,l,e+1/3),o=a(c,l,e),s=a(c,l,e-1/3)}return{r:255*i,g:255*o,b:255*s}}function l(e,t,n){e=(0,r.sh)(e,255),t=(0,r.sh)(t,255),n=(0,r.sh)(n,255);var i=Math.max(e,t,n),o=Math.min(e,t,n),a=0,s=i,l=i-o,c=0===i?0:l/i;if(i===o)a=0;else{switch(i){case e:a=(t-n)/l+(t>16,g:(65280&e)>>8,b:255&e}}},75109:(e,t,n)=>{"use strict";n.d(t,{R:()=>r});var r={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",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:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",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:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",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:"#ff0000",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:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"}},18948:(e,t,n)=>{"use strict";n.d(t,{uA:()=>a});var r=n(76471),i=n(75109),o=n(39553);function a(e){var t={r:0,g:0,b:0},n=1,a=null,s=null,l=null,c=!1,f=!1;return"string"===typeof e&&(e=function(e){if(e=e.trim().toLowerCase(),0===e.length)return!1;var t=!1;if(i.R[e])e=i.R[e],t=!0;else if("transparent"===e)return{r:0,g:0,b:0,a:0,format:"name"};var n=u.rgb.exec(e);if(n)return{r:n[1],g:n[2],b:n[3]};if(n=u.rgba.exec(e),n)return{r:n[1],g:n[2],b:n[3],a:n[4]};if(n=u.hsl.exec(e),n)return{h:n[1],s:n[2],l:n[3]};if(n=u.hsla.exec(e),n)return{h:n[1],s:n[2],l:n[3],a:n[4]};if(n=u.hsv.exec(e),n)return{h:n[1],s:n[2],v:n[3]};if(n=u.hsva.exec(e),n)return{h:n[1],s:n[2],v:n[3],a:n[4]};if(n=u.hex8.exec(e),n)return{r:(0,r.VD)(n[1]),g:(0,r.VD)(n[2]),b:(0,r.VD)(n[3]),a:(0,r.T6)(n[4]),format:t?"name":"hex8"};if(n=u.hex6.exec(e),n)return{r:(0,r.VD)(n[1]),g:(0,r.VD)(n[2]),b:(0,r.VD)(n[3]),format:t?"name":"hex"};if(n=u.hex4.exec(e),n)return{r:(0,r.VD)(n[1]+n[1]),g:(0,r.VD)(n[2]+n[2]),b:(0,r.VD)(n[3]+n[3]),a:(0,r.T6)(n[4]+n[4]),format:t?"name":"hex8"};if(n=u.hex3.exec(e),n)return{r:(0,r.VD)(n[1]+n[1]),g:(0,r.VD)(n[2]+n[2]),b:(0,r.VD)(n[3]+n[3]),format:t?"name":"hex"};return!1}(e)),"object"===typeof e&&(d(e.r)&&d(e.g)&&d(e.b)?(t=(0,r.rW)(e.r,e.g,e.b),c=!0,f="%"===String(e.r).substr(-1)?"prgb":"rgb"):d(e.h)&&d(e.s)&&d(e.v)?(a=(0,o.JX)(e.s),s=(0,o.JX)(e.v),t=(0,r.WE)(e.h,a,s),c=!0,f="hsv"):d(e.h)&&d(e.s)&&d(e.l)&&(a=(0,o.JX)(e.s),l=(0,o.JX)(e.l),t=(0,r.ve)(e.h,a,l),c=!0,f="hsl"),Object.prototype.hasOwnProperty.call(e,"a")&&(n=e.a)),n=(0,o.Yq)(n),{ok:c,format:e.format||f,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:n}}var s="(?:".concat("[-\\+]?\\d*\\.\\d+%?",")|(?:").concat("[-\\+]?\\d+%?",")"),l="[\\s|\\(]+(".concat(s,")[,|\\s]+(").concat(s,")[,|\\s]+(").concat(s,")\\s*\\)?"),c="[\\s|\\(]+(".concat(s,")[,|\\s]+(").concat(s,")[,|\\s]+(").concat(s,")[,|\\s]+(").concat(s,")\\s*\\)?"),u={CSS_UNIT:new RegExp(s),rgb:new RegExp("rgb"+l),rgba:new RegExp("rgba"+c),hsl:new RegExp("hsl"+l),hsla:new RegExp("hsla"+c),hsv:new RegExp("hsv"+l),hsva:new RegExp("hsva"+c),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 d(e){return Boolean(u.CSS_UNIT.exec(String(e)))}},79388:(e,t,n)=>{"use strict";n.d(t,{C:()=>s});var r=n(76471),i=n(75109),o=n(18948),a=n(39553),s=function(){function e(t,n){var i;if(void 0===t&&(t=""),void 0===n&&(n={}),t instanceof e)return t;"number"===typeof t&&(t=(0,r.Yt)(t)),this.originalInput=t;var a=(0,o.uA)(t);this.originalInput=t,this.r=a.r,this.g=a.g,this.b=a.b,this.a=a.a,this.roundA=Math.round(100*this.a)/100,this.format=null!==(i=n.format)&&void 0!==i?i:a.format,this.gradientType=n.gradientType,this.r<1&&(this.r=Math.round(this.r)),this.g<1&&(this.g=Math.round(this.g)),this.b<1&&(this.b=Math.round(this.b)),this.isValid=a.ok}return e.prototype.isDark=function(){return this.getBrightness()<128},e.prototype.isLight=function(){return!this.isDark()},e.prototype.getBrightness=function(){var e=this.toRgb();return(299*e.r+587*e.g+114*e.b)/1e3},e.prototype.getLuminance=function(){var e=this.toRgb(),t=e.r/255,n=e.g/255,r=e.b/255;return.2126*(t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4))+.7152*(n<=.03928?n/12.92:Math.pow((n+.055)/1.055,2.4))+.0722*(r<=.03928?r/12.92:Math.pow((r+.055)/1.055,2.4))},e.prototype.getAlpha=function(){return this.a},e.prototype.setAlpha=function(e){return this.a=(0,a.Yq)(e),this.roundA=Math.round(100*this.a)/100,this},e.prototype.isMonochrome=function(){return 0===this.toHsl().s},e.prototype.toHsv=function(){var e=(0,r.py)(this.r,this.g,this.b);return{h:360*e.h,s:e.s,v:e.v,a:this.a}},e.prototype.toHsvString=function(){var e=(0,r.py)(this.r,this.g,this.b),t=Math.round(360*e.h),n=Math.round(100*e.s),i=Math.round(100*e.v);return 1===this.a?"hsv(".concat(t,", ").concat(n,"%, ").concat(i,"%)"):"hsva(".concat(t,", ").concat(n,"%, ").concat(i,"%, ").concat(this.roundA,")")},e.prototype.toHsl=function(){var e=(0,r.lC)(this.r,this.g,this.b);return{h:360*e.h,s:e.s,l:e.l,a:this.a}},e.prototype.toHslString=function(){var e=(0,r.lC)(this.r,this.g,this.b),t=Math.round(360*e.h),n=Math.round(100*e.s),i=Math.round(100*e.l);return 1===this.a?"hsl(".concat(t,", ").concat(n,"%, ").concat(i,"%)"):"hsla(".concat(t,", ").concat(n,"%, ").concat(i,"%, ").concat(this.roundA,")")},e.prototype.toHex=function(e){return void 0===e&&(e=!1),(0,r.vq)(this.r,this.g,this.b,e)},e.prototype.toHexString=function(e){return void 0===e&&(e=!1),"#"+this.toHex(e)},e.prototype.toHex8=function(e){return void 0===e&&(e=!1),(0,r.s)(this.r,this.g,this.b,this.a,e)},e.prototype.toHex8String=function(e){return void 0===e&&(e=!1),"#"+this.toHex8(e)},e.prototype.toHexShortString=function(e){return void 0===e&&(e=!1),1===this.a?this.toHexString(e):this.toHex8String(e)},e.prototype.toRgb=function(){return{r:Math.round(this.r),g:Math.round(this.g),b:Math.round(this.b),a:this.a}},e.prototype.toRgbString=function(){var e=Math.round(this.r),t=Math.round(this.g),n=Math.round(this.b);return 1===this.a?"rgb(".concat(e,", ").concat(t,", ").concat(n,")"):"rgba(".concat(e,", ").concat(t,", ").concat(n,", ").concat(this.roundA,")")},e.prototype.toPercentageRgb=function(){var e=function(e){return"".concat(Math.round(100*(0,a.sh)(e,255)),"%")};return{r:e(this.r),g:e(this.g),b:e(this.b),a:this.a}},e.prototype.toPercentageRgbString=function(){var e=function(e){return Math.round(100*(0,a.sh)(e,255))};return 1===this.a?"rgb(".concat(e(this.r),"%, ").concat(e(this.g),"%, ").concat(e(this.b),"%)"):"rgba(".concat(e(this.r),"%, ").concat(e(this.g),"%, ").concat(e(this.b),"%, ").concat(this.roundA,")")},e.prototype.toName=function(){if(0===this.a)return"transparent";if(this.a<1)return!1;for(var e="#"+(0,r.vq)(this.r,this.g,this.b,!1),t=0,n=Object.entries(i.R);t=0;return t||!r||!e.startsWith("hex")&&"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()},e.prototype.toNumber=function(){return(Math.round(this.r)<<16)+(Math.round(this.g)<<8)+Math.round(this.b)},e.prototype.clone=function(){return new e(this.toString())},e.prototype.lighten=function(t){void 0===t&&(t=10);var n=this.toHsl();return n.l+=t/100,n.l=(0,a.V2)(n.l),new e(n)},e.prototype.brighten=function(t){void 0===t&&(t=10);var n=this.toRgb();return n.r=Math.max(0,Math.min(255,n.r-Math.round(-t/100*255))),n.g=Math.max(0,Math.min(255,n.g-Math.round(-t/100*255))),n.b=Math.max(0,Math.min(255,n.b-Math.round(-t/100*255))),new e(n)},e.prototype.darken=function(t){void 0===t&&(t=10);var n=this.toHsl();return n.l-=t/100,n.l=(0,a.V2)(n.l),new e(n)},e.prototype.tint=function(e){return void 0===e&&(e=10),this.mix("white",e)},e.prototype.shade=function(e){return void 0===e&&(e=10),this.mix("black",e)},e.prototype.desaturate=function(t){void 0===t&&(t=10);var n=this.toHsl();return n.s-=t/100,n.s=(0,a.V2)(n.s),new e(n)},e.prototype.saturate=function(t){void 0===t&&(t=10);var n=this.toHsl();return n.s+=t/100,n.s=(0,a.V2)(n.s),new e(n)},e.prototype.greyscale=function(){return this.desaturate(100)},e.prototype.spin=function(t){var n=this.toHsl(),r=(n.h+t)%360;return n.h=r<0?360+r:r,new e(n)},e.prototype.mix=function(t,n){void 0===n&&(n=50);var r=this.toRgb(),i=new e(t).toRgb(),o=n/100;return new e({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})},e.prototype.analogous=function(t,n){void 0===t&&(t=6),void 0===n&&(n=30);var r=this.toHsl(),i=360/n,o=[this];for(r.h=(r.h-(i*t>>1)+720)%360;--t;)r.h=(r.h+i)%360,o.push(new e(r));return o},e.prototype.complement=function(){var t=this.toHsl();return t.h=(t.h+180)%360,new e(t)},e.prototype.monochromatic=function(t){void 0===t&&(t=6);for(var n=this.toHsv(),r=n.h,i=n.s,o=n.v,a=[],s=1/t;t--;)a.push(new e({h:r,s:i,v:o})),o=(o+s)%1;return a},e.prototype.splitcomplement=function(){var t=this.toHsl(),n=t.h;return[this,new e({h:(n+72)%360,s:t.s,l:t.l}),new e({h:(n+216)%360,s:t.s,l:t.l})]},e.prototype.onBackground=function(t){var n=this.toRgb(),r=new e(t).toRgb(),i=n.a+r.a*(1-n.a);return new e({r:(n.r*n.a+r.r*r.a*(1-n.a))/i,g:(n.g*n.a+r.g*r.a*(1-n.a))/i,b:(n.b*n.a+r.b*r.a*(1-n.a))/i,a:i})},e.prototype.triad=function(){return this.polyad(3)},e.prototype.tetrad=function(){return this.polyad(4)},e.prototype.polyad=function(t){for(var n=this.toHsl(),r=n.h,i=[this],o=360/t,a=1;a{"use strict";function r(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=360===t?e:Math.min(t,Math.max(0,parseFloat(e))),n&&(e=parseInt(String(e*t),10)/100),Math.abs(e-t)<1e-6?1:e=360===t?(e<0?e%t+t:e%t)/parseFloat(String(t)):e%t/parseFloat(String(t))}function i(e){return Math.min(1,Math.max(0,e))}function o(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function a(e){return e<=1?"".concat(100*Number(e),"%"):e}function s(e){return 1===e.length?"0"+e:String(e)}n.d(t,{FZ:()=>s,JX:()=>a,V2:()=>i,Yq:()=>o,sh:()=>r})},82253:(e,t,n)=>{"use strict";n.d(t,{Z:()=>c});var r=n(68185),i=n(32603),o=n(98641),a=n(21921),s=n(76195);function l(e,t){const n={};for(const r in e)t.includes(r)||(n[r]=e[r]);return n}class c extends i.Z{constructor(){super(...arguments),(0,r.Z)(this,"state",void 0)}initializeAggregationLayer(e){super.initializeState(this.context),this.setState({ignoreProps:l(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:(0,s.w)(n)})}updateShaders(e){}isAggregationDirty(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{props:n,oldProps:r,changeFlags:i}=e,{compareAll:a=!1,dimension:s}=t,{ignoreProps:l}=this.state,{props:c,accessors:u=[]}=s,{updateTriggersChanged:d}=i;if(i.dataChanged)return!0;if(d){if(d.all)return!0;for(const e of u)if(d[e])return!0}if(a)return!!i.extensionsChanged||(0,o.tg)({oldProps:r,newProps:n,ignoreProps:l,propTypes:this.constructor._propTypes});for(const o of c)if(n[o]!==r[o])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 a.Z(this.context.gl,{id:this.props.id,stats:this.context.stats})}}(0,r.Z)(c,"layerName","AggregationLayer")},81057:(e,t,n)=>{"use strict";n.d(t,{Z:()=>x});var r=n(68185),i=n(16621),o=n(39042);const a=new Uint16Array([0,1,2,0,2,3,4,5,6,4,6,7,8,9,10,8,10,11,12,13,14,12,14,15,16,17,18,16,18,19,20,21,22,20,22,23]),s=new Float32Array([-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,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,-1,1,-1,1,1,-1,1,-1]),l=new Float32Array([0,0,1,0,0,1,0,0,1,0,0,1,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,1,0,0,1,0,0,1,0,0,1,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,1,0,0,1,0,0,1,0,0,1,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0]),c=new Float32Array([0,0,1,0,1,1,0,1,1,0,1,1,0,1,0,0,0,1,0,0,1,0,1,1,1,1,0,1,0,0,1,0,1,0,1,1,0,1,0,0,0,0,1,0,1,1,0,1]),u={POSITION:{size:3,value:new Float32Array(s)},NORMAL:{size:3,value:new Float32Array(l)},TEXCOORD_0:{size:2,value:new Float32Array(c)}};class d extends i.Z{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{id:t=(0,o.hQ)("cube-geometry")}=e;super({...e,id:t,indices:{size:1,value:new Uint16Array(a)},attributes:{...u,...e.attributes}})}}var f=n(98029),h=n(13091);class p extends h.Z{getGeometry(e){return new d}draw(e){let{uniforms:t}=e;const{elevationScale:n,extruded:r,offset:i,coverage:o,cellSize:a,angle:s,radiusUnits:l}=this.props;this.state.model.setUniforms(t).setUniforms({radius:a/2,radiusUnits:f.iI[l],angle:s,offset:i,extruded:r,coverage:o,elevationScale:n,edgeDistance:1,isWireframe:!1}).draw()}}(0,r.Z)(p,"layerName","GridCellLayer"),(0,r.Z)(p,"defaultProps",{cellSize:{type:"number",min:0,value:1e3},offset:{type:"array",value:[1,1]}});var g=n(67110),m=n(39179);const v=6378e3;function A(e,t){if(!(!(arguments.length>2&&void 0!==arguments[2])||arguments[2]))return{xOffset:t,yOffset:t};const{yMin:n,yMax:r}=e;return function(e,t){const n=(a=e,a/v*(180/Math.PI)),r=(i=t,o=e,o/v*(180/Math.PI)/Math.cos(i*Math.PI/180));var i,o;var a;return{yOffset:n,xOffset:r}}(t,(n+r)/2)}var y=n(20307),b=n(82253);function _(){}const w={colorDomain:null,colorRange:g.K,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:_,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:_,gridAggregator:function(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:c}=i.positions.getAccessor(),u=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,c=-1/0;for(let u=0;us?i:s,l=oc?o:c);return{xMin:l,xMax:c,yMin:a,yMax:s}}(i.positions,s),d=t.posOffset||[180,90],f=t.gridOffset||A(u,r);if(f.xOffset<=0||f.yOffset<=0)return{gridHash:{},gridOffset:f};const{width:h,height:p}=o,g=Math.ceil(h/f.xOffset),v=Math.ceil(p/f.yOffset),y={},{iterable:b,objectInfo:_}=(0,m.jB)(n),w=new Array(3);for(const m of b){_.index++,w[0]=l[_.index*c],w[1]=l[_.index*c+1],w[2]=c>=3?l[_.index*c+2]:0;const[e,t]=a?o.project(w):w;if(Number.isFinite(e)&&Number.isFinite(t)){const n=Math.floor((t+d[1])/f.yOffset),r=Math.floor((e+d[0])/f.xOffset);if(!a||r>=0&&r=0&&ne.position},extruded:!1,material:!0,_filterData:{type:"function",value:null,optional:!0}};class x extends b.Z{initializeState(){const e=new y.Z({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(e){let{info:t}=e;return this.state.cpuAggregator.getPickingInfo({info:t})}_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",p),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})}}(0,r.Z)(x,"layerName","CPUGridLayer"),(0,r.Z)(x,"defaultProps",w)},75770:(e,t,n)=>{"use strict";n.d(t,{Z:()=>k});var r=n(68185),i=n(76195);const o=new Float32Array(12);function a(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2,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:[A.Z]}}initializeState(e){let{gl:t}=e;this.getAttributeManager().add({positions:{size:3,noAlloc:!0},texCoords:{size:2,noAlloc:!0}}),this.setState({model:this._getModel(t)})}_getModel(e){const{vertexCount:t}=this.props;return new g.Z(e,{...this.getShaders(),id:this.props.id,geometry:new m.Z({drawMode:6,vertexCount:t})})}draw(e){let{uniforms:t}=e;const{model:n}=this.state,{texture:r,maxTexture:i,colorTexture:o,intensity:a,threshold:s,aggregationMode:l,colorDomain:c}=this.props;n.setUniforms({...t,texture:r,maxTexture:i,colorTexture:o,intensity:a,threshold:s,aggregationMode:l,colorDomain:c}).draw()}}(0,r.Z)(y,"layerName","TriangleLayer");var b=n(82253),_=n(67110);const w={mipmaps:!1,parameters:{10240:9729,10241:9729,10242:33071,10243:33071},dataFormat:6408},x=[0,0],E={SUM:0,MEAN:1},S={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:_.K,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}},C=[s.h.BLEND_EQUATION_MINMAX,s.h.TEXTURE_FLOAT],P=[s.h.COLOR_ATTACHMENT_RGBA32F,s.h.FLOAT_BLEND],T={data:{props:["radiusPixels"]}};class k extends b.Z{constructor(){super(...arguments),(0,r.Z)(this,"state",void 0)}initializeState(){const{gl:e}=this.context;if(!(0,l.ag)(e,C))return this.setState({supported:!1}),void f.Z.error("HeatmapLayer: ".concat(this.id," is not supported on this browser"))();super.initializeAggregationLayer(T),this.setState({supported:!0,colorDomain:x}),this._setupTextureParams(),this._setupAttributes(),this._setupResources()}shouldUpdateState(e){let{changeFlags:t}=e;return t.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:c}=this.props;return new(this.getSubLayerClass("triangle",y))(this.getSubLayerProps({id:"triangle-layer",updateTriggers:a}),{coordinateSystem:h.Df.DEFAULT,data:{attributes:{positions:t,texCoords:n}},vertexCount:4,maxTexture:r,colorTexture:i,aggregationMode:E[c]||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||void 0===t||t.delete(),null===n||void 0===n||n.delete(),null===r||void 0===r||r.delete(),null===i||void 0===i||i.delete(),null===o||void 0===o||o.delete(),null===a||void 0===a||a.delete(),null===s||void 0===s||s.delete(),l&&clearTimeout(l)}_getAttributeManager(){return new p.Z(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 c.Z(e,{width:t,height:t,format:n,type:r,...w}),maxWeightsTexture:new c.Z(e,{format:n,type:r,...w})})}_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,(0,i.ZS)(e,3379)),r=(0,l.ag)(e,P),{format:o,type:a}=function(e){let{gl:t,floatTargetSupport:n}=e;return n?{format:(0,i.D0)(t)?34836:6408,type:5126}:{format:6408,type:5121}}({gl:e,floatTargetSupport:r}),s=r?1:1/255;this.setState({textureSize:n,format:o,type:a,weightsScale:s}),r||f.Z.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(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};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 u.Z(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 u.Z(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 d.Z(e,{byteLength:48,accessor:{size:3}}),triTexCoordBuffer:new d.Z(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(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];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===h.Df.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(a(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(a(o,2))}_updateColorTexture(e){const{colorRange:t}=e.props;let{colorTexture:n}=this.state;const r=(0,_.P)(t,!1,Uint8Array);n?n.setImageData({data:r,width:t.length}):n=new c.Z(this.context.gl,{data:r,width:t.length,height:1,...w}),this.setState({colorTexture:n})}_updateWeightmap(){const{radiusPixels:e,colorDomain:t,aggregation:n}=this.props,{weightsTransform:r,worldBounds:o,textureSize:a,weightsTexture:s,weightsScale:l}=this.state;this.state.isWeightMapDirty=!1;const c=this._worldToCommonBounds(o,{useLayerCoordinateSystem:!0});if(t&&"SUM"===n){const{viewport:e}=this.context,n=e.distanceScales.metersPerUnit[2]*(c[2]-c[0])/a;this.state.colorDomain=t.map((e=>e*n*l))}else this.state.colorDomain=t||x;const u={radiusPixels:e,commonBounds:c,textureWidth:a,weightsScale:l};r.update({elementCount:this.getNumInstances()}),(0,i.s8)(this.context.gl,{clearColor:[0,0,0,0]},(()=>{r.run({uniforms:u,parameters:{blend:!0,depthTest:!1,blendFunc:[1,1],blendEquation:32774},clearRenderTarget:!0,attributes:this.getAttributes(),moduleSettings:this.getModuleSettings()})})),this._updateMaxWeightValue(),s.setParameters({10240:9729,10241:9729})}_debouncedUpdateWeightmap(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],{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){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{useLayerCoordinateSystem:n=!1}=t,[r,i,o,a]=e,{viewport:s}=this.context,{textureSize:l}=this.state,{coordinateSystem:c}=this.props,u=n&&(c===h.Df.LNGLAT_OFFSETS||c===h.Df.METER_OFFSETS),d=u?s.projectPosition(this.props.coordinateOrigin):[0,0],f=2*l/s.scale;let p,g;return n&&!u?(p=this.projectPosition([r,i,0]),g=this.projectPosition([o,a,0])):(p=s.projectPosition([r,i,0]),g=s.projectPosition([o,a,0])),function(e,t,n){const[r,i,o,a]=e,s=o-r,l=a-i;let c=s,u=l;s/l{"use strict";n.d(t,{Z:()=>m});var r=n(68185),i=n(65148),o=n(13091),a=n(67110),s=Math.PI/3,l=[0,s,2*s,3*s,4*s,5*s];function c(e){return e[0]}function u(e){return e[1]}var d=n(39179);var f=n(20307),h=n(82253);function p(){}const g={colorDomain:null,colorRange:a.K,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:p,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:p,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,f=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,c=-1/0;for(o=0;o1){var g=l-h,m=h+(lA*A+y*y&&(h=m+(1&u?1:-1)/2,u=v)}var b=h+"-"+u,_=i[b];_?_.push(s):(o.push(_=i[b]=[s]),_.x=(h+(1&u)/2)*t,_.y=u*n)}return o}function p(e){var t=0,n=0;return l.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 s=[],l=Math.round(i/n),c=Math.round(r/t),u=l*n;ue.screenCoord[0])).y((e=>e.screenCoord[1]));return{hexagons:y(p).map(((e,t)=>({position:o.unprojectFlat([e.x,e.y]),points:e,index:t}))),radiusCommon:h}},getPosition:{type:"accessor",value:e=>e.position},material:!0,_filterData:{type:"function",value:null,optional:!0}};class m extends h.Z{constructor(){super(...arguments),(0,r.Z)(this,"state",void 0)}initializeState(){const e=new f.Z({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.Z.error("HexagonLayer: hexagonVertices needs to be an array of 6 points")(),null}getPickingInfo(e){let{info:t}=e;return this.state.cpuAggregator.getPickingInfo({info:t})}_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:a,vertices:s}=this.state,l=this.getSubLayerClass("hexagon-cell",o.Z),c=this._getSublayerUpdateTriggers();return new l({...s?{vertices:s,radius:1}:{radius:a.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:c}),{data:a.layerData.data})}}(0,r.Z)(m,"layerName","HexagonLayer"),(0,r.Z)(m,"defaultProps",g)},67110:(e,t,n)=>{"use strict";n.d(t,{K:()=>r,P:()=>i});const r=[[255,255,178],[254,217,118],[254,178,76],[253,141,60],[240,59,32],[189,0,38]];function i(e){let t,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Float32Array;if(Number.isFinite(e[0]))t=new r(e);else{t=new r(4*e.length);let n=0;for(let r=0;r{"use strict";n.d(t,{Z:()=>R});var r=n(68185),i=n(65148);function o(e,t,n){const r=n;return r.domain=()=>e,r.range=()=>t,r}function a(e,t){return o(e,t,(n=>function(e,t,n){const r=e[1]-e[0];if(r<=0)return i.Z.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 s(e,t){return o(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 l(e,t){const n=e.sort(c);let r=0;const i=Math.max(1,t.length),a=new Array(i-1);for(;++rfunction(e,t,n){return t[function(e,t){let n=0,r=e.length;for(;n>>1;c(e[i],t)>0?r=i:n=i+1}return n}(e,n)]}(a,t,e);return s.thresholds=()=>a,o(e,t,s)}function c(e,t){return e-t}function u(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 d(e,t){const n=new Map,r=[];for(const i of e){const e="".concat(i);n.has(e)||n.set(e,r.push(i))}return o(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 f(e){return void 0!==e&&null!==e}function h(e,t){return("function"===typeof t?e.map(t):e).filter(f)}function p(e,t){return h(e,t)}function g(e,t){return function(e){const t=[];return e.forEach((e=>{!t.includes(e)&&f(e)&&t.push(e)})),t}(h(e,t))}const m=e=>e.length,v=e=>e.points,A=e=>e.index,y=(e,t)=>et?1:e>=t?0:NaN,b={getValue:m,getPoints:v,getIndex:A,filterData:null};class _{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:b;(0,r.Z)(this,"maxCount",void 0),(0,r.Z)(this,"maxValue",void 0),(0,r.Z)(this,"minValue",void 0),(0,r.Z)(this,"totalCount",void 0),(0,r.Z)(this,"aggregatedBins",void 0),(0,r.Z)(this,"sortedBins",void 0),(0,r.Z)(this,"binMap",void 0),this.aggregatedBins=this.getAggregatedBins(e,t),this._updateMinMaxValues(),this.binMap=this.getBinMap()}getAggregatedBins(e,t){const{getValue:n=m,getPoints:r=v,getIndex:i=A,filterData:o}=t,a="function"===typeof o,s=e.length,l=[];let c=0;for(let u=0;u{return t=e,n=0,r=100,Math.max(n,Math.min(r,t));var t,n,r}));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=ny(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){let[t=0,n=100]=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(this.sortedBins||(this.sortedBins=this.aggregatedBins.sort(((e,t)=>y(e.value,t.value)))),!this.sortedBins.length)return[];const r=this._percentileToIndex([t,n]);return this._getScaleDomain(e,r)}_getScaleDomain(e,t){let[n,r]=t;const i=this.sortedBins;switch(e){case"quantize":case"linear":default:return[i[n].value,i[r].value];case"quantile":return p(i.slice(n,r+1),(e=>e.value));case"ordinal":return g(i,(e=>e.value))}}}const w={SUM:1,MEAN:2,MIN:3,MAX:4};function x(e,t){return e+t}function E(e,t){return t>e?t:e}function S(e,t){return t1&&void 0!==arguments[1]?arguments[1]:{};if(Number.isFinite(e))return e;return n=>(t.index=n.index,e(n.source,t))}(t,n),r){case w.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(S,1/0):null}(e,t);case w.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(x,0):null}(e,t);case w.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(x,0)/n.length:null}(e,t);case w.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(E,-1/0):null}(e,t);default:return null}}function P(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return n=>(t.indices=n.map((e=>e.index)),e(n.map((e=>e.source)),t))}function T(){}const k=["getBins","getDomain","getScaleFunc"],M=[{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}],O=e=>e.cellSize;class R{constructor(e){this.state={layerData:{},dimensions:{}},this.changeFlags={},this.dimensionUpdaters={},this._getCellSize=e.getCellSize||O,this._getAggregator=e.getAggregator,this._addDimension(e.dimensions||M)}static defaultDimensions(){return M}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(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};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?P(s,{data:t.data}):C(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(){(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).forEach((e=>{const{key:t}=e;this.dimensionUpdaters[t]=this.getDimensionUpdaters(e),this.state.dimensions[t]={getValue:null,domain:null,sortedBins:null,scaleFunc:T}}))}getDimensionUpdaters(e){let{key:t,accessor:n,pickingInfo:r,getBins:i,getDomain:o,getScaleFunc:a,nullValue:s}=e;return{key:t,accessor:n,pickingInfo:r,getBins:{updater:this.getDimensionSortedBins,...i},getDomain:{updater:this.getDimensionValueDomain,...o},getScaleFunc:{updater:this.getDimensionScale,...a},attributeAccessor:this.getSubLayerDimensionAttribute(t,s)}}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=k.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]={},k.forEach((o=>{Object.values(this.dimensionUpdaters[r][o].triggers).forEach((r=>{let{prop:o,updateTrigger:a}=r;if(a){const e=t[a];"object"!==typeof e||Array.isArray(e)?void 0!==e&&(n[i][o]=e):Object.assign(n[i],e)}else n[i][o]=e[o]}))}))}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 _(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:c}=r.triggers,{scaleType:u}=i.triggers,{onSet:f}=r,h=e[c.prop],p=e[o.prop]||this.state.dimensions[n].valueDomain,g=function(e){switch(e){case"quantize":default:return a;case"linear":return s;case"quantile":return l;case"ordinal":return d}}(u&&e[u.prop]),m=g(p,h);"object"===typeof f&&"function"===typeof e[f.props]&&e[f.props](m.domain()),this.setDimensionState(n,{scaleFunc:m})}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(e){let{info:t}=e;let n=null;if(t.picked&&t.index>-1){const e=this.state.layerData.data[t.index],r={};for(const t in this.dimensionUpdaters){const{pickingInfo:n}=this.dimensionUpdaters[t],{sortedBins:i}=this.state.dimensions[t],o=i.binMap[e.index]&&i.binMap[e.index].value;r[n]=o}n=Object.assign(r,e,{points:e.filteredPoints||e.points})}return t.picked=Boolean(n),t.object=n,t}getAccessor(e){return this.dimensionUpdaters.hasOwnProperty(e)?this.dimensionUpdaters[e].attributeAccessor:T}}},6525:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a,z:()=>o});var r=n(65148);let i={};function o(e){i=e}function a(e,t,n,o){r.Z.level>0&&i[e]&&i[e].call(null,t,n,o)}},21921:(e,t,n)=>{"use strict";n.d(t,{Z:()=>R});var r=n(68185),i=n(6509),o=n(87966),a=n(64180);class s{constructor(e,t){(0,r.Z)(this,"opts",void 0),(0,r.Z)(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.Z?{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=(0,c.TK)(e,r));const a=e.byteLength+o+2*r.stride;i.byteLength0&&void 0!==arguments[0]?arguments[0]:{};this.state.bounds=null;const t=this.value,{startOffset:n=0,endOffset:r}=e;this.buffer.subData({data:this.doublePrecision&&t instanceof Float64Array?(0,c.TK)(t,{size:this.size,startIndex:n,endIndex:r}):t.subarray(n,r),offset:n*t.BYTES_PER_ELEMENT+this.byteOffset})}allocate(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const{state:n}=this,r=n.allocatedValue,i=l.Z.allocate(r,e+1,{size:this.size,type:this.settings.defaultType,copy:t});this.value=i;const{buffer:o,byteOffset:a}=this;return o.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;r0&&void 0!==arguments[0]?arguments[0]:{};const t=this.state.needsRedraw;return this.state.needsRedraw=t&&!e,t}getUpdateTriggers(){const{accessor:e}=this.settings;return[this.id].concat("function"!==typeof e&&e||[])}supportsTransition(){return Boolean(this.settings.transition)}getTransitionSetting(e){if(!e||!this.supportsTransition())return null;const{accessor:t}=this.settings,n=this.settings.transition,r=Array.isArray(t)?e[t.find((t=>e[t]))]:e[t];return(0,y.M0)(r,n)}setNeedsUpdate(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.id,t=arguments.length>1?arguments[1]:void 0;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===A)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=A}clearNeedsUpdate(){this.state.needsUpdate=!1,this.state.updateRanges=v}setNeedsRedraw(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]: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!==A),!0))}updateBuffer(e){let{numInstances:t,data:n,props:r,context:i}=e;if(!this.needsUpdate())return!1;const{state:{updateRanges:o},settings:{update:a,noAlloc:s}}=this;let l=!0;if(a){for(const[e,s]of o)a.call(i,this,{data:n,startRow:e,endRow:s,props:r,numInstances:t});if(this.value)if(this.constant||this.buffer.byteLength1&&void 0!==arguments[1]?arguments[1]:null;const{state:n,settings:r}=this;if(!e)return n.binaryValue=null,n.binaryAccessor=null,!1;if(r.noAlloc)return!1;if(n.binaryValue===e)return this.clearNeedsUpdate(),!0;n.binaryValue=e,this.setNeedsRedraw();if(r.transform||t!==this.startIndices){ArrayBuffer.isView(e)&&(e={value:e});const i=e;(0,p.Z)(ArrayBuffer.isView(i.value),"invalid ".concat(r.accessor));const o=Boolean(i.size)&&i.size!==this.size;return n.binaryAccessor=(0,g.jr)(i.value,{size:i.size||this.size,stride:i.stride,offset:i.offset,startIndices:t,nested:o}),!1}return this.clearNeedsUpdate(),this.setData(e),!0}getVertexOffset(e){const{startIndices:t}=this;return(t?eu?c.set(t,A):(e._normalizeValue(t,b.target,0),(0,m.k)({target:c,source:b.target,start:A,count:n}));A+=n*u}else e._normalizeValue(t,c,A),A+=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 _=n(12091),w=n(6525),x=n(15966),E=n(78191);const S="\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";var C=n(77378),P=n(81786),T=n(64282);const k={interpolation:class{constructor(e){let{gl:t,attribute:n,timeline:i}=e;(0,r.Z)(this,"gl",void 0),(0,r.Z)(this,"type","interpolation"),(0,r.Z)(this,"attributeInTransition",void 0),(0,r.Z)(this,"settings",void 0),(0,r.Z)(this,"attribute",void 0),(0,r.Z)(this,"transition",void 0),(0,r.Z)(this,"currentStartIndices",void 0),(0,r.Z)(this,"currentLength",void 0),(0,r.Z)(this,"transform",void 0),(0,r.Z)(this,"buffers",void 0),this.gl=t,this.transition=new E.Z(i),this.attribute=n,this.attributeInTransition=new b(t,n.settings),this.currentStartIndices=n.startIndices,this.currentLength=0,this.transform=function(e,t){const n=(0,y.w)(t.size);return new x.Z(e,{vs:S,defines:{ATTRIBUTE_TYPE:n},varyings:["vCurrent"]})}(t,n);const o={byteLength:0,usage:35050};this.buffers=[new a.Z(t,o),new a.Z(t,o)]}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;(0,y.DY)(r);const o={numInstances:t,attribute:i,fromLength:this.currentLength,fromStartIndices:this.currentStartIndices,getData:e.enter};for(const a of r)(0,y.IV)({buffer:a,...o});this.currentStartIndices=i.startIndices,this.currentLength=(0,y.pi)(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:(0,y.AQ)(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(e){let{gl:t,attribute:n,timeline:i}=e;(0,r.Z)(this,"gl",void 0),(0,r.Z)(this,"type","spring"),(0,r.Z)(this,"attributeInTransition",void 0),(0,r.Z)(this,"settings",void 0),(0,r.Z)(this,"attribute",void 0),(0,r.Z)(this,"transition",void 0),(0,r.Z)(this,"currentStartIndices",void 0),(0,r.Z)(this,"currentLength",void 0),(0,r.Z)(this,"texture",void 0),(0,r.Z)(this,"framebuffer",void 0),(0,r.Z)(this,"transform",void 0),(0,r.Z)(this,"buffers",void 0),this.gl=t,this.type="spring",this.transition=new E.Z(i),this.attribute=n,this.attributeInTransition=new b(t,{...n.settings,normalized:!1}),this.currentStartIndices=n.startIndices,this.currentLength=0,this.texture=function(e){return new P.Z(e,{data:new Uint8Array(4),format:6408,type:5121,border:0,mipmaps:!1,dataFormat:6408,width:1,height:1})}(t),this.framebuffer=function(e,t){return new T.Z(e,{id:"spring-transition-is-transitioning-framebuffer",width:1,height:1,attachments:{36064:t}})}(t,this.texture),this.transform=function(e,t,n){const r=(0,y.w)(t.size);return new x.Z(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"]})}(t,n,this.framebuffer);const o={byteLength:0,usage:35050};this.buffers=[new a.Z(t,o),new a.Z(t,o),new a.Z(t,o)]}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 a of r)(0,y.IV)({buffer:a,...o});this.settings=e,this.currentStartIndices=i.startIndices,this.currentLength=(0,y.pi)(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:(0,y.AQ)(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]}}),(0,y.DY)(e),this.attributeInTransition.setData({buffer:e[1],value:this.attribute.value});return(0,C.z6)(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 M{constructor(e,t){let{id:n,timeline:i}=t;(0,r.Z)(this,"id",void 0),(0,r.Z)(this,"isSupported",void 0),(0,r.Z)(this,"gl",void 0),(0,r.Z)(this,"timeline",void 0),(0,r.Z)(this,"transitions",void 0),(0,r.Z)(this,"needsRedraw",void 0),(0,r.Z)(this,"numInstances",void 0),this.id=n,this.gl=e,this.timeline=i,this.transitions={},this.needsRedraw=!1,this.numInstances=1,this.isSupported=x.Z.isSupported(e)}finalize(){for(const e in this.transitions)this._removeTransition(e)}update(e){let{attributes:t,transitions:n,numInstances:r}=e;this.numInstances=r||1;for(const i in t){const e=t[i],r=e.getTransitionSetting(n);r&&this._updateAttribute(i,e,r)}for(const i in this.transitions){const e=t[i];e&&e.getTransitionSetting(n)||this._removeTransition(i)}}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 t in this.transitions){this.transitions[t].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 u.Z.warn("WebGL2 not supported by this browser. Transition for ".concat(e," is disabled."))();r&&this._removeTransition(e);const o=k[n.type];o?this.transitions[e]=new o({attribute:t,timeline:this.timeline,gl:this.gl}):(u.Z.error("unsupported transition type '".concat(n.type,"'"))(),i=!1)}(i||t.needsRedraw())&&(this.needsRedraw=!0,this.transitions[e].start(n,this.numInstances))}}const O="attributeManager.invalidate";class R{constructor(e){let{id:t="attribute-manager",stats:n,timeline:i}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,r.Z)(this,"id",void 0),(0,r.Z)(this,"gl",void 0),(0,r.Z)(this,"attributes",void 0),(0,r.Z)(this,"updateTriggers",void 0),(0,r.Z)(this,"needsRedraw",void 0),(0,r.Z)(this,"userData",void 0),(0,r.Z)(this,"stats",void 0),(0,r.Z)(this,"attributeTransitionManager",void 0),(0,r.Z)(this,"mergeBoundsMemoized",(0,_.Z)(c.cc)),this.id=t,this.gl=e,this.attributes={},this.updateTriggers={},this.needsRedraw=!0,this.userData={},this.stats=n,this.attributeTransitionManager=new M(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(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{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);(0,w.Z)(O,this,e,n)}invalidateAll(e){for(const t in this.attributes)this.attributes[t].setNeedsUpdate(t,e);(0,w.Z)(O,this,"all")}update(e){let{data:t,numInstances:n,startIndices:r=null,transitions:i,props:o={},buffers:a={},context:s={}}=e,l=!1;(0,w.Z)("attributeManager.updateStart",this),this.stats&&this.stats.get("Update Attributes").timeStart();for(const c in this.attributes){const e=this.attributes[c],i=e.settings.accessor;e.startIndices=r,e.numInstances=n,o[c]&&u.Z.removed("props.".concat(c),"data.attributes.".concat(c))(),e.setExternalBuffer(a[c])||e.setBinaryValue("string"===typeof i?a[i]:void 0,t.startIndices)||"string"===typeof i&&!a[i]&&e.setConstantValue(o[i])||e.needsUpdate()&&(l=!0,this._updateAttribute({attribute:e,numInstances:n,data:t,props:o,context:s})),this.needsRedraw=this.needsRedraw||e.needsRedraw()}l&&(0,w.Z)("attributeManager.updateEnd",this,n),this.stats&&this.stats.get("Update Attributes").timeEnd(),this.attributeTransitionManager.update({attributes:this.attributes,numInstances:n,transitions:i})}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(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{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){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e||(e=this.getAttributes());const n={};for(const r in e)t[r]||Object.assign(n,e[r].getShaderAttributes());return n}_add(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};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 b(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((0,w.Z)("attribute.updateStart",t),t.constant)return void t.setConstantValue(t.value);t.allocate(n)&&(0,w.Z)("attribute.allocate",t,n);t.updateBuffer(e)&&(this.needsRedraw=!0,(0,w.Z)("attribute.updateEnd",t,n))}}},83063:(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 c=s;for(;cl,pi:()=>c,w:()=>s,AQ:()=>a,M0:()=>o,IV:()=>u});const i={interpolation:{duration:0,easing:e=>e},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 c(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 u(e){let{buffer:t,numInstances:n,attribute:i,fromLength:o,fromStartIndices:a,getData:s=(e=>e)}=e;const l=i.doublePrecision&&i.value instanceof Float64Array?2:1,u=i.size*l,d=i.byteOffset,f=i.startIndices,h=a&&f,p=c(i,n),g=i.isConstant;if(!h&&o>=p)return;const m=g?i.value:i.getBuffer().getData({srcByteOffset:d});if(i.settings.normalized&&!g){const e=s;s=(t,n)=>i.normalizeConstant(e(t,n))}const v=g?(e,t)=>s(m,t):(e,t)=>s(m.subarray(e,e+u),t),A=t.getData({length:o}),y=new Float32Array(p);!function(e){let{source:t,target:n,size:i,getData:o,sourceStartIndices:a,targetStartIndices:s}=e;if(!Array.isArray(s))return r({source:t,target:n,size:i,getData:o}),n;let l=0,c=0;const u=o&&((e,t)=>o(e+c,t)),d=Math.min(a.length,s.length);for(let f=1;f{"use strict";n.d(t,{Z:()=>l});var r=n(68185),i=n(53104),o=n(6525),a=n(35395),s=n(15672);class l extends i.Z{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(e){let{info:t}=e;const{object:n}=t;return n&&n.__source&&n.__source.parent&&n.__source.parent.id===this.id?(t.object=n.__source.object,t.index=n.__source.index,t):t}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(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};var t;const{opacity:n,pickable:r,visible:i,parameters:o,getPolygonOffset:a,highlightedObjectIndex:l,autoHighlight:c,highlightColor:u,coordinateSystem:d,coordinateOrigin:f,wrapLongitude:h,positionFormat:p,modelMatrix:g,extensions:m,fetch:v,operation:A,_subLayerProps:y}=this.props,b={id:"",updateTriggers:{},opacity:n,pickable:r,visible:i,parameters:o,getPolygonOffset:a,highlightedObjectIndex:l,autoHighlight:c,highlightColor:u,coordinateSystem:d,coordinateOrigin:f,wrapLongitude:h,positionFormat:p,modelMatrix:g,extensions:m,fetch:v,operation:A},_=y&&e.id&&y[e.id],w=_&&_.updateTriggers,x=e.id||"sublayer";if(_){const t=this.props[s.Wb],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 s of m){const e=s.getSubLayerProps.call(this,s);e&&Object.assign(b,e,{updateTriggers:Object.assign(b.updateTriggers,e.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=(0,a.x)(e,Boolean),this.internalState.subLayers=n}(0,o.Z)("compositeLayer.renderLayers",this,r,n);for(const i of n)i.parent=this}}(0,r.Z)(l,"layerName","CompositeLayer")},98029:(e,t,n)=>{"use strict";n.d(t,{Df:()=>i,FP:()=>s,iI:()=>a,zG:()=>o});var r=n(65148);const i={DEFAULT:-1,LNGLAT:1,METER_OFFSETS:2,LNGLAT_OFFSETS:3,CARTESIAN:0};Object.defineProperty(i,"IDENTITY",{get:()=>(r.Z.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"}}},21999:(e,t,n)=>{"use strict";n.d(t,{Z:()=>yn});var r=n(68185);let i=1,o=1;class a{constructor(){this.time=0,this.channels=new Map,this.animations=new Map,this.playing=!1,this.lastEngineTime=-1}addChannel(e){const{delay:t=0,duration:n=Number.POSITIVE_INFINITY,rate:r=1,repeat:o=1}=e,a=i++,s={time:0,delay:t,duration:n,rate:r,repeat:o};return this._setChannelTime(s,this.time),this.channels.set(a,s),a}removeChannel(e){this.channels.delete(e);for(const[t,n]of this.animations)n.channel===e&&this.detachAnimation(t)}isFinished(e){const t=this.channels.get(e);return void 0!==t&&this.time>=t.delay+t.duration*t.repeat}getTime(e){if(void 0===e)return this.time;const t=this.channels.get(e);return void 0===t?-1:t.time}setTime(e){this.time=Math.max(0,e);const t=this.channels.values();for(const r of t)this._setChannelTime(r,this.time);const n=this.animations.values();for(const r of n){const{animation:e,channel:t}=r;e.setTime(this.getTime(t))}}play(){this.playing=!0}pause(){this.playing=!1,this.lastEngineTime=-1}reset(){this.setTime(0)}attachAnimation(e,t){const n=o++;return this.animations.set(n,{animation:e,channel:t}),e.setTime(this.getTime(t)),n}detachAnimation(e){this.animations.delete(e)}update(e){this.playing&&(-1===this.lastEngineTime&&(this.lastEngineTime=e),this.setTime(this.time+(e-this.lastEngineTime)),this.lastEngineTime=e)}_setChannelTime(e,t){const n=t-e.delay;n>=e.duration*e.repeat?e.time=e.duration*e.rate:(e.time=Math.max(0,n)%e.duration,e.time*=e.rate)}}var s=n(15672),l=n(65148),c=n(6525),u=n(35395),d=n(89069),f=n(63734);class h{constructor(e,t,n){(0,r.Z)(this,"id",void 0),(0,r.Z)(this,"context",void 0),(0,r.Z)(this,"isLoaded",void 0),(0,r.Z)(this,"persistent",void 0),(0,r.Z)(this,"_loadCount",0),(0,r.Z)(this,"_subscribers",new Set),(0,r.Z)(this,"_data",void 0),(0,r.Z)(this,"_loader",void 0),(0,r.Z)(this,"_error",void 0),(0,r.Z)(this,"_content",void 0),this.id=e,this.context=n,this.setData(t)}subscribe(e){this._subscribers.add(e)}unsubscribe(e){this._subscribers.delete(e)}inUse(){return this._subscribers.size>0}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=(0,f.z)(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 i of this._subscribers)i.onChange(this.getData())}}class p{constructor(e){let{gl:t,protocol:n}=e;(0,r.Z)(this,"protocol",void 0),(0,r.Z)(this,"_context",void 0),(0,r.Z)(this,"_resources",void 0),(0,r.Z)(this,"_consumers",void 0),(0,r.Z)(this,"_pruneRequest",void 0),this.protocol=n||"resource://",this._context={gl:t,resourceManager:this},this._resources={},this._consumers={},this._pruneRequest=null}contains(e){return!!e.startsWith(this.protocol)||e in this._resources}add(e){let{resourceId:t,data:n,forceUpdate:r=!1,persistent:i=!0}=e,o=this._resources[t];o?o.setData(n,r):(o=new h(t,n,this._context),this._resources[t]=o),o.persistent=i}remove(e){const t=this._resources[e];t&&(t.delete(),delete this._resources[e])}unsubscribe(e){let{consumerId:t}=e;const n=this._consumers[t];if(n){for(const e in n){const t=n[e],r=this._resources[t.resourceId];r&&r.unsubscribe(t)}delete this._consumers[t],this.prune()}}subscribe(e){let{resourceId:t,onChange:n,consumerId:r,requestId:i="default"}=e;const{_resources:o,protocol:a}=this;t.startsWith(a)&&(t=t.replace(a,""),o[t]||this.add({resourceId:t,data:null,persistent:!1}));const s=o[t];if(this._track(r,i,s,n),s)return s.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 g=n(43809),m=n(68833),v=n(61518);const A=[v.Z],y=["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 b(e){const t=m.Z.getDefaultProgramManager(e);for(const n of A)t.addDefaultModule(n);for(const n of y)t.addShaderHook(n);return t}class _{constructor(e){let{deck:t,stats:n,viewport:i,timeline:o}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,r.Z)(this,"layers",void 0),(0,r.Z)(this,"context",void 0),(0,r.Z)(this,"resourceManager",void 0),(0,r.Z)(this,"_lastRenderedLayers",[]),(0,r.Z)(this,"_needsRedraw",!1),(0,r.Z)(this,"_needsUpdate",!1),(0,r.Z)(this,"_nextLayers",null),(0,r.Z)(this,"_debug",!1),(0,r.Z)(this,"activateViewport",(e=>{(0,c.Z)("layerManager.activateViewport",this,e),e&&(this.context.viewport=e)})),this.layers=[],this.resourceManager=new p({gl:e,protocol:"deck://"}),this.context={mousePosition:null,userData:{},layerManager:this,gl:e,deck:t,programManager:e&&b(e),stats:n||new d.Z({id:"deck.gl"}),viewport:i||new g.Z({id:"DEFAULT-INITIAL-VIEWPORT"}),timeline:o||new a,resourceManager:this.resourceManager,onError:void 0},Object.seal(this)}finalize(){this.resourceManager.finalize();for(const e of this.layers)this._finalizeLayer(e)}needsRedraw(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{clearRedrawFlags:!1},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(){let{layerIds:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};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){(0,c.Z)("layerManager.setLayers",this,t,e),this._lastRenderedLayers=e;const n=(0,u.x)(e,Boolean);for(const r of n)r.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 o of e)n[o.id]?l.Z.warn("Multiple old layers with same id ".concat(o.id))():n[o.id]=o;const r=[];this._updateSublayersRecursively(t,n,r),this._finalizeOldLayers(n);let i=!1;for(const o of r)if(o.hasUniformTransition()){i="Uniform transition in ".concat(o);break}this._needsUpdate=i,this.layers=r}_updateSublayersRecursively(e,t,n){for(const i of e){i.context=this.context;const e=t[i.id];null===e&&l.Z.warn("Multiple new layers with same id ".concat(i.id))(),t[i.id]=null;let o=null;try{this._debug&&e!==i&&i.validateProps(),e?(this._transferLayerState(e,i),this._updateLayer(i)):this._initializeLayer(i),n.push(i),o=i.isComposite?i.getSubLayers():null}catch(r){this._handleError("matching",r,i)}o&&this._updateSublayersRecursively(o,t,n)}}_finalizeOldLayers(e){for(const t in e){const n=e[t];n&&this._finalizeLayer(n)}}_initializeLayer(e){try{e._initialize(),e.lifecycle=s.dt.INITIALIZED}catch(t){this._handleError("initialization",t,e)}}_transferLayerState(e,t){t._transferState(e),t.lifecycle=s.dt.MATCHED,t!==e&&(e.lifecycle=s.dt.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=s.dt.AWAITING_FINALIZATION;try{e._finalize(),e.lifecycle=s.dt.FINALIZED}catch(t){this._handleError("finalization",t,e)}}}var w=n(63549);class x{constructor(e){(0,r.Z)(this,"width",void 0),(0,r.Z)(this,"height",void 0),(0,r.Z)(this,"views",void 0),(0,r.Z)(this,"viewState",void 0),(0,r.Z)(this,"controllers",void 0),(0,r.Z)(this,"timeline",void 0),(0,r.Z)(this,"_viewports",void 0),(0,r.Z)(this,"_viewportMap",void 0),(0,r.Z)(this,"_isUpdating",void 0),(0,r.Z)(this,"_needsRedraw",void 0),(0,r.Z)(this,"_needsUpdate",void 0),(0,r.Z)(this,"_eventManager",void 0),(0,r.Z)(this,"_eventCallbacks",void 0),this.views=[],this.width=100,this.height=100,this.viewState={},this.controllers={},this.timeline=e.timeline,this._viewports=[],this._viewportMap={},this._isUpdating=!1,this._needsRedraw="First render",this._needsUpdate="Initialize",this._eventManager=e.eventManager,this._eventCallbacks={onViewStateChange:e.onViewStateChange,onInteractionStateChange:e.onInteractionStateChange},Object.seal(this),this.setProps(e)}finalize(){for(const e in this.controllers){const t=this.controllers[e];t&&t.finalize()}this.controllers={}}needsRedraw(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{clearRedrawFlags:!1};const t=this._needsRedraw;return e.clearRedrawFlags&&(this._needsRedraw=!1),t}setNeedsUpdate(e){this._needsUpdate=this._needsUpdate||e,this._needsRedraw=this._needsRedraw||e}updateViewStates(){for(const e in this.controllers){const t=this.controllers[e];t&&t.updateTransition()}}getViewports(e){return e?this._viewports.filter((t=>t.containsPixel(e))):this._viewports}getViews(){const e={};return this.views.forEach((t=>{e[t.id]=t})),e}getView(e){return this.views.find((t=>t.id===e))}getViewState(e){const t="string"===typeof e?this.getView(e):e,n=t&&this.viewState[t.getViewStateId()]||this.viewState;return t?t.filterViewState(n):n}getViewport(e){return this._viewportMap[e]}unproject(e,t){const n=this.getViewports(),r={x:e[0],y:e[1]};for(let i=n.length-1;i>=0;--i){const o=n[i];if(o.containsPixel(r)){const n=e.slice();return n[0]-=o.x,n[1]-=o.y,o.unproject(n,t)}}return null}setProps(e){e.views&&this._setViews(e.views),e.viewState&&this._setViewState(e.viewState),("width"in e||"height"in e)&&this._setSize(e.width,e.height),this._isUpdating||this._update()}_update(){this._isUpdating=!0,this._needsUpdate&&(this._needsUpdate=!1,this._rebuildViewports()),this._needsUpdate&&(this._needsUpdate=!1,this._rebuildViewports()),this._isUpdating=!1}_setSize(e,t){e===this.width&&t===this.height||(this.width=e,this.height=t,this.setNeedsUpdate("Size changed"))}_setViews(e){e=(0,u.x)(e,Boolean);this._diffViews(e,this.views)&&this.setNeedsUpdate("views changed"),this.views=e}_setViewState(e){if(e){!(0,w.v)(e,this.viewState,3)&&this.setNeedsUpdate("viewState changed"),this.viewState=e}else l.Z.warn("missing `viewState` or `initialViewState`")()}_onViewStateChange(e,t){this._eventCallbacks.onViewStateChange&&this._eventCallbacks.onViewStateChange({...t,viewId:e})}_createController(e,t){return new(0,t.type)({timeline:this.timeline,eventManager:this._eventManager,onViewStateChange:this._onViewStateChange.bind(this,t.id),onStateChange:this._eventCallbacks.onInteractionStateChange,makeViewport:t=>{var n;return null===(n=this.getView(e.id))||void 0===n?void 0:n.makeViewport({viewState:t,width:this.width,height:this.height})}})}_updateController(e,t,n,r){const i=e.controller;if(i){const o={...t,...i,id:e.id,x:n.x,y:n.y,width:n.width,height:n.height};return r||(r=this._createController(e,o)),r&&r.setProps(o),r}return null}_rebuildViewports(){const{views:e}=this,t=this.controllers;this._viewports=[],this.controllers={};let n=!1;for(let r=e.length;r--;){const i=e[r],o=this.getViewState(i),a=i.makeViewport({viewState:o,width:this.width,height:this.height});let s=t[i.id];const l=Boolean(i.controller);l&&!s&&(n=!0),!n&&l||!s||(s.finalize(),s=null),this.controllers[i.id]=this._updateController(i,o,a,s),this._viewports.unshift(a)}for(const r in t){const e=t[r];e&&!this.controllers[r]&&e.finalize()}this._buildViewportMap()}_buildViewportMap(){this._viewportMap={},this._viewports.forEach((e=>{e.id&&(this._viewportMap[e.id]=this._viewportMap[e.id]||e)}))}_diffViews(e,t){return e.length!==t.length||e.some(((n,r)=>!e[r].equals(t[r])))}}const E=/([0-9]+\.?[0-9]*)(%|px)/;function S(e){switch(typeof e){case"number":return{position:e,relative:!1};case"string":const t=E.exec(e);if(t&&t.length>=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 C(e,t){return e.relative?Math.round(e.position*t):e.position}var P=n(37954);class T{constructor(e){(0,r.Z)(this,"id",void 0),(0,r.Z)(this,"viewportInstance",void 0),(0,r.Z)(this,"_x",void 0),(0,r.Z)(this,"_y",void 0),(0,r.Z)(this,"_width",void 0),(0,r.Z)(this,"_height",void 0),(0,r.Z)(this,"_padding",void 0),(0,r.Z)(this,"props",void 0);const{id:t,x:n=0,y:i=0,width:o="100%",height:a="100%",padding:s=null,viewportInstance:l}=e||{};(0,P.Z)(!l||l instanceof g.Z),this.viewportInstance=l,this.id=t||this.constructor.displayName||"view",this.props={...e,id:this.id},this._x=S(n),this._y=S(i),this._width=S(o),this._height=S(a),this._padding=s&&{left:S(s.left||0),right:S(s.right||0),top:S(s.top||0),bottom:S(s.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&&(0,w.v)(this.props,e.props,2))}makeViewport(e){let{width:t,height:n,viewState:r}=e;if(this.viewportInstance)return this.viewportInstance;r=this.filterViewState(r);const i=this.getDimensions({width:t,height:n});return new this.ViewportType({...r,...this.props,...i})}getViewStateId(){const{viewState:e}=this.props;return"string"===typeof e?e:(null===e||void 0===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(e){let{width:t,height:n}=e;const r={x:C(this._x,t),y:C(this._y,n),width:C(this._width,t),height:C(this._height,n)};return this._padding&&(r.padding={left:C(this._padding.left,t),top:C(this._padding.top,n),right:C(this._padding.right,t),bottom:C(this._padding.bottom,n)}),r}get controller(){const e=this.props.controller;return e?!0===e?{type:this.ControllerType}:"function"===typeof e?{type:e}:{type:this.ControllerType,...e}:null}}var k=n(5550),M=n(30373),O=n(78191);const R=()=>{},I=2,L=3,N=e=>e,D=1;class F{constructor(e){(0,r.Z)(this,"getControllerState",void 0),(0,r.Z)(this,"props",void 0),(0,r.Z)(this,"propsInTransition",void 0),(0,r.Z)(this,"transition",void 0),(0,r.Z)(this,"onViewStateChange",void 0),(0,r.Z)(this,"onStateChange",void 0),(0,r.Z)(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 O.Z(e.timeline),this.onViewStateChange=e.onViewStateChange||R,this.onStateChange=e.onStateChange||R}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===I?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===L||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 s={duration:o,easing:t.transitionEasing||N,interpolator:i,interruption:t.transitionInterruption||D,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(s),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||void 0===e||e(t)}}}class j{constructor(e){(0,r.Z)(this,"_propsToCompare",void 0),(0,r.Z)(this,"_propsToExtract",void 0),(0,r.Z)(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)||!(0,M.fS)(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];(0,P.Z)(Number.isFinite(n)||Array.isArray(n),"".concat(t," is required for transition"))}))}}const B=["longitude","latitude","zoom","bearing","pitch"],Z=["longitude","latitude","zoom"];class z extends j{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=Array.isArray(e)?e:e.transitionProps,n=Array.isArray(e)?{}:e;n.transitionProps=Array.isArray(t)?{compare:t,required:t}:t||{compare:B,required:Z},super(n.transitionProps),(0,r.Z)(this,"opts",void 0),this.opts=n}initializeProps(e,t){const n=super.initializeProps(e,t),{makeViewport:r,around:i}=this.opts;if(r&&i){const o=r(e),a=r(t),s=o.unproject(i);n.start.around=i,Object.assign(n.end,{around:a.project(s),aroundPosition:s,width:t.width,height:t.height})}return n}interpolateProps(e,t,n){const r={};for(const i of this._propsToExtract)r[i]=(0,M.t7)(e[i]||0,t[i]||0,n);if(t.aroundPosition&&this.opts.makeViewport){const i=this.opts.makeViewport({...t,...r});Object.assign(r,i.panByPosition(t.aroundPosition,(0,M.t7)(e.around,t.around,n)))}return r}}const U={transitionDuration:0},H=e=>1-(1-e)*(1-e),V=["wheel"],W=["panstart","panmove","panend"],G=["pinchstart","pinchmove","pinchend"],K=["tripanstart","tripanmove","tripanend"],q=["doubletap"],Y=["keydown"],X={};class ${constructor(e){(0,r.Z)(this,"props",void 0),(0,r.Z)(this,"state",{}),(0,r.Z)(this,"transitionManager",void 0),(0,r.Z)(this,"eventManager",void 0),(0,r.Z)(this,"onViewStateChange",void 0),(0,r.Z)(this,"onStateChange",void 0),(0,r.Z)(this,"makeViewport",void 0),(0,r.Z)(this,"_controllerState",void 0),(0,r.Z)(this,"_events",{}),(0,r.Z)(this,"_interactionState",{isDragging:!1}),(0,r.Z)(this,"_customEvents",[]),(0,r.Z)(this,"_eventStartBlocked",null),(0,r.Z)(this,"_panMove",!1),(0,r.Z)(this,"invertPan",!1),(0,r.Z)(this,"dragMode","rotate"),(0,r.Z)(this,"inertia",0),(0,r.Z)(this,"scrollZoom",!0),(0,r.Z)(this,"dragPan",!0),(0,r.Z)(this,"dragRotate",!0),(0,r.Z)(this,"doubleClickZoom",!0),(0,r.Z)(this,"touchZoom",!0),(0,r.Z)(this,"touchRotate",!1),(0,r.Z)(this,"keyboard",!0),this.transitionManager=new F({...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:l=!0}=e,c=Boolean(this.onViewStateChange);this.toggleEvents(V,c&&n),this.toggleEvents(W,c&&(r||i)),this.toggleEvents(G,c&&(a||s)),this.toggleEvents(K,c&&s),this.toggleEvents(q,c&&o),this.toggleEvents(Y,c&&l),this.scrollZoom=n,this.dragPan=r,this.dragRotate=i,this.doubleClickZoom=o,this.touchZoom=a,this.touchRotate=s,this.keyboard=l}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){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};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,U,{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,U,{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:H},{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,U,{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:H},{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;e.srcEvent.preventDefault();const t=this.getCenter(e);if(!this.isPointInBounds(t,e))return!1;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,U,{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,U,{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:H},{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 X._startPinchRotation=e.rotation,X._lastPinchEvent=e,this.updateViewport(n,U,{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:X._startPinchRotation-n})}return this.updateViewport(t,U,{isDragging:!0,isPanning:this.touchZoom,isZooming:this.touchZoom,isRotating:this.touchRotate}),X._lastPinchEvent=e,!0}_onPinchEnd(e){if(!this.isDragging())return!1;const{inertia:t}=this,{_lastPinchEvent:n}=X;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),s=Math.pow(2,o+a*t/2);i=i.zoom({pos:r,scale:s}).zoomEnd(),this.updateViewport(i,{...this._getTransitionProps({around:r}),transitionDuration:t,transitionEasing:H},{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 X._startPinchRotation=null,X._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 z({...e,...t.transitionInterpolator.opts,makeViewport:this.controllerState.makeViewport})}:t:U}}class Q{constructor(e,t){(0,r.Z)(this,"_viewportProps",void 0),(0,r.Z)(this,"_state",void 0),this._viewportProps=this.applyConstraints(e),this._state=t}getViewportProps(){return this._viewportProps}getState(){return this._state}}var J=n(1384);class ee extends Q{constructor(e){const{width:t,height:n,latitude:i,longitude:o,zoom:a,bearing:s=0,pitch:l=0,altitude:c=1.5,position:u=[0,0,0],maxZoom:d=20,minZoom:f=0,maxPitch:h=60,minPitch:p=0,startPanLngLat:g,startZoomLngLat:m,startRotatePos:v,startBearing:A,startPitch:y,startZoom:b,normalize:_=!0}=e;(0,P.Z)(Number.isFinite(o)),(0,P.Z)(Number.isFinite(i)),(0,P.Z)(Number.isFinite(a)),super({width:t,height:n,latitude:i,longitude:o,zoom:a,bearing:s,pitch:l,altitude:c,maxZoom:d,minZoom:f,maxPitch:h,minPitch:p,normalize:_,position:u},{startPanLngLat:g,startZoomLngLat:m,startRotatePos:v,startBearing:A,startPitch:y,startZoom:b}),(0,r.Z)(this,"makeViewport",void 0),this.makeViewport=e.makeViewport}panStart(e){let{pos:t}=e;return this._getUpdatedState({startPanLngLat:this._unproject(t)})}pan(e){let{pos:t,startPos:n}=e;const r=this.getState().startPanLngLat||this._unproject(n);if(!r)return this;const i=this.makeViewport(this.getViewportProps()).panByPosition(r,t);return this._getUpdatedState(i)}panEnd(){return this._getUpdatedState({startPanLngLat:null})}rotateStart(e){let{pos:t}=e;return this._getUpdatedState({startRotatePos:t,startBearing:this.getViewportProps().bearing,startPitch:this.getViewportProps().pitch})}rotate(e){let{pos:t,deltaAngleX:n=0,deltaAngleY:r=0}=e;const{startRotatePos:i,startBearing:o,startPitch:a}=this.getState();if(!i||void 0===o||void 0===a)return this;let s;return s=t?this._getNewRotation(t,i,a,o):{bearing:o+n,pitch:a+r},this._getUpdatedState(s)}rotateEnd(){return this._getUpdatedState({startBearing:null,startPitch:null})}zoomStart(e){let{pos:t}=e;return this._getUpdatedState({startZoomLngLat:this._unproject(t),startZoom:this.getViewportProps().zoom})}zoom(e){let{pos:t,startPos:n,scale:r}=e,{startZoom:i,startZoomLngLat:o}=this.getState();if(o||(i=this.getViewportProps().zoom,o=this._unproject(n)||this._unproject(t)),!o)return this;const{maxZoom:a,minZoom:s}=this.getViewportProps();let l=i+Math.log2(r);l=(0,M.uZ)(l,s,a);const c=this.makeViewport({...this.getViewportProps(),zoom:l});return this._getUpdatedState({zoom:l,...c.panByPosition(o,t)})}zoomEnd(){return this._getUpdatedState({startZoomLngLat:null,startZoom:null})}zoomIn(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:2;return this._zoomFromCenter(e)}zoomOut(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:2;return this._zoomFromCenter(1/e)}moveLeft(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:100;return this._panFromCenter([e,0])}moveRight(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:100;return this._panFromCenter([-e,0])}moveUp(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:100;return this._panFromCenter([0,e])}moveDown(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:100;return this._panFromCenter([0,-e])}rotateLeft(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:15;return this._getUpdatedState({bearing:this.getViewportProps().bearing-e})}rotateRight(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:15;return this._getUpdatedState({bearing:this.getViewportProps().bearing+e})}rotateUp(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:10;return this._getUpdatedState({pitch:this.getViewportProps().pitch+e})}rotateDown(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]: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=(0,M.uZ)(r,n,t);const{maxPitch:i,minPitch:o,pitch:a}=e;e.pitch=(0,M.uZ)(a,o,i);const{normalize:s=!0}=e;return s&&Object.assign(e,(0,J.QA)(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 i=e[0]-t[0],o=e[1]-t[1],a=e[1],s=t[1],{width:l,height:c}=this.getViewportProps(),u=i/l;let d=0;o>0?Math.abs(c-s)>5&&(d=o/(s-c)*1.2):o<0&&s>5&&(d=1-a/s),d=(0,M.uZ)(d,-1,1);const{minPitch:f,maxPitch:h}=this.getViewportProps();let p=n;return d>0?p=n+d*(h-n):d<0&&(p=n-d*(f-n)),{pitch:p,bearing:r+180*u}}}class te extends ${constructor(){super(...arguments),(0,r.Z)(this,"ControllerState",ee),(0,r.Z)(this,"transition",{transitionDuration:300,transitionInterpolator:new z({transitionProps:{compare:["longitude","latitude","zoom","bearing","pitch","position"],required:["longitude","latitude","zoom"]}})}),(0,r.Z)(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}))}}class ne extends T{get ViewportType(){return k.Z}get ControllerType(){return te}}(0,r.Z)(ne,"displayName","MapView");var re=n(81786);const ie=[255,255,255],oe=1;let ae=0;class se{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,r.Z)(this,"id",void 0),(0,r.Z)(this,"color",void 0),(0,r.Z)(this,"intensity",void 0),(0,r.Z)(this,"type","ambient");const{color:t=ie}=e,{intensity:n=oe}=e;this.id=e.id||"ambient-".concat(ae++),this.color=t,this.intensity=n}}var le=n(31549);const ce=[255,255,255],ue=1,de=[0,0,-1];let fe=0;class he{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,r.Z)(this,"id",void 0),(0,r.Z)(this,"color",void 0),(0,r.Z)(this,"intensity",void 0),(0,r.Z)(this,"type","directional"),(0,r.Z)(this,"direction",void 0),(0,r.Z)(this,"shadow",void 0);const{color:t=ce}=e,{intensity:n=ue}=e,{direction:i=de}=e,{_shadow:o=!1}=e;this.id=e.id||"directional-".concat(fe++),this.color=t,this.intensity=n,this.type="directional",this.direction=new le.Z(i).normalize().toArray(),this.shadow=o}getProjectedLight(e){return this}}var pe=n(39944),ge=n(66176),me=n(26277),ve=n(64282),Ae=n(76195);class ye extends ge.Z{constructor(e,t){super(e,t),(0,r.Z)(this,"shadowMap",void 0),(0,r.Z)(this,"depthBuffer",void 0),(0,r.Z)(this,"fbo",void 0),this.shadowMap=new re.Z(e,{width:1,height:1,parameters:{10241:9729,10240:9729,10242:33071,10243:33071}}),this.depthBuffer=new me.Z(e,{format:33189,width:1,height:1}),this.fbo=new ve.Z(e,{id:"shadowmap",width:1,height:1,attachments:{36064:this.shadowMap,36096:this.depthBuffer}})}render(e){const t=this.fbo;(0,Ae.s8)(this.gl,{depthRange:[0,1],depthTest:!0,blend:!1,clearColor:[1,1,1,1]},(()=>{const n=e.viewports[0],r=(0,Ae.w)(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 be=n(98029),_e=n(12091);const we=(0,_e.Z)((function(e){let{viewport:t,center:n}=e;return new pe.Z(t.viewProjectionMatrix).invert().transform(n)})),xe=(0,_e.Z)((function(e){let{viewport:t,shadowMatrices:n}=e;const r=[],i=t.pixelUnprojectionMatrix,o=t.isGeospatial?void 0:1,a=[[0,0,o],[t.width,0,o],[0,t.height,o],[t.width,t.height,o],[0,0,-1],[t.width,0,-1],[0,t.height,-1],[t.width,t.height,-1]].map((e=>function(e,t){const[n,r,i]=e,o=(0,J.CT)([n,r,i],t);if(Number.isFinite(i))return o;return[o[0],o[1],0]}(e,i)));for(const s of n){const e=s.clone().translate(new le.Z(t.center).negate()),n=a.map((t=>e.transform(t))),i=(new pe.Z).ortho({left:Math.min(...n.map((e=>e[0]))),right:Math.max(...n.map((e=>e[0]))),bottom:Math.min(...n.map((e=>e[1]))),top:Math.max(...n.map((e=>e[1]))),near:Math.min(...n.map((e=>-e[2]))),far:Math.max(...n.map((e=>-e[2])))});r.push(i.multiplyRight(s))}return r})),Ee=[0,0,0,1],Se=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,0];const Ce={name:"shadow",dependencies:[v.Z],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:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"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 r={shadow_uDrawShadowMap:Boolean(e.drawToShadowMap),shadow_uUseShadowMap:!!e.shadowMaps&&e.shadowMaps.length>0,shadow_uColor:e.shadowColor||Ee,shadow_uLightId:e.shadowLightId||0,shadow_uLightCount:e.shadowMatrices.length},i=we({viewport:e.viewport,center:t.project_uCenter}),o=[],a=xe({shadowMatrices:e.shadowMatrices,viewport:e.viewport}).slice();for(let s=0;s0?r["shadow_uShadowMap".concat(s)]=e.shadowMaps[s]:r["shadow_uShadowMap".concat(s)]=e.dummyShadowMap;return r}(e,t):{}}},Pe={color:[255,255,255],intensity:1},Te=[{color:[255,255,255],intensity:1,direction:[-1,3,-1]},{color:[255,255,255],intensity:.9,direction:[1,-8,-2.5]}],ke=[0,0,0,200/255];class Me{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,r.Z)(this,"id","lighting-effect"),(0,r.Z)(this,"props",void 0),(0,r.Z)(this,"shadowColor",ke),(0,r.Z)(this,"shadow",void 0),(0,r.Z)(this,"ambientLight",void 0),(0,r.Z)(this,"directionalLights",void 0),(0,r.Z)(this,"pointLights",void 0),(0,r.Z)(this,"shadowPasses",[]),(0,r.Z)(this,"shadowMaps",[]),(0,r.Z)(this,"dummyShadowMap",null),(0,r.Z)(this,"programManager",void 0),(0,r.Z)(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,t){let{layers:n,layerFilter:r,viewports:i,onViewportActive:o,views:a}=t;if(this.shadow){this.shadowMatrices=this._calculateMatrices(),0===this.shadowPasses.length&&this._createShadowPasses(e),this.programManager||(this.programManager=m.Z.getDefaultProgramManager(e),Ce&&this.programManager.addDefaultModule(Ce)),this.dummyShadowMap||(this.dummyShadowMap=new re.Z(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(Ce),this.programManager=null)}_calculateMatrices(){const e=[];for(const t of this.directionalLights){const n=(new pe.Z).lookAt({eye:new le.Z(t.direction).negate()});e.push(n)}return e}_createShadowPasses(e){for(let t=0;tt.id===e.id))){const n=t.findIndex((t=>function(e,t){var n,r;return(null!==(n=e.order)&&void 0!==n?n:1/0)-(null!==(r=t.order)&&void 0!==r?r:1/0)}(t,e)>0));n<0?t.push(e):t.splice(n,0,e),this._setEffects(this.effects)}}setProps(e){"effects"in e&&((0,w.v)(e.effects,this.effects,1)||this._setEffects(e.effects))}needsRedraw(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{clearRedrawFlags:!1};const t=this._needsRedraw;return e.clearRedrawFlags&&(this._needsRedraw=!1),t}getEffects(){return this._resolvedEffects}_setEffects(e){const t={};for(const r of this.effects)t[r.id]=r;const n=[];for(const r of e){const e=t[r.id];e&&e!==r?e.setProps?(e.setProps(r.props),n.push(e)):(e.cleanup(),n.push(r)):n.push(r),delete t[r.id]}for(const r in t)t[r].cleanup();this.effects=n,this._resolvedEffects=n.concat(this._defaultEffects),e.some((e=>e instanceof Me))||this._resolvedEffects.push(Oe),this._needsRedraw="effects changed"}finalize(){for(const e of this._resolvedEffects)e.cleanup();this.effects.length=0,this._resolvedEffects.length=0,this._defaultEffects.length=0}}class Ie extends ge.Z{shouldDrawLayer(e){const{operation:t}=e.props;return t.includes("draw")||t.includes("terrain")}}const Le={blendFunc:[1,0,32771,0],blendEquation:32774};class Ne extends ge.Z{constructor(){super(...arguments),(0,r.Z)(this,"pickZ",void 0),(0,r.Z)(this,"_colorEncoderState",null)}render(e){return"pickingFBO"in e?this._drawPickingBuffer(e):super.render(e)}_drawPickingBuffer(e){let{layers:t,layerFilter:n,views:r,viewports:i,onViewportActive:o,pickingFBO:a,deviceRect:{x:s,y:l,width:c,height:u},cullRect:d,effects:f,pass:h="picking",pickZ:p,moduleParameters:g}=e;const m=this.gl;this.pickZ=p;const v=this._resetColorEncoder(p),A=(0,Ae.s8)(m,{scissorTest:!0,scissor:[s,l,c,u],clearColor:[0,0,0,0],depthMask:!0,depthTest:!0,depthRange:[0,1],colorMask:[!0,!0,!0,!0],...Le,blend:!p},(()=>super.render({target:a,layers:t,layerFilter:n,views:r,viewports:i,onViewportActive:o,cullRect:d,effects:null===f||void 0===f?void 0:f.filter((e=>e.useInPicking)),pass:h,isPicking:!0,moduleParameters:g})));this._colorEncoderState=null;return{decodePickingColor:v&&De.bind(null,v),stats:A}}shouldDrawLayer(e){const{pickable:t,operation:n}=e.props;return t&&n.includes("draw")||n.includes("terrain")}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,Le),r.blend=!0,r.blendColor=function(e,t,n){const{byLayer:r,byAlpha:i}=e;let o,a=r.get(t);a?(a.viewports.push(n),o=a.a):(o=r.size+1,o<=255?(a={a:o,layer:t,viewports:[n]},r.set(t,a),i[o]=a):(l.Z.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 De(e,t){const n=e.byAlpha[t[3]];return n&&{pickedLayer:n.layer,pickedViewports:n.viewports,pickedObjectIndex:n.layer.decodePickingColor(t)}}class Fe{constructor(e){(0,r.Z)(this,"gl",void 0),(0,r.Z)(this,"layerFilter",void 0),(0,r.Z)(this,"drawPickingColors",void 0),(0,r.Z)(this,"drawLayersPass",void 0),(0,r.Z)(this,"pickLayersPass",void 0),(0,r.Z)(this,"renderCount",void 0),(0,r.Z)(this,"_needsRedraw",void 0),(0,r.Z)(this,"renderBuffers",void 0),(0,r.Z)(this,"lastPostProcessEffect",void 0),this.gl=e,this.layerFilter=null,this.drawPickingColors=!1,this.drawLayersPass=new Ie(e),this.pickLayersPass=new Ne(e),this.renderCount=0,this._needsRedraw="Initial render",this.renderBuffers=[],this.lastPostProcessEffect=null}setProps(e){this.layerFilter!==e.layerFilter&&(this.layerFilter=e.layerFilter,this._needsRedraw="layerFilter changed"),this.drawPickingColors!==e.drawPickingColors&&(this.drawPickingColors=e.drawPickingColors,this._needsRedraw="drawPickingColors changed")}renderLayers(e){const t=this.drawPickingColors?this.pickLayersPass:this.drawLayersPass,n={layerFilter:this.layerFilter,isPicking:this.drawPickingColors,...e,target:e.target||ve.Z.getDefaultFramebuffer(this.gl)};n.effects&&this._preRender(n.effects,n);const r=this.lastPostProcessEffect?this.renderBuffers[0]:n.target,i=t.render({...n,target:r});n.effects&&this._postRender(n.effects,n),this.renderCount++,(0,c.Z)("deckRenderer.renderLayers",this,i,e)}needsRedraw(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{clearRedrawFlags:!1};const t=this._needsRedraw;return e.clearRedrawFlags&&(this._needsRedraw=!1),t}finalize(){const{renderBuffers:e}=this;for(const t of e)t.delete();e.length=0}_preRender(e,t){this.lastPostProcessEffect=null,t.preRenderStats=t.preRenderStats||{};for(const n of e)t.preRenderStats[n.id]=n.preRender(this.gl,t),n.postRender&&(this.lastPostProcessEffect=n.id);this.lastPostProcessEffect&&this._resizeRenderBuffers()}_resizeRenderBuffers(){const{renderBuffers:e}=this;0===e.length&&e.push(new ve.Z(this.gl),new ve.Z(this.gl));for(const t of e)t.resize()}_postRender(e,t){const{renderBuffers:n}=this,r={...t,inputBuffer:n[0],swapBuffer:n[1],target:null};for(const i of e)if(i.postRender){if(i.id===this.lastPostProcessEffect){r.target=t.target,i.postRender(this.gl,r);break}const e=i.postRender(this.gl,r);r.inputBuffer=e,r.swapBuffer=e===n[0]?n[1]:n[0]}}}var je=n(77378);const Be={pickedColor:null,pickedObjectIndex:-1};function Ze(e){let{pickedColors:t,decodePickingColor:n,deviceX:r,deviceY:i,deviceRadius:o,deviceRect:a}=e;const{x:s,y:c,width:u,height:d}=a;let f=o*o,h=-1,p=0;for(let l=0;lf)p+=4*u;else for(let i=0;i=0){const e=i+s-r,t=e*e+n;t<=f&&(f=t,h=p)}p+=4}}if(h>=0){const e=t.slice(h,h+4),r=n(e);if(r){const t=Math.floor(h/4/u),n=h/4-t*u;return{...r,pickedColor:e,pickedX:s+n,pickedY:c+t}}l.Z.error("Picked non-existent layer. Is picking buffer corrupt?")()}return Be}function ze(e){let t,{pickInfo:n,viewports:r,pixelRatio:i,x:o,y:a,z:s}=e,l=r[0];if(r.length>1&&(l=function(e,t){for(let n=e.length-1;n>=0;n--){const r=e[n];if(r.containsPixel(t))return r}return e[0]}((null===n||void 0===n?void 0:n.pickedViewports)||r,{x:o,y:a})),l){const e=[o-l.x,a-l.y];void 0!==s&&(e[2]=s),t=l.unproject(e)}return{color:null,layer:null,viewport:l,index:-1,picked:!1,x:o,y:a,pixel:[o,a],coordinate:t,devicePixel:n&&"pickedX"in n?[n.pickedX,n.pickedY]:void 0,pixelRatio:i}}function Ue(e){const{pickInfo:t,lastPickedInfo:n,mode:r,layers:i}=e,{pickedColor:o,pickedLayer:a,pickedObjectIndex:s}=t,l=a?[a]:[];if("hover"===r){const e=n.index,t=n.layerId,r=a?a.props.id:null;if(r!==t||s!==e){if(r!==t){const e=i.find((e=>e.props.id===t));e&&l.unshift(e)}n.layerId=r,n.index=s,n.info=null}}const c=ze(e),u=new Map;return u.set(null,c),l.forEach((e=>{let t={...c};e===a&&(t.color=o,t.index=s,t.picked=!0),t=He({layer:e,info:t,mode:r});const i=t.layer;e===a&&"hover"===r&&(n.info=t),u.set(i.id,t),"hover"===r&&i.updateAutoHighlight(t)})),u}function He(e){let{layer:t,info:n,mode:r}=e;for(;t&&n;){const e=n.layer||null;n.sourceLayer=e,n.layer=t,n=t.getPickingInfo({info:n,mode:r,sourceLayer:e}),t=t.parent}return n}class Ve{constructor(e){(0,r.Z)(this,"gl",void 0),(0,r.Z)(this,"pickingFBO",void 0),(0,r.Z)(this,"depthFBO",void 0),(0,r.Z)(this,"pickLayersPass",void 0),(0,r.Z)(this,"layerFilter",void 0),(0,r.Z)(this,"lastPickedInfo",void 0),(0,r.Z)(this,"_pickable",!0),this.gl=e,this.pickLayersPass=new Ne(e),this.lastPickedInfo={index:-1,layerId:null,info:null}}setProps(e){"layerFilter"in e&&(this.layerFilter=e.layerFilter),"_pickable"in e&&(this._pickable=e._pickable)}finalize(){this.pickingFBO&&this.pickingFBO.delete(),this.depthFBO&&(this.depthFBO.color.delete(),this.depthFBO.delete())}pickObject(e){return this._pickClosestObject(e)}pickObjects(e){return this._pickVisibleObjects(e)}getLastPickedObject(e){let{x:t,y:n,layers:r,viewports:i}=e,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.lastPickedInfo.info;const a=o&&o.layer&&o.layer.id,s=o&&o.viewport&&o.viewport.id,l=a?r.find((e=>e.id===a)):null,c=s&&i.find((e=>e.id===s))||i[0],u=c&&c.unproject([t-c.x,n-c.y]),d={x:t,y:n,viewport:c,coordinate:u,layer:l};return{...o,...d}}_resizeBuffer(){var e,t;const{gl:n}=this;if(!this.pickingFBO&&(this.pickingFBO=new ve.Z(n),ve.Z.isSupported(n,{colorBufferFloat:!0}))){const e=new ve.Z(n);e.attach({36064:new re.Z(n,{format:(0,Ae.D0)(n)?34836:6408,type:5126})}),this.depthFBO=e}null===(e=this.pickingFBO)||void 0===e||e.resize({width:n.canvas.width,height:n.canvas.height}),null===(t=this.depthFBO)||void 0===t||t.resize({width:n.canvas.width,height:n.canvas.height})}_getPickable(e){if(!1===this._pickable)return null;const t=e.filter((e=>this.pickLayersPass.shouldDrawLayer(e)&&!e.isComposite));return t.length?t:null}_pickClosestObject(e){let{layers:t,views:n,viewports:r,x:i,y:o,radius:a=0,depth:s=1,mode:l="query",unproject3D:c,onViewportActive:u,effects:d}=e;const f=this._getPickable(t),h=(0,Ae.w)(this.gl);if(!f)return{result:[],emptyInfo:ze({viewports:r,x:i,y:o,pixelRatio:h})};this._resizeBuffer();const p=(0,Ae.JY)(this.gl,[i,o],!0),g=[p.x+Math.floor(p.width/2),p.y+Math.floor(p.height/2)],m=Math.round(a*h),{width:v,height:A}=this.pickingFBO,y=this._getPickingRect({deviceX:g[0],deviceY:g[1],deviceRadius:m,deviceWidth:v,deviceHeight:A}),b={x:i-a,y:o-a,width:2*a+1,height:2*a+1};let _;const w=[],x=new Set;for(let E=0;E=0){const e=t.slice(i,i+4),o=e.join(",");if(!r.has(o)){const t=n(e);t?r.set(o,{...t,color:e}):l.Z.error("Picked non-existent layer. Is picking buffer corrupt?")()}}return Array.from(r.values())}(this._drawAndSample({layers:h,views:n,viewports:r,onViewportActive:d,deviceRect:_,cullRect:{x:i,y:o,width:a,height:s},effects:f,pass:"picking:".concat(c)})),x=new Map,E=Number.isFinite(u);for(let l=0;l=u);l++){const e=w[l];let t={color:e.pickedColor,layer:null,index:e.pickedObjectIndex,picked:!0,x:i,y:o,pixelRatio:p};t=He({layer:e.pickedLayer,info:t,mode:c}),x.has(t.object)||x.set(t.object,t)}return Array.from(x.values())}_drawAndSample(e){let{layers:t,views:n,viewports:r,onViewportActive:i,deviceRect:o,cullRect:a,effects:s,pass:l}=e,c=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const u=c?this.depthFBO:this.pickingFBO,d={layers:t,layerFilter:this.layerFilter,views:n,viewports:r,onViewportActive:i,pickingFBO:u,deviceRect:o,cullRect:a,effects:s,pass:l,pickZ:c,preRenderStats:{}};for(const A of s)A.useInPicking&&(d.preRenderStats[A.id]=A.preRender(this.gl,d));const{decodePickingColor:f}=this.pickLayersPass.render(d),{x:h,y:p,width:g,height:m}=o,v=new(c?Float32Array:Uint8Array)(g*m*4);return(0,je.z6)(u,{sourceX:h,sourceY:p,sourceWidth:g,sourceHeight:m,target:v}),{pickedColors:v,decodePickingColor:f}}_getPickingRect(e){let{deviceX:t,deviceY:n,deviceRadius:r,deviceWidth:i,deviceHeight:o}=e;const a=Math.max(0,t-r),s=Math.max(0,n-r),l=Math.min(i,t+r+1)-a,c=Math.min(o,n+r+1)-s;return l<=0||c<=0?null:{x:a,y:s,width:l,height:c}}}const We={zIndex:"1",position:"absolute",pointerEvents:"none",color:"#a0a7b4",backgroundColor:"#29323c",padding:"10px",top:"0",left:"0",display:"none"};class Ge{constructor(e){(0,r.Z)(this,"el",null),(0,r.Z)(this,"isVisible",!1);const t=e.parentElement;t&&(this.el=document.createElement("div"),this.el.className="deck-tooltip",Object.assign(this.el.style,We),t.appendChild(this.el))}setTooltip(e,t,n){const r=this.el;if(r){if("string"===typeof e)r.innerText=e;else{if(!e)return this.isVisible=!1,void(r.style.display="none");e.text&&(r.innerText=e.text),e.html&&(r.innerHTML=e.html),e.className&&(r.className=e.className),Object.assign(r.style,e.style)}this.isVisible=!0,r.style.display="block",r.style.transform="translate(".concat(t,"px, ").concat(n,"px)")}}remove(){this.el&&(this.el.remove(),this.el=null)}}var Ke=n(10468),qe=n(44219);var Ye=n(69088),Xe=n(69113);const{_parseImageNode:$e}=globalThis,Qe="undefined"!==typeof Image,Je="undefined"!==typeof ImageBitmap,et=Boolean($e),tt=!!Xe.jU||et;function nt(e){const t=it(e);if(!t)throw new Error("Not an image");return t}function rt(e){switch(nt(e)){case"data":return e;case"image":case"imagebitmap":const t=document.createElement("canvas"),n=t.getContext("2d");if(!n)throw new Error("getImageData");return t.width=e.width,t.height=e.height,n.drawImage(e,0,0),n.getImageData(0,0,e.width,e.height);default:throw new Error("getImageData")}}function it(e){return"undefined"!==typeof ImageBitmap&&e instanceof ImageBitmap?"imagebitmap":"undefined"!==typeof Image&&e instanceof Image?"image":e&&"object"===typeof e&&e.data&&e.width&&e.height?"data":null}const ot=/^data:image\/svg\+xml/,at=/\.svg((\?|#).*)?$/;function st(e){return e&&(ot.test(e)||at.test(e))}function lt(e,t){if(st(t))throw new Error("SVG cannot be parsed directly to imagebitmap");return new Blob([new Uint8Array(e)])}async function ct(e,t,n){const r=function(e,t){if(st(t)){let t=(new TextDecoder).decode(e);try{"function"===typeof unescape&&"function"===typeof encodeURIComponent&&(t=unescape(encodeURIComponent(t)))}catch(n){throw new Error(n.message)}return"data:image/svg+xml;base64,".concat(btoa(t))}return lt(e,t)}(e,n),i=self.URL||self.webkitURL,o="string"!==typeof r&&i.createObjectURL(r);try{return await async function(e,t){const n=new Image;if(n.src=e,t.image&&t.image.decode&&n.decode)return await n.decode(),n;return await new Promise(((t,r)=>{try{n.onload=()=>t(n),n.onerror=t=>r(new Error("Could not load image ".concat(e,": ").concat(t)))}catch(i){r(i)}}))}(o||r,t)}finally{o&&i.revokeObjectURL(o)}}const ut={};let dt=!0;async function ft(e,t,n){let r;if(st(n)){r=await ct(e,t,n)}else r=lt(e,n);const i=t&&t.imagebitmap;return await async function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;!function(e){for(const t in e||ut)return!1;return!0}(t)&&dt||(t=null);if(t)try{return await createImageBitmap(e,t)}catch(n){console.warn(n),dt=!1}return await createImageBitmap(e)}(r,i)}const ht=!1,pt=!0;function gt(e){const t=mt(e);return function(e){const t=mt(e),n=t.byteLength>=24&&2303741511===t.getUint32(0,ht);if(!n)return null;return{mimeType:"image/png",width:t.getUint32(16,ht),height:t.getUint32(20,ht)}}(t)||function(e){const t=mt(e),n=t.byteLength>=3&&65496===t.getUint16(0,ht)&&255===t.getUint8(2);if(!n)return null;const{tableMarkers:r,sofMarkers:i}=function(){const e=new Set([65499,65476,65484,65501,65534]);for(let n=65504;n<65520;++n)e.add(n);const t=new Set([65472,65473,65474,65475,65477,65478,65479,65481,65482,65483,65485,65486,65487,65502]);return{tableMarkers:e,sofMarkers:t}}();let o=2;for(;o+9=10&&1195984440===t.getUint32(0,ht);if(!n)return null;return{mimeType:"image/gif",width:t.getUint16(6,pt),height:t.getUint16(8,pt)}}(t)||function(e){const t=mt(e),n=t.byteLength>=14&&16973===t.getUint16(0,ht)&&t.getUint32(2,pt)===t.byteLength;if(!n)return null;return{mimeType:"image/bmp",width:t.getUint32(18,pt),height:t.getUint32(22,pt)}}(t)}function mt(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")}const vt={id:"image",module:"images",name:"Images",version:"3.3.3",mimeTypes:["image/png","image/jpeg","image/gif","image/webp","image/bmp","image/vnd.microsoft.icon","image/svg+xml"],extensions:["png","jpg","jpeg","gif","webp","bmp","ico","svg"],parse:async function(e,t,n){const r=((t=t||{}).image||{}).type||"auto",{url:i}=n||{};let o;switch(function(e){switch(e){case"auto":case"data":return function(){if(Je)return"imagebitmap";if(Qe)return"image";if(tt)return"data";throw new Error("Install '@loaders.gl/polyfills' to parse images under Node.js")}();default:return function(e){switch(e){case"auto":return Je||Qe||tt;case"imagebitmap":return Je;case"image":return Qe;case"data":return tt;default:throw new Error("@loaders.gl/images: image ".concat(e," not supported in this environment"))}}(e),e}}(r)){case"imagebitmap":o=await ft(e,t,i);break;case"image":o=await ct(e,t,i);break;case"data":o=await async function(e,t){const{mimeType:n}=gt(e)||{},r=globalThis._parseImageNode;return(0,Ye.h)(r),await r(e,n)}(e);break;default:(0,Ye.h)(!1)}return"data"===r&&(o=rt(o)),o},tests:[e=>Boolean(gt(new DataView(e)))],options:{image:{type:"auto",decode:!0}}};const At={id:"JSON",name:"JSON",module:"",version:"",options:{},extensions:["json","geojson"],mimeTypes:["application/json","application/geo+json"],testText:function(e){const t=e[0],n=e[e.length-1];return"{"===t&&"}"===n||"["===t&&"]"===n},parseTextSync:JSON.parse};const yt=function(){const e="8.9.7",t=globalThis.deck&&globalThis.deck.VERSION;if(t&&t!==e)throw new Error("deck.gl - multiple versions detected: ".concat(t," vs ").concat(e));return t||(l.Z.log(1,"deck.gl ".concat(e))(),globalThis.deck={...globalThis.deck,VERSION:e,version:e,log:l.Z,_registerLoggers:c.z},(0,qe.fh)([At,[vt,{imagebitmap:{premultiplyAlpha:"none"}}]])),e}();var bt=n(21748),_t=n(53886),wt=n(59661),xt=n(1112),Et=n(6509),St=n(87966);class Ct extends xt.Z{get[Symbol.toStringTag](){return"Query"}static isSupported(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];const n=(0,Ae.D0)(e),r=(0,Et.ag)(e,St.h.TIMER_QUERY);let i=n||r;for(const o of t)switch(o){case"queries":i=i&&n;break;case"timers":i=i&&r;break;default:(0,wt.h)(!1)}return i}constructor(e){super(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}),this.target=null,this._queryPending=!1,this._pollingPromise=null,Object.seal(this)}beginTimeElapsedQuery(){return this.begin(35007)}beginOcclusionQuery(){let{conservative:e=!1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.begin(e?36202:35887)}beginTransformFeedbackQuery(){return this.begin(35976)}begin(e){return this._queryPending||(this.target=e,this.gl2.beginQuery(this.target,this.handle)),this}end(){return this._queryPending||this.target&&(this.gl2.endQuery(this.target),this.target=null,this._queryPending=!0),this}isResultAvailable(){if(!this._queryPending)return!1;const e=this.gl2.getQueryParameter(this.handle,34919);return e&&(this._queryPending=!1),e}isTimerDisjoint(){return this.gl2.getParameter(36795)}getResult(){return this.gl2.getQueryParameter(this.handle,34918)}getTimerMilliseconds(){return this.getResult()/1e6}createPoll(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Number.POSITIVE_INFINITY;if(this._pollingPromise)return this._pollingPromise;let t=0;return this._pollingPromise=new Promise(((n,r)=>{const i=()=>{this.isResultAvailable()?(n(this.getResult()),this._pollingPromise=null):t++>e?(r("Timed out"),this._pollingPromise=null):requestAnimationFrame(i)};requestAnimationFrame(i)})),this._pollingPromise}_createHandle(){return Ct.isSupported(this.gl)?this.gl2.createQuery():null}_deleteHandle(){this.gl2.deleteQuery(this.handle)}}const Pt=(0,n(89258).Z)()&&"undefined"!==typeof document;let Tt=0;class kt{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{onCreateContext:t=(e=>(0,Ae.s9)(e)),onAddHTML:n=null,onInitialize:r=(()=>{}),onRender:i=(()=>{}),onFinalize:o=(()=>{}),onError:a,gl:s=null,glOptions:l={},debug:c=!1,createFramebuffer:u=!1,autoResizeViewport:d=!0,autoResizeDrawingBuffer:f=!0,stats:h=_t.lR.get("animation-loop-".concat(Tt++))}=e;let{useDevicePixels:p=!0}=e;"useDevicePixelRatio"in e&&(Ae.cM.deprecated("useDevicePixelRatio","useDevicePixels")(),p=e.useDevicePixelRatio),this.props={onCreateContext:t,onAddHTML:n,onInitialize:r,onRender:i,onFinalize:o,onError:a,gl:s,glOptions:l,debug:c,createFramebuffer:u},this.gl=s,this.needsRedraw=null,this.timeline=null,this.stats=h,this.cpuTime=this.stats.get("CPU Time"),this.gpuTime=this.stats.get("GPU Time"),this.frameRate=this.stats.get("Frame Rate"),this._initialized=!1,this._running=!1,this._animationFrameId=null,this._nextFramePromise=null,this._resolveNextFrame=null,this._cpuStartTime=0,this.setProps({autoResizeViewport:d,autoResizeDrawingBuffer:f,useDevicePixels:p}),this.start=this.start.bind(this),this.stop=this.stop.bind(this),this._pageLoadPromise=null,this._onMousemove=this._onMousemove.bind(this),this._onMouseleave=this._onMouseleave.bind(this)}delete(){this.stop(),this._setDisplay(null)}setNeedsRedraw(e){return(0,wt.h)("string"===typeof e),this.needsRedraw=this.needsRedraw||e,this}setProps(e){return"autoResizeViewport"in e&&(this.autoResizeViewport=e.autoResizeViewport),"autoResizeDrawingBuffer"in e&&(this.autoResizeDrawingBuffer=e.autoResizeDrawingBuffer),"useDevicePixels"in e&&(this.useDevicePixels=e.useDevicePixels),this}start(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(this._running)return this;this._running=!0;const t=this._getPageLoadPromise().then((()=>!this._running||this._initialized?null:(this._createWebGLContext(e),this._createFramebuffer(),this._startEventHandling(),this._initializeCallbackData(),this._updateCallbackData(),this._resizeCanvasDrawingBuffer(),this._resizeViewport(),this._gpuTimeQuery=Ct.isSupported(this.gl,["timers"])?new Ct(this.gl):null,this._initialized=!0,this.onInitialize(this.animationProps)))).then((e=>{this._running&&(this._addCallbackData(e||{}),!1!==e&&this._startLoop())}));return this.props.onError&&t.catch(this.props.onError),this}redraw(){return this.isContextLost()||(this._beginTimers(),this._setupFrame(),this._updateCallbackData(),this._renderFrame(this.animationProps),this._clearNeedsRedraw(),this.offScreen&&this.gl.commit&&this.gl.commit(),this._resolveNextFrame&&(this._resolveNextFrame(this),this._nextFramePromise=null,this._resolveNextFrame=null),this._endTimers()),this}stop(){return this._running&&(this._finalizeCallbackData(),this._cancelAnimationFrame(this._animationFrameId),this._nextFramePromise=null,this._resolveNextFrame=null,this._animationFrameId=null,this._running=!1),this}attachTimeline(e){return this.timeline=e,this.timeline}detachTimeline(){this.timeline=null}waitForRender(){return this.setNeedsRedraw("waitForRender"),this._nextFramePromise||(this._nextFramePromise=new Promise((e=>{this._resolveNextFrame=e}))),this._nextFramePromise}async toDataURL(){return this.setNeedsRedraw("toDataURL"),await this.waitForRender(),this.gl.canvas.toDataURL()}isContextLost(){return this.gl.isContextLost()}onCreateContext(){return this.props.onCreateContext(...arguments)}onInitialize(){return this.props.onInitialize(...arguments)}onRender(){return this.props.onRender(...arguments)}onFinalize(){return this.props.onFinalize(...arguments)}getHTMLControlValue(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;const n=document.getElementById(e);return n?Number(n.value):t}setViewParameters(){return Ae.cM.removed("AnimationLoop.setViewParameters","AnimationLoop.setProps")(),this}_startLoop(){const e=()=>{this._running&&(this.redraw(),this._animationFrameId=this._requestAnimationFrame(e))};this._cancelAnimationFrame(this._animationFrameId),this._animationFrameId=this._requestAnimationFrame(e)}_getPageLoadPromise(){return this._pageLoadPromise||(this._pageLoadPromise=Pt?new Promise(((e,t)=>{Pt&&"complete"===document.readyState?e(document):window.addEventListener("load",(()=>{e(document)}))})):Promise.resolve({})),this._pageLoadPromise}_setDisplay(e){this.display&&(this.display.delete(),this.display.animationLoop=null),e&&(e.animationLoop=this),this.display=e}_cancelAnimationFrame(e){return this.display&&this.display.cancelAnimationFrame?this.display.cancelAnimationFrame(e):(t=e,"undefined"!==typeof window&&window.cancelAnimationFrame?window.cancelAnimationFrame(t):clearTimeout(t));var t}_requestAnimationFrame(e){if(this._running)return this.display&&this.display.requestAnimationFrame?this.display.requestAnimationFrame(e):(t=e,"undefined"!==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame(t):setTimeout(t,1e3/60));var t}_renderFrame(){this.display?this.display._renderFrame(...arguments):this.onRender(...arguments)}_clearNeedsRedraw(){this.needsRedraw=null}_setupFrame(){this._resizeCanvasDrawingBuffer(),this._resizeViewport(),this._resizeFramebuffer()}_initializeCallbackData(){this.animationProps={gl:this.gl,stop:this.stop,canvas:this.gl.canvas,framebuffer:this.framebuffer,useDevicePixels:this.useDevicePixels,needsRedraw:null,startTime:Date.now(),engineTime:0,tick:0,tock:0,time:0,_timeline:this.timeline,_loop:this,_animationLoop:this,_mousePosition:null}}_updateCallbackData(){const{width:e,height:t,aspect:n}=this._getSizeAndAspect();e===this.animationProps.width&&t===this.animationProps.height||this.setNeedsRedraw("drawing buffer resized"),n!==this.animationProps.aspect&&this.setNeedsRedraw("drawing buffer aspect changed"),this.animationProps.width=e,this.animationProps.height=t,this.animationProps.aspect=n,this.animationProps.needsRedraw=this.needsRedraw,this.animationProps.engineTime=Date.now()-this.animationProps.startTime,this.timeline&&this.timeline.update(this.animationProps.engineTime),this.animationProps.tick=Math.floor(this.animationProps.time/1e3*60),this.animationProps.tock++,this.animationProps.time=this.timeline?this.timeline.getTime():this.animationProps.engineTime,this.animationProps._offScreen=this.offScreen}_finalizeCallbackData(){this.onFinalize(this.animationProps)}_addCallbackData(e){"object"===typeof e&&null!==e&&(this.animationProps=Object.assign({},this.animationProps,e))}_createWebGLContext(e){if(this.offScreen=e.canvas&&"undefined"!==typeof OffscreenCanvas&&e.canvas instanceof OffscreenCanvas,e=Object.assign({},e,this.props.glOptions),this.gl=this.props.gl?(0,Ae.yW)(this.props.gl,e):this.onCreateContext(e),!(0,Ae.UF)(this.gl))throw new Error("AnimationLoop.onCreateContext - illegal context returned");(0,Ae.kL)(this.gl),this._createInfoDiv()}_createInfoDiv(){if(this.gl.canvas&&this.props.onAddHTML){const e=document.createElement("div");document.body.appendChild(e),e.style.position="relative";const t=document.createElement("div");t.style.position="absolute",t.style.left="10px",t.style.bottom="10px",t.style.width="300px",t.style.background="white",e.appendChild(this.gl.canvas),e.appendChild(t);const n=this.props.onAddHTML(t);n&&(t.innerHTML=n)}}_getSizeAndAspect(){const e=this.gl.drawingBufferWidth,t=this.gl.drawingBufferHeight;let n=1;const{canvas:r}=this.gl;return r&&r.clientHeight?n=r.clientWidth/r.clientHeight:e>0&&t>0&&(n=e/t),{width:e,height:t,aspect:n}}_resizeViewport(){this.autoResizeViewport&&this.gl.viewport(0,0,this.gl.drawingBufferWidth,this.gl.drawingBufferHeight)}_resizeCanvasDrawingBuffer(){this.autoResizeDrawingBuffer&&(0,Ae.aQ)(this.gl,{useDevicePixels:this.useDevicePixels})}_createFramebuffer(){this.props.createFramebuffer&&(this.framebuffer=new ve.Z(this.gl))}_resizeFramebuffer(){this.framebuffer&&this.framebuffer.resize({width:this.gl.drawingBufferWidth,height:this.gl.drawingBufferHeight})}_beginTimers(){this.frameRate.timeEnd(),this.frameRate.timeStart(),this._gpuTimeQuery&&this._gpuTimeQuery.isResultAvailable()&&!this._gpuTimeQuery.isTimerDisjoint()&&this.stats.get("GPU Time").addTime(this._gpuTimeQuery.getTimerMilliseconds()),this._gpuTimeQuery&&this._gpuTimeQuery.beginTimeElapsedQuery(),this.cpuTime.timeStart()}_endTimers(){this.cpuTime.timeEnd(),this._gpuTimeQuery&&this._gpuTimeQuery.end()}_startEventHandling(){const{canvas:e}=this.gl;e&&(e.addEventListener("mousemove",this._onMousemove),e.addEventListener("mouseleave",this._onMouseleave))}_onMousemove(e){this.animationProps._mousePosition=[e.offsetX,e.offsetY]}_onMouseleave(e){this.animationProps._mousePosition=null}}var Mt=n(37283);const Ot={mousedown:1,mousemove:2,mouseup:4};!function(e){const t=e.prototype.handler;e.prototype.handler=function(e){const n=this.store;e.button>0&&"pointerdown"===e.type&&(function(e,t){for(let n=0;nt.pointerId===e.pointerId))||n.push(e)),t.call(this,e)}}(Mt.PointerEventInput),Mt.MouseInput.prototype.handler=function(e){let t=Ot[e.type];1&t&&e.button>=0&&(this.pressed=!0),2&t&&0===e.which&&(t=4),this.pressed&&(4&t&&(this.pressed=!1),this.callback(this.manager,t,{pointers:[e],changedPointers:[e],pointerType:"mouse",srcEvent:e}))};const Rt=Mt.Manager,It=Mt;class Lt{constructor(e,t,n){this.element=e,this.callback=t,this.options={enable:!0,...n}}}const Nt=It?[[It.Pan,{event:"tripan",pointers:3,threshold:0,enable:!1}],[It.Rotate,{enable:!1}],[It.Pinch,{enable:!1}],[It.Swipe,{enable:!1}],[It.Pan,{threshold:0,enable:!1}],[It.Press,{enable:!1}],[It.Tap,{event:"doubletap",taps:2,enable:!1}],[It.Tap,{event:"anytap",enable:!1}],[It.Tap,{enable:!1}]]:null,Dt={tripan:["rotate","pinch","pan"],rotate:["pinch"],pinch:["pan"],pan:["press","doubletap","anytap","tap"],doubletap:["anytap"],anytap:["tap"]},Ft={doubletap:["tap"]},jt={pointerdown:"pointerdown",pointermove:"pointermove",pointerup:"pointerup",touchstart:"pointerdown",touchmove:"pointermove",touchend:"pointerup",mousedown:"pointerdown",mousemove:"pointermove",mouseup:"pointerup"},Bt={KEY_EVENTS:["keydown","keyup"],MOUSE_EVENTS:["mousedown","mousemove","mouseup","mouseover","mouseout","mouseleave"],WHEEL_EVENTS:["wheel","mousewheel"]},Zt={tap:"tap",anytap:"anytap",doubletap:"doubletap",press:"press",pinch:"pinch",pinchin:"pinch",pinchout:"pinch",pinchstart:"pinch",pinchmove:"pinch",pinchend:"pinch",pinchcancel:"pinch",rotate:"rotate",rotatestart:"rotate",rotatemove:"rotate",rotateend:"rotate",rotatecancel:"rotate",tripan:"tripan",tripanstart:"tripan",tripanmove:"tripan",tripanup:"tripan",tripandown:"tripan",tripanleft:"tripan",tripanright:"tripan",tripanend:"tripan",tripancancel:"tripan",pan:"pan",panstart:"pan",panmove:"pan",panup:"pan",pandown:"pan",panleft:"pan",panright:"pan",panend:"pan",pancancel:"pan",swipe:"swipe",swipeleft:"swipe",swiperight:"swipe",swipeup:"swipe",swipedown:"swipe"},zt={click:"tap",anyclick:"anytap",dblclick:"doubletap",mousedown:"pointerdown",mousemove:"pointermove",mouseup:"pointerup",mouseover:"pointerover",mouseout:"pointerout",mouseleave:"pointerleave"},Ut="undefined"!==typeof navigator&&navigator.userAgent?navigator.userAgent.toLowerCase():"",Ht="undefined"!==typeof window?window:n.g;"undefined"!==typeof n.g?n.g:window,"undefined"!==typeof document&&document;let Vt=!1;try{const e={get passive(){return Vt=!0,!0}};Ht.addEventListener("test",null,e),Ht.removeEventListener("test",null)}catch(bn){Vt=!1}const Wt=-1!==Ut.indexOf("firefox"),{WHEEL_EVENTS:Gt}=Bt,Kt="wheel",qt=4.000244140625;class Yt extends Lt{constructor(e,t,n){super(e,t,n),this.handleEvent=e=>{if(!this.options.enable)return;let t=e.deltaY;Ht.WheelEvent&&(Wt&&e.deltaMode===Ht.WheelEvent.DOM_DELTA_PIXEL&&(t/=Ht.devicePixelRatio),e.deltaMode===Ht.WheelEvent.DOM_DELTA_LINE&&(t*=40)),0!==t&&t%qt===0&&(t=Math.floor(t/qt)),e.shiftKey&&t&&(t*=.25),this.callback({type:Kt,center:{x:e.clientX,y:e.clientY},delta:-t,srcEvent:e,pointerType:"mouse",target:e.target})},this.events=(this.options.events||[]).concat(Gt),this.events.forEach((t=>e.addEventListener(t,this.handleEvent,!!Vt&&{passive:!1})))}destroy(){this.events.forEach((e=>this.element.removeEventListener(e,this.handleEvent)))}enableEventType(e,t){e===Kt&&(this.options.enable=t)}}const{MOUSE_EVENTS:Xt}=Bt,$t="pointermove",Qt="pointerover",Jt="pointerout",en="pointerenter",tn="pointerleave";class nn extends Lt{constructor(e,t,n){super(e,t,n),this.handleEvent=e=>{this.handleOverEvent(e),this.handleOutEvent(e),this.handleEnterEvent(e),this.handleLeaveEvent(e),this.handleMoveEvent(e)},this.pressed=!1;const{enable:r}=this.options;this.enableMoveEvent=r,this.enableLeaveEvent=r,this.enableEnterEvent=r,this.enableOutEvent=r,this.enableOverEvent=r,this.events=(this.options.events||[]).concat(Xt),this.events.forEach((t=>e.addEventListener(t,this.handleEvent)))}destroy(){this.events.forEach((e=>this.element.removeEventListener(e,this.handleEvent)))}enableEventType(e,t){e===$t&&(this.enableMoveEvent=t),e===Qt&&(this.enableOverEvent=t),e===Jt&&(this.enableOutEvent=t),e===en&&(this.enableEnterEvent=t),e===tn&&(this.enableLeaveEvent=t)}handleOverEvent(e){this.enableOverEvent&&"mouseover"===e.type&&this._emit(Qt,e)}handleOutEvent(e){this.enableOutEvent&&"mouseout"===e.type&&this._emit(Jt,e)}handleEnterEvent(e){this.enableEnterEvent&&"mouseenter"===e.type&&this._emit(en,e)}handleLeaveEvent(e){this.enableLeaveEvent&&"mouseleave"===e.type&&this._emit(tn,e)}handleMoveEvent(e){if(this.enableMoveEvent)switch(e.type){case"mousedown":e.button>=0&&(this.pressed=!0);break;case"mousemove":0===e.which&&(this.pressed=!1),this.pressed||this._emit($t,e);break;case"mouseup":this.pressed=!1}}_emit(e,t){this.callback({type:e,center:{x:t.clientX,y:t.clientY},srcEvent:t,pointerType:"mouse",target:t.target})}}const{KEY_EVENTS:rn}=Bt,on="keydown",an="keyup";class sn extends Lt{constructor(e,t,n){super(e,t,n),this.handleEvent=e=>{const t=e.target||e.srcElement;"INPUT"===t.tagName&&"text"===t.type||"TEXTAREA"===t.tagName||(this.enableDownEvent&&"keydown"===e.type&&this.callback({type:on,srcEvent:e,key:e.key,target:e.target}),this.enableUpEvent&&"keyup"===e.type&&this.callback({type:an,srcEvent:e,key:e.key,target:e.target}))},this.enableDownEvent=this.options.enable,this.enableUpEvent=this.options.enable,this.events=(this.options.events||[]).concat(rn),e.tabIndex=this.options.tabIndex||0,e.style.outline="none",this.events.forEach((t=>e.addEventListener(t,this.handleEvent)))}destroy(){this.events.forEach((e=>this.element.removeEventListener(e,this.handleEvent)))}enableEventType(e,t){e===on&&(this.enableDownEvent=t),e===an&&(this.enableUpEvent=t)}}const ln="contextmenu";class cn extends Lt{constructor(e,t,n){super(e,t,n),this.handleEvent=e=>{this.options.enable&&this.callback({type:ln,center:{x:e.clientX,y:e.clientY},srcEvent:e,pointerType:"mouse",target:e.target})},e.addEventListener("contextmenu",this.handleEvent)}destroy(){this.element.removeEventListener("contextmenu",this.handleEvent)}enableEventType(e,t){e===ln&&(this.options.enable=t)}}const un={pointerdown:1,pointermove:2,pointerup:4,mousedown:1,mousemove:2,mouseup:4};function dn(e){const t=un[e.srcEvent.type];if(!t)return null;const{buttons:n,button:r,which:i}=e.srcEvent;let o=!1,a=!1,s=!1;return 4===t||2===t&&!Number.isFinite(n)?(o=1===i,a=2===i,s=3===i):2===t?(o=Boolean(1&n),a=Boolean(4&n),s=Boolean(2&n)):1===t&&(o=0===r,a=1===r,s=2===r),{leftButton:o,middleButton:a,rightButton:s}}function fn(e,t){const n=e.center;if(!n)return null;const r=t.getBoundingClientRect(),i=r.width/t.offsetWidth||1,o=r.height/t.offsetHeight||1;return{center:n,offsetCenter:{x:(n.x-r.left-t.clientLeft)/i,y:(n.y-r.top-t.clientTop)/o}}}const hn={srcElement:"root",priority:0};class pn{constructor(e){this.handleEvent=e=>{if(this.isEmpty())return;const t=this._normalizeEvent(e);let n=e.srcEvent.target;for(;n&&n!==t.rootElement;){if(this._emit(t,n),t.handled)return;n=n.parentNode}this._emit(t,"root")},this.eventManager=e,this.handlers=[],this.handlersByElement=new Map,this._active=!1}isEmpty(){return!this._active}add(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=arguments.length>4&&void 0!==arguments[4]&&arguments[4];const{handlers:o,handlersByElement:a}=this;let s=hn;"string"===typeof n||n&&n.addEventListener?s={...hn,srcElement:n}:n&&(s={...hn,...n});let l=a.get(s.srcElement);l||(l=[],a.set(s.srcElement,l));const c={type:e,handler:t,srcElement:s.srcElement,priority:s.priority};r&&(c.once=!0),i&&(c.passive=!0),o.push(c),this._active=this._active||!c.passive;let u=l.length-1;for(;u>=0&&!(l[u].priority>=c.priority);)u--;l.splice(u+1,0,c)}remove(e,t){const{handlers:n,handlersByElement:r}=this;for(let i=n.length-1;i>=0;i--){const o=n[i];if(o.type===e&&o.handler===t){n.splice(i,1);const e=r.get(o.srcElement);e.splice(e.indexOf(o),1),0===e.length&&r.delete(o.srcElement)}}this._active=n.some((e=>!e.passive))}_emit(e,t){const n=this.handlersByElement.get(t);if(n){let t=!1;const r=()=>{e.handled=!0},i=()=>{e.handled=!0,t=!0},o=[];for(let a=0;a{e.srcEvent.preventDefault()},stopImmediatePropagation:null,stopPropagation:null,handled:!1,rootElement:t}}}const gn={events:null,recognizers:null,recognizerOptions:{},Manager:Rt,touchAction:"none",tabIndex:0};class mn{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0;this._onBasicInput=e=>{const{srcEvent:t}=e,n=jt[t.type];n&&this.manager.emit(n,e)},this._onOtherEvent=e=>{this.manager.emit(e.type,e)},this.options={...gn,...t},this.events=new Map,this.setElement(e);const{events:n}=this.options;n&&this.on(n)}getElement(){return this.element}setElement(e){if(this.element&&this.destroy(),this.element=e,!e)return;const{options:t}=this,n=t.Manager;this.manager=new n(e,{touchAction:t.touchAction,recognizers:t.recognizers||Nt}).on("hammer.input",this._onBasicInput),t.recognizers||Object.keys(Dt).forEach((e=>{const t=this.manager.get(e);t&&Dt[e].forEach((e=>{t.recognizeWith(e)}))}));for(const r in t.recognizerOptions){const e=this.manager.get(r);if(e){const n=t.recognizerOptions[r];delete n.enable,e.set(n)}}this.wheelInput=new Yt(e,this._onOtherEvent,{enable:!1}),this.moveInput=new nn(e,this._onOtherEvent,{enable:!1}),this.keyInput=new sn(e,this._onOtherEvent,{enable:!1,tabIndex:t.tabIndex}),this.contextmenuInput=new cn(e,this._onOtherEvent,{enable:!1});for(const[r,i]of this.events)i.isEmpty()||(this._toggleRecognizer(i.recognizerName,!0),this.manager.on(r,i.handleEvent))}destroy(){this.element&&(this.wheelInput.destroy(),this.moveInput.destroy(),this.keyInput.destroy(),this.contextmenuInput.destroy(),this.manager.destroy(),this.wheelInput=null,this.moveInput=null,this.keyInput=null,this.contextmenuInput=null,this.manager=null,this.element=null)}on(e,t,n){this._addEventHandler(e,t,n,!1)}once(e,t,n){this._addEventHandler(e,t,n,!0)}watch(e,t,n){this._addEventHandler(e,t,n,!1,!0)}off(e,t){this._removeEventHandler(e,t)}_toggleRecognizer(e,t){const{manager:n}=this;if(!n)return;const r=n.get(e);if(r&&r.options.enable!==t){r.set({enable:t});const i=Ft[e];i&&!this.options.recognizers&&i.forEach((i=>{const o=n.get(i);t?(o.requireFailure(e),r.dropRequireFailure(i)):o.dropRequireFailure(e)}))}this.wheelInput.enableEventType(e,t),this.moveInput.enableEventType(e,t),this.keyInput.enableEventType(e,t),this.contextmenuInput.enableEventType(e,t)}_addEventHandler(e,t,n,r,i){if("string"!==typeof e){n=t;for(const t in e)this._addEventHandler(t,e[t],n,r,i);return}const{manager:o,events:a}=this,s=zt[e]||e;let l=a.get(s);l||(l=new pn(this),a.set(s,l),l.recognizerName=Zt[s]||s,o&&o.on(s,l.handleEvent)),l.add(e,t,n,r,i),l.isEmpty()||this._toggleRecognizer(l.recognizerName,!0)}_removeEventHandler(e,t){if("string"!==typeof e){for(const t in e)this._removeEventHandler(t,e[t]);return}const{events:n}=this,r=zt[e]||e,i=n.get(r);if(i&&(i.remove(e,t),i.isEmpty())){const{recognizerName:e}=i;let t=!1;for(const r of n.values())if(r.recognizerName===e&&!r.isEmpty()){t=!0;break}t||this._toggleRecognizer(e,!1)}}}function vn(){}const An={id:"",width:"100%",height:"100%",style:null,viewState:null,initialViewState:null,pickingRadius:0,layerFilter:null,glOptions:{},parameters:{},parent:null,gl:null,canvas:null,layers:[],effects:[],views:null,controller:null,useDevicePixels:!0,touchAction:"none",eventRecognizerOptions:{},_framebuffer:null,_animate:!1,_pickable:!0,_typedArrayManagerProps:{},_customRender:null,onWebGLInitialized:vn,onResize:vn,onViewStateChange:vn,onInteractionStateChange:vn,onBeforeRender:vn,onAfterRender:vn,onLoad:vn,onError:e=>l.Z.error(e.message)(),onHover:null,onClick:null,onDragStart:null,onDrag:null,onDragEnd:null,_onMetrics:null,getCursor:e=>{let{isDragging:t}=e;return t?"grabbing":"grab"},getTooltip:null,debug:!1,drawPickingColors:!1};class yn{constructor(e){(0,r.Z)(this,"props",void 0),(0,r.Z)(this,"width",0),(0,r.Z)(this,"height",0),(0,r.Z)(this,"userData",{}),(0,r.Z)(this,"canvas",null),(0,r.Z)(this,"viewManager",null),(0,r.Z)(this,"layerManager",null),(0,r.Z)(this,"effectManager",null),(0,r.Z)(this,"deckRenderer",null),(0,r.Z)(this,"deckPicker",null),(0,r.Z)(this,"eventManager",null),(0,r.Z)(this,"tooltip",null),(0,r.Z)(this,"metrics",void 0),(0,r.Z)(this,"animationLoop",void 0),(0,r.Z)(this,"stats",void 0),(0,r.Z)(this,"viewState",void 0),(0,r.Z)(this,"cursorState",void 0),(0,r.Z)(this,"_needsRedraw",void 0),(0,r.Z)(this,"_pickRequest",void 0),(0,r.Z)(this,"_lastPointerDownInfo",null),(0,r.Z)(this,"_metricsCounter",void 0),(0,r.Z)(this,"_onPointerMove",(e=>{const{_pickRequest:t}=this;if("pointerleave"===e.type)t.x=-1,t.y=-1,t.radius=0;else{if(e.leftButton||e.rightButton)return;{const n=e.offsetCenter;if(!n)return;t.x=n.x,t.y=n.y,t.radius=this.props.pickingRadius}}this.layerManager&&(this.layerManager.context.mousePosition={x:t.x,y:t.y}),t.event=e})),(0,r.Z)(this,"_onEvent",(e=>{const t=be.FP[e.type],n=e.offsetCenter;if(!t||!n||!this.layerManager)return;const r=this.layerManager.getLayers(),i=this.deckPicker.getLastPickedObject({x:n.x,y:n.y,layers:r,viewports:this.getViewports(n)},this._lastPointerDownInfo),{layer:o}=i,a=o&&(o[t.handler]||o.props[t.handler]),s=this.props[t.handler];let l=!1;a&&(l=a.call(o,i,e)),!l&&s&&s(i,e)})),(0,r.Z)(this,"_onPointerDown",(e=>{const t=e.offsetCenter,n=this._pick("pickObject","pickObject Time",{x:t.x,y:t.y,radius:this.props.pickingRadius});this._lastPointerDownInfo=n.result[0]||n.emptyInfo})),this.props={...An,...e},e=this.props,this._needsRedraw="Initial render",this._pickRequest={mode:"hover",x:-1,y:-1,radius:0,event:null},this.cursorState={isHovering:!1,isDragging:!1},e.viewState&&e.initialViewState&&l.Z.warn("View state tracking is disabled. Use either `initialViewState` for auto update or `viewState` for manual update.")(),"IE"===(0,bt.Z)()&&l.Z.warn("IE 11 is not supported")(),this.viewState=e.initialViewState,e.gl||"undefined"!==typeof document&&(this.canvas=this._createCanvas(e)),this.animationLoop=this._createAnimationLoop(e),this.stats=new d.Z({id:"deck.gl"}),this.metrics={fps:0,setPropsTime:0,updateAttributesTime:0,framesRedrawn:0,pickTime:0,pickCount:0,gpuTime:0,gpuTimePerFrame:0,cpuTime:0,cpuTimePerFrame:0,bufferMemory:0,textureMemory:0,renderbufferMemory:0,gpuMemory:0},this._metricsCounter=0,this.setProps(e),e._typedArrayManagerProps&&Ke.Z.setOptions(e._typedArrayManagerProps),this.animationLoop.start()}finalize(){var e,t,n,r,i,o,a,s;(this.animationLoop.stop(),this.animationLoop=null,this._lastPointerDownInfo=null,null===(e=this.layerManager)||void 0===e||e.finalize(),this.layerManager=null,null===(t=this.viewManager)||void 0===t||t.finalize(),this.viewManager=null,null===(n=this.effectManager)||void 0===n||n.finalize(),this.effectManager=null,null===(r=this.deckRenderer)||void 0===r||r.finalize(),this.deckRenderer=null,null===(i=this.deckPicker)||void 0===i||i.finalize(),this.deckPicker=null,null===(o=this.eventManager)||void 0===o||o.destroy(),this.eventManager=null,null===(a=this.tooltip)||void 0===a||a.remove(),this.tooltip=null,this.props.canvas||this.props.gl||!this.canvas)||(null===(s=this.canvas.parentElement)||void 0===s||s.removeChild(this.canvas),this.canvas=null)}setProps(e){this.stats.get("setProps Time").timeStart(),"onLayerHover"in e&&l.Z.removed("onLayerHover","onHover")(),"onLayerClick"in e&&l.Z.removed("onLayerClick","onClick")(),e.initialViewState&&!(0,w.v)(this.props.initialViewState,e.initialViewState,3)&&(this.viewState=e.initialViewState),Object.assign(this.props,e),this._setCanvasSize(this.props);const t=Object.create(this.props);Object.assign(t,{views:this._getViews(),width:this.width,height:this.height,viewState:this._getViewState()}),this.animationLoop.setProps(t),this.layerManager&&(this.viewManager.setProps(t),this.layerManager.activateViewport(this.getViewports()[0]),this.layerManager.setProps(t),this.effectManager.setProps(t),this.deckRenderer.setProps(t),this.deckPicker.setProps(t)),this.stats.get("setProps Time").timeEnd()}needsRedraw(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{clearRedrawFlags:!1};if(!this.layerManager)return!1;if(this.props._animate)return"Deck._animate";let t=this._needsRedraw;e.clearRedrawFlags&&(this._needsRedraw=!1);const n=this.viewManager.needsRedraw(e),r=this.layerManager.needsRedraw(e),i=this.effectManager.needsRedraw(e),o=this.deckRenderer.needsRedraw(e);return t=t||n||r||i||o,t}redraw(e){if(!this.layerManager)return;let t=this.needsRedraw({clearRedrawFlags:!0});t=e||t,t&&(this.stats.get("Redraw Count").incrementCount(),this.props._customRender?this.props._customRender(t):this._drawLayers(t))}get isInitialized(){return null!==this.viewManager}getViews(){return(0,P.Z)(this.viewManager),this.viewManager.views}getViewports(e){return(0,P.Z)(this.viewManager),this.viewManager.getViewports(e)}pickObject(e){const t=this._pick("pickObject","pickObject Time",e).result;return t.length?t[0]:null}pickMultipleObjects(e){return e.depth=e.depth||10,this._pick("pickObject","pickMultipleObjects Time",e).result}pickObjects(e){return this._pick("pickObjects","pickObjects Time",e)}_addResources(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];for(const n in e)this.layerManager.resourceManager.add({resourceId:n,data:e[n],forceUpdate:t})}_removeResources(e){for(const t of e)this.layerManager.resourceManager.remove(t)}_addDefaultEffect(e){this.effectManager.addDefaultEffect(e)}_pick(e,t,n){(0,P.Z)(this.deckPicker);const{stats:r}=this;r.get("Pick Count").incrementCount(),r.get(t).timeStart();const i=this.deckPicker[e]({layers:this.layerManager.getLayers(n),views:this.viewManager.getViews(),viewports:this.getViewports(n),onViewportActive:this.layerManager.activateViewport,effects:this.effectManager.getEffects(),...n});return r.get(t).timeEnd(),i}_createCanvas(e){let t=e.canvas;if("string"===typeof t&&(t=document.getElementById(t),(0,P.Z)(t)),!t){t=document.createElement("canvas"),t.id=e.id||"deckgl-overlay";(e.parent||document.body).appendChild(t)}return Object.assign(t.style,e.style),t}_setCanvasSize(e){if(!this.canvas)return;const{width:t,height:n}=e;if(t||0===t){const e=Number.isFinite(t)?"".concat(t,"px"):t;this.canvas.style.width=e}if(n||0===n){var r;const t=Number.isFinite(n)?"".concat(n,"px"):n;this.canvas.style.position=(null===(r=e.style)||void 0===r?void 0:r.position)||"absolute",this.canvas.style.height=t}}_updateCanvasSize(){const{canvas:e}=this;if(!e)return;const t=e.clientWidth||e.width,n=e.clientHeight||e.height;var r;t===this.width&&n===this.height||(this.width=t,this.height=n,null===(r=this.viewManager)||void 0===r||r.setProps({width:t,height:n}),this.props.onResize({width:t,height:n}))}_createAnimationLoop(e){const{width:t,height:n,gl:r,glOptions:i,debug:o,onError:a,onBeforeRender:s,onAfterRender:l,useDevicePixels:c}=e;return new kt({width:t,height:n,useDevicePixels:c,autoResizeViewport:!1,gl:r,onCreateContext:e=>(0,Ae.s9)({...i,...e,canvas:this.canvas,debug:o,onContextLost:()=>this._onContextLost()}),onInitialize:e=>this._setGLContext(e.gl),onRender:this._onRenderFrame.bind(this),onBeforeRender:s,onAfterRender:l,onError:a})}_getViewState(){return this.props.viewState||this.viewState}_getViews(){let e=this.props.views||[new ne({id:"default-view"})];return e=Array.isArray(e)?e:[e],e.length&&this.props.controller&&(e[0].props.controller=this.props.controller),e}_onContextLost(){const{onError:e}=this.props;this.animationLoop&&e&&e(new Error("WebGL context is lost"))}_pickAndCallback(){const{_pickRequest:e}=this;if(e.event){const{result:n,emptyInfo:r}=this._pick("pickObject","pickObject Time",e);this.cursorState.isHovering=n.length>0;let i=r,o=!1;for(const a of n){var t;i=a,o=(null===(t=a.layer)||void 0===t?void 0:t.onHover(a,e.event))||o}if(!o&&this.props.onHover&&this.props.onHover(i,e.event),this.props.getTooltip&&this.tooltip){const e=this.props.getTooltip(i);this.tooltip.setTooltip(e,i.x,i.y)}e.event=null}}_updateCursor(){const e=this.props.parent||this.canvas;e&&(e.style.cursor=this.props.getCursor(this.cursorState))}_setGLContext(e){if(this.layerManager)return;this.canvas||(this.canvas=e.canvas,(0,Ae.yW)(e,{enable:!0,copyState:!0})),this.tooltip=new Ge(this.canvas),(0,Ae.dR)(e,{blend:!0,blendFunc:[770,771,1,771],polygonOffsetFill:!0,depthTest:!0,depthFunc:515}),this.props.onWebGLInitialized(e);const t=new a;t.play(),this.animationLoop.attachTimeline(t),this.eventManager=new mn(this.props.parent||e.canvas,{touchAction:this.props.touchAction,recognizerOptions:this.props.eventRecognizerOptions,events:{pointerdown:this._onPointerDown,pointermove:this._onPointerMove,pointerleave:this._onPointerMove}});for(const r in be.FP)this.eventManager.on(r,this._onEvent);this.viewManager=new x({timeline:t,eventManager:this.eventManager,onViewStateChange:this._onViewStateChange.bind(this),onInteractionStateChange:this._onInteractionStateChange.bind(this),views:this._getViews(),viewState:this._getViewState(),width:this.width,height:this.height});const n=this.viewManager.getViewports()[0];this.layerManager=new _(e,{deck:this,stats:this.stats,viewport:n,timeline:t}),this.effectManager=new Re,this.deckRenderer=new Fe(e),this.deckPicker=new Ve(e),this.setProps(this.props),this._updateCanvasSize(),this.props.onLoad()}_drawLayers(e,t){const{gl:n}=this.layerManager.context;(0,Ae.dR)(n,this.props.parameters),this.props.onBeforeRender({gl:n}),this.deckRenderer.renderLayers({target:this.props._framebuffer,layers:this.layerManager.getLayers(),viewports:this.viewManager.getViewports(),onViewportActive:this.layerManager.activateViewport,views:this.viewManager.getViews(),pass:"screen",effects:this.effectManager.getEffects(),...t}),this.props.onAfterRender({gl:n})}_onRenderFrame(e){this._getFrameStats(),this._metricsCounter++%60===0&&(this._getMetrics(),this.stats.reset(),l.Z.table(4,this.metrics)(),this.props._onMetrics&&this.props._onMetrics(this.metrics)),this._updateCanvasSize(),this._updateCursor(),this.tooltip.isVisible&&this.viewManager.needsRedraw()&&this.tooltip.setTooltip(null),this.layerManager.updateLayers(),this._pickAndCallback(),this.redraw(),this.viewManager&&this.viewManager.updateViewStates()}_onViewStateChange(e){const t=this.props.onViewStateChange(e)||e.viewState;this.viewState&&(this.viewState={...this.viewState,[e.viewId]:t},this.props.viewState||this.viewManager&&this.viewManager.setProps({viewState:this.viewState}))}_onInteractionStateChange(e){this.cursorState.isDragging=e.isDragging||!1,this.props.onInteractionStateChange(e)}_getFrameStats(){const{stats:e}=this;e.get("frameRate").timeEnd(),e.get("frameRate").timeStart();const t=this.animationLoop.stats;e.get("GPU Time").addTime(t.get("GPU Time").lastTiming),e.get("CPU Time").addTime(t.get("CPU Time").lastTiming)}_getMetrics(){const{metrics:e,stats:t}=this;e.fps=t.get("frameRate").getHz(),e.setPropsTime=t.get("setProps Time").time,e.updateAttributesTime=t.get("Update Attributes").time,e.framesRedrawn=t.get("Redraw Count").count,e.pickTime=t.get("pickObject Time").time+t.get("pickMultipleObjects Time").time+t.get("pickObjects Time").time,e.pickCount=t.get("Pick Count").count,e.gpuTime=t.get("GPU Time").time,e.cpuTime=t.get("CPU Time").time,e.gpuTimePerFrame=t.get("GPU Time").getAverageTime(),e.cpuTimePerFrame=t.get("CPU Time").getAverageTime();const n=_t.lR.get("Memory Usage");e.bufferMemory=n.get("Buffer Memory").count,e.textureMemory=n.get("Texture Memory").count,e.renderbufferMemory=n.get("Renderbuffer Memory").count,e.gpuMemory=n.get("GPU Memory").count}}(0,r.Z)(yn,"defaultProps",An),(0,r.Z)(yn,"VERSION",yt)},44602:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(68185),i=n(63549);class o{static get componentName(){return Object.prototype.hasOwnProperty.call(this,"extensionName")?this.extensionName:""}constructor(e){(0,r.Z)(this,"opts",void 0),e&&(this.opts=e)}equals(e){return this===e||this.constructor===e.constructor&&(0,i.v)(this.opts,e.opts,1)}getShaders(e){return null}getSubLayerProps(e){const{defaultProps:t}=e.constructor,n={updateTriggers:{}};for(const r in t)if(r in this.props){const e=t[r],i=this.props[r];n[r]=i,e&&"accessor"===e.type&&(n.updateTriggers[r]=this.props.updateTriggers[r],"function"===typeof i&&(n[r]=this.getSubLayerAccessor(i)))}return n}initializeState(e,t){}updateState(e,t){}onNeedsRedraw(e){}getNeedsPickingBuffer(e){return!1}draw(e,t){}finalizeState(e,t){}}(0,r.Z)(o,"defaultProps",{}),(0,r.Z)(o,"extensionName","LayerExtension")},53104:(e,t,n)=>{"use strict";n.d(t,{Z:()=>se});var r=n(68185),i=n(98029),o=n(21921),a=n(83063),s=n(30373),l=n(78191);class c extends l.Z{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=(0,s.t7)(t,n,o)}}const u=1e-5;function d(e,t,n,r,i){const o=t-e;return(n-t)*i+-o*r+o+t}function f(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=(0,a.M0)(r)))return;const o=g[r.type];if(!o)return void p.Z.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 v=n(98641),A=n(15672);function y(e){if(null===(t=e)||"object"!==typeof t)throw new Error("count(): argument not an object");var t;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")}var b=n(6525),_=n(76195),w=n(37954),x=n(12091);function E(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}var S=n(26651),C=n(5550),P=n(81723),T=n(58034),k=n(1384);const M=[0,0,0];function O(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const r=t.projectPosition(e);if(n&&t instanceof C.Z){const[n,i,o=0]=e,a=t.getDistanceScales([n,i]);r[2]=o*a.unitsPerMeter[2]}return r}function R(e,t){let{viewport:n,modelMatrix:r,coordinateSystem:o,coordinateOrigin:a,offsetMode:s}=t,[l,c,u=0]=e;switch(r&&([l,c,u]=P.fF([],[l,c,u,1],r)),o){case i.Df.LNGLAT:return O([l,c,u],n,s);case i.Df.LNGLAT_OFFSETS:return O([l+a[0],c+a[1],u+(a[2]||0)],n,s);case i.Df.METER_OFFSETS:return O((0,k.eG)(a,[l,c,u]),n,s);case i.Df.CARTESIAN:default:return n.isGeospatial?[l+a[0],c+a[1],u+a[2]]:n.projectPosition([l,c,u])}}function I(e,t){const{viewport:n,coordinateSystem:r,coordinateOrigin:o,modelMatrix:a,fromCoordinateSystem:s,fromCoordinateOrigin:l}=function(e){const{viewport:t,modelMatrix:n,coordinateOrigin:r}=e;let{coordinateSystem:o,fromCoordinateSystem:a,fromCoordinateOrigin:s}=e;return o===i.Df.DEFAULT&&(o=t.isGeospatial?i.Df.LNGLAT:i.Df.CARTESIAN),void 0===a&&(a=o),void 0===s&&(s=r),{viewport:t,coordinateSystem:o,coordinateOrigin:r,modelMatrix:n,fromCoordinateSystem:a,fromCoordinateOrigin:s}}(t),{autoOffset:c=!0}=t,{geospatialOrigin:u=M,shaderCoordinateOrigin:d=M,offsetMode:f=!1}=c?(0,S.v)(n,r,o):{},h=R(e,{viewport:n,modelMatrix:a,coordinateSystem:s,coordinateOrigin:l,offsetMode:f});if(f){const e=n.projectPosition(u||d);T.lu(h,h,e)}return h}var L=n(10468),N=n(39179),D=n(81786);const F={10241:9987,10240:9729,10242:33071,10243:33071},j={};var B=n(63549);const Z={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||H(e)&&(3===e.length||4===e.length),equal:(e,t,n)=>(0,B.v)(e,t,1)},accessor:{validate(e,t){const n=V(e);return"function"===n||n===V(t.value)},equal:(e,t,n)=>"function"===typeof t||(0,B.v)(e,t,1)},array:{validate:(e,t)=>t.optional&&!e||H(e),equal(e,t,n){const{compare:r}=n,i=Number.isInteger(r)?r:r?1:0;return r?(0,B.v)(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?(0,B.v)(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){if(t instanceof D.Z)return t;t.constructor&&"Object"!==t.constructor.name&&(t={data:t});let r=null;t.compressed&&(r={10241:t.data.length>1?9985:9729});const i=new D.Z(e,{...t,parameters:{...F,...r,...n}});return j[i.id]=!0,i}(r.gl,e,{...t.parameters,...n.props.textureParameters}):null},release:e=>{var t;(t=e)&&t instanceof D.Z&&j[t.id]&&(t.delete(),delete j[t.id])}}};function z(e,t){switch(V(t)){case"object":return U(e,t);case"array":return U(e,{type:"array",value:t,compare:!1});case"boolean":return U(e,{type:"boolean",value:t});case"number":return U(e,{type:"number",value:t});case"function":return U(e,{type:"function",value:t,compare:!0});default:return{name:e,type:"unknown",value:t}}}function U(e,t){return"type"in t?{name:e,...Z[t.type],...t}:"value"in t?{name:e,type:V(t.value),...t}:{name:e,type:"object",value:t}}function H(e){return Array.isArray(e)||ArrayBuffer.isView(e)}function V(e){return H(e)?"array":null===e?"null":typeof e}const W="_mergedDefaultProps";function G(e,t){let n=W;if(t)for(const i of t){const e=i.constructor;e&&(n+=":".concat(e.extensionName||e.name))}const r=Y(e,n);return r||(e[n]=function(e,t){const n=e.prototype;if(!n)return null;const r=Object.getPrototypeOf(e),i=G(r),o=Y(e,"defaultProps")||{},a=function(e){const t={},n={},r={};for(const[i,o]of Object.entries(e)){const e=null===o||void 0===o?void 0:o.deprecatedFor;if(e)r[i]=Array.isArray(e)?e:[e];else{const e=z(i,o);t[i]=e,n[i]=e.value}}return{propTypes:t,defaultProps:n,deprecatedProps:r}}(o),s=Object.assign(Object.create(null),i,a.defaultProps),l=Object.assign(Object.create(null),null===i||void 0===i?void 0:i[A.Wb],a.propTypes),c=Object.assign(Object.create(null),null===i||void 0===i?void 0:i[A.E7],a.deprecatedProps);for(const u of t){const e=G(u.constructor);e&&(Object.assign(s,e),Object.assign(l,e[A.Wb]),Object.assign(c,e[A.E7]))}(function(e,t){const n=function(e){const t=e.componentName;t||p.Z.warn("".concat(e.name,".componentName not specified"))();return t||e.name}(t);Object.defineProperties(e,{id:{writable:!0,value:n}})})(s,e),function(e,t){const n={},r={};for(const i in t){const e=t[i],{name:o,value:a}=e;e.async&&(n[o]=a,r[o]=K(o))}e[A.lY]=n,e[A.fO]={},Object.defineProperties(e,r)}(s,l),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 i of t[n])q(this,i)||(this[i]=e);p.Z.deprecated(r,t[n].join("/"))()}})}(s,c),s[A.Wb]=l,s[A.E7]=c,0!==t.length||q(e,"_propTypes")||(e._propTypes=l);return s}(e,t||[]))}function K(e){return{enumerable:!0,set(t){"string"===typeof t||t instanceof Promise||(0,N.D0)(t)?this[A.fO][e]=t:this[A.bN][e]=t},get(){if(this[A.bN]){if(e in this[A.bN]){return this[A.bN][e]||this[A.lY][e]}if(e in this[A.fO]){const t=this[A.fm]&&this[A.fm].internalState;if(t&&t.hasAsyncProp(e))return t.getAsyncProp(e)||this[A.lY][e]}}return this[A.lY][e]}}}function q(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function Y(e,t){return q(e,t)&&e[t]}let X=0;class ${constructor(){(0,r.Z)(this,"id",void 0),(0,r.Z)(this,"props",void 0),(0,r.Z)(this,"count",void 0);for(var e=arguments.length,t=new Array(e),n=0;n=0;o--){const e=t[o];"extensions"in e&&(n=e.extensions)}const r=G(e.constructor,n),i=Object.create(r);i[A.fm]=e,i[A.fO]={},i[A.bN]={};for(let o=0;o{},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||Q}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 t in this.asyncProps)if(this.isAsyncPropLoading(t))return!0;return!1}reloadAsyncProp(e,t){this._watchPromise(e,Promise.resolve(t))}setAsyncProps(e){this.component=e[A.fm]||this.component;const t=e[A.bN]||{},n=e[A.fO]||e,r=e[A.lY]||{};for(const i in t){const e=t[i];this._createAsyncPropData(i,r[i]),this._updateAsyncProp(i,e),t[i]=this.getAsyncProp(i)}for(const i in n){const e=n[i];this._createAsyncPropData(i,r[i]),this._updateAsyncProp(i,e)}}_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):(0,N.D0)(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 a of t){if(!this.component)return;const{dataTransform:t}=this.component.props;i=t?t(a,i):i.concat(a),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[A.Wb];this.asyncProps[e]={type:n&&n[e],lastValue:null,resolvedValue:t,pendingLoadCount:0,resolvedLoadCount:0}}}}class ee extends J{constructor(e){let{attributeManager:t,layer:n}=e;super(n),(0,r.Z)(this,"attributeManager",void 0),(0,r.Z)(this,"needsRedraw",void 0),(0,r.Z)(this,"needsUpdate",void 0),(0,r.Z)(this,"subLayers",void 0),(0,r.Z)(this,"usesPickingColorCache",void 0),(0,r.Z)(this,"hasPickingBuffer",void 0),(0,r.Z)(this,"changeFlags",void 0),(0,r.Z)(this,"viewport",void 0),(0,r.Z)(this,"uniformTransitions",void 0),(0,r.Z)(this,"propsInTransition",void 0),this.attributeManager=t,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?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 te=n(63734);const ne=2**24-1,re=Object.freeze([]),ie=(0,x.Z)((e=>{let{oldViewport:t,viewport:n}=e;return t.equals(n)}));let oe=new Uint8ClampedArray(0);const ae={data:{type:"data",value:re,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,t)=>{let{propName:n,layer:r,loaders:i,loadOptions:o,signal:a}=t;const{resourceManager:s}=r.context;var l;(o=o||r.getLoadOptions(),i=i||r.props.loaders,a)&&(o={...o,fetch:{...null===(l=o)||void 0===l?void 0:l.fetch,signal:a}});let c=s.contains(e);return c||o||(s.add({resourceId:e,data:(0,te.z)(e,i),persistent:!1}),c=!0),c?s.subscribe({resourceId:e,onChange:e=>{var t;return null===(t=r.internalState)||void 0===t?void 0:t.reloadAsyncProp(n,e)},consumerId:r.id,requestId:n}):(0,te.z)(e,i,o)}},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.Df.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:e=>{let{layerIndex:t}=e;return[0,100*-t]}},highlightedObjectIndex:null,autoHighlight:!1,highlightColor:{type:"accessor",value:[0,0,128,128]}};class se extends ${constructor(){super(...arguments),(0,r.Z)(this,"internalState",null),(0,r.Z)(this,"lifecycle",A.dt.NO_STATE),(0,r.Z)(this,"context",void 0),(0,r.Z)(this,"state",void 0),(0,r.Z)(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){(0,w.Z)(this.internalState);const t=this.internalState.viewport||this.context.viewport,n=R(e,{viewport:t,modelMatrix:this.props.modelMatrix,coordinateOrigin:this.props.coordinateOrigin,coordinateSystem:this.props.coordinateSystem}),[r,i,o]=(0,k.aW)(n,t.pixelProjectionMatrix);return 2===e.length?[r,i]:[r,i,o]}unproject(e){(0,w.Z)(this.internalState);return(this.internalState.viewport||this.context.viewport).unproject(e)}projectPosition(e,t){(0,w.Z)(this.internalState);return I(e,{viewport:this.internalState.viewport||this.context.viewport,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.Df.DEFAULT||e===i.Df.LNGLAT||e===i.Df.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){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return t[0]=e+1&255,t[1]=e+1>>8&255,t[2]=e+1>>8>>8&255,t}decodePickingColor(e){(0,w.Z)(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:y(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=E(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 r of n)t.invalidateAll(r);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 n of this.getModels())n.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(e){let{info:t,mode:n,sourceLayer:r}=e;const{index:i}=t;return i>=0&&Array.isArray(this.props.data)&&(t.object=this.props.data[i]),t}raiseError(e,t){var n,r,i,o;(t&&(e.message="".concat(t,": ").concat(e.message)),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(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{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&&ie({oldViewport:t,viewport:e})||(this.setChangeFlags({viewportChanged:!0}),this.isComposite?this.needsUpdate()&&this.setNeedsUpdate():this._update())}invalidateAttribute(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"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,t){let{numInstances:n}=t;if(e.constant)return;const r=Math.floor(oe.length/3);if(this.internalState.usesPickingColorCache=!0,rne&&p.Z.warn("Layer has too many data objects. Picking might not be able to distinguish all objects.")(),oe=L.Z.allocate(oe,n,{size:3,copy:!0,maxCount:Math.max(n,ne)});const e=Math.floor(oe.length/3),t=[];for(let n=r;n(p.Z.deprecated("layer.state.attributeManager","layer.getAttributeManager()")(),e)}),this.internalState.uniformTransitions=new m(this.context.timeline),this.internalState.onAsyncPropUpdated=this._onAsyncPropUpdated.bind(this),this.internalState.setAsyncProps(this.props),this.initializeState(this.context);for(const t of this.props.extensions)t.initializeState.call(this,this.context,t);this.setChangeFlags({dataChanged:"init",propsChanged:"init",viewportChanged:!0,extensionsChanged:!0}),this._update()}_transferState(e){(0,b.Z)("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((0,b.Z)("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(),t=this.getModels();if(n.gl)this.updateState(e);else try{this.updateState(e)}catch(a){}for(const n of this.props.extensions)n.updateState.call(this,e,n);const r=this.getModels()[0]!==t[0];this._postUpdate(e,r)}finally{n.viewport=i,this.props=t,this._clearChangeFlags(),r.needsUpdate=!1,r.resetOldProps()}}_finalize(){(0,b.Z)("layer.finalize",this),this.finalizeState(this.context);for(const e of this.props.extensions)e.finalizeState.call(this,this.context,e)}_drawLayer(e){let{moduleParameters:t=null,uniforms:n={},parameters:r={}}=e;this._updateAttributeTransition();const i=this.props,o=this.context;this.props=this.internalState.propsInTransition||i;const a=this.props.opacity;n.opacity=Math.pow(a,1/2.2);try{t&&this.setModuleParameters(t);const{getPolygonOffset:e}=this.props,i=e&&e(n)||[0,0];(0,_.dR)(o.gl,{polygonOffset:i}),(0,_.s8)(o.gl,r,(()=>{const e={moduleParameters:t,uniforms:n,parameters:r,context:o};for(const t of this.props.extensions)t.draw.call(this,e,t);this.draw(e)}))}finally{this.props=i}}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 r in e)if(e[r]){let n=!1;if("dataChanged"===r){const i=e[r],o=t[r];i&&Array.isArray(o)&&(t.dataChanged=Array.isArray(i)?o.concat(i):i,n=!0)}t[r]||(t[r]=e[r],n=!0),n&&(0,b.Z)("layer.changeFlag",this,r,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=(0,v.Yt)(e,t);if(n.updateTriggersChanged)for(const i in n.updateTriggersChanged)n.updateTriggersChanged[i]&&this.invalidateAttribute(i);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(){(0,v.eQ)(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.Z(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||void 0===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 i of this.props.extensions)i.onNeedsRedraw.call(this,i);return this.internalState.needsRedraw=this.internalState.needsRedraw&&!e.clearRedrawFlags,t}_onAsyncPropUpdated(){this._diffProps(this.props,this.internalState.getOldProps()),this.setNeedsUpdate()}}(0,r.Z)(se,"defaultProps",ae),(0,r.Z)(se,"layerName","Layer")},15672:(e,t,n)=>{"use strict";n.d(t,{E7:()=>a,Wb:()=>o,bN:()=>c,dt:()=>r,fO:()=>l,fm:()=>i,lY:()=>s});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"),c=Symbol.for("asyncPropResolved")},98641:(e,t,n)=>{"use strict";n.d(t,{Yt:()=>o,eQ:()=>i,tg:()=>s});var r=n(15672);function i(e){const t=e[r.Wb];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.Wb],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(u(e,t,"all"))return{all:!0}}const n={};let r=!1;for(const i in e.updateTriggers)if("all"!==i){u(e,t,i)&&(n[i]=!0,r=!0)}return!!r&&n}(e,t)),{dataChanged:i,propsChanged:n,updateTriggersChanged:o,extensionsChanged:c(e,t),transitionsChanged:a(e,t)}}function a(e,t){if(!e.transitions)return!1;const n={},i=e[r.Wb];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(e){let{newProps:t,oldProps:n,ignoreProps:r={},propTypes:i={},triggerName:o="props"}=e;if(n===t)return!1;if("object"!==typeof t||null===t)return"".concat(o," changed shallowly");if("object"!==typeof n||null===n)return"".concat(o," changed shallowly");for(const a of Object.keys(t))if(!(a in r)){if(!(a in n))return"".concat(o,".").concat(a," added");const e=l(t[a],n[a],i[a]);if(e)return"".concat(o,".").concat(a," ").concat(e)}for(const a of Object.keys(n))if(!(a in r)){if(!(a in t))return"".concat(o,".").concat(a," dropped");if(!Object.hasOwnProperty.call(t,a)){const e=l(t[a],n[a],i[a]);if(e)return"".concat(o,".").concat(a," ").concat(e)}}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 c(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 i=0;i{"use strict";n.d(t,{Z:()=>s});var r=n(68185);class i{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{id:"pass"};(0,r.Z)(this,"id",void 0),(0,r.Z)(this,"gl",void 0),(0,r.Z)(this,"props",void 0);const{id:n}=t;this.id=n,this.gl=e,this.props={...t}}setProps(e){Object.assign(this.props,e)}render(e){}cleanup(){}}var o=n(76195),a=n(36708);class s extends i{constructor(){super(...arguments),(0,r.Z)(this,"_lastRenderIndex",-1)}render(e){const t=this.gl;return(0,o.dR)(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 c=this.gl;l&&function(e,t){const n=t?t.width:e.drawingBufferWidth,r=t?t.height:e.drawingBufferHeight;(0,o.dR)(e,{viewport:[0,0,n,r]}),e.clear(16640)}(c,t),s&&(this._lastRenderIndex=-1);const u=[];for(const o of r){const r=i&&i[o.id];null===a||void 0===a||a(o);const s=this._getDrawLayerParams(o,e),l=o.subViewports||[o];for(const i of l){const o=this._drawLayersInViewport(c,{target:t,moduleParameters:n,viewport:i,view:r,pass:e.pass,layers:e.layers},s);u.push(o)}}return u}_getDrawLayerParams(e,t){let{layers:n,pass:r,isPicking:i=!1,layerFilter:o,cullRect:a,effects:s,moduleParameters:c}=t,u=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const d=[],f=l(this._lastRenderIndex+1),h={layer:n[0],viewport:e,isPicking:i,renderPass:r,cullRect:a},p={};for(let l=0;l(0,a.Z)(e,t)))}const f={totalCount:r.length,visibleCount:0,compositeCount:0,pickableCount:0};(0,o.dR)(e,{viewport:d});for(let o=0;o0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n={},r=(i,o)=>{const a=i.props._offset,s=i.id,c=i.parent&&i.parent.id;let u;if(c&&!(c in t)&&r(i.parent,!1),c in n){const e=n[c]=n[c]||l(t[c],t);u=e(i,o),n[s]=e}else Number.isFinite(a)?(u=a+(t[c]||0),n[s]=null):u=e;return o&&u>=e&&(e=u+1),t[s]=u,u};return r}},79463:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});const r={pickingSelectedColor:null,pickingHighlightColor:new Uint8Array([0,255,255,255]),pickingActive:!1,pickingAttribute:!1};const i={inject:{"vs:DECKGL_FILTER_GL_POSITION":"\n // for picking depth values\n picking_setPickingAttribute(position.z / position.w);\n ","vs:DECKGL_FILTER_COLOR":"\n picking_setPickingColor(geometry.pickingColor);\n ","fs:#decl":"\nuniform bool picking_uAttribute;\n ","fs:DECKGL_FILTER_COLOR":{order:99,injection:"\n // use highlight color if this fragment belongs to the selected object.\n color = picking_filterHighlightColor(color);\n\n // use picking color if rendering to picking FBO.\n color = picking_filterPickingColor(color);\n "}},...{name:"picking",vs:"uniform bool picking_uActive;\nuniform bool picking_uAttribute;\nuniform vec3 picking_uSelectedColor;\nuniform bool picking_uSelectedColorValid;\n\nout vec4 picking_vRGBcolor_Avalid;\n\nconst float COLOR_SCALE = 1. / 255.;\n\nbool picking_isColorValid(vec3 color) {\n return dot(color, vec3(1.0)) > 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}}}},61518:(e,t,n)=>{"use strict";n.d(t,{Z:()=>h});const r={name:"fp32",vs:"#ifdef LUMA_FP32_TAN_PRECISION_WORKAROUND\nconst float TWO_PI = 6.2831854820251465;\nconst float PI_2 = 1.5707963705062866;\nconst float PI_16 = 0.1963495463132858;\n\nconst float SIN_TABLE_0 = 0.19509032368659973;\nconst float SIN_TABLE_1 = 0.3826834261417389;\nconst float SIN_TABLE_2 = 0.5555702447891235;\nconst float SIN_TABLE_3 = 0.7071067690849304;\n\nconst float COS_TABLE_0 = 0.9807852506637573;\nconst float COS_TABLE_1 = 0.9238795042037964;\nconst float COS_TABLE_2 = 0.8314695954322815;\nconst float COS_TABLE_3 = 0.7071067690849304;\n\nconst float INVERSE_FACTORIAL_3 = 1.666666716337204e-01;\nconst float INVERSE_FACTORIAL_5 = 8.333333767950535e-03;\nconst float INVERSE_FACTORIAL_7 = 1.9841270113829523e-04;\nconst float INVERSE_FACTORIAL_9 = 2.75573188446287533e-06;\n\nfloat sin_taylor_fp32(float a) {\n float r, s, t, x;\n\n if (a == 0.0) {\n return 0.0;\n }\n\n x = -a * a;\n s = a;\n r = a;\n\n r = r * x;\n t = r * INVERSE_FACTORIAL_3;\n s = s + t;\n\n r = r * x;\n t = r * INVERSE_FACTORIAL_5;\n s = s + t;\n\n r = r * x;\n t = r * INVERSE_FACTORIAL_7;\n s = s + t;\n\n r = r * x;\n t = r * INVERSE_FACTORIAL_9;\n s = s + t;\n\n return s;\n}\n\nvoid sincos_taylor_fp32(float a, out float sin_t, out float cos_t) {\n if (a == 0.0) {\n sin_t = 0.0;\n cos_t = 1.0;\n }\n sin_t = sin_taylor_fp32(a);\n cos_t = sqrt(1.0 - sin_t * sin_t);\n}\n\nfloat tan_taylor_fp32(float a) {\n float sin_a;\n float cos_a;\n\n if (a == 0.0) {\n return 0.0;\n }\n float z = floor(a / TWO_PI);\n float r = a - TWO_PI * z;\n\n float t;\n float q = floor(r / PI_2 + 0.5);\n int j = int(q);\n\n if (j < -2 || j > 2) {\n return 1.0 / 0.0;\n }\n\n t = r - PI_2 * q;\n\n q = floor(t / PI_16 + 0.5);\n int k = int(q);\n int abs_k = int(abs(float(k)));\n\n if (abs_k > 4) {\n return 1.0 / 0.0;\n } else {\n t = t - PI_16 * q;\n }\n\n float u = 0.0;\n float v = 0.0;\n\n float sin_t, cos_t;\n float s, c;\n sincos_taylor_fp32(t, sin_t, cos_t);\n\n if (k == 0) {\n s = sin_t;\n c = cos_t;\n } else {\n if (abs(float(abs_k) - 1.0) < 0.5) {\n u = COS_TABLE_0;\n v = SIN_TABLE_0;\n } else if (abs(float(abs_k) - 2.0) < 0.5) {\n u = COS_TABLE_1;\n v = SIN_TABLE_1;\n } else if (abs(float(abs_k) - 3.0) < 0.5) {\n u = COS_TABLE_2;\n v = SIN_TABLE_2;\n } else if (abs(float(abs_k) - 4.0) < 0.5) {\n u = COS_TABLE_3;\n v = SIN_TABLE_3;\n }\n if (k > 0) {\n s = u * sin_t + v * cos_t;\n c = u * cos_t - v * sin_t;\n } else {\n s = u * sin_t - v * cos_t;\n c = u * cos_t + 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 sin_a / cos_a;\n}\n#endif\n\nfloat tan_fp32(float a) {\n#ifdef LUMA_FP32_TAN_PRECISION_WORKAROUND\n return tan_taylor_fp32(a);\n#else\n return tan(a);\n#endif\n}\n",fs:null},i="#define SMOOTH_EDGE_RADIUS 0.5",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")};var a=n(98029);const s=Object.keys(a.Df).map((e=>"const int COORDINATE_SYSTEM_".concat(e," = ").concat(a.Df[e],";"))).join(""),l=Object.keys(a.zG).map((e=>"const int PROJECTION_MODE_".concat(e," = ").concat(a.zG[e],";"))).join(""),c=Object.keys(a.iI).map((e=>"const int UNIT_".concat(e.toUpperCase()," = ").concat(a.iI[e],";"))).join(""),u="".concat(s,"\n").concat(l,"\n").concat(c,"\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");var d=n(26651);const f={};const h={name:"project",dependencies:[r,o],vs:u,getUniforms:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:f;return"viewport"in e?(0,d.C)(e):{}}}},26651:(e,t,n)=>{"use strict";n.d(t,{C:()=>p,v:()=>h});var r=n(44649),i=n(81723),o=n(98029),a=n(12091);const s=[0,0,0,0],l=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,0],c=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],u=[0,0,0],d=[0,0,0],f=(0,a.Z)((function(e){let{viewport:t,devicePixelRatio:n,coordinateSystem:a,coordinateOrigin:d}=e;const{projectionCenter:f,viewProjectionMatrix:p,originCommon:g,cameraPosCommon:m,shaderCoordinateOrigin:v,geospatialOrigin:A}=function(e,t,n){const{viewMatrixUncentered:o,projectionMatrix:a}=e;let{viewMatrix:c,viewProjectionMatrix:u}=e,d=s,f=s,p=e.cameraPosition;const{geospatialOrigin:g,shaderCoordinateOrigin:m,offsetMode:v}=h(e,t,n);v&&(f=e.projectPosition(g||m),p=[p[0]-f[0],p[1]-f[1],p[2]-f[2]],f[3]=1,d=i.fF([],f,u),c=o||c,u=r.Jp([],a,c),u=r.Jp([],u,l));return{viewMatrix:c,viewProjectionMatrix:u,projectionCenter:d,originCommon:f,cameraPosCommon:p,shaderCoordinateOrigin:m,geospatialOrigin:g}}(t,a,d),y=t.getDistanceScales(),b=[t.width*n,t.height*n],_=i.fF([],[0,0,-t.focalDistance,1],t.projectionMatrix)[3]||1,w={project_uCoordinateSystem:a,project_uProjectionMode:t.projectionMode,project_uCoordinateOrigin:v,project_uCommonOrigin:g.slice(0,3),project_uCenter:f,project_uPseudoMeters:Boolean(t._pseudoMeters),project_uViewportSize:b,project_uDevicePixelRatio:n,project_uFocalDistance:_,project_uCommonUnitsPerMeter:y.unitsPerMeter,project_uCommonUnitsPerWorldUnit:y.unitsPerMeter,project_uCommonUnitsPerWorldUnit2:u,project_uScale:t.scale,project_uWrapLongitude:!1,project_uViewProjectionMatrix:p,project_uModelMatrix:c,project_uCameraPosition:m};if(A){const e=t.getDistanceScales(A);switch(a){case o.Df.METER_OFFSETS:w.project_uCommonUnitsPerWorldUnit=e.unitsPerMeter,w.project_uCommonUnitsPerWorldUnit2=e.unitsPerMeter2;break;case o.Df.LNGLAT:case o.Df.LNGLAT_OFFSETS:t._pseudoMeters||(w.project_uCommonUnitsPerMeter=e.unitsPerMeter),w.project_uCommonUnitsPerWorldUnit=e.unitsPerDegree,w.project_uCommonUnitsPerWorldUnit2=e.unitsPerDegree2;break;case o.Df.CARTESIAN:w.project_uCommonUnitsPerWorldUnit=[1,1,e.unitsPerMeter[2]],w.project_uCommonUnitsPerWorldUnit2=[0,0,e.unitsPerMeter2[2]]}}return w}));function h(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:d;n.length<3&&(n=[n[0],n[1],0]);let r,i=n,a=!0;switch(r=t===o.Df.LNGLAT_OFFSETS||t===o.Df.METER_OFFSETS?n:e.isGeospatial?[Math.fround(e.longitude),Math.fround(e.latitude),0]:null,e.projectionMode){case o.zG.WEB_MERCATOR:t!==o.Df.LNGLAT&&t!==o.Df.CARTESIAN||(r=[0,0,0],a=!1);break;case o.zG.WEB_MERCATOR_AUTO_OFFSET:t===o.Df.LNGLAT?i=r:t===o.Df.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.zG.IDENTITY:i=e.position.map(Math.fround),i[2]=i[2]||0;break;case o.zG.GLOBE:a=!1,r=null;break;default:a=!1}return{geospatialOrigin:r,shaderCoordinateOrigin:i,offsetMode:a}}function p(e){let{viewport:t,devicePixelRatio:n=1,modelMatrix:r=null,coordinateSystem:i=o.Df.DEFAULT,coordinateOrigin:a=d,autoWrapLongitude:s=!1}=e;i===o.Df.DEFAULT&&(i=t.isGeospatial?o.Df.LNGLAT:o.Df.CARTESIAN);const l=f({viewport:t,devicePixelRatio:n,coordinateSystem:i,coordinateOrigin:a});return l.project_uWrapLongitude=s,l.project_uModelMatrix=r||c,l}},58521:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r={name:"project32",dependencies:[n(61518).Z],vs:"\nvec4 project_position_to_clipspace(\n vec3 position, vec3 position64Low, vec3 offset, out vec4 commonPosition\n) {\n vec3 projectedPosition = project_position(position, position64Low);\n mat3 rotation;\n if (project_needs_rotation(projectedPosition, rotation)) {\n // offset is specified as ENU\n // when in globe projection, rotate offset so that the ground alighs with the surface of the globe\n offset = rotation * offset;\n }\n commonPosition = vec4(projectedPosition + offset, 1.0);\n return project_common_position_to_clipspace(commonPosition);\n}\n\nvec4 project_position_to_clipspace(\n vec3 position, vec3 position64Low, vec3 offset\n) {\n vec4 commonPosition;\n return project_position_to_clipspace(position, position64Low, offset, commonPosition);\n}\n"}},78191:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=n(68185);class i{constructor(e){(0,r.Z)(this,"_inProgress",void 0),(0,r.Z)(this,"_handle",void 0),(0,r.Z)(this,"_timeline",void 0),(0,r.Z)(this,"time",void 0),(0,r.Z)(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(){}}},37954:(e,t,n)=>{"use strict";function r(e,t){if(!e)throw new Error(t||"deck.gl: assertion failed.")}n.d(t,{Z:()=>r})},63549:(e,t,n)=>{"use strict";function r(e,t,n){if(e===t)return!0;if(!n||!e||!t)return!1;if(Array.isArray(e)){if(!Array.isArray(t)||e.length!==t.length)return!1;for(let i=0;ir})},35395:(e,t,n)=>{"use strict";function r(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:()=>!0;return Array.isArray(e)?i(e,t,[]):t(e)?[e]:[]}function i(e,t,n){let r=-1;for(;++ro,x:()=>r})},39179:(e,t,n)=>{"use strict";n.d(t,{D0:()=>a,jB:()=>o,jr:()=>s});const r=[],i=[];function o(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1/0,o=r;const a={index:-1,data:e,target:[]};return e?"function"===typeof e[Symbol.iterator]?o=e:e.length>0&&(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,c=i?i/s:0,u=Math.floor((e.length-c)/l);return(t,r)=>{let{index:i,target:s}=r;if(!o){const t=i*l+c;for(let r=0;r{"use strict";n.d(t,{Z:()=>r});const r=new(n(20251).Z)({id:"deck"})},84557:(e,t,n)=>{"use strict";n.d(t,{Du:()=>s,TK:()=>f,Xt:()=>a,bS:()=>o,cc:()=>h});var r=n(10468),i=n(31549);function o(){return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}function a(e){return[e[12],e[13],e[14]]}function s(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 l=new i.Z;function c(e,t,n,r){l.set(e,t,n);const o=l.len();return{distance:r/o,normal:new i.Z(-e/o,-t/o,-n/o)}}function u(e){return e-Math.fround(e)}let d;function f(e,t){const{size:n=1,startIndex:i=0}=t,o=void 0!==t.endIndex?t.endIndex:e.length,a=(o-i)/n;d=r.Z.allocate(d,a,{type:Float32Array,size:2*n});let s=i,l=0;for(;s{"use strict";function r(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;r{for(const o in i)if(!r(i[o],n[o])){t=e(i),n=i;break}return t}}n.d(t,{Z:()=>i})},3943:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(68185),i=n(39179),o=n(10468),a=n(37954),s=n(64180);class l{constructor(e){(0,r.Z)(this,"opts",void 0),(0,r.Z)(this,"typedArrayManager",void 0),(0,r.Z)(this,"indexStarts",[0]),(0,r.Z)(this,"vertexStarts",[0]),(0,r.Z)(this,"vertexCount",0),(0,r.Z)(this,"instanceCount",0),(0,r.Z)(this,"attributes",void 0),(0,r.Z)(this,"_attributeDefs",void 0),(0,r.Z)(this,"data",void 0),(0,r.Z)(this,"getGeometry",void 0),(0,r.Z)(this,"geometryBuffer",void 0),(0,r.Z)(this,"buffers",void 0),(0,r.Z)(this,"positionSize",void 0),(0,r.Z)(this,"normalize",void 0);const{attributes:t={}}=e;this.typedArrayManager=o.Z,this.attributes={},this._attributeDefs=t,this.opts=e,this.updateGeometry(e)}updateGeometry(e){Object.assign(this.opts,e);const{data:t,buffers:n={},getGeometry:r,geometryBuffer:i,positionFormat:o,dataChanged:s,normalize:l=!0}=this.opts;if(this.data=t,this.getGeometry=r,this.positionSize=i&&i.size||("XY"===o?2:3),this.buffers=n,this.normalize=l,i&&((0,a.Z)(t.startIndices),this.getGeometry=this.getGeometryFromBuffer(i),l||(n.positions=i)),this.geometryBuffer=n.positions,Array.isArray(s))for(const a of s)this._rebuildGeometry(a);else this._rebuildGeometry()}updatePartialGeometry(e){let{startRow:t,endRow:n}=e;this._rebuildGeometry({startRow:t,endRow:n})}getGeometryFromBuffer(e){const t=e.value||e;return ArrayBuffer.isView(t)?(0,i.jr)(t,{size:this.positionSize,offset:e.offset,stride:e.stride,startIndices:this.data.startIndices}):null}_allocate(e,t){const{attributes:n,buffers:r,_attributeDefs:i,typedArrayManager:o}=this;for(const a in i)if(a in r)o.release(n[a]),n[a]=null;else{const r=i[a];r.copy=t,n[a]=o.allocate(n[a],e,r)}}_forEachGeometry(e,t,n){const{data:r,getGeometry:o}=this,{iterable:a,objectInfo:s}=(0,i.jB)(r,t,n);for(const i of a){s.index++;e(o?o(i,s):null,s.index)}}_rebuildGeometry(e){if(!this.data)return;let{indexStarts:t,vertexStarts:n,instanceCount:r}=this;const{data:i,geometryBuffer:o}=this,{startRow:a=0,endRow:l=1/0}=e||{},c={};if(e||(t=[0],n=[0]),this.normalize||!o)this._forEachGeometry(((e,t)=>{const r=e&&this.normalizeGeometry(e);c[t]=r,n[t+1]=n[t]+(r?this.getGeometrySize(r):0)}),a,l),r=n[n.length-1];else if(n=i.startIndices,r=n[i.length]||0,ArrayBuffer.isView(o))r=r||o.length/this.positionSize;else if(o instanceof s.Z){const e=o.accessor.stride||4*this.positionSize;r=r||o.byteLength/e}else if(o.buffer){const e=o.stride||4*this.positionSize;r=r||o.buffer.byteLength/e}else if(o.value){const e=o.value,t=o.stride/e.BYTES_PER_ELEMENT||this.positionSize;r=r||e.length/t}this._allocate(r,Boolean(e)),this.indexStarts=t,this.vertexStarts=n,this.instanceCount=r;const u={};this._forEachGeometry(((e,i)=>{const o=c[i]||e;u.vertexStart=n[i],u.indexStart=t[i];const a=i{"use strict";n.d(t,{Z:()=>i});var r=n(68185);const i=new class{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,r.Z)(this,"_pool",[]),(0,r.Z)(this,"opts",{overAlloc:2,poolSize:100}),this.setOptions(e)}setOptions(e){Object.assign(this.opts,e)}allocate(e,t,n){let{size:r=1,type:i,padding:o=0,copy:a=!1,initialize:s=!1,maxCount:l}=n;const c=i||e&&e.constructor||Float32Array,u=t*r+o;if(ArrayBuffer.isView(e)){if(u<=e.length)return e;if(u*e.BYTES_PER_ELEMENT<=e.buffer.byteLength)return new c(e.buffer,0,u)}let d=1/0;l&&(d=l*r+o);const f=this._allocate(c,u,s,d);return e&&a?f.set(e):s||f.fill(0,0,4),this._release(e),f}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()}}},43809:(e,t,n)=>{"use strict";n.d(t,{Z:()=>m});var r=n(68185),i=n(65148),o=n(84557),a=n(39944),s=n(30373),l=n(31549),c=n(44649),u=n(1384),d=n(98029);const f=Math.PI/180,h=(0,o.bS)(),p=[0,0,0],g={unitsPerMeter:[1,1,1],metersPerUnit:[1,1,1]};class m{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,r.Z)(this,"id",void 0),(0,r.Z)(this,"x",void 0),(0,r.Z)(this,"y",void 0),(0,r.Z)(this,"width",void 0),(0,r.Z)(this,"height",void 0),(0,r.Z)(this,"padding",void 0),(0,r.Z)(this,"isGeospatial",void 0),(0,r.Z)(this,"zoom",void 0),(0,r.Z)(this,"focalDistance",void 0),(0,r.Z)(this,"position",void 0),(0,r.Z)(this,"modelMatrix",void 0),(0,r.Z)(this,"distanceScales",void 0),(0,r.Z)(this,"scale",void 0),(0,r.Z)(this,"center",void 0),(0,r.Z)(this,"cameraPosition",void 0),(0,r.Z)(this,"projectionMatrix",void 0),(0,r.Z)(this,"viewMatrix",void 0),(0,r.Z)(this,"viewMatrixUncentered",void 0),(0,r.Z)(this,"viewMatrixInverse",void 0),(0,r.Z)(this,"viewProjectionMatrix",void 0),(0,r.Z)(this,"pixelProjectionMatrix",void 0),(0,r.Z)(this,"pixelUnprojectionMatrix",void 0),(0,r.Z)(this,"resolution",void 0),(0,r.Z)(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||g,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.zG.WEB_MERCATOR:d.zG.WEB_MERCATOR_AUTO_OFFSET:d.zG.IDENTITY}equals(e){return e instanceof m&&(this===e||e.width===this.width&&e.height===this.height&&e.scale===this.scale&&(0,s.fS)(e.projectionMatrix,this.projectionMatrix)&&(0,s.fS)(e.viewMatrix,this.viewMatrix))}project(e){let{topLeft:t=!0}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=this.projectPosition(e),r=(0,u.aW)(n,this.pixelProjectionMatrix),[i,o]=r,a=t?o:this.height-o;return 2===e.length?[i,a]:[i,a,r[2]]}unproject(e){let{topLeft:t=!0,targetZ:n}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const[r,i,o]=e,a=t?i:this.height-i,s=n&&n*this.distanceScales.unitsPerMeter[2],l=(0,u.CT)([r,a,o],this.pixelUnprojectionMatrix,s),[c,d,f]=this.unprojectPosition(l);return Number.isFinite(o)?[c,d,f]:Number.isFinite(n)?[c,d,n]:[c,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=(0,u.w5)(e);return t[1]=(0,s.uZ)(t[1],-318,830),t}return e}unprojectFlat(e){return this.isGeospatial?(0,u.es)(e):e}getBounds(){const e={targetZ:(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).z||0},t=this.unproject([0,0],e),n=this.unproject([this.width,0],e),r=this.unproject([0,this.height],e),i=this.unproject([this.width,this.height],e);return[Math.min(t[0],n[0],r[0],i[0]),Math.min(t[1],n[1],r[1],i[1]),Math.max(t[0],n[0],r[0],i[0]),Math.max(t[1],n[1],r[1],i[1])]}getDistanceScales(e){return e?(0,u.ro)({longitude:e[0],latitude:e[1],highPrecision:!0}):this.distanceScales}containsPixel(e){let{x:t,y:n,width:r=1,height:i=1}=e;return t{"use strict";n.d(t,{Z:()=>c});var r=n(68185),i=n(43809),o=n(1384),a=n(69291),s=n(30373),l=n(39944);class c extends i.Z{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{latitude:t=0,longitude:n=0,zoom:i=0,pitch:a=0,bearing:c=0,nearZMultiplier:u=.1,farZMultiplier:d=1.01,orthographic:f=!1,projectionMatrix:h,repeat:p=!1,worldOffset:g=0,position:m,padding:v,legacyMeterSizes:A=!1}=e;let{width:y,height:b,altitude:_=1.5}=e;const w=Math.pow(2,i);let x;y=y||1,b=b||1;let E=null;if(h)_=h[5]/2,x=(0,o.Lu)(_);else{let n;if(e.fovy?(x=e.fovy,_=(0,o.sj)(x)):x=(0,o.Lu)(_),v){const{top:e=0,bottom:t=0}=v;n=[0,(0,s.uZ)((e+b-t)/2,0,b)-b/2]}E=(0,o.wl)({width:y,height:b,scale:w,center:m&&[0,0,m[2]*(0,o.NC)(t)],offset:n,pitch:a,fovy:x,nearZMultiplier:u,farZMultiplier:d})}let S=(0,o.lf)({height:b,pitch:a,bearing:c,scale:w,altitude:_});if(g){S=(new l.Z).translate([512*g,0,0]).multiplyLeft(S)}super({...e,width:y,height:b,viewMatrix:S,longitude:n,latitude:t,zoom:i,...E,fovy:x,focalDistance:_}),(0,r.Z)(this,"longitude",void 0),(0,r.Z)(this,"latitude",void 0),(0,r.Z)(this,"pitch",void 0),(0,r.Z)(this,"bearing",void 0),(0,r.Z)(this,"altitude",void 0),(0,r.Z)(this,"fovy",void 0),(0,r.Z)(this,"orthographic",void 0),(0,r.Z)(this,"_subViewports",void 0),(0,r.Z)(this,"_pseudoMeters",void 0),this.latitude=t,this.longitude=n,this.zoom=i,this.pitch=a,this.bearing=c,this.altitude=_,this.fovy=x,this.orthographic=f,this._subViewports=p?[]:null,this._pseudoMeters=A,Object.freeze(this)}get subViewports(){if(this._subViewports&&!this._subViewports.length){const e=this.getBounds(),t=Math.floor((e[0]+180)/360),n=Math.ceil((e[2]-180)/360);for(let r=t;r<=n;r++){const e=r?new c({...this,worldOffset:r}):this;this._subViewports.push(e)}}return this._subViewports}projectPosition(e){if(this._pseudoMeters)return super.projectPosition(e);const[t,n]=this.projectFlat(e);return[t,n,(e[2]||0)*(0,o.NC)(e[1])]}unprojectPosition(e){if(this._pseudoMeters)return super.unprojectPosition(e);const[t,n]=this.unprojectFlat(e);return[t,n,(e[2]||0)/(0,o.NC)(n)]}addMetersToLngLat(e,t){return(0,o.eG)(e,t)}panByPosition(e,t){const n=(0,o.CT)(t,this.pixelUnprojectionMatrix),r=this.projectFlat(e),i=a.IH([],r,a.tk([],n)),s=a.IH([],this.center,i),[l,c]=this.unprojectFlat(s);return{longitude:l,latitude:c}}getBounds(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=(0,o.zX)(this,e.z||0);return[Math.min(t[0][0],t[1][0],t[2][0],t[3][0]),Math.min(t[0][1],t[1][1],t[2][1],t[3][1]),Math.max(t[0][0],t[1][0],t[2][0],t[3][0]),Math.max(t[0][1],t[1][1],t[2][1],t[3][1])]}fitBounds(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{width:n,height:r}=this,{longitude:i,latitude:a,zoom:s}=(0,o.Xg)({width:n,height:r,bounds:e,...t});return new c({width:n,height:r,longitude:i,latitude:a,zoom:s})}}(0,r.Z)(c,"displayName","WebMercatorViewport")},46056:(e,t,n)=>{"use strict";n.d(t,{Z:()=>P});var r=n(68185),i=n(44602);const o={name:"collision",dependencies:[n(61518).Z],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}}};var a=n(81786),s=n(76195),l=n(26277),c=n(64282),u=n(30373),d=n(63549),f=n(66176);class h extends f.Z{renderCollisionMap(e,t){const n=this.gl;return(0,s.s8)(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 p=n(65148);class g extends f.Z{constructor(e,t){super(e,t),(0,r.Z)(this,"maskMap",void 0),(0,r.Z)(this,"fbo",void 0);const{mapSize:n=2048}=t;this.maskMap=new a.Z(e,{width:n,height:n,parameters:{10241:9729,10240:9729,10242:33071,10243:33071}}),this.fbo=new c.Z(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,(0,s.s8)(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 m=n(5550),v=n(43809),A=n(39944),y=n(1384),b=n(69291);const _=(new A.Z).lookAt({eye:[0,0,1]});function w(e){let{width:t,height:n,near:r,far:i,padding:o}=e,a=-t/2,s=t/2,l=-n/2,c=n/2;if(o){const{left:e=0,right:r=0,top:i=0,bottom:d=0}=o,f=(0,u.uZ)((e+t-r)/2,0,t)-t/2,h=(0,u.uZ)((i+n-d)/2,0,n)-n/2;a-=f,s-=f,l+=h,c+=h}return(new A.Z).ortho({left:a,right:s,bottom:l,top:c,near:r,far:i})}class x extends v.Z{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:l=!0}=e,c=Array.isArray(o)?o[0]:o,u=Array.isArray(o)?o[1]:o,d=Math.min(c,u),f=Math.pow(2,d);let h;if(c!==u){const e=Math.pow(2,c),t=Math.pow(2,u);h={unitsPerMeter:[e/f,t/f,1],metersPerUnit:[f/e,f/t,1]}}super({...e,longitude:void 0,position:a,viewMatrix:_.clone().scale([f,f*(l?-1:1),f]),projectionMatrix:w({width:t||1,height:n||1,padding:s,near:r,far:i}),zoom:d,distanceScales:h})}projectFlat(e){let[t,n]=e;const{unitsPerMeter:r}=this.distanceScales;return[t*r[0],n*r[1]]}unprojectFlat(e){let[t,n]=e;const{metersPerUnit:r}=this.distanceScales;return[t*r[0],n*r[1]]}panByPosition(e,t){const n=(0,y.CT)(t,this.pixelUnprojectionMatrix),r=this.projectFlat(e),i=b.IH([],r,b.tk([],n)),o=b.IH([],this.center,i);return{target:this.unprojectFlat(o)}}}function E(e,t,n){if(!e)return[0,0,1,1];const r=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),i=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]}(r);return e[2]-e[0]<=i[2]-i[0]&&e[3]-e[1]<=i[3]-i[1]?e:[Math.max(e[0],i[0]),Math.max(e[1],i[1]),Math.min(e[2],i[2]),Math.min(e[3],i[3])]}class S{constructor(){(0,r.Z)(this,"id","mask-effect"),(0,r.Z)(this,"props",null),(0,r.Z)(this,"useInPicking",!0),(0,r.Z)(this,"order",0),(0,r.Z)(this,"dummyMaskMap",void 0),(0,r.Z)(this,"channels",[]),(0,r.Z)(this,"masks",null),(0,r.Z)(this,"maskPass",void 0),(0,r.Z)(this,"maskMap",void 0),(0,r.Z)(this,"lastViewport",void 0)}preRender(e,t){let{layers:n,layerFilter:r,viewports:i,onViewportActive:o,views:s,isPicking:l}=t,c=!1;if(this.dummyMaskMap||(this.dummyMaskMap=new a.Z(e,{width:1,height:1})),l)return{didRender:c};const u=n.filter((e=>e.props.visible&&e.props.operation.includes("mask")));if(0===u.length)return this.masks=null,this.channels.length=0,{didRender:c};this.masks={},this.maskPass||(this.maskPass=new g(e,{id:"default-mask"}),this.maskMap=this.maskPass.maskMap);const d=this._sortMaskChannels(u),f=i[0],h=!this.lastViewport||!this.lastViewport.equals(f);if(void 0!==f.resolution)return p.Z.warn("MaskExtension is not supported in GlobeView")(),{didRender:c};for(const a in d){const e=this._renderChannel(d[a],{layerFilter:r,onViewportActive:o,views:s,viewport:f,viewportChanged:h});c||(c=e)}return{didRender:c}}_renderChannel(e,t){let{layerFilter:n,onViewportActive:r,views:i,viewport:o,viewportChanged:a}=t,s=!1;const l=this.channels[e.index];if(!l)return s;const c=e===l||e.layers.length!==l.layers.length||e.layers.some(((e,t)=>e!==l.layers[t]||e.props.transitions))||e.layerBounds.some(((e,t)=>e!==l.layerBounds[t]));if(e.bounds=l.bounds,e.maskBounds=l.maskBounds,this.channels[e.index]=e,c||a){this.lastViewport=o;const t=function(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}(e.layers,o);if(e.bounds=t&&E(t,o),c||!(0,u.fS)(e.bounds,l.bounds)){const{maskPass:a,maskMap:l}=this,c=t&&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 m.Z({x:r,y:r,width:a,height:s,longitude:o[0],latitude:o[1],zoom:l,orthographic:!0}):new x({x:r,y:r,width:a,height:s,target:o,zoom:l,flipY:!1})}({bounds:e.bounds,viewport:o,width:l.width,height:l.height,border:1});e.maskBounds=c?c.getBounds():[0,0,1,1],a.render({pass:"mask",channel:e.index,layers:e.layers,layerFilter:n,viewports:c?[c]:[],onViewportActive:r,views:i,moduleParameters:{devicePixelRatio:1}}),s=!0}}return this.masks[e.id]={index:e.index,bounds:e.maskBounds,coordinateOrigin:e.coordinateOrigin,coordinateSystem:e.coordinateSystem},s}_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){p.Z.warn("Too many mask layers. The max supported is 4")();continue}i={id:e,index:this.channels.findIndex((t=>(null===t||void 0===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 r=0;r<4;r++){const e=this.channels[r];e&&e.id in t||(this.channels[r]=null)}for(const r in t){const e=t[r];e.index<0&&(e.index=this.channels.findIndex((e=>!e)),this.channels[e.index]=e)}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 C{constructor(){(0,r.Z)(this,"id","collision-filter-effect"),(0,r.Z)(this,"props",null),(0,r.Z)(this,"useInPicking",!0),(0,r.Z)(this,"order",1),(0,r.Z)(this,"channels",{}),(0,r.Z)(this,"collisionFilterPass",void 0),(0,r.Z)(this,"collisionFBOs",{}),(0,r.Z)(this,"dummyCollisionMap",void 0),(0,r.Z)(this,"lastViewport",void 0)}preRender(e,t){let{effects:n,layers:r,layerFilter:i,viewports:o,onViewportActive:s,views:l,isPicking:c,preRenderStats:u={}}=t;var d;if(this.dummyCollisionMap||(this.dummyCollisionMap=new a.Z(e,{width:1,height:1})),c)return;const f=r.filter((e=>{let{props:{visible:t,collisionEnabled:n}}=e;return t&&n}));if(0===f.length)return void(this.channels={});this.collisionFilterPass||(this.collisionFilterPass=new h(e,{id:"default-collision-filter"}));const p=null===n||void 0===n?void 0:n.filter((e=>e.constructor===S)),g=null===(d=u["mask-effect"])||void 0===d?void 0:d.didRender,m=this._groupByCollisionGroup(e,f),v=o[0],A=!this.lastViewport||!this.lastViewport.equals(v)||g;for(const a in m){const t=this.collisionFBOs[a],n=m[a];t.resize({width:e.canvas.width/2,height:e.canvas.height/2}),this._render(n,{effects:p,layerFilter:i,onViewportActive:s,views:l,viewport:v,viewportChanged:A})}}_render(e,t){let{effects:n,layerFilter:r,onViewportActive:i,views:o,viewport:a,viewportChanged:l}=t;const{collisionGroup:c}=e,f=this.channels[c];if(!f)return;const h=l||e===f||!(0,d.v)(f.layers,e.layers,1)||e.layerBounds.some(((e,t)=>!(0,u.fS)(e,f.layerBounds[t])))||e.allLayersLoaded!==f.allLayersLoaded||e.layers.some((e=>e.props.transitions));if(this.channels[c]=e,h){this.lastViewport=a;const t=this.collisionFBOs[c];this.collisionFilterPass.renderCollisionMap(t,{pass:"collision-filter",isPicking:!0,layers:e.layers,effects:n,layerFilter:r,viewports:a?[a]:[],onViewportActive:i,views:o,moduleParameters:{dummyCollisionMap:this.dummyCollisionMap,devicePixelRatio:(0,s.w)(t.gl)/2}})}}_groupByCollisionGroup(e,t){const n={};for(const r of t){const{collisionGroup:e}=r.props;let t=n[e];t||(t={collisionGroup:e,layers:[],layerBounds:[],allLayersLoaded:!0},n[e]=t),t.layers.push(r),t.layerBounds.push(r.getBounds()),r.isLoaded||(t.allLayersLoaded=!1)}for(const r of Object.keys(n))this.collisionFBOs[r]||this.createFBO(e,r),this.channels[r]||(this.channels[r]=n[r]);for(const r of Object.keys(this.collisionFBOs))n[r]||this.destroyFBO(r);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 a.Z(e,{width:n,height:r,parameters:{10241:9728,10240:9728,10242:33071,10243:33071}}),o=new l.Z(e,{format:33189,width:n,height:r});this.collisionFBOs[t]=new c.Z(e,{id:"Collision-".concat(t),width:n,height:r,attachments:{36064:i,36096:o}})}destroyFBO(e){const t=this.collisionFBOs[e];for(const n of Object.values(t.attachments))n.delete();t.delete(),delete this.collisionFBOs[e]}}class P extends i.Z{getShaders(){return{modules:[o]}}draw(e){let{uniforms:t,context:n,moduleParameters:r}=e;const{collisionEnabled:i}=this.props,{collisionFBO:o,drawToCollisionMap:a}=r,s=i&&Boolean(o);t.collision_enabled=s,a&&(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 C);this.getAttributeManager().add({collisionPriorities:{size:1,accessor:"getCollisionPriority",shaderAttributes:{collisionPriorities:{divisor:0},instanceCollisionPriorities:{divisor:1}}}})}getNeedsPickingBuffer(){return this.props.collisionEnabled}}(0,r.Z)(P,"defaultProps",{getCollisionPriority:{type:"accessor",value:0},collisionEnabled:!0,collisionGroup:{type:"string",value:"default"},collisionTestProps:{}}),(0,r.Z)(P,"extensionName","CollisionFilterExtension")},24099:(e,t,n)=>{"use strict";n.d(t,{Z:()=>y});var r=n(68185),i=n(44602);const o="\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",a="\nuniform bool filter_transformColor;\nvarying float dataFilter_value;\n";function s(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 l={"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 "},c={name:"data-filter",vs:o,fs:a,inject:l,getUniforms:s},u={name:"data-filter-fp64",vs:o,fs:a,inject:l,getUniforms:function(e){if(!e||!("extensions"in e))return{};const t=s(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 d=n(64282),f=n(81786),h=n(76195),p=n(44548);const g={blend:!0,blendFunc:[1,1,1,1],blendEquation:[32774,32774],depthTest:!1};var m=n(36708),v=n(77378);const A={1:"float",2:"vec2",3:"vec3",4:"vec4"};class y extends i.Z{constructor(){let{filterSize:e=1,fp64:t=!1,countItems:n=!1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!A[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?u:c],defines:{DATAFILTER_TYPE:A[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,n)=>{let{index:r}=n;const i=t&&t.__source?t.__source.index:r;return e?(i+1)%255:[(i+1)%255,Math.floor(i/255)%255]},shaderAttributes:{filterPrevIndices:{vertexOffset:0},filterIndices:{vertexOffset:1}}}});const i=function(e,t){return t?new d.Z(e,{width:1,height:1,attachments:{36064:new f.Z(e,{format:(0,h.D0)(e)?34836:6408,type:5126,mipmaps:!1})}}):new d.Z(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 p.Z(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(e){let{props:t,oldProps:n}=e;if(this.state.filterModel){const e=this.getAttributeManager().attributes.filterValues.needsUpdate()||t.filterEnabled!==n.filterEnabled||t.filterRange!==n.filterRange||t.filterSoftRange!==n.filterSoftRange;e&&this.setState({filterNeedsUpdate:e})}}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;(0,m.Z)(a,{framebuffer:n,color:[0,0,0,0]}),r.updateModuleSettings(e.moduleParameters).setAttributes({...t.getShaderAttributes(),...i&&i.getShaderAttributes()}).draw({framebuffer:n,parameters:{...g,viewport:[0,0,n.width,n.height]}});const s=(0,v.z6)(n);let l=0;for(let e=0;e{"use strict";n.d(t,{Z:()=>d});var r=n(68185),i=n(84444),o=n(39179),a=n(64359),s=n(32603),l=n(88264);const c={...l.Z.defaultProps};class u extends s.Z{indexToBounds(){return null}renderLayers(){const{elevationScale:e,extruded:t,wireframe:n,filled:r,stroked:i,lineWidthUnits:o,lineWidthScale:a,lineWidthMinPixels:s,lineWidthMaxPixels:c,lineJointRounded:u,lineMiterLimit:d,lineDashJustified:f,getElevation:h,getFillColor:p,getLineColor:g,getLineWidth:m}=this.props,{updateTriggers:v,material:A,transitions:y}=this.props;return new(this.getSubLayerClass("cell",l.Z))({filled:r,wireframe:n,extruded:t,elevationScale:e,stroked:i,lineWidthUnits:o,lineWidthScale:a,lineWidthMinPixels:s,lineWidthMaxPixels:c,lineJointRounded:u,lineMiterLimit:d,lineDashJustified:f,material:A,transitions:y,getElevation:h,getFillColor:p,getLineColor:g,getLineWidth:m},this.getSubLayerProps({id:"cell",updateTriggers:v&&{getElevation:v.getElevation,getFillColor:v.getFillColor,getLineColor:v.getLineColor,getLineWidth:v.getLineWidth}}),this.indexToBounds())}}(0,r.Z)(u,"layerName","GeoCellLayer"),(0,r.Z)(u,"defaultProps",c);class d extends u{initializeState(){a.ZP._checkH3Lib()}updateState(e){let{props:t,changeFlags:n}=e;if(n.dataChanged||n.updateTriggersChanged&&n.updateTriggersChanged.getHexagons){const{data:e,getHexagons:n}=t,r=[],{iterable:a,objectInfo:s}=(0,o.jB)(e);for(const t of a){s.index++;const e=n(t,s),o=(0,i.kU)(e,!0);for(const n of o)r.push(this.getSubLayerRow({polygon:n},t,s.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)}}}(0,r.Z)(d,"layerName","H3ClusterLayer"),(0,r.Z)(d,"defaultProps",{getHexagons:{type:"accessor",value:e=>e.hexagons}})},64359:(e,t,n)=>{"use strict";n.d(t,{ZP:()=>p});var r=n(68185),i=n(84444),o=n(30373),a=n(32603),s=n(39179),l=n(88264),c=n(13091);function u(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 d(e,t,n){const r=e(t,n),[o,a]=(0,i.VP)(r);return[a,o]}function f(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;const n=(0,i.Lg)(e,!0);return 1!==t?function(e,t,n){const[r,a]=(0,i.VP)(e),s=t.length;u(t,a);const l=t[0]===t[s-1]?s-1:s;for(let i=0;ie.hexagon},extruded:!0};class p extends a.Z{constructor(){super(...arguments),(0,r.Z)(this,"state",void 0)}initializeState(){p._checkH3Lib(),this.state={edgeLengthKM:0,resolution:-1}}shouldUpdateState(e){let{changeFlags:t}=e;return this._shouldUseHighPrecision()?t.propsOrDataChanged:t.somethingChanged}updateState(e){let{props:t,changeFlags:n}=e;if(!0!==t.highPrecision&&(n.dataChanged||n.updateTriggersChanged&&n.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:o}=(0,s.jB)(this.props.data);for(const a of r){o.index++;const r=this.props.getHexagon(a,o),s=(0,i.AI)(r);if(e<0){if(e=s,!this.props.highPrecision)break}else if(e!==s){n=!0;break}if((0,i.v8)(r)){t=!0;break}}return{resolution:e,edgeLengthKM:e>=0?(0,i.U7)(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?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 o=this.props.centerHexagon||(0,i.Cx)(e.latitude,e.longitude,t);if(r===o)return;if(r){const e=(0,i.Ji)(r,o);if(e>=0&&e*n<10)return}const{unitsPerMeter:a}=e.distanceScales;let s=f(o);const[l,c]=(0,i.VP)(o),[u,d]=e.projectFlat([c,l]);s=s.map((t=>{const n=e.projectFlat(t);return[(n[0]-u)/a[0],(n[1]-d)/a[1]]})),this.setState({centerHex:o,vertices:s})}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:c,lineWidthMaxPixels:u,getFillColor:d,getElevation:f,getLineColor:h,getLineWidth:p,transitions:g,updateTriggers:m}=this.props;return{elevationScale:e,extruded:r,coverage:n,wireframe:i,stroked:o,filled:a,lineWidthUnits:s,lineWidthScale:l,lineWidthMinPixels:c,lineWidthMaxPixels:u,material:t,getElevation:f,getFillColor:d,getLineColor:h,getLineWidth:p,transitions:g,updateTriggers:{getFillColor:m.getFillColor,getElevation:m.getElevation,getLineColor:m.getLineColor,getLineWidth:m.getLineWidth}}}_renderPolygonLayer(){const{data:e,getHexagon:t,updateTriggers:n,coverage:r}=this.props,i=this.getSubLayerClass("hexagon-cell-hifi",l.Z),o=this._getForwardProps();return o.updateTriggers.getPolygon=function(e,t){let n;return n=void 0===e||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}(f(t(e,n),r))})}_renderColumnLayer(){const{data:e,getHexagon:t,updateTriggers:n}=this.props,r=this.getSubLayerClass("hexagon-cell",c.Z),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:d.bind(null,t)})}}(0,r.Z)(p,"defaultProps",h),(0,r.Z)(p,"layerName","H3HexagonLayer"),(0,r.Z)(p,"_checkH3Lib",(()=>{}))},98173:(e,t,n)=>{"use strict";n.d(t,{Z:()=>le});var r=n(68185),i=n(98029),o=n(65148),a=n(36741),s=n(44602);const l={clipBounds:[0,0,1,1],clipByInstance:void 0},c="\nuniform vec4 clip_bounds;\n\nbool clip_isInBounds(vec2 position) {\n return position.x >= clip_bounds[0] && position.y >= clip_bounds[1] && position.x < clip_bounds[2] && position.y < clip_bounds[3];\n}\n",u={name:"clip-vs",vs:c},d={"vs:#decl":"\nvarying float clip_isVisible;\n","vs:DECKGL_FILTER_GL_POSITION":"\n clip_isVisible = float(clip_isInBounds(geometry.worldPosition.xy));\n","fs:#decl":"\nvarying float clip_isVisible;\n","fs:DECKGL_FILTER_COLOR":"\n if (clip_isVisible < 0.5) discard;\n"},f={name:"clip-fs",fs:c},h={"vs:#decl":"\nvarying vec2 clip_commonPosition;\n","vs:DECKGL_FILTER_GL_POSITION":"\n clip_commonPosition = geometry.position.xy;\n","fs:#decl":"\nvarying vec2 clip_commonPosition;\n","fs:DECKGL_FILTER_COLOR":"\n if (!clip_isInBounds(clip_commonPosition)) discard;\n"};class p extends s.Z{getShaders(){let e="instancePositions"in this.getAttributeManager().attributes;return void 0!==this.props.clipByInstance&&(e=Boolean(this.props.clipByInstance)),this.state.clipByInstance=e,e?{modules:[u],inject:d}:{modules:[f],inject:h}}draw(e){let{uniforms:t}=e;const{clipBounds:n}=this.props;if(this.state.clipByInstance)t.clip_bounds=n;else{const e=this.projectPosition([n[0],n[1],0]),r=this.projectPosition([n[2],n[3],0]);t.clip_bounds=[Math.min(e[0],r[0]),Math.min(e[1],r[1]),Math.max(e[0],r[0]),Math.max(e[1],r[1])]}}}(0,r.Z)(p,"defaultProps",l),(0,r.Z)(p,"extensionName","ClipExtension");var g=n(39944),m=n(23140),v=n(30576),A=n.n(v);function y(e){let t=0;for(let n,r,i=0,o=e.length-1;i>3}if(r--,1===n||2===n)i+=e.readSVarint(),o+=e.readSVarint(),1===n&&(s&&a.push(s),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,c=-1/0;for(;e.pos>3}if(r--,1===n||2===n)i+=e.readSVarint(),o+=e.readSVarint(),is&&(s=i),oc&&(c=o);else if(7!==n)throw new Error("unknown command ".concat(n))}return[a,l,s,c]}_toGeoJSON(e){let t,n,r=this.loadGeometry(),i=_.types[this.type];switch(this.type){case 1:const i=[];for(t=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 _(this._pbf,t,this.extent,this._keys,this._values)}}function x(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;t=1===n?e.readString():2===n?e.readFloat():3===n?e.readDouble():4===n?e.readVarint64():5===n?e.readVarint():6===n?e.readSVarint():7===n?e.readBoolean():null}return t}(n)))}class E{constructor(e,t){(0,r.Z)(this,"layers",void 0),this.layers=e.readFields(S,{},t)}}function S(e,t,n){if(3===e&&n){const e=new w(n,n.readVarint()+n.pos);e.length&&t&&(t[e.name]=e)}}var C=n(8766);function P(e){const t=e.indices.length,n="Polygon";if(t<=1)return{type:n,data:e.data,areas:[[(0,C.getPolygonSignedArea)(e.data)]],indices:[e.indices]};const r=[],i=[];let o,a=[],s=[],l=0;for(let c,u,d=0;d>3),R--,1===M||2===M)I+=e.readSVarint(),L+=e.readSVarint(),1===M&&t.push(N),n.push(I,L),N+=2;else{if(7!==M)throw new Error("unknown command ".concat(M));if(N>0){const e=t[t.length-1];n.push(n[e],n[e+1]),N+=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,n={type:"Point",...t};break;case 2:this._geometryInfo.lineFeaturesCount++,this._geometryInfo.linePathsCount+=t.indices.length,this._geometryInfo.linePositionsCount+=t.data.length/2,n={type:"LineString",...t};break;case 3:n=P(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 D(this._pbf,n,this.extent,this._keys,this._values,t)}}function j(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;t=1===n?e.readString():2===n?e.readFloat():3===n?e.readDouble():4===n?e.readVarint64():5===n?e.readVarint():6===n?e.readSVarint():7===n?e.readBoolean():null}return t}(n)))}class B{constructor(e,t){(0,r.Z)(this,"layers",void 0),this.layers=e.readFields(Z,{},t)}}function Z(e,t,n){if(3===e&&n){const e=new F(n,n.readVarint()+n.pos);e.length&&t&&(t[e.name]=e)}}function z(e,t){var n,r;const i=function(e){var t;if(null===e||void 0===e||!e.mvt)throw new Error("mvt options required");const n="wgs84"===(null===(t=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||void 0===t||null===(n=t.gis)||void 0===n?void 0:n.format)||(null===t||void 0===t||null===(r=t.mvt)||void 0===r?void 0:r.shape);switch(o){case"columnar-table":return{shape:"columnar-table",data:U(e,i)};case"geojson-row-table":return{shape:"geojson-row-table",data:H(e,i)};case"geojson":return H(e,i);case"binary-geometry":case"binary":return U(e,i);default:throw new Error(o)}}function U(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 B(new(A())(e)),o=t&&Array.isArray(t.layers)?t.layers:Object.keys(i.layers);return o.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;ree(e,t,n)))},Polygon:te,MultiPolygon:function(e,t,n){return e.map((e=>te(e,t,n)))}};function Q(e,t,n){let[r,i]=e,[o,a]=t;const s=(0,X.t7)(o[0],a[0],r),l=(0,X.t7)(o[1],a[1],i);return n.unprojectFlat([s,l])}function J(e,t,n){return e.map((e=>Q(e,t,n)))}function ee(e,t,n){return J(e,t,n)}function te(e,t,n){return e.map((e=>J(e,t,n)))}const ne=["points","lines","polygons"];function re(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=ie(e.properties,(e=>e[t]===n),o,a):e.fields&&(s=ie(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=ce(e,i)===l,r=s||ue(e)===n;return t&&r})):a&&r?function(e,t,n,r){for(const i of ne){const o=e[i]&&re(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(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;const t=this._pickObjects(e),n=new Set,r=[];for(const i of t){const e=ce(i.object,this.props.uniqueIdProperty);void 0===e?r.push(i.object):n.has(e)||(n.add(e),r.push(i.object))}return r}_setWGS84PropertyForTiles(){const e="dataInWGS84";this.state.tileset.selectedTiles.forEach((t=>{t.hasOwnProperty(e)||Object.defineProperty(t,e,{get:()=>{if(!t.content)return null;if(this.state.binary&&Array.isArray(t.content)&&!t.content.length)return[];const{bbox:e}=t;if(void 0===t._contentWGS84&&(0,ae.ob)(e)){const n=this.state.binary?(0,Y.F_)(t.content):t.content;t._contentWGS84=n.map((t=>fe(t,e,this.context.viewport)))}return t._contentWGS84}})}))}}function ce(e,t){return e.properties&&t?e.properties[t]:"id"in e?e.id:void 0}function ue(e){var t;return(null===(t=e.properties)||void 0===t?void 0:t.layerName)||null}function de(e){return void 0!==e&&null!==e&&""!==e}function fe(e,t,n){const r={...e,geometry:{type:e.geometry.type}};return Object.defineProperty(r.geometry,"coordinates",{get:()=>{const r=function(e,t,n){const r=[n.projectFlat([t.west,t.north]),n.projectFlat([t.east,t.south])];return{...e,coordinates:$[e.type](e.coordinates,r,n)}}(e.geometry,t,n);return r.coordinates}}),r}(0,r.Z)(le,"layerName","MVTLayer"),(0,r.Z)(le,"defaultProps",se)},17096:(e,t,n)=>{"use strict";n.d(t,{Z:()=>w});var r=n(68185),i=n(32603),o=n(35395),a=n(36741),s=n(89069);const l={id:"request-scheduler",throttleRequests:!0,maxRequests:6};class c{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,r.Z)(this,"props",void 0),(0,r.Z)(this,"stats",void 0),(0,r.Z)(this,"activeRequestCount",0),(0,r.Z)(this,"requestQueue",[]),(0,r.Z)(this,"requestMap",new Map),(0,r.Z)(this,"deferredUpdate",null),this.props={...l,...e},this.stats=new s.Z({id:this.props.id}),this.stats.get("Queued Requests"),this.stats.get("Active Requests"),this.stats.get("Cancelled Requests"),this.stats.get("Queued Requests Ever"),this.stats.get("Active Requests Ever")}scheduleRequest(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:()=>0;if(!this.props.throttleRequests)return Promise.resolve({done:()=>{}});if(this.requestMap.has(e))return this.requestMap.get(e);const n={handle:e,priority:0,getPriority:t},r=new Promise((e=>(n.resolve=e,n)));return this.requestQueue.push(n),this.requestMap.set(e,r),this._issueNewRequests(),r}_issueRequest(e){const{handle:t,resolve:n}=e;let r=!1;const i=()=>{r||(r=!0,this.requestMap.delete(t),this.activeRequestCount--,this._issueNewRequests())};return this.activeRequestCount++,n?n({done:i}):Promise.resolve({done:i})}_issueNewRequests(){this.deferredUpdate||(this.deferredUpdate=setTimeout((()=>this._issueNewRequestsAsync()),0))}_issueNewRequestsAsync(){this.deferredUpdate=null;const e=Math.max(this.props.maxRequests-this.activeRequestCount,0);if(0!==e){this._updateAllRequests();for(let t=0;te.priority-t.priority))}_updateRequest(e){return e.priority=e.getPriority(e.handle),!(e.priority<0)||(e.resolve(null),!1)}}var u=n(39944),d=n(30373);class f{constructor(e){(0,r.Z)(this,"index",void 0),(0,r.Z)(this,"isVisible",void 0),(0,r.Z)(this,"isSelected",void 0),(0,r.Z)(this,"parent",void 0),(0,r.Z)(this,"children",void 0),(0,r.Z)(this,"content",void 0),(0,r.Z)(this,"state",void 0),(0,r.Z)(this,"layers",void 0),(0,r.Z)(this,"id",void 0),(0,r.Z)(this,"bbox",void 0),(0,r.Z)(this,"zoom",void 0),(0,r.Z)(this,"userData",void 0),(0,r.Z)(this,"_abortController",void 0),(0,r.Z)(this,"_loader",void 0),(0,r.Z)(this,"_loaderId",void 0),(0,r.Z)(this,"_isLoaded",void 0),(0,r.Z)(this,"_isCancelled",void 0),(0,r.Z)(this,"_needsReload",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 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(e){let{getData:t,requestScheduler:n,onLoad:r,onError:i}=e;const{index:o,id:a,bbox:s,userData:l,zoom:c}=this,u=this._loaderId;this._abortController=new AbortController;const{signal:d}=this._abortController,f=await n.scheduleRequest(this,(e=>e.isSelected?1:-1));if(!f)return void(this._isCancelled=!0);if(this._isCancelled)return void f.done();let h,p=null;try{p=await t({index:o,id:a,bbox:s,userData:l,zoom:c,signal:d})}catch(g){h=g||!0}finally{f.done()}u===this._loaderId&&(this._loader=void 0,this.content=p,!this._isCancelled||p?(this._isLoaded=!0,this._isCancelled=!1,h?i(h,this):r(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 h=n(25625);function p(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 n of t)if(n.isVisible=Boolean(n.state&g),n.children&&(n.isVisible||1&n.state))for(const e of n.children)e.state=1;else n.isSelected&&b(n)},never:()=>{}},A={extent:null,tileSize:512,maxZoom:null,minZoom:null,maxCacheSize:null,maxCacheByteSize:null,refinementStrategy:"best-available",zRange:null,maxRequests:6,zoomOffset:0,onTileLoad:()=>{},onTileUnload:()=>{},onTileError:()=>{}};function y(e){let t=e;for(;t;){if(t.isLoaded||t.content)return t.state|=g,!0;t=t.parent}return!1}function b(e){for(const t of e.children)t.isLoaded||t.content?t.state|=g:b(t)}const _={TilesetClass:class{constructor(e){(0,r.Z)(this,"opts",void 0),(0,r.Z)(this,"_requestScheduler",void 0),(0,r.Z)(this,"_cache",void 0),(0,r.Z)(this,"_dirty",void 0),(0,r.Z)(this,"_tiles",void 0),(0,r.Z)(this,"_cacheByteSize",void 0),(0,r.Z)(this,"_viewport",void 0),(0,r.Z)(this,"_zRange",void 0),(0,r.Z)(this,"_selectedTiles",void 0),(0,r.Z)(this,"_frameNumber",void 0),(0,r.Z)(this,"_modelMatrix",void 0),(0,r.Z)(this,"_modelMatrixInverse",void 0),(0,r.Z)(this,"_maxZoom",void 0),(0,r.Z)(this,"_minZoom",void 0),(0,r.Z)(this,"onTileLoad",void 0),(0,r.Z)(this,"_getCullBounds",function(e){let t,n={};return r=>{for(const i in r)if(!p(r[i],n[i])){t=e(r),n=r;break}return t}}(h.XT)),this.opts={...A,...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 c({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 u.Z,this._modelMatrixInverse=new u.Z,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){let{zRange:t,modelMatrix:n}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const r=new u.Z(n),i=!r.equals(this._modelMatrix);if(this._viewport&&e.equals(this._viewport)&&(0,d.fS)(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(e){let{viewport:t,maxZoom:n,minZoom:r,zRange:i,modelMatrix:o,modelMatrixInverse:a}=e;const{tileSize:s,extent:l,zoomOffset:c}=this.opts;return(0,h.rJ)({viewport:t,maxZoom:n,minZoom:r,zRange:i,tileSize:s,extent:l,modelMatrix:o,modelMatrixInverse:a,zoomOffset:c})}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:(0,h.z_)(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||m,t=new Array(this._cache.size);let n=0;for(const r of this._cache.values())t[n++]=r.isVisible,r.isSelected=!1,r.isVisible=!1;for(const r of this._selectedTiles)r.isSelected=!0,r.isVisible=!0;("function"===typeof e?e:v[e])(Array.from(this._cache.values())),n=0;for(const r of this._cache.values())if(t[n++]!==r.isVisible)return!0;return!1}_pruneRequests(){const{maxRequests:e=0}=this.opts,t=[];let n=0;for(const r of this._cache.values())r.isLoading&&(n++,r.isSelected||r.isVisible||t.push(r));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&&void 0!==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 f(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}},data:{type:"data",value:[]},dataComparator:h.zc.equal,renderSubLayers:{type:"function",value:e=>new a.Z(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:m,zRange:null,maxRequests:6,zoomOffset:0};class w extends i.Z{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;return null===(e=this.state)||void 0===e||null===(t=e.tileset)||void 0===t?void 0:t.selectedTiles.every((e=>e.isLoaded&&e.layers&&e.layers.every((e=>e.isLoaded))))}shouldUpdateState(e){let{changeFlags:t}=e;return t.somethingChanged}updateState(e){let{changeFlags:t}=e,{tileset:n}=this.state;const r=t.propsOrDataChanged||t.updateTriggersChanged,i=t.dataChanged||t.updateTriggersChanged&&(t.updateTriggersChanged.all||t.updateTriggersChanged.getTileData);n?r&&(n.setOptions(this._getTilesetOptions()),i?n.reloadAll():this.state.tileset.tiles.forEach((e=>{e.layers=null}))):(n=new this.props.TilesetClass(this._getTilesetOptions()),this.setState({tileset:n})),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)?(0,h.z0)(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(e){let{info:t,sourceLayer:n}=e;const r=n.props.tile;return t.picked&&(t.tile=r),t.sourceTile=r,t}_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,id:"".concat(this.id,"-").concat(e.id),data:e.content,_offset:0,tile:e});e.layers=(0,o.x)(n,Boolean).map((n=>n.clone({tile:e,...t})))}else;return e.layers}))}filterSubLayer(e){let{layer:t,cullRect:n}=e;const{tile:r}=t.props;return this.state.tileset.isTileVisible(r,n)}}(0,r.Z)(w,"defaultProps",_),(0,r.Z)(w,"layerName","TileLayer")},25625:(e,t,n)=>{"use strict";n.d(t,{XT:()=>st,rJ:()=>pt,z0:()=>at,ob:()=>mt,Xj:()=>gt,hG:()=>ut,z_:()=>ft,zc:()=>it});var r=n(68185),i=n(39944),o=n(43809),a=n(98029),s=n(58034),l=n(81723);const c=Math.PI/180,u=180/Math.PI,d=6370972,f=256;function h(){const e=4018225162502676e-20,t=Math.PI/180*f;return{unitsPerMeter:[e,e,e],unitsPerMeter2:[0,0,0],metersPerUnit:[24886.609375,24886.609375,24886.609375],unitsPerDegree:[t,t,e],unitsPerDegree2:[0,0,0],degreesPerUnit:[1/t,1/t,24886.609375]}}class p extends o.Z{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{latitude:t=0,longitude:n=0,zoom:o=0,nearZMultiplier:a=.1,farZMultiplier:s=2,resolution:l=10}=e;let{height:u,altitude:d=1.5}=e;u=u||1,d=Math.max(.75,d);const f=(new i.Z).lookAt({eye:[0,-d,0],up:[0,0,1]}),p=Math.pow(2,o);f.rotateX(t*c),f.rotateZ(-n*c),f.scale(p/u);const g=Math.atan(.5/d),m=512*p/u;super({...e,height:u,viewMatrix:f,longitude:n,latitude:t,zoom:o,distanceScales:h(),fovyRadians:2*g,focalDistance:d,near:a,far:Math.min(2,1/m+1)*d*s}),(0,r.Z)(this,"longitude",void 0),(0,r.Z)(this,"latitude",void 0),(0,r.Z)(this,"resolution",void 0),this.latitude=t,this.longitude=n,this.resolution=l}get projectionMode(){return a.zG.GLOBE}getDistanceScales(){return this.distanceScales}getBounds(){const e={targetZ:(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).z||0},t=this.unproject([0,this.height/2],e),n=this.unproject([this.width/2,0],e),r=this.unproject([this.width,this.height/2],e),i=this.unproject([this.width/2,this.height],e);return r[0]this.longitude&&(t[0]-=360),[Math.min(t[0],r[0],n[0],i[0]),Math.min(t[1],r[1],n[1],i[1]),Math.max(t[0],r[0],n[0],i[0]),Math.max(t[1],r[1],n[1],i[1])]}unproject(e){let{topLeft:t=!0,targetZ:n}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const[r,i,o]=e,a=t?i:this.height-i,{pixelUnprojectionMatrix:l}=this;let c;if(Number.isFinite(o))c=g(l,[r,a,o,1]);else{const e=g(l,[r,a,-1,1]),t=g(l,[r,a,1,1]),i=((n||0)/d+1)*f,o=s.x9(s.lu([],e,t)),u=s.x9(e),h=s.x9(t),p=4*((4*u*h-(o-u-h)**2)/16)/o,m=(Math.sqrt(u-p)-Math.sqrt(Math.max(0,i*i-p)))/Math.sqrt(o);c=s.t7([],e,t,m)}const[u,h,p]=this.unprojectPosition(c);return Number.isFinite(o)?[u,h,p]:Number.isFinite(n)?[u,h,n]:[u,h]}projectPosition(e){const[t,n,r=0]=e,i=t*c,o=n*c,a=Math.cos(o),s=(r/d+1)*f;return[Math.sin(i)*a*s,-Math.cos(i)*a*s,Math.sin(o)*s]}unprojectPosition(e){const[t,n,r]=e,i=s.Zh(e),o=Math.asin(r/i);return[Math.atan2(t,-n)*u,o*u,(i/f-1)*d]}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 g(e,t){const n=l.fF([],t,e);return l.bA(n,n,1/n[3]),n}var m=n(5550);const v=-1,A=0,y=1;var b=n(31549);const _=new b.Z,w=new b.Z;class x{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[0,0,0],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[0,0,0],n=arguments.length>2?arguments[2]:void 0;(0,r.Z)(this,"center",void 0),(0,r.Z)(this,"halfDiagonal",void 0),(0,r.Z)(this,"minimum",void 0),(0,r.Z)(this,"maximum",void 0),n=n||_.copy(e).add(t).scale(.5),this.center=new b.Z(n),this.halfDiagonal=new b.Z(t).subtract(this.center),this.minimum=new b.Z(e),this.maximum=new b.Z(t)}clone(){return new x(this.minimum,this.maximum,this.center)}equals(e){return this===e||Boolean(e)&&this.minimum.equals(e.minimum)&&this.maximum.equals(e.maximum)}transform(e){return this.center.transformAsPoint(e),this.halfDiagonal.transform(e),this.minimum.transform(e),this.maximum.transform(e),this}intersectPlane(e){const{halfDiagonal:t}=this,n=w.from(e.normal),r=t.x*Math.abs(n.x)+t.y*Math.abs(n.y)+t.z*Math.abs(n.z),i=this.center.dot(n)+e.distance;return i-r>0?y:i+r<0?v:A}distanceTo(e){return Math.sqrt(this.distanceSquaredTo(e))}distanceSquaredTo(e){const t=_.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}}var E=n(44649);const S=new b.Z,C=new b.Z;class P{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[0,0,0],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;(0,r.Z)(this,"center",void 0),(0,r.Z)(this,"radius",void 0),this.radius=-0,this.center=new b.Z,this.fromCenterRadius(e,t)}fromCenterRadius(e,t){return this.center.from(e),this.radius=t,this}fromCornerPoints(e,t){return t=S.from(t),this.center=(new b.Z).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 P(this.center,this.radius)}union(e){const t=this.center,n=this.radius,r=e.center,i=e.radius,o=S.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 C.copy(o).scale((-n+s)/a).add(t),this.center.copy(C),this.radius=s,this}expand(e){const t=S.from(e).subtract(this.center).magnitude();return t>this.radius&&(this.radius=t),this}transform(e){this.center.transform(e);const t=E.Q$(S,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=S.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?v:r1?t-1:0),r=1;r0?this.copy([e,...n]):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(D)}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,c=n*a,u=r*a,d=r*s,f=i*a,h=i*s,p=i*l,g=o*a,m=o*s,v=o*l;e[0]=1-d-p,e[3]=u-v,e[6]=f+m,e[1]=u+v,e[4]=1-c-p,e[7]=h-g,e[2]=f-m,e[5]=h+g,e[8]=1-c-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 function(e){var t=e[0],n=e[1],r=e[2],i=e[3],o=e[4],a=e[5],s=e[6],l=e[7],c=e[8];return t*(c*o-a*l)+n*(-c*i+a*s)+r*(l*i-o*s)}(this)}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],c=t[7],u=t[8],d=u*a-s*c,f=-u*o+s*l,h=c*o-a*l,p=n*d+r*f+i*h;p&&(p=1/p,e[0]=d*p,e[1]=(-u*r+i*c)*p,e[2]=(s*r-i*a)*p,e[3]=f*p,e[4]=(u*n-i*l)*p,e[5]=(-s*n+i*o)*p,e[6]=h*p,e[7]=(-c*n+r*l)*p,e[8]=(a*n-r*o)*p)}(this,this),this.check()}multiplyLeft(e){return R(this,e,this),this.check()}multiplyRight(e){return R(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],c=t[6],u=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]=c,e[7]=u,e[8]=d}(this,this,e),this.check()}scale(e){return Array.isArray(e)?I(this,this,e):I(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],c=t[6],u=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+c,e[7]=f*i+h*s+u,e[8]=f*o+h*l+d}(this,this,e),this.check()}transform(e,t){let n;switch(e.length){case 2:n=N.kK(t||[-0,-0],e,this);break;case 3:n=s.kK(t||[-0,-0,-0],e,this);break;case 4:n=(0,M._x)(t||[-0,-0,-0,-0],e,this);break;default:throw new Error("Illegal vector")}return(0,k.IL)(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 j,B;var Z=n(76624),z=n(22070),U=n(30373);let H;class V extends z.Z{static get ZERO(){return H||(H=new V(0,0,0,0),Object.freeze(H)),H}constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;super(-0,-0,-0,-0),(0,U.kJ)(e)&&1===arguments.length?this.copy(e):(U.vc.debug&&((0,k.u5)(e),(0,k.u5)(t),(0,k.u5)(n),(0,k.u5)(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 U.vc.debug&&((0,k.u5)(e.x),(0,k.u5)(e.y),(0,k.u5)(e.z),(0,k.u5)(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]=(0,k.u5)(e)}get w(){return this[3]}set w(e){this[3]=(0,k.u5)(e)}transform(e){return s.fF(this,this,e),this.check()}transformByMatrix3(e){return(0,M._x)(this,this,e),this.check()}transformByMatrix2(e){return(0,M.G7)(this,this,e),this.check()}transformByQuaternion(e){return s.VC(this,this,e),this.check()}applyMatrix4(e){return e.transform(this,this),this}}function W(){var e=new O.WT(4);return O.WT!=Float32Array&&(e[0]=0,e[1]=0,e[2]=0),e[3]=1,e}function G(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 K(e,t,n){var r=t[0],i=t[1],o=t[2],a=t[3],s=n[0],l=n[1],c=n[2],u=n[3];return e[0]=r*u+a*s+i*c-o*l,e[1]=i*u+a*l+o*s-r*c,e[2]=o*u+a*c+r*l-i*s,e[3]=a*u-r*s-i*l-o*c,e}function q(e,t,n,r){var i,o,a,s,l,c=t[0],u=t[1],d=t[2],f=t[3],h=n[0],p=n[1],g=n[2],m=n[3];return(o=c*h+u*p+d*g+f*m)<0&&(o=-o,h=-h,p=-p,g=-g,m=-m),1-o>O.Ib?(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*c+l*h,e[1]=s*u+l*p,e[2]=s*d+l*g,e[3]=s*f+l*m,e}function Y(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}l.d9,l.al,l.JG,l.t8;var X=l.IH,$=l.bA,Q=l.AK,J=l.t7,ee=l.kE,te=l.we,ne=l.Fv,re=(l.I6,l.fS,function(){var e=s.Ue(),t=s.al(1,0,0),n=s.al(0,1,0);return function(r,i,o){var a=s.AK(i,o);return a<-.999999?(s.kC(e,t,i),s.Zh(e)<1e-6&&s.kC(e,n,i),s.Fv(e,e),G(r,e,Math.PI),r):a>.999999?(r[0]=0,r[1]=0,r[2]=0,r[3]=1,r):(s.kC(e,i,o),r[0]=e[0],r[1]=e[1],r[2]=e[2],r[3]=1+a,ne(r,r))}}());(function(){var e=W(),t=W()})(),function(){var e=function(){var e=new O.WT(9);return O.WT!=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 ie=[0,0,0,1];class oe extends Z.Z{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]: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 Y(this,e),this.check()}fromAxisRotation(e,t){return G(this,e,t),this.check()}identity(){var e;return(e=this)[0]=0,e[1]=0,e[2]=0,e[3]=1,this.check()}setAxisAngle(e,t){return this.fromAxisRotation(e,t)}get ELEMENTS(){return 4}get x(){return this[0]}set x(e){this[0]=(0,k.u5)(e)}get y(){return this[1]}set y(e){this[1]=(0,k.u5)(e)}get z(){return this[2]}set z(e){this[2]=(0,k.u5)(e)}get w(){return this[3]}set w(e){this[3]=(0,k.u5)(e)}len(){return ee(this)}lengthSquared(){return te(this)}dot(e){return Q(this,e)}rotationTo(e,t){return re(this,e,t),this.check()}add(e){return X(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):(J(this,e,t,n),this.check())}multiplyRight(e){return K(this,this,e),this.check()}multiplyLeft(e){return K(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 $(this,this,e),this.check()}slerp(e,t,n){let r,i,o;switch(arguments.length){case 1:({start:r=ie,target:i,ratio:o}=e);break;case 2:r=this,i=e,o=t;break;default:r=e,i=t,o=n}return q(this,r,i,o),this.check()}transformVector4(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new V;return l.VC(t,e,this),(0,k.IL)(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 ae=new b.Z,se=new b.Z,le=new b.Z,ce=new b.Z,ue=new b.Z,de=new b.Z,fe=new b.Z,he=0,pe=1,ge=2,me=3,ve=4,Ae=5,ye=6,be=7,_e=8;class we{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[0,0,0],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[0,0,0,0,0,0,0,0,0];(0,r.Z)(this,"center",void 0),(0,r.Z)(this,"halfAxes",void 0),this.center=(new b.Z).from(e),this.halfAxes=new F(t)}get halfSize(){const e=this.halfAxes.getColumn(0),t=this.halfAxes.getColumn(1),n=this.halfAxes.getColumn(2);return[new b.Z(e).len(),new b.Z(t).len(),new b.Z(n).len()]}get quaternion(){const e=this.halfAxes.getColumn(0),t=this.halfAxes.getColumn(1),n=this.halfAxes.getColumn(2),r=new b.Z(e).normalize(),i=new b.Z(t).normalize(),o=new b.Z(n).normalize();return(new oe).fromMatrix3(new F([...r,...i,...o]))}fromCenterHalfSizeQuaternion(e,t,n){const r=new oe(n),i=(new F).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 b.Z).from(e),this.halfAxes=i,this}clone(){return new we(this.center,this.halfAxes)}equals(e){return this===e||Boolean(e)&&this.center.equals(e.center)&&this.halfAxes.equals(e.halfAxes)}getBoundingSphere(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new P;const t=this.halfAxes,n=t.getColumn(0,le),r=t.getColumn(1,ce),i=t.getColumn(2,ue),o=ae.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[he]+o*r[pe]+a*r[ge])+Math.abs(i*r[me]+o*r[ve]+a*r[Ae])+Math.abs(i*r[ye]+o*r[be]+a*r[_e]),l=n.dot(t)+e.distance;return l<=-s?v:l>=s?y:A}distanceTo(e){return Math.sqrt(this.distanceSquaredTo(e))}distanceSquaredTo(e){const t=se.from(e).subtract(this.center),n=this.halfAxes,r=n.getColumn(0,le),i=n.getColumn(1,ce),o=n.getColumn(2,ue),a=r.magnitude(),s=i.magnitude(),l=o.magnitude();r.normalize(),i.normalize(),o.normalize();let c,u=0;return c=Math.abs(t.dot(r))-a,c>0&&(u+=c*c),c=Math.abs(t.dot(i))-s,c>0&&(u+=c*c),c=Math.abs(t.dot(o))-l,c>0&&(u+=c*c),u}computePlaneDistances(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[-0,-0],r=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY;const o=this.center,a=this.halfAxes,s=a.getColumn(0,le),l=a.getColumn(1,ce),c=a.getColumn(2,ue),u=de.copy(s).add(l).add(c).add(o),d=fe.copy(u).subtract(e);let f=t.dot(d);return r=Math.min(f,r),i=Math.max(f,i),u.copy(o).add(s).add(l).subtract(c),d.copy(u).subtract(e),f=t.dot(d),r=Math.min(f,r),i=Math.max(f,i),u.copy(o).add(s).subtract(l).add(c),d.copy(u).subtract(e),f=t.dot(d),r=Math.min(f,r),i=Math.max(f,i),u.copy(o).add(s).subtract(l).subtract(c),d.copy(u).subtract(e),f=t.dot(d),r=Math.min(f,r),i=Math.max(f,i),o.copy(u).subtract(s).add(l).add(c),d.copy(u).subtract(e),f=t.dot(d),r=Math.min(f,r),i=Math.max(f,i),o.copy(u).subtract(s).add(l).subtract(c),d.copy(u).subtract(e),f=t.dot(d),r=Math.min(f,r),i=Math.max(f,i),o.copy(u).subtract(s).subtract(l).add(c),d.copy(u).subtract(e),f=t.dot(d),r=Math.min(f,r),i=Math.max(f,i),o.copy(u).subtract(s).subtract(l).subtract(c),d.copy(u).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,le);t.transformAsPoint(e);const n=this.halfAxes.getColumn(1,ce);n.transformAsPoint(e);const r=this.halfAxes.getColumn(2,ue);return r.transformAsPoint(e),this.halfAxes=new F([...t,...n,...r]),this}getTransform(){throw new Error("not implemented")}}var xe=n(83006);const Ee=new b.Z,Se=new b.Z;class Ce{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[0,0,1],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;(0,r.Z)(this,"normal",void 0),(0,r.Z)(this,"distance",void 0),this.normal=new b.Z,this.distance=-0,this.fromNormalDistance(e,t)}fromNormalDistance(e,t){return(0,xe.Z)(Number.isFinite(t)),this.normal.from(e).normalize(),this.distance=t,this}fromPointNormal(e,t){e=Ee.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),(0,xe.Z)((0,U.fS)(this.normal.len(),1)),this.distance=r,this}clone(){return new Ce(this.normal,this.distance)}equals(e){return(0,U.fS)(this.distance,e.distance)&&(0,U.fS)(this.normal,e.normal)}getPointDistance(e){return this.normal.dot(e)+this.distance}transform(e){const t=Se.copy(this.normal).transformAsVector(e).normalize(),n=this.normal.scale(-this.distance).transform(e);return this.fromPointNormal(n,t)}projectPointOntoPlane(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[0,0,0];e=Ee.from(e);const n=this.getPointDistance(e),r=Se.copy(this.normal).scale(n);return e.subtract(r).to(t)}}const Pe=[new b.Z([1,0,0]),new b.Z([0,1,0]),new b.Z([0,0,1])],Te=new b.Z,ke=new b.Z;new Ce(new b.Z(1,0,0),0);class Me{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];(0,r.Z)(this,"planes",void 0),this.planes=e}fromBoundingSphere(e){this.planes.length=2*Pe.length;const t=e.center,n=e.radius;let r=0;for(const i of Pe){let e=this.planes[r],o=this.planes[r+1];e||(e=this.planes[r]=new Ce),o||(o=this.planes[r+1]=new Ce);const a=Te.copy(i).scale(-n).add(t);i.dot(a);e.fromPointNormal(a,i);const s=Te.copy(i).scale(n).add(t),l=ke.copy(i).negate();l.dot(s);o.fromPointNormal(s,l),r+=2}return this}computeVisibility(e){let t=y;for(const n of this.planes){switch(e.intersectPlane(n)){case v:return v;case A:t=A}}return t}computeVisibilityWithPlaneMask(e,t){if((0,xe.Z)(Number.isFinite(t),"parentPlaneMask is required."),t===Me.MASK_OUTSIDE||t===Me.MASK_INSIDE)return t;let n=Me.MASK_INSIDE;const r=this.planes;for(let i=0;i1&&void 0!==arguments[1]?arguments[1]:{};const n=Oe.EPSILON20;let r=0,i=0;const o=Ie,a=Le;o.identity(),a.copy(e);const s=n*function(e){let t=0;for(let n=0;n<9;++n){const r=e[n];t+=r*r}return Math.sqrt(t)}(a);for(;i<10&&Ze(a)>s;)ze(a,Ne),De.copy(Ne).transpose(),a.multiplyRight(Ne),a.multiplyLeft(De),o.multiplyRight(Ne),++r>2&&(++i,r=0);return t.unitary=o.toTarget(t.unitary),t.diagonal=a.toTarget(t.diagonal),t}const je=[1,0,0],Be=[2,2,1];function Ze(e){let t=0;for(let n=0;n<3;++n){const r=e[Re.getElementIndex(Be[n],je[n])];t+=2*r*r}return Math.sqrt(t)}function ze(e,t){const n=Oe.EPSILON15;let r=0,i=1;for(let c=0;c<3;++c){const t=Math.abs(e[Re.getElementIndex(Be[c],je[c])]);t>r&&(i=c,r=t)}const o=je[i],a=Be[i];let s=1,l=0;if(Math.abs(e[Re.getElementIndex(a,o)])>n){const t=(e[Re.getElementIndex(a,a)]-e[Re.getElementIndex(o,o)])/2/e[Re.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 F.IDENTITY.to(t),t[Re.getElementIndex(o,o)]=t[Re.getElementIndex(a,a)]=s,t[Re.getElementIndex(a,o)]=l,t[Re.getElementIndex(o,a)]=-l,t}const Ue=new b.Z,He=new b.Z,Ve=new b.Z,We=new b.Z,Ge=new b.Z,Ke=new F,qe={diagonal:new F,unitary:new F};var Ye=n(1384);const Xe=512,$e=3,Qe=[[.5,.5],[0,0],[0,1],[1,0],[1,1]],Je=Qe.concat([[0,.5],[.5,0],[1,.5],[.5,1]]),et=Je.concat([[.25,.5],[.75,.5]]);class tt{constructor(e,t,n){(0,r.Z)(this,"x",void 0),(0,r.Z)(this,"y",void 0),(0,r.Z)(this,"z",void 0),(0,r.Z)(this,"childVisible",void 0),(0,r.Z)(this,"selected",void 0),(0,r.Z)(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 tt(e,t,n),new tt(e,t+1,n),new tt(e+1,t,n),new tt(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,c=this.getBoundingVolume(r,s,l);if(a&&!this.insideBounds(a))return!1;if(n.computeVisibility(c)<0)return!1;if(!this.childVisible){let{z:e}=this;if(e=i){const n=c.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 u of this.children)u.update(e);return!0}getSelected(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];if(this.selected&&e.push(this),this._children)for(const t of this._children)t.getSelected(e);return e}insideBounds(e){let[t,n,r,i]=e;const o=Math.pow(2,this.z),a=Xe/o;return this.x*at&&(this.y+1)*a>n}getBoundingVolume(e,t,n){if(n){const t=this.z<1?et:this.z<2?Je:Qe,r=[];for(const i of t){const t=ut(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 function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new we;if(!e||0===e.length)return t.halfAxes=new F([0,0,0,0,0,0,0,0,0]),t.center=new b.Z,t;const n=e.length,r=new b.Z(0,0,0);for(const b of e)r.add(b);const i=1/n;r.multiplyByScalar(i);let o=0,a=0,s=0,l=0,c=0,u=0;for(const b of e){const e=Ue.copy(b).subtract(r);o+=e.x*e.x,a+=e.x*e.y,s+=e.x*e.z,l+=e.y*e.y,c+=e.y*e.z,u+=e.z*e.z}o*=i,a*=i,s*=i,l*=i,c*=i,u*=i;const d=Ke;d[0]=o,d[1]=a,d[2]=s,d[3]=a,d[4]=l,d[5]=c,d[6]=s,d[7]=c,d[8]=u;const{unitary:f}=Fe(d,qe),h=t.halfAxes.copy(f);let p=h.getColumn(0,Ve),g=h.getColumn(1,We),m=h.getColumn(2,Ge),v=-Number.MAX_VALUE,A=-Number.MAX_VALUE,y=-Number.MAX_VALUE,_=Number.MAX_VALUE,w=Number.MAX_VALUE,x=Number.MAX_VALUE;for(const b of e)Ue.copy(b),v=Math.max(Ue.dot(p),v),A=Math.max(Ue.dot(g),A),y=Math.max(Ue.dot(m),y),_=Math.min(Ue.dot(p),_),w=Math.min(Ue.dot(g),w),x=Math.min(Ue.dot(m),x);p=p.multiplyByScalar(.5*(_+v)),g=g.multiplyByScalar(.5*(w+A)),m=m.multiplyByScalar(.5*(x+y)),t.center.copy(p).add(g).add(m);const E=He.set(v-_,A-w,y-x).multiplyByScalar(.5),S=new F([E[0],0,0,0,E[1],0,0,0,E[2]]);return t.halfAxes.multiplyRight(S),t}(r)}const r=Math.pow(2,this.z),i=Xe/r,o=this.x*i+t*Xe,a=Xe-(this.y+1)*i;return new x([o,a,e[0]],[o+i,a+i,e[1]])}}const nt=512,rt=[-1/0,-1/0,1/0,1/0],it={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 at(e,t){if(!e||!e.length)return null;const{index:n,id:r}=t;if(Array.isArray(e)){e=e[function(e){return Math.abs(e.split("").reduce(((e,t)=>(e<<5)-e+t.charCodeAt(0)|0),0))}(r)%e.length]}let i=e;for(const o of Object.keys(n)){const e=new RegExp("{".concat(o,"}"),"g");i=i.replace(e,String(n[o]))}return Number.isInteger(n.y)&&Number.isInteger(n.z)&&(i=i.replace(/\{-y\}/g,String(Math.pow(2,n.z)-n.y-1))),i}function st(e){let{viewport:t,z:n=0,cullRect:r}=e;return(t.subViewports||[t]).map((e=>lt(e,n,r)))}function lt(e,t,n){if(!Array.isArray(t)){const r=n.x-e.x,i=n.y-e.y,{width:o,height:a}=n,s={targetZ:t},l=e.unproject([r,i],s),c=e.unproject([r+o,i],s),u=e.unproject([r,i+a],s),d=e.unproject([r+o,i+a],s);return[Math.min(l[0],c[0],u[0],d[0]),Math.min(l[1],c[1],u[1],d[1]),Math.max(l[0],c[0],u[0],d[0]),Math.max(l[1],c[1],u[1],d[1])]}const r=lt(e,t[0],n),i=lt(e,t[1],n);return[Math.min(r[0],i[0]),Math.min(r[1],i[1]),Math.max(r[2],i[2]),Math.max(r[3],i[3])]}function ct(e,t){return Math.pow(2,e)*nt/t}function ut(e,t,n){const r=ct(n,nt),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 dt(e,t,n,r){const i=ct(n,r);return[e/i*nt,t/i*nt]}function ft(e,t,n,r){let i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:nt;if(e.isGeospatial){const[e,i]=ut(t,n,r),[o,a]=ut(t+1,n+1,r);return{west:e,north:i,east:o,south:a}}const[o,a]=dt(t,n,r,i),[s,l]=dt(t+1,n+1,r,i);return{left:o,top:a,right:s,bottom:l}}function ht(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=ct(t,n),[s,l,c,u]=function(e,t,n){if(n)return ot(e,n).map((e=>e*t/nt));return e.map((e=>e*t/nt))}(o,a,i),d=[];for(let f=Math.floor(s);fn&&(u=n);let d=o;return s&&l&&o&&!t.isGeospatial&&(d=ot(o,s)),t.isGeospatial?function(e,t,n,r){const i=e instanceof p&&e.resolution?e.projectPosition:null,o=Object.values(e.getFrustumPlanes()).map((e=>{let{normal:t,distance:n}=e;return new Ce(t.clone().negate(),n)})),a=new Me(o),s=e.distanceScales.unitsPerMeter[2],l=n&&n[0]*s||0,c=n&&n[1]*s||0,u=e instanceof m.Z&&e.pitch<=60?t:0;if(r){const[e,t,n,i]=r,o=(0,Ye.w5)([e,i]),a=(0,Ye.w5)([n,t]);r=[o[0],Xe-o[1],a[0],Xe-a[1]]}const d=new tt(0,0,0),f={viewport:e,project:i,cullingVolume:a,elevationBounds:[l,c],minZ:u,maxZ:t,bounds:r,offset:0};if(d.update(f),e instanceof m.Z&&e.subViewports&&e.subViewports.length>1){for(f.offset=-1;d.update(f)&&!(--f.offset<-$e););for(f.offset=1;d.update(f)&&!(++f.offset>$e););}return d.getSelected()}(t,u,i,o):ht(t,u,a,d||rt,l)}function gt(e){return/(?=.*{z})(?=.*{x})(?=.*({y}|{-y}))/.test(e)}function mt(e){return Number.isFinite(e.west)&&Number.isFinite(e.north)&&Number.isFinite(e.east)&&Number.isFinite(e.south)}},39723:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(68185),i=n(27469);class o extends i.Z{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)}}(0,r.Z)(o,"layerName","TripsLayer"),(0,r.Z)(o,"defaultProps",{fadeTrail:!0,trailLength:{type:"number",value:120,min:0},currentTime:{type:"number",value:0,min:0},getTimestamps:{type:"accessor",value:e=>e.timestamps}})},4105:(e,t,n)=>{"use strict";n.d(t,{Z:()=>f});var r=n(68185),i=n(53104),o=n(58521),a=n(79463),s=n(98029),l=n(44548),c=n(16621);const u=[0,0,0,255],d={getSourcePosition:{type:"accessor",value:e=>e.sourcePosition},getTargetPosition:{type:"accessor",value:e=>e.targetPosition},getSourceColor:{type:"accessor",value:u},getTargetColor:{type:"accessor",value:u},getWidth:{type:"accessor",value:1},getHeight:{type:"accessor",value:1},getTilt:{type:"accessor",value:0},greatCircle:!1,widthUnits:"pixels",widthScale:{type:"number",value:1,min:0},widthMinPixels:{type:"number",value:0,min:0},widthMaxPixels:{type:"number",value:Number.MAX_SAFE_INTEGER,min:0}};class f extends i.Z{constructor(){super(...arguments),(0,r.Z)(this,"state",void 0)}getBounds(){var e;return null===(e=this.getAttributeManager())||void 0===e?void 0:e.getBounds(["instanceSourcePositions","instanceTargetPositions"])}getShaders(){return super.getShaders({vs:"#define SHADER_NAME arc-layer-vertex-shader\n\nattribute vec3 positions;\nattribute vec4 instanceSourceColors;\nattribute vec4 instanceTargetColors;\nattribute vec3 instanceSourcePositions;\nattribute vec3 instanceSourcePositions64Low;\nattribute vec3 instanceTargetPositions;\nattribute vec3 instanceTargetPositions64Low;\nattribute vec3 instancePickingColors;\nattribute float instanceWidths;\nattribute float instanceHeights;\nattribute float instanceTilts;\n\nuniform bool greatCircle;\nuniform bool useShortestPath;\nuniform float numSegments;\nuniform float opacity;\nuniform float widthScale;\nuniform float widthMinPixels;\nuniform float widthMaxPixels;\nuniform int widthUnits;\n\nvarying vec4 vColor;\nvarying vec2 uv;\nvarying float isValid;\n\nfloat paraboloid(float distance, float sourceZ, float targetZ, float ratio) {\n\n float deltaZ = targetZ - sourceZ;\n float dh = distance * instanceHeights;\n if (dh == 0.0) {\n return sourceZ + deltaZ * ratio;\n }\n float unitZ = deltaZ / dh;\n float p2 = unitZ * unitZ + 1.0;\n float dir = step(deltaZ, 0.0);\n float z0 = mix(sourceZ, targetZ, dir);\n float r = mix(ratio, 1.0 - ratio, dir);\n return sqrt(r * (p2 - r)) * dh + z0;\n}\nvec2 getExtrusionOffset(vec2 line_clipspace, float offset_direction, float width) {\n vec2 dir_screenspace = normalize(line_clipspace * project_uViewportSize);\n dir_screenspace = vec2(-dir_screenspace.y, dir_screenspace.x);\n\n return dir_screenspace * offset_direction * width / 2.0;\n}\n\nfloat getSegmentRatio(float index) {\n return smoothstep(0.0, 1.0, index / (numSegments - 1.0));\n}\n\nvec3 interpolateFlat(vec3 source, vec3 target, float segmentRatio) {\n float distance = length(source.xy - target.xy);\n float z = paraboloid(distance, source.z, target.z, segmentRatio);\n\n float tiltAngle = radians(instanceTilts);\n vec2 tiltDirection = normalize(target.xy - source.xy);\n vec2 tilt = vec2(-tiltDirection.y, tiltDirection.x) * z * sin(tiltAngle);\n\n return vec3(\n mix(source.xy, target.xy, segmentRatio) + tilt,\n z * cos(tiltAngle)\n );\n}\nfloat getAngularDist (vec2 source, vec2 target) {\n vec2 sourceRadians = radians(source);\n vec2 targetRadians = radians(target);\n vec2 sin_half_delta = sin((sourceRadians - targetRadians) / 2.0);\n vec2 shd_sq = sin_half_delta * sin_half_delta;\n\n float a = shd_sq.y + cos(sourceRadians.y) * cos(targetRadians.y) * shd_sq.x;\n return 2.0 * asin(sqrt(a));\n}\n\nvec3 interpolateGreatCircle(vec3 source, vec3 target, vec3 source3D, vec3 target3D, float angularDist, float t) {\n vec2 lngLat;\n if(abs(angularDist - PI) < 0.001) {\n lngLat = (1.0 - t) * source.xy + t * target.xy;\n } else {\n float a = sin((1.0 - t) * angularDist);\n float b = sin(t * angularDist);\n vec3 p = source3D.yxz * a + target3D.yxz * b;\n lngLat = degrees(vec2(atan(p.y, -p.x), atan(p.z, length(p.xy))));\n }\n\n float z = paraboloid(angularDist * EARTH_RADIUS, source.z, target.z, t);\n\n return vec3(lngLat, z);\n}\n\nvoid main(void) {\n geometry.worldPosition = instanceSourcePositions;\n geometry.worldPositionAlt = instanceTargetPositions;\n\n float segmentIndex = positions.x;\n float segmentRatio = getSegmentRatio(segmentIndex);\n float prevSegmentRatio = getSegmentRatio(max(0.0, segmentIndex - 1.0));\n float nextSegmentRatio = getSegmentRatio(min(numSegments - 1.0, segmentIndex + 1.0));\n float indexDir = mix(-1.0, 1.0, step(segmentIndex, 0.0));\n isValid = 1.0;\n\n uv = vec2(segmentRatio, positions.y);\n geometry.uv = uv;\n geometry.pickingColor = instancePickingColors;\n\n vec4 curr;\n vec4 next;\n vec3 source;\n vec3 target;\n\n if ((greatCircle || project_uProjectionMode == PROJECTION_MODE_GLOBE) && project_uCoordinateSystem == COORDINATE_SYSTEM_LNGLAT) {\n source = project_globe_(vec3(instanceSourcePositions.xy, 0.0));\n target = project_globe_(vec3(instanceTargetPositions.xy, 0.0));\n float angularDist = getAngularDist(instanceSourcePositions.xy, instanceTargetPositions.xy);\n\n vec3 prevPos = interpolateGreatCircle(instanceSourcePositions, instanceTargetPositions, source, target, angularDist, prevSegmentRatio);\n vec3 currPos = interpolateGreatCircle(instanceSourcePositions, instanceTargetPositions, source, target, angularDist, segmentRatio);\n vec3 nextPos = interpolateGreatCircle(instanceSourcePositions, instanceTargetPositions, source, target, angularDist, nextSegmentRatio);\n\n if (abs(currPos.x - prevPos.x) > 180.0) {\n indexDir = -1.0;\n isValid = 0.0;\n } else if (abs(currPos.x - nextPos.x) > 180.0) {\n indexDir = 1.0;\n isValid = 0.0;\n }\n nextPos = indexDir < 0.0 ? prevPos : nextPos;\n nextSegmentRatio = indexDir < 0.0 ? prevSegmentRatio : nextSegmentRatio;\n\n if (isValid == 0.0) {\n nextPos.x += nextPos.x > 0.0 ? -360.0 : 360.0;\n float t = ((currPos.x > 0.0 ? 180.0 : -180.0) - currPos.x) / (nextPos.x - currPos.x);\n currPos = mix(currPos, nextPos, t);\n segmentRatio = mix(segmentRatio, nextSegmentRatio, t);\n }\n\n vec3 currPos64Low = mix(instanceSourcePositions64Low, instanceTargetPositions64Low, segmentRatio);\n vec3 nextPos64Low = mix(instanceSourcePositions64Low, instanceTargetPositions64Low, nextSegmentRatio);\n \n curr = project_position_to_clipspace(currPos, currPos64Low, vec3(0.0), geometry.position);\n next = project_position_to_clipspace(nextPos, nextPos64Low, vec3(0.0));\n \n } else {\n vec3 source_world = instanceSourcePositions;\n vec3 target_world = instanceTargetPositions;\n if (useShortestPath) {\n source_world.x = mod(source_world.x + 180., 360.0) - 180.;\n target_world.x = mod(target_world.x + 180., 360.0) - 180.;\n\n float deltaLng = target_world.x - source_world.x;\n if (deltaLng > 180.) target_world.x -= 360.;\n if (deltaLng < -180.) source_world.x -= 360.;\n }\n source = project_position(source_world, instanceSourcePositions64Low);\n target = project_position(target_world, instanceTargetPositions64Low);\n float antiMeridianX = 0.0;\n\n if (useShortestPath) {\n if (project_uProjectionMode == PROJECTION_MODE_WEB_MERCATOR_AUTO_OFFSET) {\n antiMeridianX = -(project_uCoordinateOrigin.x + 180.) / 360. * TILE_SIZE;\n }\n float thresholdRatio = (antiMeridianX - source.x) / (target.x - source.x);\n\n if (prevSegmentRatio <= thresholdRatio && nextSegmentRatio > thresholdRatio) {\n isValid = 0.0;\n indexDir = sign(segmentRatio - thresholdRatio);\n segmentRatio = thresholdRatio;\n }\n }\n\n nextSegmentRatio = indexDir < 0.0 ? prevSegmentRatio : nextSegmentRatio;\n vec3 currPos = interpolateFlat(source, target, segmentRatio);\n vec3 nextPos = interpolateFlat(source, target, nextSegmentRatio);\n\n if (useShortestPath) {\n if (nextPos.x < antiMeridianX) {\n currPos.x += TILE_SIZE;\n nextPos.x += TILE_SIZE;\n }\n }\n\n curr = project_common_position_to_clipspace(vec4(currPos, 1.0));\n next = project_common_position_to_clipspace(vec4(nextPos, 1.0));\n geometry.position = vec4(currPos, 1.0);\n }\n float widthPixels = clamp(\n project_size_to_pixel(instanceWidths * widthScale, widthUnits),\n widthMinPixels, widthMaxPixels\n );\n vec3 offset = vec3(\n getExtrusionOffset((next.xy - curr.xy) * indexDir, positions.y, widthPixels),\n 0.0);\n DECKGL_FILTER_SIZE(offset, geometry);\n DECKGL_FILTER_GL_POSITION(curr, geometry);\n gl_Position = curr + vec4(project_pixel_size_to_clipspace(offset.xy), 0.0, 0.0);\n\n vec4 color = mix(instanceSourceColors, instanceTargetColors, segmentRatio);\n vColor = vec4(color.rgb, color.a * opacity);\n DECKGL_FILTER_COLOR(vColor, geometry);\n}\n",fs:"#define SHADER_NAME arc-layer-fragment-shader\n\nprecision highp float;\n\nvarying vec4 vColor;\nvarying vec2 uv;\nvarying float isValid;\n\nvoid main(void) {\n if (isValid == 0.0) {\n discard;\n }\n\n gl_FragColor = vColor;\n geometry.uv = uv;\n\n DECKGL_FILTER_COLOR(gl_FragColor, geometry);\n}\n",modules:[o.Z,a.Z]})}get wrapLongitude(){return!1}initializeState(){this.getAttributeManager().addInstanced({instanceSourcePositions:{size:3,type:5130,fp64:this.use64bitPositions(),transition:!0,accessor:"getSourcePosition"},instanceTargetPositions:{size:3,type:5130,fp64:this.use64bitPositions(),transition:!0,accessor:"getTargetPosition"},instanceSourceColors:{size:this.props.colorFormat.length,type:5121,normalized:!0,transition:!0,accessor:"getSourceColor",defaultValue:u},instanceTargetColors:{size:this.props.colorFormat.length,type:5121,normalized:!0,transition:!0,accessor:"getTargetColor",defaultValue:u},instanceWidths:{size:1,transition:!0,accessor:"getWidth",defaultValue:1},instanceHeights:{size:1,transition:!0,accessor:"getHeight",defaultValue:1},instanceTilts:{size:1,transition:!0,accessor:"getTilt",defaultValue:0}})}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(e){let{uniforms:t}=e;const{widthUnits:n,widthScale:r,widthMinPixels:i,widthMaxPixels:o,greatCircle:a,wrapLongitude:l}=this.props;this.state.model.setUniforms(t).setUniforms({greatCircle:a,widthUnits:s.iI[n],widthScale:r,widthMinPixels:i,widthMaxPixels:o,useShortestPath:l}).draw()}_getModel(e){let t=[];for(let r=0;r<50;r++)t=t.concat([r,1,0,r,-1,0]);const n=new l.Z(e,{...this.getShaders(),id:this.props.id,geometry:new c.Z({drawMode:5,attributes:{positions:new Float32Array(t)}}),isInstanced:!0});return n.setUniforms({numSegments:50}),n}}(0,r.Z)(f,"layerName","ArcLayer"),(0,r.Z)(f,"defaultProps",d)},13091:(e,t,n)=>{"use strict";n.d(t,{Z:()=>b});var r=n(68185),i=n(53104),o=n(58521),a=n(48424),s=n(79463),l=n(98029),c=n(76195),u=n(6509),d=n(87966),f=n(44548),h=n(65148),p=n(16621),g=n(39042),m=n(8766);class v extends p.Z{constructor(e){const{id:t=(0,g.hQ)("column-geometry")}=e,{indices:n,attributes:r}=function(e){const{radius:t,height:n=1,nradial:r=10}=e;let{vertices:i}=e;i&&(h.Z.assert(i.length>=r),i=i.flatMap((e=>[e[0],e[1]])),(0,m.modifyPolygonWindingDirection)(i,m.WINDING.COUNTER_CLOCKWISE));const o=n>0,a=r+1,s=o?3*a+1:r,l=2*Math.PI/r,c=new Uint16Array(o?3*r*2:0),u=new Float32Array(3*s),d=new Float32Array(3*s);let f=0;if(o){for(let e=0;ee.position},getFillColor:{type:"accessor",value:A},getLineColor:{type:"accessor",value:A},getLineWidth:{type:"accessor",value:1},getElevation:{type:"accessor",value:1e3},material:!0,getColor:{deprecatedFor:["getFillColor","getLineColor"]}};class b extends i.Z{getShaders(){const{gl:e}=this.context,t=!(0,c.D0)(e),n={},r=this.props.flatShading&&(0,u.U6)(e,d.h.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.Z,r?a.s:a.N,s.Z]})}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:A},instanceLineColors:{size:this.props.colorFormat.length,type:5121,normalized:!0,transition:!0,accessor:"getLineColor",defaultValue:A},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 v({radius:1,height:n?2:0,vertices:t,nradial:e});let i=0;if(t)for(let o=0;o{"use strict";n.d(t,{Z:()=>E});var r=n(68185),i=n(32603),o=n(63962);var a=n(90286),s=n(99259),l=n(34929),c=n(27469),u=n(816);const d={circle:{type:s.Z,props:{filled:"filled",stroked:"stroked",lineWidthMaxPixels:"lineWidthMaxPixels",lineWidthMinPixels:"lineWidthMinPixels",lineWidthScale:"lineWidthScale",lineWidthUnits:"lineWidthUnits",pointRadiusMaxPixels:"radiusMaxPixels",pointRadiusMinPixels:"radiusMinPixels",pointRadiusScale:"radiusScale",pointRadiusUnits:"radiusUnits",pointAntialiasing:"antialiasing",pointBillboard:"billboard",getFillColor:"getFillColor",getLineColor:"getLineColor",getLineWidth:"getLineWidth",getPointRadius:"getRadius"}},icon:{type:a.Z,props:{iconAtlas:"iconAtlas",iconMapping:"iconMapping",iconSizeMaxPixels:"sizeMaxPixels",iconSizeMinPixels:"sizeMinPixels",iconSizeScale:"sizeScale",iconSizeUnits:"sizeUnits",iconAlphaCutoff:"alphaCutoff",iconBillboard:"billboard",getIcon:"getIcon",getIconAngle:"getAngle",getIconColor:"getColor",getIconPixelOffset:"getPixelOffset",getIconSize:"getSize"}},text:{type:l.Z,props:{textSizeMaxPixels:"sizeMaxPixels",textSizeMinPixels:"sizeMinPixels",textSizeScale:"sizeScale",textSizeUnits:"sizeUnits",textBackground:"background",textBackgroundPadding:"backgroundPadding",textFontFamily:"fontFamily",textFontWeight:"fontWeight",textLineHeight:"lineHeight",textMaxWidth:"maxWidth",textOutlineColor:"outlineColor",textOutlineWidth:"outlineWidth",textWordBreak:"wordBreak",textCharacterSet:"characterSet",textBillboard:"billboard",textFontSettings:"fontSettings",getText:"getText",getTextAngle:"getAngle",getTextColor:"getColor",getTextPixelOffset:"getPixelOffset",getTextSize:"getSize",getTextAnchor:"getTextAnchor",getTextAlignmentBaseline:"getAlignmentBaseline",getTextBackgroundColor:"getBackgroundColor",getTextBorderColor:"getBorderColor",getTextBorderWidth:"getBorderWidth"}}},f={type:c.Z,props:{lineWidthUnits:"widthUnits",lineWidthScale:"widthScale",lineWidthMinPixels:"widthMinPixels",lineWidthMaxPixels:"widthMaxPixels",lineJointRounded:"jointRounded",lineCapRounded:"capRounded",lineMiterLimit:"miterLimit",lineBillboard:"billboard",getLineColor:"getColor",getLineWidth:"getWidth"}},h={type:u.Z,props:{extruded:"extruded",filled:"filled",wireframe:"wireframe",elevationScale:"elevationScale",material:"material",_full3d:"_full3d",getElevation:"getElevation",getFillColor:"getFillColor",getLineColor:"getLineColor"}};function p(e){let{type:t,props:n}=e;const r={};for(const i in n)r[i]=t.defaultProps[n[i]];return r}function g(e,t){const{transitions:n,updateTriggers:r}=e.props,i={updateTriggers:{},transitions:n&&{getPosition:n.geometry}};for(const o in t){const a=t[o];let s=e.props[o];o.startsWith("get")&&(s=e.getSubLayerAccessor(s),i.updateTriggers[a]=r[o],n&&(i.transitions[a]=n[o])),i[a]=s}return i}var m=n(65148);function v(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r={pointFeatures:[],lineFeatures:[],polygonFeatures:[],polygonOutlineFeatures:[]},{startRow:i=0,endRow:o=e.length}=n;for(let a=i;a0;)t=t[0];return t&&Number.isFinite(t[0])}(o,a))switch(o){case"Point":s.push(n({geometry:e},r,i));break;case"MultiPoint":a.forEach((e=>{s.push(n({geometry:{type:"Point",coordinates:e}},r,i))}));break;case"LineString":l.push(n({geometry:e},r,i));break;case"MultiLineString":a.forEach((e=>{l.push(n({geometry:{type:"LineString",coordinates:e}},r,i))}));break;case"Polygon":c.push(n({geometry:e},r,i)),a.forEach((e=>{u.push(n({geometry:{type:"LineString",coordinates:e}},r,i))}));break;case"MultiPolygon":a.forEach((e=>{c.push(n({geometry:{type:"Polygon",coordinates:e}},r,i)),e.forEach((e=>{u.push(n({geometry:{type:"LineString",coordinates:e}},r,i))}))}))}else m.Z.warn("".concat(o," coordinates are malformed"))()}const y={Point:1,MultiPoint:2,LineString:2,MultiLineString:3,Polygon:3,MultiPolygon:4};function b(e){return e.geometry.coordinates}function _(e,t){const n={points:{},lines:{},polygons:{},polygonsOutline:{}},{points:r,lines:i,polygons:o}=e,a=function(e,t){const n={points:null,lines:null,polygons:null};for(const r in n){const i=e[r].globalFeatureIds.value;n[r]=new Uint8ClampedArray(3*i.length);const o=[];for(let e=0;ee.properties.icon},getText:{type:"accessor",value:e=>e.properties.text},pointType:"circle",getRadius:{deprecatedFor:"getPointRadius"}};class E extends i.Z{initializeState(){this.state={layerProps:{},features:{}}}updateState(e){let{props:t,changeFlags:n}=e;if(!n.dataChanged)return;const{data:r}=this.props,i=r&&"points"in r&&"polygons"in r&&"lines"in r;this.setState({binary:i}),i?this._updateStateBinary({props:t,changeFlags:n}):this._updateStateJSON({props:t,changeFlags:n})}_updateStateBinary(e){let{props:t,changeFlags:n}=e;const r=_(t.data,this.encodePickingColor);this.setState({layerProps:r})}_updateStateJSON(e){let{props:t,changeFlags:n}=e;const r=function(e){if(Array.isArray(e))return e;switch(m.Z.assert(e.type,"GeoJSON does not have type"),e.type){case"Feature":return[e];case"FeatureCollection":return m.Z.assert(Array.isArray(e.features),"GeoJSON does not have features array"),e.features;default:return[{geometry:e}]}}(t.data),i=this.getSubLayerRow.bind(this);let a={};const s={};if(Array.isArray(n.dataChanged)){const e=this.state.features;for(const t in e)a[t]=e[t].slice(),s[t]=[];for(const t of n.dataChanged){const n=v(r,i,t);for(const r in e)s[r].push((0,o.b)({data:a[r],getIndex:e=>e.__source.index,dataRange:t,replace:n[r]}))}}else a=v(r,i);const l=function(e,t){const n={points:{},lines:{},polygons:{},polygonsOutline:{}},{pointFeatures:r,lineFeatures:i,polygonFeatures:o,polygonOutlineFeatures:a}=e;return n.points.data=r,n.points._dataDiff=t.pointFeatures&&(()=>t.pointFeatures),n.points.getPosition=b,n.lines.data=i,n.lines._dataDiff=t.lineFeatures&&(()=>t.lineFeatures),n.lines.getPath=b,n.polygons.data=o,n.polygons._dataDiff=t.polygonFeatures&&(()=>t.polygonFeatures),n.polygons.getPolygon=b,n.polygonsOutline.data=a,n.polygonsOutline._dataDiff=t.polygonOutlineFeatures&&(()=>t.polygonOutlineFeatures),n.polygonsOutline.getPath=b,n}(a,s);this.setState({features:a,featuresDiff:s,layerProps:l})}getPickingInfo(e){const t=super.getPickingInfo(e),{index:n,sourceLayer:r}=t;return t.featureType=w.find((e=>r.id.startsWith("".concat(this.id,"-").concat(e,"-")))),n>=0&&r.id.startsWith("".concat(this.id,"-points-text"))&&this.state.binary&&(t.index=this.props.data.points.globalFeatureIds.value[n]),t}_updateAutoHighlight(e){const t="".concat(this.id,"-points-"),n="points"===e.featureType;for(const r of this.getSubLayers())r.id.startsWith(t)===n&&r.updateAutoHighlight(e)}_renderPolygonLayer(){const{extruded:e,wireframe:t}=this.props,{layerProps:n}=this.state,r="polygons-fill",i=this.shouldRenderSubLayer(r,n.polygons.data)&&this.getSubLayerClass(r,h.type);if(i){const o=g(this,h.props),a=e&&t;return a||delete o.getLineColor,o.updateTriggers.lineColors=a,new i(o,this.getSubLayerProps({id:r,updateTriggers:o.updateTriggers}),n.polygons)}return null}_renderLineLayers(){const{extruded:e,stroked:t}=this.props,{layerProps:n}=this.state,r="polygons-stroke",i="linestrings",o=!e&&t&&this.shouldRenderSubLayer(r,n.polygonsOutline.data)&&this.getSubLayerClass(r,f.type),a=this.shouldRenderSubLayer(i,n.lines.data)&&this.getSubLayerClass(i,f.type);if(o||a){const e=g(this,f.props);return[o&&new o(e,this.getSubLayerProps({id:r,updateTriggers:e.updateTriggers}),n.polygonsOutline),a&&new a(e,this.getSubLayerProps({id:i,updateTriggers:e.updateTriggers}),n.lines)]}return null}_renderPointLayers(){const{pointType:e}=this.props,{layerProps:t,binary:n}=this.state;let{highlightedObjectIndex:r}=this.props;!n&&Number.isFinite(r)&&(r=t.points.data.findIndex((e=>e.__source.index===r)));const i=new Set(e.split("+")),o=[];for(const a of i){const e="points-".concat(a),i=d[a],s=i&&this.shouldRenderSubLayer(e,t.points.data)&&this.getSubLayerClass(e,i.type);if(s){const l=g(this,i.props);let c=t.points;if("text"===a&&n){const{instancePickingColors:e,...t}=c.data.attributes;c={...c,data:{...c.data,attributes:t}}}o.push(new s(l,this.getSubLayerProps({id:e,updateTriggers:l.updateTriggers,highlightedObjectIndex:r}),c))}}return o}renderLayers(){const{extruded:e}=this.props,t=this._renderPolygonLayer();return[!e&&t,this._renderLineLayers(),this._renderPointLayers(),e&&t]}getSubLayerAccessor(e){const{binary:t}=this.state;return t&&"function"===typeof e?(t,n)=>{const{data:r,index:i}=n,o=function(e,t){if(!e)return null;const n="startIndices"in e?e.startIndices[t]:t,r=e.featureIds.value[n];return-1!==n?function(e,t,n){const r={properties:{...e.properties[t]}};for(const i in e.numericProps)r.properties[i]=e.numericProps[i].value[n];return r}(e,r,n):null}(r,i);return e(o,n)}:super.getSubLayerAccessor(e)}}(0,r.Z)(E,"layerName","GeoJsonLayer"),(0,r.Z)(E,"defaultProps",x)},90286:(e,t,n)=>{"use strict";n.d(t,{Z:()=>E});var r=n(68185),i=n(53104),o=n(58521),a=n(79463),s=n(98029),l=n(65148),c=n(44548),u=n(16621);var d=n(81786),f=n(77378),h=n(63734),p=n(39179);const g=()=>{},m={10241:9987,10240:9729,10242:33071,10243:33071};function v(e){return Math.pow(2,Math.ceil(Math.log2(e)))}function A(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 b(e,t,n){for(let r=0;r0){const{mapping:e,xOffset:t,yOffset:r,rowHeight:i,canvasHeight:o}=function(e){let{icons:t,buffer:n,mapping:r={},xOffset:i=0,yOffset:o=0,rowHeight:a=0,canvasWidth:s}=e,l=[];for(let c=0;cs&&(b(r,l,o),i=0,o=a+o+n,a=0,l=[]),l.push({icon:e,xOffset:i}),i=i+c+n,a=Math.max(a,t)}}return l.length>0&&b(r,l,o),{mapping:r,rowHeight:a,xOffset:i,yOffset:o,canvasWidth:s,canvasHeight:v(a+o+n)}}({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.Z(this.gl,{width:this._canvasWidth,height:this._canvasHeight,parameters:this._textureParameters||m})),this._texture.height!==this._canvasHeight&&(this._texture=function(e,t,n,r){const i=e.width,o=e.height,a=new d.Z(e.gl,{width:t,height:n,parameters:r});return(0,f.Lv)(e,a,{targetY:0,width:i,height:o}),e.delete(),a}(this._texture,this._canvasWidth,this._canvasHeight,this._textureParameters||m)),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++,(0,h.z)(n.url,this._loadOptions).then((e=>{const r=y(n),i=this._mapping[r],{x:o,y:a,width:s,height:l}=i,{data:c,width:u,height:d}=A(t,e,s,l);this._texture.setSubImageData({data:c,x:o+(s-u)/2,y:a+(l-d)/2,width:u,height:d}),i.width=u,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 w=[0,0,0,255],x={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:w},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 E extends i.Z{constructor(){super(...arguments),(0,r.Z)(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.Z,a.Z]})}initializeState(){this.state={iconManager:new _(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:w},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:c}=t,{iconManager:u}=this.state,d=o||this.internalState.isAsyncPropLoading("iconAtlas");if(u.setProps({loadOptions:t.loadOptions,autoPacking:!d,iconAtlas:o,iconMapping:d?a:null,textureParameters:c}),d?n.iconMapping!==t.iconMapping&&i.invalidate("getIcon"):(r.dataChanged||r.updateTriggersChanged&&(r.updateTriggersChanged.all||r.updateTriggersChanged.getIcon))&&u.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(e){let{uniforms:t}=e;const{sizeScale:n,sizeMinPixels:r,sizeMaxPixels:i,sizeUnits:o,billboard:a,alphaCutoff:l}=this.props,{iconManager:c}=this.state,u=c.getTexture();u&&this.state.model.setUniforms(t).setUniforms({iconsTexture:u,iconsTextureDim:[u.width,u.height],sizeUnits:s.iI[o],sizeScale:n,sizeMinPixels:r,sizeMaxPixels:i,billboard:a,alphaCutoff:l}).draw()}_getModel(e){return new c.Z(e,{...this.getShaders(),id:this.props.id,geometry:new u.Z({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.Z.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]}}(0,r.Z)(E,"defaultProps",x),(0,r.Z)(E,"layerName","IconLayer")},39986:(e,t,n)=>{"use strict";n.d(t,{Z:()=>d});var r=n(68185),i=n(53104),o=n(58521),a=n(79463),s=n(98029),l=n(44548),c=n(16621);const u={getSourcePosition:{type:"accessor",value:e=>e.sourcePosition},getTargetPosition:{type:"accessor",value:e=>e.targetPosition},getColor:{type:"accessor",value:[0,0,0,255]},getWidth:{type:"accessor",value:1},widthUnits:"pixels",widthScale:{type:"number",value:1,min:0},widthMinPixels:{type:"number",value:0,min:0},widthMaxPixels:{type:"number",value:Number.MAX_SAFE_INTEGER,min:0}};class d extends i.Z{getBounds(){var e;return null===(e=this.getAttributeManager())||void 0===e?void 0:e.getBounds(["instanceSourcePositions","instanceTargetPositions"])}getShaders(){return super.getShaders({vs:"#define SHADER_NAME line-layer-vertex-shader\n\nattribute vec3 positions;\nattribute vec3 instanceSourcePositions;\nattribute vec3 instanceTargetPositions;\nattribute vec3 instanceSourcePositions64Low;\nattribute vec3 instanceTargetPositions64Low;\nattribute vec4 instanceColors;\nattribute vec3 instancePickingColors;\nattribute float instanceWidths;\n\nuniform float opacity;\nuniform float widthScale;\nuniform float widthMinPixels;\nuniform float widthMaxPixels;\nuniform float useShortestPath;\nuniform int widthUnits;\n\nvarying vec4 vColor;\nvarying vec2 uv;\nvec2 getExtrusionOffset(vec2 line_clipspace, float offset_direction, float width) {\n vec2 dir_screenspace = normalize(line_clipspace * project_uViewportSize);\n dir_screenspace = vec2(-dir_screenspace.y, dir_screenspace.x);\n\n return dir_screenspace * offset_direction * width / 2.0;\n}\n\nvec3 splitLine(vec3 a, vec3 b, float x) {\n float t = (x - a.x) / (b.x - a.x);\n return vec3(x, mix(a.yz, b.yz, t));\n}\n\nvoid main(void) {\n geometry.worldPosition = instanceSourcePositions;\n geometry.worldPositionAlt = instanceTargetPositions;\n\n vec3 source_world = instanceSourcePositions;\n vec3 target_world = instanceTargetPositions;\n vec3 source_world_64low = instanceSourcePositions64Low;\n vec3 target_world_64low = instanceTargetPositions64Low;\n\n if (useShortestPath > 0.5 || useShortestPath < -0.5) {\n source_world.x = mod(source_world.x + 180., 360.0) - 180.;\n target_world.x = mod(target_world.x + 180., 360.0) - 180.;\n float deltaLng = target_world.x - source_world.x;\n\n if (deltaLng * useShortestPath > 180.) {\n source_world.x += 360. * useShortestPath;\n source_world = splitLine(source_world, target_world, 180. * useShortestPath);\n source_world_64low = vec3(0.0);\n } else if (deltaLng * useShortestPath < -180.) {\n target_world.x += 360. * useShortestPath;\n target_world = splitLine(source_world, target_world, 180. * useShortestPath);\n target_world_64low = vec3(0.0);\n } else if (useShortestPath < 0.) {\n gl_Position = vec4(0.);\n return;\n }\n }\n vec4 source_commonspace;\n vec4 target_commonspace;\n vec4 source = project_position_to_clipspace(source_world, source_world_64low, vec3(0.), source_commonspace);\n vec4 target = project_position_to_clipspace(target_world, target_world_64low, vec3(0.), target_commonspace);\n float segmentIndex = positions.x;\n vec4 p = mix(source, target, segmentIndex);\n geometry.position = mix(source_commonspace, target_commonspace, segmentIndex);\n uv = positions.xy;\n geometry.uv = uv;\n geometry.pickingColor = instancePickingColors;\n float widthPixels = clamp(\n project_size_to_pixel(instanceWidths * widthScale, widthUnits),\n widthMinPixels, widthMaxPixels\n );\n vec3 offset = vec3(\n getExtrusionOffset(target.xy - source.xy, positions.y, widthPixels),\n 0.0);\n DECKGL_FILTER_SIZE(offset, geometry);\n DECKGL_FILTER_GL_POSITION(p, geometry);\n gl_Position = p + vec4(project_pixel_size_to_clipspace(offset.xy), 0.0, 0.0);\n vColor = vec4(instanceColors.rgb, instanceColors.a * opacity);\n DECKGL_FILTER_COLOR(vColor, geometry);\n}\n",fs:"#define SHADER_NAME line-layer-fragment-shader\n\nprecision highp float;\n\nvarying vec4 vColor;\nvarying vec2 uv;\n\nvoid main(void) {\n geometry.uv = uv;\n\n gl_FragColor = vColor;\n\n DECKGL_FILTER_COLOR(gl_FragColor, geometry);\n}\n",modules:[o.Z,a.Z]})}get wrapLongitude(){return!1}initializeState(){this.getAttributeManager().addInstanced({instanceSourcePositions:{size:3,type:5130,fp64:this.use64bitPositions(),transition:!0,accessor:"getSourcePosition"},instanceTargetPositions:{size:3,type:5130,fp64:this.use64bitPositions(),transition:!0,accessor:"getTargetPosition"},instanceColors:{size:this.props.colorFormat.length,type:5121,normalized:!0,transition:!0,accessor:"getColor",defaultValue:[0,0,0,255]},instanceWidths:{size:1,transition:!0,accessor:"getWidth",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(e){let{uniforms:t}=e;const{widthUnits:n,widthScale:r,widthMinPixels:i,widthMaxPixels:o,wrapLongitude:a}=this.props;this.state.model.setUniforms(t).setUniforms({widthUnits:s.iI[n],widthScale:r,widthMinPixels:i,widthMaxPixels:o,useShortestPath:a?1:0}).draw(),a&&this.state.model.setUniforms({useShortestPath:-1}).draw()}_getModel(e){return new l.Z(e,{...this.getShaders(),id:this.props.id,geometry:new c.Z({drawMode:5,attributes:{positions:new Float32Array([0,-1,0,0,1,0,1,-1,0,1,1,0])}}),isInstanced:!0})}}(0,r.Z)(d,"layerName","LineLayer"),(0,r.Z)(d,"defaultProps",u)},27469:(e,t,n)=>{"use strict";n.d(t,{Z:()=>v});var r=n(68185),i=n(53104),o=n(58521),a=n(79463),s=n(98029),l=n(44548),c=n(16621),u=n(3943),d=n(8766);class f extends u.Z{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 r=0;r2&&void 0!==arguments[2]?arguments[2]:[];const{positionSize:r}=this;t*r>=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],g={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"]}},m={enter:(e,t)=>t.length?t.subarray(t.length-e.length):e};class v extends i.Z{constructor(){super(...arguments),(0,r.Z)(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.Z,a.Z]})}get wrapLongitude(){return!1}initializeState(){this.getAttributeManager().addInstanced({positions:{size:3,vertexOffset:1,type:5130,fp64:this.use64bitPositions(),transition:m,accessor:"getPath",update:this.calculatePositions,noAlloc:true,shaderAttributes:{instanceLeftPositions:{vertexOffset:0},instanceStartPositions:{vertexOffset:1},instanceEndPositions:{vertexOffset:2},instanceRightPositions:{vertexOffset:3}}},instanceTypes:{size:1,type:5121,update:this.calculateSegmentTypes,noAlloc:true},instanceStrokeWidths:{size:1,accessor:"getWidth",transition:m,defaultValue:1},instanceColors:{size:this.props.colorFormat.length,type:5121,normalized:!0,accessor:"getColor",transition:m,defaultValue:p},instancePickingColors:{size:3,type:5121,accessor:(e,t)=>{let{index:n,target:r}=t;return this.encodePickingColor(e&&e.__source?e.__source.index:n,r)}}}),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{"use strict";n.d(t,{Z:()=>h});var r=n(68185),i=n(32603),o=n(65148),a=n(39179),s=n(816),l=n(27469),c=n(66784),u=n(63962);const d=[0,0,0,255],f={stroked:!0,filled:!0,extruded:!1,elevationScale:1,wireframe:!1,_normalize:!0,_windingOrder:"CW",lineWidthUnits:"meters",lineWidthScale:1,lineWidthMinPixels:0,lineWidthMaxPixels:Number.MAX_SAFE_INTEGER,lineJointRounded:!1,lineMiterLimit:4,getPolygon:{type:"accessor",value:e=>e.polygon},getFillColor:{type:"accessor",value:[0,0,0,255]},getLineColor:{type:"accessor",value:d},getLineWidth:{type:"accessor",value:1},getElevation:{type:"accessor",value:1e3},material:!0};class h extends i.Z{initializeState(){this.state={paths:[]},this.props.getLineDashArray&&o.Z.removed("getLineDashArray","PathStyleExtension")()}updateState(e){let{changeFlags:t}=e;const n=t.dataChanged||t.updateTriggersChanged&&(t.updateTriggersChanged.all||t.updateTriggersChanged.getPolygon);if(n&&Array.isArray(t.dataChanged)){const e=this.state.paths.slice(),n=t.dataChanged.map((t=>(0,u.b)({data:e,getIndex:e=>e.__source.index,dataRange:t,replace:this._getPaths(t)})));this.setState({paths:e,pathsDiff:n})}else n&&this.setState({paths:this._getPaths(),pathsDiff:null})}_getPaths(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{data:t,getPolygon:n,positionFormat:r,_normalize:i}=this.props,o=[],s="XY"===r?2:3,{startRow:l,endRow:u}=e,{iterable:d,objectInfo:f}=(0,a.jB)(t,l,u);for(const a of d){f.index++;let e=n(a,f);i&&(e=c.Fv(e,s));const{holeIndices:t}=e,r=e.positions||e;if(t)for(let n=0;n<=t.length;n++){const e=r.slice(t[n-1]||0,t[n]||r.length);o.push(this.getSubLayerRow({path:e},a,f.index))}else o.push(this.getSubLayerRow({path:r},a,f.index))}return o}renderLayers(){const{data:e,_dataDiff:t,stroked:n,filled:r,extruded:i,wireframe:o,_normalize:a,_windingOrder:c,elevationScale:u,transitions:f,positionFormat:h}=this.props,{lineWidthUnits:p,lineWidthScale:g,lineWidthMinPixels:m,lineWidthMaxPixels:v,lineJointRounded:A,lineMiterLimit:y,lineDashJustified:b}=this.props,{getFillColor:_,getLineColor:w,getLineWidth:x,getLineDashArray:E,getElevation:S,getPolygon:C,updateTriggers:P,material:T}=this.props,{paths:k,pathsDiff:M}=this.state,O=this.getSubLayerClass("fill",s.Z),R=this.getSubLayerClass("stroke",l.Z),I=this.shouldRenderSubLayer("fill",k)&&new O({_dataDiff:t,extruded:i,elevationScale:u,filled:r,wireframe:o,_normalize:a,_windingOrder:c,getElevation:S,getFillColor:_,getLineColor:i&&o?w:d,material:T,transitions:f},this.getSubLayerProps({id:"fill",updateTriggers:P&&{getPolygon:P.getPolygon,getElevation:P.getElevation,getFillColor:P.getFillColor,lineColors:i&&o,getLineColor:P.getLineColor}}),{data:e,positionFormat:h,getPolygon:C});return[!i&&I,!i&&n&&this.shouldRenderSubLayer("stroke",k)&&new R({_dataDiff:M&&(()=>M),widthUnits:p,widthScale:g,widthMinPixels:m,widthMaxPixels:v,jointRounded:A,miterLimit:y,dashJustified:b,_pathType:"loop",transitions:f&&{getWidth:f.getLineWidth,getColor:f.getLineColor,getPath:f.getPolygon},getColor:this.getSubLayerAccessor(w),getWidth:this.getSubLayerAccessor(x),getDashArray:this.getSubLayerAccessor(E)},this.getSubLayerProps({id:"stroke",updateTriggers:P&&{getWidth:P.getLineWidth,getColor:P.getLineColor,getDashArray:P.getLineDashArray}}),{data:k,positionFormat:h,getPath:e=>e.path}),i&&I]}}(0,r.Z)(h,"layerName","PolygonLayer"),(0,r.Z)(h,"defaultProps",f)},99259:(e,t,n)=>{"use strict";n.d(t,{Z:()=>f});var r=n(68185),i=n(53104),o=n(58521),a=n(79463),s=n(98029),l=n(44548),c=n(16621);const u=[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:u},getLineColor:{type:"accessor",value:u},getLineWidth:{type:"accessor",value:1},strokeWidth:{deprecatedFor:"getLineWidth"},outline:{deprecatedFor:"stroked"},getColor:{deprecatedFor:["getFillColor","getLineColor"]}};class f extends i.Z{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 gl_FragColor = vFillColor;\n } else {\n discard;\n }\n\n gl_FragColor.a *= inCircle;\n DECKGL_FILTER_COLOR(gl_FragColor, geometry);\n}\n",modules:[o.Z,a.Z]})}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(e){let{uniforms:t}=e;const{radiusUnits:n,radiusScale:r,radiusMinPixels:i,radiusMaxPixels:o,stroked:a,filled:l,billboard:c,antialiasing:u,lineWidthUnits:d,lineWidthScale:f,lineWidthMinPixels:h,lineWidthMaxPixels:p}=this.props;this.state.model.setUniforms(t).setUniforms({stroked:a?1:0,filled:l,billboard:c,antialiasing:u,radiusUnits:s.iI[n],radiusScale:r,radiusMinPixels:i,radiusMaxPixels:o,lineWidthUnits:s.iI[d],lineWidthScale:f,lineWidthMinPixels:h,lineWidthMaxPixels:p}).draw()}_getModel(e){return new l.Z(e,{...this.getShaders(),id:this.props.id,geometry:new c.Z({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})}}(0,r.Z)(f,"defaultProps",d),(0,r.Z)(f,"layerName","ScatterplotLayer")},66784:(e,t,n)=>{"use strict";n.d(t,{Fv:()=>h,Gd:()=>u,k8:()=>c,mD:()=>m});var r=n(49236),i=n.n(r),o=n(8766);const a=o.WINDING.CLOCKWISE,s=o.WINDING.COUNTER_CLOCKWISE,l={isClosed:!0};function c(e){return"positions"in e?e.positions:e}function u(e){return"holeIndices"in e?e.holeIndices:null}function d(e,t,n,r,i){let a=t;const s=n.length;for(let o=0;o4&&void 0!==arguments[4]?arguments[4]:0,a=arguments.length>5?arguments[5]:void 0,s=arguments.length>6?arguments[6]:void 0;a=a||n.length;const c=a-i;if(c<=0)return t;let u=t;for(let o=0;o=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=c(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()),g(a,0,2,1)):(n||(a=a.slice()),g(a,1,2,0)))}return i()(a,o,t)}},816:(e,t,n)=>{"use strict";n.d(t,{Z:()=>E});var r=n(68185),i=n(53104),o=n(58521),a=n(48424),s=n(79463),l=n(98029),c=n(6509),u=n(87966),d=n(44548),f=n(16621),h=n(66784),p=n(3943),g=n(8766);class m extends p.Z{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.Fv(e,this.positionSize);return this.opts.resolution?(0,g.cutPolygonByGrid)(h.k8(t),h.Gd(t),{size:this.positionSize,gridResolution:this.opts.resolution,edgeTypes:!0}):this.opts.wrapLongitude?(0,g.cutPolygonByMercatorBounds)(h.k8(t),h.Gd(t),{size:this.positionSize,maxLatitude:86,edgeTypes:!0}):t}return e}getGeometrySize(e){if(v(e)){let t=0;for(const n of e)t+=this.getGeometrySize(n);return t}return h.k8(e).length/this.positionSize}getGeometryFromBuffer(e){return this.normalize||!this.buffers.indices?super.getGeometryFromBuffer(e):null}updateGeometryAttributes(e,t){if(e&&v(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,t){let{geometryIndex:n,vertexStart:r,indexStart:i}=t;const{attributes:o,indexStarts:a,typedArrayManager:s}=this;let l=o.indices;if(!l||!e)return;let c=i;const u=h.mD(e,this.positionSize,this.opts.preproject,this.opts.full3d);l=s.allocate(l,i+u.length,{copy:!0});for(let d=0;d2?a[l*o+2]:0;i[3*s]=e,i[3*s+1]=t,i[3*s+2]=n}}_updateVertexValid(e,t){let{vertexStart:n,geometrySize:r}=t;const{positionSize:i}=this,o=this.attributes.vertexValid,a=e&&h.Gd(e);if(e&&e.edgeTypes?o.set(e.edgeTypes,n):o.fill(1,n,n+r),a)for(let s=0;s0&&!Number.isFinite(e[0])}const A="\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",y="#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(A,"\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(A,"\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"),_=[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 E extends i.Z{constructor(){super(...arguments),(0,r.Z)(this,"state",void 0)}getShaders(e){return super.getShaders({vs:"top"===e?y: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.Z,a.N,s.Z]})}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.Df.DEFAULT&&(n=l.Df.LNGLAT),n===l.Df.LNGLAT&&(i=r?t.projectPosition.bind(t):t.projectFlat.bind(t)),this.setState({numInstances:0,polygonTesselator:new m({preproject:i,fp64:this.use64bitPositions(),IndexType:!e||(0,c.ag)(e,u.h.ELEMENT_INDEX_UINT32)?Uint32Array:Uint16Array})});const o=this.getAttributeManager(),a=!0;o.remove(["instancePickingColors"]),o.add({indices:{size:1,isIndexed:!0,update:this.calculateIndices,noAlloc:a},positions:{size:3,type:5130,fp64:this.use64bitPositions(),transition:x,accessor:"getPolygon",update:this.calculatePositions,noAlloc:a,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:a},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,t)=>{let{index:n,target:r}=t;return this.encodePickingColor(e&&e.__source?e.__source.index:n,r)},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(e){let{props:t,oldProps:n,changeFlags:r}=e;if(r.dataChanged||r.updateTriggersChanged&&(r.updateTriggersChanged.all||r.updateTriggersChanged.getPolygon)){const{polygonTesselator:e}=this.state,n=t.data.attributes||{};e.updateGeometry({data:t.data,normalize:t._normalize,geometryBuffer:n.getPolygon,buffers:n,getGeometry:t.getPolygon,positionFormat:t.positionFormat,wrapLongitude:t.wrapLongitude,resolution:this.context.viewport.resolution,fp64:this.use64bitPositions(),dataChanged:r.dataChanged,full3d:t._full3d}),this.setState({numInstances:e.instanceCount,startIndices:e.vertexStarts}),r.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.Z(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.Z(e,{...this.getShaders("side"),id:"".concat(t,"-side"),geometry:new f.Z({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")}}(0,r.Z)(E,"defaultProps",w),(0,r.Z)(E,"layerName","SolidPolygonLayer")},55788:(e,t,n)=>{"use strict";n.d(t,{Z:()=>d});var r=n(68185),i=n(53104),o=n(58521),a=n(79463),s=n(98029),l=n(44548),c=n(16621);const u={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.Z{constructor(){super(...arguments),(0,r.Z)(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.Z,a.Z]})}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(e){let{uniforms:t}=e;const{billboard:n,sizeScale:r,sizeUnits:i,sizeMinPixels:o,sizeMaxPixels:a,getLineWidth:l}=this.props;let{padding:c}=this.props;c.length<4&&(c=[c[0],c[1],c[0],c[1]]),this.state.model.setUniforms(t).setUniforms({billboard:n,stroked:Boolean(l),padding:c,sizeUnits:s.iI[i],sizeScale:r,sizeMinPixels:o,sizeMaxPixels:a}).draw()}_getModel(e){return new l.Z(e,{...this.getShaders(),id:this.props.id,geometry:new c.Z({drawMode:6,vertexCount:4,attributes:{positions:{size:2,value:new Float32Array([0,0,1,0,1,1,0,1])}}}),isInstanced:!0})}}(0,r.Z)(d,"defaultProps",u),(0,r.Z)(d,"layerName","TextBackgroundLayer")},34929:(e,t,n)=>{"use strict";n.d(t,{Z:()=>I});var r=n(68185),i=n(32603),o=n(65148),a=n(39179),s=n(90286);const l=.75,c=[];class u extends s.Z{constructor(){super(...arguments),(0,r.Z)(this,"state",void 0)}getShaders(){return{...super.getShaders(),fs:"#define SHADER_NAME multi-icon-layer-fragment-shader\n\nprecision highp float;\n\nuniform float opacity;\nuniform sampler2D iconsTexture;\nuniform float gamma;\nuniform bool sdf;\nuniform float alphaCutoff;\nuniform float sdfBuffer;\nuniform float outlineBuffer;\nuniform vec4 outlineColor;\n\nvarying vec4 vColor;\nvarying vec2 vTextureCoords;\nvarying vec2 uv;\n\nvoid main(void) {\n geometry.uv = uv;\n\n if (!picking_uActive) {\n float alpha = texture2D(iconsTexture, vTextureCoords).a;\n vec4 color = vColor;\n if (sdf) {\n float distance = alpha;\n alpha = smoothstep(sdfBuffer - gamma, sdfBuffer + gamma, distance);\n\n if (outlineBuffer > 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,t)=>{let{index:n,target:r}=t;return this.encodePickingColor(n,r)}}})}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&&o.Z.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,l*(1-r)):-1;if(e.uniforms={...e.uniforms,sdfBuffer:l,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:l}})}}getInstanceOffset(e){return e?Array.from(e).flatMap((e=>super.getInstanceOffset(e))):c}getInstanceColorMode(e){return 1}getInstanceIconFrame(e){return e?Array.from(e).flatMap((e=>super.getInstanceIconFrame(e))):c}}(0,r.Z)(u,"defaultProps",{getIconOffsets:{type:"accessor",value:e=>e.offsets},alphaCutoff:.001,smoothing:.1,outlineWidth:0,outlineColor:{type:"color",value:[0,0,0,255]}}),(0,r.Z)(u,"layerName","MultiIconLayer");const d=1e20;class f{constructor(){let{fontSize:e=24,buffer:t=3,radius:n=8,cutoff:r=.25,fontFamily:i="sans-serif",fontWeight:o="normal",fontStyle:a="normal"}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.buffer=t,this.cutoff=r,this.radius=n;const s=this.size=e+4*t,l=this._createCanvas(s),c=this.ctx=l.getContext("2d",{willReadFrequently:!0});c.font="".concat(a," ").concat(o," ").concat(e,"px ").concat(i),c.textBaseline="alphabetic",c.textAlign="left",c.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)),c=s+2*this.buffer,u=l+2*this.buffer,f=Math.max(c*u,0),p=new Uint8ClampedArray(f),g={data:p,width:c,height:u,glyphWidth:s,glyphHeight:l,glyphTop:a,glyphLeft:0,glyphAdvance:t};if(0===s||0===l)return g;const{ctx:m,buffer:v,gridInner:A,gridOuter:y}=this;m.clearRect(v,v,s,l),m.fillText(e,v,v+a);const b=m.getImageData(v,v,s,l);y.fill(d,0,f),A.fill(0,0,f);for(let h=0;h0?e*e:0,A[n]=e<0?e*e:0}}h(y,0,0,c,u,c,this.f,this.v,this.z),h(A,v,v,s,l,c,this.f,this.v,this.z);for(let d=0;d-1);l++,o[l]=s,a[l]=c,a[l+1]=d}for(let s=0,l=0;sr&&(a4&&void 0!==arguments[4]?arguments[4]:0,o=arguments.length>5?arguments[5]:void 0;void 0===o&&(o=e.length);const a=[];return"break-all"===t?y(e,i,o,n,r,a):function(e,t,n,r,i,o){let a=t,s=t,l=t,c=0;for(let u=t;us){let t=A(e,s,l,i);c+t>r&&(ar&&(t=y(e,s,l,r,i,o),a=o[o.length-1])),s=l,c+=t}}(e,i,o,n,r,a),a}function _(e,t,n,r,i,a){let s=0,l=0;for(let c=t;c0&&void 0!==arguments[0]?arguments[0]:5;(0,r.Z)(this,"limit",void 0),(0,r.Z)(this,"_cache",{}),(0,r.Z)(this,"_order",[]),this.limit=e}get(e){const t=this._cache[e];return t&&(this._deleteOrder(e),this._appendOrder(e)),t}set(e,t){this._cache[e]?(this.delete(e),this._cache[e]=t,this._appendOrder(e)):(Object.keys(this._cache).length===this.limit&&this.delete(this._order[0]),this._cache[e]=t,this._appendOrder(e))}delete(e){this._cache[e]&&(delete this._cache[e],this._deleteOrder(e))}_deleteOrder(e){const t=this._order.indexOf(e);t>=0&&this._order.splice(t,1)}_appendOrder(e){this._order.push(e)}}const x={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 E=new w(3);function S(e,t){for(let n=0;n0&&void 0!==arguments[0]?arguments[0]:{};Object.assign(this.props,e),this._key=this._getKey();const t=function(e,t){let n;n="string"===typeof t?new Set(Array.from(t)):new Set(t);const r=E.get(e);if(!r)return n;for(const i in r.mapping)n.has(i)&&n.delete(i);return n}(this._key,this.props.characterSet),n=E.get(this._key);if(n&&0===t.size)return void(this._atlas!==n&&(this._atlas=n));const r=this._generateFontAtlas(t,n);this._atlas=r,E.set(this._key,r)}_generateFontAtlas(e,t){const{fontFamily:n,fontWeight:r,fontSize:i,buffer:o,sdf:a,radius:s,cutoff:l}=this.props;let c=t&&t.data;c||(c=document.createElement("canvas"),c.width=1024);const u=c.getContext("2d",{willReadFrequently:!0});C(u,n,i,r);const{mapping:d,canvasHeight:h,xOffset:p,yOffset:g}=function(e){let{characterSet:t,getFontWidth:n,fontHeight:r,buffer:i,maxCanvasWidth:o,mapping:a={},xOffset:s=0,yOffset:l=0}=e,c=0,u=s;const d=r+2*i;for(const f of t)if(!a[f]){const e=n(f);u+e+2*i>o&&(u=0,c++),a[f]={x:u+i,y:l+c*d+i,width:e,height:d,layoutWidth:e,layoutHeight:r},u+=e+2*i}return{mapping:a,xOffset:u,yOffset:l+c*d,canvasHeight:v(l+(c+1)*d)}}({getFontWidth:e=>u.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=u.getImageData(0,0,c.width,c.height);c.height=h,u.putImageData(e,0,0)}if(C(u,n,i,r),a){const t=new f({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);d[n].width=r,d[n].layoutOffsetY=.9*i-a;const s=u.createImageData(r,o);S(e,s),u.putImageData(s,d[n].x,d[n].y)}}else for(const f of e)u.fillText(f,d[f].x,d[f].y+o+.9*i);return{xOffset:p,yOffset:g,mapping:d,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 T=n(55788);const k={start:1,middle:0,end:-1},M={top:1,center:0,bottom:-1},O=[0,0,0,255],R={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:x.characterSet},fontFamily:x.fontFamily,fontWeight:x.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 I extends i.Z{constructor(){super(...arguments),(0,r.Z)(this,"state",void 0),(0,r.Z)(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[(k["function"===typeof o?o(e,t):o]-1)*n/2,(M["function"===typeof a?a(e,t):a]-1)*r/2,n,r]})),(0,r.Z)(this,"getIconOffsets",((e,t)=>{const{getTextAnchor:n,getAlignmentBaseline:r}=this.props,{x:i,y:o,rowWidth:a,size:[s,l]}=this.transformParagraph(e,t),c=k["function"===typeof n?n(e,t):n],u=M["function"===typeof r?r(e,t):r],d=i.length,f=new Array(2*d);let h=0;for(let p=0;p0&&o.Z.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(e){let{info:t}=e;return t.object=t.index>=0?this.props.data[t.index]:null,t}_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 a in o)if(o[a]!==r.props[a])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(e){let{value:t,length:n,stride:r,offset:i,startIndices:o,characterSet:a}=e;const s=t.BYTES_PER_ELEMENT,l=r?r/s:1,c=i?i/s:0,u=o[n]||Math.ceil((t.length-c)/l),d=a&&new Set,f=new Array(n);let h=t;if(l>1||c>0){h=new(0,t.constructor)(u);for(let e=0;e{let{index:r}=n;return e[r]}}else{const{iterable:e,objectInfo:n}=(0,a.jB)(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),c=new Array(a),u=("break-word"===n||"break-all"===n)&&isFinite(r)&&r>0,d=[0,0],f=[0,0];let h=0,p=0,g=0;for(let A=0;A<=a;A++){const e=o[A];if("\n"!==e&&A!==a||(g=A),g>p){const e=u?b(o,n,r,i,p,g):m;for(let n=0;n<=e.length;n++){const r=0===n?p:e[n-1],a=n=3,"Invalid cache limit"),E=new w(e)}(e)}}(0,r.Z)(I,"defaultProps",R),(0,r.Z)(I,"layerName","TextLayer")},63962:(e,t,n)=>{"use strict";function r(e){let{data:t,getIndex:n,dataRange:r,replace:i}=e;const{startRow:o=0,endRow:a=1/0}=r,s=t.length;let l=s,c=s;for(let f=0;ff&&e>=o&&(l=f),e>=a){c=f;break}}let u=l;const d=c-l!==i.length?t.slice(c):void 0;for(let f=0;fr})},91986:(e,t,n)=>{"use strict";n.d(t,{$G:()=>bo});var r=n(53104),i=n(58521),o=n(79463),a=n(21503),s=n(44548),l=n(16621);class c extends r.Z{constructor(e){super(e)}getShaders(){return super.getShaders({vs:"#define SHADER_NAME animated-flow-lines-layer-vertex-shader\n#define SPEED 0.015\n#define NUM_PARTS 5.0\n\nattribute vec3 positions;\nattribute vec3 instanceSourcePositions;\nattribute vec3 instanceTargetPositions;\nattribute vec3 instanceSourcePositions64Low;\nattribute vec3 instanceTargetPositions64Low;\nattribute vec4 instanceColors;\nattribute vec3 instancePickingColors;\nattribute float instanceWidths;\nattribute float instancePickable;\nattribute float instanceStaggering;\n\nuniform float opacity;\nuniform float currentTime;\nuniform float thicknessUnit;\n \nvarying vec4 vColor;\nvarying float sourceToTarget;\nvarying vec2 uv;\n\n// offset vector by strokeWidth pixels\n// offset_direction is -1 (left) or 1 (right)\nvec2 getExtrusionOffset(vec2 line_clipspace, float offset_direction, float width) {\n // normalized direction of the line\n vec2 dir_screenspace = normalize(line_clipspace * project_uViewportSize);\n // rotate by 90 degrees\n dir_screenspace = vec2(-dir_screenspace.y, dir_screenspace.x);\n\n return dir_screenspace * offset_direction * width / 2.0;\n}\n\nvoid main(void) {\n geometry.worldPosition = instanceSourcePositions;\n geometry.worldPositionAlt = instanceTargetPositions;\n\n // Position\n vec4 source_commonspace;\n vec4 target_commonspace;\n vec4 source = project_position_to_clipspace(instanceSourcePositions, instanceSourcePositions64Low, vec3(0.), source_commonspace);\n vec4 target = project_position_to_clipspace(instanceTargetPositions, instanceTargetPositions64Low, vec3(0.), target_commonspace);\n\n float widthPixels = instanceWidths * thicknessUnit;\n \n \n // linear interpolation of source & target to pick right coord\n float segmentIndex = positions.x;\n vec4 p = mix(source, target, segmentIndex);\n geometry.position = mix(source_commonspace, target_commonspace, segmentIndex);\n uv = positions.xy;\n geometry.uv = uv;\n if (instancePickable > 0.5) {\n geometry.pickingColor = instancePickingColors;\n }\n \n // extrude\n vec3 offset = vec3(\n getExtrusionOffset(target.xy - source.xy, positions.y, widthPixels),\n 0.0);\n DECKGL_FILTER_SIZE(offset, geometry);\n gl_Position = p + vec4(project_pixel_size_to_clipspace(offset.xy), 0.0, 0.0);\n DECKGL_FILTER_GL_POSITION(gl_Position, geometry);\n\n // Color\n vColor = vec4(instanceColors.rgb, instanceColors.a * opacity) / 255.;\n DECKGL_FILTER_COLOR(vColor, geometry);\n\n sourceToTarget = positions.x * length(source - target) * NUM_PARTS - currentTime * SPEED + instanceStaggering; \n}\n",fs:"#define SHADER_NAME animated-flow-lines-layer-fragment-shader\n\nprecision highp float;\n\nuniform float animationTailLength;\n\nvarying vec4 vColor;\nvarying float sourceToTarget;\nvarying vec2 uv;\n \nvoid main(void) {\n geometry.uv = uv;\n\n gl_FragColor = vec4(vColor.xyz, vColor.w * smoothstep(1.0 - animationTailLength, 1.0, fract(sourceToTarget)));\n\n DECKGL_FILTER_COLOR(gl_FragColor, geometry);\n}\n",modules:[i.Z,o.Z],shaderCache:this.context.shaderCache})}initializeState(){this.getAttributeManager().addInstanced({instanceSourcePositions:{size:3,type:a.Z.DOUBLE,transition:!0,accessor:"getSourcePosition"},instanceTargetPositions:{size:3,type:a.Z.DOUBLE,transition:!0,accessor:"getTargetPosition"},instanceColors:{size:4,type:a.Z.UNSIGNED_BYTE,transition:!0,accessor:"getColor",defaultValue:[0,0,0,255]},instanceWidths:{size:1,transition:!0,accessor:"getThickness",defaultValue:1},instanceStaggering:{accessor:"getStaggering",size:1,transition:!1},instancePickable:{accessor:"getPickable",size:1,transition:!1}})}getNeedsRedraw(){return!0}updateState(e){let{props:t,oldProps:n,changeFlags:r}=e;var i;if(super.updateState({props:t,oldProps:n,changeFlags:r}),r.extensionsChanged){const{gl:e}=this.context;null===(i=this.state.model)||void 0===i||i.delete(),this.state.model=this._getModel(e),this.getAttributeManager().invalidateAll()}}draw(e){let{uniforms:t}=e;const{thicknessUnit:n,animationTailLength:r}=this.props,i=Date.now()/1e3%90/90*1800;this.state.model.setUniforms(Object.assign(Object.assign({},t),{thicknessUnit:4*n,animationTailLength:r,currentTime:i})).draw()}_getModel(e){return new s.Z(e,Object.assign({},this.getShaders(),{id:this.props.id,geometry:new l.Z({drawMode:a.Z.TRIANGLE_STRIP,attributes:{positions:new Float32Array([0,-1,0,0,1,0,1,-1,0,1,1,0])}}),isInstanced:!0}))}}c.defaultProps={currentTime:0,animationTailLength:.7,getSourcePosition:{type:"accessor",value:e=>[0,0]},getTargetPosition:{type:"accessor",value:e=>[0,0]},getPickable:{type:"accessor",value:e=>1},getStaggering:{type:"accessor",value:(e,t)=>{let{index:n}=t;return Math.random()}},getColor:{type:"accessor",value:[0,132,193,255]},getThickness:{type:"accessor",value:1},thicknessUnit:30,parameters:{depthTest:!1}};const u=c,d=[1,0,0,1,2,-3,1,1,-3,1,0,0,1,1,-3,0,1,0,1,0,0,0,1,0,0,0,0];const f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];class h extends r.Z{constructor(e){super(e)}getShaders(){return super.getShaders({vs:"#define SHADER_NAME flow-line-layer-vertex-shader\n\nattribute vec3 positions;\nattribute vec3 normals;\nattribute vec4 instanceColors;\nattribute float instanceThickness; // 0..0.5\nattribute vec3 instanceSourcePositions;\nattribute vec3 instanceTargetPositions;\nattribute vec3 instanceSourcePositions64Low;\nattribute vec3 instanceTargetPositions64Low;\nattribute vec3 instancePickingColors;\nattribute vec2 instanceEndpointOffsets;\nattribute float instancePickable;\n\nuniform vec4 outlineColor;\nuniform float thicknessUnit;\nuniform float gap;\nuniform float opacity;\n\nvarying vec4 vColor;\nvarying vec2 uv;\n\nvoid main(void) {\n geometry.worldPosition = instanceSourcePositions;\n geometry.worldPositionAlt = instanceTargetPositions;\n \n // Position\n vec4 source_commonspace; \n vec4 target_commonspace;\n vec4 source = project_position_to_clipspace(instanceSourcePositions, instanceSourcePositions64Low, vec3(0.), source_commonspace);\n vec4 target = project_position_to_clipspace(instanceTargetPositions, instanceTargetPositions64Low, vec3(0.), target_commonspace);\n\n // linear interpolation of source & target to pick right coord\n float sourceOrTarget = positions.x;\n geometry.position = mix(source_commonspace, target_commonspace, sourceOrTarget);\n uv = positions.xy;\n geometry.uv = uv;\n if (instancePickable > 0.5) {\n geometry.pickingColor = instancePickingColors;\n }\n \n // set the clamp limits in pixel size \n float lengthCommon = length(target_commonspace - source_commonspace); \n vec2 offsetDistances = project_pixel_size(positions.yz) * thicknessUnit;\n \n vec2 limitedOffsetDistances = clamp( \n project_pixel_size(positions.yz) * thicknessUnit,\n -lengthCommon*.8, lengthCommon*.8\n );\n float startOffsetCommon = project_pixel_size(instanceEndpointOffsets[0]);\n float endOffsetCommon = project_pixel_size(instanceEndpointOffsets[1]);\n float endpointOffset = mix(\n clamp(startOffsetCommon, 0.0, lengthCommon*.2),\n -clamp(endOffsetCommon, 0.0, lengthCommon*.2),\n positions.x\n );\n\n vec2 flowlineDir = normalize(target_commonspace.xy - source_commonspace.xy);\n vec2 perpendicularDir = vec2(-flowlineDir.y, flowlineDir.x);\n vec2 normalsCommon = project_pixel_size(normals.xy);\n float gapCommon = project_pixel_size(gap);\n vec3 offsetCommon = vec3(\n flowlineDir * (instanceThickness * limitedOffsetDistances[1] + normalsCommon.y + endpointOffset * 1.05) -\n perpendicularDir * (instanceThickness * limitedOffsetDistances[0] + gapCommon + normalsCommon.x),\n 0.0\n );\n \n DECKGL_FILTER_SIZE(offsetCommon, geometry);\n vec4 position_commonspace = mix(source_commonspace, target_commonspace, sourceOrTarget);\n vec4 offset_commonspace = vec4(offsetCommon, 0.0);\n gl_Position = project_common_position_to_clipspace(position_commonspace + offset_commonspace);\n \n DECKGL_FILTER_GL_POSITION(gl_Position, geometry);\n \n vec4 fillColor = vec4(instanceColors.rgb, instanceColors.a * opacity) / 255.;\n vColor = mix(fillColor, vec4(outlineColor.xyz, outlineColor.w * fillColor.w), normals.z);\n DECKGL_FILTER_COLOR(vColor, geometry);\n}\n",fs:"#define SHADER_NAME flow-line-layer-fragment-shader\n\nprecision highp float;\n\nvarying vec4 vColor;\nvarying vec2 uv;\n\nvoid main(void) {\n if (vColor.a == 0.0) {\n discard;\n }\n\n geometry.uv = uv;\n gl_FragColor = vColor;\n DECKGL_FILTER_COLOR(gl_FragColor, geometry);\n}\n",modules:[i.Z,o.Z],shaderCache:this.context.shaderCache})}initializeState(){const{attributeManager:e}=this.state;e.addInstanced({instanceSourcePositions:{accessor:"getSourcePosition",size:3,transition:!1,type:a.Z.DOUBLE},instanceTargetPositions:{accessor:"getTargetPosition",size:3,transition:!1,type:a.Z.DOUBLE},instanceThickness:{accessor:"getThickness",size:1,transition:!1},instanceEndpointOffsets:{accessor:"getEndpointOffsets",size:2,transition:!1},instanceColors:{accessor:"getColor",size:4,type:a.Z.UNSIGNED_BYTE,transition:!1},instancePickable:{accessor:"getPickable",size:1,transition:!1}})}updateState(e){let{props:t,oldProps:n,changeFlags:r}=e;if(super.updateState({props:t,oldProps:n,changeFlags:r}),r.extensionsChanged){const{gl:e}=this.context;this.state.model&&this.state.model.delete(),this.setState({model:this._getModel(e)}),this.getAttributeManager().invalidateAll()}}draw(e){let{uniforms:t}=e;const{gl:n}=this.context,{outlineColor:r,thicknessUnit:i}=this.props;n.lineWidth(1),this.state.model.setUniforms(Object.assign(Object.assign({},t),{outlineColor:r.map((e=>e/255)),thicknessUnit:2*i,gap:.5})).draw()}_getModel(e){let t=[],n=[];const{drawOutline:r,outlineThickness:i}=this.props;if(r){t=t.concat(d);const e=i,r=1;n=n.concat(function(e,t){return[-t,2*e,1,2*e,-e,1,e,-e,1,-t,2*e,1,e,-e,1,e,-e,1,-t,2*e,1,e,-e,1,-t,-e,1]}(e,r))}return t=t.concat(d),n=n.concat(f),new s.Z(e,Object.assign(Object.assign({id:this.props.id},this.getShaders()),{geometry:new l.Z({drawMode:a.Z.TRIANGLES,attributes:{positions:new Float32Array(t),normals:new Float32Array(n)}}),isInstanced:!0,shaderCache:this.context.shaderCache}))}}h.layerName="FlowLinesLayer",h.defaultProps={getSourcePosition:{type:"accessor",value:e=>[0,0]},getTargetPosition:{type:"accessor",value:e=>[0,0]},getColor:{type:"accessor",value:[0,132,193,255]},getThickness:{type:"accessor",value:e=>e.count},getPickable:{type:"accessor",value:e=>1},drawOutline:!0,thicknessUnit:12,outlineThickness:1,outlineColor:[255,255,255,255],parameters:{depthTest:!1}};const p=h,g=[0,0,0,255];class m extends r.Z{constructor(e){super(e)}getShaders(){return super.getShaders({vs:"#define SHADER_NAME flow-circles-layer-vertex-shader\n#define radiusScale 100\n\nattribute vec3 positions;\n\nattribute vec3 instancePositions;\nattribute vec3 instancePositions64Low;\nattribute float instanceInRadius;\nattribute float instanceOutRadius;\nattribute vec4 instanceColors;\nattribute vec3 instancePickingColors;\n\nuniform float opacity;\nuniform vec4 emptyColor;\nuniform float outlineEmptyMix;\n\nvarying vec4 vColor;\nvarying vec2 unitPosition;\nvarying float unitInRadius;\nvarying float unitOutRadius;\n\nvoid main(void) {\n geometry.worldPosition = instancePositions;\n\n float outerRadiusPixels = max(instanceInRadius, instanceOutRadius);\n unitInRadius = instanceInRadius / outerRadiusPixels; \n unitOutRadius = instanceOutRadius / outerRadiusPixels; \n\n // position on the containing square in [-1, 1] space\n unitPosition = positions.xy;\n geometry.uv = unitPosition;\n geometry.pickingColor = instancePickingColors;\n \n // Find the center of the point and add the current vertex\n vec3 offset = 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 // Apply opacity to instance color, or return instance picking color\n vColor = vec4(instanceColors.rgb / 255., instanceColors.a / 255. * opacity);\n DECKGL_FILTER_COLOR(vColor, geometry);\n}\n",fs:"#define SHADER_NAME flow-circles-layer-fragment-shader\n#define SOFT_OUTLINE 0.05\n#define EPS 0.05\nprecision highp float;\n\nuniform vec4 emptyColor;\nuniform float outlineEmptyMix;\n\nvarying vec4 vColor;\nvarying vec2 unitPosition;\nvarying float unitInRadius;\nvarying float unitOutRadius;\n\nfloat when_gt(float x, float y) {\n return max(sign(x - y), 0.0);\n}\n\nvoid main(void) {\n geometry.uv = unitPosition;\n float distToCenter = length(unitPosition);\n if (distToCenter > 1.0) {\n discard;\n }\n\n // See https://stackoverflow.com/questions/47285778\n vec4 ringColor = mix(\n emptyColor / 255., vColor,\n when_gt(unitInRadius, unitOutRadius)\n );\n vec4 outlineColor = mix(\n mix(vColor, emptyColor / 255., outlineEmptyMix),\n vColor,\n when_gt(unitInRadius, unitOutRadius)\n );\n \n float innerR = min(unitInRadius, unitOutRadius) * (1.0 - SOFT_OUTLINE);\n \n // Inner circle\n float step2 = innerR - 2.0 * EPS; \n float step3 = innerR - EPS;\n \n // Ring\n float step4 = innerR;\n // float step5 = 1.0 - SOFT_OUTLINE - EPS;\n // float step6 = 1.0 - SOFT_OUTLINE;\n float step5 = 1.0 - 5.0 * EPS;\n float step6 = 1.0;\n \n gl_FragColor = vColor;\n gl_FragColor = mix(gl_FragColor, emptyColor / 255., smoothstep(step2, step3, distToCenter));\n gl_FragColor = mix(gl_FragColor, ringColor, smoothstep(step3, step4, distToCenter));\n gl_FragColor = mix(gl_FragColor, outlineColor, smoothstep(step5, step6, distToCenter));\n // gl_FragColor = mix(gl_FragColor, emptyColor / 255., smoothstep(step6, 1.0, distToCenter));\n gl_FragColor.a = vColor.a;\n gl_FragColor.a *= smoothstep(0.0, SOFT_OUTLINE, 1.0 - distToCenter);\n DECKGL_FILTER_COLOR(gl_FragColor, geometry);\n}\n",modules:[i.Z,o.Z]})}initializeState(){this.getAttributeManager().addInstanced({instancePositions:{size:3,type:a.Z.DOUBLE,fp64:this.use64bitPositions(),transition:!0,accessor:"getPosition"},instanceInRadius:{size:1,transition:!0,accessor:"getInRadius",defaultValue:1},instanceOutRadius:{size:1,transition:!0,accessor:"getOutRadius",defaultValue:1},instanceColors:{size:4,transition:!0,type:a.Z.UNSIGNED_BYTE,accessor:"getColor",defaultValue:g}})}updateState(e){let{props:t,oldProps:n,changeFlags:r}=e;if(super.updateState({props:t,oldProps:n,changeFlags:r}),r.extensionsChanged){const{gl:e}=this.context;this.state.model&&this.state.model.delete(),this.setState({model:this._getModel(e)}),this.getAttributeManager().invalidateAll()}}draw(e){let{uniforms:t}=e;const{emptyColor:n,outlineEmptyMix:r}=this.props;this.state.model.setUniforms(Object.assign(Object.assign({},t),{emptyColor:n,outlineEmptyMix:r})).draw()}_getModel(e){return new s.Z(e,Object.assign(this.getShaders(),{id:this.props.id,geometry:new l.Z({drawMode:a.Z.TRIANGLE_FAN,vertexCount:4,attributes:{positions:{size:3,value:new Float32Array([-1,-1,0,1,-1,0,1,1,0,-1,1,0])}}}),isInstanced:!0}))}}m.layerName="FlowCirclesLayer",m.defaultProps={getColor:{type:"accessor",value:g},emptyColor:{type:"accessor",value:[255,255,255,255]},outlineEmptyMix:{type:"accessor",value:.4},getPosition:{type:"accessor",value:e=>e.position},getInRadius:{type:"accessor",value:1},getOutRadius:{type:"accessor",value:1},parameters:{depthTest:!1}};const v=m;var A,y=n(32603),b=n(99259),_=n(34929);function w(e){const{children:t}=e;return t&&t.length>0}function x(e){const{zoom:t}=e;return void 0!==t}function E(e){return e&&!!e.aggregate}function S(e){for(var t=e.length/6|0,n=new Array(t),r=0;r(0,C.hD)(e[e.length-1]);var T=new Array(3).concat("deebf79ecae13182bd","eff3ffbdd7e76baed62171b5","eff3ffbdd7e76baed63182bd08519c","eff3ffc6dbef9ecae16baed63182bd08519c","eff3ffc6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b").map(S);P(T);var k=new Array(3).concat("e5f5f999d8c92ca25f","edf8fbb2e2e266c2a4238b45","edf8fbb2e2e266c2a42ca25f006d2c","edf8fbccece699d8c966c2a42ca25f006d2c","edf8fbccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b").map(S);P(k);var M=new Array(3).concat("e0ecf49ebcda8856a7","edf8fbb3cde38c96c688419d","edf8fbb3cde38c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b").map(S);P(M);var O=n(15917),R=n(22732),I=n(96153),L=-.14861,N=1.78277,D=-.29227,F=-.90649,j=1.97294,B=j*F,Z=j*N,z=N*D-F*L;function U(e,t,n,r){return 1===arguments.length?function(e){if(e instanceof H)return new H(e.h,e.s,e.l,e.opacity);e instanceof R.Ss||(e=(0,R.SU)(e));var t=e.r/255,n=e.g/255,r=e.b/255,i=(z*r+B*t-Z*n)/(z+B-Z),o=r-i,a=(j*(n-i)-D*o)/F,s=Math.sqrt(a*a+o*o)/(j*i*(1-i)),l=s?Math.atan2(a,o)*I.R-120:NaN;return new H(l<0?l+360:l,s,i,e.opacity)}(e):new H(e,t,n,null==r?1:r)}function H(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}(0,O.Z)(H,U,(0,O.l)(R.Il,{brighter(e){return e=null==e?R.J5:Math.pow(R.J5,e),new H(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?R.xV:Math.pow(R.xV,e),new H(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=isNaN(this.h)?0:(this.h+120)*I.u,t=+this.l,n=isNaN(this.s)?0:this.s*t*(1-t),r=Math.cos(e),i=Math.sin(e);return new R.Ss(255*(t+n*(L*r+N*i)),255*(t+n*(D*r+F*i)),255*(t+n*(j*r)),this.opacity)}}));var V=n(60265);function W(e){return function t(n){function r(t,r){var i=e((t=U(t)).h,(r=U(r)).h),o=(0,V.ZP)(t.s,r.s),a=(0,V.ZP)(t.l,r.l),s=(0,V.ZP)(t.opacity,r.opacity);return function(e){return t.h=i(e),t.s=o(e),t.l=a(Math.pow(e,n)),t.opacity=s(e),t+""}}return n=+n,r.gamma=t,r}(1)}W(V.wx);var G=W(V.ZP),K=G(U(-100,.75,.35),U(80,1.5,.8)),q=G(U(260,.75,.35),U(80,1.5,.8));U();var Y=new Array(3).concat("e0f3dba8ddb543a2ca","f0f9e8bae4bc7bccc42b8cbe","f0f9e8bae4bc7bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081").map(S);P(Y);var X=new Array(3).concat("e5f5e0a1d99b31a354","edf8e9bae4b374c476238b45","edf8e9bae4b374c47631a354006d2c","edf8e9c7e9c0a1d99b74c47631a354006d2c","edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b").map(S);P(X);var $=new Array(3).concat("f0f0f0bdbdbd636363","f7f7f7cccccc969696525252","f7f7f7cccccc969696636363252525","f7f7f7d9d9d9bdbdbd969696636363252525","f7f7f7d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000").map(S);P($);function Q(e){var t=e.length;return function(n){return e[Math.max(0,Math.min(t-1,Math.floor(n*t)))]}}const J=Q(S("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725"));var ee=Q(S("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),te=Q(S("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),ne=Q(S("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921")),re=new Array(3).concat("fee6cefdae6be6550d","feeddefdbe85fd8d3cd94701","feeddefdbe85fd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704").map(S);P(re);var ie=new Array(3).concat("fee8c8fdbb84e34a33","fef0d9fdcc8afc8d59d7301f","fef0d9fdcc8afc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000").map(S);P(ie);var oe=new Array(3).concat("ece7f2a6bddb2b8cbe","f1eef6bdc9e174a9cf0570b0","f1eef6bdc9e174a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858").map(S);P(oe);var ae=new Array(3).concat("ece2f0a6bddb1c9099","f6eff7bdc9e167a9cf02818a","f6eff7bdc9e167a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636").map(S);P(ae);var se=new Array(3).concat("e7e1efc994c7dd1c77","f1eef6d7b5d8df65b0ce1256","f1eef6d7b5d8df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f").map(S);P(se);var le=new Array(3).concat("efedf5bcbddc756bb1","f2f0f7cbc9e29e9ac86a51a3","f2f0f7cbc9e29e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d").map(S);P(le);var ce=new Array(3).concat("fde0ddfa9fb5c51b8a","feebe2fbb4b9f768a1ae017e","feebe2fbb4b9f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a").map(S);P(ce);var ue=new Array(3).concat("fee0d2fc9272de2d26","fee5d9fcae91fb6a4acb181d","fee5d9fcae91fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d").map(S);P(ue);var de=new Array(3).concat("f7fcb9addd8e31a354","ffffccc2e69978c679238443","ffffccc2e69978c67931a354006837","ffffccd9f0a3addd8e78c67931a354006837","ffffccd9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529").map(S);P(de);var fe=new Array(3).concat("edf8b17fcdbb2c7fb8","ffffcca1dab441b6c4225ea8","ffffcca1dab441b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58").map(S);P(fe);var he=new Array(3).concat("fff7bcfec44fd95f0e","ffffd4fed98efe9929cc4c02","ffffd4fed98efe9929d95f0e993404","ffffd4fee391fec44ffe9929d95f0e993404","ffffd4fee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506").map(S);P(he);var pe=new Array(3).concat("ffeda0feb24cf03b20","ffffb2fecc5cfd8d3ce31a1c","ffffb2fecc5cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026").map(S);P(pe);var ge=n(88406),me=n(92429),ve=n(28458),Ae=n(82620),ye=n(23263),be=n(29449),_e=n(41176);function we(){var e,t,n,r,i,o=0,a=1,s=Ae.yR,l=!1;function c(t){return null==t||isNaN(t=+t)?i:s(0===n?.5:(t=(r(t)-e)*n,l?Math.max(0,Math.min(1,t)):t))}function u(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?(l=!!e,c):l},c.interpolator=function(e){return arguments.length?(s=e,c):s},c.range=u(me.Z),c.rangeRound=u(ve.Z),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 xe(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function Ee(){var e=(0,be.Q)(we()(Ae.yR));return e.copy=function(){return xe(e,Ee())},ye.O.apply(e,arguments)}function Se(){var e=(0,_e.Hh)(we());return e.copy=function(){return xe(e,Se()).exponent(e.exponent())},ye.O.apply(e,arguments)}var Ce=n(52719),Pe=n(15598);const Te="#fff",ke=.4,Me="rgba(240,240,240,0.5)",Oe=[Me,"#137CBD"],Re="rgba(220,220,220,0.5)",Ie=[Me,"#f6654e"],Le=[Me,"#00a9cc"],Ne=[255,255,255,255];function De(e,t){const n=(0,R.ZP)(e);if(!n)return console.warn("Invalid color: ",e),"rgba(255, 255, 255, ".concat(t,")");const r=n.rgb();return"rgba(".concat(r.r,", ").concat(r.g,", ").concat(r.b,", ").concat(t,")")}function Fe(e){if(Array.isArray(e))return e;const t=(0,R.ZP)(e);if(!t)return console.warn("Invalid color: ",e),Ne;const n=t.rgb();return[Math.floor(n.r),Math.floor(n.g),Math.floor(n.b),(r=t.opacity,Math.round(255*r))];var r}function je(e,t){return e?Fe(e):"string"===typeof t?Fe(t):t}const Be=e=>e[e.length-1];var Ze;!function(e){e.primary="#162d3c"}(Ze||(Ze={}));const ze=e=>(0,ge.Z)(0,21).map((t=>e(t/20))).reverse(),Ue="rgba(240,240,240,0.5)",He=[Ue,Ze.primary],Ve=["#d1eeea","#a8dbd9","#85c4c9","#68abb8","#4f90a6","#3b738f","#2a5674"],We=Ve,Ge={Blues:Be(T),BluGrn:["#c4e6c3","#96d2a4","#6dbc90","#4da284","#36877a","#266b6e","#1d4f60"],BluYl:["#f7feae","#b7e6a5","#7ccba2","#46aea0","#089099","#00718b","#045275"],BrwnYl:["#ede5cf","#e0c2a2","#d39c83","#c1766f","#a65461","#813753","#541f3f"],BuGn:Be(k),BuPu:Be(M),Burg:["#ffc6c4","#f4a3a8","#e38191","#cc607d","#ad466c","#8b3058","#672044"],BurgYl:["#fbe6c5","#f5ba98","#ee8a82","#dc7176","#c8586c","#9c3f5d","#70284a"],Cool:ze(q),DarkMint:["#d2fbd4","#a5dbc2","#7bbcb0","#559c9e","#3a7c89","#235d72","#123f5a"],Emrld:["#d3f2a3","#97e196","#6cc08b","#4c9b82","#217a79","#105965","#074050"],GnBu:Be(Y),Grayish:He,Greens:Be(X),Greys:Be($),Inferno:ze(te),Magenta:["#f3cbd3","#eaa9bd","#dd88ac","#ca699d","#b14d8e","#91357d","#6c2167"],Magma:ze(ee),Mint:["#e4f1e1","#b4d9cc","#89c0b6","#63a6a0","#448c8a","#287274","#0d585f"],Oranges:Be(re),OrRd:Be(ie),OrYel:["#ecda9a","#efc47e","#f3ad6a","#f7945d","#f97b57","#f66356","#ee4d5a"],Peach:["#fde0c5","#facba6","#f8b58b","#f59e72","#f2855d","#ef6a4c","#eb4a40"],Plasma:ze(ne),PinkYl:["#fef6b5","#ffdd9a","#ffc285","#ffa679","#fa8a76","#f16d7a","#e15383"],PuBu:Be(oe),PuBuGn:Be(ae),PuRd:Be(se),Purp:["#f3e0f7","#e4c7f1","#d1afe8","#b998dd","#9f82ce","#826dba","#63589f"],Purples:Be(le),PurpOr:["#f9ddda","#f2b9c4","#e597b9","#ce78b3","#ad5fad","#834ba0","#573b88"],RdPu:Be(ce),RedOr:["#f6d2a9","#f5b78e","#f19c7c","#ea8171","#dd686c","#ca5268","#b13f64"],Reds:Be(ue),Sunset:["#f3e79b","#fac484","#f8a07e","#eb7f86","#ce6693","#a059a0","#5c53a5"],SunsetDark:["#fcde9c","#faa476","#f0746e","#e34f6f","#dc3977","#b9257a","#7c1d6f"],Teal:Ve,TealGrn:["#b0f2bc","#89e8ac","#67dba5","#4cc8a3","#38b2a3","#2c98a0","#257d98"],Viridis:ze(J),Warm:ze(K),YlGn:Be(de),YlGnBu:Be(fe),YlOrBr:Be(he),YlOrRd:Be(pe)},Ke=(Object.keys(Ge),{negative:{flows:{scheme:[Ue,"#17a5be"]}},positive:{flows:{scheme:[Ue,"#f52020"]}},locationAreas:{outline:"rgba(92,112,128,0.5)",normal:"rgba(220,220,220,0.5)"},outlineColor:"rgb(230,233,237)"});function qe(e,t,n,r,i,o,a){if(e)return Ke;let s;Array.isArray(t)?s=t:(s=t&&Ge[t]||We,n&&(s=s.slice().reverse()));{const e=(0,ge.Z)(0,Math.max(10,s.length)),t=e.length-1,a=Ee((0,C.hD)(s)).domain([0,t]);if(r&&0!==o){const r=(0,_e.ZP)().exponent(1.5).domain([t,0]).range([0,2*o/100]);s=e.map(((e,t)=>{const o=a(t),s=r(t);if(null==o||null==s)return"#000";const l=(0,Pe.Uc)(o);return l.l=n?l.l-l.l*s:l.l+(100-l.l)*s,l.c=l.c-l.c*(s/4),i&&(l.opacity=l.opacity*(1-s)),l.toString()}))}else s=e.map(((e,t)=>a(t)))}return{darkMode:n,flows:{scheme:s},locationCircles:{outgoing:n?"#000":"#fff"},outlineColor:n?"#000":"rgba(255, 255, 255, 0.5)"}}function Ye(e,t,n){const r=Se(function(e){const t=Ce.Z,n=e.length;let r,i,o=new Array(n),a=new Array(n),s=new Array(n),l=new Array(n);for(r=0;rFe(r(e))}function Xe(e){return void 0!==e.positive}function $e(e,t){const n=e&&e.normal||Re,r=(0,Pe.Uc)(n),i=Fe(n);return{normal:i,connected:je(e&&e.connected,i),highlighted:je(e&&e.highlighted,De(r[t?"brighter":"darker"](1).toString(),.5)),selected:je(e&&e.selected,De(r[t?"brighter":"darker"](2).toString(),.8)),outline:je(e&&e.outline,Fe(r[t?"brighter":"darker"](4).toString()))}}function Qe(e,t,n){var r,i,o;const a=e&&e.flows&&e.flows.scheme||t,s=(0,Pe.Uc)(a[a.length-1]),l=je(e&&e.flows&&e.flows.highlighted,Fe(s[n?"brighter":"darker"](.7).toString())),c=je(null===(r=null===e||void 0===e?void 0:e.locationCircles)||void 0===r?void 0:r.empty,n?"#000":"#fff");return{flows:{scheme:a,highlighted:l},locationCircles:{inner:je(e&&e.locationCircles&&e.locationCircles.inner,s.toString()),outgoing:je(e&&e.locationCircles&&e.locationCircles.outgoing,n?"#000":"#fff"),incoming:je(e&&e.locationCircles&&e.locationCircles.incoming,s[n?"brighter":"darker"](1.25).toString()),highlighted:je(e&&e.locationCircles&&e.locationCircles.highlighted,l),empty:c,outlineEmptyMix:null!==(o=null===(i=null===e||void 0===e?void 0:e.locationCircles)||void 0===i?void 0:i.outlineEmptyMix)&&void 0!==o?o:.4}}}function Je(e){const t=!(!e||!e.darkMode);return{darkMode:t,locationAreas:$e(e&&e.locationAreas,t),outlineColor:Fe(e&&e.outlineColor||Te),dimmedOpacity:e&&null!=e.dimmedOpacity?e.dimmedOpacity:ke}}const et=qe;var tt=n(52593),nt=n(42514);function rt(e,t){let n,r;if(void 0===t)for(const i of e)null!=i&&(void 0===n?i>=i&&(n=r=i):(n>i&&(n=i),r=o&&(n=r=o):(n>o&&(n=o),r2?n-2:0),i=2;i=r.length)return n(i);const a=new ot.L,s=r[o++];let l=-1;for(const t of i){const e=s(t,++l,i),n=a.get(e);n?n.push(t):a.set(e,[t])}for(const[t,n]of a)a.set(t,e(n,o));return t(a)}(e,0)}function ct(e,t,n,r,i,o){if(i-r<=n)return;const a=r+i>>1;ut(e,t,a,r,i,o%2),ct(e,t,n,r,a-1,o+1),ct(e,t,n,a+1,i,o+1)}function ut(e,t,n,r,i,o){for(;i>r;){if(i-r>600){const a=i-r+1,s=n-r+1,l=Math.log(a),c=.5*Math.exp(2*l/3),u=.5*Math.sqrt(l*c*(a-c)/a)*(s-a/2<0?-1:1);ut(e,t,n,Math.max(r,Math.floor(n-s*c/a+u)),Math.min(i,Math.floor(n+(a-s)*c/a+u)),o)}const a=t[2*n+o];let s=r,l=i;for(dt(e,t,r,n),t[2*i+o]>a&&dt(e,t,r,i);sa;)l--}t[2*r+o]===a?dt(e,t,r,l):(l++,dt(e,t,l,i)),l<=n&&(r=l+1),n<=l&&(i=l-1)}}function dt(e,t,n,r){ft(e,n,r),ft(t,2*n,2*r),ft(t,2*n+1,2*r+1)}function ft(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function ht(e,t,n,r){const i=e-n,o=t-r;return i*i+o*o}const pt=e=>e[0],gt=e=>e[1];class mt{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:pt,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:gt,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:64,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:Float64Array;this.nodeSize=r,this.points=e;const o=e.length<65536?Uint16Array:Uint32Array,a=this.ids=new o(e.length),s=this.coords=new i(2*e.length);for(let l=0;l=n&&c<=i&&u>=r&&u<=o&&l.push(e[a]);continue}const p=Math.floor((h+f)/2);c=t[2*p],u=t[2*p+1],c>=n&&c<=i&&u>=r&&u<=o&&l.push(e[p]);const g=(d+1)%2;(0===d?n<=c:r<=u)&&(s.push(h),s.push(p-1),s.push(g)),(0===d?i>=c:o>=u)&&(s.push(p+1),s.push(f),s.push(g))}return l}(this.ids,this.coords,e,t,n,r,this.nodeSize)}within(e,t,n){return function(e,t,n,r,i,o){const a=[0,e.length-1,0],s=[],l=i*i;for(;a.length;){const c=a.pop(),u=a.pop(),d=a.pop();if(u-d<=o){for(let i=d;i<=u;i++)ht(t[2*i],t[2*i+1],n,r)<=l&&s.push(e[i]);continue}const f=Math.floor((d+u)/2),h=t[2*f],p=t[2*f+1];ht(h,p,n,r)<=l&&s.push(e[f]);const g=(c+1)%2;(0===c?n-i<=h:r-i<=p)&&(a.push(d),a.push(f-1),a.push(g)),(0===c?n+i>=h:r+i>=p)&&(a.push(f+1),a.push(u),a.push(g))}return s}(this.ids,this.coords,e,t,n,this.nodeSize)}}var vt="NOT_FOUND";var At=function(e,t){return e===t};function yt(e,t){var n="object"===typeof t?t:{equalityCheck:t},r=n.equalityCheck,i=void 0===r?At:r,o=n.maxSize,a=void 0===o?1:o,s=n.resultEqualityCheck,l=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 vt}return{get:r,put:function(t,i){r(t)===vt&&(n.unshift({key:t,value:i}),n.length>e&&n.pop())},getEntries:function(){return n},clear:function(){n=[]}}}(a,l);function u(){var t=c.get(arguments);if(t===vt){if(t=e.apply(null,arguments),s){var n=c.getEntries().find((function(e){return s(e.value,t)}));n&&(t=n.value)}c.put(arguments,t)}return t}return u.clearCache=function(){return c.clear()},u}function bt(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r{},makeClusterId:e=>"{[".concat(e,"]}")};function Et(e){const{index:t}=e;return null!=t}function St(e){const{id:t}=e;return null!=t}function Ct(e,t,n,r){const{getLocationLon:i,getLocationLat:o,getLocationId:a}=t,s=Object.assign(Object.assign({},xt),r),{minZoom:l,maxZoom:c,nodeSize:u,makeClusterName:d,makeClusterId:f}=s,h=new Array(c+1);let p=new Array,g=0;for(const E of e){const e=i(E),t=o(E);p.push({x:(m=e,m/360+.5),y:Ot(t),weight:n(a(E)),zoom:1/0,index:g,parentId:-1,location:E}),g++}var m;h[c+1]=new mt(p,Rt,It,u,Float32Array);let v=c+1;for(let E=c;E>=l;E--){const e=Tt(p,E,h[v],s);e.length===p.length?(h[E]=h[v],h[v]=void 0,v=E,p=e):(v=E,p=e,h[E]=new mt(p,Rt,It,u,Float32Array))}if(0===h.length)return[];const A=h.map((e=>null===e||void 0===e?void 0:e.points.length)),y=(0,nt.Z)(A.filter((e=>e>0))),b=function(e,t){const{getLocationLon:n,getLocationLat:r}=t,i=new Map;let o=0;for(const s of e){const e=n(s),t=r(s),a="".concat(e,",").concat(t),l=i.get(a);i.set(a,l?l+1:1),o++}let a=0;for(const[s,l]of i)l>1&&a++;return o-a}(e,t);let _=A.indexOf(b);b=w;E--){let e;const t=h[E];if(!t)continue;E<_&&(e=st(h[v].points,(e=>e.map((e=>e.id?f(e.id):a(e.location)))),(e=>e.parentId)));const n=[];for(const r of t.points){const{x:t,y:s,numPoints:l,location:c}=r;if(Et(r))n.push({id:a(c),zoom:E,lat:o(c),lon:i(c)});else if(St(r)){const{id:i}=r,o=e&&e.get(i);if(!o)throw new Error("Cluster ".concat(i," doesn't have children"));n.push({id:f(i),name:d(i,l),zoom:E,lat:Mt(s),lon:kt(t),children:o})}}x.push({zoom:E,nodes:n}),v=E}return x}function Pt(e,t,n,r,i){return{x:e,y:t,zoom:1/0,id:n,parentId:-1,numPoints:r,weight:i}}function Tt(e,t,n,r){const i=[],{radius:o,extent:a}=r,s=o/(a*Math.pow(2,t));for(let l=0;l1?1:n}function Rt(e){return e.x}function It(e){return e.y}var Lt=n(62145);class Nt{constructor(e){this.getLocationId=e=>x(e)?e.id:this.accessors.getLocationId(e),this.getLocationName=e=>{let t;return x(e)&&w(e)?t=e.name:this.accessors.getLocationName&&(t=this.accessors.getLocationName(e)),t||(t="".concat(this.getLocationId(e))),t},this.getLocationLat=e=>x(e)?e.lat:this.accessors.getLocationLat(e),this.getLocationLon=e=>x(e)?e.lon:this.accessors.getLocationLon(e),this.getFlowOriginId=e=>E(e)?e.origin:this.accessors.getFlowOriginId(e),this.getFlowDestId=e=>E(e)?e.dest:this.accessors.getFlowDestId(e),this.getFlowMagnitude=e=>E(e)?e.count:this.accessors.getFlowMagnitude(e),this.getFlowTime=e=>{const{getFlowTime:t}=this.accessors;return t?t(e):void 0},this.accessors=e}setAccessors(e){this.accessors=e}getFlowmapDataAccessors(){return this.accessors}}var Dt=n(1384);const Ft=function(e){const t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=new Dt.DW(Object.assign(Object.assign({},e),{width:e.width+2*t,height:e.height+2*t})).getBounds();return[n[0][0],n[0][1],n[1][0],n[1][1]]},jt=e=>{if(e)return(0,be.Z)().range([.025,.5]).domain([0,Math.max.apply(null,e.map((e=>Math.abs(e||0))))])};var Bt=new Date,Zt=new Date;function zt(e,t,n,r){function i(t){return e(t=0===arguments.length?new Date:new Date(+t)),t}return i.floor=function(t){return e(t=new Date(+t)),t},i.ceil=function(n){return e(n=new Date(n-1)),t(n,1),e(n),n},i.round=function(e){var t=i(e),n=i.ceil(e);return e-t0))return s;do{s.push(a=new Date(+n)),t(n,o),e(n)}while(a=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&&(i.count=function(t,r){return Bt.setTime(+t),Zt.setTime(+r),e(Bt),e(Zt),Math.floor(n(Bt,Zt))},i.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?i.filter(r?function(t){return r(t)%e===0}:function(t){return i.count(0,t)%e===0}):i:null}),i}const Ut=1e3,Ht=6e4,Vt=36e5,Wt=864e5,Gt=6048e5;function Kt(e){return zt((function(t){t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCDate(e.getUTCDate()+7*t)}),(function(e,t){return(t-e)/Gt}))}var qt=Kt(0),Yt=Kt(1),Xt=Kt(2),$t=Kt(3),Qt=Kt(4),Jt=Kt(5),en=Kt(6),tn=(qt.range,Yt.range,Xt.range,$t.range,Qt.range,Jt.range,en.range,zt((function(e){e.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCDate(e.getUTCDate()+t)}),(function(e,t){return(t-e)/Wt}),(function(e){return e.getUTCDate()-1})));const nn=tn;tn.range;function rn(e){return zt((function(t){t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)}),(function(e,t){e.setDate(e.getDate()+7*t)}),(function(e,t){return(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Ht)/Gt}))}var on=rn(0),an=rn(1),sn=rn(2),ln=rn(3),cn=rn(4),un=rn(5),dn=rn(6),fn=(on.range,an.range,sn.range,ln.range,cn.range,un.range,dn.range,zt((e=>e.setHours(0,0,0,0)),((e,t)=>e.setDate(e.getDate()+t)),((e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Ht)/Wt),(e=>e.getDate()-1)));const hn=fn;fn.range;var pn=zt((function(e){e.setMonth(0,1),e.setHours(0,0,0,0)}),(function(e,t){e.setFullYear(e.getFullYear()+t)}),(function(e,t){return t.getFullYear()-e.getFullYear()}),(function(e){return e.getFullYear()}));pn.every=function(e){return isFinite(e=Math.floor(e))&&e>0?zt((function(t){t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)}),(function(t,n){t.setFullYear(t.getFullYear()+n*e)})):null};const gn=pn;pn.range;var mn=zt((function(e){e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCFullYear(e.getUTCFullYear()+t)}),(function(e,t){return t.getUTCFullYear()-e.getUTCFullYear()}),(function(e){return e.getUTCFullYear()}));mn.every=function(e){return isFinite(e=Math.floor(e))&&e>0?zt((function(t){t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),(function(t,n){t.setUTCFullYear(t.getUTCFullYear()+n*e)})):null};const vn=mn;mn.range;function An(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function yn(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function bn(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}var _n,wn,xn,En={"-":"",_:" ",0:"0"},Sn=/^\s*\d+/,Cn=/^%/,Pn=/[\\^$*+?|[\]().{}]/g;function Tn(e,t,n){var r=e<0?"-":"",i=(r?-e:e)+"",o=i.length;return r+(o[e.toLowerCase(),t])))}function Rn(e,t,n){var r=Sn.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function In(e,t,n){var r=Sn.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function Ln(e,t,n){var r=Sn.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function Nn(e,t,n){var r=Sn.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function Dn(e,t,n){var r=Sn.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function Fn(e,t,n){var r=Sn.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function jn(e,t,n){var r=Sn.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function Bn(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function Zn(e,t,n){var r=Sn.exec(t.slice(n,n+1));return r?(e.q=3*r[0]-3,n+r[0].length):-1}function zn(e,t,n){var r=Sn.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function Un(e,t,n){var r=Sn.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function Hn(e,t,n){var r=Sn.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function Vn(e,t,n){var r=Sn.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function Wn(e,t,n){var r=Sn.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function Gn(e,t,n){var r=Sn.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function Kn(e,t,n){var r=Sn.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function qn(e,t,n){var r=Sn.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function Yn(e,t,n){var r=Cn.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function Xn(e,t,n){var r=Sn.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function $n(e,t,n){var r=Sn.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function Qn(e,t){return Tn(e.getDate(),t,2)}function Jn(e,t){return Tn(e.getHours(),t,2)}function er(e,t){return Tn(e.getHours()%12||12,t,2)}function tr(e,t){return Tn(1+hn.count(gn(e),e),t,3)}function nr(e,t){return Tn(e.getMilliseconds(),t,3)}function rr(e,t){return nr(e,t)+"000"}function ir(e,t){return Tn(e.getMonth()+1,t,2)}function or(e,t){return Tn(e.getMinutes(),t,2)}function ar(e,t){return Tn(e.getSeconds(),t,2)}function sr(e){var t=e.getDay();return 0===t?7:t}function lr(e,t){return Tn(on.count(gn(e)-1,e),t,2)}function cr(e){var t=e.getDay();return t>=4||0===t?cn(e):cn.ceil(e)}function ur(e,t){return e=cr(e),Tn(cn.count(gn(e),e)+(4===gn(e).getDay()),t,2)}function dr(e){return e.getDay()}function fr(e,t){return Tn(an.count(gn(e)-1,e),t,2)}function hr(e,t){return Tn(e.getFullYear()%100,t,2)}function pr(e,t){return Tn((e=cr(e)).getFullYear()%100,t,2)}function gr(e,t){return Tn(e.getFullYear()%1e4,t,4)}function mr(e,t){var n=e.getDay();return Tn((e=n>=4||0===n?cn(e):cn.ceil(e)).getFullYear()%1e4,t,4)}function vr(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+Tn(t/60|0,"0",2)+Tn(t%60,"0",2)}function Ar(e,t){return Tn(e.getUTCDate(),t,2)}function yr(e,t){return Tn(e.getUTCHours(),t,2)}function br(e,t){return Tn(e.getUTCHours()%12||12,t,2)}function _r(e,t){return Tn(1+nn.count(vn(e),e),t,3)}function wr(e,t){return Tn(e.getUTCMilliseconds(),t,3)}function xr(e,t){return wr(e,t)+"000"}function Er(e,t){return Tn(e.getUTCMonth()+1,t,2)}function Sr(e,t){return Tn(e.getUTCMinutes(),t,2)}function Cr(e,t){return Tn(e.getUTCSeconds(),t,2)}function Pr(e){var t=e.getUTCDay();return 0===t?7:t}function Tr(e,t){return Tn(qt.count(vn(e)-1,e),t,2)}function kr(e){var t=e.getUTCDay();return t>=4||0===t?Qt(e):Qt.ceil(e)}function Mr(e,t){return e=kr(e),Tn(Qt.count(vn(e),e)+(4===vn(e).getUTCDay()),t,2)}function Or(e){return e.getUTCDay()}function Rr(e,t){return Tn(Yt.count(vn(e)-1,e),t,2)}function Ir(e,t){return Tn(e.getUTCFullYear()%100,t,2)}function Lr(e,t){return Tn((e=kr(e)).getUTCFullYear()%100,t,2)}function Nr(e,t){return Tn(e.getUTCFullYear()%1e4,t,4)}function Dr(e,t){var n=e.getUTCDay();return Tn((e=n>=4||0===n?Qt(e):Qt.ceil(e)).getUTCFullYear()%1e4,t,4)}function Fr(){return"+0000"}function jr(){return"%"}function Br(e){return+e}function Zr(e){return Math.floor(+e/1e3)}_n=function(e){var t=e.dateTime,n=e.date,r=e.time,i=e.periods,o=e.days,a=e.shortDays,s=e.months,l=e.shortMonths,c=Mn(i),u=On(i),d=Mn(o),f=On(o),h=Mn(a),p=On(a),g=Mn(s),m=On(s),v=Mn(l),A=On(l),y={a:function(e){return a[e.getDay()]},A:function(e){return o[e.getDay()]},b:function(e){return l[e.getMonth()]},B:function(e){return s[e.getMonth()]},c:null,d:Qn,e:Qn,f:rr,g:pr,G:mr,H:Jn,I:er,j:tr,L:nr,m:ir,M:or,p:function(e){return i[+(e.getHours()>=12)]},q:function(e){return 1+~~(e.getMonth()/3)},Q:Br,s:Zr,S:ar,u:sr,U:lr,V:ur,w:dr,W:fr,x:null,X:null,y:hr,Y:gr,Z:vr,"%":jr},b={a:function(e){return a[e.getUTCDay()]},A:function(e){return o[e.getUTCDay()]},b:function(e){return l[e.getUTCMonth()]},B:function(e){return s[e.getUTCMonth()]},c:null,d:Ar,e:Ar,f:xr,g:Lr,G:Dr,H:yr,I:br,j:_r,L:wr,m:Er,M:Sr,p:function(e){return i[+(e.getUTCHours()>=12)]},q:function(e){return 1+~~(e.getUTCMonth()/3)},Q:Br,s:Zr,S:Cr,u:Pr,U:Tr,V:Mr,w:Or,W:Rr,x:null,X:null,y:Ir,Y:Nr,Z:Fr,"%":jr},_={a:function(e,t,n){var r=h.exec(t.slice(n));return r?(e.w=p.get(r[0].toLowerCase()),n+r[0].length):-1},A:function(e,t,n){var r=d.exec(t.slice(n));return r?(e.w=f.get(r[0].toLowerCase()),n+r[0].length):-1},b:function(e,t,n){var r=v.exec(t.slice(n));return r?(e.m=A.get(r[0].toLowerCase()),n+r[0].length):-1},B:function(e,t,n){var r=g.exec(t.slice(n));return r?(e.m=m.get(r[0].toLowerCase()),n+r[0].length):-1},c:function(e,n,r){return E(e,t,n,r)},d:Un,e:Un,f:qn,g:jn,G:Fn,H:Vn,I:Vn,j:Hn,L:Kn,m:zn,M:Wn,p:function(e,t,n){var r=c.exec(t.slice(n));return r?(e.p=u.get(r[0].toLowerCase()),n+r[0].length):-1},q:Zn,Q:Xn,s:$n,S:Gn,u:In,U:Ln,V:Nn,w:Rn,W:Dn,x:function(e,t,r){return E(e,n,t,r)},X:function(e,t,n){return E(e,r,t,n)},y:jn,Y:Fn,Z:Bn,"%":Yn};function w(e,t){return function(n){var r,i,o,a=[],s=-1,l=0,c=e.length;for(n instanceof Date||(n=new Date(+n));++s53)return null;"w"in o||(o.w=1),"Z"in o?(i=(r=yn(bn(o.y,0,1))).getUTCDay(),r=i>4||0===i?Yt.ceil(r):Yt(r),r=nn.offset(r,7*(o.V-1)),o.y=r.getUTCFullYear(),o.m=r.getUTCMonth(),o.d=r.getUTCDate()+(o.w+6)%7):(i=(r=An(bn(o.y,0,1))).getDay(),r=i>4||0===i?an.ceil(r):an(r),r=hn.offset(r,7*(o.V-1)),o.y=r.getFullYear(),o.m=r.getMonth(),o.d=r.getDate()+(o.w+6)%7)}else("W"in o||"U"in o)&&("w"in o||(o.w="u"in o?o.u%7:"W"in o?1:0),i="Z"in o?yn(bn(o.y,0,1)).getUTCDay():An(bn(o.y,0,1)).getDay(),o.m=0,o.d="W"in o?(o.w+6)%7+7*o.W-(i+5)%7:o.w+7*o.U-(i+6)%7);return"Z"in o?(o.H+=o.Z/100|0,o.M+=o.Z%100,yn(o)):An(o)}}function E(e,t,n,r){for(var i,o,a=0,s=t.length,l=n.length;a=l)return-1;if(37===(i=t.charCodeAt(a++))){if(i=t.charAt(a++),!(o=_[i in En?t.charAt(a++):i])||(r=o(e,n,r))<0)return-1}else if(i!=n.charCodeAt(r++))return-1}return r}return y.x=w(n,y),y.X=w(r,y),y.c=w(t,y),b.x=w(n,b),b.X=w(r,b),b.c=w(t,b),{format:function(e){var t=w(e+="",y);return t.toString=function(){return e},t},parse:function(e){var t=x(e+="",!1);return t.toString=function(){return e},t},utcFormat:function(e){var t=w(e+="",b);return t.toString=function(){return e},t},utcParse:function(e){var t=x(e+="",!0);return t.toString=function(){return e},t}}}({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]}),wn=_n.format,xn=_n.parse,_n.utcFormat,_n.utcParse;var zr=zt((function(e){e.setTime(e-e.getMilliseconds())}),(function(e,t){e.setTime(+e+t*Ut)}),(function(e,t){return(t-e)/Ut}),(function(e){return e.getUTCSeconds()}));const Ur=zr;zr.range;var Hr=zt((function(e){e.setTime(e-e.getMilliseconds()-e.getSeconds()*Ut)}),(function(e,t){e.setTime(+e+t*Ht)}),(function(e,t){return(t-e)/Ht}),(function(e){return e.getMinutes()}));const Vr=Hr;Hr.range;var Wr=zt((function(e){e.setTime(e-e.getMilliseconds()-e.getSeconds()*Ut-e.getMinutes()*Ht)}),(function(e,t){e.setTime(+e+t*Vt)}),(function(e,t){return(t-e)/Vt}),(function(e){return e.getHours()}));const Gr=Wr;Wr.range;var Kr=zt((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()}));const qr=Kr;Kr.range;xn("%Y-%m-%d"),xn("%Y-%m-%d %H:%M"),xn("%Y-%m-%d %H:%M:%S"),xn("%Y"),xn("%Y-%m");var Yr;!function(e){e.SECOND="SECOND",e.MINUTE="MINUTE",e.HOUR="HOUR",e.DAY="DAY",e.MONTH="MONTH",e.YEAR="YEAR"}(Yr||(Yr={}));wn(".%L");const Xr=wn(":%S"),$r=wn("%I:%M"),Qr=wn("%I %p"),Jr=wn("%a %d"),ei=(wn("%b %d"),wn("%b")),ti=wn("%Y");const ni=[{order:0,key:Yr.SECOND,interval:Ur,format:Xr,formatFull:wn("%Y-%m-%d %H:%M:%S")},{order:1,key:Yr.MINUTE,interval:Vr,format:$r,formatFull:wn("%Y-%m-%d %H:%M")},{order:2,key:Yr.HOUR,interval:Gr,format:Qr,formatFull:wn("%a %d %b %Y, %I %p")},{order:3,key:Yr.DAY,interval:hn,format:Jr,formatFull:wn("%a %d %b %Y")},{order:4,key:Yr.MONTH,interval:qr,format:ei,formatFull:wn("%b %Y")},{order:5,key:Yr.YEAR,interval:gn,format:ti,formatFull:wn("%Y")}];function ri(e){return ni.find((t=>t.key===e))}class ii{constructor(e){this.getFlowsFromProps=(e,t)=>t.flows,this.getLocationsFromProps=(e,t)=>t.locations,this.getClusterLevelsFromProps=(e,t)=>t.clusterLevels,this.getMaxTopFlowsDisplayNum=(e,t)=>e.settings.maxTopFlowsDisplayNum,this.getSelectedLocations=(e,t)=>{var n;return null===(n=e.filter)||void 0===n?void 0:n.selectedLocations},this.getLocationFilterMode=(e,t)=>{var n;return null===(n=e.filter)||void 0===n?void 0:n.locationFilterMode},this.getClusteringEnabled=(e,t)=>e.settings.clusteringEnabled,this.getLocationTotalsEnabled=(e,t)=>e.settings.locationTotalsEnabled,this.getLocationLabelsEnabled=(e,t)=>e.settings.locationLabelsEnabled,this.getZoom=(e,t)=>e.viewport.zoom,this.getViewport=(e,t)=>e.viewport,this.getSelectedTimeRange=(e,t)=>{var n;return null===(n=e.filter)||void 0===n?void 0:n.selectedTimeRange},this.getColorScheme=(e,t)=>e.settings.colorScheme,this.getDarkMode=(e,t)=>e.settings.darkMode,this.getFadeEnabled=(e,t)=>e.settings.fadeEnabled,this.getFadeOpacityEnabled=(e,t)=>e.settings.fadeOpacityEnabled,this.getFadeAmount=(e,t)=>e.settings.fadeAmount,this.getAnimate=(e,t)=>e.settings.animationEnabled,this.getInvalidLocationIds=_t(this.getLocationsFromProps,(e=>{if(!e)return;const t=[];for(const n of e){const e=this.accessors.getLocationId(n),r=this.accessors.getLocationLon(n),i=this.accessors.getLocationLat(n);-90<=i&&i<=90&&-180<=r&&r<=180||t.push(e)}return t.length>0?t:void 0})),this.getLocations=_t(this.getLocationsFromProps,this.getInvalidLocationIds,((e,t)=>{if(!e)return;if(!t||0===t.length)return e;const n=new Set(t),r=[];for(const i of e){const e=this.accessors.getLocationId(i);n.has(e)||r.push(i)}return r})),this.getLocationIds=_t(this.getLocations,(e=>{if(!e)return;const t=new Set;for(const n of e)t.add(this.accessors.getLocationId(n));return t})),this.getSelectedLocationsSet=_t(this.getSelectedLocations,(e=>e&&e.length>0?new Set(e):void 0)),this.getSortedFlowsForKnownLocations=_t(this.getFlowsFromProps,this.getLocationIds,((e,t)=>{if(!t||!e)return;const n=[];for(const r of e){const e=this.accessors.getFlowOriginId(r),i=this.accessors.getFlowDestId(r);t.has(e)&&t.has(i)&&n.push(r)}return n.sort(((e,t)=>(0,tt.Z)(Math.abs(this.accessors.getFlowMagnitude(e)),Math.abs(this.accessors.getFlowMagnitude(t)))))})),this.getActualTimeExtent=_t(this.getSortedFlowsForKnownLocations,(e=>{if(!e)return;let t=null,n=null;for(const r of e){const e=this.accessors.getFlowTime(r);e&&((null==t||t>e)&&(t=e),(null==n||n{if(!e||!t)return;const n=(0,nt.Z)(e,(e=>{const t=this.accessors.getFlowTime(e);return t?function(e){let t;for(const n of ni){const{interval:r}=n;if(r(e)e.order===i)));var i;return r?r.key:void 0})),this.getTimeExtent=_t(this.getActualTimeExtent,this.getTimeGranularityKey,((e,t)=>{const n=t?ri(t):void 0;if(!e||!(null===n||void 0===n?void 0:n.interval))return;const{interval:r}=n;return[e[0],r.offset(r.floor(e[1]),1)]})),this.getSortedFlowsForKnownLocationsFilteredByTime=_t(this.getSortedFlowsForKnownLocations,this.getTimeExtent,this.getSelectedTimeRange,((e,t,n)=>{if(e)return!t||!n||t[0]===n[0]&&t[1]===n[1]?e:e.filter((e=>{const t=this.accessors.getFlowTime(e);return t&&n[0]<=t&&t{if(!t||!e)return t;const n=new Set;for(const i of e)n.add(this.accessors.getFlowOriginId(i)),n.add(this.accessors.getFlowDestId(i));const r=[];for(const i of t)n.has(this.accessors.getLocationId(i))&&r.push(i);return r})),this.getLocationsById=_t(this.getLocationsHavingFlows,(e=>{if(!e)return;const t=new Map;for(const n of e)t.set(this.accessors.getLocationId(n),n);return t})),this.getLocationWeightGetter=_t(this.getSortedFlowsForKnownLocations,(e=>{if(!e)return;const t=function(e,t){let{getFlowOriginId:n,getFlowDestId:r,getFlowMagnitude:i}=t;const o={incoming:new Map,outgoing:new Map};for(const a of e){const e=n(a),t=r(a),s=i(a);o.incoming.set(t,(o.incoming.get(t)||0)+s),o.outgoing.set(e,(o.outgoing.get(e)||0)+s)}return e=>Math.max(Math.abs(o.incoming.get(e)||0),Math.abs(o.outgoing.get(e)||0))}(e,this.accessors.getFlowmapDataAccessors());return t})),this.getClusterLevels=_t(this.getClusterLevelsFromProps,this.getLocationsHavingFlows,this.getLocationWeightGetter,((e,t,n)=>{if(e)return e;if(!t||!n)return;return Ct(t,this.accessors.getFlowmapDataAccessors(),n,{maxZoom:20})})),this.getClusterIndex=_t(this.getLocationsById,this.getLocationWeightGetter,this.getClusterLevels,((e,t,n)=>{if(!e||!t||!n)return;const r=function(e){const t=new Map,n=new Map,r=new Map;for(const{zoom:c,nodes:u}of e){t.set(c,u);for(const e of u)if(w(e))n.set(e.id,e);else{const{id:t}=e,n=r.get(t);(null==n||n>c)&&r.set(t,c)}}const[i,o]=rt(e,(e=>e.zoom));if(null==i||null==o)throw new Error("Could not determine minZoom or maxZoom");const a=new Map;for(const c of n.values()){const{zoom:e}=c;let t=a.get(e);t||(t=new Map,a.set(e,t)),s(c,(e=>{null===t||void 0===t||t.set(e,c)}))}function s(e,t){for(const r of e.children){const e=n.get(r);e?s(e,t):t(r)}}function l(e,t){const n=a.get(t);if(!n)return;const r=n.get(e);return r?r.id:void 0}return{availableZoomLevels:e.map((e=>+e.zoom)).sort(((e,t)=>(0,it.Z)(e,t))),getClusterNodesFor:e=>{if(void 0!==e)return t.get(e)},getClusterById:e=>n.get(e),getMinZoomForLocation:e=>r.get(e)||i,expandCluster:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o;const r=[],i=(e,r)=>{if(t>e.zoom)for(const t of e.children){const e=n.get(t);e?i(e,r):r.push(t)}else r.push(e.id)};return i(e,r),r},findClusterFor:l,aggregateFlows:function(e,t,n){let{getFlowOriginId:r,getFlowDestId:i,getFlowMagnitude:a}=n,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};if(t>o)return e;const c=[],u=new Map,d=(e,t)=>"".concat(e,":").concat(t),{flowCountsMapReduce:f={map:a,reduce:(e,t)=>(e||0)+t}}=s;for(const o of e){const e=r(o),n=i(o),a=l(e,t)||e,s=l(n,t)||n,h=d(a,s);if(a===e&&s===n)c.push(o);else{let e=u.get(h);e?e.count=f.reduce(e.count,f.map(o)):(e={origin:a,dest:s,count:f.map(o),aggregate:!0},c.push(e),u.set(h,e))}}return c}}}(n);return function(e,t,n,r,i){const{getLocationId:o,getLocationName:a,getLocationClusterName:s}=r,l=e=>{const t=n.get(e);return t?a?a(t):o(t)||e:'"'.concat(e,'"')};for(const c of t)for(const t of c.nodes)if(w(t)){const n=e.expandCluster(t);if(n.sort(((e,t)=>(0,tt.Z)(i(e),i(t)))),s)t.name=s(n);else{const e=n[0],r=2===n.length?n[1]:void 0;t.name='"'.concat(l(e),'" and ').concat(r?'"'.concat(l(r),'"'):"".concat(n.length-1," others"))}}else t.name=l(t.id)}(r,n,e,this.accessors.getFlowmapDataAccessors(),t),r})),this.getAvailableClusterZoomLevels=_t(this.getClusterIndex,this.getSelectedLocations,((e,t)=>{if(!e)return;let n=Number.POSITIVE_INFINITY,r=Number.NEGATIVE_INFINITY;const i=t=>{const i=e.getClusterById(t);if(i)r=Math.max(r,i.zoom),n=Math.min(n,i.zoom);else{const n=e.getMinZoomForLocation(t);r=Math.max(r,n)}};if(t)for(const o of t)i(o);return e.availableZoomLevels.filter((e=>r<=e&&e<=n))})),this._getClusterZoom=_t(this.getClusterIndex,this.getZoom,this.getAvailableClusterZoomLevels,((e,t,n)=>{if(!e)return;if(!n||null==t)return;return function(e,t){if(!e.length)throw new Error("No available zoom levels");return e[Math.min((0,Lt.Nw)(e,Math.floor(t)),e.length-1)]}(n,t)})),this.getClusterZoom=(e,t)=>{const{settings:n}=e;if(n.clusteringEnabled)return n.clusteringAuto||null==n.clusteringLevel?this._getClusterZoom(e,t):n.clusteringLevel},this.getLocationsForSearchBox=_t(this.getClusteringEnabled,this.getLocationsHavingFlows,this.getSelectedLocations,this.getClusterZoom,this.getClusterIndex,((e,t,n,r,i)=>{if(!t)return;let o=Array.from(t);if(i&&n){const e=[];for(const t of n){const n=i.getClusterById(t);n&&!o.find((e=>(x(e)?e.id:this.accessors.getLocationId(e))===t))&&e.push(n)}e.length>0&&(o=o.concat(e))}return o})),this.getDiffMode=_t(this.getFlowsFromProps,(e=>{if(e)for(const t of e)if(this.accessors.getFlowMagnitude(t)<0)return!0;return!1})),this._getFlowmapColors=_t(this.getDiffMode,this.getColorScheme,this.getDarkMode,this.getFadeEnabled,this.getFadeOpacityEnabled,this.getFadeAmount,this.getAnimate,et),this.getFlowmapColorsRGBA=_t(this._getFlowmapColors,(e=>function(e){return void 0!==e.positive}(e)?function(e){const t=Je(e);return Object.assign(Object.assign({},t),{positive:Qe(e&&e.positive,Ie,t.darkMode),negative:Qe(e&&e.negative,Le,t.darkMode)})}(e):function(e){const t=Je(e);return Object.assign(Object.assign({},t),Qe(e,Oe,t.darkMode))}(e))),this.getUnknownLocations=_t(this.getLocationIds,this.getFlowsFromProps,this.getSortedFlowsForKnownLocations,((e,t,n)=>{if(!e||!t)return;if(n)return;const r=new Set;for(const i of t)e.has(this.accessors.getFlowOriginId(i))||r.add(this.accessors.getFlowOriginId(i)),e.has(this.accessors.getFlowDestId(i))||r.add(this.accessors.getFlowDestId(i));return r})),this.getSortedAggregatedFilteredFlows=_t(this.getClusterIndex,this.getClusteringEnabled,this.getSortedFlowsForKnownLocationsFilteredByTime,this.getClusterZoom,this.getTimeExtent,((e,t,n,r,i)=>{if(!n)return;let o;return o=t&&e&&null!=r?e.aggregateFlows(n,r,this.accessors.getFlowmapDataAccessors()):function(e,t){const n=st(e,(e=>({aggregate:!0,origin:t.getFlowOriginId(e[0]),dest:t.getFlowDestId(e[0]),count:e.reduce(((e,n)=>{const r=t.getFlowMagnitude(n);return r&&!isNaN(r)&&isFinite(r)?e+r:e}),0)})),t.getFlowOriginId,t.getFlowDestId),r=[];for(const i of n.values())for(const e of i.values())r.push(e);return r}(n,this.accessors.getFlowmapDataAccessors()),o.sort(((e,t)=>(0,tt.Z)(Math.abs(this.accessors.getFlowMagnitude(e)),Math.abs(this.accessors.getFlowMagnitude(t))))),o})),this.getExpandedSelectedLocationsSet=_t(this.getClusteringEnabled,this.getSelectedLocationsSet,this.getClusterIndex,((e,t,n)=>{if(!t||!n)return t;const r=new Set;for(const i of t){const e=n.getClusterById(i);if(e){const t=n.expandCluster(e);for(const e of t)r.add(e)}else r.add(i)}return r})),this.getTotalCountsByTime=_t(this.getSortedFlowsForKnownLocations,this.getTimeGranularityKey,this.getTimeExtent,this.getExpandedSelectedLocationsSet,this.getLocationFilterMode,((e,t,n,r,i)=>{const o=t?ri(t):void 0;if(!e||!o||!n)return;const a=e.reduce(((e,t)=>{var n;if(this.isFlowInSelection(t,r,i)){const r=o.interval(this.accessors.getFlowTime(t)).getTime();e.set(r,(null!==(n=e.get(r))&&void 0!==n?n:0)+this.accessors.getFlowMagnitude(t))}return e}),new Map);return Array.from(a.entries()).map((e=>{let[t,n]=e;return{time:new Date(t),count:n}}))})),this.getMaxLocationCircleSize=_t(this.getLocationTotalsEnabled,(e=>e?17:1)),this.getViewportBoundingBox=_t(this.getViewport,this.getMaxLocationCircleSize,Ft),this.getLocationsForZoom=_t(this.getClusteringEnabled,this.getLocationsHavingFlows,this.getClusterIndex,this.getClusterZoom,((e,t,n,r)=>e&&n?n.getClusterNodesFor(r):t)),this.getLocationTotals=_t(this.getLocationsForZoom,this.getSortedAggregatedFilteredFlows,this.getSelectedLocationsSet,this.getLocationFilterMode,((e,t,n,r)=>{if(!t)return;const i=new Map,o=(e,t)=>{var n;const r=null!==(n=i.get(e))&&void 0!==n?n:{incomingCount:0,outgoingCount:0,internalCount:0};return null!=t.incomingCount&&(r.incomingCount+=t.incomingCount),null!=t.outgoingCount&&(r.outgoingCount+=t.outgoingCount),null!=t.internalCount&&(r.internalCount+=t.internalCount),r};for(const a of t)if(this.isFlowInSelection(a,n,r)){const e=this.accessors.getFlowOriginId(a),t=this.accessors.getFlowDestId(a),n=this.accessors.getFlowMagnitude(a);e===t?i.set(e,o(e,{internalCount:n})):(i.set(e,o(e,{outgoingCount:n})),i.set(t,o(t,{incomingCount:n})))}return i})),this.getLocationsTree=_t(this.getLocationsForZoom,(e=>{if(e)return new mt(e,(e=>ai(this.accessors.getLocationLon(e))),(e=>si(this.accessors.getLocationLat(e))))})),this._getLocationIdsInViewport=_t(this.getLocationsTree,this.getViewportBoundingBox,((e,t)=>{const n=this._getLocationsInBboxIndices(e,t);if(n)return new Set(n.map((t=>e.points[t].id)))})),this.getLocationIdsInViewport=bt(yt,((e,t,n)=>{if(e===t)return!0;if(null==e||null==t)return!1;if(e.size!==t.size)return!1;for(const r of e)if(!t.has(r))return!1;return!0}))(this._getLocationIdsInViewport,(e=>{if(e)return e})),this.getTotalUnfilteredCount=_t(this.getSortedFlowsForKnownLocations,(e=>{if(e)return e.reduce(((e,t)=>e+this.accessors.getFlowMagnitude(t)),0)})),this.getTotalFilteredCount=_t(this.getSortedAggregatedFilteredFlows,this.getSelectedLocationsSet,this.getLocationFilterMode,((e,t,n)=>{if(!e)return;return e.reduce(((e,r)=>this.isFlowInSelection(r,t,n)?e+this.accessors.getFlowMagnitude(r):e),0)})),this._getLocationTotalsExtent=_t(this.getLocationTotals,(e=>oi(e,void 0))),this._getLocationTotalsForViewportExtent=_t(this.getLocationTotals,this.getLocationIdsInViewport,((e,t)=>oi(e,t))),this.getLocationTotalsExtent=(e,t)=>e.settings.adaptiveScalesEnabled?this._getLocationTotalsForViewportExtent(e,t):this._getLocationTotalsExtent(e,t),this.getFlowsForFlowmapLayer=_t(this.getSortedAggregatedFilteredFlows,this.getLocationIdsInViewport,this.getSelectedLocationsSet,this.getLocationFilterMode,this.getMaxTopFlowsDisplayNum,((e,t,n,r,i)=>{if(!e||!t)return;const o=[];let a=0;for(const s of e){const e=this.accessors.getFlowOriginId(s),l=this.accessors.getFlowDestId(s);if((t.has(e)||t.has(l))&&this.isFlowInSelection(s,n,r)&&e!==l&&(o.push(s),a++),a>i)break}return o.reverse()})),this._getFlowMagnitudeExtent=_t(this.getSortedAggregatedFilteredFlows,this.getSelectedLocationsSet,this.getLocationFilterMode,((e,t,n)=>{if(!e)return;let r;for(const i of e)if(this.accessors.getFlowOriginId(i)!==this.accessors.getFlowDestId(i)&&this.isFlowInSelection(i,t,n)){const e=this.accessors.getFlowMagnitude(i);null==r?r=[e,e]:(er[1]&&(r[1]=e))}return r})),this._getAdaptiveFlowMagnitudeExtent=_t(this.getFlowsForFlowmapLayer,(e=>{if(!e)return;const t=rt(e,this.accessors.getFlowMagnitude);return void 0!==t[0]&&void 0!==t[1]?t:void 0})),this.getFlowMagnitudeExtent=(e,t)=>e.settings.adaptiveScalesEnabled?this._getAdaptiveFlowMagnitudeExtent(e,t):this._getFlowMagnitudeExtent(e,t),this.getLocationMaxAbsTotalGetter=_t(this.getLocationTotals,(e=>t=>{const n=null===e||void 0===e?void 0:e.get(t);if(n)return Math.max(Math.abs(n.incomingCount+n.internalCount),Math.abs(n.outgoingCount+n.internalCount))})),this.getFlowThicknessScale=_t(this.getFlowMagnitudeExtent,jt),this.getCircleSizeScale=_t(this.getMaxLocationCircleSize,this.getLocationTotalsEnabled,this.getLocationTotalsExtent,((e,t,n)=>t?n?(0,_e._b)().range([0,e]).domain([0,Math.max.apply(null,n.map((e=>Math.abs(e||0))))]):void 0:()=>e)),this.getInCircleSizeGetter=_t(this.getCircleSizeScale,this.getLocationTotals,((e,t)=>n=>{const r=null===t||void 0===t?void 0:t.get(n);return r&&e&&e(Math.abs(r.incomingCount+r.internalCount))||0})),this.getOutCircleSizeGetter=_t(this.getCircleSizeScale,this.getLocationTotals,((e,t)=>n=>{const r=null===t||void 0===t?void 0:t.get(n);return r&&e&&e(Math.abs(r.outgoingCount+r.internalCount))||0})),this.getSortedLocationsForZoom=_t(this.getLocationsForZoom,this.getInCircleSizeGetter,this.getOutCircleSizeGetter,((e,t,n)=>{if(!e)return;return[...e].sort(((e,r)=>{const i=this.accessors.getLocationId(e),o=this.accessors.getLocationId(r);return(0,it.Z)(Math.max(t(i),n(i)),Math.max(t(o),n(o)))}))})),this.getLocationsForFlowmapLayer=_t(this.getSortedLocationsForZoom,(e=>e)),this.getLocationsForFlowmapLayerById=_t(this.getLocationsForFlowmapLayer,(e=>{if(e)return e.reduce(((e,t)=>(e.set(this.accessors.getLocationId(t),t),e)),new Map)})),this.getLocationOrClusterByIdGetter=_t(this.getClusterIndex,this.getLocationsById,((e,t)=>n=>{var r;return null!==(r=null===e||void 0===e?void 0:e.getClusterById(n))&&void 0!==r?r:null===t||void 0===t?void 0:t.get(n)})),this.getLayersData=_t(this.getLocationsForFlowmapLayer,this.getFlowsForFlowmapLayer,this.getFlowmapColorsRGBA,this.getLocationsForFlowmapLayerById,this.getLocationIdsInViewport,this.getInCircleSizeGetter,this.getOutCircleSizeGetter,this.getFlowThicknessScale,this.getAnimate,this.getLocationLabelsEnabled,((e,t,n,r,i,o,a,s,l,c)=>this._prepareLayersData(e,t,n,r,i,o,a,s,l,c))),this.accessors=new Nt(e),this.setAccessors(e)}setAccessors(e){this.accessors=new Nt(e)}getAggregateAccessors(){return this.accessors}prepareLayersData(e,t){const n=this.getLocationsForFlowmapLayer(e,t)||[],r=this.getFlowsForFlowmapLayer(e,t)||[],i=this.getFlowmapColorsRGBA(e,t),o=this.getLocationsForFlowmapLayerById(e,t),a=this.getLocationIdsInViewport(e,t),s=this.getInCircleSizeGetter(e,t),l=this.getOutCircleSizeGetter(e,t),c=this.getFlowThicknessScale(e,t),u=this.getLocationLabelsEnabled(e,t);return this._prepareLayersData(n,r,i,o,a,s,l,c,e.settings.animationEnabled,u)}_prepareLayersData(e,t,n,r,i,o,a,s,l,c){e||(e=[]),t||(t=[]);const{getFlowOriginId:u,getFlowDestId:d,getFlowMagnitude:f,getLocationId:h,getLocationLon:p,getLocationLat:g,getLocationName:m}=this.accessors,v=function(e,t,n){const r=t?t[0]:0,i=t?t[1]:0;if(Xe(e)){const t=Ye([0,i],e.positive.flows.scheme,n),o=Ye([0,r],e.negative.flows.scheme,n);return e=>e>=0?t(e):o(e)}const o=Ye([0,i||0],e.flows.scheme,n);return e=>o(e)}(n,rt(t,(e=>f(e))),!1),A=Float32Array.from(function*(){for(const t of e)yield p(t),yield g(t)}()),y=Xe(n)?n.positive.locationCircles.inner:n.locationCircles.inner,b=Uint8Array.from(function*(){for(const t of e)yield*y}()),_=Float32Array.from(function*(){for(const t of e){const e=h(t);yield(null===i||void 0===i?void 0:i.has(e))?o(e):1}}()),w=Float32Array.from(function*(){for(const t of e){const e=h(t);yield(null===i||void 0===i?void 0:i.has(e))?a(e):1}}()),x=Float32Array.from(function*(){for(const e of t){const t=null===r||void 0===r?void 0:r.get(u(e));yield t?p(t):0,yield t?g(t):0}}()),E=Float32Array.from(function*(){for(const e of t){const t=null===r||void 0===r?void 0:r.get(d(e));yield t?p(t):0,yield t?g(t):0}}()),S=Float32Array.from(function*(){for(const e of t)yield s&&s(f(e))||0}()),C=Float32Array.from(function*(){for(const e of t){const t=u(e),n=d(e);yield Math.max(o(t),a(t)),yield Math.max(o(n),a(n))}}()),P=Uint8Array.from(function*(){for(const e of t)yield*v(f(e))}()),T=l?Float32Array.from(function*(){for(const e of t)yield new wt.alea("".concat(u(e),"-").concat(d(e)))()}()):void 0;return Object.assign({circleAttributes:{length:e.length,attributes:{getPosition:{value:A,size:2},getColor:{value:b,size:4},getInRadius:{value:_,size:1},getOutRadius:{value:w,size:1}}},lineAttributes:{length:t.length,attributes:Object.assign({getSourcePosition:{value:x,size:2},getTargetPosition:{value:E,size:2},getThickness:{value:S,size:1},getColor:{value:P,size:4},getEndpointOffsets:{value:C,size:2}},T?{getStaggering:{value:T,size:1}}:{})}},c?{locationLabels:e.map(m)}:void 0)}getLocationsInBbox(e,t){if(e)return this._getLocationsInBboxIndices(e,t).map((t=>e.points[t]))}_getLocationsInBboxIndices(e,t){if(!e)return;const[n,r,i,o]=t,[a,s,l,c]=[ai(n),si(r),ai(i),si(o)];return e.range(Math.min(a,l),Math.min(s,c),Math.max(a,l),Math.max(s,c))}isFlowInSelection(e,t,n){const r=this.accessors.getFlowOriginId(e),i=this.accessors.getFlowDestId(e);if(t)switch(n){case A.ALL:return t.has(r)||t.has(i);case A.BETWEEN:return t.has(r)&&t.has(i);case A.INCOMING:return t.has(i);case A.OUTGOING:return t.has(r)}return!0}}function oi(e,t){if(!e)return;let n;for(const[r,{incomingCount:i,outgoingCount:o,internalCount:a}]of e.entries())if(null==t||t.has(r)){const e=Math.min(i+a,o+a,a),t=Math.max(i+a,o+a,a);n?(en[1]&&(n[1]=t)):n=[e,t]}return n}function ai(e){return e/360+.5}function si(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 li(e,t){const{getInRadius:n,getOutRadius:r}=e.attributes;return Math.max(n.value[t],r.value[t])}function ci(e,t){const{getPosition:n}=e.attributes;return[n.value[2*t],n.value[2*t+1]]}class ui{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}}var di=1e-6,fi=Math.PI,hi=fi/2,pi=fi/4,gi=2*fi,mi=180/fi,vi=fi/180,Ai=Math.abs,yi=(Math.atan,Math.atan2),bi=Math.cos,_i=(Math.ceil,Math.exp,Math.floor,Math.hypot,Math.log,Math.pow,Math.sin),wi=(Math.sign,Math.sqrt);Math.tan;function xi(e){return e>1?hi:e<-1?-hi:Math.asin(e)}function Ei(){}var Si,Ci,Pi,Ti,ki,Mi=new ui,Oi=new ui,Ri={point:Ei,lineStart:Ei,lineEnd:Ei,polygonStart:function(){Mi=new ui,Ri.lineStart=Ii,Ri.lineEnd=Li},polygonEnd:function(){var e=+Mi;Oi.add(e<0?gi+e:e),this.lineStart=this.lineEnd=this.point=Ei},sphere:function(){Oi.add(gi)}};function Ii(){Ri.point=Ni}function Li(){Di(Si,Ci)}function Ni(e,t){Ri.point=Di,Si=e,Ci=t,Pi=e*=vi,Ti=bi(t=(t*=vi)/2+pi),ki=_i(t)}function Di(e,t){var n=(e*=vi)-Pi,r=n>=0?1:-1,i=r*n,o=bi(t=(t*=vi)/2+pi),a=_i(t),s=ki*a,l=Ti*o+s*bi(i),c=s*r*_i(i);Mi.add(yi(c,l)),Pi=e,Ti=o,ki=a}function Fi(e,t){return[e[1]*t[2]-e[2]*t[1],e[2]*t[0]-e[0]*t[2],e[0]*t[1]-e[1]*t[0]]}function ji(e,t){e&&$i.hasOwnProperty(e.type)&&$i[e.type](e,t)}var Bi,Zi,zi,Ui,Hi,Vi,Wi,Gi,Ki,qi,Yi,Xi={Feature:function(e,t){ji(e.geometry,t)},FeatureCollection:function(e,t){for(var n=e.features,r=-1,i=n.length;++rdi?Ui=90:Ki<-di&&(Zi=-90),Yi[0]=Bi,Yi[1]=zi},sphere:function(){Bi=-(zi=180),Zi=-(Ui=90)}};function to(e,t){qi.push(Yi=[Bi=e,zi=e]),tUi&&(Ui=t)}function no(e,t){var n=function(e){var t=e[0],n=e[1],r=bi(n);return[r*bi(t),r*_i(t),_i(n)]}([e*vi,t*vi]);if(Gi){var r=Fi(Gi,n),i=Fi([r[1],-r[0],0],r);!function(e){var t=wi(e[0]*e[0]+e[1]*e[1]+e[2]*e[2]);e[0]/=t,e[1]/=t,e[2]/=t}(i),i=function(e){return[yi(e[1],e[0]),xi(e[2])]}(i);var o,a=e-Hi,s=a>0?1:-1,l=i[0]*mi*s,c=Ai(a)>180;c^(s*HiUi&&(Ui=o):c^(s*Hi<(l=(l+360)%360-180)&&lUi&&(Ui=t)),c?elo(Bi,zi)&&(zi=e):lo(e,zi)>lo(Bi,zi)&&(Bi=e):zi>=Bi?(ezi&&(zi=e)):e>Hi?lo(Bi,e)>lo(Bi,zi)&&(zi=e):lo(e,zi)>lo(Bi,zi)&&(Bi=e)}else qi.push(Yi=[Bi=e,zi=e]);tUi&&(Ui=t),Gi=n,Hi=e}function ro(){eo.point=no}function io(){Yi[0]=Bi,Yi[1]=zi,eo.point=to,Gi=null}function oo(e,t){if(Gi){var n=e-Hi;Ki.add(Ai(n)>180?n+(n>0?360:-360):n)}else Vi=e,Wi=t;Ri.point(e,t),no(e,t)}function ao(){Ri.lineStart()}function so(){oo(Vi,Wi),Ri.lineEnd(),Ai(Ki)>di&&(Bi=-(zi=180)),Yi[0]=Bi,Yi[1]=zi,Gi=null}function lo(e,t){return(t-=e)<0?t+360:t}function co(e,t){return e[0]-t[0]}function uo(e,t){return e[0]<=e[1]?e[0]<=t&&t<=e[1]:tlo(r[0],r[1])&&(r[1]=i[1]),lo(i[0],r[1])>lo(r[0],r[1])&&(r[0]=i[0])):o.push(r=i);for(a=-1/0,t=0,r=o[n=o.length-1];t<=n;r=i,++t)i=o[t],(s=lo(r[1],i[0]))>a&&(a=s,Bi=i[0],zi=r[1])}return qi=Yi=null,Bi===1/0||Zi===1/0?[[NaN,NaN],[NaN,NaN]]:[[Bi,Zi],[zi,Ui]]}function ho(e,t,n,r){const i=e=>({type:"Point",coordinates:t(e)});let o;if(Array.isArray(e))o=e.map(i);else{o=[];for(const t of e)o.push(i(t))}return function(e,t,n){const{pad:r=.05,maxZoom:i=100}=n||{},o=fo(e),[[a,s],[l,c]]=o,u=r?[[a-r*(l-a),s-r*(c-s)],[l+r*(l-a),c+r*(c-s)]]:o,[d,f]=t;return Object.assign(Object.assign({},(0,Dt.Xg)({width:d,height:f,bounds:u,padding:null===n||void 0===n?void 0:n.padding,maxZoom:i})),{width:d,height:f,bearing:0,pitch:0})}({type:"GeometryCollection",geometries:o},n,r)}var po,go=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){e.done?i(e.value):function(e){return e instanceof n?e:new n((function(t){t(e)}))}(e.value).then(a,s)}l((r=r.apply(e,t||[])).next())}))};class mo{constructor(e){this.selectors=new ii(e),this.flowmapData=void 0,this.flowmapState=void 0}setAccessors(e){this.selectors.setAccessors(e)}setFlowmapData(e){this.flowmapData=e}getSelectors(){return this.selectors}getFlowmapData(){return this.flowmapData}setFlowmapState(e){return go(this,void 0,void 0,(function*(){this.flowmapState=e}))}getFlowmapState(){return this.flowmapState}getFlowByIndex(e){return go(this,void 0,void 0,(function*(){if(!this.flowmapState||!this.flowmapData)return;const t=this.selectors.getFlowsForFlowmapLayer(this.flowmapState,this.flowmapData);return null===t||void 0===t?void 0:t[e]}))}getLocationByIndex(e){return go(this,void 0,void 0,(function*(){if(!this.flowmapState||!this.flowmapData)return;const t=this.selectors.getLocationsForFlowmapLayer(this.flowmapState,this.flowmapData);return null===t||void 0===t?void 0:t[e]}))}getLayersData(){return go(this,void 0,void 0,(function*(){if(this.flowmapState&&this.flowmapData)return this.selectors.getLayersData(this.flowmapState,this.flowmapData)}))}getLocationById(e){return go(this,void 0,void 0,(function*(){if(!this.flowmapState||!this.flowmapData)return;const t=this.selectors.getClusterIndex(this.flowmapState,this.flowmapData);if(t){const n=t.getClusterById(e);if(n)return n}const n=this.selectors.getLocationsById(this.flowmapState,this.flowmapData);return null===n||void 0===n?void 0:n.get(e)}))}getTotalsForLocation(e){var t;return go(this,void 0,void 0,(function*(){if(this.flowmapState&&this.flowmapData)return null===(t=this.selectors.getLocationTotals(this.flowmapState,this.flowmapData))||void 0===t?void 0:t.get(e)}))}getViewportForLocations(e,t){var n;return go(this,void 0,void 0,(function*(){if(null===(n=this.flowmapData)||void 0===n?void 0:n.locations)return ho(this.flowmapData.locations,(e=>[this.selectors.accessors.getLocationLon(e),this.selectors.accessors.getLocationLat(e)]),e,t)}))}updateLayersData(e){return go(this,void 0,void 0,(function*(){e(yield this.getLayersData())}))}getClusterZoom(){return this.flowmapState&&this.flowmapData?this.selectors.getClusterZoom(this.flowmapState,this.flowmapData):void 0}getClusterIndex(){return this.flowmapState&&this.flowmapData?this.selectors.getClusterIndex(this.flowmapState,this.flowmapData):void 0}getLocationsById(){return this.flowmapState&&this.flowmapData?this.selectors.getLocationsById(this.flowmapState,this.flowmapData):void 0}getLocationTotals(){return this.flowmapState&&this.flowmapData?this.selectors.getLocationTotals(this.flowmapState,this.flowmapData):void 0}getFlowsForFlowmapLayer(){return this.flowmapState&&this.flowmapData?this.selectors.getFlowsForFlowmapLayer(this.flowmapState,this.flowmapData):void 0}}!function(e){e.LOCATION="location",e.FLOW="flow"}(po||(po={}));var vo=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){e.done?i(e.value):function(e){return e instanceof n?e:new n((function(t){t(e)}))}(e.value).then(a,s)}l((r=r.apply(e,t||[])).next())}))};const Ao=["filter","locationTotalsEnabled","locationLabelsEnabled","adaptiveScalesEnabled","animationEnabled","clusteringEnabled","clusteringLevel","fadeEnabled","fadeOpacityEnabled","clusteringAuto","darkMode","fadeAmount","colorScheme","highlightColor","maxTopFlowsDisplayNum"];var yo;!function(e){e.LOCATION="location",e.FLOW="flow"}(yo||(yo={}));class bo extends y.Z{constructor(e){super(Object.assign(Object.assign({},e),{onHover:(t,n)=>{const r=Date.now();this.setState({highlightedObject:this._getHighlightedObject(t),lastHoverTime:r});const{onHover:i}=e;i&&this._getFlowmapLayerPickingInfo(t).then((e=>{var t,o;(null!==(o=null===(t=this.state)||void 0===t?void 0:t.lastHoverTime)&&void 0!==o?o:0)<=r&&(this.setState({pickingInfo:e}),i(e,n))}))},onClick:(t,n)=>{const{onClick:r}=e,i=Date.now();this.setState({lastClickTime:i}),r&&this._getFlowmapLayerPickingInfo(t).then((e=>{var t,o;(null!==(o=null===(t=this.state)||void 0===t?void 0:t.lastClickTime)&&void 0!==o?o:0)<=i&&(this.setState({pickingInfo:e}),e&&r(e,n))}))}}))}initializeState(){this.state={accessors:new Nt(this.props),dataProvider:this._getOrMakeDataProvider(),layersData:void 0,highlightedObject:void 0,pickingInfo:void 0,lastHoverTime:void 0,lastClickTime:void 0}}getPickingInfo(e){let{info:t}=e;var n,r;if(!t.object){const e=null===(r=null===(n=this.state)||void 0===n?void 0:n.pickingInfo)||void 0===r?void 0:r.object;if(e)return Object.assign(Object.assign({},t),{object:e,picked:!0})}return t}_getOrMakeDataProvider(){const{data:e,dataProvider:t}=this.props;if(function(e){return e&&"function"===typeof e.setFlowmapState&&"function"===typeof e.getViewportForLocations&&"function"===typeof e.getFlowByIndex&&"function"===typeof e.getLocationById&&"function"===typeof e.getLocationByIndex&&"function"===typeof e.getLayersData}(t))return t;if(function(e){return e&&e.locations&&e.flows}(e)){const t=new mo(this.props);return t.setFlowmapData(e),t}throw new Error("FlowmapLayer: data must be a FlowmapDataProvider or FlowmapData")}_updateDataProvider(){this.setState({dataProvider:this._getOrMakeDataProvider()})}shouldUpdateState(e){const{changeFlags:t}=e;return!!t.viewportChanged||super.shouldUpdateState(e)}updateState(e){let{oldProps:t,props:n,changeFlags:r}=e;if(r.propsChanged,r.dataChanged&&this._updateDataProvider(),(r.viewportChanged||r.dataChanged)&&this.setState({highlightedObject:void 0}),r.viewportChanged||r.dataChanged||r.propsChanged&&Ao.some((e=>t[e]!==n[e]))){const{dataProvider:e}=this.state||{};e&&(e.setFlowmapState(this._getFlowmapState()),e.updateLayersData((e=>{this.setState({layersData:e,highlightedObject:void 0})}),r))}}_getSettingsState(){const{locationTotalsEnabled:e,locationLabelsEnabled:t,adaptiveScalesEnabled:n,animationEnabled:r,clusteringEnabled:i,clusteringLevel:o,fadeEnabled:a,fadeOpacityEnabled:s,clusteringAuto:l,darkMode:c,fadeAmount:u,colorScheme:d,highlightColor:f,maxTopFlowsDisplayNum:h}=this.props;return{locationTotalsEnabled:e,locationLabelsEnabled:t,adaptiveScalesEnabled:n,animationEnabled:r,clusteringEnabled:i,clusteringLevel:o,fadeEnabled:a,fadeOpacityEnabled:s,clusteringAuto:l,darkMode:c,fadeAmount:u,colorScheme:d,highlightColor:f,maxTopFlowsDisplayNum:h}}_getFlowmapState(){return{viewport:_o(this.context.viewport),filter:this.props.filter,settings:this._getSettingsState()}}_getFlowmapLayerPickingInfo(e){var t;return vo(this,void 0,void 0,(function*(){const{index:n,sourceLayer:r}=e,{dataProvider:i,accessors:o}=this.state||{};if(!i||!o)return;const a=Object.assign(Object.assign({},e),{picked:e.picked,layer:e.layer,index:e.index,x:e.x,y:e.y,coordinate:e.coordinate,event:e.event});if(r instanceof p||r instanceof u){const e=-1===n?void 0:yield i.getFlowByIndex(n);if(e){const t=yield i.getLocationById(o.getFlowOriginId(e)),n=yield i.getLocationById(o.getFlowDestId(e));if(t&&n)return Object.assign(Object.assign({},a),{object:{type:po.FLOW,flow:e,origin:t,dest:n,count:o.getFlowMagnitude(e)}})}}else if(r instanceof v){const r=-1===n?void 0:yield i.getLocationByIndex(n);if(r){const n=o.getLocationId(r),s=o.getLocationName(r),l=yield i.getTotalsForLocation(n),{circleAttributes:c}=(null===(t=this.state)||void 0===t?void 0:t.layersData)||{};if(l&&c){const t=li(c,e.index);return Object.assign(Object.assign({},a),{object:{type:po.LOCATION,location:r,id:n,name:s,totals:l,circleRadius:t}})}}}}))}_getHighlightedObject(e){var t,n;const{index:r,sourceLayer:i}=e;if(!(r<0))if(i instanceof p||i instanceof u){const{lineAttributes:e}=(null===(t=this.state)||void 0===t?void 0:t.layersData)||{};if(e){let t=function(e,t){const{getColor:n,getEndpointOffsets:r,getSourcePosition:i,getTargetPosition:o,getThickness:a,getStaggering:s}=e.attributes;return{length:1,attributes:Object.assign({getColor:{value:n.value.subarray(4*t,4*(t+1)),size:4},getEndpointOffsets:{value:r.value.subarray(2*t,2*(t+1)),size:2},getSourcePosition:{value:i.value.subarray(2*t,2*(t+1)),size:2},getTargetPosition:{value:o.value.subarray(2*t,2*(t+1)),size:2},getThickness:{value:a.value.subarray(t,t+1),size:1}},s?{getStaggering:{value:s.value.subarray(t,t+1),size:1}}:void 0)}}(e,r);return this.props.fadeOpacityEnabled&&(t=Object.assign(Object.assign({},t),{attributes:Object.assign(Object.assign({},t.attributes),{getColor:Object.assign(Object.assign({},t.attributes.getColor),{value:new Uint8Array([...t.attributes.getColor.value.slice(0,3),255])})})})),{type:yo.FLOW,lineAttributes:t}}}else if(i instanceof v){const{circleAttributes:e}=(null===(n=this.state)||void 0===n?void 0:n.layersData)||{};if(e)return{type:yo.LOCATION,coords:ci(e,r),radius:li(e,r)}}}renderLayers(){var e;const t=[];if(null===(e=this.state)||void 0===e?void 0:e.layersData){const{layersData:e,highlightedObject:r}=this.state,{circleAttributes:i,lineAttributes:o,locationLabels:a}=e||{};if(i&&o){const e=Fe(qe(!1,(n=this._getSettingsState()).colorScheme,n.darkMode,n.fadeEnabled,n.fadeOpacityEnabled,n.fadeAmount,n.animationEnabled).outlineColor||(this.props.darkMode?"#000":"#fff")),a={data:o,parameters:Object.assign(Object.assign({},this.props.parameters),{depthTest:!1})};if(this.props.animationEnabled?t.push(new u(Object.assign({},this.getSubLayerProps(Object.assign(Object.assign({},a),{id:"animated-flow-lines",drawOutline:!1,thicknessUnit:20}))))):t.push(new p(Object.assign({},this.getSubLayerProps(Object.assign(Object.assign({},a),{id:"flow-lines",drawOutline:!0,outlineColor:e}))))),t.push(new v(this.getSubLayerProps({id:"circles",data:i,emptyColor:this.props.darkMode?[0,0,0,255]:[255,255,255,255],outlineEmptyMix:.4}))),r)switch(r.type){case yo.LOCATION:t.push(new b.Z(Object.assign({},this.getSubLayerProps({id:"location-highlight",data:[r],pickable:!1,antialiasing:!0,stroked:!0,filled:!1,lineWidthUnits:"pixels",getLineWidth:2,radiusUnits:"pixels",getRadius:e=>e.radius,getLineColor:Fe(this.props.highlightColor),getPosition:e=>e.coords}))));break;case yo.FLOW:t.push(new p(Object.assign({},this.getSubLayerProps({id:"flow-highlight",data:r.lineAttributes,drawOutline:!0,pickable:!1,outlineColor:Fe(this.props.highlightColor),outlineThickness:1,parameters:{depthTest:!1}}))))}}a&&t.push(new _.Z(this.getSubLayerProps({id:"location-labels",data:a,maxWidth:1e3,pickable:!1,fontFamily:"Helvetica",getPixelOffset:(e,t)=>{let{index:n}=t;return[0,li(i,n)+5]},getPosition:(e,t)=>{let{index:n}=t;return ci(i,n)},getText:e=>e,getSize:10,getColor:[255,255,255,255],getAngle:0,getTextAnchor:"middle",getAlignmentBaseline:"top"})))}var n;return t}}function _o(e){const{width:t,height:n,longitude:r,latitude:i,zoom:o,pitch:a,bearing:s}=e;return{width:t,height:n,longitude:r,latitude:i,zoom:o,pitch:a,bearing:s}}bo.defaultProps={darkMode:!0,fadeAmount:50,locationTotalsEnabled:!0,locationLabelsEnabled:!1,animationEnabled:!1,clusteringEnabled:!0,fadeEnabled:!0,fadeOpacityEnabled:!1,clusteringAuto:!0,clusteringLevel:void 0,adaptiveScalesEnabled:!0,colorScheme:"Teal",highlightColor:"orange",maxTopFlowsDisplayNum:5e3}},24420:(e,t,n)=>{"use strict";function r(e,t){var n=t&&t.cache?t.cache:u,r=t&&t.serializer?t.serializer:l;return(t&&t.strategy?t.strategy:s)(e,{cache:n,serializer:r})}function i(e,t,n,r){var i,o=null==(i=r)||"number"===typeof i||"boolean"===typeof i?r:n(r),a=t.get(o);return"undefined"===typeof a&&(a=e.call(this,r),t.set(o,a)),a}function o(e,t,n){var r=Array.prototype.slice.call(arguments,3),i=n(r),o=t.get(i);return"undefined"===typeof o&&(o=e.apply(this,r),t.set(i,o)),o}function a(e,t,n,r,i){return n.bind(t,e,r,i)}function s(e,t){return a(e,this,1===e.length?i:o,t.cache.create(),t.serializer)}n.d(t,{A:()=>d,H:()=>r});var l=function(){return JSON.stringify(arguments)};function c(){this.cache=Object.create(null)}c.prototype.get=function(e){return this.cache[e]},c.prototype.set=function(e,t){this.cache[e]=t};var u={create:function(){return new c}},d={variadic:function(e,t){return a(e,this,o,t.cache.create(),t.serializer)},monadic:function(e,t){return a(e,this,i,t.cache.create(),t.serializer)}}},37152:(e,t,n)=>{"use strict";n.d(t,{wD:()=>i,VG:()=>l,rp:()=>u,Ii:()=>v,O4:()=>s,uf:()=>c,Wh:()=>m,Jo:()=>h,yx:()=>p,Wi:()=>f,HI:()=>g,pe:()=>d,Qc:()=>ae});var r,i,o,a=n(43815);function s(e){return e.type===i.literal}function l(e){return e.type===i.argument}function c(e){return e.type===i.number}function u(e){return e.type===i.date}function d(e){return e.type===i.time}function f(e){return e.type===i.select}function h(e){return e.type===i.plural}function p(e){return e.type===i.pound}function g(e){return e.type===i.tag}function m(e){return!(!e||"object"!==typeof e||e.type!==o.number)}function v(e){return!(!e||"object"!==typeof e||e.type!==o.dateTime)}!function(e){e[e.EXPECT_ARGUMENT_CLOSING_BRACE=1]="EXPECT_ARGUMENT_CLOSING_BRACE",e[e.EMPTY_ARGUMENT=2]="EMPTY_ARGUMENT",e[e.MALFORMED_ARGUMENT=3]="MALFORMED_ARGUMENT",e[e.EXPECT_ARGUMENT_TYPE=4]="EXPECT_ARGUMENT_TYPE",e[e.INVALID_ARGUMENT_TYPE=5]="INVALID_ARGUMENT_TYPE",e[e.EXPECT_ARGUMENT_STYLE=6]="EXPECT_ARGUMENT_STYLE",e[e.INVALID_NUMBER_SKELETON=7]="INVALID_NUMBER_SKELETON",e[e.INVALID_DATE_TIME_SKELETON=8]="INVALID_DATE_TIME_SKELETON",e[e.EXPECT_NUMBER_SKELETON=9]="EXPECT_NUMBER_SKELETON",e[e.EXPECT_DATE_TIME_SKELETON=10]="EXPECT_DATE_TIME_SKELETON",e[e.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE=11]="UNCLOSED_QUOTE_IN_ARGUMENT_STYLE",e[e.EXPECT_SELECT_ARGUMENT_OPTIONS=12]="EXPECT_SELECT_ARGUMENT_OPTIONS",e[e.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE=13]="EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE",e[e.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE=14]="INVALID_PLURAL_ARGUMENT_OFFSET_VALUE",e[e.EXPECT_SELECT_ARGUMENT_SELECTOR=15]="EXPECT_SELECT_ARGUMENT_SELECTOR",e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR=16]="EXPECT_PLURAL_ARGUMENT_SELECTOR",e[e.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT=17]="EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT",e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT=18]="EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT",e[e.INVALID_PLURAL_ARGUMENT_SELECTOR=19]="INVALID_PLURAL_ARGUMENT_SELECTOR",e[e.DUPLICATE_PLURAL_ARGUMENT_SELECTOR=20]="DUPLICATE_PLURAL_ARGUMENT_SELECTOR",e[e.DUPLICATE_SELECT_ARGUMENT_SELECTOR=21]="DUPLICATE_SELECT_ARGUMENT_SELECTOR",e[e.MISSING_OTHER_CLAUSE=22]="MISSING_OTHER_CLAUSE",e[e.INVALID_TAG=23]="INVALID_TAG",e[e.INVALID_TAG_NAME=25]="INVALID_TAG_NAME",e[e.UNMATCHED_CLOSING_TAG=26]="UNMATCHED_CLOSING_TAG",e[e.UNCLOSED_TAG=27]="UNCLOSED_TAG"}(r||(r={})),function(e){e[e.literal=0]="literal",e[e.argument=1]="argument",e[e.number=2]="number",e[e.date=3]="date",e[e.time=4]="time",e[e.select=5]="select",e[e.plural=6]="plural",e[e.pound=7]="pound",e[e.tag=8]="tag"}(i||(i={})),function(e){e[e.number=0]="number",e[e.dateTime=1]="dateTime"}(o||(o={}));var A=/[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/,y=/(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g;function b(e){var t={};return e.replace(y,(function(e){var n=e.length;switch(e[0]){case"G":t.era=4===n?"long":5===n?"narrow":"short";break;case"y":t.year=2===n?"2-digit":"numeric";break;case"Y":case"u":case"U":case"r":throw new RangeError("`Y/u/U/r` (year) patterns are not supported, use `y` instead");case"q":case"Q":throw new RangeError("`q/Q` (quarter) patterns are not supported");case"M":case"L":t.month=["numeric","2-digit","short","long","narrow"][n-1];break;case"w":case"W":throw new RangeError("`w/W` (week) patterns are not supported");case"d":t.day=["numeric","2-digit"][n-1];break;case"D":case"F":case"g":throw new RangeError("`D/F/g` (day) patterns are not supported, use `d` instead");case"E":t.weekday=4===n?"long":5===n?"narrow":"short";break;case"e":if(n<4)throw new RangeError("`e..eee` (weekday) patterns are not supported");t.weekday=["short","long","narrow","short"][n-4];break;case"c":if(n<4)throw new RangeError("`c..ccc` (weekday) patterns are not supported");t.weekday=["short","long","narrow","short"][n-4];break;case"a":t.hour12=!0;break;case"b":case"B":throw new RangeError("`b/B` (period) patterns are not supported, use `a` instead");case"h":t.hourCycle="h12",t.hour=["numeric","2-digit"][n-1];break;case"H":t.hourCycle="h23",t.hour=["numeric","2-digit"][n-1];break;case"K":t.hourCycle="h11",t.hour=["numeric","2-digit"][n-1];break;case"k":t.hourCycle="h24",t.hour=["numeric","2-digit"][n-1];break;case"j":case"J":case"C":throw new RangeError("`j/J/C` (hour) patterns are not supported, use `h/H/K/k` instead");case"m":t.minute=["numeric","2-digit"][n-1];break;case"s":t.second=["numeric","2-digit"][n-1];break;case"S":case"A":throw new RangeError("`S/A` (second) patterns are not supported, use `s` instead");case"z":t.timeZoneName=n<4?"short":"long";break;case"Z":case"O":case"v":case"V":case"X":case"x":throw new RangeError("`Z/O/v/V/X/x` (timeZone) patterns are not supported, use `z` instead")}return""})),t}var _=/[\t-\r \x85\u200E\u200F\u2028\u2029]/i;var w=/^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g,x=/^(@+)?(\+|#+)?[rs]?$/g,E=/(\*)(0+)|(#+)(0+)|(0+)/g,S=/^(0+)$/;function C(e){var t={};return"r"===e[e.length-1]?t.roundingPriority="morePrecision":"s"===e[e.length-1]&&(t.roundingPriority="lessPrecision"),e.replace(x,(function(e,n,r){return"string"!==typeof r?(t.minimumSignificantDigits=n.length,t.maximumSignificantDigits=n.length):"+"===r?t.minimumSignificantDigits=n.length:"#"===n[0]?t.maximumSignificantDigits=n.length:(t.minimumSignificantDigits=n.length,t.maximumSignificantDigits=n.length+("string"===typeof r?r.length:0)),""})),t}function P(e){switch(e){case"sign-auto":return{signDisplay:"auto"};case"sign-accounting":case"()":return{currencySign:"accounting"};case"sign-always":case"+!":return{signDisplay:"always"};case"sign-accounting-always":case"()!":return{signDisplay:"always",currencySign:"accounting"};case"sign-except-zero":case"+?":return{signDisplay:"exceptZero"};case"sign-accounting-except-zero":case"()?":return{signDisplay:"exceptZero",currencySign:"accounting"};case"sign-never":case"+_":return{signDisplay:"never"}}}function T(e){var t;if("E"===e[0]&&"E"===e[1]?(t={notation:"engineering"},e=e.slice(2)):"E"===e[0]&&(t={notation:"scientific"},e=e.slice(1)),t){var n=e.slice(0,2);if("+!"===n?(t.signDisplay="always",e=e.slice(2)):"+?"===n&&(t.signDisplay="exceptZero",e=e.slice(2)),!S.test(e))throw new Error("Malformed concise eng/scientific notation");t.minimumIntegerDigits=e.length}return t}function k(e){var t=P(e);return t||{}}function M(e){for(var t={},n=0,r=e;n1)throw new RangeError("integer-width stems only accept a single optional option");i.options[0].replace(E,(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(S.test(i.stem))t.minimumIntegerDigits=i.stem.length;else if(w.test(i.stem)){if(i.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");i.stem.replace(w,(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 o=i.options[0];"w"===o?t=(0,a.pi)((0,a.pi)({},t),{trailingZeroDisplay:"stripIfInteger"}):o&&(t=(0,a.pi)((0,a.pi)({},t),C(o)))}else if(x.test(i.stem))t=(0,a.pi)((0,a.pi)({},t),C(i.stem));else{var s=P(i.stem);s&&(t=(0,a.pi)((0,a.pi)({},t),s));var l=T(i.stem);l&&(t=(0,a.pi)((0,a.pi)({},t),l))}}return t}var O,R={"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"],BI:["H","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"],BY:["H","h"],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"],CW:["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"],FO:["H","h"],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"],GL:["H","h"],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"],HU:["H","h"],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","K","h"],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"],MG:["H","h"],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"],MT:["H","h"],MU:["H","h"],MV:["H","h"],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"],NO:["H","h"],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"],PL:["H","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"],RW:["H","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"],TH:["H","h"],TJ:["H","h"],TL:["H","hB","hb","h"],TM:["H","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"],VN:["H","h"],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"],ZW:["H","h"],"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 I(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),(R[n||""]||R[r||""]||R["".concat(r,"-001")]||R["001"])[0]}var L=new RegExp("^".concat(A.source,"*")),N=new RegExp("".concat(A.source,"*$"));function D(e,t){return{start:e,end:t}}var F=!!String.prototype.startsWith&&"_a".startsWith("a",1),j=!!String.fromCodePoint,B=!!Object.fromEntries,Z=!!String.prototype.codePointAt,z=!!String.prototype.trimStart,U=!!String.prototype.trimEnd,H=!!Number.isSafeInteger?Number.isSafeInteger:function(e){return"number"===typeof e&&isFinite(e)&&Math.floor(e)===e&&Math.abs(e)<=9007199254740991},V=!0;try{V="a"===(null===(O=Q("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu").exec("a"))||void 0===O?void 0:O[0])}catch(se){V=!1}var W,G=F?function(e,t,n){return e.startsWith(t,n)}:function(e,t,n){return e.slice(n,n+t.length)===t},K=j?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},q=B?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}},X=z?function(e){return e.trimStart()}:function(e){return e.replace(L,"")},$=U?function(e){return e.trimEnd()}:function(e){return e.replace(N,"")};function Q(e,t){return new RegExp(e,t)}if(V){var J=Q("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");W=function(e,t){var n;return J.lastIndex=t,null!==(n=J.exec(e)[1])&&void 0!==n?n:""}}else W=function(e,t){for(var n=[];;){var r=Y(e,t);if(void 0===r||re(r)||ie(r))break;n.push(r),t+=r>=65536?2:1}return K.apply(void 0,n)};var ee=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 o=[];!this.isEOF();){var a=this.char();if(123===a){if((s=this.parseArgument(e,n)).err)return s;o.push(s.val)}else{if(125===a&&e>0)break;if(35!==a||"plural"!==t&&"selectordinal"!==t){if(60===a&&!this.ignoreTag&&47===this.peek()){if(n)break;return this.error(r.UNMATCHED_CLOSING_TAG,D(this.clonePosition(),this.clonePosition()))}if(60===a&&!this.ignoreTag&&te(this.peek()||0)){if((s=this.parseTag(e,t)).err)return s;o.push(s.val)}else{var s;if((s=this.parseLiteral(e,t)).err)return s;o.push(s.val)}}else{var l=this.clonePosition();this.bump(),o.push({type:i.pound,location:D(l,this.clonePosition())})}}}return{val:o,err:null}},e.prototype.parseTag=function(e,t){var n=this.clonePosition();this.bump();var o=this.parseTagName();if(this.bumpSpace(),this.bumpIf("/>"))return{val:{type:i.literal,value:"<".concat(o,"/>"),location:D(n,this.clonePosition())},err:null};if(this.bumpIf(">")){var a=this.parseMessage(e+1,t,!0);if(a.err)return a;var s=a.val,l=this.clonePosition();if(this.bumpIf("")?{val:{type:i.tag,value:o,children:s,location:D(n,this.clonePosition())},err:null}:this.error(r.INVALID_TAG,D(l,this.clonePosition())))}return this.error(r.UNCLOSED_TAG,D(n,this.clonePosition()))}return this.error(r.INVALID_TAG,D(n,this.clonePosition()))},e.prototype.parseTagName=function(){var e=this.offset();for(this.bump();!this.isEOF()&&ne(this.char());)this.bump();return this.message.slice(e,this.offset())},e.prototype.parseLiteral=function(e,t){for(var n=this.clonePosition(),r="";;){var o=this.tryParseQuote(t);if(o)r+=o;else{var a=this.tryParseUnquoted(e,t);if(a)r+=a;else{var s=this.tryParseLeftAngleBracket();if(!s)break;r+=s}}}var l=D(n,this.clonePosition());return{val:{type:i.literal,value:r,location:l},err:null}},e.prototype.tryParseLeftAngleBracket=function(){return this.isEOF()||60!==this.char()||!this.ignoreTag&&(te(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 K.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(),K(n))},e.prototype.parseArgument=function(e,t){var n=this.clonePosition();if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(r.EXPECT_ARGUMENT_CLOSING_BRACE,D(n,this.clonePosition()));if(125===this.char())return this.bump(),this.error(r.EMPTY_ARGUMENT,D(n,this.clonePosition()));var o=this.parseIdentifierIfPossible().value;if(!o)return this.error(r.MALFORMED_ARGUMENT,D(n,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(r.EXPECT_ARGUMENT_CLOSING_BRACE,D(n,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:i.argument,value:o,location:D(n,this.clonePosition())},err:null};case 44:return this.bump(),this.bumpSpace(),this.isEOF()?this.error(r.EXPECT_ARGUMENT_CLOSING_BRACE,D(n,this.clonePosition())):this.parseArgumentOptions(e,t,o,n);default:return this.error(r.MALFORMED_ARGUMENT,D(n,this.clonePosition()))}},e.prototype.parseIdentifierIfPossible=function(){var e=this.clonePosition(),t=this.offset(),n=W(this.message,t),r=t+n.length;return this.bumpTo(r),{value:n,location:D(e,this.clonePosition())}},e.prototype.parseArgumentOptions=function(e,t,n,s){var l,c=this.clonePosition(),u=this.parseIdentifierIfPossible().value,d=this.clonePosition();switch(u){case"":return this.error(r.EXPECT_ARGUMENT_TYPE,D(c,d));case"number":case"date":case"time":this.bumpSpace();var f=null;if(this.bumpIf(",")){this.bumpSpace();var h=this.clonePosition();if((w=this.parseSimpleArgStyleIfPossible()).err)return w;if(0===(v=$(w.val)).length)return this.error(r.EXPECT_ARGUMENT_STYLE,D(this.clonePosition(),this.clonePosition()));f={style:v,styleLocation:D(h,this.clonePosition())}}if((x=this.tryParseArgumentClose(s)).err)return x;var p=D(s,this.clonePosition());if(f&&G(null===f||void 0===f?void 0:f.style,"::",0)){var g=X(f.style.slice(2));if("number"===u)return(w=this.parseNumberSkeletonFromString(g,f.styleLocation)).err?w:{val:{type:i.number,value:n,location:p,style:w.val},err:null};if(0===g.length)return this.error(r.EXPECT_DATE_TIME_SKELETON,p);var m=g;this.locale&&(m=function(e,t){for(var n="",r=0;r>1),l=I(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}(g,this.locale));var v={type:o.dateTime,pattern:m,location:f.styleLocation,parsedOptions:this.shouldParseSkeletons?b(m):{}};return{val:{type:"date"===u?i.date:i.time,value:n,location:p,style:v},err:null}}return{val:{type:"number"===u?i.number:"date"===u?i.date:i.time,value:n,location:p,style:null!==(l=null===f||void 0===f?void 0:f.style)&&void 0!==l?l:null},err:null};case"plural":case"selectordinal":case"select":var A=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(r.EXPECT_SELECT_ARGUMENT_OPTIONS,D(A,(0,a.pi)({},A)));this.bumpSpace();var y=this.parseIdentifierIfPossible(),_=0;if("select"!==u&&"offset"===y.value){if(!this.bumpIf(":"))return this.error(r.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,D(this.clonePosition(),this.clonePosition()));var w;if(this.bumpSpace(),(w=this.tryParseDecimalInteger(r.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,r.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE)).err)return w;this.bumpSpace(),y=this.parseIdentifierIfPossible(),_=w.val}var x,E=this.tryParsePluralOrSelectOptions(e,u,t,y);if(E.err)return E;if((x=this.tryParseArgumentClose(s)).err)return x;var S=D(s,this.clonePosition());return"select"===u?{val:{type:i.select,value:n,options:q(E.val),location:S},err:null}:{val:{type:i.plural,value:n,options:q(E.val),offset:_,pluralType:"plural"===u?"cardinal":"ordinal",location:S},err:null};default:return this.error(r.INVALID_ARGUMENT_TYPE,D(c,d))}},e.prototype.tryParseArgumentClose=function(e){return this.isEOF()||125!==this.char()?this.error(r.EXPECT_ARGUMENT_CLOSING_BRACE,D(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(r.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE,D(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(_).filter((function(e){return e.length>0}));n=48&&a<=57))break;i=!0,o=10*o+(a-48),this.bump()}var s=D(r,this.clonePosition());return i?H(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=Y(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(G(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()&&re(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&&void 0!==n?n:null},e}();function te(e){return e>=97&&e<=122||e>=65&&e<=90}function ne(e){return 45===e||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}function re(e){return e>=9&&e<=13||32===e||133===e||e>=8206&&e<=8207||8232===e||8233===e}function ie(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 oe(e){e.forEach((function(e){if(delete e.location,f(e)||h(e))for(var t in e.options)delete e.options[t].location,oe(e.options[t].value);else c(e)&&m(e.style)||(u(e)||d(e))&&v(e.style)?delete e.style.location:g(e)&&oe(e.children)}))}function ae(e,t){void 0===t&&(t={}),t=(0,a.pi)({shouldParseSkeletons:!0,requiresOtherClause:!0},t);var n=new ee(e,t).parse();if(n.err){var i=SyntaxError(r[n.err.kind]);throw i.location=n.err.location,i.originalMessage=n.err.message,i}return(null===t||void 0===t?void 0:t.captureLocation)||oe(n.val),n.val}},19588:(e,t,n)=>{"use strict";n.d(t,{d:()=>M});var r=n(43815),i=n(40089),o=n(84293),a=["style","currency","currencyDisplay","unit","unitDisplay","useGrouping","minimumIntegerDigits","minimumFractionDigits","maximumFractionDigits","minimumSignificantDigits","maximumSignificantDigits","compactDisplay","currencyDisplay","currencySign","notation","signDisplay","unit","unitDisplay","numberingSystem"];function s(e,t,n){var r=e.locale,o=e.formats,s=e.onError;void 0===n&&(n={});var l=n.format,c=l&&(0,i.TB)(o,"number",l,s)||{};return t(r,(0,i.L6)(n,a,c))}function l(e,t,n,r){void 0===r&&(r={});try{return s(e,t,r).format(n)}catch(i){e.onError(new o.Qe("Error formatting number.",e.locale,i))}return String(n)}function c(e,t,n,r){void 0===r&&(r={});try{return s(e,t,r).formatToParts(n)}catch(i){e.onError(new o.Qe("Error formatting number.",e.locale,i))}return[]}var u=n(49503),d=["numeric","style"];function f(e,t,n,r,a){void 0===a&&(a={}),r||(r="second"),Intl.RelativeTimeFormat||e.onError(new u.u_('Intl.RelativeTimeFormat is not available in this environment.\nTry polyfilling it using "@formatjs/intl-relativetimeformat"\n',u.jK.MISSING_INTL_API));try{return function(e,t,n){var r=e.locale,o=e.formats,a=e.onError;void 0===n&&(n={});var s=n.format,l=!!s&&(0,i.TB)(o,"relative",s,a)||{};return t(r,(0,i.L6)(n,d,l))}(e,t,a).format(n,r)}catch(s){e.onError(new o.Qe("Error formatting relative time.",e.locale,s))}return String(n)}var h=["formatMatcher","timeZone","hour12","weekday","era","year","month","day","hour","minute","second","timeZoneName","hourCycle","dateStyle","timeStyle","calendar","numberingSystem","fractionalSecondDigits"];function p(e,t,n,o){var a=e.locale,s=e.formats,l=e.onError,c=e.timeZone;void 0===o&&(o={});var u=o.format,d=(0,r.pi)((0,r.pi)({},c&&{timeZone:c}),u&&(0,i.TB)(s,t,u,l)),f=(0,i.L6)(o,h,d);return"time"!==t||f.hour||f.minute||f.second||f.timeStyle||f.dateStyle||(f=(0,r.pi)((0,r.pi)({},f),{hour:"numeric",minute:"numeric"})),n(a,f)}function g(e,t){for(var n=[],r=2;r{"use strict";n.d(t,{$6:()=>d,OV:()=>s,Qe:()=>c,X9:()=>u,gb:()=>l,wI:()=>a});var r,i=n(43815);!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"}(r||(r={}));var o=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(0,i.ZT)(t,e),t}(Error),a=function(e){function t(t,n){return e.call(this,r.UNSUPPORTED_FORMATTER,t,n)||this}return(0,i.ZT)(t,e),t}(o),s=function(e){function t(t,n){return e.call(this,r.INVALID_CONFIG,t,n)||this}return(0,i.ZT)(t,e),t}(o),l=function(e){function t(t,n){return e.call(this,r.MISSING_DATA,t,n)||this}return(0,i.ZT)(t,e),t}(o),c=function(e){function t(t,n,i){var o=e.call(this,r.FORMAT_ERROR,"".concat(t,"\nLocale: ").concat(n,"\n"),i)||this;return o.locale=n,o}return(0,i.ZT)(t,e),t}(o),u=function(e){function t(t,n,r,i){var o=e.call(this,"".concat(t,"\nMessageID: ").concat(null===r||void 0===r?void 0:r.id,"\nDefault Message: ").concat(null===r||void 0===r?void 0:r.defaultMessage,"\nDescription: ").concat(null===r||void 0===r?void 0:r.description,"\n"),n,i)||this;return o.descriptor=r,o.locale=n,o}return(0,i.ZT)(t,e),t}(c),d=function(e){function t(t,n){var i=e.call(this,r.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 i.descriptor=t,i}return(0,i.ZT)(t,e),t}(o)},79184:(e,t,n)=>{"use strict";n.d(t,{w:()=>d});var r=n(43815),i=n(32411),o=n(64185),a=n(84293),s=n(37152);function l(e,t){return Object.keys(e).reduce((function(n,i){return n[i]=(0,r.pi)({timeZone:t},e[i]),n}),{})}function c(e,t){return Object.keys((0,r.pi)((0,r.pi)({},e),t)).reduce((function(n,i){return n[i]=(0,r.pi)((0,r.pi)({},e[i]||{}),t[i]||{}),n}),{})}function u(e,t){if(!t)return e;var n=o.C.formats;return(0,r.pi)((0,r.pi)((0,r.pi)({},n),e),{date:c(l(n.date,t),l(e.date||{},t)),time:c(l(n.time,t),l(e.time||{},t))})}var d=function(e,t,n,o,l){var c=e.locale,d=e.formats,f=e.messages,h=e.defaultLocale,p=e.defaultFormats,g=e.fallbackOnEmptyString,m=e.onError,v=e.timeZone,A=e.defaultRichTextElements;void 0===n&&(n={id:""});var y=n.id,b=n.defaultMessage;(0,i.kG)(!!y,"[@formatjs/intl] An `id` must be provided to format a message. You can either:\n1. Configure your build toolchain with [babel-plugin-formatjs](https://formatjs.io/docs/tooling/babel-plugin)\nor [@formatjs/ts-transformer](https://formatjs.io/docs/tooling/ts-transformer) OR\n2. Configure your `eslint` config to include [eslint-plugin-formatjs](https://formatjs.io/docs/tooling/linter#enforce-id)\nto autofix this issue");var _=String(y),w=f&&Object.prototype.hasOwnProperty.call(f,_)&&f[_];if(Array.isArray(w)&&1===w.length&&w[0].type===s.wD.literal)return w[0].value;if(!o&&w&&"string"===typeof w&&!A)return w.replace(/'\{(.*?)\}'/gi,"{$1}");if(o=(0,r.pi)((0,r.pi)({},A),o||{}),d=u(d,v),p=u(p,v),!w){if(!1===g&&""===w)return w;if((!b||c&&c.toLowerCase()!==h.toLowerCase())&&m(new a.$6(n,c)),b)try{return t.getMessageFormat(b,h,p,l).format(o)}catch(x){return m(new a.X9('Error formatting default message for: "'.concat(_,'", rendering default message verbatim'),c,n,x)),"string"===typeof b?b:_}return _}try{return t.getMessageFormat(w,c,d,(0,r.pi)({formatters:t},l||{})).format(o)}catch(x){m(new a.X9('Error formatting message: "'.concat(_,'", using ').concat(b?"default message":"id"," as fallback."),c,n,x))}if(b)try{return t.getMessageFormat(b,h,p,l).format(o)}catch(x){m(new a.X9('Error formatting the default message for: "'.concat(_,'", rendering message verbatim'),c,n,x))}return"string"===typeof w?w:"string"===typeof b?b:_}},40089:(e,t,n)=>{"use strict";n.d(t,{L6:()=>s,Sn:()=>c,TB:()=>f,Z0:()=>l,ax:()=>d});var r=n(43815),i=n(64185),o=n(24420),a=n(84293);function s(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 l={formats:{},messages:{},timeZone:void 0,defaultLocale:"en",defaultFormats:{},fallbackOnEmptyString:!0,onError:function(e){0},onWarn:function(e){0}};function c(){return{dateTime:{},number:{},message:{},relativeTime:{},pluralRules:{},list:{},displayNames:{}}}function u(e){return{create:function(){return{get:function(t){return e[t]},set:function(t,n){e[t]=n}}}}}function d(e){void 0===e&&(e={dateTime:{},number:{},message:{},relativeTime:{},pluralRules:{},list:{},displayNames:{}});var t=Intl.RelativeTimeFormat,n=Intl.ListFormat,a=Intl.DisplayNames,s=(0,o.H)((function(){for(var e,t=[],n=0;n{"use strict";n.d(t,{aN:()=>a});var r=function e(t,n){if(t===n)return!0;if(t&&n&&"object"==typeof t&&"object"==typeof n){if(t.constructor!==n.constructor)return!1;var r,i,o;if(Array.isArray(t)){if((r=t.length)!=n.length)return!1;for(i=r;0!==i--;)if(!e(t[i],n[i]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if((r=(o=Object.keys(t)).length)!==Object.keys(n).length)return!1;for(i=r;0!==i--;)if(!Object.prototype.hasOwnProperty.call(n,o[i]))return!1;for(i=r;0!==i--;){var a=o[i];if(!e(t[a],n[a]))return!1}return!0}return t!==t&&n!==n};const i="__googleMapsScriptId";var o;!function(e){e[e.INITIALIZED=0]="INITIALIZED",e[e.LOADING=1]="LOADING",e[e.SUCCESS=2]="SUCCESS",e[e.FAILURE=3]="FAILURE"}(o||(o={}));class a{constructor(e){let{apiKey:t,authReferrerPolicy:n,channel:o,client:s,id:l=i,language:c,libraries:u=[],mapIds:d,nonce:f,region:h,retries:p=3,url:g="https://maps.googleapis.com/maps/api/js",version:m}=e;if(this.CALLBACK="__googleMapsCallback",this.callbacks=[],this.done=!1,this.loading=!1,this.errors=[],this.apiKey=t,this.authReferrerPolicy=n,this.channel=o,this.client=s,this.id=l||i,this.language=c,this.libraries=u,this.mapIds=d,this.nonce=f,this.region=h,this.retries=p,this.url=g,this.version=m,a.instance){if(!r(this.options,a.instance.options))throw new Error("Loader must not be called again with different options. ".concat(JSON.stringify(this.options)," !== ").concat(JSON.stringify(a.instance.options)));return a.instance}a.instance=this}get options(){return{version:this.version,apiKey:this.apiKey,channel:this.channel,client:this.client,id:this.id,libraries:this.libraries,language:this.language,region:this.region,mapIds:this.mapIds,nonce:this.nonce,url:this.url,authReferrerPolicy:this.authReferrerPolicy}}get status(){return this.errors.length?o.FAILURE:this.done?o.SUCCESS:this.loading?o.LOADING:o.INITIALIZED}get failed(){return this.done&&!this.loading&&this.errors.length>=this.retries+1}createUrl(){let e=this.url;return e+="?callback=".concat(this.CALLBACK),this.apiKey&&(e+="&key=".concat(this.apiKey)),this.channel&&(e+="&channel=".concat(this.channel)),this.client&&(e+="&client=".concat(this.client)),this.libraries.length>0&&(e+="&libraries=".concat(this.libraries.join(","))),this.language&&(e+="&language=".concat(this.language)),this.region&&(e+="®ion=".concat(this.region)),this.version&&(e+="&v=".concat(this.version)),this.mapIds&&(e+="&map_ids=".concat(this.mapIds.join(","))),this.authReferrerPolicy&&(e+="&auth_referrer_policy=".concat(this.authReferrerPolicy)),e}deleteScript(){const e=document.getElementById(this.id);e&&e.remove()}load(){return this.loadPromise()}loadPromise(){return new Promise(((e,t)=>{this.loadCallback((n=>{n?t(n.error):e(window.google)}))}))}loadCallback(e){this.callbacks.push(e),this.execute()}setScript(){if(document.getElementById(this.id))return void this.callback();const e=this.createUrl(),t=document.createElement("script");t.id=this.id,t.type="text/javascript",t.src=e,t.onerror=this.loadErrorCallback.bind(this),t.defer=!0,t.async=!0,this.nonce&&(t.nonce=this.nonce),document.head.appendChild(t)}reset(){this.deleteScript(),this.done=!1,this.loading=!1,this.errors=[],this.onerrorEvent=null}resetIfRetryingFailed(){this.failed&&this.reset()}loadErrorCallback(e){if(this.errors.push(e),this.errors.length<=this.retries){const e=this.errors.length*Math.pow(2,this.errors.length);console.log("Failed to load Google Maps script, retrying in ".concat(e," ms.")),setTimeout((()=>{this.deleteScript(),this.setScript()}),e)}else this.onerrorEvent=e,this.callback()}setCallback(){window.__googleMapsCallback=this.callback.bind(this)}callback(){this.done=!0,this.loading=!1,this.callbacks.forEach((e=>{e(this.onerrorEvent)})),this.callbacks=[]}execute(){if(this.resetIfRetryingFailed(),this.done)this.callback();else{if(window.google&&window.google.maps&&window.google.maps.version)return console.warn("Google Maps already loaded outside @googlemaps/js-api-loader.This may result in undesirable behavior as options and script parameters may not match."),void this.callback();this.loading||(this.loading=!0,this.setCallback(),this.setScript())}}}},16332:(e,t,n)=>{"use strict";var r,i=Object.assign||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(e,["fill","width","height","style"]);return a.default.createElement("svg",i({viewBox:"0 0 24 24",style:i({fill:n,width:o,height:l},u)},d),a.default.createElement("path",{d:"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"}))}},77229:(e,t,n)=>{"use strict";var r,i=Object.assign||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(e,["fill","width","height","style"]);return a.default.createElement("svg",i({viewBox:"0 0 24 24",style:i({fill:n,width:o,height:l},u)},d),a.default.createElement("path",{d:"M12,18.17L8.83,15L7.42,16.41L12,21L16.59,16.41L15.17,15M12,5.83L15.17,9L16.58,7.59L12,3L7.41,7.59L8.83,9L12,5.83Z"}))}},34375:(e,t,n)=>{"use strict";n.d(t,{D0:()=>l,Ew:()=>c,Kn:()=>o,Lj:()=>u,Os:()=>f,Ss:()=>a,TW:()=>s,zH:()=>d});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=>e&&"function"===typeof e[Symbol.iterator],l=e=>e&&"function"===typeof e[Symbol.asyncIterator],c=e=>"undefined"!==typeof Response&&e instanceof Response||e&&e.arrayBuffer&&e.text&&e.json,u=e=>"undefined"!==typeof Blob&&e instanceof Blob,d=e=>e&&"object"===typeof e&&e.isBuffer,f=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)},63734:(e,t,n)=>{"use strict";n.d(t,{z:()=>Q});var r=n(34375),i=n(13759),o=n(68863);function a(e,t){if(!e)throw new Error(t||"loaders.gl assertion failed.")}const s="3.3.3";"undefined"!==typeof self&&self,"undefined"!==typeof window&&window,"undefined"!==typeof n.g&&n.g,"undefined"!==typeof document&&document;const l="object"!==typeof process||"[object process]"!==String(process)||process.browser,c="undefined"!==typeof window&&"undefined"!==typeof window.orientation,u="undefined"!==typeof process&&process.version&&/v([0-9]*)/.exec(process.version);u&&parseFloat(u[1]);var d=n(68185);class f{terminate(){}}const h=new Map;function p(e){a(e.source&&!e.url||!e.source&&e.url);let t=h.get(e.source||e.url);return t||(e.url&&(t=function(e){if(!e.startsWith("http"))return e;return g((t=e,"try {\n importScripts('".concat(t,"');\n} catch (error) {\n console.error(error);\n throw error;\n}")));var t}(e.url),h.set(e.url,t)),e.source&&(t=g(e.source),h.set(e.source,t))),a(t),t}function g(e){const t=new Blob([e],{type:"application/javascript"});return URL.createObjectURL(t)}function m(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=arguments.length>2?arguments[2]:void 0;const r=n||new Set;if(e){if(v(e))r.add(e);else if(v(e.buffer))r.add(e.buffer);else if(ArrayBuffer.isView(e));else if(t&&"object"===typeof e)for(const i in e)m(e[i],t,r)}else;return void 0===n?Array.from(r):[]}function v(e){return!!e&&(e instanceof ArrayBuffer||("undefined"!==typeof MessagePort&&e instanceof MessagePort||("undefined"!==typeof ImageBitmap&&e instanceof ImageBitmap||"undefined"!==typeof OffscreenCanvas&&e instanceof OffscreenCanvas)))}const A=()=>{};class y{static isSupported(){return"undefined"!==typeof Worker&&l||"undefined"!==typeof f&&!l}constructor(e){(0,d.Z)(this,"name",void 0),(0,d.Z)(this,"source",void 0),(0,d.Z)(this,"url",void 0),(0,d.Z)(this,"terminated",!1),(0,d.Z)(this,"worker",void 0),(0,d.Z)(this,"onMessage",void 0),(0,d.Z)(this,"onError",void 0),(0,d.Z)(this,"_loadableURL","");const{name:t,source:n,url:r}=e;a(n||r),this.name=t,this.source=n,this.url=r,this.onMessage=A,this.onError=e=>console.log(e),this.worker=l?this._createBrowserWorker():this._createNodeWorker()}destroy(){this.onMessage=A,this.onError=A,this.worker.terminate(),this.terminated=!0}get isRunning(){return Boolean(this.onMessage)}postMessage(e,t){t=t||m(e),this.worker.postMessage(e,t)}_getErrorFromErrorEvent(e){let t="Failed to load ";return t+="worker ".concat(this.name," from ").concat(this.url,". "),e.message&&(t+="".concat(e.message," in ")),e.lineno&&(t+=":".concat(e.lineno,":").concat(e.colno)),new Error(t)}_createBrowserWorker(){this._loadableURL=p({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:"./".concat(this.url);e=new f(t,{eval:!1})}else{if(!this.source)throw new Error("no worker");e=new f(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 b{constructor(e,t){(0,d.Z)(this,"name",void 0),(0,d.Z)(this,"workerThread",void 0),(0,d.Z)(this,"isRunning",!0),(0,d.Z)(this,"result",void 0),(0,d.Z)(this,"_resolve",(()=>{})),(0,d.Z)(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){a(this.isRunning),this.isRunning=!1,this._resolve(e)}error(e){a(this.isRunning),this.isRunning=!1,this._reject(e)}}class _{static isSupported(){return y.isSupported()}constructor(e){(0,d.Z)(this,"name","unnamed"),(0,d.Z)(this,"source",void 0),(0,d.Z)(this,"url",void 0),(0,d.Z)(this,"maxConcurrency",1),(0,d.Z)(this,"maxMobileConcurrency",1),(0,d.Z)(this,"onDebug",(()=>{})),(0,d.Z)(this,"reuseWorkers",!0),(0,d.Z)(this,"props",{}),(0,d.Z)(this,"jobQueue",[]),(0,d.Z)(this,"idleQueue",[]),(0,d.Z)(this,"count",0),(0,d.Z)(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 b(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}finally{this.returnWorkerToQueue(e)}}}returnWorkerToQueue(e){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 x{static isSupported(){return y.isSupported()}static getWorkerFarm(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return x._workerFarm=x._workerFarm||new x({}),x._workerFarm.setProps(e),x._workerFarm}constructor(e){(0,d.Z)(this,"props",void 0),(0,d.Z)(this,"workerPools",new Map),this.props={...w},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 t of this.workerPools.values())t.setProps(this._getWorkerPoolProps())}getWorkerPool(e){const{name:t,source:n,url:r}=e;let i=this.workerPools.get(t);return i||(i=new _({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}}}(0,d.Z)(x,"_workerFarm",void 0);const E="latest";async function S(e,t,n,r,i){const o=e.id,s=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=t[e.id]||{},r="".concat(e.id,"-worker.js");let i=n.workerUrl;if(i||"compression"!==e.id||(i=t.workerUrl),"test"===t._workerType&&(i="modules/".concat(e.module,"/dist/").concat(r)),!i){let t=e.version;"latest"===t&&(t=E);const n=t?"@".concat(t):"";i="https://unpkg.com/@loaders.gl/".concat(e.module).concat(n,"/dist/").concat(r)}return a(i),i}(e,n),l=x.getWorkerFarm(n).getWorkerPool({name:o,url:s});n=JSON.parse(JSON.stringify(n)),r=JSON.parse(JSON.stringify(r||{}));const c=await l.startJob("process-on-worker",C.bind(null,i));c.postMessage("process",{input:t,options:n,context:r});const u=await c.result;return await u.result}async function C(e,t,n,r){switch(n){case"done":t.done(r);break;case"error":t.error(new Error(r.error));break;case"process":const{id:o,input:a,options:s}=r;try{const n=await e(a,s);t.postMessage("done",{id:o,result:n})}catch(i){const e=i instanceof Error?i.message:"unknown error";t.postMessage("error",{id:o,error:e})}break;default:console.warn("parse-with-worker unknown message ".concat(n))}}async function P(e){const t=[];for await(const n of e)t.push(n);return function(){for(var e=arguments.length,t=new Array(e),n=0;ne instanceof ArrayBuffer?new Uint8Array(e):e)),i=r.reduce(((e,t)=>e+t.byteLength),0),o=new Uint8Array(i);let a=0;for(const s of r)o.set(s,a),a+=s.byteLength;return o.buffer}(...t)}const T=262144;const k=262144;const M=1048576;var O=n(69113),R=n(62945);function I(e){if((t=e)&&"object"===typeof t&&t.isBuffer)return R.toArrayBuffer(e);var t;if(e instanceof ArrayBuffer)return e;if(ArrayBuffer.isView(e))return 0===e.byteOffset&&e.byteLength===e.buffer.byteLength?e.buffer:e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength);if("string"===typeof e){const t=e;return(new TextEncoder).encode(t).buffer}if(e&&"object"===typeof e&&e._toArrayBuffer)return e._toArrayBuffer();throw new Error("toArrayBuffer")}function L(e,t){return O.jU?async function*(e,t){const n=e.getReader();let r;try{for(;;){const e=r||n.read();null!==t&&void 0!==t&&t._streamReadAhead&&(r=n.read());const{done:i,value:o}=await e;if(i)return;yield I(o)}}catch(i){n.releaseLock()}}(e,t):async function*(e,t){for await(const n of e)yield I(n)}(e)}function N(e,t){if("string"===typeof e)return function*(e,t){const n=(null===t||void 0===t?void 0:t.chunkSize)||T;let r=0;const i=new TextEncoder;for(;r1&&void 0!==arguments[1]?arguments[1]:{};const{chunkSize:n=k}=t;let r=0;for(;r1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0;if(!V(e))return null;if(t&&!Array.isArray(t))return(0,i.T)(t);let o=[];t&&(o=o.concat(t)),null!==n&&void 0!==n&&n.ignoreRegisteredLoaders||o.push(...(0,z.kO)()),function(e){for(const t of e)(0,i.T)(t)}(o);const a=function(e,t,n,r){const{url:i,type:o}=(0,B.l)(e),a=i||(null===r||void 0===r?void 0:r.url);let s=null,l="";null!==n&&void 0!==n&&n.mimeType&&(s=G(t,null===n||void 0===n?void 0:n.mimeType),l="match forced by supplied MIME type ".concat(null===n||void 0===n?void 0:n.mimeType));var c;s=s||function(e,t){const n=t&&U.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,a),l=l||(s?"matched url ".concat(a):""),s=s||G(t,o),l=l||(s?"matched MIME type ".concat(o):""),s=s||function(e,t){if(!t)return null;for(const n of e)if("string"===typeof t){if(K(t,n))return n}else if(ArrayBuffer.isView(t)){if(q(t.buffer,t.byteOffset,n))return n}else if(t instanceof ArrayBuffer){if(q(t,0,n))return n}return null}(t,e),l=l||(s?"matched initial data ".concat(Y(e)):""),s=s||G(t,null===n||void 0===n?void 0:n.fallbackMimeType),l=l||(s?"matched fallback MIME type ".concat(o):""),l&&Z.log(1,"selectLoader selected ".concat(null===(c=s)||void 0===c?void 0:c.name,": ").concat(l,"."));return s}(e,o,n,r);if(!a&&(null===n||void 0===n||!n.nothrow))throw new Error(W(e));return a}function V(e){return!(e instanceof Response&&204===e.status)}function W(e){const{url:t,type:n}=(0,B.l)(e);let r="No valid loader found (";r+=t?"".concat(function(e){const t=e&&e.lastIndexOf("/");return t>=0?e.substr(t+1):""}(t),", "):"no url provided, ",r+="MIME type: ".concat(n?'"'.concat(n,'"'):"not provided",", ");const i=e?Y(e):"";return r+=i?' first bytes: "'.concat(i,'"'):"first bytes: not available",r+=")",r}function G(e,t){for(const n of e){if(n.mimeTypes&&n.mimeTypes.includes(t))return n;if(t==="application/x.".concat(n.id))return n}return null}function K(e,t){if(t.testText)return t.testText(e);return(Array.isArray(t.tests)?t.tests:[t.tests]).some((t=>e.startsWith(t)))}function q(e,t,n){return(Array.isArray(n.tests)?n.tests:[n.tests]).some((r=>function(e,t,n,r){if(r instanceof ArrayBuffer)return function(e,t,n){if(n=n||e.byteLength,e.byteLength1&&void 0!==arguments[1]?arguments[1]:5;if("string"===typeof e)return e.slice(0,t);if(ArrayBuffer.isView(e))return X(e.buffer,e.byteOffset,t);if(e instanceof ArrayBuffer){return X(e,0,t)}return""}function X(e,t,n){if(e.byteLength1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2?arguments[2]:void 0,i=arguments.length>3?arguments[3]:void 0;if(!V(e))return null;let o=H(e,t,{...n,nothrow:!0},i);if(o)return o;if((0,r.Lj)(e)&&(o=H(e=await e.slice(0,10).arrayBuffer(),t,n,i)),!o&&(null===n||void 0===n||!n.nothrow))throw new Error(W(e));return o}(e,d,n);return f?(c=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(n)return n;const r={fetch:(0,o.bV)(t,e),...e};return Array.isArray(r.loaders)||(r.loaders=null),r}({url:u,parse:$,loaders:d},n=(0,o.GR)(n,f,d,u),c),await async function(e,t,n,i){if(function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s;a(e,"no worker provided");const n=e.version}(e),(0,r.Ew)(t)){const e=t,{ok:n,redirected:r,status:o,statusText:a,type:s,url:l}=e,c=Object.fromEntries(e.headers.entries());i.response={headers:c,ok:n,redirected:r,status:o,statusText:a,type:s,url:l}}if(t=await j(t,e,n),e.parseTextSync&&"string"===typeof t)return n.dataType="text",e.parseTextSync(t,n,i,e);if(function(e,t){return!!x.isSupported()&&!!(l||null!==t&&void 0!==t&&t._nodeWorkers)&&e.worker&&(null===t||void 0===t?void 0:t.worker)}(e,n))return await S(e,t,n,i,$);if(e.parseText&&"string"===typeof t)return await e.parseText(t,n,i,e);if(e.parse)return await e.parse(t,n,i,e);throw a(!e.parseSync),new Error("".concat(e.id," loader - no parser found and worker is disabled"))}(f,e,n,c)):null}async function Q(e,t,n,a){Array.isArray(t)||(0,i.C)(t)||(void 0,n=t,t=void 0);const s=(0,o.bV)(n);let l=e;return"string"===typeof e&&(l=await s(e)),(0,r.Lj)(e)&&(l=await s(e)),await $(l,t,n)}},44219:(e,t,n)=>{"use strict";n.d(t,{fh:()=>a,kO:()=>s});var r=n(13759),i=n(68863);const o=()=>{const e=(0,i.rx)();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=(0,r.T)(n);t.find((t=>e===t))||t.unshift(e)}}function s(){return o()}},13759:(e,t,n)=>{"use strict";n.d(t,{C:()=>i,T:()=>o});var r=n(69088);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(0,r.h)(e,"null loader"),(0,r.h)(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}},68863:(e,t,n)=>{"use strict";n.d(t,{bV:()=>v,rx:()=>p,GR:()=>m});var r=n(34375);let i="";const o={};var a=n(33441);async function s(e,t){if("string"===typeof e){e=function(e){for(const t in o)if(e.startsWith(t)){const n=o[t];e=e.replace(t,n)}return e.startsWith("http://")||e.startsWith("https://")||(e="".concat(i).concat(e)),e}(e);let n=t;return null!==t&&void 0!==t&&t.fetch&&"function"!==typeof(null===t||void 0===t?void 0:t.fetch)&&(n=t.fetch),await fetch(e,n)}return await(0,a.L1)(e)}var l=n(68185);const c=new(n(20251).Z)({id:"loaders.gl"});class u{log(){return()=>{}}info(){return()=>{}}warn(){return()=>{}}error(){return()=>{}}}var d=n(69113);const f={fetch:null,mimeType:void 0,nothrow:!1,log:new class{constructor(){(0,l.Z)(this,"console",void 0),this.console=console}log(){for(var e=arguments.length,t=new Array(e),n=0;n{const e=p();return e.globalOptions=e.globalOptions||{...f},e.globalOptions};function m(e,t,n,r){return n=n||[],function(e,t){A(e,null,f,h,t);for(const n of t){const r=e&&e[n.id]||{},i=n.options&&n.options[n.id]||{},o=n.deprecatedOptions&&n.deprecatedOptions[n.id]||{};A(r,n.id,i,o,t)}}(e,n=Array.isArray(n)?n:[n]),b(t,e,r)}function v(e,t){const n=g(),i=e||n;return"function"===typeof i.fetch?i.fetch:(0,r.Kn)(i.fetch)?e=>s(e,i):null!==t&&void 0!==t&&t.fetch?null===t||void 0===t?void 0:t.fetch:s}function A(e,t,n,i,o){const a=t||"Top level",s=t?"".concat(t,"."):"";for(const l in e){const u=!t&&(0,r.Kn)(e[l]);if(!(l in n)&&!("baseUri"===l&&!t)&&!("workerUrl"===l&&t))if(l in i)c.warn("".concat(a," loader option '").concat(s).concat(l,"' no longer supported, use '").concat(i[l],"'"))();else if(!u){const e=y(l,o);c.warn("".concat(a," loader option '").concat(s).concat(l,"' not recognized. ").concat(e))()}}}function y(e,t){const n=e.toLowerCase();let r="";for(const i of t)for(const t in i.options){if(e===t)return"Did you mean '".concat(i.id,".").concat(t,"'?");const o=t.toLowerCase();(n.startsWith(o)||o.startsWith(n))&&(r=r||"Did you mean '".concat(i.id,".").concat(t,"'?"))}return r}function b(e,t,n){const r={...e.options||{}};return function(e,t){t&&!("baseUri"in e)&&(e.baseUri=t)}(r,n),null===r.log&&(r.log=new u),_(r,g()),_(r,t),r}function _(e,t){for(const n in t)if(n in t){const i=t[n];(0,r.Ss)(i)&&(0,r.Ss)(e[n])?e[n]={...e[n],...t[n]}:e[n]=t[n]}}},51379:(e,t,n)=>{"use strict";n.d(t,{C:()=>u,l:()=>c});var r=n(34375);const i=/^data:([-\w.]+\/[-\w.+]+)(;|,)/,o=/^([-\w.]+\/[-\w.+]+)/;function a(e){const t=o.exec(e);return t?t[1]:e}function s(e){const t=i.exec(e);return t?t[1]:""}const l=/\?.*/;function c(e){if((0,r.Ew)(e)){const t=d(e.url||"");return{url:t,type:a(e.headers.get("content-type")||"")||s(t)}}return(0,r.Lj)(e)?{url:d(e.name||""),type:e.type||""}:"string"===typeof e?{url:d(e),type:s(e)}:{url:"",type:""}}function u(e){return(0,r.Ew)(e)?e.headers["content-length"]||-1:(0,r.Lj)(e)?e.size:"string"===typeof e?e.length:e instanceof ArrayBuffer||ArrayBuffer.isView(e)?e.byteLength:-1}function d(e){return e.replace(l,"")}},33441:(e,t,n)=>{"use strict";n.d(t,{L1:()=>o,mm:()=>a});var r=n(34375),i=n(51379);async function o(e){if((0,r.Ew)(e))return e;const t={},n=(0,i.C)(e);n>=0&&(t["content-length"]=String(n));const{url:o,type:a}=(0,i.l)(e);a&&(t["content-type"]=a);const s=await async function(e){const t=5;if("string"===typeof e)return"data:,".concat(e.slice(0,t));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||void 0===t||null===(n=t.target)||void 0===n?void 0:n.result)},n.readAsDataURL(t)}))}if(e instanceof ArrayBuffer){const n=function(e){let t="";const n=new Uint8Array(e);for(let r=0;r60?"".concat(t.slice(0,60),"..."):t}catch(n){}return t}(e);throw new Error(t)}}},68072:(e,t,n)=>{"use strict";n.r(t),n.d(t,{binaryToGeoJson:()=>u.cN,binaryToGeojson:()=>u.F_,binaryToGeometry:()=>u.fb,flatGeojsonToBinary:()=>r.E,geojsonToBinary:()=>c,geojsonToFlatGeojson:()=>o,transformBinaryCoords:()=>d,transformGeoJsonCoords:()=>h});var r=n(23140);var i=n(8766);function o(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{coordLength:2,fixRingWinding:!0};return e.map((e=>function(e,t){const{geometry:n}=e;if("GeometryCollection"===n.type)throw new Error("GeometryCollection type not supported");const r=[],i=[];let o,c;switch(n.type){case"Point":c="Point",a(n.coordinates,r,i,t);break;case"MultiPoint":c="Point",n.coordinates.map((e=>a(e,r,i,t)));break;case"LineString":c="LineString",s(n.coordinates,r,i,t);break;case"MultiLineString":c="LineString",n.coordinates.map((e=>s(e,r,i,t)));break;case"Polygon":c="Polygon",o=[],l(n.coordinates,r,i,o,t);break;case"MultiPolygon":c="Polygon",o=[],n.coordinates.map((e=>l(e,r,i,o,t)));break;default:throw new Error("Unknown type: ".concat(c))}return{...e,geometry:{type:c,indices:i,data:r,areas:o}}}(e,t)))}function a(e,t,n,r){n.push(t.length),t.push(...e);for(let i=e.length;ie.slice(0,2)));let n=(0,i.getPolygonSignedArea)(e.flat());const r=n<0;o.fixRingWinding&&(0===a&&!r||a>0&&r)&&(u.reverse(),n=-n),l.push(n),s(u,t,c,o),a++}a>0&&(r.push(l),n.push(c))}function c(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{fixRingWinding:!0};const n=function(e){let t=0,n=0,r=0,i=0,o=0,a=0,s=0,l=0,c=0;const u=new Set;for(const d of e){const e=d.geometry;switch(e.type){case"Point":n++,t++,u.add(e.coordinates.length);break;case"MultiPoint":n++,t+=e.coordinates.length;for(const t of e.coordinates)u.add(t.length);break;case"LineString":o++,r+=e.coordinates.length,i++;for(const t of e.coordinates)u.add(t.length);break;case"MultiLineString":o++;for(const t of e.coordinates){r+=t.length,i++;for(const e of t)u.add(e.length)}break;case"Polygon":c++,s++,l+=e.coordinates.length;const d=e.coordinates.flat();a+=d.length;for(const e of d)u.add(e.length);break;case"MultiPolygon":c++;for(const t of e.coordinates){s++,l+=t.length;const e=t.flat();a+=e.length;for(const t of e)u.add(t.length)}break;default:throw new Error("Unsupported geometry type: ".concat(e.type))}}return{coordLength:u.size>0?Math.max(...u):2,pointPositionsCount:t,pointFeaturesCount:n,linePositionsCount:r,linePathsCount:i,lineFeaturesCount:o,polygonPositionsCount:a,polygonObjectsCount:s,polygonRingsCount:l,polygonFeaturesCount:c}}(e),i=n.coordLength,{fixRingWinding:a}=t,s=o(e,{coordLength:i,fixRingWinding:a});return(0,r.E)(s,n,{numericPropKeys:t.numericPropKeys,PositionDataType:t.PositionDataType||Float32Array})}var u=n(60501);function d(e,t){return e.points&&f(e.points,t),e.lines&&f(e.lines,t),e.polygons&&f(e.polygons,t),e}function f(e,t){const{positions:n}=e;for(let r=0;rp(e,t)))}},60501:(e,t,n)=>{"use strict";function r(e,t){const n=null===t||void 0===t?void 0:t.globalFeatureId;return void 0!==n?function(e,t){const n=s(e);for(const r of n){let e=0,n=r.featureIds.value[0];for(let i=0;i2&&void 0!==arguments[2]?arguments[2]:"feature";switch(n){case"feature":return o(e,t);case"geometry":return a(e);default:throw new Error(n)}}function o(e,t){return function(e){const t=[];for(const n of e){if(0===n.featureIds.value.length)continue;let e=0,r=n.featureIds.value[0];for(let i=0;i1)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));if(!(i.length>2)){return{type:"LineString",coordinates:u(r,i[0],i[1])}}const o=[];for(let a=0;a1&&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),o=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);return{type:"Feature",geometry:r,properties:i,...o}}function c(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.polygonIndices.value.filter((e=>e>=t&&e<=n)),o=e.primitivePolygonIndices.value.filter((e=>e>=t&&e<=n));if(!(i.length>2)){const e=[];for(let t=0;tr,cN:()=>i,fb:()=>a})},23140:(e,t,n)=>{"use strict";n.d(t,{E:()=>i});var r=n(8766);function i(e,t,n){const r=o(e),i=Object.keys(r).filter((e=>r[e]!==Array));return function(e,t,n){const{pointPositionsCount:r,pointFeaturesCount:i,linePositionsCount:o,linePathsCount:c,lineFeaturesCount:d,polygonPositionsCount:h,polygonObjectsCount:p,polygonRingsCount:g,polygonFeaturesCount:m,propArrayTypes:v,coordLength:A}=t,{numericPropKeys:y=[],PositionDataType:b=Float32Array}=n,_=e[0]&&"id"in e[0],w=e.length>65535?Uint32Array:Uint16Array,x={type:"Point",positions:new b(r*A),globalFeatureIds:new w(r),featureIds:i>65535?new Uint32Array(r):new Uint16Array(r),numericProps:{},properties:[],fields:[]},E={type:"LineString",pathIndices:o>65535?new Uint32Array(c+1):new Uint16Array(c+1),positions:new b(o*A),globalFeatureIds:new w(o),featureIds:d>65535?new Uint32Array(o):new Uint16Array(o),numericProps:{},properties:[],fields:[]},S={type:"Polygon",polygonIndices:h>65535?new Uint32Array(p+1):new Uint16Array(p+1),primitivePolygonIndices:h>65535?new Uint32Array(g+1):new Uint16Array(g+1),positions:new b(h*A),triangles:[],globalFeatureIds:new w(h),featureIds:m>65535?new Uint32Array(h):new Uint16Array(h),numericProps:{},properties:[],fields:[]};for(const a of[x,E,S])for(const e of y){const t=v[e];a.numericProps[e]=new t(a.positions.length/A)}E.pathIndices[c]=o,S.polygonIndices[p]=h,S.primitivePolygonIndices[g]=h;const C={pointPosition:0,pointFeature:0,linePosition:0,linePath:0,lineFeature:0,polygonPosition:0,polygonObject:0,polygonRing:0,polygonFeature:0,feature:0};for(const u of e){const e=u.geometry,t=u.properties||{};switch(e.type){case"Point":a(e,x,C,A,t),x.properties.push(f(t,y)),_&&x.fields.push({id:u.id}),C.pointFeature++;break;case"LineString":s(e,E,C,A,t),E.properties.push(f(t,y)),_&&E.fields.push({id:u.id}),C.lineFeature++;break;case"Polygon":l(e,S,C,A,t),S.properties.push(f(t,y)),_&&S.fields.push({id:u.id}),C.polygonFeature++;break;default:throw new Error("Invalid geometry type")}C.feature++}return function(e,t,n,r){return{points:{...e,positions:{value:e.positions,size:r},globalFeatureIds:{value:e.globalFeatureIds,size:1},featureIds:{value:e.featureIds,size:1},numericProps:u(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:u(t.numericProps,1)},polygons:{...n,positions:{value:n.positions,size:r},polygonIndices:{value:n.polygonIndices,size:1},primitivePolygonIndices:{value:n.primitivePolygonIndices,size:1},triangles:{value:new Uint32Array(n.triangles),size:1},globalFeatureIds:{value:n.globalFeatureIds,size:1},featureIds:{value:n.featureIds,size:1},numericProps:u(n.numericProps,1)}}}(x,E,S,A)}(e,{propArrayTypes:r,...t},{numericPropKeys:n&&n.numericPropKeys||i,PositionDataType:n?n.PositionDataType:Float32Array})}function o(e){const t={};for(const n of e)if(n.properties)for(const e in n.properties){const r=n.properties[e];t[e]=h(r,t[e])}return t}function a(e,t,n,r,i){t.positions.set(e.data,n.pointPosition*r);const o=e.data.length/r;d(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 s(e,t,n,r,i){t.positions.set(e.data,n.linePosition*r);const o=e.data.length/r;d(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 a=0,s=e.indices.length;a(e-d)/s)),h=(0,r.earcut)(u,f,s,t);for(let r=0,p=h.length;r{"use strict";function r(e,t){if(!e)throw new Error(t||"loader assertion failed.")}n.d(t,{h:()=>r})},69113:(e,t,n)=>{"use strict";n.d(t,{jU:()=>r});"undefined"!==typeof self&&self,"undefined"!==typeof window&&window,"undefined"!==typeof n.g&&n.g,"undefined"!==typeof document&&document;const r=Boolean("object"!==typeof process||"[object process]"!==String(process)||process.browser),i="undefined"!==typeof process&&process.version&&/v([0-9]*)/.exec(process.version);i&&parseFloat(i[1])},45802:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.readTag=t.readFeature=t.project=t.classifyRings=void 0;const r=n(8766);function i(e,t){const n=e.readVarint()+e.pos;for(;e.pos{"use strict";function n(e){let t=0;for(let n,r,i=0,o=e.length-1;i{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TEST_EXPORTS=void 0;const r=n(45802);let i,o,a,s,l,c,u;t.TEST_EXPORTS={classifyRings:r.classifyRings};t.default=class{constructor(e,t,n,i,o,a){this.properties={},this.extent=n,this.type=0,this.id=null,this._pbf=e,this._geometry=-1,this._keys=i,this._values=o,this._geometryInfo=a,e.readFields(r.readFeature,this,t)}loadGeometry(){const e=this._pbf;e.pos=this._geometry,i=e.readVarint()+e.pos,o=1,s=0,l=0,c=0,u=0;const t=[],n=[];for(;e.pos>3),s--,1===o||2===o)l+=e.readSVarint(),c+=e.readSVarint(),1===o&&t.push(u),n.push(l,c),u+=2;else{if(7!==o)throw new Error("unknown command ".concat(o));if(u>0){const e=t[t.length-1];n.push(n[e],n[e+1]),u+=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,n={type:"Point",...t};break;case 2:this._geometryInfo.lineFeaturesCount++,this._geometryInfo.linePathsCount+=t.indices.length,this._geometryInfo.linePositionsCount+=t.data.length/2,n={type:"LineString",...t};break;case 3:n=(0,r.classifyRings)(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 i={type:"Feature",geometry:n,properties:this.properties};return null!==this.id&&(i.id=this.id),i}toBinaryCoordinates(e){if("function"===typeof e)return this._toBinaryCoordinates(e);const{x:t,y:n,z:i}=e,o=this.extent*Math.pow(2,i),a=this.extent*t,s=this.extent*n;return this._toBinaryCoordinates((e=>(0,r.project)(e,a,s,o)))}}},29243:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=r(n(30500));function o(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;t=1===n?e.readString():2===n?e.readFloat():3===n?e.readDouble():4===n?e.readVarint64():5===n?e.readVarint():6===n?e.readSVarint():7===n?e.readBoolean():null}return t}(n)))}t.default=class{constructor(e,t){this.version=1,this.name="",this.extent=4096,this.length=0,this._pbf=e,this._keys=[],this._values=[],this._features=[],e.readFields(o,this,t),this.length=this._features.length}feature(e,t){if(e<0||e>=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 i.default(this._pbf,n,this.extent,this._keys,this._values,t)}}},27615:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=r(n(29243));function o(e,t,n){if(3===e&&n){const e=new i.default(n,n.readVarint()+n.pos);e.length&&t&&(t[e.name]=e)}}t.default=class{constructor(e,t){this.layers=e.readFields(o,{},t)}}},85847:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(69209);class i{static get types(){return["Unknown","Point","LineString","Polygon"]}constructor(e,t,n,i,o){this.properties={},this.extent=n,this.type=0,this.id=null,this._pbf=e,this._geometry=-1,this._keys=i,this._values=o,e.readFields(r.readFeature,this,t)}loadGeometry(){const e=this._pbf;e.pos=this._geometry;const t=e.readVarint()+e.pos;let n=1,r=0,i=0,o=0;const a=[];let s;for(;e.pos>3}if(r--,1===n||2===n)i+=e.readSVarint(),o+=e.readSVarint(),1===n&&(s&&a.push(s),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,c=-1/0;for(;e.pos>3}if(r--,1===n||2===n)i+=e.readSVarint(),o+=e.readSVarint(),is&&(s=i),oc&&(c=o);else if(7!==n)throw new Error("unknown command ".concat(n))}return[a,l,s,c]}_toGeoJSON(e){let t,n,o=this.loadGeometry(),a=i.types[this.type];switch(this.type){case 1:const i=[];for(t=0;t>3;t=1===n?e.readString():2===n?e.readFloat():3===n?e.readDouble():4===n?e.readVarint64():5===n?e.readVarint():6===n?e.readSVarint():7===n?e.readBoolean():null}return t}(n)))}t.default=class{constructor(e,t){this.version=1,this.name="",this.extent=4096,this.length=0,this._pbf=e,this._keys=[],this._values=[],this._features=[],e.readFields(o,this,t),this.length=this._features.length}feature(e){if(e<0||e>=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 i.default(this._pbf,t,this.extent,this._keys,this._values)}}},36452:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=r(n(34925));function o(e,t,n){if(3===e&&n){const e=new i.default(n,n.readVarint()+n.pos);e.length&&t&&(t[e.name]=e)}}t.default=class{constructor(e,t){this.layers=e.readFields(o,{},t)}}},64274:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=n(68072),o=r(n(30576)),a=r(n(36452)),s=r(n(27615));function l(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 s.default(new o.default(e)),a=t&&Array.isArray(t.layers)?t.layers:Object.keys(i.layers);return a.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;r{"use strict";n.d(t,{Z:()=>r});const r={DEPTH_BUFFER_BIT:256,STENCIL_BUFFER_BIT:1024,COLOR_BUFFER_BIT:16384,POINTS:0,LINES:1,LINE_LOOP:2,LINE_STRIP:3,TRIANGLES:4,TRIANGLE_STRIP:5,TRIANGLE_FAN:6,ZERO:0,ONE:1,SRC_COLOR:768,ONE_MINUS_SRC_COLOR:769,SRC_ALPHA:770,ONE_MINUS_SRC_ALPHA:771,DST_ALPHA:772,ONE_MINUS_DST_ALPHA:773,DST_COLOR:774,ONE_MINUS_DST_COLOR:775,SRC_ALPHA_SATURATE:776,CONSTANT_COLOR:32769,ONE_MINUS_CONSTANT_COLOR:32770,CONSTANT_ALPHA:32771,ONE_MINUS_CONSTANT_ALPHA:32772,FUNC_ADD:32774,FUNC_SUBTRACT:32778,FUNC_REVERSE_SUBTRACT:32779,BLEND_EQUATION:32777,BLEND_EQUATION_RGB:32777,BLEND_EQUATION_ALPHA:34877,BLEND_DST_RGB:32968,BLEND_SRC_RGB:32969,BLEND_DST_ALPHA:32970,BLEND_SRC_ALPHA:32971,BLEND_COLOR:32773,ARRAY_BUFFER_BINDING:34964,ELEMENT_ARRAY_BUFFER_BINDING:34965,LINE_WIDTH:2849,ALIASED_POINT_SIZE_RANGE:33901,ALIASED_LINE_WIDTH_RANGE:33902,CULL_FACE_MODE:2885,FRONT_FACE:2886,DEPTH_RANGE:2928,DEPTH_WRITEMASK:2930,DEPTH_CLEAR_VALUE:2931,DEPTH_FUNC:2932,STENCIL_CLEAR_VALUE:2961,STENCIL_FUNC:2962,STENCIL_FAIL:2964,STENCIL_PASS_DEPTH_FAIL:2965,STENCIL_PASS_DEPTH_PASS:2966,STENCIL_REF:2967,STENCIL_VALUE_MASK:2963,STENCIL_WRITEMASK:2968,STENCIL_BACK_FUNC:34816,STENCIL_BACK_FAIL:34817,STENCIL_BACK_PASS_DEPTH_FAIL:34818,STENCIL_BACK_PASS_DEPTH_PASS:34819,STENCIL_BACK_REF:36003,STENCIL_BACK_VALUE_MASK:36004,STENCIL_BACK_WRITEMASK:36005,VIEWPORT:2978,SCISSOR_BOX:3088,COLOR_CLEAR_VALUE:3106,COLOR_WRITEMASK:3107,UNPACK_ALIGNMENT:3317,PACK_ALIGNMENT:3333,MAX_TEXTURE_SIZE:3379,MAX_VIEWPORT_DIMS:3386,SUBPIXEL_BITS:3408,RED_BITS:3410,GREEN_BITS:3411,BLUE_BITS:3412,ALPHA_BITS:3413,DEPTH_BITS:3414,STENCIL_BITS:3415,POLYGON_OFFSET_UNITS:10752,POLYGON_OFFSET_FACTOR:32824,TEXTURE_BINDING_2D:32873,SAMPLE_BUFFERS:32936,SAMPLES:32937,SAMPLE_COVERAGE_VALUE:32938,SAMPLE_COVERAGE_INVERT:32939,COMPRESSED_TEXTURE_FORMATS:34467,VENDOR:7936,RENDERER:7937,VERSION:7938,IMPLEMENTATION_COLOR_READ_TYPE:35738,IMPLEMENTATION_COLOR_READ_FORMAT:35739,BROWSER_DEFAULT_WEBGL:37444,STATIC_DRAW:35044,STREAM_DRAW:35040,DYNAMIC_DRAW:35048,ARRAY_BUFFER:34962,ELEMENT_ARRAY_BUFFER:34963,BUFFER_SIZE:34660,BUFFER_USAGE:34661,CURRENT_VERTEX_ATTRIB:34342,VERTEX_ATTRIB_ARRAY_ENABLED:34338,VERTEX_ATTRIB_ARRAY_SIZE:34339,VERTEX_ATTRIB_ARRAY_STRIDE:34340,VERTEX_ATTRIB_ARRAY_TYPE:34341,VERTEX_ATTRIB_ARRAY_NORMALIZED:34922,VERTEX_ATTRIB_ARRAY_POINTER:34373,VERTEX_ATTRIB_ARRAY_BUFFER_BINDING:34975,CULL_FACE:2884,FRONT:1028,BACK:1029,FRONT_AND_BACK:1032,BLEND:3042,DEPTH_TEST:2929,DITHER:3024,POLYGON_OFFSET_FILL:32823,SAMPLE_ALPHA_TO_COVERAGE:32926,SAMPLE_COVERAGE:32928,SCISSOR_TEST:3089,STENCIL_TEST:2960,NO_ERROR:0,INVALID_ENUM:1280,INVALID_VALUE:1281,INVALID_OPERATION:1282,OUT_OF_MEMORY:1285,CONTEXT_LOST_WEBGL:37442,CW:2304,CCW:2305,DONT_CARE:4352,FASTEST:4353,NICEST:4354,GENERATE_MIPMAP_HINT:33170,BYTE:5120,UNSIGNED_BYTE:5121,SHORT:5122,UNSIGNED_SHORT:5123,INT:5124,UNSIGNED_INT:5125,FLOAT:5126,DOUBLE:5130,DEPTH_COMPONENT:6402,ALPHA:6406,RGB:6407,RGBA:6408,LUMINANCE:6409,LUMINANCE_ALPHA:6410,UNSIGNED_SHORT_4_4_4_4:32819,UNSIGNED_SHORT_5_5_5_1:32820,UNSIGNED_SHORT_5_6_5:33635,FRAGMENT_SHADER:35632,VERTEX_SHADER:35633,COMPILE_STATUS:35713,DELETE_STATUS:35712,LINK_STATUS:35714,VALIDATE_STATUS:35715,ATTACHED_SHADERS:35717,ACTIVE_ATTRIBUTES:35721,ACTIVE_UNIFORMS:35718,MAX_VERTEX_ATTRIBS:34921,MAX_VERTEX_UNIFORM_VECTORS:36347,MAX_VARYING_VECTORS:36348,MAX_COMBINED_TEXTURE_IMAGE_UNITS:35661,MAX_VERTEX_TEXTURE_IMAGE_UNITS:35660,MAX_TEXTURE_IMAGE_UNITS:34930,MAX_FRAGMENT_UNIFORM_VECTORS:36349,SHADER_TYPE:35663,SHADING_LANGUAGE_VERSION:35724,CURRENT_PROGRAM:35725,NEVER:512,ALWAYS:519,LESS:513,EQUAL:514,LEQUAL:515,GREATER:516,GEQUAL:518,NOTEQUAL:517,KEEP:7680,REPLACE:7681,INCR:7682,DECR:7683,INVERT:5386,INCR_WRAP:34055,DECR_WRAP:34056,NEAREST:9728,LINEAR:9729,NEAREST_MIPMAP_NEAREST:9984,LINEAR_MIPMAP_NEAREST:9985,NEAREST_MIPMAP_LINEAR:9986,LINEAR_MIPMAP_LINEAR:9987,TEXTURE_MAG_FILTER:10240,TEXTURE_MIN_FILTER:10241,TEXTURE_WRAP_S:10242,TEXTURE_WRAP_T:10243,TEXTURE_2D:3553,TEXTURE:5890,TEXTURE_CUBE_MAP:34067,TEXTURE_BINDING_CUBE_MAP:34068,TEXTURE_CUBE_MAP_POSITIVE_X:34069,TEXTURE_CUBE_MAP_NEGATIVE_X:34070,TEXTURE_CUBE_MAP_POSITIVE_Y:34071,TEXTURE_CUBE_MAP_NEGATIVE_Y:34072,TEXTURE_CUBE_MAP_POSITIVE_Z:34073,TEXTURE_CUBE_MAP_NEGATIVE_Z:34074,MAX_CUBE_MAP_TEXTURE_SIZE:34076,TEXTURE0:33984,ACTIVE_TEXTURE:34016,REPEAT:10497,CLAMP_TO_EDGE:33071,MIRRORED_REPEAT:33648,TEXTURE_WIDTH:4096,TEXTURE_HEIGHT:4097,FLOAT_VEC2:35664,FLOAT_VEC3:35665,FLOAT_VEC4:35666,INT_VEC2:35667,INT_VEC3:35668,INT_VEC4:35669,BOOL:35670,BOOL_VEC2:35671,BOOL_VEC3:35672,BOOL_VEC4:35673,FLOAT_MAT2:35674,FLOAT_MAT3:35675,FLOAT_MAT4:35676,SAMPLER_2D:35678,SAMPLER_CUBE:35680,LOW_FLOAT:36336,MEDIUM_FLOAT:36337,HIGH_FLOAT:36338,LOW_INT:36339,MEDIUM_INT:36340,HIGH_INT:36341,FRAMEBUFFER:36160,RENDERBUFFER:36161,RGBA4:32854,RGB5_A1:32855,RGB565:36194,DEPTH_COMPONENT16:33189,STENCIL_INDEX:6401,STENCIL_INDEX8:36168,DEPTH_STENCIL:34041,RENDERBUFFER_WIDTH:36162,RENDERBUFFER_HEIGHT:36163,RENDERBUFFER_INTERNAL_FORMAT:36164,RENDERBUFFER_RED_SIZE:36176,RENDERBUFFER_GREEN_SIZE:36177,RENDERBUFFER_BLUE_SIZE:36178,RENDERBUFFER_ALPHA_SIZE:36179,RENDERBUFFER_DEPTH_SIZE:36180,RENDERBUFFER_STENCIL_SIZE:36181,FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE:36048,FRAMEBUFFER_ATTACHMENT_OBJECT_NAME:36049,FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL:36050,FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE:36051,COLOR_ATTACHMENT0:36064,DEPTH_ATTACHMENT:36096,STENCIL_ATTACHMENT:36128,DEPTH_STENCIL_ATTACHMENT:33306,NONE:0,FRAMEBUFFER_COMPLETE:36053,FRAMEBUFFER_INCOMPLETE_ATTACHMENT:36054,FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT:36055,FRAMEBUFFER_INCOMPLETE_DIMENSIONS:36057,FRAMEBUFFER_UNSUPPORTED:36061,FRAMEBUFFER_BINDING:36006,RENDERBUFFER_BINDING:36007,READ_FRAMEBUFFER:36008,DRAW_FRAMEBUFFER:36009,MAX_RENDERBUFFER_SIZE:34024,INVALID_FRAMEBUFFER_OPERATION:1286,UNPACK_FLIP_Y_WEBGL:37440,UNPACK_PREMULTIPLY_ALPHA_WEBGL:37441,UNPACK_COLORSPACE_CONVERSION_WEBGL:37443,READ_BUFFER:3074,UNPACK_ROW_LENGTH:3314,UNPACK_SKIP_ROWS:3315,UNPACK_SKIP_PIXELS:3316,PACK_ROW_LENGTH:3330,PACK_SKIP_ROWS:3331,PACK_SKIP_PIXELS:3332,TEXTURE_BINDING_3D:32874,UNPACK_SKIP_IMAGES:32877,UNPACK_IMAGE_HEIGHT:32878,MAX_3D_TEXTURE_SIZE:32883,MAX_ELEMENTS_VERTICES:33e3,MAX_ELEMENTS_INDICES:33001,MAX_TEXTURE_LOD_BIAS:34045,MAX_FRAGMENT_UNIFORM_COMPONENTS:35657,MAX_VERTEX_UNIFORM_COMPONENTS:35658,MAX_ARRAY_TEXTURE_LAYERS:35071,MIN_PROGRAM_TEXEL_OFFSET:35076,MAX_PROGRAM_TEXEL_OFFSET:35077,MAX_VARYING_COMPONENTS:35659,FRAGMENT_SHADER_DERIVATIVE_HINT:35723,RASTERIZER_DISCARD:35977,VERTEX_ARRAY_BINDING:34229,MAX_VERTEX_OUTPUT_COMPONENTS:37154,MAX_FRAGMENT_INPUT_COMPONENTS:37157,MAX_SERVER_WAIT_TIMEOUT:37137,MAX_ELEMENT_INDEX:36203,RED:6403,RGB8:32849,RGBA8:32856,RGB10_A2:32857,TEXTURE_3D:32879,TEXTURE_WRAP_R:32882,TEXTURE_MIN_LOD:33082,TEXTURE_MAX_LOD:33083,TEXTURE_BASE_LEVEL:33084,TEXTURE_MAX_LEVEL:33085,TEXTURE_COMPARE_MODE:34892,TEXTURE_COMPARE_FUNC:34893,SRGB:35904,SRGB8:35905,SRGB8_ALPHA8:35907,COMPARE_REF_TO_TEXTURE:34894,RGBA32F:34836,RGB32F:34837,RGBA16F:34842,RGB16F:34843,TEXTURE_2D_ARRAY:35866,TEXTURE_BINDING_2D_ARRAY:35869,R11F_G11F_B10F:35898,RGB9_E5:35901,RGBA32UI:36208,RGB32UI:36209,RGBA16UI:36214,RGB16UI:36215,RGBA8UI:36220,RGB8UI:36221,RGBA32I:36226,RGB32I:36227,RGBA16I:36232,RGB16I:36233,RGBA8I:36238,RGB8I:36239,RED_INTEGER:36244,RGB_INTEGER:36248,RGBA_INTEGER:36249,R8:33321,RG8:33323,R16F:33325,R32F:33326,RG16F:33327,RG32F:33328,R8I:33329,R8UI:33330,R16I:33331,R16UI:33332,R32I:33333,R32UI:33334,RG8I:33335,RG8UI:33336,RG16I:33337,RG16UI:33338,RG32I:33339,RG32UI:33340,R8_SNORM:36756,RG8_SNORM:36757,RGB8_SNORM:36758,RGBA8_SNORM:36759,RGB10_A2UI:36975,TEXTURE_IMMUTABLE_FORMAT:37167,TEXTURE_IMMUTABLE_LEVELS:33503,UNSIGNED_INT_2_10_10_10_REV:33640,UNSIGNED_INT_10F_11F_11F_REV:35899,UNSIGNED_INT_5_9_9_9_REV:35902,FLOAT_32_UNSIGNED_INT_24_8_REV:36269,UNSIGNED_INT_24_8:34042,HALF_FLOAT:5131,RG:33319,RG_INTEGER:33320,INT_2_10_10_10_REV:36255,CURRENT_QUERY:34917,QUERY_RESULT:34918,QUERY_RESULT_AVAILABLE:34919,ANY_SAMPLES_PASSED:35887,ANY_SAMPLES_PASSED_CONSERVATIVE:36202,MAX_DRAW_BUFFERS:34852,DRAW_BUFFER0:34853,DRAW_BUFFER1:34854,DRAW_BUFFER2:34855,DRAW_BUFFER3:34856,DRAW_BUFFER4:34857,DRAW_BUFFER5:34858,DRAW_BUFFER6:34859,DRAW_BUFFER7:34860,DRAW_BUFFER8:34861,DRAW_BUFFER9:34862,DRAW_BUFFER10:34863,DRAW_BUFFER11:34864,DRAW_BUFFER12:34865,DRAW_BUFFER13:34866,DRAW_BUFFER14:34867,DRAW_BUFFER15:34868,MAX_COLOR_ATTACHMENTS:36063,COLOR_ATTACHMENT1:36065,COLOR_ATTACHMENT2:36066,COLOR_ATTACHMENT3:36067,COLOR_ATTACHMENT4:36068,COLOR_ATTACHMENT5:36069,COLOR_ATTACHMENT6:36070,COLOR_ATTACHMENT7:36071,COLOR_ATTACHMENT8:36072,COLOR_ATTACHMENT9:36073,COLOR_ATTACHMENT10:36074,COLOR_ATTACHMENT11:36075,COLOR_ATTACHMENT12:36076,COLOR_ATTACHMENT13:36077,COLOR_ATTACHMENT14:36078,COLOR_ATTACHMENT15:36079,SAMPLER_3D:35679,SAMPLER_2D_SHADOW:35682,SAMPLER_2D_ARRAY:36289,SAMPLER_2D_ARRAY_SHADOW:36292,SAMPLER_CUBE_SHADOW:36293,INT_SAMPLER_2D:36298,INT_SAMPLER_3D:36299,INT_SAMPLER_CUBE:36300,INT_SAMPLER_2D_ARRAY:36303,UNSIGNED_INT_SAMPLER_2D:36306,UNSIGNED_INT_SAMPLER_3D:36307,UNSIGNED_INT_SAMPLER_CUBE:36308,UNSIGNED_INT_SAMPLER_2D_ARRAY:36311,MAX_SAMPLES:36183,SAMPLER_BINDING:35097,PIXEL_PACK_BUFFER:35051,PIXEL_UNPACK_BUFFER:35052,PIXEL_PACK_BUFFER_BINDING:35053,PIXEL_UNPACK_BUFFER_BINDING:35055,COPY_READ_BUFFER:36662,COPY_WRITE_BUFFER:36663,COPY_READ_BUFFER_BINDING:36662,COPY_WRITE_BUFFER_BINDING:36663,FLOAT_MAT2x3:35685,FLOAT_MAT2x4:35686,FLOAT_MAT3x2:35687,FLOAT_MAT3x4:35688,FLOAT_MAT4x2:35689,FLOAT_MAT4x3:35690,UNSIGNED_INT_VEC2:36294,UNSIGNED_INT_VEC3:36295,UNSIGNED_INT_VEC4:36296,UNSIGNED_NORMALIZED:35863,SIGNED_NORMALIZED:36764,VERTEX_ATTRIB_ARRAY_INTEGER:35069,VERTEX_ATTRIB_ARRAY_DIVISOR:35070,TRANSFORM_FEEDBACK_BUFFER_MODE:35967,MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS:35968,TRANSFORM_FEEDBACK_VARYINGS:35971,TRANSFORM_FEEDBACK_BUFFER_START:35972,TRANSFORM_FEEDBACK_BUFFER_SIZE:35973,TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN:35976,MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS:35978,MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS:35979,INTERLEAVED_ATTRIBS:35980,SEPARATE_ATTRIBS:35981,TRANSFORM_FEEDBACK_BUFFER:35982,TRANSFORM_FEEDBACK_BUFFER_BINDING:35983,TRANSFORM_FEEDBACK:36386,TRANSFORM_FEEDBACK_PAUSED:36387,TRANSFORM_FEEDBACK_ACTIVE:36388,TRANSFORM_FEEDBACK_BINDING:36389,FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING:33296,FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE:33297,FRAMEBUFFER_ATTACHMENT_RED_SIZE:33298,FRAMEBUFFER_ATTACHMENT_GREEN_SIZE:33299,FRAMEBUFFER_ATTACHMENT_BLUE_SIZE:33300,FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE:33301,FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE:33302,FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE:33303,FRAMEBUFFER_DEFAULT:33304,DEPTH24_STENCIL8:35056,DRAW_FRAMEBUFFER_BINDING:36006,READ_FRAMEBUFFER_BINDING:36010,RENDERBUFFER_SAMPLES:36011,FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER:36052,FRAMEBUFFER_INCOMPLETE_MULTISAMPLE:36182,UNIFORM_BUFFER:35345,UNIFORM_BUFFER_BINDING:35368,UNIFORM_BUFFER_START:35369,UNIFORM_BUFFER_SIZE:35370,MAX_VERTEX_UNIFORM_BLOCKS:35371,MAX_FRAGMENT_UNIFORM_BLOCKS:35373,MAX_COMBINED_UNIFORM_BLOCKS:35374,MAX_UNIFORM_BUFFER_BINDINGS:35375,MAX_UNIFORM_BLOCK_SIZE:35376,MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS:35377,MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS:35379,UNIFORM_BUFFER_OFFSET_ALIGNMENT:35380,ACTIVE_UNIFORM_BLOCKS:35382,UNIFORM_TYPE:35383,UNIFORM_SIZE:35384,UNIFORM_BLOCK_INDEX:35386,UNIFORM_OFFSET:35387,UNIFORM_ARRAY_STRIDE:35388,UNIFORM_MATRIX_STRIDE:35389,UNIFORM_IS_ROW_MAJOR:35390,UNIFORM_BLOCK_BINDING:35391,UNIFORM_BLOCK_DATA_SIZE:35392,UNIFORM_BLOCK_ACTIVE_UNIFORMS:35394,UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES:35395,UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER:35396,UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER:35398,OBJECT_TYPE:37138,SYNC_CONDITION:37139,SYNC_STATUS:37140,SYNC_FLAGS:37141,SYNC_FENCE:37142,SYNC_GPU_COMMANDS_COMPLETE:37143,UNSIGNALED:37144,SIGNALED:37145,ALREADY_SIGNALED:37146,TIMEOUT_EXPIRED:37147,CONDITION_SATISFIED:37148,WAIT_FAILED:37149,SYNC_FLUSH_COMMANDS_BIT:1,COLOR:6144,DEPTH:6145,STENCIL:6146,MIN:32775,MAX:32776,DEPTH_COMPONENT24:33190,STREAM_READ:35041,STREAM_COPY:35042,STATIC_READ:35045,STATIC_COPY:35046,DYNAMIC_READ:35049,DYNAMIC_COPY:35050,DEPTH_COMPONENT32F:36012,DEPTH32F_STENCIL8:36013,INVALID_INDEX:4294967295,TIMEOUT_IGNORED:-1,MAX_CLIENT_WAIT_TIMEOUT_WEBGL:37447,VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE:35070,UNMASKED_VENDOR_WEBGL:37445,UNMASKED_RENDERER_WEBGL:37446,MAX_TEXTURE_MAX_ANISOTROPY_EXT:34047,TEXTURE_MAX_ANISOTROPY_EXT:34046,COMPRESSED_RGB_S3TC_DXT1_EXT:33776,COMPRESSED_RGBA_S3TC_DXT1_EXT:33777,COMPRESSED_RGBA_S3TC_DXT3_EXT:33778,COMPRESSED_RGBA_S3TC_DXT5_EXT:33779,COMPRESSED_R11_EAC:37488,COMPRESSED_SIGNED_R11_EAC:37489,COMPRESSED_RG11_EAC:37490,COMPRESSED_SIGNED_RG11_EAC:37491,COMPRESSED_RGB8_ETC2:37492,COMPRESSED_RGBA8_ETC2_EAC:37493,COMPRESSED_SRGB8_ETC2:37494,COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:37495,COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2:37496,COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2:37497,COMPRESSED_RGB_PVRTC_4BPPV1_IMG:35840,COMPRESSED_RGBA_PVRTC_4BPPV1_IMG:35842,COMPRESSED_RGB_PVRTC_2BPPV1_IMG:35841,COMPRESSED_RGBA_PVRTC_2BPPV1_IMG:35843,COMPRESSED_RGB_ETC1_WEBGL:36196,COMPRESSED_RGB_ATC_WEBGL:35986,COMPRESSED_RGBA_ATC_EXPLICIT_ALPHA_WEBGL:35986,COMPRESSED_RGBA_ATC_INTERPOLATED_ALPHA_WEBGL:34798,UNSIGNED_INT_24_8_WEBGL:34042,HALF_FLOAT_OES:36193,RGBA32F_EXT:34836,RGB32F_EXT:34837,FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE_EXT:33297,UNSIGNED_NORMALIZED_EXT:35863,MIN_EXT:32775,MAX_EXT:32776,SRGB_EXT:35904,SRGB_ALPHA_EXT:35906,SRGB8_ALPHA8_EXT:35907,FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING_EXT:33296,FRAGMENT_SHADER_DERIVATIVE_HINT_OES:35723,COLOR_ATTACHMENT0_WEBGL:36064,COLOR_ATTACHMENT1_WEBGL:36065,COLOR_ATTACHMENT2_WEBGL:36066,COLOR_ATTACHMENT3_WEBGL:36067,COLOR_ATTACHMENT4_WEBGL:36068,COLOR_ATTACHMENT5_WEBGL:36069,COLOR_ATTACHMENT6_WEBGL:36070,COLOR_ATTACHMENT7_WEBGL:36071,COLOR_ATTACHMENT8_WEBGL:36072,COLOR_ATTACHMENT9_WEBGL:36073,COLOR_ATTACHMENT10_WEBGL:36074,COLOR_ATTACHMENT11_WEBGL:36075,COLOR_ATTACHMENT12_WEBGL:36076,COLOR_ATTACHMENT13_WEBGL:36077,COLOR_ATTACHMENT14_WEBGL:36078,COLOR_ATTACHMENT15_WEBGL:36079,DRAW_BUFFER0_WEBGL:34853,DRAW_BUFFER1_WEBGL:34854,DRAW_BUFFER2_WEBGL:34855,DRAW_BUFFER3_WEBGL:34856,DRAW_BUFFER4_WEBGL:34857,DRAW_BUFFER5_WEBGL:34858,DRAW_BUFFER6_WEBGL:34859,DRAW_BUFFER7_WEBGL:34860,DRAW_BUFFER8_WEBGL:34861,DRAW_BUFFER9_WEBGL:34862,DRAW_BUFFER10_WEBGL:34863,DRAW_BUFFER11_WEBGL:34864,DRAW_BUFFER12_WEBGL:34865,DRAW_BUFFER13_WEBGL:34866,DRAW_BUFFER14_WEBGL:34867,DRAW_BUFFER15_WEBGL:34868,MAX_COLOR_ATTACHMENTS_WEBGL:36063,MAX_DRAW_BUFFERS_WEBGL:34852,VERTEX_ARRAY_BINDING_OES:34229,QUERY_COUNTER_BITS_EXT:34916,CURRENT_QUERY_EXT:34917,QUERY_RESULT_EXT:34918,QUERY_RESULT_AVAILABLE_EXT:34919,TIME_ELAPSED_EXT:35007,TIMESTAMP_EXT:36392,GPU_DISJOINT_EXT:36795}},16621:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(39042),i=n(59661);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=(0,r.hQ)("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 n in e){let t=e[n];t=ArrayBuffer.isView(t)?{value:t}:t,(0,i.h)(ArrayBuffer.isView(t.value),"".concat(this._print(n),": must be typed array or object with value as typed array")),"POSITION"!==n&&"positions"!==n||t.size||(t.size=3),"indices"===n?((0,i.h)(!this.indices),this.indices=t):this.attributes[n]=t}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 r in e){const t=e[r],{value:i,size:o,constant:a}=t;!a&&i&&o>=1&&(n=Math.min(n,i.length/o))}return(0,i.h)(Number.isFinite(n)),n}}},44548:(e,t,n)=>{"use strict";n.d(t,{Z:()=>L});var r=n(76195),i=n(68833),o=n(39042),a=n(59661),s=n(36708),l=n(32073),c=n(71254),u=n(64180),d=n(1112);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||((0,r.D0)(e)||"Chrome"===(0,p.Z)())}static getDefaultArray(e){return e.luma=e.luma||{},e.luma.defaultVertexArray||(e.luma.defaultVertexArray=new g(e,{handle:null,isDefaultArray:!0})),e.luma.defaultVertexArray}static getMaxAttributes(e){return g.MAX_ATTRIBUTES=g.MAX_ATTRIBUTES||e.getParameter(34921),g.MAX_ATTRIBUTES}static setConstant(e,t,n){switch(n.constructor){case Float32Array:g._setConstantFloatArray(e,t,n);break;case Int32Array:g._setConstantIntArray(e,t,n);break;case Uint32Array:g._setConstantUintArray(e,t,n);break;default:(0,a.h)(!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 g.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(0,a.h)(!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:c,integer:u,divisor:d}=n,{gl:f,gl2:h}=this;return e=Number(e),this.bind((()=>{f.bindBuffer(34962,t.handle),u?((0,a.h)((0,r.D0)(f)),h.vertexAttribIPointer(e,i,o,s,l)):f.vertexAttribPointer(e,i,o,c,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&&!g.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 u.Z(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 l=r;s34373===e?this.gl.getVertexAttribOffset(n,e):this.gl.getVertexAttrib(n,e)))}}var m=n(43331);const v=/^(.+)__LOCATION_([0-9]+)$/,A=["setBuffers","setGeneric","clearBindings","setLocations","setGenericValues","setDivisor","enable","disable"];class y{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 g(e),(0,m.F)(this,"VertexArray","v6.0",A),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 u.Z(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.cM.once(3,(()=>"unused value ".concat(e," in ").concat(this.id)))(),o;const u=this._getAttributeInfo(l||s);if(!u)return o;const d=this.accessors[s]||{},f=c.Z.resolve(u.accessor,d,n,i),{size:h,type:p}=f;return(0,a.h)(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=v.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 u.Z)this.setBuffer(e,t);else if(Array.isArray(t)&&t.length&&t[0]instanceof u.Z){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 u.Z))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 i=1;i0;if(e.isInstanced=e.isInstanced||o,n instanceof u.Z){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.cM.deprecated("setElements","setElementBuffer")(),this.setElementBuffer(e,t)}}var b=n(73011),_=n(55562),w=n(2187);function x(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{isInteger:n=!1}=t;if(Array.isArray(e)||ArrayBuffer.isView(e))return function(e,t){const{maxElts:n=16,size:r=1}=t;let i="[";for(let a=0;a0&&(i+=",".concat(a%r===0?" ":"")),i+=x(e[a],t);const o=e.length>n?"...":"]";return"".concat(i).concat(o)}(e,t);if(!Number.isFinite(e))return String(e);if(Math.abs(e)<1e-16)return n?"0":"0.";if(n)return e.toFixed(0);if(Math.abs(e)>100&&Math.abs(e)<1e4)return e.toFixed(0);const r=e.toPrecision(2);return r.indexOf(".0")===r.length-2?r.slice(0,-1):r}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",c=1,d=0,f=0;if(n&&(l=n.type,c=n.size,l=String(l).replace("Array",""),o=-1!==l.indexOf("nt")),t instanceof u.Z){const e=t,{data:u,changed:h}=e.getDebugData();let p;if(a=h?"*":"",s=u,f=e.byteLength,d=f/u.BYTES_PER_ELEMENT/c,n){const e=n.divisor>0;p="".concat(e?"I ":"P "," ").concat(d," (x").concat(c,"=").concat(f," bytes ").concat((0,_.km)(i,l),")")}else o=!0,p="".concat(f," bytes");return{[r]:"".concat(a).concat(x(s,{size:c,isInteger:o})),"Format ":p}}return s=t,c=t.length,l=String(t.constructor.name).replace("Array",""),o=-1!==l.indexOf("nt"),{[r]:"".concat(x(s,{size:c,isInteger:o})," (constant)"),"Format ":"".concat(c,"x").concat(l," (constant)")}}function S(e,t){const{type:n,size:r}=t,i=(0,w.jG)(n,r);return i?"".concat(e," (").concat(i.name,")"):e}function C(e){let{header:t="Uniforms",program:n,uniforms:r,undefinedOnly:i=!1}=e;(0,a.h)(n);const o=".*Matrix",s=n._uniformSetters,l={},c=Object.keys(s).sort();let u=0;for(const a of c)a.match(".*_.*")||a.match(o)||P({table:l,header:t,uniforms:r,uniformName:a,undefinedOnly:i})&&u++;for(const a of c)a.match(o)&&P({table:l,header:t,uniforms:r,uniformName:a,undefinedOnly:i})&&u++;for(const a of c)l[a]||P({table:l,header:t,uniforms:r,uniformName:a,undefinedOnly:i})&&u++;let d=0;const f={};if(!i)for(const a in r){const e=r[a];l[a]||(d++,f[a]={Type:"NOT USED: ".concat(e),[t]:x(e)})}return{table:l,count:u,unusedTable:f,unusedCount:d}}function P(e){let{table:t,header:n,uniforms:r,uniformName:i,undefinedOnly:o}=e;const a=r[i],s=function(e){return void 0!==e&&null!==e}(a);return(!o||!s)&&(t[i]={[n]:s?x(a):"N/A","Uniform Type":s?a:"NOT PROVIDED"},!0)}function T(e){const{type:t,size:n}=e.accessor,r=(0,w.jG)(t,n);return r?"".concat(r.name," ").concat(e.name):e.name}const k={POSITION:"positions",NORMAL:"normals",COLOR_0:"colors",TEXCOORD_0:"texCoords",TEXCOORD_1:"texCoords1",TEXCOORD_2:"texCoords2"};function M(e,t){const{attributeMap:n=k}=t||{};return n&&n[e]||e}function O(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}(0,a.h)(Number.isFinite(t.size),"attribute ".concat(e," needs size"))}const R=()=>{},I={};class L{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{id:n=(0,o.hQ)("model")}=t;(0,a.h)((0,r.UF)(e)),this.id=n,this.gl=e,this.id=t.id||(0,o.hQ)("Model"),this.lastLogTime=0,this.animated=!1,this.initialize(t)}initialize(e){this.props={},this.programManager=e.programManager||i.Z.getDefaultProgramManager(this.gl),this._programManagerState=-1,this._managedProgram=!1;const{program:t=null,vs:n,fs:r,modules:o,defines:s,inject:l,varyings:c,bufferMode:u,transpileToGLSL100:d}=e;this.programProps={program:t,vs:n,fs:r,modules:o,defines:s,inject:l,varyings:c,bufferMode:u,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={},(0,a.h)(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:c}=e;this.programProps={program:t,vs:n,fs:r,modules:i,defines:o,inject:a,varyings:s,bufferMode:l,transpileToGLSL100:c},this._programDirty=!0}getUniforms(){return this.uniforms}setDrawMode(e){return this.drawMode=e,this}setVertexCount(e){return(0,a.h)(Number.isFinite(e)),this.vertexCount=e,this}setInstanceCount(e){return(0,a.h)(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=M(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 u.Z(e,t),n],O(o,n)}}if(i){const t=i.value||i;(0,a.h)(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 u.Z(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((0,o.nK)(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(0,s.Z)(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 c;this.setAttributes(o),this.updateModuleSettings(t),this.setUniforms(i),r.cM.priority>=2&&(c=this._logDrawCallStart(2));const u=this.vertexArray.getDrawParams(),{isIndexed:d=u.isIndexed,indexType:f=u.indexType,indexOffset:h=u.indexOffset,vertexArrayInstanced:p=u.isInstanced}=this.props;p&&!this.isInstanced&&r.cM.warn("Found instanced attributes on non-instanced model",this.id)();const{isInstanced:g,instanceCount:m}=this,{onBeforeRender:v=R,onAfterRender:A=R}=this.props;v(),this.program.setUniforms(this.uniforms);const y=this.program.draw(Object.assign(I,e,{logPriority:c,uniforms:null,framebuffer:n,parameters:s,drawMode:this.getDrawMode(),vertexCount:this.getVertexCount(),vertexArray:l,transformFeedback:a,isIndexed:d,indexType:f,isInstanced:g,instanceCount:m,offset:d?h:0}));return A(),r.cM.priority>=2&&this._logDrawCallEnd(c,l,n),y}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.cM.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}(0,a.h)(e instanceof l.Z,"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 y(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 u.Z&&t.delete()}}_setAnimationProps(e){this.animated&&(0,a.h)(e,"Model.draw(): animated uniforms but no animationProps")}_setFeedbackBuffers(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if((0,o.nK)(e))return this;const{gl:t}=this.program;return this.transformFeedback=this.transformFeedback||new b.Z(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.cM.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 o in i){const e=t._getAttributeInfo(o);if(e){let a="".concat(o,": ").concat(e.name);const s=t.accessors[e.location];s&&(a="".concat(o,": ").concat(S(e.name,s))),r[a]=E(t,i[o],s,n)}}return r}({vertexArray:t,header:"".concat(this.id," attributes"),attributes:this._attributes}),{table:a,unusedTable:s,unusedCount:l}=C({header:"".concat(this.id," uniforms"),program:this.program,uniforms:Object.assign({},this.program.uniforms,n)}),{table:c,count:u}=C({header:"".concat(this.id," uniforms"),program:this.program,uniforms:Object.assign({},this.program.uniforms,n),undefinedOnly:!0});u>0&&r.cM.log("MISSING UNIFORMS",Object.keys(c))(),l>0&&r.cM.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=T(r);t["in ".concat(e)]={[n]:JSON.stringify(r.accessor)}}for(const r of e.varyingInfos)if(r){const e=T(r);t["out ".concat(e)]={[n]:JSON.stringify(r.accessor)}}return t}(this.vertexArray.configuration);r.cM.table(e,o)(),r.cM.table(e,a)(),r.cM.table(e+1,d)(),i&&i.log({logLevel:2,message:"Rendered to ".concat(i.id)}),r.cM.groupEnd(2)()}}},68833:(e,t,n)=>{"use strict";n.d(t,{Z:()=>H});var r=n(91203),i=n(7064);const o={number:{validate:(e,t)=>Number.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 a(e){let t=s(e);return"object"===t?e?"type"in e?Object.assign({},e,o[e.type]):"value"in e?(t=s(e.value),Object.assign({type:t},e,o[t])):{type:"object",value:e}:{type:"object",value:null}:Object.assign({type:t,value:e},o[t])}function s(e){return Array.isArray(e)||ArrayBuffer.isView(e)?"array":typeof e}class l{constructor(e){let{name:t,vs:n,fs:r,dependencies:o=[],uniforms:s,getUniforms:l,deprecations:c=[],defines:u={},inject:d={},vertexShader:f,fragmentShader:h}=e;(0,i.Z)("string"===typeof t),this.name=t,this.vs=n||f,this.fs=r||h,this.getModuleUniforms=l,this.dependencies=o,this.deprecations=this._parseDeprecationDefinitions(c),this.defines=u,this.injections=function(e){const t={vs:{},fs:{}};for(const n in e){let r=e[n];"string"===typeof r&&(r={order:0,injection:r}),t[n.slice(0,2)][n]=r}return t}(d),s&&(this.uniforms=function(e){const t={};for(const n in e){const r=a(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:(0,i.Z)(!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=>{if("function"===e.type)e.regex=new RegExp("\\b".concat(e.old,"\\("));else 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 r in n){const o=n[r];r in e&&!o.private?(o.validate&&(0,i.Z)(o.validate(e[r],o),"".concat(this.name,": invalid ").concat(r)),t[r]=e[r]):t[r]=o.value}return t}}function c(e){return u(f(e))}function u(e){const t={},n={};return d({modules:e,level:0,moduleMap:t,moduleDepth:n}),Object.keys(n).sort(((e,t)=>n[t]-n[e])).map((e=>t[e]))}function d(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 o of t)r[o.name]=o,(void 0===i[o.name]||i[o.name](e instanceof l||((0,i.Z)("string"!==typeof e,"Shader module use by name is deprecated. Import shader module '".concat(e,"' and use it directly.")),(0,i.Z)(e.name,"shader module has no name"),(e=new l(e)).dependencies=f(e.dependencies)),e)))}const h=7936,p=7937,g=7938,m=35724,v={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]},A={};Object.keys(v).forEach((e=>{A[e]=e}));const y={};function b(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=v[t];if((0,i.Z)(r,t),!function(){let e=arguments.length>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}(n))return!0;if(t in y)return y[t];const o=r[0],a=n.behavior||"enable",s="#extension GL_".concat(o," : ").concat(a,"\nvoid main(void) {}"),l=e.createShader(35633);e.shaderSource(l,s),e.compileShader(l);const c=e.getShaderParameter(l,35713);return e.deleteShader(l),y[t]=c,c}function _(e,t){const n=v[t];(0,i.Z)(n,t);const r=function(e){return"undefined"!==typeof WebGL2RenderingContext&&e instanceof WebGL2RenderingContext||Boolean(e&&2===e._version)}(e)&&n[1]||n[0],o="string"===typeof r?Boolean(e.getExtension(r)):r;return(0,i.Z)(!1===o||!0===o),o}function w(e,t){return(t=Array.isArray(t)?t:[t]).every((t=>_(e,t)))}function x(e){const t=function(e){const t=e.getExtension("WEBGL_debug_renderer_info"),n=e.getParameter(t&&t.UNMASKED_VENDOR_WEBGL||h),r=e.getParameter(t&&t.UNMASKED_RENDERER_WEBGL||p);return{gpuVendor:function(e,t){return e.match(/NVIDIA/i)||t.match(/NVIDIA/i)?"NVIDIA":e.match(/INTEL/i)||t.match(/INTEL/i)?"INTEL":e.match(/AMD/i)||t.match(/AMD/i)||e.match(/ATI/i)||t.match(/ATI/i)?"AMD":"UNKNOWN GPU"}(n,r),vendor:n,renderer:r,version:e.getParameter(g),shadingLanguageVersion:e.getParameter(m)}}(e);switch(t.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"}}var E=n(11558);function S(e){return new RegExp("\\b".concat(e,"[ \\t]+(\\w+[ \\t]+\\w+(\\[\\w+\\])?;)"),"g")}const C=[[/^(#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("]],P=[...C,[S("attribute"),"in $1"],[S("varying"),"out $1"]],T=[...C,[S("varying"),"in $1"]],k=[[/^#version[ \t]+300[ \t]+es/,"#version 100"],[/\btexture(2D|2DProj|Cube)Lod\(/g,"texture$1LodEXT("],[/\btexture\(/g,"texture2D("],[/\btextureLod\(/g,"texture2DLodEXT("]],M=[...k,[S("in"),"attribute $1"],[S("out"),"varying $1"]],O=[...k,[S("in"),"varying $1"]],R="gl_FragColor",I=/\bout[ \t]+vec4[ \t]+(\w+)[ \t]*;\n?/,L=/void\s+main\s*\([^)]*\)\s*\{\n?/;function N(e,t,n){switch(t){case 300:return n?D(e,P):function(e){e=D(e,T);const t=e.match(I);if(t){const n=t[1];e=e.replace(new RegExp("\\b".concat(R,"\\b"),"g"),n)}else{const t="fragmentColor";e=e.replace(L,(e=>"out vec4 ".concat(t,";\n").concat(e))).replace(new RegExp("\\b".concat(R,"\\b"),"g"),t)}return e}(e);case 100:return n?D(e,M):function(e){e=D(e,O);const t=e.match(I);if(t){const n=t[1];e=e.replace(I,"").replace(new RegExp("\\b".concat(n,"\\b"),"g"),R)}return e}(e);default:throw new Error("unknown GLSL version ".concat(t))}}function D(e,t){for(const[n,r]of t)e=e.replace(n,r);return e}const F="\n\n".concat(E.O_,"\n\n"),j={[r.H]:"vertex",[r.Y]:"fragment"},B="precision highp float;\n\n";function Z(e,t){let{id:n,source:o,type:a,modules:s,defines:l={},hookFunctions:c=[],inject:u={},transpileToGLSL100:d=!1,prologue:f=!0,log:h}=t;(0,i.Z)("string"===typeof o,"shader source must be a string");const p=a===r.H,g=o.split("\n");let m=100,v="",y=o;0===g[0].indexOf("#version ")?(m=300,v=g[0],y=g.slice(1).join("\n")):v="#version ".concat(m);const _={};s.forEach((e=>{Object.assign(_,e.getDefines())})),Object.assign(_,l);let S=f?"".concat(v,"\n").concat(function(e){let{id:t,source:n,type:r}=e;const i=t&&"string"===typeof t&&-1===n.indexOf("SHADER_NAME");return i?"\n#define SHADER_NAME ".concat(t,"_").concat(j[r],"\n\n"):""}({id:n,source:o,type:a}),"\n").concat(function(e){let{type:t}=e;return"\n#define SHADER_TYPE_".concat(j[t].toUpperCase(),"\n")}({type:a}),"\n").concat(x(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 w(e,A.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"),w(e,A.GLSL_DERIVATIVES)&&b(e,A.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"),w(e,A.GLSL_FRAG_DATA)&&b(e,A.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"),w(e,A.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}(_),"\n").concat(p?"":B,"\n"):"".concat(v,"\n");const C=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}(c),P={},T={},k={};for(const r in u){const e="string"===typeof u[r]?{injection:u[r],order:0}:u[r],t=r.match(/^(v|f)s:(#)?([\w-]+)$/);if(t){const n=t[2],i=t[3];n?"decl"===i?T[r]=[e]:k[r]=[e]:P[r]=[e]}else k[r]=[e]}for(const r of s){h&&r.checkDeprecations(y,h);S+=r.getModuleSource(a,m);const e=r.injections[a];for(const t in e){const n=t.match(/^(v|f)s:#([\w-]+)$/);if(n){const r="decl"===n[2]?T:k;r[t]=r[t]||[],r[t].push(e[t])}else P[t]=P[t]||[],P[t].push(e[t])}}return S+=F,S=(0,E.ZP)(S,a,T),S+=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}(C[a],P),S+=y,S=(0,E.ZP)(S,a,k),S=N(S,d?100:m,p),S}function z(e){return function(t){const n={};for(const r of e){const e=r.getUniforms(t,n);Object.assign(n,e)}return n}}var U=n(32073);class H{static getDefaultProgramManager(e){return e.luma=e.luma||{},e.luma.defaultProgramManager=e.luma.defaultProgramManager||new H(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:i={},inject:o={},varyings:a=[],bufferMode:s=35981,transpileToGLSL100:l=!1}=e,u=this._getModuleList(e.modules),d=this._getHash(t),f=this._getHash(n),h=u.map((e=>this._getHash(e.name))).sort(),p=a.map((e=>this._getHash(e))),g=Object.keys(i).sort(),m=Object.keys(o).sort(),v=[],A=[];for(const r of g)v.push(this._getHash(r)),v.push(this._getHash(i[r]));for(const r of m)A.push(this._getHash(r)),A.push(this._getHash(o[r]));const y="".concat(d,"/").concat(f,"D").concat(v.join("/"),"M").concat(h.join("/"),"I").concat(A.join("/"),"V").concat(p.join("/"),"H").concat(this.stateHash,"B").concat(s).concat(l?"T":"");if(!this._programCache[y]){const e=function(e,t){const{vs:n,fs:i}=t,o=c(t.modules||[]);return{gl:e,vs:Z(e,Object.assign({},t,{source:n,type:r.H,modules:o})),fs:Z(e,Object.assign({},t,{source:i,type:r.Y,modules:o})),getUniforms:z(o)}}(this.gl,{vs:t,fs:n,modules:u,inject:o,defines:i,hookFunctions:this._hookFunctions,transpileToGLSL100:l});this._programCache[y]=new U.Z(this.gl,{hash:y,vs:e.vs,fs:e.fs,varyings:a,bufferMode:s}),this._getUniforms[y]=e.getUniforms||(e=>{}),this._useCounts[y]=0}return this._useCounts[y]++,this._programCache[y]}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 i=0,o=this._defaultModules.length;i{"use strict";n.d(t,{Z:()=>T});var r=n(7064);const i="out vec4 transform_output;\nvoid main() {\n transform_output = vec4(0);\n}",o="#version 300 es\n".concat(i);function a(e,t){t=Array.isArray(t)?t:[t];const n=e.replace(/^\s+/,"").split(/\s+/),[r,i,o]=n;if(!t.includes(r)||!i||!o)return null;return{qualifier:r,type:i,name:o.split(";")[0]}}function s(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{version:t=100,input:n,inputType:a,output:s}=e;if(!n)return 300===t?o:t>300?"#version ".concat(t,"\n").concat(i):"void main() {gl_FragColor = vec4(0);}";const l=function(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(0,r.Z)(!1),null}}(n,a);return t>=300?"#version ".concat(t," ").concat(300===t?"es":"","\nin ").concat(a," ").concat(n,";\nout vec4 ").concat(s,";\nvoid main() {\n ").concat(s," = ").concat(l,";\n}"):"varying ".concat(a," ").concat(n,";\nvoid main() {\n gl_FragColor = ").concat(l,";\n}")}var l=n(76195),c=n(64180),u=n(73011),d=n(59661);class f{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.gl=e,this.currentIndex=0,this.feedbackMap={},this.varyings=null,this.bindings=[],this.resources={},this._initialize(t),Object.seal(this)}setupResources(e){for(const t of this.bindings)this._setupTransformFeedback(t,e)}updateModelProps(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{varyings:t}=this;return t.length>0&&(e=Object.assign({},e,{varyings:t})),e}getDrawOptions(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=this.bindings[this.currentIndex],{sourceBuffers:n,transformFeedback:r}=t;return{attributes:Object.assign({},n,e.attributes),transformFeedback:r}}swap(){return!!this.feedbackMap&&(this.currentIndex=this._getNextIndex(),!0)}update(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this._setupBuffers(e)}getBuffer(e){const{feedbackBuffers:t}=this.bindings[this.currentIndex],n=e?t[e]:null;return n?n instanceof c.Z?n:n.buffer:null}getData(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{varyingName:t}=e,n=this.getBuffer(t);return n?n.getData():null}delete(){for(const e in this.resources)this.resources[e].delete()}_initialize(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this._setupBuffers(e),this.varyings=e.varyings||Object.keys(this.bindings[this.currentIndex].feedbackBuffers),this.varyings.length>0&&(0,d.h)((0,l.D0)(this.gl))}_getFeedbackBuffers(e){const{sourceBuffers:t={}}=e,n={};if(this.bindings[this.currentIndex]&&Object.assign(n,this.bindings[this.currentIndex].feedbackBuffers),this.feedbackMap)for(const r in this.feedbackMap){const e=this.feedbackMap[r];r in t&&(n[e]=r)}Object.assign(n,e.feedbackBuffers);for(const r in n){const e=n[r];if("string"===typeof e){const i=t[e],{byteLength:o,usage:a,accessor:s}=i;n[r]=this._createNewBuffer(r,{byteLength:o,usage:a,accessor:s})}}return n}_setupBuffers(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{sourceBuffers:t=null}=e;Object.assign(this.feedbackMap,e.feedbackMap);const n=this._getFeedbackBuffers(e);this._updateBindings({sourceBuffers:t,feedbackBuffers:n})}_setupTransformFeedback(e,t){let{model:n}=t;const{program:r}=n;e.transformFeedback=new u.Z(this.gl,{program:r,buffers:e.feedbackBuffers})}_updateBindings(e){if(this.bindings[this.currentIndex]=this._updateBinding(this.bindings[this.currentIndex],e),this.feedbackMap){const{sourceBuffers:e,feedbackBuffers:t}=this._swapBuffers(this.bindings[this.currentIndex]),n=this._getNextIndex();this.bindings[n]=this._updateBinding(this.bindings[n],{sourceBuffers:e,feedbackBuffers:t})}}_updateBinding(e,t){return e?(Object.assign(e.sourceBuffers,t.sourceBuffers),Object.assign(e.feedbackBuffers,t.feedbackBuffers),e.transformFeedback&&e.transformFeedback.setBuffers(e.feedbackBuffers),e):{sourceBuffers:Object.assign({},t.sourceBuffers),feedbackBuffers:Object.assign({},t.feedbackBuffers)}}_swapBuffers(e){if(!this.feedbackMap)return null;const t=Object.assign({},e.sourceBuffers),n=Object.assign({},e.feedbackBuffers);for(const r in this.feedbackMap){const i=this.feedbackMap[r];t[r]=e.feedbackBuffers[i],n[i]=e.sourceBuffers[r],(0,d.h)(n[i]instanceof c.Z)}return{sourceBuffers:t,feedbackBuffers:n}}_createNewBuffer(e,t){const n=new c.Z(this.gl,t);return this.resources[e]&&this.resources[e].delete(),this.resources[e]=n,n}_getNextIndex(){return(this.currentIndex+1)%2}}var h=n(77378),p=n(81786),g=n(64282),m=n(15671);function v(e){let t=100;const n=e.match(/[^\s]+/g);if(n.length>=2&&"#version"===n[0]){const e=parseInt(n[1],10);Number.isFinite(e)&&(t=e)}return t}var A=n(11558);const y={name:"transform",vs:"attribute float transform_elementID;\nvec2 transform_getPixelSizeHalf(vec2 size) {\n return vec2(1.) / (2. * size);\n}\n\nvec2 transform_getPixelIndices(vec2 texSize, vec2 pixelSizeHalf) {\n float yIndex = floor((transform_elementID / texSize[0]) + pixelSizeHalf[1]);\n float xIndex = transform_elementID - (yIndex * texSize[0]);\n return vec2(xIndex, yIndex);\n}\nvec2 transform_getTexCoord(vec2 size) {\n vec2 pixelSizeHalf = transform_getPixelSizeHalf(size);\n vec2 indices = transform_getPixelIndices(size, pixelSizeHalf);\n vec2 coord = indices / size + pixelSizeHalf;\n return coord;\n}\nvec2 transform_getPos(vec2 size) {\n vec2 texCoord = transform_getTexCoord(size);\n vec2 pos = (texCoord * (2.0, 2.0)) - (1., 1.);\n return pos;\n}\nvec4 transform_getInput(sampler2D texSampler, vec2 size) {\n vec2 texCoord = transform_getTexCoord(size);\n vec4 textureColor = texture2D(texSampler, texCoord);\n return textureColor;\n}\n",fs:null},b="transform_uSampler_",_="transform_uSize_",w="transform_position";function x(e){let{vs:t,sourceTextureMap:n,targetTextureVarying:i,targetTexture:o}=e;let s=Object.keys(n).length,l=null;const c={};let u=t,f={};if(s>0||i){const e=u.split("\n"),t=e.slice();if(e.forEach(((e,o,u)=>{if(s>0){const i=function(e,t){const n={},i=function(e){return a(e,["attribute","in"])}(e);if(!i)return null;const{type:o,name:s}=i;if(s&&t[s]){const t="// ".concat(e," => Replaced by Transform with a sampler"),{samplerName:i,sizeName:a,uniformDeclerations:l}=function(e){const t="".concat(b).concat(e),n="".concat(_).concat(e),r=" uniform sampler2D ".concat(t,";\n uniform vec2 ").concat(n,";");return{samplerName:t,sizeName:n,uniformDeclerations:r}}(s),c=function(e){switch(e){case"float":return"x";case"vec2":return"xy";case"vec3":return"xyz";case"vec4":return"xyzw";default:return(0,r.Z)(!1),null}}(o),u=" ".concat(o," ").concat(s," = transform_getInput(").concat(i,", ").concat(a,").").concat(c,";\n");n[i]=s;return{updatedLine:t,inject:{"vs:#decl":l,"vs:#main-start":u},samplerTextureMap:n}}return null}(e,n);if(i){const{updatedLine:e,inject:n}=i;t[o]=e,f=(0,A.Lm)([f,n]),Object.assign(c,i.samplerTextureMap),s--}}i&&!l&&(l=function(e,t){const n=a(e,["varying","out"]);if(!n)return null;return n.name===t?n.type:null}(e,i))})),i){(0,d.h)(o);const e="".concat(_).concat(i),t={"vs:#decl":"uniform vec2 ".concat(e,";\n"),"vs:#main-start":" vec2 ".concat(w," = transform_getPos(").concat(e,");\n gl_Position = vec4(").concat(w,", 0, 1.);\n")};f=(0,A.Lm)([f,t])}u=t.join("\n")}return{vs:u,targetTextureType:l,inject:f,samplerTextureMap:c}}const E={10241:9728,10240:9728,10242:33071,10243:33071};class S{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.gl=e,this.id=this.currentIndex=0,this._swapTexture=null,this.targetTextureVarying=null,this.targetTextureType=null,this.samplerTextureMap=null,this.bindings=[],this.resources={},this._initialize(t),Object.seal(this)}updateModelProps(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=this._processVertexShader(e);return Object.assign({},e,t)}getDrawOptions(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{sourceBuffers:t,sourceTextures:n,framebuffer:r,targetTexture:i}=this.bindings[this.currentIndex],o=Object.assign({},t,e.attributes),a=Object.assign({},e.uniforms),s=Object.assign({},e.parameters);let l=e.discard;if(this.hasSourceTextures||this.hasTargetTexture){o.transform_elementID=this.elementIDBuffer;for(const t in this.samplerTextureMap){const e=this.samplerTextureMap[t];a[t]=n[e]}this._setSourceTextureParameters();const e=function(e){let{sourceTextureMap:t,targetTextureVarying:n,targetTexture:r}=e;const i={};let o,a;n&&(({width:o,height:a}=r),i["".concat(_).concat(n)]=[o,a]);for(const s in t)({width:o,height:a}=t[s]),i["".concat(_).concat(s)]=[o,a];return i}({sourceTextureMap:n,targetTextureVarying:this.targetTextureVarying,targetTexture:i});Object.assign(a,e)}return this.hasTargetTexture&&(l=!1,s.viewport=[0,0,r.width,r.height]),{attributes:o,framebuffer:r,uniforms:a,discard:l,parameters:s}}swap(){return!!this._swapTexture&&(this.currentIndex=this._getNextIndex(),!0)}update(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this._setupTextures(e)}getTargetTexture(){const{targetTexture:e}=this.bindings[this.currentIndex];return e}getData(){let{packed:e=!1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{framebuffer:t}=this.bindings[this.currentIndex],n=(0,h.z6)(t);if(!e)return n;const i=n.constructor,o=function(e){switch(e){case"float":return 1;case"vec2":return 2;case"vec3":return 3;case"vec4":return 4;default:return(0,r.Z)(!1),null}}(this.targetTextureType),a=new i(n.length*o/4);let s=0;for(let r=0;r0&&void 0!==arguments[0]?arguments[0]:{};const{_targetTextureVarying:t,_swapTexture:n}=e;this._swapTexture=n,this.targetTextureVarying=t,this.hasTargetTexture=t,this._setupTextures(e)}_createTargetTexture(e){const{sourceTextures:t,textureOrReference:n}=e;if(n instanceof p.Z)return n;const r=t[n];return r?(this._targetRefTexName=n,this._createNewTexture(r)):null}_setupTextures(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{sourceBuffers:t,_sourceTextures:n={},_targetTexture:r}=e,i=this._createTargetTexture({sourceTextures:n,textureOrReference:r});this.hasSourceTextures=this.hasSourceTextures||n&&Object.keys(n).length>0,this._updateBindings({sourceBuffers:t,sourceTextures:n,targetTexture:i}),"elementCount"in e&&this._updateElementIDBuffer(e.elementCount)}_updateElementIDBuffer(e){if("number"!==typeof e||this.elementCount>=e)return;const t=new Float32Array(e);t.forEach(((e,t,n)=>{n[t]=t})),this.elementIDBuffer?this.elementIDBuffer.setData({data:t}):this.elementIDBuffer=new c.Z(this.gl,{data:t,accessor:{size:1}}),this.elementCount=e}_updateBindings(e){if(this.bindings[this.currentIndex]=this._updateBinding(this.bindings[this.currentIndex],e),this._swapTexture){const{sourceTextures:e,targetTexture:t}=this._swapTextures(this.bindings[this.currentIndex]),n=this._getNextIndex();this.bindings[n]=this._updateBinding(this.bindings[n],{sourceTextures:e,targetTexture:t})}}_updateBinding(e,t){const{sourceBuffers:n,sourceTextures:r,targetTexture:i}=t;if(e||(e={sourceBuffers:{},sourceTextures:{},targetTexture:null}),Object.assign(e.sourceTextures,r),Object.assign(e.sourceBuffers,n),i){e.targetTexture=i;const{width:t,height:n}=i,{framebuffer:r}=e;r?(r.update({attachments:{36064:i},resizeAttachments:!1}),r.resize({width:t,height:n})):e.framebuffer=new g.Z(this.gl,{id:"transform-framebuffer",width:t,height:n,attachments:{36064:i}})}return e}_setSourceTextureParameters(){const e=this.currentIndex,{sourceTextures:t}=this.bindings[e];for(const n in t)t[n].setParameters(E)}_swapTextures(e){if(!this._swapTexture)return null;const t=Object.assign({},e.sourceTextures);t[this._swapTexture]=e.targetTexture;return{sourceTextures:t,targetTexture:e.sourceTextures[this._swapTexture]}}_createNewTexture(e){const t=(0,m.h)(e,{parameters:{10241:9728,10240:9728,10242:33071,10243:33071},pixelStore:{37440:!1}});return this.ownTexture&&this.ownTexture.delete(),this.ownTexture=t,t}_getNextIndex(){return(this.currentIndex+1)%2}_processVertexShader(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{sourceTextures:t,targetTexture:n}=this.bindings[this.currentIndex],{vs:r,uniforms:i,targetTextureType:o,inject:a,samplerTextureMap:l}=x({vs:e.vs,sourceTextureMap:t,targetTextureVarying:this.targetTextureVarying,targetTexture:n}),c=(0,A.Lm)([e.inject||{},a]);this.targetTextureType=o,this.samplerTextureMap=l;return{vs:r,fs:e._fs||s({version:v(r),input:this.targetTextureVarying,inputType:o,output:"transform_output"}),modules:this.hasSourceTextures||this.targetTextureVarying?[y].concat(e.modules||[]):e.modules,uniforms:i,inject:c}}}var C=n(39042),P=n(44548);class T{static isSupported(e){return(0,l.D0)(e)}constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.gl=e,this.model=null,this.elementCount=0,this.bufferTransform=null,this.textureTransform=null,this.elementIDBuffer=null,this._initialize(t),Object.seal(this)}delete(){const{model:e,bufferTransform:t,textureTransform:n}=this;e&&e.delete(),t&&t.delete(),n&&n.delete()}run(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{clearRenderTarget:t=!0}=e,n=this._updateDrawOptions(e);t&&n.framebuffer&&n.framebuffer.clear({color:!0}),this.model.transform(n)}swap(){let e=!1;const t=[this.bufferTransform,this.textureTransform].filter(Boolean);for(const n of t)e=e||n.swap();(0,d.h)(e,"Nothing to swap")}getBuffer(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return this.bufferTransform&&this.bufferTransform.getBuffer(e)}getData(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=[this.bufferTransform,this.textureTransform].filter(Boolean);for(const n of t){const t=n.getData(e);if(t)return t}return null}getFramebuffer(){return this.textureTransform&&this.textureTransform.getFramebuffer()}update(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};"elementCount"in e&&this.model.setVertexCount(e.elementCount);const t=[this.bufferTransform,this.textureTransform].filter(Boolean);for(const n of t)n.update(e)}_initialize(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{gl:t}=this;this._buildResourceTransforms(t,e),e=this._updateModelProps(e),this.model=new P.Z(t,Object.assign({},e,{fs:e.fs||s({version:v(e.vs)}),id:e.id||"transform-model",drawMode:e.drawMode||0,vertexCount:e.elementCount})),this.bufferTransform&&this.bufferTransform.setupResources({model:this.model})}_updateModelProps(e){let t=Object.assign({},e);const n=[this.bufferTransform,this.textureTransform].filter(Boolean);for(const r of n)t=r.updateModelProps(t);return t}_buildResourceTransforms(e,t){(function(e){if(!(0,C.nK)(e.feedbackBuffers)||!(0,C.nK)(e.feedbackMap)||e.varyings&&e.varyings.length>0)return!0;return!1})(t)&&(this.bufferTransform=new f(e,t)),function(e){if(!(0,C.nK)(e._sourceTextures)||e._targetTexture||e._targetTextureVarying)return!0;return!1}(t)&&(this.textureTransform=new S(e,t)),(0,d.h)(this.bufferTransform||this.textureTransform,"must provide source/feedback buffers or source/target textures")}_updateDrawOptions(e){let t=Object.assign({},e);const n=[this.bufferTransform,this.textureTransform].filter(Boolean);for(const r of n)t=Object.assign(t,r.getDrawOptions(t));return t}}},76195:(e,t,n)=>{"use strict";n.d(t,{KQ:()=>d,JD:()=>u,s9:()=>ee,JY:()=>q,w:()=>K,ZS:()=>V,vd:()=>c,yW:()=>te,UF:()=>s,D0:()=>l,cM:()=>r,kL:()=>W,aQ:()=>ne,dR:()=>H,s8:()=>G});const r=new(n(20251).Z)({id:"luma.gl"});function i(e,t){if(!e)throw new Error(t||"luma.gl: assertion failed.")}const o="Invalid WebGLRenderingContext",a="Requires WebGL2";function s(e){return"undefined"!==typeof WebGLRenderingContext&&e instanceof WebGLRenderingContext||("undefined"!==typeof WebGL2RenderingContext&&e instanceof WebGL2RenderingContext||Boolean(e&&Number.isFinite(e._version)))}function l(e){return"undefined"!==typeof WebGL2RenderingContext&&e instanceof WebGL2RenderingContext||Boolean(e&&2===e._version)}function c(e){return l(e)?e:null}function u(e){return i(s(e),o),e}function d(e){return i(l(e),a),e}const f={};function h(e,t){var n;f[e]=!0,void 0!==t&&(n=t,globalThis.console&&globalThis.console.error&&globalThis.console.error(n))}const p=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 r=0;r{var e;e="OESVertexArrayObject emulation library context restored",globalThis.console&&globalThis.console.log&&globalThis.console.log(e),t.reset_()}),!0),this.reset_()};g.prototype.VERTEX_ARRAY_BINDING_OES=34229,g.prototype.reset_=function(){if(void 0!==this.vertexArrayObjects)for(let t=0;tl(e)?void 0:0,b={3074:e=>l(e)?void 0:36064,35723:e=>l(e)?void 0:4352,35977:y,32937:y,36795:(e,t)=>{const n=l(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(A);return t(n&&n.UNMASKED_VENDOR_WEBGL||7936)},37446:(e,t)=>{const n=e.getExtension(A);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:y,35071:y,37447:y,36063:(e,t)=>{if(!l(e)){const n=e.getExtension(v);return n?t(n.MAX_COLOR_ATTACHMENTS_WEBGL):0}},35379:y,35374:y,35377:y,34852:e=>{if(!l(e)){const t=e.getExtension(v);return t?t.MAX_DRAW_BUFFERS_WEBGL:0}},36203:e=>e.getExtension(m)?2147483647:65535,33001:e=>e.getExtension(m)?16777216:65535,33e3:e=>16777216,37157:y,35373:y,35657:y,36183:y,37137:y,34045:y,35978:y,35979:y,35968:y,35376:y,35375:y,35659:y,37154:y,35371:y,35658:y,35076:y,35077:y,35380:y};const _="ANGLE_instanced_arrays";const w={OES_vertex_array_object:{meta:{suffix:"OES"},createVertexArray:()=>{i(!1,"VertexArray requires WebGL2 or OES_vertex_array_object extension")},deleteVertexArray:()=>{},bindVertexArray:()=>{},isVertexArray:()=>!1},[_]:{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:()=>{}}},x={readBuffer:(e,t,n)=>{l(e)&&t(n)},getVertexAttrib:(e,t,n,r)=>{const{webgl2:i,ext:o}=function(e,t){return{webgl2:l(e),ext:e.getExtension(t)}}(e,_);let a;switch(r){case 35069:a=!!i&&void 0;break;case 35070:a=i||o?void 0:0}return void 0!==a?a:t(n,r)},getProgramParameter:(e,t,n,r)=>{if(!l(e))switch(r){case 35967:return 35981;case 35971:case 35382:return 0}return t(n,r)},getInternalformatParameter:(e,t,n,r,i)=>l(e)||32937!==i?e.getInternalformatParameter(n,r,i):new Int32Array([0]),getTexParameter(e,t,n,r){if(34046===r){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=b[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 E(e,t){let{extension:n,target:r,target2:o}=t;const a=w[n];i(a);const{meta:s={}}=a,{suffix:l=""}=s,c=e.getExtension(n);for(const i of Object.keys(a)){const t="".concat(i).concat(l);let n=null;"meta"===i||"function"===typeof e[i]||(c&&"function"===typeof c[t]?n=function(){return c[t](...arguments)}:"function"===typeof a[i]&&(n=a[i].bind(r))),n&&(r[i]=n,o[i]=n)}}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){return n.call(this,t)||("OES_vertex_array_object"!==t?null:(e.__OESVertexArrayObject||(this.__OESVertexArrayObject=new g(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&&E(e,{extension:n,target:e.luma,target2:e})}(e,w),function(e,t){let{target:n,target2:r}=t;Object.keys(x).forEach((t=>{if("function"===typeof x[t]){const i=e[t]?e[t].bind(e):()=>{},o=x[t].bind(null,e,i);n[t]=o,r[t]=o}}))}(e,{target:t,target2:e}),t.polyfilled=!0),e};const S={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},C=(e,t,n)=>t?e.enable(n):e.disable(n),P=(e,t,n)=>e.hint(n,t),T=(e,t,n)=>e.pixelStorei(n,t);function k(e){return Array.isArray(e)||ArrayBuffer.isView(e)}const M={3042:C,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:C,2885:(e,t)=>e.cullFace(t),2929:C,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:C,35723:P,36006:(e,t)=>{const n=l(e)?36009:36160;return e.bindFramebuffer(n,t)},2886:(e,t)=>e.frontFace(t),33170:P,2849:(e,t)=>e.lineWidth(t),32823:C,32824:"polygonOffset",10752:"polygonOffset",35977:C,32938:"sampleCoverage",32939:"sampleCoverage",3089:C,3088:(e,t)=>e.scissor(...t),2960:C,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:T,3317:T,37440:T,37441:T,37443:T,3330:T,3332:T,3331:T,36010:(e,t)=>e.bindFramebuffer(36008,t),3314:T,32878:T,3316:T,3315:T,32877:T,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=k(t)?t:[t,t],e.blendEquationSeparate(...t)},blendFunc:(e,t)=>{t=k(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=k(t)?t:[t,t];const[n,r]=t;e.stencilMaskSeparate(1028,n),e.stencilMaskSeparate(1029,r)},stencilFunc:(e,t)=>{t=k(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=k(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 O(e,t,n){return void 0!==t[e]?t[e]:n[e]}const R={blendEquation:(e,t,n)=>e.blendEquationSeparate(O(32777,t,n),O(34877,t,n)),blendFunc:(e,t,n)=>e.blendFuncSeparate(O(32969,t,n),O(32968,t,n),O(32971,t,n),O(32970,t,n)),polygonOffset:(e,t,n)=>e.polygonOffset(O(32824,t,n),O(10752,t,n)),sampleCoverage:(e,t,n)=>e.sampleCoverage(O(32938,t,n),O(32939,t,n)),stencilFuncFront:(e,t,n)=>e.stencilFuncSeparate(1028,O(2962,t,n),O(2967,t,n),O(2963,t,n)),stencilFuncBack:(e,t,n)=>e.stencilFuncSeparate(1029,O(34816,t,n),O(36003,t,n),O(36004,t,n)),stencilOpFront:(e,t,n)=>e.stencilOpSeparate(1028,O(2964,t,n),O(2965,t,n),O(2966,t,n)),stencilOpBack:(e,t,n)=>e.stencilOpSeparate(1029,O(34817,t,n),O(34818,t,n),O(34819,t,n))},I={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]})},L=(e,t)=>e.isEnabled(t),N={3042:L,2884:L,2929:L,3024:L,32823:L,32926:L,32928:L,3089:L,2960:L,35977:L};function D(e){for(const t in e)return!1;return!0}function F(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?V(e):Object.assign({},S),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];H(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];F(a,s)||(n=!0,t=s,r&&!(o in r)&&(r[o]=s),this.cache[o]=a)}return{valueChanged:n,oldValue:t}}}function z(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 Z(e,{copyState:r}),function(e){const t=e.useProgram.bind(e);e.useProgram=function(n){e.state.program!==n&&(t(n),e.state.program=n)}}(e);for(const n in I){B(e,n,I[n])}j(e,"getParameter"),j(e,"isEnabled")}return e.state.enable=n,e}function U(e){i(e.state),e.state.pop()}function H(e,t){if(i(s(e),"setParameters requires a WebGL context"),D(t))return;const n={};for(const i in t){const r=Number(i),o=M[i];o&&("string"===typeof o?n[o]=!0:o(e,t[i],r))}const r=e.state&&e.state.cache;if(r)for(const i in n){(0,R[i])(e,t,r)}}function V(e,t){if("number"===typeof(t=t||S)){const n=t,r=N[n];return r?r(e,n):e.getParameter(n)}const n=Array.isArray(t)?t:Object.keys(t),r={};for(const i of n){const t=N[i];r[i]=t?t(e,Number(i)):e.getParameter(Number(i))}return r}function W(e){H(e,S)}function G(e,t,n){if(D(t))return n(e);const{nocatch:r=!0}=t;let i;if(function(e){e.state||z(e,{copyState:!1}),e.state.push()}(e),H(e,t),r)i=n(e),U(e);else try{i=n(e)}finally{U(e)}return i}function K(e){const{luma:t}=e;if(e.canvas&&t){const{clientWidth:n}=t.canvasSizeInfo;return n?e.drawingBufferWidth/n:1}return 1}function q(e,t){let n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return function(e,t,n,r,i){const o=Y(e[0],t,n);let a=X(e[1],t,r,i),s=Y(e[0]+1,t,n);const l=s===n-1?s:s-1;let c;s=X(e[1]+1,t,r,i),i?(s=0===s?s:s+1,c=a,a=s):c=s===r-1?s:s-1;return{x:o,y:a,width:Math.max(l-o+1,1),height:Math.max(c-a+1,1)}}(t,K(e),e.drawingBufferWidth,e.drawingBufferHeight,n)}function Y(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 $=(0,n(89258).Z)(),Q=$&&"undefined"!==typeof document,J={webgl2:!0,webgl1:!0,throwOnError:!0,manageState:!0,canvas:null,debug:!1,width:800,height:600};function ee(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};i($,"createGLContext only available in the browser.\nCreate your own headless context or use 'createHeadlessContext' from @luma.gl/test-utils"),e=Object.assign({},J,e);const{width:t,height:n}=e;function o(t){if(e.throwOnError)throw new Error(t);return console.error(t),null}let a;e.onError=o;const{canvas:s}=e,c=function(e){let t,{canvas:n,width:r=800,height:i=600,onError:o}=e;if("string"===typeof n){Q&&"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}({canvas:s,width:t,height:n,onError:o});return a=function(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;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));if(e.removeEventListener("webglcontextcreationerror",i,!1),!s)return n("Failed to create ".concat(a&&!o?"WebGL2":"WebGL"," context: ").concat(r||"Unknown error"));t.onContextLost&&e.addEventListener("webglcontextlost",t.onContextLost,!1);t.onContextRestored&&e.addEventListener("webglcontextrestored",t.onContextRestored,!1);return s}(c,e),a?(a=te(a,e),function(e){const t=l(e)?"WebGL2":"WebGL1",n=function(e){const t=e.getParameter(7936),n=e.getParameter(7937),r=e.getExtension("WEBGL_debug_renderer_info"),i=r&&e.getParameter(r.UNMASKED_VENDOR_WEBGL||7936),o=r&&e.getParameter(r.UNMASKED_RENDERER_WEBGL||7937);return{vendor:i||t,renderer:o||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))()}(a),a):null}function te(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!e||e._instrumented)return e;e._version=e._version||function(e){if("undefined"!==typeof WebGL2RenderingContext&&e instanceof WebGL2RenderingContext)return 2;return 1}(e),e.luma=e.luma||{},e.luma.canvasSizeInfo=e.luma.canvasSizeInfo||{},t=Object.assign({},J,t);const{manageState:n,debug:i}=t;return n&&z(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 function(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})}}(e,function(e){const t="undefined"===typeof window?1:window.devicePixelRatio||1;return Number.isFinite(e)?e<=0?1:e:e?t:1}(t.useDevicePixels),t)}const n=e.getExtension("STACKGL_resize_drawingbuffer");n&&"width"in t&&"height"in t&&n.resize(t.width,t.height)}},91203:(e,t,n)=>{"use strict";n.d(t,{H:()=>r,Y:()=>i});const r="vs",i="fs"},11558:(e,t,n)=>{"use strict";n.d(t,{O_:()=>a,Lm:()=>d,ZP:()=>u});var r=n(91203),i=n(7064);const o={[r.H]:"#ifdef MODULE_LOGDEPTH\n logdepth_adjustPosition(gl_Position);\n#endif\n",[r.Y]:"#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?[^{}]*$/,c=[];function u(e,t,n){let i=arguments.length>3&&void 0!==arguments[3]&&arguments[3];const u=t===r.H;for(const r in n){const t=n[r];t.sort(((e,t)=>e.order-t.order)),c.length=t.length;for(let e=0,n=t.length;ee+i)));break;case"vs:#main-end":u&&(e=e.replace(l,(e=>i+e)));break;case"fs:#decl":u||(e=e.replace(a,i));break;case"fs:#main-start":u||(e=e.replace(s,(e=>e+i)));break;case"fs:#main-end":u||(e=e.replace(l,(e=>i+e)));break;default:e=e.replace(r,(e=>e+i))}}return e=e.replace(a,""),i&&(e=e.replace(/\}\s*$/,(e=>e+o[t]))),e}function d(e){const t={};return(0,i.Z)(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}},48424:(e,t,n)=>{"use strict";n.d(t,{N:()=>u,s:()=>d});const 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",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))}const a={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({},function(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}({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}},s="\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",l={};function c(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:l;if(!("material"in e))return{};const{material:t}=e;return t?function(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))}}(t):{lighting_uEnabled:!1}}const u={name:"gouraud-lighting",dependencies:[a],vs:s,defines:{LIGHTING_VERTEX:1},getUniforms:c},d={name:"phong-lighting",dependencies:[a],fs:s,defines:{LIGHTING_FRAGMENT:1},getUniforms:c}},7064:(e,t,n)=>{"use strict";function r(e,t){if(!e)throw new Error(t||"shadertools: assertion failed.")}n.d(t,{Z:()=>r})},71254:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(78501),i=n(59661),o=n(13413);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(0,r.vN)(e.type||5126).BYTES_PER_ELEMENT}static getBytesPerVertex(e){(0,i.h)(e.size);return(0,r.vN)(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=(0,o.k)("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}}},64180:(e,t,n)=>{"use strict";n.d(t,{Z:()=>f});var r=n(1112),i=n(71254),o=n(78501),a=n(76195),s=n(59661),l=n(13413);const c={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"},u={removedProps:{},replacedProps:{bytes:"byteLength"},deprecatedProps:c},d={removedProps:c};class f extends r.Z{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.Z.getBytesPerElement(e))}getVertexCount(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.accessor;return Math.round(this.byteLength/i.Z.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=(0,l.k)("Buffer",e,u),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=(0,l.k)("Buffer",e,d))&&this.setAccessor(e.accessor),this}setAccessor(e){return delete(e=Object.assign({},e)).buffer,this.accessor=new i.Z(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;(0,s.h)(t);const o=this.gl.webgl2?36663:this.target;return this.gl.bindBuffer(o,this.handle),0!==r||void 0!==i?((0,a.KQ)(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(0,a.KQ)(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]:{};(0,a.KQ)(this.gl);const i=(0,o.vN)(this.accessor.type||5126,{clamped:!1}),l=this._getAvailableElementCount(t),c=n;let u,d;e?(d=e.length,u=d-c):(u=Math.min(l,r||l),d=c+u);const f=Math.min(l,u);return r=r||f,(0,s.h)(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):((0,s.h)(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;(0,s.h)(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=(0,o.O)(e);return(0,s.h)(a),this.setAccessor(new i.Z(this.accessor,{type:a})),this}_setByteLength(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.usage;(0,s.h)(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/(0,o.vN)(this.accessor.type||5126,{clamped:!1}).BYTES_PER_ELEMENT;return this.getElementCount()-t}_inferType(e){this.accessor.type||this.setAccessor(new i.Z(this.accessor,{type:(0,o.O)(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.cM.deprecated("Buffer.type","Buffer.accessor.type")(),this.accessor.type}get bytes(){return a.cM.deprecated("Buffer.bytes","Buffer.byteLength")(),this.byteLength}setByteLength(e){return a.cM.deprecated("setByteLength","reallocate")(),this.reallocate(e)}updateAccessor(e){return a.cM.deprecated("updateAccessor(...)","setAccessor(new Accessor(buffer.accessor, ...)")(),this.accessor=new i.Z(this.accessor,e),this}}},36708:(e,t,n)=>{"use strict";n.d(t,{$:()=>p,Z:()=>h});var r=n(76195),i=n(59661);const o=256,a=1024,s=16384,l=6144,c=6145,u=6146,d=34041,f="clear: bad arguments";function h(e){let{framebuffer:t=null,color:n=null,depth:l=null,stencil:c=null}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const u={};t&&(u.framebuffer=t);let d=0;n&&(d|=s,!0!==n&&(u.clearColor=n)),l&&(d|=o,!0!==l&&(u.clearDepth=l)),c&&(d|=a,!0!==l&&(u.clearStencil=l)),(0,i.h)(0!==d,f),(0,r.s8)(e,u,(()=>{e.clear(d)}))}function p(e){let{framebuffer:t=null,buffer:n=l,drawBuffer:o=0,value:a=[0,0,0,0]}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,r.KQ)(e),(0,r.s8)(e,{framebuffer:t},(()=>{switch(n){case l:switch(a.constructor){case Int32Array:e.clearBufferiv(n,o,a);break;case Uint32Array:e.clearBufferuiv(n,o,a);break;case Float32Array:default:e.clearBufferfv(n,o,a)}break;case c:e.clearBufferfv(c,0,[a]);break;case u:e.clearBufferiv(u,0,[a]);break;case d:const[t,r]=a;e.clearBufferfi(d,0,t,r);break;default:(0,i.h)(!1,f)}}))}},77378:(e,t,n)=>{"use strict";n.d(t,{Km:()=>u,Lv:()=>d,z6:()=>c});var r=n(64282),i=n(46773),o=n(76195),a=n(78501),s=n(59661);var l=n(15671);function c(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{sourceX:n=0,sourceY:r=0,sourceFormat:i=6408}=t;let{sourceAttachment:o=36064,target:l=null,sourceWidth:c,sourceHeight:u,sourceType:d}=t;const{framebuffer:h,deleteFramebuffer:p}=f(e);(0,s.h)(h);const{gl:g,handle:m,attachments:v}=h;c=c||h.width,u=u||h.height,36064===o&&null===m&&(o=1028),(0,s.h)(v[o]),d=d||v[o].type,l=function(e,t,n,r,i){if(e)return e;t=t||5121;const o=(0,a.vN)(t,{clamped:!1}),l=function(e){switch(e){case 6406:case 33326:case 6403:return 1;case 33328:case 33319:return 2;case 6407:case 34837:return 3;case 6408:case 34836:return 4;default:return(0,s.h)(!1),0}}(n);return new o(r*i*l)}(l,d,i,c,u),d=d||(0,a.O)(l);const A=g.bindFramebuffer(36160,m);return g.readPixels(n,r,c,u,i,d,l),g.bindFramebuffer(36160,A||null),p&&h.delete(),l}function u(e){let{sourceAttachment:t=36064,targetMaxHeight:n=Number.MAX_SAFE_INTEGER}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=c(e,{sourceAttachment:t}),{width:i,height:o}=e;for(;o>n;)({data:r,width:i,height:o}=(0,a.KS)({data:r,width:i,height:o}));(0,a.c$)({data:r,width:i,height:o});const s=document.createElement("canvas");s.width=i,s.height=o;const l=s.getContext("2d"),u=l.createImageData(i,o);return u.data.set(r),l.putImageData(u,0,0),s.toDataURL()}function d(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{sourceX:r=0,sourceY:a=0,targetMipmaplevel:l=0,targetInternalFormat:c=6408}=n;let{targetX:u,targetY:d,targetZ:h,width:p,height:g}=n;const{framebuffer:m,deleteFramebuffer:v}=f(e);(0,s.h)(m);const{gl:A,handle:y}=m,b="undefined"!==typeof u||"undefined"!==typeof d||"undefined"!==typeof h;u=u||0,d=d||0,h=h||0;const _=A.bindFramebuffer(36160,y);(0,s.h)(t);let w=null;if(t instanceof i.Z&&(w=t,p=Number.isFinite(p)?p:w.width,g=Number.isFinite(g)?g:w.height,w.bind(0),t=w.target),b)switch(t){case 3553:case 34067:A.copyTexSubImage2D(t,l,u,d,r,a,p,g);break;case 35866:case 32879:(0,o.KQ)(A).copyTexSubImage3D(t,l,u,d,h,r,a,p,g)}else A.copyTexImage2D(t,l,c,r,a,p,g,0);return w&&w.unbind(),A.bindFramebuffer(36160,_||null),v&&m.delete(),w}function f(e){return e instanceof r.Z?{framebuffer:e,deleteFramebuffer:!1}:{framebuffer:(0,l.Y)(e),deleteFramebuffer:!0}}},64282:(e,t,n)=>{"use strict";n.d(t,{Z:()=>h});var r=n(76195),i=n(1112),o=n(81786),a=n(26277),s=n(36708),l=n(77378),c=n(6509),u=n(55562),d=n(59661);const f="Multiple render targets not supported";class h extends i.Z{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 h(e,{id:"default-framebuffer",handle:null,attachments:{}}),e.luma.defaultFramebuffer}get MAX_COLOR_ATTACHMENTS(){const e=(0,r.KQ)(this.gl);return e.getParameter(e.MAX_COLOR_ATTACHMENTS)}get MAX_DRAW_BUFFERS(){const e=(0,r.KQ)(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:c}=e;if((0,d.h)(t>=0&&n>=0,"Width and height need to be integers"),this.width=t,this.height=n,r)for(const u in r){const e=r[u];(Array.isArray(e)?e[0]:e).resize({width:t,height:n})}else r=this._createDefaultAttachments(i,o,a,t,n);this.update({clearAttachments:!0,attachments:r,readBuffer:l,drawBuffers:c}),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(0,d.h)(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.cM.log(2,"Resizing framebuffer ".concat(this.id," to ").concat(t,"x").concat(n))();for(const r in this.attachments)this.attachments[r].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 o in r){(0,d.h)(void 0!==o,"Misspelled framebuffer binding point?");const e=Number(o),t=r[e];let i=t;if(i)if(i instanceof a.Z)this._attachRenderbuffer({attachment:e,renderbuffer:i});else if(Array.isArray(t)){const[n,r=0,o=0]=t;i=n,this._attachTexture({attachment:e,texture:n,layer:r,level:o})}else this._attachTexture({attachment:e,texture:i,layer:0,level:0});else this._unattach(e);n&&i&&i.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(h.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)&&(0,s.Z)(this.gl,{color:t,depth:n,stencil:r}),i.forEach(((e,t)=>{(0,s.$)(this.gl,{drawBuffer:t,value:e})})),this.gl.bindFramebuffer(36160,o||null),this}readPixels(){return r.cM.error("Framebuffer.readPixels() is no logner supported, use readPixelsToArray(framebuffer)")(),null}readPixelsToBuffer(){return r.cM.error("Framebuffer.readPixelsToBuffer()is no logner supported, use readPixelsToBuffer(framebuffer)")(),null}copyToDataUrl(){return r.cM.error("Framebuffer.copyToDataUrl() is no logner supported, use copyToDataUrl(framebuffer)")(),null}copyToImage(){return r.cM.error("Framebuffer.copyToImage() is no logner supported, use copyToImage(framebuffer)")(),null}copyToTexture(){return r.cM.error("Framebuffer.copyToTexture({...}) is no logner supported, use copyToTexture(source, target, opts})")(),null}blit(){return r.cM.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=(0,r.KQ)(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=(0,u.km)(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?(0,u.km)(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?(0,u.km)(this.gl,t):t]=this.getAttachmentParameters(t,e)}return n}show(){return"undefined"!==typeof window&&window.open((0,l.Km)(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.cM.level||"undefined"===typeof window)return this;t=t||"Framebuffer ".concat(this.id);const n=(0,l.Km)(this,{targetMaxHeight:100});return r.cM.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.Z(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.Z(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.Z(this.gl,{id:"".concat(this.id,"-depth"),format:33189,width:r,height:i}),this.ownResources.push(s[36096])):n&&(0,d.h)(!1),s}_unattach(e){const t=this.attachments[e];t&&(t instanceof a.Z?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:(0,r.KQ)(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:(0,d.h)(!1,"Illegal texture type")}a.bindTexture(n.target,null),this.attachments[t]=n}_setReadBuffer(e){const t=(0,r.vd)(this.gl);t?t.readBuffer(e):(0,d.h)(36064===e||1029===e,f),this.readBuffer=e}_setDrawBuffers(e){const{gl:t}=this,n=(0,r.KQ)(t);if(n)n.drawBuffers(e);else{const n=t.getExtension("WEBGL_draw_buffers");n?n.drawBuffersWEBGL(e):(0,d.h)(1===e.length&&(36064===e[0]||1029===e[0]),f)}this.drawBuffers=e}_getAttachmentParameterFallback(e){const t=(0,c.N$)(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)}}h.ATTACHMENT_PARAMETERS=[36049,36048,33296,33298,33299,33300,33301,33302,33303]},32073:(e,t,n)=>{"use strict";n.d(t,{Z:()=>U});var r=n(1112),i=n(46773),o=n(64282),a=n(76195),s=n(26277),l=n(59661);const c={5126:x.bind(null,"uniform1fv",g,1,E),35664:x.bind(null,"uniform2fv",g,2,E),35665:x.bind(null,"uniform3fv",g,3,E),35666:x.bind(null,"uniform4fv",g,4,E),5124:x.bind(null,"uniform1iv",m,1,E),35667:x.bind(null,"uniform2iv",m,2,E),35668:x.bind(null,"uniform3iv",m,3,E),35669:x.bind(null,"uniform4iv",m,4,E),35670:x.bind(null,"uniform1iv",m,1,E),35671:x.bind(null,"uniform2iv",m,2,E),35672:x.bind(null,"uniform3iv",m,3,E),35673:x.bind(null,"uniform4iv",m,4,E),35674:x.bind(null,"uniformMatrix2fv",g,4,S),35675:x.bind(null,"uniformMatrix3fv",g,9,S),35676:x.bind(null,"uniformMatrix4fv",g,16,S),35678:w,35680:w,5125:x.bind(null,"uniform1uiv",v,1,E),36294:x.bind(null,"uniform2uiv",v,2,E),36295:x.bind(null,"uniform3uiv",v,3,E),36296:x.bind(null,"uniform4uiv",v,4,E),35685:x.bind(null,"uniformMatrix2x3fv",g,6,S),35686:x.bind(null,"uniformMatrix2x4fv",g,8,S),35687:x.bind(null,"uniformMatrix3x2fv",g,6,S),35688:x.bind(null,"uniformMatrix3x4fv",g,12,S),35689:x.bind(null,"uniformMatrix4x2fv",g,8,S),35690:x.bind(null,"uniformMatrix4x3fv",g,12,S),35678:w,35680:w,35679:w,35682:w,36289:w,36292:w,36293:w,36298:w,36299:w,36300:w,36303:w,36306:w,36307:w,36308:w,36311:w},u={},d={},f={},h=[0];function p(e,t,n,r){1===t&&"boolean"===typeof e&&(e=e?1:0),Number.isFinite(e)&&(h[0]=e,e=h);const i=e.length;if(i%t&&a.cM.warn("Uniform size should be multiples of ".concat(t),e)(),e instanceof n)return e;let o=r[i];o||(o=new n(i),r[i]=o);for(let a=0;a{const i=e!==r;return i&&(t.uniform1i(n,r),e=r),i}}function x(e,t,n,r){let i=null,o=null;return(a,s,c)=>{const u=t(c,n),d=u.length;let f=!1;if(null===i)i=new Float32Array(d),o=d,f=!0;else{(0,l.h)(o===d,"Uniform length cannot change.");for(let e=0;e1&&void 0!==arguments[1]?arguments[1]:"unnamed";const n=e.match(/#define[\s*]SHADER_NAME[\s*]([A-Za-z0-9_-]+)[\s*]/);return n?n[1]:t}const P=35632,T=35633;function k(e,t,n,r){const i=e.split(/\r?\n/),o={},a={},s=r||C(t)||"(unnamed)",l="".concat(function(e){switch(e){case P:return"fragment";case T:return"vertex";default:return"unknown type"}}(n)," shader ").concat(s);for(let u=0;u1&&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 O(o,i-a)+n+e}))}(t);return{shaderName:l,errors:M(o,c),warnings:M(a,c)}}function M(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:r}=k(e,this.source,this.shaderType,this.id);throw a.cM.error("GLSL compilation errors in ".concat(t,"\n").concat(n))(),a.cM.warn("GLSL compilation warnings in ".concat(t,"\n").concat(r))(),new Error("GLSL compilation errors in ".concat(t))}}_deleteHandle(){this.gl.deleteShader(this.handle)}_getOptsFromHandle(){return{type:this.getParameter(35663),source:this.getSource()}}}class L extends I{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 N extends I{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)}}var D=n(71254),F=n(2187);class j{constructor(e){this.id=e.id,this.attributeInfos=[],this.attributeInfosByName={},this.attributeInfosByLocation=[],this.varyingInfos=[],this.varyingInfosByName={},Object.seal(this),this._readAttributesFromProgram(e),this._readVaryingsFromProgram(e)}getAttributeInfo(e){const t=Number(e);return Number.isFinite(t)?this.attributeInfosByLocation[t]:this.attributeInfosByName[e]||null}getAttributeLocation(e){const t=this.getAttributeInfo(e);return t?t.location:-1}getAttributeAccessor(e){const t=this.getAttributeInfo(e);return t?t.accessor:null}getVaryingInfo(e){const t=Number(e);return Number.isFinite(t)?this.varyingInfos[t]:this.varyingInfosByName[e]||null}getVaryingIndex(e){const t=this.getVaryingInfo();return t?t.location:-1}getVaryingAccessor(e){const t=this.getVaryingInfo();return t?t.accessor:null}_readAttributesFromProgram(e){const{gl:t}=e,n=t.getProgramParameter(e.handle,35721);for(let r=0;r=0&&this._addAttribute(a,n,i,o)}this.attributeInfos.sort(((e,t)=>e.location-t.location))}_readVaryingsFromProgram(e){const{gl:t}=e;if(!(0,a.D0)(t))return;const n=t.getProgramParameter(e.handle,35971);for(let r=0;re.location-t.location))}_addAttribute(e,t,n,r){const{type:i,components:o}=(0,F.hJ)(n),a={type:i,size:r*o};this._inferProperties(e,t,a);const s={location:e,name:t,accessor:new D.Z(a)};this.attributeInfos.push(s),this.attributeInfosByLocation[e]=s,this.attributeInfosByName[s.name]=s}_inferProperties(e,t,n){/instance/i.test(t)&&(n.divisor=1)}_addVarying(e,t,n,r){const{type:i,components:o}=(0,F.hJ)(n),a={location:e,name:t,accessor:new D.Z({type:i,size:r*o})};this.varyingInfos.push(a),this.varyingInfosByName[a.name]=a}}var B=n(55562);const Z=35981,z=["setVertexArray","setAttributes","setBuffers","unsetBuffers","use","getUniformCount","getUniformInfo","getUniformLocation","getUniformValue","getVarying","getFragDataLocation","getAttachedShaders","getAttributeCount","getAttributeLocation","getAttributeInfo"];class U extends r.Z{get[Symbol.toStringTag](){return"Program"}constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};super(e,t),this.stubRemovedMethods("Program","v6.0",z),this._isCached=!1,this.initialize(t),Object.seal(this),this._setId(t.id)}initialize(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{hash:t,vs:n,fs:r,varyings:i,bufferMode:o=Z}=e;return this.hash=t||"",this.vs="string"===typeof n?new L(this.gl,{id:"".concat(e.id,"-vs"),source:n}):n,this.fs="string"===typeof r?new N(this.gl,{id:"".concat(e.id,"-fs"),source:r}):r,(0,l.h)(this.vs instanceof L),(0,l.h)(this.fs instanceof N),this.uniforms={},this._textureUniforms={},i&&i.length>0&&((0,a.KQ)(this.gl),this.varyings=i,this.gl2.transformFeedbackVaryings(this.handle,i,o)),this._compileAndLink(),this._readUniformLocationsFromLinkedProgram(),this.configuration=new j(this),this.setProps(e)}delete(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this._isCached?this:super.delete(e)}setProps(e){return"uniforms"in e&&this.setUniforms(e.uniforms),this}draw(e){let{logPriority:t,drawMode:n=4,vertexCount:r,offset:i=0,start:o,end:s,isIndexed:c=!1,indexType:u=5123,instanceCount:d=0,isInstanced:f=d>0,vertexArray:h=null,transformFeedback:p,framebuffer:g,parameters:m={},uniforms:v,samplers:A}=e;if((v||A)&&(a.cM.deprecated("Program.draw({uniforms})","Program.setUniforms(uniforms)")(),this.setUniforms(v||{})),a.cM.priority>=t){const e=g?g.id:"default",i="mode=".concat((0,B.km)(this.gl,n)," verts=").concat(r," ")+"instances=".concat(d," indexType=").concat((0,B.km)(this.gl,u)," ")+"isInstanced=".concat(f," isIndexed=").concat(c," ")+"Framebuffer=".concat(e);a.cM.log(t,i)()}return(0,l.h)(h),this.gl.useProgram(this.handle),!(!this._areTexturesRenderable()||0===r||f&&0===d)&&(h.bindForDraw(r,d,(()=>{if(void 0!==g&&(m=Object.assign({},m,{framebuffer:g})),p){const e=(0,F.$Z)(n);p.begin(e)}this._bindTextures(),(0,a.s8)(this.gl,m,(()=>{c&&f?this.gl2.drawElementsInstanced(n,r,u,i,d):c&&(0,a.D0)(this.gl)&&!isNaN(o)&&!isNaN(s)?this.gl2.drawRangeElements(n,o,s,r,u,i):c?this.gl.drawElements(n,r,u,i):f?this.gl2.drawArraysInstanced(n,i,r,d):this.gl.drawArrays(n,i,r)})),p&&p.end()})),!0)}setUniforms(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};a.cM.priority>=2&&function(e,t,n){for(const r in e){const i=e[r];if((!n||Boolean(n[r]))&&!b(i))throw t=t?"".concat(t," "):"",console.error("".concat(t," Bad uniform ").concat(r),i),new Error("".concat(t," Bad uniform ").concat(r))}}(e,this.id,this._uniformSetters),this.gl.useProgram(this.handle);for(const t in e){const n=e[t],r=this._uniformSetters[t];if(r){let e=n,a=!1;if(e instanceof o.Z&&(e=e.texture),e instanceof i.Z)if(a=this.uniforms[t]!==n,a){void 0===r.textureIndex&&(r.textureIndex=this._textureIndexCounter++);const n=e,{textureIndex:i}=r;n.bind(i),e=i,this._textureUniforms[t]=n}else e=r.textureIndex;else this._textureUniforms[t]&&delete this._textureUniforms[t];(r(e)||a)&&_(this.uniforms,t,n)}}return this}_areTexturesRenderable(){let e=!0;for(const t in this._textureUniforms){const n=this._textureUniforms[t];n.update(),e=e&&n.loaded}return e}_bindTextures(){for(const e in this._textureUniforms){const t=this._uniformSetters[e].textureIndex;this._textureUniforms[e].bind(t)}}_createHandle(){return this.gl.createProgram()}_deleteHandle(){this.gl.deleteProgram(this.handle)}_getOptionsFromHandle(e){const t=this.gl.getAttachedShaders(e),n={};for(const r of t){switch(this.gl.getShaderParameter(this.handle,35663)){case 35633:n.vs=new L({handle:r});break;case 35632:n.fs=new N({handle:r})}}return n}_getParameter(e){return this.gl.getProgramParameter(this.handle,e)}_setId(e){if(!e){const e=this._getName();this.id=(0,R.hQ)(e)}}_getName(){let e=this.vs.getName()||this.fs.getName();return e=e.replace(/shader/i,""),e=e?"".concat(e,"-program"):"program",e}_compileAndLink(){const{gl:e}=this;if(e.attachShader(this.handle,this.vs.handle),e.attachShader(this.handle,this.fs.handle),a.cM.time(4,"linkProgram for ".concat(this._getName()))(),e.linkProgram(this.handle),a.cM.timeEnd(4,"linkProgram for ".concat(this._getName()))(),e.debug||a.cM.level>0){if(!e.getProgramParameter(this.handle,35714))throw new Error("Error linking: ".concat(e.getProgramInfoLog(this.handle)));e.validateProgram(this.handle);if(!e.getProgramParameter(this.handle,35715))throw new Error("Error validating: ".concat(e.getProgramInfoLog(this.handle)))}}_readUniformLocationsFromLinkedProgram(){const{gl:e}=this;this._uniformSetters={},this._uniformCount=this._getParameter(35718);for(let t=0;t1)for(let t=0;t{"use strict";n.d(t,{Z:()=>l});var r=n(1112);const i="EXT_color_buffer_float",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}};var a=n(76195),s=n(59661);class l extends r.Z{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=(0,a.D0)(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(0,s.h)(t,"Needs format"),this._trackDeallocatedMemory(),this.gl.bindRenderbuffer(36161,this.handle),0!==i&&(0,a.D0)(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)}}},1112:(e,t,n)=>{"use strict";n.d(t,{Z:()=>u});var r=n(76195),i=n(53886),o=n(55562),a=n(59661),s=n(39042),l=n(43331);const c="Resource subclass must define virtual methods";class u{get[Symbol.toStringTag](){return"Resource"}constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,r.JD)(e);const{id:n,userData:i={}}=t;this.gl=e,this.gl2=e,this.id=n||(0,s.hQ)(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=(0,o.sF)(this.gl,e),(0,a.h)(e);const n=(this.constructor.PARAMETERS||{})[e];if(n){const e=(0,r.D0)(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=(0,r.D0)(this.gl),s={},l=t||Object.keys(i);for(const r of l){const t=i[r];if(t&&(!("webgl2"in t)||a)&&(!("extension"in t)||this.gl.getExtension(t.extension))){const i=n?(0,o.km)(this.gl,r):r;s[i]=this.getParameter(r,e),n&&"GLenum"===t.type&&(s[i]=(0,o.km)(this.gl,s[i]))}}return s}setParameter(e,t){e=(0,o.sF)(this.gl,e),(0,a.h)(e);const n=(this.constructor.PARAMETERS||{})[e];if(n){const e=(0,r.D0)(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=(0,o.sF)(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(0,l.F)(this,e,t,n)}initialize(e){}_createHandle(){throw new Error(c)}_deleteHandle(){throw new Error(c)}_bindHandle(e){throw new Error(c)}_getOptsFromHandle(){throw new Error(c)}_getParameter(e,t){throw new Error(c)}_setParameter(e,t){throw new Error(c)}_context(){return this.gl.luma=this.gl.luma||{},this.gl.luma}_addStats(){const e=this[Symbol.toStringTag],t=i.lR.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.lR.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.lR.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.lR.get("Memory Usage".concat(t));n.get("GPU Memory").subtractCount(this.byteLength),n.get("".concat(e," Memory")).subtractCount(this.byteLength)}}},81786:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var r=n(76195),i=n(46773),o=n(59661);let a="";class s extends i.Z{get[Symbol.toStringTag](){return"Texture2D"}static isSupported(e,t){return i.Z.isSupported(e,t)}constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};var n,i;(0,r.JD)(e),(t instanceof Promise||"string"===typeof t)&&(t={data:t}),"string"===typeof t.data&&(t=Object.assign({},t,{data:(n=t.data,(0,o.h)("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(r){t(r)}})))})),super(e,Object.assign({},t,{target:3553})),this.initialize(t),Object.seal(this)}}},50844:(e,t,n)=>{"use strict";n.d(t,{C:()=>o,KR:()=>l,ae:()=>i,br:()=>s,pH:()=>a});var r=n(76195);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=(0,r.D0)(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}}},46773:(e,t,n)=>{"use strict";n.d(t,{Z:()=>d});var r=n(76195),i=n(1112),o=n(64180),a=n(50844),s=n(59661),l=n(39042);const c=[9729,9728],u=globalThis.WebGLBuffer||function(){};class d extends i.Z{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&&(0,a.br)(e,n),i=i&&(!r||(0,a.KR)(e,n))),i}constructor(e,t){const{id:n=(0,l.hQ)("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:c={},textureUnit:u}=e;t||(t=i);let{width:d,height:f,dataFormat:h,type:p,compressed:g=!1,mipmaps:m=!0}=e;const{depth:v=0}=e;return({width:d,height:f,compressed:g,dataFormat:h,type:p}=this._deduceParameters({format:o,type:p,dataFormat:h,compressed:g,data:t,width:d,height:f})),this.width=d,this.height=f,this.depth=v,this.format=o,this.type=p,this.dataFormat=h,this.border=a,this.textureUnit=u,Number.isFinite(this.textureUnit)&&(this.gl.activeTexture(33984+this.textureUnit),this.gl.bindTexture(this.target,this.handle)),m&&this._isNPOT()&&(r.cM.warn("texture: ".concat(this," is Non-Power-Of-Two, disabling mipmaping"))(),m=!1,this._updateForNPOT(l)),this.mipmaps=m,this.setImageData({data:t,width:d,height:f,depth:v,format:o,type:p,dataFormat:h,border:a,mipmaps:m,parameters:c,compressed:g}),m&&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.cM.warn("texture: ".concat(this," is Non-Power-Of-Two, disabling mipmaping"))(),this):(this.mipmaps=!0,this.gl.bindTexture(this.target,this.handle),(0,r.s8)(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:c=0,parameters:u={}}=e;let{data:d=null,type:f=this.type,width:h=this.width,height:p=this.height,dataFormat:g=this.dataFormat,compressed:m=!1}=e;d||(d=n),({type:f,dataFormat:g,compressed:m,width:h,height:p}=this._deduceParameters({format:o,type:f,dataFormat:g,compressed:m,data:d,width:h,height:p}));const{gl:v}=this;v.bindTexture(this.target,this.handle);let A,y=null;({data:d,dataType:y}=this._getDataType({data:d,compressed:m}));let b=0;if((0,r.s8)(this.gl,u,(()=>{switch(y){case"null":v.texImage2D(t,i,o,h,p,l,g,f,d);break;case"typed-array":v.texImage2D(t,i,o,h,p,l,g,f,d,c);break;case"buffer":A=(0,r.KQ)(v),A.bindBuffer(35052,d.handle||d),A.texImage2D(t,i,o,h,p,l,g,f,c),A.bindBuffer(35052,null);break;case"browser-object":(0,r.D0)(v)?v.texImage2D(t,i,o,h,p,l,g,f,d):v.texImage2D(t,i,o,g,f,d);break;case"compressed":for(const[e,n]of d.entries())v.compressedTexImage2D(t,e,n.format,n.width,n.height,l,n.data),b+=n.levelSize;break;default:(0,s.h)(!1,"Unknown image data type")}})),"compressed"===y)this._trackAllocatedMemory(b,"Texture");else if(d&&d.byteLength)this._trackAllocatedMemory(d.byteLength,"Texture");else{const e=a.C[this.dataFormat]||4,t=a.pH[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:c=this.width,height:d=this.height,level:f=0,format:h=this.format,type:p=this.type,dataFormat:g=this.dataFormat,compressed:m=!1,offset:v=0,border:A=this.border,parameters:y={}}=e;if(({type:p,dataFormat:g,compressed:m,width:c,height:d}=this._deduceParameters({format:h,type:p,dataFormat:g,compressed:m,data:i,width:c,height:d})),(0,s.h)(0===this.depth,"texSubImage not supported for 3D textures"),i||(i=n),i&&i.data){const e=i;i=e.data,c=e.shape[0],d=e.shape[1]}i instanceof o.Z&&(i=i.handle),this.gl.bindTexture(this.target,this.handle),(0,r.s8)(this.gl,y,(()=>{if(m)this.gl.compressedTexSubImage2D(t,f,a,l,c,d,h,i);else if(null===i)this.gl.texSubImage2D(t,f,a,l,c,d,g,p,null);else if(ArrayBuffer.isView(i))this.gl.texSubImage2D(t,f,a,l,c,d,g,p,i,v);else if(i instanceof u){const e=(0,r.KQ)(this.gl);e.bindBuffer(35052,i),e.texSubImage2D(t,f,a,l,c,d,g,p,v),e.bindBuffer(35052,null)}else if((0,r.D0)(this.gl)){(0,r.KQ)(this.gl).texSubImage2D(t,f,a,l,c,d,g,p,i)}else this.gl.texSubImage2D(t,f,a,l,g,p,i)})),this.gl.bindTexture(this.target,null)}copyFramebuffer(){return r.cM.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.Z?{data:t.handle,dataType:"buffer"}:t instanceof u?{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 c=a.ae[t];return o=o||c&&c.dataFormat,s=s||c&&c.types[0],l=l||c&&c.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},(0,s.h)(r,"Could not deduced texture size"),(0,s.h)(void 0===t||r.width===t,"Deduced texture width does not match supplied width"),(0,s.h)(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:(0,s.h)(!1);break;default:this.gl.texParameteri(this.target,e,t)}return this.gl.bindTexture(this.target,null),this}_isNPOT(){return!(0,r.D0)(this.gl)&&(!(!this.width||!this.height)&&(!(0,l.wt)(this.width)||!(0,l.wt)(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===c.indexOf(t)&&(t=9729);break;case 10242:case 10243:33071!==t&&(t=33071)}return t}}},73011:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var r=n(76195),i=n(1112),o=n(64180),a=n(39042);class s extends i.Z{get[Symbol.toStringTag](){return"TransformFeedback"}static isSupported(e){return(0,r.D0)(e)}constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,r.KQ)(e),super(e,t),this.initialize(t),this.stubRemovedMethods("TransformFeedback","v6.0",["pause","resume"]),Object.seal(this)}initialize(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.buffers={},this.unused={},this.configuration=null,this.bindOnUse=!0,(0,a.nK)(this.buffers)||this.bind((()=>this._unbindBuffers())),this.setProps(e),this}setProps(e){"program"in e&&(this.configuration=e.program&&e.program.configuration),"configuration"in e&&(this.configuration=e.configuration),"bindOnUse"in e&&(e=e.bindOnUse),"buffers"in e&&this.setBuffers(e.buffers)}setBuffers(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.bind((()=>{for(const t in e)this.setBuffer(t,e[t])})),this}setBuffer(e,t){const n=this._getVaryingIndex(e),{buffer:i,byteSize:o,byteOffset:a}=this._getBufferParams(t);return n<0?(this.unused[e]=i,r.cM.warn("".concat(this.id," unused varying buffer ").concat(e))(),this):(this.buffers[n]=t,this.bindOnUse||this._bindBuffer(n,i,a,o),this)}begin(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return this.gl.bindTransformFeedback(36386,this.handle),this._bindBuffers(),this.gl.beginTransformFeedback(e),this}end(){return this.gl.endTransformFeedback(),this._unbindBuffers(),this.gl.bindTransformFeedback(36386,null),this}_getBufferParams(e){let t,n,r;return e instanceof o.Z===!1?(r=e.buffer,n=e.byteSize,t=e.byteOffset):r=e,void 0===t&&void 0===n||(t=t||0,n=n||r.byteLength-t),{buffer:r,byteOffset:t,byteSize:n}}_getVaryingInfo(e){return this.configuration&&this.configuration.getVaryingInfo(e)}_getVaryingIndex(e){if(this.configuration)return this.configuration.getVaryingInfo(e).location;const t=Number(e);return Number.isFinite(t)?t:-1}_bindBuffers(){if(this.bindOnUse)for(const e in this.buffers){const{buffer:t,byteSize:n,byteOffset:r}=this._getBufferParams(this.buffers[e]);this._bindBuffer(e,t,r,n)}}_unbindBuffers(){if(this.bindOnUse)for(const e in this.buffers)this._bindBuffer(e,null)}_bindBuffer(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3?arguments[3]:void 0;const i=t&&t.handle;return i&&void 0!==r?this.gl.bindBufferRange(35982,e,i,n,r):this.gl.bindBufferBase(35982,e,i),this}_createHandle(){return this.gl.createTransformFeedback()}_deleteHandle(){this.gl.deleteTransformFeedback(this.handle)}_bindHandle(e){this.gl.bindTransformFeedback(36386,this.handle)}}},6509:(e,t,n)=>{"use strict";n.d(t,{N$:()=>c,U6:()=>s,ag:()=>l});var r=n(87966),i=n(76195),o=n(59661);const a=2;function s(e,t){return l(e,t)}function l(e,t){return(t=Array.isArray(t)?t:[t]).every((t=>u(e,t)))}function c(e){e.luma=e.luma||{},e.luma.caps=e.luma.caps||{};for(const t in r.Z)void 0===e.luma.caps[t]&&(e.luma.caps[t]=u(e,t));return e.luma.caps}function u(e,t){return e.luma=e.luma||{},e.luma.caps=e.luma.caps||{},void 0===e.luma.caps[t]&&(e.luma.caps[t]=function(e,t){const n=r.Z[t];let a;(0,o.h)(n,t);const s=(0,i.D0)(e)&&n[1]||n[0];if("function"===typeof s)a=s(e);else if(Array.isArray(s)){a=!0;for(const t of s)a=a&&Boolean(e.getExtension(t))}else"string"===typeof s?a=Boolean(e.getExtension(s)):"boolean"===typeof s?a=s:(0,o.h)(!1);return a}(e,t)),e.luma.caps[t]||i.cM.log(a,"Feature: ".concat(t," not supported"))(),e.luma.caps[t]}},87966:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a,h:()=>o});var r=n(64282),i=n(81786);const o={WEBGL2:"WEBGL2",VERTEX_ARRAY_OBJECT:"VERTEX_ARRAY_OBJECT",TIMER_QUERY:"TIMER_QUERY",INSTANCED_RENDERING:"INSTANCED_RENDERING",MULTIPLE_RENDER_TARGETS:"MULTIPLE_RENDER_TARGETS",ELEMENT_INDEX_UINT32:"ELEMENT_INDEX_UINT32",BLEND_EQUATION_MINMAX:"BLEND_EQUATION_MINMAX",FLOAT_BLEND:"FLOAT_BLEND",COLOR_ENCODING_SRGB:"COLOR_ENCODING_SRGB",TEXTURE_DEPTH:"TEXTURE_DEPTH",TEXTURE_FLOAT:"TEXTURE_FLOAT",TEXTURE_HALF_FLOAT:"TEXTURE_HALF_FLOAT",TEXTURE_FILTER_LINEAR_FLOAT:"TEXTURE_FILTER_LINEAR_FLOAT",TEXTURE_FILTER_LINEAR_HALF_FLOAT:"TEXTURE_FILTER_LINEAR_HALF_FLOAT",TEXTURE_FILTER_ANISOTROPIC:"TEXTURE_FILTER_ANISOTROPIC",COLOR_ATTACHMENT_RGBA32F:"COLOR_ATTACHMENT_RGBA32F",COLOR_ATTACHMENT_FLOAT:"COLOR_ATTACHMENT_FLOAT",COLOR_ATTACHMENT_HALF_FLOAT:"COLOR_ATTACHMENT_HALF_FLOAT",GLSL_FRAG_DATA:"GLSL_FRAG_DATA",GLSL_FRAG_DEPTH:"GLSL_FRAG_DEPTH",GLSL_DERIVATIVES:"GLSL_DERIVATIVES",GLSL_TEXTURE_LOD:"GLSL_TEXTURE_LOD"};const a={[o.WEBGL2]:[!1,!0],[o.VERTEX_ARRAY_OBJECT]:["OES_vertex_array_object",!0],[o.TIMER_QUERY]:["EXT_disjoint_timer_query","EXT_disjoint_timer_query_webgl2"],[o.INSTANCED_RENDERING]:["ANGLE_instanced_arrays",!0],[o.MULTIPLE_RENDER_TARGETS]:["WEBGL_draw_buffers",!0],[o.ELEMENT_INDEX_UINT32]:["OES_element_index_uint",!0],[o.BLEND_EQUATION_MINMAX]:["EXT_blend_minmax",!0],[o.FLOAT_BLEND]:["EXT_float_blend"],[o.COLOR_ENCODING_SRGB]:["EXT_sRGB",!0],[o.TEXTURE_DEPTH]:["WEBGL_depth_texture",!0],[o.TEXTURE_FLOAT]:["OES_texture_float",!0],[o.TEXTURE_HALF_FLOAT]:["OES_texture_half_float",!0],[o.TEXTURE_FILTER_LINEAR_FLOAT]:["OES_texture_float_linear"],[o.TEXTURE_FILTER_LINEAR_HALF_FLOAT]:["OES_texture_half_float_linear"],[o.TEXTURE_FILTER_ANISOTROPIC]:["EXT_texture_filter_anisotropic"],[o.COLOR_ATTACHMENT_RGBA32F]:[function(e){const t=new i.Z(e,{format:6408,type:5126,dataFormat:6408}),n=new r.Z(e,{id:"test-framebuffer",check:!1,attachments:{36064:t}}),o=n.getStatus();return t.delete(),n.delete(),36053===o},"EXT_color_buffer_float"],[o.COLOR_ATTACHMENT_FLOAT]:[!1,"EXT_color_buffer_float"],[o.COLOR_ATTACHMENT_HALF_FLOAT]:["EXT_color_buffer_half_float"],[o.GLSL_FRAG_DATA]:["WEBGL_draw_buffers",!0],[o.GLSL_FRAG_DEPTH]:["EXT_frag_depth",!0],[o.GLSL_DERIVATIVES]:["OES_standard_derivatives",!0],[o.GLSL_TEXTURE_LOD]:["EXT_shader_texture_lod",!0]}},53886:(e,t,n)=>{"use strict";n.d(t,{lR:()=>s});var r=n(76195),i=n(89069),o=n(89258);const a="8.5.19";const s=new class{constructor(){this.stats=new Map}get(e){return this.stats.has(e)||this.stats.set(e,new i.Z({id:e})),this.stats.get(e)}};if(globalThis.luma&&globalThis.luma.VERSION!==a)throw new Error("luma.gl - multiple VERSIONs detected: ".concat(globalThis.luma.VERSION," vs ").concat(a));globalThis.luma||((0,o.Z)()&&r.cM.log(1,"luma.gl ".concat(a," - ").concat("set luma.log.level=1 (or higher) to trace rendering"))(),globalThis.luma=globalThis.luma||{VERSION:a,version:a,log:r.cM,stats:s,globals:{modules:{},nodeIO:{}}});globalThis.luma},59661:(e,t,n)=>{"use strict";function r(e,t){if(!e)throw new Error(t||"luma.gl: assertion failed.")}n.d(t,{h:()=>r})},13413:(e,t,n)=>{"use strict";n.d(t,{k:()=>i});var r=n(76195);function i(e,t,n){const{removedProps:i={},deprecatedProps:o={},replacedProps:a={}}=n;for(const l in i)if(l in t){const t=i[l]?"".concat(e,".").concat(i[l]):"N/A";r.cM.removed("".concat(e,".").concat(l),t)()}for(const l in o)if(l in t){const t=o[l];r.cM.deprecated("".concat(e,".").concat(l),"".concat(e,".").concat(t))()}let s=null;for(const l in a)if(l in t){const n=a[l];r.cM.deprecated("".concat(e,".").concat(l),"".concat(e,".").concat(n))(),s=s||Object.assign({},t),s[n]=t[l],delete s[l]}return s||t}},43331:(e,t,n)=>{"use strict";n.d(t,{F:()=>i});var r=n(76195);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.cM.removed("Calling removed method ".concat(t,".").concat(e,": "),o)(),new Error(e)})}))}},39042:(e,t,n)=>{"use strict";n.d(t,{hQ:()=>o,nK:()=>s,wt:()=>a});var r=n(59661);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(0,r.h)("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}},2187:(e,t,n)=>{"use strict";n.d(t,{$Z:()=>y,hJ:()=>b,jG:()=>_});var r=n(59661);const i=5120,o=5121,a=5122,s=5123,l=0,c=1,u=2,d=3,f=4,h=5,p=6,g=5126,m=5124,v=5125,A={[g]:[g,1,"float"],35664:[g,2,"vec2"],35665:[g,3,"vec3"],35666:[g,4,"vec4"],[m]:[m,1,"int"],35667:[m,2,"ivec2"],35668:[m,3,"ivec3"],35669:[m,4,"ivec4"],[v]:[v,1,"uint"],36294:[v,2,"uvec2"],36295:[v,3,"uvec3"],36296:[v,4,"uvec4"],35670:[g,1,"bool"],35671:[g,2,"bvec2"],35672:[g,3,"bvec3"],35673:[g,4,"bvec4"],35674:[g,8,"mat2"],35685:[g,8,"mat2x3"],35686:[g,8,"mat2x4"],35675:[g,12,"mat3"],35687:[g,12,"mat3x2"],35688:[g,12,"mat3x4"],35676:[g,16,"mat4"],35689:[g,16,"mat4x2"],35690:[g,16,"mat4x3"]};function y(e){switch(e){case l:return l;case c:case d:case u:return c;case f:case h:case p:return f;default:return(0,r.h)(!1),0}}function b(e){const t=A[e];if(!t)return null;const[n,r]=t;return{type:n,components:r}}function _(e,t){switch(e){case i:case o:case a:case s:e=g}for(const n in A){const[r,i,o]=A[n];if(r===e&&i===t)return{glType:n,name:o}}return null}},55562:(e,t,n)=>{"use strict";n.d(t,{km:()=>o,sF:()=>i});var r=n(59661);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(0,r.h)(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)}},15671:(e,t,n)=>{"use strict";n.d(t,{h:()=>h,Y:()=>p});var r=n(81786),i=n(76195),o=n(46773);const a=[34069,34070,34071,34072,34073,34074];class s extends o.Z{get[Symbol.toStringTag](){return"TextureCube"}constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,i.JD)(e),super(e,Object.assign({},t,{target:34067})),this.initialize(t),Object.seal(this)}initialize(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{mipmaps:t=!0,parameters:n={}}=e;return this.opts=e,this.setCubeMapImageData(e).then((()=>{this.loaded=!0,t&&this.generateMipmap(e),this.setParameters(n)})),this}subImage(e){let{face:t,data:n,x:r=0,y:i=0,mipmapLevel:o=0}=e;return this._subImage({target:t,data:n,x:r,y:i,mipmapLevel:o})}async setCubeMapImageData(e){let{width:t,height:n,pixels:r,data:o,border:s=0,format:l=6408,type:c=5121}=e;const{gl:u}=this,d=r||o,f=await Promise.all(a.map((e=>{const t=d[e];return Promise.all(Array.isArray(t)?t:[t])})));this.bind(),a.forEach(((e,r)=>{f[r].length>1&&!1!==this.opts.mipmaps&&i.cM.warn("".concat(this.id," has mipmap and multiple LODs."))(),f[r].forEach(((r,i)=>{t&&n?u.texImage2D(e,i,l,t,n,s,l,c,r):u.texImage2D(e,i,l,l,c,r)}))})),this.unbind()}setImageDataForFace(e){const{face:t,width:n,height:r,pixels:i,data:o,border:a=0,format:s=6408,type:l=5121}=e,{gl:c}=this,u=i||o;return this.bind(),u instanceof Promise?u.then((n=>this.setImageDataForFace(Object.assign({},e,{face:t,data:n,pixels:n})))):this.width||this.height?c.texImage2D(t,0,s,n,r,a,s,l,u):c.texImage2D(t,0,s,s,l,u),this}}s.FACES=a;var l=n(50844),c=n(64180);class u extends o.Z{get[Symbol.toStringTag](){return"Texture3D"}static isSupported(e){return(0,i.D0)(e)}constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,i.KQ)(e),t=Object.assign({depth:1},t,{target:32879,unpackFlipY:!1}),super(e,t),this.initialize(t),Object.seal(this)}setImageData(e){let{level:t=0,dataFormat:n=6408,width:r,height:o,depth:a=1,border:s=0,format:u,type:d=5121,offset:f=0,data:h,parameters:p={}}=e;if(this._trackDeallocatedMemory("Texture"),this.gl.bindTexture(this.target,this.handle),(0,i.s8)(this.gl,p,(()=>{ArrayBuffer.isView(h)&&this.gl.texImage3D(this.target,t,n,r,o,a,s,u,d,h),h instanceof c.Z&&(this.gl.bindBuffer(35052,h.handle),this.gl.texImage3D(this.target,t,n,r,o,a,s,u,d,f))})),h&&h.byteLength)this._trackAllocatedMemory(h.byteLength,"Texture");else{const e=l.C[this.dataFormat]||4,t=l.pH[this.type]||1;this._trackAllocatedMemory(this.width*this.height*this.depth*e*t,"Texture")}return this.loaded=!0,this}}var d=n(64282),f=n(59661);function h(e,t){(0,f.h)(e instanceof r.Z||e instanceof s||e instanceof u);const n=e.constructor,{gl:i,width:o,height:a,format:l,type:c,dataFormat:d,border:h,mipmaps:p}=e;return new n(i,Object.assign({width:o,height:a,format:l,type:c,dataFormat:d,border:h,mipmaps:p},t))}function p(e,t){const{gl:n,width:r,height:i,id:o}=e;return new d.Z(n,Object.assign({},t,{id:"framebuffer-for-".concat(o),width:r,height:i,attachments:{36064:e}}))}},78501:(e,t,n)=>{"use strict";n.d(t,{KS:()=>s,O:()=>i,c$:()=>a,vN:()=>o});const r="Failed to deduce GL constant from typed array";function i(e){switch(ArrayBuffer.isView(e)?e.constructor:e){case Float32Array:return 5126;case Uint16Array:return 5123;case Uint32Array:return 5125;case Uint8Array:case Uint8ClampedArray:return 5121;case Int8Array:return 5120;case Int16Array:return 5122;case Int32Array:return 5124;default:throw new Error(r)}}function o(e){let{clamped:t=!0}=arguments.length>1&&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 a(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 s=0;s{function t(e){if(e=Object.assign({},e),!(this instanceof t))throw new Error("MapboxLanguage needs to be called with the new keyword");this.setLanguage=this.setLanguage.bind(this),this._initialStyleUpdate=this._initialStyleUpdate.bind(this),this._defaultLanguage=e.defaultLanguage,this._isLanguageField=e.languageField||/^name_/,this._getLanguageField=e.getLanguageField||function(e){return"mul"===e?"name":"name_".concat(e)},this._languageSource=e.languageSource||null,this._languageTransform=e.languageTransform,this._excludedLayerIds=e.excludedLayerIds||[],this.supportedLanguages=e.supportedLanguages||["ar","de","en","es","fr","it","ja","ko","mul","pt","ru","vi","zh-Hans","zh-Hant"]}const n=/^\{name/;function r(e,t){const r=Array.isArray(t)&&"get"===t[0];return r&&n.test(t[1])&&console.warn("This plugin no longer supports the use of token syntax (e.g. {name}). Please use a get expression. See https://docs.mapbox.com/mapbox-gl-js/style-spec/expressions/ for more details."),r&&e.test(t[1])}function i(e,t,n){if(Array.isArray(t))for(let o=1;o{const n=e.sources[t].url;return n&&n.indexOf("mapbox.mapbox-streets-v8")>-1||/mapbox-streets-v[1-9][1-9]/.test(n)}));if(!t.length)throw new Error('If using MapboxLanguage with a Mapbox style, the style must be based on vector tile version 8, e.g. "streets-v11"');return t[0]}(e);if(!n)return e;const r=this._getLanguageField(t),i=this._isLanguageField,a=this._excludedLayerIds,s=e.layers.map((e=>e.source===n?function(e,t,n,r){return t.layout&&t.layout["text-field"]&&-1===r.indexOf(t.id)?Object.assign({},t,{layout:Object.assign({},t.layout,{"text-field":o(e,t.layout["text-field"],n)})}):t}(i,e,r,a):e)),l=Object.assign({},e,{layers:s});return this._languageTransform?this._languageTransform(l,t):l},t.prototype._initialStyleUpdate=function(){const e=this._map.getStyle(),t=this._defaultLanguage||function(e){const t=navigator.languages?navigator.languages[0]:navigator.language||navigator.userLanguage,n=t&&t.split("-");let r=t;n.length>1&&(r=n[0]);if(e.indexOf(r)>-1)return r;return null}(this.supportedLanguages);this._map.setStyle(this.setLanguage(e,t))},t.prototype.onAdd=function(e){return this._map=e,this._map.on("style.load",this._initialStyleUpdate),this._container=document.createElement("div"),this._container},t.prototype.onRemove=function(){this._map.off("style.load",this._initialStyleUpdate),this._map=void 0},"undefined"!==typeof e.exports?e.exports=t:window.MapboxLanguage=t},76624:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=n(30373);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){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;for(let n=0;n0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;for(let n=0;n0?", ":"")+(0,r.Bw)(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{"use strict";n.d(t,{Z:()=>a});var r=n(76624),i=n(6859),o=n(30373);class a extends r.Z{toString(){let e="[";if(o.vc.printRowMajor){e+="row-major:";for(let t=0;t1&&void 0!==arguments[1]?arguments[1]:new Array(this.RANK).fill(-0);const n=e*this.RANK;for(let r=0;r{"use strict";n.d(t,{Z:()=>a});var r=n(76624),i=n(6859),o=n(83006);class a extends r.Z{get x(){return this[0]}set x(e){this[0]=(0,i.u5)(e)}get y(){return this[1]}set y(e){this[1]=(0,i.u5)(e)}len(){return Math.sqrt(this.lengthSquared())}magnitude(){return this.len()}lengthSquared(){let e=0;for(let t=0;t=0&&e=0&&e{"use strict";n.d(t,{Z:()=>m});var r,i=n(74310),o=n(6859),a=n(96420),s=n(44649),l=n(69291),c=n(58034),u=n(81723);!function(e){e[e.COL0ROW0=0]="COL0ROW0",e[e.COL0ROW1=1]="COL0ROW1",e[e.COL0ROW2=2]="COL0ROW2",e[e.COL0ROW3=3]="COL0ROW3",e[e.COL1ROW0=4]="COL1ROW0",e[e.COL1ROW1=5]="COL1ROW1",e[e.COL1ROW2=6]="COL1ROW2",e[e.COL1ROW3=7]="COL1ROW3",e[e.COL2ROW0=8]="COL2ROW0",e[e.COL2ROW1=9]="COL2ROW1",e[e.COL2ROW2=10]="COL2ROW2",e[e.COL2ROW3=11]="COL2ROW3",e[e.COL3ROW0=12]="COL3ROW0",e[e.COL3ROW1=13]="COL3ROW1",e[e.COL3ROW2=14]="COL3ROW2",e[e.COL3ROW3=15]="COL3ROW3"}(r||(r={}));const d=45*Math.PI/180,f=1,h=.1,p=500,g=Object.freeze([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]);class m extends i.Z{static get IDENTITY(){return function(){A||(A=new m,Object.freeze(A));return A}()}static get ZERO(){return function(){v||(v=new m([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),Object.freeze(v));return v}()}get ELEMENTS(){return 16}get RANK(){return 4}get INDICES(){return r}constructor(e){super(-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0),1===arguments.length&&Array.isArray(e)?this.copy(e):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[9]=e[9],this[10]=e[10],this[11]=e[11],this[12]=e[12],this[13]=e[13],this[14]=e[14],this[15]=e[15],this.check()}set(e,t,n,r,i,o,a,s,l,c,u,d,f,h,p,g){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[9]=c,this[10]=u,this[11]=d,this[12]=f,this[13]=h,this[14]=p,this[15]=g,this.check()}setRowMajor(e,t,n,r,i,o,a,s,l,c,u,d,f,h,p,g){return this[0]=e,this[1]=i,this[2]=l,this[3]=f,this[4]=t,this[5]=o,this[6]=c,this[7]=h,this[8]=n,this[9]=a,this[10]=u,this[11]=p,this[12]=r,this[13]=s,this[14]=d,this[15]=g,this.check()}toRowMajor(e){return e[0]=this[0],e[1]=this[4],e[2]=this[8],e[3]=this[12],e[4]=this[1],e[5]=this[5],e[6]=this[9],e[7]=this[13],e[8]=this[2],e[9]=this[6],e[10]=this[10],e[11]=this[14],e[12]=this[3],e[13]=this[7],e[14]=this[11],e[15]=this[15],e}identity(){return this.copy(g)}fromObject(e){return this.check()}fromQuaternion(e){return s.en(this,e),this.check()}frustum(e){const{left:t,right:n,bottom:r,top:i,near:o=h,far:a=p}=e;return a===1/0?function(e,t,n,r,i,o){const a=2*o/(n-t),s=2*o/(i-r),l=(n+t)/(n-t),c=(i+r)/(i-r),u=-1,d=-1,f=-2*o;e[0]=a,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=s,e[6]=0,e[7]=0,e[8]=l,e[9]=c,e[10]=u,e[11]=d,e[12]=0,e[13]=0,e[14]=f,e[15]=0}(this,t,n,r,i,o):s.oy(this,t,n,r,i,o,a),this.check()}lookAt(e){const{eye:t,center:n=[0,0,0],up:r=[0,1,0]}=e;return s.zB(this,t,n,r),this.check()}ortho(e){const{left:t,right:n,bottom:r,top:i,near:o=h,far:a=p}=e;return s.M5(this,t,n,r,i,o,a),this.check()}orthographic(e){const{fovy:t=d,aspect:n=f,focalDistance:r=1,near:i=h,far:o=p}=e;y(t);const a=t/2,s=r*Math.tan(a),l=s*n;return this.ortho({left:-l,right:l,bottom:-s,top:s,near:i,far:o})}perspective(e){const{fovy:t=45*Math.PI/180,aspect:n=1,near:r=.1,far:i=500}=e;return y(t),s.G3(this,t,n,r,i),this.check()}determinant(){return s.GH(this)}getScale(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[-0,-0,-0];return e[0]=Math.sqrt(this[0]*this[0]+this[1]*this[1]+this[2]*this[2]),e[1]=Math.sqrt(this[4]*this[4]+this[5]*this[5]+this[6]*this[6]),e[2]=Math.sqrt(this[8]*this[8]+this[9]*this[9]+this[10]*this[10]),e}getTranslation(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[-0,-0,-0];return e[0]=this[12],e[1]=this[13],e[2]=this[14],e}getRotation(e,t){e=e||[-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0],t=t||[-0,-0,-0];const n=this.getScale(t),r=1/n[0],i=1/n[1],o=1/n[2];return e[0]=this[0]*r,e[1]=this[1]*i,e[2]=this[2]*o,e[3]=0,e[4]=this[4]*r,e[5]=this[5]*i,e[6]=this[6]*o,e[7]=0,e[8]=this[8]*r,e[9]=this[9]*i,e[10]=this[10]*o,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}getRotationMatrix3(e,t){e=e||[-0,-0,-0,-0,-0,-0,-0,-0,-0],t=t||[-0,-0,-0];const n=this.getScale(t),r=1/n[0],i=1/n[1],o=1/n[2];return e[0]=this[0]*r,e[1]=this[1]*i,e[2]=this[2]*o,e[3]=this[4]*r,e[4]=this[5]*i,e[5]=this[6]*o,e[6]=this[8]*r,e[7]=this[9]*i,e[8]=this[10]*o,e}transpose(){return s.p4(this,this),this.check()}invert(){return s.U_(this,this),this.check()}multiplyLeft(e){return s.Jp(this,e,this),this.check()}multiplyRight(e){return s.Jp(this,this,e),this.check()}rotateX(e){return s.lM(this,this,e),this.check()}rotateY(e){return s.uD(this,this,e),this.check()}rotateZ(e){return s.jI(this,this,e),this.check()}rotateXYZ(e){return this.rotateX(e[0]).rotateY(e[1]).rotateZ(e[2])}rotateAxis(e,t){return s.U1(this,this,e,t),this.check()}scale(e){return s.bA(this,this,Array.isArray(e)?e:[e,e,e]),this.check()}translate(e){return s.Iu(this,this,e),this.check()}transform(e,t){return 4===e.length?(t=u.fF(t||[-0,-0,-0,-0],e,this),(0,o.IL)(t,4),t):this.transformAsPoint(e,t)}transformAsPoint(e,t){const{length:n}=e;let r;switch(n){case 2:r=l.fF(t||[-0,-0],e,this);break;case 3:r=c.fF(t||[-0,-0,-0],e,this);break;default:throw new Error("Illegal vector")}return(0,o.IL)(r,e.length),r}transformAsVector(e,t){let n;switch(e.length){case 2:n=(0,a.pb)(t||[-0,-0],e,this);break;case 3:n=(0,a.pL)(t||[-0,-0,-0],e,this);break;default:throw new Error("Illegal vector")}return(0,o.IL)(n,e.length),n}transformPoint(e,t){return this.transformAsPoint(e,t)}transformVector(e,t){return this.transformAsPoint(e,t)}transformDirection(e,t){return this.transformAsVector(e,t)}makeRotationX(e){return this.identity().rotateX(e)}makeTranslation(e,t,n){return this.identity().translate([e,t,n])}}let v,A;function y(e){if(e>2*Math.PI)throw Error("expected radians")}},31549:(e,t,n)=>{"use strict";n.d(t,{Z:()=>u});var r=n(22070),i=n(30373),o=n(6859),a=n(58034),s=n(96420);const l=[0,0,0];let c;class u extends r.Z{static get ZERO(){return c||(c=new u(0,0,0),Object.freeze(c)),c}constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;super(-0,-0,-0),1===arguments.length&&(0,i.kJ)(e)?this.copy(e):(i.vc.debug&&((0,o.u5)(e),(0,o.u5)(t),(0,o.u5)(n)),this[0]=e,this[1]=t,this[2]=n)}set(e,t,n){return this[0]=e,this[1]=t,this[2]=n,this.check()}copy(e){return this[0]=e[0],this[1]=e[1],this[2]=e[2],this.check()}fromObject(e){return i.vc.debug&&((0,o.u5)(e.x),(0,o.u5)(e.y),(0,o.u5)(e.z)),this[0]=e.x,this[1]=e.y,this[2]=e.z,this.check()}toObject(e){return e.x=this[0],e.y=this[1],e.z=this[2],e}get ELEMENTS(){return 3}get z(){return this[2]}set z(e){this[2]=(0,o.u5)(e)}angle(e){return a.EU(this,e)}cross(e){return a.kC(this,this,e),this.check()}rotateX(e){let{radians:t,origin:n=l}=e;return a.lM(this,this,n,t),this.check()}rotateY(e){let{radians:t,origin:n=l}=e;return a.uD(this,this,n,t),this.check()}rotateZ(e){let{radians:t,origin:n=l}=e;return a.jI(this,this,n,t),this.check()}transform(e){return this.transformAsPoint(e)}transformAsPoint(e){return a.fF(this,this,e),this.check()}transformAsVector(e){return(0,s.pL)(this,this,e),this.check()}transformByMatrix3(e){return a.kK(this,this,e),this.check()}transformByMatrix2(e){return(0,s.eQ)(this,this,e),this.check()}transformByQuaternion(e){return a.VC(this,this,e),this.check()}}},83006:(e,t,n)=>{"use strict";function r(e,t){if(!e)throw new Error("math.gl assertion ".concat(t))}n.d(t,{Z:()=>r})},30373:(e,t,n)=>{"use strict";n.d(t,{Bw:()=>i,fS:()=>l,kJ:()=>o,t7:()=>s,uZ:()=>a,vc:()=>r});Math.PI,Math.PI;const r={EPSILON:1e-12,debug:!1,precision:4,printTypes:!1,printDegrees:!1,printRowMajor:!0};function i(e){let{precision:t=r.precision}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e=function(e){return Math.round(e/r.EPSILON)*r.EPSILON}(e),"".concat(parseFloat(e.toPrecision(t)))}function o(e){return Array.isArray(e)||ArrayBuffer.isView(e)&&!(e instanceof DataView)}function a(e,t,n){return c(e,(e=>Math.max(t,Math.min(n,e))))}function s(e,t,n){return o(e)?e.map(((e,r)=>s(e,t[r],n))):n*t+(1-n)*e}function l(e,t,n){const i=r.EPSILON;n&&(r.EPSILON=n);try{if(e===t)return!0;if(o(e)&&o(t)){if(e.length!==t.length)return!1;for(let n=0;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];return e[0]=n[0]*r+n[2]*i,e[1]=n[1]*r+n[3]*i,e[2]=t[2],e[3]=t[3],e}function s(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,{G7:()=>a,_x:()=>s,eQ:()=>o,pL:()=>i,pb:()=>r})},6859:(e,t,n)=>{"use strict";n.d(t,{IL:()=>o,u5:()=>i});var r=n(30373);function i(e){if(!Number.isFinite(e))throw new Error("Invalid number ".concat(e));return e}function o(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";if(r.vc.debug&&!function(e,t){if(e.length!==t)return!1;for(let n=0;n{"use strict";n.r(t),n.d(t,{Polygon:()=>f,WINDING:()=>o,_Polygon:()=>f,clipPolygon:()=>U,clipPolyline:()=>z,cutPolygonByGrid:()=>Y,cutPolygonByMercatorBounds:()=>ne,cutPolylineByGrid:()=>W,cutPolylineByMercatorBounds:()=>te,earcut:()=>h,forEachSegmentInPolygon:()=>c,getPolygonSignedArea:()=>l,getPolygonWindingDirection:()=>s,modifyPolygonWindingDirection:()=>a});var r=n(68185),i=n(30373);const o={CLOCKWISE:1,COUNTER_CLOCKWISE:-1};function a(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return s(e,n)!==t&&(function(e,t){const{start:n=0,end:r=e.length,size:i=2}=t,o=(r-n)/i,a=Math.floor(o/2);for(let s=0;s1&&void 0!==arguments[1]?arguments[1]:{};return Math.sign(l(e,t))}function l(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{start:n=0,end:r=e.length}=t,i=t.size||2;let o=0;for(let a=n,s=r-i;a2&&void 0!==arguments[2]?arguments[2]:{};const{start:r=0,end:o=e.length,size:a=2,isClosed:s}=n,l=(o-r)/a;for(let i=0;i1&&void 0!==arguments[1]?arguments[1]:{};return Math.sign(d(e,t))}(e,arguments.length>2&&void 0!==arguments[2]?arguments[2]:{});return n!==t&&(e.reverse(),!0)}function d(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{start:n=0,end:r=e.length}=t;let i=0;for(let o=n,a=r-1;o1&&void 0!==arguments[1]?arguments[1]:{};(0,r.Z)(this,"points",void 0),(0,r.Z)(this,"isFlatArray",void 0),(0,r.Z)(this,"options",void 0),this.points=e,this.isFlatArray=!(0,i.kJ)(e[0]),this.options={start:t.start||0,end:t.end||e.length,size:t.size||2,isClosed:t.isClosed},Object.freeze(this)}getSignedArea(){return this.isFlatArray?l(this.points,this.options):d(this.points,this.options)}getArea(){return Math.abs(this.getSignedArea())}getWindingDirection(){return Math.sign(this.getSignedArea())}forEachSegment(e){this.isFlatArray?c(this.points,((t,n,r,i,o,a)=>{e([t,n],[r,i],o,a)}),this.options):function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{start:r=0,end:o=e.length,isClosed:a}=n;for(let i=r;i2&&void 0!==arguments[2]?arguments[2]:2,r=arguments.length>3?arguments[3]:void 0;const i=t&&t.length,o=i?t[0]*n:e.length;let a=p(e,0,o,n,!0,r&&r[0]);const s=[];if(!a||a.next===a.prev)return s;let l,c,u,d,f,h,v;if(i&&(a=function(e,t,n,r,i){const o=[];let a,s,l,c,u;for(a=0,s=t.length;a80*n){d=c=e[0],f=u=e[1];for(let t=n;tc&&(c=h),v>u&&(u=v);l=Math.max(c-d,u-f),l=0!==l?1/l:0}return m(a,s,n,d,f,l),s}function p(e,t,n,r,i,o){let a,s;if(void 0===o&&(o=l(e,{start:t,end:n,size:r})),i===o<0)for(a=t;a=t;a-=r)s=N(a,e[a],e[a+1],s);return s&&k(s,s.next)&&(D(s),s=s.next),s}function g(e,t){if(!e)return e;t||(t=e);let n,r=e;do{if(n=!1,r.steiner||!k(r,r.next)&&0!==T(r.prev,r,r.next))r=r.next;else{if(D(r),r=t=r.prev,r===r.next)break;n=!0}}while(n||r!==t);return t}function m(e,t,n,r,i,o,a){if(!e)return;!a&&o&&function(e,t,n,r){let i=e;do{null===i.z&&(i.z=E(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,c=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,c*=2}while(r>1)}(i)}(e,r,i,o);let s,l,c=e;for(;e.prev!==e.next;)if(s=e.prev,l=e.next,o?A(e,r,i,o):v(e))t.push(s.i/n),t.push(e.i/n),t.push(l.i/n),D(e),e=l.next,c=l.next;else if((e=l)===c){a?1===a?m(e=y(g(e),t,n),t,n,r,i,o,2):2===a&&b(e,t,n,r,i,o):m(g(e),t,n,r,i,o,1);break}}function v(e){const t=e.prev,n=e,r=e.next;if(T(t,n,r)>=0)return!1;let i=e.next.next;for(;i!==e.prev;){if(C(t.x,t.y,n.x,n.y,r.x,r.y,i.x,i.y)&&T(i.prev,i,i.next)>=0)return!1;i=i.next}return!0}function A(e,t,n,r){const i=e.prev,o=e,a=e.next;if(T(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,u=i.y>o.y?i.y>a.y?i.y:a.y:o.y>a.y?o.y:a.y,d=E(s,l,t,n,r),f=E(c,u,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&&C(i.x,i.y,o.x,o.y,a.x,a.y,h.x,h.y)&&T(h.prev,h,h.next)>=0)return!1;if(h=h.prevZ,p!==e.prev&&p!==e.next&&C(i.x,i.y,o.x,o.y,a.x,a.y,p.x,p.y)&&T(p.prev,p,p.next)>=0)return!1;p=p.nextZ}for(;h&&h.z>=d;){if(h!==e.prev&&h!==e.next&&C(i.x,i.y,o.x,o.y,a.x,a.y,h.x,h.y)&&T(h.prev,h,h.next)>=0)return!1;h=h.prevZ}for(;p&&p.z<=f;){if(p!==e.prev&&p!==e.next&&C(i.x,i.y,o.x,o.y,a.x,a.y,p.x,p.y)&&T(p.prev,p,p.next)>=0)return!1;p=p.nextZ}return!0}function y(e,t,n){let r=e;do{const i=r.prev,o=r.next.next;!k(i,o)&&M(i,r,r.next,o)&&I(i,o)&&I(o,i)&&(t.push(i.i/n),t.push(r.i/n),t.push(o.i/n),D(r),D(r.next),r=e=o),r=r.next}while(r!==e);return g(r)}function b(e,t,n,r,i,o){let a=e;do{let e=a.next.next;for(;e!==a.prev;){if(a.i!==e.i&&P(a,e)){let s=L(a,e);return a=g(a,a.next),s=g(s,s.next),m(a,t,n,r,i,o),void m(s,t,n,r,i,o)}e=e.next}a=a.next}while(a!==e)}function _(e,t){return e.x-t.x}function w(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&&C(io.x||n.x===o.x&&x(o,n)))&&(o=n,d=u)),n=n.next}while(n!==s);return o}(e,t),t){const n=L(t,e);g(t,t.next),g(n,n.next)}}function x(e,t){return T(e.prev,e,t.prev)<0&&T(t.next,e,e.next)<0}function E(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 S(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 P(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&&M(n,n.next,e,t))return!0;n=n.next}while(n!==e);return!1}(e,t)&&(I(e,t)&&I(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)&&(T(e.prev,e,t.prev)||T(e,t.prev,t))||k(e,t)&&T(e.prev,e,e.next)>0&&T(t.prev,t,t.next)>0)}function T(e,t,n){return(t.y-e.y)*(n.x-t.x)-(t.x-e.x)*(n.y-t.y)}function k(e,t){return e.x===t.x&&e.y===t.y}function M(e,t,n,r){const i=R(T(e,t,n)),o=R(T(e,t,r)),a=R(T(n,r,e)),s=R(T(n,r,t));return i!==o&&a!==s||(!(0!==i||!O(e,n,t))||(!(0!==o||!O(e,r,t))||(!(0!==a||!O(n,e,r))||!(0!==s||!O(n,t,r)))))}function O(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 R(e){return e>0?1:e<0?-1:0}function I(e,t){return T(e.prev,e,e.next)<0?T(e,t,e.next)>=0&&T(e,e.prev,t)>=0:T(e,t,e.prev)<0||T(e,e.next,t)<0}function L(e,t){const n=new F(e.i,e.x,e.y),r=new F(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 N(e,t,n,r){const i=new F(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 D(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 F(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 j(e,t){const n=t.length,r=e.length;if(r>0){let i=!0;for(let o=0;o4&&void 0!==arguments[4]?arguments[4]:[];const o=r+t*n;for(let a=0;a4&&void 0!==arguments[4]?arguments[4]:[];if(8&n)i=(r[3]-e[1])/(t[1]-e[1]),o=3;else if(4&n)i=(r[1]-e[1])/(t[1]-e[1]),o=1;else if(2&n)i=(r[2]-e[0])/(t[0]-e[0]),o=2;else{if(!(1&n))return null;i=(r[0]-e[0])/(t[0]-e[0]),o=0}for(let s=0;st[2]&&(n|=2),e[1]t[3]&&(n|=8),n}function W(e,t){const{size:n=2,broken:r=!1,gridResolution:i=10,gridOffset:o=[0,0],startIndex:a=0,endIndex:s=e.length}=t||{},l=(s-a)/n;let c=[];const u=[c],d=Z(e,0,n,a);let f,h;const p=$(d,i,o,[]),g=[];j(c,d);for(let m=1;mn&&(c=[],u.push(c),j(c,d)),h=V(f,p)}j(c,f),B(d,f)}return r?u:u[0]}const G=0,K=1;function q(e,t){for(let n=0;n1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2?arguments[2]:void 0;if(!e.length)return[];const{size:r=2,gridResolution:i=10,gridOffset:o=[0,0],edgeTypes:a=!1}=n||{},s=[],l=[{pos:e,types:a?new Array(e.length/r).fill(K):null,holes:t||[]}],c=[[],[]];let u=[];for(;l.length;){const{pos:e,types:t,holes:n}=l.shift();J(e,r,n[0]||e.length,c),u=$(c[0],i,o,u);const d=V(c[1],u);if(d){let i=X(e,t,r,0,n[0]||e.length,u,d);const o={pos:i[0].pos,types:i[0].types,holes:[]},s={pos:i[1].pos,types:i[1].types,holes:[]};l.push(o,s);for(let l=0;l=0?(j(c,h)&&d.push(g),b+=p):d.length&&(d[d.length-1]=G),B(m,h),v=p,A=g;return[y?{pos:l,types:t&&u}:null,b?{pos:c,types:t&&d}:null]}function $(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 Q(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 J(e,t,n,r){let i=1/0,o=-1/0,a=1/0,s=-1/0;for(let l=0;lo?t:o,a=ns?n:s}return r[0][0]=i,r[0][1]=a,r[1][0]=o,r[1][1]=s,r}const ee=85.051129;function te(e,t){const{size:n=2,startIndex:r=0,endIndex:i=e.length,normalize:o=!0}=t||{},a=e.slice(r,i);oe(a,n,0,i-r);const s=W(a,{size:n,broken:!0,gridResolution:360,gridOffset:[-180,-180]});if(o)for(const l of s)ae(l,n);return s}function ne(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2?arguments[2]:void 0;const{size:r=2,normalize:i=!0,edgeTypes:o=!1}=n||{};t=t||[];const a=[],s=[];let l=0,c=0;for(let d=0;d<=t.length;d++){const i=t[d]||e.length,o=c,u=re(e,r,l,i);for(let t=u;ti&&(i=t,o=a-1)}return o}function ie(e,t,n,r){let i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:ee;const o=e[n],a=e[r-t];if(Math.abs(o-a)>180){const r=Z(e,0,t,n);r[0]+=360*Math.round((a-o)/360),j(e,r),r[1]=Math.sign(r[1])*i,j(e,r),r[0]=o,j(e,r)}}function oe(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 ae(e,t){let n;const r=e.length/t;for(let o=0;o{"use strict";n.d(t,{DW:()=>F,eG:()=>C,Lu:()=>k,Xg:()=>I,sj:()=>M,zX:()=>N,ro:()=>S,Bf:()=>x,wl:()=>T,lf:()=>P,w5:()=>_,QA:()=>B,CT:()=>R,NC:()=>E,es:()=>w,aW:()=>O});var r=n(68185),i=n(81723);function o(e,t){const n=(0,i.fF)([],t,e);return(0,i.bA)(n,n,1/n[3]),n}function a(e,t){const n=e%t;return n<0?t+n:n}function s(e,t,n){return en?n:e}const l=Math.log2||function(e){return Math.log(e)*Math.LOG2E};var c=n(44649),u=n(69291),d=n(58034);function f(e,t){if(!e)throw new Error(t||"@math.gl/web-mercator: assertion failed.")}const h=Math.PI,p=h/4,g=h/180,m=180/h,v=512,A=4003e4,y=85.051129,b=1.5;function _(e){const[t,n]=e;f(Number.isFinite(t)),f(Number.isFinite(n)&&n>=-90&&n<=90,"invalid latitude");const r=n*g;return[v*(t*g+h)/(2*h),v*(h+Math.log(Math.tan(p+.5*r)))/(2*h)]}function w(e){const[t,n]=e,r=t/v*(2*h)-h,i=2*(Math.atan(Math.exp(n/v*(2*h)-h))-p);return[r*m,i*m]}function x(e){const{latitude:t}=e;f(Number.isFinite(t));const n=Math.cos(t*g);return l(A*n)-9}function E(e){const t=Math.cos(e*g);return v/A/t}function S(e){const{latitude:t,longitude:n,highPrecision:r=!1}=e;f(Number.isFinite(t)&&Number.isFinite(n));const i=v,o=Math.cos(t*g),a=i/360,s=a/o,l=i/A/o,c={unitsPerMeter:[l,l,l],metersPerUnit:[1/l,1/l,1/l],unitsPerDegree:[a,s,l],degreesPerUnit:[1/a,1/s,1/l]};if(r){const e=g*Math.tan(t*g)/o,n=a*e/2,r=i/A*e,u=r/s*l;c.unitsPerDegree2=[0,n,r],c.unitsPerMeter2=[u,0,u]}return c}function C(e,t){const[n,r,i]=e,[o,a,s]=t,{unitsPerMeter:l,unitsPerMeter2:c}=S({longitude:n,latitude:r,highPrecision:!0}),u=_(e);u[0]+=o*(l[0]+c[0]*a),u[1]+=a*(l[1]+c[1]*a);const d=w(u),f=(i||0)+(s||0);return Number.isFinite(i)||Number.isFinite(s)?[d[0],d[1],f]:d}function P(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];c.Iu(s,s,[0,0,-i]),c.lM(s,s,-n*g),c.jI(s,s,r*g);const l=o/t;return c.bA(s,s,[l,l,l]),a&&c.Iu(s,s,d.tk([],a)),s}function T(e){const{width:t,height:n,altitude:r,pitch:i=0,offset:o,center:a,scale:l,nearZMultiplier:c=1,farZMultiplier:u=1}=e;let{fovy:d=k(b)}=e;void 0!==r&&(d=k(r));const f=d*g,h=i*g,p=M(d);let m=p;a&&(m+=a[2]*l/Math.cos(h)/n);const v=f*(.5+(o?o[1]:0)/n),A=Math.sin(v)*m/Math.sin(s(Math.PI/2-h-v,.01,Math.PI-.01)),y=Math.sin(h)*A+m,_=10*m;return{fov:f,aspect:t/n,focalDistance:p,near:c,far:Math.min(y*u,_)}}function k(e){return 2*Math.atan(.5/e)*m}function M(e){return.5/Math.tan(.5*e*g)}function O(e,t){const[n,r,i=0]=e;return f(Number.isFinite(n)&&Number.isFinite(r)&&Number.isFinite(i)),o(t,[n,r,i,1])}function R(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;const[r,i,a]=e;if(f(Number.isFinite(r)&&Number.isFinite(i),"invalid pixel coordinate"),Number.isFinite(a)){return o(t,[r,i,a,1])}const s=o(t,[r,i,0,1]),l=o(t,[r,i,1,1]),c=s[2],d=l[2],h=c===d?0:((n||0)-c)/(d-c);return u.t7([],s,l,h)}function I(e){const{width:t,height:n,bounds:r,minExtent:i=0,maxZoom:o=24,offset:a=[0,0]}=e,[[c,u],[d,h]]=r,p=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;if("number"===typeof e)return{top:e,bottom:e,left:e,right:e};return f(Number.isFinite(e.top)&&Number.isFinite(e.bottom)&&Number.isFinite(e.left)&&Number.isFinite(e.right)),e}(e.padding),g=_([c,s(h,-y,y)]),m=_([d,s(u,-y,y)]),v=[Math.max(Math.abs(m[0]-g[0]),i),Math.max(Math.abs(m[1]-g[1]),i)],A=[t-p.left-p.right-2*Math.abs(a[0]),n-p.top-p.bottom-2*Math.abs(a[1])];f(A[0]>0&&A[1]>0);const b=A[0]/v[0],x=A[1]/v[1],E=(p.right-p.left)/2/b,S=(p.top-p.bottom)/2/x,C=w([(m[0]+g[0])/2+E,(m[1]+g[1])/2+S]),P=Math.min(o,l(Math.abs(Math.min(b,x))));return f(Number.isFinite(P)),{longitude:C[0],latitude:C[1],zoom:P}}const L=Math.PI/180;function N(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;const{width:n,height:r,unproject:i}=e,o={targetZ:t},a=i([0,r],o),s=i([n,r],o);let l,c;return(e.fovy?.5*e.fovy*L:Math.atan(.5/e.altitude))>(90-e.pitch)*L-.01?(l=D(e,0,t),c=D(e,n,t)):(l=i([0,0],o),c=i([n,0],o)),[a,s,c,l]}function D(e,t,n){const{pixelUnprojectionMatrix:r}=e,i=o(r,[t,0,1,1]),a=o(r,[t,e.height,1,1]),s=(n*e.distanceScales.unitsPerMeter[2]-i[2])/(a[2]-i[2]),l=w(u.t7([],i,a,s));return l.push(n),l}class F{constructor(){var e=this;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{width:1,height:1};(0,r.Z)(this,"latitude",void 0),(0,r.Z)(this,"longitude",void 0),(0,r.Z)(this,"zoom",void 0),(0,r.Z)(this,"pitch",void 0),(0,r.Z)(this,"bearing",void 0),(0,r.Z)(this,"altitude",void 0),(0,r.Z)(this,"fovy",void 0),(0,r.Z)(this,"meterOffset",void 0),(0,r.Z)(this,"center",void 0),(0,r.Z)(this,"width",void 0),(0,r.Z)(this,"height",void 0),(0,r.Z)(this,"scale",void 0),(0,r.Z)(this,"distanceScales",void 0),(0,r.Z)(this,"viewMatrix",void 0),(0,r.Z)(this,"projectionMatrix",void 0),(0,r.Z)(this,"viewProjectionMatrix",void 0),(0,r.Z)(this,"pixelProjectionMatrix",void 0),(0,r.Z)(this,"pixelUnprojectionMatrix",void 0),(0,r.Z)(this,"equals",(e=>e instanceof F&&(e.width===this.width&&e.height===this.height&&c.fS(e.projectionMatrix,this.projectionMatrix)&&c.fS(e.viewMatrix,this.viewMatrix)))),(0,r.Z)(this,"project",(function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{topLeft:r=!0}=n,i=O(e.projectPosition(t),e.pixelProjectionMatrix),[o,a]=i,s=r?a:e.height-a;return 2===t.length?[o,s]:[o,s,i[2]]})),(0,r.Z)(this,"unproject",(function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{topLeft:r=!0,targetZ:i}=n,[o,a,s]=t,l=r?a:e.height-a,c=i&&i*e.distanceScales.unitsPerMeter[2],u=R([o,l,s],e.pixelUnprojectionMatrix,c),[d,f,h]=e.unprojectPosition(u);return Number.isFinite(s)?[d,f,h]:Number.isFinite(i)?[d,f,i]:[d,f]})),(0,r.Z)(this,"projectPosition",(e=>{const[t,n]=_(e);return[t,n,(e[2]||0)*this.distanceScales.unitsPerMeter[2]]})),(0,r.Z)(this,"unprojectPosition",(e=>{const[t,n]=w(e);return[t,n,(e[2]||0)*this.distanceScales.metersPerUnit[2]]}));let{width:n,height:i,altitude:o=null,fovy:a=null}=t;const{latitude:s=0,longitude:l=0,zoom:u=0,pitch:f=0,bearing:h=0,position:p=null,nearZMultiplier:g=.02,farZMultiplier:m=1.01}=t;n=n||1,i=i||1,null===a&&null===o?(o=b,a=k(o)):null===a?a=k(o):null===o&&(o=M(a));const v=function(e){return Math.pow(2,e)}(u);o=Math.max(.75,o);const A=S({longitude:l,latitude:s}),y=_([l,s]);y.push(0),p&&d.IH(y,y,d.dC([],p,A.unitsPerMeter)),this.projectionMatrix=function(e){const{fov:t,aspect:n,near:r,far:i}=T(e);return c.G3([],t,n,r,i)}({width:n,height:i,scale:v,center:y,pitch:f,fovy:a,nearZMultiplier:g,farZMultiplier:m}),this.viewMatrix=P({height:i,scale:v,center:y,pitch:f,bearing:h,altitude:o}),this.width=n,this.height=i,this.scale=v,this.latitude=s,this.longitude=l,this.zoom=u,this.pitch=f,this.bearing=h,this.altitude=o,this.fovy=a,this.center=y,this.meterOffset=p||[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];c.Jp(i,i,n),c.Jp(i,i,r),this.viewProjectionMatrix=i;const o=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];c.bA(o,o,[e/2,-t/2,1]),c.Iu(o,o,[1,-1,0]),c.Jp(o,o,i);const a=c.U_([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 _(e)}unprojectFlat(e){return w(e)}getMapCenterByLngLatPosition(e){let{lngLat:t,pos:n}=e;const r=R(n,this.pixelUnprojectionMatrix),i=_(t),o=u.IH([],i,u.tk([],r));return w(u.IH([],this.center,o))}fitBounds(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{width:n,height:r}=this,{longitude:i,latitude:o,zoom:a}=I(Object.assign({width:n,height:r,bounds:e},t));return new F({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(){return N(this,(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).z||0)}getLocationAtPoint(e){let{lngLat:t,pos:n}=e;return this.getMapCenterByLngLatPosition({lngLat:t,pos:n})}}const j=512;function B(e){const{width:t,height:n,pitch:r=0}=e;let{longitude:i,latitude:o,zoom:s,bearing:c=0}=e;(i<-180||i>180)&&(i=a(i+180,360)-180),(c<-180||c>180)&&(c=a(c+180,360)-180);const u=l(n/j);if(s<=u)s=u,o=0;else{const e=n/2/Math.pow(2,s),t=w([0,e])[1];if(ot&&(o=t)}}return{width:t,height:n,longitude:i,latitude:o,zoom:s,pitch:r,bearing:c}}},21748:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(89258),i=n(16246);const o=globalThis;function a(e){if(!e&&!(0,r.Z)())return"Node";if((0,i.Z)(e))return"Electron";const t="undefined"!==typeof navigator?navigator:{},n=e||t.userAgent||"";if(n.indexOf("Edge")>-1)return"Edge";const a=-1!==n.indexOf("MSIE "),s=-1!==n.indexOf("Trident/");return a||s?"IE":o.chrome?"Chrome":o.safari?"Safari":o.mozInnerScreenX?"Firefox":"Unknown"}},89258:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=n(16246);function i(){return!("object"===typeof process&&"[object process]"===String(process)&&!process.browser)||(0,r.Z)()}},16246:(e,t,n)=>{"use strict";function r(e){if("undefined"!==typeof window&&"object"===typeof window.process&&"renderer"===window.process.type)return!0;if("undefined"!==typeof process&&"object"===typeof process.versions&&Boolean(process.versions.electron))return!0;const t="object"===typeof navigator&&"string"===typeof navigator.userAgent&&navigator.userAgent,n=e||t;return!!(n&&n.indexOf("Electron")>=0)}n.d(t,{Z:()=>r})},20251:(e,t,n)=>{"use strict";n.d(t,{Z:()=>b});var r=n(68185),i=n(89258);const o="undefined"!==typeof __VERSION__?__VERSION__:"untranspiled source";(0,i.Z)();class a{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"sessionStorage";(0,r.Z)(this,"storage",void 0),(0,r.Z)(this,"id",void 0),(0,r.Z)(this,"config",{}),this.storage=function(e){try{const t=window[e],n="__storage_test__";return t.setItem(n,n),t.removeItem(n),t}catch(t){return null}}(n),this.id=e,this.config={},Object.assign(this.config,t),this._loadConfiguration()}getConfiguration(){return this.config}setConfiguration(e){return this.config={},this.updateConfiguration(e)}updateConfiguration(e){if(Object.assign(this.config,e),this.storage){const e=JSON.stringify(this.config);this.storage.setItem(this.id,e)}return this}_loadConfiguration(){let e={};if(this.storage){const t=this.storage.getItem(this.id);e=t?JSON.parse(t):{}}return Object.assign(this.config,e),this}}function s(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:600;const i=e.src.replace(/\(/g,"%28").replace(/\)/g,"%29");e.width>r&&(n=Math.min(n,r/e.width));const o=e.width*n,a=e.height*n,s=["font-size:1px;","padding:".concat(Math.floor(a/2),"px ").concat(Math.floor(o/2),"px;"),"line-height:".concat(a,"px;"),"background:url(".concat(i,");"),"background-size:".concat(o,"px ").concat(a,"px;"),"color:transparent;"].join("");return["".concat(t," %c+"),s]}let l;function c(e){return"string"===typeof e?l[e.toUpperCase()]||l.WHITE:e}function u(e,t){if(!e)throw new Error(t||"Assertion failed")}!function(e){e[e.BLACK=30]="BLACK",e[e.RED=31]="RED",e[e.GREEN=32]="GREEN",e[e.YELLOW=33]="YELLOW",e[e.BLUE=34]="BLUE",e[e.MAGENTA=35]="MAGENTA",e[e.CYAN=36]="CYAN",e[e.WHITE=37]="WHITE",e[e.BRIGHT_BLACK=90]="BRIGHT_BLACK",e[e.BRIGHT_RED=91]="BRIGHT_RED",e[e.BRIGHT_GREEN=92]="BRIGHT_GREEN",e[e.BRIGHT_YELLOW=93]="BRIGHT_YELLOW",e[e.BRIGHT_BLUE=94]="BRIGHT_BLUE",e[e.BRIGHT_MAGENTA=95]="BRIGHT_MAGENTA",e[e.BRIGHT_CYAN=96]="BRIGHT_CYAN",e[e.BRIGHT_WHITE=97]="BRIGHT_WHITE"}(l||(l={}));const d={self:"undefined"!==typeof self&&self,window:"undefined"!==typeof window&&window,global:"undefined"!==typeof n.g&&n.g,document:"undefined"!==typeof document&&document,process:"object"===typeof process&&process},f=d.window||d.self||d.global,h=d.process||{};function p(){let e;var t,n;if(i.Z&&"performance"in f)e=null===f||void 0===f||null===(t=f.performance)||void 0===t||null===(n=t.now)||void 0===n?void 0:n.call(t);else if("hrtime"in h){var r;const t=null===h||void 0===h||null===(r=h.hrtime)||void 0===r?void 0:r.call(h);e=1e3*t[0]+t[1]/1e6}else e=Date.now();return e}const g={debug:i.Z&&console.debug||console.log,log:console.log,info:console.info,warn:console.warn,error:console.error},m={enabled:!0,level:0};function v(){}const A={},y={once:!0};class b{constructor(){let{id:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{id:""};(0,r.Z)(this,"id",void 0),(0,r.Z)(this,"VERSION",o),(0,r.Z)(this,"_startTs",p()),(0,r.Z)(this,"_deltaTs",p()),(0,r.Z)(this,"_storage",void 0),(0,r.Z)(this,"userData",{}),(0,r.Z)(this,"LOG_THROTTLE_TIMEOUT",0),this.id=e,this._storage=new a("__probe-".concat(this.id,"__"),m),this.userData={},this.timeStamp("".concat(this.id," started")),function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:["constructor"];const n=Object.getPrototypeOf(e),r=Object.getOwnPropertyNames(n);for(const i of r)"function"===typeof e[i]&&(t.find((e=>i===e))||(e[i]=e[i].bind(e)))}(this),Object.seal(this)}set level(e){this.setLevel(e)}get level(){return this.getLevel()}isEnabled(){return this._storage.config.enabled}getLevel(){return this._storage.config.level}getTotal(){return Number((p()-this._startTs).toPrecision(10))}getDelta(){return Number((p()-this._deltaTs).toPrecision(10))}set priority(e){this.level=e}get priority(){return this.level}getPriority(){return this.level}enable(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this._storage.updateConfiguration({enabled:e}),this}setLevel(e){return this._storage.updateConfiguration({level:e}),this}get(e){return this._storage.config[e]}set(e,t){this._storage.updateConfiguration({[e]:t})}settings(){console.table?console.table(this._storage.config):console.log(this._storage.config)}assert(e,t){u(e,t)}warn(e){return this._getLogFunction(0,e,g.warn,arguments,y)}error(e){return this._getLogFunction(0,e,g.error,arguments)}deprecated(e,t){return this.warn("`".concat(e,"` is deprecated and will be removed in a later version. Use `").concat(t,"` instead"))}removed(e,t){return this.error("`".concat(e,"` has been removed. Use `").concat(t,"` instead"))}probe(e,t){return this._getLogFunction(e,t,g.log,arguments,{time:!0,once:!0})}log(e,t){return this._getLogFunction(e,t,g.debug,arguments)}info(e,t){return this._getLogFunction(e,t,console.info,arguments)}once(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),i=2;i{const t=s(e,n,r);console.log(...t)},e.src=t,v}const i=t.nodeName||"";if("img"===i.toLowerCase())return console.log(...s(t,n,r)),v;if("canvas"===i.toLowerCase()){const e=new Image;return e.onload=()=>console.log(...s(e,n,r)),e.src=t.toDataURL(),v}return v}({image:o,message:a,scale:l}):function(e){let{image:t,message:r="",scale:i=1}=e,o=null;try{o=n(80758)}catch(a){}if(o)return()=>o(t,{fit:"box",width:"".concat(Math.round(80*i),"%")}).then((e=>console.log(e)));return v}({image:o,message:a,scale:l}):v}time(e,t){return this._getLogFunction(e,t,console.time?console.time:console.info)}timeEnd(e,t){return this._getLogFunction(e,t,console.timeEnd?console.timeEnd:console.info)}timeStamp(e,t){return this._getLogFunction(e,t,console.timeStamp||v)}group(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{collapsed:!1};const r=w({logLevel:e,message:t,opts:n}),{collapsed:i}=n;return r.method=(i?console.groupCollapsed:console.group)||console.info,this._getLogFunction(r)}groupCollapsed(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.group(e,t,Object.assign({},n,{collapsed:!0}))}groupEnd(e){return this._getLogFunction(e,"",console.groupEnd||v)}withGroup(e,t,n){this.group(e,t)();try{n()}finally{this.groupEnd(e)()}}trace(){console.trace&&console.trace()}_shouldLog(e){return this.isEnabled()&&this.getLevel()>=_(e)}_getLogFunction(e,t,n,r,o){if(this._shouldLog(e)){o=w({logLevel:e,message:t,args:r,opts:o}),u(n=n||o.method),o.total=this.getTotal(),o.delta=this.getDelta(),this._deltaTs=p();const a=o.tag||o.message;if(o.once){if(A[a])return v;A[a]=p()}return t=function(e,t,n){if("string"===typeof t){const s=n.time?function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:8;const n=Math.max(t-e.length,0);return"".concat(" ".repeat(n)).concat(e)}(function(e){let t;return t=e<10?"".concat(e.toFixed(2),"ms"):e<100?"".concat(e.toFixed(1),"ms"):e<1e3?"".concat(e.toFixed(0),"ms"):"".concat((e/1e3).toFixed(2),"s"),t}(n.total)):"";t=n.time?"".concat(e,": ").concat(s," ").concat(t):"".concat(e,": ").concat(t),r=t,o=n.color,a=n.background,i.Z||"string"!==typeof r||(o&&(o=c(o),r="\x1b[".concat(o,"m").concat(r,"\x1b[39m")),a&&(o=c(a),r="\x1b[".concat(a+10,"m").concat(r,"\x1b[49m"))),t=r}var r,o,a;return t}(this.id,o.message,o),n.bind(console,t,...o.args)}return v}}function _(e){if(!e)return 0;let t;switch(typeof e){case"number":t=e;break;case"object":t=e.logLevel||e.priority||0;break;default:return 0}return u(Number.isFinite(t)&&t>=0),t}function w(e){const{logLevel:t,message:n}=e;e.logLevel=_(t);const r=e.args?Array.from(e.args):[];for(;r.length&&r.shift()!==n;);switch(typeof t){case"string":case"function":void 0!==n&&r.unshift(n),e.message=t;break;case"object":Object.assign(e,t)}"function"===typeof e.message&&(e.message=e.message());const i=typeof e.message;return u("string"===i||"object"===i),Object.assign(e,{args:r},e.opts)}function x(e){for(const t in e)for(const n in e[t])return n||"untitled";return"empty"}(0,r.Z)(b,"VERSION",o)},89069:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(68185);function i(){let e;if("undefined"!==typeof window&&window.performance)e=window.performance.now();else if("undefined"!==typeof process&&process.hrtime){const t=process.hrtime();e=1e3*t[0]+t[1]/1e6}else e=Date.now();return e}class o{constructor(e,t){(0,r.Z)(this,"name",void 0),(0,r.Z)(this,"type",void 0),(0,r.Z)(this,"sampleSize",1),(0,r.Z)(this,"time",void 0),(0,r.Z)(this,"count",void 0),(0,r.Z)(this,"samples",void 0),(0,r.Z)(this,"lastTiming",void 0),(0,r.Z)(this,"lastSampleTime",void 0),(0,r.Z)(this,"lastSampleCount",void 0),(0,r.Z)(this,"_count",0),(0,r.Z)(this,"_time",0),(0,r.Z)(this,"_samples",0),(0,r.Z)(this,"_startTime",0),(0,r.Z)(this,"_timerPending",!1),this.name=e,this.type=t,this.reset()}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=i(),this._timerPending=!0,this}timeEnd(){return this._timerPending?(this.addTime(i()-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}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){(0,r.Z)(this,"id",void 0),(0,r.Z)(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]}}},34282:(e,t,n)=>{"use strict";n.d(t,{Z:()=>y});var r=n(13747),i=n(57435),o=n(33882),a=n(20749),s=(n(98162),n(43903));const l=i.createContext(null);var c=n(22368),u=n(12750),d=[];var f=n(86263),h=n(53047);var p="rc-util-locker-".concat(Date.now()),g=0;function m(e){var t=!!e,n=i.useState((function(){return g+=1,"".concat(p,"_").concat(g)})),o=(0,r.Z)(n,1)[0];(0,u.Z)((function(){if(t){var e=(0,h.o)(document.body).width,n=document.body.scrollHeight>(window.innerHeight||document.documentElement.clientHeight)&&window.innerWidth>document.body.offsetWidth;(0,f.hq)("\nhtml body {\n overflow-y: hidden;\n ".concat(n?"width: calc(100% - ".concat(e,"px);"):"","\n}"),o)}else(0,f.jL)(o);return function(){(0,f.jL)(o)}}),[t,o])}var v=!1;var A=function(e){return!1!==e&&((0,a.Z)()&&e?"string"===typeof e?document.querySelector(e):"function"===typeof e?e():e:null)};const y=i.forwardRef((function(e,t){var n=e.open,f=e.autoLock,h=e.getContainer,p=(e.debug,e.autoDestroy),g=void 0===p||p,y=e.children,b=i.useState(n),_=(0,r.Z)(b,2),w=_[0],x=_[1],E=w||n;i.useEffect((function(){(g||n)&&x(n)}),[n,g]);var S=i.useState((function(){return A(h)})),C=(0,r.Z)(S,2),P=C[0],T=C[1];i.useEffect((function(){var e=A(h);T(null!==e&&void 0!==e?e:null)}));var k=function(e,t){var n=i.useState((function(){return(0,a.Z)()?document.createElement("div"):null})),o=(0,r.Z)(n,1)[0],s=i.useRef(!1),f=i.useContext(l),h=i.useState(d),p=(0,r.Z)(h,2),g=p[0],m=p[1],v=f||(s.current?void 0:function(e){m((function(t){return[e].concat((0,c.Z)(t))}))});function A(){o.parentElement||document.body.appendChild(o),s.current=!0}function y(){var e;null===(e=o.parentElement)||void 0===e||e.removeChild(o),s.current=!1}return(0,u.Z)((function(){return e?f?f(A):A():y(),y}),[e]),(0,u.Z)((function(){g.length&&(g.forEach((function(e){return e()})),m(d))}),[g]),[o,v]}(E&&!P),M=(0,r.Z)(k,2),O=M[0],R=M[1],I=null!==P&&void 0!==P?P:O;m(f&&n&&(0,a.Z)()&&(I===O||I===document.body));var L=null;y&&(0,s.Yr)(y)&&t&&(L=y.ref);var N=(0,s.x1)(L,t);if(!E||!(0,a.Z)()||void 0===P)return null;var D,F=!1===I||("boolean"===typeof D&&(v=D),v),j=y;return t&&(j=i.cloneElement(y,{ref:N})),i.createElement(l.Provider,{value:R},F?j:(0,o.createPortal)(j,I))}))},91084:(e,t,n)=>{"use strict";n.d(t,{Z:()=>U});var r=n(35194),i=n(13747),o=n(99309),a=n(34282),s=n(12356),l=n.n(s),c=n(61236),u=n(48541),d=n(13834),f=n(73165),h=n(71589),p=n(12750),g=n(90479),m=n(57435),v=n(91010),A=n(9817),y=n(43903);function b(e){var t=e.prefixCls,n=e.align,r=e.arrow,i=e.arrowPos,o=r||{},a=o.className,s=o.content,c=i.x,u=void 0===c?0:c,d=i.y,f=void 0===d?0:d,h=m.useRef();if(!n||!n.points)return null;var p={position:"absolute"};if(!1!==n.autoArrow){var g=n.points[0],v=n.points[1],A=g[0],y=g[1],b=v[0],_=v[1];A!==b&&["t","b"].includes(A)?"t"===A?p.top=0:p.bottom=0:p.top=f,y!==_&&["l","r"].includes(y)?"l"===y?p.left=0:p.right=0:p.left=u}return m.createElement("div",{ref:h,className:l()("".concat(t,"-arrow"),a),style:p},s)}function _(e){var t=e.prefixCls,n=e.open,r=e.zIndex,i=e.mask,o=e.motion;return i?m.createElement(A.ZP,(0,v.Z)({},o,{motionAppear:!0,visible:n,removeOnLeave:!0}),(function(e){var n=e.className;return m.createElement("div",{style:{zIndex:r},className:l()("".concat(t,"-mask"),n)})})):null}const w=m.memo((function(e){return e.children}),(function(e,t){return t.cache}));const x=m.forwardRef((function(e,t){var n=e.popup,o=e.className,a=e.prefixCls,s=e.style,u=e.target,d=e.onVisibleChanged,f=e.open,h=e.keepDom,g=e.fresh,x=e.onClick,E=e.mask,S=e.arrow,C=e.arrowPos,P=e.align,T=e.motion,k=e.maskMotion,M=e.forceRender,O=e.getPopupContainer,R=e.autoDestroy,I=e.portal,L=e.zIndex,N=e.onMouseEnter,D=e.onMouseLeave,F=e.onPointerEnter,j=e.ready,B=e.offsetX,Z=e.offsetY,z=e.offsetR,U=e.offsetB,H=e.onAlign,V=e.onPrepare,W=e.stretch,G=e.targetWidth,K=e.targetHeight,q="function"===typeof n?n():n,Y=f||h,X=(null===O||void 0===O?void 0:O.length)>0,$=m.useState(!O||!X),Q=(0,i.Z)($,2),J=Q[0],ee=Q[1];if((0,p.Z)((function(){!J&&X&&u&&ee(!0)}),[J,X,u]),!J)return null;var te="auto",ne={left:"-1000vw",top:"-1000vh",right:te,bottom:te};if(j||!f){var re,ie=P.points,oe=P.dynamicInset||(null===(re=P._experimental)||void 0===re?void 0:re.dynamicInset),ae=oe&&"r"===ie[0][1],se=oe&&"b"===ie[0][0];ae?(ne.right=z,ne.left=te):(ne.left=B,ne.right=te),se?(ne.bottom=U,ne.top=te):(ne.top=Z,ne.bottom=te)}var le={};return W&&(W.includes("height")&&K?le.height=K:W.includes("minHeight")&&K&&(le.minHeight=K),W.includes("width")&&G?le.width=G:W.includes("minWidth")&&G&&(le.minWidth=G)),f||(le.pointerEvents="none"),m.createElement(I,{open:M||Y,getContainer:O&&function(){return O(u)},autoDestroy:R},m.createElement(_,{prefixCls:a,open:f,zIndex:L,mask:E,motion:k}),m.createElement(c.Z,{onResize:H,disabled:!f},(function(e){return m.createElement(A.ZP,(0,v.Z)({motionAppear:!0,motionEnter:!0,motionLeave:!0,removeOnLeave:!1,forceRender:M,leavedClassName:"".concat(a,"-hidden")},T,{onAppearPrepare:V,onEnterPrepare:V,visible:f,onVisibleChanged:function(e){var t;null===T||void 0===T||null===(t=T.onVisibleChanged)||void 0===t||t.call(T,e),d(e)}}),(function(n,i){var c=n.className,u=n.style,d=l()(a,c,o);return m.createElement("div",{ref:(0,y.sQ)(e,t,i),className:d,style:(0,r.Z)((0,r.Z)((0,r.Z)((0,r.Z)({"--arrow-x":"".concat(C.x||0,"px"),"--arrow-y":"".concat(C.y||0,"px")},ne),le),u),{},{boxSizing:"border-box",zIndex:L},s),onMouseEnter:N,onMouseLeave:D,onPointerEnter:F,onClick:x},S&&m.createElement(b,{prefixCls:a,arrow:S,arrowPos:C,align:P}),m.createElement(w,{cache:!f&&!g},q))}))})))}));const E=m.forwardRef((function(e,t){var n=e.children,r=e.getTriggerDOMNode,i=(0,y.Yr)(n),o=m.useCallback((function(e){(0,y.mH)(t,r?r(e):e)}),[r]),a=(0,y.x1)(o,n.ref);return i?m.cloneElement(n,{ref:a}):n}));const S=m.createContext(null);function C(e){return e?Array.isArray(e)?e:[e]:[]}var P=n(26842);function T(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return(arguments.length>2?arguments[2]:void 0)?e[0]===t[0]:e[0]===t[0]&&e[1]===t[1]}function k(e,t,n,r){return t||(n?{motionName:"".concat(e,"-").concat(n)}:r?{motionName:r}:null)}function M(e){return e.ownerDocument.defaultView}function O(e){for(var t=[],n=null===e||void 0===e?void 0:e.parentElement,r=["hidden","scroll","clip","auto"];n;){var i=M(n).getComputedStyle(n);[i.overflowX,i.overflowY,i.overflow].some((function(e){return r.includes(e)}))&&t.push(n),n=n.parentElement}return t}function R(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return Number.isNaN(e)?t:e}function I(e){return R(parseFloat(e),0)}function L(e,t){var n=(0,r.Z)({},e);return(t||[]).forEach((function(e){if(!(e instanceof HTMLBodyElement||e instanceof HTMLHtmlElement)){var t=M(e).getComputedStyle(e),r=t.overflow,i=t.overflowClipMargin,o=t.borderTopWidth,a=t.borderBottomWidth,s=t.borderLeftWidth,l=t.borderRightWidth,c=e.getBoundingClientRect(),u=e.offsetHeight,d=e.clientHeight,f=e.offsetWidth,h=e.clientWidth,p=I(o),g=I(a),m=I(s),v=I(l),A=R(Math.round(c.width/f*1e3)/1e3),y=R(Math.round(c.height/u*1e3)/1e3),b=(f-h-m-v)*A,_=(u-d-p-g)*y,w=p*y,x=g*y,E=m*A,S=v*A,C=0,P=0;if("clip"===r){var T=I(i);C=T*A,P=T*y}var k=c.x+E-C,O=c.y+w-P,L=k+c.width+2*C-E-S-b,N=O+c.height+2*P-w-x-_;n.left=Math.max(n.left,k),n.top=Math.max(n.top,O),n.right=Math.min(n.right,L),n.bottom=Math.min(n.bottom,N)}})),n}function N(e){var t="".concat(arguments.length>1&&void 0!==arguments[1]?arguments[1]:0),n=t.match(/^(.*)\%$/);return n?e*(parseFloat(n[1])/100):parseFloat(t)}function D(e,t){var n=t||[],r=(0,i.Z)(n,2),o=r[0],a=r[1];return[N(e.width,o),N(e.height,a)]}function F(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return[e[0],e[1]]}function j(e,t){var n,r=t[0],i=t[1];return n="t"===r?e.y:"b"===r?e.y+e.height:e.y+e.height/2,{x:"l"===i?e.x:"r"===i?e.x+e.width:e.x+e.width/2,y:n}}function B(e,t){var n={t:"b",b:"t",l:"r",r:"l"};return e.map((function(e,r){return r===t?n[e]||"c":e})).join("")}var Z=n(22368);n(98162);var z=["prefixCls","children","action","showAction","hideAction","popupVisible","defaultPopupVisible","onPopupVisibleChange","afterPopupVisibleChange","mouseEnterDelay","mouseLeaveDelay","focusDelay","blurDelay","mask","maskClosable","getPopupContainer","forceRender","autoDestroy","destroyPopupOnHide","popup","popupClassName","popupStyle","popupPlacement","builtinPlacements","popupAlign","zIndex","stretch","getPopupClassNameFromAlign","fresh","alignPoint","onPopupClick","onPopupAlign","arrow","popupMotion","maskMotion","popupTransitionName","popupAnimation","maskTransitionName","maskAnimation","className","getTriggerDOMNode"];const U=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:a.Z;return m.forwardRef((function(t,n){var a=t.prefixCls,s=void 0===a?"rc-trigger-popup":a,v=t.children,A=t.action,y=void 0===A?"hover":A,b=t.showAction,_=t.hideAction,w=t.popupVisible,I=t.defaultPopupVisible,N=t.onPopupVisibleChange,U=t.afterPopupVisibleChange,H=t.mouseEnterDelay,V=t.mouseLeaveDelay,W=void 0===V?.1:V,G=t.focusDelay,K=t.blurDelay,q=t.mask,Y=t.maskClosable,X=void 0===Y||Y,$=t.getPopupContainer,Q=t.forceRender,J=t.autoDestroy,ee=t.destroyPopupOnHide,te=t.popup,ne=t.popupClassName,re=t.popupStyle,ie=t.popupPlacement,oe=t.builtinPlacements,ae=void 0===oe?{}:oe,se=t.popupAlign,le=t.zIndex,ce=t.stretch,ue=t.getPopupClassNameFromAlign,de=t.fresh,fe=t.alignPoint,he=t.onPopupClick,pe=t.onPopupAlign,ge=t.arrow,me=t.popupMotion,ve=t.maskMotion,Ae=t.popupTransitionName,ye=t.popupAnimation,be=t.maskTransitionName,_e=t.maskAnimation,we=t.className,xe=t.getTriggerDOMNode,Ee=(0,o.Z)(t,z),Se=J||ee||!1,Ce=m.useState(!1),Pe=(0,i.Z)(Ce,2),Te=Pe[0],ke=Pe[1];(0,p.Z)((function(){ke((0,g.Z)())}),[]);var Me=m.useRef({}),Oe=m.useContext(S),Re=m.useMemo((function(){return{registerSubPopup:function(e,t){Me.current[e]=t,null===Oe||void 0===Oe||Oe.registerSubPopup(e,t)}}}),[Oe]),Ie=(0,h.Z)(),Le=m.useState(null),Ne=(0,i.Z)(Le,2),De=Ne[0],Fe=Ne[1],je=(0,f.Z)((function(e){(0,u.S)(e)&&De!==e&&Fe(e),null===Oe||void 0===Oe||Oe.registerSubPopup(Ie,e)})),Be=m.useState(null),Ze=(0,i.Z)(Be,2),ze=Ze[0],Ue=Ze[1],He=m.useRef(null),Ve=(0,f.Z)((function(e){(0,u.S)(e)&&ze!==e&&(Ue(e),He.current=e)})),We=m.Children.only(v),Ge=(null===We||void 0===We?void 0:We.props)||{},Ke={},qe=(0,f.Z)((function(e){var t,n,r=ze;return(null===r||void 0===r?void 0:r.contains(e))||(null===(t=(0,d.A)(r))||void 0===t?void 0:t.host)===e||e===r||(null===De||void 0===De?void 0:De.contains(e))||(null===(n=(0,d.A)(De))||void 0===n?void 0:n.host)===e||e===De||Object.values(Me.current).some((function(t){return(null===t||void 0===t?void 0:t.contains(e))||e===t}))})),Ye=k(s,me,ye,Ae),Xe=k(s,ve,_e,be),$e=m.useState(I||!1),Qe=(0,i.Z)($e,2),Je=Qe[0],et=Qe[1],tt=null!==w&&void 0!==w?w:Je,nt=(0,f.Z)((function(e){void 0===w&&et(e)}));(0,p.Z)((function(){et(w||!1)}),[w]);var rt=m.useRef(tt);rt.current=tt;var it=m.useRef([]);it.current=[];var ot=(0,f.Z)((function(e){var t;nt(e),(null!==(t=it.current[it.current.length-1])&&void 0!==t?t:tt)!==e&&(it.current.push(e),null===N||void 0===N||N(e))})),at=m.useRef(),st=function(){clearTimeout(at.current)},lt=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;st(),0===t?ot(e):at.current=setTimeout((function(){ot(e)}),1e3*t)};m.useEffect((function(){return st}),[]);var ct=m.useState(!1),ut=(0,i.Z)(ct,2),dt=ut[0],ft=ut[1];(0,p.Z)((function(e){e&&!tt||ft(!0)}),[tt]);var ht=m.useState(null),pt=(0,i.Z)(ht,2),gt=pt[0],mt=pt[1],vt=m.useState([0,0]),At=(0,i.Z)(vt,2),yt=At[0],bt=At[1],_t=function(e){bt([e.clientX,e.clientY])},wt=function(e,t,n,o,a,s,l){var c=m.useState({ready:!1,offsetX:0,offsetY:0,offsetR:0,offsetB:0,arrowX:0,arrowY:0,scaleX:1,scaleY:1,align:a[o]||{}}),d=(0,i.Z)(c,2),h=d[0],g=d[1],v=m.useRef(0),A=m.useMemo((function(){return t?O(t):[]}),[t]),y=m.useRef({});e||(y.current={});var b=(0,f.Z)((function(){if(t&&n&&e){var c,d,f,h=t,p=h.ownerDocument,m=M(h).getComputedStyle(h),v=m.width,b=m.height,_=m.position,w=h.style.left,x=h.style.top,E=h.style.right,S=h.style.bottom,C=h.style.overflow,T=(0,r.Z)((0,r.Z)({},a[o]),s),k=p.createElement("div");if(null===(c=h.parentElement)||void 0===c||c.appendChild(k),k.style.left="".concat(h.offsetLeft,"px"),k.style.top="".concat(h.offsetTop,"px"),k.style.position=_,k.style.height="".concat(h.offsetHeight,"px"),k.style.width="".concat(h.offsetWidth,"px"),h.style.left="0",h.style.top="0",h.style.right="auto",h.style.bottom="auto",h.style.overflow="hidden",Array.isArray(n))f={x:n[0],y:n[1],width:0,height:0};else{var O=n.getBoundingClientRect();f={x:O.x,y:O.y,width:O.width,height:O.height}}var I=h.getBoundingClientRect(),N=p.documentElement,Z=N.clientWidth,z=N.clientHeight,U=N.scrollWidth,H=N.scrollHeight,V=N.scrollTop,W=N.scrollLeft,G=I.height,K=I.width,q=f.height,Y=f.width,X={left:0,top:0,right:Z,bottom:z},$={left:-W,top:-V,right:U-W,bottom:H-V},Q=T.htmlRegion,J="visible",ee="visibleFirst";"scroll"!==Q&&Q!==ee&&(Q=J);var te=Q===ee,ne=L($,A),re=L(X,A),ie=Q===J?re:ne,oe=te?re:ie;h.style.left="auto",h.style.top="auto",h.style.right="0",h.style.bottom="0";var ae=h.getBoundingClientRect();h.style.left=w,h.style.top=x,h.style.right=E,h.style.bottom=S,h.style.overflow=C,null===(d=h.parentElement)||void 0===d||d.removeChild(k);var se=R(Math.round(K/parseFloat(v)*1e3)/1e3),le=R(Math.round(G/parseFloat(b)*1e3)/1e3);if(0===se||0===le||(0,u.S)(n)&&!(0,P.Z)(n))return;var ce=T.offset,ue=T.targetOffset,de=D(I,ce),fe=(0,i.Z)(de,2),he=fe[0],pe=fe[1],ge=D(f,ue),me=(0,i.Z)(ge,2),ve=me[0],Ae=me[1];f.x-=ve,f.y-=Ae;var ye=T.points||[],be=(0,i.Z)(ye,2),_e=be[0],we=F(be[1]),xe=F(_e),Ee=j(f,we),Se=j(I,xe),Ce=(0,r.Z)({},T),Pe=Ee.x-Se.x+he,Te=Ee.y-Se.y+pe;function _t(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:ie,r=I.x+e,i=I.y+t,o=r+K,a=i+G,s=Math.max(r,n.left),l=Math.max(i,n.top),c=Math.min(o,n.right),u=Math.min(a,n.bottom);return Math.max(0,(c-s)*(u-l))}var ke,Me,Oe,Re,Ie=_t(Pe,Te),Le=_t(Pe,Te,re),Ne=j(f,["t","l"]),De=j(I,["t","l"]),Fe=j(f,["b","r"]),je=j(I,["b","r"]),Be=T.overflow||{},Ze=Be.adjustX,ze=Be.adjustY,Ue=Be.shiftX,He=Be.shiftY,Ve=function(e){return"boolean"===typeof e?e:e>=0};function wt(){ke=I.y+Te,Me=ke+G,Oe=I.x+Pe,Re=Oe+K}wt();var We=Ve(ze),Ge=xe[0]===we[0];if(We&&"t"===xe[0]&&(Me>oe.bottom||y.current.bt)){var Ke=Te;Ge?Ke-=G-q:Ke=Ne.y-je.y-pe;var qe=_t(Pe,Ke),Ye=_t(Pe,Ke,re);qe>Ie||qe===Ie&&(!te||Ye>=Le)?(y.current.bt=!0,Te=Ke,pe=-pe,Ce.points=[B(xe,0),B(we,0)]):y.current.bt=!1}if(We&&"b"===xe[0]&&(keIe||$e===Ie&&(!te||Qe>=Le)?(y.current.tb=!0,Te=Xe,pe=-pe,Ce.points=[B(xe,0),B(we,0)]):y.current.tb=!1}var Je=Ve(Ze),et=xe[1]===we[1];if(Je&&"l"===xe[1]&&(Re>oe.right||y.current.rl)){var tt=Pe;et?tt-=K-Y:tt=Ne.x-je.x-he;var nt=_t(tt,Te),rt=_t(tt,Te,re);nt>Ie||nt===Ie&&(!te||rt>=Le)?(y.current.rl=!0,Pe=tt,he=-he,Ce.points=[B(xe,1),B(we,1)]):y.current.rl=!1}if(Je&&"r"===xe[1]&&(OeIe||ot===Ie&&(!te||at>=Le)?(y.current.lr=!0,Pe=it,he=-he,Ce.points=[B(xe,1),B(we,1)]):y.current.lr=!1}wt();var st=!0===Ue?0:Ue;"number"===typeof st&&(Oere.right&&(Pe-=Re-re.right-he,f.x>re.right-st&&(Pe+=f.x-re.right+st)));var lt=!0===He?0:He;"number"===typeof lt&&(kere.bottom&&(Te-=Me-re.bottom-pe,f.y>re.bottom-lt&&(Te+=f.y-re.bottom+lt)));var ct=I.x+Pe,ut=ct+K,dt=I.y+Te,ft=dt+G,ht=f.x,pt=ht+Y,gt=f.y,mt=gt+q,vt=(Math.max(ct,ht)+Math.min(ut,pt))/2-ct,At=(Math.max(dt,gt)+Math.min(ft,mt))/2-dt;null===l||void 0===l||l(t,Ce);var yt=ae.right-I.x-(Pe+I.width),bt=ae.bottom-I.y-(Te+I.height);g({ready:!0,offsetX:Pe/se,offsetY:Te/le,offsetR:yt/se,offsetB:bt/le,arrowX:vt/se,arrowY:At/le,scaleX:se,scaleY:le,align:Ce})}})),_=function(){g((function(e){return(0,r.Z)((0,r.Z)({},e),{},{ready:!1})}))};return(0,p.Z)(_,[o]),(0,p.Z)((function(){e||_()}),[e]),[h.ready,h.offsetX,h.offsetY,h.offsetR,h.offsetB,h.arrowX,h.arrowY,h.scaleX,h.scaleY,h.align,function(){v.current+=1;var e=v.current;Promise.resolve().then((function(){v.current===e&&b()}))}]}(tt,De,fe?yt:ze,ie,ae,se,pe),xt=(0,i.Z)(wt,11),Et=xt[0],St=xt[1],Ct=xt[2],Pt=xt[3],Tt=xt[4],kt=xt[5],Mt=xt[6],Ot=xt[7],Rt=xt[8],It=xt[9],Lt=xt[10],Nt=function(e,t,n,r){return m.useMemo((function(){var i=C(null!==n&&void 0!==n?n:t),o=C(null!==r&&void 0!==r?r:t),a=new Set(i),s=new Set(o);return e&&(a.has("hover")&&(a.delete("hover"),a.add("click")),s.has("hover")&&(s.delete("hover"),s.add("click"))),[a,s]}),[e,t,n,r])}(Te,y,b,_),Dt=(0,i.Z)(Nt,2),Ft=Dt[0],jt=Dt[1],Bt=Ft.has("click"),Zt=jt.has("click")||jt.has("contextMenu"),zt=(0,f.Z)((function(){dt||Lt()}));!function(e,t,n,r,i){(0,p.Z)((function(){if(e&&t&&n){var o=n,a=O(t),s=O(o),l=M(o),c=new Set([l].concat((0,Z.Z)(a),(0,Z.Z)(s)));function u(){r(),i()}return c.forEach((function(e){e.addEventListener("scroll",u,{passive:!0})})),l.addEventListener("resize",u,{passive:!0}),r(),function(){c.forEach((function(e){e.removeEventListener("scroll",u),l.removeEventListener("resize",u)}))}}}),[e,t,n])}(tt,ze,De,zt,(function(){rt.current&&fe&&Zt&<(!1)})),(0,p.Z)((function(){zt()}),[yt,ie]),(0,p.Z)((function(){!tt||null!==ae&&void 0!==ae&&ae[ie]||zt()}),[JSON.stringify(se)]);var Ut=m.useMemo((function(){var e=function(e,t,n,r){for(var i=n.points,o=Object.keys(e),a=0;a1?a-1:0),l=1;l1?n-1:0),i=1;i1?n-1:0),i=1;i{"use strict";function r(){return r=Object.assign?Object.assign.bind():function(e){for(var t=1;tP,J0:()=>s,LX:()=>T,RQ:()=>N,WK:()=>Z,X3:()=>B,Zn:()=>M,aU:()=>i,cP:()=>f,cm:()=>I,fp:()=>g,pC:()=>L,q_:()=>a}),function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"}(i||(i={}));const o="popstate";function a(e){return void 0===e&&(e={}),h((function(e,t){let{pathname:n="/",search:r="",hash:i=""}=f(e.location.hash.substr(1));return n.startsWith("/")||n.startsWith(".")||(n="/"+n),u("",{pathname:n,search:r,hash:i},t.state&&t.state.usr||null,t.state&&t.state.key||"default")}),(function(e,t){let n=e.document.querySelector("base"),r="";if(n&&n.getAttribute("href")){let t=e.location.href,n=t.indexOf("#");r=-1===n?t:t.slice(0,n)}return r+"#"+("string"===typeof t?t:d(t))}),(function(e,t){l("/"===e.pathname.charAt(0),"relative pathnames are not supported in hash history.push("+JSON.stringify(t)+")")}),e)}function s(e,t){if(!1===e||null===e||"undefined"===typeof e)throw new Error(t)}function l(e,t){if(!e){"undefined"!==typeof console&&console.warn(t);try{throw new Error(t)}catch(n){}}}function c(e,t){return{usr:e.state,key:e.key,idx:t}}function u(e,t,n,i){return void 0===n&&(n=null),r({pathname:"string"===typeof e?e:e.pathname,search:"",hash:""},"string"===typeof t?f(t):t,{state:n,key:t&&t.key||i||Math.random().toString(36).substr(2,8)})}function d(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&"?"!==n&&(t+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(t+="#"===r.charAt(0)?r:"#"+r),t}function f(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function h(e,t,n,a){void 0===a&&(a={});let{window:l=document.defaultView,v5Compat:f=!1}=a,h=l.history,p=i.Pop,g=null,m=v();function v(){return(h.state||{idx:null}).idx}function A(){p=i.Pop;let e=v(),t=null==e?null:e-m;m=e,g&&g({action:p,location:b.location,delta:t})}function y(e){let t="null"!==l.location.origin?l.location.origin:l.location.href,n="string"===typeof e?e:d(e);return n=n.replace(/ $/,"%20"),s(t,"No window.location.(origin|href) available to create URL for href: "+n),new URL(n,t)}null==m&&(m=0,h.replaceState(r({},h.state,{idx:m}),""));let b={get action(){return p},get location(){return e(l,h)},listen(e){if(g)throw new Error("A history only accepts one active listener");return l.addEventListener(o,A),g=e,()=>{l.removeEventListener(o,A),g=null}},createHref:e=>t(l,e),createURL:y,encodeLocation(e){let t=y(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:function(e,t){p=i.Push;let r=u(b.location,e,t);n&&n(r,e),m=v()+1;let o=c(r,m),a=b.createHref(r);try{h.pushState(o,"",a)}catch(s){if(s instanceof DOMException&&"DataCloneError"===s.name)throw s;l.location.assign(a)}f&&g&&g({action:p,location:b.location,delta:1})},replace:function(e,t){p=i.Replace;let r=u(b.location,e,t);n&&n(r,e),m=v();let o=c(r,m),a=b.createHref(r);h.replaceState(o,"",a),f&&g&&g({action:p,location:b.location,delta:0})},go:e=>h.go(e)};return b}var p;!function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"}(p||(p={}));new Set(["lazy","caseSensitive","path","id","index","children"]);function g(e,t,n){void 0===n&&(n="/");let r=M(("string"===typeof t?f(t):t).pathname||"/",n);if(null==r)return null;let i=m(e);!function(e){e.sort(((e,t)=>e.score!==t.score?t.score-e.score:function(e,t){let n=e.length===t.length&&e.slice(0,-1).every(((e,n)=>e===t[n]));return n?e[e.length-1]-t[t.length-1]:0}(e.routesMeta.map((e=>e.childrenIndex)),t.routesMeta.map((e=>e.childrenIndex)))))}(i);let o=null;for(let a=0;null==o&&a{let a={relativePath:void 0===o?e.path||"":o,caseSensitive:!0===e.caseSensitive,childrenIndex:i,route:e};a.relativePath.startsWith("/")&&(s(a.relativePath.startsWith(r),'Absolute route path "'+a.relativePath+'" nested under path "'+r+'" is not valid. An absolute child route path must start with the combined path of all its parent routes.'),a.relativePath=a.relativePath.slice(r.length));let l=N([r,a.relativePath]),c=n.concat(a);e.children&&e.children.length>0&&(s(!0!==e.index,'Index routes must not have child routes. Please remove all child routes from route path "'+l+'".'),m(e.children,t,c,l)),(null!=e.path||e.index)&&t.push({path:l,score:S(l,e.index),routesMeta:c})};return e.forEach(((e,t)=>{var n;if(""!==e.path&&null!=(n=e.path)&&n.includes("?"))for(let r of v(e.path))i(e,t,r);else i(e,t)})),t}function v(e){let t=e.split("/");if(0===t.length)return[];let[n,...r]=t,i=n.endsWith("?"),o=n.replace(/\?$/,"");if(0===r.length)return i?[o,""]:[o];let a=v(r.join("/")),s=[];return s.push(...a.map((e=>""===e?o:[o,e].join("/")))),i&&s.push(...a),s.map((t=>e.startsWith("/")&&""===t?"/":t))}const A=/^:[\w-]+$/,y=3,b=2,_=1,w=10,x=-2,E=e=>"*"===e;function S(e,t){let n=e.split("/"),r=n.length;return n.some(E)&&(r+=x),t&&(r+=b),n.filter((e=>!E(e))).reduce(((e,t)=>e+(A.test(t)?y:""===t?_:w)),r)}function C(e,t){let{routesMeta:n}=e,r={},i="/",o=[];for(let a=0;anull==e?"":"string"===typeof e?e:String(e);return r+n.split(/\/+/).map(((e,n,r)=>{if(n===r.length-1&&"*"===e){return i(t["*"])}const o=e.match(/^:([\w-]+)(\??)$/);if(o){const[,e,n]=o;let r=t[e];return s("?"===n||null!=r,'Missing ":'+e+'" param'),i(r)}return e.replace(/\?$/g,"")})).filter((e=>!!e)).join("/")}function T(e,t){"string"===typeof e&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=function(e,t,n){void 0===t&&(t=!1);void 0===n&&(n=!0);l("*"===e||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were "'+e.replace(/\*$/,"/*")+'" because the `*` character must always follow a `/` in the pattern. To get rid of this warning, please change the route path to "'+e.replace(/\*$/,"/*")+'".');let r=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,((e,t,n)=>(r.push({paramName:t,isOptional:null!=n}),n?"/?([^\\/]+)?":"/([^\\/]+)")));e.endsWith("*")?(r.push({paramName:"*"}),i+="*"===e||"/*"===e?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":""!==e&&"/"!==e&&(i+="(?:(?=\\/|$))");let o=new RegExp(i,t?void 0:"i");return[o,r]}(e.path,e.caseSensitive,e.end),i=t.match(n);if(!i)return null;let o=i[0],a=o.replace(/(.)\/+$/,"$1"),s=i.slice(1);return{params:r.reduce(((e,t,n)=>{let{paramName:r,isOptional:i}=t;if("*"===r){let e=s[n]||"";a=o.slice(0,o.length-e.length).replace(/(.)\/+$/,"$1")}const l=s[n];return e[r]=i&&!l?void 0:(l||"").replace(/%2F/g,"/"),e}),{}),pathname:o,pathnameBase:a,pattern:e}}function k(e){try{return e.split("/").map((e=>decodeURIComponent(e).replace(/\//g,"%2F"))).join("/")}catch(t){return l(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent encoding ('+t+")."),e}}function M(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&"/"!==r?null:e.slice(n)||"/"}function O(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified `to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the `to."+n+'` field. Alternatively you may provide the full path as a string in and the router will parse it for you.'}function R(e){return e.filter(((e,t)=>0===t||e.route.path&&e.route.path.length>0))}function I(e,t){let n=R(e);return t?n.map(((t,n)=>n===e.length-1?t.pathname:t.pathnameBase)):n.map((e=>e.pathnameBase))}function L(e,t,n,i){let o;void 0===i&&(i=!1),"string"===typeof e?o=f(e):(o=r({},e),s(!o.pathname||!o.pathname.includes("?"),O("?","pathname","search",o)),s(!o.pathname||!o.pathname.includes("#"),O("#","pathname","hash",o)),s(!o.search||!o.search.includes("#"),O("#","search","hash",o)));let a,l=""===e||""===o.pathname,c=l?"/":o.pathname;if(null==c)a=n;else{let e=t.length-1;if(!i&&c.startsWith("..")){let t=c.split("/");for(;".."===t[0];)t.shift(),e-=1;o.pathname=t.join("/")}a=e>=0?t[e]:"/"}let u=function(e,t){void 0===t&&(t="/");let{pathname:n,search:r="",hash:i=""}="string"===typeof e?f(e):e,o=n?n.startsWith("/")?n:function(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach((e=>{".."===e?n.length>1&&n.pop():"."!==e&&n.push(e)})),n.length>1?n.join("/"):"/"}(n,t):t;return{pathname:o,search:F(r),hash:j(i)}}(o,a),d=c&&"/"!==c&&c.endsWith("/"),h=(l||"."===c)&&n.endsWith("/");return u.pathname.endsWith("/")||!d&&!h||(u.pathname+="/"),u}const N=e=>e.join("/").replace(/\/\/+/g,"/"),D=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),F=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",j=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"";class B extends Error{}function Z(e){return null!=e&&"number"===typeof e.status&&"string"===typeof e.statusText&&"boolean"===typeof e.internal&&"data"in e}const z=["post","put","patch","delete"],U=(new Set(z),["get",...z]);new Set(U),new Set([301,302,303,307,308]),new Set([307,308]);Symbol("deferred")},36694:(e,t,n)=>{"use strict";n.d(t,{e:()=>N});var r=n(1050);function i(){var e=(0,r.R)(),t=e.crypto||e.msCrypto;if(void 0!==t&&t.getRandomValues){var n=new Uint16Array(8);t.getRandomValues(n),n[3]=4095&n[3]|16384,n[4]=16383&n[4]|32768;var i=e=>{let t=e.toString(16);for(;t.length<4;)t="0".concat(t);return t};return i(n[0])+i(n[1])+i(n[2])+i(n[3])+i(n[4])+i(n[5])+i(n[6])+i(n[7])}return"xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx".replace(/[xy]/g,(e=>{var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)}))}var o=n(42898),a="undefined"===typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__,s=(0,r.R)(),l=["debug","info","warn","error","log","assert"];function c(e){var t=(0,r.R)();if(!("console"in t))return e();var n=t.console,i={};l.forEach((e=>{var r=n[e]&&n[e].__sentry_original__;e in t.console&&r&&(i[e]=n[e],n[e]=r)}));try{return e()}finally{Object.keys(i).forEach((e=>{n[e]=i[e]}))}}function u(){let e=!1;var t={enable:()=>{e=!0},disable:()=>{e=!1}};return a?l.forEach((n=>{t[n]=function(){for(var t=arguments.length,r=new Array(t),i=0;i{s.console[n]("".concat("Sentry Logger ","[").concat(n,"]:"),...r)}))}})):l.forEach((e=>{t[e]=()=>{}})),t}let d;d=a?(0,r.Y)("logger",u):u();var f,h=n(6920),p="undefined"===typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__,g=Object.prototype.toString;function m(e,t){return g.call(e)==="[object ".concat(t,"]")}function v(e){return m(e,"Object")}function A(e){return Boolean(e&&e.then&&"function"===typeof e.then)}!function(e){e[e.PENDING=0]="PENDING";e[e.RESOLVED=1]="RESOLVED";e[e.REJECTED=2]="REJECTED"}(f||(f={}));class y{__init(){this._state=f.PENDING}__init2(){this._handlers=[]}constructor(e){y.prototype.__init.call(this),y.prototype.__init2.call(this),y.prototype.__init3.call(this),y.prototype.__init4.call(this),y.prototype.__init5.call(this),y.prototype.__init6.call(this);try{e(this._resolve,this._reject)}catch(t){this._reject(t)}}then(e,t){return new y(((n,r)=>{this._handlers.push([!1,t=>{if(e)try{n(e(t))}catch(i){r(i)}else n(t)},e=>{if(t)try{n(t(e))}catch(i){r(i)}else r(e)}]),this._executeHandlers()}))}catch(e){return this.then((e=>e),e)}finally(e){return new y(((t,n)=>{let r,i;return this.then((t=>{i=!1,r=t,e&&e()}),(t=>{i=!0,r=t,e&&e()})).then((()=>{i?n(r):t(r)}))}))}__init3(){this._resolve=e=>{this._setResult(f.RESOLVED,e)}}__init4(){this._reject=e=>{this._setResult(f.REJECTED,e)}}__init5(){this._setResult=(e,t)=>{this._state===f.PENDING&&(A(t)?t.then(this._resolve,this._reject):(this._state=e,this._value=t,this._executeHandlers()))}}__init6(){this._executeHandlers=()=>{if(this._state!==f.PENDING){var e=this._handlers.slice();this._handlers=[],e.forEach((e=>{e[0]||(this._state===f.RESOLVED&&e[1](this._value),this._state===f.REJECTED&&e[2](this._value),e[0]=!0)}))}}}}function b(e){return _(e,function(){var e="function"===typeof WeakSet,t=e?new WeakSet:[];return[function(n){if(e)return!!t.has(n)||(t.add(n),!1);for(let e=0;e_(e,t))):e}function w(e){var t=(0,o.ph)(),n={sid:i(),init:!0,timestamp:t,started:t,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>function(e){return b({sid:"".concat(e.sid),init:e.init,started:new Date(1e3*e.started).toISOString(),timestamp:new Date(1e3*e.timestamp).toISOString(),status:e.status,errors:e.errors,did:"number"===typeof e.did||"string"===typeof e.did?"".concat(e.did):void 0,duration:e.duration,attrs:{release:e.release,environment:e.environment,ip_address:e.ipAddress,user_agent:e.userAgent}})}(n)};return e&&x(n,e),n}function x(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(t.user&&(!e.ipAddress&&t.user.ip_address&&(e.ipAddress=t.user.ip_address),e.did||t.did||(e.did=t.user.id||t.user.email||t.user.username)),e.timestamp=t.timestamp||(0,o.ph)(),t.ignoreDuration&&(e.ignoreDuration=t.ignoreDuration),t.sid&&(e.sid=32===t.sid.length?t.sid:i()),void 0!==t.init&&(e.init=t.init),!e.did&&t.did&&(e.did="".concat(t.did)),"number"===typeof t.started&&(e.started=t.started),e.ignoreDuration)e.duration=void 0;else if("number"===typeof t.duration)e.duration=t.duration;else{var n=e.timestamp-e.started;e.duration=n>=0?n:0}t.release&&(e.release=t.release),t.environment&&(e.environment=t.environment),!e.ipAddress&&t.ipAddress&&(e.ipAddress=t.ipAddress),!e.userAgent&&t.userAgent&&(e.userAgent=t.userAgent),"number"===typeof t.errors&&(e.errors=t.errors),t.status&&(e.status=t.status)}class E{constructor(){E.prototype.__init.call(this),E.prototype.__init2.call(this),E.prototype.__init3.call(this),E.prototype.__init4.call(this),E.prototype.__init5.call(this),E.prototype.__init6.call(this),E.prototype.__init7.call(this),E.prototype.__init8.call(this),E.prototype.__init9.call(this),E.prototype.__init10.call(this)}__init(){this._notifyingListeners=!1}__init2(){this._scopeListeners=[]}__init3(){this._eventProcessors=[]}__init4(){this._breadcrumbs=[]}__init5(){this._user={}}__init6(){this._tags={}}__init7(){this._extra={}}__init8(){this._contexts={}}__init9(){this._attachments=[]}__init10(){this._sdkProcessingMetadata={}}static clone(e){var t=new E;return e&&(t._breadcrumbs=[...e._breadcrumbs],t._tags={...e._tags},t._extra={...e._extra},t._contexts={...e._contexts},t._user=e._user,t._level=e._level,t._span=e._span,t._session=e._session,t._transactionName=e._transactionName,t._fingerprint=e._fingerprint,t._eventProcessors=[...e._eventProcessors],t._requestSession=e._requestSession,t._attachments=[...e._attachments]),t}addScopeListener(e){this._scopeListeners.push(e)}addEventProcessor(e){return this._eventProcessors.push(e),this}setUser(e){return this._user=e||{},this._session&&x(this._session,{user:e}),this._notifyScopeListeners(),this}getUser(){return this._user}getRequestSession(){return this._requestSession}setRequestSession(e){return this._requestSession=e,this}setTags(e){return this._tags={...this._tags,...e},this._notifyScopeListeners(),this}setTag(e,t){return this._tags={...this._tags,[e]:t},this._notifyScopeListeners(),this}setExtras(e){return this._extra={...this._extra,...e},this._notifyScopeListeners(),this}setExtra(e,t){return this._extra={...this._extra,[e]:t},this._notifyScopeListeners(),this}setFingerprint(e){return this._fingerprint=e,this._notifyScopeListeners(),this}setLevel(e){return this._level=e,this._notifyScopeListeners(),this}setTransactionName(e){return this._transactionName=e,this._notifyScopeListeners(),this}setContext(e,t){return null===t?delete this._contexts[e]:this._contexts={...this._contexts,[e]:t},this._notifyScopeListeners(),this}setSpan(e){return this._span=e,this._notifyScopeListeners(),this}getSpan(){return this._span}getTransaction(){var e=this.getSpan();return e&&e.transaction}setSession(e){return e?this._session=e:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(e){if(!e)return this;if("function"===typeof e){var t=e(this);return t instanceof E?t:this}return e instanceof E?(this._tags={...this._tags,...e._tags},this._extra={...this._extra,...e._extra},this._contexts={...this._contexts,...e._contexts},e._user&&Object.keys(e._user).length&&(this._user=e._user),e._level&&(this._level=e._level),e._fingerprint&&(this._fingerprint=e._fingerprint),e._requestSession&&(this._requestSession=e._requestSession)):v(e)&&(this._tags={...this._tags,...e.tags},this._extra={...this._extra,...e.extra},this._contexts={...this._contexts,...e.contexts},e.user&&(this._user=e.user),e.level&&(this._level=e.level),e.fingerprint&&(this._fingerprint=e.fingerprint),e.requestSession&&(this._requestSession=e.requestSession)),this}clear(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._requestSession=void 0,this._span=void 0,this._session=void 0,this._notifyScopeListeners(),this._attachments=[],this}addBreadcrumb(e,t){var n="number"===typeof t?Math.min(t,100):100;if(n<=0)return this;var r={timestamp:(0,o.yW)(),...e};return this._breadcrumbs=[...this._breadcrumbs,r].slice(-n),this._notifyScopeListeners(),this}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(e){return this._attachments.push(e),this}getAttachments(){return this._attachments}clearAttachments(){return this._attachments=[],this}applyToEvent(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this._extra&&Object.keys(this._extra).length&&(e.extra={...this._extra,...e.extra}),this._tags&&Object.keys(this._tags).length&&(e.tags={...this._tags,...e.tags}),this._user&&Object.keys(this._user).length&&(e.user={...this._user,...e.user}),this._contexts&&Object.keys(this._contexts).length&&(e.contexts={...this._contexts,...e.contexts}),this._level&&(e.level=this._level),this._transactionName&&(e.transaction=this._transactionName),this._span){e.contexts={trace:this._span.getTraceContext(),...e.contexts};var n=this._span.transaction&&this._span.transaction.name;n&&(e.tags={transaction:n,...e.tags})}return this._applyFingerprint(e),e.breadcrumbs=[...e.breadcrumbs||[],...this._breadcrumbs],e.breadcrumbs=e.breadcrumbs.length>0?e.breadcrumbs:void 0,e.sdkProcessingMetadata=this._sdkProcessingMetadata,this._notifyEventProcessors([...S(),...this._eventProcessors],e,t)}setSDKProcessingMetadata(e){return this._sdkProcessingMetadata={...this._sdkProcessingMetadata,...e},this}_notifyEventProcessors(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;return new y(((i,o)=>{var a=e[r];if(null===t||"function"!==typeof a)i(t);else{var s=a({...t},n);p&&a.id&&null===s&&d.log('Event processor "'.concat(a.id,'" dropped event')),A(s)?s.then((t=>this._notifyEventProcessors(e,t,n,r+1).then(i))).then(null,o):this._notifyEventProcessors(e,s,n,r+1).then(i).then(null,o)}}))}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach((e=>{e(this)})),this._notifyingListeners=!1)}_applyFingerprint(e){e.fingerprint=e.fingerprint?Array.isArray(e.fingerprint)?e.fingerprint:[e.fingerprint]:[],this._fingerprint&&(e.fingerprint=e.fingerprint.concat(this._fingerprint)),e.fingerprint&&!e.fingerprint.length&&delete e.fingerprint}}function S(){return(0,r.Y)("globalEventProcessors",(()=>[]))}var C=4,P=100;class T{__init(){this._stack=[{}]}constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new E,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:C;this._version=n,T.prototype.__init.call(this),this.getStackTop().scope=t,e&&this.bindClient(e)}isOlderThan(e){return this._version{i.captureException(e,{originalException:e,syntheticException:r,...t,event_id:n},o)})),n}captureMessage(e,t,n){var r=this._lastEventId=n&&n.event_id?n.event_id:i(),o=new Error(e);return this._withClient(((i,a)=>{i.captureMessage(e,t,{originalException:e,syntheticException:o,...n,event_id:r},a)})),r}captureEvent(e,t){var n=t&&t.event_id?t.event_id:i();return"transaction"!==e.type&&(this._lastEventId=n),this._withClient(((r,i)=>{r.captureEvent(e,{...t,event_id:n},i)})),n}lastEventId(){return this._lastEventId}addBreadcrumb(e,t){const{scope:n,client:r}=this.getStackTop();if(!n||!r)return;const{beforeBreadcrumb:i=null,maxBreadcrumbs:a=P}=r.getOptions&&r.getOptions()||{};if(!(a<=0)){var s={timestamp:(0,o.yW)(),...e},l=i?c((()=>i(s,t))):s;null!==l&&n.addBreadcrumb(l,a)}}setUser(e){var t=this.getScope();t&&t.setUser(e)}setTags(e){var t=this.getScope();t&&t.setTags(e)}setExtras(e){var t=this.getScope();t&&t.setExtras(e)}setTag(e,t){var n=this.getScope();n&&n.setTag(e,t)}setExtra(e,t){var n=this.getScope();n&&n.setExtra(e,t)}setContext(e,t){var n=this.getScope();n&&n.setContext(e,t)}configureScope(e){const{scope:t,client:n}=this.getStackTop();t&&n&&e(t)}run(e){var t=M(this);try{e(this)}finally{M(t)}}getIntegration(e){var t=this.getClient();if(!t)return null;try{return t.getIntegration(e)}catch(n){return p&&d.warn("Cannot retrieve integration ".concat(e.id," from the current Hub")),null}}startTransaction(e,t){return this._callExtensionMethod("startTransaction",e,t)}traceHeaders(){return this._callExtensionMethod("traceHeaders")}captureSession(){if(arguments.length>0&&void 0!==arguments[0]&&arguments[0])return this.endSession();this._sendSessionUpdate()}endSession(){var e=this.getStackTop(),t=e&&e.scope,n=t&&t.getSession();n&&function(e,t){let n={};t?n={status:t}:"ok"===e.status&&(n={status:"exited"}),x(e,n)}(n),this._sendSessionUpdate(),t&&t.setSession()}startSession(e){const{scope:t,client:n}=this.getStackTop(),{release:i,environment:o}=n&&n.getOptions()||{};var a=(0,r.R)();const{userAgent:s}=a.navigator||{};var l=w({release:i,environment:o,...t&&{user:t.getUser()},...s&&{userAgent:s},...e});if(t){var c=t.getSession&&t.getSession();c&&"ok"===c.status&&x(c,{status:"exited"}),this.endSession(),t.setSession(l)}return l}_sendSessionUpdate(){const{scope:e,client:t}=this.getStackTop();if(e){var n=e.getSession();n&&t&&t.captureSession&&t.captureSession(n)}}_withClient(e){const{scope:t,client:n}=this.getStackTop();n&&e(n,t)}_callExtensionMethod(e){var t=k().__SENTRY__;if(t&&t.extensions&&"function"===typeof t.extensions[e]){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;inew T),e)}function L(e,t){return!!e&&((e.__SENTRY__=e.__SENTRY__||{}).hub=t,!0)}function N(e){O().configureScope(e)}},1050:(e,t,n)=>{"use strict";n.d(t,{R:()=>o,Y:()=>a});var r=n(6920),i={};function o(){return(0,r.KV)()?n.g:"undefined"!==typeof window?window:"undefined"!==typeof self?self:i}function a(e,t,n){var r=n||o(),i=r.__SENTRY__=r.__SENTRY__||{};return i[e]||(i[e]=t())}},6920:(e,t,n)=>{"use strict";function r(){return!("undefined"!==typeof __SENTRY_BROWSER_BUNDLE__&&__SENTRY_BROWSER_BUNDLE__)&&"[object process]"===Object.prototype.toString.call("undefined"!==typeof process?process:0)}function i(e,t){return e.require(t)}n.d(t,{l$:()=>i,KV:()=>r}),e=n.hmd(e)},42898:(e,t,n)=>{"use strict";n.d(t,{ph:()=>c,yW:()=>l});var r=n(1050),i=n(6920);e=n.hmd(e);var o={nowSeconds:()=>Date.now()/1e3};var a=(0,i.KV)()?function(){try{return(0,i.l$)(e,"perf_hooks").performance}catch(t){return}}():function(){const{performance:e}=(0,r.R)();if(e&&e.now)return{now:()=>e.now(),timeOrigin:Date.now()-e.now()}}(),s=void 0===a?o:{nowSeconds:()=>(a.timeOrigin+a.now())/1e3},l=o.nowSeconds.bind(o),c=s.nowSeconds.bind(s);let u;(()=>{const{performance:e}=(0,r.R)();if(e&&e.now){var t=36e5,n=e.now(),i=Date.now(),o=e.timeOrigin?Math.abs(e.timeOrigin+n-i):t,a=o{e.exports=n(73919)},73715:(e,t,n)=>{"use strict";var r=n(60018),i=n(65732),o=n(50630),a=n(66639),s=n(55929),l=n(18825),c=n(82881),u=n(24941),d=n(14613),f=n(68629);e.exports=function(e){return new Promise((function(t,n){var h,p=e.data,g=e.headers,m=e.responseType;function v(){e.cancelToken&&e.cancelToken.unsubscribe(h),e.signal&&e.signal.removeEventListener("abort",h)}r.isFormData(p)&&delete g["Content-Type"];var A=new XMLHttpRequest;if(e.auth){var y=e.auth.username||"",b=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";g.Authorization="Basic "+btoa(y+":"+b)}var _=s(e.baseURL,e.url);function w(){if(A){var r="getAllResponseHeaders"in A?l(A.getAllResponseHeaders()):null,o={data:m&&"text"!==m&&"json"!==m?A.response:A.responseText,status:A.status,statusText:A.statusText,headers:r,config:e,request:A};i((function(e){t(e),v()}),(function(e){n(e),v()}),o),A=null}}if(A.open(e.method.toUpperCase(),a(_,e.params,e.paramsSerializer),!0),A.timeout=e.timeout,"onloadend"in A?A.onloadend=w:A.onreadystatechange=function(){A&&4===A.readyState&&(0!==A.status||A.responseURL&&0===A.responseURL.indexOf("file:"))&&setTimeout(w)},A.onabort=function(){A&&(n(u("Request aborted",e,"ECONNABORTED",A)),A=null)},A.onerror=function(){n(u("Network Error",e,null,A)),A=null},A.ontimeout=function(){var t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded",r=e.transitional||d.transitional;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),n(u(t,e,r.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",A)),A=null},r.isStandardBrowserEnv()){var x=(e.withCredentials||c(_))&&e.xsrfCookieName?o.read(e.xsrfCookieName):void 0;x&&(g[e.xsrfHeaderName]=x)}"setRequestHeader"in A&&r.forEach(g,(function(e,t){"undefined"===typeof p&&"content-type"===t.toLowerCase()?delete g[t]:A.setRequestHeader(t,e)})),r.isUndefined(e.withCredentials)||(A.withCredentials=!!e.withCredentials),m&&"json"!==m&&(A.responseType=e.responseType),"function"===typeof e.onDownloadProgress&&A.addEventListener("progress",e.onDownloadProgress),"function"===typeof e.onUploadProgress&&A.upload&&A.upload.addEventListener("progress",e.onUploadProgress),(e.cancelToken||e.signal)&&(h=function(e){A&&(n(!e||e&&e.type?new f("canceled"):e),A.abort(),A=null)},e.cancelToken&&e.cancelToken.subscribe(h),e.signal&&(e.signal.aborted?h():e.signal.addEventListener("abort",h))),p||(p=null),A.send(p)}))}},73919:(e,t,n)=>{"use strict";var r=n(60018),i=n(55278),o=n(78131),a=n(31380);var s=function e(t){var n=new o(t),s=i(o.prototype.request,n);return r.extend(s,o.prototype,n),r.extend(s,n),s.create=function(n){return e(a(t,n))},s}(n(14613));s.Axios=o,s.Cancel=n(68629),s.CancelToken=n(91211),s.isCancel=n(16318),s.VERSION=n(49540).version,s.all=function(e){return Promise.all(e)},s.spread=n(8608),s.isAxiosError=n(23712),e.exports=s,e.exports.default=s},68629:e=>{"use strict";function t(e){this.message=e}t.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},t.prototype.__CANCEL__=!0,e.exports=t},91211:(e,t,n)=>{"use strict";var r=n(68629);function i(e){if("function"!==typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var n=this;this.promise.then((function(e){if(n._listeners){var t,r=n._listeners.length;for(t=0;t{"use strict";e.exports=function(e){return!(!e||!e.__CANCEL__)}},78131:(e,t,n)=>{"use strict";var r=n(60018),i=n(66639),o=n(30106),a=n(19900),s=n(31380),l=n(90014),c=l.validators;function u(e){this.defaults=e,this.interceptors={request:new o,response:new o}}u.prototype.request=function(e){"string"===typeof e?(e=arguments[1]||{}).url=arguments[0]:e=e||{},(e=s(this.defaults,e)).method?e.method=e.method.toLowerCase():this.defaults.method?e.method=this.defaults.method.toLowerCase():e.method="get";var t=e.transitional;void 0!==t&&l.assertOptions(t,{silentJSONParsing:c.transitional(c.boolean),forcedJSONParsing:c.transitional(c.boolean),clarifyTimeoutError:c.transitional(c.boolean)},!1);var n=[],r=!0;this.interceptors.request.forEach((function(t){"function"===typeof t.runWhen&&!1===t.runWhen(e)||(r=r&&t.synchronous,n.unshift(t.fulfilled,t.rejected))}));var i,o=[];if(this.interceptors.response.forEach((function(e){o.push(e.fulfilled,e.rejected)})),!r){var u=[a,void 0];for(Array.prototype.unshift.apply(u,n),u=u.concat(o),i=Promise.resolve(e);u.length;)i=i.then(u.shift(),u.shift());return i}for(var d=e;n.length;){var f=n.shift(),h=n.shift();try{d=f(d)}catch(p){h(p);break}}try{i=a(d)}catch(p){return Promise.reject(p)}for(;o.length;)i=i.then(o.shift(),o.shift());return i},u.prototype.getUri=function(e){return e=s(this.defaults,e),i(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")},r.forEach(["delete","get","head","options"],(function(e){u.prototype[e]=function(t,n){return this.request(s(n||{},{method:e,url:t,data:(n||{}).data}))}})),r.forEach(["post","put","patch"],(function(e){u.prototype[e]=function(t,n,r){return this.request(s(r||{},{method:e,url:t,data:n}))}})),e.exports=u},30106:(e,t,n)=>{"use strict";var r=n(60018);function i(){this.handlers=[]}i.prototype.use=function(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1},i.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},i.prototype.forEach=function(e){r.forEach(this.handlers,(function(t){null!==t&&e(t)}))},e.exports=i},55929:(e,t,n)=>{"use strict";var r=n(85342),i=n(30356);e.exports=function(e,t){return e&&!r(t)?i(e,t):t}},24941:(e,t,n)=>{"use strict";var r=n(25483);e.exports=function(e,t,n,i,o){var a=new Error(e);return r(a,t,n,i,o)}},19900:(e,t,n)=>{"use strict";var r=n(60018),i=n(98519),o=n(16318),a=n(14613),s=n(68629);function l(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new s("canceled")}e.exports=function(e){return l(e),e.headers=e.headers||{},e.data=i.call(e,e.data,e.headers,e.transformRequest),e.headers=r.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),r.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]})),(e.adapter||a.adapter)(e).then((function(t){return l(e),t.data=i.call(e,t.data,t.headers,e.transformResponse),t}),(function(t){return o(t)||(l(e),t&&t.response&&(t.response.data=i.call(e,t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))}},25483:e=>{"use strict";e.exports=function(e,t,n,r,i){return e.config=t,n&&(e.code=n),e.request=r,e.response=i,e.isAxiosError=!0,e.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code,status:this.response&&this.response.status?this.response.status:null}},e}},31380:(e,t,n)=>{"use strict";var r=n(60018);e.exports=function(e,t){t=t||{};var n={};function i(e,t){return r.isPlainObject(e)&&r.isPlainObject(t)?r.merge(e,t):r.isPlainObject(t)?r.merge({},t):r.isArray(t)?t.slice():t}function o(n){return r.isUndefined(t[n])?r.isUndefined(e[n])?void 0:i(void 0,e[n]):i(e[n],t[n])}function a(e){if(!r.isUndefined(t[e]))return i(void 0,t[e])}function s(n){return r.isUndefined(t[n])?r.isUndefined(e[n])?void 0:i(void 0,e[n]):i(void 0,t[n])}function l(n){return n in t?i(e[n],t[n]):n in e?i(void 0,e[n]):void 0}var c={url:a,method:a,data:a,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:l};return r.forEach(Object.keys(e).concat(Object.keys(t)),(function(e){var t=c[e]||o,i=t(e);r.isUndefined(i)&&t!==l||(n[e]=i)})),n}},65732:(e,t,n)=>{"use strict";var r=n(24941);e.exports=function(e,t,n){var i=n.config.validateStatus;n.status&&i&&!i(n.status)?t(r("Request failed with status code "+n.status,n.config,null,n.request,n)):e(n)}},98519:(e,t,n)=>{"use strict";var r=n(60018),i=n(14613);e.exports=function(e,t,n){var o=this||i;return r.forEach(n,(function(n){e=n.call(o,e,t)})),e}},14613:(e,t,n)=>{"use strict";var r=n(60018),i=n(40019),o=n(25483),a={"Content-Type":"application/x-www-form-urlencoded"};function s(e,t){!r.isUndefined(e)&&r.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var l={transitional:{silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},adapter:function(){var e;return("undefined"!==typeof XMLHttpRequest||"undefined"!==typeof process&&"[object process]"===Object.prototype.toString.call(process))&&(e=n(73715)),e}(),transformRequest:[function(e,t){return i(t,"Accept"),i(t,"Content-Type"),r.isFormData(e)||r.isArrayBuffer(e)||r.isBuffer(e)||r.isStream(e)||r.isFile(e)||r.isBlob(e)?e:r.isArrayBufferView(e)?e.buffer:r.isURLSearchParams(e)?(s(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):r.isObject(e)||t&&"application/json"===t["Content-Type"]?(s(t,"application/json"),function(e,t,n){if(r.isString(e))try{return(t||JSON.parse)(e),r.trim(e)}catch(i){if("SyntaxError"!==i.name)throw i}return(n||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){var t=this.transitional||l.transitional,n=t&&t.silentJSONParsing,i=t&&t.forcedJSONParsing,a=!n&&"json"===this.responseType;if(a||i&&r.isString(e)&&e.length)try{return JSON.parse(e)}catch(s){if(a){if("SyntaxError"===s.name)throw o(s,this,"E_JSON_PARSE");throw s}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};r.forEach(["delete","get","head"],(function(e){l.headers[e]={}})),r.forEach(["post","put","patch"],(function(e){l.headers[e]=r.merge(a)})),e.exports=l},49540:e=>{e.exports={version:"0.24.0"}},55278:e=>{"use strict";e.exports=function(e,t){return function(){for(var n=new Array(arguments.length),r=0;r{"use strict";var r=n(60018);function i(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}e.exports=function(e,t,n){if(!t)return e;var o;if(n)o=n(t);else if(r.isURLSearchParams(t))o=t.toString();else{var a=[];r.forEach(t,(function(e,t){null!==e&&"undefined"!==typeof e&&(r.isArray(e)?t+="[]":e=[e],r.forEach(e,(function(e){r.isDate(e)?e=e.toISOString():r.isObject(e)&&(e=JSON.stringify(e)),a.push(i(t)+"="+i(e))})))})),o=a.join("&")}if(o){var s=e.indexOf("#");-1!==s&&(e=e.slice(0,s)),e+=(-1===e.indexOf("?")?"?":"&")+o}return e}},30356:e=>{"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},50630:(e,t,n)=>{"use strict";var r=n(60018);e.exports=r.isStandardBrowserEnv()?{write:function(e,t,n,i,o,a){var s=[];s.push(e+"="+encodeURIComponent(t)),r.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),r.isString(i)&&s.push("path="+i),r.isString(o)&&s.push("domain="+o),!0===a&&s.push("secure"),document.cookie=s.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},85342:e=>{"use strict";e.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}},23712:e=>{"use strict";e.exports=function(e){return"object"===typeof e&&!0===e.isAxiosError}},82881:(e,t,n)=>{"use strict";var r=n(60018);e.exports=r.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function i(e){var r=e;return t&&(n.setAttribute("href",r),r=n.href),n.setAttribute("href",r),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return e=i(window.location.href),function(t){var n=r.isString(t)?i(t):t;return n.protocol===e.protocol&&n.host===e.host}}():function(){return!0}},40019:(e,t,n)=>{"use strict";var r=n(60018);e.exports=function(e,t){r.forEach(e,(function(n,r){r!==t&&r.toUpperCase()===t.toUpperCase()&&(e[t]=n,delete e[r])}))}},18825:(e,t,n)=>{"use strict";var r=n(60018),i=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];e.exports=function(e){var t,n,o,a={};return e?(r.forEach(e.split("\n"),(function(e){if(o=e.indexOf(":"),t=r.trim(e.substr(0,o)).toLowerCase(),n=r.trim(e.substr(o+1)),t){if(a[t]&&i.indexOf(t)>=0)return;a[t]="set-cookie"===t?(a[t]?a[t]:[]).concat([n]):a[t]?a[t]+", "+n:n}})),a):a}},8608:e=>{"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},90014:(e,t,n)=>{"use strict";var r=n(49540).version,i={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){i[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));var o={};i.transitional=function(e,t,n){function i(e,t){return"[Axios v"+r+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return function(n,r,a){if(!1===e)throw new Error(i(r," has been removed"+(t?" in "+t:"")));return t&&!o[r]&&(o[r]=!0,console.warn(i(r," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,r,a)}},e.exports={assertOptions:function(e,t,n){if("object"!==typeof e)throw new TypeError("options must be an object");for(var r=Object.keys(e),i=r.length;i-- >0;){var o=r[i],a=t[o];if(a){var s=e[o],l=void 0===s||a(s,o,e);if(!0!==l)throw new TypeError("option "+o+" must be "+l)}else if(!0!==n)throw Error("Unknown option "+o)}},validators:i}},60018:(e,t,n)=>{"use strict";var r=n(55278),i=Object.prototype.toString;function o(e){return"[object Array]"===i.call(e)}function a(e){return"undefined"===typeof e}function s(e){return null!==e&&"object"===typeof e}function l(e){if("[object Object]"!==i.call(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function c(e){return"[object Function]"===i.call(e)}function u(e,t){if(null!==e&&"undefined"!==typeof e)if("object"!==typeof e&&(e=[e]),o(e))for(var n=0,r=e.length;n{"use strict";var r=n(78559),i=n(34151),o=i(r("String.prototype.indexOf"));e.exports=function(e,t){var n=r(e,!!t);return"function"===typeof n&&o(e,".prototype.")>-1?i(n):n}},34151:(e,t,n)=>{"use strict";var r=n(91989),i=n(78559),o=n(34770),a=i("%TypeError%"),s=i("%Function.prototype.apply%"),l=i("%Function.prototype.call%"),c=i("%Reflect.apply%",!0)||r.call(l,s),u=i("%Object.defineProperty%",!0),d=i("%Math.max%");if(u)try{u({},"a",{value:1})}catch(h){u=null}e.exports=function(e){if("function"!==typeof e)throw new a("a function is required");var t=c(r,l,arguments);return o(t,1+d(0,e.length-(arguments.length-1)),!0)};var f=function(){return c(r,s,arguments)};u?u(e.exports,"apply",{value:f}):e.exports.apply=f},33718:(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;ti})},11181:(e,t,n)=>{"use strict";function r(e,t,n){return{r:255*n(e.r/255,t.r/255),g:255*n(e.g/255,t.g/255),b:255*n(e.b/255,t.b/255)}}function i(e,t){return e*t}function o(e,t,n){return Math.min(Math.max(e||0,t),n)}function a(e){return{r:o(e.r,0,255),g:o(e.g,0,255),b:o(e.b,0,255),a:o(e.a,0,1)}}function s(e){return{r:255*e.r,g:255*e.g,b:255*e.b,a:e.a}}function l(e){return{r:e.r/255,g:e.g/255,b:e.b/255,a:e.a}}function c(e,t){void 0===t&&(t=0);var n=Math.pow(10,t);return{r:Math.round(e.r*n)/n,g:Math.round(e.g*n)/n,b:Math.round(e.b*n)/n,a:e.a}}function u(e,t,n,r,i,o){return(1-t/n)*r+t/n*Math.round((1-e)*i+e*o)}function d(e,t,n,r,i){void 0===i&&(i={unitInput:!1,unitOutput:!1,roundOutput:!0}),i.unitInput&&(e=s(e),t=s(t)),e=a(e);var o=(t=a(t)).a+e.a-t.a*e.a,d=n(e,t,r),f=a({r:u(e.a,t.a,o,e.r,t.r,d.r),g:u(e.a,t.a,o,e.g,t.g,d.g),b:u(e.a,t.a,o,e.b,t.b,d.b),a:o});return f=i.unitOutput?l(f):i.roundOutput?c(f):function(e){return c(e,9)}(f),f}function f(e,t){return d(e,t,r,i)}n.d(t,{Jp:()=>f})},92626:function(e,t){var n,r,i;r=[],n=function(){"use strict";var e=["|","^"],t=[",",";","\t","|","^"],n=["\r\n","\r","\n"];function r(e){var t=typeof e;return"function"===t||"object"===t&&!!e}var i=Array.isArray||function(e){return"[object Array]"===toString.call(e)};function o(e){return"string"===typeof e}function a(e){return!isNaN(Number(e))}function s(e){return 0==e||1==e}function l(e){return null==e}function c(e){return null!=e}function u(e,t){return c(e)?e:t}function d(e,t){for(var n=0,r=e.length;ni&&(i=o.length,r=n)})),r||n[0]}var v=function(){function e(e,r){if(r||(r={}),i(e))this.mode="encode";else{if(!o(e))throw new Error("Incompatible format!");this.mode="parse"}this.data=e,this.options={header:u(r.header,!1),cast:u(r.cast,!0)};var a=r.lineDelimiter||r.line,l=r.cellDelimiter||r.delimiter;this.isParser()?(this.options.lineDelimiter=a||m(this.data,n),this.options.cellDelimiter=l||m(this.data,t),this.data=s(this.data,this.options.lineDelimiter)):this.isEncoder()&&(this.options.lineDelimiter=a||"\r\n",this.options.cellDelimiter=l||",")}function a(e,t,n,r,i){e(new t(n,r,i))}function s(e,t){return e.slice(-t.length)!=t&&(e+=t),e}function c(e){return i(e)?"array":r(e)?"object":o(e)?"string":l(e)?"null":"primitive"}return e.prototype.set=function(e,t){return this.options[e]=t},e.prototype.isParser=function(){return"parse"==this.mode},e.prototype.isEncoder=function(){return"encode"==this.mode},e.prototype.parse=function(e){if("parse"==this.mode){if(0===this.data.trim().length)return[];var t,n,r,o=this.data,s=this.options,l=s.header,c={cell:"",line:[]},u=this.deserialize;e||(r=[],e=function(e){r.push(e)}),1==s.lineDelimiter.length&&(w=_);var d,f,h,p=o.length,m=s.cellDelimiter.charCodeAt(0),v=s.lineDelimiter.charCodeAt(s.lineDelimiter.length-1);for(A(),d=0,f=0;d1||""!==c.line[0])&&x(),b()));return r||this}function A(){t={escaped:!1,quote:!1,cell:!0}}function y(){c.cell=""}function b(){c.line=[]}function _(e){c.line.push(t.escaped?e.slice(1,-1).replace(/""/g,'"'):e),y(),A()}function w(e){_(e.slice(0,1-s.lineDelimiter.length))}function x(){l?i(l)?(n=g(u,s.cast,c.line,l),(x=function(){a(e,n,c.line,u,s.cast)})()):l=c.line:(n||(n=g(u,s.cast,c.line)),(x=function(){a(e,n,c.line,u,s.cast)})())}},e.prototype.deserialize={string:function(e){return String(e)},number:function(e){return Number(e)},boolean:function(e){return Boolean(e)}},e.prototype.serialize={object:function(e){var t=this,n=Object.keys(e),r=Array(n.length);return d(n,(function(n,i){r[i]=t[c(e[n])](e[n])})),r},array:function(e){var t=this,n=Array(e.length);return d(e,(function(e,r){n[r]=t[c(e)](e)})),n},string:function(e){return'"'+String(e).replace(/"/g,'""')+'"'},null:function(e){return""},primitive:function(e){return e}},e.prototype.encode=function(e){if("encode"==this.mode){if(0==this.data.length)return"";var t,n,r=this.data,a=this.options,s=a.header,l=r[0],u=this.serialize,f=0;e||(n=Array(r.length),e=function(e,t){n[t+f]=e}),s&&(i(s)||(s=t=Object.keys(l)),e(g(u.array(s)),0),f=1);var h,p=c(l);return"array"==p?(i(a.cast)?(h=Array(a.cast.length),d(a.cast,(function(e,t){o(e)?h[t]=e.toLowerCase():(h[t]=e,u[e]=e)}))):(h=Array(l.length),d(l,(function(e,t){h[t]=c(e)}))),d(r,(function(t,n){var r=Array(h.length);d(t,(function(e,t){r[t]=u[h[t]](e)})),e(g(r),n)}))):"object"==p&&(t=Object.keys(l),i(a.cast)?(h=Array(a.cast.length),d(a.cast,(function(e,t){o(e)?h[t]=e.toLowerCase():(h[t]=e,u[e]=e)}))):(h=Array(t.length),d(t,(function(e,t){h[t]=c(l[e])}))),d(r,(function(n,r){var i=Array(t.length);d(t,(function(e,t){i[t]=u[h[t]](n[e])})),e(g(i),r)}))),n?n.join(a.lineDelimiter):this}function g(e){return e.join(a.cellDelimiter)}},e.prototype.forEach=function(e){return this[this.mode](e)},e}();return v.parse=function(e,t){return new v(e,t).parse()},v.encode=function(e,t){return new v(e,t).encode()},v.forEach=function(e,t,n){return 2==arguments.length&&(n=t),new v(e,t).forEach(n)},v},void 0===(i="function"===typeof n?n.apply(t,r):n)||(e.exports=i)},70481:(e,t,n)=>{"use strict";var r=n(42967),i=n(30911),o=n(68909),a=n(68494).orient2d;function s(e,t,n){t=Math.max(0,void 0===t?2:t),n=n||0;var i=function(e){for(var t=e[0],n=e[0],r=e[0],i=e[0],a=0;ar[0]&&(r=s),s[1]i[1]&&(i=s)}var l=[t,n,r,i],c=l.slice();for(a=0;a=2&&h(t[t.length-2],t[t.length-1],e[n])<=0;)t.pop();t.push(e[n])}for(var r=[],i=e.length-1;i>=0;i--){for(;r.length>=2&&h(r[r.length-2],r[r.length-1],e[i])<=0;)r.pop();r.push(e[i])}return r.pop(),t.pop(),t.concat(r)}(c)}(e),a=new r(16);a.toBBox=function(e){return{minX:e[0],minY:e[1],maxX:e[0],maxY:e[1]}},a.compareMinX=function(e,t){return e[0]-t[0]},a.compareMinY=function(e,t){return e[1]-t[1]},a.load(e);for(var s,c=[],u=0;ua||l.push({node:p,dist:g})}for(;l.length&&!l.peek().node.children;){var m=l.pop(),A=m.node,y=v(A,t,n),b=v(A,r,o);if(m.dist=t.minX&&e[0]<=t.maxX&&e[1]>=t.minY&&e[1]<=t.maxY}function f(e,t,n){for(var r,i,o,a,s=Math.min(e[0],t[0]),l=Math.min(e[1],t[1]),c=Math.max(e[0],t[0]),u=Math.max(e[1],t[1]),d=n.search({minX:s,minY:l,maxX:c,maxY:u}),f=0;f0!==h(r,i,a)>0&&h(o,a,r)>0!==h(o,a,i)>0)return!1;return!0}function h(e,t,n){return a(e[0],e[1],t[0],t[1],n[0],n[1])}function p(e){var t=e.p,n=e.next.p;return e.minX=Math.min(t[0],n[0]),e.minY=Math.min(t[1],n[1]),e.maxX=Math.max(t[0],n[0]),e.maxY=Math.max(t[1],n[1]),e}function g(e,t){var n={p:e,prev:null,next:null,minX:0,minY:0,maxX:0,maxY:0};return t?(n.next=t.next,n.prev=t,t.next.prev=n,t.next=n):(n.prev=n,n.next=n),n}function m(e,t){var n=e[0]-t[0],r=e[1]-t[1];return n*n+r*r}function v(e,t,n){var r=t[0],i=t[1],o=n[0]-r,a=n[1]-i;if(0!==o||0!==a){var s=((e[0]-r)*o+(e[1]-i)*a)/(o*o+a*a);s>1?(r=n[0],i=n[1]):s>0&&(r+=o*s,i+=a*s)}return(o=e[0]-r)*o+(a=e[1]-i)*a}function A(e,t,n,r,i,o,a,s){var l,c,u,d,f=n-e,h=r-t,p=a-i,g=s-o,m=e-i,v=t-o,A=f*f+h*h,y=f*p+h*g,b=p*p+g*g,_=f*m+h*v,w=p*m+g*v,x=A*b-y*y,E=x,S=x;0===x?(c=0,E=1,d=w,S=b):(d=A*w-y*_,(c=y*w-b*_)<0?(c=0,d=w,S=b):c>E&&(c=E,d=w+y,S=b)),d<0?(d=0,-_<0?c=0:-_>A?c=E:(c=-_,E=A)):d>S&&(d=S,-_+y<0?c=0:-_+y>A?c=E:(c=-_+y,E=A));var C=(1-(u=0===d?0:d/S))*i+u*a-((1-(l=0===c?0:c/E))*e+l*n),P=(1-u)*o+u*s-((1-l)*t+l*r);return C*C+P*P}function y(e,t){return e[0]===t[0]?e[1]-t[1]:e[0]-t[0]}i.default&&(i=i.default),e.exports=s,e.exports.default=s},44831:(e,t,n)=>{"use strict";var r=n(13924),i={"text/plain":"Text","text/html":"Url",default:"Text"};e.exports=function(e,t){var n,o,a,s,l,c,u=!1;t||(t={}),n=t.debug||!1;try{if(a=r(),s=document.createRange(),l=document.getSelection(),(c=document.createElement("span")).textContent=e,c.ariaHidden="true",c.style.all="unset",c.style.position="fixed",c.style.top=0,c.style.clip="rect(0, 0, 0, 0)",c.style.whiteSpace="pre",c.style.webkitUserSelect="text",c.style.MozUserSelect="text",c.style.msUserSelect="text",c.style.userSelect="text",c.addEventListener("copy",(function(r){if(r.stopPropagation(),t.format)if(r.preventDefault(),"undefined"===typeof 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(c),s.selectNodeContents(c),l.addRange(s),!document.execCommand("copy"))throw new Error("copy command was unsuccessful");u=!0}catch(d){n&&console.error("unable to copy using execCommand: ",d),n&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(t.format||"text",e),t.onCopy&&t.onCopy(window.clipboardData),u=!0}catch(d){n&&console.error("unable to copy using clipboardData: ",d),n&&console.error("falling back to prompt"),o=function(e){var t=(/mac os x/i.test(navigator.userAgent)?"\u2318":"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()),c&&document.body.removeChild(c),a()}return u}},57649:function(e,t){!function(e){"use strict";var t,n=function(){return n=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0&&i[i.length-1])&&(6===o[0]||2===o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[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.")}function a(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(s){i={error:s}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}function s(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i Promise))`.","See if using `DarkReader.setFetchMethod(window.fetch)`","before `DarkReader.enable()` works."].join(" ")))]}))}))},S=E;function C(e){S=e||E}function P(e){return r(this,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,S(e)];case 1:return[2,t.sent()]}}))}))}window.chrome||(window.chrome={}),chrome.runtime||(chrome.runtime={});var T,k,M=new Set;function O(){for(var e=[],n=0;n=r){if(h-coe)return!0;for(var t=0,n=0;noe)return!0;return!1}function se(e){var t=new Set,n=new Set,r=new Set;e.forEach((function(e){j(e.addedNodes,(function(e){e instanceof Element&&e.isConnected&&t.add(e)})),j(e.removedNodes,(function(e){e instanceof Element&&(e.isConnected?(r.add(e),t.delete(e)):n.add(e))}))}));var i=[],o=[];return t.forEach((function(e){t.has(e.parentElement)&&i.push(e)})),n.forEach((function(e){n.has(e.parentElement)&&o.push(e)})),i.forEach((function(e){return t.delete(e)})),o.forEach((function(e){return n.delete(e)})),{additions:t,moves:r,deletions:n}}var le,ce=new Map,ue=new WeakMap;function de(e,t){var n,r,i;if(ce.has(e))n=ce.get(e),r=ue.get(n);else{var o=!1,a=!1;(n=new MutationObserver((function(t){if(ae(t))!o||Y()?r.forEach((function(t){return(0,t.onHugeMutations)(e)})):a||(Q(i=function(){return r.forEach((function(t){return(0,t.onHugeMutations)(e)}))}),a=!0),o=!0;else{var n=se(t);r.forEach((function(e){return(0,e.onMinorMutations)(n)}))}}))).observe(e,{childList:!0,subtree:!0}),ce.set(e,n),r=new Set,ue.set(n,r)}return r.add(t),{disconnect:function(){r.delete(t),i&&J(i),0===r.size&&(n.disconnect(),ue.delete(n),ce.delete(e))}}}var fe=new Map;function he(e){return le||(le=document.createElement("a")),le.href=e,le.href}function pe(e,t){void 0===t&&(t=null);var n="".concat(e).concat(t?";".concat(t):"");if(fe.has(n))return fe.get(n);if(t){var r=new URL(e,he(t));return fe.set(n,r),r}var i=new URL(he(e));return fe.set(e,i),i}function ge(e,t){if(t.match(/^data\\?\:/))return t;if(/^\/\//.test(t))return"".concat(location.protocol).concat(t);var n=pe(e);return pe(t,n.href).href}function me(e){if(e.startsWith("data:"))return!0;var t=pe(e);return t.protocol===location.protocol&&t.hostname===location.hostname&&t.port===location.port&&t.pathname===location.pathname}function ve(e,t,n){j(e,(function(e){if(e.selectorText)t(e);else if(e.href)try{ve(e.styleSheet.cssRules,t,n)}catch(a){z("Found a non-loaded link."),n&&n()}else if(e.media){var r=Array.from(e.media),i=r.some((function(e){return e.startsWith("screen")||e.startsWith("all")||e.startsWith("(")})),o=r.some((function(e){return e.startsWith("print")||e.startsWith("speech")}));!i&&o||ve(e.cssRules,t,n)}else e.conditionText?CSS.supports(e.conditionText)&&ve(e.cssRules,t,n):U("CSSRule type not supported",e)}))}var Ae=["background","border","border-color","border-bottom","border-left","border-right","border-top","outline","outline-color"],ye=p?Ae.map((function(e){return[e,new RegExp("".concat(e,":\\s*(.*?)\\s*;"))]})):null;function be(e,t){j(e,(function(n){var r=e.getPropertyValue(n).trim();r&&t(n,r)}));var n=e.cssText;n.includes("var(")&&(p?ye.forEach((function(e){var r=a(e,2),i=r[0],o=r[1],s=n.match(o);if(s&&s[1]){var l=s[1].trim();t(i,l)}})):Ae.forEach((function(n){var r=e.getPropertyValue(n);r&&r.includes("var(")&&t(n,r)})))}var _e=/url\((('.*?')|(".*?")|([^\)]*?))\)/g,we=/@import\s*(url\()?(('.+?')|(".+?")|([^\)]*?))\)? ?(screen)?;?/gi;function xe(e){return e.trim().replace(/[\n\r\\]+/g,"").replace(/^url\((.*)\)$/,"$1").trim().replace(/^"(.*)"$/,"$1").replace(/^'(.*)'$/,"$1").replace(/(?:\\(.))/g,"$1")}function Ee(e){var t=pe(e);return"".concat(t.origin).concat(t.pathname.replace(/\?.*$/,"").replace(/(\/)([^\/]+)$/i,"$1"))}function Se(e,t){return e.replace(_e,(function(e){var n=xe(e);try{return"url('".concat(ge(t,n),"')")}catch(r){return e}}))}var Ce=/\/\*[\s\S]*?\*\//g;function Pe(e){return e.replace(Ce,"")}var Te=/@font-face\s*{[^}]*}/g;function ke(e){return e.replace(Te,"")}function Me(e){for(var t,n=[],r=[],i=0,o=e.length;i=0){var i=n.match(/0+$/);if(i)return i.index===r+1?n.substring(0,r):n.substring(0,i.index)}return n}function Ve(e){var t=e.r,n=e.g,r=e.b,i=e.a;return null!=i&&i<1?"rgba(".concat(He(t),", ").concat(He(n),", ").concat(He(r),", ").concat(He(i,2),")"):"rgb(".concat(He(t),", ").concat(He(n),", ").concat(He(r),")")}function We(e){var t=e.r,n=e.g,r=e.b,i=e.a;return"#".concat((null!=i&&i<1?[t,n,r,Math.round(255*i)]:[t,n,r]).map((function(e){return"".concat(e<16?"0":"").concat(e.toString(16))})).join(""))}function Ge(e){var t=e.h,n=e.s,r=e.l,i=e.a;return null!=i&&i<1?"hsla(".concat(He(t),", ").concat(He(100*n),"%, ").concat(He(100*r),"%, ").concat(He(i,2),")"):"hsl(".concat(He(t),", ").concat(He(100*n),"%, ").concat(He(100*r),"%)")}var Ke=/^rgba?\([^\(\)]+\)$/,qe=/^hsla?\([^\(\)]+\)$/,Ye=/^#[0-9a-f]+$/i;function Xe(e){var t=e.trim().toLowerCase();return t.match(Ke)?tt(t):t.match(qe)?it(t):t.match(Ye)?ot(t):ct.has(t)?at(t):ut.has(t)?st(t):"transparent"===e?{r:0,g:0,b:0,a:0}:null}function $e(e){var t=[],n=0,r=!1,i=e.indexOf("(");e=e.substring(i+1,e.length-1);for(var o=0;o="0"&&a<="9"||"."===a||"+"===a||"-"===a?r=!0:!r||" "!==a&&","!==a?r||(n=o+1):(t.push(e.substring(n,o)),r=!1,n=o+1)}return r&&t.push(e.substring(n,e.length)),t}function Qe(e,t,n){var r=$e(e),i=Object.entries(n);return r.map((function(e){return e.trim()})).map((function(e,n){var r,o=i.find((function(t){var n=a(t,1)[0];return e.endsWith(n)}));return r=o?parseFloat(e.substring(0,e.length-o[0].length))/o[1]*t[n]:parseFloat(e),t[n]>1?Math.round(r):r}))}var Je=[255,255,255,1],et={"%":100};function tt(e){var t=a(Qe(e,Je,et),4),n=t[0],r=t[1],i=t[2],o=t[3];return{r:n,g:r,b:i,a:void 0===o?1:o}}var nt=[360,1,1,1],rt={"%":100,deg:360,rad:2*Math.PI,turn:1};function it(e){var t=a(Qe(e,nt,rt),4),n=t[0],r=t[1],i=t[2],o=t[3];return ze({h:n,s:r,l:i,a:void 0===o?1:o})}function ot(e){var t=e.substring(1);switch(t.length){case 3:case 4:var n=a([0,1,2].map((function(e){return parseInt("".concat(t[e]).concat(t[e]),16)})),3);return{r:n[0],g:n[1],b:n[2],a:3===t.length?1:parseInt("".concat(t[3]).concat(t[3]),16)/255};case 6:case 8:var r=a([0,2,4].map((function(e){return parseInt(t.substring(e,e+2),16)})),3);return{r:r[0],g:r[1],b:r[2],a:6===t.length?1:parseInt(t.substring(6,8),16)/255}}return null}function at(e){var t=ct.get(e);return{r:t>>16&255,g:t>>8&255,b:t>>0&255,a:1}}function st(e){var t=ut.get(e);return{r:t>>16&255,g:t>>8&255,b:t>>0&255,a:1}}function lt(e){for(var t=0,n=function(t,n,r){e=e.substring(0,t)+r+e.substring(n)};-1!==(t=e.indexOf("calc("));){var r=Ne(e,t);if(!r)break;var i=e.slice(r.start+1,r.end-1),o=i.includes("%");i=i.split("%").join("");var a=Math.round(Me(i));n(r.start-4,r.end,a+(o?"%":""))}return e}var ct=new Map(Object.entries({aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgrey:11119017,darkgreen:25600,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,grey:8421504,green:32768,greenyellow:11403055,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgrey:13882323,lightgreen:9498256,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074})),ut=new Map(Object.entries({ActiveBorder:3906044,ActiveCaption:0,AppWorkspace:11184810,Background:6513614,ButtonFace:16777215,ButtonHighlight:15329769,ButtonShadow:10461343,ButtonText:0,CaptionText:0,GrayText:8355711,Highlight:11720703,HighlightText:0,InactiveBorder:16777215,InactiveCaption:16777215,InactiveCaptionText:0,InfoBackground:16514245,InfoText:0,Menu:16185078,MenuText:16777215,Scrollbar:11184810,ThreeDDarkShadow:0,ThreeDFace:12632256,ThreeDHighlight:16777215,ThreeDLightShadow:16777215,ThreeDShadow:0,Window:15527148,WindowFrame:11184810,WindowText:0,"-webkit-focus-ring-color":15046400}).map((function(e){var t=a(e,2),n=t[0],r=t[1];return[n.toLowerCase(),r]})));function dt(e,t,n){return(.2126*e+.7152*t+.0722*n)/255}function ft(e,t,n,r,i){return(e-t)*(i-r)/(n-t)+r}function ht(e,t,n){return Math.min(n,Math.max(t,e))}function pt(e,t){for(var n=[],r=0,i=e.length;r.8&&r>200&&r<280)&&(s?(l=t.h,c=t.s):(l=n.h,c=n.s)),{h:l,s:c,l:ft(o,0,1,t.l,n.l),a:a}}var Mt=.4;function Ot(e,t){var n=e.h,r=e.s,i=e.l,o=e.a,a=r<.12||i>.8&&n>200&&n<280;if(i<.5){var s=ft(i,0,.5,0,Mt);return a?{h:t.h,s:t.s,l:s,a:o}:{h:n,s:r,l:s,a:o}}var l=ft(i,.5,1,Mt,t.l);if(a)return{h:t.h,s:t.s,l:l,a:o};var c=n;return n>60&&n<180&&(c=n>120?ft(n,120,180,135,180):ft(n,60,120,60,105)),c>40&&c<80&&(l*=.75),{h:c,s:r,l:l,a:o}}function Rt(e,t){if(0===t.mode)return Tt(e,t);var r=At(t);return St(e,n(n({},t),{mode:0}),Ot,r)}var It,Lt=.55;function Nt(e){return ft(e,205,245,205,220)}function Dt(e,t){var n=e.h,r=e.s,i=e.l,o=e.a,a=i<.2||r<.24,s=!a&&n>205&&n<245;if(i>.5){var l=ft(i,.5,1,Lt,t.l);if(a)return{h:t.h,s:t.s,l:l,a:o};var c=n;return s&&(c=Nt(n)),{h:c,s:r,l:l,a:o}}if(a)return{h:t.h,s:t.s,l:ft(i,0,.5,t.l,Lt),a:o};var u,d=n;return s?(d=Nt(n),u=ft(i,0,.5,t.l,Math.min(1,Lt+.05))):u=ft(i,0,.5,t.l,Lt),{h:d,s:r,l:u,a:o}}function Ft(e,t){if(0===t.mode)return Tt(e,t);var r=yt(t);return St(e,n(n({},t),{mode:0}),Dt,r)}function jt(e,t,n){var r=e.h,i=e.s,o=e.l,a=e.a,s=r,l=i;return(o<.2||i<.24)&&(o<.5?(s=t.h,l=t.s):(s=n.h,l=n.s)),{h:s,s:l,l:ft(o,0,1,.5,.2),a:a}}function Bt(e,t){if(0===t.mode)return Tt(e,t);var r=yt(t),i=At(t);return St(e,n(n({},t),{mode:0}),jt,r,i)}function Zt(e,t){return Rt(e,t)}function zt(e,t){return Rt(e,t)}function Ut(e){var t=[];return t.push('*:not(pre, pre *, code, .far, .fa, .glyphicon, [class*="vjs-"], .fab, .fa-github, .fas, .material-icons, .icofont, .typcn, mu, [class*="mu-"], .glyphicon, .icon) {'),e.useFont&&e.fontFamily&&t.push(" font-family: ".concat(e.fontFamily," !important;")),e.textStroke>0&&(t.push(" -webkit-text-stroke: ".concat(e.textStroke,"px !important;")),t.push(" text-stroke: ".concat(e.textStroke,"px !important;"))),t.push("}"),t.join("\n")}function Ht(e){var t=[];return e.mode===It.dark&&t.push("invert(100%) hue-rotate(180deg)"),100!==e.brightness&&t.push("brightness(".concat(e.brightness,"%)")),100!==e.contrast&&t.push("contrast(".concat(e.contrast,"%)")),0!==e.grayscale&&t.push("grayscale(".concat(e.grayscale,"%)")),0!==e.sepia&&t.push("sepia(".concat(e.sepia,"%)")),0===t.length?null:t.join(" ")}function Vt(e){return e.slice(0,4).map((function(e){return e.map((function(e){return e.toFixed(3)})).join(" ")})).join(" ")}function Wt(e){return Vt(gt(e))}!function(e){e[e.light=0]="light",e[e.dark=1]="dark"}(It||(It={}));var Gt=0,Kt=new Map,qt=new Map;function Yt(e){return r(this,void 0,void 0,(function(){return i(this,(function(n){return[2,new Promise((function(n,r){var i=++Gt;Kt.set(i,n),qt.set(i,r),chrome.runtime.sendMessage({type:t.CS_FETCH,data:e,id:i})}))]}))}))}chrome.runtime.onMessage.addListener((function(e){var n=e.type,r=e.data,i=e.error,o=e.id;if(n===t.BG_FETCH_RESPONSE){var a=Kt.get(o),s=qt.get(o);Kt.delete(o),qt.delete(o),i?s&&s(i):a&&a(r)}}));var Xt=new(function(){function e(){this.queue=[],this.timerId=null,this.frameDuration=1e3/60}return e.prototype.addToQueue=function(e){this.queue.push(e),this.startQueue()},e.prototype.stopQueue=function(){null!==this.timerId&&(cancelAnimationFrame(this.timerId),this.timerId=null),this.queue=[]},e.prototype.startQueue=function(){var e=this;this.timerId||(this.timerId=requestAnimationFrame((function(){e.timerId=null;for(var t,n=Date.now();t=e.queue.shift();)if(t(),Date.now()-n>=e.frameDuration){e.startQueue();break}})))},e}());function $t(e){return r(this,void 0,void 0,(function(){var t=this;return i(this,(function(o){return[2,new Promise((function(o,a){return r(t,void 0,void 0,(function(){var t,r,s,l;return i(this,(function(i){switch(i.label){case 0:return e.startsWith("data:")?(t=e,[3,4]):[3,1];case 1:return i.trys.push([1,3,,4]),[4,Qt(e)];case 2:return t=i.sent(),[3,4];case 3:return r=i.sent(),a(r),[2];case 4:return i.trys.push([4,6,,7]),[4,Jt(t)];case 5:return s=i.sent(),Xt.addToQueue((function(){o(n({src:e,dataURL:t,width:s.naturalWidth,height:s.naturalHeight},sn(s)))})),[3,7];case 6:return l=i.sent(),a(l),[3,7];case 7:return[2]}}))}))}))]}))}))}function Qt(e){return r(this,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return new URL(e).origin!==location.origin?[3,2]:[4,w(e)];case 1:case 3:return[2,t.sent()];case 2:return[4,Yt({url:e,responseType:"data-url"})]}}))}))}function Jt(e){return r(this,void 0,void 0,(function(){return i(this,(function(t){return[2,new Promise((function(t,n){var r=new Image;r.onload=function(){return t(r)},r.onerror=function(){return n("Unable to load image ".concat(e))},r.src=e}))]}))}))}var en,tn,nn=1024;function rn(){var e=nn,t=nn;(en=document.createElement("canvas")).width=e,en.height=t,(tn=en.getContext("2d")).imageSmoothingEnabled=!1}function on(){en=null,tn=null}var an=5242880;function sn(e){en||rn();var t=e.naturalWidth,n=e.naturalHeight;if(0===n||0===t)return U("logWarn(Image is empty ".concat(e.currentSrc,")")),null;if(t*n*4>an)return{isDark:!1,isLight:!1,isTransparent:!1,isLarge:!1,isTooLarge:!0};var r=t*n,i=Math.min(1,Math.sqrt(nn/r)),o=Math.ceil(t*i),a=Math.ceil(n*i);tn.clearRect(0,0,o,a),tn.drawImage(e,0,0,t,n,0,0,o,a);var s,l,c,u,d,f,h,p=tn.getImageData(0,0,o,a).data,g=.05,m=.4,v=.7,A=0,y=0,b=0;for(c=0;cv&&b++);var _=o*a,w=_-A;return{isDark:y/w>=.7,isLight:b/w>=.7,isTransparent:A/_>=.1,isLarge:r>=48e4,isTooLarge:!1}}function ln(e,t){var n=e.dataURL,r=e.width,i=e.height,o=Wt(t),a=[''),"",'',''),"","",''),""].join("");return"data:image/svg+xml;base64,".concat(btoa(a))}function cn(){Xt&&Xt.stopQueue(),on()}var un=8,dn="conic-",fn=dn.length,hn="radial-",pn="linear-";function gn(e){for(var t=[],n=0,r=dn.length,i=function(){var i;if([pn,hn,dn].find((function(t){if(n-t.length>=0&&e.substring(n-t.length,n)===t)return"repeating"===e.slice(n-t.length-10,n-t.length-1)?(i="repeating-".concat(t,"gradient"),!0):"-webkit"===e.slice(n-t.length-8,n-t.length-1)?(i="-webkit-".concat(t,"gradient"),!0):(i="".concat(t,"gradient"),!0)})),!i)return"break";var o=Ne(e,n+un),a=o.start,s=o.end,l=e.substring(a+1,s-1);r=s+1+fn,t.push({typeGradient:i,match:l,offset:i.length+2,index:n-i.length+un,hasComma:!0})};-1!==(n=e.indexOf("gradient",r))&&"break"!==i(););return t.length&&(t[t.length-1].hasComma=!1),t}function mn(e,t){return Boolean(e&&e.getPropertyPriority(t))}function vn(e,t,n,r,i,o){if(e.startsWith("--")){if(a=Rn(r,e,t,n,i,o))return{property:e,value:a,important:mn(n.style,e),sourceValue:t}}else if(t.includes("var(")){if(a=In(r,e,t))return{property:e,value:a,important:mn(n.style,e),sourceValue:t}}else{if("color-scheme"===e)return null;if(e.includes("color")&&"-webkit-print-color-adjust"!==e||"fill"===e||"stroke"===e||"stop-color"===e){if(a=Sn(e,t,n))return{property:e,value:a,important:mn(n.style,e),sourceValue:t}}else if("background-image"===e||"list-style-image"===e){if(a=kn(t,n,i,o))return{property:e,value:a,important:mn(n.style,e),sourceValue:t}}else if(e.includes("shadow")){var a;if(a=On(t))return{property:e,value:a,important:mn(n.style,e),sourceValue:t}}}return null}function An(){for(var e=[],t=0;t.5,d=function(e){return n(n({},c),{l:ht(c.l+e,0,1)})},f=function(e){return n(n({},c),{l:ht(c.l-e,0,1)})};t=Ge(f(.4)),r=Ge(u?f(.4):d(.4)),i=Ge(c),o=Ge(d(.1)),a=Ge(d(.2))}return l.push("::-webkit-scrollbar {"),l.push(" background-color: ".concat(t,";")),l.push(" color: ".concat(r,";")),l.push("}"),l.push("::-webkit-scrollbar-thumb {"),l.push(" background-color: ".concat(i,";")),l.push("}"),l.push("::-webkit-scrollbar-thumb:hover {"),l.push(" background-color: ".concat(o,";")),l.push("}"),l.push("::-webkit-scrollbar-thumb:active {"),l.push(" background-color: ".concat(a,";")),l.push("}"),l.push("::-webkit-scrollbar-corner {"),l.push(" background-color: ".concat(s,";")),l.push("}"),h&&(l.push("* {"),l.push(" scrollbar-color: ".concat(i," ").concat(t,";")),l.push("}")),l.join("\n")}function xn(e,t){var n=t.strict,r=[],i=["microsoft.com","docs.microsoft.com"].includes(location.hostname);return r.push("html, body, ".concat(n?"body :not(iframe)".concat(i?':not(div[style^="position:absolute;top:0;left:-"]':""):"body > :not(iframe)"," {")),r.push(" background-color: ".concat(Rt({r:255,g:255,b:255},e)," !important;")),r.push(" border-color: ".concat(Bt({r:64,g:64,b:64},e)," !important;")),r.push(" color: ".concat(Ft({r:0,g:0,b:0},e)," !important;")),r.push("}"),r.join("\n")}var En=new Set(["inherit","transparent","initial","currentcolor","none","unset"]);function Sn(e,t,n){if(En.has(t.toLowerCase()))return t;var r=je(t);return r?e.includes("background")?n.style.webkitMaskImage&&"none"!==n.style.webkitMaskImage||n.style.webkitMask&&!n.style.webkitMask.startsWith("none")||n.style.mask&&"none"!==n.style.mask||n.style.getPropertyValue("mask-image")&&"none"!==n.style.getPropertyValue("mask-image")?function(e){return Ft(r,e)}:function(e){return Rt(r,e)}:e.includes("border")||e.includes("outline")?function(e){return Bt(r,e)}:function(e){return Ft(r,e)}:null}var Cn=new Map,Pn=new Map;function Tn(e,t){if(!e||0===t.length)return!1;if(t.some((function(e){return"*"===e})))return!0;for(var n=e.split(/,\s*/g),r=function(e){var r=t[e];if(n.some((function(e){return e===r})))return{value:!0}},i=0;it.index?1:-1})),f=function(e){var t=e.typeGradient,n=e.match,r=e.hasComma,i=/^(from|color-stop|to)\(([^\(\)]*?,\s*)?(.*?)\)$/,o=Ie(/([^\(\),]+(\([^\(\)]*(\([^\(\)]*\)*[^\(\)]*)?\))?([^\(\), ]|( (?!calc)))*),?/g,n,1).map((function(e){var t=je(e=e.trim());if(t)return function(e){return zt(t,e)};var n=e.lastIndexOf(" ");if(t=je(e.substring(0,n)))return function(r){return"".concat(zt(t,r)," ").concat(e.substring(n+1))};var r=e.match(i);return r&&(t=je(r[3]))?function(e){return"".concat(r[1],"(").concat(r[2]?"".concat(r[2],", "):"").concat(zt(t,e),")")}:function(){return e}}));return function(e){return"".concat(t,"(").concat(o.map((function(t){return t(e)})).join(", "),")").concat(r?", ":"")}},h=function(e){var n;if(Tn(t.selectorText,o))return null;var l=xe(e),c=0===l.length,u=t.parentStyleSheet,d=u&&u.href?Ee(u.href):(null===(n=u.ownerNode)||void 0===n?void 0:n.baseURI)||location.origin;l=ge(d,l);var f='url("'.concat(l,'")');return function(e){return r(s,void 0,void 0,(function(){var t,n;return i(this,(function(r){switch(r.label){case 0:return c?[2,"url('')"]:Cn.has(l)?(t=Cn.get(l),[3,7]):[3,1];case 1:return r.trys.push([1,6,,7]),Pn.has(l)?(n=Pn.get(l),[4,new Promise((function(e){return n.push(e)}))]):[3,3];case 2:return(t=r.sent())?[3,5]:[2,null];case 3:return Pn.set(l,[]),[4,$t(l)];case 4:t=r.sent(),Cn.set(l,t),Pn.get(l).forEach((function(e){return e(t)})),Pn.delete(l),r.label=5;case 5:return a()?[2,null]:[3,7];case 6:return U(r.sent()),Pn.has(l)&&(Pn.get(l).forEach((function(e){return e(null)})),Pn.delete(l)),[2,f];case 7:return[2,p(t,e)||f]}}))}))}},p=function(e,t){var r,i=e.isDark,o=e.isLight,a=e.isTransparent,s=e.isLarge,l=e.isTooLarge,c=e.width;if(l)r='url("'.concat(e.src,'")');else if(i&&a&&1===t.mode&&!s&&c>2){z("Inverting dark image ".concat(e.src));var u=ln(e,n(n({},t),{sepia:ht(t.sepia+10,0,100)}));r='url("'.concat(u,'")')}else if(o&&!a&&1===t.mode)if(s)r="none";else{z("Dimming light image ".concat(e.src));var d=ln(e,t);r='url("'.concat(d,'")')}else if(0===t.mode&&o&&!s){z("Applying filter to image ".concat(e.src));var f=ln(e,n(n({},t),{brightness:ht(t.brightness-10,5,200),sepia:ht(t.sepia+10,0,100)}));r='url("'.concat(f,'")')}else r=null;return r},g=[],m=0,v=!1;return d.forEach((function(t,n){var r=t.type,i=t.match,o=t.index,a=t.typeGradient,s=t.hasComma,l=t.offset,c=o,u=m,p=c+i.length+l;m=p,u!==c&&(v?g.push((function(){var t=e.substring(u,c);return","===t[0]&&(t=t.substring(1)),t})):g.push((function(){return e.substring(u,c)}))),v=s||!1,"url"===r?g.push(h(i)):"gradient"===r&&g.push(f({match:i,index:o,typeGradient:a,hasComma:s,offset:l})),n===d.length-1&&g.push((function(){return e.substring(p)}))})),function(e){var t=g.filter(Boolean).map((function(t){return t(e)}));if(t.some((function(e){return e instanceof Promise})))return Promise.all(t).then((function(e){return e.filter(Boolean).join("")}));var n=t.join("");return n.endsWith(", initial")?n.slice(0,-9):n}}catch(A){return null}}function Mn(e){try{var t=0,n=Ie(/(^|\s)(?!calc)([a-z]+\(.+?\)|#[0-9a-f]+|[a-z]+)(.*?(inset|outset)?($|,))/gi,e,2),r=0,i=n.map((function(i,o){var a=t,s=e.indexOf(i,t),l=s+i.length;t=l;var c=je(i);return c?function(t){return"".concat(e.substring(a,s)).concat(Zt(c,t)).concat(o===n.length-1?e.substring(l):"")}:(r++,function(){return e.substring(a,l)})}));return function(e){var t=i.map((function(t){return t(e)})).join("");return{matchesLength:n.length,unparseableMatchesLength:r,result:t}}}catch(o){return null}}function On(e){var t=Mn(e);return t?function(e){return t(e).result}:null}function Rn(e,t,n,r,i,o){return e.getModifierForVariable({varName:t,sourceValue:n,rule:r,ignoredImgSelectors:i,isCancelled:o})}function In(e,t,n){return e.getModifierForVarDependant(t,n)}function Ln(){_t(),Cn.clear(),cn(),Pn.clear()}var Nn=1,Dn=2,Fn=4,jn=8,Bn=new(function(){function e(){this.varTypes=new Map,this.rulesQueue=[],this.definedVars=new Set,this.varRefs=new Map,this.unknownColorVars=new Set,this.unknownBgVars=new Set,this.undefinedVars=new Set,this.initialVarTypes=new Map,this.changedTypeVars=new Set,this.typeChangeSubscriptions=new Map,this.unstableVarValues=new Map}return e.prototype.clear=function(){this.varTypes.clear(),this.rulesQueue.splice(0),this.definedVars.clear(),this.varRefs.clear(),this.unknownColorVars.clear(),this.unknownBgVars.clear(),this.undefinedVars.clear(),this.initialVarTypes.clear(),this.changedTypeVars.clear(),this.typeChangeSubscriptions.clear(),this.unstableVarValues.clear()},e.prototype.isVarType=function(e,t){return this.varTypes.has(e)&&(this.varTypes.get(e)&t)>0},e.prototype.addRulesForMatching=function(e){this.rulesQueue.push(e)},e.prototype.matchVariablesAndDependants=function(){var e=this;this.changedTypeVars.clear(),this.initialVarTypes=new Map(this.varTypes),this.collectRootVariables(),this.collectVariablesAndVarDep(this.rulesQueue),this.rulesQueue.splice(0),this.collectRootVarDependants(),this.varRefs.forEach((function(t,n){t.forEach((function(t){e.varTypes.has(n)&&e.resolveVariableType(t,e.varTypes.get(n))}))})),this.unknownColorVars.forEach((function(t){e.unknownBgVars.has(t)?(e.unknownColorVars.delete(t),e.unknownBgVars.delete(t),e.resolveVariableType(t,Nn)):e.isVarType(t,Nn|Dn|Fn)?e.unknownColorVars.delete(t):e.undefinedVars.add(t)})),this.unknownBgVars.forEach((function(t){null!=e.findVarRef(t,(function(t){return e.unknownColorVars.has(t)||e.isVarType(t,Dn|Fn)}))?e.itarateVarRefs(t,(function(t){e.resolveVariableType(t,Nn)})):e.isVarType(t,Nn|jn)?e.unknownBgVars.delete(t):e.undefinedVars.add(t)})),this.changedTypeVars.forEach((function(t){e.typeChangeSubscriptions.has(t)&&e.typeChangeSubscriptions.get(t).forEach((function(e){e()}))})),this.changedTypeVars.clear()},e.prototype.getModifierForVariable=function(e){var t=this;return function(n){var r=e.varName,i=e.sourceValue,o=e.rule,a=e.ignoredImgSelectors,s=e.isCancelled,l=function(){var e=[],l=function(o,a,s){if(t.isVarType(r,o)){var l,c=a(r);if($n(i))if(Qn(i)){var u=ar(i,t.unstableVarValues);u||(u=o===Nn?"#ffffff":"#000000"),l=s(u,n)}else l=Vn(i,(function(e){return a(e)}),(function(e){return s(e,n)}));else l=s(i,n);e.push({property:c,value:l})}};if(l(Nn,Gn,rr),l(Dn,Kn,ir),l(Fn,qn,or),t.isVarType(r,jn)){var c=Yn(r),u=i;$n(i)&&(u=Vn(i,(function(e){return Gn(e)}),(function(e){return rr(e,n)})));var d=kn(u,o,a,s);u="function"===typeof d?d(n):d,e.push({property:c,value:u})}return e},c=new Set,u=function(e){var n=function(){var t=l();e(t)};c.add(n),t.subscribeForVarTypeChange(r,n)},d=function(){c.forEach((function(e){t.unsubscribeFromVariableTypeChanges(r,e)}))};return{declarations:l(),onTypeChange:{addListener:u,removeListeners:d}}}},e.prototype.getModifierForVarDependant=function(e,t){var n=this;if(t.match(/^\s*(rgb|hsl)a?\(/)){var r=e.startsWith("background"),i=Jn(e);return function(e){var o=ar(t,n.unstableVarValues);return o||(o=r?"#ffffff":"#000000"),(r?rr:i?ir:or)(o,e)}}return"background-color"===e?function(e){return Vn(t,(function(e){return Gn(e)}),(function(t){return rr(t,e)}))}:Jn(e)?function(e){return Vn(t,(function(e){return Kn(e)}),(function(t){return ir(t,e)}))}:"background"===e||"background-image"===e||"box-shadow"===e?function(r){var i=new Set,o=function(){var o=Vn(t,(function(e){return n.isVarType(e,Nn)?Gn(e):n.isVarType(e,jn)?Yn(e):(i.add(e),e)}),(function(e){return rr(e,r)}));if("box-shadow"===e){var a=Mn(o)(r);if(a.unparseableMatchesLength!==a.matchesLength)return a.result}return o},a=o();return i.size>0?new Promise((function(e){var t=i.values().next().value,r=function(){n.unsubscribeFromVariableTypeChanges(t,r);var i=o();e(i)};n.subscribeForVarTypeChange(t,r)})):a}:e.startsWith("border")||e.startsWith("outline")?function(e){return Vn(t,(function(e){return qn(e)}),(function(t){return or(t,e)}))}:null},e.prototype.subscribeForVarTypeChange=function(e,t){this.typeChangeSubscriptions.has(e)||this.typeChangeSubscriptions.set(e,new Set);var n=this.typeChangeSubscriptions.get(e);n.has(t)||n.add(t)},e.prototype.unsubscribeFromVariableTypeChanges=function(e,t){this.typeChangeSubscriptions.has(e)&&this.typeChangeSubscriptions.get(e).delete(t)},e.prototype.collectVariablesAndVarDep=function(e){var t=this;e.forEach((function(e){ve(e,(function(e){e.style&&be(e.style,(function(e,n){Xn(e)&&t.inspectVariable(e,n),$n(n)&&t.inspectVarDependant(e,n)}))}))}))},e.prototype.collectRootVariables=function(){var e=this;be(document.documentElement.style,(function(t,n){Xn(t)&&e.inspectVariable(t,n)}))},e.prototype.inspectVariable=function(e,t){this.unstableVarValues.set(e,t),$n(t)&&Qn(t)&&(this.unknownColorVars.add(e),this.definedVars.add(e)),this.definedVars.has(e)||(this.definedVars.add(e),je(t)?this.unknownColorVars.add(e):(t.includes("url(")||t.includes("linear-gradient(")||t.includes("radial-gradient("))&&this.resolveVariableType(e,jn))},e.prototype.resolveVariableType=function(e,t){var n=this.initialVarTypes.get(e)||0,r=(this.varTypes.get(e)||0)|t;this.varTypes.set(e,r),(r!==n||this.undefinedVars.has(e))&&(this.changedTypeVars.add(e),this.undefinedVars.delete(e)),this.unknownColorVars.delete(e),this.unknownBgVars.delete(e)},e.prototype.collectRootVarDependants=function(){var e=this;be(document.documentElement.style,(function(t,n){$n(n)&&e.inspectVarDependant(t,n)}))},e.prototype.inspectVarDependant=function(e,t){var n=this;Xn(e)?this.iterateVarDeps(t,(function(t){n.varRefs.has(e)||n.varRefs.set(e,new Set),n.varRefs.get(e).add(t)})):"background-color"===e||"box-shadow"===e?this.iterateVarDeps(t,(function(e){return n.resolveVariableType(e,Nn)})):Jn(e)?this.iterateVarDeps(t,(function(e){return n.resolveVariableType(e,Dn)})):e.startsWith("border")||e.startsWith("outline")?this.iterateVarDeps(t,(function(e){return n.resolveVariableType(e,Fn)})):"background"!==e&&"background-image"!==e||this.iterateVarDeps(t,(function(e){if(!n.isVarType(e,Nn|jn)){var t=null!=n.findVarRef(e,(function(e){return n.unknownColorVars.has(e)||n.isVarType(e,Dn|Fn)}));n.itarateVarRefs(e,(function(e){t?n.resolveVariableType(e,Nn):n.unknownBgVars.add(e)}))}}))},e.prototype.iterateVarDeps=function(e,t){var n=new Set;Wn(e,(function(e){return n.add(e)})),n.forEach((function(e){return t(e)}))},e.prototype.findVarRef=function(e,t,n){var r,i;if(void 0===n&&(n=new Set),n.has(e))return null;if(n.add(e),t(e))return e;var a=this.varRefs.get(e);if(!a||0===a.size)return null;try{for(var s=o(a),l=s.next();!l.done;l=s.next()){var c=l.value,u=this.findVarRef(c,t,n);if(u)return u}}catch(d){r={error:d}}finally{try{l&&!l.done&&(i=s.return)&&i.call(s)}finally{if(r)throw r.error}}return null},e.prototype.itarateVarRefs=function(e,t){this.findVarRef(e,(function(e){return t(e),!1}))},e.prototype.setOnRootVariableChange=function(e){this.onRootVariableDefined=e},e.prototype.putRootVars=function(e,t){var n,r,i=this,s=e.sheet;s.cssRules.length>0&&s.deleteRule(0);var l=new Map;be(document.documentElement.style,(function(e,n){Xn(e)&&(i.isVarType(e,Nn)&&l.set(Gn(e),rr(n,t)),i.isVarType(e,Dn)&&l.set(Kn(e),ir(n,t)),i.isVarType(e,Fn)&&l.set(qn(e),or(n,t)),i.subscribeForVarTypeChange(e,i.onRootVariableDefined))}));var c=[];c.push(":root {");try{for(var u=o(l),d=u.next();!d.done;d=u.next()){var f=a(d.value,2),h=f[0],p=f[1];c.push(" ".concat(h,": ").concat(p,";"))}}catch(m){n={error:m}}finally{try{d&&!d.done&&(r=u.return)&&r.call(u)}finally{if(n)throw n.error}}c.push("}");var g=c.join("\n");s.insertRule(g)},e}());function Zn(e,t){void 0===t&&(t=0);var n=e.indexOf("var(",t);if(n>=0){var r=Ne(e,n+3);return r?{start:n,end:r.end}:null}}function zn(e){for(var t,n=[],r=0;t=Zn(e,r);){var i=t.start,o=t.end;n.push({start:i,end:o,value:e.substring(i,o)}),r=t.end+1}return n}function Un(e,t){var n=zn(e),r=n.length;if(0===r)return e;var i=e.length,o=n.map((function(e){return t(e.value)})),a=[];a.push(e.substring(0,n[0].start));for(var s=0;s=0?(t=e.substring(4,r).trim(),n=e.substring(r+1,e.length-1).trim()):(t=e.substring(4,e.length-1).trim(),n=""),{name:t,fallback:n}}function Vn(e,t,n){return Un(e,(function(e){var r,i=Hn(e),o=i.name,a=i.fallback,s=t(o);return a?(r=$n(a)?Vn(a,t,n):n?n(a):a,"var(".concat(s,", ").concat(r,")")):"var(".concat(s,")")}))}function Wn(e,t){Vn(e,(function(e){return t(e),e}))}function Gn(e){return"--darkreader-bg".concat(e)}function Kn(e){return"--darkreader-text".concat(e)}function qn(e){return"--darkreader-border".concat(e)}function Yn(e){return"--darkreader-bgimg".concat(e)}function Xn(e){return e.startsWith("--")}function $n(e){return e.includes("var(")}function Qn(e){return e.match(/^\s*(rgb|hsl)a?\(/)}function Jn(e){return"color"===e||"caret-color"===e||"-webkit-text-fill-color"===e}var er=/^\d{1,3}, ?\d{1,3}, ?\d{1,3}$/;function tr(e){if(er.test(e)){var t=e.split(","),n="rgb(";return t.forEach((function(e){n+="".concat(e.trim(),", ")})),n=n.substring(0,n.length-2),{isRaw:!0,color:n+=")"}}return{isRaw:!1,color:e}}function nr(e,t,n){var r=tr(e),i=r.isRaw,o=r.color,a=je(o);if(a){var s=n(a,t);if(i){var l=je(s);return l?"".concat(l.r,", ").concat(l.g,", ").concat(l.b):s}return s}return o}function rr(e,t){return nr(e,t,Rt)}function ir(e,t){return nr(e,t,Ft)}function or(e,t){return nr(e,t,Bt)}function ar(e,t,n){void 0===n&&(n=new Set);var r=!1,i=Un(e,(function(e){var i=Hn(e),o=i.name,a=i.fallback;if(n.has(o))return r=!0,null;n.add(o);var s=t.get(o)||a,l=null;return s&&(l=$n(s)?ar(s,t,n):s),l||(r=!0,null)}));return r?null:i}var sr={"background-color":{customProp:"--darkreader-inline-bgcolor",cssProp:"background-color",dataAttr:"data-darkreader-inline-bgcolor"},"background-image":{customProp:"--darkreader-inline-bgimage",cssProp:"background-image",dataAttr:"data-darkreader-inline-bgimage"},"border-color":{customProp:"--darkreader-inline-border",cssProp:"border-color",dataAttr:"data-darkreader-inline-border"},"border-bottom-color":{customProp:"--darkreader-inline-border-bottom",cssProp:"border-bottom-color",dataAttr:"data-darkreader-inline-border-bottom"},"border-left-color":{customProp:"--darkreader-inline-border-left",cssProp:"border-left-color",dataAttr:"data-darkreader-inline-border-left"},"border-right-color":{customProp:"--darkreader-inline-border-right",cssProp:"border-right-color",dataAttr:"data-darkreader-inline-border-right"},"border-top-color":{customProp:"--darkreader-inline-border-top",cssProp:"border-top-color",dataAttr:"data-darkreader-inline-border-top"},"box-shadow":{customProp:"--darkreader-inline-boxshadow",cssProp:"box-shadow",dataAttr:"data-darkreader-inline-boxshadow"},color:{customProp:"--darkreader-inline-color",cssProp:"color",dataAttr:"data-darkreader-inline-color"},fill:{customProp:"--darkreader-inline-fill",cssProp:"fill",dataAttr:"data-darkreader-inline-fill"},stroke:{customProp:"--darkreader-inline-stroke",cssProp:"stroke",dataAttr:"data-darkreader-inline-stroke"},"outline-color":{customProp:"--darkreader-inline-outline",cssProp:"outline-color",dataAttr:"data-darkreader-inline-outline"},"stop-color":{customProp:"--darkreader-inline-stopcolor",cssProp:"stop-color",dataAttr:"data-darkreader-inline-stopcolor"}},lr=Object.values(sr),cr={};lr.forEach((function(e){var t=e.cssProp,n=e.customProp;return cr[n]=t}));var ur=["style","fill","stop-color","stroke","bgcolor","color"],dr=ur.map((function(e){return"[".concat(e,"]")})).join(", ");function fr(){return lr.map((function(e){var t=e.dataAttr,n=e.customProp,r=e.cssProp;return["[".concat(t,"] {")," ".concat(r,": var(").concat(n,") !important;"),"}"].join("\n")})).join("\n")}function hr(e){var t=[];return e instanceof Element&&e.matches(dr)&&t.push(e),(e instanceof Element||v&&e instanceof ShadowRoot||e instanceof Document)&&B(t,e.querySelectorAll(dr)),t}var pr=new Map,gr=new Map;function mr(e,t){vr(document,e,t),q(document.documentElement,(function(n){vr(n.shadowRoot,e,t)}))}function vr(e,t,n){pr.has(e)&&(pr.get(e).disconnect(),gr.get(e).disconnect());var r=new WeakSet;function i(e){hr(e).forEach((function(e){r.has(e)||(r.add(e),t(e))})),q(e,(function(i){r.has(e)||(r.add(e),n(i.shadowRoot),vr(i.shadowRoot,t,n))}))}var o=de(e,{onMinorMutations:function(e){e.additions.forEach((function(e){return i(e)}))},onHugeMutations:function(){i(e)}});pr.set(e,o);var l=0,c=null,u=W({seconds:10}),d=W({seconds:2}),f=50,h=[],p=null,g=H((function(e){e.forEach((function(e){ur.includes(e.attributeName)&&t(e.target)}))})),m=new MutationObserver((function(e){if(p)h.push.apply(h,s([],a(e),!1));else{l++;var t=Date.now();if(null==c)c=t;else if(l>=f){if(t-c0&&wr(e,n))i.forEach((function(t){e.removeAttribute(sr[t].dataAttr)}));else{if(e.hasAttribute("bgcolor")&&(((l=e.getAttribute("bgcolor")).match(/^[0-9a-f]{3}$/i)||l.match(/^[0-9a-f]{6}$/i))&&(l="#".concat(l)),c("background-color","background-color",l)),e.hasAttribute("color")&&"mask-icon"!==e.rel&&(((l=e.getAttribute("color")).match(/^[0-9a-f]{3}$/i)||l.match(/^[0-9a-f]{6}$/i))&&(l="#".concat(l)),c("color","color",l)),e instanceof SVGElement){if(e.hasAttribute("fill")){var o=32,a=e.getAttribute("fill");if("none"!==a)if(e instanceof SVGTextElement)c("fill","color",a);else{var s=function(){var t=e.getBoundingClientRect(),n=t.width,r=t.height;c("fill",n>o||r>o?"background-color":"color",a)};ee()?s():ne(s)}}e.hasAttribute("stop-color")&&c("stop-color","background-color",e.getAttribute("stop-color"))}if(e.hasAttribute("stroke")){var l=e.getAttribute("stroke");c("stroke",e instanceof SVGLineElement||e instanceof SVGTextElement?"border-color":"color",l)}e.style&&be(e.style,(function(t,n){if("background-image"!==t||!n.includes("url"))if(sr.hasOwnProperty(t)||t.startsWith("--")&&!cr[t])c(t,t,n);else{var r=cr[t];if(r&&!e.style.getPropertyValue(r)&&!e.hasAttribute(r)){if("background-color"===r&&e.hasAttribute("bgcolor"))return;e.style.setProperty(t,"")}}})),e.style&&e instanceof SVGTextElement&&e.style.fill&&c("fill","color",e.style.getPropertyValue("fill")),j(i,(function(t){e.removeAttribute(sr[t].dataAttr)})),yr.set(e,_r(e,t))}}function c(n,o,a){var s=n.startsWith("--"),l=s?{}:sr[n],c=l.customProp,u=l.dataAttr,d=vn(o,a,{style:e.style},Bn,r,null);if(d){var f=d.value;"function"===typeof f&&(f=f(t)),s&&"object"===typeof f?f.declarations.forEach((function(t){var n=t.property,r=t.value;!(r instanceof Promise)&&e.style.setProperty(n,r)})):(e.style.setProperty(c,f),e.hasAttribute(u)||e.setAttribute(u,""),i.delete(n))}}}var Er="theme-color",Sr='meta[name="'.concat(Er,'"]'),Cr=null,Pr=null;function Tr(e,t){var n=je(Cr=Cr||e.content);n&&(e.content=Rt(n,t))}function kr(e){var t=document.querySelector(Sr);t?Tr(t,e):(Pr&&Pr.disconnect(),(Pr=new MutationObserver((function(t){e:for(var n=0;n0){var s=e.parentRule;a={selector:e.selectorText,declarations:o,parentRule:s},b.push(a)}n.set(r,a)}else b.push(n.get(r))}),(function(){o=!0})),v.forEach((function(e){t.delete(e),n.delete(e)})),i=A,h||m||y){e++;var _=new Map,w=new Map,x=0,E=0,S={rule:null,rules:[],isGroup:!0},C=new WeakMap;r.forEach((function(e){return e()})),r.clear(),b.filter((function(e){return e})).forEach((function(t){var n=t.selector,i=t.declarations,o=k(t.parentRule),l={selector:n,declarations:[],isGroup:!1},c=l.declarations;function u(t,n,r,i){var o=++x,a={property:t,value:null,important:r,asyncKey:o,sourceValue:i};c.push(a);var s=e;n.then((function(t){t&&!g()&&s===e&&(a.value=t,Ir.add((function(){g()||s!==e||O(o)})))}))}function f(t,n,i,o){var l=n,d=l.declarations,f=l.onTypeChange,h=++E,p=e,m=c.length,v=[];if(0===d.length){var A={property:t,value:o,important:i,sourceValue:o,varKey:h};c.push(A),v=[A]}d.forEach((function(e){if(e.value instanceof Promise)u(e.property,e.value,i,o);else{var t={property:e.property,value:e.value,important:i,sourceValue:o,varKey:h};c.push(t),v.push(t)}})),f.addListener((function(t){if(!g()&&p===e){var n=t.map((function(e){return{property:e.property,value:e.value,important:i,sourceValue:o,varKey:h}})),r=c.indexOf(v[0],m);c.splice.apply(c,s([r,v.length],a(n),!1)),v=n,R(h)}})),r.add((function(){return f.removeListeners()}))}o.rules.push(l),i.forEach((function(e){var t=e.property,n=e.value,r=e.important,i=e.sourceValue;if("function"===typeof n){var o=n(d);o instanceof Promise?u(t,o,r,i):t.startsWith("--")?f(t,o,r,i):c.push({property:t,value:o,important:r,sourceValue:i})}else c.push({property:t,value:n,important:r,sourceValue:i})}))}));var P=p();M()}function T(e,t,n){var r=n.selector,i=n.declarations,o=function(e){var t=e.property,n=e.value,r=e.important,i=e.sourceValue;return"".concat(t,": ").concat(null==n?i:n).concat(r?" !important":"",";")},a="";i.forEach((function(e){a+="".concat(o(e)," ")}));var s="".concat(r," { ").concat(a," }");e.insertRule(s,t)}function k(e){if(null==e)return S;if(C.has(e))return C.get(e);var t={rule:e,rules:[],isGroup:!0};return C.set(e,t),k(e.parentRule).rules.push(t),t}function M(){function e(e,t){var n=e.rule;if(n instanceof CSSMediaRule){var r=n.media,i=t.cssRules.length;return t.insertRule("@media ".concat(r.mediaText," {}"),i),t.cssRules[i]}return t}function t(n,r,i){n.rules.forEach((function(n){n.isGroup?t(n,e(n,r),i):i(n,r)}))}t(S,P,(function(e,t){var n=t.cssRules.length;e.declarations.forEach((function(r){var i=r.asyncKey,o=r.varKey;null!=i&&_.set(i,{rule:e,target:t,index:n}),null!=o&&w.set(o,{rule:e,target:t,index:n})})),T(t,n,e)}))}function O(e){var t=_.get(e),n=t.rule,r=t.target,i=t.index;r.deleteRule(i),T(r,i,n),_.delete(e)}function R(e){var t=w.get(e),n=t.rule,r=t.target,i=t.index;r.deleteRule(i),T(r,i,n)}}return{modifySheet:u,shouldRebuildStyle:c}}var Nr='style, link[rel*="stylesheet" i]:not([disabled])';function Dr(e){if(!e.href)return!1;try{return"fonts.googleapis.com"===new URL(e.href).hostname}catch(t){return z("Couldn't construct ".concat(e.href," as URL")),!1}}function Fr(e){return(e instanceof HTMLStyleElement||e instanceof SVGStyleElement||e instanceof HTMLLinkElement&&e.rel&&e.rel.toLowerCase().includes("stylesheet")&&e.href&&!e.disabled&&(!h||!e.href.startsWith("moz-extension://"))&&!Dr(e))&&!e.classList.contains("darkreader")&&"print"!==e.media.toLowerCase()&&!e.classList.contains("stylus")}function jr(e,t,n){return void 0===t&&(t=[]),void 0===n&&(n=!0),Fr(e)?t.push(e):(e instanceof Element||v&&e instanceof ShadowRoot||e===document)&&(j(e.querySelectorAll(Nr),(function(e){return jr(e,t,!1)})),n&&q(e,(function(e){return jr(e.shadowRoot,t,!1)}))),t}var Br=new WeakSet,Zr=new WeakSet,zr=!1;document.addEventListener("__darkreader__inlineScriptsAllowed",(function(){zr=!0}));var Ur=0,Hr=new Map;function Vr(){Hr.clear()}function Wr(e,t){for(var n=t.update,o=t.loadingStart,s=t.loadingEnd,l=[],c=e;(c=c.nextElementSibling)&&c.matches(".darkreader");)l.push(c);var u=l.find((function(e){return e.matches(".darkreader--cors")&&!Zr.has(e)}))||null,d=l.find((function(e){return e.matches(".darkreader--sync")&&!Br.has(e)}))||null,f=null,h=null,g=!1,m=!0,v=Lr(),A=new MutationObserver((function(){n()})),y={attributes:!0,childList:!0,subtree:!0,characterData:!0};function b(){return e instanceof HTMLStyleElement&&e.textContent.trim().match(we)}function _(e,t){var n=!1;if(e){var r=void 0;e:for(var i=0,o=e.length;i=0;t--)e.deleteRule(t)}function o(){return d||E(),h&&h.stop(),x(),null==d.sheet&&(d.textContent=""),i(d.sheet),h?h.run():h=K(d,"prev-sibling",(function(){M=!0,a()})),d.sheet}function a(){var i=M;M=!1,v.modifySheet({prepareSheet:o,sourceCSSRules:r,theme:e,ignoreImageAnalysis:t,force:i,isAsyncCancelled:function(){return g}}),m=0===d.sheet.cssRules.length,v.shouldRebuildStyle()&&ne((function(){return n()}))}r&&(g=!1,a())}function R(){try{return null==e.sheet?[null,null]:[e.sheet.cssRules,null]}catch(t){return[null,t]}}function I(e){return e&&e.message&&e.message.includes("loading")}function L(){var e=a(R(),2),t=e[0];return e[1]?null:t}function N(){V(),zr&&e.sheet||Z()}var D=null,F=null;function j(){var e=L();return e?e.length:null}function B(){return j()!==D}function Z(){D=j(),z();var t=function(){B()&&(D=j(),n()),zr&&e.sheet?z():F=requestAnimationFrame(t)};t()}function z(){cancelAnimationFrame(F)}var U=!1;function H(){function e(){U=!1,g||n()}zr=!0,z(),U||(U=!0,"function"===typeof queueMicrotask?queueMicrotask(e):requestAnimationFrame(e))}function V(){e.addEventListener("__darkreader__updateSheet",H)}function W(){e.removeEventListener("__darkreader__updateSheet",H)}function q(){W(),z()}function Y(){A.disconnect(),g=!0,f&&f.stop(),h&&h.stop(),q()}function X(){if(Y(),G(u),G(d),s(),Hr.has(P)){var e=Hr.get(P);Hr.delete(P),e&&e()}}function $(){A.observe(e,y),e instanceof HTMLStyleElement&&N()}var Q=10,J=0;function ee(){d&&(++J>Q||(x(),f&&f.skip(),h&&h.skip(),m||(M=!0,n())))}return{details:k,render:O,pause:Y,destroy:X,watch:$,restore:ee}}function Gr(e,t){return r(this,void 0,void 0,(function(){return i(this,(function(n){return[2,new Promise((function(n,r){var i=function(){e.removeEventListener("load",o),e.removeEventListener("error",a),Hr.delete(t)},o=function(){i(),n()},a=function(){i(),r("Linkelement ".concat(t," couldn't be loaded. ").concat(e.href))};Hr.set(t,(function(){i(),r()})),e.addEventListener("load",o),e.addEventListener("error",a),e.href||a()}))]}))}))}function Kr(e){return xe(e.substring(7).trim().replace(/;$/,"").replace(/screen$/,""))}function qr(e){return r(this,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return e.startsWith("data:")?[4,fetch(e)]:[3,3];case 1:return[4,t.sent().text()];case 2:case 4:return[2,t.sent()];case 3:return[4,Yt({url:e,responseType:"text",mimeType:"text/css",origin:window.location.origin})]}}))}))}function Yr(e,t,n){return void 0===n&&(n=new Map),r(this,void 0,void 0,(function(){var r,a,s,l,c,u,d,f,h,p;return i(this,(function(i){switch(i.label){case 0:e=Se(e=ke(e=Pe(e)),t),r=Ie(we,e),i.label=1;case 1:i.trys.push([1,10,11,12]),a=o(r),s=a.next(),i.label=2;case 2:return s.done?[3,9]:(l=s.value,c=Kr(l),u=ge(t,c),d=void 0,n.has(u)?(d=n.get(u),[3,7]):[3,3]);case 3:return i.trys.push([3,6,,7]),[4,qr(u)];case 4:return d=i.sent(),n.set(u,d),[4,Yr(d,Ee(u),n)];case 5:return d=i.sent(),[3,7];case 6:return i.sent(),d="",[3,7];case 7:e=e.split(l).join(d),i.label=8;case 8:return s=a.next(),[3,2];case 9:return[3,12];case 10:return f=i.sent(),h={error:f},[3,12];case 11:try{s&&!s.done&&(p=a.return)&&p.call(a)}finally{if(h)throw h.error}return[7];case 12:return[2,e=e.trim()]}}))}))}function Xr(e,t){if(!t)return null;var n=document.createElement("style");return n.classList.add("darkreader"),n.classList.add("darkreader--cors"),n.media="screen",n.textContent=t,e.parentNode.insertBefore(n,e.nextSibling),n.sheet.disabled=!0,Zr.add(n),n}var $r,Qr,Jr=[],ei=new Map;function ti(e){y&&j(e.querySelectorAll(":not(:defined)"),(function(e){var t=e.tagName.toLowerCase();if(!t.includes("-")){var n=e.getAttribute("is");if(!n)return;t=n}ei.has(t)||(ei.set(t,new Set),oi(t).then((function(){if(Qr){var e=ei.get(t);ei.delete(t),Qr(Array.from(e))}}))),ei.get(t).add(e)}))}var ni=!1;document.addEventListener("__darkreader__inlineScriptsAllowed",(function(){ni=!0}));var ri=new Map;function ii(e){ni=!0,ri.has(e.detail.tag)&&ri.get(e.detail.tag)()}function oi(e){return r(this,void 0,void 0,(function(){return i(this,(function(t){return[2,new Promise((function(t){if(window.customElements&&"function"===typeof customElements.whenDefined)customElements.whenDefined(e).then((function(){return t()}));else if(ni)ri.set(e,t),document.dispatchEvent(new CustomEvent("__darkreader__addUndefinedResolver",{detail:{tag:e}}));else{var n=function(){var r=ei.get(e);r&&r.size>0&&(r.values().next().value.matches(":defined")?t():requestAnimationFrame(n))};requestAnimationFrame(n)}}))]}))}))}function ai(e){Qr=e}function si(){Qr=null,ei.clear(),document.removeEventListener("__darkreader__isDefined",ii)}function li(e,t,n){ui();var r=new Set(e),i=new WeakMap,o=new WeakMap;function a(e){i.set(e,e.previousElementSibling),o.set(e,e.nextElementSibling)}function s(e){i.delete(e),o.delete(e)}function l(e){return e.previousElementSibling!==i.get(e)||e.nextElementSibling!==o.get(e)}function c(e){var n=e.createdStyles,i=e.removedStyles,o=e.movedStyles;n.forEach((function(e){return a(e)})),o.forEach((function(e){return a(e)})),i.forEach((function(e){return s(e)})),n.forEach((function(e){return r.add(e)})),i.forEach((function(e){return r.delete(e)})),n.size+i.size+o.size>0&&t({created:Array.from(n),removed:Array.from(i),moved:Array.from(o),updated:[]})}function u(e){var t=e.additions,n=e.moves,r=e.deletions,i=new Set,o=new Set,a=new Set;t.forEach((function(e){return jr(e).forEach((function(e){return i.add(e)}))})),r.forEach((function(e){return jr(e).forEach((function(e){return o.add(e)}))})),n.forEach((function(e){return jr(e).forEach((function(e){return a.add(e)}))})),c({createdStyles:i,removedStyles:o,movedStyles:a}),t.forEach((function(e){q(e,p),ti(e)}))}function d(e){var t=new Set(jr(e)),n=new Set,i=new Set,o=new Set;t.forEach((function(e){r.has(e)||n.add(e)})),r.forEach((function(e){t.has(e)||i.add(e)})),t.forEach((function(e){n.has(e)||i.has(e)||!l(e)||o.add(e)})),c({createdStyles:n,removedStyles:i,movedStyles:o}),q(e,p),ti(e)}function f(e){var n=new Set,r=new Set;e.forEach((function(e){var t=e.target;t.isConnected&&(Fr(t)?n.add(t):t instanceof HTMLLinkElement&&t.disabled&&r.add(t))})),n.size+r.size>0&&t({updated:Array.from(n),created:[],removed:Array.from(r),moved:[]})}function h(e){var t=de(e,{onMinorMutations:u,onHugeMutations:d}),n=new MutationObserver(f);n.observe(e,{attributes:!0,attributeFilter:["rel","disabled","media","href"],subtree:!0}),Jr.push(t,n),$r.add(e)}function p(e){var t=e.shadowRoot;null==t||$r.has(t)||(h(t),n(t))}e.forEach(a),h(document),q(document.documentElement,p),ai((function(e){var n=[];e.forEach((function(e){return B(n,jr(e.shadowRoot))})),t({created:n,updated:[],removed:[],moved:[]}),e.forEach((function(e){var t=e.shadowRoot;null!=t&&(p(e),q(t,p),ti(t))}))})),document.addEventListener("__darkreader__isDefined",ii),ti(document)}function ci(){Jr.forEach((function(e){return e.disconnect()})),Jr.splice(0,Jr.length),$r=new WeakSet}function ui(){ci(),si()}function di(e){return(e<16?"0":"")+e.toString(16)}function fi(){if("randomUUID"in crypto){var e=crypto.randomUUID();return e.substring(0,8)+e.substring(9,13)+e.substring(14,18)+e.substring(19,23)+e.substring(24)}return Array.from(crypto.getRandomValues(new Uint8Array(16))).map((function(e){return di(e)})).join("")}var hi=new WeakMap,pi=new WeakSet;function gi(e){var t=!1;function n(t,n){var r=s([],a(e.adoptedStyleSheets),!1),i=r.indexOf(t),o=r.indexOf(n);i!==o-1&&(o>=0&&r.splice(o,1),r.splice(i+1,0,n),e.adoptedStyleSheets=r)}function r(){t=!0;var n=s([],a(e.adoptedStyleSheets),!1);e.adoptedStyleSheets.forEach((function(e){if(pi.has(e)){var t=n.indexOf(e);t>=0&&n.splice(t,1),hi.delete(e),pi.delete(e)}})),e.adoptedStyleSheets=n}function i(r,i){e.adoptedStyleSheets.forEach((function(e){if(!pi.has(e)){var o=e.rules,a=new CSSStyleSheet;Lr().modifySheet({prepareSheet:s,sourceCSSRules:o,theme:r,ignoreImageAnalysis:i,force:!1,isAsyncCancelled:function(){return t}})}function s(){for(var t=a.cssRules.length-1;t>=0;t--)a.deleteRule(t);return n(e,a),hi.set(e,a),pi.add(a),a}}))}return{render:i,destroy:r}}function mi(e){document.dispatchEvent(new CustomEvent("__darkreader__inlineScriptsAllowed"));var t=Object.getOwnPropertyDescriptor(CSSStyleSheet.prototype,"addRule"),n=Object.getOwnPropertyDescriptor(CSSStyleSheet.prototype,"insertRule"),r=Object.getOwnPropertyDescriptor(CSSStyleSheet.prototype,"deleteRule"),i=Object.getOwnPropertyDescriptor(CSSStyleSheet.prototype,"removeRule"),o=e?Object.getOwnPropertyDescriptor(Document.prototype,"styleSheets"):null,l=["baidu.com","baike.baidu.com","ditu.baidu.com","map.baidu.com","maps.baidu.com","haokan.baidu.com","pan.baidu.com","passport.baidu.com","tieba.baidu.com","www.baidu.com"].includes(location.hostname),c=l?Object.getOwnPropertyDescriptor(Element.prototype,"getElementsByTagName"):null,u=function(){Object.defineProperty(CSSStyleSheet.prototype,"addRule",t),Object.defineProperty(CSSStyleSheet.prototype,"insertRule",n),Object.defineProperty(CSSStyleSheet.prototype,"deleteRule",r),Object.defineProperty(CSSStyleSheet.prototype,"removeRule",i),document.removeEventListener("__darkreader__cleanUp",u),document.removeEventListener("__darkreader__addUndefinedResolver",d),e&&Object.defineProperty(Document.prototype,"styleSheets",o),l&&Object.defineProperty(Element.prototype,"getElementsByTagName",c)},d=function(e){customElements.whenDefined(e.detail.tag).then((function(){document.dispatchEvent(new CustomEvent("__darkreader__isDefined",{detail:{tag:e.detail.tag}}))}))};document.addEventListener("__darkreader__cleanUp",u),document.addEventListener("__darkreader__addUndefinedResolver",d);var f=new Event("__darkreader__updateSheet");function h(e,n,r){return t.value.call(this,e,n,r),this.ownerNode&&!this.ownerNode.classList.contains("darkreader")&&this.ownerNode.dispatchEvent(f),-1}function p(e,t){var r=n.value.call(this,e,t);return this.ownerNode&&!this.ownerNode.classList.contains("darkreader")&&this.ownerNode.dispatchEvent(f),r}function g(e){r.value.call(this,e),this.ownerNode&&!this.ownerNode.classList.contains("darkreader")&&this.ownerNode.dispatchEvent(f)}function m(e){i.value.call(this,e),this.ownerNode&&!this.ownerNode.classList.contains("darkreader")&&this.ownerNode.dispatchEvent(f)}function v(){var e=this,t=function(){var t=s([],a(o.get.call(e)),!1).filter((function(e){return!e.ownerNode.classList.contains("darkreader")}));return t.item=function(e){return t[e]},Object.setPrototypeOf(t,StyleSheetList.prototype)},n=t();return n=new Proxy(n,{get:function(e,n){return t()[n]}})}function A(e){var t=this;if("style"!==e)return c.value.call(this,e);var n=function(){var n=c.value.call(t,e);return Object.setPrototypeOf(s([],a(n),!1).filter((function(e){return!e.classList.contains("darkreader")})),NodeList.prototype)},r=n();return r=new Proxy(r,{get:function(e,t){return n()[Number(t)||t]}})}Object.defineProperty(CSSStyleSheet.prototype,"addRule",Object.assign({},t,{value:h})),Object.defineProperty(CSSStyleSheet.prototype,"insertRule",Object.assign({},n,{value:p})),Object.defineProperty(CSSStyleSheet.prototype,"deleteRule",Object.assign({},r,{value:g})),Object.defineProperty(CSSStyleSheet.prototype,"removeRule",Object.assign({},i,{value:m})),e&&Object.defineProperty(Document.prototype,"styleSheets",Object.assign({},o,{get:v})),l&&Object.defineProperty(Element.prototype,"getElementsByTagName",Object.assign({},c,{value:A}))}var vi=fi(),Ai=new Map,yi=[],bi=null,_i=null,wi=null,xi=null,Ei=null;function Si(e,t){void 0===t&&(t=document.head||document);var n=t.querySelector(".".concat(e));return n||((n=document.createElement("style")).classList.add("darkreader"),n.classList.add(e),n.media="screen",n.textContent=""),n}function Ci(e,t){void 0===t&&(t=document.head||document);var n=t.querySelector(".".concat(e));return n||((n=document.createElement("script")).classList.add("darkreader"),n.classList.add(e)),n}var Pi=new Map;function Ti(e,t){Pi.has(t)&&Pi.get(t).stop(),Pi.set(t,K(e,"parent"))}function ki(){j(Pi.values(),(function(e){return e.stop()})),Pi.clear()}function Mi(){var e=Si("darkreader--fallback",document);e.textContent=xn(bi,{strict:!0}),document.head.insertBefore(e,document.head.firstChild),Ti(e,"fallback");var t=Si("darkreader--user-agent");t.textContent=yn(bi,wi,bi.styleSystemControls),document.head.insertBefore(t,e.nextSibling),Ti(t,"user-agent");var r=Si("darkreader--text");bi.useFont||bi.textStroke>0?r.textContent=Ut(bi):r.textContent="",document.head.insertBefore(r,e.nextSibling),Ti(r,"text");var i=Si("darkreader--invert");_i&&Array.isArray(_i.invert)&&_i.invert.length>0?i.textContent=["".concat(_i.invert.join(", ")," {")," filter: ".concat(Ht(n(n({},bi),{contrast:0===bi.mode?bi.contrast:ht(bi.contrast-10,0,100)}))," !important;"),"}"].join("\n"):i.textContent="",document.head.insertBefore(i,r.nextSibling),Ti(i,"invert");var o=Si("darkreader--inline");o.textContent=fr(),document.head.insertBefore(o,i.nextSibling),Ti(o,"inline");var a=Si("darkreader--override");a.textContent=_i&&_i.css?Ii(_i.css):"",document.head.appendChild(a),Ti(a,"override");var s=Si("darkreader--variables"),l=bn(bi),c=bi.darkSchemeBackgroundColor,u=bi.darkSchemeTextColor,d=bi.lightSchemeBackgroundColor,f=bi.lightSchemeTextColor,h=bi.mode,p=0===h?d:c,g=0===h?f:u;p=Rt(je(p),bi),g=Ft(je(g),bi),s.textContent=[":root {"," --darkreader-neutral-background: ".concat(p,";")," --darkreader-neutral-text: ".concat(g,";")," --darkreader-selection-background: ".concat(l.backgroundColorSelection,";")," --darkreader-selection-text: ".concat(l.foregroundColorSelection,";"),"}"].join("\n"),document.head.insertBefore(s,o.nextSibling),Ti(s,"variables");var m=Si("darkreader--root-vars");document.head.insertBefore(m,s.nextSibling);var v=!(_i&&_i.disableStyleSheetsProxy),A=Ci("darkreader--proxy");A.append("(".concat(mi,")(").concat(v,")")),document.head.insertBefore(A,m.nextSibling),A.remove()}var Oi=new Set;function Ri(e){var t=Si("darkreader--inline",e);t.textContent=fr(),e.insertBefore(t,e.firstChild);var r=Si("darkreader--override",e);r.textContent=_i&&_i.css?Ii(_i.css):"",e.insertBefore(r,t.nextSibling);var i=Si("darkreader--invert",e);_i&&Array.isArray(_i.invert)&&_i.invert.length>0?i.textContent=["".concat(_i.invert.join(", ")," {")," filter: ".concat(Ht(n(n({},bi),{contrast:0===bi.mode?bi.contrast:ht(bi.contrast-10,0,100)}))," !important;"),"}"].join("\n"):i.textContent="",e.insertBefore(i,r.nextSibling),Oi.add(e)}function Ii(e){return e.replace(/\${(.+?)}/g,(function(e,t){var n=je(t);return n?Pt(n,bi):t}))}function Li(){var e=document.querySelector(".darkreader--fallback");e&&(e.textContent="")}function Ni(){zi();var e=jr(document).filter((function(e){return!Ai.has(e)})).map((function(e){return ji(e)}));e.map((function(e){return e.details({secondRound:!1})})).filter((function(e){return e&&e.rules.length>0})).forEach((function(e){Bn.addRulesForMatching(e.rules)})),Bn.matchVariablesAndDependants(),Bn.setOnRootVariableChange((function(){Bn.putRootVars(document.head.querySelector(".darkreader--root-vars"),bi)})),Bn.putRootVars(document.head.querySelector(".darkreader--root-vars"),bi),Ai.forEach((function(e){return e.render(bi,xi)})),0===Fi.size&&Li(),e.forEach((function(e){return e.watch()}));var t=Z(document.querySelectorAll(dr));q(document.documentElement,(function(e){Ri(e.shadowRoot);var n=e.shadowRoot.querySelectorAll(dr);n.length>0&&B(t,n)})),t.forEach((function(e){return xr(e,bi,Ei,xi)})),Yi(document)}var Di=0,Fi=new Set;function ji(e){var t=++Di;function n(){if(!Y()||!Wi){Fi.add(t),z("Current amount of styles loading: ".concat(Fi.size));var e=document.querySelector(".darkreader--fallback");e.textContent||(e.textContent=xn(bi,{strict:!1}))}}function r(){Fi.delete(t),z("Removed loadingStyle ".concat(t,", now awaiting: ").concat(Fi.size)),0===Fi.size&&Y()&&Li()}function i(){var e=o.details({secondRound:!0});e&&(Bn.addRulesForMatching(e.rules),Bn.matchVariablesAndDependants(),o.render(bi,xi))}var o=Wr(e,{update:i,loadingStart:n,loadingEnd:r});return Ai.set(e,o),o}function Bi(e){var t=Ai.get(e);t&&(t.destroy(),Ai.delete(e))}var Zi=H((function(e){Ai.forEach((function(e){return e.render(bi,xi)})),yi.forEach((function(e){return e.render(bi,xi)})),e&&e()})),zi=function(){Zi.cancel()};function Ui(){0!==Fi.size||Li()}var Hi,Vi=null,Wi=!document.hidden;function Gi(e){var t=Boolean(Vi);Vi=function(){document.hidden||(Ki(),e(),Wi=!0)},t||document.addEventListener("visibilitychange",Vi)}function Ki(){document.removeEventListener("visibilitychange",Vi),Vi=null}function qi(){function e(){Ni(),Xi()}Mi(),document.hidden&&!bi.immediateModify?Gi(e):e(),kr(bi)}function Yi(e){try{if(Array.isArray(e.adoptedStyleSheets)&&e.adoptedStyleSheets.length>0){var t=gi(e);yi.push(t),t.render(bi,xi)}}catch(n){}}function Xi(){li(Array.from(Ai.keys()),(function(e){var t=e.created,n=e.updated,r=e.removed,i=e.moved,o=r,a=t.concat(n).concat(i).filter((function(e){return!Ai.has(e)})),s=i.filter((function(e){return Ai.has(e)}));o.forEach((function(e){return Bi(e)}));var l=a.map((function(e){return ji(e)}));l.map((function(e){return e.details({secondRound:!1})})).filter((function(e){return e&&e.rules.length>0})).forEach((function(e){Bn.addRulesForMatching(e.rules)})),Bn.matchVariablesAndDependants(),l.forEach((function(e){return e.render(bi,xi)})),l.forEach((function(e){return e.watch()})),s.forEach((function(e){return Ai.get(e).restore()}))}),(function(e){Ri(e),Yi(e)})),mr((function(e){xr(e,bi,Ei,xi),e===document.documentElement&&(e.getAttribute("style")||"").includes("--")&&(Bn.matchVariablesAndDependants(),Bn.putRootVars(document.head.querySelector(".darkreader--root-vars"),bi))}),(function(e){Ri(e);var t=e.querySelectorAll(dr);t.length>0&&j(t,(function(e){return xr(e,bi,Ei,xi)}))})),Q(Ui)}function $i(){Ai.forEach((function(e){return e.pause()})),ki(),ui(),Ar(),J(Ui),re()}function Qi(){(Hi=new MutationObserver((function(){document.querySelector('meta[name="darkreader-lock"]')&&(Hi.disconnect(),ro())}))).observe(document.head,{childList:!0,subtree:!0})}function Ji(){var e=document.createElement("meta");e.name="darkreader",e.content=vi,document.head.appendChild(e)}function eo(){if(document.querySelector('meta[name="darkreader-lock"]'))return!0;var e=document.querySelector('meta[name="darkreader"]');return e?e.content!==vi:(Ji(),Qi(),!1)}function to(e,t,n){if(bi=e,(_i=t)?(xi=Array.isArray(_i.ignoreImageAnalysis)?_i.ignoreImageAnalysis:[],Ei=Array.isArray(_i.ignoreInlineStyle)?_i.ignoreInlineStyle:[]):(xi=[],Ei=[]),bi.immediateModify&&X((function(){return!0})),wi=n,document.head){if(eo())return;document.documentElement.setAttribute("data-darkreader-mode","dynamic"),document.documentElement.setAttribute("data-darkreader-scheme",bi.mode?"dark":"dimmed"),qi()}else{if(!h){var r=Si("darkreader--fallback");document.documentElement.appendChild(r),r.textContent=xn(bi,{strict:!0})}var i=new MutationObserver((function(){if(document.head){if(i.disconnect(),eo())return void ro();qi()}}));i.observe(document,{childList:!0,subtree:!0})}}function no(){document.dispatchEvent(new CustomEvent("__darkreader__cleanUp")),G(document.head.querySelector(".darkreader--proxy"))}function ro(){document.documentElement.removeAttribute("data-darkreader-mode"),document.documentElement.removeAttribute("data-darkreader-scheme"),io(),G(document.querySelector(".darkreader--fallback")),document.head&&(Mr(),G(document.head.querySelector(".darkreader--user-agent")),G(document.head.querySelector(".darkreader--text")),G(document.head.querySelector(".darkreader--invert")),G(document.head.querySelector(".darkreader--inline")),G(document.head.querySelector(".darkreader--override")),G(document.head.querySelector(".darkreader--variables")),G(document.head.querySelector(".darkreader--root-vars")),G(document.head.querySelector('meta[name="darkreader"]')),no()),Oi.forEach((function(e){G(e.querySelector(".darkreader--inline")),G(e.querySelector(".darkreader--override"))})),Oi.clear(),j(Ai.keys(),(function(e){return Bi(e)})),Fi.clear(),Vr(),j(document.querySelectorAll(".darkreader"),G),yi.forEach((function(e){e.destroy()})),yi.splice(0),Hi&&Hi.disconnect()}function io(){Bn.clear(),fe.clear(),Ki(),zi(),$i(),Ln(),Ze()}var oo=/url\(\"(blob\:.*?)\"\)/g;function ao(e){return r(this,void 0,void 0,(function(){var t,n;return i(this,(function(r){switch(r.label){case 0:return t=[],Ie(oo,e,1).forEach((function(e){var n=w(e);t.push(n)})),[4,Promise.all(t)];case 1:return n=r.sent(),[2,e.replace(oo,(function(){return'url("'.concat(n.shift(),'")')}))]}}))}))}var so='/*\n _______\n / \\\n .==. .==.\n (( ))==(( ))\n / "==" "=="\\\n /____|| || ||___\\\n ________ ____ ________ ___ ___\n | ___ \\ / \\ | ___ \\ | | / /\n | | \\ \\ / /\\ \\ | | \\ \\| |_/ /\n | | ) / /__\\ \\ | |__/ /| ___ \\\n | |__/ / ______ \\| ____ \\| | \\ \\\n_______|_______/__/ ____ \\__\\__|___\\__\\__|___\\__\\____\n| ___ \\ | ____/ / \\ | ___ \\ | ____| ___ \\\n| | \\ \\| |___ / /\\ \\ | | \\ \\| |___| | \\ \\\n| |__/ /| ____/ /__\\ \\ | | ) | ____| |__/ /\n| ____ \\| |__/ ______ \\| |__/ /| |___| ____ \\\n|__| \\__\\____/__/ \\__\\_______/ |______|__| \\__\\\n https://darkreader.org\n*/\n\n/*! Dark reader generated CSS | Licensed under MIT https://github.com/darkreader/darkreader/blob/main/LICENSE */\n';function lo(){return r(this,void 0,void 0,(function(){function e(e,n){var r=document.querySelector(e);r&&r.textContent&&(t.push("/* ".concat(n," */")),t.push(r.textContent),t.push(""))}var t,n,r,o,a;return i(this,(function(i){switch(i.label){case 0:return t=[so],e(".darkreader--fallback","Fallback Style"),e(".darkreader--user-agent","User-Agent Style"),e(".darkreader--text","Text Style"),e(".darkreader--invert","Invert Style"),e(".darkreader--variables","Variables Style"),n=[],document.querySelectorAll(".darkreader--sync").forEach((function(e){j(e.sheet.cssRules,(function(e){e&&e.cssText&&n.push(e.cssText)}))})),n.length?(r=Le(n.join("\n")),t.push("/* Modified CSS */"),a=(o=t).push,[4,ao(r)]):[3,2];case 1:a.apply(o,[i.sent()]),t.push(""),i.label=2;case 2:return e(".darkreader--override","Override Style"),[2,t.join("\n")]}}))}))}var co=!1,uo=function(){try{return window.self!==window.top}catch(e){return console.warn(e),!0}}();function fo(e,t){void 0===e&&(e={}),void 0===t&&(t=null);var r=n(n({},D),e);if(r.engine!==T.dynamicTheme)throw new Error("Theme engine is not supported.");to(r,t,uo),co=!0}function ho(){return co}function po(){ro(),co=!1}var go=matchMedia("(prefers-color-scheme: dark)"),mo={themeOptions:null,fixes:null};function vo(){go.matches?fo(mo.themeOptions,mo.fixes):po()}function Ao(e,t){void 0===e&&(e={}),void 0===t&&(t=null),e?(mo={themeOptions:e,fixes:t},vo(),A?go.addEventListener("change",vo):go.addListener(vo)):(A?go.removeEventListener("change",vo):go.removeListener(vo),po())}function yo(){return r(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,lo()];case 1:return[2,e.sent()]}}))}))}var bo=C;e.auto=Ao,e.disable=po,e.enable=fo,e.exportGeneratedCSS=yo,e.isEnabled=ho,e.setFetchMethod=bo,Object.defineProperty(e,"__esModule",{value:!0})}(t)},90869:function(e,t,n){e.exports=function(e){"use strict";function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=t(e),r={name:"zh-cn",weekdays:"\u661f\u671f\u65e5_\u661f\u671f\u4e00_\u661f\u671f\u4e8c_\u661f\u671f\u4e09_\u661f\u671f\u56db_\u661f\u671f\u4e94_\u661f\u671f\u516d".split("_"),weekdaysShort:"\u5468\u65e5_\u5468\u4e00_\u5468\u4e8c_\u5468\u4e09_\u5468\u56db_\u5468\u4e94_\u5468\u516d".split("_"),weekdaysMin:"\u65e5_\u4e00_\u4e8c_\u4e09_\u56db_\u4e94_\u516d".split("_"),months:"\u4e00\u6708_\u4e8c\u6708_\u4e09\u6708_\u56db\u6708_\u4e94\u6708_\u516d\u6708_\u4e03\u6708_\u516b\u6708_\u4e5d\u6708_\u5341\u6708_\u5341\u4e00\u6708_\u5341\u4e8c\u6708".split("_"),monthsShort:"1\u6708_2\u6708_3\u6708_4\u6708_5\u6708_6\u6708_7\u6708_8\u6708_9\u6708_10\u6708_11\u6708_12\u6708".split("_"),ordinal:function(e,t){return"W"===t?e+"\u5468":e+"\u65e5"},weekStart:1,yearStart:4,formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY\u5e74M\u6708D\u65e5",LLL:"YYYY\u5e74M\u6708D\u65e5Ah\u70b9mm\u5206",LLLL:"YYYY\u5e74M\u6708D\u65e5ddddAh\u70b9mm\u5206",l:"YYYY/M/D",ll:"YYYY\u5e74M\u6708D\u65e5",lll:"YYYY\u5e74M\u6708D\u65e5 HH:mm",llll:"YYYY\u5e74M\u6708D\u65e5dddd HH:mm"},relativeTime:{future:"%s\u5185",past:"%s\u524d",s:"\u51e0\u79d2",m:"1 \u5206\u949f",mm:"%d \u5206\u949f",h:"1 \u5c0f\u65f6",hh:"%d \u5c0f\u65f6",d:"1 \u5929",dd:"%d \u5929",M:"1 \u4e2a\u6708",MM:"%d \u4e2a\u6708",y:"1 \u5e74",yy:"%d \u5e74"},meridiem:function(e,t){var n=100*e+t;return n<600?"\u51cc\u6668":n<900?"\u65e9\u4e0a":n<1100?"\u4e0a\u5348":n<1300?"\u4e2d\u5348":n<1800?"\u4e0b\u5348":"\u665a\u4e0a"}};return n.default.locale(r,null,!0),r}(n(65235))},26746:(e,t,n)=>{function r(){var e;try{e=t.storage.debug}catch(n){}return!e&&"undefined"!==typeof process&&"env"in process&&(e={NODE_ENV:"production",PUBLIC_URL:"",BUILD_VERSION:"d96e805db",THIRD_PARTY:"feishu-dashboard",REACT_APP_SERVER_ENV:"production",REACT_APP_BASE_API_URL:"https://maptable.com/api",REACT_APP_GD_TOKEN:"e8ed63325c8e2ad2fceae1c785fad6bd",REACT_APP_MAPBOX_TOKEN:"pk.eyJ1IjoiZG9uZ2xlaSIsImEiOiJja3A2amE1cTMwbGQzMnBxZXF4MDEwMnRpIn0.v4ZdsImv9hprcA32ocydgw",REACT_APP_OSS_URL:"https://maptable-prod-public.oss-cn-hangzhou.aliyuncs.com",REACT_APP_WS_URL:"wss://maptable.com/websocketd",REACT_APP_STRIPE_PUB_KEY:"pk_live_51L8b87HyKdWcfiHZBeLLIIUQKKf9Ec6UohLlnv0ZIjFfugGPZtfrGnfeQJ5yHXFeZNPya7ii4MTB5hQqXvf0CHhn004g4JMOOO",REACT_APP_STRIPE_RETURN_URL:"https://maptable.com/api/cb/stripe_payment/",REACT_APP_SENTRY_DSN:"https://2b97f2b2aaa11b0007fd478717211e88@o1161772.ingest.us.sentry.io/4507089112399872",REACT_APP_CORS_DISABLE_TOKEN:"",REACT_APP_COLLABORATOR_WS_URL:"wss://bluedragonli.com/websocketd",REACT_APP_AG_GRID_LICENSE_KEY:"For_Trialing_ag-Grid_Only-Not_For_Real_Development_Or_Production_Projects-Valid_Until-30_January_2021_[v2]_MTYxMTk2NDgwMDAwMA==865d36f3a1b8d04d3b1a1405229f6e2b",REACT_APP_DX_APPID:"66fe3ddc3a615b55143d2e02f0044b62",REACT_APP_WECHAT_REDIRECT_URI:"https://bluedragonli.com/auth/wechat",REACT_APP_UPGRADE_FORM_URL:"https://bluedragonli.com/s/f/bhk7bmuhjpc0",REACT_APP_DATA_MARKET_FORM_URL:"https://bluedragonli.com/s/f/bhk7twgl7itc",REACT_APP_RECAPTCHA_TOKEN:"6Ldnoo0gAAAAAFbKnr4TtTZn9QUwz5IMsWytqYY4",REACT_APP_USE_RECAPTCHA:"true",REACT_APP_BILL_FORM_URL:"https://bluedragonli.com/s/f/bpup87rqe3nk",REACT_APP_GOOGLE_OAUTH_CLIENT_ID:"461798037408-6c78f94fg3at6soo6q7itm606hged3qf.apps.googleusercontent.com",REACT_APP_MAINTAIN_FILE_URI:"https://maptable-prod-public.oss-cn-hangzhou.aliyuncs.com/prodfiles/broadcast/maintain.json",REACT_APP_CRISP_WEBSITE_ID:"e3f43195-3a5a-4bcb-bf1d-7e3d13d0376d",REACT_APP_ICON_CDN:"https://icon-cdn.maptable.com"}.DEBUG),e}(t=e.exports=n(52734)).log=function(){return"object"===typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)},t.formatArgs=function(e){var n=this.useColors;if(e[0]=(n?"%c":"")+this.namespace+(n?" %c":" ")+e[0]+(n?"%c ":" ")+"+"+t.humanize(this.diff),!n)return;var r="color: "+this.color;e.splice(1,0,r,"color: inherit");var i=0,o=0;e[0].replace(/%[a-zA-Z%]/g,(function(e){"%%"!==e&&(i++,"%c"===e&&(o=i))})),e.splice(o,0,r)},t.save=function(e){try{null==e?t.storage.removeItem("debug"):t.storage.debug=e}catch(n){}},t.load=r,t.useColors=function(){if("undefined"!==typeof window&&window.process&&"renderer"===window.process.type)return!0;return"undefined"!==typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!==typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!==typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!==typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage="undefined"!=typeof chrome&&"undefined"!=typeof chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch(e){}}(),t.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],t.formatters.j=function(e){try{return JSON.stringify(e)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}},t.enable(r())},52734:(e,t,n)=>{var r;function i(e){function n(){if(n.enabled){var e=n,i=+new Date,o=i-(r||i);e.diff=o,e.prev=r,e.curr=i,r=i;for(var a=new Array(arguments.length),s=0;s{"use strict";var r=n(37604)(),i=n(78559),o=r&&i("%Object.defineProperty%",!0);if(o)try{o({},"a",{value:1})}catch(c){o=!1}var a=i("%SyntaxError%"),s=i("%TypeError%"),l=n(95770);e.exports=function(e,t,n){if(!e||"object"!==typeof e&&"function"!==typeof e)throw new s("`obj` must be an object or a function`");if("string"!==typeof t&&"symbol"!==typeof t)throw new s("`property` must be a string or a symbol`");if(arguments.length>3&&"boolean"!==typeof arguments[3]&&null!==arguments[3])throw new s("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!==typeof arguments[4]&&null!==arguments[4])throw new s("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!==typeof arguments[5]&&null!==arguments[5])throw new s("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!==typeof arguments[6])throw new s("`loose`, if provided, must be a boolean");var r=arguments.length>3?arguments[3]:null,i=arguments.length>4?arguments[4]:null,c=arguments.length>5?arguments[5]:null,u=arguments.length>6&&arguments[6],d=!!l&&l(e,t);if(o)o(e,t,{configurable:null===c&&d?d.configurable:!c,enumerable:null===r&&d?d.enumerable:!r,value:n,writable:null===i&&d?d.writable:!i});else{if(!u&&(r||i||c))throw new a("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");e[t]=n}}},99277:(e,t,n)=>{"use strict";function r(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())}))}n.d(t,{M:()=>h});const i=["geforce 320m","geforce 8600","geforce 8600m gt","geforce 8800 gs","geforce 8800 gt","geforce 9400","geforce 9400m g","geforce 9400m","geforce 9600m gt","geforce 9600m","geforce fx go5200","geforce gt 120","geforce gt 130","geforce gt 330m","geforce gtx 285","google swiftshader","intel g41","intel g45","intel gma 4500mhd","intel gma x3100","intel hd 3000","intel q45","legacy","mali-2","mali-3","mali-4","quadro fx 1500","quadro fx 4","quadro fx 5","radeon hd 2400","radeon hd 2600","radeon hd 4670","radeon hd 4850","radeon hd 4870","radeon hd 5670","radeon hd 5750","radeon hd 6290","radeon hd 6300","radeon hd 6310","radeon hd 6320","radeon hd 6490m","radeon hd 6630m","radeon hd 6750m","radeon hd 6770m","radeon hd 6970m","sgx 543","sgx543"];function o(e){return e.toLowerCase().replace(/.*angle ?\((.+)\)(?: on vulkan [0-9.]+)?$/i,"$1").replace(/\s(\d{1,2}gb|direct3d.+$)|\(r\)| \([^)]+\)$/g,"").replace(/(?:vulkan|opengl) \d+\.\d+(?:\.\d+)?(?: \((.*)\))?/,"$1")}const a="undefined"==typeof window,s=(()=>{if(a)return;const{userAgent:e,platform:t,maxTouchPoints:n}=window.navigator,r=/(iphone|ipod|ipad)/i.test(e),i="iPad"===t||"MacIntel"===t&&n>0&&!window.MSStream;return{isIpad:i,isMobile:/android/i.test(e)||r||i,isSafari12:/Version\/12.+Safari/.test(e)}})();class l extends Error{constructor(e){super(e),Object.setPrototypeOf(this,new.target.prototype)}}const c=[],u=[];function d(e,t){if(e===t)return 0;const n=e;e.length>t.length&&(e=t,t=n);let r=e.length,i=t.length;for(;r>0&&e.charCodeAt(~-r)===t.charCodeAt(~-i);)r--,i--;let o,a=0;for(;ad?l>d?d+1:l:l>s?s+1:l;return d}function f(e){return null!=e}const h=function(){let{mobileTiers:e=[0,15,30,60],desktopTiers:t=[0,15,30,60],override:n={},glContext:c,failIfMajorPerformanceCaveat:u=!1,benchmarksURL:h="https://unpkg.com/detect-gpu@5.0.37/dist/benchmarks"}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return r(void 0,void 0,void 0,(function*(){const p={};if(a)return{tier:0,type:"SSR"};const{isIpad:g=!!(null==s?void 0:s.isIpad),isMobile:m=!!(null==s?void 0:s.isMobile),screenSize:v=window.screen,loadBenchmarks:A=(e=>r(void 0,void 0,void 0,(function*(){const t=yield fetch("".concat(h,"/").concat(e)).then((e=>e.json()));if(parseInt(t.shift().split(".")[0],10)<4)throw new l("Detect GPU benchmark data is out of date. Please update to version 4x");return t})))}=n;let{renderer:y}=n;const b=(e,t,n,r,i)=>({device:i,fps:r,gpu:n,isMobile:m,tier:e,type:t});let _,w="";if(y)y=o(y),_=[y];else{const e=c||function(e){const t={alpha:!1,antialias:!1,depth:!1,failIfMajorPerformanceCaveat:arguments.length>1&&void 0!==arguments[1]&&arguments[1],powerPreference:"high-performance",stencil:!1};e&&delete t.powerPreference;const n=window.document.createElement("canvas"),r=n.getContext("webgl",t)||n.getContext("experimental-webgl",t);return null!=r?r:void 0}(null==s?void 0:s.isSafari12,u);if(!e)return b(0,"WEBGL_UNSUPPORTED");const t=e.getExtension("WEBGL_debug_renderer_info");if(t&&(y=e.getParameter(t.UNMASKED_RENDERER_WEBGL)),!y)return b(1,"FALLBACK");w=y,y=o(y),_=function(e,t,n){return"apple gpu"===t?function(e,t,n){if(!n)return[t];const r=function(e){const t=e.createShader(35633),n=e.createShader(35632),r=e.createProgram();if(!(n&&t&&r))return;e.shaderSource(t,"\n precision highp float;\n attribute vec3 aPosition;\n varying float vvv;\n void main() {\n vvv = 0.31622776601683794;\n gl_Position = vec4(aPosition, 1.0);\n }\n "),e.shaderSource(n,"\n precision highp float;\n varying float vvv;\n void main() {\n vec4 enc = vec4(1.0, 255.0, 65025.0, 16581375.0) * vvv;\n enc = fract(enc);\n enc -= enc.yzww * vec4(1.0 / 255.0, 1.0 / 255.0, 1.0 / 255.0, 0.0);\n gl_FragColor = enc;\n }\n "),e.compileShader(t),e.compileShader(n),e.attachShader(r,t),e.attachShader(r,n),e.linkProgram(r),e.detachShader(r,t),e.detachShader(r,n),e.deleteShader(t),e.deleteShader(n),e.useProgram(r);const i=e.createBuffer();e.bindBuffer(34962,i),e.bufferData(34962,new Float32Array([-1,-1,0,3,-1,0,-1,3,0]),35044);const o=e.getAttribLocation(r,"aPosition");e.vertexAttribPointer(o,3,5126,!1,0,0),e.enableVertexAttribArray(o),e.clearColor(1,1,1,1),e.clear(16384),e.viewport(0,0,1,1),e.drawArrays(4,0,3);const a=new Uint8Array(4);return e.readPixels(0,0,1,1,6408,5121,a),e.deleteProgram(r),e.deleteBuffer(i),a.join("")}(e),i="801621810",o="8016218135",a="80162181161",l=(null==s?void 0:s.isIpad)?[["a7",a,12],["a8",o,15],["a8x",o,15],["a9",o,15],["a9x",o,15],["a10",o,15],["a10x",o,15],["a12",i,15],["a12x",i,15],["a12z",i,15],["a14",i,15],["m1",i,15]]:[["a7",a,12],["a8",o,12],["a9",o,15],["a10",o,15],["a11",i,15],["a12",i,15],["a13",i,15],["a14",i,15]];let c;return"80162181255"===r?c=l.filter((e=>{let[,,t]=e;return t>=14})):(c=l.filter((e=>{let[,t]=e;return t===r})),c.length||(c=l)),c.map((e=>{let[t]=e;return"apple ".concat(t," gpu")}))}(e,t,n):[t]}(e,y,m)}const x=(yield Promise.all(_.map((function(e){var t;return r(this,void 0,void 0,(function*(){const n=(e=>{const t=m?["adreno","apple","mali-t","mali","nvidia","powervr","samsung"]:["intel","apple","amd","radeon","nvidia","geforce"];for(const n of t)if(e.includes(n))return n})(e);if(!n)return;const r="".concat(m?"m":"d","-").concat(n).concat(g?"-ipad":"",".json"),i=p[r]=null!==(t=p[r])&&void 0!==t?t:A(r);let o;try{o=yield i}catch(n){if(n instanceof l)throw n;return}const a=function(e){var t;const n=(e=e.replace(/\([^)]+\)/,"")).match(/\d+/)||e.match(/(\W|^)([A-Za-z]{1,3})(\W|$)/g);return null!==(t=null==n?void 0:n.join("").replace(/\W|amd/g,""))&&void 0!==t?t:""}(e);let s=o.filter((e=>{let[,t]=e;return t===a}));s.length||(s=o.filter((t=>{let[n]=t;return n.includes(e)})));const c=s.length;if(0===c)return;const u=e.split(/[.,()\[\]/\s]/g).sort().filter(((e,t,n)=>0===t||e!==n[t-1])).join(" ");let f,[h,,,,y]=c>1?s.map((e=>[e,d(u,e[2])])).sort(((e,t)=>{let[,n]=e,[,r]=t;return n-r}))[0][0]:s[0],b=Number.MAX_VALUE;const{devicePixelRatio:_}=window,w=v.width*_*v.height*_;for(const e of y){const[t,n]=e,r=t*n,i=Math.abs(w-r);i{let[n=Number.MAX_VALUE,r]=e,[i=Number.MAX_VALUE,o]=t;return n===i?r-o:n-i}));if(!x.length){const e=i.find((e=>y.includes(e)));return e?b(0,"BLOCKLISTED",e):b(1,"FALLBACK","".concat(y," (").concat(w,")"))}const[,E,S,C]=x[0];if(-1===E)return b(0,"BLOCKLISTED",S,E,C);const P=m?e:t;let T=0;for(let e=0;e=P[e]&&(T=e);return b(T,"BENCHMARK",S,E,C)}))}},39698:function(e){!function(t){"use strict";var n=function(){return{escape:function(e){return e.replace(/([.*+?^${}()|\[\]\/\\])/g,"\\$1")},parseExtension:e,mimeType:function(t){var n=e(t).toLowerCase();return function(){var e="application/font-woff",t="image/jpeg";return{woff:e,woff2:e,ttf:"application/font-truetype",eot:"application/vnd.ms-fontobject",png:"image/png",jpg:t,jpeg:t,gif:"image/gif",tiff:"image/tiff",svg:"image/svg+xml"}}()[n]||""},dataAsUrl:function(e,t){return"data:"+t+";base64,"+e},isDataUrl:function(e){return-1!==e.search(/^(data:)/)},canvasToBlob:function(e){return e.toBlob?new Promise((function(t){e.toBlob(t)})):function(e){return new Promise((function(t){for(var n=window.atob(e.toDataURL().split(",")[1]),r=n.length,i=new Uint8Array(r),o=0;o'+e+""})).then((function(e){return''+e+""})).then((function(e){return"data:image/svg+xml;charset=utf-8,"+e}))}(r,t.width||n.width(e),t.height||n.height(e))}))}function c(e,t){return l(e,t).then(n.makeImage).then(n.delay(100)).then((function(r){var i=function(e){var r=document.createElement("canvas");if(r.width=t.width||n.width(e),r.height=t.height||n.height(e),t.bgcolor){var i=r.getContext("2d");i.fillStyle=t.bgcolor,i.fillRect(0,0,r.width,r.height)}return r}(e);return i.getContext("2d").drawImage(r,0,0),i}))}function u(e,t,r){return r||!t||t(e)?Promise.resolve(e).then((function(e){return e instanceof HTMLCanvasElement?n.makeImage(e.toDataURL()):e.cloneNode(!1)})).then((function(r){return function(e,t,r){var i=e.childNodes;return 0===i.length?Promise.resolve(t):o(t,n.asArray(i),r).then((function(){return t}));function o(e,t,n){var r=Promise.resolve();return t.forEach((function(t){r=r.then((function(){return u(t,n)})).then((function(t){t&&e.appendChild(t)}))})),r}}(e,r,t)})).then((function(t){return function(e,t){return t instanceof Element?Promise.resolve().then(r).then(i).then(o).then(a).then((function(){return t})):t;function r(){function r(e,t){function r(e,t){n.asArray(e).forEach((function(n){t.setProperty(n,e.getPropertyValue(n),e.getPropertyPriority(n))}))}e.cssText?t.cssText=e.cssText:r(e,t)}r(window.getComputedStyle(e),t.style)}function i(){function r(r){var i=window.getComputedStyle(e,r),o=i.getPropertyValue("content");if(""!==o&&"none"!==o){var a=n.uid();t.className=t.className+" "+a;var s=document.createElement("style");s.appendChild(l(a,r,i)),t.appendChild(s)}function l(e,t,r){var i="."+e+":"+t,o=r.cssText?a(r):s(r);return document.createTextNode(i+"{"+o+"}");function a(e){var t=e.getPropertyValue("content");return e.cssText+" content: "+t+";"}function s(e){return n.asArray(e).map(t).join("; ")+";";function t(t){return t+": "+e.getPropertyValue(t)+(e.getPropertyPriority(t)?" !important":"")}}}}[":before",":after"].forEach((function(e){r(e)}))}function o(){e instanceof HTMLTextAreaElement&&(t.innerHTML=e.value),e instanceof HTMLInputElement&&t.setAttribute("value",e.value)}function a(){t instanceof SVGElement&&(t.setAttribute("xmlns","http://www.w3.org/2000/svg"),t instanceof SVGRectElement&&["width","height"].forEach((function(e){var n=t.getAttribute(e);n&&t.style.setProperty(e,n)})))}}(e,t)})):Promise.resolve()}function d(e){return i.resolveAll().then((function(t){var n=document.createElement("style");return e.appendChild(n),n.appendChild(document.createTextNode(t)),e}))}function f(e){return o.inlineAll(e).then((function(){return e}))}e.exports=s}()},49236:e=>{"use strict";function t(e,t,r){r=r||2;var o,a,s,l,d,f,p,g=t&&t.length,m=g?t[0]*r:e.length,v=n(e,0,m,r,!0),A=[];if(!v||v.next===v.prev)return A;if(g&&(v=function(e,t,r,i){var o,a,s,l=[];for(o=0,a=t.length;o80*r){o=s=e[0],a=l=e[1];for(var y=r;ys&&(s=d),f>l&&(l=f);p=0!==(p=Math.max(s-o,l-a))?32767/p:0}return i(v,A,r,o,a,p,0),A}function n(e,t,n,r,i){var o,a;if(i===C(e,t,n,r)>0)for(o=t;o=t;o-=r)a=x(o,e[o],e[o+1],a);return a&&v(a,a.next)&&(E(a),a=a.next),a}function r(e,t){if(!e)return e;t||(t=e);var n,r=e;do{if(n=!1,r.steiner||!v(r,r.next)&&0!==m(r.prev,r,r.next))r=r.next;else{if(E(r),(r=t=r.prev)===r.next)break;n=!0}}while(n||r!==t);return t}function i(e,t,n,c,u,d,h){if(e){!h&&d&&function(e,t,n,r){var i=e;do{0===i.z&&(i.z=f(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,c=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,c*=2}while(a>1)}(i)}(e,c,u,d);for(var p,g,m=e;e.prev!==e.next;)if(p=e.prev,g=e.next,d?a(e,c,u,d):o(e))t.push(p.i/n|0),t.push(e.i/n|0),t.push(g.i/n|0),E(e),e=g.next,m=g.next;else if((e=g)===m){h?1===h?i(e=s(r(e),t,n),t,n,c,u,d,2):2===h&&l(e,t,n,c,u,d):i(r(e),t,n,c,u,d,1);break}}}function o(e){var t=e.prev,n=e,r=e.next;if(m(t,n,r)>=0)return!1;for(var i=t.x,o=n.x,a=r.x,s=t.y,l=n.y,c=r.y,u=io?i>a?i:a:o>a?o:a,h=s>l?s>c?s:c:l>c?l:c,g=r.next;g!==t;){if(g.x>=u&&g.x<=f&&g.y>=d&&g.y<=h&&p(i,s,o,l,a,c,g.x,g.y)&&m(g.prev,g,g.next)>=0)return!1;g=g.next}return!0}function a(e,t,n,r){var i=e.prev,o=e,a=e.next;if(m(i,o,a)>=0)return!1;for(var s=i.x,l=o.x,c=a.x,u=i.y,d=o.y,h=a.y,g=sl?s>c?s:c:l>c?l:c,y=u>d?u>h?u:h:d>h?d:h,b=f(g,v,t,n,r),_=f(A,y,t,n,r),w=e.prevZ,x=e.nextZ;w&&w.z>=b&&x&&x.z<=_;){if(w.x>=g&&w.x<=A&&w.y>=v&&w.y<=y&&w!==i&&w!==a&&p(s,u,l,d,c,h,w.x,w.y)&&m(w.prev,w,w.next)>=0)return!1;if(w=w.prevZ,x.x>=g&&x.x<=A&&x.y>=v&&x.y<=y&&x!==i&&x!==a&&p(s,u,l,d,c,h,x.x,x.y)&&m(x.prev,x,x.next)>=0)return!1;x=x.nextZ}for(;w&&w.z>=b;){if(w.x>=g&&w.x<=A&&w.y>=v&&w.y<=y&&w!==i&&w!==a&&p(s,u,l,d,c,h,w.x,w.y)&&m(w.prev,w,w.next)>=0)return!1;w=w.prevZ}for(;x&&x.z<=_;){if(x.x>=g&&x.x<=A&&x.y>=v&&x.y<=y&&x!==i&&x!==a&&p(s,u,l,d,c,h,x.x,x.y)&&m(x.prev,x,x.next)>=0)return!1;x=x.nextZ}return!0}function s(e,t,n){var i=e;do{var o=i.prev,a=i.next.next;!v(o,a)&&A(o,i,i.next,a)&&_(o,a)&&_(a,o)&&(t.push(o.i/n|0),t.push(i.i/n|0),t.push(a.i/n|0),E(i),E(i.next),i=e=a),i=i.next}while(i!==e);return r(i)}function l(e,t,n,o,a,s){var l=e;do{for(var c=l.next.next;c!==l.prev;){if(l.i!==c.i&&g(l,c)){var u=w(l,c);return l=r(l,l.next),u=r(u,u.next),i(l,t,n,o,a,s,0),void i(u,t,n,o,a,s,0)}c=c.next}l=l.next}while(l!==e)}function c(e,t){return e.x-t.x}function u(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>=u&&i!==r.x&&p(on.x||r.x===n.x&&d(n,r)))&&(n=r,h=l)),r=r.next}while(r!==c);return n}(e,t);if(!n)return t;var i=w(n,e);return r(i,i.next),r(n,n.next)}function d(e,t){return m(e.prev,e,t.prev)<0&&m(t.next,e,e.next)<0}function f(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 h(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 g(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&&A(n,n.next,e,t))return!0;n=n.next}while(n!==e);return!1}(e,t)&&(_(e,t)&&_(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)&&(m(e.prev,e,t.prev)||m(e,t.prev,t))||v(e,t)&&m(e.prev,e,e.next)>0&&m(t.prev,t,t.next)>0)}function m(e,t,n){return(t.y-e.y)*(n.x-t.x)-(t.x-e.x)*(n.y-t.y)}function v(e,t){return e.x===t.x&&e.y===t.y}function A(e,t,n,r){var i=b(m(e,t,n)),o=b(m(e,t,r)),a=b(m(n,r,e)),s=b(m(n,r,t));return i!==o&&a!==s||(!(0!==i||!y(e,n,t))||(!(0!==o||!y(e,r,t))||(!(0!==a||!y(n,e,r))||!(0!==s||!y(n,t,r)))))}function y(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 b(e){return e>0?1:e<0?-1:0}function _(e,t){return m(e.prev,e,e.next)<0?m(e,t,e.next)>=0&&m(e,e.prev,t)>=0:m(e,t,e.prev)<0||m(e,e.next,t)<0}function w(e,t){var n=new S(e.i,e.x,e.y),r=new S(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 x(e,t,n,r){var i=new S(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 E(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 S(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 C(e,t,n,r){for(var i=0,o=t,a=n-r;o0&&(r+=e[i-1].length,n.holes.push(r))}return n}},90912:e=>{"use strict";e.exports=function e(t,n){if(t===n)return!0;if(t&&n&&"object"==typeof t&&"object"==typeof n){if(t.constructor!==n.constructor)return!1;var r,i,o;if(Array.isArray(t)){if((r=t.length)!=n.length)return!1;for(i=r;0!==i--;)if(!e(t[i],n[i]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if((r=(o=Object.keys(t)).length)!==Object.keys(n).length)return!1;for(i=r;0!==i--;)if(!Object.prototype.hasOwnProperty.call(n,o[i]))return!1;for(i=r;0!==i--;){var a=o[i];if(("_owner"!==a||!t.$$typeof)&&!e(t[a],n[a]))return!1}return!0}return t!==t&&n!==n}},6100:(e,t,n)=>{"use strict";n.d(t,{iF:()=>j});var r=Uint8Array,i=Uint16Array,o=Int32Array,a=new r([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),s=new r([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),l=new r([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),c=function(e,t){for(var n=new i(31),r=0;r<31;++r)n[r]=t+=1<>1|(21845&m)<<1;v=(61680&(v=(52428&v)>>2|(13107&v)<<2))>>4|(3855&v)<<4,g[m]=((65280&v)>>8|(255&v)<<8)>>1}var A=function(e,t,n){for(var r=e.length,o=0,a=new i(t);o>c]=u}else for(s=new i(r),o=0;o>15-e[o]);return s},y=new r(288);for(m=0;m<144;++m)y[m]=8;for(m=144;m<256;++m)y[m]=9;for(m=256;m<280;++m)y[m]=7;for(m=280;m<288;++m)y[m]=8;var b=new r(32);for(m=0;m<32;++m)b[m]=5;var _=A(y,9,1),w=A(b,5,1),x=function(e){for(var t=e[0],n=1;nt&&(t=e[n]);return t},E=function(e,t,n){var r=t/8|0;return(e[r]|e[r+1]<<8)>>(7&t)&n},S=function(e,t){var n=t/8|0;return(e[n]|e[n+1]<<8|e[n+2]<<16)>>(7&t)},C=function(e){return(e+7)/8|0},P=function(e,t,n){return(null==t||t<0)&&(t=0),(null==n||n>e.length)&&(n=e.length),new r(e.subarray(t,n))},T=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],k=function(e,t,n){var r=new Error(t||T[e]);if(r.code=e,Error.captureStackTrace&&Error.captureStackTrace(r,k),!n)throw r;return r},M=function(e,t,n,i){var o=e.length,c=i?i.length:0;if(!o||t.f&&!t.l)return n||new r(0);var u=!n,f=u||2!=t.i,h=t.i;u&&(n=new r(3*o));var g=function(e){var t=n.length;if(e>t){var i=new r(Math.max(2*t,e));i.set(n),n=i}},m=t.f||0,v=t.p||0,y=t.b||0,b=t.l,T=t.d,M=t.m,O=t.n,R=8*o;do{if(!b){m=E(e,v,1);var I=E(e,v+1,3);if(v+=3,!I){var L=e[(W=C(v)+4)-4]|e[W-3]<<8,N=W+L;if(N>o){h&&k(0);break}f&&g(y+L),n.set(e.subarray(W,N),y),t.b=y+=L,t.p=v=8*N,t.f=m;continue}if(1==I)b=_,T=w,M=9,O=5;else if(2==I){var D=E(e,v,31)+257,F=E(e,v+10,15)+4,j=D+E(e,v+5,31)+1;v+=14;for(var B=new r(j),Z=new r(19),z=0;z>4)<16)B[z++]=W;else{var K=0,q=0;for(16==W?(q=3+E(e,v,3),v+=2,K=B[z-1]):17==W?(q=3+E(e,v,7),v+=3):18==W&&(q=11+E(e,v,127),v+=7);q--;)B[z++]=K}}var Y=B.subarray(0,D),X=B.subarray(D);M=x(Y),O=x(X),b=A(Y,M,1),T=A(X,O,1)}else k(1);if(v>R){h&&k(0);break}}f&&g(y+131072);for(var $=(1<>4;if((v+=15&K)>R){h&&k(0);break}if(K||k(2),ee<256)n[y++]=ee;else{if(256==ee){J=v,b=null;break}var te=ee-254;if(ee>264){var ne=a[z=ee-257];te=E(e,v,(1<>4;re||k(3),v+=15&re;X=p[ie];if(ie>3){ne=s[ie];X+=S(e,v)&(1<R){h&&k(0);break}f&&g(y+131072);var oe=y+te;if(y>3&1)+(t>>4&1);r>0;r-=!e[n++]);return n+(2&t)},I=function(e){var t=e.length;return(e[t-4]|e[t-3]<<8|e[t-2]<<16|e[t-1]<<24)>>>0},L=function(e,t){return(8!=(15&e[0])||e[0]>>4>7||(e[0]<<8|e[1])%31)&&k(6,"invalid zlib data"),(e[1]>>5&1)==+!t&&k(6,"invalid zlib data: "+(32&e[1]?"need":"unexpected")+" dictionary"),2+(e[1]>>3&4)};function N(e,t){return M(e,{i:2},t&&t.out,t&&t.dictionary)}function D(e,t){var n=R(e);return n+8>e.length&&k(6,"invalid gzip data"),M(e.subarray(n,-8),{i:2},t&&t.out||new r(I(e)),t&&t.dictionary)}function F(e,t){return M(e.subarray(L(e,t&&t.dictionary),-4),{i:2},t&&t.out,t&&t.dictionary)}function j(e,t){return 31==e[0]&&139==e[1]&&8==e[2]?D(e,t):8!=(15&e[0])||e[0]>>4>7||(e[0]<<8|e[1])%31?N(e,t):F(e,t)}var B="undefined"!=typeof TextDecoder&&new TextDecoder;try{B.decode(O,{stream:!0}),1}catch(Z){}"function"==typeof queueMicrotask?queueMicrotask:"function"==typeof setTimeout&&setTimeout},30785:e=>{"use strict";var t=Object.prototype.toString,n=Math.max,r=function(e,t){for(var n=[],r=0;r{"use strict";var r=n(30785);e.exports=Function.prototype.bind||r},78559:(e,t,n)=>{"use strict";var r,i=SyntaxError,o=Function,a=TypeError,s=function(e){try{return o('"use strict"; return ('+e+").constructor;")()}catch(t){}},l=Object.getOwnPropertyDescriptor;if(l)try{l({},"")}catch(M){l=null}var c=function(){throw new a},u=l?function(){try{return c}catch(e){try{return l(arguments,"callee").get}catch(t){return c}}}():c,d=n(52505)(),f=n(58982)(),h=Object.getPrototypeOf||(f?function(e){return e.__proto__}:null),p={},g="undefined"!==typeof Uint8Array&&h?h(Uint8Array):r,m={"%AggregateError%":"undefined"===typeof AggregateError?r:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"===typeof ArrayBuffer?r:ArrayBuffer,"%ArrayIteratorPrototype%":d&&h?h([][Symbol.iterator]()):r,"%AsyncFromSyncIteratorPrototype%":r,"%AsyncFunction%":p,"%AsyncGenerator%":p,"%AsyncGeneratorFunction%":p,"%AsyncIteratorPrototype%":p,"%Atomics%":"undefined"===typeof Atomics?r:Atomics,"%BigInt%":"undefined"===typeof BigInt?r:BigInt,"%BigInt64Array%":"undefined"===typeof BigInt64Array?r:BigInt64Array,"%BigUint64Array%":"undefined"===typeof BigUint64Array?r:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"===typeof DataView?r:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":"undefined"===typeof Float32Array?r:Float32Array,"%Float64Array%":"undefined"===typeof Float64Array?r:Float64Array,"%FinalizationRegistry%":"undefined"===typeof FinalizationRegistry?r:FinalizationRegistry,"%Function%":o,"%GeneratorFunction%":p,"%Int8Array%":"undefined"===typeof Int8Array?r:Int8Array,"%Int16Array%":"undefined"===typeof Int16Array?r:Int16Array,"%Int32Array%":"undefined"===typeof Int32Array?r:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":d&&h?h(h([][Symbol.iterator]())):r,"%JSON%":"object"===typeof JSON?JSON:r,"%Map%":"undefined"===typeof Map?r:Map,"%MapIteratorPrototype%":"undefined"!==typeof Map&&d&&h?h((new Map)[Symbol.iterator]()):r,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"===typeof Promise?r:Promise,"%Proxy%":"undefined"===typeof Proxy?r:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":"undefined"===typeof Reflect?r:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"===typeof Set?r:Set,"%SetIteratorPrototype%":"undefined"!==typeof Set&&d&&h?h((new Set)[Symbol.iterator]()):r,"%SharedArrayBuffer%":"undefined"===typeof SharedArrayBuffer?r:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":d&&h?h(""[Symbol.iterator]()):r,"%Symbol%":d?Symbol:r,"%SyntaxError%":i,"%ThrowTypeError%":u,"%TypedArray%":g,"%TypeError%":a,"%Uint8Array%":"undefined"===typeof Uint8Array?r:Uint8Array,"%Uint8ClampedArray%":"undefined"===typeof Uint8ClampedArray?r:Uint8ClampedArray,"%Uint16Array%":"undefined"===typeof Uint16Array?r:Uint16Array,"%Uint32Array%":"undefined"===typeof Uint32Array?r:Uint32Array,"%URIError%":URIError,"%WeakMap%":"undefined"===typeof WeakMap?r:WeakMap,"%WeakRef%":"undefined"===typeof WeakRef?r:WeakRef,"%WeakSet%":"undefined"===typeof WeakSet?r:WeakSet};if(h)try{null.error}catch(M){var v=h(h(M));m["%Error.prototype%"]=v}var A=function e(t){var n;if("%AsyncFunction%"===t)n=s("async function () {}");else if("%GeneratorFunction%"===t)n=s("function* () {}");else if("%AsyncGeneratorFunction%"===t)n=s("async function* () {}");else if("%AsyncGenerator%"===t){var r=e("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if("%AsyncIteratorPrototype%"===t){var i=e("%AsyncGenerator%");i&&h&&(n=h(i.prototype))}return m[t]=n,n},y={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},b=n(91989),_=n(85088),w=b.call(Function.call,Array.prototype.concat),x=b.call(Function.apply,Array.prototype.splice),E=b.call(Function.call,String.prototype.replace),S=b.call(Function.call,String.prototype.slice),C=b.call(Function.call,RegExp.prototype.exec),P=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,T=/\\(\\)?/g,k=function(e,t){var n,r=e;if(_(y,r)&&(r="%"+(n=y[r])[0]+"%"),_(m,r)){var o=m[r];if(o===p&&(o=A(r)),"undefined"===typeof o&&!t)throw new a("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:n,name:r,value:o}}throw new i("intrinsic "+e+" does not exist!")};e.exports=function(e,t){if("string"!==typeof e||0===e.length)throw new a("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!==typeof t)throw new a('"allowMissing" argument must be a boolean');if(null===C(/^%?[^%]*%?$/,e))throw new i("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=function(e){var t=S(e,0,1),n=S(e,-1);if("%"===t&&"%"!==n)throw new i("invalid intrinsic syntax, expected closing `%`");if("%"===n&&"%"!==t)throw new i("invalid intrinsic syntax, expected opening `%`");var r=[];return E(e,P,(function(e,t,n,i){r[r.length]=n?E(i,T,"$1"):t||e})),r}(e),r=n.length>0?n[0]:"",o=k("%"+r+"%",t),s=o.name,c=o.value,u=!1,d=o.alias;d&&(r=d[0],x(n,w([0,1],d)));for(var f=1,h=!0;f=n.length){var A=l(c,p);c=(h=!!A)&&"get"in A&&!("originalValue"in A.get)?A.get:c[p]}else h=_(c,p),c=c[p];h&&!u&&(m[s]=c)}}return c}},13134:(e,t,n)=>{"use strict";n.d(t,{Ib:()=>r,WT:()=>i});var r=1e-6,i="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)})},44649:(e,t,n)=>{"use strict";n.d(t,{G3:()=>v,GH:()=>a,Iu:()=>l,Jp:()=>s,M5:()=>A,Q$:()=>p,U1:()=>u,U_:()=>o,bA:()=>c,en:()=>g,fS:()=>b,jI:()=>h,lM:()=>d,oy:()=>m,p4:()=>i,uD:()=>f,zB:()=>y});var r=n(13134);function i(e,t){if(e===t){var n=t[1],r=t[2],i=t[3],o=t[6],a=t[7],s=t[11];e[1]=t[4],e[2]=t[8],e[3]=t[12],e[4]=n,e[6]=t[9],e[7]=t[13],e[8]=r,e[9]=o,e[11]=t[14],e[12]=i,e[13]=a,e[14]=s}else e[0]=t[0],e[1]=t[4],e[2]=t[8],e[3]=t[12],e[4]=t[1],e[5]=t[5],e[6]=t[9],e[7]=t[13],e[8]=t[2],e[9]=t[6],e[10]=t[10],e[11]=t[14],e[12]=t[3],e[13]=t[7],e[14]=t[11],e[15]=t[15];return e}function o(e,t){var n=t[0],r=t[1],i=t[2],o=t[3],a=t[4],s=t[5],l=t[6],c=t[7],u=t[8],d=t[9],f=t[10],h=t[11],p=t[12],g=t[13],m=t[14],v=t[15],A=n*s-r*a,y=n*l-i*a,b=n*c-o*a,_=r*l-i*s,w=r*c-o*s,x=i*c-o*l,E=u*g-d*p,S=u*m-f*p,C=u*v-h*p,P=d*m-f*g,T=d*v-h*g,k=f*v-h*m,M=A*k-y*T+b*P+_*C-w*S+x*E;return M?(M=1/M,e[0]=(s*k-l*T+c*P)*M,e[1]=(i*T-r*k-o*P)*M,e[2]=(g*x-m*w+v*_)*M,e[3]=(f*w-d*x-h*_)*M,e[4]=(l*C-a*k-c*S)*M,e[5]=(n*k-i*C+o*S)*M,e[6]=(m*b-p*x-v*y)*M,e[7]=(u*x-f*b+h*y)*M,e[8]=(a*T-s*C+c*E)*M,e[9]=(r*C-n*T-o*E)*M,e[10]=(p*w-g*b+v*A)*M,e[11]=(d*b-u*w-h*A)*M,e[12]=(s*S-a*P-l*E)*M,e[13]=(n*P-r*S+i*E)*M,e[14]=(g*y-p*_-m*A)*M,e[15]=(u*_-d*y+f*A)*M,e):null}function a(e){var t=e[0],n=e[1],r=e[2],i=e[3],o=e[4],a=e[5],s=e[6],l=e[7],c=e[8],u=e[9],d=e[10],f=e[11],h=e[12],p=e[13],g=e[14],m=e[15];return(t*a-n*o)*(d*m-f*g)-(t*s-r*o)*(u*m-f*p)+(t*l-i*o)*(u*g-d*p)+(n*s-r*a)*(c*m-f*h)-(n*l-i*a)*(c*g-d*h)+(r*l-i*s)*(c*p-u*h)}function s(e,t,n){var r=t[0],i=t[1],o=t[2],a=t[3],s=t[4],l=t[5],c=t[6],u=t[7],d=t[8],f=t[9],h=t[10],p=t[11],g=t[12],m=t[13],v=t[14],A=t[15],y=n[0],b=n[1],_=n[2],w=n[3];return e[0]=y*r+b*s+_*d+w*g,e[1]=y*i+b*l+_*f+w*m,e[2]=y*o+b*c+_*h+w*v,e[3]=y*a+b*u+_*p+w*A,y=n[4],b=n[5],_=n[6],w=n[7],e[4]=y*r+b*s+_*d+w*g,e[5]=y*i+b*l+_*f+w*m,e[6]=y*o+b*c+_*h+w*v,e[7]=y*a+b*u+_*p+w*A,y=n[8],b=n[9],_=n[10],w=n[11],e[8]=y*r+b*s+_*d+w*g,e[9]=y*i+b*l+_*f+w*m,e[10]=y*o+b*c+_*h+w*v,e[11]=y*a+b*u+_*p+w*A,y=n[12],b=n[13],_=n[14],w=n[15],e[12]=y*r+b*s+_*d+w*g,e[13]=y*i+b*l+_*f+w*m,e[14]=y*o+b*c+_*h+w*v,e[15]=y*a+b*u+_*p+w*A,e}function l(e,t,n){var r,i,o,a,s,l,c,u,d,f,h,p,g=n[0],m=n[1],v=n[2];return t===e?(e[12]=t[0]*g+t[4]*m+t[8]*v+t[12],e[13]=t[1]*g+t[5]*m+t[9]*v+t[13],e[14]=t[2]*g+t[6]*m+t[10]*v+t[14],e[15]=t[3]*g+t[7]*m+t[11]*v+t[15]):(r=t[0],i=t[1],o=t[2],a=t[3],s=t[4],l=t[5],c=t[6],u=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]=c,e[7]=u,e[8]=d,e[9]=f,e[10]=h,e[11]=p,e[12]=r*g+s*m+d*v+t[12],e[13]=i*g+l*m+f*v+t[13],e[14]=o*g+c*m+h*v+t[14],e[15]=a*g+u*m+p*v+t[15]),e}function c(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}function u(e,t,n,i){var o,a,s,l,c,u,d,f,h,p,g,m,v,A,y,b,_,w,x,E,S,C,P,T,k=i[0],M=i[1],O=i[2],R=Math.hypot(k,M,O);return R{"use strict";n.d(t,{IH:()=>i,fF:()=>l,kK:()=>s,t7:()=>a,tk:()=>o});var r=n(13134);function i(e,t,n){return e[0]=t[0]+n[0],e[1]=t[1]+n[1],e}function o(e,t){return e[0]=-t[0],e[1]=-t[1],e}function a(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 s(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 l(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}!function(){var e=function(){var e=new r.WT(2);return r.WT!=Float32Array&&(e[0]=0,e[1]=0),e}()}()},58034:(e,t,n)=>{"use strict";n.d(t,{AK:()=>c,EU:()=>A,Fv:()=>l,IH:()=>a,Ue:()=>i,VC:()=>p,Zh:()=>_,al:()=>o,dC:()=>b,fF:()=>f,jI:()=>v,kC:()=>u,kK:()=>h,lM:()=>g,lu:()=>y,t7:()=>d,tk:()=>s,uD:()=>m,x9:()=>w});var r=n(13134);function i(){var e=new r.WT(3);return r.WT!=Float32Array&&(e[0]=0,e[1]=0,e[2]=0),e}function o(e,t,n){var i=new r.WT(3);return i[0]=e,i[1]=t,i[2]=n,i}function a(e,t,n){return e[0]=t[0]+n[0],e[1]=t[1]+n[1],e[2]=t[2]+n[2],e}function s(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e}function l(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 u(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 d(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 f(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 h(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 p(e,t,n){var r=n[0],i=n[1],o=n[2],a=n[3],s=t[0],l=t[1],c=t[2],u=i*c-o*l,d=o*s-r*c,f=r*l-i*s,h=i*f-o*d,p=o*u-r*f,g=r*d-i*u,m=2*a;return u*=m,d*=m,f*=m,h*=2,p*=2,g*=2,e[0]=s+u+h,e[1]=l+d+p,e[2]=c+f+g,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 v(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 A(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 y=function(e,t,n){return e[0]=t[0]-n[0],e[1]=t[1]-n[1],e[2]=t[2]-n[2],e},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},_=function(e){var t=e[0],n=e[1],r=e[2];return Math.hypot(t,n,r)},w=function(e){var t=e[0],n=e[1],r=e[2];return t*t+n*n+r*r};!function(){var e=i()}()},81723:(e,t,n)=>{"use strict";n.d(t,{AK:()=>h,Fv:()=>f,I6:()=>v,IH:()=>l,JG:()=>a,VC:()=>m,al:()=>o,bA:()=>c,d9:()=>i,fF:()=>g,fS:()=>A,kE:()=>u,t7:()=>p,t8:()=>s,we:()=>d});var r=n(13134);function i(e){var t=new r.WT(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.WT(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 c(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 u(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 g(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 m(e,t,n){var r=t[0],i=t[1],o=t[2],a=n[0],s=n[1],l=n[2],c=n[3],u=c*r+s*o-l*i,d=c*i+l*r-a*o,f=c*o+a*i-s*r,h=-a*r-s*i-l*o;return e[0]=u*c+h*-a+d*-l-f*-s,e[1]=d*c+h*-s+f*-a-u*-l,e[2]=f*c+h*-l+u*-s-d*-a,e[3]=t[3],e}function v(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]}function A(e,t){var n=e[0],i=e[1],o=e[2],a=e[3],s=t[0],l=t[1],c=t[2],u=t[3];return Math.abs(n-s)<=r.Ib*Math.max(1,Math.abs(n),Math.abs(s))&&Math.abs(i-l)<=r.Ib*Math.max(1,Math.abs(i),Math.abs(l))&&Math.abs(o-c)<=r.Ib*Math.max(1,Math.abs(o),Math.abs(c))&&Math.abs(a-u)<=r.Ib*Math.max(1,Math.abs(a),Math.abs(u))}!function(){var e=function(){var e=new r.WT(4);return r.WT!=Float32Array&&(e[0]=0,e[1]=0,e[2]=0,e[3]=0),e}()}()},95770:(e,t,n)=>{"use strict";var r=n(78559)("%Object.getOwnPropertyDescriptor%",!0);if(r)try{r([],"length")}catch(i){r=null}e.exports=r},84444:(e,t,n)=>{"use strict";n.d(t,{AI:()=>M,Cx:()=>O,Ji:()=>N,Lg:()=>I,U7:()=>D,VP:()=>R,kU:()=>L,v8:()=>k});var r=function(e){var t,n="undefined"!==typeof(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=Y(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 c=0,u=function(){return c};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&&void 0!==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)s=65536+((1023&s)<<10)|1023&e.charCodeAt(++a);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,A,t,n)})(e,t=ee(n),n)}return t},array:function(e){var t=ee(e.length);return function(e,t){v.set(e,t)}(e,t),t}};var a=f(e),s=[],l=0;if(r)for(var c=0;c=r);)++i;if(i-t>16&&e.subarray&&p)return p.decode(e.subarray(t,i));for(var o="";t>10,56320|1023&c)}}else o+=String.fromCharCode((31&a)<<6|s)}else o+=String.fromCharCode(a)}return o}(A,e,t):""}var m,v,A,y,b,_,w;"undefined"!==typeof TextDecoder&&new TextDecoder("utf-16le");function x(e,t){return e%t>0&&(e+=t-e%t),e}function E(e){m=e,n.HEAP8=v=new Int8Array(e),n.HEAP16=y=new Int16Array(e),n.HEAP32=b=new Int32Array(e),n.HEAPU8=A=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 S=n.TOTAL_MEMORY||33554432;function C(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()}}S=(m=n.buffer?n.buffer:new ArrayBuffer(S)).byteLength,E(m),b[6004]=5266928;var P=[],T=[],k=[],M=[];var O=Math.abs,R=Math.ceil,I=Math.floor,L=Math.min,N=0,D=null,F=null;n.preloadedImages={},n.preloadedAudios={};var j,B,Z=null,z="data:application/octet-stream;base64,";function U(e){return String.prototype.startsWith?e.startsWith(z):0===e.indexOf(z)}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 H(e){return e}function V(e){return e.replace(/\b__Z[\w\d_]+/g,(function(e){return e===e?e:e+" ["+e+"]"}))}function W(){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 G(){return v.length}function K(e){try{var t=new ArrayBuffer(e);if(t.byteLength!=e)return;return new Int8Array(t).set(v),J(t),E(t),1}catch(n){}}var q="function"===typeof atob?atob:function(e){var t,n,r,i,o,a,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",l="",c=0;e=e.replace(/[^A-Za-z0-9\+\/\=]/g,"");do{t=s.indexOf(e.charAt(c++))<<2|(i=s.indexOf(e.charAt(c++)))>>4,n=(15&i)<<4|(o=s.indexOf(e.charAt(c++)))>>2,r=(3&o)<<6|(a=s.indexOf(e.charAt(c++))),l+=String.fromCharCode(t),64!==o&&(l+=String.fromCharCode(n)),64!==a&&(l+=String.fromCharCode(r))}while(c>2]=e,i[s+4>>2]=t,(s=0!=(0|o))&&(i[o>>2]=0),0|Le(e,t))return M=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|L(s,t,4,p)))&0==(0|(t=0|x()))){s=2;break e}if(0|Le(s,t)){s=1;break e}}if(0==(0|(s=0|L(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),u=6==(0|(c=d+1|0)),0|Le(s,t)){s=1;break e}if((0|(f=f+(u&e&1)|0))>(0|n)){s=0;break}d=e?u?0:c: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|L(s,t,4,p)))&0==(0|(t=0|x()))){s=2;break e}if(0|Le(s,t)){s=1;break e}}if(0==(0|(s=0|L(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),u=6==(0|(c=d+1|0)),0|Le(s,t)){s=1;break e}if((0|(f=f+(u&e&1)|0))>(0|n)){s=0;break}d=e?u?0:c:d,h=h+1|0,l=e?0:l}else s=0}while(0);return M=a,0|(p=s)}function I(e,t,n,r,o,a,s){n|=0,r|=0,o|=0,a|=0,s|=0;var l,c,u=0,d=0,f=0,h=0,p=0;if(c=M,M=M+16|0,l=c,0==(0|(e|=0))&0==(0|(t|=0)))M=c;else{if(u=0|xt(0|e,0|t,0|a,((0|a)<0)<<31>>31|0),x(),!(0==(0|(p=0|i[(h=d=r+(u<<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+((u=(u+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));u=o+(u<<2)|0,f&&(0|i[u>>2])<=(0|s)||(i[(p=d)>>2]=e,i[p+4>>2]=t,i[u>>2]=s,(0|s)>=(0|n)||(p=s+1|0,i[l>>2]=0,I(h=0|L(e,t,2,l),0|x(),n,r,o,a,p),i[l>>2]=0,I(h=0|L(e,t,3,l),0|x(),n,r,o,a,p),i[l>>2]=0,I(h=0|L(e,t,1,l),0|x(),n,r,o,a,p),i[l>>2]=0,I(h=0|L(e,t,5,l),0|x(),n,r,o,a,p),i[l>>2]=0,I(h=0|L(e,t,4,l),0|x(),n,r,o,a,p),i[l>>2]=0,I(h=0|L(e,t,6,l),0|x(),n,r,o,a,p))),M=c}}function L(e,t,n,r){e|=0,t|=0,n|=0;var o,a,s=0,l=0,c=0,u=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|Et(0|e,0|t,45),x(),a=127&o,l=0|Ne(e,t),s=0|Et(0|e,0|t,52),x(),s&=15;e:do{if(s)for(;;){if(f=0|Et(0|e,0|t,0|(d=3*(15-s|0)|0)),x(),f&=7,h=0==(0|Ze(s)),s=s+-1|0,u=0|St(7,0,0|d),t&=~(0|x()),e=(d=0|St(0|i[(h?464:48)+(28*f|0)+(n<<2)>>2],0,0|d))|e&~u,t|=0|x(),!(n=0|i[(h?672:256)+(28*f|0)+(n<<2)>>2])){n=0;break e}if(!s){c=6;break}}else c=6}while(0);6==(0|c)&&(e|=f=0|St(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|St(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]))),c=0|Et(0|e,0|t,45),x(),c&=127;e:do{if(0|D(c)){t:do{if(1==(0|Ne(e,t))){if((0|a)!=(0|c)){if(0|Z(c,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|De(e,t),t=0|x(),s=s+1|0}while((0|s)!=(0|n))}if((0|a)!=(0|c)){if(!(0|F(c))){if(0!=(0|l)|5!=(0|Ne(e,t)))break;i[r>>2]=1+(0|i[r>>2]);break}switch(127&o){case 8:case 118:break e}3!=(0|Ne(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 N(e,t,n,r,a,s){t|=0,n|=0,r|=0,a|=0,s|=0;var l,c,u,d,f,h,p,g,m,v=0,A=0,y=0,b=0,_=0,w=0,E=0,S=0,C=0,P=0,T=0,k=0,O=0,R=0;if(m=M,M=M+48|0,h=m+32|0,p=m+16|0,g=m,(0|(v=0|i[(e|=0)>>2]))<=0)return M=m,0|(k=0);l=e+4|0,c=h+8|0,u=p+8|0,d=g+8|0,f=((0|t)<0)<<31>>31,T=0;e:for(;;){C=(A=0|i[l>>2])+(T<<4)|0,i[h>>2]=i[C>>2],i[h+4>>2]=i[C+4>>2],i[h+8>>2]=i[C+8>>2],i[h+12>>2]=i[C+12>>2],(0|T)==(v+-1|0)?(i[p>>2]=i[A>>2],i[p+4>>2]=i[A+4>>2],i[p+8>>2]=i[A+8>>2],i[p+12>>2]=i[A+12>>2]):(C=A+(T+1<<4)|0,i[p>>2]=i[C>>2],i[p+4>>2]=i[C+4>>2],i[p+8>>2]=i[C+8>>2],i[p+12>>2]=i[C+12>>2]),C=0|G(h,p,n);t:do{if((0|C)>0){P=+(0|C),S=0;n:for(;;){R=+(C-S|0),O=+(0|S),o[g>>3]=+o[h>>3]*R/P+ +o[p>>3]*O/P,o[d>>3]=+o[c>>3]*R/P+ +o[u>>3]*O/P,A=0|xt(0|(w=0|ze(g,n)),0|(E=0|x()),0|t,0|f),x(),b=0|i[(y=v=s+(A<<3)|0)>>2],y=0|i[y+4>>2];r:do{if(0==(0|b)&0==(0|y))k=14;else for(_=0;;){if((0|_)>(0|t)){v=1;break r}if((0|b)==(0|w)&(0|y)==(0|E)){v=7;break r}if(0==(0|(b=0|i[(y=v=s+((A=(A+1|0)%(0|t)|0)<<3)|0)>>2]))&0==(0|(y=0|i[y+4>>2]))){k=14;break}_=_+1|0}}while(0);switch(14==(0|k)&&(k=0,0==(0|w)&0==(0|E)?v=7:(i[v>>2]=w,i[v+4>>2]=E,v=0|i[r>>2],i[(_=a+(v<<3)|0)>>2]=w,i[_+4>>2]=E,i[r>>2]=v+1,v=0)),7&v){case 7:case 0:break;default:break n}if((0|C)<=(0|(S=S+1|0))){k=8;break t}}if(0|v){v=-1,k=20;break e}}else k=8}while(0);if(8==(0|k)&&(k=0),(0|(T=T+1|0))>=(0|(v=0|i[e>>2]))){v=0,k=20;break}}return 20==(0|k)?(M=m,0|v):0}function D(e){return 0|i[7728+(28*(e|=0)|0)+16>>2]}function F(e){return 4==(0|(e|=0))|117==(0|e)|0}function j(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 z(e,t){return 0|i[880+(28*(e|=0)|0)+((t|=0)<<2)>>2]}function U(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 H(e){return+o[(e|=0)+16>>3]<+o[e+24>>3]|0}function V(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 Ge(t,a),Ve(f=0|i[(d=a)>>2],d=0|i[d+4>>2],n),We(f,d,r),c=+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],u=+Te(n,r),f=~~+A(+u*u/+Ct(+ +l(+(+o[d>>3]-+o[f>>3])/(+o[n>>3]-+o[r>>3])),3)/(c*(2.59807621135*c)*.8)),M=s,0|(0==(0|f)?1:f)}function G(e,t,n){e|=0,t|=0,n|=0;var r,o,a,s,l,c=0,u=0;s=M,M=M+288|0,r=s+264|0,o=s+96|0,u=(c=a=s)+96|0;do{i[c>>2]=0,c=c+4|0}while((0|c)<(0|u));return Ge(n,a),Ve(c=0|i[(u=a)>>2],u=0|i[u+4>>2],r),We(c,u,o),l=+Te(r,o+8|0),u=~~+A(+ +Te(e,t)/(2*l)),M=s,0|(0==(0|u)?1:u)}function K(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 q(e,t){e|=0;var n,r,a,s,c=0,u=0,d=0,f=0,h=0,p=0,g=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|(c=~~f)),h-=+(0|(e=~~h));do{if(f<.5){if(f<.3333333333333333){if(i[t>>2]=c,h<.5*(f+1)){i[t+4>>2]=e;break}e=e+1|0,i[t+4>>2]=e;break}if(e=(1&!(h<(g=1-f)))+e|0,i[t+4>>2]=e,g<=h&h<2*f){c=c+1|0,i[t>>2]=c;break}i[t>>2]=c;break}if(!(f<.6666666666666666)){if(c=c+1|0,i[t>>2]=c,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]=c;break}}else e=e+1|0,i[t+4>>2]=e;c=c+1|0,i[t>>2]=c}while(0);do{if(r<0){if(1&e){c=~~(+(0|c)-(2*(+((p=0|bt(0|c,((0|c)<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]=c;break}c=~~(+(0|c)-2*(+((p=0|bt(0|c,((0|c)<0)<<31>>31|0,0|(p=(0|e)/2|0),((0|p)<0)<<31>>31|0))>>>0)+4294967296*+(0|x()))),i[t>>2]=c;break}}while(0);p=t+4|0,a<0&&(c=c-((1|e<<1)/2|0)|0,i[t>>2]=c,e=0-e|0,i[p>>2]=e),u=e-c|0,(0|c)<0?(d=0-c|0,i[p>>2]=u,i[s>>2]=d,i[t>>2]=0,e=u,c=0):d=0,(0|e)<0&&(c=c-e|0,i[t>>2]=c,d=d-e|0,i[s>>2]=d,i[p>>2]=0,e=0),n=c-d|0,u=e-d|0,(0|d)<0&&(i[t>>2]=n,i[p>>2]=u,i[s>>2]=0,e=u,c=n,d=0),(0|(u=(0|d)<(0|(u=(0|e)<(0|c)?e:c))?d:u))<=0||(i[t>>2]=c-u,i[p>>2]=e-u,i[s>>2]=d-u)}function Y(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 X(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 $(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 Q(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 J(e,t){t|=0;var n,r=0;r=0|y(0|i[(e|=0)>>2],t),i[e>>2]=r,n=0|y(0|i[(r=e+4|0)>>2],t),i[r>>2]=n,t=0|y(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|mt(+((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|mt(+((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|mt(+(((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|mt(+((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 ce(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 ue(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 ge(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 me(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 ve(e,t,n,r){t|=0,n|=0,r|=0;var a,s=0,l=0,c=0,u=0;if(a=M,M=M+32|0,function(e,t){e|=0,t|=0;var n=0,r=0,i=0;n=+o[e>>3],r=+d(+n),n=+f(+n),o[t+16>>3]=n,n=+o[e+8>>3],i=r*+d(+n),o[t>>3]=i,n=r*+f(+n),o[t+8>>3]=n}(e|=0,l=a),i[n>>2]=0,s=+lt(15888,l),(c=+lt(15912,l))>2]=1,s=c),(c=+lt(15936,l))>2]=2,s=c),(c=+lt(15960,l))>2]=3,s=c),(c=+lt(15984,l))>2]=4,s=c),(c=+lt(16008,l))>2]=5,s=c),(c=+lt(16032,l))>2]=6,s=c),(c=+lt(16056,l))>2]=7,s=c),(c=+lt(16080,l))>2]=8,s=c),(c=+lt(16104,l))>2]=9,s=c),(c=+lt(16128,l))>2]=10,s=c),(c=+lt(16152,l))>2]=11,s=c),(c=+lt(16176,l))>2]=12,s=c),(c=+lt(16200,l))>2]=13,s=c),(c=+lt(16224,l))>2]=14,s=c),(c=+lt(16248,l))>2]=15,s=c),(c=+lt(16272,l))>2]=16,s=c),(c=+lt(16296,l))>2]=17,s=c),(c=+lt(16320,l))>2]=18,s=c),(c=+lt(16344,l))>2]=19,s=c),(c=+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(M=a);if(n=0|i[n>>2],s=+Ce((s=+o[16368+(24*n|0)>>3])-+Ce(+function(e,t){e|=0,t|=0;var n=0,r=0,i=0,a=0,s=0;return a=+o[t>>3],r=+d(+a),i=+o[t+8>>3]-+o[e+8>>3],s=r*+f(+i),n=+o[e>>3],+ +v(+s,+(+f(+a)*+d(+n)-+d(+i)*(r*+f(+n))))}(15568+(n<<4)|0,e))),u=0|Ze(t)?+Ce(s+-.3334731722518321):s,s=+h(+c)/.381966011250105,(0|t)>0){l=0;do{s*=2.6457513110645907,l=l+1|0}while((0|l)!=(0|t))}c=+d(+u)*s,o[r>>3]=c,u=+f(+u)*s,o[r+8>>3]=u,M=a}function Ae(e,t,n,r,a){t|=0,n|=0,r|=0,a|=0;var s=0,u=0;if(s=+function(e){e|=0;var t=0,n=0;return n=+o[e>>3],t=+o[e+8>>3],+ +c(+(n*n+t*t))}(e|=0),s<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(u=+v(+ +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=+m(.381966011250105*(n?s:s/2.6457513110645907))):(s=+m(.381966011250105*s),0|Ze(n)&&(u=+Ce(u+.3334731722518321))),function(e,t,n,r){e|=0,t=+t,n=+n,r|=0;var a=0,s=0,c=0,u=0;if(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(c=+d(+n),n=+f(+n),t=c*+f(+t)+ +d(+s)*(n*+d(+t)),t=+g(+((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(u=+d(+t),s=n*+f(+s)/u,n=+o[e>>3],t=(c-+f(+t)*+f(+n))/+d(+n)/u,c=s>1?1:s,t=t>1?1:t,(t=+o[e+8>>3]+ +v(+(c<-1?-1:c),+(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],t>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,+Ce(+o[16368+(24*t|0)>>3]-u),s,a)}function ye(e,t,n){t|=0,n|=0;var r,o;r=M,M=M+16|0,X((e|=0)+4|0,o=r),Ae(o,0|i[e>>2],t,0,n),M=r}function be(e,t,n,r,a){e|=0,t|=0,n|=0,r|=0,a|=0;var s,l,c,u,d,f,h,p,g,m,v,A,y,b,_,w,x,S,C,P,T,k,O=0,R=0,I=0,L=0,N=0,D=0;if(k=M,M=M+272|0,L=k+240|0,C=k,P=k+224|0,T=k+208|0,v=k+176|0,A=k+160|0,y=k+192|0,b=k+144|0,_=k+128|0,w=k+112|0,x=k+96|0,S=k+80|0,i[(O=k+256|0)>>2]=t,i[L>>2]=i[e>>2],i[L+4>>2]=i[e+4>>2],i[L+8>>2]=i[e+8>>2],i[L+12>>2]=i[e+12>>2],_e(L,O,C),i[a>>2]=0,(0|(L=r+n+(5==(0|r)&1)|0))<=(0|n))M=k;else{l=P+4|0,c=v+4|0,u=n+5|0,d=16848+((s=0|i[O>>2])<<2)|0,f=16928+(s<<2)|0,h=_+8|0,p=w+8|0,g=x+8|0,m=T+4|0,I=n;e:for(;;){R=C+(((0|I)%5|0)<<4)|0,i[T>>2]=i[R>>2],i[T+4>>2]=i[R+4>>2],i[T+8>>2]=i[R+8>>2],i[T+12>>2]=i[R+12>>2];do{}while(2==(0|we(T,s,0,1)));if((0|I)>(0|n)&0!=(0|Ze(t))){if(i[v>>2]=i[T>>2],i[v+4>>2]=i[T+4>>2],i[v+8>>2]=i[T+8>>2],i[v+12>>2]=i[T+12>>2],X(l,A),r=0|i[v>>2],O=0|i[17008+(80*r|0)+(i[P>>2]<<2)>>2],i[v>>2]=i[18608+(80*r|0)+(20*O|0)>>2],(0|(R=0|i[18608+(80*r|0)+(20*O|0)+16>>2]))>0){e=0;do{ae(c),e=e+1|0}while((0|e)<(0|R))}switch(R=18608+(80*r|0)+(20*O|0)+4|0,i[y>>2]=i[R>>2],i[y+4>>2]=i[R+4>>2],i[y+8>>2]=i[R+8>>2],J(y,3*(0|i[d>>2])|0),$(c,y,c),Y(c),X(c,b),N=+(0|i[f>>2]),o[_>>3]=3*N,o[h>>3]=0,D=-1.5*N,o[w>>3]=D,o[p>>3]=2.598076211353316*N,o[x>>3]=D,o[g>>3]=-2.598076211353316*N,0|i[17008+(80*(0|i[v>>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(A,b,r,e,S),Ae(S,0|i[v>>2],s,1,a+8+(i[a>>2]<<4)|0),i[a>>2]=1+(0|i[a>>2])}if((0|I)<(0|u)&&(X(m,v),Ae(v,0|i[T>>2],s,1,a+8+(i[a>>2]<<4)|0),i[a>>2]=1+(0|i[a>>2])),i[P>>2]=i[T>>2],i[P+4>>2]=i[T+4>>2],i[P+8>>2]=i[T+8>>2],i[P+12>>2]=i[T+12>>2],(0|(I=I+1|0))>=(0|L)){e=3;break}}3!=(0|e)?12==(0|e)&&E(22474,22521,581,22531):M=k}}function _e(e,t,n){e|=0,t|=0,n|=0;var r,o=0,a=0,s=0,l=0,c=0;r=M,M=M+128|0,a=r,l=20208,c=(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|c));l=20272,c=(s=a)+60|0;do{i[s>>2]=i[l>>2],s=s+4|0,l=l+4|0}while((0|s)<(0|c));o=(c=0==(0|Ze(0|i[t>>2])))?o:a,ue(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],$(a,o,t=n+4|0),Y(t),i[n+16>>2]=i[e>>2],$(a,o+12|0,t=n+20|0),Y(t),i[n+32>>2]=i[e>>2],$(a,o+24|0,t=n+36|0),Y(t),i[n+48>>2]=i[e>>2],$(a,o+36|0,t=n+52|0),Y(t),i[n+64>>2]=i[e>>2],$(a,o+48|0,n=n+68|0),Y(n),M=r}function we(e,t,n,r){n|=0,r|=0;var o,a,s,l,c,u,d=0,f=0,h=0,p=0,g=0;if(u=M,M=M+32|0,c=u+12|0,a=u,g=(e|=0)+4|0,p=0|i[16928+((t|=0)<<2)>>2],p=(l=0!=(0|r))?3*p|0:p,d=0|i[g>>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 M=u,0|(g=1);h=f}else d=o+d+(r=0|i[(h=e+12|0)>>2])|0;if((0|d)<=(0|p))return M=u,0|(g=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?(K(c,p,0,0),Q(g,c,a),se(a),$(a,c,g),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(g),r=r+1|0}while((0|r)<(0|i[d>>2]))}return e=f+4|0,i[c>>2]=i[e>>2],i[c+4>>2]=i[e+4>>2],i[c+8>>2]=i[e+8>>2],t=0|i[16848+(t<<2)>>2],J(c,l?3*t|0:t),$(g,c,g),Y(g),r=l&&((0|i[s>>2])+(0|i[g>>2])+(0|i[h>>2])|0)==(0|p)?1:2,M=u,0|(g=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 Ee(e,t,n,r,a){e|=0,t|=0,n|=0,r|=0,a|=0;var s,l,c,u,d,f,h,p,g,m,v,A,y,b,_,w,x,S,C=0,P=0,T=0,k=0,O=0;if(S=M,M=M+240|0,b=S+208|0,_=S,w=S+192|0,x=S+176|0,g=S+160|0,m=S+144|0,v=S+128|0,A=S+112|0,y=S+96|0,i[(C=S+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],Se(b,C,_),i[a>>2]=0,(0|(p=r+n+(6==(0|r)&1)|0))<=(0|n))M=S;else{l=n+6|0,c=16928+((s=0|i[C>>2])<<2)|0,u=m+8|0,d=v+8|0,f=A+8|0,h=w+4|0,P=0,T=n,r=-1;e:for(;;){if(e=_+((C=(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=P,P=0|we(w,s,0,1),(0|T)>(0|n)&0!=(0|Ze(t))&&(1!=(0|e)&&(0|i[w>>2])!=(0|r))){switch(X(_+(((C+5|0)%6|0)<<4)+4|0,x),X(_+(C<<4)+4|0,g),k=+(0|i[c>>2]),o[m>>3]=3*k,o[u>>3]=0,O=-1.5*k,o[v>>3]=O,o[d>>3]=2.598076211353316*k,o[A>>3]=O,o[f>>3]=-2.598076211353316*k,C=0|i[b>>2],0|i[17008+(80*C|0)+(((0|r)==(0|C)?0|i[w>>2]:r)<<2)>>2]){case 1:e=v,r=m;break;case 3:e=A,r=v;break;case 2:e=m,r=A;break;default:e=8;break e}at(x,g,r,e,y),0|st(x,y)||0|st(g,y)||(Ae(y,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)&&(X(h,x),Ae(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)&&E(22557,22521,746,22602):M=S}}function Se(e,t,n){e|=0,t|=0,n|=0;var r,o=0,a=0,s=0,l=0,c=0;r=M,M=M+160|0,a=r,l=20336,c=(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|c));l=20416,c=(s=a)+72|0;do{i[s>>2]=i[l>>2],s=s+4|0,l=l+4|0}while((0|s)<(0|c));o=(c=0==(0|Ze(0|i[t>>2])))?o:a,ue(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],$(a,o,t=n+4|0),Y(t),i[n+16>>2]=i[e>>2],$(a,o+12|0,t=n+20|0),Y(t),i[n+32>>2]=i[e>>2],$(a,o+24|0,t=n+36|0),Y(t),i[n+48>>2]=i[e>>2],$(a,o+36|0,t=n+52|0),Y(t),i[n+64>>2]=i[e>>2],$(a,o+48|0,t=n+68|0),Y(t),i[n+80>>2]=i[e>>2],$(a,o+60|0,n=n+84|0),Y(n),M=r}function Ce(e){var t;return t=(e=+e)<0?e+6.283185307179586:e,+(e>=6.283185307179586?t+-6.283185307179586:t)}function Pe(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*+v(+ +c(+a),+ +c(+(1-a)))*6371.007180918475}function ke(e,t,n){e|=0,n|=0;var r,i,a,s,l=0,u=0,p=0,g=0,A=0,y=0;return y=+o[(t|=0)>>3],a=+o[e>>3],A=+f(.5*(y-a)),p=+o[t+8>>3],i=+o[e+8>>3],g=+f(.5*(p-i)),r=+d(+a),s=+d(+y),g=2*+v(+ +c(+(g=A*A+g*(s*r*g))),+ +c(+(1-g))),A=+o[n>>3],y=+f(.5*(A-y)),l=+o[n+8>>3],p=+f(.5*(l-p)),u=+d(+A),p=2*+v(+ +c(+(p=y*y+p*(s*u*p))),+ +c(+(1-p))),A=+f(.5*(a-A)),l=+f(.5*(i-l)),l=2*+v(+ +c(+(l=A*A+l*(r*u*l))),+ +c(+(1-l))),4*+m(+ +c(+ +h(.5*(u=.5*(g+p+l)))*+h(.5*(u-g))*+h(.5*(u-p))*+h(.5*(u-l))))}function Me(e,t){return t=0|Et(0|(e|=0),0|(t|=0),45),x(),127&t|0}function Oe(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|Et(0|(e|=0),0|t,45),x(),(a&=127)>>>0>121)return 0|(t=0);n=0|Et(0|e,0|t,52),x(),n&=15;do{if(0|n){for(i=1,r=0;;){if(o=0|Et(0|e,0|t,3*(15-i|0)|0),x(),0!=(0|(o&=7))&(1^r)){if(1==(0|o)&0!=(0|D(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|Et(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 Re(e,t,n){n|=0;var r=0,i=0;if(r=0|Et(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|St(0|n,0,52),t=0|x()|-15728641&t,(0|r)>(0|n))do{i=0|St(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 Ie(e,t,n,r){n|=0,r|=0;var o,a=0,s=0,l=0,c=0,u=0,d=0;if(l=0|Et(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|(u=0|tt(7,n-l|0)))/7|0,c=0|Et(0|e,0|t,45),x(),0|D(127&c)){e:do{if(l)for(s=1;;){if(a=0|Et(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|St(l+1|0,0,52),a=0|x()|-15728641&t,Ie(t=(d|e)&~(t=0|St(7,0,0|(c=3*(14-l|0)|0))),l=a&~(0|x()),n,r),a=r+(o<<3)|0,!s)return Ie((d=0|St(1,0,0|c))|t,0|x()|l,n,a),d=a+(o<<3)|0,Ie((u=0|St(2,0,0|c))|t,0|x()|l,n,d),d=d+(o<<3)|0,Ie((u=0|St(3,0,0|c))|t,0|x()|l,n,d),d=d+(o<<3)|0,Ie((u=0|St(4,0,0|c))|t,0|x()|l,n,d),d=d+(o<<3)|0,Ie((u=0|St(5,0,0|c))|t,0|x()|l,n,d),void Ie((u=0|St(6,0,0|c))|t,0|x()|l,n,d+(o<<3)|0);s=a+(o<<3)|0,(0|u)>6&&(kt(0|a,0,(d=(s>>>0>(u=a+8|0)>>>0?s:u)+-1+(0-a)|0)+8&-8|0),a=u+(d>>>3<<3)|0),Ie((d=0|St(2,0,0|c))|t,0|x()|l,n,a),d=a+(o<<3)|0,Ie((u=0|St(3,0,0|c))|t,0|x()|l,n,d),d=d+(o<<3)|0,Ie((u=0|St(4,0,0|c))|t,0|x()|l,n,d),d=d+(o<<3)|0,Ie((u=0|St(5,0,0|c))|t,0|x()|l,n,d),Ie((u=0|St(6,0,0|c))|t,0|x()|l,n,d+(o<<3)|0)}}function Le(e,t){var n=0,r=0,i=0;if(i=0|Et(0|(e|=0),0|(t|=0),45),x(),!(0|D(127&i)))return 0|(i=0);i=0|Et(0|e,0|t,52),x(),i&=15;e:do{if(i)for(r=1;;){if(n=0|Et(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 Ne(e,t){var n=0,r=0,i=0;if(i=0|Et(0|(e|=0),0|(t|=0),52),x(),!(i&=15))return 0|(i=0);for(r=1;;){if(n=0|Et(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 De(e,t){var n=0,r=0,i=0,o=0,a=0,s=0,l=0;if(l=0|Et(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|St(7,0,0|(o=3*(15-s|0)|0)),i=0|x(),a=0|Et(0|e,0|t,0|o),x(),e=(o=0|St(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|Et(0|e,0|t,52),x(),r&=15){n=1;t:for(;;){switch(a=0|Et(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|Et(0|e,0|t,0|(a=3*(15-n|0)|0)),x(),o=0|St(7,0,0|a),t&=~(0|x()),e=e&~o|(a=0|St(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|Et(0|(e|=0),0|(t|=0),52),x(),!(r&=15))return r=e,w(0|(n=t)),0|r;for(n=1;a=0|Et(0|e,0|t,0|(o=3*(15-n|0)|0)),x(),i=0|St(7,0,0|o),t&=~(0|x()),e=(o=0|St(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 je(e,t){var n=0,r=0,i=0,o=0,a=0,s=0,l=0;if(l=0|Et(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|St(7,0,0|(o=3*(15-s|0)|0)),i=0|x(),a=0|Et(0|e,0|t,0|o),x(),e=(o=0|St(0|ce(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|Et(0|e,0|t,52),x(),r&=15){n=1;t:for(;;){switch(a=0|Et(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|St(7,0,0|(i=3*(15-n|0)|0)),a=t&~(0|x()),t=0|Et(0|e,0|t,0|i),x(),e=e&~o|(t=0|St(0|ce(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|Et(0|(e|=0),0|(t|=0),52),x(),!(r&=15))return r=e,w(0|(n=t)),0|r;for(n=1;o=0|St(7,0,0|(a=3*(15-n|0)|0)),i=t&~(0|x()),t=0|Et(0|e,0|t,0|a),x(),e=(t=0|St(0|ce(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 ze(e,t){e|=0;var n,r;return r=M,M=M+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=M,M=M+16|0,ve(e|=0,t|=0,n|=0,i=r),q(i,n+4|0),M=r}(e,t,n),t=0|function(e,t){e|=0;var n,r=0,o=0,a=0,s=0,l=0,c=0,u=0,d=0;if(n=M,M=M+64|0,c=n+40|0,o=n+24|0,a=n+12|0,s=n,St(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?(c=0,w(0|(l=0)),M=n,0|c):(St(0|j(e),0,45),l=0|x()|r,c=-1,w(0|l),M=n,0|c);if(i[c>>2]=i[e>>2],i[c+4>>2]=i[e+4>>2],i[c+8>>2]=i[e+8>>2],i[c+12>>2]=i[e+12>>2],l=c+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)),Q(o,a,s),Y(s),u=0|St(7,0,0|(d=3*(15-t|0)|0)),r&=~(0|x()),e=(d=0|St(0|ee(s),0,0|d))|e&~u,r=0|x()|r,(0|t)>1;)t=t+-1|0;else e=-1;e:do{if((0|i[l>>2])<=2&&(0|i[c+8>>2])<=2&&(0|i[c+12>>2])<=2){if(t=0|St(0|(o=0|j(c)),0,45),t|=e,e=0|x()|-1040385&r,s=0|B(c),!(0|D(o))){if((0|s)<=0)break;for(a=0;;){if(o=0|Et(0|t,0|e,52),x(),o&=15)for(r=1;c=0|Et(0|t,0|e,0|(d=3*(15-r|0)|0)),x(),u=0|St(7,0,0|d),e&=~(0|x()),t=t&~u|(d=0|St(0|le(7&c),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|Et(0|t,0|e,52),x(),a&=15;t:do{if(a){r=1;n:for(;;){switch(d=0|Et(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[c>>2]))for(r=1;u=0|St(7,0,0|(c=3*(15-r|0)|0)),d=e&~(0|x()),e=0|Et(0|t,0|e,0|c),x(),t=t&~u|(e=0|St(0|ce(7&e),0,0|c)),e=0|d|x(),r>>>0>>0;)r=r+1|0;else for(r=1;c=0|Et(0|t,0|e,0|(d=3*(15-r|0)|0)),x(),u=0|St(7,0,0|d),e&=~(0|x()),t=t&~u|(d=0|St(0|le(7&c),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|De(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|(u=e)),M=n,0|d}(n,t),e=0|x()):(e=0,t=0),w(0|e),M=r,0|t}function Ue(e,t,n){var r,o=0,a=0,s=0;if(r=(n|=0)+4|0,a=0|Et(0|(e|=0),0|(t|=0),52),x(),a&=15,s=0|Et(0|e,0|t,45),x(),o=0==(0|a),0|D(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|Et(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 He(e,t,n){n|=0;var r,o,a=0,s=0,l=0,c=0,u=0,d=0;o=M,M=M+16|0,r=o,d=0|Et(0|(e|=0),0|(t|=0),45),x(),d&=127;e:do{if(0!=(0|D(d))&&(l=0|Et(0|e,0|t,52),x(),0!=(0|(l&=15)))){a=1;t:for(;;){switch(u=0|Et(0|e,0|t,3*(15-a|0)|0),x(),7&u){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;c=0|St(7,0,0|(t=3*(15-s|0)|0)),u=a&~(0|x()),a=0|Et(0|e,0|a,0|t),x(),e=e&~c|(a=0|St(0|ce(7&a),0,0|t)),a=0|u|x(),s>>>0>>0;)s=s+1|0}else a=t}while(0);if(u=7728+(28*d|0)|0,i[n>>2]=i[u>>2],i[n+4>>2]=i[u+4>>2],i[n+8>>2]=i[u+8>>2],i[n+12>>2]=i[u+12>>2],0|Ue(e,a,n)){if(c=n+4|0,i[r>>2]=i[c>>2],i[r+4>>2]=i[c+4>>2],i[r+8>>2]=i[c+8>>2],l=0|Et(0|e,0|a,52),x(),u=15&l,1&l?(ie(c),l=u+1|0):l=u,0|D(d)){e:do{if(u)for(t=1;;){if(s=0|Et(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|D(d))do{}while(0!=(0|we(n,l,0,0)));(0|l)!=(0|u)&&ne(c)}else(0|l)!=(0|u)&&(i[c>>2]=i[r>>2],i[c+4>>2]=i[r+4>>2],i[c+8>>2]=i[r+8>>2]);M=o}else M=o}function Ve(e,t,n){n|=0;var r,i;r=M,M=M+16|0,He(e|=0,t|=0,i=r),t=0|Et(0|e,0|t,52),x(),ye(i,15&t,n),M=r}function We(e,t,n){n|=0;var r,i,o=0,a=0;i=M,M=M+16|0,He(e|=0,t|=0,r=i),o=0|Et(0|e,0|t,45),x(),o=0==(0|D(127&o)),a=0|Et(0|e,0|t,52),x(),a&=15;e:do{if(!o){if(0|a)for(o=1;;){if(!(0==((0|St(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(M=i)}}while(0);Ee(r,a,0,6,n),M=i}function Ge(e,t){t|=0;var n,r=0,o=0,a=0,s=0,l=0,c=0;if(St(0|(e|=0),0,52),n=134225919|x(),(0|e)<1){o=0,r=0;do{0|D(o)&&(St(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|D(l)){for(St(0|l,0,45),o=1,a=-1,s=0|n|x();a&=~(c=0|St(7,0,3*(15-o|0)|0)),s&=~(0|x()),(0|o)!=(0|e);)o=o+1|0;i[(c=t+(r<<3)|0)>>2]=a,i[c+4>>2]=s,r=r+1|0}l=l+1|0}while(122!=(0|l))}}function Ke(e,t,n,r){var o,a=0,s=0,l=0,c=0,u=0;if(o=M,M=M+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 M=o,0|(l=0);if(a=0|Et(0|e,0|t,52),x(),a&=15,s=0|Et(0|n,0|r,52),x(),(0|a)!=(15&s|0))return M=o,0|(l=0);if(s=a+-1|0,a>>>0>1&&(u=0|Re(e,t,s),c=0|x(),(0|u)==(0|(s=0|Re(n,r,s)))&(0|c)==(0|x()))){if(a=0|Et(0|e,0|t,0|(s=3*(15^a)|0)),x(),a&=7,s=0|Et(0|n,0|r,0|s),x(),0==(0|a)|0==(0|(s&=7)))return M=o,0|(u=1);if((0|i[21136+(a<<2)>>2])==(0|s))return M=o,0|(u=1);if((0|i[21168+(a<<2)>>2])==(0|s))return M=o,0|(u=1)}s=(a=l)+56|0;do{i[a>>2]=0,a=a+4|0}while((0|a)<(0|s));return O(e,t,1,l),a=(0|i[(u=l)>>2])==(0|n)&&(0|i[u+4>>2])==(0|r)||(0|i[(u=l+8|0)>>2])==(0|n)&&(0|i[u+4>>2])==(0|r)||(0|i[(u=l+16|0)>>2])==(0|n)&&(0|i[u+4>>2])==(0|r)||(0|i[(u=l+24|0)>>2])==(0|n)&&(0|i[u+4>>2])==(0|r)||(0|i[(u=l+32|0)>>2])==(0|n)&&(0|i[u+4>>2])==(0|r)||(0|i[(u=l+40|0)>>2])==(0|n)&&(0|i[u+4>>2])==(0|r)?1:1&((0|i[(a=l+48|0)>>2])==(0|n)?(0|i[a+4>>2])==(0|r):0),M=o,0|(u=a)}function qe(e,t,n){n|=0;var r,o,a,s,l=0;if(a=M,M=M+16|0,o=a,l=0|Et(0|(e|=0),0|(t|=0),56),x(),t=0|function(e,t,n){e|=0,t|=0,n|=0;var r=0,o=0;if(r=0|Le(e,t),(n+-1|0)>>>0>5)return 0|(n=-1);if(o=0!=(0|r),1==(0|n)&o)return 0|(n=-1);return r=0|function(e,t){e|=0,t|=0;var n=0,r=0,o=0,a=0,s=0,l=0,c=0,u=0;if(u=M,M=M+32|0,o=u+16|0,a=u,He(e,t,o),s=0|Me(e,t),c=0|Ne(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]}(s,a),t=0|function(e,t){e|=0;var n=0,r=0;if((t|=0)>>>0>20)return-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-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|i[11152+(216*t|0)+(72*n|0)+(24*e|0)+(r<<3)+4>>2]}(s,0|i[o>>2]),!(0|D(s)))return M=u,0|(c=t);switch(0|s){case 4:e=0,n=14;break;case 14:e=1,n=14;break;case 24:e=2,n=14;break;case 38:e=3,n=14;break;case 49:e=4,n=14;break;case 58:e=5,n=14;break;case 63:e=6,n=14;break;case 72:e=7,n=14;break;case 83:e=8,n=14;break;case 97:e=9,n=14;break;case 107:e=10,n=14;break;case 117:e=11,n=14;break;default:l=0,r=0}14==(0|n)&&(l=0|i[22096+(24*e|0)+8>>2],r=0|i[22096+(24*e|0)+16>>2]);e=0|i[o>>2],(0|e)!=(0|i[a>>2])&&(s=0|F(s))|(0|(e=0|i[o>>2]))==(0|r)&&(t=(t+1|0)%6|0);if(3==(0|c)&(0|e)==(0|r))return M=u,0|(c=(t+5|0)%6|0);if(!(5==(0|c)&(0|e)==(0|l)))return M=u,0|(c=t);return c=(t+1|0)%6|0,M=u,0|c}(e,t),o?0|(n=(5-r+(0|i[22384+(n<<2)>>2])|0)%5|0):0|(n=(6-r+(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),-1==(0|t))return i[n>>2]=0,void(M=a);He(r,e,o),l=0|Et(0|r,0|e,52),x(),l&=15,0|Le(r,e)?be(o,l,t,2,n):Ee(o,l,t,2,n),M=a}function Ye(e){e|=0;var t,n,r=0;return(t=0|yt(1,12))||E(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]&&E(22721,22646,61,22744),i[(r=e)>>2]=t,i[n>>2]=t,0|t)}function Xe(e,t){e|=0,t|=0;var n,r;return(r=0|vt(24))||E(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]&&E(22787,22646,82,22772),i[e>>2]=r,i[t>>2]=r,0|r)}function $e(e){var t,n,r=0,a=0,s=0,c=0,u=0,d=0,f=0,h=0,p=0,g=0,m=0,v=0,A=0,y=0,b=0,_=0,w=0,x=0,S=0,C=0,P=0,T=0,k=0,M=0,O=0,R=0,I=0,L=0,N=0,D=0;if(0|i[(c=(e|=0)+8|0)>>2])return 0|(D=1);if(!(s=0|i[e>>2]))return 0|(D=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|(D=0);(n=0|vt(a<<2))||E(22807,22646,317,22826),(t=0|vt(a<<5))||E(22848,22646,321,22826),i[e>>2]=0,i[(T=e+4|0)>>2]=0,i[c>>2]=0,a=0,L=0,P=0,m=0;e:for(;;){if(g=0|i[s>>2]){u=0,d=g;do{if(h=+o[d+8>>3],r=d,d=0|i[d+16>>2],f=+o[(c=(p=0==(0|d))?g:d)+8>>3],+l(+(h-f))>3.141592653589793){D=14;break}u+=(f-h)*(+o[r>>3]+ +o[c>>3])}while(!p);if(14==(0|D)){D=0,u=0,r=g;do{C=+o[r+8>>3],R=0|i[(I=r+16|0)>>2],S=+o[(R=0==(0|R)?g:R)+8>>3],u+=(+o[r>>3]+ +o[R>>3])*((S<0?S+6.283185307179586:S)-(C<0?C+6.283185307179586:C)),r=0|i[(0==(0|r)?s:I)>>2]}while(0!=(0|r))}u>0?(i[n+(L<<2)>>2]=s,L=L+1|0,c=P,r=m):D=19}else D=19;if(19==(0|D)){D=0;do{if(!a){if(m){c=T,d=m+8|0,r=s,a=e;break}if(0|i[e>>2]){D=27;break e}c=T,d=e,r=s,a=e;break}if(0|i[(r=a+8|0)>>2]){D=21;break e}if(!(a=0|yt(1,12))){D=23;break e}i[r>>2]=a,c=a+4|0,d=a,r=m}while(0);if(i[d>>2]=s,i[c>>2]=s,d=t+(P<<5)|0,p=0|i[s>>2]){for(o[(g=t+(P<<5)+8|0)>>3]=17976931348623157e292,o[(m=t+(P<<5)+24|0)>>3]=17976931348623157e292,o[d>>3]=-17976931348623157e292,o[(v=t+(P<<5)+16|0)>>3]=-17976931348623157e292,w=17976931348623157e292,x=-17976931348623157e292,c=0,A=p,h=17976931348623157e292,b=17976931348623157e292,_=-17976931348623157e292,f=-17976931348623157e292;u=+o[A>>3],C=+o[A+8>>3],A=0|i[A+16>>2],S=+o[((y=0==(0|A))?p:A)+8>>3],u>3]=u,h=u),C>3]=C,b=C),u>_?o[d>>3]=u:u=_,C>f&&(o[v>>3]=C,f=C),w=C>0&Cx?C:x,c|=+l(+(C-S))>3.141592653589793,!y;)_=u;c&&(o[v>>3]=x,o[m>>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;c=P+1|0}if(s=0|i[(I=s+8|0)>>2],i[I>>2]=0,!s){D=45;break}P=c,m=r}if(21==(0|D))E(22624,22646,35,22658);else if(23==(0|D))E(22678,22646,37,22658);else if(27==(0|D))E(22721,22646,61,22744);else if(45==(0|D)){e:do{if((0|L)>0){for(I=0==(0|c),O=c<<2,R=0==(0|e),M=0,r=0;;){if(k=0|i[n+(M<<2)>>2],I)D=73;else{if(!(P=0|vt(O))){D=50;break}if(!(T=0|vt(O))){D=52;break}t:do{if(R)a=0;else{for(c=0,a=0,d=e;s=t+(c<<5)|0,0|Qe(0|i[d>>2],s,0|i[k>>2])?(i[P+(a<<2)>>2]=d,i[T+(a<<2)>>2]=s,y=a+1|0):y=a,d=0|i[d+8>>2];)c=c+1|0,a=y;if((0|y)>0)if(s=0|i[P>>2],1==(0|y))a=s;else for(v=0,A=-1,a=s,m=s;;){for(p=0|i[m>>2],s=0,d=0;g=(0|(c=0|i[i[P+(d<<2)>>2]>>2]))==(0|p)?s:s+(1&(0|Qe(c,0|i[T+(d<<2)>>2],0|i[p>>2])))|0,(0|(d=d+1|0))!=(0|y);)s=g;if(a=(c=(0|g)>(0|A))?m:a,(0|(s=v+1|0))==(0|y))break t;v=s,A=c?g:A,m=0|i[P+(s<<2)>>2]}else a=0}}while(0);if(At(P),At(T),a){if(s=0|i[(c=a+4|0)>>2])a=s+8|0;else if(0|i[a>>2]){D=70;break}i[a>>2]=k,i[c>>2]=k}else D=73}if(73==(0|D)){if(D=0,0|(r=0|i[k>>2]))do{T=r,r=0|i[r+16>>2],At(T)}while(0!=(0|r));At(k),r=2}if((0|(M=M+1|0))>=(0|L)){N=r;break e}}50==(0|D)?E(22863,22646,249,22882):52==(0|D)?E(22901,22646,252,22882):70==(0|D)&&E(22721,22646,61,22744)}else N=0}while(0);return At(n),At(t),0|(D=N)}return 0}function Qe(e,t,n){e|=0;var r,a=0,s=0,l=0,c=0,u=0,d=0,f=0;if(!(0|V(t|=0,n|=0)))return 0|(e=0);if(t=0|H(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(;c=+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],c>l?(u=c,c=d):(u=l,l=c,c=s,s=d),ru;)if(!(n=0|i[n>>2])){n=22;break e}if(a=(c=c<0?c+6.283185307179586:c)==a|(d=s<0?s+6.283185307179586:s)==a?a+-2220446049250313e-31:a,((d+=(r-l)/(u-l)*(c-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(;c=+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],c>l?(u=c,c=d):(u=l,l=c,c=s,s=d),ru;)if(!(n=0|i[n>>2])){n=22;break e}if(s+(r-l)/(u-l)*(c-s)>(a=c==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 Je(e,t,n,o,a){n|=0,o|=0,a|=0;var s,l,c,u,d=0,f=0,h=0,p=0,g=0,m=0,v=0,A=0,y=0,b=0;if(u=M,M=M+32|0,b=u+16|0,c=u,d=0|Et(0|(e|=0),0|(t|=0),52),x(),d&=15,v=0|Et(0|n,0|o,52),x(),(0|d)!=(15&v|0))return M=u,0|(b=1);if(g=0|Et(0|e,0|t,45),x(),g&=127,m=0|Et(0|n,0|o,45),x(),v=(0|g)!=(0|(m&=127))){if(7==(0|(h=0|U(g,m))))return M=u,0|(b=2);7==(0|(p=0|U(m,g)))?E(22925,22949,151,22959):(A=h,f=p)}else A=0,f=0;s=0|D(g),l=0|D(m),i[b>>2]=0,i[b+4>>2]=0,i[b+8>>2]=0,i[b+12>>2]=0;do{if(A){if(h=(0|(m=0|i[4304+(28*g|0)+(A<<2)>>2]))>0,l)if(h){g=0,p=n,h=o;do{p=0|je(p,h),h=0|x(),1==(0|(f=0|ce(f)))&&(f=0|ce(1)),g=g+1|0}while((0|g)!=(0|m));m=f,g=p,p=h}else m=f,g=n,p=o;else if(h){g=0,p=n,h=o;do{p=0|Be(p,h),h=0|x(),f=0|ce(f),g=g+1|0}while((0|g)!=(0|m));m=f,g=p,p=h}else m=f,g=n,p=o;if(Ue(g,p,b),v||E(22972,22949,181,22959),(h=0!=(0|s))&(f=0!=(0|l))&&E(22999,22949,182,22959),h){if(f=0|Ne(e,t),0|r[22032+(7*f|0)+A>>0]){d=3;break}g=p=0|i[21200+(28*f|0)+(A<<2)>>2],y=26}else if(f){if(f=0|Ne(g,p),0|r[22032+(7*f|0)+m>>0]){d=4;break}g=0,p=0|i[21200+(28*m|0)+(f<<2)>>2],y=26}else f=0;if(26==(0|y))if((0|p)<=-1&&E(23030,22949,212,22959),(0|g)<=-1&&E(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=g}else f=g;if(i[c>>2]=0,i[c+4>>2]=0,i[c+8>>2]=0,oe(c,A),0|d)for(;0|Ze(d)?re(c):ie(c),(0|d)>1;)d=d+-1|0;if((0|f)>0){d=0;do{se(c),d=d+1|0}while((0|d)!=(0|f))}$(y=b+4|0,c,y),Y(y),y=50}else if(Ue(n,o,b),0!=(0|s)&0!=(0|l))if((0|m)!=(0|g)&&E(23077,22949,243,22959),f=0|Ne(e,t),d=0|Ne(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));y=50}else y=50;else y=50}while(0);return 50==(0|y)&&(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),M=u,0|(b=d)}function et(e,t,n,r){n|=0,r|=0;var o,a,s=0,l=0,c=0,u=0,d=0,f=0,h=0,p=0,g=0,m=0,v=0,A=0,y=0;if(a=M,M=M+48|0,c=a+36|0,u=a+24|0,d=a+12|0,f=a,l=0|Et(0|(e|=0),0|(t|=0),52),x(),l&=15,p=0|Et(0|e,0|t,45),x(),o=0|D(p&=127),St(0|l,0,52),v=134225919|x(),i[(m=r)>>2]=-1,i[m+4>>2]=v,!l)return(0|i[n>>2])>1||(0|i[n+4>>2])>1||(0|i[n+8>>2])>1||127==(0|(s=0|z(p,0|ee(n))))?(M=a,0|(v=1)):(g=0|St(0|s,0,45),m=0|x(),m=-1040385&i[(p=r)+4>>2]|m,i[(v=r)>>2]=i[p>>2]|g,i[v+4>>2]=m,M=a,0|(v=0));for(i[c>>2]=i[n>>2],i[c+4>>2]=i[n+4>>2],i[c+8>>2]=i[n+8>>2];i[u>>2]=i[c>>2],i[u+4>>2]=i[c+4>>2],i[u+8>>2]=i[c+8>>2],0|Ze(l)?(te(c),i[d>>2]=i[c>>2],i[d+4>>2]=i[c+4>>2],i[d+8>>2]=i[c+8>>2],re(d)):(ne(c),i[d>>2]=i[c>>2],i[d+4>>2]=i[c+4>>2],i[d+8>>2]=i[c+8>>2],ie(d)),Q(u,d,f),Y(f),A=0|i[(m=r)>>2],m=0|i[m+4>>2],n=0|St(7,0,0|(y=3*(15-l|0)|0)),m&=~(0|x()),y=0|St(0|ee(f),0,0|y),m=0|x()|m,i[(v=r)>>2]=y|A&~n,i[v+4>>2]=m,(0|l)>1;)l=l+-1|0;e:do{if((0|i[c>>2])<=1&&(0|i[c+4>>2])<=1&&(0|i[c+8>>2])<=1){f=127==(0|(u=0|z(p,l=0|ee(c))))?0:0|D(u);t:do{if(l){if(o){if(c=21408+(28*(0|Ne(e,t))|0)+(l<<2)|0,(0|(c=0|i[c>>2]))>0){n=0;do{l=0|le(l),n=n+1|0}while((0|n)!=(0|c))}if(1==(0|l)){s=3;break e}127==(0|(n=0|z(p,l)))&&E(23104,22949,376,23134),0|D(n)?E(23147,22949,377,23134):(g=c,h=l,s=n)}else g=0,h=l,s=u;if((0|(d=0|i[4304+(28*p|0)+(h<<2)>>2]))<=-1&&E(23178,22949,384,23134),!f){if((0|g)<=-1&&E(23030,22949,417,23134),0|g){l=0,n=0|i[(c=r)>>2],c=0|i[c+4>>2];do{n=0|Fe(n,c),c=0|x(),i[(y=r)>>2]=n,i[y+4>>2]=c,l=l+1|0}while((0|l)<(0|g))}if((0|d)<=0){l=54;break}for(l=0,n=0|i[(c=r)>>2],c=0|i[c+4>>2];;)if(n=0|Fe(n,c),c=0|x(),i[(y=r)>>2]=n,i[y+4>>2]=c,(0|(l=l+1|0))==(0|d)){l=54;break t}}if(7==(0|(u=0|U(s,p)))&&E(22925,22949,393,23134),n=0|i[(l=r)>>2],l=0|i[l+4>>2],(0|d)>0){c=0;do{n=0|Fe(n,l),l=0|x(),i[(y=r)>>2]=n,i[y+4>>2]=l,c=c+1|0}while((0|c)!=(0|d))}if(n=0|Ne(n,l),y=0|F(s),(0|(n=0|i[(y?21824:21616)+(28*u|0)+(n<<2)>>2]))<=-1&&E(23030,22949,412,23134),n){l=0,c=0|i[(u=r)>>2],u=0|i[u+4>>2];do{c=0|De(c,u),u=0|x(),i[(y=r)>>2]=c,i[y+4>>2]=u,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*(y=0|Ne(e,t))|0)+((0|Ne(0|i[(l=r)>>2],0|i[l+4>>2]))<<2)|0,(0|(l=0|i[l>>2]))<=-1&&E(23201,22949,433,23134),l){s=0,n=0|i[(c=r)>>2],c=0|i[c+4>>2];do{n=0|Fe(n,c),c=0|x(),i[(y=r)>>2]=n,i[y+4>>2]=c,s=s+1|0}while((0|s)<(0|l));s=u,l=54}else s=u,l=55;else s=u,l=54}while(0);if(54==(0|l)&&f&&(l=55),55==(0|l)&&1==(0|Ne(0|i[(y=r)>>2],0|i[y+4>>2]))){s=4;break}v=0|i[(y=r)>>2],y=-1040385&i[y+4>>2],A=0|St(0|s,0,45),y=0|y|x(),i[(s=r)>>2]=v|A,i[s+4>>2]=y,s=0}else s=2}while(0);return M=a,0|(y=s)}function tt(e,t){var n=0;if(!(t|=0))return 0|(n=1);n=e|=0,e=1;do{e=0|y(0==(1&t|0)?1:n,e),t>>=1,n=0|y(n,n)}while(0!=(0|t));return 0|e}function nt(e,t,n){e|=0;var r,a,s=0,l=0,c=0,u=0,d=0,f=0,h=0,p=0;if(!(0|V(t|=0,n|=0)))return 0|(p=0);if(t=0|H(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;u=+o[r+(h<<4)>>3],f=+o[r+(h<<4)+8>>3],c=+o[r+((e=(n+2|0)%(0|p)|0)<<4)>>3],l=+o[r+(e<<4)+8>>3],u>c?(d=u,u=f):(d=c,c=u,u=l,l=f),ad;){if(!((0|(n=h+1|0))<(0|p))){n=22;break e}e=h,h=n,n=e}if(s=(u=u<0?u+6.283185307179586:u)==s|(f=l<0?l+6.283185307179586:l)==s?s+-2220446049250313e-31:s,((f+=(a-c)/(d-c)*(u-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;u=+o[r+(h<<4)>>3],f=+o[r+(h<<4)+8>>3],c=+o[r+((e=(n+2|0)%(0|p)|0)<<4)>>3],l=+o[r+(e<<4)+8>>3],u>c?(d=u,u=f):(d=c,c=u,u=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-c)/(d-c)*(u-l)>(s=u==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,c,u=0,d=0,f=0,h=0,p=0,g=0,m=0,v=0,A=0,y=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[(c=t+16|0)>>3]=-17976931348623157e292,!((0|r)<=0)){for(n=0|i[e+4>>2],v=17976931348623157e292,A=-17976931348623157e292,y=0,e=-1,h=17976931348623157e292,p=17976931348623157e292,m=-17976931348623157e292,d=-17976931348623157e292,b=0;u=+o[n+(b<<4)>>3],g=+o[n+(b<<4)+8>>3],f=+o[n+(((0|(e=e+2|0))==(0|r)?0:e)<<4)+8>>3],u>3]=u,h=u),g>3]=g,p=g),u>m?o[t>>3]=u:u=m,g>d&&(o[c>>3]=g,d=g),v=g>0&gA?g:A,y|=+l(+(g-f))>3.141592653589793,(0|(e=b+1|0))!=(0|r);)_=b,m=u,b=e,e=_;y&&(o[c>>3]=A,o[s>>3]=v)}}function it(e,t){t|=0;var n,r=0,a=0,s=0,c=0,u=0,d=0,f=0,h=0,p=0,g=0,m=0,v=0,A=0,y=0,b=0,_=0,w=0,x=0,E=0,S=0,C=0;if(A=0|i[(e|=0)>>2]){if(o[(y=t+8|0)>>3]=17976931348623157e292,o[(b=t+24|0)>>3]=17976931348623157e292,o[t>>3]=-17976931348623157e292,o[(_=t+16|0)>>3]=-17976931348623157e292,(0|A)>0){for(s=0|i[e+4>>2],m=17976931348623157e292,v=-17976931348623157e292,a=0,r=-1,f=17976931348623157e292,h=17976931348623157e292,g=-17976931348623157e292,u=-17976931348623157e292,w=0;c=+o[s+(w<<4)>>3],p=+o[s+(w<<4)+8>>3],d=+o[s+(((0|(S=r+2|0))==(0|A)?0:S)<<4)+8>>3],c>3]=c,f=c),p>3]=p,h=p),c>g?o[t>>3]=c:c=g,p>u&&(o[_>>3]=p,u=p),m=p>0&pv?p:v,a|=+l(+(p-d))>3.141592653589793,(0|(r=w+1|0))!=(0|A);)S=w,g=c,w=r,r=S;a&&(o[_>>3]=v,o[b>>3]=m)}}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[(S=e+8|0)>>2]))<=0)){n=e+12|0,E=0;do{if(s=0|i[n>>2],a=E,b=t+((E=E+1|0)<<5)|0,_=0|i[s+(a<<3)>>2]){if(o[(w=t+(E<<5)+8|0)>>3]=17976931348623157e292,o[(e=t+(E<<5)+24|0)>>3]=17976931348623157e292,o[b>>3]=-17976931348623157e292,o[(x=t+(E<<5)+16|0)>>3]=-17976931348623157e292,(0|_)>0){for(A=0|i[s+(a<<3)+4>>2],m=17976931348623157e292,v=-17976931348623157e292,s=0,a=-1,y=0,f=17976931348623157e292,h=17976931348623157e292,p=-17976931348623157e292,u=-17976931348623157e292;c=+o[A+(y<<4)>>3],g=+o[A+(y<<4)+8>>3],d=+o[A+(((0|(a=a+2|0))==(0|_)?0:a)<<4)+8>>3],c>3]=c,f=c),g>3]=g,h=g),c>p?o[b>>3]=c:c=p,g>u&&(o[x>>3]=g,u=g),m=g>0&gv?g:v,s|=+l(+(g-d))>3.141592653589793,(0|(a=y+1|0))!=(0|_);)C=y,y=a,p=c,a=C;s&&(o[x>>3]=v,o[e>>3]=m)}}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[S>>2]}while((0|E)<(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,c,u,d,f,h=0;c=+o[(e|=0)>>3],l=+o[t>>3]-c,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]))-(c-d)*(u=+o[r+8>>3]-f))/(l*u-a*h),o[i>>3]=c+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 ct(e,t,n){e|=0,n|=0;var r=0;(0|(t|=0))>0?(r=0|yt(t,4),i[e>>2]=r,r||E(23230,23253,40,23267)):i[e>>2]=0,i[e+4>>2]=t,i[e+8>>2]=0,i[e+12>>2]=n}function ut(e){var t,n,r,a=0,s=0,c=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(c=0|i[e>>2],d=0|i[c+(a<<2)>>2])break;a=a+1|0}a=c+(~~(+l(+ +u(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(c=d+32|0,(0|s)==(0|d))i[a>>2]=i[c>>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[c>>2]}At(d),i[r>>2]=(0|i[r>>2])-1}}while(0)}At(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(+ +u(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 At(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,c=0;(r=0|vt(40))||E(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(+ +u(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|Pe(a,t)&&0|Pe(a+16|0,n));)if(s=0|i[a+32>>2],!(0|i[(a=0==(0|s)?a:s)+32>>2])){c=10;break}if(10==(0|c)){i[a+32>>2]=r;break}return At(r),0|(c=a)}i[s>>2]=r}while(0);return i[(c=e+8|0)>>2]=1+(0|i[c>>2]),0|(c=r)}function pt(e,t,n){t|=0,n|=0;var r=0,a=0;if(a=~~(+l(+ +u(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|Pe(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|Pe(e,t)&&0|Pe(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 gt(e,t){t|=0;var n=0;if(n=~~(+l(+ +u(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|Pe(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 mt(e){return 0|~~+function(e){return+ +Mt(+(e=+e))}(e=+e)}function vt(e){e|=0;var t,n=0,r=0,o=0,a=0,s=0,l=0,c=0,u=0,d=0,f=0,h=0,p=0,g=0,m=0,v=0,A=0,y=0,b=0,_=0,w=0;t=M,M=M+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],M=t,0|(w=a);if(d>>>0>(f=0|i[5831])>>>0){if(0|r)return n=((n=r<>>=c=n>>>12&16)>>>5&8)|c|(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[(c=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,M=t,0|(w=c);if(s=0|i[5830]){for(r=(s&0-s)-1|0,r=u=0|i[23620+(((o=(r>>>=a=r>>>12&16)>>>5&8)|a|(l=(r>>>=o)>>>2&4)|(c=(r>>>=l)>>>1&2)|(u=(r>>>=c)>>>1&1))+(r>>>u)<<2)>>2],c=u,u=(-8&i[u+4>>2])-d|0;(e=0|i[r+16>>2])||(e=0|i[r+20>>2]);)r=e,c=(a=(l=(-8&i[e+4>>2])-d|0)>>>0>>0)?e:c,u=a?l:u;if((l=c+d|0)>>>0>c>>>0){a=0|i[c+24>>2],n=0|i[c+12>>2];do{if((0|n)==(0|c)){if(!(n=0|i[(e=c+20|0)>>2])&&!(n=0|i[(e=c+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[c+8>>2],i[r+12>>2]=n,i[n+8>>2]=r,r=n}while(0);do{if(0|a){if(n=0|i[c+28>>2],(0|c)==(0|i[(e=23620+(n<<2)|0)>>2])){if(i[e>>2]=r,!r){i[5830]=s&~(1<>2])==(0|c)?w:a+20|0)>>2]=r,!r)break;i[r+24>>2]=a,0|(n=0|i[c+16>>2])&&(i[r+16>>2]=n,i[n+24>>2]=r),0|(n=0|i[c+20>>2])&&(i[r+20>>2]=n,i[n+24>>2]=r)}}while(0);return u>>>0<16?(w=u+d|0,i[c+4>>2]=3|w,i[(w=c+w+4|0)>>2]=1|i[w>>2]):(i[c+4>>2]=3|d,i[l+4>>2]=1|u,i[l+u>>2]=u,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]=u,i[5834]=l),M=t,0|(w=c+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,u=(e>>>=8)?d>>>0>16777215?31:d>>>((u=14-((c=((v=e<<(h=(e+1048320|0)>>>16&8))+520192|0)>>>16&4)|h|(u=((v<<=c)+245760|0)>>>16&2))+(v<>>15)|0)+7|0)&1|u<<1:0,r=0|i[23620+(u<<2)>>2];e:do{if(r)for(e=0,c=d<<(31==(0|u)?0:25-(u>>>1)|0),s=0;;){if((l=(-8&i[r+4>>2])-d|0)>>>0>>0){if(!l){e=r,a=0,v=65;break e}e=r,a=l}if(s=0==(0|(v=0|i[r+20>>2]))|(0|v)==(0|(r=0|i[r+16+(c>>>31<<2)>>2]))?s:v,!r){r=s,v=61;break}c<<=1}else r=0,e=0,v=61}while(0);if(61==(0|v)){if(0==(0|r)&0==(0|e)){if(!(e=((e=2<>>=l=h>>>12&16)>>>5&8)|l|(c=(h>>>=s)>>>2&4)|(u=(h>>>=c)>>>1&2)|(r=(h>>>=u)>>>1&1))+(h>>>r)<<2)>>2]}r?v=65:(c=e,l=a)}if(65==(0|v))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){c=e,l=a;break}s=r}if(0!=(0|c)&&l>>>0<((0|i[5831])-d|0)>>>0&&(f=c+d|0)>>>0>c>>>0){s=0|i[c+24>>2],n=0|i[c+12>>2];do{if((0|n)==(0|c)){if(!(n=0|i[(e=c+20|0)>>2])&&!(n=0|i[(e=c+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[c+8>>2],i[w+12>>2]=n,i[n+8>>2]=w}while(0);do{if(s){if(e=0|i[c+28>>2],(0|c)==(0|i[(r=23620+(e<<2)|0)>>2])){if(i[r>>2]=n,!n){o&=~(1<>2])==(0|c)?w:s+20|0)>>2]=n,!n)break;i[n+24>>2]=s,0|(e=0|i[c+16>>2])&&(i[n+16>>2]=e,i[e+24>>2]=n),(e=0|i[c+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[c+4>>2]=3|w,i[(w=c+w+4|0)>>2]=1|i[w>>2];else{if(i[c+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 M=t,0|(w=c+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]),M=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,M=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),c=h+48|0,(d=(s=e+(u=h+47|0)|0)&(a=0-e|0))>>>0<=h>>>0)return M=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 M=t,0|(w=0);e:do{if(4&i[5940])n=0,v=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])){v=128;break t}o=e}if((n=s-l&a)>>>0<2147483647)if((0|(e=0|Ot(0|n)))==((0|i[o>>2])+(0|i[o+4>>2])|0)){if(-1!=(0|e)){l=n,s=e,v=145;break e}}else o=e,v=136;else n=0}else v=128}while(0);do{if(128==(0|v))if(-1!=(0|(r=0|Ot(0)))&&(n=r,m=(n=(0==((m=(g=0|i[5948])+-1|0)&n|0)?0:(m+n&0-g)-n|0)+d|0)+(g=0|i[5937])|0,n>>>0>h>>>0&n>>>0<2147483647)){if(0|(p=0|i[5939])&&m>>>0<=g>>>0|m>>>0>p>>>0){n=0;break}if((0|(e=0|Ot(0|n)))==(0|r)){l=n,s=r,v=145;break e}o=e,v=136}else n=0}while(0);do{if(136==(0|v)){if(r=0-n|0,!(c>>>0>n>>>0&n>>>0<2147483647&-1!=(0|o))){if(-1==(0|o)){n=0;break}l=n,s=o,v=145;break e}if((e=u-n+(e=0|i[5949])&0-e)>>>0>=2147483647){l=n,s=o,v=145;break e}if(-1==(0|Ot(0|e))){Ot(0|r),n=0;break}l=e+n|0,s=o,v=145;break e}}while(0);i[5940]=4|i[5940],v=143}}while(0);if(143==(0|v)&&d>>>0<2147483647&&!(-1==(0|(b=0|Ot(0|d)))|1^(y=(A=(m=0|Ot(0))-b|0)>>>0>(h+40|0)>>>0)|b>>>0>>0&-1!=(0|b)&-1!=(0|m)^1)&&(l=y?A:n,s=b,v=145),145==(0|v)){n=(0|i[5937])+l|0,i[5937]=n,n>>>0>(0|i[5938])>>>0&&(i[5938]=n),u=0|i[5835];e:do{if(u){for(n=23764;;){if((0|s)==((e=0|i[n>>2])+(r=0|i[n+4>>2])|0)){v=154;break}if(!(o=0|i[n+8>>2]))break;n=o}if(154==(0|v)&&(_=n+4|0,0==(8&i[n+12>>2]|0))&&s>>>0>u>>>0&e>>>0<=u>>>0){i[_>>2]=r+l,_=u+(b=0==(7&(b=u+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[u+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)){v=162;break}if(!(e=0|i[n+8>>2]))break;n=e}if(162==(0|v)&&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,c=(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|u)==(0|n))w=(0|i[5832])+c|0,i[5832]=w,i[5835]=d,i[d+4>>2]=1|w;else{if((0|i[5834])==(0|n)){w=(0|i[5831])+c|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+c|0}else a=c;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 M=t,0|(w=f+8|0)}for(n=23764;!((e=0|i[n>>2])>>>0<=u>>>0&&(w=e+(0|i[n+4>>2])|0)>>>0>u>>>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=u+16|0)>>>0?u: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|u)){if(s=e-u|0,i[r>>2]=-2&i[r>>2],i[u+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]=u,i[n+12>>2]=u,i[u+8>>2]=n,i[u+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[u+28>>2]=o,i[u+20>>2]=0,i[a>>2]=0,!((n=0|i[5830])&(e=1<>2]=u,i[u+24>>2]=r,i[u+12>>2]=u,i[u+8>>2]=u;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]=u,i[u+24>>2]=n,i[u+12>>2]=u,i[u+8>>2]=u;break e}}while(0);w=0|i[(_=n+8|0)>>2],i[w+12>>2]=u,i[_>>2]=u,i[u+8>>2]=w,i[u+12>>2]=n,i[u+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,M=t,0|(w=w+8|0)}return i[(w=23312)>>2]=12,M=t,0|(w=0)}function At(e){var t=0,n=0,r=0,o=0,a=0,s=0,l=0,c=0;if(e|=0){n=e+-8|0,o=0|i[5833],c=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=c+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>=c>>>0)&&1&(r=0|i[(e=c+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|c)){if(c=(0|i[5832])+t|0,i[5832]=c,i[5835]=l,i[l+4>>2]=1|c,(0|l)!=(0|i[5834]))return;return i[5834]=0,void(i[5831]=0)}if((0|i[5834])==(0|c))return c=(0|i[5831])+t|0,i[5831]=c,i[5834]=s,i[l+4>>2]=1|c,void(i[s+c>>2]=c);o=(-8&r)+t|0,n=r>>>3;do{if(r>>>0<256){if(t=0|i[c+8>>2],(0|(e=0|i[c+12>>2]))==(0|t)){i[5829]=i[5829]&~(1<>2]=e,i[e+8>>2]=t;break}a=0|i[c+24>>2],e=0|i[c+12>>2];do{if((0|e)==(0|c)){if(e=0|i[(n=(t=c+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[c+8>>2],i[n+12>>2]=e,i[e+8>>2]=n,n=e}while(0);if(0|a){if(e=0|i[c+28>>2],(0|i[(t=23620+(e<<2)|0)>>2])==(0|c)){if(i[t>>2]=n,!n){i[5830]=i[5830]&~(1<>2])==(0|c)?r:a+20|0)>>2]=n,!n)break;i[n+24>>2]=a,0|(t=0|i[(e=c+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=((c=e<<(s=(e+1048320|0)>>>16&8))+520192|0)>>>16&4)|s|(r=((c<<=a)+245760|0)>>>16&2))+(c<>>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);c=0|i[(s=e+8|0)>>2],i[c+12>>2]=l,i[s>>2]=l,i[l+8>>2]=c,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(c=(0|i[5837])-1|0,i[5837]=c,!(0|c)){for(e=23772;e=0|i[e>>2];)e=e+8|0;i[5837]=-1}}}}function yt(e,t){t|=0;var n=0;return(e|=0)?(n=0|y(t,e),(t|e)>>>0>65535&&(n=(0|(n>>>0)/(e>>>0))==(0|t)?n:-1)):n=0,(e=0|vt(n))&&3&i[e+-4>>2]?(kt(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,c=0,u=0,d=0,f=0,h=0,p=0,g=0;if(d=e|=0,s=n|=0,l=h=r|=0,!(u=c=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|u))|0)>>>0<=31){s=f=a+1|0,e=d>>>(f>>>0)&(t=a-31>>31)|u<<(l=31-a|0),t&=u>>>(f>>>0),a=0,l=d<>2]=0|e,i[o+4>>2]=c|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|u))|0,e=(f=32-l|0)-1>>31&u>>>((p=l-32|0)>>>0)|(u<>>(l>>>0))&(t=p>>31),t&=u>>>(l>>>0),a=d<<(g=64-l|0)&(c=f>>31),l=(u<>>(p>>>0))&c|d<>31;break}return 0|o&&(i[o>>2]=a&d,i[o+4>>2]=0),1==(0|s)?(g=0|e,0|(w(0|(p=c|0&t)),g)):(p=u>>>((g=0|_t(0|s))>>>0)|0,g=u<<32-g|d>>>(g>>>0)|0,0|(w(0|p),g))}if(a)return 0|o&&(i[o>>2]=(u>>>0)%(s>>>0),i[o+4>>2]=0),g=(u>>>0)/(s>>>0)>>>0,0|(w(0|(p=0)),g);if(!d)return 0|o&&(i[o>>2]=0,i[o+4>>2]=(u>>>0)%(l>>>0)),g=(u>>>0)/(l>>>0)>>>0,0|(w(0|(p=0)),g);if(!((a=l-1|0)&l))return 0|o&&(i[o>>2]=0|e,i[o+4>>2]=a&u|0&t),p=0,g=u>>>((0|_t(0|l))>>>0),0|(w(0|p),g);if((a=(0|_(0|l))-(0|_(0|u))|0)>>>0<=30){s=t=a+1|0,e=u<<(l=31-a|0)|d>>>(t>>>0),t=u>>>(t>>>0),a=0,l=d<>2]=0|e,i[o+4>>2]=c|0&t,g=0,0|(w(0|(p=0)),g)):(g=0,0|(w(0|(p=0)),g))}while(0);if(s){u=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(),c=l,l=0;do{r=c,c=a>>>31|c<<1,a=l|a<<1,bt(0|u,0|n,0|(r=e<<1|r>>>31|0),0|(h=e>>>31|t<<1|0)),l=1&(p=(g=0|x())>>31|((0|g)<0?-1:0)<<1),e=0|bt(0|r,0|h,p&f|0,(((0|g)<0?-1:0)>>31|((0|g)<0?-1:0)<<1)&d|0),t=0|x(),s=s-1|0}while(0!=(0|s));u=c,c=0}else u=l,c=0,l=0;return s=0,0|o&&(i[o>>2]=e,i[o+4>>2]=t),g=-2&(a<<1|0)|l,0|(w(0|(p=(0|a)>>>31|(u|s)<<1|0&(s<<1|a>>>31)|c)),g)}function xt(e,t,n,r){var o,a;return a=M,M=M+16|0,wt(e|=0,t|=0,n|=0,r|=0,o=0|a),M=a,0|(w(0|i[o+4>>2]),0|i[o>>2])}function Et(e,t,n){return e|=0,t|=0,(0|(n|=0))<32?(w(t>>>n|0),e>>>n|(t&(1<>>n-32|0)}function St(e,t,n){return e|=0,t|=0,(0|(n|=0))<32?(w(t<>>32-n|0),e<=0?+s(e+.5):+A(e-.5)}function Tt(e,t,n){e|=0,t|=0;var o,a,s=0;if((0|(n|=0))>=8192)return P(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 kt(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 Mt(e){return(e=+e)>=0?+s(e+.5):+A(e-.5)}function Ot(e){e|=0;var t,n,r;return r=0|C(),(0|e)>0&(0|(t=(n=0|i[a>>2])+e|0))<(0|n)|(0|t)<0?(k(0|t),S(12),-1):(0|t)>(0|r)&&!(0|T(0|t))?(S(12),-1):(i[a>>2]=t,0|n)}return{___uremdi3:xt,_bitshift64Lshr:Et,_bitshift64Shl:St,_calloc:yt,_cellAreaKm2:function(e,t){var n,r,o,a=0;if(o=M,M=M+192|0,r=o,Ve(e|=0,t|=0,n=o+168|0),We(e,t,r),(0|(t=0|i[r>>2]))>0){if(a=+ke(r+8|0,r+8+((1!=(0|t)&1)<<4)|0,n)+0,1!=(0|t)){e=1;do{a+=+ke(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 M=o,6371.007180918475*a*6371.007180918475},_cellAreaM2:function(e,t){var n,r,o,a=0;if(o=M,M=M+192|0,r=o,Ve(e|=0,t|=0,n=o+168|0),We(e,t,r),(0|(t=0|i[r>>2]))>0){if(a=+ke(r+8|0,r+8+((1!=(0|t)&1)<<4)|0,n)+0,1!=(0|t)){e=1;do{a+=+ke(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 M=o,6371.007180918475*a*6371.007180918475*1e3*1e3},_cellAreaRads2:function(e,t){var n,r,o,a=0;if(o=M,M=M+192|0,r=o,Ve(e|=0,t|=0,n=o+168|0),We(e,t,r),(0|(t=0|i[r>>2]))<=0)return M=o,+(a=0);if(a=+ke(r+8|0,r+8+((1!=(0|t)&1)<<4)|0,n)+0,1==(0|t))return M=o,+a;e=1;do{a+=+ke(r+8+(e<<4)|0,r+8+(((0|(e=e+1|0))%(0|t)|0)<<4)|0,n)}while((0|e)<(0|t));return M=o,+a},_compact:function(e,t,n){t|=0;var r,o=0,a=0,s=0,l=0,c=0,u=0,d=0,f=0,h=0,p=0,g=0,m=0,v=0,A=0,y=0,b=0,_=0,w=0,E=0,S=0,C=0;if(!(n|=0))return 0|(S=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|(S=0);if(i[(S=t)>>2]=o,i[S+4>>2]=a,1==(0|n))return 0|(S=0);o=1;do{E=0|i[(w=e+(o<<3)|0)+4>>2],i[(S=t+(o<<3)|0)>>2]=i[w>>2],i[S+4>>2]=E,o=o+1|0}while((0|o)!=(0|n));return 0|(o=0)}if(!(E=0|vt(w=n<<3)))return 0|(S=-3);if(Tt(0|E,0|e,0|w),!(r=0|yt(n,8)))return At(E),0|(S=-3);o=n;e:for(;;){b=0|Et(0|(f=0|i[(l=E)>>2]),0|(l=0|i[l+4>>2]),52),x(),_=(b&=15)+-1|0,y=(0|o)>0;t:do{if(y){if(A=((0|o)<0)<<31>>31,m=0|St(0|_,0,52),v=0|x(),_>>>0>15)for(a=0,e=f,n=l;;){if(!(0==(0|e)&0==(0|n))){if(s=0|Et(0|e,0|n,52),x(),c=(0|(s&=15))<(0|_),s=(0|s)==(0|_),n=0|xt(0|(d=c?0:s?e:0),0|(e=c?0:s?n:0),0|o,0|A),x(),0==(0|(u=0|i[(c=s=r+(n<<3)|0)>>2]))&0==(0|(c=0|i[c+4>>2])))n=d;else for(m=0,g=n,p=c,n=d;;){if((0|m)>(0|o)){S=41;break e}if((0|u)==(0|n)&(-117440513&p|0)==(0|e)){d=0|Et(0|u,0|p,56),x(),h=(d&=7)+1|0,v=0|Et(0|u,0|p,45),x();n:do{if(0|D(127&v)){if(u=0|Et(0|u,0|p,52),x(),!(u&=15)){c=6;break}for(c=1;;){if(!(0==((v=0|St(7,0,3*(15-c|0)|0))&n|0)&0==((0|x())&e|0))){c=7;break n}if(!(c>>>0>>0)){c=6;break}c=c+1|0}}else c=7}while(0);if((d+2|0)>>>0>c>>>0){S=51;break e}v=0|St(0|h,0,56),e=0|x()|-117440513&e,i[(c=s)>>2]=0,i[c+4>>2]=0,c=g,n|=v}else c=(g+1|0)%(0|o)|0;if(0==(0|(u=0|i[(p=s=r+(c<<3)|0)>>2]))&0==(0|(p=0|i[p+4>>2])))break;m=m+1|0,g=c}i[(v=s)>>2]=n,i[v+4>>2]=e}if((0|(a=a+1|0))>=(0|o))break t;e=0|i[(n=E+(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(c=0|Et(0|e,0|n,52),x(),(0|(c&=15))>=(0|_)){if((0|c)!=(0|_)&&(e|=m,n=-15728641&n|v,c>>>0>=b>>>0)){s=_;do{g=0|St(7,0,3*(14-s|0)|0),s=s+1|0,e|=g,n=0|x()|n}while(s>>>0>>0)}}else e=0,n=0;if(c=0|xt(0|e,0|n,0|o,0|A),x(),!(0==(0|(d=0|i[(u=s=r+(c<<3)|0)>>2]))&0==(0|(u=0|i[u+4>>2]))))for(g=0;;){if((0|g)>(0|o)){S=41;break e}if((0|d)==(0|e)&(-117440513&u|0)==(0|n)){h=0|Et(0|d,0|u,56),x(),p=(h&=7)+1|0,C=0|Et(0|d,0|u,45),x();n:do{if(0|D(127&C)){if(d=0|Et(0|d,0|u,52),x(),!(d&=15)){u=6;break}for(u=1;;){if(!(0==((C=0|St(7,0,3*(15-u|0)|0))&e|0)&0==((0|x())&n|0))){u=7;break n}if(!(u>>>0>>0)){u=6;break}u=u+1|0}}else u=7}while(0);if((h+2|0)>>>0>u>>>0){S=51;break e}C=0|St(0|p,0,56),n=0|x()|-117440513&n,i[(p=s)>>2]=0,i[p+4>>2]=0,e|=C}else c=(c+1|0)%(0|o)|0;if(0==(0|(d=0|i[(u=s=r+(c<<3)|0)>>2]))&0==(0|(u=0|i[u+4>>2])))break;g=g+1|0}i[(C=s)>>2]=e,i[C+4>>2]=n}if((0|(a=a+1|0))>=(0|o))break t;e=0|i[(n=E+(a<<3)|0)>>2],n=0|i[n+4>>2]}}}while(0);if((o+5|0)>>>0<11){S=99;break}if(!(v=0|yt((0|o)/6|0,8))){S=58;break}t:do{if(y){g=0,p=0;do{if(!(0==(0|(a=0|i[(e=c=r+(g<<3)|0)>>2]))&0==(0|(e=0|i[e+4>>2])))){u=0|Et(0|a,0|e,56),x(),n=(u&=7)+1|0,d=-117440513&e,C=0|Et(0|a,0|e,45),x();n:do{if(0|D(127&C)){if(h=0|Et(0|a,0|e,52),x(),0|(h&=15))for(s=1;;){if(!(0==(a&(C=0|St(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|St(0|n,0,56),e=0|x()|d,i[(n=c)>>2]=a,i[n+4>>2]=e,n=u+2|0}}while(0);7==(0|n)&&(i[(C=v+(p<<3)|0)>>2]=a,i[C+4>>2]=-117440513&e,p=p+1|0)}g=g+1|0}while((0|g)!=(0|o));if(y){if(m=((0|o)<0)<<31>>31,h=0|St(0|_,0,52),g=0|x(),_>>>0>15)for(e=0,a=0;;){do{if(!(0==(0|f)&0==(0|l))){for(u=0|Et(0|f,0|l,52),x(),s=(0|(u&=15))<(0|_),u=(0|u)==(0|_),s=0|xt(0|(c=s?0:u?f:0),0|(u=s?0:u?l:0),0|o,0|m),x(),n=0;;){if((0|n)>(0|o)){S=98;break e}if((-117440513&(d=0|i[(C=r+(s<<3)|0)+4>>2])|0)==(0|u)&&(0|i[C>>2])==(0|c)){S=70;break}if((0|i[(C=r+((s=(s+1|0)%(0|o)|0)<<3)|0)>>2])==(0|c)&&(0|i[C+4>>2])==(0|u))break;n=n+1|0}if(70==(0|S)&&(S=0,!0&100663296==(117440512&d|0)))break;i[(C=t+(a<<3)|0)>>2]=f,i[C+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=E+(e<<3)|0)>>2],l=0|i[l+4>>2]}for(e=0,a=0;;){do{if(!(0==(0|f)&0==(0|l))){if(u=0|Et(0|f,0|l,52),x(),(0|(u&=15))>=(0|_))if((0|u)!=(0|_))if(n=f|h,s=-15728641&l|g,u>>>0>>0)u=s;else{c=_;do{C=0|St(7,0,3*(14-c|0)|0),c=c+1|0,n|=C,s=0|x()|s}while(c>>>0>>0);u=s}else n=f,u=l;else n=0,u=0;for(c=0|xt(0|n,0|u,0|o,0|m),x(),s=0;;){if((0|s)>(0|o)){S=98;break e}if((-117440513&(d=0|i[(C=r+(c<<3)|0)+4>>2])|0)==(0|u)&&(0|i[C>>2])==(0|n)){S=93;break}if((0|i[(C=r+((c=(c+1|0)%(0|o)|0)<<3)|0)>>2])==(0|n)&&(0|i[C+4>>2])==(0|u))break;s=s+1|0}if(93==(0|S)&&(S=0,!0&100663296==(117440512&d|0)))break;i[(C=t+(a<<3)|0)>>2]=f,i[C+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=E+(e<<3)|0)>>2],l=0|i[l+4>>2]}}else a=0,o=p}else a=0,o=0}while(0);if(kt(0|r,0,0|w),Tt(0|E,0|v,o<<3|0),At(v),!o)break;t=t+(a<<3)|0}return 41==(0|S)?(At(E),At(r),0|(C=-1)):51==(0|S)?(At(E),At(r),0|(C=-2)):58==(0|S)?(At(E),At(r),0|(C=-3)):98==(0|S)?(At(v),At(E),At(r),0|(C=-1)):(99==(0|S)&&Tt(0|t,0|E,o<<3|0),At(E),At(r),0|(C=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],At(o)}while(0!=(0|n));o=t,t=0|i[t+8>>2],At(o)}while(0!=(0|t));if(t=e,e=0|i[e+8>>2],r||At(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,u=0,h=0,p=0;if(r=M,M=M+176|0,qe(e|=0,t|=0,n=r),(0|(e=0|i[n>>2]))<=1)return M=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)),u=l,l=+o[n+8+(e<<4)+8>>3],u=p*p+(u=+f(.5*(l-u)))*(+d(+h)*+d(+s)*u),a+=2*+v(+ +c(+u),+ +c(+(1-u)))}while((0|e)!=(0|t));return M=r,+(p=6371.007180918475*a)},_exactEdgeLengthM:function(e,t){var n,r,a=0,s=0,l=0,u=0,h=0,p=0;if(r=M,M=M+176|0,qe(e|=0,t|=0,n=r),(0|(e=0|i[n>>2]))<=1)return M=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)),u=l,l=+o[n+8+(e<<4)+8>>3],u=p*p+(u=+f(.5*(l-u)))*(+d(+h)*+d(+s)*u),a+=2*+v(+ +c(+u),+ +c(+(1-u)))}while((0|e)!=(0|t));return M=r,+(p=6371.007180918475*a*1e3)},_exactEdgeLengthRads:function(e,t){var n,r,a=0,s=0,l=0,u=0,h=0,p=0;if(r=M,M=M+176|0,qe(e|=0,t|=0,n=r),(0|(e=0|i[n>>2]))<=1)return M=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)),u=l,l=+o[n+8+(e<<4)+8>>3],u=p*p+(u=+f(.5*(l-u)))*(+d(+s)*+d(+h)*u),a+=2*+v(+ +c(+u),+ +c(+(1-u)))}while((0|e)<(0|t));return M=r,+a},_experimentalH3ToLocalIj:function(e,t,n,r,i){var o,a;return i|=0,a=M,M=M+16|0,(e=0|Je(e|=0,t|=0,n|=0,r|=0,o=a))||(he(o,i),e=0),M=a,0|e},_experimentalLocalIjToH3:function(e,t,n,r){var i,o;return e|=0,t|=0,r|=0,i=M,M=M+16|0,pe(n|=0,o=i),r=0|et(e,t,o,r),M=i,0|r},_free:At,_geoToH3:ze,_getDestinationH3IndexFromUnidirectionalEdge:function(e,t){e|=0;var n,r,o=0;return n=M,M=M+16|0,o=n,!0&268435456==(2013265920&(t|=0)|0)?(r=0|Et(0|e,0|t,56),x(),i[o>>2]=0,o=0|L(e,-2130706433&t|134217728,7&r,o),t=0|x(),w(0|t),M=n,0|o):(o=0,w(0|(t=0)),M=n,0|o)},_getH3IndexesFromUnidirectionalEdge:function(e,t,n){e|=0;var r,o,a,s,l=0;a=M,M=M+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|Et(0|e,0|t,56),x(),i[r>>2]=0,e=0|L(e,o,7&t,r),t=0|x()):(e=0,t=0),i[(l=n+8|0)>>2]=e,i[l+4>>2]=t,M=a},_getH3UnidirectionalEdge:function(e,t,n,r){var o,a,s=0,l=0,c=0,u=0,d=0;if(a=M,M=M+16|0,o=a,!(0|Ke(e|=0,t|=0,n|=0,r|=0)))return u=0,w(0|(c=0)),M=a,0|u;for(c=-2130706433&t,s=(s=0==(0|Le(e,t)))?1:2;i[o>>2]=0,l=s+1|0,!((0|(d=0|L(e,t,s,o)))==(0|n)&(0|x())==(0|r));){if(!(l>>>0<7)){s=0,e=0,u=6;break}s=l}return 6==(0|u)?(w(0|s),M=a,0|e):(d=0|St(0|s,0,56),u=0|c|x()|268435456,d|=e,w(0|u),M=a,0|d)},_getH3UnidirectionalEdgeBoundary:qe,_getH3UnidirectionalEdgesFromHexagon:function(e,t,n){n|=0;var r,o=0;r=0==(0|Le(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:Ge,_getRes0Indexes:function(e){e|=0;var t=0,n=0,r=0;t=0;do{St(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=M,M=M+32|0,o=a,e=0==(0|Je(e|=0,t|=0,e,t,i=a+12|0))&&0==(0|Je(e,t,n,r,o))?0|fe(i,o):-1,M=a,0|e},_h3GetBaseCell:Me,_h3GetFaces:function e(t,n,r){r|=0;var o,a=0,s=0,l=0,c=0,u=0,d=0,f=0,h=0;o=M,M=M+128|0,f=o+112|0,l=o+96|0,h=o,s=0|Et(0|(t|=0),0|(n|=0),52),x(),u=15&s,i[f>>2]=u,c=0|Et(0|t,0|n,45),x(),c&=127;e:do{if(0|D(c)){if(0|u)for(a=1;;){if(!(0==((d=0|St(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|St(u+1|0,0,52),h=0|x()|-15728641&n,e((d|t)&~(f=0|St(7,0,3*(14-u|0)|0)),h&~(0|x()),r),void(M=o);s=1}else s=0}while(0);He(t,n,l),s?(_e(l,f,h),d=5):(Se(l,f,h),d=6);e:do{if(0|D(c))if(u)for(a=1;;){if(!(0==((c=0|St(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(kt(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|(u=0|i[(c=r+(a<<2)|0)>>2]))|(0|u)==(0|l));)a=a+1|0;i[c>>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|(u=0|i[(c=r+(a<<2)|0)>>2]))|(0|u)==(0|l));)a=a+1|0;i[c>>2]=l,s=s+1|0}while((0|s)!=(0|d))}M=o},_h3GetResolution:function(e,t){return t=0|Et(0|(e|=0),0|(t|=0),52),x(),15&t|0},_h3IndexesAreNeighbors:Ke,_h3IsPentagon:Le,_h3IsResClassIII:function(e,t){return t=0|Et(0|(e|=0),0|(t|=0),52),x(),1&t|0},_h3IsValid:Oe,_h3Line:function(e,t,n,r,o){n|=0,r|=0,o|=0;var a,s=0,c=0,u=0,d=0,f=0,h=0,p=0,g=0,m=0,v=0,A=0,y=0,b=0,_=0,w=0,x=0,E=0;if(a=M,M=M+48|0,c=a+12|0,x=a,0==(0|Je(e|=0,t|=0,e,t,s=a+24|0))&&0==(0|Je(e,t,n,r,c))){if((0|(w=0|fe(s,c)))<0)return M=a,0|(x=w);for(i[s>>2]=0,i[s+4>>2]=0,i[s+8>>2]=0,i[c>>2]=0,i[c+4>>2]=0,i[c+8>>2]=0,Je(e,t,e,t,s),Je(e,t,n,r,c),ge(s),ge(c),w?(m=+(0|w),_=s,n=h=0|i[s>>2],r=p=0|i[(y=s+4|0)>>2],s=g=0|i[(b=s+8|0)>>2],v=+((0|i[c>>2])-h|0)/m,A=+((0|i[c+4>>2])-p|0)/m,m=+((0|i[c+8>>2])-g|0)/m):(y=r=s+4|0,b=g=s+8|0,_=s,n=0|i[s>>2],r=0|i[r>>2],s=0|i[g>>2],v=0,A=0,m=0),i[x>>2]=n,i[(g=x+4|0)>>2]=r,i[(p=x+8|0)>>2]=s,h=0;;){E=v*(d=+(0|h))+ +(0|n),u=A*d+ +(0|i[y>>2]),d=m*d+ +(0|i[b>>2]),r=~~+Pt(+E),c=~~+Pt(+u),n=~~+Pt(+d),E=+l(+(+(0|r)-E)),u=+l(+(+(0|c)-u)),d=+l(+(+(0|n)-d));do{if(!(E>u&E>d)){if(f=0-r|0,u>d){s=f-n|0;break}s=c,n=f-c|0;break}r=0-(c+n)|0,s=c}while(0);if(i[x>>2]=r,i[g>>2]=s,i[p>>2]=n,me(x),et(e,t,x,o+(h<<3)|0),(0|h)==(0|w))break;h=h+1|0,n=0|i[_>>2]}return M=a,0|(x=0)}return M=a,0|(x=-1)},_h3LineSize:function(e,t,n,r){var i,o,a;return n|=0,r|=0,a=M,M=M+32|0,o=a,e=0==(0|Je(e|=0,t|=0,e,t,i=a+12|0))&&0==(0|Je(e,t,n,r,o))?0|fe(i,o):-1,M=a,(e>>>31^1)+e|0},_h3SetToLinkedGeo:function(e,t,n){n|=0;var r,o,a,s=0;if(a=M,M=M+32|0,r=a,function(e,t,n){e|=0,n|=0;var r,o,a=0,s=0,l=0,c=0,u=0;if(o=M,M=M+176|0,r=o,(0|(t|=0))<1)return ct(n,0,0),void(M=o);c=0|Et(0|i[(c=e)>>2],0|i[c+4>>2],52),x(),ct(n,(0|t)>6?t:6,15&c),c=0;do{if(We(0|i[(a=e+(c<<3)|0)>>2],0|i[a+4>>2],r),(0|(a=0|i[r>>2]))>0){u=0;do{l=r+8+(u<<4)|0,(s=0|pt(n,a=r+8+(((0|(u=u+1|0))%(0|a)|0)<<4)|0,l))?ft(n,s):ht(n,l,a),a=0|i[r>>2]}while((0|u)<(0|a))}c=c+1|0}while((0|c)!=(0|t));M=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 $e(n),ut(o),void(M=a);do{t=0|Ye(n);do{Xe(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|gt(o,r)}while(0!=(0|e));e=0|dt(o)}while(0!=(0|e));$e(n),ut(o),M=a},_h3ToCenterChild:function(e,t,n){n|=0;var r=0,i=0;if(r=0|Et(0|(e|=0),0|(t|=0),52),x(),(0|n)<16&(0|(r&=15))<=(0|n)){if((0|r)!=(0|n)&&(e|=i=0|St(0|n,0,52),t=0|x()|-15728641&t,(0|r)<(0|n)))do{i=0|St(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:Ie,_h3ToGeo:Ve,_h3ToGeoBoundary:We,_h3ToParent:Re,_h3UnidirectionalEdgeIsValid:function(e,t){var n=0;if(!(!0&268435456==(2013265920&(t|=0)|0)))return 0|(n=0);switch(n=0|Et(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|Le(e,n=-2130706433&t|134217728))?0|(n=0):0|(n=0|Oe(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,c=0,u=0,d=0,f=0;if(o=M,M=M+16|0,f=o,!(n|=0))return i[(f=r)>>2]=e,i[f+4>>2]=t,M=o,0|(f=0);i[f>>2]=0;e:do{if(0|Le(e,t))e=1;else{if(s=(0|n)>0){a=0,d=e;do{if(0==(0|(d=0|L(d,t,4,f)))&0==(0|(t=0|x()))){e=2;break e}if(a=a+1|0,0|Le(d,t)){e=1;break e}}while((0|a)<(0|n));if(i[(u=r)>>2]=d,i[u+4>>2]=t,u=n+-1|0,s){s=0,l=1,a=d,e=t;do{if(0==(0|(a=0|L(a,e,2,f)))&0==(0|(e=0|x()))){e=2;break e}if(i[(c=r+(l<<3)|0)>>2]=a,i[c+4>>2]=e,l=l+1|0,0|Le(a,e)){e=1;break e}s=s+1|0}while((0|s)<(0|n));c=0,s=l;do{if(0==(0|(a=0|L(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|Le(a,e)){e=1;break e}c=c+1|0}while((0|c)<(0|n));l=0;do{if(0==(0|(a=0|L(a,e,1,f)))&0==(0|(e=0|x()))){e=2;break e}if(i[(c=r+(s<<3)|0)>>2]=a,i[c+4>>2]=e,s=s+1|0,0|Le(a,e)){e=1;break e}l=l+1|0}while((0|l)<(0|n));l=0;do{if(0==(0|(a=0|L(a,e,5,f)))&0==(0|(e=0|x()))){e=2;break e}if(i[(c=r+(s<<3)|0)>>2]=a,i[c+4>>2]=e,s=s+1|0,0|Le(a,e)){e=1;break e}l=l+1|0}while((0|l)<(0|n));l=0;do{if(0==(0|(a=0|L(a,e,4,f)))&0==(0|(e=0|x()))){e=2;break e}if(i[(c=r+(s<<3)|0)>>2]=a,i[c+4>>2]=e,s=s+1|0,0|Le(a,e)){e=1;break e}l=l+1|0}while((0|l)<(0|n));for(l=0;;){if(0==(0|(a=0|L(a,e,6,f)))&0==(0|(e=0|x()))){e=2;break e}if((0|l)!=(0|u)){if(i[(c=r+(s<<3)|0)>>2]=a,i[c+4>>2]=e,0|Le(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 M=o,0|(f=e)},_i64Subtract:bt,_kRing:O,_kRingDistances:function(e,t,n,r,i){var o;if(0|R(e|=0,t|=0,n|=0,r|=0,i|=0)){if(kt(0|r,0,(o=1+(0|y(3*n|0,n+1|0))|0)<<3|0),0|i)return kt(0|i,0,o<<2|0),void I(e,t,n,r,i,o,0);(i=0|yt(o,4))&&(I(e,t,n,r,i,o,0),At(i))}},_llvm_minnum_f64:Ct,_llvm_round_f64:Pt,_malloc:vt,_maxFaceCount:function(e,t){var n=0,r=0;if(r=0|Et(0|(e|=0),0|(t|=0),45),x(),!(0|D(127&r)))return 0|(r=2);if(r=0|Et(0|e,0|t,52),x(),!(r&=15))return 0|(r=5);for(n=1;;){if(!(0==((0|St(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|Et(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|y(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=M,M=M+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|W(a,t),t=0|i[o>>2],(0|(o=0|i[e+8>>2]))<=0)return M=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 M=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|Et(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:kt,_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*+v(+ +c(+a),+ +c(+(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*+v(+ +c(+a),+ +c(+(1-a)))},_polyfill:function(e,t,n){var r,o=0,a=0,s=0,l=0,c=0;if(r=M,M=M+48|0,o=r+8|0,a=r,0|function(e,t,n){e|=0,t|=0,n|=0;var r=0,o=0,a=0,s=0,l=0,c=0,u=0,d=0,f=0,h=0,p=0,g=0,m=0,v=0,A=0,y=0,b=0,_=0,w=0,S=0,C=0,P=0,T=0,k=0,O=0,L=0,D=0,F=0,j=0,B=0;B=M,M=M+112|0,L=B+80|0,c=B+72|0,D=B,F=B+56|0,u=e+8|0,j=0|vt(32+(i[u>>2]<<5)|0),j||E(22848,22448,800,22456);if(it(e,j),a=e,r=0|i[a+4>>2],l=c,i[l>>2]=i[a>>2],i[l+4>>2]=r,rt(c,L),l=0|W(L,t),r=0|i[c>>2],a=0|i[u>>2],(0|a)>0){s=0|i[e+12>>2],o=0;do{r=(0|i[s+(o<<3)>>2])+r|0,o=o+1|0}while((0|o)!=(0|a))}if(l=(0|l)<(0|r)?r:l,O=l+12|0,o=0|yt(O,8),d=0|yt(O,8),i[L>>2]=0,T=e,k=0|i[T+4>>2],r=c,i[r>>2]=i[T>>2],i[r+4>>2]=k,r=0|N(c,O,t,L,o,d),0|r)return At(o),At(d),At(j),M=B,0|(j=r);e:do{if((0|i[u>>2])>0){for(a=e+12|0,r=0;s=0|N((0|i[a>>2])+(r<<3)|0,O,t,L,o,d),r=r+1|0,!(0|s);)if((0|r)>=(0|i[u>>2]))break e;return At(o),At(d),At(j),M=B,0|(j=s)}}while(0);(0|l)>-12&&kt(0|d,0,((0|O)>1?O:1)<<3|0);e:do{if((0|i[L>>2])>0){k=((0|O)<0)<<31>>31,_=o,w=d,S=o,C=o,P=d,T=o,r=o,v=o,A=d,y=d,b=d,o=d;t:for(;;){for(m=0|i[L>>2],p=0,g=0,a=0;;){l=(s=D)+56|0;do{i[s>>2]=0,s=s+4|0}while((0|s)<(0|l));if(0|R(c=0|i[(t=_+(p<<3)|0)>>2],t=0|i[t+4>>2],1,D,0)){l=(s=D)+56|0;do{i[s>>2]=0,s=s+4|0}while((0|s)<(0|l));0|(s=0|yt(7,4))&&(I(c,t,1,D,s,7,0),At(s))}h=0;do{d=0|i[(f=D+(h<<3)|0)>>2],f=0|i[f+4>>2];n:do{if(!(0==(0|d)&0==(0|f))){if(c=0|xt(0|d,0|f,0|O,0|k),x(),!(0==(0|(t=0|i[(l=s=n+(c<<3)|0)>>2]))&0==(0|(l=0|i[l+4>>2]))))for(u=0;;){if((0|u)>(0|O))break t;if((0|t)==(0|d)&(0|l)==(0|f))break n;if(0==(0|(t=0|i[(l=s=n+((c=(c+1|0)%(0|O)|0)<<3)|0)>>2]))&0==(0|(l=0|i[l+4>>2])))break;u=u+1|0}0==(0|d)&0==(0|f)||(Ve(d,f,F),0|ot(e,j,F)&&(i[(u=s)>>2]=d,i[u+4>>2]=f,i[(u=w+(a<<3)|0)>>2]=d,i[u+4>>2]=f,a=a+1|0))}}while(0);h=h+1|0}while(h>>>0<7);if((0|(g=g+1|0))>=(0|m))break;p=p+1|0}if((0|m)>0&&kt(0|S,0,m<<3|0),i[L>>2]=a,!((0|a)>0))break e;d=o,f=b,h=T,p=y,g=A,m=w,o=v,b=r,y=C,A=S,v=d,r=f,T=P,P=h,C=p,S=g,w=_,_=m}return At(C),At(P),At(j),M=B,0|(j=-1)}r=d}while(0);return At(j),At(o),At(r),j=0,M=B,0|j}(e|=0,t|=0,n|=0)){if(s=0|i[(c=e)+4>>2],i[(l=a)>>2]=i[c>>2],i[l+4>>2]=s,rt(a,o),l=0|W(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||kt(0|n,0,8+(((0|(c=t+11|0))>0?c:0)<<3)|0),M=r}else M=r},_res0IndexCount:function(){return 122},_round:Mt,_sbrk:Ot,_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,c=0,u=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=u=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(c=0|Et(0|s,0|l,52),x(),(0|(c&=15))>(0|o)){s=-2,a=16;break e}if((0|c)==(0|o)){i[(u=n+(a<<3)|0)>>2]=s,i[u+4>>2]=l,a=a+1|0;break}if((0|(s=(0|tt(7,o-c|0))+a|0))>(0|r)){s=-1,a=16;break e}Ie(0|i[u>>2],0|i[u+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){M=e|=0},stackAlloc:function(e){var t;return t=M,M=(M=M+(e|=0)|0)+15&-16,0|t},stackRestore:function(e){M=e|=0},stackSave:function(){return 0|M}}}({Math:Math,Int8Array:Int8Array,Int32Array:Int32Array,Uint8Array:Uint8Array,Float32Array:Float32Array,Float64Array:Float64Array},{a:le,b:function(e){c=e},c:u,d:function(e,t,n,r){le("Assertion failed: "+g(e)+", at: "+[t?g(t):"unknown filename",n,r?g(r):"unknown function"])},e:function(e){return n.___errno_location&&(b[n.___errno_location()>>2]=e),e},f:G,g:function(e,t,n){A.set(A.subarray(t,t+n),e)},h:function(e){var t=G(),n=16777216,r=2130706432;if(e>r)return!1;for(var i=Math.max(t,16777216);i>0]=t;break;case"i16":y[e>>1]=t;break;case"i32":b[e>>2]=t;break;case"i64":B=[t>>>0,(j=t,+O(j)>=1?j>0?(0|L(+I(j/4294967296),4294967295))>>>0:~~+R((j-+(~~j>>>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 v[e>>0];case"i16":return y[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=u,Z){U(Z)||(X=Z,Z=n.locateFile?n.locateFile(X,a):a+X),N++,n.monitorRunDependencies&&n.monitorRunDependencies(N);var re=function(e){e.byteLength&&(e=new Uint8Array(e)),A.set(e,8),n.memoryInitializerRequest&&delete n.memoryInitializerRequest.response,function(e){if(N--,n.monitorRunDependencies&&n.monitorRunDependencies(N),0==N&&(null!==D&&(clearInterval(D),D=null),F)){var t=F;F=null,t()}}()},ie=function(){i(Z,re,(function(){throw"could not load memory initializer "+Z}))},oe=Y(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=Y(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(){$||($=!0,d||(C(T),C(k),n.onRuntimeInitialized&&n.onRuntimeInitialized(),function(){if(n.postRun)for("function"==typeof n.postRun&&(n.postRun=[n.postRun]);n.postRun.length;)e=n.postRun.shift(),M.unshift(e);var e;C(M)}()))}e=e||o,N>0||(!function(){if(n.preRun)for("function"==typeof n.preRun&&(n.preRun=[n.preRun]);n.preRun.length;)e=n.preRun.shift(),P.unshift(e);var e;C(P)}(),N>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(){$||se(),$||(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",i,[i,i]],["geoToH3",i,[i,i,i]],["h3ToGeo",null,[i,i,i]],["h3ToGeoBoundary",null,[i,i,i]],["maxKringSize",i,[i]],["kRing",null,[i,i,i,i]],["kRingDistances",null,[i,i,i,i,i]],["hexRing",null,[i,i,i,i]],["maxPolyfillSize",i,[i,i]],["polyfill",null,[i,i,i]],["h3SetToLinkedGeo",null,[i,i,i]],["destroyLinkedPolygon",null,[i]],["compact",i,[i,i,i]],["uncompact",i,[i,i,i,i,i]],["maxUncompactSize",i,[i,i,i]],["h3IsPentagon",i,[i,i]],["h3IsResClassIII",i,[i,i]],["h3GetBaseCell",i,[i,i]],["h3GetResolution",i,[i,i]],["maxFaceCount",i,[i,i]],["h3GetFaces",null,[i,i,i]],["h3ToParent",i,[i,i,i]],["h3ToChildren",null,[i,i,i,i]],["h3ToCenterChild",i,[i,i,i]],["maxH3ToChildrenSize",i,[i,i,i]],["h3IndexesAreNeighbors",i,[i,i,i,i]],["getH3UnidirectionalEdge",i,[i,i,i,i]],["getOriginH3IndexFromUnidirectionalEdge",i,[i,i]],["getDestinationH3IndexFromUnidirectionalEdge",i,[i,i]],["h3UnidirectionalEdgeIsValid",i,[i,i]],["getH3IndexesFromUnidirectionalEdge",null,[i,i,i]],["getH3UnidirectionalEdgesFromHexagon",null,[i,i,i]],["getH3UnidirectionalEdgeBoundary",null,[i,i,i]],["h3Distance",i,[i,i,i,i]],["h3Line",i,[i,i,i,i,i]],["h3LineSize",i,[i,i,i,i]],["experimentalH3ToLocalIj",i,[i,i,i,i,i]],["experimentalLocalIjToH3",i,[i,i,i,i]],["hexAreaM2",i,[i]],["hexAreaKm2",i,[i]],["edgeLengthM",i,[i]],["edgeLengthKm",i,[i]],["pointDistM",i,[i,i]],["pointDistKm",i,[i,i]],["pointDistRads",i,[i,i]],["cellAreaM2",i,[i,i]],["cellAreaKm2",i,[i,i]],["cellAreaRads2",i,[i,i]],["exactEdgeLengthM",i,[i,i]],["exactEdgeLengthKm",i,[i,i]],["exactEdgeLengthRads",i,[i,i]],["numHexagons",i,[i]],["getRes0Indexes",null,[i]],["res0IndexCount",i],["getPentagonIndexes",null,[i,i]],["pentagonIndexCount",i]].forEach((function(e){o[e[0]]=r.cwrap.apply(r,e)}));var a=16,s=4,l=4,c=8,u=o.sizeOfH3Index(),d=o.sizeOfGeoCoord(),f=o.sizeOfGeoBoundary(),h=(o.sizeOfGeoPolygon(),o.sizeOfGeofence(),o.sizeOfLinkedGeoPolygon()),p=(o.sizeOfCoordIJ(),{m:"m",m2:"m2",km:"km",km2:"km2",rads:"rads",rads2:"rads2"});function g(e){if("number"!==typeof e||e<0||e>15||Math.floor(e)!==e)throw new Error("Invalid resolution: "+e)}var m=/[^0-9a-fA-F]/;function v(e){if(Array.isArray(e)&&2===e.length&&Number.isInteger(e[0])&&Number.isInteger(e[1]))return e;if("string"!==typeof e||m.test(e))return[0,0];var t=parseInt(e.substring(0,e.length-8),a);return[parseInt(e.substring(e.length-8),a),t]}function A(e){if(e>=0)return e.toString(a);var t=b(8,(e&=2147483647).toString(a));return t=(parseInt(t[0],a)+8).toString(a)+t.substring(1)}function y(e,t){return A(t)+b(8,A(e))}function b(e,t){for(var n=e-t.length,r="",i=0;i{var r;!function(i,o,a,s){"use strict";var l,c=["","webkit","Moz","MS","ms","o"],u=o.createElement("div"),d="function",f=Math.round,h=Math.abs,p=Date.now;function g(e,t,n){return setTimeout(w(e,n),t)}function m(e,t,n){return!!Array.isArray(e)&&(v(e,n[t],n),!0)}function v(e,t,n){var r;if(e)if(e.forEach)e.forEach(t,n);else if(e.length!==s)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(e===s||null===e)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(e),n=1;n-1}function k(e){return e.trim().split(/\s+/g)}function M(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=re(t):1===i&&(n.firstMultiple=!1);var o=n.firstInput,a=n.firstMultiple,l=a?a.center:o.center,c=t.center=ie(r);t.timeStamp=p(),t.deltaTime=t.timeStamp-o.timeStamp,t.angle=le(l,c),t.distance=se(l,c),function(e,t){var n=t.center,r=e.offsetDelta||{},i=e.prevDelta||{},o=e.prevInput||{};t.eventType!==U&&o.eventType!==H||(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=ae(t.deltaX,t.deltaY);var u=oe(t.deltaTime,t.deltaX,t.deltaY);t.overallVelocityX=u.x,t.overallVelocityY=u.y,t.overallVelocity=h(u.x)>h(u.y)?u.x:u.y,t.scale=a?(d=a.pointers,f=r,se(f[0],f[1],ee)/se(d[0],d[1],ee)):1,t.rotation=a?function(e,t){return le(t[1],t[0],ee)+le(e[1],e[0],ee)}(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,l=t.timeStamp-a.timeStamp;if(t.eventType!=V&&(l>z||a.velocity===s)){var c=t.deltaX-a.deltaX,u=t.deltaY-a.deltaY,d=oe(l,c,u);r=d.x,i=d.y,n=h(d.x)>h(d.y)?d.x:d.y,o=ae(c,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 d,f;var g=e.element;P(t.srcEvent.target,g)&&(g=t.srcEvent.target);t.target=g}(e,n),e.emit("hammer.input",n),e.recognize(n),e.session.prevInput=n}function re(e){for(var t=[],n=0;n=h(t)?e<0?G:K:t<0?q:Y}function se(e,t,n){n||(n=J);var r=t[n[0]]-e[n[0]],i=t[n[1]]-e[n[1]];return Math.sqrt(r*r+i*i)}function le(e,t,n){n||(n=J);var r=t[n[0]]-e[n[0]],i=t[n[1]]-e[n[1]];return 180*Math.atan2(i,r)/Math.PI}te.prototype={handler:function(){},init:function(){this.evEl&&S(this.element,this.evEl,this.domHandler),this.evTarget&&S(this.target,this.evTarget,this.domHandler),this.evWin&&S(N(this.element),this.evWin,this.domHandler)},destroy:function(){this.evEl&&C(this.element,this.evEl,this.domHandler),this.evTarget&&C(this.target,this.evTarget,this.domHandler),this.evWin&&C(N(this.element),this.evWin,this.domHandler)}};var ce={mousedown:U,mousemove:2,mouseup:H},ue="mousedown",de="mousemove mouseup";function fe(){this.evEl=ue,this.evWin=de,this.pressed=!1,te.apply(this,arguments)}_(fe,te,{handler:function(e){var t=ce[e.type];t&U&&0===e.button&&(this.pressed=!0),2&t&&1!==e.which&&(t=H),this.pressed&&(t&H&&(this.pressed=!1),this.callback(this.manager,t,{pointers:[e],changedPointers:[e],pointerType:Z,srcEvent:e}))}});var he={pointerdown:U,pointermove:2,pointerup:H,pointercancel:V,pointerout:V},pe={2:B,3:"pen",4:Z,5:"kinect"},ge="pointerdown",me="pointermove pointerup pointercancel";function ve(){this.evEl=ge,this.evWin=me,te.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}i.MSPointerEvent&&!i.PointerEvent&&(ge="MSPointerDown",me="MSPointerMove MSPointerUp MSPointerCancel"),_(ve,te,{handler:function(e){var t=this.store,n=!1,r=e.type.toLowerCase().replace("ms",""),i=he[r],o=pe[e.pointerType]||e.pointerType,a=o==B,s=M(t,e.pointerId,"pointerId");i&U&&(0===e.button||a)?s<0&&(t.push(e),s=t.length-1):i&(H|V)&&(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 Ae={touchstart:U,touchmove:2,touchend:H,touchcancel:V};function ye(){this.evTarget="touchstart",this.evWin="touchstart touchmove touchend touchcancel",this.started=!1,te.apply(this,arguments)}function be(e,t){var n=O(e.touches),r=O(e.changedTouches);return t&(H|V)&&(n=R(n.concat(r),"identifier",!0)),[n,r]}_(ye,te,{handler:function(e){var t=Ae[e.type];if(t===U&&(this.started=!0),this.started){var n=be.call(this,e,t);t&(H|V)&&n[0].length-n[1].length===0&&(this.started=!1),this.callback(this.manager,t,{pointers:n[0],changedPointers:n[1],pointerType:B,srcEvent:e})}}});var _e={touchstart:U,touchmove:2,touchend:H,touchcancel:V},we="touchstart touchmove touchend touchcancel";function xe(){this.evTarget=we,this.targetIds={},te.apply(this,arguments)}function Ee(e,t){var n=O(e.touches),r=this.targetIds;if(t&(2|U)&&1===n.length)return r[n[0].identifier]=!0,[n,n];var i,o,a=O(e.changedTouches),s=[],l=this.target;if(o=n.filter((function(e){return P(e.target,l)})),t===U)for(i=0;i-1&&r.splice(e,1)}),Se)}}function ke(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+He(n)),r(t.options.event),e.additionalEvent&&r(e.additionalEvent),n>=8&&r(t.options.event+He(n))},tryEmit:function(e){if(this.canEmit())return this.emit(e);this.state=ze},canEmit:function(){for(var e=0;et.threshold&&i&t.direction},attrTest:function(e){return Ge.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=Ve(e.direction);t&&(e.additionalEvent=this.options.event+t),this._super.emit.call(this,e)}}),_(qe,Ge,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[Ne]},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)}}),_(Ye,Ue,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return[Ie]},process:function(e){var t=this.options,n=e.pointers.length===t.pointers,r=e.distancet.time;if(this._input=e,!r||!n||e.eventType&(H|V)&&!i)this.reset();else if(e.eventType&U)this.reset(),this._timer=g((function(){this.state=8,this.tryEmit()}),t.time,this);else if(e.eventType&H)return 8;return ze},reset:function(){clearTimeout(this._timer)},emit:function(e){8===this.state&&(e&&e.eventType&H?this.manager.emit(this.options.event+"up",e):(this._input.timeStamp=p(),this.manager.emit(this.options.event,this._input)))}}),_(Xe,Ge,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[Ne]},attrTest:function(e){return this._super.attrTest.call(this,e)&&(Math.abs(e.rotation)>this.options.threshold||2&this.state)}}),_($e,Ge,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:X|$,pointers:1},getTouchAction:function(){return Ke.prototype.getTouchAction.call(this)},attrTest:function(e){var t,n=this.options.direction;return n&(X|$)?t=e.overallVelocity:n&X?t=e.overallVelocityX:n&$&&(t=e.overallVelocityY),this._super.attrTest.call(this,e)&&n&e.offsetDirection&&e.distance>this.options.threshold&&e.maxPointers==this.options.pointers&&h(t)>this.options.velocity&&e.eventType&H},emit:function(e){var t=Ve(e.offsetDirection);t&&this.manager.emit(this.options.event+t,e),this.manager.emit(this.options.event,e)}}),_(Qe,Ue,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return[Le]},process:function(e){var t=this.options,n=e.pointers.length===t.pointers,r=e.distance{"use strict";var r=n(78559)("%Object.defineProperty%",!0),i=function(){if(r)try{return r({},"a",{value:1}),!0}catch(e){return!1}return!1};i.hasArrayLengthDefineBug=function(){if(!i())return null;try{return 1!==r([],"length",{value:1}).length}catch(e){return!0}},e.exports=i},58982:e=>{"use strict";var t={foo:{}},n=Object;e.exports=function(){return{__proto__:t}.foo===t.foo&&!({__proto__:null}instanceof n)}},52505:(e,t,n)=>{"use strict";var r="undefined"!==typeof Symbol&&Symbol,i=n(14070);e.exports=function(){return"function"===typeof r&&("function"===typeof Symbol&&("symbol"===typeof r("foo")&&("symbol"===typeof Symbol("bar")&&i())))}},14070:e=>{"use strict";e.exports=function(){if("function"!==typeof Symbol||"function"!==typeof Object.getOwnPropertySymbols)return!1;if("symbol"===typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),n=Object(t);if("string"===typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(t in e[t]=42,e)return!1;if("function"===typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"===typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var r=Object.getOwnPropertySymbols(e);if(1!==r.length||r[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"===typeof Object.getOwnPropertyDescriptor){var i=Object.getOwnPropertyDescriptor(e,t);if(42!==i.value||!0!==i.enumerable)return!1}return!0}},85088:(e,t,n)=>{"use strict";var r=Function.prototype.call,i=Object.prototype.hasOwnProperty,o=n(91989);e.exports=o.call(r,i)},65957:(e,t)=>{t.read=function(e,t,n,r,i){var o,a,s=8*i-r-1,l=(1<>1,u=-7,d=n?i-1:0,f=n?-1:1,h=e[t+d];for(d+=f,o=h&(1<<-u)-1,h>>=-u,u+=s;u>0;o=256*o+e[t+d],d+=f,u-=8);for(a=o&(1<<-u)-1,o>>=-u,u+=r;u>0;a=256*a+e[t+d],d+=f,u-=8);if(0===o)o=1-c;else{if(o===l)return a?NaN:1/0*(h?-1:1);a+=Math.pow(2,r),o-=c}return(h?-1:1)*a*Math.pow(2,o-r)},t.write=function(e,t,n,r,i,o){var a,s,l,c=8*o-i-1,u=(1<>1,f=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,h=r?0:o-1,p=r?1:-1,g=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=u):(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>=u?(s=0,a=u):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,c-=8);e[n+h-p]|=128*g}},64185:(e,t,n)=>{"use strict";n.d(t,{C:()=>c});var r=n(43815),i=n(37152),o=n(24420),a=n(481);function s(e,t){return t?Object.keys(e).reduce((function(n,i){var o,a;return n[i]=(o=e[i],(a=t[i])?(0,r.pi)((0,r.pi)((0,r.pi)({},o||{}),a||{}),Object.keys(o).reduce((function(e,t){return e[t]=(0,r.pi)((0,r.pi)({},o[t]),a[t]||{}),e}),{})):o),n}),(0,r.pi)({},e)):e}function l(e){return{create:function(){return{get:function(t){return e[t]},set:function(t,n){e[t]=n}}}}}var c=function(){function e(t,n,i,c){var u,d=this;if(void 0===n&&(n=e.defaultLocale),this.formatterCache={number:{},dateTime:{},pluralRules:{}},this.format=function(e){var t=d.formatToParts(e);if(1===t.length)return t[0].value;var n=t.reduce((function(e,t){return e.length&&t.type===a.du.literal&&"string"===typeof e[e.length-1]?e[e.length-1]+=t.value:e.push(t.value),e}),[]);return n.length<=1?n[0]||"":n},this.formatToParts=function(e){return(0,a.FK)(d.ast,d.locales,d.formatters,d.formats,e,void 0,d.message)},this.resolvedOptions=function(){var e;return{locale:(null===(e=d.resolvedLocale)||void 0===e?void 0:e.toString())||Intl.NumberFormat.supportedLocalesOf(d.locales)[0]}},this.getAst=function(){return d.ast},this.locales=n,this.resolvedLocale=e.resolveLocale(n),"string"===typeof t){if(this.message=t,!e.__parse)throw new TypeError("IntlMessageFormat.__parse must be set to process `message` of type `string`");var f=c||{},h=(f.formatters,(0,r._T)(f,["formatters"]));this.ast=e.__parse(t,(0,r.pi)((0,r.pi)({},h),{locale:this.resolvedLocale}))}else this.ast=t;if(!Array.isArray(this.ast))throw new TypeError("A message must be provided as a String or AST.");this.formats=s(e.formats,i),this.formatters=c&&c.formatters||(void 0===(u=this.formatterCache)&&(u={number:{},dateTime:{},pluralRules:{}}),{getNumberFormat:(0,o.H)((function(){for(var e,t=[],n=0;n0?new Intl.Locale(t[0]):new Intl.Locale("string"===typeof e?e:e[0])}},e.__parse=i.Qc,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}()},49503:(e,t,n)=>{"use strict";n.d(t,{C8:()=>a,HR:()=>l,YR:()=>s,jK:()=>r,u_:()=>o});var r,i=n(43815);!function(e){e.MISSING_VALUE="MISSING_VALUE",e.INVALID_VALUE="INVALID_VALUE",e.MISSING_INTL_API="MISSING_INTL_API"}(r||(r={}));var o=function(e){function t(t,n,r){var i=e.call(this,t)||this;return i.code=n,i.originalMessage=r,i}return(0,i.ZT)(t,e),t.prototype.toString=function(){return"[formatjs Error: ".concat(this.code,"] ").concat(this.message)},t}(Error),a=function(e){function t(t,n,i,o){return e.call(this,'Invalid values for "'.concat(t,'": "').concat(n,'". Options are "').concat(Object.keys(i).join('", "'),'"'),r.INVALID_VALUE,o)||this}return(0,i.ZT)(t,e),t}(o),s=function(e){function t(t,n,i){return e.call(this,'Value for "'.concat(t,'" must be of type ').concat(n),r.INVALID_VALUE,i)||this}return(0,i.ZT)(t,e),t}(o),l=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,'"'),r.MISSING_VALUE,n)||this}return(0,i.ZT)(t,e),t}(o)},481:(e,t,n)=>{"use strict";n.d(t,{FK:()=>s,Gt:()=>a,du:()=>r});var r,i=n(37152),o=n(49503);function a(e){return"function"===typeof e}function s(e,t,n,l,c,u,d){if(1===e.length&&(0,i.O4)(e[0]))return[{type:r.literal,value:e[0].value}];for(var f=[],h=0,p=e;h{var r,i;!function(o){if(void 0===(i="function"===typeof(r=o)?r.call(t,n,t,e):r)||(e.exports=i),!0,e.exports=o(),!!0){var a=window.Cookies,s=window.Cookies=o();s.noConflict=function(){return window.Cookies=a,s}}}((function(){function e(){for(var e=0,t={};e{var r=n(72708),i=function(e){var t="",n=Object.keys(e);return n.forEach((function(i,o){var a=e[i];(function(e){return/[height|width]$/.test(e)})(i=r(i))&&"number"===typeof a&&(a+="px"),t+=!0===a?i:!1===a?"not "+i:"("+i+": "+a+")",o{var r=n(26746)("jsonp");e.exports=function(e,t,n){"function"==typeof t&&(n=t,t={});t||(t={});var a,s,l=t.prefix||"__jp",c=t.name||l+i++,u=t.param||"callback",d=null!=t.timeout?t.timeout:6e4,f=encodeURIComponent,h=document.getElementsByTagName("script")[0]||document.head;d&&(s=setTimeout((function(){p(),n&&n(new Error("Timeout"))}),d));function p(){a.parentNode&&a.parentNode.removeChild(a),window[c]=o,s&&clearTimeout(s)}return window[c]=function(e){r("jsonp got",e),p(),n&&n(null,e)},e=(e+=(~e.indexOf("?")?"&":"?")+u+"="+f(c)).replace("?&","?"),r('jsonp req "%s"',e),(a=document.createElement("script")).src=e,h.parentNode.insertBefore(a,h),function(){window[c]&&p()}};var i=0;function o(){}},76806:(e,t,n)=>{"use strict";function r(e){this.message=e}n.d(t,{Z:()=>s}),r.prototype=new Error,r.prototype.name="InvalidCharacterError";var i="undefined"!=typeof window&&window.atob&&window.atob.bind(window)||function(e){var t=String(e).replace(/=+$/,"");if(t.length%4==1)throw new r("'atob' failed: The string to be decoded is not correctly encoded.");for(var n,i,o=0,a=0,s="";i=t.charAt(a++);~i&&(n=o%4?64*n+i:i,o++%4)?s+=String.fromCharCode(255&n>>(-2*o&6)):0)i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(i);return s};function o(e){var t=e.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:t+="==";break;case 3:t+="=";break;default:throw"Illegal base64url string!"}try{return function(e){return decodeURIComponent(i(e).replace(/(.)/g,(function(e,t){var n=t.charCodeAt(0).toString(16).toUpperCase();return n.length<2&&(n="0"+n),"%"+n})))}(t)}catch(e){return i(t)}}function a(e){this.message=e}a.prototype=new Error,a.prototype.name="InvalidTokenError";const s=function(e,t){if("string"!=typeof e)throw new a("Invalid token specified");var n=!0===(t=t||{}).header?0:1;try{return JSON.parse(o(e.split(".")[n]))}catch(e){throw new a("Invalid token specified: "+e.message)}}},89342:e=>{e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length;++n{e.exports=function(e,t,n,r){var i=-1,o=null==e?0:e.length;for(r&&o&&(n=e[++i]);++i{var r=n(47235);e.exports=function(e){var t=e.length;return t?e[r(0,t-1)]:void 0}},1561:e=>{e.exports=function(e,t,n){return e===e&&(void 0!==n&&(e=e<=n?e:n),void 0!==t&&(e=e>=t?e:t)),e}},2420:(e,t,n)=>{var r=n(12641);e.exports=function(e,t){var n=!0;return r(e,(function(e,r,i){return n=!!t(e,r,i)})),n}},25126:(e,t,n)=>{var r=n(84193);e.exports=function(e,t,n){for(var i=-1,o=e.length;++i{e.exports=function(e,t){return e>t}},82474:e=>{var t=Object.prototype.hasOwnProperty;e.exports=function(e,n){return null!=e&&t.call(e,n)}},2349:(e,t,n)=>{var r=n(66429);e.exports=function(e,t,n,i){return r(e,(function(e,r,o){t(i,n(e),r,o)})),i}},19197:e=>{e.exports=function(e){return function(t){return null==e?void 0:e[t]}}},47235:e=>{var t=Math.floor,n=Math.random;e.exports=function(e,r){return e+t(n()*(r-e+1))}},4587:e=>{e.exports=function(e,t,n,r,i){return i(e,(function(e,i,o){n=r?(r=!1,e):t(n,e,i,o)})),n}},1479:(e,t,n)=>{var r=n(99069),i=n(56717);e.exports=function(e){return r(i(e))}},75341:(e,t,n)=>{var r=n(12641);e.exports=function(e,t){var n;return r(e,(function(e,r,i){return!(n=t(e,r,i))})),!!n}},8796:(e,t,n)=>{var r=n(8067);e.exports=function(e,t){return r(t,(function(t){return[t,e[t]]}))}},32286:(e,t,n)=>{var r=n(65469),i=n(37756),o=n(8897),a=n(79813);e.exports=function(e,t){return t=r(t,e),null==(e=o(e,t))||delete e[a(i(t))]}},83384:(e,t,n)=>{var r=n(8067);e.exports=function(e,t){return r(t,(function(t){return e[t]}))}},73631:(e,t,n)=>{var r=n(3328);e.exports=function(e,t){for(var n=e.length;n--&&r(t,e[n],0)>-1;);return n}},33664:(e,t,n)=>{var r=n(3328);e.exports=function(e,t){for(var n=-1,i=e.length;++n-1;);return n}},73660:(e,t,n)=>{var r=n(10977),i=n(86794),o=n(57820),a=n(38981);e.exports=function(e){return function(t){t=a(t);var n=i(t)?o(t):void 0,s=n?n[0]:t.charAt(0),l=n?r(n,1).join(""):t.slice(1);return s[e]()+l}}},52391:(e,t,n)=>{var r=n(2349);e.exports=function(e,t){return function(n,i){return r(n,e,t(i),{})}}},83490:(e,t,n)=>{var r=n(89570),i=n(41873),o=n(99540),a=n(38981),s=r.isFinite,l=Math.min;e.exports=function(e){var t=Math[e];return function(e,n){if(e=o(e),(n=null==n?0:l(i(n),292))&&s(e)){var r=(a(e)+"e").split("e"),c=t(r[0]+"e"+(+r[1]+n));return+((r=(a(c)+"e").split("e"))[0]+"e"+(+r[1]-n))}return t(e)}}},80458:(e,t,n)=>{var r=n(8796),i=n(14055),o=n(23606),a=n(95247);e.exports=function(e){return function(t){var n=i(t);return"[object Map]"==n?o(t):"[object Set]"==n?a(t):r(t,e(t))}}},27171:(e,t,n)=>{var r=n(41848),i=Object.prototype,o=i.hasOwnProperty;e.exports=function(e,t,n,a){return void 0===e||r(e,i[n])&&!o.call(a,n)?t:e}},79812:(e,t,n)=>{var r=n(49623);e.exports=function(e){return r(e)?void 0:e}},51880:(e,t,n)=>{var r=n(19197)({"&":"&","<":"<",">":">",'"':""","'":"'"});e.exports=r},9939:e=>{var t={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"};e.exports=function(e){return"\\"+t[e]}},8897:(e,t,n)=>{var r=n(39578),i=n(867);e.exports=function(e,t){return t.length<2?e:r(e,i(t,0,-1))}},40514:e=>{e.exports=/<%-([\s\S]+?)%>/g},72613:e=>{e.exports=/<%([\s\S]+?)%>/g},20159:e=>{e.exports=/<%=([\s\S]+?)%>/g},95247:e=>{e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=[e,e]})),n}},96788:(e,t,n)=>{var r=n(86886),i=n(63552),o=n(84549),a=i((function(e,t,n,i){r(t,o(t),e,i)}));e.exports=a},67508:(e,t,n)=>{var r=n(51105),i=n(97477),o=n(66403),a=i((function(e,t){try{return r(e,void 0,t)}catch(n){return o(n)?n:new Error(n)}}));e.exports=a},64493:(e,t,n)=>{var r=n(38981),i=n(38774);e.exports=function(e){return i(r(e).toLowerCase())}},57889:(e,t,n)=>{var r=n(867),i=n(787),o=n(41873),a=Math.ceil,s=Math.max;e.exports=function(e,t,n){t=(n?i(e,t,n):void 0===t)?1:s(o(t),0);var l=null==e?0:e.length;if(!l||t<1)return[];for(var c=0,u=0,d=Array(a(l/t));c{var r=n(1482);e.exports=function(e){return r(e,4)}},53813:(e,t,n)=>{var r=n(1482);e.exports=function(e){return r(e,5)}},82959:e=>{e.exports=function(e){for(var t=-1,n=null==e?0:e.length,r=0,i=[];++t{var r=n(19596),i=n(51232),o=n(46344),a=n(78587);e.exports=function(){var e=arguments.length;if(!e)return[];for(var t=Array(e-1),n=arguments[0],s=e;s--;)t[s-1]=arguments[s];return r(a(n)?o(n):[n],i(t,1))}},13307:(e,t,n)=>{var r=n(75091),i=n(93824),o=n(99540),a=Math.max,s=Math.min;e.exports=function(e,t,n){var l,c,u,d,f,h,p=0,g=!1,m=!1,v=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function A(t){var n=l,r=c;return l=c=void 0,p=t,d=e.apply(r,n)}function y(e){var n=e-h;return void 0===h||n>=t||n<0||m&&e-p>=u}function b(){var e=i();if(y(e))return _(e);f=setTimeout(b,function(e){var n=t-(e-h);return m?s(n,u-(e-p)):n}(e))}function _(e){return f=void 0,v&&l?A(e):(l=c=void 0,d)}function w(){var e=i(),n=y(e);if(l=arguments,c=this,h=e,n){if(void 0===f)return function(e){return p=e,f=setTimeout(b,t),g?A(e):d}(h);if(m)return clearTimeout(f),f=setTimeout(b,t),A(h)}return void 0===f&&(f=setTimeout(b,t)),d}return t=o(t)||0,r(n)&&(g=!!n.leading,u=(m="maxWait"in n)?a(o(n.maxWait)||0,t):u,v="trailing"in n?!!n.trailing:v),w.cancel=function(){void 0!==f&&clearTimeout(f),p=0,l=h=c=f=void 0},w.flush=function(){return void 0===f?d:_(i())},w}},2954:(e,t,n)=>{var r=n(867),i=n(41873);e.exports=function(e,t,n){var o=null==e?0:e.length;return o?(t=n||void 0===t?1:i(t),r(e,0,(t=o-t)<0?0:t)):[]}},55832:(e,t,n)=>{e.exports=n(96816)},87758:(e,t,n)=>{var r=n(51880),i=n(38981),o=/[&<>"']/g,a=RegExp(o.source);e.exports=function(e){return(e=i(e))&&a.test(e)?e.replace(o,r):e}},39427:(e,t,n)=>{var r=n(89342),i=n(2420),o=n(25258),a=n(78587),s=n(787);e.exports=function(e,t,n){var l=a(e)?r:i;return n&&s(e,t,n)&&(t=void 0),l(e,o(t,3))}},18765:(e,t,n)=>{var r=n(59032),i=n(73229),o=n(25258),a=n(78587);e.exports=function(e,t){return(a(e)?r:i)(e,o(t,3))}},53182:(e,t,n)=>{e.exports=n(95040)},82813:(e,t,n)=>{var r=n(51232);e.exports=function(e){return(null==e?0:e.length)?r(e,Infinity):[]}},17646:(e,t,n)=>{var r=n(27622),i=n(12641),o=n(41017),a=n(78587);e.exports=function(e,t){return(a(e)?r:i)(e,o(t))}},16334:(e,t,n)=>{var r=n(66429),i=n(41017);e.exports=function(e,t){return e&&r(e,i(t))}},74720:(e,t,n)=>{var r=n(39578);e.exports=function(e,t,n){var i=null==e?void 0:r(e,t);return void 0===i?n:i}},97102:(e,t,n)=>{var r=n(19267),i=n(63336),o=Object.prototype.hasOwnProperty,a=i((function(e,t,n){o.call(e,n)?e[n].push(t):r(e,n,[t])}));e.exports=a},95775:(e,t,n)=>{var r=n(82474),i=n(14198);e.exports=function(e,t){return null!=e&&i(e,t,r)}},95040:e=>{e.exports=function(e){return e&&e.length?e[0]:void 0}},34362:(e,t,n)=>{var r=n(3328),i=n(99290),o=n(64459),a=n(41873),s=n(56717),l=Math.max;e.exports=function(e,t,n,c){e=i(e)?e:s(e),n=n&&!c?a(n):0;var u=e.length;return n<0&&(n=l(u+n,0)),o(e)?n<=u&&e.indexOf(t,n)>-1:!!u&&r(e,t,n)>-1}},75348:(e,t,n)=>{var r=n(3328),i=n(41873),o=Math.max;e.exports=function(e,t,n){var a=null==e?0:e.length;if(!a)return-1;var s=null==n?0:i(n);return s<0&&(s=o(a+s,0)),r(e,t,s)}},8343:(e,t,n)=>{var r=n(77519),i=n(52391),o=n(82675),a=Object.prototype.toString,s=i((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=a.call(t)),e[t]=n}),r(o));e.exports=s},78587:e=>{var t=Array.isArray;e.exports=t},8942:(e,t,n)=>{var r=n(20825);e.exports=function(e,t){return r(e,t)}},66403:(e,t,n)=>{var r=n(96320),i=n(79501),o=n(49623);e.exports=function(e){if(!i(e))return!1;var t=r(e);return"[object Error]"==t||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!o(e)}},59267:(e,t,n)=>{var r=n(18878);e.exports=function(e){return r(e)&&e!=+e}},18878:(e,t,n)=>{var r=n(96320),i=n(79501);e.exports=function(e){return"number"==typeof e||i(e)&&"[object Number]"==r(e)}},75091:e=>{e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},49623:(e,t,n)=>{var r=n(96320),i=n(97882),o=n(79501),a=Function.prototype,s=Object.prototype,l=a.toString,c=s.hasOwnProperty,u=l.call(Object);e.exports=function(e){if(!o(e)||"[object Object]"!=r(e))return!1;var t=i(e);if(null===t)return!0;var n=c.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&l.call(n)==u}},75538:e=>{var t=Array.prototype.join;e.exports=function(e,n){return null==e?"":t.call(e,n)}},37756:e=>{e.exports=function(e){var t=null==e?0:e.length;return t?e[t-1]:void 0}},7070:(e,t,n)=>{var r=n(8067),i=n(25258),o=n(5162),a=n(78587);e.exports=function(e,t){return(a(e)?r:o)(e,i(t,3))}},41989:(e,t,n)=>{var r=n(25126),i=n(60942),o=n(82675);e.exports=function(e){return e&&e.length?r(e,o,i):void 0}},15972:(e,t,n)=>{var r=n(66211),i=n(63552)((function(e,t,n){r(e,t,n)}));e.exports=i},19087:e=>{e.exports=function(){}},93824:(e,t,n)=>{var r=n(89570);e.exports=function(){return r.Date.now()}},468:(e,t,n)=>{var r=n(8067),i=n(1482),o=n(32286),a=n(65469),s=n(86886),l=n(79812),c=n(57170),u=n(29758),d=c((function(e,t){var n={};if(null==e)return n;var c=!1;t=r(t,(function(t){return t=a(t,e),c||(c=t.length>1),t})),s(e,u(e),n),c&&(n=i(n,7,l));for(var d=t.length;d--;)o(n,t[d]);return n}));e.exports=d},23502:(e,t,n)=>{var r=n(25258),i=n(82285),o=n(65066);e.exports=function(e,t){return o(e,i(r(t)))}},49523:(e,t,n)=>{var r=n(79967),i=n(57105),o=n(41873),a=n(38981);e.exports=function(e,t,n){e=a(e);var s=(t=o(t))?i(e):0;return t&&s{var r=n(89570),i=n(38981),o=/^\s+/,a=r.parseInt;e.exports=function(e,t,n){return n||null==t?t=0:t&&(t=+t),a(i(e).replace(o,""),t||0)}},5539:(e,t,n)=>{var r=n(97477),i=n(98585),o=n(21310),a=n(4280),s=r((function(e,t){var n=a(t,o(s));return i(e,32,void 0,t,n)}));s.placeholder={},e.exports=s},81659:(e,t,n)=>{var r=n(97477),i=n(98585),o=n(21310),a=n(4280),s=r((function(e,t){var n=a(t,o(s));return i(e,64,void 0,t,n)}));s.placeholder={},e.exports=s},89842:(e,t,n)=>{var r=n(91167),i=n(12641),o=n(25258),a=n(4587),s=n(78587);e.exports=function(e,t,n){var l=s(e)?r:a,c=arguments.length<3;return l(e,o(t,4),n,c,i)}},13226:(e,t,n)=>{var r=n(38981);e.exports=function(){var e=arguments,t=r(e[0]);return e.length<3?t:t.replace(e[1],e[2])}},35257:(e,t,n)=>{var r=n(83490)("round");e.exports=r},5512:(e,t,n)=>{var r=n(99069),i=n(1479),o=n(78587);e.exports=function(e){return(o(e)?r:i)(e)}},95406:(e,t,n)=>{var r=n(11231);e.exports=function(e,t,n){return null==e?e:r(e,t,n)}},77528:(e,t,n)=>{var r=n(31118),i=n(25258),o=n(75341),a=n(78587),s=n(787);e.exports=function(e,t,n){var l=a(e)?r:o;return n&&s(e,t,n)&&(t=void 0),l(e,i(t,3))}},62618:(e,t,n)=>{var r=n(51232),i=n(8506),o=n(97477),a=n(787),s=o((function(e,t){if(null==e)return[];var n=t.length;return n>1&&a(e,t[0],t[1])?t=[]:n>2&&a(t[0],t[1],t[2])&&(t=[t[0]]),i(e,r(t,1),[])}));e.exports=s},56439:(e,t,n)=>{var r=n(18315),i=n(10977),o=n(86794),a=n(787),s=n(85942),l=n(57820),c=n(38981);e.exports=function(e,t,n){return n&&"number"!=typeof n&&a(e,t,n)&&(t=n=void 0),(n=void 0===n?4294967295:n>>>0)?(e=c(e))&&("string"==typeof t||null!=t&&!s(t))&&!(t=r(t))&&o(e)?i(l(e),0,n):e.split(t,n):[]}},13682:(e,t,n)=>{var r=n(1561),i=n(18315),o=n(41873),a=n(38981);e.exports=function(e,t,n){return e=a(e),n=null==n?0:r(o(n),0,e.length),t=i(t),e.slice(n,n+t.length)==t}},27831:(e,t,n)=>{var r=n(867),i=n(41873);e.exports=function(e,t,n){return e&&e.length?(t=n||void 0===t?1:i(t),r(e,0,t<0?0:t)):[]}},2542:(e,t,n)=>{var r=n(96788),i=n(67508),o=n(83384),a=n(27171),s=n(9939),l=n(66403),c=n(787),u=n(65301),d=n(20159),f=n(37440),h=n(38981),p=/\b__p \+= '';/g,g=/\b(__p \+=) '' \+/g,m=/(__e\(.*?\)|\b__t\)) \+\n'';/g,v=/[()=,{}\[\]\/\s]/,A=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,y=/($^)/,b=/['\n\r\u2028\u2029\\]/g,_=Object.prototype.hasOwnProperty;e.exports=function(e,t,n){var w=f.imports._.templateSettings||f;n&&c(e,t,n)&&(t=void 0),e=h(e),t=r({},t,w,a);var x,E,S=r({},t.imports,w.imports,a),C=u(S),P=o(S,C),T=0,k=t.interpolate||y,M="__p += '",O=RegExp((t.escape||y).source+"|"+k.source+"|"+(k===d?A:y).source+"|"+(t.evaluate||y).source+"|$","g"),R=_.call(t,"sourceURL")?"//# sourceURL="+(t.sourceURL+"").replace(/\s/g," ")+"\n":"";e.replace(O,(function(t,n,r,i,o,a){return r||(r=i),M+=e.slice(T,a).replace(b,s),n&&(x=!0,M+="' +\n__e("+n+") +\n'"),o&&(E=!0,M+="';\n"+o+";\n__p += '"),r&&(M+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),T=a+t.length,t})),M+="';\n";var I=_.call(t,"variable")&&t.variable;if(I){if(v.test(I))throw new Error("Invalid `variable` option passed into `_.template`")}else M="with (obj) {\n"+M+"\n}\n";M=(E?M.replace(p,""):M).replace(g,"$1").replace(m,"$1;"),M="function("+(I||"obj")+") {\n"+(I?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(x?", __e = _.escape":"")+(E?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+M+"return __p\n}";var L=i((function(){return Function(C,R+"return "+M).apply(void 0,P)}));if(L.source=M,l(L))throw L;return L}},37440:(e,t,n)=>{var r=n(87758),i={escape:n(40514),evaluate:n(72613),interpolate:n(20159),variable:"",imports:{_:{escape:r}}};e.exports=i},36999:(e,t,n)=>{var r=n(38981);e.exports=function(e){return r(e).toLowerCase()}},96816:(e,t,n)=>{var r=n(80458)(n(65301));e.exports=r},38981:(e,t,n)=>{var r=n(18315);e.exports=function(e){return null==e?"":r(e)}},98864:(e,t,n)=>{var r=n(27622),i=n(57552),o=n(66429),a=n(25258),s=n(97882),l=n(78587),c=n(3970),u=n(12262),d=n(75091),f=n(78031);e.exports=function(e,t,n){var h=l(e),p=h||c(e)||f(e);if(t=a(t,4),null==n){var g=e&&e.constructor;n=p?h?new g:[]:d(e)&&u(g)?i(s(e)):{}}return(p?r:o)(e,(function(e,r,i){return t(n,e,r,i)})),n}},56356:(e,t,n)=>{var r=n(18315),i=n(91504),o=n(10977),a=n(73631),s=n(33664),l=n(57820),c=n(38981);e.exports=function(e,t,n){if((e=c(e))&&(n||void 0===t))return i(e);if(!e||!(t=r(t)))return e;var u=l(e),d=l(t),f=s(u,d),h=a(u,d)+1;return o(u,f,h).join("")}},15609:(e,t,n)=>{var r=n(18315),i=n(10977),o=n(33664),a=n(57820),s=n(38981),l=/^\s+/;e.exports=function(e,t,n){if((e=s(e))&&(n||void 0===t))return e.replace(l,"");if(!e||!(t=r(t)))return e;var c=a(e),u=o(c,a(t));return i(c,u).join("")}},11454:(e,t,n)=>{var r=n(18315),i=n(10977),o=n(86794),a=n(75091),s=n(85942),l=n(57105),c=n(57820),u=n(41873),d=n(38981),f=/\w*$/;e.exports=function(e,t){var n=30,h="...";if(a(t)){var p="separator"in t?t.separator:p;n="length"in t?u(t.length):n,h="omission"in t?r(t.omission):h}var g=(e=d(e)).length;if(o(e)){var m=c(e);g=m.length}if(n>=g)return e;var v=n-l(h);if(v<1)return h;var A=m?i(m,0,v).join(""):e.slice(0,v);if(void 0===p)return A+h;if(m&&(v+=A.length-v),s(p)){if(e.slice(v).search(p)){var y,b=A;for(p.global||(p=RegExp(p.source,d(f.exec(p))+"g")),p.lastIndex=0;y=p.exec(b);)var _=y.index;A=A.slice(0,void 0===_?v:_)}}else if(e.indexOf(r(p),v)!=v){var w=A.lastIndexOf(p);w>-1&&(A=A.slice(0,w))}return A+h}},8264:(e,t,n)=>{var r=n(51232),i=n(97477),o=n(96352),a=n(51680),s=i((function(e){return o(r(e,1,a,!0))}));e.exports=s},33324:(e,t,n)=>{var r=n(96352);e.exports=function(e){return e&&e.length?r(e):[]}},90013:(e,t,n)=>{var r=n(25258),i=n(96352);e.exports=function(e,t){return e&&e.length?i(e,r(t,2)):[]}},43614:(e,t,n)=>{var r=n(38981),i=0;e.exports=function(e){var t=++i;return r(e)+t}},38774:(e,t,n)=>{var r=n(73660)("toUpperCase");e.exports=r},56717:(e,t,n)=>{var r=n(83384),i=n(65301);e.exports=function(e){return null==e?[]:r(e,i(e))}},49758:(e,t,n)=>{"use strict";n.d(t,{Kn:()=>O});var r=n(96143),i=o;function o(e,t){this.x=e,this.y=t}o.prototype={clone:function(){return new o(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[0]*this.x+e[1]*this.y,n=e[2]*this.x+e[3]*this.y;return this.x=t,this.y=n,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=t*this.x-n*this.y,i=n*this.x+t*this.y;return this.x=r,this.y=i,this},_rotateAround:function(e,t){var n=Math.cos(e),r=Math.sin(e),i=t.x+n*(this.x-t.x)-r*(this.y-t.y),o=t.y+r*(this.x-t.x)+n*(this.y-t.y);return this.x=i,this.y=o,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},o.convert=function(e){return e instanceof o?e:Array.isArray(e)?new o(e[0],e[1]):e};var a=100,s=Math.PI/2;var l=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},c=function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):function(e,t){for(var n=Object.getOwnPropertyNames(t),r=0;r0&&e.forEach((function(n,r){r=e[1]&&t[0]>=e[0]?n=r+Math.PI:t[1]>=e[1]&&t[0]=e[0]&&(n=Math.PI-r),n},_=function(e,t,n){var r=b(t,e)-b(t,n);return r<0?r+2*Math.PI:r},w=function(e,t,n){return(n[1]-e[1])*(t[0]-e[0])>(t[1]-e[1])*(n[0]-e[0])},x=function(e,t,n,r,i){var o=1-(e=Math.max(Math.min(e,1),0)),a=e*e,s=a*e,l=o*o,c=l*o;return[c*t[0]+3*l*e*n[0]+3*o*a*r[0]+s*i[0],c*t[1]+3*l*e*n[1]+3*o*a*r[1]+s*i[1]]},E=function(e,t,n,r,i){var o=b(e,t),a=i?o+n:o-n,s=r*Math.cos(a),l=r*Math.sin(a);return[t[0]+s,t[1]+l]},S=function(e,t,n,r){var i=function(e,t,n){var r=e[0]-t[0],i=e[1]-t[1],o=Math.sqrt(r*r+i*i);r/=o,i/=o;var a=n[0]-t[0],s=n[1]-t[1],l=Math.sqrt(a*a+s*s);return[r+(a/=l),i+(s/=l)]}(t,n,r),o=null,a=null,s=null,l=Math.sqrt(i[0]*i[0]+i[1]*i[1]),c=i[0]/l,u=i[1]/l,d=m(t,n),f=m(n,r);return l>1e-4?w(t,n,r)?(s=e*d,o=[n[0]-s*u,n[1]+s*c],s=e*f,a=[n[0]+s*u,n[1]-s*c]):(s=e*d,o=[n[0]+s*u,n[1]-s*c],s=e*f,a=[n[0]-s*u,n[1]+s*c]):(o=[n[0]+e*(t[0]-n[0]),n[1]+e*(t[1]-n[1])],a=[n[0]+e*(r[0]-n[0]),n[1]+e*(r[1]-n[1])]),[o,a]},C=function(e){var t=1;switch(e){case e<=1:t=1;break;case 2===e:t=2;break;case 3===e:t=6;break;case 24===e:t=24;break;case 5===e:t=120;break;default:for(var n=1;n<=e;n++)t*=n}return t},P=function(e,t){return C(e)/(C(t)*C(e-t))},T=function(e){if(e.length<=2)return e;for(var t=[],n=e.length-1,r=0;r<=1;r+=.01){for(var i=0,o=0,a=0;a<=n;a++){var s=P(n,a),l=Math.pow(r,a),c=Math.pow(1-r,n-a);i+=s*l*c*e[a][0],o+=s*l*c*e[a][1]}t.push([i,o])}return t.push(e[n]),t},k=function(e,t,n,o,a,s,l,c){function u(e,t,n,r,i,o,a,s,l,c){var u=(e+n)/2,d=(t+r)/2,f=(n+i)/2,h=(r+o)/2,p=(i+a)/2,g=(o+s)/2,m=Math.sqrt((n-e)*(n-e)+(r-t)*(r-t)),v=Math.sqrt((i-n)*(i-n)+(o-r)*(o-r)),A=m/(m+v),y=v/(v+Math.sqrt((a-i)*(a-i)+(s-o)*(s-o))),b=u+(f-u)*A,_=d+(h-d)*A,w=f+(p-f)*y,x=h+(g-h)*y,E=b+(f-b)*l+n-b,S=_+(h-_)*l+r-_,C=w+(f-w)*l+i-w,P=x+(h-x)*l+o-x,T=[E,S,C,P];return c<1?function(e,t,n,r,i,o,a,s,l,c){var u=1-e,d=1-t,f=n*d*d+2*i*t*d+a*t*t,h=i*d*d+2*a*t*d+l*t*t,p=r*d*d+2*o*t*d+s*t*t,g=o*d*d+2*s*t*d+c*t*t;return[(n*u*u+2*i*e*u+a*e*e)*d+(i*u*u+2*a*e*u+l*e*e)*t,(r*u*u+2*o*e*u+s*e*e)*d+(o*u*u+2*s*e*u+c*e*e)*t,f*u+h*e,p*u+g*e,f*d+h*t,p*d+g*t]}(0,c,n,r,E,S,C,P,i,o):T}if(!t)return null;if(t.length<=2||!o)return a&&function(e,t,n,i,o){r.Zr.isArrayHasData(t)&&(f._path(e,t,o,n),f._stroke(e,n))}(e,t,n),null;var d=t.length,h=s?d:d-1;void 0!==c&&(h-=Math.max(h-l-1,0));for(var p=void 0,g=0;g=0&&c<1){e&&e.bezierCurveTo(E[0],E[1],E[2],E[3],E[4],E[5]),t.splice(h-1,d-(h-1)-1);var S=new i(E[4],E[5]);S.prevCtrlPoint=new i(E[2],E[3]),t.push(S),d=t.length}else e&&e.bezierCurveTo(E[0],E[1],E[2],E[3],b,_);t[g].nextCtrlPoint=E.slice(0,2),t[g].prevCtrlPoint=p?p.slice(2):null,p=E}return!s&&t[1].prevCtrlPoint&&(t[0].nextCtrlPoint=t[1].prevCtrlPoint,delete t[0].prevCtrlPoint),t[d-1].prevCtrlPoint||(t[d-1].prevCtrlPoint=t[d-2].nextCtrlPoint),a&&f._stroke(e,n),t},M={widthRatio:.1,arrowStyle:[],tailWidthFactor:.1,headWidthFactor:1,neckWidthFactor:.2,headAngle:Math.PI/8.5,neckAngle:Math.PI/13},O=function(e){function t(){return l(this,t),u(this,e.apply(this,arguments))}return c(t,e),t.fromJSON=function(e){var n=e.feature,r=new t(n.geometry.coordinates,e.options);return r.setProperties(n.properties),r},t.prototype._toJSON=function(e){return{feature:this.toGeoJSON(e),subType:"StraightArrow"}},t.prototype.startEdit=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return t.newVertexHandleSymbol={markerType:"ellipse",markerFill:"#fff",markerLineColor:"#000",markerLineWidth:2,markerWidth:10,markerHeight:10,opacity:0},e.prototype.startEdit.call(this,t)},t.prototype._getPaintParams=function(){var e=this.getMap().getGLScale(),t=this._getPath2DPoints(this._getPrjCoordinates());if(t.length<=1)return null;var n=this._get2DLength()*this.options.widthRatio,r=g(t,n,this.getMap()),i=r[0][r[0].length-1],o=r[1][r[1].length-1],a=this._getArrowHead(i,o,t,n,1,.8,1.4,2.2,.7,2.3),s=[];s.push.apply(s,r[0]),s.push.apply(s,a);for(var l=r[1].length-1;l>=0;l--)s.push(r[1][l]);return[s=s.map((function(t){return t.multi(e)})),[r[0].length,a.length,r[1].length]]},t.prototype._paintOn=function(e,t,n,i,o,a){e.beginPath();var s=void 0,l=0;e.moveTo(t[0].x,t[0].y),s=t.slice(0,n[0]),k(e,s,i,.7,!0),l+=n[0],r.Xz._path(e,t.slice(l,l+n[1]),a,i),l+=n[1],s=t.slice(l,l+n[2]),k(e,s,i,.7,!0),this._closeArrow(e,t[t.length-1],t[0]),r.Xz._stroke(e,i),r.Xz.fillCanvas(e,o,t[0].x,t[0].y)},t.prototype._closeArrow=function(e){e.closePath()},t.prototype._getArrowHead=function(e,t,n,i,o,a,s,l,c,u){var d=this._getArrowHeadPoint(e,t,n[n.length-1],i*o,a,l),f=new r.E9((d[0].x+d[1].x)/2,(d[0].y+d[1].y)/2),h=this._getArrowHeadPoint(d[0],d[1],f,i*o,s,c)[0],p=new r.E9((d[2].x+d[1].x)/2,(d[2].y+d[1].y)/2),g=this._getArrowHeadPoint(d[2],d[1],p,i*o,s,c)[0],m=void 0;if(2===n.length)m=[e,h,d[1],g,t];else{var v=k(null,n,null,.8,!1),A=new r.E9(v[v.length-1].prevCtrlPoint),y=n[n.length-1],b=y.sub(A);if(0===b.x&&0===b.y)return[e,h,d[1],g,t];var _=e.distanceTo(t),w=b.unit();m=[e,h,new r.E9(y.x+w.x*_*u,y.y+w.y*_*u),g,t]}return m},t.prototype._getArrowHeadPoint=function(e,t,n,r,o,a){a||(a=1),e=new i(e.x,e.y),t=new i(t.x,t.y);var s=e.sub(t)._unit(),l=n.add(r*s.x*o,r*s.y*o),c=n.add(r*-s.x*o,r*-s.y*o);return s._perp()._mult(-1),[l,n.add(a*r*s.x,a*r*s.y),c]},t}(r.Hy);O.mergeOptions(M),O.registerJSONType("StraightArrow"),r.nh.registerMode("StraightArrow",{action:["click","mousemove","dblclick"],create:function(e,t){var n=t.map((function(t){return e.unproject(t)})),r=new O(n);return r._setPrjCoordinates(t),r},update:function(e,t,n){var r=void 0;Array.isArray(t)?r=t:(r=n._getPrjCoordinates()).push(t);var i=r.map((function(t){return e.unproject(t)}));n.setCoordinates(i),n._setPrjCoordinates(r)},generate:function(e){return e}});var R=function(e){function t(){return l(this,t),u(this,e.apply(this,arguments))}return c(t,e),t.fromJSON=function(e){var n=e.feature,r=new t(n.geometry.coordinates,e.options);return r.setProperties(n.properties),r},t.prototype._toJSON=function(e){return{feature:this.toGeoJSON(e),subType:"DiagonalArrow"}},t.prototype._getPaintParams=function(){var e=this._getPath2DPoints(this._getPrjCoordinates());if(e.length<=1)return null;var t=this.getMap().getGLScale(),n=this._get2DLength(),r=n*this.options.widthRatio,i=g(e,r,this.getMap(),.15,n),o=i[0][i[0].length-1],a=i[1][i[1].length-1],s=this._getArrowHead(o,a,e,r,.3,.6,1.4,2.2,.8,3.3),l=[];l.push.apply(l,i[0]),l.push.apply(l,s);for(var c=i[1].length-1;c>=0;c--)l.push(i[1][c]);return[l=l.map((function(e){return e.multi(t)})),[i[0].length,s.length,i[1].length]]},t}(O);R.mergeOptions({widthRatio:.2,arrowStyle:[]}),R.registerJSONType("DiagonalArrow"),r.nh.registerMode("DiagonalArrow",{action:["click","mousemove","dblclick"],create:function(e,t){var n=t.map((function(t){return e.unproject(t)})),r=new R(n);return r._setPrjCoordinates(t),r},update:function(e,t,n){var r=void 0;Array.isArray(t)?r=t:(r=n._getPrjCoordinates()).push(t);var i=r.map((function(t){return e.unproject(t)}));n.setCoordinates(i),n._setPrjCoordinates(r)},generate:function(e){return e}});var I=function(e){function t(){return l(this,t),u(this,e.apply(this,arguments))}return c(t,e),t.fromJSON=function(e){var n=e.feature,r=new t(n.geometry.coordinates,e.options);return r.setProperties(n.properties),r},t.prototype._toJSON=function(e){return{feature:this.toGeoJSON(e),subType:"DoveTailDiagonalArrow"}},t.prototype._closeArrow=function(e,t,n){var r=this.getMap().getPitch(),o=new i(t.x,t.y),a=new i(n.x,n.y),s=new i(o.x+a.x,o.y+a.y).mult(.5),l=-o.dist(a),c=o.sub(a)._unit()._perp(),u=.618-.518*r/80,d=s.x+l*u*c.x,f=s.y+l*u*c.y;e.lineTo(d,f),e.closePath()},t}(R);I.mergeOptions({widthRatio:.2,arrowStyle:[]}),I.registerJSONType("DoveTailDiagonalArrow"),r.nh.registerMode("DoveTailDiagonalArrow",{action:["click","mousemove","dblclick"],create:function(e,t){var n=t.map((function(t){return e.unproject(t)})),r=new I(n);return r._setPrjCoordinates(t),r},update:function(e,t,n){var r=void 0;Array.isArray(t)?r=t:(r=n._getPrjCoordinates()).push(t);var i=r.map((function(t){return e.unproject(t)}));n.setCoordinates(i),n._setPrjCoordinates(r)},generate:function(e){return e}});var L=function(e){function t(){return l(this,t),u(this,e.apply(this,arguments))}return c(t,e),t.prototype.startEdit=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return t.newVertexHandleSymbol={markerType:"ellipse",markerFill:"#fff",markerLineColor:"#000",markerLineWidth:2,markerWidth:10,markerHeight:10,opacity:0},e.prototype.startEdit.call(this,t)},t.prototype._getPaintParams=function(){var e=this.getMap().getGLScale(),t=this._generate();if(!t)return null;if(!this._getProjection())return null;this._verifyProjection();var n=this._projectCoords(t),r=this._getPath2DPoints(n);return[r=r.map((function(t){return t.multi(e)})),[]]},t.prototype._paintOn=function(e,t,n,i,o){if(!(t.length<=0)){e.strokeStyle=this.getSymbol().lineColor||"#f00",e.beginPath(),e.moveTo(t[0].x,t[0].y);for(var a=1;a1&&void 0!==arguments[1]?arguments[1]:{};l(this,t);var i=u(this,e.call(this,n,r));return i.type="DoubleArrow",i.connetPoints=[],i.symmetricalPoints=[],i}return c(t,e),t.prototype._generate=function(){var e=this.getCoordinates(),n=e.length,i=r.c7.toNumberArrays(e);if(n<2)return null;if(2===n)return this.setCoordinates(e),null;var o=[i[0],i[1],i[2]],a=o[0],s=o[1],l=o[2];3===n?(this.symmetricalPoints=t.getSymmetricalPoints(a,s,l),this.connetPoints=y(a,s)):4===n&&(this.symmetricalPoints=i[3],this.connetPoints=y(a,s));var c=void 0,u=void 0;w(a,s,l)?(c=t.getArrowPoints(a,this.connetPoints,this.symmetricalPoints,!1),u=t.getArrowPoints(this.connetPoints,s,l,!0)):(c=t.getArrowPoints(s,this.connetPoints,l,!1),u=t.getArrowPoints(this.connetPoints,a,this.symmetricalPoints,!0));var d=c.length,f=(d-5)/2,h=c.slice(0,f),p=c.slice(f,f+5),g=c.slice(f+5,d),m=u.slice(0,f),v=u.slice(f,f+5),A=u.slice(f+5,d);m=T(m);var b=T(A.concat(h.slice(1)));return g=T(g),m.concat(v,b,p,g).map((function(e){return new r.c7(e)}))},t.prototype.getPlotType=function(){return this.type},t.prototype._exportGeoJSONGeometry=function(){return{type:"Polygon",coordinates:r.c7.toNumberArrays([this.getShell()])}},t.prototype._toJSON=function(e){var t=r.Zr.extend({},e),n=this.getCoordinates();t.geometry=!1;var i=this.toGeoJSON(t);return i.geometry={type:"Polygon"},{feature:i,subType:"DoubleArrow",coordinates:n}},t.getArrowPoints=function(e,n,r,i){var o=y(e,n),a=m(o,r),l=E(r,o,0,.3*a,!0),c=E(r,o,0,.5*a,!0),u=[o,l=E(o,l,s,a/5,i),c=E(o,c,s,a/4,i),r],d=t._getArrowHeadPoints(u);if(d&&Array.isArray(d)&&d.length>0){var f=[d[0],d[4]],h=f[0],p=f[1],g=m(e,n)/A(u)/2,v=t._getArrowBodyPoints(u,h,p,g);if(v){var b=v.length,_=v.slice(0,b/2),w=v.slice(b/2,b);return _.push(h),w.push(p),(_=_.reverse()).push(n),(w=w.reverse()).push(e),_.reverse().concat(d,w)}}return null},t._getArrowHeadPoints=function(e){var t=A(e)*N,n=e[e.length-1],r=t*D,i=t*j,o=t*F,a=E(e[e.length-2],n,0,t,!0),l=E(e[e.length-2],n,0,o,!0),c=E(n,a,s,r,!1),u=E(n,a,s,r,!0);return[E(n,l,s,i,!1),c,n,u,E(n,l,s,i,!0)]},t._getArrowBodyPoints=function(e,t,n,r){for(var i=v(e),o=A(e)*r,a=(o-m(t,n))/2,s=0,l=[],c=[],u=1;u=s&&o=Math.PI&&o<1.5*Math.PI?(l=i*Math.sin(o-Math.PI),c=i*Math.cos(o-Math.PI),u=E(e,r,s,l,!0),a=E(r,u,s,c,!0)):(l=i*Math.sin(2*Math.PI-o),c=i*Math.cos(2*Math.PI-o),u=E(e,r,s,l,!0),a=E(r,u,s,c,!1)),a},t.fromJSON=function(e){var n=e.feature,r=new t(e.coordinates,e.options);return r.setProperties(n.properties),r},t}(L);B.registerJSONType("DoubleArrow"),r.nh.registerMode("DoubleArrow",{action:["click","mousemove","dblclick"],create:function(e,t){var n=t.map((function(t){return e.unproject(t)})),i=new r.Yp(n);return i._setPrjCoordinates(t),i},update:function(e,t,n,r){var i=n.getSymbol(),o=void 0;Array.isArray(t)?o=t:(o=n._getPrjCoordinates()).push(t);var a=o.map((function(t){return e.unproject(t)}));n.setCoordinates(a),n._setPrjCoordinates(o);var s=n.getLayer();if(s){var l=s.getMap(),c=s.getGeometryById("doublearrow");!c&&t.length>=3&&((c=new B(t,{id:"doublearrow"}))._drawTool=r.drawTool||l._map_tool,c.addTo(s),i&&c.setSymbol(i),n.updateSymbol({lineOpacity:0})),c&&(c.setCoordinates(a),c._setPrjCoordinates(t),n.updateSymbol({lineOpacity:0}))}},generate:function(e){var t=e.getSymbol();t.lineOpacity=1;var n=e.getCoordinates();return n.length>4&&(n=n.slice(0,4)),new B(n,{symbol:t})}});var Z=function(e){function t(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};l(this,t);var i=u(this,e.call(this,n,r));return i.type="ClosedCurve",i._offset=.3,n&&i.setCoordinates(n),i}return c(t,e),t.prototype.getPlotType=function(){return this.type},t.prototype._generate=function(){var e=this.getCoordinates(),t=e.length;if(t<2)return null;if(2===t)return this.setCoordinates(e),null;var n=r.c7.toNumberArrays(e);n.push(n[0],n[1]);for(var i=[],o=[],s=0;s=3&&((s=new Z([t],{id:"closedcurve"})).addTo(a),r&&s.setSymbol(r),n.updateSymbol({lineOpacity:0})),s&&(s.setCoordinates(o),s._setPrjCoordinates(t),n.updateSymbol({lineOpacity:0}))}},generate:function(e){var t=e.getSymbol();return t.lineOpacity=1,new Z(e.getCoordinates(),{symbol:t})}});var z=function(e){function t(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};l(this,t);var i=u(this,e.call(this,n,r));return i.type="Sector",n&&i.setCoordinates(n),i}return c(t,e),t.prototype.getPlotType=function(){return this.type},t.prototype._generate=function(){var e=[],t=this.getCoordinates(),n=t.length,i=r.c7.toNumberArrays(t);if(n<=2)return this.setCoordinates(i),null;if(3===n){var o=[i[0],i[1],i[2]],a=o[0],s=o[1],l=o[2],c=this._getMeasurer(),u=function(e,t,n){return e.measureLength(d.toCoordinates(t),d.toCoordinates(n))}(c,s,a),f=function(e,t,n,r,i){var o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:100,a=null,s=null,l=i-r,c=[];l=l<0?l+2*Math.PI:l;for(var u=0;u=3){(u=new z(t,{id:"sector"}))._drawTool=i.drawTool||c._map_tool,u.addTo(l);var d=r.Zr.extendSymbol(o,{});d&&u.setSymbol(d),n.updateSymbol({lineOpacity:0})}u&&(u.setCoordinates(s),u._setPrjCoordinates(a),n.updateSymbol({lineOpacity:0}))}},generate:function(e){var t=e.getSymbol();t.lineOpacity=1;var n=e.getCoordinates();return n.length>3&&(n=n.slice(0,3)),new z(n,{symbol:t})}});var U=function(e){function t(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};l(this,t);var i=u(this,e.call(this,n,r));return i.type="GatheringPlace",i._offset=.4,n&&i.setCoordinates(n),i}return c(t,e),t.prototype.getPlotType=function(){return this.type},t.prototype._generate=function(){var e=this.getCoordinates(),t=e.length,n=r.c7.toNumberArrays(e);if(!(t<2)){if(2===t){var i=y(n[0],n[1]),o=m(n[0],i)/.9,l=E(n[0],i,s,o,!0);n=[n[0],l,n[1]]}var c=y(n[0],n[2]);n.push(c,n[0],n[1]);for(var u=[],d=void 0,f=void 0,h=void 0,p=[],g=0;g=3&&((s=new U([t],{id:"gatheringplace"})).addTo(a),r&&s.setSymbol(r),n.updateSymbol({lineOpacity:0})),s&&(s.setCoordinates(o),s._setPrjCoordinates(t),n.updateSymbol({lineOpacity:0}))}},generate:function(e){var t=e.getSymbol();return t.lineOpacity=1,new U(e.getCoordinates(),{symbol:t})}}),"undefined"!==typeof console&&console.log("maptalks.plotsymbol v0.7.0")},53808:(e,t,n)=>{"use strict";n.d(t,{O:()=>v});var r=n(96143);const i=new r.E9(0,0);function o(e,t,n){return t.coordToContainerPoint(e,null,n)}const a=[[0,0],[0,0]],s=[0,0];function l(e,t){const n=e[0],r=e[1],o=r[0]-n[0],a=r[1]-n[1],s=o*(t[0]-n[0])+a*(t[1]-n[1]);if(s<=0)return i.x=n[0],i.y=n[1],i;const l=o*o+a*a;if(s>=l)return i.x=r[0],i.y=r[1],i;const c=s/l;return i.x=n[0]+c*o,i.y=n[1]+c*a,i}const c=new r.E9(0,0),u=new r.E9(0,0),d=new r.E9(0,0),f=new r.E9(0,0),h=new r.wx(0,0,0,0),p=new r.c7(0,0);function g(e,t,n){const r=e.x,i=e.y,o=t.x,a=t.y,s=n.x,l=n.y,c=s-o,u=l-a,d=(r-o)*u-(i-a)*c;if(!(Math.abs(d)>.1))if(Math.abs(c)>=Math.abs(u)){if(c>0?o0?a-1)return this;this._geometries.push(e);const t=this;return e.snapTo=function(e,n){if(!e)return;let i;const o=t.options.fiterGeometries;if(o&&r.Zr.isFunction(o)&&(i=o()),!i||!i.length){const e=this.getLayer();e&&(i=e.getGeometries())}return t._nearest(i,e,this,n)},this}unEffectGeometry(e){const t=this._geometries.indexOf(e);return-1===t||(this._geometries.splice(t,1),delete e.snapTo),this}dispose(){this._geometries.forEach((e=>{this.unEffectGeometry(e)})),this.map.off("mousemove",this._mouseMove,this),delete this.map,delete this._mousePoint,delete this._geometries}_nearest(e,t,n,r){let i;for(let o=0,a=e.length;ot.distanceTo(e)<=v&&this._validateMousePosition(e);if(e instanceof r.Jx){const t=o(A,this.map,i);return b(t)?(this._fireSnapEvent(t,e),t.copy()):void 0}const _=e=>{if(!e||e.length<2)return;const n=function(e,t,n){let r=1/0,i=1/0,a=-1/0,s=-1/0;for(let o=0,c=e.length;on.xmax||g>n.ymax)return;const m=e.length;let A,_=0;for(;_{const[i,a]=t,s=e.map((e=>o(e,y))),l=m(s,i);if(!l)return;const c=m(s,n);if(c){if(l[0]!==c[0]||l[1]!==c[1]){if(r){let e=!1;const t=m(s,a);return t&&(t[0]>l[0]||t[1]>l[1]||t[0]===l[0]&&t[1]===l[1]&&g(a,i,s[l[0]]))&&(e=!0),l[0]{const r=e.getCenter();if(!r)return;const i=o(r,n);e._distance=t.distanceTo(i)})),e.sort(((e,t)=>e._distance-t._distance))}}v.mergeOptions({tolerance:15,fiterGeometries:null})},96143:(e,t,n)=>{"use strict";n.d(t,{Xz:()=>ar,mM:()=>ql,Cd:()=>Ca,wT:()=>gr,c7:()=>Sr,Hy:()=>Ma,kg:()=>bs,nh:()=>$a,eZ:()=>fr,wx:()=>Br,QZ:()=>Sa,JH:()=>va,__:()=>ja,mh:()=>Vo,Yp:()=>ga,D5:()=>qo,fy:()=>zt,Jx:()=>ha,vZ:()=>wa,mn:()=>ba,Kk:()=>xa,E9:()=>xe,mg:()=>ua,Ae:()=>Ta,zC:()=>Fa,Im:()=>_l,Zr:()=>wn,DJ:()=>Ka,jG:()=>Fc});for(var r=n(55932),i=n.n(r),o=n(84015),a=n.n(o),s=n(80277),l=n.n(s),c=[],u=0;u<6;u++)c[u]=[];var d=[];function f(e,t,n){h(e);for(var r=0;r<6;r++)if(!n||"0"!==n.charAt(r)){var i=c[r];if(d[0]=i[0]>0?t[1][0]:t[0][0],d[1]=i[1]>0?t[1][1]:t[0][1],d[2]=i[2]>0?t[1][2]:t[0][2],m(i,d)<0)return!1}return!0}function h(e){var t=e,n=t[0],r=t[1],i=t[2],o=t[3],a=t[4],s=t[5],l=t[6],u=t[7],d=t[8],f=t[9],h=t[10],p=t[11],m=t[12],v=t[13],A=t[14],y=t[15];g(c[0],o-n,u-a,p-d,y-m),g(c[1],o+n,u+a,p+d,y+m),g(c[2],o+r,u+s,p+f,y+v),g(c[3],o-r,u-s,p-f,y-v),g(c[4],o-i,u-l,p-h,y-A),g(c[5],o+i,u+l,p+h,y+A)}var p=1/6;function g(e,t,n,r,i){return e[0]=t*p,e[1]=n*p,e[2]=r*p,e[3]=i*p,e}function m(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]}var v="_maptalks__internal_layer_",A=["MultiPoint","MultiLineString","MultiPolygon","GeometryCollection"],y=["FeatureCollection","Feature","Point","LineString","Polygon"].concat(A),b=["markerFile","polygonPatternFile","linePatternFile","markerFillPatternFile","markerLinePatternFile"],_=[["markerWidth","markerHeight"],[],[null,"lineWidth"],[],[null,"markerLineWidth"]],w={lineWidth:1,lineOpacity:1,lineDx:1,lineDy:1,polygonOpacity:1,markerWidth:1,markerHeight:1,markerDx:1,markerDy:1,markerOpacity:1,markerFillOpacity:1,markerLineWidth:1,markerLineOpacity:1,textSize:1,textOpacity:1,textHaloRadius:1,textWrapWidth:1,textLineSpacing:1,textDx:1,textDy:1},x=["lineColor","polygonFill","markerFill","markerLineColor","textFill"],E=14;function S(){return Date.now()}function C(e){for(var t=1;t1,devicePixelRatio:ue,language:navigator.browserLanguage?navigator.browserLanguage:navigator.language,ie9:V&&9===document.documentMode,ie10:V&&10===document.documentMode,webgl:ce,imageBitMap:ie,resizeObserver:oe,btoa:ae,decodeImageInWorker:de,monitorDPRChange:!0,supportsPassive:fe,removeDPRListening:function(e){e&&delete Z[e.id]},checkDevicePixelRatio:function(){if("undefined"!==typeof window&&B.monitorDPRChange){var e=z(),t=e!==B.devicePixelRatio;return t&&(B.devicePixelRatio=e),t}return!1},addDPRListening:function(e){e&&(Z[e.id]=e)}},"undefined"!==typeof window&&window.matchMedia)for(var he=1;he<500;he++){var pe=(.01*he).toFixed(2),ge=window.matchMedia("screen and (resolution: "+pe+"dppx)");ge&&(ge.addEventListener?ge.addEventListener("change",B.checkDevicePixelRatio):ge.addListener&&ge.addListener(B.checkDevicePixelRatio))}if(B.devicePixelRatio){var me=B.devicePixelRatio;Object.defineProperty(B,"devicePixelRatio",{get:function(){return me},set:function(e){if(e!==me&&(me=e,B.monitorDPRChange))for(var t in Z){var n=Z[t];if(n&&n.options&&!n.options.devicePixelRatio&&n.checkSize&&n.getRenderer)n.getRenderer()&&n.checkSize(!0)}}})}}var ve=B;function Ae(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function ye(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var be,_e,we=function(){function e(e,t,n){if(P(e)||P(t)?P(e.x)||P(e.y)?Array.isArray(e)&&(this.x=+e[0],this.y=+e[1],this.z=e[2]):(this.x=+e.x,this.y=+e.y,this.z=e.z):(this.x=+e,this.y=+t,this.z=n),this._isNaN())throw new Error("Position is NaN")}var t=e.prototype;return t.set=function(e,t,n){return this.x=e,this.y=t,this.z=n||0,this},t.abs=function(){return new this.constructor(Math.abs(this.x),Math.abs(this.y))},t._abs=function(){return this.x=Math.abs(this.x),this.y=Math.abs(this.y),this},t._round=function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},t.round=function(){return new this.constructor(Math.round(this.x),Math.round(this.y))},t._ceil=function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this},t.ceil=function(){return new this.constructor(Math.ceil(this.x),Math.ceil(this.y))},t.distanceTo=function(e){var t=e.x-this.x,n=e.y-this.y;return Math.sqrt(t*t+n*n)},t.mag=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},t._floor=function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},t.floor=function(){return new this.constructor(Math.floor(this.x),Math.floor(this.y))},t.copy=function(){return new this.constructor(this.x,this.y,this.z)},t._add=function(e,t){return P(e.x)?P(e[0])?(this.x+=e,this.y+=t):(this.x+=e[0],this.y+=e[1]):(this.x+=e.x,this.y+=e.y),this},t.add=function(e,t){var n,r;return P(e.x)?P(e[0])?(n=this.x+e,r=this.y+t):(n=this.x+e[0],r=this.y+e[1]):(n=this.x+e.x,r=this.y+e.y),new this.constructor(n,r)},t._sub=function(e,t){return P(e.x)?P(e[0])?(this.x-=e,this.y-=t):(this.x-=e[0],this.y-=e[1]):(this.x-=e.x,this.y-=e.y),this},t._substract=function(){return this._sub.apply(this,arguments)},t.sub=function(e,t){var n,r;return P(e.x)?P(e[0])?(n=this.x-e,r=this.y-t):(n=this.x-e[0],r=this.y-e[1]):(n=this.x-e.x,r=this.y-e.y),new this.constructor(n,r)},t.substract=function(){return this.sub.apply(this,arguments)},t.multi=function(e){return new this.constructor(this.x*e,this.y*e)},t._multi=function(e){return this.x*=e,this.y*=e,this},t.div=function(e){return this.multi(1/e)},t._div=function(e){return this._multi(1/e)},t.equals=function(e){return e instanceof this.constructor&&(this.x===e.x&&this.y===e.y&&this.z===e.z)},t._isNaN=function(){return isNaN(this.x)||isNaN(this.y)},t.isZero=function(){return 0===this.x&&0===this.y},t.toArray=function(){return T(this.z)?[this.x,this.y,this.z]:[this.x,this.y]},t.toFixed=function(e){return new this.constructor(this.x.toFixed(e),this.y.toFixed(e))},t.toJSON=function(){return{x:this.x,y:this.y}},e}(),xe=function(e){function t(){return e.apply(this,arguments)||this}Ae(t,e);var n=t.prototype;return n.closeTo=function(e,t){return t||(t=0),this.x>=e.x-t&&this.x<=e.x+t&&this.y>=e.y-t&&this.y<=e.y+t},n.mag=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},n.unit=function(){return this.copy()._unit()},n._unit=function(){return this._div(this.mag()),this},n.perp=function(){return this.copy()._perp()},n._perp=function(){var e=this.y;return this.y=this.x,this.x=-e,this},n.angleWith=function(e){return this.angleWithSep(e.x,e.y)},n.angleWithSep=function(e,t){return Math.atan2(this.x*t-this.y*e,this.x*e+this.y*t)},n._rotate=function(e){var t=Math.cos(e),n=Math.sin(e),r=t*this.x-n*this.y,i=n*this.x+t*this.y;return this.x=r,this.y=i,this},n.rotate=function(e){return this.copy()._rotate(e)},t}(we);function Ee(e){var t="data:image/svg+xml";return e.length>4&&".svg"===e.slice(-4)?1:e.slice(0,18)===t?2:0}function Se(e,t){j&&Se.node?Se.node(e,t):e.src=t[0]}!function(){if(j)return be=function(e){return setTimeout(e,16)},void(_e=clearTimeout);var e,t;function n(e){return setTimeout(e,33.333333333333336)}function r(e){return window["webkit"+e]||window["moz"+e]||window["ms"+e]}"undefined"!=typeof window?(e=window.requestAnimationFrame||r("RequestAnimationFrame")||n,t=window.cancelAnimationFrame||r("CancelAnimationFrame")||r("CancelRequestAnimationFrame")||function(e){window.clearTimeout(e)}):(e=n,t=clearTimeout),be=function(t){return e(t)},_e=function(e){e&&t(e)}}();var Ce=0;function Pe(){return Ce++}var Te=Pe;function ke(e){return e&&O(e)?JSON.parse(e):e}function Me(e){for(var t=1;t-1&&t.splice(n,1)}function Re(e,t,n){if(!Array.isArray(e))return n?t.call(n,e):t(e);for(var r,i,o=[],a=0,s=e.length;a0?1:-1}function Ne(e){if(Math.log2)return Math.log2(e);var t=Math.log(e)*Math.LOG2E,n=Math.round(t);return Math.abs(n-t)<1e-14?n:t}function De(e,t,n){return e*(1-n)+t*n}function Fe(e,t,n){if(e===n||e===t)return e;var r=n-t;return((e-t)%r+r)%r+t}function je(e,t,n){return Math.min(n,Math.max(t,e))}function Be(e){return Array.isArray(e)&&e.length>0}var Ze=/^([a-z][a-z\d+\-.]*:)?\/\//i;var ze=/^url\((['"])(.+)\1\)$/i,Ue=/^url\(([^'"].*[^'"])\)$/i;function He(e){return O(e)?Ue.test(e)?1:ze.test(e)?2:3:0}function Ve(e){var t=He(e);return 3===t?e:1===t?Ue.exec(e)[1]:2===t?ze.exec(e)[2]:e}var We="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";function Ge(e){if(ve.btoa)return window.btoa(e);for(var t,n,r=String(e),i="",o=0,a=We;r.charAt(0|o)||(a="=",o%1);i+=a.charAt(63&t>>8-o%1*8)){if((n=r.charCodeAt(o+=3/4))>255)throw new Error("'btoa' failed: The string to be encoded contains characters outside of the Latin1 range.");t=t<<8|n}return i}function Ke(e,t){for(var n=atob(e),r=new ArrayBuffer(n.length),i=new Uint8Array(r),o=0;o=t-n&&e<=t+n}function Je(e,t,n,r){e||(e=100),t||(t=4);var i=this;return t*=2,this._flashTimeout&&clearTimeout(this._flashTimeout),this._flashTimeout=setTimeout((function o(){if(0===t)return i.show(),void(n&&(r?n.call(r):n()));t%2===0?i.hide():i.show(),t--,i._flashTimeout=setTimeout(o,e)}),e),this}function et(e,t){void 0===e&&(e=[]),void 0===t&&(t="_pt");for(var n=[],r=0,i=e.length;r1");else{this.colors=e;for(var n=1/0,r=-1/0,i=0,o=e.length;i=e.stops.length)&&!(t<=e.stops[r][0]);)r++;return 0===r?e.stops[r][1]:r===e.stops.length?e.stops[r-1][1]:vt(t,n,e.stops[r-1][0],e.stops[r][0],e.stops[r-1][1],e.stops[r][1])}"function"===typeof Map&&(lt=new Map);var pt={width:100,height:1};function gt(e,t){var n=e.stops;if(n&&n.length>1){var r;if(lt){var i=JSON.stringify(n);if(!lt.has(i)){var o=new ct(n,pt);lt.set(i,o)}r=lt.get(i)}else r=new ct(n,pt);var a=r.getColor(t);return[a[0]/255,a[1]/255,a[2]/255,a[3]/255]}return n&&1===n.length?n[0][1]:null}function mt(e,t){return function(e,t,n){return void 0!==e?e:void 0!==t?t:void 0!==n?n:null}(t,e.default)}function vt(e,t,n,r,i,o){return"function"===typeof i?function(){var a=i.apply(void 0,arguments),s=o.apply(void 0,arguments);return vt(e,t,n,r,a,s)}:i.length?function(e,t,n,r,i,o){for(var a=[],s=0;s"===t||"<="===t||">="===t?kt(e[1],e[2],t,!0):"any"===t?Mt(e.slice(1),"||"):"all"===t?Mt(e.slice(1),"&&"):"none"===t?It(Mt(e.slice(1),"||")):"in"===t?Ot(e[1],e.slice(2)):"!in"===t?It(Ot(e[1],e.slice(2))):"has"===t?Rt(e[1]):"!has"===t?It(Rt(e[1])):"true")+")"}function Tt(e){return"$"===e[0]?"f."+e.substring(1):"p["+JSON.stringify(e)+"]"}function kt(e,t,n,r){var i=Tt(e),o="$type"===e?St.indexOf(t):JSON.stringify(t);return(r?"typeof "+i+"=== typeof "+o+"&&":"")+i+n+o}function Mt(e,t){return e.map(Pt).join(t)}function Ot(e,t){"$type"===e&&(t=t.map((function(e){return St.indexOf(e)})));var n=JSON.stringify(t.sort(Lt)),r=Tt(e);return t.length<=200?n+".indexOf("+r+") !== -1":"function(v, a, i, j) {\n while (i <= j) { var m = (i + j) >> 1;\n if (a[m] === v) return true; if (a[m] > v) j = m - 1; else i = m + 1;\n }\n return false; }("+r+", "+n+",0,"+(t.length-1)+")"}function Rt(e){return"$id"===e?'"id" in f':JSON.stringify(e)+" in p"}function It(e){return"!("+e+")"}function Lt(e,t){return et?1:0}function Nt(e){var t=e._toJSON(),n=t.feature;return n.type=St.indexOf(n.geometry.type),n.subType=t.subType,n}function Dt(e){if(!Array.isArray(e))return Dt([e]);for(var t=[],n=0;n");for(var h=0;h"),"data:image/svg+xml;base64,"+Ge(f.join(" "))}function Vt(e,t){if(!e)return[];var n=e;Array.isArray(e)||(n=[e]);for(var r,i,o,a,s=[],l=b,c=n.length-1;c>=0;c--)if(e=n[c]){t&&(e=Wt(e));for(var u=0;u=n||a<=0)return[{text:"",width:n}];if(i<=n)return[{text:e,width:i}];for(var s=[],l=e.substring(0,a),c=o*a,u=a,d=e.length;u=n?(s.push({text:l,width:c}),l=e.substring(u,a+u),u+=a-1,c=o*a):(l+=f,c=h),u>=d-1&&(c=Jt(l),s.push({text:l,width:c}))}return s}var nn=/\{([\w_]+)\}/g;function rn(e,t){return O(e)?e.replace(nn,(function(e,n){if(!t)return"";var r=t[n];return P(r)?"":Array.isArray(r)?r.join():r})):e}function on(e,t){T(e)&&(e+=""),e=e||"";var n=t.textMaxHeight||0,r=cn(e,t);return n&&no)&&(c=o),O(e)||(e+="");var u=0;if(s&&e.indexOf(s)>=0)for(var d=e.split(s),f=0,h=d.length;fc)for(var m=tn(p,n,c,g),v=0,A=m.length;vu&&(u=y),l.push({text:m[v].text,size:new Kt(y,a)})}else g>u&&(u=g),l.push({text:p,size:new Kt(g,a)})}else if(o>c)for(var b=tn(e,n,c,o),_=0;_u&&(u=w),l.push({text:b[_].text,size:new Kt(w,a)})}else o>u&&(u=o),l.push({text:e,size:i});var x=l.length;return{total:x,size:new Kt(u,a*x+r*(x-1)),rows:l,rawSize:i}}function un(e){var t=0,n=e&&e.length||0;if(!n)return t;for(var r=0;r=0;r--)n.push(e.colorStops[r].join());t.push(n.join(","))}return t.join("_")}function hn(e,t){if(!e)return 1;var n=[];if(Array.isArray(e)){for(var r=0;r2?e[n]=e[n].replace(An,t):yt(e[n])?e[n]=bn(e[n],t):M(e[n])&&yn(e[n],t))}function bn(e,t){var n=e.default;O(n)&&(e.default=n.replace(An,t));for(var r=e.stops,i=0;i0&&o&&Array.isArray(o)&&o.length)return!0}}return!1}var wn=Object.freeze({now:S,extend:C,isNil:P,isNumber:T,isInteger:k,isObject:M,isString:O,isFunction:R,hasOwn:L,join:function(e,t){return e.join?e.join(t||","):Array.prototype.join.call(e,t||",")},isEmpty:function(e){var t;for(t in e)return!1;return!t},toRadian:D,toDegree:F,IS_NODE:j,get requestAnimFrame(){return be},get cancelAnimFrame(){return _e},isSVG:Ee,loadImage:Se,UID:Pe,GUID:Te,parseJSON:ke,pushIn:Me,removeFromArray:Oe,forEachCoord:Re,getValueOrDefault:Ie,sign:Le,log2:Ne,interpolate:De,wrap:Fe,clamp:je,isArrayHasData:Be,isURL:function(e){return Ze.test(e)},isCssUrl:He,extractCssUrl:Ve,btoa:Ge,b64toBlob:Ke,computeDegree:qe,emptyImageUrl:Xe,equalMapView:$e,flash:Je,_defaults:function(e,t){for(var n=Object.getOwnPropertyNames(t),r=0;r=0;a--){var s=o[a];if(s)e["Z__"+s]||(e["Z__"+s]=[]),Rn(e,s,n)>=0&&(console.warn(e,"find '"+s+"' handler:",n," The old listener function will be removed"),On(e,s,n)),e["Z__"+s].push({callback:i,src:n}),e.addEventListener(s,i,!!ve.supportsPassive&&{capture:!1,passive:!1})}return this}function On(e,t,n){function r(t,n){"mousewheel"===t&&ve.gecko&&(t="DOMMouseScroll"),e.removeEventListener(t,n,!1)}if(!e||!e.removeEventListener||!t)return this;for(var i=t.split(" "),o=i.length-1;o>=0;o--){var a=i[o];if(a){if(!n&&e["Z__"+a]){for(var s=e["Z__"+a],l=0,c=s.length;l=0&&e.indexOf(t,n)===n}(n,";")||(n+=";"),e.style.cssText=n+t,this}function Zn(e,t){if(void 0!==e.classList)return e.classList.contains(t);var n=Hn(e);return n.length>0&&new RegExp("(^|\\s)"+t+"(\\s|$)").test(n)}function zn(e,t){if(void 0===e.classList||Zn(e,t)){var n=Hn(e);Un(e,(n?n+" ":"")+t)}else for(var r=$t(t),i=0,o=r.length;i/i.test(e)}function Gn(e,t){var n=Kn(e);O(t)?n.innerHTML=t:n.appendChild(t);var r=new Kt(n.clientWidth,n.clientHeight);return kn(n),r}function Kn(e){var t=document.createElement(e);return t.style.cssText="position:absolute;left:-10000px;top:-10000px;",document.body.appendChild(t),t}var qn,Yn=Mn,Xn=On,$n="function"===typeof Map,Qn=function(){},Jn=function(){function e(e,t){this.max=e,this.onRemove=t||Qn,this.reset()}var t=e.prototype;return t.reset=function(){for(var e in this.data)this.onRemove(this.data[e]);return this.data={},this.order=[],this},t.clear=function(){this.reset(),delete this.onRemove},t.add=function(e,t){if(this.has(e))this.order.splice(this.order.indexOf(e),1),this.data[e]=t,this.order.push(e);else if(this.data[e]=t,this.order.push(e),this.order.length>this.max){var n=this.getAndRemove(this.order[0]);n&&this.onRemove(n)}return this},t.has=function(e){return e in this.data},t.keys=function(){return this.order},t.getAndRemove=function(e){if(!this.has(e))return null;var t=this.data[e];return delete this.data[e],this.order.splice(this.order.indexOf(e),1),t},t.get=function(e){return this.has(e)?this.data[e]:null},t.remove=function(e){if(!this.has(e))return this;var t=this.data[e];return delete this.data[e],this.onRemove(t),this.order.splice(this.order.indexOf(e),1),this},t.setMaxSize=function(e){for(this.max=e;this.order.length>this.max;){var t=this.getAndRemove(this.order[0]);t&&this.onRemove(t)}return this},e}();$n&&(qn=function(){function e(e,t){this.max=e,this.onRemove=t||Qn,this.reset()}var t=e.prototype;return t.reset=function(){if(this.data){var e=this.data.values(),t=Array.isArray(e),n=0;for(e=t?e:e[Symbol.iterator]();;){var r;if(t){if(n>=e.length)break;r=e[n++]}else{if((n=e.next()).done)break;r=n.value}var i=r;this.onRemove(i)}}return this.data=new Map,this},t.clear=function(){this.reset(),delete this.onRemove},t.add=function(e,t){return t?(this.has(e)?(this.data.delete(e),this.data.set(e,t),this.data.size>this.max&&this.shrink()):this.data.set(e,t),this):this},t.keys=function(){var e=new Array(this.data.size),t=0,n=this.data.keys(),r=Array.isArray(n),i=0;for(n=r?n:n[Symbol.iterator]();;){var o;if(r){if(i>=n.length)break;o=n[i++]}else{if((i=n.next()).done)break;o=i.value}var a=o;e[t++]=a}return e},t.shrink=function(){for(var e=this.data.keys(),t=e.next();this.data.size>this.max;){var n=this.getAndRemove(t.value);n&&this.onRemove(n),t=e.next()}},t.has=function(e){return this.data.has(e)},t.getAndRemove=function(e){if(!this.has(e))return null;var t=this.data.get(e);return this.data.delete(e),t},t.get=function(e){return this.has(e)?this.data.get(e):null},t.remove=function(e){if(!this.has(e))return this;var t=this.data.get(e);return this.data.delete(e),this.onRemove(t),this},t.setMaxSize=function(e){return this.max=e,this.data.size>this.max&&this.shrink(),this},e}());var er=$n?qn:Jn,tr={jsonp:function(e,t){var n="_maptalks_jsonp_"+Pe();e.match(/\?/)?e+="&callback="+n:e+="?callback="+n;var r=document.createElement("script");return r.type="text/javascript",r.src=e,window[n]=function(e){t(null,e),document.getElementsByTagName("head")[0].removeChild(r),r=null,delete window[n]},document.getElementsByTagName("head")[0].appendChild(r),this},get:function(e,t,n){if(R(t)){var r=n;n=t,t=r}if(j&&tr.get.node)return tr.get.node(e,n,t);var i=tr._getClient(n);if(i.open("GET",e,!0),t){for(var o in t.headers)i.setRequestHeader(o,t.headers[o]);i.withCredentials="include"===t.credentials,t.responseType&&(i.responseType=t.responseType)}return i.send(null),i},post:function(e,t,n){var r;if(O(e)){if(R(t)){var i=n;n=t,t=i}r=(t=t||{}).postData}else{var o=n;r=t,e=(t=e).url,n=o}if(j&&tr.post.node)return t.url=e,tr.post.node(t,r,n);var a=tr._getClient(n);if(a.open("POST",t.url,!0),t.headers||(t.headers={}),t.headers["Content-Type"]||(t.headers["Content-Type"]="application/x-www-form-urlencoded"),"setRequestHeader"in a)for(var s in t.headers)t.headers.hasOwnProperty(s)&&a.setRequestHeader(s,t.headers[s]);return O(r)||(r=JSON.stringify(r)),a.send(r),a},_wrapCallback:function(e,t){return function(){4===e.readyState&&(200===e.status?"arraybuffer"===e.responseType?0===e.response.byteLength?t(new Error("http status 200 returned without content.")):t(null,{data:e.response,cacheControl:e.getResponseHeader("Cache-Control"),expires:e.getResponseHeader("Expires"),contentType:e.getResponseHeader("Content-Type")}):t(null,e.responseText):t(new Error(e.statusText+","+e.status)))}},_getClient:function(e){var t;try{t=new XMLHttpRequest}catch(Vc){try{t=new ActiveXObject("Msxml2.XMLHTTP")}catch(Vc){try{t=new ActiveXObject("Microsoft.XMLHTTP")}catch(Vc){}}}return t.onreadystatechange=tr._wrapCallback(t,e),t},getArrayBuffer:function(e,t,n){if(R(t)){var r=n;n=t,t=r}return t||(t={}),t.responseType="arraybuffer",tr.get(e,t,n)},getImage:function(e,t,n){return tr.getArrayBuffer(t,n,(function(t,n){if(t)e.onerror&&e.onerror(t);else if(n){var r=window.URL||window.webkitURL,i=e.onload;e.onload=function(){i&&i(),r.revokeObjectURL(e.src)};var o=new Blob([new Uint8Array(n.data)],{type:n.contentType});e.cacheControl=n.cacheControl,e.expires=n.expires,e.src=n.data.byteLength?r.createObjectURL(o):Xe}}))},getJSON:function(e,t,n){if(R(t)){var r=n;n=t,t=r}var i=function(e,t){var r=t?ke(t):null;n(e,r)};return t&&t.jsonp?tr.jsonp(e,i):tr.get(e,t,i)}},nr="#000",rr=!1,ir=null,or=Math.PI/180,ar={getCanvas2DContext:function(e){return e.getContext("2d",{willReadFrequently:!0})},setHitTesting:function(e){rr=e},createCanvas:function(e,t,n){var r;return j?r=new n(e,t):((r=Pn("canvas")).width=e,r.height=t),r},prepareCanvasFont:function(e,t){e.textBaseline="top",e.font=ln(t);var n=t.textFill;n||(n="#000"),e.fillStyle=ar.getRgba(n,t.textOpacity)},prepareCanvas:function(e,t,n,r){if(t){var i=t.lineWidth;P(i)||e.lineWidth===i||(e.lineWidth=i);var o=t.linePatternFile,a=t.lineColor||nr;if(r)e.strokeStyle="#000";else if(o&&n){var s;(t.linePatternDx||t.linePatternDy)&&(s=[t.linePatternDx,t.linePatternDy]),ar._setStrokePattern(e,o,i,s,n),t.lineDasharray=[]}else dn(a)?t.lineGradientExtent?e.strokeStyle=ar._createGradient(e,a,t.lineGradientExtent):e.strokeStyle=nr:(Array.isArray(a)&&(a=ar.normalizeColorToRGBA(a)),e.strokeStyle=a);t.lineJoin&&(e.lineJoin=t.lineJoin),t.lineCap&&(e.lineCap=t.lineCap),e.setLineDash&&Be(t.lineDasharray)&&e.setLineDash(t.lineDasharray);var l=t.polygonPatternFile,c=t.polygonFill||"rgba(255,255,255,0)";if(r)e.fillStyle="#000";else if(l&&n){var u=cr(l),d=n.getImage([u,null,null]);if(d||(d=n.getImage([u+"-texture",null,i])),Ee(u)&&d instanceof Image&&(ve.edge||ve.ie)){var f=d.width||20,h=d.height||20,p=ar.createCanvas(f,h);ar.image(p.getContext("2d"),d,0,0,f,h),d=p}d?(e.fillStyle=e.createPattern(d,"repeat"),(t.polygonPatternDx||t.polygonPatternDy)&&(e.fillStyle.polygonPatternOffset=[t.polygonPatternDx,t.polygonPatternDy])):"undefined"!==typeof console&&console.warn("img not found for",u)}else dn(c)?t.polygonGradientExtent?e.fillStyle=ar._createGradient(e,c,t.polygonGradientExtent):e.fillStyle="rgba(255,255,255,0)":(Array.isArray(c)&&(c=ar.normalizeColorToRGBA(c)),e.fillStyle=c)}},_createGradient:function(e,t,n){var r=null,i=t.places,o=n.getMin(),a=n.getMax(),s=n.getWidth(),l=n.getHeight();if(t.type&&"linear"!==t.type){if("radial"===t.type){if(i){if(6!==i.length)throw new Error("A radial gradient's places should have 6 numbers.");i=[o.x+i[0]*s,o.y+i[1]*l,s*i[2],o.x+i[3]*s,o.y+i[4]*l,s*i[5]]}else{var c=n.getCenter()._round();i=[c.x,c.y,Math.abs(c.x-o.x),c.x,c.y,0]}r=e.createRadialGradient.apply(e,i)}}else{if(i){if(4!==i.length)throw new Error("A linear gradient's places should have 4 numbers.");i=[o.x+i[0]*s,o.y+i[1]*l,o.x+i[2]*s,o.y+i[3]*l]}else i=[o.x,o.y,a.x,o.y];r=e.createLinearGradient.apply(e,i)}return t.colorStops.forEach((function(e){r.addColorStop.apply(r,e)})),r},_setStrokePattern:function(e,t,n,r,i){var o,a=cr(t);if(j)o=i.getImage([a,null,n]);else{var s=a+"-texture-"+n;if(!(o=i.getImage(s))){var l=i.getImage([a,null,null]);if(l){var c;c=l.width&&l.height?Math.round(l.width*n/l.height):n;var u=ar.createCanvas(c,n,e.canvas.constructor);ar.image(u.getContext("2d"),l,0,0,c,n),i.addResource([s,null,n],u),o=u}}}o?(e.strokeStyle=e.createPattern(o,"repeat"),e.strokeStyle.linePatternOffset=r):"undefined"!==typeof console&&console.warn("img not found for",a)},clearRect:function(e,t,n,r,i){e.canvas._drawn=!1,e.clearRect(t,n,r,i)},fillCanvas:function(e,t,n,r){if(rr&&(t=1),e.canvas._drawn=!0,0!==t){var i,o=ar._isPattern(e.fillStyle),a=e.fillStyle&&e.fillStyle.polygonPatternOffset,s=a?a[0]:0,l=a?a[1]:0;P(t)&&(t=1),t<1&&(i=e.globalAlpha,e.globalAlpha*=t),o&&(n=n||0,r=r||0,e.translate(n+s,r+l)),e.fill(),o&&e.translate(-n-s,-r-l),t<1&&(e.globalAlpha=i)}},getRgba:function(e,t){return P(t)&&(t=1),"#"!==e[0]?(Array.isArray(e)&&(e=ar.normalizeColorToRGBA(e,t)),e):(7===e.length?(n=parseInt(e.substring(1,3),16),r=parseInt(e.substring(3,5),16),i=parseInt(e.substring(5,7),16)):(n=17*parseInt(e.substring(1,2),16),r=17*parseInt(e.substring(2,3),16),i=17*parseInt(e.substring(3,4),16)),"rgba("+n+","+r+","+i+","+t+")");var n,r,i},normalizeColorToRGBA:function(e,t){return void 0===t&&(t=1),"rgba("+255*e[0]+","+255*e[1]+","+255*e[2]+","+(4===e.length?e[3]:1)*t+")"},image:function(e,t,n,r,i,o){e.canvas._drawn=!0;try{T(i)&&T(o)?e.drawImage(t,n,r,i,o):e.drawImage(t,n,r)}catch(a){console&&(console.warn("error when drawing image on canvas:",a),console.warn(t))}},text:function(e,t,n,r,i){ar._textOnMultiRow(e,i.rows,r,n,i.size,i.rawSize)},_textOnMultiRow:function(e,t,n,r,i,o){for(var a,s,l=an(i,n.textHorizontalAlignment,n.textVerticalAlignment),c=o.height+n.textLineSpacing,u=r.add(0,l.y),d=n.textMaxHeight,f=0,h=0,p=t.length;h0&&(f+=c)+o.height>=d));h++);},_textOnLine:function(e,t,n,r,i,o){rr&&(o=1);var a,s,l=0!==o&&0!==r;e.textBaseline="top";var c=e.shadowBlur,u=e.shadowOffsetX,d=e.shadowOffsetY;if(l){var f=e.globalAlpha;e.globalAlpha*=o,e.miterLimit=2,e.lineJoin="round",e.lineCap="round",e.lineWidth=2*r,Array.isArray(i)&&(i=ar.normalizeColorToRGBA(i)),e.strokeStyle=i,e.strokeText(t,n.x,n.y+1),e.miterLimit=10,e.globalAlpha=f,a=e.globalCompositeOperation,e.globalCompositeOperation="destination-out",s=e.fillStyle,e.fillStyle="#000"}c&&l&&(e.shadowBlur=e.shadowOffsetX=e.shadowOffsetY=0),ar.fillText(e,t,n),a&&(e.globalCompositeOperation=a,ar.fillText(e,t,n,s),c&&(e.shadowBlur=c,e.shadowOffsetX=u,e.shadowOffsetY=d))},fillText:function(e,t,n,r){e.canvas._drawn=!0,r&&(e.fillStyle=r),e.fillText(t,n.x,n.y+1)},_stroke:function(e,t,n,r){if(rr&&(t=1),e.canvas._drawn=!0,0!==t){var i,o=e.strokeStyle&&e.strokeStyle.linePatternOffset,a=o?o[0]:0,s=o?o[1]:0,l=ar._isPattern(e.strokeStyle)&&(!P(n)&&!P(r)||!P(a)&&!P(s));P(t)&&(t=1),t<1&&(i=e.globalAlpha,e.globalAlpha*=t),l&&(n=n||0,r=r||0,e.translate(n+a,r+s)),e.stroke(),l&&e.translate(-n-a,-r-s),t<1&&(e.globalAlpha=i)}},_path:function(e,t,n,r,i){if(Be(t))for(var o,a,s=Be(n),l=!0!==i&&ar._isPattern(e.strokeStyle),c=0,u=t.length;c0&&(d(t[c-1],o),e.beginPath(),e.moveTo(o.x,o.y));else if(s){if(c===u-1)break;a=t[c+1],sr(e,o,a,n)}function d(t,n){var i=qe(t.x,t.y,n.x,n.y);e.save();var o=Math.cos(i);Math.abs(o)<1e-7?e.translate(t.x-e.lineWidth/2,t.y):e.translate(t.x,t.y-e.lineWidth/2/o),e.rotate(i),ar._stroke(e,r),e.restore()}},path:function(e,t,n,r,i){Be(t)&&(e.beginPath(),e.moveTo(t[0].x,t[0].y),ar._path(e,t,i,n),ar._stroke(e,n))},_multiClip:function(e,t){if(t&&0!==t.length)for(var n=0,r=(t=t[0]).length;n1&&!j&&(ir||(ir=ar.createCanvas(1,1)),e.canvas._drawn=!1,ir.width=e.canvas.width,ir.height=e.canvas.height,ur(e=ir.getContext("2d"),d)),s){for(e.save(),c=0,u=t.length;c0&&(e.globalCompositeOperation="destination-out",l=1),ar.fillCanvas(e,l,t[c][0].x,t[c][0].y),c>0?e.globalCompositeOperation="source-over":u>1&&(e.fillStyle="#fff"),ar._stroke(e,0));e.restore()}var f=e.fillStyle;for(c=0,u=t.length;c0&&(e.globalCompositeOperation="destination-out",l=1),ar.fillCanvas(e,l,t[c][0].x,t[c][0].y),c>0?e.globalCompositeOperation="source-over":u>1&&(e.fillStyle="#fff")),ar._stroke(e,n));e.fillStyle!==f&&(e.fillStyle=f),t.length>1&&!j&&(d.drawImage(ir,0,0),d.canvas._drawn=e.canvas._drawn,ur(d,e))}},_ring:function(e,t,n,r,i){var o=ar._isPattern(e.strokeStyle);i||!o||t[0].equals(t[t.length-1])||(t=t.concat([t[0]])),e.beginPath(),e.moveTo(t[0].x,t[0].y),ar._path(e,t,n,r,i),o||e.closePath()},paintSmoothLine:function(e,t,n,r,i,o,a){if(t)if(t.length<=2||!r)ar.path(e,t,n);else{var s,l=t.length,c=i?l:l-1;e.beginPath(),e.moveTo(t[0].x,t[0].y),void 0!==a&&(c-=Math.max(c-o-1,0));for(var u=0;u=0&&a<1){e.bezierCurveTo(y[0],y[1],y[2],y[3],y[4],y[5]),t.splice(c-1,l-(c-1)-1);var b=new xe(y[4],y[5]);b.prevCtrlPoint=new xe(y[2],y[3]),t.push(b),l=t.length}else e.bezierCurveTo(y[0],y[1],y[2],y[3],g,m);t[u].nextCtrlPoint=y.slice(0,2),t[u].prevCtrlPoint=s?s.slice(2):null,s=y}!i&&t[1].prevCtrlPoint&&(t[0].nextCtrlPoint=t[1].prevCtrlPoint,delete t[0].prevCtrlPoint),t[l-1].prevCtrlPoint||(t[l-1].prevCtrlPoint=t[l-2].nextCtrlPoint),ar._stroke(e,n)}function _(e,t,n,r,i,o,a,s,l,c){var u=(e+n)/2,d=(t+r)/2,f=(n+i)/2,h=(r+o)/2,p=(i+a)/2,g=(o+s)/2,m=Math.sqrt((n-e)*(n-e)+(r-t)*(r-t)),v=Math.sqrt((i-n)*(i-n)+(o-r)*(o-r)),A=m/(m+v),y=v/(v+Math.sqrt((a-i)*(a-i)+(s-o)*(s-o))),b=u+(f-u)*A,_=d+(h-d)*A,w=f+(p-f)*y,x=h+(g-h)*y,E=b+(f-b)*l+n-b,S=_+(h-_)*l+r-_,C=w+(f-w)*l+i-w,P=x+(h-x)*l+o-x,T=[E,S,C,P];return c<1?function(e,t,n,r,i,o,a,s,l,c){var u=1-e,d=1-t,f=n*d*d+2*i*t*d+a*t*t,h=i*d*d+2*a*t*d+l*t*t,p=r*d*d+2*o*t*d+s*t*t,g=o*d*d+2*s*t*d+c*t*t;return[(n*u*u+2*i*e*u+a*e*e)*d+(i*u*u+2*a*e*u+l*e*e)*t,(r*u*u+2*o*e*u+s*e*e)*d+(o*u*u+2*s*e*u+c*e*e)*t,f*u+h*e,p*u+g*e,f*d+h*t,p*d+g*t]}(0,c,n,r,E,S,C,P,i,o):T}},_arcBetween:function(e,t,n,r){var i=r,o=t.distanceTo(n),a=o/2/Math.sin(i/2),s=Math.asin((n.y-t.y)/o);t.x>n.x&&(s=Math.PI-s);var l=s-(90*or-i/2),c=Math.cos(l)*a,u=Math.sin(l)*a,d=t.x+c,f=t.y+u,h=Math.asin((n.y-f)/a);d>n.x&&(h=Math.PI-h);var p=h+i;return e.beginPath(),e.arc(d,f,a,h,p),[d,f]},_lineTo:function(e,t){e.lineTo(t.x,t.y)},bezierCurveAndFill:function(e,t,n,r){e.beginPath();var i=t[0];e.moveTo(i.x,i.y);var o=[e];o.push.apply(o,t.splice(1)),ar._bezierCurveTo.apply(ar,o),ar.fillCanvas(e,r),ar._stroke(e,n)},_bezierCurveTo:function(e,t,n,r){e.bezierCurveTo(t.x,t.y,n.x,n.y,r.x,r.y)},ellipse:function(e,t,n,r,i,o,a){e.beginPath(),n===r&&n===i?e.arc(t.x,t.y,n,0,2*Math.PI):e.ellipse?r!==i?(e.ellipse(t.x,t.y,n,r,0,180*or,360*or,!1),e.ellipse(t.x,t.y,n,i,0,0,180*or,!1)):e.ellipse(t.x,t.y,n,r,0,0,360*or,!1):function(t,n,r,i,o){var a=.5522848,s=r*a,l=i*a,c=o*a;e.moveTo(t-r,n),e.bezierCurveTo(t-r,n-l,t-s,n-i,t,n-i),e.bezierCurveTo(t+s,n-i,t+r,n-l,t+r,n),e.bezierCurveTo(t+r,n+c,t+s,n+o,t,n+o),e.bezierCurveTo(t-s,n+o,t-r,n+c,t-r,n),e.closePath()}(t.x,t.y,n,r,i),ar.fillCanvas(e,a,t.x-n,t.y-r),ar._stroke(e,o,t.x-n,t.y-r)},rectangle:function(e,t,n,r,i){var o=t.x,a=t.y;e.beginPath(),e.rect(o,a,n.width,n.height),ar.fillCanvas(e,i,o,a),ar._stroke(e,r,o,a)},sector:function(e,t,n,r,i,o){var a=or,s=r[0],l=r[1];function c(e,t,n,r,s,l){var c=a*-l,u=a*-s;e.beginPath(),e.moveTo(t,n),e.arc(t,n,r,c,u),e.lineTo(t,n),ar.fillCanvas(e,o,t-r,n-r),ar._stroke(e,i,t-r,n-r)}c(e,t.x,t.y,n,s,l)},_isPattern:function(e){return!O(e)&&!("addColorStop"in e)},drawCross:function(e,t,n,r,i){e.canvas._drawn=!0,e.strokeStyle=i,e.lineWidth=r,e.beginPath(),e.moveTo(t-5,n),e.lineTo(t+5,n),e.moveTo(t,n-5),e.lineTo(t,n+5),e.stroke()},copy:function(e,t){var n=t||Pn("canvas");return n.width=e.width,n.height=e.height,n.getContext("2d").drawImage(e,0,0),n},pixelRect:function(e,t,n,r){var i=e.lineWidth,o=e.globalAlpha,a=!1;if(i>0&&n>0)a=!0,n<1&&(e.globalAlpha*=n);else{if(!(r>0))return;r<1&&(e.globalAlpha*=r)}e.canvas._drawn=!0,a?e.strokeRect(t[0],t[1],1,1):e.fillRect(t[0],t[1],1,1),e.globalAlpha!==o&&(e.globalAlpha=o)}};function sr(e,t,n,r){var i=t.x,o=t.y,a=n.x,s=n.y,l=r,c=function(e,t){return e<=t},u=function(e,t){return e>=t},d=function(e,t){return Math.min(e,t)},f=function(e,t){return Math.max(e,t)},h={thereYet:u,cap:d},p={thereYet:u,cap:d};o-s>0&&(p.thereYet=c,p.cap=f),i-a>0&&(h.thereYet=c,h.cap=f),e.moveTo(i,o);for(var g,m,v=i,A=o,y=0,b=!0;!h.thereYet(v,a)||!p.thereYet(A,s);)g=Math.atan2(s-o,a-i),m=l[y],v=h.cap(a,v+Math.cos(g)*m),A=p.cap(s,A+Math.sin(g)*m),b?e.lineTo(v,A):e.moveTo(v,A),y=(y+1)%l.length,b=!b}var lr="data:image/";function cr(e){return e.substring(0,lr.length)===lr?e:Ve(e)}function ur(e,t){e.filter=t.filter,e.fillStyle=t.fillStyle,e.globalAlpha=t.globalAlpha,e.lineCap=t.lineCap,e.lineDashOffset=t.lineDashOffset,e.lineJoin=t.lineJoin,e.lineWidth=t.lineWidth,e.shadowBlur=t.shadowBlur,e.shadowColor=t.shadowColor,e.shadowOffsetX=t.shadowOffsetX,e.shadowOffsetY=t.shadowOffsetY,e.strokeStyle=t.strokeStyle}var dr="undefined"!==typeof Promise?Promise:i(),fr=function(e){return function(e){function t(){return e.apply(this,arguments)||this}Ae(t,e);var n=t.prototype;return n.on=function(e,t,n){if(!e)return this;if(!O(e))return this._switch("on",e,t);if(!t)return this;this._eventMap||(this._eventMap={});var r,i,o=e.toLowerCase().split(" ");n||(n=this);for(var a=0,s=o.length;a0)for(var c=0;c=0;c--){var u=i[c];t!==u.handler&&t!==u.handler[o]||u.context!==n||(delete u.handler[o],i.splice(c,1))}i.length||delete this._eventMap[r]}return this},n.removeEventListener=function(){return this.off.apply(this,arguments)},n.listens=function(e,t,n){if(!this._eventMap||!O(e))return 0;var r=this._eventMap[e.toLowerCase()];if(!r||!r.length)return 0;if(!t)return r.length;for(var i=0,o=r.length;i1?t-1:0),r=1;r=0&&this._handlers.splice(n,1),this[e].remove(),delete this[e]}return this},n._clearHandlers=function(){for(var e=0,t=this._handlers.length;e1)&&(!this.options.cancelOn||!0!==this.options.cancelOn(e))){var t=this.dom;t.setCapture?t.setCapture():window.captureEvents&&window.captureEvents(window.Event.MOUSEMOVE|window.Event.MOUSEUP),t.ondragstart=function(){return!1},delete this.moved;var n=e.touches?e.touches[0]:e;this.startPos=new xe(n.clientX,n.clientY),Xn(document,wr[e.type],this.onMouseMove,this),Xn(document,xr[e.type],this.onMouseUp,this),Yn(document,wr[e.type],this.onMouseMove,this),Yn(document,xr[e.type],this.onMouseUp,this),this.options.ignoreMouseleave||(Xn(this.dom,"mouseleave",this.onMouseUp,this),Yn(this.dom,"mouseleave",this.onMouseUp,this)),this.fire("mousedown",{domEvent:e,mousePos:new xe(n.clientX,n.clientY)})}},n.onMouseMove=function(e){if(e.touches&&e.touches.length>1)this.moved&&(this.interupted=!0,this.onMouseUp(e));else{var t=e.touches?e.touches[0]:e,n=new xe(t.clientX,t.clientY).sub(this.startPos);(n.x||n.y)&&(this.moved?this.fire("dragging",{domEvent:e,mousePos:new xe(t.clientX,t.clientY)}):(this.fire("dragstart",{domEvent:e,mousePos:this.startPos.copy()}),this.moved=!0))}},n.onMouseUp=function(e){var t=e.changedTouches?e.changedTouches[0]:e;this._offEvents();var n={domEvent:e};T(t.clientX)&&(n.mousePos=new xe(parseInt(t.clientX,0),parseInt(t.clientY,0))),this.moved&&(n.interupted=this.interupted,this.fire("dragend",n),delete this.interupted,delete this.moved),this.fire("mouseup",n)},n._offEvents=function(){var e=this.dom;if(Xn(e,"mouseleave",this.onMouseUp,this),"undefined"!==typeof document&&"undefined"!==typeof window){for(var t in wr)Xn(document,wr[t],this.onMouseMove,this),Xn(document,xr[t],this.onMouseUp,this);e.releaseCapture?e.releaseCapture():window.captureEvents&&window.captureEvents(window.Event.MOUSEMOVE|window.Event.MOUSEUP)}},t}(pr),Sr=function(e){function t(){return e.apply(this,arguments)||this}return Ae(t,e),t.toNumberArrays=function(e){return Array.isArray(e)?Re(e,(function(e){return[e.x,e.y]})):[e.x,e.y]},t.toCoordinates=function(e){if(T(e[0])&&T(e[1]))return new t(e);if(e instanceof t)return e;for(var n=[],r=0,i=e.length;r0?arguments[i-1]:null;o&&o.unproject&&(this.projection=arguments[i-1]),this._dirty=!0,this._initialize(e,t,n,r)}var t=e.prototype;return t._initialize=function(e,t,n,r){if(this.xmin=null,this.xmax=null,this.ymin=null,this.ymax=null,!P(e)){var i=this.projection;T(e)&&T(t)&&T(n)&&T(r)?i?this.set(e,t,n,r):this.set(Math.min(e,n),Math.min(t,r),Math.max(e,n),Math.max(t,r)):Array.isArray(e)?i?this.set(e[0],e[1],e[2],e[3]):this.set(Math.min(e[0],e[2]),Math.min(e[1],e[3]),Math.max(e[0],e[2]),Math.max(e[1],e[3])):T(e.x)&&T(t.x)&&T(e.y)&&T(t.y)?i?this.set(e.x,e.y,t.x,t.y):(e.x>t.x?(this.xmin=t.x,this.xmax=e.x):(this.xmin=e.x,this.xmax=t.x),e.y>t.y?(this.ymin=t.y,this.ymax=e.y):(this.ymin=e.y,this.ymax=t.y)):T(e.xmin)&&T(e.xmax)&&T(e.ymin)&&T(e.ymax)&&this.set(e.xmin,e.ymin,e.xmax,e.ymax)}},t._add=function(e){return this._dirty=!0,P(e.x)?P(e.xmin)?P(e[0])||(this.xmin+=e[0],this.ymin+=e[1],this.xmax+=e[0],this.ymax+=e[1]):(this.xmin+=e.xmin,this.ymin+=e.ymin,this.xmax+=e.xmax,this.ymax+=e.ymax):(this.xmin+=e.x,this.ymin+=e.y,this.xmax+=e.x,this.ymax+=e.y),this},t.add=function(){var e=new this.constructor(this.xmin,this.ymin,this.xmax,this.ymax,this.projection);return e._add.apply(e,arguments)},t._scale=function(e){return this._dirty=!0,this.xmin*=e,this.ymin*=e,this.xmax*=e,this.ymax*=e,this},t._sub=function(e){return this._dirty=!0,P(e.x)?P(e.xmin)?P(e[0])||(this.xmin-=e[0],this.ymin-=e[1],this.xmax-=e[0],this.ymax-=e[1]):(this.xmin-=e.xmin,this.ymin-=e.ymin,this.xmax-=e.xmax,this.ymax-=e.ymax):(this.xmin-=e.x,this.ymin-=e.y,this.xmax-=e.x,this.ymax-=e.y),this},t._substract=function(){return this._sub.apply(this,arguments)},t.sub=function(){var e=new this.constructor(this.xmin,this.ymin,this.xmax,this.ymax,this.projection);return e._sub.apply(e,arguments)},t.substract=function(){return this.sub.apply(this,arguments)},t.round=function(){return new this.constructor(Math.round(this.xmin),Math.round(this.ymin),Math.round(this.xmax),Math.round(this.ymax),this.projection)},t._round=function(){return this._dirty=!0,this.xmin=Math.round(this.xmin),this.ymin=Math.round(this.ymin),this.xmax=Math.round(this.xmax),this.ymax=Math.round(this.ymax),this},t.getMin=function(e){return e?(e.set(this.xmin,this.ymin),e):new this._clazz(this.xmin,this.ymin)},t.getMax=function(e){return e?(e.set(this.xmax,this.ymax),e):new this._clazz(this.xmax,this.ymax)},t.getCenter=function(e){var t=(this.xmin+this.xmax)/2,n=(this.ymin+this.ymax)/2;return e?(e.set(t,n),e):new this._clazz(t,n)},t.isValid=function(){return!P(this.xmin)&&!P(this.ymin)&&!P(this.xmax)&&!P(this.ymax)},t.equals=function(e){return this.xmin===e.xmin&&this.xmax===e.xmax&&this.ymin===e.ymin&&this.ymax===e.ymax},t.intersects=function(e){this._project(this),this._project(e);var t=Math.max(this.pxmin,e.pxmin),n=Math.max(this.pymin,e.pymin),r=Math.min(this.pxmax,e.pxmax),i=Math.min(this.pymax,e.pymax),o=!(t>r||n>i);return o},t.within=function(e){return this._project(this),this._project(e),this.pxmin>=e.pxmin&&this.pxmax<=e.pxmax&&this.pymin>=e.pymin&&this.pymax<=e.pymax},t.contains=function(e){if(!e)return!1;this._project(this);var t=this.projection;if(t)if(void 0!==e.x){var n=kr;Array.isArray(e)?(n.x=e[0],n.y=e[1]):(n.x=e.x,n.y=e.y),e=t.project(n,n)}else void 0!==e.xmin&&this._project(e);return(e.x||e.pxmin||0)>=this.pxmin&&(e.x||e.pxmax||0)<=this.pxmax&&(e.y||e.pymin||0)>=this.pymin&&(e.y||e.pymax||0)<=this.pymax},t.getWidth=function(){return Math.abs(this.xmax-this.xmin)},t.getHeight=function(){return Math.abs(this.ymax-this.ymin)},t.getSize=function(){return new Kt(this.getWidth(),this.getHeight())},t.set=function(e,t,n,r){return this.xmin=e,this.ymin=t,this.xmax=n,this.ymax=r,this._dirty=!0,this},t.__combine=function(e){var t,n,r,i;void 0!==e.x&&(Pr.xmin=Pr.xmax=e.x,Pr.ymin=Pr.ymax=e.y,e=Pr),this._project(e),this._project(this),T(this.pxmin)?(t=Math.min(this.pxmin,e.pxmin),n=Math.min(this.pymin,e.pymin),r=Math.max(this.pxmax,e.pxmax),i=Math.max(this.pymax,e.pymax)):(t=e.pxmin,n=e.pymin,r=e.pxmax,i=e.pymax);var o=this.projection;if(o){Mr.set(t,n),Or.set(r,i);var a=o.unproject(Mr,Mr),s=o.unproject(Or,Or);t=a.x,n=a.y,r=s.x,i=s.y}return jr[0]=t,jr[1]=n,jr[2]=r,jr[3]=i,jr},t._combine=function(e){if(!e||e.isValid&&!e.isValid())return this;var t=this.__combine(e);return this.set(t[0],t[1],t[2],t[3]),this._dirty=!0,this},t.combine=function(e){if(!e||e.isValid&&!e.isValid())return this;var t=this.__combine(e);return new this.constructor(t[0],t[1],t[2],t[3],this.projection)},t.intersection=function(e){if(!this.intersects(e))return null;Rr.x=Math.max(this.pxmin,e.pxmin),Rr.y=Math.max(this.pymin,e.pymin),Ir.x=Math.min(this.pxmax,e.pxmax),Ir.y=Math.min(this.pymax,e.pymax);var t=Rr,n=Ir,r=this.projection;return r&&(t=r.unproject(t,t),n=r.unproject(n,n)),new this.constructor(t,n,r)},t.expand=function(e){var t,n;return T(e)?t=n=e:(t=e.width||e.x||e[0]||0,n=e.height||e.y||e[1]||0),new this.constructor(this.xmin-t,this.ymin-n,this.xmax+t,this.ymax+n,this.projection)},t._expand=function(e){var t,n;return T(e)?t=n=e:(t=e.width||e.x||e[0]||0,n=e.height||e.y||e[1]||0),this.xmin-=t,this.ymin-=n,this.xmax+=t,this.ymax+=n,this._dirty=!0,this},t.toJSON=function(){return{xmin:this.xmin,ymin:this.ymin,xmax:this.xmax,ymax:this.ymax}},t.toArray=function(e){var t=this.xmin,n=this.ymin,r=this.xmax,i=this.ymax;return e?(e[0].x=t,e[0].y=i,e[1].x=r,e[1].y=i,e[2].x=r,e[2].y=n,e[3].x=t,e[3].y=n,e[4].x=t,e[4].y=i,e):[new this._clazz([t,i]),new this._clazz([r,i]),new this._clazz([r,n]),new this._clazz([t,n]),new this._clazz([t,i])]},t.toString=function(){return this.xmin+","+this.ymin+","+this.xmax+","+this.ymax},t.copy=function(){return new this.constructor(this.xmin,this.ymin,this.xmax,this.ymax,this.projection)},t.convertTo=function(e,t){if(!this.isValid())return null;var n,r=t||new this.constructor;return t&&r.set(null,null,null,null),this._clazz===Sr?n=Lr:this._clazz===xe&&(n=Tr),n.x=this.xmin,n.y=this.ymax,r._combine(e(n)),n.x=this.xmax,r._combine(e(n)),n.y=this.ymin,r._combine(e(n)),n.x=this.xmin,r._combine(e(n)),r},t._project=function(e){if(e&&e.isValid()){var t=this.projection;if(t){if(e._dirty){Nr.set(e.xmax,e.ymin),Dr.set(e.xmin,e.ymax),Fr[0]=Nr,Fr[1]=Dr;var n=t.projectCoords(Fr),r=n[0],i=n[1];e.pxmin=Math.min(r.x,i.x),e.pymin=Math.min(r.y,i.y),e.pxmax=Math.max(r.x,i.x),e.pymax=Math.max(r.y,i.y)}delete e._dirty}else e.pxmin=e.xmin,e.pxmax=e.xmax,e.pymin=e.ymin,e.pymax=e.ymax}else e&&(e.pxmin=e.pxmax=e.pymin=e.pymax=null)},e}();Pr=new Br(0,0,0,0);var Zr=function(e){function t(t,n,r,i){var o;return(o=e.call(this,t,n,r,i)||this)._clazz=xe,o}return Ae(t,e),t}(Br),zr=function(){function e(e){this.matrix=e}var t=e.prototype;return t.transform=function(e,t,n){var r=this.matrix[0]*(e.x-this.matrix[2])/t,i=-this.matrix[1]*(e.y-this.matrix[3])/t;return n?(n.x=r,n.y=i,n):new xe(r,i)},t.untransform=function(e,t,n){var r=e.x*t/this.matrix[0]+this.matrix[2],i=e.y*t/-this.matrix[1]+this.matrix[3];return n?(n.x=r,n.y=i,n):new Sr(r,i)},e}(),Ur={project:function(){},unproject:function(){},projectCoords:function(e,t){var n=this;if(!e)return[];if(!Array.isArray(e))return this.project(e);if(0===e.length)return[];if(!this.isSphere())return Re(e,this.project,this);if(Array.isArray(e[0]))return e.map((function(e){return n.projectCoords(e,t)}));for(var r,i,o,a,s,l,c=!1!==t,u=this.getCircum(),d=this.getSphereExtent(),f=d.sx,h=d.sy,p=e[0],g=[this.project(p)],m=1,v=e.length;m180&&c&&(void 0===r&&(r=o.x>p.x),r&&(l._add(-u.x*Le(a)*f,0),o._add(-360*Le(a),0))),Math.abs(s)>90&&c&&(void 0===i&&(i=o.yt.x?1:-1,this.extent.sy=e.y>t.y?1:-1}return this.extent}},Hr={measureLength:function(e,t){if(!Array.isArray(e))return this.measureLenBetween(e,t);for(var n=0,r=0,i=e.length;r0?1:-1))/Math.PI,-90,90)}else i=e.y;if(0!==t){var s=Math.abs(t),l=D(e.x);r=Fe(180*(l+=2*Math.sqrt(Math.pow(Math.sin(s/(2*this.radius)),2)/Math.pow(Math.cos(o),2))*(t>0?1:-1))/Math.PI,-180,180)}else r=e.x;return e.x=r,e.y=i,e},t.rotate=function(e,t,n){return e=new Sr(e),this._rotate(e,t,n)},t._rotate=function(e,t,n){var r=function(e,t,n){void 0===n&&(n={});var r;r=n.final?Gr(t,e):Gr(e,t);return r>180?-(360-r):r}(t,e),i=r-n,o=this.measureLenBetween(t,e);return e.x=t.x,e.y=t.y,function(e,t,n,r){var i=t/r,o=e.x*Math.PI/180,a=D(e.y),s=D(n),l=i*Math.cos(s),c=a+l;Math.abs(c)>Math.PI/2&&(c=c>0?Math.PI-c:-Math.PI-c);var u=Math.log(Math.tan(c/2+Math.PI/4)/Math.tan(a/2+Math.PI/4)),d=Math.abs(u)>1e-11?l/u:Math.cos(a),f=i*Math.sin(s)/d,h=o+f;return e.x=(180*h/Math.PI+540)%360-180,e.y=180*c/Math.PI,e}(e,o,i,this.radius)},e}();function Gr(e,t){var n=D(e.y),r=D(t.y),i=D(t.x-e.x);i>Math.PI&&(i-=2*Math.PI),i<-Math.PI&&(i+=2*Math.PI);var o=Math.log(Math.tan(r/2+Math.PI/4)/Math.tan(n/2+Math.PI/4));return(F(Math.atan2(i,o))+360)%360}var Kr=C({measure:"EPSG:4326",sphere:new Wr(6378137),measureLenBetween:function(){return this.sphere.measureLenBetween.apply(this.sphere,arguments)},measureArea:function(){return this.sphere.measureArea.apply(this.sphere,arguments)},_locate:function(){return this.sphere._locate.apply(this.sphere,arguments)},locate:function(){return this.sphere.locate.apply(this.sphere,arguments)},_rotate:function(){return this.sphere._rotate.apply(this.sphere,arguments)},rotate:function(){return this.sphere.rotate.apply(this.sphere,arguments)}},Hr),qr=C({measure:"BAIDU",sphere:new Wr(6370996.81),measureLenBetween:function(){return this.sphere.measureLenBetween.apply(this.sphere,arguments)},measureArea:function(){return this.sphere.measureArea.apply(this.sphere,arguments)},_locate:function(){return this.sphere._locate.apply(this.sphere,arguments)},locate:function(){return this.sphere.locate.apply(this.sphere,arguments)},_rotate:function(){return this.sphere._rotate.apply(this.sphere,arguments)},rotate:function(){return this.sphere.rotate.apply(this.sphere,arguments)}},Hr),Yr=Kr,Xr={};function $r(e){Xr[e.measure]=e}$r(Vr),$r(Kr),$r(qr);var Qr={getInstance:function(e){if(!e)return Yr;for(var t in Xr)if(L(Xr,t)){var n=Xr[t].measure;if(!n)continue;if(e.toLowerCase()===n.toLowerCase())return Xr[t]}return null}},Jr=C({},Ur,{code:"EPSG:3857",rad:Math.PI/180,metersPerDegree:6378137*Math.PI/180,maxLatitude:85.0511287798,project:function(e,t){var n=this.rad,r=this.metersPerDegree,i=this.maxLatitude,o=e.x,a=Math.max(Math.min(i,e.y),-i),s=o*r,l=(0===a?0:Math.log(Math.tan((90+a)*n/2))/n)*r;return t?(t.x=s,t.y=l,t):new Sr(s,l)},unproject:function(e,t){var n,r=this.rad,i=this.metersPerDegree,o=e.x/i,a=e.y;0===a?n=0:(n=a/i,n=(2*Math.atan(Math.exp(n*r))-Math.PI/2)/r),Math.abs(Math.abs(o)-180)<1e-7&&(o=180*Le(o)),Math.abs(Math.abs(n)-this.maxLatitude)<1e-7&&(n=Le(n)*this.maxLatitude);var s=Fe(o,-180,180),l=Fe(n,-this.maxLatitude,this.maxLatitude);return t?(t.x=s,t.y=l,t):new Sr(s,l)}},Kr),ei=C({},Ur,{code:"EPSG:4326",project:function(e,t){return t?(t.x=e.x,t.y=e.y,t):new Sr(e)},unproject:function(e,t){return t?(t.x=e.x,t.y=e.y,t):new Sr(e)}},Kr),ti=C({},ei,{code:"EPSG:4490"}),ni=C({},Ur,{code:"BAIDU",project:function(e,t){return this.convertLL2MC(e,t)},unproject:function(e,t){return this.convertMC2LL(e,t)}},qr,{EARTHRADIUS:6370996.81,MCBAND:[12890594.86,8362377.87,5591021,3481989.83,1678043.12,0],LLBAND:[75,60,45,30,15,0],MC2LL:[[1.410526172116255e-8,898305509648872e-20,-1.9939833816331,200.9824383106796,-187.2403703815547,91.6087516669843,-23.38765649603339,2.57121317296198,-.03801003308653,17337981.2],[-7.435856389565537e-9,8983055097726239e-21,-.78625201886289,96.32687599759846,-1.85204757529826,-59.36935905485877,47.40033549296737,-16.50741931063887,2.28786674699375,10260144.86],[-3.030883460898826e-8,898305509983578e-20,.30071316287616,59.74293618442277,7.357984074871,-25.38371002664745,13.45380521110908,-3.29883767235584,.32710905363475,6856817.37],[-1.981981304930552e-8,8983055099779535e-21,.03278182852591,40.31678527705744,.65659298677277,-4.44255534477492,.85341911805263,.12923347998204,-.04625736007561,4482777.06],[3.09191371068437e-9,8983055096812155e-21,6995724062e-14,23.10934304144901,-.00023663490511,-.6321817810242,-.00663494467273,.03430082397953,-.00466043876332,2555164.4],[2.890871144776878e-9,8983055095805407e-21,-3.068298e-8,7.47137025468032,-353937994e-14,-.02145144861037,-1234426596e-14,.00010322952773,-323890364e-14,826088.5]],LL2MC:[[-.0015702102444,111320.7020616939,0x60e374c3105a3,-0x24bb4115e2e164,0x5cc55543bb0ae8,-0x7ce070193f3784,0x5e7ca61ddf8150,-0x261a578d8b24d0,0x665d60f3742ca,82.5],[.0008277824516172526,111320.7020463578,647795574.6671607,-4082003173.641316,10774905663.51142,-15171875531.51559,12053065338.62167,-5124939663.577472,913311935.9512032,67.5],[.00337398766765,111320.7020202162,4481351.045890365,-23393751.19931662,79682215.47186455,-115964993.2797253,97236711.15602145,-43661946.33752821,8477230.501135234,52.5],[.00220636496208,111320.7020209128,51751.86112841131,3796837.749470245,992013.7397791013,-1221952.21711287,1340652.697009075,-620943.6990984312,144416.9293806241,37.5],[-.0003441963504368392,111320.7020576856,278.2353980772752,2485758.690035394,6070.750963243378,54821.18345352118,9540.606633304236,-2710.55326746645,1405.483844121726,22.5],[-.0003218135878613132,111320.7020701615,.00369383431289,823725.6402795718,.46104986909093,2351.343141331292,1.58060784298199,8.77738589078284,.37238884252424,7.45]],convertMC2LL:function(e,t){for(var n,r=0,i=this.MCBAND.length;r=this.MCBAND[r]){n=this.MC2LL[r];break}return this.convertor(e,n,t)},convertLL2MC:function(e,t){var n,r,i;e.x=this.getLoop(e.x,-180,180),e.y=this.getRange(e.y,-74,74);var o=new Sr(e.x,e.y);for(r=0,i=this.LLBAND.length;r=this.LLBAND[r]){n=this.LL2MC[r];break}if(!n)for(r=this.LLBAND.length-1;r>=0;r--)if(o.y<=-this.LLBAND[r]){n=this.LL2MC[r];break}return this.convertor(e,n,t)},convertor:function(e,t,n){if(!e||!t)return null;var r=t[0]+t[1]*Math.abs(e.x),i=Math.abs(e.y)/t[9],o=t[2]+t[3]*i+t[4]*i*i+t[5]*i*i*i+t[6]*i*i*i*i+t[7]*i*i*i*i*i+t[8]*i*i*i*i*i*i;return r*=e.x<0?-1:1,o*=e.y<0?-1:1,n?(n.x=r,n.y=o,n):new Sr(r,o)},toRadians:function(e){return Math.PI*e/180},toDegrees:function(e){return 180*e/Math.PI},getRange:function(e,t,n){return null!=t&&(e=Math.max(e,t)),null!=n&&(e=Math.min(e,n)),e},getLoop:function(e,t,n){if(e===1/0)return n;if(e===-1/0)return t;for(;e>n;)e-=n-t;for(;e=this._limit},t.getMessage=function(){return{messageType:"batch",messages:this._messages}},e}(),mi=function(){function e(){this.active={},this.workerCount="undefined"!==typeof window?window.MAPTALKS_WORKER_COUNT||pi:0,this._messages=[],this._messageBuffers=[]}var t=e.prototype;return t.acquire=function(e){if(!this.workers){this.workers=[];for(var t=di(),n=0;n"===n.type?this.actorId===n.actorId&&this[n.command](n.params,(function(e,r,i){var o={type:"",callback:n.callback};e?o.error=e.message:o.data=r,t.post(o,i||yi,n.workerId)})):i&&n.error?i(n.error):i&&i(null,n.data)},t.remove=function(){var e=this;this.workers.forEach((function(t){t.removeEventListener("message",e.receiveFn,!1)})),this.workerPool.release(this.actorId),delete this.receiveFn,delete this.workers,delete this.callbacks,delete this.workerPool},t.post=function(e,t,n){return("number"!==typeof n||isNaN(n))&&(n=this.currentActor=(this.currentActor+1)%this.workerPool.workerCount),e.workerId=n,e.workerKey=this.workerKey,e.actorId=this.actorId,this.workerPool.addMessage(n,e,t||yi),n},t.getDedicatedWorker=function(){return Ai=(Ai+1)%this.workerPool.workerCount},e}();var _i="core-fetch-image",wi=[],xi=function(e){function t(){return e.call(this,_i)||this}return Ae(t,e),t.prototype.fetchImage=function(e,t){var n={url:e};this.send(n,wi,t)},t}(bi),Ei=function(e){function t(t){var n;return(n=e.call(this)||this).layer=t,n._painted=!1,n._drawTime=0,!ve.decodeImageInWorker||"gl"!==t.options.renderer&&ve.safari||(n._resWorkerConn=new xi),n.setToRedraw(),n}Ae(t,e);var n=t.prototype;return n.render=function(e){this.prepareRender(),this.getMap()&&this.layer.isVisible()&&(this.resources||(this.resources=new Si),this.checkAndDraw(this._tryToDraw,e))},n.checkAndDraw=function(e){var t=this;this._toRedraw=!1;for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i0?(this._loadingResource=!0,this.loadResources(o).then((function(){t._loadingResource=!1,t.layer&&(t.layer.fire("resourceload"),t.setToRedraw())}))):e.call.apply(e,[this].concat(r))}else e.call.apply(e,[this].concat(r))},n.testIfNeedRedraw=function(){var e=this.getMap();return!this._loadingResource&&(!!this._toRedraw||!(e.isInteracting()&&!this.drawOnInteracting)&&!!this.needToRedraw())},n.needToRedraw=function(){var e=this.getMap();return!(!e.isInteracting()&&!e.getRenderer().isViewChanged())&&!(!e.getPitch()&&e.isMoving()&&!e.isZooming()&&!e.isRotating()&&!this.layer.options.forceRenderOnMoving)},n.onSkipDrawOnInteracting=function(){},n.isLoadingResource=function(){return this._loadingResource},n.isRenderComplete=function(){return!!this._renderComplete},n.mustRenderOnInteracting=function(){return!this._painted},n.setToRedraw=function(){return this._toRedraw=!0,this},n.setCanvasUpdated=function(){return this._canvasUpdated=!0,this},n.isCanvasUpdated=function(){return!!this._canvasUpdated},n.remove=function(){this.onRemove(),delete this._loadingResource,delete this.southWest,delete this.canvas,delete this.context,delete this.canvasExtent2D,delete this._extent2D,this.resources&&this.resources.remove(),delete this.resources,delete this.layer},n.onRemove=function(){},n.onAdd=function(){},n.getMap=function(){return this.layer?this.layer.getMap():null},n.getCanvasImage=function(){var e=this.getMap();if(this._canvasUpdated=!1,this._renderZoom!==e.getZoom()||!this.canvas||!this._extent2D)return null;if(this.isBlank())return null;if(this.layer.isEmpty&&this.layer.isEmpty())return null;var t=e._pointToContainerPoint(this.southWest)._add(0,-e.height);return{image:this.canvas,layer:this.layer,point:t}},n.clear=function(){this.clearCanvas()},n.isBlank=function(){return!this._painted},n.show=function(){this.setToRedraw()},n.hide=function(){this.clear(),this.setToRedraw()},n.setZIndex=function(){this.setToRedraw()},n.hitDetect=function(e){if(!this.context||this.layer.isEmpty&&this.layer.isEmpty()||this.isBlank()||this._errorThrown||this.layer.isVisible&&!this.layer.isVisible())return!1;var t=this.getMap(),n=t.getDevicePixelRatio(),r=t.getSize();if(e.x<0||e.x>r.width*n||e.y<0||e.y>r.height*n)return!1;var i=this.getImageData&&this.getImageData();if(i){var o=Math.round(n*e.x),a=Math.round(n*e.y)*i.width*4+4*o;return i.data[a+3]>0}try{if(this.context.getImageData(n*e.x,n*e.y,1,1).data[3]>0)return!0}catch(s){return this._errorThrown||(console&&console.warn("hit detect failed with tainted canvas, some geometries have external resources in another domain:\n",s),this._errorThrown=!0),!1}return!1},n.loadResources=function(e){this.resources||(this.resources=new Si);var t=this.resources,n=[];if(Be(e))for(var r={},i=e.length-1;i>=0;i--){var o=e[i];o&&o.length&&!r[o.join("-")]&&(r[o.join("-")]=1,t.isResourceLoaded(o,!0)||n.push(new dr(this._promiseResource(o))))}return dr.all(n)},n.prepareRender=function(){delete this._renderComplete;var e=this.getMap();this._renderZoom=e.getZoom(),this.canvasExtent2D=this._extent2D=e._get2DExtent(),this.southWest=e._containerPointToPoint(new xe(0,e.height))},n.createCanvas=function(){if(!this.canvas){var e=this.getMap(),t=e.getSize(),n=e.getDevicePixelRatio(),r=Math.round(n*t.width),i=Math.round(n*t.height);if(this.layer._canvas){var o=this.layer._canvas;o.width=r,o.height=i,o.style&&(o.style.width=t.width+"px",o.style.height=t.height+"px"),this.canvas=this.layer._canvas}else this.canvas=ar.createCanvas(r,i,e.CanvasClass);this.onCanvasCreate()}},n.onCanvasCreate=function(){},n.createContext=function(){if(!(this.gl&&this.gl.canvas===this.canvas||this.context)&&(this.context=ar.getCanvas2DContext(this.canvas),this.context)){this.layer.options.globalCompositeOperation&&(this.context.globalCompositeOperation=this.layer.options.globalCompositeOperation);var e=this.getMap().getDevicePixelRatio();1!==e&&this.context.scale(e,e)}},n.resetCanvasTransform=function(){if(this.context){var e=this.getMap().getDevicePixelRatio();this.context.setTransform(e,0,0,e,0,0)}},n.resizeCanvas=function(e){var t=this.canvas;if(t){var n=e||this.getMap().getSize(),r=this.getMap().getDevicePixelRatio(),i=at(n,r),o=i.width,a=i.height,s=i.cssWidth,l=i.cssHeight;!this.layer._canvas||t.style.width===s&&t.style.height===l||(t.style.width=s,t.style.height=l),t.width===o&&t.height===a||(t.height=a,t.width=o,1!==r&&this.context&&this.context.scale(r,r))}},n.clearCanvas=function(){if(this.context&&this.getMap()){var e=1/this.getMap().getDevicePixelRatio(),t=this.canvas.width*e,n=this.canvas.height*e;ar.clearRect(this.context,0,0,Math.max(t,this.canvas.width),Math.max(n,this.canvas.height))}},n.prepareCanvas=function(){this.canvas?(this.resetCanvasTransform(),this.clearCanvas(),this.resizeCanvas()):(this.createCanvas(),this.createContext(),this.layer.onCanvasCreate(),this.layer.fire("canvascreate",{context:this.context,gl:this.gl})),delete this._maskExtent;var e=this.layer.getMask();if(!e)return this.layer.fire("renderstart",{context:this.context,gl:this.gl}),null;var t=this._maskExtent=e._getMaskPainter().get2DExtent();return t.intersects(this._extent2D),this.layer.fire("renderstart",{context:this.context,gl:this.gl}),t},n.clipCanvas=function(e){var t=this.layer.getMask();if(!t)return!1;var n=this.southWest,r=this.getMap();this.southWest=r._containerPointToPoint(new xe(0,r.height)),e.save();var i=r.getDevicePixelRatio();if(1!==i&&(e.save(),e.scale(i,i)),t.getGeometries){e.isMultiClip=!0;var o=t.getGeometries()||[];e.beginPath(),o.forEach((function(t){t._getMaskPainter().paint(null,e)})),e.stroke(),delete e.isMultiClip}else{t._getMaskPainter().paint(null,e)}return 1!==i&&e.restore(),e.clip(),this.southWest=n,!0},n.getViewExtent=function(){return{extent:this._extent2D,maskExtent:this._maskExtent,zoom:this._renderZoom,southWest:this.southWest}},n.completeRender=function(){this.getMap()&&(this._renderComplete=!0,this.layer.fire("renderend",{context:this.context,gl:this.gl}),this.setCanvasUpdated())},n.getEvents=function(){return{_zoomstart:this.onZoomStart,_zooming:this.onZooming,_zoomend:this.onZoomEnd,_resize:this.onResize,_movestart:this.onMoveStart,_moving:this.onMoving,_moveend:this.onMoveEnd,_dragrotatestart:this.onDragRotateStart,_dragrotating:this.onDragRotating,_dragrotateend:this.onDragRotateEnd,_spatialreferencechange:this.onSpatialReferenceChange}},n.onZoomStart=function(){},n.onZoomEnd=function(){this.setToRedraw()},n.onZooming=function(){},n.onMoveStart=function(){},n.onMoving=function(){},n.onMoveEnd=function(){this.setToRedraw()},n.onResize=function(){delete this._extent2D,this.resizeCanvas(),this.setToRedraw()},n.onDragRotateStart=function(){},n.onDragRotating=function(){},n.onDragRotateEnd=function(){this.setToRedraw()},n.onSpatialReferenceChange=function(){},n.getDrawTime=function(){return this._drawTime},n._tryToDraw=function(e){this._toRedraw=!1,!this.canvas&&this.layer.isEmpty&&this.layer.isEmpty()?this._renderComplete=!0:this._drawAndRecord(e)},n._drawAndRecord=function(e){if(this.getMap()){var t=this._painted;this._painted=!0;var n=S();this.draw(e),n=S()-n,this._drawTime=t?n:n/2,t&&this.layer&&this.layer.options.logDrawTime&&console.log(this.layer.getId(),"frameTimeStamp:",e,"drawTime:",this._drawTime)}},n._promiseResource=function(e){var t=this,n=this.resources,r=this.layer.options.crossOrigin,i=this.layer.options.renderer||"";return function(o){if(n.isResourceLoaded(e,!0))o(e);else if(!Ee(e[0])&&t._resWorkerConn){var a=rt(e[0]);t._resWorkerConn.fetchImage(a,(function(n,r){if(n)return n&&"undefined"!==typeof console&&console.warn(n),void o(e);nt(r,(function(n){t._cacheResource(e,n),o(e)}))}))}else{var s=new Image;P(r)?"canvas"!==i&&(s.crossOrigin=""):s.crossOrigin=r,Ee(e[0])&&!j&&(e[1]&&(e[1]*=2),e[2]&&(e[2]*=2)),s.onload=function(){t._cacheResource(e,s),o(e)},s.onabort=function(t){console&&console.warn("image loading aborted: "+e[0]),t&&console&&console.warn(t),o(e)},s.onerror=function(t){t&&"undefined"!==typeof console&&console.warn(t),n.markErrorResource(e),o(e)},Se(s,e)}}},n._cacheResource=function(e,t){if(this.layer&&this.resources){var n=e[1],r=e[2];if(this.layer.options.cacheSvgOnCanvas&&1===Ee(e[0])&&(ve.edge||ve.ie)){P(n)&&(n=t.width||this.layer.options.defaultIconSize[0]),P(r)&&(r=t.height||this.layer.options.defaultIconSize[1]);var i=ar.createCanvas(n,r);ar.image(i.getContext("2d"),t,0,0,n,r),t=i}this.resources.addResource(e,t)}},t}(gr),Si=function(){function e(){this.resources={},this._errors={}}var t=e.prototype;return t.addResource=function(e,t){var n=this;if(this.resources[e[0]]={image:t,width:+e[1],height:+e[2],refCnt:0},t&&!t.close&&ve.imageBitMap&&!ve.safari){if(t.src&&Ee(t.src))return;createImageBitmap(t).then((function(t){n.resources[e[0]]&&(n.resources[e[0]].image=t)}))}},t.isResourceLoaded=function(e,t){if(!e)return!1;var n=this._getImgUrl(e);if(this._errors[n])return!0;var r=this.resources[n];return!!r&&!(t&&Ee(e[0])&&(+e[1]>r.width||+e[2]>r.height))},t.login=function(e){var t=this.resources[e];t&&t.refCnt++},t.logout=function(e){var t=this.resources[e];t&&t.refCnt--<=0&&delete this.resources[e]},t.getImage=function(e){var t=this._getImgUrl(e);return!this.isResourceLoaded(e)||this._errors[t]?null:this.resources[t].image},t.markErrorResource=function(e){this._errors[this._getImgUrl(e)]=1},t.merge=function(e){if(!e)return this;for(var t in e.resources){var n=e.resources[t];this.addResource([t,n.width,n.height],n.image)}return this},t.forEach=function(e){if(!this.resources)return this;for(var t in this.resources)L(this.resources,t)&&e(t,this.resources[t]);return this},t._getImgUrl=function(e){return Array.isArray(e)?e[0]:e},t.remove=function(){for(var e in this.resources){var t=this.resources[e];t&&t.image&&t.image.close&&t.image.close()}this.resources={}},e}();!function(){var e;ve.decodeImageInWorker&&(e=function(){return"\nfunction (exports) {\n exports.onmessage = function (msg, postResponse) {\n var url = msg.data.url;\n var fetchOptions = msg.data.fetchOptions;\n requestImageOffscreen(url, function (err, data) {\n var buffers = [];\n if (data && data.data && data.data.buffer) {\n buffers.push(data.data.buffer);\n }\n postResponse(err, data, buffers);\n }, fetchOptions);\n };\n\n var offCanvas, offCtx;\n function requestImageOffscreen(url, cb, fetchOptions) {\n if (!offCanvas) {\n offCanvas = new OffscreenCanvas(2, 2);\n offCtx = offCanvas.getContext('2d',{willReadFrequently: true });\n }\n fetch(url, fetchOptions ? fetchOptions : {})\n .then(response => response.blob())\n .then(blob => createImageBitmap(blob))\n .then(bitmap => {\n var { width, height } = bitmap;\n offCanvas.width = width;\n offCanvas.height = height;\n offCtx.drawImage(bitmap, 0, 0);\n bitmap.close();\n var imgData = offCtx.getImageData(0, 0, width, height);\n // debugger\n cb(null, { width, height, data: new Uint8Array(imgData.data) });\n }).catch(err => {\n console.warn('error when loading tile:', url);\n console.warn(err);\n cb(err);\n });\n }\n}"},si[_i]=e)}();var Ci={markerWidth:10,markerHeight:10,markerLineWidth:1};var Pi=new xe(0,0);function Ti(e,t,n,r,i,o,a){var s=Pi.set(t,n),l=e.set(s.x,s.y,s.x+o,s.y+a);return l._add(i),r&&function(e,t){var n=e.xmin,r=e.ymin,i=e.xmax,o=e.ymax;Di.set(n,r,i,o),Di.convertTo((function(e){return e._rotate(t)}),e)}(l,r),l}var ki=[];function Mi(e,t,n){var r=Li(t,(n=n||Ni(ki,t))[0],n[1]);return Ti(e,t.markerDx||0,t.markerDy||0,Fi(t),r,n[0],n[1])}function Oi(e){return"rectangle"===e?"right":"middle"}function Ri(e){return"bar"===e||"pie"===e||"pin"===e?"top":"rectangle"===e?"bottom":"middle"}var Ii=new Kt(0,0);function Li(e,t,n){var r=2*(e.shadowBlur||0)+.5;Ii.width=t,Ii.height=n;var i=e.markerType,o=an(Ii,e.markerHorizontalAlignment||Oi(i),e.markerVerticalAlignment||Ri(i));return o.x!==-t/2&&(o.x-=Le(o.x+t/2)*r),o.y!==-n/2&&(o.y-=Le(o.y+n/2)*r),o}function Ni(e,t){var n=Ie(t.markerWidth,Ci.markerWidth),r=Ie(t.markerHeight,Ci.markerHeight),i=Ie(t.markerLineWidth,Ci.markerLineWidth),o=2*((t.shadowBlur||0)+Math.max(Math.abs(t.shadowOffsetX||0)+Math.abs(t.shadowOffsetY||0))),a=Math.round(n+i+o+1),s=Math.round(r+i+o+1);return e[0]=a,e[1]=s,e}var Di=new Zr;function Fi(e,t){void 0===t&&(t="markerRotation");var n=e[t];return T(n)?-n*Math.PI/180:0}function ji(e,t,n){var r=t.markerFile,i=n?n.getImage(r):null,o=t.markerWidth||(i?i.width:0),a=t.markerHeight||(i?i.height:0);Ii.width=o,Ii.height=a;var s=an(Ii,t.markerHorizontalAlignment||"middle",t.markerVerticalAlignment||"top");return Ti(e,t.markerDx||0,t.markerDy||0,Fi(t),s,o,a)}function Bi(e,t,n){var r=n.size,i=an(r,t.textHorizontalAlignment,t.textVerticalAlignment);if(t.textHaloRadius){var o=t.textHaloRadius;r=r.add(2*o,2*o)}return Ti(e,t.textDx||0,t.textDy||0,Fi(t,"textRotation"),i,r.width,r.height)}var Zi=new Zr;function zi(e,t,n,r){var i=e||new Zr;if(Array.isArray(t)){for(var o=t,a=0;at.getMax().x&&(n|=2),e.yt.getMax().y&&(n|=8),n}function eo(e,t,n,r){e=new xe(e);var i,o,a,s=Math.abs(n.x-t.x),l=Math.abs(n.y-t.y),c=Math.sqrt(Math.abs(s*s-l*l));return s>=l?(i=new xe(t.x-c,t.y),o=new xe(t.x+c,t.y),a=2*s):(i=new xe(t.x,t.y-c),o=new xe(t.x,t.y+c),a=2*l),e.distanceTo(i)+e.distanceTo(o)<=a+2*r}var to=function(){function e(){}var t=e.prototype;return t.getMap=function(){return this.geometry.getMap()},t.getPainter=function(){return this.painter},t.isDynamicSize=function(){return!1},e.testColor=function(e){return!(!e||!O(e))&&x.indexOf(e)>=0},e}(),no=function(e){function t(){return e.apply(this,arguments)||this}Ae(t,e);var n=t.prototype;return n._prepareContext=function(e){if(yt(this.symbol.opacity)?this._opacityFn||(this._opacityFn=_t(this.symbol.opacity)):delete this._opacityFn,T(this.symbol.opacity))e.globalAlpha!==this.symbol.opacity&&(e.globalAlpha=this.symbol.opacity);else if(this._opacityFn){var t=this.getMap();e.globalAlpha=this._opacityFn(t.getZoom())}else 1!==e.globalAlpha&&(e.globalAlpha=1)},n.prepareCanvas=function(e,t,n){e.setLineDash&&Be(t.lineDasharray)&&e.setLineDash(t.lineDasharray);var r=this.getPainter().isHitTesting();ar.prepareCanvas(e,t,n,r)},n.remove=function(){},n.setZIndex=function(){},n.show=function(){},n.hide=function(){},n._defineStyle=function(e){return Zt(e,this.geometry)},t}(to);function ro(e,t,n,r){var i,o=io(n),a=n,s=a.markerType.toLowerCase(),l=oo(s,a.markerWidth,a.markerHeight),c=o.lineOpacity,u=o.polygonOpacity;dn(o.polygonFill)&&(dn(o.polygonFill)&&(i||(i=function(e,t,n){var r=new Zr;return r._combine(e),r.xmin+=-t/2,r.ymin+=-n/2,r.xmax+=t/2,r.ymax+=n/2,r}(t,a.markerWidth,a.markerHeight)),o.polygonGradientExtent=i));ar.prepareCanvas(e,o,r);var d=a.markerWidth,f=a.markerHeight,h=a.markerLineWidth/2;if("ellipse"===s)ar.ellipse(e,t,d/2,f/2,f/2,c,u);else if("cross"===s||"x"===s){for(var p=l.length-1;p>=0;p--)l[p]._add(t);ar.path(e,l.slice(0,2),c),ar.path(e,l.slice(2,4),c)}else if("diamond"===s||"bar"===s||"square"===s||"rectangle"===s||"triangle"===s){"bar"===s?t=t.add(0,-h):"rectangle"===s&&(t=t.add(h,h));for(var g=l.length-1;g>=0;g--)l[g]._add(t);ar.polygon(e,l,c,u)}else if("pin"===s){t=t.add(0,-h);for(var m=l.length-1;m>=0;m--)l[m]._add(t);var v=e.lineCap;e.lineCap="round",ar.bezierCurveAndFill(e,l,c,u),e.lineCap=v}else{if("pie"!==s)throw new Error("unsupported markerType: "+s);t=t.add(0,-h);var A=180*Math.atan(d/2/f)/Math.PI,y=e.lineCap;e.lineCap="round",ar.sector(e,t,f,[90-A,90+A],c,u),e.lineCap=y}return e.canvas}function io(e){var t={lineColor:e.markerLineColor,linePatternFile:e.markerLinePatternFile,lineWidth:e.markerLineWidth,lineOpacity:e.markerLineOpacity,lineDasharray:e.markerLineDasharray,lineCap:"butt",lineJoin:"round",polygonFill:e.markerFill,polygonPatternFile:e.markerFillPatternFile,polygonOpacity:e.markerFillOpacity};return 0===t.lineWidth&&(t.lineOpacity=0),t}function oo(e,t,n){var r,i,o,a,s=n/2,l=t/2;if("triangle"===e)return[r=new xe(0,0-s),i=new xe(0-l,0+s),o=new xe(0+l,0+s)];if("cross"===e)return[r=new xe(0-l,0),i=new xe(0+l,0),o=new xe(0,0-s),a=new xe(0,0+s)];if("diamond"===e)return[r=new xe(0-l,0),i=new xe(0,0-s),o=new xe(0+l,0),a=new xe(0,0+s)];if("square"===e)return[r=new xe(0-l,0+s),i=new xe(0+l,0+s),o=new xe(0+l,0-s),a=new xe(0-l,0-s)];if("rectangle"===e)return i=(r=new xe(0,0)).add(t,0),o=r.add(t,n),a=r.add(0,n),[r,i,o,a];if("x"===e)return[r=new xe(0-l,0+s),i=new xe(0+l,0-s),o=new xe(0+l,0+s),a=new xe(0-l,0-s)];if("bar"===e)return[r=new xe(0-l,0-n),i=new xe(0+l,0-n),o=new xe(0+l,0),a=new xe(0-l,0)];if("pin"===e||"pie"===e){var c=n*Math.atan(l/s);return[r=new xe(0,0),i=new xe(0-c,0-n),o=new xe(0+c,0-n),a=new xe(0,0)]}return[]}var ao,so=new xe(0,0),lo=new xe(0,0),co=new xe(0,0),uo=new xe(0,0),fo=function(e){function t(t,n,r){var i;return(i=e.call(this)||this).symbol=t,i.geometry=n,i.painter=r,i}Ae(t,e);var n=t.prototype;return n.get2DExtent=function(){for(var e=this.getMap(),t=e.getGLRes(),n=new Zr,r=this._getRenderPoints()[0],i=r.length-1;i>=0;i--)r[i]&&n._combine(e._pointAtResToPoint(r[i],t));return n},n.isDynamicSize=function(){var e=this.symbol;return yt(e.markerWidth)||yt(e.markerHeight)||yt(e.textSize)},n._rotateExtent=function(e,t){return e.convertTo((function(e){return e._rotate(t)}))},n._getRenderPoints=function(){var e=this.getPainter().isSpriting()?"center":this.getPlacement();return this.getPainter().getRenderPoints(e)},n._getRenderContainerPoints=function(e){var t=this.getPainter();if(t.isSpriting())return this._getRenderPoints()[0];var n,r=this.geometry,i=this.getDxDy();if(r._cPoint&&!e){var o=e?co:uo;o.set(r._cPoint.x,r._cPoint.y);var a=t.containerOffset;o._sub(a);var s=i.x,l=i.y;(s||l)&&o._add(s||0,l||0),n=[o]}else{var c=this._getRenderPoints()[0];n=this.painter._pointContainerPoints(c,i.x,i.y,e,!0,this.getPlacement())}if(!n||!Array.isArray(n[0]))return n;for(var u=[],d=0,f=n.length;d0&&Array.isArray(a[0][0])||"LineString"===this.geometry.type&&a.length>0&&Array.isArray(a[0]))for(var s=0;s1&&l.push.apply(l,r.slice(1)),l.push(n.lineOpacity,n.polygonOpacity,n.lineDasharray),this.geometry._paintOn.apply(this.geometry,l)}else{this.prepareCanvas(e,n,t),i&&o&&!n.lineColor.places&&this._createGradient(e,a,n.lineColor);var c=[e];c.push.apply(c,r),c.push(n.lineOpacity,n.polygonOpacity,n.lineDasharray),this.geometry._paintOn.apply(this.geometry,c)}e.setLineDash&&Array.isArray(n.lineDasharray)&&e.setLineDash([])}}},n.get2DExtent=function(){var e=this.getMap(),t=this.geometry._getPrjExtent();if(!t)return null;this._extMin&&this._extMax||(this._extMin=new Sr(0,0),this._extMax=new Sr(0,0)),this._extMin.x=t.xmin,this._extMin.y=t.ymin,this._extMax.x=t.xmax,this._extMax.y=t.ymax;var n=e._prjToPoint(this._extMin,void 0,mo),r=e._prjToPoint(this._extMax,void 0,vo);return this._pxExtent?this._pxExtent.set(Math.min(n.x,r.x),Math.min(n.y,r.y),Math.max(n.x,r.x),Math.max(n.y,r.y)):this._pxExtent=new Zr(n,r),this._pxExtent},n.getFixedExtent=function(){var e=this.style.lineWidth/2;return new Zr(-e,-e,e,e)},n._getPaintParams=function(){return this.getPainter().getPaintParams(this.style.lineDx,this.style.lineDy)},n.translate=function(){var e=this.symbol,t={lineColor:Ie(e.lineColor,"#000"),lineWidth:Ie(e.lineWidth,2),lineOpacity:Ie(e.lineOpacity,1),lineDasharray:Ie(e.lineDasharray,[]),lineCap:Ie(e.lineCap,"butt"),lineJoin:Ie(e.lineJoin,"miter"),linePatternFile:Ie(e.linePatternFile,null),lineDx:Ie(e.lineDx,0),lineDy:Ie(e.lineDy,0),polygonFill:Ie(e.polygonFill,null),polygonOpacity:Ie(e.polygonOpacity,1),polygonPatternFile:Ie(e.polygonPatternFile,null),polygonPatternDx:Ie(e.polygonPatternDx,0),polygonPatternDy:Ie(e.polygonPatternDy,0),linePatternDx:Ie(e.linePatternDx,0),linePatternDy:Ie(e.linePatternDy,0)};return 0===t.lineWidth&&(t.lineOpacity=0),"LineString"!==this.geometry.type||t.polygonFill||(t.polygonFill=t.lineColor),t},n._createGradient=function(e,t,n){if(Array.isArray(t)&&t.length){var r=t.length,i=e.createLinearGradient(t[0].x,t[0].y,t[r-1].x,t[r-1].y);n.colorStops.forEach((function(e){i.addColorStop.apply(i,e)})),e.strokeStyle=i}},t}(no),yo=function(e){function t(t,n,r){var i,o=(i=e.call(this,t,n,r)||this).translate();return i._dynamic=bt(o),i.style=i._defineStyle(o),0===i.style.textWrapWidth?ye(i):(i.strokeAndFill=i._defineStyle(i.translateLineAndFill(i.style)),i)}Ae(t,e),t.test=function(e){return Ui(e)};var n=t.prototype;return n.symbolize=function(e,t){if(this.painter.isHitTesting()||0!==this.style.textSize&&(this.style.textOpacity||this.style.textHaloRadius&&this.style.textHaloOpacity)&&0!==this.style.textWrapWidth){var n=this._getRenderContainerPoints();if(Be(n)){var r=this.style,i=this.strokeAndFill,o=rn(this.style.textName,this.geometry.getProperties());this._dynamic&&delete this._textDesc;var a=this._textDesc=this._textDesc||on(o,this.style);this._prepareContext(e),this.prepareCanvas(e,i,t),ar.prepareCanvasFont(e,r);for(var s=0,l=n.length;s0&&(!t.textWrapWidth||t.textWrapWidth>t.textMaxWidth)&&(t.textWrapWidth||(t.textMaxHeight=1),t.textWrapWidth=t.textMaxWidth),t},n.translateLineAndFill=function(e){return{lineColor:e.textHaloRadius?e.textHaloFill:e.textFill,lineWidth:e.textHaloRadius,lineOpacity:e.textOpacity,lineDasharray:null,lineCap:"butt",lineJoin:"round",polygonFill:e.textFill,polygonOpacity:e.textOpacity}},t}(fo),bo=[],_o=function(e){function t(t,n,r){var i,o=(i=e.call(this,t,n,r)||this).translate();return i._dynamic=bt(o),i.style=i._defineStyle(o),i.strokeAndFill=i._defineStyle(io(i.style)),i.padding=0,i}Ae(t,e),t.test=function(e){return Vi(e)};var n=t.prototype;return n.symbolize=function(e,t){var n=this.style;if(this.painter.isHitTesting()||0!==n.markerWidth&&0!==n.markerHeight&&(0!==n.polygonOpacity||0!==n.lineOpacity)){var r=this._getRenderContainerPoints();Be(r)&&(this._prepareContext(e),this.getPainter().isSpriting()||this.geometry.getLayer().getMask()===this.geometry||this._dynamic||!1===this.geometry.getLayer().options.cacheVectorOnCanvas?this._drawMarkers(e,r,t):this._drawMarkersWithCache(e,r,t))}},n._drawMarkers=function(e,t,n){for(var r=t.length-1;r>=0;r--){var i=t[r],o=this.getRotation()?this._rotate(e,i,this._getRotationAt(r)):null;o&&(i=o),this._drawVectorMarker(e,i,n),o&&e.restore()}},n._drawMarkersWithCache=function(e,t,n){var r=this._stampSymbol(),i=n.getImage(r);i||(i=this._createMarkerImage(e,n),n.addResource([r,i.width,i.height],i));for(var o=Li(this.style,i.width,i.height),a=t.length-1;a>=0;a--){var s=t[a],l=this.getRotation()?this._rotate(e,s,this._getRotationAt(a)):null;l&&(s=l),ar.image(e,i,s.x+o.x,s.y+o.y),l&&e.restore()}},n._createMarkerImage=function(e,t){var n=e.canvas.constructor,r=Ni(bo,this.style),i=ar.createCanvas(r[0],r[1],n),o=this._getCacheImageAnchor(r[0],r[1]),a=i.getContext("2d");return this._drawVectorMarker(a,o,t),i},n._stampSymbol=function(){return this._stamp||(this._stamp=un([this.style.markerType,dn(this.style.markerFill)?fn(this.style.markerFill):this.style.markerFill,this.style.markerFillOpacity,this.style.markerFillPatternFile,dn(this.style.markerLineColor)?fn(this.style.markerLineColor):this.style.markerLineColor,this.style.markerLineWidth,this.style.markerLineOpacity,this.style.markerLineDasharray?this.style.markerLineDasharray.join(","):"",this.style.markerLinePatternFile,this.style.markerWidth,this.style.markerHeight,this.style.markerHorizontalAlignment,this.style.markerVerticalAlignment].join("_"))),this._stamp},n._getCacheImageAnchor=function(e,t){var n=2*(this.symbol.shadowBlur||0)+this.padding,r=this.style.markerType;return"bar"===r||"pie"===r||"pin"===r?new xe(e/2,t-n):"rectangle"===r?new xe(n,n):new xe(e/2,t/2)},n._getGraidentExtent=function(e){var t=new Zr,n=this.getDxDy(),r=this.getFixedExtent();if(Array.isArray(e))for(var i=e.length-1;i>=0;i--)t._combine(e[i]);else t._combine(e);return t.xmin+=r.xmin-n.x,t.ymin+=r.ymin-n.y,t.xmax+=r.xmax-n.x,t.ymax+=r.ymax-n.y,t},n._drawVectorMarker=function(e,t,n){ro(e,t,this.style,n)},n.getFixedExtent=function(){var e=this.isDynamicSize(),t=this.style.markerWidth,n=this.style.markerHeight;return this._fixedExtent=this._fixedExtent||new Zr,Mi(this._fixedExtent,this.style,e?[128,128*(0===t?1:n/t)]:null)},n.translate=function(){var e=this.symbol,t={markerType:Ie(e.markerType,"ellipse"),markerFill:Ie(e.markerFill,"#00f"),markerFillOpacity:Ie(e.markerFillOpacity,1),markerFillPatternFile:Ie(e.markerFillPatternFile,null),markerLineColor:Ie(e.markerLineColor,"#000"),markerLineWidth:Ie(e.markerLineWidth,Ci.markerLineWidth),markerLineOpacity:Ie(e.markerLineOpacity,1),markerLineDasharray:Ie(e.markerLineDasharray,[]),markerLinePatternFile:Ie(e.markerLinePatternFile,null),markerDx:Ie(e.markerDx,0),markerDy:Ie(e.markerDy,0),markerWidth:Ie(e.markerWidth,Ci.markerWidth),markerHeight:Ie(e.markerHeight,Ci.markerHeight),markerRotation:Ie(e.markerRotation,0),shadowBlur:Ie(e.shadowBlur,0),shadowOffsetX:Ie(e.shadowOffsetX,0),shadowOffsetY:Ie(e.shadowOffsetY,0)},n=t.markerType,r=Oi(n),i=Ri(n);return t.markerHorizontalAlignment=Ie(e.markerHorizontalAlignment,r),t.markerVerticalAlignment=Ie(e.markerVerticalAlignment,i),T(e.markerOpacity)&&(T(e.markerFillOpacity)&&(t.markerFillOpacity*=e.markerOpacity),T(e.markerLineOpacity)&&(t.markerLineOpacity*=e.markerOpacity)),t},t}(fo),wo=function(e){function t(t,n,r){var i;P(t.markerWidth)&&(t.markerWidth=80),P(t.markerHeight)&&(t.markerHeight=80),t=C(t,(i=e.call(this,t,n,r)||this).translate());var o=i.style=i._defineStyle(t);return ve.gecko?i._url=[Ht(o,o.markerWidth,o.markerHeight),o.markerWidth,o.markerHeight]:i._url=[Ht(o),o.markerWidth,o.markerHeight],i}Ae(t,e),t.test=function(e){return Wi(e)};var n=t.prototype;return n._prepareContext=function(){},n._getImage=function(e){var t=this;if(e&&e.isResourceLoaded(this._url))return e.getImage(this._url);var n=this.painter,r=new Image;return r.onload=function(){var e=n.getLayer()&&n.getLayer().getRenderer();e&&e.setToRedraw()},r.onerror=function(n){n&&"undefined"!==typeof console&&console.warn(n),e.markErrorResource(t._url)},r.src=this._url[0],e&&e.addResource(this._url,r),r},t}(go),xo={lineWidth:1,polygonFill:"#fff",polygonOpacity:.5},Eo=function(e){function t(t,n,r){var i;return(i=e.call(this,t,n,r)||this).style=n.getLayer().options.drawAltitude,i.style&&M(i.style)||(i.style={lineWidth:2}),i.style.lineWidth||(i.style.lineWidth=0),i.dxdy=i._defineStyle({dx:t.textDx||t.markerDx,dy:t.textDy||t.markerDy}),i}Ae(t,e),t.test=function(e,t){if(!t.getLayer())return!1;var n=t.getJSONType();return"Marker"===n||"LineString"===n};var n=t.prototype;return n.symbolize=function(e){var t=this.geometry.getLayer();if(t.options.drawAltitude){var n=this.geometry.getProperties();if(n&&n[t.options.altitudeProperty]){var r=this._getStyle();if(this._prepareContext(e),"LineString"===this.geometry.type){var i=this._getPaintParams(r.lineDx,r.lineDy,!1,!0);if(!i)return;var o=this.getPainter().getPaintParams(r.lineDx,r.lineDy,!0,!0,"_groundpt")[0];this._drawLineAltitude(e,i[0],o)}else{var a=this._getRenderContainerPoints(),s=this._getRenderContainerPoints(!0);if(!a||0===a.length)return;this._drawMarkerAltitude(e,a[0],s[0])}}}},n.getDxDy=function(){var e=this.dxdy;return new xe(e.dx||0,e.dy||0)},n.get2DExtent=function(){return"LineString"===this.geometry.type?Ao.prototype.get2DExtent.apply(this):e.prototype.get2DExtent.call(this)},n.getPlacement=function(){return"point"},n._getPaintParams=function(e,t){return this.getPainter().getPaintParams(e||0,t||0,null,!0,"_altpt")},n._drawMarkerAltitude=function(e,t,n){var r=this._getStyle();this.prepareCanvas(e,r),ar.path(e,[t,n],r.lineOpacity,null,r.lineDasharray)},n._drawLineAltitude=function(e,t,n){var r=this._getStyle();if(t.length>0&&Array.isArray(t[0]))for(var i=0;i=0;i--)for(var o=r[i],a=n.length-1;a>=0;a--)if(n[a].test(o,this.geometry)){var s=new n[a](o,this.geometry,this);s._index=i,t.push(s),s instanceof fo&&(this._hasPoint=!0)}if(!t.length&&console){var l=this.geometry.getId();console.warn("invalid symbol for geometry("+(this.geometry?this.geometry.getType()+(l?":"+l:""):"")+") to draw : "+JSON.stringify(e))}return this._debugSymbolizer=new ho(e,this.geometry,this),t},n.hasPoint=function(){return!!this._hasPoint},n.getRenderPoints=function(e){return this._verifyProjection(),this._renderPoints||(this._renderPoints={}),e||(e="center"),this._renderPoints[e]||(this._renderPoints[e]=this.geometry._getRenderPoints(e)),this._renderPoints[e]},n.getPaintParams=function(e,t,n,r,i){void 0===i&&(i="_pt");var o,a,s,l,c,u=this.getLayer()._getRenderer().mapStateCache,d=this.getMap();u&&!this._hitPoint?(o=u.resolution,a=u.pitch,s=u.bearing,l=u.glScale,c=u.containerExtent):(o=d.getResolution(),a=d.getPitch(),s=d.getBearing(),l=d.getGLScale(),c=d.getContainerExtent());var f=this.geometry,h=o,p=0!==a,g=0!==s,m=this._cachedParams,v=f._paintAsPath&&f._paintAsPath();if(v&&this._unsimpledParams&&h<=this._unsimpledParams._res)m=this._unsimpledParams;else if(!m||m._res!==o||this._pitched!==p&&f._redrawWhenPitch()||this._rotated!==g&&f._redrawWhenRotate()){if(!(m=f._getPaintParams()))return null;m._res=h,!f._simplified&&v&&(this._unsimpledParams||(this._unsimpledParams=m),h>this._unsimpledParams._res&&(this._unsimpledParams._res=h)),this._cachedParams=m}if(!m)return null;this._pitched=p,this._rotated=g;var A=l,y=[],b=m[0],_=c,w=this._pointContainerPoints(b,e,t,n,r||this._hitPoint&&!_.contains(this._hitPoint),null,i);if(!w)return null;y.push(w);for(var x=1,E=m.length;x0&&t){var h=o.cameraLookAt,p=o.cameraPosition;Co.set(p.x,p.y),f=f._combine(Co._add(Le(h[0]-p[0]),Le(h[1]-p[1])))}var g=e;if(this.get2DExtent(null,Mo).within(f))return{points:g,altitude:t,inView:!0};var m=c._expand(s*o._glScale);ko.xmin=m.xmin,ko.xmax=m.xmax,ko.ymin=m.ymin,ko.ymax=m.ymax;var v=a.options.smoothness;if(a.getShell&&this.geometry.getHoles&&!v){var A=m.xmin,y=m.ymin,b=m.xmax,_=m.ymax,w=Math.abs(b-A),x=Math.abs(_-y),E=Math.sqrt(w*w+x*x),S=(E-w)/2,C=(E-x)/2;if(ko.xmin=m.xmin-S,ko.xmax=m.xmax+S,ko.ymin=m.ymin-C,ko.ymax=m.ymax+C,Array.isArray(e[0])){g=[];for(var P=0;P=0;d--)(c.shadowBlur||this.symbolizers[d].symbol.shadowBlur)&&this._prepareShadow(c,this.symbolizers[d].symbol),this.symbolizers[d].symbolize.apply(this.symbolizers[d],u);this._afterPaint(),this._painted=!0,(this.geometry.options.debug||r.options.debug)&&this._debugSymbolizer.symbolize.apply(this._debugSymbolizer,u)}}}}},n.getSprite=function(e,t){if("Point"!==this.geometry.type)return null;if(this._spriting=!0,!this._sprite&&this.symbolizers.length>0){var n=new Zr;this.symbolizers.forEach((function(t){var r=t.getFixedExtent(e);n._combine(r)}));var r,i=n.getMin().multi(-1),o=t||(this.getMap()?this.getMap().CanvasClass:null),a=ar.createCanvas(n.getWidth(),n.getHeight(),o);this._renderPoints&&(r=this._renderPoints);for(var s=a.getContext("2d"),l=[s,e],c=this.symbolizers.length-1;c>=0;c--){var u=this.symbolizers[c].getDxDy();this._renderPoints={center:[[i.add(u)]]},this._prepareShadow(s,this.symbolizers[c].symbol),this.symbolizers[c].symbolize.apply(this.symbolizers[c],l)}r&&(this._renderPoints=r),this._sprite={canvas:a,offset:n.getCenter()}}return this._spriting=!1,this._sprite},n.isSpriting=function(){return!!this._spriting},n.hitTest=function(e,t){if((!t||t<.5)&&(t=.5),this._hitPoint=e.sub(t,t),!ao){var n=this.getMap()?this.getMap().CanvasClass:null;ao=ar.createCanvas(1,1,n)}ar.setHitTesting(!0),ao.width=ao.height=2*t;var r=ar.getCanvas2DContext(ao);try{this.paint(null,r,this._hitPoint)}catch(Vc){throw Vc}finally{ar.setHitTesting(!1)}delete this._hitPoint;for(var i=r.getImageData(0,0,ao.width,ao.height).data,o=3,a=i.length;o0)return!0;return!1},n.isHitTesting=function(){return!!this._hitPoint},n._prepareShadow=function(e,t){t.shadowBlur?(e.shadowBlur=this.isHitTesting()?0:t.shadowBlur,e.shadowColor=t.shadowColor||"#000",e.shadowOffsetX=t.shadowOffsetX||0,e.shadowOffsetY=t.shadowOffsetY||0):e.shadowBlur&&(e.shadowBlur=null,e.shadowColor=null,e.shadowOffsetX=null,e.shadowOffsetY=null)},n._eachSymbolizer=function(e,t){if(this.symbolizers){t||(t=this);for(var n=this.symbolizers.length-1;n>=0;n--)e.apply(t,[this.symbolizers[n]])}},n.get2DExtent=function(e,t){this._verifyProjection();var n=this.getMap();e=e||this.getLayer()._getRenderer().resources;var r=n.getZoom(),i=this._isDynamicSize();if(this._extent2D&&this._extent2D._zoom===r&&this._fixedExtent||(this._extent2D&&this._extent2D._zoom!==r&&delete this._extent2D,this.symbolizers&&(this._extent2D||(this._extent2D=this._computeExtent2D(new Zr),this._extent2D._zoom=r),this._fixedExtent||(this._fixedExtent=this._computeFixedExtent(e,new Zr)))),!this._extent2D)return i&&delete this._fixedExtent,null;var o=this._fixedExtent,a=o.xmin,s=o.ymin,l=o.xmax,c=o.ymax;return i&&delete this._fixedExtent,To.set(a,-c,l,-s),t?(t.set(this._extent2D.xmin,this._extent2D.ymin,this._extent2D.xmax,this._extent2D.ymax),t._add(To),t):this._extent2D.add(To)},n._computeExtent2D=function(e){for(var t=this.symbolizers.length-1;t>=0;t--){var n=this.symbolizers[t];e._combine(n.get2DExtent())}return e},n._computeFixedExtent=function(e,t){for(var n=this.symbolizers.length-1;n>=0;n--){var r=this.symbolizers[n];r.getFixedExtent&&t._combine(r.getFixedExtent(e))}return t},n._isDynamicSize=function(){for(var e=this.symbolizers.length-1;e>=0;e--){if(this.symbolizers[e].isDynamicSize())return!0}return!1},n._aboveCamera=function(){var e=this.getMinAltitude(),t=this.getMap().getFrustumAltitude();return e&&t&&te.maxAltitude&&(e.maxAltitude=r),r}))):(this.minAltitude=this.maxAltitude=this._meterToPoint(n,t),this.minAltitude):0},n._meterToPoint=function(e,t){var n=this.getMap(),r=n.getGLRes();return n.altitudeToPoint(t,r)*Le(t)},n._verifyProjection=function(){var e=this.geometry._getProjection()||Ro;this._projCode&&this._projCode!==e.code&&this.removeCache(),this._projCode=e.code},n._beforePaint=function(){},n._afterPaint=function(){},t}(gr);function No(e,t,n){if(!Array.isArray(n))return e;for(var r=[],i=0,o=e.length;ie&&(e=n)})),e},t}(gr),jo={"EPSG:3857":{projection:"EPSG:3857",resolutions:function(){for(var e=[],t=12756274*Math.PI,n=0;n<23;n++)e[n]=t/(256*Math.pow(2,n));return e}(),fullExtent:{top:6378137*Math.PI,left:-6378137*Math.PI,bottom:-6378137*Math.PI,right:6378137*Math.PI}},"EPSG:4326":{projection:"EPSG:4326",fullExtent:{top:90,left:-180,bottom:-90,right:180},resolutions:function(){for(var e=[],t=0;t<23;t++)e[t]=180/(128*Math.pow(2,t));return e}()},BAIDU:{projection:"baidu",resolutions:function(){for(var e=Math.pow(2,18),t=[],n=0;n<23;n++)t[n]=e,e*=.5;return t}(),fullExtent:{top:33554432,left:-33554432,bottom:-33554432,right:33554432}},IDENTITY:{projection:"identity",resolutions:function(){for(var e=Math.pow(2,8),t=[],n=0;n<23;n++)t[n]=e,e*=.5;return t}(),fullExtent:{top:2e5,left:-2e5,bottom:-2e5,right:2e5}},"PRESET-VT-3857":{projection:"EPSG:3857",resolutions:function(){for(var e=[],t=6378137*Math.PI,n=0;n<23;n++)e[n]=t/(256*Math.pow(2,n));return e}(),fullExtent:{top:6378137*Math.PI,left:-6378137*Math.PI,bottom:-6378137*Math.PI,right:6378137*Math.PI}}};jo["EPSG:4490"]=jo["EPSG:4326"];var Bo=function(){function e(e){void 0===e&&(e={}),this.options=e,this._initSpatialRef()}e.getPreset=function(e){return jo[e.toUpperCase()]},e.getAllPresets=function(){return Object.keys(jo)},e.getProjectionInstance=function(e){if(!e)return null;if(M(e))return e.locate||("identity"===(e=C({},e)).measure?C(e,Qr.getInstance("IDENTITY")):C(e,Qr.getInstance("EPSG:4326"))),e;for(var t in e=(e+"").toLowerCase(),oi)if(L(oi,t)){var n=oi[t].code;if(n&&n.toLowerCase()===e)return oi[t]}return null},e.equals=function(e,t){if(O(e)||O(t))return e===t;if(!e&&!t)return!0;if(!e||!t)return!1;if(e.projection!==t.projection)return!1;var n=e.fullExtent,r=t.fullExtent;if(n&&!r||!n&&r)return!1;if(n&&r&&(n.top!==r.top||n.bottom!==r.bottom||n.left!==r.left||n.right!==r.right))return!1;var i=e.resolutions,o=t.resolutions;if(i&&o){if(i.length!==o.length)return!1;for(var a=0;a=o.left?1:-1,s=o.top>=o.bottom?-1:1;this._transformation=new zr([a,s,0,0])},t.getResolutions=function(){return this._resolutions||[]},t.getResolution=function(e){var t=0|e;t<0?t=0:t>this._resolutions.length-1&&(t=this._resolutions.length-1);var n=this._resolutions[t];return t!==e&&e>0&&t=0;e--)if(!P(this._resolutions[e]))return e;return this._resolutions.length-1},t.getZoomDirection=function(){return Le(this._resolutions[this.getMinZoom()]-this._resolutions[this.getMaxZoom()])},t.toJSON=function(){return this.json||(this.json={resolutions:this._resolutions,fullExtent:{top:this._fullExtent.top,left:this._fullExtent.left,bottom:this._fullExtent.bottom,right:this._fullExtent.right},projection:this._projection.code}),this.json},t.isPyramid=function(){return this._pyramid},e}(),Zo=new xe(0,0),zo=new Zr,Uo=function(e){function t(t){var n,r=C({},t),i=r.symbol,o=r.properties,a=r.id;return delete r.symbol,delete r.id,delete r.properties,n=e.call(this,r)||this,i?n.setSymbol(i):n._genSizeSymbol(),o&&n.setProperties(o),P(a)||n.setId(a),n}Ae(t,e);var n=t.prototype;return n.getFirstCoordinate=function(){if("GeometryCollection"===this.type){var e=this.getGeometries();return e.length?e[0].getFirstCoordinate():null}var t=this.getCoordinates();if(!Array.isArray(t))return t;do{t=t[0]}while(Array.isArray(t)&&t.length>0);return t},n.getLastCoordinate=function(){if("GeometryCollection"===this.type){var e=this.getGeometries();return e.length?e[e.length-1].getLastCoordinate():null}var t=this.getCoordinates();if(!Array.isArray(t))return t;do{t=t[t.length-1]}while(Array.isArray(t)&&t.length>0);return t},n.addTo=function(e,t){return e.addGeometry(this,t),this},n.getLayer=function(){return this._layer?this._layer:null},n.getMap=function(){return this._layer?this._layer.getMap():null},n.getId=function(){return this._id},n.setId=function(e){var t=this.getId();return this._id=e,this._fireEvent("idchange",{old:t,new:e}),this},n.getProperties=function(){return this.properties?this.properties:this._getParent()?this._getParent().getProperties():null},n.setProperties=function(e){var t=this.properties;return this.properties=M(e)?C({},e):e,this._repaint(),this._fireEvent("propertieschange",{old:t,new:e}),this},n.getType=function(){return this.type},n.getSymbol=function(){var e=this._symbol;return e?Array.isArray(e)?gn(e):C({},e):null},n.setSymbol=function(e){return this._symbolUpdated=e,this._symbol=this._prepareSymbol(e),this.onSymbolChanged(),delete this._compiledSymbol,delete this._symbolHash,this},n.getSymbolHash=function(){return this._symbolHash||(this._symbolHash=hn(this._symbolUpdated)),this._symbolHash},n.updateSymbol=function(e){if(!e)return this;var t=this._getSymbol();if(Array.isArray(t)){if(!Array.isArray(e))throw new Error("Parameter of updateSymbol is not an array.");for(var n=0;n0)return!0;return!1}return P(e.opacity)||M(e.opacity)||T(e.opacity)&&e.opacity>0},n.getZIndex=function(){return this.options.zIndex||0},n.setZIndex=function(e){var t=this.options.zIndex;return this.options.zIndex=e,this._fireEvent("zindexchange",{old:t,new:e}),this},n.setZIndexSilently=function(e){return this.options.zIndex=e,this},n.bringToFront=function(){var e=this.getLayer();if(!e||!e.getGeoMaxZIndex)return this;var t=e.getGeoMaxZIndex();return this.setZIndex(t+1),this},n.bringToBack=function(){var e=this.getLayer();if(!e||!e.getGeoMinZIndex)return this;var t=e.getGeoMinZIndex();return this.setZIndex(t-1),this},n.translate=function(e,t){if(P(e))return this;var n=new Sr(e,t);if(0===n.x&&0===n.y)return this;var r=this.getCoordinates();if(this._silence=!0,r)if(Array.isArray(r)){var i=Re(r,(function(e){return e.add(n)}));this.setCoordinates(i)}else this.setCoordinates(r.add(n));return this._silence=!1,this._fireEvent("positionchange"),this},n.flash=function(e,t,n,r){return Je.call(this,e,t,n,r)},n.copy=function(){var e=this.toJSON(),n=t.fromJSON(e);return n.options.visible=!0,n},n.remove=function(){return this.getLayer()?(this._fireEvent("removestart"),this._unbind(),this._fireEvent("removeend"),this._fireEvent("remove"),this):this},n.toGeoJSONGeometry=function(){return this._exportGeoJSONGeometry()},n.toGeoJSON=function(e){e||(e={});var t={type:"Feature",geometry:null};if(P(e.geometry)||e.geometry){var n=this._exportGeoJSONGeometry();t.geometry=n}var r,i=this.getId();return P(i)||(t.id=i),(P(e.properties)||e.properties)&&(r=this._exportProperties()),t.properties=r,t},n.toJSON=function(e){e||(e={});var t=this._toJSON(e);return C(t,this._exportGraphicOptions(e)),t},n.getLength=function(){return this._computeGeodesicLength(this._getMeasurer())},n.getArea=function(){return this._computeGeodesicArea(this._getMeasurer())},n.rotate=function(e,t){if("GeometryCollection"===this.type)return this.getGeometries().forEach((function(n){return n.rotate(e,t)})),this;t=t?new Sr(t):this.getCenter();var n=this._getMeasurer(),r=this.getCoordinates();if(!Array.isArray(r)){if(t.x!==r.x||t.y!==r.y){var i=n._rotate(r,t,e);this.setCoordinates(i)}return this}return Re(r,(function(r){return n._rotate(r,t,e)})),this.setCoordinates(r),this},n._getConnectPoints=function(){return[this.getCenter()]},n._initOptions=function(e){var t=C({},e),n=t.symbol,r=t.properties,i=t.id;delete t.symbol,delete t.id,delete t.properties,this.setOptions(t),n&&this.setSymbol(n),r&&this.setProperties(r),P(i)||this.setId(i)},n._bindLayer=function(e){if(this.getLayer())throw new Error("Geometry cannot be added to two or more layers at the same time.");this._layer=e,this._clearCache(),this._bindInfoWindow(),this._bindMenu()},n._prepareSymbol=function(e){if(Array.isArray(e)){for(var t=[],n=0;ne._maxAlt&&(e._maxAlt=n)}))):this._minAlt=this._maxAlt=t},n.getMinAltitude=function(){return void 0===this._minAlt&&this._genMinMaxAlt(),this._minAlt?this._minAlt:0},n.getMaxAltitude=function(){return void 0===this._maxAlt&&this._genMinMaxAlt(),this._maxAlt?this._maxAlt:0},t}(vr(fr(br(gr))));Uo.mergeOptions({id:null,visible:!0,interactive:!0,editable:!0,cursor:null,antiMeridian:!1,defaultProjection:"EPSG:4326"});var Ho={attribution:null,minZoom:null,maxZoom:null,visible:!0,opacity:1,globalCompositeOperation:null,renderer:"canvas",debugOutline:"#0f0",cssFilter:null,forceRenderOnMoving:!1,forceRenderOnZooming:!1,forceRenderOnRotating:!1,collision:!1,collisionScope:"layer",hitDetect:!ve.mobile},Vo=function(e){function t(t,n){var r,i;return n&&(i=n.canvas,delete n.canvas),(r=e.call(this,n)||this)._canvas=i,r.setId(t),n&&(r.setZIndex(n.zIndex),n.mask&&r.setMask(Uo.fromJSON(n.mask))),r}Ae(t,e);var n=t.prototype;return n.load=function(){if(!this.getMap())return this;if(this.onLoad()){this._initRenderer();var e=this.getZIndex();P(e)||(this._renderer.setZIndex(e),this.isCanvasRender()||this._renderer.render()),this.onLoadEnd()}return this},n.getId=function(){return this._id},n.setId=function(e){var t=this._id;return P(e)||(e+=""),this._id=e,this.fire("idchange",{old:t,new:e}),this},n.addTo=function(e){return e.addLayer(this),this},n.setZIndex=function(e){return this._zIndex=e,P(e)?delete this.options.zIndex:this.options.zIndex=e,this.map&&this.map._sortLayersByZIndex(),this._renderer&&this._renderer.setZIndex(e),this},n.getZIndex=function(){return this._zIndex||0},n.getMinZoom=function(){var e=this.getMap(),t=this.options.minZoom;return e?Math.max(e.getMinZoom(),t||0):t},n.getMaxZoom=function(){var e=this.getMap(),t=this.options.maxZoom;return e?Math.min(e.getMaxZoom(),P(t)?1/0:t):t},n.getOpacity=function(){return this.options.opacity},n.setOpacity=function(e){return this.config("opacity",e),this},n.isCanvasRender=function(){var e=this._getRenderer();return e&&e instanceof Ei},n.getMap=function(){return this.map?this.map:null},n.getProjection=function(){var e=this.getMap();return e?e.getProjection():null},n.bringToFront=function(){var e=this._getLayerList();if(!e.length)return this;var t=e[e.length-1];if(1===e.length||t===this)return this;var n=t.getZIndex();return this.setZIndex(n+1),this},n.bringToBack=function(){var e=this._getLayerList();if(!e.length)return this;var t=e[0];if(1===e.length||t===this)return this;var n=t.getZIndex();return this.setZIndex(n-1),this},n.show=function(){var e=this;if(!this.options.visible){this.options.visible=!0;var t=this.getRenderer();t&&t.show();var n=this.getMap();t&&n?n.once("renderend",(function(){e.fire("show")})):this.fire("show")}return this},n.hide=function(){var e=this;if(this.options.visible){this.options.visible=!1;var t=this.getRenderer();t&&t.hide();var n=this.getMap();t&&n?n.once("renderend",(function(){e.fire("hide")})):this.fire("hide")}return this},n.isVisible=function(){if(T(this.options.opacity)&&this.options.opacity<=0)return!1;var e=this.getMap();if(e){var t=e.getZoom();if(!P(this.options.maxZoom)&&this.options.maxZoomt)return!1}return P(this.options.visible)&&(this.options.visible=!0),this.options.visible},n.remove=function(){return this.map&&this.map.removeLayer(this),this},n.getMask=function(){return this._mask},n.setMask=function(e){if(!("Point"===e.type&&e._isVectorMarker()||"Polygon"===e.type||"MultiPolygon"===e.type))throw new Error("Mask for a layer must be a marker with vector marker symbol or a Polygon(MultiPolygon).");if(e._bindLayer(this),"Point"===e.type?e.updateSymbol({markerLineColor:"rgba(0, 0, 0, 0)",markerFillOpacity:0}):e.setSymbol({lineColor:"rgba(0, 0, 0, 0)",polygonOpacity:0}),this._mask=e,this.options.mask=e.toJSON(),!this.getMap()||this.getMap().isZooming())return this;var t=this._getRenderer();return t&&t.setToRedraw&&this._getRenderer().setToRedraw(),this},n.removeMask=function(){if(delete this._mask,delete this.options.mask,!this.getMap()||this.getMap().isZooming())return this;var e=this._getRenderer();return e&&e.setToRedraw&&this._getRenderer().setToRedraw(),this},n.onLoad=function(){return!0},n.onLoadEnd=function(){},n.isLoaded=function(){return!!this._loaded},n.getCollisionIndex=function(){if("layer"===this.options.collisionScope)return this._collisionIndex||(this._collisionIndex=new yr),this._collisionIndex;var e=this.getMap();return e?e.getCollisionIndex():null},n.clearCollisionIndex=function(){return"layer"===this.options.collisionScope&&this._collisionIndex&&this._collisionIndex.clear(),this},n.getRenderer=function(){return this._getRenderer()},n.onConfig=function(e){if(T(e.opacity)||e.cssFilter){var t=this.getRenderer();t&&t.setToRedraw()}},n.onAdd=function(){},n.onRendererCreate=function(){},n.onCanvasCreate=function(){},n.onRemove=function(){},n._bindMap=function(e,t){e&&(this.map=e,P(t)||this.setZIndex(t),this._switchEvents("on",this),this.onAdd(),this.fire("add"))},n._initRenderer=function(){var e=this.options.renderer;if(this.constructor.getRendererClass){var t=this.constructor.getRendererClass(e);if(!t)throw new Error("Invalid renderer for Layer("+this.getId()+"):"+e);this._renderer=new t(this),this._renderer.layer=this,this._renderer.setZIndex(this.getZIndex()),this._switchEvents("on",this._renderer),this._renderer.onAdd&&this._renderer.onAdd(),this.onRendererCreate(),this.fire("renderercreate",{renderer:this._renderer})}},n._doRemove=function(){this._loaded=!1,this._switchEvents("off",this),this.onRemove(),this._renderer&&(this._switchEvents("off",this._renderer),this._renderer.remove(),delete this._renderer),delete this.map,delete this._collisionIndex},n._switchEvents=function(e,t){t&&t.getEvents&&this.getMap()&&this.getMap()[e](t.getEvents(),t)},n._getRenderer=function(){return this._renderer},n._getLayerList=function(){return this.map?this.map._layers:[]},n._getMask2DExtent=function(){if(!this._mask||!this.getMap())return null;var e=this._mask._getMaskPainter();return e?e.get2DExtent():null},t}(vr(fr(ai(gr))));Vo.mergeOptions(Ho);var Wo=Vo.prototype.fire;Vo.prototype.fire=function(e,t){return"layerload"===e&&(this._loaded=!0),this.map&&(t||(t={}),t.type=e,t.target=this,this.map._onLayerEvent(t)),Wo.apply(this,arguments)};var Go=new Sr(0,0),Ko={maxVisualPitch:70,maxPitch:80,centerCross:!1,zoomInCenter:!1,zoomOrigin:null,zoomAnimation:!j,zoomAnimationDuration:330,panAnimation:!j,panAnimationDuration:600,rotateAnimation:!j,zoomable:!0,enableInfoWindow:!0,hitDetect:!ve.mobile,hitDetectLimit:5,fpsOnInteracting:25,layerCanvasLimitOnInteracting:-1,maxZoom:null,minZoom:null,maxExtent:null,fixCenterOnResize:!0,checkSize:!0,checkSizeInterval:1e3,renderer:"canvas",cascadePitches:[10,60],renderable:!0,clickTimeThreshold:280,stopRenderOnOffscreen:!0},qo=function(e){function t(n,r){var i;if(!r)throw new Error("Invalid options when creating map.");if(!r.center)throw new Error("Invalid center when creating map.");var o=C({},r),a=o.zoom;delete o.zoom;var s=new Sr(o.center);delete o.center;var l=o.baseLayer;delete o.baseLayer;var c=o.layers;return delete o.layers,(i=e.call(this,o)||this).VERSION=t.VERSION,Object.defineProperty(ye(ye(i)),"id",{value:Pe(),writable:!1}),i._loaded=!1,i._initContainer(n),i._panels={},i._baseLayer=null,i._layers=[],i._zoomLevel=a,i._center=s,i.setSpatialReference(o.spatialReference||o.view),i._mapViewPoint=new xe(0,0),i._initRenderer(),i._updateMapSize(i._getContainerDomSize()),l&&i.setBaseLayer(l),c&&i.addLayer(c),i.setMaxExtent(o.maxExtent),i._Load(),i}Ae(t,e),t.addOnLoadHook=function(e){var t=Array.prototype.slice.call(arguments,1),n="function"===typeof e?e:function(){this[e].apply(this,t)};return this.prototype._onLoadHooks=this.prototype._onLoadHooks||[],this.prototype._onLoadHooks.push(n),this};var n=t.prototype;return n.isLoaded=function(){return!!this._loaded},n.getContainer=function(){return this._containerDOM},n.getSpatialReference=function(){return this._spatialReference},n.setSpatialReference=function(e){var t=this.options.spatialReference;return this._loaded&&Bo.equals(t,e)||this._updateSpatialReference(e,t),this},n._updateSpatialReference=function(e,t){if(O(e)&&(e=Bo.getPreset(e)),e=C({},e),this._center=this.getCenter(),this.options.spatialReference=e,this._spatialReference=new Bo(e),this.options.spatialReference&&R(this.options.spatialReference.projection)){var n=this._spatialReference.getProjection();this.options.spatialReference.projection=n.code}return this._resetMapStatus(),this._fireEvent("spatialreferencechange",{old:t,new:C({},this.options.spatialReference)}),this},n.onConfig=function(e){var t=e.spatialReference||e.view;return P(t)||this._updateSpatialReference(t,null),this},n.getProjection=function(){return this._spatialReference?this._spatialReference.getProjection():null},n.getFullExtent=function(){return this._spatialReference?this._spatialReference.getFullExtent():null},n.setCursor=function(e){return delete this._cursor,this._trySetCursor(e),this._cursor=e,this},n.resetCursor=function(){return this.setCursor(null)},n.getCenter=function(){return this._loaded&&this._prjCenter?this.getProjection().unproject(this._prjCenter):this._center},n.setCenter=function(e){if(!e)return this;e=new Sr(e);var t=this.getProjection().project(e);return this._verifyExtent(t)?this._loaded?(this.onMoveStart(),this._setPrjCenter(t),this.onMoveEnd(this._parseEventFromCoord(this.getCenter())),this):(this._center=e,this):this},n.getSize=function(){return P(this.width)||P(this.height)?this._getContainerDomSize():new Kt(this.width,this.height)},n.getContainerExtent=function(){var e=this.height,t=this.getPitch(),n=this.options.maxVisualPitch;return n&&t>n&&(e=this._getVisualHeight(n)),new Zr(0,this.height-e,this.width,this.height)},n._getVisualHeight=function(e){e=e||.01;var t=(90-this.getPitch())*Math.PI/180,n=this.getFov()*Math.PI/180;e*=Math.PI/180;var r=this.cameraCenterDistance/this.getGLScale(),i=Math.tan(n/2),o=r*i/(1/Math.tan(e)-i)/Math.sin(e),a=r*(Math.sin(t)*o/(r+Math.cos(t)*o));return this.height/2+a},n.getExtent=function(){return this._pointToExtent(this._get2DExtent())},n.getProjExtent=function(){var e=this._get2DExtent();return new Br(this._pointToPrj(e.getMin()),this._pointToPrj(e.getMax()))},n.getPrjExtent=function(){return this.getProjExtent()},n.getMaxExtent=function(){return this.options.maxExtent?new Br(this.options.maxExtent,this.getProjection()):null},n.setMaxExtent=function(e){if(e){var t=new Br(e,this.getProjection());this.options.maxExtent=t;var n=this.getProjection();this._prjMaxExtent=t.convertTo((function(e){return n.project(e)})),this._verifyExtent(this._getPrjCenter())||(this._loaded?this._panTo(this._prjMaxExtent.getCenter()):this._center=n.unproject(this._prjMaxExtent.getCenter()))}else delete this.options.maxExtent,delete this._prjMaxExtent;return this},n.getZoom=function(){return this._zoomLevel},n.getZoomForScale=function(e,t,n){var r=this.getZoom();if(P(t)&&(t=r),1===e&&t===r)return r;var i=this._getResolution(t)/e,o=this.getZoomFromRes(i);if(n)return o;var a=1e-6;return this.getSpatialReference().getZoomDirection()<0?Math.ceil(o-a):Math.floor(o+a)},n.getZoomFromRes=function(e){var t=this._getResolutions(),n=this._getResolution(this.getMinZoom()),r=this._getResolution(this.getMaxZoom());if(n<=r){if(e<=n)return this.getMinZoom();if(e>=r)return this.getMaxZoom()}else{if(e>=n)return this.getMinZoom();if(e<=r)return this.getMaxZoom()}for(var i=t.length,o=0;o=Math.abs(s))return o+s/a}return i-1},n.setZoom=function(e,t){return void 0===t&&(t={animation:!0}),isNaN(e)||P(e)||(e=+e,this._loaded&&this.options.zoomAnimation&&t.animation?this._zoomAnimation(e):this._zoom(e)),this},n.getMaxZoom=function(){return P(this.options.maxZoom)?this.getMaxNativeZoom():this.options.maxZoom},n.setMaxZoom=function(e){var t=this.getMaxNativeZoom();return e>t&&(e=t),null!==e&&ethis._zoomLevel&&this.setZoom(e)}return this.options.minZoom=e,this},n.getMaxNativeZoom=function(){var e=this.getSpatialReference();return e?e.getMaxZoom():null},n.getGLRes=function(){if(this._glRes)return this._glRes;var e=this.getSpatialReference().getFullExtent();return this._glRes=(e.right-e.left)/Math.pow(2,19),this._glRes},n.getGLScale=function(e){return P(e)&&(e=this.getZoom()),this._getResolution(e)/this.getGLRes()},n.zoomIn=function(){return this.setZoom(this.getZoom()+1)},n.zoomOut=function(){return this.setZoom(this.getZoom()-1)},n.isZooming=function(){return!!this._zooming},n.isInteracting=function(){return this.isZooming()||this.isMoving()||this.isRotating()},n.setCenterAndZoom=function(e,t){return P(t)||this._zoomLevel===t?this.setCenter(e):(this.setCenter(e),this.setZoom(t,{animation:!1})),this},n.getFitZoom=function(e,t){var n=this;if(!e||!(e instanceof Br))return this._zoomLevel;if(e.xmin===e.xmax&&e.ymin===e.ymax)return this.getMaxZoom();var r=this.getSize(),i=e.convertTo((function(e){return n.coordToPoint(e)})),o=i.getWidth(),a=i.getHeight(),s=r.width/o,l=r.height/a,c=this.getSpatialReference().getZoomDirection()<0?Math.max(s,l):Math.min(s,l);return this.getZoomForScale(c,null,t)},n.getView=function(){return{center:this.getCenter().toArray(),zoom:this.getZoom(),pitch:this.getPitch(),bearing:this.getBearing()}},n.setView=function(e){return e?(e.center&&this.setCenter(e.center),null===e.zoom||isNaN(+e.zoom)||this.setZoom(+e.zoom,{animation:!1}),null===e.pitch||isNaN(+e.pitch)||this.setPitch(+e.pitch),null===e.pitch||isNaN(+e.bearing)||this.setBearing(+e.bearing),this):this},n.getResolution=function(e){return this._getResolution(e)},n.getScale=function(e){var t=P(e)?this.getZoom():e,n=this._getResolution(this.getMaxNativeZoom());return this._getResolution(t)/n},n.fitExtent=function(e,t,n,r){if(void 0===n&&(n={}),!e)return this;e=new Br(e,this.getProjection());var i=this.getFitZoom(e)+(t||0),o=e.getCenter();return"undefined"===typeof n.animation||n.animation?this._animateTo({center:o,zoom:i},{duration:n.duration||this.options.zoomAnimationDuration,easing:n.easing||"out"},r):this.setCenterAndZoom(o,i)},n.getBaseLayer=function(){return this._baseLayer},n.setBaseLayer=function(e){var t=!1;if(this._baseLayer&&(t=!0,this._fireEvent("baselayerchangestart"),this._baseLayer.remove()),!e)return delete this._baseLayer,this._fireEvent("baselayerchangeend"),this._fireEvent("setbaselayer"),this;return this._baseLayer=e,e._bindMap(this,-1),this._baseLayer.on("layerload",(function(){this._fireEvent("baselayerload"),t&&(t=!1,this._fireEvent("baselayerchangeend"))}),this),this._loaded&&this._baseLayer.load(),this._fireEvent("setbaselayer"),this},n.removeBaseLayer=function(){return this._baseLayer&&(this._baseLayer.remove(),delete this._baseLayer,this._fireEvent("baselayerremove")),this},n.getLayers=function(e){return this._getLayers((function(t){return!(t===this._baseLayer||t.getId().indexOf(v)>=0)&&(!e||e(t))}))},n.getLayer=function(e){if(!e)return null;var t=this._layerCache?this._layerCache[e]:null;if(t)return t;var n=this.getBaseLayer();return n&&n.getId()===e?n:null},n.addLayer=function(e){if(!e)return this;if(!Array.isArray(e))return e=Array.prototype.slice.call(arguments,0),this.addLayer(e);this._layerCache||(this._layerCache={});for(var t=this._layers,n=0,r=e.length;n0){var s=this.getRenderer();s&&s.setLayerCanvasUpdated(),t.forEach((function(e){e.fire("remove")}))}return this._fireEvent("removelayer",{layers:e}),this},n.sortLayers=function(e){if(!e||!Array.isArray(e))return this;for(var t=[],n=Number.MAX_VALUE,r=0,i=e.length;r0&&Array.prototype.slice.call(this._containerDOM.childNodes,0).filter((function(e){return"maptalks-wrapper"===e.className})).forEach((function(t){return e._containerDOM.removeChild(t)})),delete this._panels,delete this._containerDOM,delete this.renderer,this._fireEvent("removeend"),this._clearAllListeners(),ve.removeDPRListening&&ve.removeDPRListening(this),this},n.isRemoved=function(){return!this._containerDOM},n.isMoving=function(){return!!this._moving},n.onMoveStart=function(e){this._mapAnimPlayer&&this._stopAnim(this._mapAnimPlayer);var t=this._getPrjCenter();this._originCenter&&!this._verifyExtent(t)||(this._originCenter=t),this._moving=!0,this._trySetCursor("move"),this._fireEvent("movestart",this._parseEvent(e?e.domEvent:null,"movestart"))},n.onMoving=function(e){this._fireEvent("moving",this._parseEvent(e?e.domEvent:null,"moving"))},n.onMoveEnd=function(e){if(this._moving=!1,this._trySetCursor("default"),this._fireEvent("moveend",e&&e.domEvent?this._parseEvent(e.domEvent,"moveend"):e),!this._verifyExtent(this._getPrjCenter())&&this._originCenter){var t=this._originCenter;this._panTo(t)}},n.onDragRotateStart=function(e){this._dragRotating=!0,this._fireEvent("dragrotatestart",this._parseEvent(e?e.domEvent:null,"dragrotatestart"))},n.onDragRotating=function(e){this._fireEvent("dragrotating",this._parseEvent(e?e.domEvent:null,"dragrotating"))},n.onDragRotateEnd=function(e){this._dragRotating=!1,this._fireEvent("dragrotateend",this._parseEvent(e?e.domEvent:null,"dragrotateend"))},n.isDragRotating=function(){return!!this._dragRotating},n.isOffscreen=function(e,t){void 0===t&&(t=0);var n=this.width+t,r=this.height+t,i=e.xmin,o=e.ymin,a=e.xmax,s=e.ymax;return Array.isArray(e)&&(i=e[0],o=e[1],a=e[2],s=e[3]),a=n||sr},n.getRenderer=function(){return this._getRenderer()},n.getDevicePixelRatio=function(){return this.options.devicePixelRatio||ve.devicePixelRatio||1},n.setDevicePixelRatio=function(e){return T(e)&&e>0&&e!==this.options.devicePixelRatio&&(this.options.devicePixelRatio=e,this.checkSize(!0)),this},n._initContainer=function(e){if(O(e)){if(this._containerDOM=document.getElementById(e),!this._containerDOM)throw new Error("Invalid container when creating map: '"+e+"'")}else this._containerDOM=e,j&&(this.CanvasClass=this._containerDOM.constructor);if(this._containerDOM.childNodes&&this._containerDOM.childNodes.length>0&&"maptalks-wrapper"===this._containerDOM.childNodes[0].className)throw new Error("Container is already loaded with another map instance, use map.remove() to clear it.")},n._trySetCursor=function(e){return this._cursor||this._priorityCursor||(e||(e="default"),this._setCursorToPanel(e)),this},n._setPriorityCursor=function(e){if(e)this._priorityCursor=e,this._setCursorToPanel(e);else{var t=!1;this._priorityCursor&&(t=!0),delete this._priorityCursor,t&&this.setCursor(this._cursor)}return this},n._setCursorToPanel=function(e){var t=this.getMainPanel();t&&t.style&&t.style.cursor!==e&&(t.style.cursor=e)},n._removeLayer=function(e,t){if(e&&t){var n=t.indexOf(e);n>-1&&t.splice(n,1)}},n._sortLayersByZIndex=function(){if(this._layers){for(var e=0,t=this._layers.length;en)&&this.setMaxZoom(n),(P(t)||-1===t||te)&&(this._zoomLevel=e),this._zoomLevel0&&(o.x=-o.x);var a=this.options.heightFactor;return a&&1!==a&&(o.x*=a,o.y*=a),o.x}}(),pointAtResToAltitude:function(){var e=new Sr(0,40);return function(t,n,r){return void 0===t&&(t=0),this.pointAtResToDistance(t,0,n,r||e)}}(),pixelToDistance:function(){var e=new Sr(0,0),t=new Sr(0,0);return function(n,r){var i=this.getProjection();if(!i)return null;var o=this.getFullExtent(),a=o.top>o.bottom?-1:1,s=e.set(this.width/2+n,this.height/2+a*r),l=this.containerPointToCoord(s,t);return i.measureLength(this.getCenter(),l)}}(),pointToDistance:function(e,t,n){var r=this.getResolution(n);return this.pointAtResToDistance(e,t,r)},pointAtResToDistance:function(){var e=new xe(0,0),t=new Sr(0,0),n=new Sr(0,0),r=new Sr(0,0);return function(i,o,a,s){var l=this.getProjection();if(!l)return null;var c=s?l.project(s,t):this._getPrjCenter(),u=this._prjToPointAtRes(c,a,e);u._add(i,o);var d=this.pointAtResToCoord(u,a,n),f=s||l.unproject(c,r);return l.measureLength(f,d)}}(),locateByPoint:function(){var e=new xe(0,0);return function(t,n,r){var i=this.coordToContainerPoint(t,void 0,e);return this.containerPointToCoord(i._add(n,r))}}(),_get2DExtent:function(e,t){var n;if(void 0!==e&&e!==this._zoomLevel||!this._mapExtent2D||(n=this._mapExtent2D),n)return t?(t.set(n.xmin,n.ymin,n.xmax,n.ymax),t):n.copy();var r=this._getResolution(e);return this._get2DExtentAtRes(r,t)},_get2DExtentAtRes:function(){var e=new xe(0,0);return function(t,n){var r=this;return t===this._mapGlRes&&this._mapGlExtent2D?this._mapGlExtent2D:this.getContainerExtent().convertTo((function(n){return r._containerPointToPointAtRes(n,t,e)}),n)}}(),_pointToExtent:function(){var e=new Sr(0,0),t=new Sr(0,0);return function(n){var r=n.getMin(),i=n.getMax(),o=this.getFullExtent(),a=!o||o.left<=o.right?[r.x,i.x]:[i.x,r.x],s=a[0],l=a[1],c=!o||o.top>o.bottom?[i.y,r.y]:[r.y,i.y],u=c[0],d=c[1],f=r.set(s,d),h=i.set(l,u);return new Br(this.pointToCoord(f,void 0,e),this.pointToCoord(h,void 0,t),this.getProjection())}}(),_getViewPointFrameOffset:function(){var e=new xe(0,0);return function(){if(this.isZooming())return null;var t=this._getPrjCenter();return this._mapViewCoord&&!this._mapViewCoord.equals(t)?this._prjToContainerPoint(this._mapViewCoord)._sub(this._prjToContainerPoint(t,void 0,e)):null}}(),_viewPointToPrj:function(){var e=new xe(0,0);return function(t,n){return this._containerPointToPrj(this.viewPointToContainerPoint(t,e),n)}}(),_prjToContainerPoint:function(e,t,n,r){var i=this._getResolution(t);return this._prjToContainerPointAtRes(e,i,n,r)},_prjToContainerPointAtRes:function(){var e=new xe(0,0);return function(t,n,r,i){return this._pointAtResToContainerPoint(this._prjToPointAtRes(t,n,e),n,i||0,r)}}(),_prjToViewPoint:function(){var e=new xe(0,0);return function(t,n,r){var i=this._prjToContainerPoint(t,void 0,e,r);return this.containerPointToViewPoint(i,n)}}(),_viewPointToPoint:function(){var e=new xe(0,0);return function(t,n,r){return this._containerPointToPoint(this.viewPointToContainerPoint(t,e),n,r)}}(),_pointToViewPoint:function(){var e=new Sr(0,0);return function(t,n,r){return this._prjToViewPoint(this._pointToPrj(t,n,e),r)}}()}),qo.mergeOptions(Ko);var Yo=function(e){function t(){return e.apply(this,arguments)||this}Ae(t,e);var n=t.prototype;return n.addHooks=function(){this.target&&this.target.on("_dblclick",this._onDoubleClick,this)},n.removeHooks=function(){this.target&&this.target.off("_dblclick",this._onDoubleClick,this)},n._onDoubleClick=function(e){var t=this.target;if(t.options.doubleClickZoom){var n=t.getZoom(),r=e.domEvent.shiftKey?Math.ceil(n)-1:Math.floor(n)+1;t._zoomAnimation(r,e.containerPoint)}},t}(pr);qo.mergeOptions({doubleClickZoom:!0}),qo.addOnLoadHook("addHandler","doubleClickZoom",Yo);var Xo=function(e){function t(){return e.apply(this,arguments)||this}Ae(t,e);var n=t.prototype;return n.addHooks=function(){var e=this.target;if(e){var t=e._panels.mapWrapper||e._containerDOM;this._dragHandler=new Er(t,{cancelOn:this._cancelOn.bind(this),rightclick:!0}),this._dragHandler.on("mousedown",this._onMouseDown,this).on("dragstart",this._onDragStart,this).on("dragging",this._onDragging,this).on("dragend",this._onDragEnd,this).enable()}},n.removeHooks=function(){this._dragHandler.off("mousedown",this._onMouseDown,this).off("dragstart",this._onDragStart,this).off("dragging",this._onDragging,this).off("dragend",this._onDragEnd,this),this._dragHandler.remove(),delete this._dragHandler},n._cancelOn=function(e){return!(!this.target.isZooming()&&!this._ignore(e))},n._ignore=function(e){return!!e&&(e.domEvent&&(e=e.domEvent),this.target._ignoreEvent(e))},n._onMouseDown=function(e){delete this.startDragTime,delete this._mode,2===e.domEvent.button||e.domEvent.ctrlKey?(this.target.options.dragRotate||this.target.options.dragPitch)&&(this._mode="rotatePitch"):this.target.options.dragPan&&(this._mode="move"),this.target._stopAnim(this.target._mapAnimPlayer),In(e.domEvent)},n._onDragStart=function(e){this.startDragTime=S(),"move"===this._mode?this._moveStart(e):"rotatePitch"===this._mode&&this._rotateStart(e)},n._onDragging=function(e){this.target._isEventOutMap(e.domEvent)||("move"===this._mode?this._moving(e):"rotatePitch"===this._mode&&this._rotating(e))},n._onDragEnd=function(e){"move"===this._mode?this._moveEnd(e):"rotatePitch"===this._mode&&this._rotateEnd(e),delete this.startDragTime,delete this.startBearing},n._start=function(e){this.preX=e.mousePos.x,this.preY=e.mousePos.y,this.startX=this.preX,this.startY=this.preY,this._startPrjCenter=this.target._getPrjCenter().copy()},n._moveStart=function(e){this._start(e);var t=this.target;t.onMoveStart(e);var n=jn(t._getActualEvent(e.domEvent),t.getContainer());this.startPrjCoord=t._containerPointToPrj(n)},n._moving=function(e){if(this.startDragTime){var t=this.target,n=jn(t._getActualEvent(e.domEvent),t.getContainer());t._setPrjCoordAtContainerPoint(this.startPrjCoord,n),t.onMoving(e)}},n._moveEnd=function(e){if(this.startDragTime){var t="touchend"===e.domEvent.type,n=this.target,r=S()-this.startDragTime,i=e.mousePos.x,o=e.mousePos.y,a=i-this.startX,s=o-this.startY,l=n._getPrjCenter(),c=l.sub(this._startPrjCenter);if(this._clear(),n.options.panAnimation&&!e.interupted&&n._verifyExtent(n._getPrjCenter())&&r<280&&Math.abs(s)+Math.abs(a)>5){r*=5;var u=t?5:2.8,d=l.add(c._multi(u));n._panTo(d,{duration:t?3*r:2*r,easing:"outExpo"})}else n.onMoveEnd(e)}},n._rotateStart=function(e){this._start(e),delete this._rotateMode,this.startBearing=this.target.getBearing(),this.target.onDragRotateStart(e),this._db=0},n._rotating=function(e){var t=this.target,n=e.mousePos.x,r=e.mousePos.y,i=t.getPitch(),o=t.getBearing(),a=Math.abs(n-this.preX),s=Math.abs(r-this.preY);if(this._rotateMode||(t.options.dragRotatePitch?this._rotateMode="rotate_pitch":this._rotateMode=a>s?"rotate":a=0&&t.options.dragRotate){var l=0;l=t.options.dragPitch||a>s?-.6*(this.preX-n):n>t.width/2?.6*(this.preY-r):-.6*(this.preY-r);var c=t.getBearing()+l;this._db=this._db||0,this._db+=l,t._setBearing(c)}this._rotateMode.indexOf("pitch")>=0&&t.options.dragPitch&&t._setPitch(t.getPitch()+.4*(this.preY-r)),this.preX=n,this.preY=r,t.getBearing()===o&&t.getPitch()===i||t.onDragRotating(e)}},n._rotateEnd=function(e){var t=this.target,n=t.getBearing();this._clear();var r=S()-this.startDragTime;if(t.onDragRotateEnd(e),t.options.rotateAnimation&&Math.abs(n-this.startBearing)>20&&("rotate"===this._rotateMode||"rotate_pitch"===this._rotateMode)&&!e.interupted&&r<400){var i=t.getBearing();t._animateTo({bearing:i+this._db/1.5},{easing:"outQuint",duration:1600})}},n._clear=function(){delete this.startPrjCoord,delete this.preX,delete this.preY,delete this.startX,delete this.startY},t}(pr);qo.mergeOptions({draggable:!0,dragPan:!0,dragRotatePitch:!0,dragRotate:!0,dragPitch:!0}),qo.addOnLoadHook("addHandler","draggable",Xo);var $o="mousedown mouseup mousemove click dblclick contextmenu touchstart touchmove touchend",Qo={mousemove:["mousemove","mouseover","mouseout","mouseenter"],touchend:["touchend","click"]},Jo=function(e){function t(){return e.apply(this,arguments)||this}Ae(t,e);var n=t.prototype;return n.addHooks=function(){var e=this.target,t=e._panels.allLayers||e._containerDOM;Yn(t,$o,this._identifyGeometryEvents,this)},n.removeHooks=function(){var e=this.target,t=e._panels.allLayers||e._containerDOM;Xn(t,$o,this._identifyGeometryEvents,this)},n._identifyGeometryEvents=function(e,t){var n=this.target;if(!n.isInteracting()&&!n._ignoreEvent(e)){var r=null,i=t||e.type,o="mousedown"===i||"touchstart"===i&&e.touches&&1===e.touches.length;if(o)this._mouseDownTime=S();else if(("click"===i||"touchend"===i)&&this._mouseDownTime){var a=this._mouseDownTime;if(delete this._mouseDownTime,S()-a>300){if("click"===i)return}else"touchend"===i&&(r="click")}var s=e.touches&&e.touches.length>0?e.touches[0]:e.changedTouches&&e.changedTouches.length>0?e.changedTouches[0]:e;if(s){var l=jn(s,n._containerDOM);"touchstart"===i&&In(e);for(var c=null,u=this.target.getRenderer().getTopElements(),d=o&&2!==e.button,f=0;f=0){var p={target:n,type:i,domEvent:e,containerPoint:l};if(d)return n._setPriorityCursor(c),void u[f].mousedown(p);u[f].onEvent(p)}}var g=n._getLayers((function(e){return!(!e.identify||!e.options.geometryEvents)}));if(n._setPriorityCursor(c),g.length){var m=Qo[i]||[i],v={includeInternals:!0,filter:function(t){if(!(t instanceof Uo))return!1;var n=t._getEventTypeToFire(e);if("mousemove"===i){if(!c&&t.options.cursor&&(c=t.options.cursor),!t.listens("mousemove")&&!t.listens("mouseover")&&!t.listens("mouseenter"))return!1}else if(!t.listens(n)&&!t.listens(r))return!1;return!0},count:1,onlyVisible:n.options.onlyVisibleGeometryEvents,containerPoint:l,layers:g,eventTypes:m},A=function(t){var o=!0;if("mousemove"===i){var a={};if(t.length>0)for(var s=t.length-1;s>=0;s--){var l=t[s];if(l instanceof Uo){var u=l._getInternalId();a[u]=l,l._onEvent(e),this._prevOverGeos&&this._prevOverGeos.geomap[u]||l._onEvent(e,"mouseenter"),o=l._onEvent(e,"mouseover")}}n._setPriorityCursor(c);var d=this._prevOverGeos&&this._prevOverGeos.geos;if(this._prevOverGeos={geos:t,geomap:a},d&&d.length>0)for(var f=d.length-1;f>=0;f--){var h=d[f];if(h instanceof Uo)a[d[f]._getInternalId()]||(o=h._onEvent(e,"mouseout"))}}else{if(!t||!t.length)return;for(var p=t.length-1;p>=0;p--)if(t[p]instanceof Uo){o=t[p]._onEvent(e),r&&t[p]._onEvent(e,r);break}}!1===o&&Ln(e)}.bind(this);"mousemove"===i||"touchmove"===i?this._queryIdentifyTimeout=n.getRenderer().callInNextFrame((function(){n.isInteracting()||n.identifyAtPoint(v,A)})):n.identifyAtPoint(v,A)}}}},t}(pr);qo.mergeOptions({geometryEvents:!0,onlyVisibleGeometryEvents:!0}),qo.addOnLoadHook("addHandler","geometryEvents",Jo);var ea=4.000244140625,ta=function(e){function t(t){var n;return(n=e.call(this,t)||this)._thisScrollZoom=n._scrollZoom.bind(ye(ye(n))),n._wheelZoomRate=.0022222222222222222,n._defaultZoomRate=.01,n._delta=0,n}Ae(t,e);var n=t.prototype;return n.addHooks=function(){Mn(this.target._containerDOM,"wheel",this._onWheelScroll,this)},n.removeHooks=function(){On(this.target._containerDOM,"wheel",this._onWheelScroll)},n._onWheelScroll=function(e){In(e),Ln(e);var t=this.target;if(t._ignoreEvent(e)||!t.options.zoomable)return!1;var n=t._containerDOM,r=t._checkZoomOrigin(jn(e,n));return t.options.seamlessZoom?(this._zooming||(this._trackPadSuspect=0,this._ensureTrackpad=!1),this._seamless(e,r)):this._interval(e,r)},n._seamless=function(e,t){var n=e.deltaMode===window.WheelEvent.DOM_DELTA_LINE?60*e.deltaY:e.deltaY;if(n%ea!==0&&(this._ensureTrackpad||(Math.abs(n)<60?this._trackPadSuspect++:this._trackPadSuspect=0,this._trackPadSuspect>=2&&(this._ensureTrackpad=!0)),this._ensureTrackpad&&(n*=14)),e.shiftKey&&n&&(n/=4),this._lastWheelEvent=e,this._delta-=n,!this._zooming&&this._delta){var r=this.target;this._zoomOrigin=t,r.onZoomStart(null,t)}this._start()},n._start=function(){if(this._delta){this._zooming=!0;var e=this.target;this._active||(e.getRenderer().callInNextFrame(this._thisScrollZoom),this._active=!0)}},n._scrollZoom=function(){var e=this;if(this._active=!1,this._delta){var t=Math.abs(this._delta)>ea?this._wheelZoomRate:this._defaultZoomRate,n=2/(1+Math.exp(-Math.abs(this._delta*t)));this._delta<0&&0!==n&&(n=1/n);var r=this.target,i=r.getZoom(),o=r.getZoomForScale(n,i,!0);this._delta=0,r.onZooming(o,this._zoomOrigin),this._timeout&&clearTimeout(this._timeout),this._timeout=setTimeout((function(){e._zooming=!1,delete e._timeout,r.onZoomEnd(r.getZoom(),e._zoomOrigin)}),210)}},n._interval=function(e,t){var n=this,r=this.target;if(this._zooming)return this._requesting++,!1;this._requesting=0;var i=(e.deltaY?-1*e.deltaY:e.wheelDelta?e.wheelDelta:e.detail)>0?1:-1;e.detail&&(i*=-1);var o=r.getZoom(),a=o+i;if((a=r._checkZoom(i>0?Math.ceil(a):Math.floor(a)))===o)return!1;this._zooming=!0,this._delta||(r.onZoomStart(null,t),this._origin=t,this._delta=i,this._startZoom=r.getZoom());return r._animateTo({zoom:a-1*this._delta/2,around:this._origin},{continueOnViewChanged:!0,easing:"linear",duration:90,wheelZoom:!0},(function(t){"finished"===t.state.playState?n._requesting<1||Math.abs(a-n._startZoom)>2||a===r.getMaxZoom()||a===r.getMinZoom()?(r._animateTo({zoom:a,around:n._origin},{continueOnViewChanged:!0,duration:100},(function(e){"running"!==e.state.playState&&(delete n._zooming,delete n._requesting)})),delete n._startZoom,delete n._origin,delete n._delta,n._requesting=0):P(n._requesting)||(delete n._zooming,n._onWheelScroll(e)):"running"!==t.state.playState&&(delete n._zooming,delete n._requesting)})),!1},t}(pr);qo.mergeOptions({scrollWheelZoom:!0,seamlessZoom:!0}),qo.addOnLoadHook("addHandler","scrollWheelZoom",ta);var na=function(e){function t(){return e.apply(this,arguments)||this}Ae(t,e);var n=t.prototype;return n.addHooks=function(){Mn(this.target.getContainer(),"touchstart",this._onTouchStart,this)},n.removeHooks=function(){On(this.target.getContainer(),"touchstart",this._onTouchStart)},n._onTouchStart=function(e){var t=this.target;if(e.touches&&!(e.touches.length<2)){var n=t.getContainer(),r=jn(e.touches[0],n),i=jn(e.touches[1],n);this.preY=r.y,this._startP1=r,this._startP2=i,this._startDist=r.distanceTo(i),this._startVector=r.sub(i),this._startZoom=t.getZoom(),this._startBearing=t.getBearing(),Xn(document,"touchmove",this._onTouchMove,this),Xn(document,"touchend",this._onTouchEnd,this),Mn(document,"touchmove",this._onTouchMove,this),Mn(document,"touchend",this._onTouchEnd,this),In(e),t._fireEvent("touchactstart")}},n._onTouchMove=function(e){var t=this.target;if(e.touches&&!(e.touches.length<2)){var n=t.getContainer(),r=jn(e.touches[0],n),i=jn(e.touches[1],n),o=r.sub(this._startP1),a=i.sub(this._startP2),s=r.sub(i),l=r.distanceTo(i)/this._startDist,c=180*s.angleWith(this._startVector)/Math.PI,u=.4*((this.preY||r.y)-r.y);this.preY=r.y;var d={domEvent:e,mousePos:[r,i]};if(this.mode||(t.options.touchRotate&&Math.abs(c)>8?this.mode=t.options.touchZoomRotate?"rotate_zoom":"rotate":t.options.touchPitch&&o.y*a.y>0&&Math.abs(o.y)>10&&Math.abs(a.y)>10?this.mode="pitch":t.options.zoomable&&t.options.touchZoom&&Math.abs(1-l)>.15&&(this.mode=t.options.touchZoomRotate&&t.options.touchRotate?"rotate_zoom":"zoom"),this._startTouching(d)),"zoom"===this.mode||"rotate_zoom"===this.mode){this._scale=l;var f=t._getResolution(this._startZoom)/l,h=t.getZoomFromRes(f);t.onZooming(h,this._Origin)}"rotate"===this.mode||"rotate_zoom"===this.mode?(t._setBearing(this._startBearing+c),t.onDragRotating(d)):"pitch"===this.mode&&(t._setPitch(t.getPitch()+u),t.onDragRotating(d)),t._fireEvent("touchactinging")}},n._startTouching=function(e){var t=this.target;if("zoom"===this.mode||"rotate_zoom"===this.mode){var n=t.getSize();this._Origin=new xe(n.width/2,n.height/2),t.onZoomStart(null,this._Origin)}"rotate"!==this.mode&&"pitch"!==this.mode&&"rotate_zoom"!==this.mode||t.onDragRotateStart(e)},n._onTouchEnd=function(e){delete this.preY;var t=this.target;if(Xn(document,"touchmove",this._onTouchMove,this),Xn(document,"touchend",this._onTouchEnd,this),"zoom"===this.mode||"rotate_zoom"===this.mode){var n=this._scale,r=t._getResolution(this._startZoom)/n,i=t.getZoomFromRes(r);t.onZoomEnd(i,this._Origin)}"pitch"!==this.mode&&"rotate"!==this.mode&&"rotate_zoom"!==this.mode||t.onDragRotateEnd({domEvent:e}),delete this.mode,t._fireEvent("touchactend")},t}(pr);qo.mergeOptions({touchGesture:!0,touchZoom:!0,touchPitch:!0,touchRotate:!0,touchZoomRotate:!1}),qo.addOnLoadHook("addHandler","touchGesture",na);var ra="__anim_player",ia={outExpo:function(e){return 1===e?1:1-Math.pow(2,-10*e)},outQuint:function(e){return 1-Math.pow(1-e,5)},in:function(e){return Math.pow(e,2)},out:function(e){return 1-ia.in(1-e)},inAndOut:function(e){return 3*e*e-2*e*e*e},linear:function(e){return e},upAndDown:function(e){return e<.5?ia.inAndOut(2*e):1-ia.inAndOut(2*(e-.5))}},oa=function(e,t){this.state=e,this.styles=t},aa=function(e,t,n,r){this._animation=e,this.options=t,this._onFrame=n,this.playState="idle",this.ready=!0,this.finished=!1,this.target=r},sa={speed:{slow:2e3,normal:1e3,fast:500},_resolveStyles:function(e){if(!e)return null;function t(e){if(!Array.isArray(e))return sa._resolveStyles(e);for(var t=[],n=[],r=[],i=0;i=this.duration&&(this._playStartTime=n,r=0),"running"===this.playState){var i=this._animation(r,this.duration);this.playState=i.state.playState,"running"!==this.playState&&this.target&&delete this.target[ra],"idle"===this.playState?this.startTime>n&&setTimeout(this._run.bind(this),this.startTime-n):"running"===this.playState?this._framer((function(){"running"===e.playState&&(e.currentTime=r,t&&t(i),e._run())})):"finished"===this.playState&&(this.finished=!0,t&&t(i))}else if(this.target&&delete this.target[ra],t){"finished"===this.playState?r=this.duration:"idle"===this.playState&&(r=0);var o=this._animation(r,this.duration);o.state.playState=this.playState,t(o)}}});var la=function(e){function t(){return e.apply(this,arguments)||this}Ae(t,e);var n=t.prototype;return n.animateShow=function(e,t){var n=this;void 0===e&&(e={}),this._showPlayer&&this._showPlayer.finish(),R(e)&&(t=e={});var r=this.getCoordinates();if(0===r.length)return this;this._animIdx=0,this._animLenSoFar=0,this.show();var i=!!this.getShell?this.getShell().concat(this.getShell()[0]):r,o=this._getProjection(),a=o.projectCoords(i,this.options.antiMeridian);this._prjAniShowCenter=this._getPrjExtent().getCenter(),this._aniShowCenter=o.unproject(this._prjAniShowCenter);var s=e.duration||1e3,l=e.easing||"out";this.setCoordinates([]);var c=0;a.length&&(a[0]._distance=0);for(var u=1;us));o++)this._animLenSoFar+=l;if(this._animIdx=o-1,this._animIdx>=a-1)return this.setCoordinates(r),r[r.length-1];var c=this._animIdx,u=i[c],d=i[c+1],f=(s-this._animLenSoFar)/l;this._animTailRatio=f;var h=u.x+(d.x-u.x)*f,p=u.y+(d.y-u.y)*f;this._tempPrjCoord.x=h,this._tempPrjCoord.y=p;var g=this._tempPrjCoord,m=r[c],v=r[c+1],A=m.x+(v.x-m.x)*f,y=m.y+(v.y-m.y)*f;this._tempCoord.x=A,this._tempCoord.y=y;var b=this._tempCoord,_=!!this.getShell;if(!_&&this.options.smoothness>0){for(var w=[],x=[],E=0;E<=this._animIdx;E++)w.push(r[E]),x.push(i[E]);w.push(b,b),x.push(g,g),this.setCoordinates(w),this._setPrjCoordinates(x)}else{var S=r.slice(0,this._animIdx+1);S.push(b);var C=i.slice(0,this._animIdx+1);C.push(g),_?(this.setCoordinates([this._aniShowCenter].concat(S)),this._setPrjCoordinates([this._prjAniShowCenter].concat(C))):(this.setCoordinates(S),this._setPrjCoordinates(C))}return b},n._getCenterInExtent=function(e,t,n){var r=this.getExtent();if(!e.intersects(r))return null;var i=n(t,e);if(0===i.length)return null;var o=0,a=0,s=0;i.forEach((function(e){Array.isArray(e)?e.forEach((function(e){e.point&&(e=e.point),o+=e.x,a+=e.y,s++})):(e.point&&(e=e.point),o+=e.x,a+=e.y,s++)}));var l=new Sr(o,a)._multi(1/s);return l.count=s,l},n._getPath2DPoints=function(e,t,n){if(!Be(e))return[];var r=this.getMap(),i=!t&&this._shouldSimplify(),o=this.options.simplifyTolerance*r._getResolution(),a=Array.isArray(e[0]);if(delete this._simplified,i&&!a){var s=e.length;e=l()(e,o,!1),this._simplified=e.lengtht&&(t=n[r].lineWidth)}else t=n.lineWidth;return e.prototype._hitTestTolerance.call(this)+(T(t)?t/2:1.5)},n._coords2Extent=function(e,t){if(!e||0===e.length||Array.isArray(e[0])&&0===e[0].length)return null;for(var n=new Br(t),r=0,i=e.length;r1){for(var r=[],i=1;i0},n._projectRings=function(){this.getMap()?(this._prjCoords=this._projectCoords(this._coordinates),this._prjHoles=this._projectCoords(this._holes),this.onShapeChanged()):this.onShapeChanged()},n._setPrjCoordinates=function(e){this._prjCoords=e,this.onShapeChanged()},n._cleanRing=function(e){for(var t=e.length-1;t>=0;t--)e[t]||e.splice(t,1)},n._checkRing=function(e){if(this._cleanRing(e),!e||!Be(e))return!1;var t=e[e.length-1],n=!0;return e[0].x===t.x&&e[0].y===t.y||(n=!1),n},n._trimRing=function(e){var t=this._checkRing(e);return Be(e)&&t&&e.splice(e.length-1,1),e},n._copyAndCloseRing=function(e){e=e.slice(0);var t=this._checkRing(e);return Be(e)&&!t?(e.push(e[0].copy()),e):e},n._getPrjShell=function(){return this.getJSONType()===ca?this._getPrjCoordinates():(this._verifyProjection(),this._getProjection()&&!this._prjShell&&(this._prjShell=this._projectCoords(this.getShell())),this._prjShell)},n._getPrjHoles=function(){var e=this._getProjection();return this._verifyProjection(),e&&!this._prjHoles&&(this._prjHoles=this._projectCoords(this.getHoles())),this._prjHoles},n._computeGeodesicLength=function(e){var t=this.getCoordinates();if(!Be(t))return 0;for(var n=0,r=0,i=t.length;r=0;i--)t[i]._initOptions(r),t[i]._setParent(this),t[i]._setEventParent(this),n&&t[i].setSymbol(n);return this._geometries=t,this.getLayer()&&(this._bindGeometriesToLayer(),this.onShapeChanged()),this},n.getGeometries=function(){return this._geometries||[]},n.forEach=function(e,t){for(var n=this.getGeometries(),r=0,i=n.length;r=0){var a=new Ea["Point"===n?"Marker":n](e.coordinates);return t&&t(a),a}if("GeometryCollection"===n){var s=e.geometries;if(!Be(s)){var l=new va;return t&&t(l),l}for(var c=[],u=s.length,d=0;d90&&e<270&&(n*=-1),e>180&&e<360&&(r*=-1);var p=i.locate(o,n,r);c.push(p)}return c},n.getHoles=function(){return[]},n.animateShow=function(){return this.show()},n._containsPoint=function(t,n){var r=this.getMap();if(r.isTransforming())return e.prototype._containsPoint.call(this,t,n);var i=r.getProjection(),o=P(n)?this._hitTestTolerance():n,a=i.projectCoords([this._coordinates,r.locate(this._coordinates,this.getWidth()/2,this.getHeight()/2)],this.options.antiMeridian);return eo(t,r._prjToContainerPoint(a[0]),r._prjToContainerPoint(a[1]),o)},n._computePrjExtent=function(){return Ca.prototype._computePrjExtent.apply(this,arguments)},n._computeExtent=function(){return Ca.prototype._computeExtent.apply(this,arguments)},n._getMinMax=function(e){if(!e||!this._coordinates||P(this.width)||P(this.height))return null;var t=this.getWidth(),n=this.getHeight();return[e.locate(this._coordinates,-t/2,0),e.locate(this._coordinates,t/2,0),e.locate(this._coordinates,0,-n/2),e.locate(this._coordinates,0,n/2)]},n._computeGeodesicLength=function(){if(P(this.width)||P(this.height))return 0;var e=this.width>this.height?this.width:this.height;return 2*Math.PI*e/2-4*Math.abs(this.width-this.height)},n._computeGeodesicArea=function(){return P(this.width)||P(this.height)?0:Math.PI*this.width*this.height/4},n._exportGeoJSONGeometry=function(){return{type:"Polygon",coordinates:Sr.toNumberArrays([this.getShell()])}},n._toJSON=function(e){var t=C({},e),n=this.getCenter();t.geometry=!1;var r=this.toGeoJSON(t);return r.geometry={type:"Polygon"},{feature:r,subType:"Ellipse",coordinates:[n.x,n.y],width:this.getWidth(),height:this.getHeight()}},t}(da(ua));Pa.mergeOptions({numberOfShellPoints:80}),Pa.registerJSONType("Ellipse");var Ta=function(e){function t(t,n,r,i){var o;return o=e.call(this,null,i)||this,t&&o.setCoordinates(t),o._width=n,o._height=r,o}Ae(t,e),t.fromJSON=function(e){var n=e.feature,r=new t(e.coordinates,e.width,e.height,e.options);return r.setProperties(n.properties),r};var n=t.prototype;return n.getCoordinates=function(){return this._coordinates},n.setCoordinates=function(e){if(this._coordinates=e instanceof Sr?e:new Sr(e),!this._coordinates||!this.getMap())return this.onPositionChanged(),this;var t=this._getProjection();return this._setPrjCoordinates(t.project(this._coordinates)),this},n.getWidth=function(){return this._width},n.setWidth=function(e){return this._width=e,this.onShapeChanged(),this},n.getHeight=function(){return this._height},n.setHeight=function(e){return this._height=e,this.onShapeChanged(),this},n.getShell=function(){var e=this._getMeasurer(),t=this._coordinates,n=this.getMap(),r=1,i=-1;if(n){var o=n.getFullExtent();o.left>o.right&&(r=-1),o.bottom>o.top&&(i=1)}var a=[];return a.push(t),a.push(e.locate(t,r*this._width,0)),a.push(e.locate(t,r*this._width,i*this._height)),a.push(e.locate(t,0,i*this._height)),a.push(t),a},n.getHoles=function(){return[]},n.animateShow=function(){return this.show()},n._getPrjCoordinates=function(){var e=this._getProjection();return this._verifyProjection(),!this._pnw&&e&&this._coordinates&&(this._pnw=e.project(this._coordinates)),this._pnw},n._setPrjCoordinates=function(e){this._pnw=e,this.onPositionChanged()},n._getPrjShell=function(){var t=e.prototype._getPrjShell.call(this),n=this._getProjection();if(!n.isSphere())return t;for(var r=n.getSphereExtent(),i=r.sx,o=r.sy,a=this._getProjection().getCircum(),s=t[0],l=1,c=t.length;l0&&(d=a.x*i),o*(s.y-u.y)<0&&(f=a.y*o),t[l]._add(d,f)}return t},n._updateCache=function(){this._clearCache();var e=this._getProjection();this._pnw&&e&&(this._coordinates=e.unproject(this._pnw))},n._clearProjection=function(){this._pnw=null,e.prototype._clearProjection.call(this)},n._computeCenter=function(e){return e.locate(this._coordinates,this._width/2,-this._height/2)},n._containsPoint=function(t,n){var r=this.getMap();if(r.isTransforming())return e.prototype._containsPoint.call(this,t,n);var i=P(n)?this._hitTestTolerance():n,o=r._getResolution()*i,a=this._getPrjExtent().expand(o),s=r._containerPointToPrj(t);return a.contains(s)},n._computePrjExtent=function(e){var t=this._getSouthEast(e);if(!t)return null;var n=e.projectCoords([new Sr(this._coordinates.x,t.y),new Sr(t.x,this._coordinates.y)],this.options.antiMeridian);return new Br(n[0],n[1])},n._computeExtent=function(e){var t=this._getSouthEast(e);return t?new Br(this._coordinates,t,this._getProjection()):null},n._getSouthEast=function(e){if(!e||!this._coordinates||P(this._width)||P(this._height))return null;var t=this.getWidth(),n=-this.getHeight();if(e.fullExtent){var r=e.fullExtent;t*=r.right>r.left?1:-1,n*=r.top>r.bottom?1:-1}var i=e.locate(this._coordinates,t,0),o=e.locate(this._coordinates,0,n);return i.y=o.y,i},n._computeGeodesicLength=function(){return P(this._width)||P(this._height)?0:2*(this._width+this._height)},n._computeGeodesicArea=function(){return P(this._width)||P(this._height)?0:this._width*this._height},n._exportGeoJSONGeometry=function(){return{type:"Polygon",coordinates:Sr.toNumberArrays([this.getShell()])}},n._toJSON=function(e){var t=C({},e),n=this.getCoordinates();t.geometry=!1;var r=this.toGeoJSON(t);return r.geometry={type:"Polygon"},{feature:r,subType:"Rectangle",coordinates:[n.x,n.y],width:this.getWidth(),height:this.getHeight()}},t}(ua);Ta.registerJSONType("Rectangle");var ka=function(e){function t(t,n,r,i,o){var a;return(a=e.call(this,t,n,o)||this).startAngle=r,a.endAngle=i,a}Ae(t,e),t.fromJSON=function(e){var n=e.feature,r=new t(e.coordinates,e.radius,e.startAngle,e.endAngle,e.options);return r.setProperties(n.properties),r};var n=t.prototype;return n.getStartAngle=function(){return this.startAngle},n.setStartAngle=function(e){return this.startAngle=e,this.onShapeChanged(),this},n.getEndAngle=function(){return this.endAngle},n.setEndAngle=function(e){return this.endAngle=e,this.onShapeChanged(),this},n.getShell=function(){for(var e,t,n,r=this._getMeasurer(),i=this.getCoordinates(),o=this.options.numberOfShellPoints-2,a=this.getRadius(),s=[i.copy()],l=this.getStartAngle(),c=this.getEndAngle()-l,u=0;up?!(f>p&&f=h&&f<=p,l.distanceTo(s)<=a.width/2+o&&g},n._computeGeodesicLength=function(){return P(this._radius)?0:2*Math.PI*this._radius*Math.abs(this.startAngle-this.endAngle)/360+2*this._radius},n._computeGeodesicArea=function(){return P(this._radius)?0:Math.PI*Math.pow(this._radius,2)*Math.abs(this.startAngle-this.endAngle)/360},n._toJSON=function(e){var t=C({},e),n=this.getCenter();t.geometry=!1;var r=this.toGeoJSON(t);return r.geometry={type:"Polygon"},{feature:r,subType:"Sector",coordinates:[n.x,n.y],radius:this.getRadius(),startAngle:this.getStartAngle(),endAngle:this.getEndAngle()}},t}(Ca);ka.mergeOptions({numberOfShellPoints:60}),ka.registerJSONType("Sector");var Ma=function(e){function t(){return e.apply(this,arguments)||this}Ae(t,e);var n=t.prototype;return n._arc=function(e,t,n){for(var r=this.options.arcDegree*Math.PI/180,i=1,o=t.length;i0},t._getConnectors=function(e){return e.__connectors};var n=t.prototype;return n.getConnectSource=function(){return this._connSource},n.setConnectSource=function(e){var t=this._connTarget;return this.onRemove(),this._connSource=e,this._connTarget=t,this.onAdd(),this},n.getConnectTarget=function(){return this._connTarget},n.setConnectTarget=function(e){var t=this._connSource;return this.onRemove(),this._connSource=t,this._connTarget=e,this._updateCoordinates(),this._registerEvents(),this},n._updateCoordinates=function(){var e=this.getMap();if(!e&&this._connSource&&(e=this._connSource.getMap()),!e&&this._connTarget&&(e=this._connTarget.getMap()),e&&this._connSource&&this._connTarget){for(var t,n,r=this._connSource._getConnectPoints(),i=this._connTarget._getConnectPoints(),o=0,a=this.getCoordinates(),s=0,l=r.length;s0;for(var o=[],a=0,s=e.length;a=0;t--)e[t]instanceof Uo||(e[t]=this.getGeometryById(e[t])),e[t]&&this===e[t].getLayer()&&e[t].remove();return this.fire("removegeo",{geometries:e}),this},n.clear=function(){this._clearing=!0,this.forEach((function(e){e.remove()})),this._geoMap={};var e=this._geoList;this._geoList=[];var t=this._getRenderer();return t&&(t.onGeometryRemove(e),t.clearImageData&&t.clearImageData()),this._clearing=!1,this.fire("clear"),this},n.onRemoveGeometry=function(e){if(e&&!this._clearing&&(this===e.getLayer()&&!P(e._getInternalId()))){var t=e.getId();P(t)||delete this._geoMap[t];var n=this._findInList(e);n>=0&&this._geoList.splice(n,1),this._getRenderer()&&this._getRenderer().onGeometryRemove([e])}},n.getStyle=function(){return this.options.style?this.options.style:null},n.setStyle=function(e){return this.options.style=e,e=mn(e),this._cookedStyles=Dt(e),this.forEach((function(e){this._styleGeometry(e)}),this),this.fire("setstyle",{style:e}),this},n._styleGeometry=function(e){if(!this._cookedStyles)return!1;for(var t=Nt(e),n=0,r=this._cookedStyles.length;n0?i=n-1:r=n+1}return-1},n._onGeometryEvent=function(e){if(e&&e.target){var t=e.type;"idchange"===t?this._onGeometryIdChange(e):"zindexchange"===t?this._onGeometryZIndexChange(e):"positionchange"===t?this._onGeometryPositionChange(e):"shapechange"===t?this._onGeometryShapeChange(e):"symbolchange"===t?this._onGeometrySymbolChange(e):"show"===t?this._onGeometryShow(e):"hide"===t?this._onGeometryHide(e):"propertieschange"===t&&this._onGeometryPropertiesChange(e)}},n._onGeometryIdChange=function(e){if(e.new!==e.old||!this._geoMap[e.old]||this._geoMap[e.old]!==e.target){if(!P(e.new)){if(this._geoMap[e.new])throw new Error("Duplicate geometry id in layer("+this.getId()+"):"+e.new);this._geoMap[e.new]=e.target}P(e.old)||e.new===e.old||delete this._geoMap[e.old]}},n._onGeometryZIndexChange=function(e){e.old!==e.new&&(this._updateZIndex(e.new),this._toSort=!0,this._getRenderer()&&this._getRenderer().onGeometryZIndexChange(e))},n._onGeometryPositionChange=function(e){this._getRenderer()&&this._getRenderer().onGeometryPositionChange(e)},n._onGeometryShapeChange=function(e){this._getRenderer()&&this._getRenderer().onGeometryShapeChange(e)},n._onGeometrySymbolChange=function(e){this._getRenderer()&&this._getRenderer().onGeometrySymbolChange(e)},n._onGeometryShow=function(e){this._getRenderer()&&this._getRenderer().onGeometryShow(e)},n._onGeometryHide=function(e){this._getRenderer()&&this._getRenderer().onGeometryHide(e)},n._onGeometryPropertiesChange=function(e){this._getRenderer()&&this._getRenderer().onGeometryPropertiesChange(e)},n._hasGeoListeners=function(e){if(!e)return!1;Array.isArray(e)||(Ha[0]=e,e=Ha);for(var t=this.getGeometries()||[],n=0,r=t.length;n0)return!0}return!1},t}(Vo);Va.mergeOptions({drawImmediate:!1});var Wa=new Zr,Ga={debug:!1,enableSimplify:!0,geometryEvents:!0,defaultIconSize:[20,20],cacheVectorOnCanvas:!0,cacheSvgOnCanvas:ve.gecko,enableAltitude:!1,altitudeProperty:"altitude",drawAltitude:!1,sortByDistanceToCamera:!1,roundPoint:!1,altitude:0,clipBBoxBufferSize:3,geometryEventTolerance:1},Ka=function(e){function t(t,n,r){return e.call(this,t,n,r)||this}Ae(t,e);var n=t.prototype;return n.onConfig=function(t){if(e.prototype.onConfig.call(this,t),t.enableAltitude||t.drawAltitude||t.altitudeProperty){var n=this.getRenderer();n&&n.setToRedraw&&n.setToRedraw()}},n.identify=function(e,t){void 0===t&&(t={});var n=this.getRenderer();e instanceof Sr||(e=new Sr(e));var r=this.getMap().coordToContainerPoint(e);return t.onlyVisible&&n&&n.identifyAtPoint?n.identifyAtPoint(r,t):this._hitGeos(this._geoList,r,t)},n.identifyAtPoint=function(e,t){void 0===t&&(t={});var n=this.getRenderer();return e instanceof xe||(e=new xe(e)),t.onlyVisible&&n&&n.identifyAtPoint?n.identifyAtPoint(e,t):this._hitGeos(this._geoList,e,t)},n._hitGeos=function(e,t,n){void 0===n&&(n={});var r=n.filter,i=[],o=n.tolerance,a=this.getMap(),s=this.getRenderer(),l=s&&s.getImageData&&s.getImageData();if(l){for(var c=0,u=e.length-1;u>=0;u--){var d=e[u]._hitTestTolerance()+(o||0);d>c&&(c=d)}var f=a.getDevicePixelRatio();l.r=f;for(var h=!1,p=t.x-c,g=t.y-c,m=-c;m<=c;m++){for(var v=-c;v<=c;v++){var A=Math.round((p+m)*f),y=Math.round((g+v)*f)*l.width*4+4*A;if(l.data[y+3]>0){h=!0;break}}if(h)break}if(!h)return i}for(var b=e.length-1;b>=0;b--){var _=e[b];if(_&&_.isVisible()&&_._getPainter()&&_.options.interactive){if(!(_ instanceof ga)||!_._getArrowStyle()&&!(_ instanceof Ma)){var w=_.getContainerExtent(Wa);if(o&&(w=w._expand(o)),!w||!w.contains(t))continue}if(_._containsPoint(t,o)&&(!r||r(_))&&(i.push(_),n.count&&i.length>=n.count))break}}return i},n.getAltitude=function(){return this.options.altitude||0},n.toJSON=function(e){e||(e={});var t={type:this.getJSONType(),id:this.getId(),options:this.config()};if(P(e.geometries)||e.geometries){var n;if(e.clipExtent){var r=this.getMap(),i=r?r.getProjection():null;n=new Br(e.clipExtent,i)}for(var o=[],a=this.getGeometries(),s=0,l=a.length;s=0||t[r].indexOf("touchstart")>=0){n=!0;break}if(n){var i=this.getMap();this._mapDraggable=i.options.draggable,i.config({draggable:!1})}},n._restoreMapCfg=function(){var e=this.getMap();e.config({doubleClickZoom:this._mapDoubleClickZoom}),P(this._mapDraggable)||e.config("draggable",this._mapDraggable),delete this._mapDraggable,delete this._mapDoubleClickZoom},n._loadResources=function(){var e=Vt(this.getSymbol());e.length>0&&this._drawToolLayer._getRenderer().loadResources(e)},n._getProjection=function(){return this._map.getProjection()},n._getRegisterMode=function(){var e=this.getMode(),n=t.getRegisterMode(e);if(!n)throw new Error(e+" is not a valid mode of DrawTool.");return n},n.getEvents=function(){var e=this._getRegisterMode().action,t={};if(Array.isArray(e)){for(var n=0;n0&&r.equals(c[c.length-1]))return;l.update(s,c.concat(i,[r]),this._geometry,e)}else l.update(s,r,this._geometry,e);this._fireEvent("mousemove",e)}}}else this._createGeometry(e)},n._doubleClickHandler=function(e){if(this._geometry){var t=this._getMouseContainerPoint(e);if(this._isValidContainerPoint(t)){var n=this._getRegisterMode(),r=this._clickCoords;if(!(r.length<2)){var i=this.getMode();if(!(i&&i.indexOf("polygon")>-1&&r.length<3)){for(var o=this.getMap().getProjection(),a=[r[0]],s=1,l=r.length;s=0||t[0].indexOf("touchstart")>=0)&&Ln(e.domEvent),e.containerPoint},n._isValidContainerPoint=function(e){var t=this._map.getSize(),n=t.width,r=t.height;return!(e.x<0||e.y<0)&&!(e.x>n||e.y>r)},n._getSnapResult=function(e,t){var n=this.getMap(),r=[];if(this.options.edgeAutoComplete){var i=this._clickCoords[(this._historyPointer||1)-1];r.push(n._prjToContainerPoint(i));var o=this._clickCoords[(this._historyPointer||1)-2];o&&r.push(n._prjToContainerPoint(o))}var a=e(t,r);t=(a.effectedVertex?a.point:a)||t;var s=n._containerPointToPrj(t);return a.effectedVertex&&(a.effectedVertex=a.effectedVertex.map((function(e){return n._containerPointToPrj(e)}))),{prjCoord:s,effectedVertex:a.effectedVertex||[]}},n._getDrawLayer=function(){var e=v+"drawtool",t=this._map.getLayer(e);return t||(t=new Ka(e,{enableSimplify:!1,enableAltitude:this.options.enableAltitude}),this._map.addLayer(t)),t},n._fireEvent=function(e,t){t||(t={}),t=C({},t),this._geometry&&(t.geometry=this._getRegisterMode().generate(this._geometry,{drawTool:this}),t.tempGeometry=this._geometry),Ya.prototype._fireEvent.call(this,e,t)},t}(Ya);$a.mergeOptions({symbol:{lineColor:"#000",lineWidth:2,lineOpacity:1,polygonFill:"#fff",polygonOpacity:.3},doubleClickZoom:!1,mode:null,once:!1,autoPanAtEdge:!1,ignoreMouseleave:!0,blockGeometryEvents:!1});var Qa=function(e){function t(t){var n;return(n=e.call(this,t)||this).drawTool=new $a({mode:"boxZoom",ignoreMouseleave:!1}),n}Ae(t,e);var n=t.prototype;return n.addHooks=function(){this.target.on("_mousedown",this._onMouseDown,this)},n.removeHooks=function(){this.target.off("_mousedown",this._onMouseDown,this),this.drawTool.isEnabled()&&this.drawTool.remove()},n._onMouseDown=function(e){this.target.options.boxZoom&&e.domEvent.shiftKey&&this.drawTool.setSymbol(this.target.options.boxZoomSymbol).on("drawend",this._boxZoom,this).addTo(this.target)},n._boxZoom=function(e){var t=this.target;this.drawTool.remove();var n=e.geometry,r=n.getCenter(),i=n.getSymbol(),o=i.markerWidth,a=i.markerHeight,s=new Br(r,t.locateByPoint(r,o,a),t.getProjection()),l=t.getFitZoom(s);t._animateTo({center:s.getCenter(),zoom:l})},t}(pr);qo.mergeOptions({boxZoom:!0,boxZoomSymbol:{markerType:"rectangle",markerLineWidth:3,markerLineColor:"#1bbc9b",markerLineDasharray:[10,5],markerFillOpacity:.1,markerFill:"#1bbc9b",markerWidth:1,markerHeight:1}}),qo.addOnLoadHook("addHandler","boxZoom",Qa);var Ja=30,es=function(e){function t(){return e.apply(this,arguments)||this}Ae(t,e);var n=t.prototype;return n.addHooks=function(){this.target&&this.target.on("_mousemove",this._onMouseMove,this)},n.removeHooks=function(){this.target&&this.target.off("_mousemove",this._onMouseMove,this)},n._onMouseMove=function(e){var t=this.target;if(t.options.autoPanAtEdge){var n=e.containerPoint,r=t.getContainerExtent();if(r){var i,o=n.x,a=n.y,s=r.xmax,l=r.ymax;os&&(i=[-Math.abs(o+Ja-s),0]),a+Ja>l&&(i=[0,-Math.abs(a+Ja-l)]),i&&t.panBy(i,{duration:1})}}},t}(pr);function ts(e,t,n){return e*(1-n)+t*n}qo.mergeOptions({autoPanAtEdge:!1}),qo.addOnLoadHook("addHandler","autoPanAtEdge",es),qo.include({animateTo:function(e,t,n){var r=this;void 0===t&&(t={}),R(t)&&(n=t,t={});var i=this.getProjection(),o=this.getView(),a={},s=!0;for(var l in e)if(L(e,l)&&!P(e[l])&&("prjCenter"===l||!P(o[l])))if(s=!1,"center"===l){var c=new Sr(o[l]),u=new Sr(e[l]);c.equals(u)||(a.center=[c,u])}else if("prjCenter"===l){var d=new Sr(this._getPrjCenter()),f=new Sr(e[l]);d.equals(f)||(a.prjCenter=[d,f])}else o[l]!==e[l]&&"around"!==l&&(a[l]=[o[l],e[l]]);if(s)return null;this._animPlayer&&(this._isInternalAnimation?"running"===this._animPlayer.playState&&(this._animPlayer.pause(),this._prevAnimPlayer=this._animPlayer):(delete this._prevAnimPlayer,this._stopAnim(this._animPlayer)));var h=e.around||new xe(this.width/2,this.height/2),p=this._getRenderer(),g=this._animPlayer=sa.animate(a,{easing:t.easing||"out",duration:t.duration||this.options.zoomAnimationDuration,framer:function(e){p.callInNextFrame(e)},repeat:t.repeat},(function(e){if(r.isRemoved())g.finish();else{if("running"===g.playState){if(e.styles.center){var o=e.styles.center;r._setPrjCenter(i.project(o)),r.onMoving(r._parseEventFromCoord(r.getCenter()))}else if(e.styles.prjCenter){var s=e.styles.prjCenter;r._setPrjCenter(s),r.onMoving(r._parseEventFromCoord(r.getCenter()))}P(e.styles.zoom)||r.onZooming(e.styles.zoom,h),P(e.styles.pitch)||r._setPitch(e.styles.pitch),P(e.styles.bearing)||r._setBearing(e.styles.bearing),r._fireEvent("animating")}else"paused"===g.playState&&g!==r._mapAnimPlayer||(g._interupted||(a.center?r._setPrjCenter(i.project(a.center[1])):a.prjCenter&&r._setPrjCenter(a.prjCenter[1]),P(a.pitch)||r._setPitch(a.pitch[1]),P(a.bearing)||r._setBearing(a.bearing[1])),r._endAnim(g,a,h,t));n&&n(e)}}),this);return this._startAnim(a,h),g},_animateTo:function(e,t,n){return void 0===t&&(t={}),this._mapAnimPlayer&&this._stopAnim(this._mapAnimPlayer),this._isInternalAnimation=!0,this._mapAnimPlayer=this.animateTo(e,t,n),delete this._isInternalAnimation,this._mapAnimPlayer},flyTo:function(e,t,n){var r=this;void 0===t&&(t={}),this._animPlayer&&(this._isInternalAnimation?"running"===this._animPlayer.playState&&(this._animPlayer.pause(),this._prevAnimPlayer=this._animPlayer):(delete this._prevAnimPlayer,this._stopAnim(this._animPlayer))),R(t)&&(n=t,t={}),t=C({curve:1.42},t);var i=this;function o(e,t){return i.getResolution(t)/i.getResolution(e)}var a=e.around||new xe(this.width/2,this.height/2),s=this.getMinZoom(),l=this.getMaxZoom(),c=this.getProjection(),u=this.getView(),d=u.zoom,f=u.bearing,h=u.pitch,p="zoom"in e?je(+e.zoom,s,l):d,g="bearing"in e?+e.bearing:f,m="pitch"in e?+e.pitch:h,v=c.project(e.center&&new Sr(e.center)||this.getCenter()),A=o(p,d),y=c.project(this.getCenter()),b=v.sub(y),_=t.curve,w=Math.max(this.width,this.height),x=w/A,E=b.mag();if("minZoom"in t){var S=je(Math.min(t.minZoom,d,p),s,l),P=w/o(S,d);_=Math.sqrt(P/E*2)}var T=_*_;function k(e){var t=(x*x-w*w+(e?-1:1)*T*T*E*E)/(2*(e?x:w)*T*E);return Math.log(Math.sqrt(t*t+1)-t)}function M(e){return(Math.exp(e)-Math.exp(-e))/2}function O(e){return(Math.exp(e)+Math.exp(-e))/2}var I=k(0),L=function(e){return O(I)/O(I+_*e)},N=function(e){return w*((O(I)*function(e){return M(e)/O(e)}(I+_*e)-M(I))/T)/E},D=(k(1)-I)/_;if(Math.abs(E)<1e-6||!isFinite(D)){if(Math.abs(w-x)<1e-6)return this.animateTo(e,t,n);var F=x0&&(o=1/Math.sqrt(o),e[0]=t[0]*o,e[1]=t[1]*o,e[2]=t[2]*o),e}function ps(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 gs(e,t){var n=t[0]-e[0],r=t[1]-e[1],i=t[2]-e[2];return Math.hypot?Math.hypot(n,r,i):function(){var e=0,t=arguments.length;for(;t--;)e+=arguments[t]*arguments[t];return Math.sqrt(e)}(n,r,i)}function ms(e,t,n){var r=t[0],i=t[1],o=t[2],a=1/(n[3]*r+n[7]*i+n[11]*o+n[15]);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}qo.include({_registerDomEvents:function(){Mn(this._panels.mapWrapper||this._containerDOM,ns,this._handleDOMEvent,this)},_removeDomEvents:function(){On(this._panels.mapWrapper||this._containerDOM,ns,this._handleDOMEvent)},_handleDOMEvent:function(e){var t=this.options.clickTimeThreshold,n=e.type,r="mousedown"===n||"touchstart"===n&&(!e.touches||1===e.touches.length);r&&(this._domMouseDownTime=S(),this._domMouseDownView=this.getView());var i="contextmenu"===n&&function(e){if(!e._domMouseDownView)return!0;var t=e.getView(),n=e._domMouseDownView;return t.bearing!==n.bearing||t.pitch!==n.pitch}(this);if("contextmenu"===n){In(e);var o=this._domMouseDownTime;S()-o<=t&&!i&&this._fireDOMEvent(this,e,"dom:"+e.type)}else this._fireDOMEvent(this,e,"dom:"+e.type);if(!this._ignoreEvent(e)){var a,s=!1;if(r)this._mouseDownTime=S();else if("click"===n||"touchend"===n||"contextmenu"===n){if(!this._mouseDownTime)return;var l=this._mouseDownTime;if(delete this._mouseDownTime,S()-l>t){if("click"===n||"contextmenu"===n)return}else if("contextmenu"===n){if(i)return}else"touchend"===n&&(s=!0)}s&&(this._clickTime&&S()-this._clickTime<=t?(delete this._clickTime,a="dblclick",this._fireDOMEvent(this,e,"dom:dblclick")):(this._clickTime=S(),a="click",this._fireDOMEvent(this,e,"dom:click"))),this._ignoreEvent(e)||(this._fireDOMEvent(this,e,n),a&&this._fireDOMEvent(this,e,a))}},_ignoreEvent:function(e){if(!e||!this._panels.control)return!1;if(this._isEventOutMap(e))return!0;var t,n=e.srcElement||e.target;if(n)for(;n&&n!==this._containerDOM;){if(n.className&&n.className.indexOf&&(n.className.indexOf("maptalks-control")>=0||n.className.indexOf("maptalks-ui")>=0&&t&&!t.eventsPropagation))return!0;t=n,n=n.parentNode}return!1},_isEventOutMap:function(e){if(this.getPitch()>this.options.maxVisualPitch){var t=jn(this._getActualEvent(e),this._containerDOM);if(!this.getContainerExtent().contains(t))return!0}return!1},_parseEvent:function(e,t){if(!e)return null;var n={domEvent:e};if("keypress"!==t){var r=this._getActualEvent(e);if(r&&void 0!==r.clientX){var i=jn(r,this._containerDOM);n=C(n,{containerPoint:i,viewPoint:this.containerPointToViewPoint(i)});var o=this.options.maxVisualPitch;(this.getPitch()<=o||i.y>=this.height-this._getVisualHeight(o))&&(n=C(n,{coordinate:this.containerPointToCoord(i),point2d:this._containerPointToPoint(i)}))}}return n},_parseEventFromCoord:function(e){var t=this.coordToContainerPoint(e);return{coordinate:e,containerPoint:t,viewPoint:this.containerPointToViewPoint(t),point2d:this.coordToPoint(e)}},_getActualEvent:function(e){return e.touches&&e.touches.length>0?e.touches[0]:e.changedTouches&&e.changedTouches.length>0?e.changedTouches[0]:e},_fireDOMEvent:function(e,t,n){if(!this.isRemoved()){var r=this._parseEvent(t,n);this._fireEvent(n,r)}},_getEventParams:function(e){var t=this,n={domEvent:e},r=e.touches&&e.touches.length>0?e.touches[0]:e.changedTouches&&e.changedTouches.length>0?e.changedTouches[0]:e;if(r){var i=jn(r,t._containerDOM);n.coordinate=t.containerPointToCoordinate(i),n.containerPoint=i,n.viewPoint=t.containerPointToViewPoint(i),n.pont2d=t._containerPointToPoint(i)}return n}}),qo.addOnLoadHook("_registerDomEvents"),qo.include({isFullScreen:function(){return!!(document.webkitIsFullScreen||document.mozFullScreen||document.msFullscreenElement||document.fullscreenElement)},requestFullScreen:function(e){return this._fireEvent("fullscreenstart"),this._requestFullScreen(e||this._containerDOM),this._fireEvent("fullscreenend"),this},cancelFullScreen:function(){return this._cancelFullScreen(),this._fireEvent("cancelfullscreen"),this},_requestFullScreen:function(e){if(e.requestFullscreen)e.requestFullscreen();else if(e.mozRequestFullScreen)e.mozRequestFullScreen();else if(e.webkitRequestFullScreen)e.webkitRequestFullScreen();else if(e.msRequestFullScreen)e.msRequestFullScreen();else{var t="fullscreen=1,status=no,resizable=yes,top=0,left=0,scrollbars=no,titlebar=no,menubar=no,location=no,toolbar=no,z-look=yes,width="+(screen.availWidth-8)+",height="+(screen.availHeight-45);null!==window.open(location.href,"_blank",t)&&(window.opener=null,window.close())}},_cancelFullScreen:function(){if(document.exitFullscreen)document.exitFullscreen();else if(document.mozCancelFullScreen)document.mozCancelFullScreen();else if(document.webkitCancelFullScreen)document.webkitCancelFullScreen();else{null!==window.open(location.href,"_blank","fullscreen=no,status=yes,resizable=yes,scrollbars=no,titlebar=no,menubar=yes,location=yes,toolbar=yes,z-look=yes")&&(window.opener=null,window.close())}}}),qo.include({panTo:function(e,t,n){if(void 0===t&&(t={}),!e)return this;if(R(t)&&(n=t,t={}),e=new Sr(e),"undefined"===typeof t.animation||t.animation){var r=this.getProjection().project(e);return this._panAnimation(r,t.duration,n)}return this.setCenter(e),this},_panTo:function(e,t){return void 0===t&&(t={}),"undefined"===typeof t.animation||t.animation?this._panAnimation(e,t.duration):(this.onMoveStart(),this._setPrjCenter(e),this.onMoveEnd(this._parseEventFromCoord(this.getCenter())),this)},panBy:function(e,t,n){if(void 0===t&&(t={}),!e)return this;if(R(t)&&(n=t,t={}),e=new xe(e),this.getContainerExtent().ymin>0&&e.y>30){var r=e.y;e.y=30,e.x=30*e.x/r,console.warn("offset is limited to panBy when pitch is above maxPitch")}if(this.onMoveStart(),"undefined"===typeof t.animation||t.animation){e=e.multi(-1);var i=this._containerPointToPrj(new xe(this.width/2+e.x,this.height/2+e.y));this._panAnimation(i,t.duration,n)}else this._offsetCenterByPixel(e),this.onMoveEnd(this._parseEventFromCoord(this.getCenter()));return this},_panAnimation:function(e,t,n){return this._animateTo({prjCenter:e},{duration:t||this.options.panAnimationDuration},n)}}),Uo.fromJSON=function(e){if(Array.isArray(e)){for(var t=[],n=0,r=e.length;n=0&&!(e.count&&l.length>=e.count);c--){var u=o[c];if(u&&u.getMap()&&(e.includeInvisible||u.isVisible())&&(e.includeInternals||!(u.getId().indexOf(v)>=0))){var d=n(u);d&&(Array.isArray(d)?Me(l,d):l.push(d))}}return t.call(this,l),this}}),qo.include({_zoom:function(e,t){this.options.zoomable&&!this.isZooming()&&(t=this._checkZoomOrigin(t),e=this._checkZoom(e),this.onZoomStart(e,t),this._frameZoom=this.getZoom(),this.onZoomEnd(e,t))},_zoomAnimation:function(e,t,n){this.options.zoomable&&!this.isZooming()&&(e=this._checkZoom(e),this.getZoom()!==e&&(t=this._checkZoomOrigin(t),this._startZoomAnim(e,t,n)))},_checkZoomOrigin:function(e){return e&&!this.options.zoomInCenter||(e=new xe(this.width/2,this.height/2)),this.options.zoomOrigin&&(e=new xe(this.options.zoomOrigin)),e},_startZoomAnim:function(e,t,n){P(n)&&(n=1);var r=this._getResolution(this._startZoomVal)/this._getResolution(e),i=this.options.zoomAnimationDuration*Math.abs(r-n)/Math.abs(r-1);this._frameZoom=this._startZoomVal,this._animateTo({zoom:e,around:t},{continueOnViewChanged:!0,duration:i})},onZoomStart:function(e,t){this.options.zoomable&&!this.isZooming()&&(this._mapAnimPlayer&&this._stopAnim(this._mapAnimPlayer),this._zooming=!0,this._startZoomVal=this.getZoom(),this._startZoomCoord=this._containerPointToPrj(t),this._fireEvent("zoomstart",{from:this._startZoomVal,to:e}))},onZooming:function(e,t,n){if(this.options.zoomable&&this._frameZoom!==e){P(n)&&(n=1),this._zoomTo(e,t);var r=this.getResolution(e),i=this.getResolution(this._startZoomVal)/r/n,o=this._prjToContainerPoint(this._startZoomCoord,this._startZoomVal),a=this.getViewPoint();if(!this.isRotating()&&!o.equals(t)&&1!==i){var s=this.getPitch(),l=o._sub(t)._multi(1/(1-i));s&&(l.y/=Math.cos(s*Math.PI/180)),t=t.add(l)}var c={view:[i,0,0,i,(t.x-a.x)*(1-i),(t.y-a.y)*(1-i)]},u=this.getDevicePixelRatio();1!==u&&(t=t.multi(u)),c.container=[i,0,0,i,t.x*(1-i),t.y*(1-i)],this._fireEvent("zooming",{from:this._startZoomVal,to:e,origin:t,matrix:c}),this._frameZoom=e}},onZoomEnd:function(e,t){if(this.options.zoomable){var n=this._startZoomVal;this._zoomTo(e,t),this._zooming=!1,this._getRenderer().onZoomEnd(),this._fireEvent("zoomend",{from:n,to:e}),this._verifyExtent(this._getPrjCenter())||this._panTo(this._prjMaxExtent.getCenter())}},_zoomTo:function(e,t){this._zoomLevel=e,this._calcMatrices(),t&&this._setPrjCoordAtContainerPoint(this._startZoomCoord,t)},_checkZoom:function(e){var t=this.getMaxZoom(),n=this.getMinZoom();return et&&(e=t),e}});var vs=Math.PI/180,As=new Sr(0,0);function ys(){return ls(new Array(16))}qo.include({getFov:function(){return this._fov||(this._fov=.6435011087932844),this._fov/vs},setFov:function(e){if(this.isZooming())return this;if(e=Math.max(.01,Math.min(60,e)),this._fov===e)return this;var t=this.getFov();return this._fov=e*vs,this._calcMatrices(),this._renderLayers(),this._fireEvent("fovchange",{from:t,to:this.getFov()}),this},getBearing:function(){return this._angle?-this._angle/vs:0},setBearing:function(e){return this._mapAnimPlayer&&this._stopAnim(this._mapAnimPlayer),this._setBearing(e)},_setBearing:function(e){if(ve.ie9)throw new Error("map can't rotate in IE9.");var t=-Fe(e,-180,180)*vs;if(this._angle===t)return this;var n=this.getBearing();return this._fireEvent("rotatestart",{from:n,to:t}),this._angle=t,this._calcMatrices(),this._renderLayers(),this._fireEvent("rotate",{from:n,to:t}),this._fireEvent("rotateend",{from:n,to:t}),this},getPitch:function(){return this._pitch?this._pitch/Math.PI*180:0},setPitch:function(e){return this._mapAnimPlayer&&this._stopAnim(this._mapAnimPlayer),this._setPitch(e)},_setPitch:function(e){if(ve.ie9)throw new Error("map can't tilt in IE9.");var t=je(e,0,this.options.maxPitch)*vs;if(this._pitch===t)return this;var n=this.getPitch();return this._fireEvent("pitchstart",{from:n,to:t}),this._pitch=t,this._calcMatrices(),this._renderLayers(),this._fireEvent("pitch",{from:n,to:t}),this._fireEvent("pitchend",{from:n,to:t}),this},isTransforming:function(){return!(!this._pitch&&!this._angle)},getFrustumAltitude:function(){return this._frustumAltitude},_calcFrustumAltitude:function(){var e=90-this.getPitch(),t=this.getFov()/2,n=this.cameraPosition?this.cameraPosition[2]:0;if(t<=e)return n;t=Math.PI*t/180;var r=new xe(this.cameraPosition).distanceTo(new xe(this.cameraLookAt)),i=n*Math.tan(2*t);return n+Math.tan(t)*(r+i)},_pointToContainerPoint:function(e,t,n,r){void 0===n&&(n=0);var i=this._getResolution(t);return this._pointAtResToContainerPoint(e,i,n,r)},_pointAtResToContainerPoint:function(e,t,n,r){void 0===n&&(n=0),r||(r=new xe(0,0)),e=this._pointAtResToPoint(e,t,r);var i,o=this.isTransforming(),a=t/this._getResolution();return o||n||(i=this._prjToPoint(this._getPrjCenter(),void 0,As)),this._toContainerPoint(r,o,a,n,i),r},_pointsAtResToContainerPoints:function(e,t,n,r){void 0===n&&(n=[]),void 0===r&&(r=[]);var i=this.getPitch(),o=this.getBearing();if(0===i&&0===o){var a=this._get2DExtent(),s=a.xmin,l=a.ymin,c=a.xmax,u=a.ymax;if(c>s&&u>l){for(var d=t/this._getResolution(),f=this.getSize(),h=f.width,p=f.height,g=(c-s)/h,m=(u-l)/p,v=0,A=e.length;v0&&(t=t*Math.PI/180,2/Math.PI-t>e/2)){var o=Math.tan(e/2),a=Math.tan(t);i=Math.max(n*o/(1/a-o),i)}return(r+=i)+1},_calcCascadeMatrixes:function(){var e=ys();function t(t,n,r){var i=this.width,o=this.height,a=this.getFov()*Math.PI/180,s=this._getCameraFar(a,n),l=this.cameraCenterDistance;s=l+(s-l)/Math.cos((90-n)*Math.PI/180)*Math.cos((90-t)*Math.PI/180),rs(e,a,i/o,.1,s);var c=this.viewMatrix;return as(r,e,c)}return function(){var e=this.getPitch(),n=this.options.cascadePitches[0],r=this.options.cascadePitches[1],i=this.cascadeFrustumMatrix0=this.cascadeFrustumMatrix0||ys(),o=this.cascadeFrustumMatrix1=this.cascadeFrustumMatrix1||ys();e>n?t.call(this,e,n,i):cs(this.cascadeFrustumMatrix0,this.projViewMatrix),e>r?t.call(this,e,r,o):cs(this.cascadeFrustumMatrix1,this.cascadeFrustumMatrix0)}}(),_calcDomMatrix:function(){var e=ys(),t=ys(),n=[1,-1,1],r=[0,0,0];return function(){var i=this.width||1,o=this.height||1,a=.5/Math.tan(this._fov/2)*o;return os(e,this.projMatrix,n),is(e,e,us(r,0,0,-a)),this._pitch&&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],c=t[8],u=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+c*r,e[5]=a*i+u*r,e[6]=s*i+d*r,e[7]=l*i+f*r,e[8]=c*i-o*r,e[9]=u*i-a*r,e[10]=d*i-s*r,e[11]=f*i-l*r}(e,e,this._pitch),this._angle&&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],c=t[4],u=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+c*r,e[1]=a*i+u*r,e[2]=s*i+d*r,e[3]=l*i+f*r,e[4]=c*i-o*r,e[5]=u*i-a*r,e[6]=d*i-s*r,e[7]=f*i-l*r}(e,e,this._angle),ls(t),os(t,t,us(r,i/2,-o/2,1)),as(this.domCssMatrix||ys(),t,e)}}(),_getFovZ:function(e){var t=this.getGLScale(e),n=this._getFovRatio();return t*(this.height||1)/2/n},_getCameraWorldMatrix:function(){var e={};return function(){var t=this.getGLRes(),n=this._prjToPointAtRes(this._prjCenter,t);this.cameraLookAt=us(this.cameraLookAt||[0,0,0],n.x,n.y,0);var r=this.getPitch()*vs,i=this.getBearing()*vs,o=this._getFovZ(),a=o*Math.cos(r),s=Math.sin(r)*o,l=n.x-s*Math.sin(i),c=n.y-s*Math.cos(i);this.cameraPosition=us(this.cameraPosition||[0,0,0],l,c,a),this.cameraToCenterDistance=gs(this.cameraPosition,this.cameraLookAt);var u=s||1,d=this.cameraUp=us(this.cameraUp||[0,0,0],Math.sin(i)*u,Math.cos(i)*u,0),f=this.cameraWorldMatrix=this.cameraWorldMatrix||ys();!function(e,t,n,r){var i=[0,0,0],o=[0,0,0],a=[0,0,0];ds(a,t,n),0===fs(a)&&(a[2]=1),hs(a,a),ps(i,r,a),0===fs(a)&&(1===Math.abs(r[2])?a[0]+=1e-4:a[2]+=1e-4,hs(a,a),ps(i,r,a)),hs(i,i),ps(o,a,i),e[0]=i[0],e[4]=o[0],e[8]=a[0],e[1]=i[1],e[5]=o[1],e[9]=a[1],e[2]=i[2],e[6]=o[2],e[10]=a[2]}(f,this.cameraPosition,this.cameraLookAt,d);var h=this.cameraForward||[0,0,0];return ds(h,this.cameraLookAt,this.cameraPosition),this.cameraForward=hs(h,h),function(e,t){var n,r=t[0],i=t[4],o=t[8],a=t[1],s=t[5],l=t[9],c=t[2],u=t[6],d=t[10],f=r+s+d;f>0?(n=.5/Math.sqrt(f+1),e.w=.25/n,e.x=(u-l)*n,e.y=(o-c)*n,e.z=(a-i)*n):r>s&&r>d?(n=2*Math.sqrt(1+r-s-d),e.w=(u-l)/n,e.x=.25*n,e.y=(i+a)/n,e.z=(o+c)/n):s>d?(n=2*Math.sqrt(1+s-r-d),e.w=(o-c)/n,e.x=(i+a)/n,e.y=.25*n,e.z=(l+u)/n):(n=2*Math.sqrt(1+d-r-s),e.w=(a-i)/n,e.x=(o+c)/n,e.y=(l+u)/n,e.z=.25*n)}(e,f),function(e,t){var n=e,r=t.x,i=t.y,o=t.z,a=t.w,s=r+r,l=i+i,c=o+o,u=r*s,d=r*l,f=r*c,h=i*l,p=i*c,g=o*c,m=a*s,v=a*l,A=a*c;n[0]=1-(h+g),n[4]=d-A,n[8]=f+v,n[1]=d+A,n[5]=1-(u+g),n[9]=p-m,n[2]=f-v,n[6]=p+m,n[10]=1-(u+h),n[3]=0,n[7]=0,n[11]=0,n[12]=0,n[13]=0,n[14]=0,n[15]=1}(f,e),function(e,t){var n=e;n[12]=t[0],n[13]=t[1],n[14]=t[2]}(f,this.cameraPosition),f}}(),_getFovRatio:function(){var e=this.getFov();return Math.tan(e/2*vs)},_renderLayers:function(){this.isInteracting()||this._getLayers().forEach((function(e){if(e){var t=e._getRenderer();t&&t.setToRedraw&&t.setToRedraw()}}))}}),qo.include({_onViewChange:function(e){this._viewHistory||(this._viewHistory=[],this._viewHistoryPointer=0);for(var t=this._getCurrentView(),n=this._viewHistory.length-1;n>=0;n--)if($e(e,this._viewHistory[n]))return this._viewHistoryPointer=n,void this._fireViewChange(t,e);this._viewHistoryPointer0&&this._viewHistory.length>r&&this._viewHistory.splice(0,this._viewHistory.length-r),this._viewHistoryPointer=this._viewHistory.length-1,this._fireViewChange(t,e)},zoomToPreviousView:function(e){if(void 0===e&&(e={}),!this.hasPreviousView())return null;var t=this._viewHistory[--this._viewHistoryPointer];return this._zoomToView(t,e),t},hasPreviousView:function(){return!(!this._viewHistory||0===this._viewHistoryPointer)},zoomToNextView:function(e){if(void 0===e&&(e={}),!this.hasNextView())return null;var t=this._viewHistory[++this._viewHistoryPointer];return this._zoomToView(t,e),t},hasNextView:function(){return!(!this._viewHistory||this._viewHistoryPointer===this._viewHistory.length-1)},_zoomToView:function(e,t){var n=this,r=this.getView();t.animation?this._animateTo(e,{duration:t.duration},(function(t){"finished"===t.state.playState&&n._fireViewChange(r,e)})):(this.setView(e),this._fireViewChange(r,e))},getViewHistory:function(){return this._viewHistory},_fireViewChange:function(e,t){this._fireEvent("viewchange",{old:e,new:t})},_getCurrentView:function(){return this._viewHistory?this._viewHistory[this._viewHistoryPointer]:null}}),qo.mergeOptions({viewHistory:!0,viewHistoryCount:10}),qo.include({getCollisionIndex:function(){return this._collisionIndex||this.createCollisionIndex(),this._collisionIndex||this.createCollisionIndex()},createCollisionIndex:function(){return this.clearCollisionIndex(),this._collisionIndex=new yr,this._collisionIndex},clearCollisionIndex:function(){return this.collisionFrameTime=0,this._collisionIndex&&this._collisionIndex.clear(),this}});var bs=function(e){function t(t){var n;return(n=e.call(this,t)||this).on("enable",n._afterEnable,ye(ye(n))).on("disable",n._afterDisable,ye(ye(n))),n._measureLayers=[],n}Ae(t,e);var n=t.prototype;return n.clear=function(){if(Be(this._measureLayers))for(var e=0;e0&&(i+="\n"),i+=t<5280?t.toFixed(0)+n[2]:(t/5280).toFixed(2)+n[3]),i},n._registerMeasureEvents=function(){this.on("drawstart",this._msOnDrawStart,this).on("drawvertex",this._msOnDrawVertex,this).on("mousemove",this._msOnMouseMove,this).on("drawend",this._msOnDrawEnd,this)},n._afterEnable=function(){this._registerMeasureEvents()},n._afterDisable=function(){this.off("drawstart",this._msOnDrawStart,this).off("drawvertex",this._msOnDrawVertex,this).off("mousemove",this._msOnMouseMove,this).off("drawend",this._msOnDrawEnd,this)},n._msOnDrawStart=function(e){var t=this.getMap(),n=t._pointToPrj(e.point2d),r=Pe(),i="distancetool_"+r,o="distancetool_markers_"+r;t.getLayer(i)?(this._measureLineLayer=t.getLayer(i),this._measureMarkerLayer=t.getLayer(o)):(this._measureLineLayer=new Ka(i).addTo(t),this._measureMarkerLayer=new Ka(o).addTo(t)),this._measureLayers.push(this._measureLineLayer),this._measureLayers.push(this._measureMarkerLayer);var a=new ha(e.coordinate,{symbol:this.options.vertexSymbol});a._setPrjCoordinates(n);var s="zh-CN"===this.options.language?"\u8d77\u70b9":"start",l=new ja(s,e.coordinate,this.options.labelOptions);l._setPrjCoordinates(n),this._lastVertex=l,this._addVertexMarker(a,l)},n._msOnMouseMove=function(e){var t=this._measure(this._msGetCoordsToMeasure(e));if(!this._tailMarker){var n=gn(this.options.vertexSymbol);n.markerWidth/=2,n.markerHeight/=2,this._tailMarker=new ha(e.coordinate,{symbol:n}).addTo(this._measureMarkerLayer),this._tailLabel=new ja(t,e.coordinate,this.options.labelOptions).addTo(this._measureMarkerLayer)}var r=this._geometry._getPrjCoordinates(),i=r[r.length-1];this._tailMarker.setCoordinates(e.coordinate),this._tailMarker._setPrjCoordinates(i),this._tailLabel.setContent(t),this._tailLabel.setCoordinates(e.coordinate),this._tailLabel._setPrjCoordinates(i)},n._msGetCoordsToMeasure=function(e){return e.geometry.getCoordinates().concat([e.coordinate])},n._msOnDrawVertex=function(e){var t=this._geometry._getPrjCoordinates(),n=t[t.length-1],r=e.geometry,i=new ha(e.coordinate,{symbol:this.options.vertexSymbol}),o=this._measure(r),a=new ja(o,e.coordinate,this.options.labelOptions);this._addVertexMarker(i,a),a._setPrjCoordinates(n),i._setPrjCoordinates(n),this._lastVertex=a},n._addVertexMarker=function(e,t){this._vertexes||(this._vertexes=[]),void 0!==this._historyPointer&&this._vertexes.length>this._historyPointer-1&&(this._vertexes.length=this._historyPointer-1),this._vertexes.push({label:t,marker:e}),this._measureMarkerLayer.addGeometry(e),t&&this._measureMarkerLayer.addGeometry(t)},n._msOnDrawEnd=function(e){if(this._clearTailMarker(),e.geometry._getPrjCoordinates().length<2)return this._lastMeasure=0,void this._clearMeasureLayers();var t=this._lastVertex.getSize();t||(t=new Kt(10,10)),this._addClearMarker(this._lastVertex.getCoordinates(),this._lastVertex._getPrjCoordinates(),t.width);var n=e.geometry.copy();n._setPrjCoordinates(e.geometry._getPrjCoordinates()),n.addTo(this._measureLineLayer),this._lastMeasure=n.getLength()},n._addClearMarker=function(e,t,n){var r=this.options.clearButtonSymbol,i={markerDx:(r.markerDx||0)+n,textDx:(r.textDx||0)+n};Array.isArray(r)&&(i=r.map((function(e){return e?{markerDx:(e.markerDx||0)+n,textDx:(e.textDx||0)+n}:null}))),r=gn(r,i);var o=new ha(e,{symbol:r}),a=this._measureLineLayer,s=this._measureMarkerLayer;o.on("click",(function(){return a.remove(),s.remove(),!1}),this),o.addTo(this._measureMarkerLayer),o._setPrjCoordinates(t)},n._clearTailMarker=function(){this._tailMarker&&(this._tailMarker.remove(),delete this._tailMarker),this._tailLabel&&(this._tailLabel.remove(),delete this._tailLabel)},n._clearMeasureLayers=function(){this._measureLineLayer.remove(),this._measureMarkerLayer.remove()},t}($a);bs.mergeOptions({mode:"LineString",language:"zh-CN",metric:!0,imperial:!1,symbol:{lineColor:"#000",lineWidth:3,lineOpacity:1},vertexSymbol:{markerType:"ellipse",markerFill:"#fff",markerLineColor:"#000",markerLineWidth:3,markerWidth:11,markerHeight:11},labelOptions:{textSymbol:{textFaceName:"monospace",textLineSpacing:1,textHorizontalAlignment:"right",textDx:15},boxStyle:{padding:[6,2],symbol:{markerType:"square",markerFill:"#fff",markerFillOpacity:.9,markerLineColor:"#b4b3b3"}}},clearButtonSymbol:[{markerType:"square",markerFill:"#fff",markerLineColor:"#b4b3b3",markerLineWidth:2,markerWidth:15,markerHeight:15,markerDx:20},{markerType:"x",markerWidth:10,markerHeight:10,markerDx:20}]});var _s=function(e){function t(t){var n;return(n=e.call(this,t)||this)._measureLayers=[],n}Ae(t,e);var n=t.prototype;return n._measure=function(e){var t,n,r=this.getMap();e instanceof Uo?t=r.computeGeometryArea(e):Array.isArray(e)&&(t=r.getProjection().measureArea(e)),this._lastMeasure=t,n="zh-CN"===this.options.language?[" \u5e73\u65b9\u7c73"," \u5e73\u65b9\u516c\u91cc"," \u5e73\u65b9\u82f1\u5c3a"," \u5e73\u65b9\u82f1\u91cc"]:[" sq.m"," sq.km"," sq.ft"," sq.mi"];var i="";if(this.options.metric&&(i+=t<1e6?t.toFixed(0)+n[0]:(t/1e6).toFixed(2)+n[1]),this.options.imperial){t*=3.2808399,i.length>0&&(i+="\n");var o=27878400;i+=t=3){if(s=new ua([o],{id:"polygon"}),i){var l=gn(i,{lineOpacity:0});s.setSymbol(l)}s.addTo(a)}s&&s._setPrjCoordinates(r)}},generate:function(e){var t=new ua(e.getCoordinates(),{symbol:e.getSymbol()});return t._setPrjCoordinates(e._getPrjCoordinates()),t._projCode=e._projCode,t}};$a.registerMode("polygon",C({action:["click","mousemove","dblclick"]},Ss)),$a.registerMode("freeHandPolygon",C({action:["mousedown touchstart","mousemove touchmove","mouseup touchend"]},Ss));var Cs={create:function(e,t){var n=t.map((function(t){return e.unproject(t)})),r=new ga(n);return r._setPrjCoordinates(t),r},update:function(e,t,n){var r;Array.isArray(t)?r=t:(r=n._getPrjCoordinates()).push(t);var i=r.map((function(t){return e.unproject(t)}));n.setCoordinates(i),n._setPrjCoordinates(r)},generate:function(e){return e}};function Ps(e){for(var t=e.tileInfo,n=[t.cols,t.rows],r=[],i=t.lods,o=0,a=i.length;o-1&&(o=2.3767925226029154e-9,(n||i)&&(o=2.518101729011901e-9),r&&(o=2.51528279553466e-9)),o}$a.registerMode("linestring",C({action:["click","mousemove","dblclick"]},Cs)),$a.registerMode("freeHandLinestring",C({action:["mousedown touchstart","mousemove touchmove","mouseup touchend"]},Cs)),$a.registerMode("arccurve",{action:["click","mousemove","dblclick"],create:function(e,t){var n=t.map((function(t){return e.unproject(t)})),r=new Oa(n);return r._setPrjCoordinates(t),r},update:Cs.update,generate:function(e){return e}}),$a.registerMode("quadbeziercurve",{action:["click","mousemove","dblclick"],create:function(e,t){var n=t.map((function(t){return e.unproject(t)})),r=new Ia(n);return r._setPrjCoordinates(t),r},update:Cs.update,generate:function(e){return e}}),$a.registerMode("cubicbeziercurve",{action:["click","mousemove","dblclick"],create:function(e,t){var n=t.map((function(t){return e.unproject(t)})),r=new Ra(n);return r._setPrjCoordinates(t),r},update:Cs.update,generate:function(e){return e}}),$a.registerMode("boxZoom",{action:["mousedown","mousemove","mouseup"],create:function(e,t){t=t[0];var n=e.unproject(t),r=new ha(n);return r._firstClick=t,r},update:function(e,t,n,r){var i=n.getMap(),o=i._prjToContainerPoint(n._firstClick),a=r.containerPoint;t=i._containerPointToPrj(new Sr(Math.min(o.x,a.x),Math.min(o.y,a.y)));var s=e.unproject(t);n.setCoordinates(s)._setPrjCoordinates(t),n.updateSymbol({markerWidth:Math.abs(o.x-a.x),markerHeight:Math.abs(o.y-a.y)})},generate:function(e){return e}}),Bo.loadArcgis=function(e,t,n){if(void 0===n&&(n={jsonp:!0}),O(e)&&"{"!==e.substring(0,1))tr.getJSON(e,(function(e,n){if(e)t(e);else{var r=Ps(n);t(null,r)}}),n);else{O(e)&&(e=ke(e));var r=Ps(e);t(null,r)}return this};var Ms="wmts";function Os(e,t){var n=e.getElementsByTagName(t);if(n&&n.length)return n;var r=Ms+":"+t;return e.getElementsByTagName(r)}function Rs(e,t){for(var n=0;n=0&&!isNaN(n[r]);r--)t=n[r]+t;return t}(n=(n=u.textContent).split("EPSG")[1]),n=function(e){var t=e.indexOf("EPSG")>-1?e:"EPSG:"+e;return Ts(t,[["4490","4326"],["102100","3857"],["900913","3857"]])}(n))}r||(r=e.getElementsByTagName("ows:Identifier")[0])&&(r=r.textContent),t.projection=n;for(var d=1/0,f=0;f0?s.push(1,-1,_,b):s.push(1,-1,b,_)}var w=ks(t),x=parseFloat(g)*w;a.push(x)}if(d>0)for(var E=a[0],S=d-1;S>=0;S--)E*=2,a.splice(0,0,E);return{resolutions:a,tileSize:l,tileSystem:s,projection:n,TileMatrixSet:r,isGeoServer:c,levelStr:i}}Bo.loadWMTS=function(e,t,n){return void 0===n&&(n={jsonp:!0}),O(e)&&tr.get(e,(function(r,i){if(r)t(r);else{var o=function(e,t,n){null==n.isArcgis&&(n.isArcgis=e.indexOf("arcgis")>-1),null==n.isSuperMap&&(n.isSuperMap=e.indexOf("supermap")>-1);var r=(new DOMParser).parseFromString(e,"text/xml").querySelectorAll("Contents")[0];if(!r)return[];var i=Os(r,"Layer");if(!i.length)return[];for(var o=[],a=0,s=r.childNodes.length;ar&&(d=-(s.x+c-r)-50),s.y-u<0?f=Math.abs(s.y-u)+50:s.y+u>i&&(f=i-(s.y+u)-50),c>=r&&(d=r/2-o.x),0!==f||0!==d){var h=o.add(d,f),p=e._containerPointToPoint(h)._sub(e._prjToPoint(e._getPrjCenter())),g=e._pointToPrj(e._prjToPoint(l).sub(p));e._panAnimation(g)}}},n._measureSize=function(e){var t=this._getUIContainer();e.style.position="absolute";var n=e.style.bottom?"bottom":"top";if(e.style.display="",t.appendChild(e),e.getBoundingClientRect){var r=e.getBoundingClientRect();this._size=new Kt(r.width,r.height)}else this._size=new Kt(e.clientWidth,e.clientHeight);return e.style.display="none",e.style.left="0px",e.style[n]="0px",this._size},n._removePrevDOM=function(){this.onDomRemove&&this.onDomRemove();var e=this.options.eventsToStop;if(this._singleton()){var t=this.getMap(),n=this._uiDomKey();if(t[n]){e&&Xn(t[n],e,Ln);var r=t[n]._uiComponent;r&&r!==this&&r.isVisible()&&r.fire("hide"),kn(t[n]),r&&!this.hideDom&&r._switchMapEvents("off"),delete t[n]}delete this.__uiDOM}else this.__uiDOM&&(e&&Xn(this.__uiDOM,e,Ln),kn(this.__uiDOM),delete this.__uiDOM);this._resizeObserver&&(this._resizeObserver.disconnect(),delete this._resizeObserver,delete this._domContentRect)},n._uiDomKey=function(){return"__ui_"+this._getClassName()},n._singleton=function(){return this.options.single},n._getUIContainer=function(){return this.getMap()._panels.ui},n._getClassName=function(){return"UIComponent"},n._switchMapEvents=function(e){var t=this.getMap();if(t){this._mapEventsOn="on"===e;var n=this._getDefaultEvents();if(this.getEvents&&C(n,this.getEvents()),n)for(var r in n)n.hasOwnProperty(r)&&t[e](r,n[r],this)}},n._switchEvents=function(e){var t=this._getOwnerEvents();if(this._owner)for(var n in t)t.hasOwnProperty(n)&&this._owner[e](n,t[n],this)},n._getDefaultEvents=function(){return{"zooming rotate pitch":this.onEvent,zoomend:this.onZoomEnd,moving:this.onMoving,moveend:this.onMoving,resize:this.onResize}},n._getOwnerEvents=function(){var e={};return this._owner&&this._owner instanceof Uo&&(e.positionchange=this.onGeometryPositionChange,e.symbolchange=this._updatePosition),this.getOwnerEvents&&C(e,this.getOwnerEvents()),e},n.onGeometryPositionChange=function(e){this._owner&&this.isVisible()&&(this._showBySymbolChange=!0,this.show(e.target.getCenter()),delete this._showBySymbolChange)},n.onMoving=function(){this.isVisible()&&this.getMap().isTransforming()&&this._updatePosition()},n.onEvent=function(){this.isVisible()&&this._updatePosition()},n.onZoomEnd=function(){this.isVisible()&&this._setPosition()},n.onResize=function(){this.isVisible()&&this._setPosition()},n.onDomSizeChange=function(){this.isVisible()&&this._setPosition()},n._updatePosition=function(){return this.getMap()?(this.getMap()._getRenderer().callInNextFrame(this._setPosition.bind(this)),this):this},n._setPosition=function(){var e=this.getDOM();if(e){e.style[Cn]=null;var t=this.getPosition();this._pos=t,e.style[En]=this._toCSSTranslate(t)+" scale(1)"}},n._toCSSTranslate=function(e){if(!e)return"";if(ve.any3d){var t=this.getMap(),n=t?t.getBearing():0,r=t?t.getPitch():0,i="";return this.options.pitchWithMap&&r&&(i+=" rotateX("+Math.round(r)+"deg)"),this.options.rotateWithMap&&n&&(i+=" rotateZ("+Math.round(-n)+"deg)"),"translate3d("+e.x+"px,"+e.y+"px, 0px)"+i}return"translate("+e.x+"px,"+e.y+"px)"},n._observerDomSize=function(e){var t=this;return e&&ve.resizeObserver&&!this._resizeObserver?(this._resizeObserver=new ResizeObserver((function(e){e.length?t._domContentRect=e[0].contentRect:delete t._domContentRect,t.onDomSizeChange&&t.onDomSizeChange()})),this._resizeObserver.observe(e),this):this},n.isSupportZoomFilter=function(){return!1},t.isSupport=function(e){return!!(e&&R(e.on)&&R(e.off)&&R(e.getCenter))},t}(fr(gr));Ls.mergeOptions({eventsPropagation:!1,eventsToStop:null,dx:0,dy:0,autoPan:!1,autoPanDuration:600,single:!0,animation:"scale",animationOnHide:!1,animationDuration:500,pitchWithMap:!1,rotateWithMap:!1,visible:!0,roundPoint:!1});var Ns="mousedown mouseup mouseenter mouseover mouseout mousemove click dblclick contextmenu keypress touchstart touchmove touchend",Ds=function(e){function t(t,n){var r;return(r=e.call(this,n)||this)._markerCoord=new Sr(t),r}Ae(t,e);var n=t.prototype;return n._getClassName=function(){return"UIMarker"},n.setCoordinates=function(e){return this._markerCoord=e,this.fire("positionchange"),this.isVisible()&&(this._coordinate=this._markerCoord,this._setPosition()),this},n.getCoordinates=function(){return this._markerCoord},n.getCenter=function(){return this.getCoordinates()},n.getAltitude=function(){var e=this.getCoordinates()||{};return T(e.z)?e.z:this.options.altitude||0},n.setContent=function(e){var t=this.options.content;return this.options.content=e,this.fire("contentchange",{old:t,new:e}),this.isVisible()&&this.show(),this},n.getContent=function(){return this.options.content},n.onAdd=function(){this.show()},n.show=function(){return e.prototype.show.call(this,this._markerCoord)},n.flash=function(e,t,n,r){return Je.call(this,e,t,n,r)},n.buildOn=function(){var e,t=this.options.content,n=O(t);return n||R(t)?(e=Pn("div"),n?e.innerHTML=this.options.content:t.bind(this)(e)):e=this.options.content,this.options.containerClass&&(e.className=this.options.containerClass),this._registerDOMEvents(e),e},n.getOffset=function(){var e=this.getSize();return new xe(-e.width/2,-e.height/2)},n.getTransformOrigin=function(){return"center center"},n.onDomRemove=function(){var e=this.getDOM();this._removeDOMEvents(e)},n.isDragging=function(){return!!this.draggable&&this.draggable.isDragging()},n._registerDOMEvents=function(e){Yn(e,Ns,this._onDomEvents,this)},n._onDomEvents=function(e){var t=this.getMap()._parseEvent(e,e.type),n=e.type;if("mousedown"===n&&(this._mousedownEvent=e),"mouseup"===n&&(this._mouseupEvent=e),("click"!==n||!this._mouseClickPositionIsChange())&&("touchstart"===n&&(this._touchstartTime=S()),this.fire(e.type,t),"touchend"===n&&ve.touch)){var r=this.getMap().options.clickTimeThreshold||280;S()-this._touchstartTime0&&(e=this._meterToPoint(this._coordinate,t))}return this.getMap().coordToViewPoint(this._coordinate,void 0,e)._add(this.options.dx,this.options.dy)},n._getDefaultEvents=function(){return C({},e.prototype._getDefaultEvents.call(this),{"zooming zoomend":this.onZoomFilter})},n._setPosition=function(){this.onZoomFilter(),e.prototype._setPosition.call(this)},n.onZoomFilter=function(){var e=this.getDOM();e&&(this.isVisible()||"none"===e.style.display?this.isVisible()&&"none"===e.style.display&&(e.style.display=""):e.style.display="none")},n.isVisible=function(){var e=this.getMap();if(!e)return!1;if(!this.options.visible)return!1;var t=e.getZoom(),n=this.options,r=n.minZoom,i=n.maxZoom;return!(!P(r)&&ti)&&(this.getDOM()&&!0)},n.isSupportZoomFilter=function(){return!0},t}(br(Ls));Ds.mergeOptions({containerClass:null,eventsPropagation:!0,draggable:!1,single:!1,content:null,altitude:0,minZoom:0,maxZoom:null});var Fs=ve.touch?"touchstart mousedown":"mousedown",js=function(e){function t(t){return e.call(this,t)||this}Ae(t,e);var n=t.prototype;return n.addHooks=function(){this.target.on(Fs,this._startDrag,this)},n.removeHooks=function(){this.target.off(Fs,this._startDrag,this)},n._startDrag=function(e){var t=e.domEvent;t.touches&&t.touches.length>1||2===t.button||this.isDragging()||(this.target.on("click",this._endDrag,this),this._lastCoord=e.coordinate,this._lastPoint=e.containerPoint,this._prepareDragHandler(),this._dragHandler.onMouseDown(e.domEvent),this.target.fire("dragstart",e))},n._prepareDragHandler=function(){this._dragHandler=new Er(this.target.getDOM(),{cancelOn:this._cancelOn.bind(this),ignoreMouseleave:!0}),this._dragHandler.on("mousedown",this._onMouseDown,this),this._dragHandler.on("dragging",this._dragging,this),this._dragHandler.on("mouseup",this._endDrag,this),this._dragHandler.enable()},n._cancelOn=function(e){var t=(e.srcElement||e.target).tagName.toLowerCase();return"button"===t||"input"===t||"select"===t||"option"===t||"textarea"===t},n._onMouseDown=function(e){Ln(e.domEvent)},n._dragging=function(e){var t=this.target,n=t.getMap()._parseEvent(e.domEvent),r=n.domEvent;if(!(r.touches&&r.touches.length>1))if(this._isDragging){var i=n.coordinate,o=n.containerPoint;this._lastCoord||(this._lastCoord=i),this._lastPoint||(this._lastPoint=o);var a=i.sub(this._lastCoord),s=o.sub(this._lastPoint);this._lastCoord=i,this._lastPoint=o,this.target.setCoordinates(this.target.getCoordinates().add(a)),n.coordOffset=a,n.pointOffset=s,t.fire("dragging",n)}else this._isDragging=!0},n._endDrag=function(e){var t=this.target,n=t.getMap();if(this._dragHandler&&(t.off("click",this._endDrag,this),this._dragHandler.disable(),delete this._dragHandler),delete this._lastCoord,delete this._lastPoint,this._isDragging=!1,n){var r=n._parseEvent(e.domEvent);t&&t._mouseClickPositionIsChange&&t._mouseClickPositionIsChange()&&t.fire("dragend",r)}},n.isDragging=function(){return!!this._isDragging},t}(pr);Ds.addInitHook("addHandler","draggable",js);var Bs=/\{ *([\w_]+) *\}/g,Zs={containerClass:"maptalks-msgBox",autoPan:!0,autoCloseOn:null,autoOpenOn:"click",width:"auto",minHeight:120,custom:!1,title:null,content:null,enableTemplate:!1},zs=new Kt(0,0),Us=function(e){function t(){return e.apply(this,arguments)||this}Ae(t,e);var n=t.prototype;return n._getClassName=function(){return"InfoWindow"},n.addTo=function(t){return t instanceof Uo&&(t.getInfoWindow()&&t.getInfoWindow()!==this&&t.removeInfoWindow(),t._infoWindow=this),e.prototype.addTo.call(this,t)},n.setContent=function(e){var t=this.options.content;return this.options.content=e,this.fire("contentchange",{old:t,new:e}),this.isVisible()&&this.show(this._coordinate),this},n.getContent=function(){return this.options.content},n.setTitle=function(e){var t=e;return this.options.title=e,this.fire("contentchange",{old:t,new:e}),this.isVisible()&&this.show(this._coordinate),this},n.getTitle=function(){return this.options.title},n.buildOn=function(){var e=R(this.options.content),t=O(this.options.content);if(this.options.custom){if(t||e){var n=Pn("div");return t?(n.innerHTML=this.options.content,this._replaceTemplate(n)):this.options.content.bind(this)(n),n}return this._replaceTemplate(this.options.content),this.options.content}var r=Pn("div");this.options.containerClass&&(r.className=this.options.containerClass);var i=this._getWindowWidth();r.style.width=T(i)?i+"px":"auto",r.style.bottom="0px";var o='';this.options.title&&(o+="

"+this.options.title+"

"),o+='
',r.innerHTML=o,this._replaceTemplate(r);var a=r.querySelector(".maptalks-msgContent");return t||e?t?a.innerHTML=this.options.content:this.options.content.bind(this)(a):a.appendChild(this.options.content),this._onCloseBtnClick=this.hide.bind(this),Mn(r.querySelector(".maptalks-close"),"click touchend",this._onCloseBtnClick),e||this._replaceTemplate(a),r},n._replaceTemplate=function(e){if(this.options.enableTemplate&&this._owner&&this._owner.getProperties&&e&&e.innerHTML){var t=this._owner.getProperties()||{};if(M(t)){var n=e.innerHTML;e.innerHTML=n.replace(Bs,(function(e,n){return t[n]}))}}return this},n.getTransformOrigin=function(){return this.getSize().width/2+"px bottom"},n.getOffset=function(){var e=this.getSize(),t=new xe(-e.width/2,0);this.options.custom?t._sub(0,e.height):t._sub(4,12);var n=this.getOwner();if(n instanceof ha||n instanceof ba){var r,i;if(n instanceof ha)r=n._getPainter(),i=n.getSize();else{var o=n.getGeometries();if(!o||!o.length)return t;r=o[0]._getPainter(),i=o[0].getSize()}if(i||(i=zs),r){var a=r.getFixedExtent();t._add(a.xmax-i.width/2,a.ymin)}else t._add(0,-i.height)}return t},n.show=function(t){return this.getMap()&&this.getMap().options.enableInfoWindow?e.prototype.show.call(this,t):this},n.getEvents=function(){if(!this.options.autoCloseOn)return null;var e={};return e[this.options.autoCloseOn]=this.hide,e},n.getOwnerEvents=function(){var e=this.getOwner();if(!this.options.autoOpenOn||!e)return null;var t={};return t[this.options.autoOpenOn]=this._onAutoOpen,t},n.onRemove=function(){this.onDomRemove()},n.onDomRemove=function(){this._onCloseBtnClick&&(On(this.getDOM().childNodes[2],"click touchend",this._onCloseBtnClick),delete this._onCloseBtnClick)},n._onAutoOpen=function(e){var t=this,n=this.getOwner();setTimeout((function(){n instanceof ha||n instanceof Ls?t.show(n.getCoordinates()):n instanceof ba?t.show(n.findClosest(e.coordinate)):n instanceof ga||n instanceof wa?(t.getMap().getScale()>=8&&(e.coordinate=t._rectifyMouseCoordinte(n,e.coordinate)),t.show(e.coordinate)):t.show(e.coordinate)}),1)},n._rectifyMouseCoordinte=function(e,t){var n=this;return e instanceof ga?this._rectifyLineStringMouseCoordinate(e,t).coordinate:e instanceof wa?e.getGeometries().map((function(e){return n._rectifyLineStringMouseCoordinate(e,t)})).sort((function(e,t){return e.dis-t.dis}))[0].coordinate:t},n._rectifyLineStringMouseCoordinate=function(e,t){for(var n=this,r=e.getCoordinates().map((function(e){return n.getMap().coordToContainerPoint(e)})),i=this.getMap().coordToContainerPoint(t),o=1/0,a=-1,s=0,l=r.length;s'+this._content+"",e},t.onMouseOut=function(){clearTimeout(this._timeout),this.isVisible()&&this._removePrevDOM(),this._switchMapEvents("off")},t.onMouseMove=function(e){var t=this;clearTimeout(this._timeout);var n=this.getMap();if(n){var r=n.locateByPoint(e.coordinate,-5,25);0===this.options.showTimeout?this.show(r):this._timeout=setTimeout((function(){n&&t.show(r)}),this.options.showTimeout)}},t.onRemove=function(){clearTimeout(this._timeout),this._owner&&(this._owner.off("mouseover",this.onMouseOver,this),this._owner.off("mouseout",this.onMouseOut,this),this._owner.off(Hs,this.hideDom,this))},t.hideDom=function(){return this.hide()},t.onEvent=function(){return e.prototype.onEvent.call(this),this.hideDom(),this},t._getViewPoint=function(){return this.getMap().coordToViewPoint(this._coordinate,void 0,0)._add(this.options.dx,this.options.dy)},n}(Ls);Vs.mergeOptions({width:0,height:0,animation:"fade",containerClass:"maptalks-tooltip",showTimeout:400});var Ws=function(e){function t(t){return e.call(this,t)||this}Ae(t,e);var n=t.prototype;return n._getClassName=function(){return"Menu"},n.addTo=function(e){return e._menu&&e._menu!==this&&e.removeMenu(),e._menu=this,this._owner=e,Ls.prototype.addTo.apply(this,arguments)},n.setItems=function(e){return this.options.items=e,this},n.getItems=function(){return this.options.items||[]},n.buildOn=function(){if(this.options.custom){if(O(this.options.items)){var e=Pn("div");return e.innerHTML=this.options.items,e}return this.options.items}var t=Pn("div");this.options.containerClass&&zn(t,this.options.containerClass),t.style.width=this._getMenuWidth()+"px";var n=this._createMenuItemDom();return t.appendChild(n),Yn(t,"contextmenu",In),t},n.getOffset=function(){if(!this.getMap())return null;var e=this.getMap().getSize(),t=this.getMap().viewPointToContainerPoint(this._getViewPoint()),n=this.getSize(),r=0,i=0;return t.x+n.width>e.width&&(r=-n.width),t.y+n.height>e.height&&(i=-n.height),new xe(r,i)},n.getTransformOrigin=function(){var e=this.getOffset()._multi(-1);return e.x+"px "+e.y+"px"},n.getEvents=function(){return{"_zoomstart _zoomend _movestart _dblclick _click":this._removePrevDOM}},n._createMenuItemDom=function(){var e=this,t=this.getMap(),n=Pn("ul");zn(n,"maptalks-menu-items");var r,i,o=this.getItems();function a(n){return function(r){var i=t._parseEvent(r,"click");i.target=e,i.owner=e._owner,i.index=n,!1!==this._callback(i)&&(e.hide(),e._owner&&e._owner.fire("closemenu"))}}for(var s=0,l=o.length;s0&&Bn(n,"max-height: "+u+"px; overflow-y: auto;"),n},n._getMenuWidth=function(){return this.options.width||160},t}(Ls);Ws.mergeOptions({containerClass:"maptalks-menu",animation:null,animationDelay:10,animationOnHide:!1,autoPan:!1,width:160,maxHeight:0,custom:!1,items:[]});var Gs={setMenu:function(e){return this._menuOptions=e,this._menu?this._menu.setOptions(e):this.on("contextmenu",this._defaultOpenMenu,this),this},getMenu:function(){return this._menu},openMenu:function(e){var t=this instanceof qo?this:this.getMap();return e||(e=this.getCenter()),this._menu?this._menu.show(e):this._menuOptions&&t&&(this._bindMenu(),this._menu.show(e)),this.fire("openmenu",{coordinate:e}),this},setMenuItems:function(e){return this._menuOptions||(this._menuOptions={}),Array.isArray(e)&&(this._menuOptions.custom=!1),this._menuOptions.items=e,this.setMenu(this._menuOptions),this},getMenuItems:function(){return this._menu?this._menu.getItems():this._menuOptions&&this._menuOptions.items||[]},closeMenu:function(){return this._menu&&this._menu.hide(),this.fire("closemenu",{}),this},removeMenu:function(){return this.off("contextmenu",this._defaultOpenMenu,this),this._unbindMenu(),delete this._menuOptions,this.fire("removemenu",{}),this},_bindMenu:function(){return this._menuOptions?(this._menu=new Ws(this._menuOptions),this._menu.addTo(this),this):this},_unbindMenu:function(){return this._menu&&(this.closeMenu(),this._menu.remove(),delete this._menu),this},_defaultOpenMenu:function(e){return this.openMenu(e.coordinate),!1}};qo.include(Gs),Uo.include(Gs);var Ks=function(e){function t(t){return t&&t.position&&!O(t.position)&&(t.position=C({},t.position)),e.call(this,t)||this}Ae(t,e);var n=t.prototype;return n.addTo=function(e){if(this.remove(),!e.options.control)return this;this._map=e;var t=e._panels.control;return this.__ctrlContainer=Pn("div"),Bn(this.__ctrlContainer,"position:absolute;overflow:visible;"),this.update(),t.appendChild(this.__ctrlContainer),this.onAdd&&this.onAdd(),this.fire("add",{dom:t}),this},n.update=function(){return this.__ctrlContainer.innerHTML="",this._controlDom=this.buildOn(this.getMap()),this._controlDom&&(this._updatePosition(),this.__ctrlContainer.appendChild(this._controlDom)),this},n.getMap=function(){return this._map},n.getPosition=function(){return C({},this._parse(this.options.position))},n.setPosition=function(e){return O(e)?this.options.position=e:this.options.position=C({},e),this._updatePosition(),this},n.getContainerPoint=function(){var e,t,n=this.getPosition(),r=this.getMap().getSize();return P(n.left)?P(n.right)||(e=r.width-parseInt(n.right)):e=parseInt(n.left),P(n.top)?P(n.bottom)||(t=r.height-parseInt(n.bottom)):t=parseInt(n.top),new xe(e,t)},n.getContainer=function(){return this.__ctrlContainer},n.getDOM=function(){return this._controlDom},n.show=function(){return this.__ctrlContainer.style.display="",this},n.hide=function(){return this.__ctrlContainer.style.display="none",this},n.isVisible=function(){return this.__ctrlContainer&&""===this.__ctrlContainer.style.display},n.remove=function(){return this._map?(kn(this.__ctrlContainer),this.onRemove&&this.onRemove(),delete this._map,delete this.__ctrlContainer,delete this._controlDom,this.fire("remove"),this):this},n._parse=function(e){var n=e;return O(e)&&(n=t.positions[n]),n},n._updatePosition=function(){var e=this.getPosition();for(var t in e||(e={top:20,left:20}),e)e.hasOwnProperty(t)&&(e[t]=parseInt(e[t]),this.__ctrlContainer.style[t]=e[t]+"px");this.fire("positionchange",{position:C({},e)})},t}(fr(gr));Ks.positions={"top-left":{top:20,left:20},"top-right":{top:20,right:20},"bottom-left":{bottom:20,left:20},"bottom-right":{bottom:20,right:20}},qo.mergeOptions({control:!0}),qo.include({addControl:function(e){return this._containerDOM.getContext||e.addTo(this),this},removeControl:function(e){return e&&e.getMap()===this?(e.remove(),this):this}});var qs="addlayer removelayer setbaselayer baselayerremove",Ys=function(e){function t(){return e.apply(this,arguments)||this}Ae(t,e);var n=t.prototype;return n.buildOn=function(){return this._attributionContainer=Pn("div"),this._attributionContainer.className="maptalks-attribution",this._update(),this._attributionContainer},n.onAdd=function(){this.getMap().on(qs,this._update,this)},n.onRemove=function(){this.getMap().off(qs,this._update,this)},n._update=function(){var e=this.getMap();if(e){var t=e._getLayers((function(e){return e.options.attribution})).reverse().map((function(e){return e.options.attribution})),n=this.options.content+(t.length>0?" - "+t.join(", "):"");this._attributionContainer.innerHTML=''+n+""}},t}(Ks);Ys.mergeOptions({position:{bottom:0,left:0},content:'maptalks'}),qo.mergeOptions({attribution:!0}),qo.addOnLoadHook((function(){var e=this.options.attribution||this.options.attributionControl;e&&(this.attributionControl=new Ys(e),this.addControl(this.attributionControl))}));var Xs=function(e){function t(){return e.apply(this,arguments)||this}Ae(t,e);var n=t.prototype;return n.buildOn=function(){var e=this.container=Pn("div",this.options.containerClass),t=this.panel=Pn("div","panel"),n=this.button=Pn("button");return e.appendChild(n),e.appendChild(t),e},n.onAdd=function(){Yn(this.button,"mouseover",this._show,this),Yn(this.panel,"mouseleave",this._hide,this),Yn(this.getMap(),"click",this._hide,this)},n.onRemove=function(){this.panel&&(Xn(this.button,"mouseover",this._show,this),Xn(this.panel,"mouseleave",this._hide,this),Xn(this.getMap(),"click",this._hide,this),kn(this.panel),kn(this.button),delete this.panel,delete this.button,delete this.container)},n._show=function(){Zn(this.container,"shown")||(zn(this.container,"shown"),this._createPanel())},n._hide=function(e){this.panel.contains(e.toElement||e.relatedTarget)||Un(this.container,this.options.containerClass)},n._createPanel=function(){this.panel.innerHTML="";var e=Pn("ul");this.panel.appendChild(e),this._renderLayers(this.getMap(),e)},n._renderLayers=function(e,t){var n=this,r=e.getBaseLayer(),i=e.getLayers(),o=i.length;if(r){var a=r.layers||[r],s=Pn("li","group"),l=Pn("ul"),c=Pn("label");c.innerHTML=this.options.baseTitle,s.appendChild(c);for(var u=0,d=a.length;u=0)},n._renderLayer=function(e,t,n){var r=this;void 0===n&&(n=!0);var i=Pn("li","layer"),o=Pn("label"),a=Pn("input"),s=this.getMap(),l=e.options.visible;e.options.visible=!0;var c=e.isVisible();return e.options.visible=l,i.className="layer",t?(a.type="radio",a.name="base"):a.type="checkbox",a.checked=l&&c,n||(a.checked=!1),c||a.setAttribute("disabled","disabled"),a.onchange=function(t){if("radio"===t.target.type){var n=s.getBaseLayer(),i=n.layers;if(i)for(var o=0,a=i.length;o0){for(var i=r;i>0;i--)if(t-i>=n)return t-i}else for(var o=r;o<0;o++)if(t-o>=n)return t-o;return t},n._onDragEnd=function(){var e=this._perspective.getCenter();this._overview.setCenter(e),this.getMap().panTo(e)},n._getPerspectiveCoords=function(){var e=this.getMap(),t=e.getProjection();return e.getContainerExtent().toArray().map((function(n){if(t){var r=e._containerPointToPrj(n);return e._fixPrjOnWorldWide(r),t.unproject(r)}return e.containerPointToCoordinate(n)}))},n._update=function(){if(this._overview){Fn(this._overview._containerDOM);var e=this._getPerspectiveCoords();this._perspective.setCoordinates(e),this._overview.setCenterAndZoom(this.getMap().getCenter(),this._getOverviewZoom())}},n._updateSpatialReference=function(){if(this._overview){var e=this.getMap().options.spatialReference;this._overview.setSpatialReference(e)}},n._updateBaseLayer=function(){if(this._overview){var e=this.getMap().getBaseLayer();if(e){var t=e.layers,n=0;if(t)for(var r=0,i=t.length;r5280?(t=i/5280,n=this._getRoundNum(t),this._updateScale(this._iScale,n+" mile",n/t)):(r=this._getRoundNum(i),this._updateScale(this._iScale,r+" feet",r/i))},n._updateScale=function(e,t,n){e.style.width=Math.round(this.options.maxWidth*n)+"px",e.innerHTML=t},n._getRoundNum=function(e){var t=Math.pow(10,(Math.floor(e)+"").length-1),n=e/t;return t*(n=n>=10?10:n>=5?5:n>=3?3:n>=2?2:1)},t}(Ks);Js.mergeOptions({position:"bottom-left",maxWidth:100,metric:!0,imperial:!1,containerClass:null}),qo.mergeOptions({scaleControl:!1}),qo.addOnLoadHook((function(){this.options.scaleControl&&(this.scaleControl=new Js(this.options.scaleControl),this.addControl(this.scaleControl))}));var el=function(e){function t(){return e.apply(this,arguments)||this}Ae(t,e);var n=t.prototype;return n.buildOn=function(e){this._map=e;var t=Pn("div"),n=Pn("ul","maptalks-toolbar-hx");t.appendChild(n),this.options.vertical?zn(t,"maptalks-toolbar-vertical"):zn(t,"maptalks-toolbar-horizonal");var r=this;function i(e,t,n,i){var o=r._getItems()[t];return function(r){return Ln(r),e({target:o,index:t,childIndex:n,dom:i})}}var o=this.options.items;if(Be(o))for(var a=0,s=o.length;a'+l.item+""}else c.innerHTML=l.item;if(l.click&&Yn(c,"click",i(l.click,a,null,c)),Be(l.children)){var d=this._createDropMenu(a);c.appendChild(d),c._menu=d,Yn(c,"mouseover",(function(){this._menu.style.display=""})),Yn(c,"mouseout",(function(){this._menu.style.display="none"}))}n.appendChild(c)}return t},n._createDropMenu=function(e){var t=this;function n(e,n,r){var i=t._getItems()[n].children[r];return function(t){return Ln(t),e({target:i,index:n,childIndex:r})}}var r=Pn("div","maptalks-dropMenu"),i=this._getItems(),o=i.length,a=Pn("ul"),s=i[e].children;e===o-1&&s&&(r.style.cssText="right: 0px;",a.style.cssText="right: 0px;position: absolute;",this.options.reverseMenu&&(a.style.bottom=0)),r.appendChild(Pn("em","maptalks-ico"));for(var l=0,c=0,u=s.length;cl&&(l=d.width)}for(var f=0,h=s.length;f'+p.item+"",g.style.cursor="pointer",g.style.width=l+24+"px",Yn(g.childNodes[0],"click",n(p.click,e,f)),a.appendChild(g)}if(this.options.vertical){var m=l<95?95:l;this.options.reverseMenu?r.style.right=-(m+20)+"px":r.style.left=-(m+20)+"px"}else this.options.reverseMenu?r.style.bottom="28px":r.style.top="28px";return r.appendChild(a),r.style.display="none",r},n._getItems=function(){return this.options.items||[]},t}(Ks);el.mergeOptions({height:28,vertical:!1,position:"top-right",reverseMenu:!1,items:{}});var tl=10,nl=function(e){function t(){return e.apply(this,arguments)||this}Ae(t,e);var n=t.prototype;return n.buildOn=function(e){var t=this.options,n=Pn("div","maptalks-zoom");if(t.zoomLevel){var r=Pn("span","maptalks-zoom-zoomlevel");n.appendChild(r),this._levelDOM=r}var i=Pn("div","maptalks-zoom-slider"),o=Pn("a","maptalks-zoom-zoomin");if(o.href="javascript:;",o.innerHTML="+",i.appendChild(o),this._zoomInButton=o,t.slider){var a=Pn("div","maptalks-zoom-slider-box"),s=Pn("div","maptalks-zoom-slider-ruler"),l=Pn("span","maptalks-zoom-slider-reading"),c=Pn("span","maptalks-zoom-slider-dot");s.appendChild(l),a.appendChild(s),a.appendChild(c),i.appendChild(a),this._sliderBox=a,this._sliderRuler=s,this._sliderReading=l,this._sliderDot=c}var u=Pn("a","maptalks-zoom-zoomout");return u.href="javascript:;",u.innerHTML="-",i.appendChild(u),this._zoomOutButton=u,n.appendChild(i),e.on("_zoomend _zooming _zoomstart _spatialreferencechange",this._update,this),this._update(),this._registerDomEvents(),n},n.onRemove=function(){this.getMap().off("_zoomend _zooming _zoomstart _spatialreferencechange",this._update,this),this._zoomInButton&&Xn(this._zoomInButton,"click",this._onZoomInClick,this),this._zoomOutButton&&Xn(this._zoomOutButton,"click",this._onZoomOutClick,this),this._sliderRuler&&(Xn(this._sliderRuler,"click",this._onClickRuler,this),this.dotDragger.disable(),delete this.dotDragger)},n._update=function(){var e=this.getMap();if(this._sliderBox){var t=(e.getMaxZoom()-e.getMinZoom())*tl;this._sliderBox.style.height=t+16+"px",this._sliderRuler.style.height=t+8+"px",this._sliderRuler.style.cursor="pointer";var n=(e.getMaxZoom()-e.getZoom())*tl;this._sliderReading.style.height=(e.getZoom()-e.getMinZoom()+1)*tl+"px",this._sliderDot.style.top=n+"px"}this._updateText()},n._updateText=function(){if(this._levelDOM){var e=this.getMap().getZoom();k(e)||(e=Math.floor(10*e)/10),this._levelDOM.innerHTML=e}},n._registerDomEvents=function(){this._zoomInButton&&Yn(this._zoomInButton,"click",this._onZoomInClick,this),this._zoomOutButton&&Yn(this._zoomOutButton,"click",this._onZoomOutClick,this),this._sliderRuler&&(Yn(this._sliderRuler,"click",this._onClickRuler,this),this.dotDragger=new Er(this._sliderDot,{ignoreMouseleave:!0}),this.dotDragger.on("dragstart",this._onDotDragstart,this).on("dragging dragend",this._onDotDrag,this).enable())},n._onZoomInClick=function(e){In(e),this.getMap().zoomIn()},n._onZoomOutClick=function(e){In(e),this.getMap().zoomOut()},n._onClickRuler=function(e){In(e);var t=this.getMap(),n=jn(e,this._sliderRuler).y,r=t.getMaxZoom(),i=Math.floor(r-n/tl);t.setZoom(i)},n._onDotDragstart=function(e){In(e.domEvent);var t=this.getMap(),n=t.getSize().toPoint()._multi(.5);t.onZoomStart(t.getZoom(),n)},n._onDotDrag=function(e){In(e.domEvent);var t=this.getMap(),n=t.getSize().toPoint()._multi(.5),r=jn(e.domEvent,this._sliderRuler),i=t.getMaxZoom(),o=t.getMinZoom(),a=r.y,s=i-a/tl;is&&(s=o,a=(i-o)*tl),"dragging"===e.type?t.onZooming(s,n,1):"dragend"===e.type&&(this.options.seamless?t.onZoomEnd(s,n):t.onZoomEnd(Math.round(s),n)),this._sliderDot.style.top=a+"px",this._sliderReading.style.height=(t.getZoom()-o+1)*tl+"px",this._updateText()},t}(Ks);nl.mergeOptions({position:"top-left",slider:!0,zoomLevel:!0,seamless:!1}),qo.mergeOptions({zoomControl:!1}),qo.addOnLoadHook((function(){this.options.zoomControl&&(this.zoomControl=new nl(this.options.zoomControl),this.addControl(this.zoomControl))}));var rl=function(){function e(e,t,n,r){Array.isArray(e)?(this.scale={x:e[0],y:e[1]},this.origin={x:e[2],y:e[3]}):(this.scale={x:e,y:t},this.origin={x:n,y:r})}return e.getDefault=function(e){return"baidu"===e.code.toLowerCase()?"baidu":e.code.toLowerCase()==="EPSG:4326".toLowerCase()?"tms-global-geodetic":"identity"===e.code.toLowerCase()?[1,-1,0,0]:"web-mercator"},e}(),il=6378137*Math.PI;C(rl,{"web-mercator":new rl([1,-1,-il,il]),"tms-global-mercator":new rl([1,1,-il,-il]),"tms-global-geodetic":new rl([1,1,-180,-90]),baidu:new rl([1,1,0,0])});var ol=function(){function e(e,t,n,r){this.map=e,this.tileSize=r,this.fullExtent=n,this.prepareTileInfo(t,n),this._xScale=n.right>=n.left?1:-1,this._yScale=n.top>=n.bottom?1:-1;var i=e.getGLRes();this._pointOrigin=e._prjToPointAtRes(new xe(this.tileSystem.origin),i),this._glRes=i}var t=e.prototype;return t.prepareTileInfo=function(e,t){if(O(e)?e=rl[e.toLowerCase()]:Array.isArray(e)&&(e=new rl(e)),!e)throw new Error("Invalid TileSystem");this.tileSystem=e;var n=t.right>t.left?1:-1,r=t.top>t.bottom?-1:1,i=e.origin.x,o=e.origin.y;this.transformation=new zr([n,r,i,o])},t._getTileNum=function(e,t){var n=this.tileSystem,r=this.tileSize,i=Math.floor(1e-7*n.scale.x+e.x/(r.width*t)),o=Math.ceil(1e-7*n.scale.y+e.y/(r.height*t));return{x:n.scale.x*i,y:n.scale.y*o}},t.getTileIndex=function(e,t,n){var r=this.tileSystem,i=this.transformation.transform(e,1),o=this._getTileNum(i,t);return r.scale.x<0&&(o.x-=1),r.scale.y>0&&(o.y-=1),this.getNeighorTileIndex(o.x,o.y,0,0,t,n)},t.getNeighorTileIndex=function(e,t,n,r,i,o){var a=this.tileSystem,s=e+a.scale.x*n,l=t-a.scale.y*r,c=!1,u=s,d=l,f=this._getTileFullIndex(i);return o&&(!0!==o&&"x"!==o||(f.xmax===f.xmin?s=f.xmin:s=f.xmax&&(s=f.xmin+(s-f.xmin)%(f.xmax-f.xmin))),!0!==o&&"y"!==o||(f.ymax===f.ymin?l=f.ymin:l>=f.ymax?l=f.ymin+(l-f.ymin)%(f.ymax-f.ymin):lf.xmax||l>f.ymax||l0&&(r.y-=1,i.y-=1),this._tileFullIndex[e]=new Br(r,i),this._tileFullIndex[e]},t.getTilePrjNW=function(e,t,n){var r=this.tileSystem,i=this.tileSize,o=r.origin.y+this._yScale*r.scale.y*(t+(1===r.scale.y?1:0))*n*i.height,a=r.origin.x+this._xScale*r.scale.x*(e+(1===r.scale.x?0:1))*n*i.width;return new Sr(a,o)},t.getTilePointNW=function(e,t,n){var r=this._glRes/n,i=this.tileSystem,o=this.tileSize,a=this._pointOrigin.y*r+this._yScale*i.scale.y*(t+(1===i.scale.y?1:0))*o.height,s=this._pointOrigin.x*r+this._xScale*i.scale.x*(e+(1===i.scale.x?0:1))*o.width;return new xe(s,a)},t.getTilePrjSE=function(e,t,n){var r=this.tileSystem,i=this.tileSize,o=r.origin.y+this._yScale*r.scale.y*(t+(1===r.scale.y?0:1))*n*i.height,a=r.origin.x+this._xScale*r.scale.x*(e+(1===r.scale.x?1:0))*n*i.width;return new Sr(a,o)},t.getTilePointSE=function(e,t,n){var r=this._glRes/n,i=this.tileSystem,o=this.tileSize,a=this._pointOrigin.y*r+this._yScale*i.scale.y*(t+(1===i.scale.y?0:1))*o.height,s=this._pointOrigin.x*r+this._xScale*i.scale.x*(e+(1===i.scale.x?1:0))*o.width;return new xe(s,a)},t.getTilePrjExtent=function(e,t,n){var r=this.getTilePrjNW(e,t,n),i=this.getTilePrjSE(e,t,n);return new Br(r,i)},e}(),al=new xe(0,0),sl="undefined"!==typeof Set,ll=function(){function e(){this._table=sl?new Set:{}}var t=e.prototype;return t.add=function(e){sl?this._table.add(e):this._table[e]=!0},t.has=function(e){return sl?this._table.has(e):this._table[e]},t.reset=function(){sl?this._table.clear():this._table={}},e}(),cl={urlTemplate:null,subdomains:null,errorUrl:null,repeatWorld:!0,background:!0,backgroundZoomDiff:6,loadingLimitOnInteracting:3,tileRetryCount:0,placeholder:!1,crossOrigin:null,tileSize:[256,256],offset:[0,0],tileSystem:null,fadeAnimation:!j,debug:!1,spatialReference:null,maxCacheSize:256,renderer:ve.webgl?"gl":"canvas",clipByPitch:!0,maxAvailableZoom:null,cascadeTiles:!0,zoomOffset:0,pyramidMode:1,decodeImageInWorker:!1,tileLimitPerFrame:0,backZoomOffset:0},ul=/\{ *([\w_]+) *\}/g,dl=new xe(0,0),fl=new xe(0,0),hl=new xe(0,0),pl=new xe(0,0),gl=new xe(0,0),ml=new xe(0,0),vl=[[0,0,0],[0,0,0]],Al=[0,0,0],yl=[0,0,0],bl=[],_l=function(e){function t(){return e.apply(this,arguments)||this}Ae(t,e),t.fromJSON=function(e){return e&&"TileLayer"===e.type?new t(e.id,e.options):null};var n=t.prototype;return n.getTileSize=function(){if(this._tileSize)return this._tileSize;var e=this.options.tileSize;return T(e)&&(e=[e,e]),this._tileSize=new Kt(e),this._tileSize},n.getTiles=function(e,t){return this._coordCache={},this._isPyramidMode()?this._getPyramidTiles(e,t):this._getCascadeTiles(e,t)},n._isPyramidMode=function(){var e=this.getSpatialReference();return!this._disablePyramid&&!this._hasOwnSR&&this.options.pyramidMode&&e&&e.isPyramid()},n._getTileFullExtent=function(){if(this._tileFullExtent)return this._tileFullExtent;var e=this.getSpatialReference(),t=e.getFullExtent(),n=e.getResolution(0),r=this.getMap();return this._tileFullExtent=t.convertTo((function(e){return r._prjToPointAtRes(e,n,al)})),this._tileFullExtent},n._getRootNodes=function(e){var t=this.getMap();if(this._rootNodes){var n=this._rootNodes,r=n.tiles,i=n.mapWidth,o=n.mapHeight;if(t.width!==i||t.height!==o){for(var a=this._getRootError(),s=0;s32)return{status:0,error:"Too many root nodes"};for(var E=this._getRootError(),S=[],C=-b;C<_;C++)for(var P=-w;P0;){var S=r.pop();S.z!==o?(_[S.z+1]||(_[S.z+1]=this._getTileOffset(S.z+1)),this._splitNode(S,a,r,E,x,o,_[S.z+1],t&&t.getRenderer(),b),w>1,M=(f<<1)+T,O=(h<<1)+k,R=(g<<1)+T,I=(m<<1)+k;e.children||(e.children=[]);var L=e.children[P];L||(L=this._getTileId(R,I,u),e.children[P]=L);var N=w.isTileCachedOrLoading(L),D=void 0,F=N&&N.info;if(!F){if(this.tileInfoCache||(this.tileInfoCache=new er(4*this.options.maxCacheSize)),!(F=this.tileInfoCache.get(L))){if(c<0){var j=y+T*v,B=b-k*A;D=new Zr(j,B-A,j+v,B)}else{var Z=y+T*v,z=_+k*A;D=new Zr(Z,z,Z+v,z+A)}F={x:M,y:O,idx:R,idy:I,z:u,extent2d:D,error:e.error/2,res:S,id:L,parentNodeId:e.id,children:[],url:this.getTileUrl(M,O,u+this.options.zoomOffset),offset:a},this.tileInfoCache.add(L,F)}s&&(F.layer=this.getId())}F.error=e.error/2,F.offset[0]=a[0],F.offset[1]=a[1];var U=this._isTileVisible(F,t,C,o,a);if(1===U)x=!0;else{if(-1===U)continue;if(0===U&&u!==o)return r.push(e),void i._combine(e.extent2d)}E.push(F)}u===o?x?n.push.apply(n,E):(r.push(e),i._combine(e.extent2d)):n.push.apply(n,E)},n._isTileVisible=function(e,t,n,r,i){if(0===e.z)return 1;if(!this._isTileInFrustum(e,t,n,i))return-1;var o=this.options.maxError;return P(o)&&(o=1),this._getScreenSpaceError(e,n,r,i)>=o?1:0},n._isTileInFrustum=function(e,t,n,r){if(!this._zScale){var i=this.getMap(),o=i.getGLRes();this._zScale=i.altitudeToPoint(100,o)/100}var a=e.extent2d,s=a.xmin,l=a.ymin,c=a.xmax,u=a.ymax;return vl[0][0]=(s-r[0])*n,vl[0][1]=(l-r[1])*n,vl[0][2]=(e.minAltitude||0)*this._zScale,vl[1][0]=(c-r[0])*n,vl[1][1]=(u-r[1])*n,vl[1][2]=(e.maxAltitude||0)*this._zScale,f(t,vl)},n._getScreenSpaceError=function(e,t,n,r){var i=e.error,o=this.getMap(),a=e.extent2d,s=a.xmin,l=a.ymin,c=a.xmax,u=a.ymax;Al[0]=(s-r[0])*t,Al[1]=(l-r[1])*t,yl[0]=(c-r[0])*t,yl[1]=(u-r[1])*t;var d=function(e,t,n){var r=Math.max(e[0]-n[0],0,n[0]-t[0]),i=Math.max(e[1]-n[1],0,n[1]-t[1]),o=Math.max(e[2]-n[2],0,n[2]-t[2]);return Math.sqrt(r*r+i*i+o*o)}(Al,yl,o.cameraPosition),f=Math.max(Math.abs(d),1e-7),h=Math.abs(e.z-n);return i*(o.height<1e3||h<=1?1:h<=2?.7:.605)/f},n._getCascadeTiles=function(e,t){var n=this.getMap(),r=n.getPitch(),i=t&&t.getRenderer(),o=n.getContainerExtent(),a=[],s=0,l=this.getMinZoom(),c=n.options.cascadePitches[0],u=n.options.cascadePitches[1],d=Math.floor(n._getVisualHeight(u)),f=P(e)?this._getTileZoom(n.getZoom()):e;if(this._visitedTiles=new ll,!P(e)||!this.options.cascadeTiles||r<=c||!P(l)&&f<=l){var h=r<=u?o:new Zr(0,n.height-d,n.width,n.height),p=this._getTiles(f,h,2,i);return p&&(s+=p.tiles.length,a.push(p)),{tileGrids:a,count:s}}var g=Math.floor(n._getVisualHeight(c)),m=new Zr(0,n.height-g,n.width,n.height),v=this._getTiles(f,m,0,i);s+=v?v.tiles.length:0,a.push(v);var A,y,b=m.ymin,_=n.getSpatialReference().getZoomDirection(),w=_;if(r>u){f-w<=l&&(w=0);var x=new Zr(0,n.height-d,n.width,b);s+=(A=this._getTiles(f-w,x,1,i))?A.tiles.length:0,b=x.ymin,w+=4*_,a.push(A)}if(f-w>=l){var E=new Zr(0,o.ymin,n.width,b);s+=(y=this._getTiles(f-w,E,2,i))?y.tiles.length:0,a.push(y)}return A&&y&&(a[1]=y,a[2]=A),{tileGrids:a,count:s}},n.getTileUrl=function(e,t,n){var r=this.options.urlTemplate,i="";if(this.options.subdomains){var o=this.options.subdomains;if(Be(o)){var a=(e+t)%o.length;a<0&&(a=0),i=o[a]}}if(R(r))return r(e,t,n,i);var s={x:e,y:t,z:n,s:i};return this.options.token&&(s.token=this.options.token),this.options.customTags&&C(s,this.options.customTags),r.replace(ul,(function(e,t){var n=s[t];if(void 0===n)throw new Error("No value provided for variable "+e);return"function"===typeof n&&(n=n(s)),n}))},n.clear=function(){return this._renderer&&this._renderer.clear(),this.tileInfoCache&&this.tileInfoCache.reset(),this.fire("clear"),this},n.toJSON=function(){return{type:this.getJSONType(),id:this.getId(),options:this.config()}},n.getSpatialReference=function(){var e=this.getMap();if(e&&(!this.options.spatialReference||Bo.equals(this.options.spatialReference,e.options.spatialReference)))return e.getSpatialReference();if(this._sr)return this._sr;var t=this.options.spatialReference;if(O(t)&&!(t=Bo.getPreset(t)))throw new Error("Unsupported spatial reference: "+this.options.spatialReference+", possible values: "+Bo.getAllPresets().join());return this._sr=new Bo(t),this._srMinZoom=this._sr.getMinZoom(),this._srMaxZoom=this._sr.getMaxZoom(),this._hasOwnSR=this._sr.toJSON().projection!==e.getSpatialReference().toJSON().projection,this._sr},n.getMinZoom=function(){return this.getSpatialReference()!==this.getMap().getSpatialReference()?Math.max(e.prototype.getMinZoom.call(this),this._srMinZoom):e.prototype.getMinZoom.call(this)},n.getMaxZoom=function(){return this.getSpatialReference()!==this.getMap().getSpatialReference()?Math.min(e.prototype.getMaxZoom.call(this),this._srMaxZoom):e.prototype.getMaxZoom.call(this)},n._getTileZoom=function(e){if(!this._hasOwnSR){var t=this.getMap().getResolution(e),n=this.getSpatialReference().getResolution(e);e+=Math.log(n/t)*Math.LOG2E}var r=this.options.maxAvailableZoom;return!P(r)&&e>r&&(e=r),k(e)||(e=Math.round(e)),e=Math.max(0,e)},n._getTiles=function(e,t,n,r,i){var o=this.getMap(),a=e,s=o.projViewMatrix,l=o.getResolution(e)/o.getResolution(e-1)===.5;n<2&&(0===n&&l&&(a-=1),s=0===n?o.cascadeFrustumMatrix0:1===n?o.cascadeFrustumMatrix1:o.projViewMatrix);var c=a+this.options.zoomOffset,u=this._getTileOffset(c),d=u[0]||u[1],f={zoom:a,extent:null,offset:u,tiles:[]};if(c<0)return f;if(!o||!this.isVisible()||!o.width||!o.height)return f;if(!i){var h=this.getMinZoom(),p=this.getMaxZoom();if(!P(h)&&ap)return f}var g=this._getTileConfig();if(!g)return f;var m,v={zoom:u},A=this.getSpatialReference().getResolution(c);m=this._hasOwnSR?o.getGLScale(a):A/o.getGLRes();var y=!this._hasOwnSR&&this.options.repeatWorld,b=this._convertToExtent2d(t),_=this._getMask2DExtent();if(_){var w=_.intersection(b);if(!w)return f;t=w.convertTo((function(e){return o._pointToContainerPoint(e,void 0,0,al)}))}var x,E=o._containerPointToPrj(t.getCenter(),dl),S=o._prjToPoint(E,c,fl);x=d?this._project(o._pointToPrj(S._add(u),c,fl),fl):this._project(E,fl);var C=o.getGLScale()/o.getGLScale(c);hl.x=b.xmin*C,hl.y=b.ymax*C,pl.x=b.xmax*C,pl.y=b.ymin*C;for(var T=this._project(o._pointToPrj(hl._add(u),c,hl),hl),k=this._project(o._pointToPrj(pl._add(u),c,pl),pl),M=g.getTileIndex(x,A,y),O=g.getTileIndex(T,A,y),R=g.getTileIndex(k,A,y),I=Math.ceil(Math.abs(M.idy-O.idy)),L=Math.ceil(Math.abs(M.idx-O.idx)),N=Math.ceil(Math.abs(M.idy-R.idy)),D=Math.ceil(Math.abs(M.idx-R.idx)),F=(I+N+1)*(L+D+1),j=this.getTileSize(),B=this.getRenderer()||r,Z=this._getTileConfig().tileSystem.scale,z=[],U=new Zr,H=new xe(0,0),V=-I;V<=N;V++)for(var W=-L,G=-1/0,K=!1;W>=G&&W<=D;){var q=g.getNeighorTileIndex(M.idx,M.idy,W,V,A,y);G===-1/0?W++:W--;var Y=this._getTileId(q.idx,q.idy,a);if(!(q.out||this._visitedTiles&&this._visitedTiles.has(Y))){var X=B&&B.isTileCachedOrLoading(Y);X&&(X=X.info);var $=void 0;if(X){var Q=X.extent2d;H.set(Q.xmin,Q.ymax),$=H}else if(this._hasOwnSR){var J=g.getTilePrjNW(q.x,q.y,A);$=o._prjToPoint(this._unproject(J,pl),a)}else $=g.getTilePointNW(q.x,q.y,A);var ee=void 0,te=void 0;if(this._hasOwnSR){var ne=void 0;if(this._hasOwnSR){var re=g.getTilePrjSE(q.x,q.y,A);ne=o._prjToPoint(this._unproject(re,pl),a,pl)}else ne=g.getTilePointSE(q.x,q.y,A);ee=Math.ceil(Math.abs(ne.x-$.x)),te=Math.ceil(Math.abs(ne.y-$.y))}else ee=j.width,te=j.height;var ie=Z.x*(q.idx-q.x)*ee,oe=Z.y*(q.idy-q.y)*te;X||!ie&&!oe||$._add(ie,oe);var ae=X&&X.extent2d||new Zr($.x,$.y-te,$.x+ee,$.y);if(F<=4||K||this._isTileInExtent(s,ae,u,m)){var se=this._hasOwnSR?o._getResolution(a):A;this._visitedTiles&&0===n&&this._visitedTiles.add(Y),l&&0===n?(this._splitTiles(s,z,B,q,a+1,se,ae,ie,oe,v,r),U._combine(ae)):(X?(X.offset[0]=u[0],X.offset[1]=u[1]):(X={z:a,x:q.x,y:q.y,idx:q.idx,idy:q.idy,extent2d:ae,offset:u,id:Y,res:se,url:this.getTileUrl(q.x,q.y,a)},r&&(X.layer=this.getId())),z.push(X),U._combine(ae)),G===-1/0?(G=W,W=D):K||(K=!0)}}}if(z.length){var le=o._containerPointToPoint(t.getCenter(),a,al)._add(u),ce=new xe(0,0),ue=new xe(0,0);z.sort((function(e,t){return ce.set((e.extent2d.xmin+e.extent2d.xmax)/2,(e.extent2d.ymin+e.extent2d.ymax)/2),ue.set((t.extent2d.xmin+t.extent2d.xmax)/2,(t.extent2d.ymin+t.extent2d.ymax)/2),ce.distanceTo(le)-ue.distanceTo(le)}))}return{offset:u,zoom:e,extent:U,tiles:z}},n._convertToExtent2d=function(e){var t=this,n=this.getMap();return e.convertTo((function(e){if(e.y>0&&e.y=0&&(t.layers.splice(n,1),e._doRemove(),e.off(xl,t._onLayerShowHide,t))}})),n!==this.layers.length&&(this._refresh(),this._renderLayers()),this},n.clearLayers=function(){var e=this;return this.layers.forEach((function(t){t._doRemove(),t.off(xl,e._onLayerShowHide,e)})),this.layers=[],this._refresh(),this._renderLayers(),this},n.toJSON=function(){return{type:this.getJSONType(),id:this.getId(),layers:this.layers.map((function(e){return e.toJSON()})),options:this.config()}},n.getTileSize=function(e){var t=this.getLayer(e);return t?t.getTileSize():wl},n.getTiles=function(e,t){for(var n=this.layers,r=[],i=0,o=0,a=n.length;o=1.3?"crs":"srs";this.wmsParams[i]=r,e.prototype.onAdd.call(this)},n.getTileUrl=function(t,n,r){var i=this.getSpatialReference().getResolution(r),o=this._getTileConfig().getTilePrjExtent(t,n,i),a=o.getMax(),s=o.getMin(),l=(this._wmsVersion>=1.3&&("EPSG:4326"===this.wmsParams.crs||"EPSG:4490"===this.wmsParams.crs)?[s.y,s.x,a.y,a.x]:[s.x,s.y,a.x,a.y]).join(","),c=e.prototype.getTileUrl.call(this,t,n,r);return c+function(e,t,n){var r=[];for(var i in e)r.push(encodeURIComponent(n?i.toUpperCase():i)+"="+encodeURIComponent(e[i]));return(t&&-1!==t.indexOf("?")?"&":"?")+r.join("&")}(this.wmsParams,c,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+l},n.toJSON=function(){return{type:"WMSTileLayer",id:this.getId(),options:this.config()}},t.fromJSON=function(e){return e&&"WMSTileLayer"===e.type?new t(e.id,e.options):null},t}(_l);Tl.registerJSONType("WMSTileLayer"),Tl.mergeOptions(Cl);var kl=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).options.hasOwnProperty("forceRenderOnMoving")||(r.options.forceRenderOnMoving=!1),r}Ae(t,e);var n=t.prototype;return n.drawTile=function(){},n.toJSON=function(){return{type:"CanvasTileLayer",id:this.getId(),options:this.config()}},t.fromJSON=function(e){return e&&"CanvasTileLayer"===e.type?new t(e.id,e.options):null},t}(_l);function Ml(e,t,n){var r=e.createShader(t);if(e.shaderSource(r,n),e.compileShader(r),!e.getShaderParameter(r,e.COMPILE_STATUS)){var i=e.getShaderInfoLog(r);throw e.deleteShader(r),new Error("Failed to compile shader: "+i)}return r}function Ol(e,t,n){var r=Ml(e,e.VERTEX_SHADER,t),i=Ml(e,e.FRAGMENT_SHADER,n);if(!r||!i)return null;var o=e.createProgram();return o?(e.attachShader(o,r),e.attachShader(o,i),e.linkProgram(o),{program:o,vertexShader:r,fragmentShader:i}):null}function Rl(e,t,n){if(Array.isArray(n[0])){for(var r=Float32Array.BYTES_PER_ELEMENT,i=0,o=0;o1?2:1;(s=this._debugInfoCanvas=document.createElement("canvas")).width=256*l,s.height=32*l;var c=s.getContext("2d");c.font="20px monospace",c.scale(l,l)}var u=s.getContext("2d");u.clearRect(0,0,s.width,s.height);var d=this.layer.options.debugOutline;ar.fillText(u,o,jl,d),this.loadTexture(s),a.texImage2D(a.TEXTURE_2D,0,a.RGBA,a.RGBA,a.UNSIGNED_BYTE,s);var f=t,h=t+(r=256),p=n-i+32,g=n-i;a.bufferData(a.ARRAY_BUFFER,this.set8(f,p,f,g,h,p,h,g),a.DYNAMIC_DRAW),a.uniform1f(this.program.u_debug_line,0),a.drawArrays(a.TRIANGLE_STRIP,0,4)},n.bufferTileData=function(e,t,n,r,i){var o,a=e,s=e+n,l=t,c=t-r;o=k(a)&&k(s)&&k(l)&&k(c)?this.set8Int(a,l,a,c,s,l,s,c):this.set8(a,l,a,c,s,l,s,c);var u=this.loadImageBuffer(o,i);return u.width=n,u.height=r,u.type=o instanceof Int16Array?"SHORT":"FLOAT",u},n.drawTinImage=function(e,t,n,r,i){var o=this.gl;this.loadTexture(e),o.uniformMatrix4fv(this.program.u_matrix,!1,this.getMap().projViewMatrix),o.uniform1f(this.program.u_opacity,i),o.bindBuffer(o.ARRAY_BUFFER,this.posBuffer),this.enableVertexAttrib(["a_position",3]),o.bufferData(o.ARRAY_BUFFER,new Float32Array(t),o.DYNAMIC_DRAW),o.bindBuffer(o.ARRAY_BUFFER,this.texBuffer),this.enableVertexAttrib(["a_texCoord",2]),o.bufferData(o.ARRAY_BUFFER,new Float32Array(n),o.DYNAMIC_DRAW),o.bufferData(o.ELEMENT_ARRAY_BUFFER,new Uint16Array(r),o.DYNAMIC_DRAW),o.drawElements(o.TRIANGLES,r.length,o.UNSIGNED_SHORT,0)},n.createCanvas2=function(){this.canvas2=ar.createCanvas(this.canvas.width,this.canvas.height)},n.createGLContext=function(){this.canvas.gl&&this.canvas.gl.wrap?this.gl=this.canvas.gl.wrap():this.gl=function(e,t){for(var n={alpha:!0,stencil:!0,preserveDrawingBuffer:!0,antialias:!1},r=["webgl","experimental-webgl"],i=null,o=0;o0?e.pop():null},n.saveTexture=function(e){this._textures.push(e)},n.loadTexture=function(e){var t=this.gl,n=e.texture;return n||(n=this._createTexture(e),e.texture=n),t.bindTexture(t.TEXTURE_2D,n),n},n.getImageBuffer=function(){this._imageBuffers||(this._imageBuffers=[]);var e=this._imageBuffers;return e&&e.length>0?e.pop():null},n.saveImageBuffer=function(e){this._imageBuffers||(this._imageBuffers=[]),this._imageBuffers.push(e)},n.loadImageBuffer=function(e,t){var n=this.gl,r=t||this.createImageBuffer();return n.bindBuffer(n.ARRAY_BUFFER,r),n.bufferData(n.ARRAY_BUFFER,e,n.STATIC_DRAW),r},n.createImageBuffer=function(){return this.getImageBuffer()||this.createBuffer()},n.removeGLCanvas=function(){var e=this.gl;if(e){if(this._debugBuffer&&(e.deleteBuffer(this._debugBuffer),delete this._debugBuffer),this._buffers&&(this._buffers.forEach((function(t){e.deleteBuffer(t)})),delete this._buffers),this._textures&&(this._textures.forEach((function(t){return e.deleteTexture(t)})),delete this._textures),this._debugInfoCanvas){var t=this._debugInfoCanvas.texture;t&&e.deleteTexture(t),delete this._debugInfoCanvas.texture,delete this._debugInfoCanvas}var n=e.program;e.deleteShader(n.fragmentShader),e.deleteShader(n.vertexShader),e.deleteProgram(n),delete this.gl,delete this.canvas2}},n.createBuffer=function(){var e=this.gl.createBuffer();if(!e)throw new Error("Failed to create the buffer object");return this._buffers||(this._buffers=[]),this._buffers.push(e),e},n.enableVertexAttrib=function(e){Rl(this.gl,this.gl.program,e)},n.createProgram=function(e,t){for(var n=this.gl,r=Ol(n,e,t),i=r.program,o=r.vertexShader,a=r.fragmentShader,s=n.getProgramParameter(i,35718),l=[],c=0;c=0&&(r=r.substring(0,o),j||(i=i.substring(0,o))),e[r]=this._getUniform(e,i)}},n._getUniform=function(e,t){var n=this.gl.getUniformLocation(e,t);if(!n)throw new Error("Failed to get the storage location of "+t);return n},t}(e);return C(t.prototype,{set8:function(){var e=ve.ie9?null:new Float32Array(8);return function(t,n,r,i,o,a,s,l){return e[0]=t,e[1]=n,e[2]=r,e[3]=i,e[4]=o,e[5]=a,e[6]=s,e[7]=l,e}}(),set8Int:function(){var e=ve.ie9?null:new Int16Array(8);return function(t,n,r,i,o,a,s,l){return e[0]=t,e[1]=n,e[2]=r,e[3]=i,e[4]=o,e[5]=a,e[6]=s,e[7]=l,e}}()}),t},Zl={renderer:ve.webgl?"gl":"canvas",crossOrigin:null},zl=new xe(0,0),Ul=function(e){function t(t,n,r){var i;return!n||Array.isArray(n)||n.url||(r=n,n=null),(i=e.call(this,t,r)||this)._images=n,i}Ae(t,e);var n=t.prototype;return n.onAdd=function(){this._prepareImages(this._images)},n.setImages=function(e){return this._images=e,this._prepareImages(e),this},n.getImages=function(){return this._images},n._prepareImages=function(e){e=e||[],Array.isArray(e)||(e=[e]);var t=this.getMap(),n=t.getGLRes();this._imageData=e.map((function(e){var r=new Br(e.extent);return C({},e,{extent:r,extent2d:r.convertTo((function(e){return t.coordToPointAtRes(e,n)}))})})),this._images=e;var r=this.getRenderer();r&&r.refreshImages()},t}(Vo);Ul.mergeOptions(Zl);var Hl=[],Vl=function(e){function t(){return e.apply(this,arguments)||this}Ae(t,e);var n=t.prototype;return n.isDrawable=function(){return!this.getMap().getPitch()||(console&&console.warn("ImageLayer with canvas renderer can't be pitched, use gl renderer ('renderer' : 'gl') instead."),!1)},n.checkResources=function(){var e=this;if(this._imageLoaded)return Hl;var t=this.layer._imageData.map((function(e){return[e.url,null,null]}));if(this.resources){var n=[],r=new Si;t.forEach((function(t){if(e.resources.isResourceLoaded(t)){var i=e.resources.getImage(t);r.addResource(t,i)}else n.push(t)})),this.resources.forEach((function(t,n){r.isResourceLoaded(t)||e.retireImage(n.image)})),this.resources=r,t=n}return this._imageLoaded=!0,t},n.retireImage=function(e){e.close&&e.close()},n.refreshImages=function(){this._imageLoaded=!1,this.setToRedraw()},n.draw=function(){this.isDrawable()&&(this.prepareCanvas(),this._painted=!1,this._drawImages(),this.completeRender())},n._drawImages=function(){var e=this.layer._imageData,t=this.getMap(),n=t._get2DExtentAtRes(t.getGLRes());if(e&&e.length)for(var r=0;r0&&a0&&s=a&&e.x<=a+i&&e.y>=s&&e.y<=s+o},n.addTo=function(e){this.map=e,e.getRenderer().addTopElement(this)},n.onEvent=function(e){this.fire(e.type,e)},n.mousedown=function(e){var t=e.target,n=this.options.cursor;n&&t.setCursor(n),this.onDragstart(e)},n.onDragstart=function(e){var t=e.containerPoint,n=e.target,r=n._panels.mapWrapper||n._containerDOM,i=this._dragger=new Er(r);i.on("dragging",this.onDragging,this).on("mouseup",this.onDragend,this).enable(),i.type="handle",i.onMouseDown(e.domEvent),$l=t.x,Ql=t.y,this.fire("dragstart",{containerPoint:t})},n.onDragging=function(e){if(this._dragger){var t=this.map,n=jn(e.domEvent,t._containerDOM),r={x:n.x-$l,y:n.y-Ql},i=t.containerPointToCoord(new xe($l,Ql)),o=t.containerPointToCoord(n);$l=n.x,Ql=n.y,this.offset(r),this.fire("dragging",{containerPoint:n,coordOffset:o._sub(i)})}},n.onDragend=function(e){if(this._dragger){var t=this.map;t.resetCursor();var n=jn(e.domEvent,t._containerDOM),r={x:n.x-$l,y:n.y-Ql};this.offset(r),this._dragger.disable(),delete this._dragger,this.fire("dragend",{containerPoint:n})}},t}(fr(gr)),tc=function(){function e(e,t){this.target=e,e.once("remove",this.delete,this),this.map=t,this.addTo(t)}var t=e.prototype;return t.setPoints=function(e){this.points=e;var t=e.map((function(e){return e.x})),n=e.map((function(e){return e.y}));this.xmin=Math.min.apply(Math,t),this.xmax=Math.max.apply(Math,t),this.ymin=Math.min.apply(Math,n),this.ymax=Math.max.apply(Math,n)},t.hitTest=function(){return!1},t.render=function(e){var t=this.map;if(!(this.xmax<=0||this.xmin>=t.width||this.ymax<=0||this.ymin>=t.height)){var n=t.getDevicePixelRatio();e.lineWidth=1,e.strokeStyle="#000",e.globalAlpha=1,e.beginPath();var r=this.points;e.moveTo(o(r[0].x),o(r[0].y));for(var i=1;i=0){var d=n.containerPointToCoordinate(r.sub(i)),h=t.getCoordinates();d.x=h.x,t.setCoordinates(d),e._updateCoordFromShadow(!0),r=f[f.length-1-l].getContainerPoint()}var p=n.coordToContainerPoint(t.getCoordinates()).add(i),g=t._getInternalSymbol(),m=r.sub(p);"bottom"===a&&r.y>p.y&&(m.y=0);var v="middle"===a?2:1,A="left"===s?1:2,y=Math.abs(m.x)*A,b=Math.abs(m.y)*v;c&&(b=(y=Math.max(y,b*c))/c);var _=u[l];t instanceof Fa?((c||0===_||2===_)&&(t.setWidth(y),t!==e._geometry&&e._geometry.setWidth(y)),(c||1===_||2===_)&&(t.setHeight(b),t!==e._geometry&&e._geometry.setHeight(b))):((c||0===_||2===_)&&(g.markerWidth=Math.min(y,e._geometry.options.maxMarkerWidth||1/0)),(c||1===_||2===_)&&(g.markerHeight=Math.min(b,e._geometry.options.maxMarkerHeight||1/0)),t.setSymbol(g),t!==e._geometry&&e._geometry.setSymbol(g))}),(function(){e._update(h())}))}else console&&console.warn("A marker can't be resized with symbol:",t.getSymbol());function h(){var e=[["setCoordinates",t.getCoordinates().toArray()]];return t instanceof Fa?(e.push(["setWidth",t.getWidth()]),e.push(["setHeight",t.getHeight()])):e.push(["setSymbol",t.getSymbol()]),e}},n.createCircleEditor=function(){var e=this,t=this._shadow||this._geometry,n=this.getMap();this._history||this._recordHistory([["setCoordinates",t.getCoordinates().toArray()],["setRadius",t.getRadius()]]),this._createResizeHandles(null,(function(r){var i=t.getCenter(),o=n.containerPointToCoord(r),a=new ga([[i.x,i.y],[o.x,i.y]]),s=new ga([[i.x,i.y],[i.x,o.y]]),l=Math.max(n.computeGeometryLength(a),n.computeGeometryLength(s));t.setRadius(l),t!==e._geometry&&e._geometry.setRadius(l)}),(function(){e._update("setRadius",t.getRadius())}))},n.createEllipseOrRectEditor=function(){var e=this,t=[2,1,2,0,0,2,1,2],n=this._shadow||this._geometry;this._history||this._recordHistory(s());var r,i=this.getMap(),o=this._geometry instanceof Ta;this.options.fixAspectRatio&&(r=n.getWidth()/n.getHeight());var a=this._createResizeHandles(null,(function(s,l){var c,u,d,f=o?1:2,h=a[l].getContainerPoint(),p=t[l];if(o){var g=a[7-l].getContainerPoint(),m=(c=h.sub(g)).abs();u=i.pixelToDistance(m.x,0),d=i.pixelToDistance(0,m.y);var v=n.getSize(),A=n.getCoordinates(),y=n.getWidth(),b=n.getHeight(),_=i.containerPointToCoord(s),w=i.containerPointToCoord(g),x=new ga([[w.x,w.y],[_.x,w.y]]),E=new ga([[w.x,w.y],[w.x,_.y]]);if(u=i.computeGeometryLength(x),d=i.computeGeometryLength(E),0===p)if(r&&(m.y=m.x/r,v.height=Math.abs(m.y),d=u/r),h.y=g.y-v.height/2,_.y=A.y,4===l)_.x=Math.min(_.x,A.x);else{var S=i.locate(A,y,0);_.x=i.locate(new Sr(S.x,_.y),-u,0).x}else if(1===p)r&&(m.x=m.y*r,v.width=Math.abs(m.x),u=d*r),h.x=g.x-v.width/2,_.x=A.x,_.y=Math.max(_.y,w.y);else{if(r&&(u>d*r?(d=u/r,h.y=g.y+m.x*Le(c.y)/r):(u=d*r,h.x=g.x+m.y*Le(c.x)*r)),0===l||5===l){var C=0===l?i.locate(A,y,0):i.locate(A,y,-b);_.x=i.locate(new Sr(C.x,_.y),-u,0).x}else _.x=Math.min(_.x,w.x);_.y=Math.max(_.y,w.y)}n.setCoordinates(_),e._updateCoordFromShadow(!0)}else{var P=n.getCenter(),T=i.containerPointToCoord(h),k=new ga([[P.x,P.y],[T.x,P.y]]),M=new ga([[P.x,P.y],[P.x,T.y]]);u=i.computeGeometryLength(k),d=i.computeGeometryLength(M),r&&(d=(u=Math.max(u,d*r))/r)}(r||0===p||2===p)&&(n.setWidth(u*f),n!==e._geometry&&e._geometry.setWidth(u*f)),(r||1===p||2===p)&&(n.setHeight(d*f),n!==e._geometry&&e._geometry.setHeight(d*f))}),(function(){e._update(s())}));function s(){return[["setCoordinates",n.getCoordinates().toArray()],["setWidth",n.getWidth()],["setHeight",n.getHeight()]]}},n.createPolygonEditor=function(){var e=this.getMap(),t=this._shadow||this._geometry,n=this;this._history||this._recordHistory("setCoordinates",Sr.toNumberArrays(t.getCoordinates()));var r=t instanceof ua?3:2,i="maptalks--editor-vertex-index",o={0:[]},a={0:[]};function s(e){if(void 0===e&&(e=0),t instanceof ua){var n=t.getCoordinates()[e]||[];return n.slice(0,n.length-1)}return t.getCoordinates()}function l(e){return void 0===e&&(e=0),0===e?t._getPrjCoordinates():t._getPrjHoles()[e-1]}function c(){for(var e in o){for(var t=o[e].length-1;t>=0;t--)o[e][t][i]=t;for(var r=a[e].length-1;r>=0;r--)a[e][r][i]=r}n._updateCoordFromShadow()}function u(e){n._updating=!0;var s=e.target,u=s[i],d=T(s._ringIndex)?s._ringIndex:0,f=l(d);if(!(f.length<=r)){var h,p=t instanceof ga&&(0===u||u===f.length-1);f.splice(u,1),d>0?t._prjHoles[d-1]=f:t._setPrjCoordinates(f),t._updateCache(),o[d].splice(u,1)[0].delete(),u=A.length?A[0]:A[r+1];var y=A[r].add(v).multi(.5),b=n.createHandle(y,{symbol:n.options.newVertexHandleSymbol,cursor:"pointer",axis:null,onDown:function(r,o){if(!o||!o.domEvent||2!==o.domEvent.button){var s=l(u),c=b[i],d=b.getContainerPoint(),f=e._containerPointToPrj(d);s.splice(c+1,0,f),u>0?t._prjHoles[u-1]=s:t._setPrjCoordinates(s),t._updateCache(),b.opacity=1,a[u].splice(c,0,m.call(n,c,u),m.call(n,c+1,u)),g=!0}},onMove:function(){d(b.getContainerPoint(),b[i]+1,u)},onUp:function(e){if(e&&e.domEvent&&2===e.domEvent.button)g=!1;else{var t=b[i];Oe(b,a[u]),b.delete(),o[u].splice(t+1,0,p.call(n,t+1,u)),c(),n._updateCoordFromShadow(),g=!1}},onRefresh:function(t,n){A=n||s(t);var r,o=b[i];r=o===A.length-1?0:o+1;var a=A[o].add(A[r]).multi(.5),l=e.coordToContainerPoint(a);b.setContainerPoint(l._add(h()))}});return b[i]=r,b}if(t instanceof ua)for(var v=t.getHoles().length+1,A=0;A=0;r--)a[e][r].refresh(e,n);for(var i in a[0].length&&t instanceof ga&&(2===t.getCoordinates().length?a[0][0].options.symbol.markerDx=12:t.getCoordinates().length>2&&(a[0][0].options.symbol.markerDx=0)),o)for(var l=s(i),c=o[i].length-1;c>=0;c--)o[i][c].refresh(i,l)}}))},n._refresh=function(){if(this._refreshHooks)for(var e=this._refreshHooks.length-1;e>=0;e--)this._refreshHooks[e].call(this)},n._hideContext=function(){this._geometry&&(this._geometry.closeMenu(),this._geometry.closeInfoWindow())},n._addRefreshHook=function(e){e&&(this._refreshHooks||(this._refreshHooks=[]),this._refreshHooks.push(e))},n._update=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r1?t-1:0),r=1;r/gi,"").replace(/<\/p>/gi,"
"),this._textEditor.innerHTML=e;var t=this._textEditor.innerText.replace(/[\r\n]+$/gi,"");this.setContent(t),Xn(this._textEditor,"mousedown dblclick",Ln),this.getMap().off("mousedown",this.endEditText,this),this._editUIMarker.remove(),delete this._editUIMarker,this._textEditor.onkeyup=null,delete this._textEditor,this.show(),this._fireEvent("edittextend")}return this},isEditingText:function(){return!!this._textEditor},getTextEditor:function(){return this._editUIMarker},_prepareEditor:function(){var e=this.getMap(),t=this._createEditor();this._textEditor=t,e.on("mousedown",this.endEditText,this);var n=this._getEditorOffset();this._editUIMarker=new Ds(this.getCoordinates(),{animation:null,content:t,dx:n.dx,dy:n.dy}).addTo(e),this._setCursorToLast(this._textEditor)},_getEditorOffset:function(){var e=this._getInternalSymbol()||{},t=0,n=0,r=e.textHorizontalAlignment;return"middle"===r||P(r)?(t=(e.textDx||0)-2,n=(e.textDy||0)-2):(t=(e.markerDx||0)-2,n=(e.markerDy||0)-2),{dx:t,dy:n}},_createEditor:function(){var e=this.getContent(),t=this.getSize(),n=this._getInternalSymbol()||{},r=t.width,i=n.textFill||"#000000",o=n.textSize||12,a=t.height,s=n.markerLineColor||"#000",l=n.markerFill||"#3398CC",c=n.textLineSpacing||0,u=Pn("div");return u.contentEditable=!0,u.style.cssText="background:"+l+"; border:1px solid "+s+";\n color:"+i+";font-size:"+o+"px;width:"+(r-2)+"px;height:"+(a-2)+"px;margin: auto;\n line-height:"+(o+c)+"px;outline: 0; padding:0; margin:0;word-wrap: break-word;\n overflow: hidden;-webkit-user-modify: read-write-plaintext-only;",u.innerText=e,Yn(u,"mousedown dblclick",Ln),u.onkeyup=function(e){var t=u.style.height||0;13===e.keyCode&&(u.style.height=parseInt(t)+o/2+"px")},u},_setCursorToLast:function(e){var t;window.getSelection?(e.focus(),(t=window.getSelection()).selectAllChildren(e),t.collapseToEnd()):document.selection&&((t=document.selection.createRange()).moveToElementText(e),t.collapse(!1),t.select())}};Da.include(ac),Uo.include({animate:function(e,t,n){var r=this;this._animPlayer&&this._animPlayer.finish(),R(t)&&(n=t),t||(t={});var i,o=this.getMap(),a=this._getProjection(),s=this._prepareAnimationStyles(e),l=t.focus;if(delete this._animationStarted,o){var c=o._getRenderer();t.framer=function(e){c.callInNextFrame(e)}}var u=sa.animate(s,t,(function(e){if(o&&o.isRemoved())u.finish();else{o&&!r._animationStarted&&l&&o.onMoveStart();var t=e.styles;for(var s in t)if("symbol"!==s&&"translate"!==s&&t.hasOwnProperty(s)){var c="set"+s[0].toUpperCase()+s.slice(1);r[c](t[s])}var d=t.translate;if(d){var f=d;i&&(f=d.sub(i)),i=d,r.translate(f)}var h=t.symbol;if(h){var p=r.getSymbol()||{};r.setSymbol(gn(p,h))}if(o&&l){var g=a.project(r.getCenter());o._setPrjCenter(g);var m=o._parseEventFromCoord(a.unproject(g));"running"!==u.playState?o.onMoveEnd(m):o.onMoving(m)}r._fireAnimateEvent(u.playState),n&&n(e)}}),this);return this._animPlayer=u,this._animPlayer.play()},_prepareAnimationStyles:function(e){var t=this._getInternalSymbol(),n={};for(var r in e)if(e.hasOwnProperty(r)){var i=e[r];if("translate"!==r&&"symbol"!==r){var o=this["get"+r[0].toUpperCase()+r.substring(1)]();n[r]=[o,i]}else if("symbol"===r){var a=void 0;if(Array.isArray(e.symbol)){if(!Array.isArray(t))throw new Error("geometry'symbol isn't a composite symbol, while the symbol in styles is.");a=[];for(var s=e.symbol,l=0;l1||2===n.button||(this.container=t._panels.mapWrapper||t._containerDOM,this.target.on("click",this._endDrag,this),this._lastCoord=this._correctCoord(e.coordinate),this._lastPoint=e.containerPoint,this._prepareDragHandler(),this._dragHandler.onMouseDown(e.domEvent),Yn(this.container,"mouseleave",this._endDrag,this),this._startParam=e,this._moved=!1)}},n._dragging=function(e){var t=this.target,n=t.getMap(),r=n._parseEvent(e.domEvent),i=r.domEvent;if(!(i.touches&&i.touches.length>1)){var o=n._getVisualHeight(n.options.maxVisualPitch);if(!(r.containerPoint.y=this.tileCache.max/2&&this.tileCache.setMaxSize(2*n+1);var r=0,i=!1,o={},a=[],s=[],l={},c=[],u={},d=[],f={},h={},p=this._markTiles(),g=this._getLoadLimit(),m=t.length;this._tileZoom=t[0].zoom;for(var v=0;vg)&&(!e.isInteracting()||e.isMoving()||e.isRotating()))r++,h[x]=w}if(E&&!o[x]){o[x]=1,y&&!f[x]&&(w.cache=!1,d.push({image:y,info:w}),f[x]=1);var C=this._findParentTile(w);if(C){var P=C.info.id;void 0===l[P]&&(l[P]=s.length,s.push(C))}else if(!s.length){var T=this._findChildTiles(w);T.length&&T.forEach((function(e){u[e.info.id]||(c.push(e),u[e.info.id]=1)}))}}}}return s.length&&(c.length=0,this._childTiles.length=0),{childTiles:c,parentTiles:s,tiles:a,placeholders:d,loading:i,loadingCount:r,tileQueue:h}},n.isTileCachedOrLoading=function(e){return this.tileCache.get(e)||this.tilesInView[e]||this.tilesLoading[e]},n._drawTiles=function(e,t,n,r,i){var o=this;t.length&&(t.sort((function(e,t){return Math.abs(t.info.z-o._tileZoom)-Math.abs(e.info.z-o._tileZoom)})),this._parentTiles=t),n.length&&(this._childTiles=n);var a={tiles:e,parentTiles:this._parentTiles,childTiles:this._childTiles,parentContext:i};this.onDrawTileStart(a,i),1===this.layer.options.opacity&&(this._childTiles.forEach((function(e){return o._drawTile(e.info,e.image,i)})),this._parentTiles.forEach((function(e){return o._drawTile(e.info,e.image,i)}))),e.sort(this._compareTiles);for(var s=0,l=e.length;se.onerrorTick)return e.onerrorTick++,void this._fetchImage(e,t);var n=this.layer.options.errorUrl;if(n){if(e instanceof Image&&e.src!==n)return void(e.src=n);(e=new Image).src=n}e=e instanceof Image?e:mc,this.abortTileLoading(e,t),e.loadTime=0,delete this.tilesLoading[t.id],this._addTileToCache(t,e),this.setToRedraw(),this.layer.fire("tileerror",{tile:t})}},n.drawTile=function(e,t){if(t&&this.getMap()){var n=e.extent2d,r=e.offset,i=uc.set(n.xmin-r[0],n.ymax-r[1]),o=e.z,a=e.id,s=this.getMap(),l=s.getZoom(),c=this.context,u=s._pointAtResToContainerPoint(i,e.res,0,dc),d=s.getBearing(),f=d||l!==o,h=this.getTileOpacity(t),p=c.globalAlpha;h<1&&(c.globalAlpha=h,this.setToRedraw()),f||u._round();var g=u.x,m=u.y,v=e.extent2d.xmax-e.extent2d.xmin,A=e.extent2d.ymax-e.extent2d.ymin;if(f){c.save(),c.translate(g,m),d&&(c.rotate(-d*Math.PI/180),v+=.1,A+=.1);var y=s._getResolution();if(y!==e.res){var b=e.res/y;c.scale(b,b)}g=m=0}if(ar.image(c,t,g,m,v,A),this.layer.options.debug){var _=this.layer.options.debugOutline;c.save(),c.strokeStyle=_,c.fillStyle=_,c.strokeWidth=10,c.font="20px monospace";var w=new xe(g,m);ar.rectangle(c,w,{width:v,height:A},1,0),ar.fillText(c,this.getDebugInfo(a),w._add(32,A-14),_),ar.drawCross(c,g+v/2,m+A/2,2,_),c.restore()}f&&c.restore(),c.globalAlpha!==p&&(c.globalAlpha=p),this.setCanvasUpdated()}},n.getDebugInfo=function(e){var t=e.split("_"),n=t.length;return"x:"+t[n-2]+", y:"+t[n-3]+", z:"+t[n-1]},n._findChildTiles=function(e){var t=this._getLayerOfTile(e.layer);if(!t||!t.options.background)return[];for(var n=this.getMap(),r=[],i=e.res,o=e.extent2d.getMin(),a=e.extent2d.getMax(),s=t._project(n._pointToPrjAtRes(o,i,fc),fc),l=t._project(n._pointToPrjAtRes(a,i,hc),hc),c=1;c<3;c++)this._findChildTilesAt(r,s,l,t,e.z+c);return r},n._findChildTilesAt=function(e,t,n,r,i){var o=r.options.zoomOffset,a=r.getId(),s=r.getSpatialReference().getResolution(i+o);if(s)for(var l,c,u=r._getTileConfig().getTileIndex(t,s),d=r._getTileConfig().getTileIndex(n,s),f=Math.min(u.idx,d.idx),h=Math.max(u.idx,d.idx),p=Math.min(u.idy,d.idy),g=Math.max(u.idy,d.idy),m=f;m=0;r--){var i=e[r]._getExternalResources();if(i.length)if(this.resources)for(var o=0;o1.5*this._drawnRes&&this._geosToDraw.length=_&&k>=w&&T<=y&&k<=b,!C._inCurrentView){var M=C.getSymbolHash(),O=void 0;O=M?x[M]=x[M]||C._painter.getFixedExtent():C._painter.getFixedExtent(),Ic.set(O.xmin,O.ymin,O.xmax,O.ymax),Ic._add(v[E]),C._inCurrentView=Ic.intersects(A)}C._inCurrentView&&(C.isVisible()&&l||(C._inCurrentView=!1),this._onlyHasPoint&&C._inCurrentView&&(this._hasPoint=!0,C._isCheck=!0,this._geosToDraw.push(C)))}else C._inCurrentView=!1}return v},n._sortByDistanceToCamera=function(e){if(this.layer.options.sortByDistanceToCamera&&this._geosToDraw.length){var t=this.getMap(),n=t.distanceToPoint(1e3,0,t.getGLScale()).x/1e3,r="center";this._geosToDraw.sort((function(t,i){var o=t.getType(),a=i.getType();if("Point"!==o||"Point"!==a)return 0;var s=t._painter,l=i._painter;if(!s||!l)return 0;var c=s.getRenderPoints(r)[0][0],u=l.getRenderPoints(r)[0][0],d=s.getAltitude()*n,f=l.getAltitude()*n;us(Rc,c.x,c.y,d);var h=gs(Rc,e);return us(Rc,u.x,u.y,f),gs(Rc,e)-h}))}},n._constructorIsThis=function(){return this.constructor===t},t}(kc);Ka.registerRenderer("canvas",Lc);var Nc=function(e){function t(t){var n;return(n=e.call(this)||this).map=t,n._handlerQueue=[],n._thisDocVisibilitychange=n._onDocVisibilitychange.bind(ye(ye(n))),n._thisDocDragStart=n._onDocDragStart.bind(ye(ye(n))),n._thisDocDragEnd=n._onDocDragEnd.bind(ye(ye(n))),n}Ae(t,e);var n=t.prototype;return n.callInNextFrame=function(e){this._handlerQueue.push(e)},n.executeFrameCallbacks=function(){var e=this._handlerQueue;this._handlerQueue=[];for(var t=0,n=e.length;t0&&c-1-f>l&&h!==u){h._getRenderer().clearCanvas();continue}d+=this._drawCanvasLayerOnInteracting(h,d,s,t)}else r&&g.drawOnInteracting?(g.prepareRender&&g.prepareRender(),g.checkAndDraw?g.checkAndDraw(g.drawOnInteracting,this._eventParam,t):g.drawOnInteracting(this._eventParam,t)):(g.render(t),p&&v&&g.isLoadingResource()&&(g.__zoomTransformMatrix=v));p&&(o.push(h.getId()),this.setLayerCanvasUpdated())}else p&&r&&(n.isZooming()&&!n.getPitch()?(g.prepareRender(),g.__zoomTransformMatrix=this._zoomMatrix):(n.getPitch()||n.isRotating())&&g.clearCanvas())}}}var A=this._canvasIds||[],y=this._updatedIds||[];if(this._canvasIds=i,this._updatedIds=o,!this.isLayerCanvasUpdated()){var b="---";A.join(b)===i.join(b)&&y.join(b)===o.join(b)||this.setLayerCanvasUpdated()}},n._checkLayerRedraw=function(e){if(this.isSpatialReferenceChanged())return!0;var t=this.map,n=e._getRenderer();return e.isCanvasRender()?n.testIfNeedRedraw():!(!n.needToRedraw||!n.needToRedraw())||(t.isInteracting()||this.isViewChanged())},n._drawCanvasLayerOnInteracting=function(e,t,n,r){var i=this.map,o=e._getRenderer(),a=o.getDrawTime(),s=0===n||n>0&&t+a<=n;if(o.mustRenderOnInteracting&&o.mustRenderOnInteracting())o.render(r);else{if(o.drawOnInteracting&&(e===i.getBaseLayer()||s||i.isZooming()&&e.options.forceRenderOnZooming||i.isMoving()&&e.options.forceRenderOnMoving||i.isRotating()&&e.options.forceRenderOnRotating))return o.prepareRender(),o.prepareCanvas(),o.checkAndDraw?o.checkAndDraw(o.drawOnInteracting,this._eventParam,r):o.drawOnInteracting(this._eventParam,r),a;!i.isZooming()||i.getPitch()||i.isRotating()?(i.getPitch()||i.isRotating())&&o.clearCanvas():(o.prepareRender(),o.__zoomTransformMatrix=this._zoomMatrix)}return o.drawOnInteracting&&!s&&o.onSkipDrawOnInteracting(this._eventParam,r),0},n._fireLayerLoadEvents=function(){if(this._updatedIds&&this._updatedIds.length>0){var e=this.map;this._updatedIds.reverse().forEach((function(t){var n=e.getLayer(t);if(n){var r=n._getRenderer();r&&r.isRenderComplete()&&n.fire("layerload")}}))}},n.isLayerCanvasUpdated=function(){return this._canvasUpdated},n.setLayerCanvasUpdated=function(){this._canvasUpdated=!0},n.drawLayerCanvas=function(e){var t=this.map;if(!t)return!1;if(!this.isLayerCanvasUpdated()&&!this.isViewChanged())return!1;this.canvas||this.createCanvas(),t._fireEvent("renderstart",{context:this.context}),this._updateCanvasSize()||this.clearCanvas();for(var n,r=t.isInteracting(),i=t.options.layerCanvasLimitOnInteracting,o=e.length,a=[],s=0;s=0&&o>i?o-i:0;d=0;a--){var s=n[a];if(!(!s.options.hitDetect||s.isEmpty&&s.isEmpty())){var l=s._getRenderer();if(l&&l.hitDetect&&(!l.isBlank||!l.isBlank())){if("default"!==s.options.cursor&&l.hitDetect(e)){r=s.options.cursor||"pointer";break}if(o++,i>0&&o>i)break}}}t._trySetCursor(r)}},n._getLayerImage=function(e){var t=e._getRenderer();return t.getCanvasImage?t.getCanvasImage():null},n.initContainer=function(){var e=this.map._panels;function t(t,n,r,i){var o=Pn("div",n);return r&&(o.style.cssText=r),e[t]=o,i||Nn(o),o}var n=this.map._containerDOM;if(!this._containerIsCanvas){n.innerHTML="";var r="position:absolute;top:0px;left:0px;",i=t("mapWrapper","maptalks-wrapper","position:absolute;overflow:hidden;",!0),o=t("allLayers","maptalks-all-layers",r+"padding:0px;margin:0px;z-index:0;overflow:visible;",!0),a=t("backStatic","maptalks-back-static",r+"z-index:0;",!0),s=t("back","maptalks-back",r+"z-index:1;"),l=t("backLayer","maptalks-back-layer",r),c=t("canvasContainer","maptalks-canvas-layer",r+"border:none;z-index:2;"),u=t("frontStatic","maptalks-front-static",r+"z-index:3;",!0),d=t("front","maptalks-front",r+"z-index:4;",!0),f=t("frontLayer","maptalks-front-layer",r+"z-index:0;"),h=t("ui","maptalks-ui",r+"border:none;z-index:1;",!0),p=t("control","maptalks-control","z-index:1",!0);n.appendChild(i),o.appendChild(a),s.appendChild(l),s.layerDOM=l,o.appendChild(s),o.appendChild(c),d.appendChild(f),d.layerDOM=f,d.uiDOM=h,o.appendChild(u),o.appendChild(d),d.appendChild(h),i.appendChild(o),i.appendChild(p),this.createCanvas(),this.resetContainer();var g=this.map._getContainerDomSize();this.updateMapSize(g)}},n.isViewChanged=function(){if(void 0!==this._isViewChanged)return this._isViewChanged;var e=this._mapview,t=this._getMapView();return this._isViewChanged=!e||!$e(e,t),this._isViewChanged},n._recordView=function(){var e=this.map;!e._onViewChange||e.isInteracting()||e.isAnimating()||$e(e.getView(),e._getCurrentView())||e._onViewChange(e.getView())},n.isSpatialReferenceChanged=function(){return this._spatialRefChanged},n._getMapView=function(){var e=this.map,t=e._getPrjCenter();return{x:t.x,y:t.y,zoom:e.getZoom(),pitch:e.getPitch(),bearing:e.getBearing(),width:e.width,height:e.height}},n._frameLoop=function(e){var t=this;this.map?(e=e||0,this._frameTimestamp=e,this._resizeCount=0,this.renderFrame(e),this._animationFrame=be((function(e){t._frameLoop(e)}))):this._cancelFrameLoop()},n._cancelFrameLoop=function(){this._animationFrame&&_e(this._animationFrame)},n._drawLayerCanvasImage=function(e,t,n,r){var i=this.context,o=t.point.round(),a=this.map.getDevicePixelRatio();1!==a&&o._multi(a);var s=t.image,l=s.width,c=s.height;if(!(o.x+l<=0||o.y+c<=0)){var u=e.options.opacity;if(T(u)||(u=1),!(u<=0)){var d=t.opacity;if(T(d)||(d=1),!(d<=0)){var f=i.globalAlpha;u<1&&(i.globalAlpha*=u),d<1&&(i.globalAlpha*=d),e.options.cssFilter&&(i.filter=e.options.cssFilter);var h=e.getRenderer(),p=h.__zoomTransformMatrix,g=h.clipCanvas(this.context);p&&(i.save(),i.setTransform.apply(i,p)),i.drawImage(s,0,0,l,c,o.x,o.y,n,r),p&&i.restore(),g&&i.restore(),"none"!==i.filter&&(i.filter="none"),i.globalAlpha=f}}}},n._drawCenterCross=function(){var e=this.map.options.centerCross;if(e){var t=this.context,n=new xe(this.canvas.width/2,this.canvas.height/2);R(e)?e(t,n):ar.drawCross(this.context,n.x,n.y,2,"#f00")}},n._drawContainerExtent=function(){var e=this.map.options.cascadePitches,t=this.map.height-this.map._getVisualHeight(e[0]),n=this.map.height-this.map._getVisualHeight(e[1]),r=this.map.getContainerExtent(),i=this.context;i.beginPath(),i.moveTo(0,r.ymin),i.lineTo(r.xmax,r.ymin),i.stroke(),i.beginPath(),i.moveTo(0,t),i.lineTo(r.xmax,t),i.stroke(),i.beginPath(),i.moveTo(0,n),i.lineTo(r.xmax,n),i.stroke()},n._drawFog=function(){var e=this.map;if(!(e.getPitch()<=e.options.maxVisualPitch)&&e.options.fog){var t=e.getDevicePixelRatio(),n=this.context,r=e.getContainerExtent(),i=(e.height-e._getVisualHeight(75))*t;i<0&&(i=0);var o=r.ymin*t,a=Math.ceil(o-i),s=e.options.fogColor.join(),l=n.createLinearGradient(0,i,0,o+30),c=1-30/(a+30);l.addColorStop(0,"rgba("+s+", 0)"),l.addColorStop(.3,"rgba("+s+", 0.3)"),l.addColorStop(c,"rgba("+s+", 1)"),l.addColorStop(1,"rgba("+s+", 0)"),n.beginPath(),n.fillStyle=l,n.fillRect(0,i,Math.ceil(r.getWidth())*t,Math.ceil(a+30))}},n._getAllLayerToRender=function(){return this.map._getLayers()},n.clearCanvas=function(){this.canvas&&ar.clearRect(this.context,0,0,this.canvas.width,this.canvas.height)},n._updateCanvasSize=function(){if(!this.canvas||this._containerIsCanvas)return!1;var e=this.map,t=e.getSize(),n=this.canvas,r=at(t,e.getDevicePixelRatio()),i=r.width,o=r.height,a=r.cssWidth,s=r.cssHeight;return!n.style||n.style.width===a&&n.style.height===s||(n.style.width=a,n.style.height=s),(i!==n.width||o!==n.height)&&(n.height=o,n.width=i,this.topLayer.width=n.width,this.topLayer.height=n.height,!0)},n.createCanvas=function(){this.topLayer=Pn("canvas"),this.topCtx=this.topLayer.getContext("2d"),this._containerIsCanvas?this.canvas=this.map._containerDOM:(this.canvas=Pn("canvas"),this._updateCanvasSize(),this.map._panels.canvasContainer.appendChild(this.canvas)),this.context=this.canvas.getContext("2d")},n._updateDomPosition=function(e){return void 0===this._checkPositionTime&&(this._checkPositionTime=-1/0),Math.abs(e-this._checkPositionTime)>=500&&(Fn(this.map._containerDOM),this._checkPositionTime=Math.min(e,this._checkPositionTime)),this},n._checkSize=function(){this.map&&this.map.checkSize()},n._setCheckSizeInterval=function(e){var t=this;ve.resizeObserver?(this._resizeObserver&&this._resizeObserver.disconnect(),this.map&&(this._resizeObserver=new ResizeObserver((function(e){!t.map||t.map.isRemoved()?t._resizeObserver.disconnect():e.length&&(t.map._containerDomContentRect=e[0].contentRect,t._checkSize(e[0].contentRect),t._resizeCount=t._resizeCount||0,t.renderFrame((t._frameTimestamp||0)+ ++t._resizeCount/100))})),this._resizeObserver.observe(this.map._containerDOM))):(clearInterval(this._resizeInterval),this._checkSizeInterval=e,this._resizeInterval=setInterval((function(){!t.map||t.map.isRemoved()?clearInterval(t._resizeInterval):t._checkSize()}),this._checkSizeInterval))},n._registerEvents=function(){var e=this,t=this.map;t.options.checkSize&&!j&&"undefined"!==typeof window&&this._setCheckSizeInterval(t.options.checkSizeInterval),ve.mobile||t.on("_mousemove",this._onMapMouseMove,this),t.on("_dragrotatestart _dragrotating _dragrotateend _movestart _moving _moveend _zoomstart",(function(t){e._eventParam=t})),t.on("_zooming",(function(n){t.getPitch()||(e._zoomMatrix=n.matrix.container),e._eventParam=n})),t.on("_zoomend",(function(t){e._eventParam=t,delete e._zoomMatrix})),t.on("_spatialreferencechange",(function(){e._spatialRefChanged=!0})),ve.webgl&&"undefined"!==typeof document&&(Mn(document,"visibilitychange",this._thisDocVisibilitychange,this),Mn(document,"dragstart",this._thisDocDragStart,this),Mn(document,"dragend",this._thisDocDragEnd,this)),ve.addDPRListening&&ve.addDPRListening(this.map)},n._onMapMouseMove=function(e){var t=this,n=this.map;!n.isInteracting()&&n.options.hitDetect&&(this._hitDetectFrame&&_e(this._hitDetectFrame),this._hitDetectFrame=be((function(){t.hitDetect(e.containerPoint)})))},n._getCanvasLayers=function(){return this.map._getLayers((function(e){return e.isCanvasRender()}))},n.addTopElement=function(e){this._tops||(this._tops=[]),this._tops.push(e)},n.removeTopElement=function(e){if(this._tops){var t=this._tops.indexOf(e);t>=0&&this._tops.splice(t,1)}},n.getTopElements=function(){return this._tops||[]},n.drawTops=function(){this.topCtx.clearRect(0,0,this.topLayer.width,this.topLayer.height),this.map.fire("drawtopstart"),this.map.fire("drawtops");for(var e=this.getTopElements(),t=!1,n=0;n0&&Array.isArray(t[0])&&(t=t[0].concat(t[1]));else if("vertex"===e)if(i=[],(t=this._getPath2DPoints(this._getPrjCoordinates(),!1,r))&&t.length>0&&Array.isArray(t[0])){for(var o=0,a=t.length;o0&&Array.isArray(d[0]))for(var f,h=1,p=d.length;h0&&!f[0].equals(f[f.length-1])&&f.push(f[0]);for(var g=1,m=f.length;g0&&!d[0].equals(d[d.length-1])&&d.push(d[0]);for(var v=1,A=d.length;v1?x-2:x-1;i=x?[[w[S]?n._prjToPointAtRes(w[S],r):E,E]]:[]}else{var C=this.getCenter();if(C){var P=this._getProjection().project(C);t=[n._prjToPointAtRes(P,r)]}else t=[]}return[t,i]}};ga.include(Bc),ua.include(Bc);var Zc={within:!1,center:[0,0]};function zc(e){if(e&&e._containerBbox){Zc.within=!1;var t=e._containerBbox,n=t.minx,r=t.miny,i=t.maxx,o=t.maxy,a=Math.abs(i-n),s=Math.abs(o-r);a<=1&&s<=1&&(Zc.within=!0,Zc.center[0]=(n+i)/2,Zc.center[1]=(r+o)/2),delete e._containerBbox}else Zc.within=!1;return Zc}Uo.include({_redrawWhenPitch:function(){return!1},_redrawWhenRotate:function(){return!1}});var Uc={_redrawWhenPitch:function(){return!0},_redrawWhenRotate:function(){return this instanceof Pa||this instanceof ka},_paintAsPath:function(){var e=this.getMap();return this.getAltitude()>0||e.getPitch()||this instanceof Pa&&e.getBearing()},_getPaintParams:function(){var e=this.getMap();if(this._paintAsPath())return ua.prototype._getPaintParams.call(this,!0);var t=this._getPrjCoordinates(),n=e._prjToPointAtRes(t,e.getGLRes()),r=this._getRenderSize(n);return[n].concat(r)},_paintOn:function(){return this._paintAsPath()?ar.polygon.apply(ar,arguments):ar.ellipse.apply(ar,arguments)},_getRenderSize:function(e){var t=this.getMap(),n=t.getGLRes(),r=this._getPrjExtent(),i=t._prjToPointAtRes(r.getMin(),n),o=t._prjToPointAtRes(r.getMax(),n);return[Math.abs(o.x-i.x)/2,Math.abs(o.y-e.y),Math.abs(e.y-i.y)]}};Pa.include(Uc),Ca.include(Uc),Ta.include({_getPaintParams:function(){var e=this.getMap(),t=this._getPrjShell();return[this._getPath2DPoints(t,!1,e.getGLRes())]},_paintOn:ar.polygon}),ka.include(Uc,{_redrawWhenPitch:function(){return!0},_getPaintParams:function(){if(this._paintAsPath())return ua.prototype._getPaintParams.call(this,!0);var e=this.getMap(),t=e._prjToPointAtRes(this._getPrjCoordinates(),e.getGLRes());return[t,this._getRenderSize(t)[0],[this.getStartAngle(),this.getEndAngle()]]},_paintOn:function(){if(this._paintAsPath())return ar.polygon.apply(ar,arguments);var e=this.getMap().getBearing(),t=arguments;return e&&(t[3]=t[3].slice(0),t[3][0]+=e,t[3][1]+=e),ar.sector.apply(ar,t)}}),la.include({_paintAsPath:function(){return!0}}),ga.include({arrowStyles:{classic:[3,4]},_getArrowShape:function(e,t,n,r,i){if(!e||!t||e.equals(t))return null;i||(i=0);var o,a=n*r[0],s=n*r[1]+i,l=a/2+i;(o=t.nextCtrlPoint||t.prevCtrlPoint?t.prevCtrlPoint?t.sub(new xe(t.prevCtrlPoint)):t.sub(new xe(t.nextCtrlPoint)):t.sub(e))._unit();var c=t.sub(o.multi(s));o._perp();var u=c.add(o.multi(l));return o._multi(-1),[u,t,c.add(o.multi(l)),u]},_getPaintParams:function(){var e=this._getPrjCoordinates();return[this._getPath2DPoints(e,!1,this.getMap().getGLRes())]},_paintOn:function(e,t,n,r,i){var o=zc(this._painter);o.within?ar.pixelRect(e,o.center,n,r):this.options.smoothness?ar.paintSmoothLine(e,t,n,this.options.smoothness,!1,this._animIdx,this._animTailRatio):ar.path(e,t,n,null,i),this._paintArrow(e,t,n)},_getArrowPlacement:function(){return this.options.arrowPlacement},_getArrowStyle:function(){var e=this.options.arrowStyle;return e?Array.isArray(e)?e:this.arrowStyles[e]:null},_getArrows:function(e,t,n){var r=this._getArrowStyle();if(!r||e.length<2)return[];for(var i=e.length>0&&Array.isArray(e[0])?e:[e],o=this._getArrowPlacement(),a=[],s=this.getMap(),l=s.coordToContainerPoint(this.getFirstCoordinate()),c=s.coordToContainerPoint(this.getLastCoordinate()),u=i.length-1;u>=0;u--){if("vertex-first"===o||"vertex-firstlast"===o&&i[u][0].closeTo(l,.01)){var d=this._getArrowShape(i[u][1],i[u][0],t,r,n);d&&a.push(d)}if("vertex-last"===o||"vertex-firstlast"===o&&i[u][i[u].length-1].closeTo(c,.01)){var f=this._getArrowShape(i[u][i[u].length-2],i[u][i[u].length-1],t,r,n);f&&a.push(f)}else"point"===o&&this._getArrowPoints(a,i[u],t,r,n)}return a},_getArrowPoints:function(e,t,n,r,i){for(var o=0,a=t.length-1;o=0;o--)e.fillStyle=e.strokeStyle,ar.polygon(e,i[o],n,n)}}}),ua.include({_getPaintParams:function(e){var t=this.getMap().getGLRes(),n=this._getPrjShell(),r=this._getPath2DPoints(n,e,t),i=r.length>0&&Array.isArray(r[0]);i&&(r=[[r[0]],[r[1]]]);var o=this._getPrjHoles(),a=[];if(o&&o.length>0){for(var s=this._simplified,l=0;l{"use strict";function r(e){return{all:e=e||new Map,on:function(t,n){var r=e.get(t);r&&r.push(n)||e.set(t,[n])},off:function(t,n){var r=e.get(t);r&&r.splice(r.indexOf(n)>>>0,1)},emit:function(t,n){(e.get(t)||[]).slice().map((function(e){e(n)})),(e.get("*")||[]).slice().map((function(e){e(t,n)}))}}}n.d(t,{Z:()=>r})},94959:e=>{var t=1e3,n=60*t,r=60*n,i=24*r,o=365.25*i;function a(e,t,n){if(!(e0)return function(e){if((e=String(e)).length>100)return;var a=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(e);if(!a)return;var s=parseFloat(a[1]);switch((a[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return s*o;case"days":case"day":case"d":return s*i;case"hours":case"hour":case"hrs":case"hr":case"h":return s*r;case"minutes":case"minute":case"mins":case"min":case"m":return s*n;case"seconds":case"second":case"secs":case"sec":case"s":return s*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return s;default:return}}(e);if("number"===c&&!1===isNaN(e))return s.long?a(l=e,i,"day")||a(l,r,"hour")||a(l,n,"minute")||a(l,t,"second")||l+" ms":function(e){if(e>=i)return Math.round(e/i)+"d";if(e>=r)return Math.round(e/r)+"h";if(e>=n)return Math.round(e/n)+"m";if(e>=t)return Math.round(e/t)+"s";return e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},66664:(e,t,n)=>{var r="function"===typeof Map&&Map.prototype,i=Object.getOwnPropertyDescriptor&&r?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,o=r&&i&&"function"===typeof i.get?i.get:null,a=r&&Map.prototype.forEach,s="function"===typeof Set&&Set.prototype,l=Object.getOwnPropertyDescriptor&&s?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,c=s&&l&&"function"===typeof l.get?l.get:null,u=s&&Set.prototype.forEach,d="function"===typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,f="function"===typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,h="function"===typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,p=Boolean.prototype.valueOf,g=Object.prototype.toString,m=Function.prototype.toString,v=String.prototype.match,A=String.prototype.slice,y=String.prototype.replace,b=String.prototype.toUpperCase,_=String.prototype.toLowerCase,w=RegExp.prototype.test,x=Array.prototype.concat,E=Array.prototype.join,S=Array.prototype.slice,C=Math.floor,P="function"===typeof BigInt?BigInt.prototype.valueOf:null,T=Object.getOwnPropertySymbols,k="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?Symbol.prototype.toString:null,M="function"===typeof Symbol&&"object"===typeof Symbol.iterator,O="function"===typeof Symbol&&Symbol.toStringTag&&(typeof Symbol.toStringTag===M||"symbol")?Symbol.toStringTag:null,R=Object.prototype.propertyIsEnumerable,I=("function"===typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function L(e,t){if(e===1/0||e===-1/0||e!==e||e&&e>-1e3&&e<1e3||w.call(/e/,t))return t;var n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"===typeof e){var r=e<0?-C(-e):C(e);if(r!==e){var i=String(r),o=A.call(t,i.length+1);return y.call(i,n,"$&_")+"."+y.call(y.call(o,/([0-9]{3})/g,"$&_"),/_$/,"")}}return y.call(t,n,"$&_")}var N=n(65660),D=N.custom,F=U(D)?D:null;function j(e,t,n){var r="double"===(n.quoteStyle||t)?'"':"'";return r+e+r}function B(e){return y.call(String(e),/"/g,""")}function Z(e){return"[object Array]"===W(e)&&(!O||!("object"===typeof e&&O in e))}function z(e){return"[object RegExp]"===W(e)&&(!O||!("object"===typeof e&&O in e))}function U(e){if(M)return e&&"object"===typeof e&&e instanceof Symbol;if("symbol"===typeof e)return!0;if(!e||"object"!==typeof e||!k)return!1;try{return k.call(e),!0}catch(t){}return!1}e.exports=function e(t,r,i,s){var l=r||{};if(V(l,"quoteStyle")&&"single"!==l.quoteStyle&&"double"!==l.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if(V(l,"maxStringLength")&&("number"===typeof l.maxStringLength?l.maxStringLength<0&&l.maxStringLength!==1/0:null!==l.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var g=!V(l,"customInspect")||l.customInspect;if("boolean"!==typeof g&&"symbol"!==g)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(V(l,"indent")&&null!==l.indent&&"\t"!==l.indent&&!(parseInt(l.indent,10)===l.indent&&l.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(V(l,"numericSeparator")&&"boolean"!==typeof l.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var b=l.numericSeparator;if("undefined"===typeof t)return"undefined";if(null===t)return"null";if("boolean"===typeof t)return t?"true":"false";if("string"===typeof t)return K(t,l);if("number"===typeof t){if(0===t)return 1/0/t>0?"0":"-0";var w=String(t);return b?L(t,w):w}if("bigint"===typeof t){var C=String(t)+"n";return b?L(t,C):C}var T="undefined"===typeof l.depth?5:l.depth;if("undefined"===typeof i&&(i=0),i>=T&&T>0&&"object"===typeof t)return Z(t)?"[Array]":"[Object]";var D=function(e,t){var n;if("\t"===e.indent)n="\t";else{if(!("number"===typeof e.indent&&e.indent>0))return null;n=E.call(Array(e.indent+1)," ")}return{base:n,prev:E.call(Array(t+1),n)}}(l,i);if("undefined"===typeof s)s=[];else if(G(s,t)>=0)return"[Circular]";function H(t,n,r){if(n&&(s=S.call(s)).push(n),r){var o={depth:l.depth};return V(l,"quoteStyle")&&(o.quoteStyle=l.quoteStyle),e(t,o,i+1,s)}return e(t,l,i+1,s)}if("function"===typeof t&&!z(t)){var q=function(e){if(e.name)return e.name;var t=v.call(m.call(e),/^function\s*([\w$]+)/);if(t)return t[1];return null}(t),ee=J(t,H);return"[Function"+(q?": "+q:" (anonymous)")+"]"+(ee.length>0?" { "+E.call(ee,", ")+" }":"")}if(U(t)){var te=M?y.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):k.call(t);return"object"!==typeof t||M?te:Y(te)}if(function(e){if(!e||"object"!==typeof e)return!1;if("undefined"!==typeof HTMLElement&&e instanceof HTMLElement)return!0;return"string"===typeof e.nodeName&&"function"===typeof e.getAttribute}(t)){for(var ne="<"+_.call(String(t.nodeName)),re=t.attributes||[],ie=0;ie"}if(Z(t)){if(0===t.length)return"[]";var oe=J(t,H);return D&&!function(e){for(var t=0;t=0)return!1;return!0}(oe)?"["+Q(oe,D)+"]":"[ "+E.call(oe,", ")+" ]"}if(function(e){return"[object Error]"===W(e)&&(!O||!("object"===typeof e&&O in e))}(t)){var ae=J(t,H);return"cause"in Error.prototype||!("cause"in t)||R.call(t,"cause")?0===ae.length?"["+String(t)+"]":"{ ["+String(t)+"] "+E.call(ae,", ")+" }":"{ ["+String(t)+"] "+E.call(x.call("[cause]: "+H(t.cause),ae),", ")+" }"}if("object"===typeof t&&g){if(F&&"function"===typeof t[F]&&N)return N(t,{depth:T-i});if("symbol"!==g&&"function"===typeof t.inspect)return t.inspect()}if(function(e){if(!o||!e||"object"!==typeof e)return!1;try{o.call(e);try{c.call(e)}catch(ne){return!0}return e instanceof Map}catch(t){}return!1}(t)){var se=[];return a&&a.call(t,(function(e,n){se.push(H(n,t,!0)+" => "+H(e,t))})),$("Map",o.call(t),se,D)}if(function(e){if(!c||!e||"object"!==typeof e)return!1;try{c.call(e);try{o.call(e)}catch(t){return!0}return e instanceof Set}catch(n){}return!1}(t)){var le=[];return u&&u.call(t,(function(e){le.push(H(e,t))})),$("Set",c.call(t),le,D)}if(function(e){if(!d||!e||"object"!==typeof e)return!1;try{d.call(e,d);try{f.call(e,f)}catch(ne){return!0}return e instanceof WeakMap}catch(t){}return!1}(t))return X("WeakMap");if(function(e){if(!f||!e||"object"!==typeof e)return!1;try{f.call(e,f);try{d.call(e,d)}catch(ne){return!0}return e instanceof WeakSet}catch(t){}return!1}(t))return X("WeakSet");if(function(e){if(!h||!e||"object"!==typeof e)return!1;try{return h.call(e),!0}catch(t){}return!1}(t))return X("WeakRef");if(function(e){return"[object Number]"===W(e)&&(!O||!("object"===typeof e&&O in e))}(t))return Y(H(Number(t)));if(function(e){if(!e||"object"!==typeof e||!P)return!1;try{return P.call(e),!0}catch(t){}return!1}(t))return Y(H(P.call(t)));if(function(e){return"[object Boolean]"===W(e)&&(!O||!("object"===typeof e&&O in e))}(t))return Y(p.call(t));if(function(e){return"[object String]"===W(e)&&(!O||!("object"===typeof e&&O in e))}(t))return Y(H(String(t)));if("undefined"!==typeof window&&t===window)return"{ [object Window] }";if(t===n.g)return"{ [object globalThis] }";if(!function(e){return"[object Date]"===W(e)&&(!O||!("object"===typeof e&&O in e))}(t)&&!z(t)){var ce=J(t,H),ue=I?I(t)===Object.prototype:t instanceof Object||t.constructor===Object,de=t instanceof Object?"":"null prototype",fe=!ue&&O&&Object(t)===t&&O in t?A.call(W(t),8,-1):de?"Object":"",he=(ue||"function"!==typeof t.constructor?"":t.constructor.name?t.constructor.name+" ":"")+(fe||de?"["+E.call(x.call([],fe||[],de||[]),": ")+"] ":"");return 0===ce.length?he+"{}":D?he+"{"+Q(ce,D)+"}":he+"{ "+E.call(ce,", ")+" }"}return String(t)};var H=Object.prototype.hasOwnProperty||function(e){return e in this};function V(e,t){return H.call(e,t)}function W(e){return g.call(e)}function G(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0,r=e.length;nt.maxStringLength){var n=e.length-t.maxStringLength,r="... "+n+" more character"+(n>1?"s":"");return K(A.call(e,0,t.maxStringLength),t)+r}return j(y.call(y.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,q),"single",t)}function q(e){var t=e.charCodeAt(0),n={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return n?"\\"+n:"\\x"+(t<16?"0":"")+b.call(t.toString(16))}function Y(e){return"Object("+e+")"}function X(e){return e+" { ? }"}function $(e,t,n,r){return e+" ("+t+") {"+(r?Q(n,r):E.call(n,", "))+"}"}function Q(e,t){if(0===e.length)return"";var n="\n"+t.prev+t.base;return n+E.call(e,","+n)+"\n"+t.prev}function J(e,t){var n=Z(e),r=[];if(n){r.length=e.length;for(var i=0;i{"use strict";e.exports=i;var r=n(65957);function i(e){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(e)?e:new Uint8Array(e||0),this.pos=0,this.type=0,this.length=this.buf.length}i.Varint=0,i.Fixed64=1,i.Bytes=2,i.Fixed32=5;var o=4294967296,a=1/o,s="undefined"===typeof TextDecoder?null:new TextDecoder("utf8");function l(e){return e.type===i.Bytes?e.readVarint()+e.pos:e.pos+1}function c(e,t,n){return n?4294967296*t+(e>>>0):4294967296*(t>>>0)+(e>>>0)}function u(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 d(e,t){for(var n=0;n>>8,e[n+2]=t>>>16,e[n+3]=t>>>24}function w(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=b(this.buf,this.pos);return this.pos+=4,e},readSFixed32:function(){var e=w(this.buf,this.pos);return this.pos+=4,e},readFixed64:function(){var e=b(this.buf,this.pos)+b(this.buf,this.pos+4)*o;return this.pos+=8,e},readSFixed64:function(){var e=b(this.buf,this.pos)+w(this.buf,this.pos+4)*o;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 c(e,r,t);if(i=o[n.pos++],r|=(127&i)<<3,i<128)return c(e,r,t);if(i=o[n.pos++],r|=(127&i)<<10,i<128)return c(e,r,t);if(i=o[n.pos++],r|=(127&i)<<17,i<128)return c(e,r,t);if(i=o[n.pos++],r|=(127&i)<<24,i<128)return c(e,r,t);if(i=o[n.pos++],r|=(1&i)<<31,i<128)return c(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&&s?function(e,t,n){return s.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+u>n)break;1===u?l<128&&(c=l):2===u?128===(192&(o=e[i+1]))&&(c=(31&l)<<6|63&o)<=127&&(c=null):3===u?(o=e[i+1],a=e[i+2],128===(192&o)&&128===(192&a)&&((c=(15&l)<<12|(63&o)<<6|63&a)<=2047||c>=55296&&c<=57343)&&(c=null)):4===u&&(o=e[i+1],a=e[i+2],s=e[i+3],128===(192&o)&&128===(192&a)&&128===(192&s)&&((c=(15&l)<<18|(63&o)<<12|(63&a)<<6|63&s)<=65535||c>=1114112)&&(c=null)),null===c?(c=65533,u=1):c>65535&&(c-=65536,r+=String.fromCharCode(c>>>10&1023|55296),c=56320|1023&c),r+=String.fromCharCode(c),i+=u}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=l(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&&u(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&&u(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,d,t)},writePackedSVarint:function(e,t){t.length&&this.writeMessage(e,f,t)},writePackedBoolean:function(e,t){t.length&&this.writeMessage(e,g,t)},writePackedFloat:function(e,t){t.length&&this.writeMessage(e,h,t)},writePackedDouble:function(e,t){t.length&&this.writeMessage(e,p,t)},writePackedFixed32:function(e,t){t.length&&this.writeMessage(e,m,t)},writePackedSFixed32:function(e,t){t.length&&this.writeMessage(e,v,t)},writePackedFixed64:function(e,t){t.length&&this.writeMessage(e,A,t)},writePackedSFixed64:function(e,t){t.length&&this.writeMessage(e,y,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))}}},1199:e=>{e.exports=function(e,t,n,r){var i=e[0],o=e[1],a=!1;void 0===n&&(n=0),void 0===r&&(r=t.length);for(var s=(r-n)/2,l=0,c=s-1;lo!==h>o&&i<(f-u)*(o-d)/(h-d)+u&&(a=!a)}return a}},68909:(e,t,n)=>{var r=n(1199),i=n(10426);e.exports=function(e,t,n,o){return t.length>0&&Array.isArray(t[0])?i(e,t,n,o):r(e,t,n,o)},e.exports.nested=i,e.exports.flat=r},10426:e=>{e.exports=function(e,t,n,r){var i=e[0],o=e[1],a=!1;void 0===n&&(n=0),void 0===r&&(r=t.length);for(var s=r-n,l=0,c=s-1;lo!==h>o&&i<(f-u)*(o-d)/(h-d)+u&&(a=!a)}return a}},43961:()=>{Prism.languages.c=Prism.languages.extend("clike",{comment:{pattern:/\/\/(?:[^\r\n\\]|\\(?:\r\n?|\n|(?![\r\n])))*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},"class-name":{pattern:/(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([\s\S]*?\)\)\s*)?)\w+|\b[a-z]\w*_t\b/,lookbehind:!0},keyword:/\b(?:_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|__attribute__|asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|inline|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|typeof|union|unsigned|void|volatile|while)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,number:/(?:\b0x(?:[\da-f]+(?:\.[\da-f]*)?|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ful]{0,4}/i,operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/}),Prism.languages.insertBefore("c","string",{char:{pattern:/'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n]){0,32}'/,greedy:!0}}),Prism.languages.insertBefore("c","string",{macro:{pattern:/(^[\t ]*)#\s*[a-z](?:[^\r\n\\/]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|\\(?:\r\n|[\s\S]))*/im,lookbehind:!0,greedy:!0,alias:"property",inside:{string:[{pattern:/^(#\s*include\s*)<[^>]+>/,lookbehind:!0},Prism.languages.c.string],char:Prism.languages.c.char,comment:Prism.languages.c.comment,"macro-name":[{pattern:/(^#\s*define\s+)\w+\b(?!\()/i,lookbehind:!0},{pattern:/(^#\s*define\s+)\w+\b(?=\()/i,lookbehind:!0,alias:"function"}],directive:{pattern:/^(#\s*)[a-z]+/,lookbehind:!0,alias:"keyword"},"directive-hash":/^#/,punctuation:/##|\\(?=[\r\n])/,expression:{pattern:/\S[\s\S]*/,inside:Prism.languages.c}}}}),Prism.languages.insertBefore("c","function",{constant:/\b(?:EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|__DATE__|__FILE__|__LINE__|__TIMESTAMP__|__TIME__|__func__|stderr|stdin|stdout)\b/}),delete Prism.languages.c.boolean},15290:()=>{Prism.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/}},96298:()=>{!function(e){var t=/\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|char8_t|class|co_await|co_return|co_yield|compl|concept|const|const_cast|consteval|constexpr|constinit|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|final|float|for|friend|goto|if|import|inline|int|int16_t|int32_t|int64_t|int8_t|long|module|mutable|namespace|new|noexcept|nullptr|operator|override|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|uint16_t|uint32_t|uint64_t|uint8_t|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,n=/\b(?!)\w+(?:\s*\.\s*\w+)*\b/.source.replace(//g,(function(){return t.source}));e.languages.cpp=e.languages.extend("c",{"class-name":[{pattern:RegExp(/(\b(?:class|concept|enum|struct|typename)\s+)(?!)\w+/.source.replace(//g,(function(){return t.source}))),lookbehind:!0},/\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/,/\b[A-Z_]\w*(?=\s*::\s*~\w+\s*\()/i,/\b\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/],keyword:t,number:{pattern:/(?:\b0b[01']+|\b0x(?:[\da-f']+(?:\.[\da-f']*)?|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/i,greedy:!0},operator:/>>=?|<<=?|->|--|\+\+|&&|\|\||[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,boolean:/\b(?:false|true)\b/}),e.languages.insertBefore("cpp","string",{module:{pattern:RegExp(/(\b(?:import|module)\s+)/.source+"(?:"+/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|<[^<>\r\n]*>/.source+"|"+/(?:\s*:\s*)?|:\s*/.source.replace(//g,(function(){return n}))+")"),lookbehind:!0,greedy:!0,inside:{string:/^[<"][\s\S]+/,operator:/:/,punctuation:/\./}},"raw-string":{pattern:/R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,alias:"string",greedy:!0}}),e.languages.insertBefore("cpp","keyword",{"generic-function":{pattern:/\b(?!operator\b)[a-z_]\w*\s*<(?:[^<>]|<[^<>]*>)*>(?=\s*\()/i,inside:{function:/^\w+/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:e.languages.cpp}}}}),e.languages.insertBefore("cpp","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}}),e.languages.insertBefore("cpp","class-name",{"base-clause":{pattern:/(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/,lookbehind:!0,greedy:!0,inside:e.languages.extend("cpp",{})}}),e.languages.insertBefore("inside","double-colon",{"class-name":/\b[a-z_]\w*\b(?!\s*::)/i},e.languages.cpp["base-clause"])}(Prism)},58758:()=>{!function(e){var t=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;e.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+t.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+t.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+t.source+"$"),alias:"url"}}},selector:{pattern:RegExp("(^|[{}\\s])[^{}\\s](?:[^{};\"'\\s]|\\s+(?![\\s{])|"+t.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:t,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},e.languages.css.atrule.inside.rest=e.languages.css;var n=e.languages.markup;n&&(n.tag.addInlined("style","css"),n.tag.addAttribute("style","css"))}(Prism)},51744:()=>{!function(e){var t=/\b(?:abstract|assert|boolean|break|byte|case|catch|char|class|const|continue|default|do|double|else|enum|exports|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|module|native|new|non-sealed|null|open|opens|package|permits|private|protected|provides|public|record(?!\s*[(){}[\]<>=%~.:,;?+\-*/&|^])|requires|return|sealed|short|static|strictfp|super|switch|synchronized|this|throw|throws|to|transient|transitive|try|uses|var|void|volatile|while|with|yield)\b/,n=/(?:[a-z]\w*\s*\.\s*)*(?:[A-Z]\w*\s*\.\s*)*/.source,r={pattern:RegExp(/(^|[^\w.])/.source+n+/[A-Z](?:[\d_A-Z]*[a-z]\w*)?\b/.source),lookbehind:!0,inside:{namespace:{pattern:/^[a-z]\w*(?:\s*\.\s*[a-z]\w*)*(?:\s*\.)?/,inside:{punctuation:/\./}},punctuation:/\./}};e.languages.java=e.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"/,lookbehind:!0,greedy:!0},"class-name":[r,{pattern:RegExp(/(^|[^\w.])/.source+n+/[A-Z]\w*(?=\s+\w+\s*[;,=()]|\s*(?:\[[\s,]*\]\s*)?::\s*new\b)/.source),lookbehind:!0,inside:r.inside},{pattern:RegExp(/(\b(?:class|enum|extends|implements|instanceof|interface|new|record|throws)\s+)/.source+n+/[A-Z]\w*\b/.source),lookbehind:!0,inside:r.inside}],keyword:t,function:[e.languages.clike.function,{pattern:/(::\s*)[a-z_]\w*/,lookbehind:!0}],number:/\b0b[01][01_]*L?\b|\b0x(?:\.[\da-f_p+-]+|[\da-f_]+(?:\.[\da-f_p+-]+)?)\b|(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?\d[\d_]*)?[dfl]?/i,operator:{pattern:/(^|[^.])(?:<<=?|>>>?=?|->|--|\+\+|&&|\|\||::|[?:~]|[-+*/%&|^!=<>]=?)/m,lookbehind:!0},constant:/\b[A-Z][A-Z_\d]+\b/}),e.languages.insertBefore("java","string",{"triple-quoted-string":{pattern:/"""[ \t]*[\r\n](?:(?:"|"")?(?:\\.|[^"\\]))*"""/,greedy:!0,alias:"string"},char:{pattern:/'(?:\\.|[^'\\\r\n]){1,6}'/,greedy:!0}}),e.languages.insertBefore("java","class-name",{annotation:{pattern:/(^|[^.])@\w+(?:\s*\.\s*\w+)*/,lookbehind:!0,alias:"punctuation"},generics:{pattern:/<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&))*>)*>)*>)*>/,inside:{"class-name":r,keyword:t,punctuation:/[<>(),.:]/,operator:/[?&|]/}},import:[{pattern:RegExp(/(\bimport\s+)/.source+n+/(?:[A-Z]\w*|\*)(?=\s*;)/.source),lookbehind:!0,inside:{namespace:r.inside.namespace,punctuation:/\./,operator:/\*/,"class-name":/\w+/}},{pattern:RegExp(/(\bimport\s+static\s+)/.source+n+/(?:\w+|\*)(?=\s*;)/.source),lookbehind:!0,alias:"static",inside:{namespace:r.inside.namespace,static:/\b\w+$/,punctuation:/\./,operator:/\*/,"class-name":/\w+/}}],namespace:{pattern:RegExp(/(\b(?:exports|import(?:\s+static)?|module|open|opens|package|provides|requires|to|transitive|uses|with)\s+)(?!)[a-z]\w*(?:\.[a-z]\w*)*\.?/.source.replace(//g,(function(){return t.source}))),lookbehind:!0,inside:{punctuation:/\./}}})}(Prism)},48315:()=>{Prism.languages.javascript=Prism.languages.extend("clike",{"class-name":[Prism.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),Prism.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:Prism.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:Prism.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),Prism.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:Prism.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),Prism.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),Prism.languages.markup&&(Prism.languages.markup.tag.addInlined("script","javascript"),Prism.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),Prism.languages.js=Prism.languages.javascript},12642:()=>{!function(e){var t=/(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;function n(e){return e=e.replace(//g,(function(){return t})),RegExp(/((?:^|[^\\])(?:\\{2})*)/.source+"(?:"+e+")")}var r=/(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source,i=/\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g,(function(){return r})),o=/\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\n|\r\n?)/.source;e.languages.markdown=e.languages.extend("markup",{}),e.languages.insertBefore("markdown","prolog",{"front-matter-block":{pattern:/(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/,lookbehind:!0,greedy:!0,inside:{punctuation:/^---|---$/,"front-matter":{pattern:/\S+(?:\s+\S+)*/,alias:["yaml","language-yaml"],inside:e.languages.yaml}}},blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+i+o+"(?:"+i+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+i+o+")(?:"+i+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(r),inside:e.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+i+")"+o+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+i+"$"),inside:{"table-header":{pattern:RegExp(r),alias:"important",inside:e.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,lookbehind:!0,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:n(/\b__(?:(?!_)|_(?:(?!_))+_)+__\b|\*\*(?:(?!\*)|\*(?:(?!\*))+\*)+\*\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:n(/\b_(?:(?!_)|__(?:(?!_))+__)+_\b|\*(?:(?!\*)|\*\*(?:(?!\*))+\*\*)+\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:n(/(~~?)(?:(?!~))+\2/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},"code-snippet":{pattern:/(^|[^\\`])(?:``[^`\r\n]+(?:`[^`\r\n]+)*``(?!`)|`[^`\r\n]+`(?!`))/,lookbehind:!0,greedy:!0,alias:["code","keyword"]},url:{pattern:n(/!?\[(?:(?!\]))+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)|[ \t]?\[(?:(?!\]))+\])/.source),lookbehind:!0,greedy:!0,inside:{operator:/^!/,content:{pattern:/(^\[)[^\]]+(?=\])/,lookbehind:!0,inside:{}},variable:{pattern:/(^\][ \t]?\[)[^\]]+(?=\]$)/,lookbehind:!0},url:{pattern:/(^\]\()[^\s)]+/,lookbehind:!0},string:{pattern:/(^[ \t]+)"(?:\\.|[^"\\])*"(?=\)$)/,lookbehind:!0}}}}),["url","bold","italic","strike"].forEach((function(t){["url","bold","italic","strike","code-snippet"].forEach((function(n){t!==n&&(e.languages.markdown[t].inside.content.inside[n]=e.languages.markdown[n])}))})),e.hooks.add("after-tokenize",(function(e){"markdown"!==e.language&&"md"!==e.language||function e(t){if(t&&"string"!==typeof t)for(var n=0,r=t.length;n",quot:'"'},l=String.fromCodePoint||String.fromCharCode;e.languages.md=e.languages.markdown}(Prism)},90714:()=>{Prism.languages.markup={comment:{pattern://,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern://i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},Prism.languages.markup.tag.inside["attr-value"].inside.entity=Prism.languages.markup.entity,Prism.languages.markup.doctype.inside["internal-subset"].inside=Prism.languages.markup,Prism.hooks.add("wrap",(function(e){"entity"===e.type&&(e.attributes.title=e.content.replace(/&/,"&"))})),Object.defineProperty(Prism.languages.markup.tag,"addInlined",{value:function(e,t){var n={};n["language-"+t]={pattern:/(^$)/i,lookbehind:!0,inside:Prism.languages[t]},n.cdata=/^$/i;var r={"included-cdata":{pattern://i,inside:n}};r["language-"+t]={pattern:/[\s\S]+/,inside:Prism.languages[t]};var i={};i[e]={pattern:RegExp(/(<__[^>]*>)(?:))*\]\]>|(?!)/.source.replace(/__/g,(function(){return e})),"i"),lookbehind:!0,greedy:!0,inside:r},Prism.languages.insertBefore("markup","cdata",i)}}),Object.defineProperty(Prism.languages.markup.tag,"addAttribute",{value:function(e,t){Prism.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+e+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[t,"language-"+t],inside:Prism.languages[t]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),Prism.languages.html=Prism.languages.markup,Prism.languages.mathml=Prism.languages.markup,Prism.languages.svg=Prism.languages.markup,Prism.languages.xml=Prism.languages.extend("markup",{}),Prism.languages.ssml=Prism.languages.xml,Prism.languages.atom=Prism.languages.xml,Prism.languages.rss=Prism.languages.xml},62467:()=>{Prism.languages.objectivec=Prism.languages.extend("c",{string:{pattern:/@?"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},keyword:/\b(?:asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|in|inline|int|long|register|return|self|short|signed|sizeof|static|struct|super|switch|typedef|typeof|union|unsigned|void|volatile|while)\b|(?:@interface|@end|@implementation|@protocol|@class|@public|@protected|@private|@property|@try|@catch|@finally|@throw|@synthesize|@dynamic|@selector)\b/,operator:/-[->]?|\+\+?|!=?|<>?=?|==?|&&?|\|\|?|[~^%?*\/@]/}),delete Prism.languages.objectivec["class-name"],Prism.languages.objc=Prism.languages.objectivec},9673:()=>{Prism.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},"string-interpolation":{pattern:/(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern:/![sra](?=[:}]$)/,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/m,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:False|None|True)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,operator:/[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/},Prism.languages.python["string-interpolation"].inside.interpolation.inside.rest=Prism.languages.python,Prism.languages.py=Prism.languages.python},51062:()=>{!function(e){for(var t=/\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|)*\*\//.source,n=0;n<2;n++)t=t.replace(//g,(function(){return t}));t=t.replace(//g,(function(){return/[^\s\S]/.source})),e.languages.rust={comment:[{pattern:RegExp(/(^|[^\\])/.source+t),lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/b?"(?:\\[\s\S]|[^\\"])*"|b?r(#*)"(?:[^"]|"(?!\1))*"\1/,greedy:!0},char:{pattern:/b?'(?:\\(?:x[0-7][\da-fA-F]|u\{(?:[\da-fA-F]_*){1,6}\}|.)|[^\\\r\n\t'])'/,greedy:!0},attribute:{pattern:/#!?\[(?:[^\[\]"]|"(?:\\[\s\S]|[^\\"])*")*\]/,greedy:!0,alias:"attr-name",inside:{string:null}},"closure-params":{pattern:/([=(,:]\s*|\bmove\s*)\|[^|]*\||\|[^|]*\|(?=\s*(?:\{|->))/,lookbehind:!0,greedy:!0,inside:{"closure-punctuation":{pattern:/^\||\|$/,alias:"punctuation"},rest:null}},"lifetime-annotation":{pattern:/'\w+/,alias:"symbol"},"fragment-specifier":{pattern:/(\$\w+:)[a-z]+/,lookbehind:!0,alias:"punctuation"},variable:/\$\w+/,"function-definition":{pattern:/(\bfn\s+)\w+/,lookbehind:!0,alias:"function"},"type-definition":{pattern:/(\b(?:enum|struct|trait|type|union)\s+)\w+/,lookbehind:!0,alias:"class-name"},"module-declaration":[{pattern:/(\b(?:crate|mod)\s+)[a-z][a-z_\d]*/,lookbehind:!0,alias:"namespace"},{pattern:/(\b(?:crate|self|super)\s*)::\s*[a-z][a-z_\d]*\b(?:\s*::(?:\s*[a-z][a-z_\d]*\s*::)*)?/,lookbehind:!0,alias:"namespace",inside:{punctuation:/::/}}],keyword:[/\b(?:Self|abstract|as|async|await|become|box|break|const|continue|crate|do|dyn|else|enum|extern|final|fn|for|if|impl|in|let|loop|macro|match|mod|move|mut|override|priv|pub|ref|return|self|static|struct|super|trait|try|type|typeof|union|unsafe|unsized|use|virtual|where|while|yield)\b/,/\b(?:bool|char|f(?:32|64)|[ui](?:8|16|32|64|128|size)|str)\b/],function:/\b[a-z_]\w*(?=\s*(?:::\s*<|\())/,macro:{pattern:/\b\w+!/,alias:"property"},constant:/\b[A-Z_][A-Z_\d]+\b/,"class-name":/\b[A-Z]\w*\b/,namespace:{pattern:/(?:\b[a-z][a-z_\d]*\s*::\s*)*\b[a-z][a-z_\d]*\s*::(?!\s*<)/,inside:{punctuation:/::/}},number:/\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0o[0-7](?:_?[0-7])*|0b[01](?:_?[01])*|(?:(?:\d(?:_?\d)*)?\.)?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)(?:_?(?:f32|f64|[iu](?:8|16|32|64|size)?))?\b/,boolean:/\b(?:false|true)\b/,punctuation:/->|\.\.=|\.{1,3}|::|[{}[\];(),:]/,operator:/[-+*\/%!^]=?|=[=>]?|&[&=]?|\|[|=]?|<>?=?|[@?]/},e.languages.rust["closure-params"].inside.rest=e.languages.rust,e.languages.rust.attribute.inside.string=e.languages.rust.string}(Prism)},49284:()=>{Prism.languages.sql={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/,lookbehind:!0},variable:[{pattern:/@(["'`])(?:\\[\s\S]|(?!\1)[^\\])+\1/,greedy:!0},/@[\w.$]+/],string:{pattern:/(^|[^@\\])("|')(?:\\[\s\S]|(?!\2)[^\\]|\2\2)*\2/,greedy:!0,lookbehind:!0},identifier:{pattern:/(^|[^@\\])`(?:\\[\s\S]|[^`\\]|``)*`/,greedy:!0,lookbehind:!0,inside:{punctuation:/^`|`$/}},function:/\b(?:AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE)(?=\s*\()/i,keyword:/\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR(?:ACTER|SET)?|CHECK(?:POINT)?|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMNS?|COMMENT|COMMIT(?:TED)?|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS(?:TABLE)?|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|CYCLE|DATA(?:BASES?)?|DATE(?:TIME)?|DAY|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITERS?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE|ELSE(?:IF)?|ENABLE|ENCLOSED|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPED?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|HOUR|IDENTITY(?:COL|_INSERT)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTERVAL|INTO|INVOKER|ISOLATION|ITERATE|JOIN|KEYS?|KILL|LANGUAGE|LAST|LEAVE|LEFT|LEVEL|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|LOOP|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MINUTE|MODE|MODIFIES|MODIFY|MONTH|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL|NATURAL|NCHAR|NEXT|NO|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREPARE|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READS?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEAT(?:ABLE)?|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESTORE|RESTRICT|RETURN(?:ING|S)?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SECOND|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|SQL|START(?:ING)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED|TEXT(?:SIZE)?|THEN|TIME(?:STAMP)?|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNLOCK|UNPIVOT|UNSIGNED|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?|YEAR)\b/i,boolean:/\b(?:FALSE|NULL|TRUE)\b/i,number:/\b0x[\da-f]+\b|\b\d+(?:\.\d*)?|\B\.\d+\b/i,operator:/[-+*\/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|ILIKE|IN|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,punctuation:/[;[\]()`,.]/}},69770:()=>{Prism.languages.swift={comment:{pattern:/(^|[^\\:])(?:\/\/.*|\/\*(?:[^/*]|\/(?!\*)|\*(?!\/)|\/\*(?:[^*]|\*(?!\/))*\*\/)*\*\/)/,lookbehind:!0,greedy:!0},"string-literal":[{pattern:RegExp(/(^|[^"#])/.source+"(?:"+/"(?:\\(?:\((?:[^()]|\([^()]*\))*\)|\r\n|[^(])|[^\\\r\n"])*"/.source+"|"+/"""(?:\\(?:\((?:[^()]|\([^()]*\))*\)|[^(])|[^\\"]|"(?!""))*"""/.source+")"+/(?!["#])/.source),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\\($/,alias:"punctuation"},punctuation:/\\(?=[\r\n])/,string:/[\s\S]+/}},{pattern:RegExp(/(^|[^"#])(#+)/.source+"(?:"+/"(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|\r\n|[^#])|[^\\\r\n])*?"/.source+"|"+/"""(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|[^#])|[^\\])*?"""/.source+")\\2"),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\#+\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\#+\($/,alias:"punctuation"},string:/[\s\S]+/}}],directive:{pattern:RegExp(/#/.source+"(?:"+/(?:elseif|if)\b/.source+"(?:[ \t]*"+/(?:![ \t]*)?(?:\b\w+\b(?:[ \t]*\((?:[^()]|\([^()]*\))*\))?|\((?:[^()]|\([^()]*\))*\))(?:[ \t]*(?:&&|\|\|))?/.source+")+|"+/(?:else|endif)\b/.source+")"),alias:"property",inside:{"directive-name":/^#\w+/,boolean:/\b(?:false|true)\b/,number:/\b\d+(?:\.\d+)*\b/,operator:/!|&&|\|\||[<>]=?/,punctuation:/[(),]/}},literal:{pattern:/#(?:colorLiteral|column|dsohandle|file(?:ID|Literal|Path)?|function|imageLiteral|line)\b/,alias:"constant"},"other-directive":{pattern:/#\w+\b/,alias:"property"},attribute:{pattern:/@\w+/,alias:"atrule"},"function-definition":{pattern:/(\bfunc\s+)\w+/,lookbehind:!0,alias:"function"},label:{pattern:/\b(break|continue)\s+\w+|\b[a-zA-Z_]\w*(?=\s*:\s*(?:for|repeat|while)\b)/,lookbehind:!0,alias:"important"},keyword:/\b(?:Any|Protocol|Self|Type|actor|as|assignment|associatedtype|associativity|async|await|break|case|catch|class|continue|convenience|default|defer|deinit|didSet|do|dynamic|else|enum|extension|fallthrough|fileprivate|final|for|func|get|guard|higherThan|if|import|in|indirect|infix|init|inout|internal|is|isolated|lazy|left|let|lowerThan|mutating|none|nonisolated|nonmutating|open|operator|optional|override|postfix|precedencegroup|prefix|private|protocol|public|repeat|required|rethrows|return|right|safe|self|set|some|static|struct|subscript|super|switch|throw|throws|try|typealias|unowned|unsafe|var|weak|where|while|willSet)\b/,boolean:/\b(?:false|true)\b/,nil:{pattern:/\bnil\b/,alias:"constant"},"short-argument":/\$\d+\b/,omit:{pattern:/\b_\b/,alias:"keyword"},number:/\b(?:[\d_]+(?:\.[\de_]+)?|0x[a-f0-9_]+(?:\.[a-f0-9p_]+)?|0b[01_]+|0o[0-7_]+)\b/i,"class-name":/\b[A-Z](?:[A-Z_\d]*[a-z]\w*)?\b/,function:/\b[a-z_]\w*(?=\s*\()/i,constant:/\b(?:[A-Z_]{2,}|k[A-Z][A-Za-z_]+)\b/,operator:/[-+*/%=!<>&|^~?]+|\.[.\-+*/%=!<>&|^~?]+/,punctuation:/[{}[\]();,.:\\]/},Prism.languages.swift["string-literal"].forEach((function(e){e.inside.interpolation.inside=Prism.languages.swift}))},77175:()=>{!function(e){e.languages.typescript=e.languages.extend("javascript",{"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,lookbehind:!0,greedy:!0,inside:null},builtin:/\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/}),e.languages.typescript.keyword.push(/\b(?:abstract|declare|is|keyof|readonly|require)\b/,/\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/,/\btype\b(?=\s*(?:[\{*]|$))/),delete e.languages.typescript.parameter,delete e.languages.typescript["literal-property"];var t=e.languages.extend("typescript",{});delete t["class-name"],e.languages.typescript["class-name"].inside=t,e.languages.insertBefore("typescript","function",{decorator:{pattern:/@[$\w\xA0-\uFFFF]+/,inside:{at:{pattern:/^@/,alias:"operator"},function:/^[\s\S]+/}},"generic-function":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,greedy:!0,inside:{function:/^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:t}}}}),e.languages.ts=e.languages.typescript}(Prism)},30877:(e,t,n)=>{var r=function(e){var t=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,n=0,r={},i={manual:e.Prism&&e.Prism.manual,disableWorkerMessageHandler:e.Prism&&e.Prism.disableWorkerMessageHandler,util:{encode:function e(t){return t instanceof o?new o(t.type,e(t.content),t.alias):Array.isArray(t)?t.map(e):t.replace(/&/g,"&").replace(/=d.reach);x+=w.value.length,w=w.next){var E=w.value;if(t.length>e.length)return;if(!(E instanceof o)){var S,C=1;if(A){if(!(S=a(_,x,e,v))||S.index>=e.length)break;var P=S.index,T=S.index+S[0].length,k=x;for(k+=w.value.length;P>=k;)k+=(w=w.next).value.length;if(x=k-=w.value.length,w.value instanceof o)continue;for(var M=w;M!==t.tail&&(kd.reach&&(d.reach=L);var N=w.prev;if(R&&(N=c(t,N,R),x+=R.length),u(t,N,C),w=c(t,N,new o(f,m?i.tokenize(O,m):O,y,O)),I&&c(t,w,I),C>1){var D={cause:f+","+p,reach:L};s(e,t,n,w.prev,x,D),d&&D.reach>d.reach&&(d.reach=D.reach)}}}}}}function l(){var e={value:null,prev:null,next:null},t={value:null,prev:e,next:null};e.next=t,this.head=e,this.tail=t,this.length=0}function c(e,t,n){var r=t.next,i={value:n,prev:t,next:r};return t.next=i,r.prev=i,e.length++,i}function u(e,t,n){for(var r=t.next,i=0;i"+o.content+""},!e.document)return e.addEventListener?(i.disableWorkerMessageHandler||e.addEventListener("message",(function(t){var n=JSON.parse(t.data),r=n.language,o=n.code,a=n.immediateClose;e.postMessage(i.highlight(o,i.languages[r],r)),a&&e.close()}),!1),i):i;var d=i.util.currentScript();function f(){i.manual||i.highlightAll()}if(d&&(i.filename=d.src,d.hasAttribute("data-manual")&&(i.manual=!0)),!i.manual){var h=document.readyState;"loading"===h||"interactive"===h&&d&&d.defer?document.addEventListener("DOMContentLoaded",f):window.requestAnimationFrame?window.requestAnimationFrame(f):window.setTimeout(f,16)}return i}("undefined"!==typeof window?window:"undefined"!==typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{});e.exports&&(e.exports=r),"undefined"!==typeof n.g&&(n.g.Prism=r),r.languages.markup={comment:{pattern://,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern://i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},r.languages.markup.tag.inside["attr-value"].inside.entity=r.languages.markup.entity,r.languages.markup.doctype.inside["internal-subset"].inside=r.languages.markup,r.hooks.add("wrap",(function(e){"entity"===e.type&&(e.attributes.title=e.content.replace(/&/,"&"))})),Object.defineProperty(r.languages.markup.tag,"addInlined",{value:function(e,t){var n={};n["language-"+t]={pattern:/(^$)/i,lookbehind:!0,inside:r.languages[t]},n.cdata=/^$/i;var i={"included-cdata":{pattern://i,inside:n}};i["language-"+t]={pattern:/[\s\S]+/,inside:r.languages[t]};var o={};o[e]={pattern:RegExp(/(<__[^>]*>)(?:))*\]\]>|(?!)/.source.replace(/__/g,(function(){return e})),"i"),lookbehind:!0,greedy:!0,inside:i},r.languages.insertBefore("markup","cdata",o)}}),Object.defineProperty(r.languages.markup.tag,"addAttribute",{value:function(e,t){r.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+e+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[t,"language-"+t],inside:r.languages[t]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),r.languages.html=r.languages.markup,r.languages.mathml=r.languages.markup,r.languages.svg=r.languages.markup,r.languages.xml=r.languages.extend("markup",{}),r.languages.ssml=r.languages.xml,r.languages.atom=r.languages.xml,r.languages.rss=r.languages.xml,function(e){var t=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;e.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+t.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+t.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+t.source+"$"),alias:"url"}}},selector:{pattern:RegExp("(^|[{}\\s])[^{}\\s](?:[^{};\"'\\s]|\\s+(?![\\s{])|"+t.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:t,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},e.languages.css.atrule.inside.rest=e.languages.css;var n=e.languages.markup;n&&(n.tag.addInlined("style","css"),n.tag.addAttribute("style","css"))}(r),r.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},r.languages.javascript=r.languages.extend("clike",{"class-name":[r.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),r.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,r.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:r.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:r.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:r.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:r.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:r.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),r.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:r.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),r.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),r.languages.markup&&(r.languages.markup.tag.addInlined("script","javascript"),r.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),r.languages.js=r.languages.javascript,function(){if("undefined"!==typeof r&&"undefined"!==typeof document){Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector);var e={js:"javascript",py:"python",rb:"ruby",ps1:"powershell",psm1:"powershell",sh:"bash",bat:"batch",h:"c",tex:"latex"},t="data-src-status",n="loading",i="loaded",o="pre[data-src]:not(["+t+'="'+i+'"]):not(['+t+'="'+n+'"])';r.hooks.add("before-highlightall",(function(e){e.selector+=", "+o})),r.hooks.add("before-sanity-check",(function(a){var s=a.element;if(s.matches(o)){a.code="",s.setAttribute(t,n);var l=s.appendChild(document.createElement("CODE"));l.textContent="Loading\u2026";var c=s.getAttribute("data-src"),u=a.language;if("none"===u){var d=(/\.(\w+)$/.exec(c)||[,"none"])[1];u=e[d]||d}r.util.setLanguage(l,u),r.util.setLanguage(s,u);var f=r.plugins.autoloader;f&&f.loadLanguages(u),function(e,t,n){var r=new XMLHttpRequest;r.open("GET",e,!0),r.onreadystatechange=function(){4==r.readyState&&(r.status<400&&r.responseText?t(r.responseText):r.status>=400?n("\u2716 Error "+r.status+" while fetching file: "+r.statusText):n("\u2716 Error: File does not exist or is empty"))},r.send(null)}(c,(function(e){s.setAttribute(t,i);var n=function(e){var t=/^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(e||"");if(t){var n=Number(t[1]),r=t[2],i=t[3];return r?i?[n,Number(i)]:[n,void 0]:[n,n]}}(s.getAttribute("data-range"));if(n){var o=e.split(/\r\n?|\n/g),a=n[0],c=null==n[1]?o.length:n[1];a<0&&(a+=o.length),a=Math.max(0,Math.min(a-1,o.length)),c<0&&(c+=o.length),c=Math.max(0,Math.min(c,o.length)),e=o.slice(a,c).join("\n"),s.hasAttribute("data-start")||s.setAttribute("data-start",String(a+1))}l.textContent=e,r.highlightElement(l)}),(function(e){s.setAttribute(t,"failed"),l.textContent=e}))}})),r.plugins.fileHighlight={highlight:function(e){for(var t,n=(e||document).querySelectorAll(o),i=0;t=n[i++];)r.highlightElement(t)}};var a=!1;r.fileHighlight=function(){a||(console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."),a=!0),r.plugins.fileHighlight.highlight.apply(this,arguments)}}}()},15618:(e,t,n)=>{"use strict";var r=n(60620);function i(){}function o(){}o.resetWarningCache=i,e.exports=function(){function e(e,t,n,i,o,a){if(a!==r){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:o,resetWarningCache:i};return n.PropTypes=n,n}},2831:(e,t,n)=>{e.exports=n(15618)()},60620:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},7002:(e,t,n)=>{"use strict";n.d(t,{Qd:()=>S,tv:()=>C});var r,i=n(57435),o=Object.defineProperty,a=Object.getOwnPropertySymbols,s=Object.prototype.hasOwnProperty,l=Object.prototype.propertyIsEnumerable,c=(e,t,n)=>t in e?o(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,u=(e,t)=>{for(var n in t||(t={}))s.call(t,n)&&c(e,n,t[n]);if(a)for(var n of a(t))l.call(t,n)&&c(e,n,t[n]);return e},d=(e,t)=>{var n={};for(var r in e)s.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&a)for(var r of a(e))t.indexOf(r)<0&&l.call(e,r)&&(n[r]=e[r]);return n};(e=>{const t=class{constructor(e,n,r,i){if(this.version=e,this.errorCorrectionLevel=n,this.modules=[],this.isFunction=[],et.MAX_VERSION)throw new RangeError("Version value out of range");if(i<-1||i>7)throw new RangeError("Mask value out of range");this.size=4*e+17;let a=[];for(let t=0;t2&&void 0!==arguments[2]?arguments[2]:1,c=arguments.length>3&&void 0!==arguments[3]?arguments[3]:40,u=arguments.length>4&&void 0!==arguments[4]?arguments[4]:-1,d=!(arguments.length>5&&void 0!==arguments[5])||arguments[5];if(!(t.MIN_VERSION<=l&&l<=c&&c<=t.MAX_VERSION)||u<-1||u>7)throw new RangeError("Invalid value");for(i=l;;i++){const r=8*t.getNumDataCodewords(i,n),o=s.getTotalBits(e,i);if(o<=r){a=o;break}if(i>=c)throw new RangeError("Data too long")}for(const r of[t.Ecc.MEDIUM,t.Ecc.QUARTILE,t.Ecc.HIGH])d&&a<=8*t.getNumDataCodewords(i,r)&&(n=r);let f=[];for(const t of e){r(t.mode.modeBits,4,f),r(t.numChars,t.mode.numCharCountBits(i),f);for(const e of t.getData())f.push(e)}o(f.length==a);const h=8*t.getNumDataCodewords(i,n);o(f.length<=h),r(0,Math.min(4,h-f.length),f),r(0,(8-f.length%8)%8,f),o(f.length%8==0);for(let t=236;f.lengthp[t>>>3]|=e<<7-(7&t))),new t(i,n,p,u)}getModule(e,t){return 0<=e&&e>>9);const r=21522^(t<<10|n);o(r>>>15==0);for(let o=0;o<=5;o++)this.setFunctionModule(8,o,i(r,o));this.setFunctionModule(8,7,i(r,6)),this.setFunctionModule(8,8,i(r,7)),this.setFunctionModule(7,8,i(r,8));for(let o=9;o<15;o++)this.setFunctionModule(14-o,8,i(r,o));for(let o=0;o<8;o++)this.setFunctionModule(this.size-1-o,8,i(r,o));for(let o=8;o<15;o++)this.setFunctionModule(8,this.size-15+o,i(r,o));this.setFunctionModule(8,this.size-8,!0)}drawVersion(){if(this.version<7)return;let e=this.version;for(let n=0;n<12;n++)e=e<<1^7973*(e>>>11);const t=this.version<<12|e;o(t>>>18==0);for(let n=0;n<18;n++){const e=i(t,n),r=this.size-11+n%3,o=Math.floor(n/3);this.setFunctionModule(r,o,e),this.setFunctionModule(o,r,e)}}drawFinderPattern(e,t){for(let n=-4;n<=4;n++)for(let r=-4;r<=4;r++){const i=Math.max(Math.abs(r),Math.abs(n)),o=e+r,a=t+n;0<=o&&o{(t!=c-a||n>=l)&&f.push(e[t])}));return o(f.length==s),f}drawCodewords(e){if(e.length!=Math.floor(t.getNumRawDataModules(this.version)/8))throw new RangeError("Invalid argument");let n=0;for(let t=this.size-1;t>=1;t-=2){6==t&&(t=5);for(let r=0;r>>3],7-(7&n)),n++)}}o(n==8*e.length)}applyMask(e){if(e<0||e>7)throw new RangeError("Mask value out of range");for(let t=0;t5&&e++):(this.finderPenaltyAddHistory(r,i),n||(e+=this.finderPenaltyCountPatterns(i)*t.PENALTY_N3),n=this.modules[o][a],r=1);e+=this.finderPenaltyTerminateAndCount(n,r,i)*t.PENALTY_N3}for(let o=0;o5&&e++):(this.finderPenaltyAddHistory(r,i),n||(e+=this.finderPenaltyCountPatterns(i)*t.PENALTY_N3),n=this.modules[a][o],r=1);e+=this.finderPenaltyTerminateAndCount(n,r,i)*t.PENALTY_N3}for(let o=0;oe+(t?1:0)),n);const r=this.size*this.size,i=Math.ceil(Math.abs(20*n-10*r)/r)-1;return o(0<=i&&i<=9),e+=i*t.PENALTY_N4,o(0<=e&&e<=2568888),e}getAlignmentPatternPositions(){if(1==this.version)return[];{const e=Math.floor(this.version/7)+2,t=32==this.version?26:2*Math.ceil((4*this.version+4)/(2*e-2));let n=[6];for(let r=this.size-7;n.lengtht.MAX_VERSION)throw new RangeError("Version number out of range");let n=(16*e+128)*e+64;if(e>=2){const t=Math.floor(e/7)+2;n-=(25*t-10)*t-55,e>=7&&(n-=36)}return o(208<=n&&n<=29648),n}static getNumDataCodewords(e,n){return Math.floor(t.getNumRawDataModules(e)/8)-t.ECC_CODEWORDS_PER_BLOCK[n.ordinal][e]*t.NUM_ERROR_CORRECTION_BLOCKS[n.ordinal][e]}static reedSolomonComputeDivisor(e){if(e<1||e>255)throw new RangeError("Degree out of range");let n=[];for(let t=0;t0));for(const i of e){const e=i^r.shift();r.push(0),n.forEach(((n,i)=>r[i]^=t.reedSolomonMultiply(n,e)))}return r}static reedSolomonMultiply(e,t){if(e>>>8!=0||t>>>8!=0)throw new RangeError("Byte out of range");let n=0;for(let r=7;r>=0;r--)n=n<<1^285*(n>>>7),n^=(t>>>r&1)*e;return o(n>>>8==0),n}finderPenaltyCountPatterns(e){const t=e[1];o(t<=3*this.size);const n=t>0&&e[2]==t&&e[3]==3*t&&e[4]==t&&e[5]==t;return(n&&e[0]>=4*t&&e[6]>=t?1:0)+(n&&e[6]>=4*t&&e[0]>=t?1:0)}finderPenaltyTerminateAndCount(e,t,n){return e&&(this.finderPenaltyAddHistory(t,n),t=0),t+=this.size,this.finderPenaltyAddHistory(t,n),this.finderPenaltyCountPatterns(n)}finderPenaltyAddHistory(e,t){0==t[0]&&(e+=this.size),t.pop(),t.unshift(e)}};let n=t;function r(e,t,n){if(t<0||t>31||e>>>t!=0)throw new RangeError("Value out of range");for(let r=t-1;r>=0;r--)n.push(e>>>r&1)}function i(e,t){return 0!=(e>>>t&1)}function o(e){if(!e)throw new Error("Assertion error")}n.MIN_VERSION=1,n.MAX_VERSION=40,n.PENALTY_N1=3,n.PENALTY_N2=3,n.PENALTY_N3=40,n.PENALTY_N4=10,n.ECC_CODEWORDS_PER_BLOCK=[[-1,7,10,15,20,26,18,20,24,30,18,20,24,26,30,22,24,28,30,28,28,28,28,30,30,26,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,10,16,26,18,24,16,18,22,22,26,30,22,22,24,24,28,28,26,26,26,26,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28],[-1,13,22,18,26,18,24,18,22,20,24,28,26,24,20,30,24,28,28,26,30,28,30,30,30,30,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,17,28,22,16,22,28,26,26,24,28,24,28,22,24,24,30,28,28,26,28,30,24,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30]],n.NUM_ERROR_CORRECTION_BLOCKS=[[-1,1,1,1,1,1,2,2,2,2,4,4,4,4,4,6,6,6,6,7,8,8,9,9,10,12,12,12,13,14,15,16,17,18,19,19,20,21,22,24,25],[-1,1,1,1,2,2,4,4,4,5,5,5,8,9,9,10,10,11,13,14,16,17,17,18,20,21,23,25,26,28,29,31,33,35,37,38,40,43,45,47,49],[-1,1,1,2,2,4,4,6,6,8,8,8,10,12,16,12,17,16,18,21,20,23,23,25,27,29,34,34,35,38,40,43,45,48,51,53,56,59,62,65,68],[-1,1,1,2,4,4,4,5,6,8,8,11,11,16,16,18,16,19,21,25,25,25,34,30,32,35,37,40,42,45,48,51,54,57,60,63,66,70,74,77,81]],e.QrCode=n;const a=class{constructor(e,t,n){if(this.mode=e,this.numChars=t,this.bitData=n,t<0)throw new RangeError("Invalid argument");this.bitData=n.slice()}static makeBytes(e){let t=[];for(const n of e)r(n,8,t);return new a(a.Mode.BYTE,e.length,t)}static makeNumeric(e){if(!a.isNumeric(e))throw new RangeError("String contains non-numeric characters");let t=[];for(let n=0;n=1<{let t;(e=>{const t=class{constructor(e,t){this.ordinal=e,this.formatBits=t}};let n=t;n.LOW=new t(0,1),n.MEDIUM=new t(1,0),n.QUARTILE=new t(2,3),n.HIGH=new t(3,2),e.Ecc=n})(t=e.QrCode||(e.QrCode={}))})(r||(r={})),(e=>{let t;(e=>{const t=class{constructor(e,t){this.modeBits=e,this.numBitsCharCount=t}numCharCountBits(e){return this.numBitsCharCount[Math.floor((e+7)/17)]}};let n=t;n.NUMERIC=new t(1,[10,12,14]),n.ALPHANUMERIC=new t(2,[9,11,13]),n.BYTE=new t(4,[8,16,16]),n.KANJI=new t(8,[8,10,12]),n.ECI=new t(7,[0,0,0]),e.Mode=n})(t=e.QrSegment||(e.QrSegment={}))})(r||(r={}));var f=r,h={L:f.QrCode.Ecc.LOW,M:f.QrCode.Ecc.MEDIUM,Q:f.QrCode.Ecc.QUARTILE,H:f.QrCode.Ecc.HIGH},p=128,g="L",m="#FFFFFF",v="#000000",A=!1,y=4,b=.1;function _(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;const n=[];return e.forEach((function(e,r){let i=null;e.forEach((function(o,a){if(!o&&null!==i)return n.push("M".concat(i+t," ").concat(r+t,"h").concat(a-i,"v1H").concat(i+t,"z")),void(i=null);if(a!==e.length-1)o&&null===i&&(i=a);else{if(!o)return;null===i?n.push("M".concat(a+t,",").concat(r+t," h1v1H").concat(a+t,"z")):n.push("M".concat(i+t,",").concat(r+t," h").concat(a+1-i,"v1H").concat(i+t,"z"))}}))})),n.join("")}function w(e,t){return e.slice().map(((e,n)=>n=t.y+t.h?e:e.map(((e,n)=>(n=t.x+t.w)&&e))))}function x(e,t,n,r){if(null==r)return null;const i=n?y:0,o=e.length+2*i,a=Math.floor(t*b),s=o/t,l=(r.width||a)*s,c=(r.height||a)*s,u=null==r.x?e.length/2-l/2:r.x*s,d=null==r.y?e.length/2-c/2:r.y*s;let f=null;if(r.excavate){let e=Math.floor(u),t=Math.floor(d);f={x:e,y:t,w:Math.ceil(l+u-e),h:Math.ceil(c+d-t)}}return{x:u,y:d,h:c,w:l,excavation:f}}var E=function(){try{(new Path2D).addPath(new Path2D)}catch(e){return!1}return!0}();function S(e){const t=e,{value:n,size:r=p,level:o=g,bgColor:a=m,fgColor:s=v,includeMargin:l=A,style:c,imageSettings:b}=t,S=d(t,["value","size","level","bgColor","fgColor","includeMargin","style","imageSettings"]),C=null==b?void 0:b.src,P=(0,i.useRef)(null),T=(0,i.useRef)(null),[k,M]=(0,i.useState)(!1);(0,i.useEffect)((()=>{if(null!=P.current){const e=P.current,t=e.getContext("2d");if(!t)return;let i=f.QrCode.encodeText(n,h[o]).getModules();const c=l?y:0,u=i.length+2*c,d=x(i,r,l,b),p=T.current,g=null!=d&&null!==p&&p.complete&&0!==p.naturalHeight&&0!==p.naturalWidth;g&&null!=d.excavation&&(i=w(i,d.excavation));const m=window.devicePixelRatio||1;e.height=e.width=r*m;const v=r/u*m;t.scale(v,v),t.fillStyle=a,t.fillRect(0,0,u,u),t.fillStyle=s,E?t.fill(new Path2D(_(i,c))):i.forEach((function(e,n){e.forEach((function(e,r){e&&t.fillRect(r+c,n+c,1,1)}))})),g&&t.drawImage(p,d.x+c,d.y+c,d.w,d.h)}})),(0,i.useEffect)((()=>{M(!1)}),[C]);const O=u({height:r,width:r},c);let R=null;return null!=C&&(R=i.createElement("img",{src:C,key:C,style:{display:"none"},onLoad:()=>{M(!0)},ref:T})),i.createElement(i.Fragment,null,i.createElement("canvas",u({style:O,height:r,width:r,ref:P},S)),R)}function C(e){const t=e,{value:n,size:r=p,level:o=g,bgColor:a=m,fgColor:s=v,includeMargin:l=A,imageSettings:c}=t,b=d(t,["value","size","level","bgColor","fgColor","includeMargin","imageSettings"]);let E=f.QrCode.encodeText(n,h[o]).getModules();const S=l?y:0,C=E.length+2*S,P=x(E,r,l,c);let T=null;null!=c&&null!=P&&(null!=P.excavation&&(E=w(E,P.excavation)),T=i.createElement("image",{xlinkHref:c.src,height:P.h,width:P.w,x:P.x+S,y:P.y+S,preserveAspectRatio:"none"}));const k=_(E,S);return i.createElement("svg",u({height:r,width:r,viewBox:"0 0 ".concat(C," ").concat(C)},b),i.createElement("path",{fill:a,d:"M0,0 h".concat(C,"v").concat(C,"H0z"),shapeRendering:"crispEdges"}),i.createElement("path",{fill:s,d:k,shapeRendering:"crispEdges"}),T)}},78613:e=>{"use strict";var t=String.prototype.replace,n=/%20/g,r="RFC1738",i="RFC3986";e.exports={default:i,formatters:{RFC1738:function(e){return t.call(e,n,"+")},RFC3986:function(e){return String(e)}},RFC1738:r,RFC3986:i}},58081:(e,t,n)=>{"use strict";var r=n(44847),i=n(41120),o=n(78613);e.exports={formats:o,parse:i,stringify:r}},41120:(e,t,n)=>{"use strict";var r=n(19919),i=Object.prototype.hasOwnProperty,o=Array.isArray,a={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:r.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},s=function(e){return e.replace(/&#(\d+);/g,(function(e,t){return String.fromCharCode(parseInt(t,10))}))},l=function(e,t){return e&&"string"===typeof e&&t.comma&&e.indexOf(",")>-1?e.split(","):e},c=function(e,t,n,r){if(e){var o=n.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,a=/(\[[^[\]]*])/g,s=n.depth>0&&/(\[[^[\]]*])/.exec(o),c=s?o.slice(0,s.index):o,u=[];if(c){if(!n.plainObjects&&i.call(Object.prototype,c)&&!n.allowPrototypes)return;u.push(c)}for(var d=0;n.depth>0&&null!==(s=a.exec(o))&&d=0;--o){var a,s=e[o];if("[]"===s&&n.parseArrays)a=[].concat(i);else{a=n.plainObjects?Object.create(null):{};var c="["===s.charAt(0)&&"]"===s.charAt(s.length-1)?s.slice(1,-1):s,u=parseInt(c,10);n.parseArrays||""!==c?!isNaN(u)&&s!==c&&String(u)===c&&u>=0&&n.parseArrays&&u<=n.arrayLimit?(a=[])[u]=i:"__proto__"!==c&&(a[c]=i):a={0:i}}i=a}return i}(u,t,n,r)}};e.exports=function(e,t){var n=function(e){if(!e)return a;if(null!==e.decoder&&void 0!==e.decoder&&"function"!==typeof e.decoder)throw new TypeError("Decoder has to be a function.");if("undefined"!==typeof e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var t="undefined"===typeof e.charset?a.charset:e.charset;return{allowDots:"undefined"===typeof e.allowDots?a.allowDots:!!e.allowDots,allowPrototypes:"boolean"===typeof e.allowPrototypes?e.allowPrototypes:a.allowPrototypes,allowSparse:"boolean"===typeof e.allowSparse?e.allowSparse:a.allowSparse,arrayLimit:"number"===typeof e.arrayLimit?e.arrayLimit:a.arrayLimit,charset:t,charsetSentinel:"boolean"===typeof e.charsetSentinel?e.charsetSentinel:a.charsetSentinel,comma:"boolean"===typeof e.comma?e.comma:a.comma,decoder:"function"===typeof e.decoder?e.decoder:a.decoder,delimiter:"string"===typeof e.delimiter||r.isRegExp(e.delimiter)?e.delimiter:a.delimiter,depth:"number"===typeof e.depth||!1===e.depth?+e.depth:a.depth,ignoreQueryPrefix:!0===e.ignoreQueryPrefix,interpretNumericEntities:"boolean"===typeof e.interpretNumericEntities?e.interpretNumericEntities:a.interpretNumericEntities,parameterLimit:"number"===typeof e.parameterLimit?e.parameterLimit:a.parameterLimit,parseArrays:!1!==e.parseArrays,plainObjects:"boolean"===typeof e.plainObjects?e.plainObjects:a.plainObjects,strictNullHandling:"boolean"===typeof e.strictNullHandling?e.strictNullHandling:a.strictNullHandling}}(t);if(""===e||null===e||"undefined"===typeof e)return n.plainObjects?Object.create(null):{};for(var u="string"===typeof e?function(e,t){var n,c={},u=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,d=t.parameterLimit===1/0?void 0:t.parameterLimit,f=u.split(t.delimiter,d),h=-1,p=t.charset;if(t.charsetSentinel)for(n=0;n-1&&(m=o(m)?[m]:m),i.call(c,g)?c[g]=r.combine(c[g],m):c[g]=m}return c}(e,n):e,d=n.plainObjects?Object.create(null):{},f=Object.keys(u),h=0;h{"use strict";var r=n(55651),i=n(19919),o=n(78613),a=Object.prototype.hasOwnProperty,s={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},l=Array.isArray,c=String.prototype.split,u=Array.prototype.push,d=function(e,t){u.apply(e,l(t)?t:[t])},f=Date.prototype.toISOString,h=o.default,p={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:i.encode,encodeValuesOnly:!1,format:h,formatter:o.formatters[h],indices:!1,serializeDate:function(e){return f.call(e)},skipNulls:!1,strictNullHandling:!1},g={},m=function e(t,n,o,a,s,u,f,h,m,v,A,y,b,_,w,x){for(var E=t,S=x,C=0,P=!1;void 0!==(S=S.get(g))&&!P;){var T=S.get(t);if(C+=1,"undefined"!==typeof T){if(T===C)throw new RangeError("Cyclic object value");P=!0}"undefined"===typeof S.get(g)&&(C=0)}if("function"===typeof h?E=h(n,E):E instanceof Date?E=A(E):"comma"===o&&l(E)&&(E=i.maybeMap(E,(function(e){return e instanceof Date?A(e):e}))),null===E){if(s)return f&&!_?f(n,p.encoder,w,"key",y):n;E=""}if(function(e){return"string"===typeof e||"number"===typeof e||"boolean"===typeof e||"symbol"===typeof e||"bigint"===typeof e}(E)||i.isBuffer(E)){if(f){var k=_?n:f(n,p.encoder,w,"key",y);if("comma"===o&&_){for(var M=c.call(String(E),","),O="",R=0;R0?E.join(",")||null:void 0}];else if(l(h))I=h;else{var N=Object.keys(E);I=m?N.sort(m):N}for(var D=a&&l(E)&&1===E.length?n+"[]":n,F=0;F0?_+b:""}},19919:(e,t,n)=>{"use strict";var r=n(78613),i=Object.prototype.hasOwnProperty,o=Array.isArray,a=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),s=function(e,t){for(var n=t&&t.plainObjects?Object.create(null):{},r=0;r1;){var t=e.pop(),n=t.obj[t.prop];if(o(n)){for(var r=[],i=0;i=48&&u<=57||u>=65&&u<=90||u>=97&&u<=122||o===r.RFC1738&&(40===u||41===u)?l+=s.charAt(c):u<128?l+=a[u]:u<2048?l+=a[192|u>>6]+a[128|63&u]:u<55296||u>=57344?l+=a[224|u>>12]+a[128|u>>6&63]+a[128|63&u]:(c+=1,u=65536+((1023&u)<<10|1023&s.charCodeAt(c)),l+=a[240|u>>18]+a[128|u>>12&63]+a[128|u>>6&63]+a[128|63&u])}return l},isBuffer:function(e){return!(!e||"object"!==typeof e)&&!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},isRegExp:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},maybeMap:function(e,t){if(o(e)){for(var n=[],r=0;ri;){if(o-i>600){var s=o-i+1,l=r-i+1,c=Math.log(s),u=.5*Math.exp(2*c/3),d=.5*Math.sqrt(c*u*(s-u)/s)*(l-s/2<0?-1:1);t(e,r,Math.max(i,Math.floor(r-l*u/s+d)),Math.min(o,Math.floor(r+(s-l)*u/s+d)),a)}var f=e[r],h=i,p=o;for(n(e,i,r),a(e[o],f)>0&&n(e,i,o);h0;)p--}0===a(e[i],f)?n(e,i,p):n(e,++p,o),p<=r&&(i=p+1),r<=p&&(o=p-1)}}function n(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function r(e,t){return et?1:0}return e}()},84015:(e,t,n)=>{"use strict";e.exports=i,e.exports.default=i;var r=n(2998);function i(e,t){if(!(this instanceof i))return new i(e,t);this._maxEntries=Math.max(4,e||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),t&&this._initFormat(t),this.clear()}function o(e,t,n){if(!n)return t.indexOf(e);for(var r=0;r=e.minX&&t.maxY>=e.minY}function v(e){return{children:e,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function A(e,t,n,i,o){for(var a,s=[t,n];s.length;)(n=s.pop())-(t=s.pop())<=i||(a=t+Math.ceil((n-t)/i/2)*i,r(e,a,t,n,o),s.push(t,a,a,n))}i.prototype={all:function(){return this._all(this.data,[])},search:function(e){var t=this.data,n=[],r=this.toBBox;if(!m(e,t))return n;for(var i,o,a,s,l=[];t;){for(i=0,o=t.children.length;i=0&&o[t].children.length>this._maxEntries;)this._split(o,t),t--;this._adjustParentBBoxes(i,o,t)},_split:function(e,t){var n=e[t],r=n.children.length,i=this._minEntries;this._chooseSplitAxis(n,i,r);var o=this._chooseSplitIndex(n,i,r),s=v(n.children.splice(o,n.children.length-o));s.height=n.height,s.leaf=n.leaf,a(n,this.toBBox),a(s,this.toBBox),t?e[t-1].children.push(s):this._splitRoot(n,s)},_splitRoot:function(e,t){this.data=v([e,t]),this.data.height=e.height+1,this.data.leaf=!1,a(this.data,this.toBBox)},_chooseSplitIndex:function(e,t,n){var r,i,o,a,l,c,u,f;for(c=u=1/0,r=t;r<=n-t;r++)a=p(i=s(e,0,r,this.toBBox),o=s(e,r,n,this.toBBox)),l=d(i)+d(o),a=t;i--)o=e.children[i],l(u,e.leaf?a(o):o),d+=f(u);return d},_adjustParentBBoxes:function(e,t,n){for(var r=n;r>=0;r--)l(t[r],e)},_condense:function(e){for(var t,n=e.length-1;n>=0;n--)0===e[n].children.length?n>0?(t=e[n-1].children).splice(t.indexOf(e[n]),1):this.clear():a(e[n],this.toBBox)},_initFormat:function(e){var t=["return a"," - b",";"];this.compareMinX=new Function("a","b",t.join(e[0])),this.compareMinY=new Function("a","b",t.join(e[1])),this.toBBox=new Function("a","return {minX: a"+e[0]+", minY: a"+e[1]+", maxX: a"+e[2]+", maxY: a"+e[3]+"};")}}},82669:(e,t,n)=>{"use strict";n.d(t,{Z:()=>h});var r=n(91010),i=n(35194),o=n(68185),a=n(13747),s=n(99309),l=n(12356),c=n.n(l),u=n(88258),d=n(57435),f=["prefixCls","className","style","checked","disabled","defaultChecked","type","title","onChange"];const h=(0,d.forwardRef)((function(e,t){var n=e.prefixCls,l=void 0===n?"rc-checkbox":n,h=e.className,p=e.style,g=e.checked,m=e.disabled,v=e.defaultChecked,A=void 0!==v&&v,y=e.type,b=void 0===y?"checkbox":y,_=e.title,w=e.onChange,x=(0,s.Z)(e,f),E=(0,d.useRef)(null),S=(0,u.Z)(A,{value:g}),C=(0,a.Z)(S,2),P=C[0],T=C[1];(0,d.useImperativeHandle)(t,(function(){return{focus:function(e){var t;null===(t=E.current)||void 0===t||t.focus(e)},blur:function(){var e;null===(e=E.current)||void 0===e||e.blur()},input:E.current}}));var k=c()(l,h,(0,o.Z)((0,o.Z)({},"".concat(l,"-checked"),P),"".concat(l,"-disabled"),m));return d.createElement("span",{className:k,title:_,style:p},d.createElement("input",(0,r.Z)({},x,{className:"".concat(l,"-input"),ref:E,onChange:function(t){m||("checked"in e||T(t.target.checked),null===w||void 0===w||w({target:(0,i.Z)((0,i.Z)({},e),{},{type:b,checked:t.target.checked}),stopPropagation:function(){t.stopPropagation()},preventDefault:function(){t.preventDefault()},nativeEvent:t.nativeEvent}))},disabled:m,checked:!!P,type:b})),d.createElement("span",{className:"".concat(l,"-inner")}))}))},51502:(e,t,n)=>{"use strict";n.d(t,{s:()=>x,Z:()=>k});var r=n(91010),i=n(13747),o=n(34282),a=n(57435),s=a.createContext({}),l=n(35194),c=n(12356),u=n.n(c),d=n(28143),f=n(71589),h=n(98475),p=n(37461);function g(e,t,n){var r=t;return!r&&n&&(r="".concat(e,"-").concat(n)),r}function m(e,t){var n=e["page".concat(t?"Y":"X","Offset")],r="scroll".concat(t?"Top":"Left");if("number"!==typeof n){var i=e.document;"number"!==typeof(n=i.documentElement[r])&&(n=i.body[r])}return n}var v=n(9817),A=n(69223),y=n(43903);const b=a.memo((function(e){return e.children}),(function(e,t){return!t.shouldUpdate}));var _={width:0,height:0,overflow:"hidden",outline:"none"},w={outline:"none"};const x=a.forwardRef((function(e,t){var n=e.prefixCls,i=e.className,o=e.style,c=e.title,d=e.ariaId,f=e.footer,h=e.closable,g=e.closeIcon,m=e.onClose,v=e.children,x=e.bodyStyle,E=e.bodyProps,S=e.modalRender,C=e.onMouseDown,P=e.onMouseUp,T=e.holderRef,k=e.visible,M=e.forceRender,O=e.width,R=e.height,I=e.classNames,L=e.styles,N=a.useContext(s).panel,D=(0,y.x1)(T,N),F=(0,a.useRef)(),j=(0,a.useRef)(),B=(0,a.useRef)();a.useImperativeHandle(t,(function(){return{focus:function(){var e;null===(e=B.current)||void 0===e||e.focus()},changeActive:function(e){var t=document.activeElement;e&&t===j.current?F.current.focus():e||t!==F.current||j.current.focus()}}}));var Z,z,U={};void 0!==O&&(U.width=O),void 0!==R&&(U.height=R),f&&(Z=a.createElement("div",{className:u()("".concat(n,"-footer"),null===I||void 0===I?void 0:I.footer),style:(0,l.Z)({},null===L||void 0===L?void 0:L.footer)},f)),c&&(z=a.createElement("div",{className:u()("".concat(n,"-header"),null===I||void 0===I?void 0:I.header),style:(0,l.Z)({},null===L||void 0===L?void 0:L.header)},a.createElement("div",{className:"".concat(n,"-title"),id:d},c)));var H,V=(0,a.useMemo)((function(){return"object"===(0,A.Z)(h)&&null!==h?h:h?{closeIcon:null!==g&&void 0!==g?g:a.createElement("span",{className:"".concat(n,"-close-x")})}:{}}),[h,g]),W=(0,p.Z)(V,!0);h&&(H=a.createElement("button",(0,r.Z)({type:"button",onClick:m,"aria-label":"Close"},W,{className:"".concat(n,"-close")}),V.closeIcon));var G=a.createElement("div",{className:u()("".concat(n,"-content"),null===I||void 0===I?void 0:I.content),style:null===L||void 0===L?void 0:L.content},H,z,a.createElement("div",(0,r.Z)({className:u()("".concat(n,"-body"),null===I||void 0===I?void 0:I.body),style:(0,l.Z)((0,l.Z)({},x),null===L||void 0===L?void 0:L.body)},E),v),Z);return a.createElement("div",{key:"dialog-element",role:"dialog","aria-labelledby":c?d:null,"aria-modal":"true",ref:D,style:(0,l.Z)((0,l.Z)({},o),U),className:u()(n,i),onMouseDown:C,onMouseUp:P},a.createElement("div",{tabIndex:0,ref:F,style:_,"aria-hidden":"true"}),a.createElement("div",{ref:B,tabIndex:-1,style:w},a.createElement(b,{shouldUpdate:k||M},S?S(G):G)),a.createElement("div",{tabIndex:0,ref:j,style:_,"aria-hidden":"true"}))}));var E=a.forwardRef((function(e,t){var n=e.prefixCls,o=e.title,s=e.style,c=e.className,d=e.visible,f=e.forceRender,h=e.destroyOnClose,p=e.motionName,g=e.ariaId,A=e.onVisibleChanged,y=e.mousePosition,b=(0,a.useRef)(),_=a.useState(),w=(0,i.Z)(_,2),E=w[0],S=w[1],C={};function P(){var e=function(e){var t=e.getBoundingClientRect(),n={left:t.left,top:t.top},r=e.ownerDocument,i=r.defaultView||r.parentWindow;return n.left+=m(i),n.top+=m(i,!0),n}(b.current);S(y?"".concat(y.x-e.left,"px ").concat(y.y-e.top,"px"):"")}return E&&(C.transformOrigin=E),a.createElement(v.ZP,{visible:d,onVisibleChanged:A,onAppearPrepare:P,onEnterPrepare:P,forceRender:f,motionName:p,removeOnLeave:h,ref:b},(function(i,d){var f=i.className,h=i.style;return a.createElement(x,(0,r.Z)({},e,{ref:t,title:o,ariaId:g,prefixCls:n,holderRef:d,style:(0,l.Z)((0,l.Z)((0,l.Z)({},h),s),C),className:u()(c,f)}))}))}));E.displayName="Content";const S=E;function C(e){var t=e.prefixCls,n=e.style,i=e.visible,o=e.maskProps,s=e.motionName,c=e.className;return a.createElement(v.ZP,{key:"mask",visible:i,motionName:s,leavedClassName:"".concat(t,"-mask-hidden")},(function(e,i){var s=e.className,d=e.style;return a.createElement("div",(0,r.Z)({ref:i,style:(0,l.Z)((0,l.Z)({},d),n),className:u()("".concat(t,"-mask"),s,c)},o))}))}n(98162);function P(e){var t=e.prefixCls,n=void 0===t?"rc-dialog":t,o=e.zIndex,s=e.visible,c=void 0!==s&&s,m=e.keyboard,v=void 0===m||m,A=e.focusTriggerAfterClose,y=void 0===A||A,b=e.wrapStyle,_=e.wrapClassName,w=e.wrapProps,x=e.onClose,E=e.afterOpenChange,P=e.afterClose,T=e.transitionName,k=e.animation,M=e.closable,O=void 0===M||M,R=e.mask,I=void 0===R||R,L=e.maskTransitionName,N=e.maskAnimation,D=e.maskClosable,F=void 0===D||D,j=e.maskStyle,B=e.maskProps,Z=e.rootClassName,z=e.classNames,U=e.styles;var H=(0,a.useRef)(),V=(0,a.useRef)(),W=(0,a.useRef)(),G=a.useState(c),K=(0,i.Z)(G,2),q=K[0],Y=K[1],X=(0,f.Z)();function $(e){null===x||void 0===x||x(e)}var Q=(0,a.useRef)(!1),J=(0,a.useRef)(),ee=null;return F&&(ee=function(e){Q.current?Q.current=!1:V.current===e.target&&$(e)}),(0,a.useEffect)((function(){c&&(Y(!0),(0,d.Z)(V.current,document.activeElement)||(H.current=document.activeElement))}),[c]),(0,a.useEffect)((function(){return function(){clearTimeout(J.current)}}),[]),a.createElement("div",(0,r.Z)({className:u()("".concat(n,"-root"),Z)},(0,p.Z)(e,{data:!0})),a.createElement(C,{prefixCls:n,visible:I&&c,motionName:g(n,L,N),style:(0,l.Z)((0,l.Z)({zIndex:o},j),null===U||void 0===U?void 0:U.mask),maskProps:B,className:null===z||void 0===z?void 0:z.mask}),a.createElement("div",(0,r.Z)({tabIndex:-1,onKeyDown:function(e){if(v&&e.keyCode===h.Z.ESC)return e.stopPropagation(),void $(e);c&&e.keyCode===h.Z.TAB&&W.current.changeActive(!e.shiftKey)},className:u()("".concat(n,"-wrap"),_,null===z||void 0===z?void 0:z.wrapper),ref:V,onClick:ee,style:(0,l.Z)((0,l.Z)((0,l.Z)({zIndex:o},b),null===U||void 0===U?void 0:U.wrapper),{},{display:q?null:"none"})},w),a.createElement(S,(0,r.Z)({},e,{onMouseDown:function(){clearTimeout(J.current),Q.current=!0},onMouseUp:function(){J.current=setTimeout((function(){Q.current=!1}))},ref:W,closable:O,ariaId:X,prefixCls:n,visible:c&&q,onClose:$,onVisibleChanged:function(e){if(e)!function(){var e;(0,d.Z)(V.current,document.activeElement)||null===(e=W.current)||void 0===e||e.focus()}();else{if(Y(!1),I&&H.current&&y){try{H.current.focus({preventScroll:!0})}catch(t){}H.current=null}q&&(null===P||void 0===P||P())}null===E||void 0===E||E(e)},motionName:g(n,T,k)}))))}var T=function(e){var t=e.visible,n=e.getContainer,l=e.forceRender,c=e.destroyOnClose,u=void 0!==c&&c,d=e.afterClose,f=e.panelRef,h=a.useState(t),p=(0,i.Z)(h,2),g=p[0],m=p[1],v=a.useMemo((function(){return{panel:f}}),[f]);return a.useEffect((function(){t&&m(!0)}),[t]),l||!u||g?a.createElement(s.Provider,{value:v},a.createElement(o.Z,{open:t||l||g,autoDestroy:!1,getContainer:n,autoLock:t||g},a.createElement(P,(0,r.Z)({},e,{destroyOnClose:u,afterClose:function(){null===d||void 0===d||d(),m(!1)}})))):null};T.displayName="Dialog";const k=T},36408:(e,t,n)=>{"use strict";n.d(t,{Z:()=>w});var r=n(91010),i=n(68185),o=n(13747),a=n(99309),s=n(91084),l=n(12356),c=n.n(l),u=n(43903),d=n(57435),f=n(98475),h=n(51882),p=f.Z.ESC,g=f.Z.TAB;const m=(0,d.forwardRef)((function(e,t){var n=e.overlay,r=e.arrow,i=e.prefixCls,o=(0,d.useMemo)((function(){return"function"===typeof n?n():n}),[n]),a=(0,u.sQ)(t,null===o||void 0===o?void 0:o.ref);return d.createElement(d.Fragment,null,r&&d.createElement("div",{className:"".concat(i,"-arrow")}),d.cloneElement(o,{ref:(0,u.Yr)(o)?a:void 0}))}));var v={adjustX:1,adjustY:1},A=[0,0];const y={topLeft:{points:["bl","tl"],overflow:v,offset:[0,-4],targetOffset:A},top:{points:["bc","tc"],overflow:v,offset:[0,-4],targetOffset:A},topRight:{points:["br","tr"],overflow:v,offset:[0,-4],targetOffset:A},bottomLeft:{points:["tl","bl"],overflow:v,offset:[0,4],targetOffset:A},bottom:{points:["tc","bc"],overflow:v,offset:[0,4],targetOffset:A},bottomRight:{points:["tr","br"],overflow:v,offset:[0,4],targetOffset:A}};var b=["arrow","prefixCls","transitionName","animation","align","placement","placements","getPopupContainer","showAction","hideAction","overlayClassName","overlayStyle","visible","trigger","autoFocus","overlay","children","onVisibleChange"];function _(e,t){var n,l=e.arrow,f=void 0!==l&&l,v=e.prefixCls,A=void 0===v?"rc-dropdown":v,_=e.transitionName,w=e.animation,x=e.align,E=e.placement,S=void 0===E?"bottomLeft":E,C=e.placements,P=void 0===C?y:C,T=e.getPopupContainer,k=e.showAction,M=e.hideAction,O=e.overlayClassName,R=e.overlayStyle,I=e.visible,L=e.trigger,N=void 0===L?["hover"]:L,D=e.autoFocus,F=e.overlay,j=e.children,B=e.onVisibleChange,Z=(0,a.Z)(e,b),z=d.useState(),U=(0,o.Z)(z,2),H=U[0],V=U[1],W="visible"in e?I:H,G=d.useRef(null),K=d.useRef(null),q=d.useRef(null);d.useImperativeHandle(t,(function(){return G.current}));var Y=function(e){V(e),null===B||void 0===B||B(e)};!function(e){var t=e.visible,n=e.triggerRef,r=e.onVisibleChange,i=e.autoFocus,o=e.overlayRef,a=d.useRef(!1),s=function(){var e,i;t&&(null===(e=n.current)||void 0===e||null===(i=e.focus)||void 0===i||i.call(e),null===r||void 0===r||r(!1))},l=function(){var e;return!(null===(e=o.current)||void 0===e||!e.focus)&&(o.current.focus(),a.current=!0,!0)},c=function(e){switch(e.keyCode){case p:s();break;case g:var t=!1;a.current||(t=l()),t?e.preventDefault():s()}};d.useEffect((function(){return t?(window.addEventListener("keydown",c),i&&(0,h.Z)(l,3),function(){window.removeEventListener("keydown",c),a.current=!1}):function(){a.current=!1}}),[t])}({visible:W,triggerRef:q,onVisibleChange:Y,autoFocus:D,overlayRef:K});var X=function(){return d.createElement(m,{ref:K,overlay:F,prefixCls:A,arrow:f})},$=d.cloneElement(j,{className:c()(null===(n=j.props)||void 0===n?void 0:n.className,W&&function(){var t=e.openClassName;return void 0!==t?t:"".concat(A,"-open")}()),ref:(0,u.Yr)(j)?(0,u.sQ)(q,j.ref):void 0}),Q=M;return Q||-1===N.indexOf("contextMenu")||(Q=["click"]),d.createElement(s.Z,(0,r.Z)({builtinPlacements:P},Z,{prefixCls:A,ref:G,popupClassName:c()(O,(0,i.Z)({},"".concat(A,"-show-arrow"),f)),popupStyle:R,action:N,showAction:k,hideAction:Q,popupPlacement:S,popupAlign:x,popupTransitionName:_,popupAnimation:w,popupVisible:W,stretch:function(){var t=e.minOverlayWidthMatchTrigger,n=e.alignPoint;return"minOverlayWidthMatchTrigger"in e?t:!n}()?"minWidth":"",popup:"function"===typeof F?X:X(),onPopupVisibleChange:Y,onPopupClick:function(t){var n=e.onOverlayClick;V(!1),n&&n(t)},getPopupContainer:T}),$)}const w=d.forwardRef(_)},62995:(e,t,n)=>{"use strict";n.d(t,{gN:()=>ve,zb:()=>_,RV:()=>Te,aV:()=>Ae,ZM:()=>w,ZP:()=>De,cI:()=>Ce,qo:()=>Le});var r=n(57435),i=n(91010),o=n(99309),a=n(98106),s=n(2292),l=n(35194),c=n(22368),u=n(66375),d=n(1959),f=n(50269),h=n(64648),p=n(13004),g=n(68185),m=n(52353),v=n(46032),A=n(98162),y="RC_FORM_INTERNAL_HOOKS",b=function(){(0,A.ZP)(!1,"Can not find FormContext. Please make sure you wrap Field under Form.")};const _=r.createContext({getFieldValue:b,getFieldsValue:b,getFieldError:b,getFieldWarning:b,getFieldsError:b,isFieldsTouched:b,isFieldTouched:b,isFieldValidating:b,isFieldsValidating:b,resetFields:b,setFields:b,setFieldValue:b,setFieldsValue:b,validateFields:b,submit:b,getInternalHooks:function(){return b(),{dispatch:b,initEntityValue:b,registerField:b,useSubscribe:b,setInitialValues:b,destroyForm:b,setCallbacks:b,registerWatch:b,getFields:b,setValidateMessages:b,setPreserve:b,getInitialValue:b}}});const w=r.createContext(null);function x(e){return void 0===e||null===e?[]:Array.isArray(e)?e:[e]}function E(){return E=Object.assign||function(e){for(var t=1;t1?t-1:0),r=1;r=o)return e;switch(e){case"%s":return String(n[i++]);case"%d":return Number(n[i++]);case"%j":try{return JSON.stringify(n[i++])}catch(t){return"[Circular]"}break;default:return e}})):e}function R(e,t){return void 0===e||null===e||(!("array"!==t||!Array.isArray(e)||e.length)||!(!function(e){return"string"===e||"url"===e||"hex"===e||"email"===e||"date"===e||"pattern"===e}(t)||"string"!==typeof e||e))}function I(e,t,n){var r=0,i=e.length;!function o(a){if(a&&a.length)n(a);else{var s=r;r+=1,s()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+\.)+[a-zA-Z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}))$/,url:new RegExp("^(?!mailto:)(?:(?:http|https|ftp)://|//)(?:\\S+(?::\\S*)?@)?(?:(?:(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[0-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9]+-*)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]+-*)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))|localhost)(?::\\d{2,5})?(?:(/|\\?|#)[^\\s]*)?$","i"),hex:/^#?([a-f0-9]{6}|[a-f0-9]{3})$/i},Z={integer:function(e){return Z.number(e)&&parseInt(e,10)===e},float:function(e){return Z.number(e)&&!Z.integer(e)},array:function(e){return Array.isArray(e)},regexp:function(e){if(e instanceof RegExp)return!0;try{return!!new RegExp(e)}catch(t){return!1}},date:function(e){return"function"===typeof e.getTime&&"function"===typeof e.getMonth&&"function"===typeof e.getYear&&!isNaN(e.getTime())},number:function(e){return!isNaN(e)&&"number"===typeof e},object:function(e){return"object"===typeof e&&!Z.array(e)},method:function(e){return"function"===typeof e},email:function(e){return"string"===typeof e&&e.length<=320&&!!e.match(B.email)},url:function(e){return"string"===typeof e&&e.length<=2048&&!!e.match(B.url)},hex:function(e){return"string"===typeof e&&!!e.match(B.hex)}},z="enum",U={required:j,whitespace:function(e,t,n,r,i){(/^\s+$/.test(t)||""===t)&&r.push(O(i.messages.whitespace,e.fullField))},type:function(e,t,n,r,i){if(e.required&&void 0===t)j(e,t,n,r,i);else{var o=e.type;["integer","float","array","regexp","object","method","email","number","date","url","hex"].indexOf(o)>-1?Z[o](t)||r.push(O(i.messages.types[o],e.fullField,e.type)):o&&typeof t!==e.type&&r.push(O(i.messages.types[o],e.fullField,e.type))}},range:function(e,t,n,r,i){var o="number"===typeof e.len,a="number"===typeof e.min,s="number"===typeof e.max,l=t,c=null,u="number"===typeof t,d="string"===typeof t,f=Array.isArray(t);if(u?c="number":d?c="string":f&&(c="array"),!c)return!1;f&&(l=t.length),d&&(l=t.replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,"_").length),o?l!==e.len&&r.push(O(i.messages[c].len,e.fullField,e.len)):a&&!s&&le.max?r.push(O(i.messages[c].max,e.fullField,e.max)):a&&s&&(le.max)&&r.push(O(i.messages[c].range,e.fullField,e.min,e.max))},enum:function(e,t,n,r,i){e[z]=Array.isArray(e[z])?e[z]:[],-1===e[z].indexOf(t)&&r.push(O(i.messages[z],e.fullField,e[z].join(", ")))},pattern:function(e,t,n,r,i){if(e.pattern)if(e.pattern instanceof RegExp)e.pattern.lastIndex=0,e.pattern.test(t)||r.push(O(i.messages.pattern.mismatch,e.fullField,t,e.pattern));else if("string"===typeof e.pattern){new RegExp(e.pattern).test(t)||r.push(O(i.messages.pattern.mismatch,e.fullField,t,e.pattern))}}},H=function(e,t,n,r,i){var o=e.type,a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(R(t,o)&&!e.required)return n();U.required(e,t,r,a,i,o),R(t,o)||U.type(e,t,r,a,i)}n(a)},V={string:function(e,t,n,r,i){var o=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(R(t,"string")&&!e.required)return n();U.required(e,t,r,o,i,"string"),R(t,"string")||(U.type(e,t,r,o,i),U.range(e,t,r,o,i),U.pattern(e,t,r,o,i),!0===e.whitespace&&U.whitespace(e,t,r,o,i))}n(o)},method:function(e,t,n,r,i){var o=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(R(t)&&!e.required)return n();U.required(e,t,r,o,i),void 0!==t&&U.type(e,t,r,o,i)}n(o)},number:function(e,t,n,r,i){var o=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(""===t&&(t=void 0),R(t)&&!e.required)return n();U.required(e,t,r,o,i),void 0!==t&&(U.type(e,t,r,o,i),U.range(e,t,r,o,i))}n(o)},boolean:function(e,t,n,r,i){var o=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(R(t)&&!e.required)return n();U.required(e,t,r,o,i),void 0!==t&&U.type(e,t,r,o,i)}n(o)},regexp:function(e,t,n,r,i){var o=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(R(t)&&!e.required)return n();U.required(e,t,r,o,i),R(t)||U.type(e,t,r,o,i)}n(o)},integer:function(e,t,n,r,i){var o=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(R(t)&&!e.required)return n();U.required(e,t,r,o,i),void 0!==t&&(U.type(e,t,r,o,i),U.range(e,t,r,o,i))}n(o)},float:function(e,t,n,r,i){var o=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(R(t)&&!e.required)return n();U.required(e,t,r,o,i),void 0!==t&&(U.type(e,t,r,o,i),U.range(e,t,r,o,i))}n(o)},array:function(e,t,n,r,i){var o=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if((void 0===t||null===t)&&!e.required)return n();U.required(e,t,r,o,i,"array"),void 0!==t&&null!==t&&(U.type(e,t,r,o,i),U.range(e,t,r,o,i))}n(o)},object:function(e,t,n,r,i){var o=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(R(t)&&!e.required)return n();U.required(e,t,r,o,i),void 0!==t&&U.type(e,t,r,o,i)}n(o)},enum:function(e,t,n,r,i){var o=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(R(t)&&!e.required)return n();U.required(e,t,r,o,i),void 0!==t&&U.enum(e,t,r,o,i)}n(o)},pattern:function(e,t,n,r,i){var o=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(R(t,"string")&&!e.required)return n();U.required(e,t,r,o,i),R(t,"string")||U.pattern(e,t,r,o,i)}n(o)},date:function(e,t,n,r,i){var o=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(R(t,"date")&&!e.required)return n();var a;if(U.required(e,t,r,o,i),!R(t,"date"))a=t instanceof Date?t:new Date(t),U.type(e,a,r,o,i),a&&U.range(e,a.getTime(),r,o,i)}n(o)},url:H,hex:H,email:H,required:function(e,t,n,r,i){var o=[],a=Array.isArray(t)?"array":typeof t;U.required(e,t,r,o,i,a),n(o)},any:function(e,t,n,r,i){var o=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(R(t)&&!e.required)return n();U.required(e,t,r,o,i)}n(o)}};function W(){return{default:"Validation error on field %s",required:"%s is required",enum:"%s must be one of %s",whitespace:"%s cannot be empty",date:{format:"%s date %s is invalid for format %s",parse:"%s date could not be parsed, %s is invalid ",invalid:"%s date %s is invalid"},types:{string:"%s is not a %s",method:"%s is not a %s (function)",array:"%s is not an %s",object:"%s is not an %s",number:"%s is not a %s",date:"%s is not a %s",boolean:"%s is not a %s",integer:"%s is not an %s",float:"%s is not a %s",regexp:"%s is not a valid %s",email:"%s is not a valid %s",url:"%s is not a valid %s",hex:"%s is not a valid %s"},string:{len:"%s must be exactly %s characters",min:"%s must be at least %s characters",max:"%s cannot be longer than %s characters",range:"%s must be between %s and %s characters"},number:{len:"%s must equal %s",min:"%s cannot be less than %s",max:"%s cannot be greater than %s",range:"%s must be between %s and %s"},array:{len:"%s must be exactly %s in length",min:"%s cannot be less than %s in length",max:"%s cannot be greater than %s in length",range:"%s must be between %s and %s in length"},pattern:{mismatch:"%s value %s does not match pattern %s"},clone:function(){var e=JSON.parse(JSON.stringify(this));return e.clone=this.clone,e}}}var G=W(),K=function(){function e(e){this.rules=null,this._messages=G,this.define(e)}var t=e.prototype;return t.define=function(e){var t=this;if(!e)throw new Error("Cannot configure a schema with no rules");if("object"!==typeof e||Array.isArray(e))throw new Error("Rules must be an object");this.rules={},Object.keys(e).forEach((function(n){var r=e[n];t.rules[n]=Array.isArray(r)?r:[r]}))},t.messages=function(e){return e&&(this._messages=F(W(),e)),this._messages},t.validate=function(t,n,r){var i=this;void 0===n&&(n={}),void 0===r&&(r=function(){});var o=t,a=n,s=r;if("function"===typeof a&&(s=a,a={}),!this.rules||0===Object.keys(this.rules).length)return s&&s(null,o),Promise.resolve(o);if(a.messages){var l=this.messages();l===G&&(l=W()),F(l,a.messages),a.messages=l}else a.messages=this.messages();var c={};(a.keys||Object.keys(this.rules)).forEach((function(e){var n=i.rules[e],r=o[e];n.forEach((function(n){var a=n;"function"===typeof a.transform&&(o===t&&(o=E({},o)),r=o[e]=a.transform(r)),(a="function"===typeof a?{validator:a}:E({},a)).validator=i.getValidationMethod(a),a.validator&&(a.field=e,a.fullField=a.fullField||e,a.type=i.getType(a),c[e]=c[e]||[],c[e].push({rule:a,value:r,source:o,field:e}))}))}));var u={};return N(c,a,(function(t,n){var r,i=t.rule,s=("object"===i.type||"array"===i.type)&&("object"===typeof i.fields||"object"===typeof i.defaultField);function l(e,t){return E({},t,{fullField:i.fullField+"."+e,fullFields:i.fullFields?[].concat(i.fullFields,[e]):[e]})}function c(r){void 0===r&&(r=[]);var c=Array.isArray(r)?r:[r];!a.suppressWarning&&c.length&&e.warning("async-validator:",c),c.length&&void 0!==i.message&&(c=[].concat(i.message));var d=c.map(D(i,o));if(a.first&&d.length)return u[i.field]=1,n(d);if(s){if(i.required&&!t.value)return void 0!==i.message?d=[].concat(i.message).map(D(i,o)):a.error&&(d=[a.error(i,O(a.messages.required,i.field))]),n(d);var f={};i.defaultField&&Object.keys(t.value).map((function(e){f[e]=i.defaultField})),f=E({},f,t.rule.fields);var h={};Object.keys(f).forEach((function(e){var t=f[e],n=Array.isArray(t)?t:[t];h[e]=n.map(l.bind(null,e))}));var p=new e(h);p.messages(a.messages),t.rule.options&&(t.rule.options.messages=a.messages,t.rule.options.error=a.error),p.validate(t.value,t.rule.options||a,(function(e){var t=[];d&&d.length&&t.push.apply(t,d),e&&e.length&&t.push.apply(t,e),n(t.length?t:null)}))}else n(d)}if(s=s&&(i.required||!i.required&&t.value),i.field=t.field,i.asyncValidator)r=i.asyncValidator(i,t.value,c,t.source,a);else if(i.validator){try{r=i.validator(i,t.value,c,t.source,a)}catch(d){null==console.error||console.error(d),setTimeout((function(){throw d}),0),c(d.message)}!0===r?c():!1===r?c("function"===typeof i.message?i.message(i.fullField||i.field):i.message||(i.fullField||i.field)+" fails"):r instanceof Array?c(r):r instanceof Error&&c(r.message)}r&&r.then&&r.then((function(){return c()}),(function(e){return c(e)}))}),(function(e){!function(e){var t=[],n={};function r(e){var n;Array.isArray(e)?t=(n=t).concat.apply(n,e):t.push(e)}for(var i=0;i2&&void 0!==arguments[2]&&arguments[2];return e&&e.some((function(e){return ue(t,e,n)}))}function ue(e,t){return!(!e||!t)&&(!(!(arguments.length>2&&void 0!==arguments[2]&&arguments[2])&&e.length!==t.length)&&t.every((function(t,n){return e[n]===t})))}function de(e){var t=arguments.length<=1?void 0:arguments[1];return t&&t.target&&"object"===(0,oe.Z)(t.target)&&e in t.target?t.target[e]:t}function fe(e,t,n){var r=e.length;if(t<0||t>=r||n<0||n>=r)return e;var i=e[t],o=t-n;return o>0?[].concat((0,c.Z)(e.slice(0,n)),[i],(0,c.Z)(e.slice(n,t)),(0,c.Z)(e.slice(t+1,r))):o<0?[].concat((0,c.Z)(e.slice(0,t)),(0,c.Z)(e.slice(t+1,n+1)),[i],(0,c.Z)(e.slice(n+1,r))):e}var he=["name"],pe=[];function ge(e,t,n,r,i,o){return"function"===typeof e?e(t,n,"source"in o?{source:o.source}:{}):r!==i}var me=function(e){(0,h.Z)(n,e);var t=(0,p.Z)(n);function n(e){var i;((0,u.Z)(this,n),i=t.call(this,e),(0,g.Z)((0,f.Z)(i),"state",{resetCount:0}),(0,g.Z)((0,f.Z)(i),"cancelRegisterFunc",null),(0,g.Z)((0,f.Z)(i),"mounted",!1),(0,g.Z)((0,f.Z)(i),"touched",!1),(0,g.Z)((0,f.Z)(i),"dirty",!1),(0,g.Z)((0,f.Z)(i),"validatePromise",void 0),(0,g.Z)((0,f.Z)(i),"prevValidating",void 0),(0,g.Z)((0,f.Z)(i),"errors",pe),(0,g.Z)((0,f.Z)(i),"warnings",pe),(0,g.Z)((0,f.Z)(i),"cancelRegister",(function(){var e=i.props,t=e.preserve,n=e.isListField,r=e.name;i.cancelRegisterFunc&&i.cancelRegisterFunc(n,t,se(r)),i.cancelRegisterFunc=null})),(0,g.Z)((0,f.Z)(i),"getNamePath",(function(){var e=i.props,t=e.name,n=e.fieldContext.prefixName,r=void 0===n?[]:n;return void 0!==t?[].concat((0,c.Z)(r),(0,c.Z)(t)):[]})),(0,g.Z)((0,f.Z)(i),"getRules",(function(){var e=i.props,t=e.rules,n=void 0===t?[]:t,r=e.fieldContext;return n.map((function(e){return"function"===typeof e?e(r):e}))})),(0,g.Z)((0,f.Z)(i),"refresh",(function(){i.mounted&&i.setState((function(e){return{resetCount:e.resetCount+1}}))})),(0,g.Z)((0,f.Z)(i),"metaCache",null),(0,g.Z)((0,f.Z)(i),"triggerMetaEvent",(function(e){var t=i.props.onMetaChange;if(t){var n=(0,l.Z)((0,l.Z)({},i.getMeta()),{},{destroy:e});(0,v.Z)(i.metaCache,n)||t(n),i.metaCache=n}else i.metaCache=null})),(0,g.Z)((0,f.Z)(i),"onStoreChange",(function(e,t,n){var r=i.props,o=r.shouldUpdate,a=r.dependencies,s=void 0===a?[]:a,l=r.onReset,c=n.store,u=i.getNamePath(),d=i.getValue(e),f=i.getValue(c),h=t&&ce(t,u);switch("valueUpdate"!==n.type||"external"!==n.source||(0,v.Z)(d,f)||(i.touched=!0,i.dirty=!0,i.validatePromise=null,i.errors=pe,i.warnings=pe,i.triggerMetaEvent()),n.type){case"reset":if(!t||h)return i.touched=!1,i.dirty=!1,i.validatePromise=void 0,i.errors=pe,i.warnings=pe,i.triggerMetaEvent(),null===l||void 0===l||l(),void i.refresh();break;case"remove":if(o)return void i.reRender();break;case"setField":var p=n.data;if(h)return"touched"in p&&(i.touched=p.touched),"validating"in p&&!("originRCField"in p)&&(i.validatePromise=p.validating?Promise.resolve([]):null),"errors"in p&&(i.errors=p.errors||pe),"warnings"in p&&(i.warnings=p.warnings||pe),i.dirty=!0,i.triggerMetaEvent(),void i.reRender();if("value"in p&&ce(t,u,!0))return void i.reRender();if(o&&!u.length&&ge(o,e,c,d,f,n))return void i.reRender();break;case"dependenciesUpdate":if(s.map(se).some((function(e){return ce(n.relatedFields,e)})))return void i.reRender();break;default:if(h||(!s.length||u.length||o)&&ge(o,e,c,d,f,n))return void i.reRender()}!0===o&&i.reRender()})),(0,g.Z)((0,f.Z)(i),"validateRules",(function(e){var t=i.getNamePath(),n=i.getValue(),r=e||{},o=r.triggerName,l=r.validateOnly,u=void 0!==l&&l,d=Promise.resolve().then((0,s.Z)((0,a.Z)().mark((function r(){var s,l,u,f,h,p,g;return(0,a.Z)().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(i.mounted){r.next=2;break}return r.abrupt("return",[]);case 2:if(s=i.props,l=s.validateFirst,u=void 0!==l&&l,f=s.messageVariables,h=s.validateDebounce,p=i.getRules(),o&&(p=p.filter((function(e){return e})).filter((function(e){var t=e.validateTrigger;return!t||x(t).includes(o)}))),!h||!o){r.next=10;break}return r.next=8,new Promise((function(e){setTimeout(e,h)}));case 8:if(i.validatePromise===d){r.next=10;break}return r.abrupt("return",[]);case 10:return(g=ne(t,n,p,e,u,f)).catch((function(e){return e})).then((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:pe;if(i.validatePromise===d){var t;i.validatePromise=null;var n=[],r=[];null===(t=e.forEach)||void 0===t||t.call(e,(function(e){var t=e.rule.warningOnly,i=e.errors,o=void 0===i?pe:i;t?r.push.apply(r,(0,c.Z)(o)):n.push.apply(n,(0,c.Z)(o))})),i.errors=n,i.warnings=r,i.triggerMetaEvent(),i.reRender()}})),r.abrupt("return",g);case 13:case"end":return r.stop()}}),r)}))));return u||(i.validatePromise=d,i.dirty=!0,i.errors=pe,i.warnings=pe,i.triggerMetaEvent(),i.reRender()),d})),(0,g.Z)((0,f.Z)(i),"isFieldValidating",(function(){return!!i.validatePromise})),(0,g.Z)((0,f.Z)(i),"isFieldTouched",(function(){return i.touched})),(0,g.Z)((0,f.Z)(i),"isFieldDirty",(function(){return!(!i.dirty&&void 0===i.props.initialValue)||void 0!==(0,i.props.fieldContext.getInternalHooks(y).getInitialValue)(i.getNamePath())})),(0,g.Z)((0,f.Z)(i),"getErrors",(function(){return i.errors})),(0,g.Z)((0,f.Z)(i),"getWarnings",(function(){return i.warnings})),(0,g.Z)((0,f.Z)(i),"isListField",(function(){return i.props.isListField})),(0,g.Z)((0,f.Z)(i),"isList",(function(){return i.props.isList})),(0,g.Z)((0,f.Z)(i),"isPreserve",(function(){return i.props.preserve})),(0,g.Z)((0,f.Z)(i),"getMeta",(function(){return i.prevValidating=i.isFieldValidating(),{touched:i.isFieldTouched(),validating:i.prevValidating,errors:i.errors,warnings:i.warnings,name:i.getNamePath(),validated:null===i.validatePromise}})),(0,g.Z)((0,f.Z)(i),"getOnlyChild",(function(e){if("function"===typeof e){var t=i.getMeta();return(0,l.Z)((0,l.Z)({},i.getOnlyChild(e(i.getControlled(),t,i.props.fieldContext))),{},{isFunction:!0})}var n=(0,m.Z)(e);return 1===n.length&&r.isValidElement(n[0])?{child:n[0],isFunction:!1}:{child:n,isFunction:!1}})),(0,g.Z)((0,f.Z)(i),"getValue",(function(e){var t=i.props.fieldContext.getFieldsValue,n=i.getNamePath();return(0,ae.Z)(e||t(!0),n)})),(0,g.Z)((0,f.Z)(i),"getControlled",(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=i.props,n=t.name,r=t.trigger,o=t.validateTrigger,a=t.getValueFromEvent,s=t.normalize,c=t.valuePropName,u=t.getValueProps,d=t.fieldContext,f=void 0!==o?o:d.validateTrigger,h=i.getNamePath(),p=d.getInternalHooks,m=d.getFieldsValue,v=p(y).dispatch,A=i.getValue(),b=u||function(e){return(0,g.Z)({},c,e)},_=e[r],w=void 0!==n?b(A):{};var E=(0,l.Z)((0,l.Z)({},e),w);return E[r]=function(){var e;i.touched=!0,i.dirty=!0,i.triggerMetaEvent();for(var t=arguments.length,n=new Array(t),r=0;r=0&&t<=n.length?(f.keys=[].concat((0,c.Z)(f.keys.slice(0,t)),[f.id],(0,c.Z)(f.keys.slice(t))),o([].concat((0,c.Z)(n.slice(0,t)),[e],(0,c.Z)(n.slice(t))))):(f.keys=[].concat((0,c.Z)(f.keys),[f.id]),o([].concat((0,c.Z)(n),[e]))),f.id+=1},remove:function(e){var t=s(),n=new Set(Array.isArray(e)?e:[e]);n.size<=0||(f.keys=f.keys.filter((function(e,t){return!n.has(t)})),o(t.filter((function(e,t){return!n.has(t)}))))},move:function(e,t){if(e!==t){var n=s();e<0||e>=n.length||t<0||t>=n.length||(f.keys=fe(f.keys,e,t),o(fe(n,e,t)))}}},d=r||[];return Array.isArray(d)||(d=[]),i(d.map((function(e,t){var n=f.keys[t];return void 0===n&&(f.keys[t]=f.id,n=f.keys[t],f.id+=1),{name:t,key:n,isListField:!0}})),l,t)}))))};var ye=n(13747);var be="__@field_split__";function _e(e){return e.map((function(e){return"".concat((0,oe.Z)(e),":").concat(e)})).join(be)}var we=function(){function e(){(0,u.Z)(this,e),(0,g.Z)(this,"kvs",new Map)}return(0,d.Z)(e,[{key:"set",value:function(e,t){this.kvs.set(_e(e),t)}},{key:"get",value:function(e){return this.kvs.get(_e(e))}},{key:"update",value:function(e,t){var n=t(this.get(e));n?this.set(e,n):this.delete(e)}},{key:"delete",value:function(e){this.kvs.delete(_e(e))}},{key:"map",value:function(e){return(0,c.Z)(this.kvs.entries()).map((function(t){var n=(0,ye.Z)(t,2),r=n[0],i=n[1],o=r.split(be);return e({key:o.map((function(e){var t=e.match(/^([^:]*):(.*)$/),n=(0,ye.Z)(t,3),r=n[1],i=n[2];return"number"===r?Number(i):i})),value:i})}))}},{key:"toJSON",value:function(){var e={};return this.map((function(t){var n=t.key,r=t.value;return e[n.join(".")]=r,null})),e}}]),e}();const xe=we;var Ee=["name"],Se=(0,d.Z)((function e(t){var n=this;(0,u.Z)(this,e),(0,g.Z)(this,"formHooked",!1),(0,g.Z)(this,"forceRootUpdate",void 0),(0,g.Z)(this,"subscribable",!0),(0,g.Z)(this,"store",{}),(0,g.Z)(this,"fieldEntities",[]),(0,g.Z)(this,"initialValues",{}),(0,g.Z)(this,"callbacks",{}),(0,g.Z)(this,"validateMessages",null),(0,g.Z)(this,"preserve",null),(0,g.Z)(this,"lastValidatePromise",null),(0,g.Z)(this,"getForm",(function(){return{getFieldValue:n.getFieldValue,getFieldsValue:n.getFieldsValue,getFieldError:n.getFieldError,getFieldWarning:n.getFieldWarning,getFieldsError:n.getFieldsError,isFieldsTouched:n.isFieldsTouched,isFieldTouched:n.isFieldTouched,isFieldValidating:n.isFieldValidating,isFieldsValidating:n.isFieldsValidating,resetFields:n.resetFields,setFields:n.setFields,setFieldValue:n.setFieldValue,setFieldsValue:n.setFieldsValue,validateFields:n.validateFields,submit:n.submit,_init:!0,getInternalHooks:n.getInternalHooks}})),(0,g.Z)(this,"getInternalHooks",(function(e){return e===y?(n.formHooked=!0,{dispatch:n.dispatch,initEntityValue:n.initEntityValue,registerField:n.registerField,useSubscribe:n.useSubscribe,setInitialValues:n.setInitialValues,destroyForm:n.destroyForm,setCallbacks:n.setCallbacks,setValidateMessages:n.setValidateMessages,getFields:n.getFields,setPreserve:n.setPreserve,getInitialValue:n.getInitialValue,registerWatch:n.registerWatch}):((0,A.ZP)(!1,"`getInternalHooks` is internal usage. Should not call directly."),null)})),(0,g.Z)(this,"useSubscribe",(function(e){n.subscribable=e})),(0,g.Z)(this,"prevWithoutPreserves",null),(0,g.Z)(this,"setInitialValues",(function(e,t){if(n.initialValues=e||{},t){var r,i=(0,X.T)(e,n.store);null===(r=n.prevWithoutPreserves)||void 0===r||r.map((function(t){var n=t.key;i=(0,X.Z)(i,n,(0,ae.Z)(e,n))})),n.prevWithoutPreserves=null,n.updateStore(i)}})),(0,g.Z)(this,"destroyForm",(function(){var e=new xe;n.getFieldEntities(!0).forEach((function(t){n.isMergedPreserve(t.isPreserve())||e.set(t.getNamePath(),!0)})),n.prevWithoutPreserves=e})),(0,g.Z)(this,"getInitialValue",(function(e){var t=(0,ae.Z)(n.initialValues,e);return e.length?(0,X.T)(t):t})),(0,g.Z)(this,"setCallbacks",(function(e){n.callbacks=e})),(0,g.Z)(this,"setValidateMessages",(function(e){n.validateMessages=e})),(0,g.Z)(this,"setPreserve",(function(e){n.preserve=e})),(0,g.Z)(this,"watchList",[]),(0,g.Z)(this,"registerWatch",(function(e){return n.watchList.push(e),function(){n.watchList=n.watchList.filter((function(t){return t!==e}))}})),(0,g.Z)(this,"notifyWatch",(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];if(n.watchList.length){var t=n.getFieldsValue(),r=n.getFieldsValue(!0);n.watchList.forEach((function(n){n(t,r,e)}))}})),(0,g.Z)(this,"timeoutId",null),(0,g.Z)(this,"warningUnhooked",(function(){0})),(0,g.Z)(this,"updateStore",(function(e){n.store=e})),(0,g.Z)(this,"getFieldEntities",(function(){return arguments.length>0&&void 0!==arguments[0]&&arguments[0]?n.fieldEntities.filter((function(e){return e.getNamePath().length})):n.fieldEntities})),(0,g.Z)(this,"getFieldsMap",(function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=new xe;return n.getFieldEntities(e).forEach((function(e){var n=e.getNamePath();t.set(n,e)})),t})),(0,g.Z)(this,"getFieldEntitiesForNamePathList",(function(e){if(!e)return n.getFieldEntities(!0);var t=n.getFieldsMap(!0);return e.map((function(e){var n=se(e);return t.get(n)||{INVALIDATE_NAME_PATH:se(e)}}))})),(0,g.Z)(this,"getFieldsValue",(function(e,t){var r,i,o;if(n.warningUnhooked(),!0===e||Array.isArray(e)?(r=e,i=t):e&&"object"===(0,oe.Z)(e)&&(o=e.strict,i=e.filter),!0===r&&!i)return n.store;var a=n.getFieldEntitiesForNamePathList(Array.isArray(r)?r:null),s=[];return a.forEach((function(e){var t,n,a,l,c="INVALIDATE_NAME_PATH"in e?e.INVALIDATE_NAME_PATH:e.getNamePath();if(o){if(null!==(a=(l=e).isList)&&void 0!==a&&a.call(l))return}else if(!r&&null!==(t=(n=e).isListField)&&void 0!==t&&t.call(n))return;if(i){var u="getMeta"in e?e.getMeta():null;i(u)&&s.push(c)}else s.push(c)})),le(n.store,s.map(se))})),(0,g.Z)(this,"getFieldValue",(function(e){n.warningUnhooked();var t=se(e);return(0,ae.Z)(n.store,t)})),(0,g.Z)(this,"getFieldsError",(function(e){return n.warningUnhooked(),n.getFieldEntitiesForNamePathList(e).map((function(t,n){return t&&!("INVALIDATE_NAME_PATH"in t)?{name:t.getNamePath(),errors:t.getErrors(),warnings:t.getWarnings()}:{name:se(e[n]),errors:[],warnings:[]}}))})),(0,g.Z)(this,"getFieldError",(function(e){n.warningUnhooked();var t=se(e);return n.getFieldsError([t])[0].errors})),(0,g.Z)(this,"getFieldWarning",(function(e){n.warningUnhooked();var t=se(e);return n.getFieldsError([t])[0].warnings})),(0,g.Z)(this,"isFieldsTouched",(function(){n.warningUnhooked();for(var e=arguments.length,t=new Array(e),r=0;r0&&void 0!==arguments[0]?arguments[0]:{},t=new xe,r=n.getFieldEntities(!0);r.forEach((function(e){var n=e.props.initialValue,r=e.getNamePath();if(void 0!==n){var i=t.get(r)||new Set;i.add({entity:e,value:n}),t.set(r,i)}}));var i;e.entities?i=e.entities:e.namePathList?(i=[],e.namePathList.forEach((function(e){var n,r=t.get(e);r&&(n=i).push.apply(n,(0,c.Z)((0,c.Z)(r).map((function(e){return e.entity}))))}))):i=r,i.forEach((function(r){if(void 0!==r.props.initialValue){var i=r.getNamePath();if(void 0!==n.getInitialValue(i))(0,A.ZP)(!1,"Form already set 'initialValues' with path '".concat(i.join("."),"'. Field can not overwrite it."));else{var o=t.get(i);if(o&&o.size>1)(0,A.ZP)(!1,"Multiple Field with path '".concat(i.join("."),"' set 'initialValue'. Can not decide which one to pick."));else if(o){var a=n.getFieldValue(i);r.isListField()||e.skipExist&&void 0!==a||n.updateStore((0,X.Z)(n.store,i,(0,c.Z)(o)[0].value))}}}}))})),(0,g.Z)(this,"resetFields",(function(e){n.warningUnhooked();var t=n.store;if(!e)return n.updateStore((0,X.T)(n.initialValues)),n.resetWithFieldInitialValue(),n.notifyObservers(t,null,{type:"reset"}),void n.notifyWatch();var r=e.map(se);r.forEach((function(e){var t=n.getInitialValue(e);n.updateStore((0,X.Z)(n.store,e,t))})),n.resetWithFieldInitialValue({namePathList:r}),n.notifyObservers(t,r,{type:"reset"}),n.notifyWatch(r)})),(0,g.Z)(this,"setFields",(function(e){n.warningUnhooked();var t=n.store,r=[];e.forEach((function(e){var i=e.name,a=(0,o.Z)(e,Ee),s=se(i);r.push(s),"value"in a&&n.updateStore((0,X.Z)(n.store,s,a.value)),n.notifyObservers(t,[s],{type:"setField",data:e})})),n.notifyWatch(r)})),(0,g.Z)(this,"getFields",(function(){return n.getFieldEntities(!0).map((function(e){var t=e.getNamePath(),r=e.getMeta(),i=(0,l.Z)((0,l.Z)({},r),{},{name:t,value:n.getFieldValue(t)});return Object.defineProperty(i,"originRCField",{value:!0}),i}))})),(0,g.Z)(this,"initEntityValue",(function(e){var t=e.props.initialValue;if(void 0!==t){var r=e.getNamePath();void 0===(0,ae.Z)(n.store,r)&&n.updateStore((0,X.Z)(n.store,r,t))}})),(0,g.Z)(this,"isMergedPreserve",(function(e){var t=void 0!==e?e:n.preserve;return null===t||void 0===t||t})),(0,g.Z)(this,"registerField",(function(e){n.fieldEntities.push(e);var t=e.getNamePath();if(n.notifyWatch([t]),void 0!==e.props.initialValue){var r=n.store;n.resetWithFieldInitialValue({entities:[e],skipExist:!0}),n.notifyObservers(r,[e.getNamePath()],{type:"valueUpdate",source:"internal"})}return function(r,i){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];if(n.fieldEntities=n.fieldEntities.filter((function(t){return t!==e})),!n.isMergedPreserve(i)&&(!r||o.length>1)){var a=r?void 0:n.getInitialValue(t);if(t.length&&n.getFieldValue(t)!==a&&n.fieldEntities.every((function(e){return!ue(e.getNamePath(),t)}))){var s=n.store;n.updateStore((0,X.Z)(s,t,a,!0)),n.notifyObservers(s,[t],{type:"remove"}),n.triggerDependenciesUpdate(s,t)}}n.notifyWatch([t])}})),(0,g.Z)(this,"dispatch",(function(e){switch(e.type){case"updateValue":var t=e.namePath,r=e.value;n.updateValue(t,r);break;case"validateField":var i=e.namePath,o=e.triggerName;n.validateFields([i],{triggerName:o})}})),(0,g.Z)(this,"notifyObservers",(function(e,t,r){if(n.subscribable){var i=(0,l.Z)((0,l.Z)({},r),{},{store:n.getFieldsValue(!0)});n.getFieldEntities().forEach((function(n){(0,n.onStoreChange)(e,t,i)}))}else n.forceRootUpdate()})),(0,g.Z)(this,"triggerDependenciesUpdate",(function(e,t){var r=n.getDependencyChildrenFields(t);return r.length&&n.validateFields(r),n.notifyObservers(e,r,{type:"dependenciesUpdate",relatedFields:[t].concat((0,c.Z)(r))}),r})),(0,g.Z)(this,"updateValue",(function(e,t){var r=se(e),i=n.store;n.updateStore((0,X.Z)(n.store,r,t)),n.notifyObservers(i,[r],{type:"valueUpdate",source:"internal"}),n.notifyWatch([r]);var o=n.triggerDependenciesUpdate(i,r),a=n.callbacks.onValuesChange;a&&a(le(n.store,[r]),n.getFieldsValue());n.triggerOnFieldsChange([r].concat((0,c.Z)(o)))})),(0,g.Z)(this,"setFieldsValue",(function(e){n.warningUnhooked();var t=n.store;if(e){var r=(0,X.T)(n.store,e);n.updateStore(r)}n.notifyObservers(t,null,{type:"valueUpdate",source:"external"}),n.notifyWatch()})),(0,g.Z)(this,"setFieldValue",(function(e,t){n.setFields([{name:e,value:t}])})),(0,g.Z)(this,"getDependencyChildrenFields",(function(e){var t=new Set,r=[],i=new xe;n.getFieldEntities().forEach((function(e){(e.props.dependencies||[]).forEach((function(t){var n=se(t);i.update(n,(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Set;return t.add(e),t}))}))}));return function e(n){(i.get(n)||new Set).forEach((function(n){if(!t.has(n)){t.add(n);var i=n.getNamePath();n.isFieldDirty()&&i.length&&(r.push(i),e(i))}}))}(e),r})),(0,g.Z)(this,"triggerOnFieldsChange",(function(e,t){var r=n.callbacks.onFieldsChange;if(r){var i=n.getFields();if(t){var o=new xe;t.forEach((function(e){var t=e.name,n=e.errors;o.set(t,n)})),i.forEach((function(e){e.errors=o.get(e.name)||e.errors}))}var a=i.filter((function(t){var n=t.name;return ce(e,n)}));a.length&&r(a,i)}})),(0,g.Z)(this,"validateFields",(function(e,t){var r,i;n.warningUnhooked(),Array.isArray(e)||"string"===typeof e||"string"===typeof t?(r=e,i=t):i=e;var o=!!r,a=o?r.map(se):[],s=[],u=String(Date.now()),d=new Set,f=i||{},h=f.recursive,p=f.dirty;n.getFieldEntities(!0).forEach((function(e){if(o||a.push(e.getNamePath()),e.props.rules&&e.props.rules.length&&(!p||e.isFieldDirty())){var t=e.getNamePath();if(d.add(t.join(u)),!o||ce(a,t,h)){var r=e.validateRules((0,l.Z)({validateMessages:(0,l.Z)((0,l.Z)({},Y),n.validateMessages)},i));s.push(r.then((function(){return{name:t,errors:[],warnings:[]}})).catch((function(e){var n,r=[],i=[];return null===(n=e.forEach)||void 0===n||n.call(e,(function(e){var t=e.rule.warningOnly,n=e.errors;t?i.push.apply(i,(0,c.Z)(n)):r.push.apply(r,(0,c.Z)(n))})),r.length?Promise.reject({name:t,errors:r,warnings:i}):{name:t,errors:r,warnings:i}})))}}}));var g=function(e){var t=!1,n=e.length,r=[];return e.length?new Promise((function(i,o){e.forEach((function(e,a){e.catch((function(e){return t=!0,e})).then((function(e){n-=1,r[a]=e,n>0||(t&&o(r),i(r))}))}))})):Promise.resolve([])}(s);n.lastValidatePromise=g,g.catch((function(e){return e})).then((function(e){var t=e.map((function(e){return e.name}));n.notifyObservers(n.store,t,{type:"validateFinish"}),n.triggerOnFieldsChange(t,e)}));var m=g.then((function(){return n.lastValidatePromise===g?Promise.resolve(n.getFieldsValue(a)):Promise.reject([])})).catch((function(e){var t=e.filter((function(e){return e&&e.errors.length}));return Promise.reject({values:n.getFieldsValue(a),errorFields:t,outOfDate:n.lastValidatePromise!==g})}));m.catch((function(e){return e}));var v=a.filter((function(e){return d.has(e.join(u))}));return n.triggerOnFieldsChange(v),m})),(0,g.Z)(this,"submit",(function(){n.warningUnhooked(),n.validateFields().then((function(e){var t=n.callbacks.onFinish;if(t)try{t(e)}catch(r){console.error(r)}})).catch((function(e){var t=n.callbacks.onFinishFailed;t&&t(e)}))})),this.forceRootUpdate=t}));const Ce=function(e){var t=r.useRef(),n=r.useState({}),i=(0,ye.Z)(n,2)[1];if(!t.current)if(e)t.current=e;else{var o=new Se((function(){i({})}));t.current=o.getForm()}return[t.current]};var Pe=r.createContext({triggerFormChange:function(){},triggerFormFinish:function(){},registerForm:function(){},unregisterForm:function(){}}),Te=function(e){var t=e.validateMessages,n=e.onFormChange,i=e.onFormFinish,o=e.children,a=r.useContext(Pe),s=r.useRef({});return r.createElement(Pe.Provider,{value:(0,l.Z)((0,l.Z)({},a),{},{validateMessages:(0,l.Z)((0,l.Z)({},a.validateMessages),t),triggerFormChange:function(e,t){n&&n(e,{changedFields:t,forms:s.current}),a.triggerFormChange(e,t)},triggerFormFinish:function(e,t){i&&i(e,{values:t,forms:s.current}),a.triggerFormFinish(e,t)},registerForm:function(e,t){e&&(s.current=(0,l.Z)((0,l.Z)({},s.current),{},(0,g.Z)({},e,t))),a.registerForm(e,t)},unregisterForm:function(e){var t=(0,l.Z)({},s.current);delete t[e],s.current=t,a.unregisterForm(e)}})},o)};const ke=Pe;var Me=["name","initialValues","fields","form","preserve","children","component","validateMessages","validateTrigger","onValuesChange","onFieldsChange","onFinish","onFinishFailed"];const Oe=function(e,t){var n=e.name,a=e.initialValues,s=e.fields,u=e.form,d=e.preserve,f=e.children,h=e.component,p=void 0===h?"form":h,g=e.validateMessages,m=e.validateTrigger,v=void 0===m?"onChange":m,A=e.onValuesChange,b=e.onFieldsChange,x=e.onFinish,E=e.onFinishFailed,S=(0,o.Z)(e,Me),C=r.useContext(ke),P=Ce(u),T=(0,ye.Z)(P,1)[0],k=T.getInternalHooks(y),M=k.useSubscribe,O=k.setInitialValues,R=k.setCallbacks,I=k.setValidateMessages,L=k.setPreserve,N=k.destroyForm;r.useImperativeHandle(t,(function(){return T})),r.useEffect((function(){return C.registerForm(n,T),function(){C.unregisterForm(n)}}),[C,T,n]),I((0,l.Z)((0,l.Z)({},C.validateMessages),g)),R({onValuesChange:A,onFieldsChange:function(e){if(C.triggerFormChange(n,e),b){for(var t=arguments.length,r=new Array(t>1?t-1:0),i=1;i{"use strict";n.d(t,{Z:()=>z});var r=n(91010),i=n(68185),o=n(69223),a=n(13747),s=n(99309),l=n(66375),c=n(1959);function u(){return"function"===typeof BigInt}function d(e){return!e&&0!==e&&!Number.isNaN(e)||!String(e).trim()}function f(e){var t=e.trim(),n=t.startsWith("-");n&&(t=t.slice(1)),(t=t.replace(/(\.\d*[^0])0*$/,"$1").replace(/\.0*$/,"").replace(/^0+/,"")).startsWith(".")&&(t="0".concat(t));var r=t||"0",i=r.split("."),o=i[0]||"0",a=i[1]||"0";"0"===o&&"0"===a&&(n=!1);var s=n?"-":"";return{negative:n,negativeStr:s,trimStr:r,integerStr:o,decimalStr:a,fullStr:"".concat(s).concat(r)}}function h(e){var t=String(e);return!Number.isNaN(Number(t))&&t.includes("e")}function p(e){var t=String(e);if(h(e)){var n=Number(t.slice(t.indexOf("e-")+2)),r=t.match(/\.(\d+)/);return null!==r&&void 0!==r&&r[1]&&(n+=r[1].length),n}return t.includes(".")&&m(t)?t.length-t.indexOf(".")-1:0}function g(e){var t=String(e);if(h(e)){if(e>Number.MAX_SAFE_INTEGER)return String(u()?BigInt(e).toString():Number.MAX_SAFE_INTEGER);if(e0&&void 0!==arguments[0])||arguments[0]?this.isInvalidate()?"":f("".concat(this.getMark()).concat(this.getIntegerStr(),".").concat(this.getDecimalStr())).fullStr:this.origin}}]),e}(),A=function(){function e(t){(0,l.Z)(this,e),(0,i.Z)(this,"origin",""),(0,i.Z)(this,"number",void 0),(0,i.Z)(this,"empty",void 0),d(t)?this.empty=!0:(this.origin=String(t),this.number=Number(t))}return(0,c.Z)(e,[{key:"negate",value:function(){return new e(-this.toNumber())}},{key:"add",value:function(t){if(this.isInvalidate())return new e(t);var n=Number(t);if(Number.isNaN(n))return this;var r=this.number+n;if(r>Number.MAX_SAFE_INTEGER)return new e(Number.MAX_SAFE_INTEGER);if(rNumber.MAX_SAFE_INTEGER)return new e(Number.MAX_SAFE_INTEGER);if(r0&&void 0!==arguments[0])||arguments[0]?this.isInvalidate()?"":g(this.number):this.origin}}]),e}();function y(e){return u()?new v(e):new A(e)}function b(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(""===e)return"";var i=f(e),o=i.negativeStr,a=i.integerStr,s=i.decimalStr,l="".concat(t).concat(s),c="".concat(o).concat(a);if(n>=0){var u=Number(s[n]);return u>=5&&!r?b(y(e).add("".concat(o,"0.").concat("0".repeat(n)).concat(10-u)).toString(),t,n,r):0===n?c:"".concat(c).concat(t).concat(s.padEnd(n,"0").slice(0,n))}return".0"===l?c:"".concat(c).concat(l)}const _=y;var w=n(12356),x=n.n(w),E=n(10099),S=n(12750),C=n(43903),P=n(57435),T=n(98162);var k=n(90479);const M=function(){var e=(0,P.useState)(!1),t=(0,a.Z)(e,2),n=t[0],r=t[1];return(0,S.Z)((function(){r((0,k.Z)())}),[]),n};var O=n(51882);function R(e){var t=e.prefixCls,n=e.upNode,o=e.downNode,a=e.upDisabled,s=e.downDisabled,l=e.onStep,c=P.useRef(),u=P.useRef([]),d=P.useRef();d.current=l;var f=function(){clearTimeout(c.current)},h=function(e,t){e.preventDefault(),f(),d.current(t),c.current=setTimeout((function e(){d.current(t),c.current=setTimeout(e,200)}),600)};if(P.useEffect((function(){return function(){f(),u.current.forEach((function(e){return O.Z.cancel(e)}))}}),[]),M())return null;var p="".concat(t,"-handler"),g=x()(p,"".concat(p,"-up"),(0,i.Z)({},"".concat(p,"-up-disabled"),a)),m=x()(p,"".concat(p,"-down"),(0,i.Z)({},"".concat(p,"-down-disabled"),s)),v=function(){return u.current.push((0,O.Z)(f))},A={unselectable:"on",role:"button",onMouseUp:v,onMouseLeave:v};return P.createElement("div",{className:"".concat(p,"-wrap")},P.createElement("span",(0,r.Z)({},A,{onMouseDown:function(e){h(e,!0)},"aria-label":"Increase Value","aria-disabled":a,className:g}),n||P.createElement("span",{unselectable:"on",className:"".concat(t,"-handler-up-inner")})),P.createElement("span",(0,r.Z)({},A,{onMouseDown:function(e){h(e,!1)},"aria-label":"Decrease Value","aria-disabled":s,className:m}),o||P.createElement("span",{unselectable:"on",className:"".concat(t,"-handler-down-inner")})))}function I(e){var t="number"===typeof e?g(e):f(e).fullStr;return t.includes(".")?f(t.replace(/(\d)\.(\d)/g,"$1$2.")).fullStr:e+"0"}var L=n(83146);var N=["prefixCls","className","style","min","max","step","defaultValue","value","disabled","readOnly","upHandler","downHandler","keyboard","changeOnWheel","controls","classNames","stringMode","parser","formatter","precision","decimalSeparator","onChange","onInput","onPressEnter","onStep","changeOnBlur"],D=["disabled","style","prefixCls","value","prefix","suffix","addonBefore","addonAfter","className","classNames"],F=function(e,t){return e||t.isEmpty()?t.toString():t.toNumber()},j=function(e){var t=_(e);return t.isInvalidate()?null:t},B=P.forwardRef((function(e,t){var n,l=e.prefixCls,c=void 0===l?"rc-input-number":l,u=e.className,d=e.style,f=e.min,h=e.max,v=e.step,A=void 0===v?1:v,y=e.defaultValue,w=e.value,E=e.disabled,k=e.readOnly,M=e.upHandler,L=e.downHandler,D=e.keyboard,B=e.changeOnWheel,Z=void 0!==B&&B,z=e.controls,U=void 0===z||z,H=(e.classNames,e.stringMode),V=e.parser,W=e.formatter,G=e.precision,K=e.decimalSeparator,q=e.onChange,Y=e.onInput,X=e.onPressEnter,$=e.onStep,Q=e.changeOnBlur,J=void 0===Q||Q,ee=(0,s.Z)(e,N),te="".concat(c,"-input"),ne=P.useRef(null),re=P.useState(!1),ie=(0,a.Z)(re,2),oe=ie[0],ae=ie[1],se=P.useRef(!1),le=P.useRef(!1),ce=P.useRef(!1),ue=P.useState((function(){return _(null!==w&&void 0!==w?w:y)})),de=(0,a.Z)(ue,2),fe=de[0],he=de[1];var pe=P.useCallback((function(e,t){if(!t)return G>=0?G:Math.max(p(e),p(A))}),[G,A]),ge=P.useCallback((function(e){var t=String(e);if(V)return V(t);var n=t;return K&&(n=n.replace(K,".")),n.replace(/[^\w.-]+/g,"")}),[V,K]),me=P.useRef(""),ve=P.useCallback((function(e,t){if(W)return W(e,{userTyping:t,input:String(me.current)});var n="number"===typeof e?g(e):e;if(!t){var r=pe(n,t);if(m(n)&&(K||r>=0))n=b(n,K||".",r)}return n}),[W,pe,K]),Ae=P.useState((function(){var e=null!==y&&void 0!==y?y:w;return fe.isInvalidate()&&["string","number"].includes((0,o.Z)(e))?Number.isNaN(e)?"":e:ve(fe.toString(),!1)})),ye=(0,a.Z)(Ae,2),be=ye[0],_e=ye[1];function we(e,t){_e(ve(e.isInvalidate()?e.toString(!1):e.toString(!t),t))}me.current=be;var xe=P.useMemo((function(){return j(h)}),[h,G]),Ee=P.useMemo((function(){return j(f)}),[f,G]),Se=P.useMemo((function(){return!(!xe||!fe||fe.isInvalidate())&&xe.lessEquals(fe)}),[xe,fe]),Ce=P.useMemo((function(){return!(!Ee||!fe||fe.isInvalidate())&&fe.lessEquals(Ee)}),[Ee,fe]),Pe=function(e,t){var n=(0,P.useRef)(null);return[function(){try{var t=e.selectionStart,r=e.selectionEnd,i=e.value,o=i.substring(0,t),a=i.substring(r);n.current={start:t,end:r,value:i,beforeTxt:o,afterTxt:a}}catch(s){}},function(){if(e&&n.current&&t)try{var r=e.value,i=n.current,o=i.beforeTxt,a=i.afterTxt,s=i.start,l=r.length;if(r.endsWith(a))l=r.length-n.current.afterTxt.length;else if(r.startsWith(o))l=o.length;else{var c=o[s-1],u=r.indexOf(c,s-1);-1!==u&&(l=u+1)}e.setSelectionRange(l,l)}catch(d){(0,T.ZP)(!1,"Something warning of cursor restore. Please fire issue about this: ".concat(d.message))}}]}(ne.current,oe),Te=(0,a.Z)(Pe,2),ke=Te[0],Me=Te[1],Oe=function(e){return xe&&!e.lessEquals(xe)?xe:Ee&&!Ee.lessEquals(e)?Ee:null},Re=function(e){return!Oe(e)},Ie=function(e,t){var n,r=e,i=Re(r)||r.isEmpty();if(r.isEmpty()||t||(r=Oe(r)||r,i=!0),!k&&!E&&i){var o=r.toString(),a=pe(o,t);return a>=0&&(r=_(b(o,".",a)),Re(r)||(r=_(b(o,".",a,!0)))),r.equals(fe)||(n=r,void 0===w&&he(n),null===q||void 0===q||q(r.isEmpty()?null:F(H,r)),void 0===w&&we(r,t)),r}return fe},Le=function(){var e=(0,P.useRef)(0),t=function(){O.Z.cancel(e.current)};return(0,P.useEffect)((function(){return t}),[]),function(n){t(),e.current=(0,O.Z)((function(){n()}))}}(),Ne=function e(t){if(ke(),me.current=t,_e(t),!le.current){var n=ge(t),r=_(n);r.isNaN()||Ie(r,!0)}null===Y||void 0===Y||Y(t),Le((function(){var n=t;V||(n=t.replace(/\u3002/g,".")),n!==t&&e(n)}))},De=function(e){var t;if(!(e&&Se||!e&&Ce)){se.current=!1;var n=_(ce.current?I(A):A);e||(n=n.negate());var r=(fe||_(0)).add(n.toString()),i=Ie(r,!1);null===$||void 0===$||$(F(H,i),{offset:ce.current?I(A):A,type:e?"up":"down"}),null===(t=ne.current)||void 0===t||t.focus()}},Fe=function(e){var t=_(ge(be)),n=t;n=t.isNaN()?Ie(fe,e):Ie(t,e),void 0!==w?we(fe,!1):n.isNaN()||we(n,!1)};P.useEffect((function(){if(Z&&oe){var e=function(e){De(e.deltaY<0),e.preventDefault()},t=ne.current;if(t)return t.addEventListener("wheel",e,{passive:!1}),function(){return t.removeEventListener("wheel",e)}}}));return(0,S.o)((function(){fe.isInvalidate()||we(fe,!1)}),[G,W]),(0,S.o)((function(){var e=_(w);he(e);var t=_(ge(be));e.equals(t)&&se.current&&!W||we(e,se.current)}),[w]),(0,S.o)((function(){W&&Me()}),[be]),P.createElement("div",{className:x()(c,u,(n={},(0,i.Z)(n,"".concat(c,"-focused"),oe),(0,i.Z)(n,"".concat(c,"-disabled"),E),(0,i.Z)(n,"".concat(c,"-readonly"),k),(0,i.Z)(n,"".concat(c,"-not-a-number"),fe.isNaN()),(0,i.Z)(n,"".concat(c,"-out-of-range"),!fe.isInvalidate()&&!Re(fe)),n)),style:d,onFocus:function(){ae(!0)},onBlur:function(){J&&Fe(!1),ae(!1),se.current=!1},onKeyDown:function(e){var t=e.key,n=e.shiftKey;se.current=!0,ce.current=n,"Enter"===t&&(le.current||(se.current=!1),Fe(!1),null===X||void 0===X||X(e)),!1!==D&&!le.current&&["Up","ArrowUp","Down","ArrowDown"].includes(t)&&(De("Up"===t||"ArrowUp"===t),e.preventDefault())},onKeyUp:function(){se.current=!1,ce.current=!1},onCompositionStart:function(){le.current=!0},onCompositionEnd:function(){le.current=!1,Ne(ne.current.value)},onBeforeInput:function(){se.current=!0}},U&&P.createElement(R,{prefixCls:c,upNode:M,downNode:L,upDisabled:Se,downDisabled:Ce,onStep:De}),P.createElement("div",{className:"".concat(te,"-wrap")},P.createElement("input",(0,r.Z)({autoComplete:"off",role:"spinbutton","aria-valuemin":f,"aria-valuemax":h,"aria-valuenow":fe.isInvalidate()?null:fe.toString(),step:A},ee,{ref:(0,C.sQ)(ne,t),className:te,value:be,onChange:function(e){Ne(e.target.value)},disabled:E,readOnly:k}))))})),Z=P.forwardRef((function(e,t){var n=e.disabled,i=e.style,o=e.prefixCls,a=e.value,l=e.prefix,c=e.suffix,u=e.addonBefore,d=e.addonAfter,f=e.className,h=e.classNames,p=(0,s.Z)(e,D),g=P.useRef(null);return P.createElement(E.Q,{className:f,triggerFocus:function(e){g.current&&(0,L.nH)(g.current,e)},prefixCls:o,value:a,disabled:n,style:i,prefix:l,suffix:c,addonAfter:d,addonBefore:u,classNames:h,components:{affixWrapper:"div",groupWrapper:"div",wrapper:"div",groupAddon:"div"}},P.createElement(B,(0,r.Z)({prefixCls:o,disabled:n,ref:(0,C.sQ)(g,t),className:null===h||void 0===h?void 0:h.input},p)))}));Z.displayName="InputNumber";const z=Z},36426:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(99309),i=n(35194),o=n(69223),a=n(57435),s=["show"];function l(e,t){return a.useMemo((function(){var n={};t&&(n.show="object"===(0,o.Z)(t)&&t.formatter?t.formatter:!!t);var a=n=(0,i.Z)((0,i.Z)({},n),e),l=a.show,c=(0,r.Z)(a,s);return(0,i.Z)((0,i.Z)({},c),{},{show:!!l,showFormatter:"function"===typeof l?l:void 0,strategy:c.strategy||function(e){return e.length}})}),[e,t])}},10099:(e,t,n)=>{"use strict";n.d(t,{Q:()=>d,Z:()=>y});var r=n(35194),i=n(91010),o=n(68185),a=n(69223),s=n(12356),l=n.n(s),c=n(57435),u=n(83146);const d=function(e){var t,n,s=e.inputElement,d=e.children,f=e.prefixCls,h=e.prefix,p=e.suffix,g=e.addonBefore,m=e.addonAfter,v=e.className,A=e.style,y=e.disabled,b=e.readOnly,_=e.focused,w=e.triggerFocus,x=e.allowClear,E=e.value,S=e.handleReset,C=e.hidden,P=e.classes,T=e.classNames,k=e.dataAttrs,M=e.styles,O=e.components,R=null!==d&&void 0!==d?d:s,I=(null===O||void 0===O?void 0:O.affixWrapper)||"span",L=(null===O||void 0===O?void 0:O.groupWrapper)||"span",N=(null===O||void 0===O?void 0:O.wrapper)||"span",D=(null===O||void 0===O?void 0:O.groupAddon)||"span",F=(0,c.useRef)(null),j=(0,u.X3)(e),B=(0,c.cloneElement)(R,{value:E,className:l()(R.props.className,!j&&(null===T||void 0===T?void 0:T.variant))||null});if(j){var Z,z=null;if(x){var U,H=!y&&!b&&E,V="".concat(f,"-clear-icon"),W="object"===(0,a.Z)(x)&&null!==x&&void 0!==x&&x.clearIcon?x.clearIcon:"\u2716";z=c.createElement("span",{onClick:S,onMouseDown:function(e){return e.preventDefault()},className:l()(V,(U={},(0,o.Z)(U,"".concat(V,"-hidden"),!H),(0,o.Z)(U,"".concat(V,"-has-suffix"),!!p),U)),role:"button",tabIndex:-1},W)}var G="".concat(f,"-affix-wrapper"),K=l()(G,(Z={},(0,o.Z)(Z,"".concat(f,"-disabled"),y),(0,o.Z)(Z,"".concat(G,"-disabled"),y),(0,o.Z)(Z,"".concat(G,"-focused"),_),(0,o.Z)(Z,"".concat(G,"-readonly"),b),(0,o.Z)(Z,"".concat(G,"-input-with-clear-btn"),p&&x&&E),Z),null===P||void 0===P?void 0:P.affixWrapper,null===T||void 0===T?void 0:T.affixWrapper,null===T||void 0===T?void 0:T.variant),q=(p||x)&&c.createElement("span",{className:l()("".concat(f,"-suffix"),null===T||void 0===T?void 0:T.suffix),style:null===M||void 0===M?void 0:M.suffix},z,p);B=c.createElement(I,(0,i.Z)({className:K,style:null===M||void 0===M?void 0:M.affixWrapper,onClick:function(e){var t;null!==(t=F.current)&&void 0!==t&&t.contains(e.target)&&(null===w||void 0===w||w())}},null===k||void 0===k?void 0:k.affixWrapper,{ref:F}),h&&c.createElement("span",{className:l()("".concat(f,"-prefix"),null===T||void 0===T?void 0:T.prefix),style:null===M||void 0===M?void 0:M.prefix},h),B,q)}if((0,u.He)(e)){var Y="".concat(f,"-group"),X="".concat(Y,"-addon"),$="".concat(Y,"-wrapper"),Q=l()("".concat(f,"-wrapper"),Y,null===P||void 0===P?void 0:P.wrapper,null===T||void 0===T?void 0:T.wrapper),J=l()($,(0,o.Z)({},"".concat($,"-disabled"),y),null===P||void 0===P?void 0:P.group,null===T||void 0===T?void 0:T.groupWrapper);B=c.createElement(L,{className:J},c.createElement(N,{className:Q},g&&c.createElement(D,{className:X},g),B,m&&c.createElement(D,{className:X},m)))}return c.cloneElement(B,{className:l()(null===(t=B.props)||void 0===t?void 0:t.className,v)||null,style:(0,r.Z)((0,r.Z)({},null===(n=B.props)||void 0===n?void 0:n.style),A),hidden:C})};var f=n(22368),h=n(13747),p=n(99309),g=n(88258),m=n(43488),v=n(36426),A=["autoComplete","onChange","onFocus","onBlur","onPressEnter","onKeyDown","prefixCls","disabled","htmlSize","className","maxLength","suffix","showCount","count","type","classes","classNames","styles","onCompositionStart","onCompositionEnd"];const y=(0,c.forwardRef)((function(e,t){var n=e.autoComplete,a=e.onChange,s=e.onFocus,y=e.onBlur,b=e.onPressEnter,_=e.onKeyDown,w=e.prefixCls,x=void 0===w?"rc-input":w,E=e.disabled,S=e.htmlSize,C=e.className,P=e.maxLength,T=e.suffix,k=e.showCount,M=e.count,O=e.type,R=void 0===O?"text":O,I=e.classes,L=e.classNames,N=e.styles,D=e.onCompositionStart,F=e.onCompositionEnd,j=(0,p.Z)(e,A),B=(0,c.useState)(!1),Z=(0,h.Z)(B,2),z=Z[0],U=Z[1],H=(0,c.useRef)(!1),V=(0,c.useRef)(null),W=function(e){V.current&&(0,u.nH)(V.current,e)},G=(0,g.Z)(e.defaultValue,{value:e.value}),K=(0,h.Z)(G,2),q=K[0],Y=K[1],X=void 0===q||null===q?"":String(q),$=(0,c.useState)(null),Q=(0,h.Z)($,2),J=Q[0],ee=Q[1],te=(0,v.Z)(M,k),ne=te.max||P,re=te.strategy(X),ie=!!ne&&re>ne;(0,c.useImperativeHandle)(t,(function(){return{focus:W,blur:function(){var e;null===(e=V.current)||void 0===e||e.blur()},setSelectionRange:function(e,t,n){var r;null===(r=V.current)||void 0===r||r.setSelectionRange(e,t,n)},select:function(){var e;null===(e=V.current)||void 0===e||e.select()},input:V.current}})),(0,c.useEffect)((function(){U((function(e){return(!e||!E)&&e}))}),[E]);var oe=function(e,t,n){var r,i,o=t;if(!H.current&&te.exceedFormatter&&te.max&&te.strategy(t)>te.max)t!==(o=te.exceedFormatter(t,{max:te.max}))&&ee([(null===(r=V.current)||void 0===r?void 0:r.selectionStart)||0,(null===(i=V.current)||void 0===i?void 0:i.selectionEnd)||0]);else if("compositionEnd"===n.source)return;Y(o),V.current&&(0,u.rJ)(V.current,e,a,o)};(0,c.useEffect)((function(){var e;J&&(null===(e=V.current)||void 0===e||e.setSelectionRange.apply(e,(0,f.Z)(J)))}),[J]);var ae=function(e){oe(e,e.target.value,{source:"change"})},se=function(e){H.current=!1,oe(e,e.currentTarget.value,{source:"compositionEnd"}),null===F||void 0===F||F(e)},le=function(e){b&&"Enter"===e.key&&b(e),null===_||void 0===_||_(e)},ce=function(e){U(!0),null===s||void 0===s||s(e)},ue=function(e){U(!1),null===y||void 0===y||y(e)},de=ie&&"".concat(x,"-out-of-range");return c.createElement(d,(0,i.Z)({},j,{prefixCls:x,className:l()(C,de),handleReset:function(e){Y(""),W(),V.current&&(0,u.rJ)(V.current,e,a)},value:X,focused:z,triggerFocus:W,suffix:function(){var e=Number(ne)>0;if(T||te.show){var t=te.showFormatter?te.showFormatter({value:X,count:re,maxLength:ne}):"".concat(re).concat(e?" / ".concat(ne):"");return c.createElement(c.Fragment,null,te.show&&c.createElement("span",{className:l()("".concat(x,"-show-count-suffix"),(0,o.Z)({},"".concat(x,"-show-count-has-suffix"),!!T),null===L||void 0===L?void 0:L.count),style:(0,r.Z)({},null===N||void 0===N?void 0:N.count)},t),T)}return null}(),disabled:E,classes:I,classNames:L,styles:N}),function(){var t=(0,m.Z)(e,["prefixCls","onPressEnter","addonBefore","addonAfter","prefix","suffix","allowClear","defaultValue","showCount","count","classes","htmlSize","styles","classNames"]);return c.createElement("input",(0,i.Z)({autoComplete:n},t,{onChange:ae,onFocus:ce,onBlur:ue,onKeyDown:le,className:l()(x,(0,o.Z)({},"".concat(x,"-disabled"),E),null===L||void 0===L?void 0:L.input),style:null===N||void 0===N?void 0:N.input,ref:V,size:S,type:R,onCompositionStart:function(e){H.current=!0,null===D||void 0===D||D(e)},onCompositionEnd:se}))}())}))},83146:(e,t,n)=>{"use strict";function r(e){return!(!e.addonBefore&&!e.addonAfter)}function i(e){return!!(e.prefix||e.suffix||e.allowClear)}function o(e,t,n){var r=t.cloneNode(!0),i=Object.create(e,{target:{value:r},currentTarget:{value:r}});return r.value=n,"number"===typeof t.selectionStart&&"number"===typeof t.selectionEnd&&(r.selectionStart=t.selectionStart,r.selectionEnd=t.selectionEnd),i}function a(e,t,n,r){if(n){var i=t;"click"!==t.type?"file"===e.type||void 0===r?n(i):n(i=o(t,e,r)):n(i=o(t,e,""))}}function s(e,t){if(e){e.focus(t);var n=(t||{}).cursor;if(n){var r=e.value.length;switch(n){case"start":e.setSelectionRange(0,0);break;case"end":e.setSelectionRange(r,r);break;default:e.setSelectionRange(0,r)}}}}n.d(t,{He:()=>r,X3:()=>i,nH:()=>s,rJ:()=>a})},99158:(e,t,n)=>{"use strict";n.d(t,{iz:()=>Ve,ck:()=>ye,BW:()=>He,sN:()=>ye,Wd:()=>je,ZP:()=>$e,Xl:()=>T});var r=n(91010),i=n(68185),o=n(35194),a=n(22368),s=n(13747),l=n(99309),c=n(12356),u=n.n(c),d=n(55752),f=n(88258),h=n(46032),p=n(98162),g=n(57435),m=n(33882),v=g.createContext(null);function A(e,t){return void 0===e?null:"".concat(e,"-").concat(t)}function y(e){return A(g.useContext(v),e)}var b=n(22121),_=["children","locked"],w=g.createContext(null);function x(e){var t=e.children,n=e.locked,r=(0,l.Z)(e,_),i=g.useContext(w),a=(0,b.Z)((function(){return function(e,t){var n=(0,o.Z)({},e);return Object.keys(t).forEach((function(e){var r=t[e];void 0!==r&&(n[e]=r)})),n}(i,r)}),[i,r],(function(e,t){return!n&&(e[0]!==t[0]||!(0,h.Z)(e[1],t[1],!0))}));return g.createElement(w.Provider,{value:a},t)}var E=[],S=g.createContext(null);function C(){return g.useContext(S)}var P=g.createContext(E);function T(e){var t=g.useContext(P);return g.useMemo((function(){return void 0!==e?[].concat((0,a.Z)(t),[e]):t}),[t,e])}var k=g.createContext(null);const M=g.createContext({});var O=n(26842);function R(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if((0,O.Z)(e)){var n=e.nodeName.toLowerCase(),r=["input","select","textarea","button"].includes(n)||e.isContentEditable||"a"===n&&!!e.getAttribute("href"),i=e.getAttribute("tabindex"),o=Number(i),a=null;return i&&!Number.isNaN(o)?a=o:r&&null===a&&(a=0),r&&e.disabled&&(a=null),null!==a&&(a>=0||t&&a<0)}return!1}function I(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=(0,a.Z)(e.querySelectorAll("*")).filter((function(e){return R(e,t)}));return R(e,t)&&n.unshift(e),n}var L=n(98475),N=n(51882),D=L.Z.LEFT,F=L.Z.RIGHT,j=L.Z.UP,B=L.Z.DOWN,Z=L.Z.ENTER,z=L.Z.ESC,U=L.Z.HOME,H=L.Z.END,V=[j,B,D,F];function W(e,t){return I(e,!0).filter((function(e){return t.has(e)}))}function G(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;if(!e)return null;var i=W(e,t),o=i.length,a=i.findIndex((function(e){return n===e}));return r<0?-1===a?a=o-1:a-=1:r>0&&(a+=1),i[a=(a+o)%o]}var K=function(e,t){var n=new Set,r=new Map,i=new Map;return e.forEach((function(e){var o=document.querySelector("[data-menu-id='".concat(A(t,e),"']"));o&&(n.add(o),i.set(o,e),r.set(e,o))})),{elements:n,key2element:r,element2key:i}};function q(e,t,n,r,o,a,s,l,c,u){var d=g.useRef(),f=g.useRef();f.current=t;var h=function(){N.Z.cancel(d.current)};return g.useEffect((function(){return function(){h()}}),[]),function(p){var g=p.which;if([].concat(V,[Z,z,U,H]).includes(g)){var m=a(),v=K(m,r),A=v,y=A.elements,b=A.key2element,_=A.element2key,w=function(e,t){for(var n=e||document.activeElement;n;){if(t.has(n))return n;n=n.parentElement}return null}(b.get(t),y),x=_.get(w),E=function(e,t,n,r){var o,a="prev",s="next",l="children",c="parent";if("inline"===e&&r===Z)return{inlineTrigger:!0};var u=(0,i.Z)((0,i.Z)({},j,a),B,s),d=(0,i.Z)((0,i.Z)((0,i.Z)((0,i.Z)({},D,n?s:a),F,n?a:s),B,l),Z,l),f=(0,i.Z)((0,i.Z)((0,i.Z)((0,i.Z)((0,i.Z)((0,i.Z)({},j,a),B,s),Z,l),z,c),D,n?l:c),F,n?c:l);switch(null===(o={inline:u,horizontal:d,vertical:f,inlineSub:u,horizontalSub:f,verticalSub:f}["".concat(e).concat(t?"":"Sub")])||void 0===o?void 0:o[r]){case a:return{offset:-1,sibling:!0};case s:return{offset:1,sibling:!0};case c:return{offset:-1,sibling:!1};case l:return{offset:1,sibling:!1};default:return null}}(e,1===s(x,!0).length,n,g);if(!E&&g!==U&&g!==H)return;(V.includes(g)||[U,H].includes(g))&&p.preventDefault();var S=function(e){if(e){var t=e,n=e.querySelector("a");null!==n&&void 0!==n&&n.getAttribute("href")&&(t=n);var r=_.get(e);l(r),h(),d.current=(0,N.Z)((function(){f.current===r&&t.focus()}))}};if([U,H].includes(g)||E.sibling||!w){var C,P,T=W(C=w&&"inline"!==e?function(e){for(var t=e;t;){if(t.getAttribute("data-menu-list"))return t;t=t.parentElement}return null}(w):o.current,y);P=g===U?T[0]:g===H?T[T.length-1]:G(C,y,w,E.offset),S(P)}else if(E.inlineTrigger)c(x);else if(E.offset>0)c(x,!0),h(),d.current=(0,N.Z)((function(){v=K(m,r);var e=w.getAttribute("aria-controls"),t=G(document.getElementById(e),v.elements);S(t)}),5);else if(E.offset<0){var k=s(x,!0),M=k[k.length-2],O=b.get(M);c(M,!1),S(O)}}null===u||void 0===u||u(p)}}var Y="__RC_UTIL_PATH_SPLIT__",X=function(e){return e.join(Y)},$="rc-menu-more";function Q(){var e=g.useState({}),t=(0,s.Z)(e,2)[1],n=(0,g.useRef)(new Map),r=(0,g.useRef)(new Map),i=g.useState([]),o=(0,s.Z)(i,2),l=o[0],c=o[1],u=(0,g.useRef)(0),d=(0,g.useRef)(!1),f=(0,g.useCallback)((function(e,i){var o=X(i);r.current.set(o,e),n.current.set(e,o),u.current+=1;var a,s=u.current;a=function(){s===u.current&&(d.current||t({}))},Promise.resolve().then(a)}),[]),h=(0,g.useCallback)((function(e,t){var i=X(t);r.current.delete(i),n.current.delete(e)}),[]),p=(0,g.useCallback)((function(e){c(e)}),[]),m=(0,g.useCallback)((function(e,t){var r=n.current.get(e)||"",i=r.split(Y);return t&&l.includes(i[0])&&i.unshift($),i}),[l]),v=(0,g.useCallback)((function(e,t){return e.some((function(e){return m(e,!0).includes(t)}))}),[m]),A=(0,g.useCallback)((function(e){var t="".concat(n.current.get(e)).concat(Y),i=new Set;return(0,a.Z)(r.current.keys()).forEach((function(e){e.startsWith(t)&&i.add(r.current.get(e))})),i}),[]);return g.useEffect((function(){return function(){d.current=!0}}),[]),{registerPath:f,unregisterPath:h,refreshOverflowKeys:p,isSubPathKey:v,getKeyPath:m,getKeys:function(){var e=(0,a.Z)(n.current.keys());return l.length&&e.push($),e},getSubPathKeys:A}}function J(e){var t=g.useRef(e);t.current=e;var n=g.useCallback((function(){for(var e,n=arguments.length,r=new Array(n),i=0;i1&&(E.motionAppear=!1);var S=E.onVisibleChanged;return E.onVisibleChanged=function(e){return m.current||e||b(!0),null===S||void 0===S?void 0:S(e)},y?null:g.createElement(x,{mode:l,locked:!m.current},g.createElement(Ie.ZP,(0,r.Z)({visible:_},E,{forceRender:d,removeOnLeave:!1,leavedClassName:"".concat(u,"-hidden")}),(function(e){var n=e.className,r=e.style;return g.createElement(xe,{id:t,className:n,style:r},a)})))}var Ne=["style","className","title","eventKey","warnKey","disabled","internalPopupClose","children","itemIcon","expandIcon","popupClassName","popupOffset","popupStyle","onClick","onMouseEnter","onMouseLeave","onTitleClick","onTitleMouseEnter","onTitleMouseLeave"],De=["active"],Fe=function(e){var t=e.style,n=e.className,a=e.title,c=e.eventKey,f=(e.warnKey,e.disabled),h=e.internalPopupClose,p=e.children,m=e.itemIcon,v=e.expandIcon,A=e.popupClassName,b=e.popupOffset,_=e.popupStyle,E=e.onClick,S=e.onMouseEnter,C=e.onMouseLeave,P=e.onTitleClick,O=e.onTitleMouseEnter,R=e.onTitleMouseLeave,I=(0,l.Z)(e,Ne),L=y(c),N=g.useContext(w),D=N.prefixCls,F=N.mode,j=N.openKeys,B=N.disabled,Z=N.overflowDisabled,z=N.activeKey,U=N.selectedKeys,H=N.itemIcon,V=N.expandIcon,W=N.onItemClick,G=N.onOpenChange,K=N.onActive,q=g.useContext(M)._internalRenderSubMenuItem,Y=g.useContext(k).isSubPathKey,X=T(),$="".concat(D,"-submenu"),Q=B||f,ee=g.useRef(),te=g.useRef();var ne=null!==m&&void 0!==m?m:H,re=null!==v&&void 0!==v?v:V,ie=j.includes(c),oe=!Z&&ie,ae=Y(U,c),se=le(c,Q,O,R),de=se.active,he=(0,l.Z)(se,De),pe=g.useState(!1),ge=(0,s.Z)(pe,2),me=ge[0],ve=ge[1],Ae=function(e){Q||ve(e)},ye=g.useMemo((function(){return de||"inline"!==F&&(me||Y([z],c))}),[F,de,z,me,c,Y]),be=ce(X.length),_e=J((function(e){null===E||void 0===E||E(fe(e)),W(e)})),we=L&&"".concat(L,"-popup"),Ee=g.createElement("div",(0,r.Z)({role:"menuitem",style:be,className:"".concat($,"-title"),tabIndex:Q?null:-1,ref:ee,title:"string"===typeof a?a:null,"data-menu-id":Z&&L?null:L,"aria-expanded":oe,"aria-haspopup":!0,"aria-controls":we,"aria-disabled":Q,onClick:function(e){Q||(null===P||void 0===P||P({key:c,domEvent:e}),"inline"===F&&G(c,!ie))},onFocus:function(){K(c)}},he),a,g.createElement(ue,{icon:"horizontal"!==F?re:void 0,props:(0,o.Z)((0,o.Z)({},e),{},{isOpen:oe,isSubMenu:!0})},g.createElement("i",{className:"".concat($,"-arrow")}))),Se=g.useRef(F);if("inline"!==F&&X.length>1?Se.current="vertical":Se.current=F,!Z){var Ce=Se.current;Ee=g.createElement(Re,{mode:Ce,prefixCls:$,visible:!h&&oe&&"inline"!==F,popupClassName:A,popupOffset:b,popupStyle:_,popup:g.createElement(x,{mode:"horizontal"===Ce?"vertical":Ce},g.createElement(xe,{id:we,ref:te},p)),disabled:Q,onVisibleChange:function(e){"inline"!==F&&G(c,e)}},Ee)}var Pe=g.createElement(d.Z.Item,(0,r.Z)({role:"none"},I,{component:"li",style:t,className:u()($,"".concat($,"-").concat(F),n,(0,i.Z)((0,i.Z)((0,i.Z)((0,i.Z)({},"".concat($,"-open"),oe),"".concat($,"-active"),ye),"".concat($,"-selected"),ae),"".concat($,"-disabled"),Q)),onMouseEnter:function(e){Ae(!0),null===S||void 0===S||S({key:c,domEvent:e})},onMouseLeave:function(e){Ae(!1),null===C||void 0===C||C({key:c,domEvent:e})}}),Ee,!Z&&g.createElement(Le,{id:we,open:oe,keyPath:X},p));return q&&(Pe=q(Pe,e,{selected:ae,active:ye,open:oe,disabled:Q})),g.createElement(x,{onItemClick:_e,mode:"horizontal"===F?"vertical":F,itemIcon:ne,expandIcon:re},Pe)};function je(e){var t,n=e.eventKey,r=e.children,i=T(n),o=Se(r,i),a=C();return g.useEffect((function(){if(a)return a.registerPath(n,i),function(){a.unregisterPath(n,i)}}),[i]),t=a?o:g.createElement(Fe,e,o),g.createElement(P.Provider,{value:i},t)}var Be=n(69223),Ze=["className","title","eventKey","children"],ze=["children"],Ue=function(e){var t=e.className,n=e.title,i=(e.eventKey,e.children),o=(0,l.Z)(e,Ze),a=g.useContext(w).prefixCls,s="".concat(a,"-item-group");return g.createElement("li",(0,r.Z)({role:"presentation"},o,{onClick:function(e){return e.stopPropagation()},className:u()(s,t)}),g.createElement("div",{role:"presentation",className:"".concat(s,"-title"),title:"string"===typeof n?n:void 0},n),g.createElement("ul",{role:"group",className:"".concat(s,"-list")},i))};function He(e){var t=e.children,n=(0,l.Z)(e,ze),r=Se(t,T(n.eventKey));return C()?r:g.createElement(Ue,(0,ae.Z)(n,["warnKey"]),r)}function Ve(e){var t=e.className,n=e.style,r=g.useContext(w).prefixCls;return C()?null:g.createElement("li",{role:"separator",className:u()("".concat(r,"-item-divider"),t),style:n})}var We=["label","children","key","type"];function Ge(e){return(e||[]).map((function(e,t){if(e&&"object"===(0,Be.Z)(e)){var n=e,i=n.label,o=n.children,a=n.key,s=n.type,c=(0,l.Z)(n,We),u=null!==a&&void 0!==a?a:"tmp-".concat(t);return o||"group"===s?"group"===s?g.createElement(He,(0,r.Z)({key:u},c,{title:i}),Ge(o)):g.createElement(je,(0,r.Z)({key:u},c,{title:i}),Ge(o)):"divider"===s?g.createElement(Ve,(0,r.Z)({key:u},c)):g.createElement(ye,(0,r.Z)({key:u},c),i)}return null})).filter((function(e){return e}))}function Ke(e,t,n){var r=e;return t&&(r=Ge(t)),Se(r,n)}var qe=["prefixCls","rootClassName","style","className","tabIndex","items","children","direction","id","mode","inlineCollapsed","disabled","disabledOverflow","subMenuOpenDelay","subMenuCloseDelay","forceSubMenuRender","defaultOpenKeys","openKeys","activeKey","defaultActiveFirst","selectable","multiple","defaultSelectedKeys","selectedKeys","onSelect","onDeselect","inlineIndent","motion","defaultMotions","triggerSubMenuAction","builtinPlacements","itemIcon","expandIcon","overflowedIndicator","overflowedIndicatorPopupClassName","getPopupContainer","onClick","onOpenChange","onKeyDown","openAnimation","openTransitionName","_internalRenderMenuItem","_internalRenderSubMenuItem"],Ye=[];var Xe=g.forwardRef((function(e,t){var n,c=e,p=c.prefixCls,A=void 0===p?"rc-menu":p,y=c.rootClassName,b=c.style,_=c.className,w=c.tabIndex,E=void 0===w?0:w,C=c.items,P=c.children,T=c.direction,O=c.id,R=c.mode,I=void 0===R?"vertical":R,L=c.inlineCollapsed,N=c.disabled,D=c.disabledOverflow,F=c.subMenuOpenDelay,j=void 0===F?.1:F,B=c.subMenuCloseDelay,Z=void 0===B?.1:B,z=c.forceSubMenuRender,U=c.defaultOpenKeys,H=c.openKeys,V=c.activeKey,G=c.defaultActiveFirst,Y=c.selectable,X=void 0===Y||Y,ne=c.multiple,re=void 0!==ne&&ne,ie=c.defaultSelectedKeys,oe=c.selectedKeys,ae=c.onSelect,se=c.onDeselect,le=c.inlineIndent,ce=void 0===le?24:le,ue=c.motion,de=c.defaultMotions,he=c.triggerSubMenuAction,pe=void 0===he?"hover":he,ge=c.builtinPlacements,me=c.itemIcon,ve=c.expandIcon,Ae=c.overflowedIndicator,be=void 0===Ae?"...":Ae,_e=c.overflowedIndicatorPopupClassName,we=c.getPopupContainer,xe=c.onClick,Ee=c.onOpenChange,Se=c.onKeyDown,Ce=(c.openAnimation,c.openTransitionName,c._internalRenderMenuItem),Pe=c._internalRenderSubMenuItem,Te=(0,l.Z)(c,qe),ke=g.useMemo((function(){return Ke(P,C,Ye)}),[P,C]),Me=g.useState(!1),Oe=(0,s.Z)(Me,2),Re=Oe[0],Ie=Oe[1],Le=g.useRef(),Ne=function(e){var t=(0,f.Z)(e,{value:e}),n=(0,s.Z)(t,2),r=n[0],i=n[1];return g.useEffect((function(){te+=1;var e="".concat(ee,"-").concat(te);i("rc-menu-uuid-".concat(e))}),[]),r}(O),De="rtl"===T;var Fe=(0,f.Z)(U,{value:H,postState:function(e){return e||Ye}}),Be=(0,s.Z)(Fe,2),Ze=Be[0],ze=Be[1],Ue=function(e){function t(){ze(e),null===Ee||void 0===Ee||Ee(e)}arguments.length>1&&void 0!==arguments[1]&&arguments[1]?(0,m.flushSync)(t):t()},He=g.useState(Ze),Ve=(0,s.Z)(He,2),We=Ve[0],Ge=Ve[1],Xe=g.useRef(!1),$e=g.useMemo((function(){return"inline"!==I&&"vertical"!==I||!L?[I,!1]:["vertical",L]}),[I,L]),Qe=(0,s.Z)($e,2),Je=Qe[0],et=Qe[1],tt="inline"===Je,nt=g.useState(Je),rt=(0,s.Z)(nt,2),it=rt[0],ot=rt[1],at=g.useState(et),st=(0,s.Z)(at,2),lt=st[0],ct=st[1];g.useEffect((function(){ot(Je),ct(et),Xe.current&&(tt?ze(We):Ue(Ye))}),[Je,et]);var ut=g.useState(0),dt=(0,s.Z)(ut,2),ft=dt[0],ht=dt[1],pt=ft>=ke.length-1||"horizontal"!==it||D;g.useEffect((function(){tt&&Ge(Ze)}),[Ze]),g.useEffect((function(){return Xe.current=!0,function(){Xe.current=!1}}),[]);var gt=Q(),mt=gt.registerPath,vt=gt.unregisterPath,At=gt.refreshOverflowKeys,yt=gt.isSubPathKey,bt=gt.getKeyPath,_t=gt.getKeys,wt=gt.getSubPathKeys,xt=g.useMemo((function(){return{registerPath:mt,unregisterPath:vt}}),[mt,vt]),Et=g.useMemo((function(){return{isSubPathKey:yt}}),[yt]);g.useEffect((function(){At(pt?Ye:ke.slice(ft+1).map((function(e){return e.key})))}),[ft,pt]);var St=(0,f.Z)(V||G&&(null===(n=ke[0])||void 0===n?void 0:n.key),{value:V}),Ct=(0,s.Z)(St,2),Pt=Ct[0],Tt=Ct[1],kt=J((function(e){Tt(e)})),Mt=J((function(){Tt(void 0)}));(0,g.useImperativeHandle)(t,(function(){return{list:Le.current,focus:function(e){var t,n,r=_t(),i=K(r,Ne),o=i.elements,a=i.key2element,s=i.element2key,l=W(Le.current,o),c=null!==Pt&&void 0!==Pt?Pt:l[0]?s.get(l[0]):null===(t=ke.find((function(e){return!e.props.disabled})))||void 0===t?void 0:t.key,u=a.get(c);c&&u&&(null===u||void 0===u||null===(n=u.focus)||void 0===n||n.call(u,e))}}}));var Ot=(0,f.Z)(ie||[],{value:oe,postState:function(e){return Array.isArray(e)?e:null===e||void 0===e?Ye:[e]}}),Rt=(0,s.Z)(Ot,2),It=Rt[0],Lt=Rt[1],Nt=J((function(e){null===xe||void 0===xe||xe(fe(e)),function(e){if(X){var t,n=e.key,r=It.includes(n);t=re?r?It.filter((function(e){return e!==n})):[].concat((0,a.Z)(It),[n]):[n],Lt(t);var i=(0,o.Z)((0,o.Z)({},e),{},{selectedKeys:t});r?null===se||void 0===se||se(i):null===ae||void 0===ae||ae(i)}!re&&Ze.length&&"inline"!==it&&Ue(Ye)}(e)})),Dt=J((function(e,t){var n=Ze.filter((function(t){return t!==e}));if(t)n.push(e);else if("inline"!==it){var r=wt(e);n=n.filter((function(e){return!r.has(e)}))}(0,h.Z)(Ze,n,!0)||Ue(n,!0)})),Ft=q(it,Pt,De,Ne,Le,_t,bt,Tt,(function(e,t){var n=null!==t&&void 0!==t?t:!Ze.includes(e);Dt(e,n)}),Se);g.useEffect((function(){Ie(!0)}),[]);var jt=g.useMemo((function(){return{_internalRenderMenuItem:Ce,_internalRenderSubMenuItem:Pe}}),[Ce,Pe]),Bt="horizontal"!==it||D?ke:ke.map((function(e,t){return g.createElement(x,{key:e.key,overflowDisabled:t>ft},e)})),Zt=g.createElement(d.Z,(0,r.Z)({id:O,ref:Le,prefixCls:"".concat(A,"-overflow"),component:"ul",itemComponent:ye,className:u()(A,"".concat(A,"-root"),"".concat(A,"-").concat(it),_,(0,i.Z)((0,i.Z)({},"".concat(A,"-inline-collapsed"),lt),"".concat(A,"-rtl"),De),y),dir:T,style:b,role:"menu",tabIndex:E,data:Bt,renderRawItem:function(e){return e},renderRawRest:function(e){var t=e.length,n=t?ke.slice(-t):null;return g.createElement(je,{eventKey:$,title:be,disabled:pt,internalPopupClose:0===t,popupClassName:_e},n)},maxCount:"horizontal"!==it||D?d.Z.INVALIDATE:d.Z.RESPONSIVE,ssr:"full","data-menu-list":!0,onVisibleChange:function(e){ht(e)},onKeyDown:Ft},Te));return g.createElement(M.Provider,{value:jt},g.createElement(v.Provider,{value:Ne},g.createElement(x,{prefixCls:A,rootClassName:y,mode:it,openKeys:Ze,rtl:De,disabled:N,motion:Re?ue:null,defaultMotions:Re?de:null,activeKey:Pt,onActive:kt,onInactive:Mt,selectedKeys:It,inlineIndent:ce,subMenuOpenDelay:j,subMenuCloseDelay:Z,forceSubMenuRender:z,builtinPlacements:ge,triggerSubMenuAction:pe,getPopupContainer:we,itemIcon:me,expandIcon:ve,onItemClick:Nt,onOpenChange:Dt},g.createElement(k.Provider,{value:Et},Zt),g.createElement("div",{style:{display:"none"},"aria-hidden":!0},g.createElement(S.Provider,{value:xt},ke)))))}));Xe.Item=ye,Xe.SubMenu=je,Xe.ItemGroup=He,Xe.Divider=Ve;const $e=Xe},9817:(e,t,n)=>{"use strict";n.d(t,{V4:()=>fe,zt:()=>g,ZP:()=>he});var r=n(68185),i=n(35194),o=n(13747),a=n(69223),s=n(12356),l=n.n(s),c=n(48541),u=n(43903),d=n(57435),f=n(99309),h=["children"],p=d.createContext({});function g(e){var t=e.children,n=(0,f.Z)(e,h);return d.createElement(p.Provider,{value:n},t)}var m=n(66375),v=n(1959),A=n(64648),y=n(13004);const b=function(e){(0,A.Z)(n,e);var t=(0,y.Z)(n);function n(){return(0,m.Z)(this,n),t.apply(this,arguments)}return(0,v.Z)(n,[{key:"render",value:function(){return this.props.children}}]),n}(d.Component);var _=n(42088),w="none",x="appear",E="enter",S="leave",C="none",P="prepare",T="start",k="active",M="end",O="prepared",R=n(20749);function I(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit".concat(e)]="webkit".concat(t),n["Moz".concat(e)]="moz".concat(t),n["ms".concat(e)]="MS".concat(t),n["O".concat(e)]="o".concat(t.toLowerCase()),n}var L=function(e,t){var n={animationend:I("Animation","AnimationEnd"),transitionend:I("Transition","TransitionEnd")};return e&&("AnimationEvent"in t||delete n.animationend.animation,"TransitionEvent"in t||delete n.transitionend.transition),n}((0,R.Z)(),"undefined"!==typeof window?window:{}),N={};if((0,R.Z)()){var D=document.createElement("div");N=D.style}var F={};function j(e){if(F[e])return F[e];var t=L[e];if(t)for(var n=Object.keys(t),r=n.length,i=0;i1&&void 0!==arguments[1]?arguments[1]:2;t();var o=(0,K.Z)((function(){i<=1?r({isCanceled:function(){return o!==e.current}}):n(r,i-1)}));e.current=o},t]}(),c=(0,o.Z)(l,2),u=c[0],f=c[1];var h=t?Y:q;return G((function(){if(a!==C&&a!==M){var e=h.indexOf(a),t=h[e+1],r=n(a);r===X?s(t,!0):t&&u((function(e){function n(){e.isCanceled()||s(t,!0)}!0===r?n():Promise.resolve(r).then(n)}))}}),[e,a]),d.useEffect((function(){return function(){f()}}),[]),[function(){s(P,!0)},a]};const ee=function(e){var t=e;"object"===(0,a.Z)(e)&&(t=e.transitionSupport);var n=d.forwardRef((function(e,n){var a=e.visible,s=void 0===a||a,f=e.removeOnLeave,h=void 0===f||f,g=e.forceRender,m=e.children,v=e.motionName,A=e.leavedClassName,y=e.eventProps,C=function(e,n){return!(!e.motionName||!t||!1===n)}(e,d.useContext(p).motion),M=(0,d.useRef)(),R=(0,d.useRef)();var I=function(e,t,n,a){var s=a.motionEnter,l=void 0===s||s,c=a.motionAppear,u=void 0===c||c,f=a.motionLeave,h=void 0===f||f,p=a.motionDeadline,g=a.motionLeaveImmediately,m=a.onAppearPrepare,v=a.onEnterPrepare,A=a.onLeavePrepare,y=a.onAppearStart,b=a.onEnterStart,C=a.onLeaveStart,M=a.onAppearActive,R=a.onEnterActive,I=a.onLeaveActive,L=a.onAppearEnd,N=a.onEnterEnd,D=a.onLeaveEnd,F=a.onVisibleChanged,j=(0,_.Z)(),B=(0,o.Z)(j,2),Z=B[0],z=B[1],U=(0,_.Z)(w),H=(0,o.Z)(U,2),V=H[0],K=H[1],q=(0,_.Z)(null),Y=(0,o.Z)(q,2),ee=Y[0],te=Y[1],ne=(0,d.useRef)(!1),re=(0,d.useRef)(null);function ie(){return n()}var oe=(0,d.useRef)(!1);function ae(){K(w,!0),te(null,!0)}function se(e){var t=ie();if(!e||e.deadline||e.target===t){var n,r=oe.current;V===x&&r?n=null===L||void 0===L?void 0:L(t,e):V===E&&r?n=null===N||void 0===N?void 0:N(t,e):V===S&&r&&(n=null===D||void 0===D?void 0:D(t,e)),V!==w&&r&&!1!==n&&ae()}}var le=W(se),ce=(0,o.Z)(le,1)[0],ue=function(e){var t,n,i;switch(e){case x:return t={},(0,r.Z)(t,P,m),(0,r.Z)(t,T,y),(0,r.Z)(t,k,M),t;case E:return n={},(0,r.Z)(n,P,v),(0,r.Z)(n,T,b),(0,r.Z)(n,k,R),n;case S:return i={},(0,r.Z)(i,P,A),(0,r.Z)(i,T,C),(0,r.Z)(i,k,I),i;default:return{}}},de=d.useMemo((function(){return ue(V)}),[V]),fe=J(V,!e,(function(e){if(e===P){var t=de[P];return t?t(ie()):X}var n;return ge in de&&te((null===(n=de[ge])||void 0===n?void 0:n.call(de,ie(),null))||null),ge===k&&(ce(ie()),p>0&&(clearTimeout(re.current),re.current=setTimeout((function(){se({deadline:!0})}),p))),ge===O&&ae(),$})),he=(0,o.Z)(fe,2),pe=he[0],ge=he[1],me=Q(ge);oe.current=me,G((function(){z(t);var n,r=ne.current;ne.current=!0,!r&&t&&u&&(n=x),r&&t&&l&&(n=E),(r&&!t&&h||!r&&g&&!t&&h)&&(n=S);var i=ue(n);n&&(e||i[P])?(K(n),pe()):K(w)}),[t]),(0,d.useEffect)((function(){(V===x&&!u||V===E&&!l||V===S&&!h)&&K(w)}),[u,l,h]),(0,d.useEffect)((function(){return function(){ne.current=!1,clearTimeout(re.current)}}),[]);var ve=d.useRef(!1);(0,d.useEffect)((function(){Z&&(ve.current=!0),void 0!==Z&&V===w&&((ve.current||Z)&&(null===F||void 0===F||F(Z)),ve.current=!0)}),[Z,V]);var Ae=ee;return de[P]&&ge===T&&(Ae=(0,i.Z)({transition:"none"},Ae)),[V,ge,Ae,null!==Z&&void 0!==Z?Z:t]}(C,s,(function(){try{return M.current instanceof HTMLElement?M.current:(0,c.Z)(R.current)}catch(e){return null}}),e),L=(0,o.Z)(I,4),N=L[0],D=L[1],F=L[2],j=L[3],B=d.useRef(j);j&&(B.current=!0);var Z,z=d.useCallback((function(e){M.current=e,(0,u.mH)(n,e)}),[n]),U=(0,i.Z)((0,i.Z)({},y),{},{visible:s});if(m)if(N===w)Z=j?m((0,i.Z)({},U),z):!h&&B.current&&A?m((0,i.Z)((0,i.Z)({},U),{},{className:A}),z):g||!h&&!A?m((0,i.Z)((0,i.Z)({},U),{},{style:{display:"none"}}),z):null;else{var H,K;D===P?K="prepare":Q(D)?K="active":D===T&&(K="start");var q=V(v,"".concat(N,"-").concat(K));Z=m((0,i.Z)((0,i.Z)({},U),{},{className:l()(V(v,N),(H={},(0,r.Z)(H,q,q&&K),(0,r.Z)(H,v,"string"===typeof v),H)),style:F}),z)}else Z=null;d.isValidElement(Z)&&(0,u.Yr)(Z)&&(Z.ref||(Z=d.cloneElement(Z,{ref:z})));return d.createElement(b,{ref:R},Z)}));return n.displayName="CSSMotion",n}(z);var te=n(91010),ne=n(50269),re="add",ie="keep",oe="remove",ae="removed";function se(e){var t;return t=e&&"object"===(0,a.Z)(e)&&"key"in e?e:{key:e},(0,i.Z)((0,i.Z)({},t),{},{key:String(t.key)})}function le(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).map(se)}var ce=["component","children","onVisibleChanged","onAllRemoved"],ue=["status"],de=["eventProps","visible","children","motionName","motionAppear","motionEnter","motionLeave","motionLeaveImmediately","motionDeadline","removeOnLeave","leavedClassName","onAppearPrepare","onAppearStart","onAppearActive","onAppearEnd","onEnterStart","onEnterActive","onEnterEnd","onLeaveStart","onLeaveActive","onLeaveEnd"];const fe=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ee,n=function(e){(0,A.Z)(o,e);var n=(0,y.Z)(o);function o(){var e;(0,m.Z)(this,o);for(var t=arguments.length,a=new Array(t),s=0;s0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=[],r=0,o=t.length,a=le(e),s=le(t);a.forEach((function(e){for(var t=!1,a=r;a1})).forEach((function(e){(n=n.filter((function(t){var n=t.key,r=t.status;return n!==e||r!==oe}))).forEach((function(t){t.key===e&&(t.status=ie)}))})),n}(r,o);return{keyEntities:a.filter((function(e){var t=r.find((function(t){var n=t.key;return e.key===n}));return!t||t.status!==ae||e.status!==oe}))}}}]),o}(d.Component);return(0,r.Z)(n,"defaultProps",{component:"div"}),n}(z),he=ee},75810:(e,t,n)=>{"use strict";n.d(t,{qX:()=>v,JB:()=>y,lm:()=>P});var r=n(22368),i=n(13747),o=n(99309),a=n(57435),s=n(35194),l=n(33882),c=n(91010),u=n(68185),d=n(12356),f=n.n(d),h=n(9817),p=n(69223),g=n(98475),m=n(37461);const v=a.forwardRef((function(e,t){var n=e.prefixCls,r=e.style,o=e.className,s=e.duration,l=void 0===s?4.5:s,d=e.eventKey,h=e.content,v=e.closable,A=e.closeIcon,y=void 0===A?"x":A,b=e.props,_=e.onClick,w=e.onNoticeClose,x=e.times,E=e.hovering,S=a.useState(!1),C=(0,i.Z)(S,2),P=C[0],T=C[1],k=E||P,M=function(){w(d)};a.useEffect((function(){if(!k&&l>0){var e=setTimeout((function(){M()}),1e3*l);return function(){clearTimeout(e)}}}),[l,k,x]);var O=a.useMemo((function(){return"object"===(0,p.Z)(v)&&null!==v?v:v?{closeIcon:y}:{}}),[v,y]),R=(0,m.Z)(O,!0),I="".concat(n,"-notice");return a.createElement("div",(0,c.Z)({},b,{ref:t,className:f()(I,o,(0,u.Z)({},"".concat(I,"-closable"),v)),style:r,onMouseEnter:function(e){var t;T(!0),null===b||void 0===b||null===(t=b.onMouseEnter)||void 0===t||t.call(b,e)},onMouseLeave:function(e){var t;T(!1),null===b||void 0===b||null===(t=b.onMouseLeave)||void 0===t||t.call(b,e)},onClick:_}),a.createElement("div",{className:"".concat(I,"-content")},h),v&&a.createElement("a",(0,c.Z)({tabIndex:0,className:"".concat(I,"-close"),onKeyDown:function(e){"Enter"!==e.key&&"Enter"!==e.code&&e.keyCode!==g.Z.ENTER||M()},"aria-label":"Close"},R,{onClick:function(e){e.preventDefault(),e.stopPropagation(),M()}}),O.closeIcon))}));var A=a.createContext({});const y=function(e){var t=e.children,n=e.classNames;return a.createElement(A.Provider,{value:{classNames:n}},t)};const b=function(e){var t,n,r,i={offset:8,threshold:3,gap:16};e&&"object"===(0,p.Z)(e)&&(i.offset=null!==(t=e.offset)&&void 0!==t?t:8,i.threshold=null!==(n=e.threshold)&&void 0!==n?n:3,i.gap=null!==(r=e.gap)&&void 0!==r?r:16);return[!!e,i]};var _=["className","style","classNames","styles"];const w=function(e){var t=e.configList,n=e.placement,l=e.prefixCls,d=e.className,p=e.style,g=e.motion,m=e.onAllNoticeRemoved,y=e.onNoticeClose,w=e.stack,x=(0,a.useContext)(A).classNames,E=(0,a.useRef)({}),S=(0,a.useState)(null),C=(0,i.Z)(S,2),P=C[0],T=C[1],k=(0,a.useState)([]),M=(0,i.Z)(k,2),O=M[0],R=M[1],I=t.map((function(e){return{config:e,key:String(e.key)}})),L=b(w),N=(0,i.Z)(L,2),D=N[0],F=N[1],j=F.offset,B=F.threshold,Z=F.gap,z=D&&(O.length>0||I.length<=B),U="function"===typeof g?g(n):g;return(0,a.useEffect)((function(){D&&O.length>1&&R((function(e){return e.filter((function(e){return I.some((function(t){var n=t.key;return e===n}))}))}))}),[O,I,D]),(0,a.useEffect)((function(){var e,t;D&&E.current[null===(e=I[I.length-1])||void 0===e?void 0:e.key]&&T(E.current[null===(t=I[I.length-1])||void 0===t?void 0:t.key])}),[I,D]),a.createElement(h.V4,(0,c.Z)({key:n,className:f()(l,"".concat(l,"-").concat(n),null===x||void 0===x?void 0:x.list,d,(0,u.Z)((0,u.Z)({},"".concat(l,"-stack"),!!D),"".concat(l,"-stack-expanded"),z)),style:p,keys:I,motionAppear:!0},U,{onAllRemoved:function(){m(n)}}),(function(e,t){var i=e.config,u=e.className,d=e.style,h=e.index,p=i,g=p.key,m=p.times,A=String(g),b=i,w=b.className,S=b.style,C=b.classNames,T=b.styles,k=(0,o.Z)(b,_),M=I.findIndex((function(e){return e.key===A})),L={};if(D){var N=I.length-1-(M>-1?M:h-1),F="top"===n||"bottom"===n?"-50%":"0";if(N>0){var B,U,H;L.height=z?null===(B=E.current[A])||void 0===B?void 0:B.offsetHeight:null===P||void 0===P?void 0:P.offsetHeight;for(var V=0,W=0;W-1?E.current[A]=e:delete E.current[A]},prefixCls:l,classNames:C,styles:T,className:f()(w,null===x||void 0===x?void 0:x.notice),style:S,times:m,key:g,eventKey:g,onNoticeClose:y,hovering:D&&O.length>0})))}))};const x=a.forwardRef((function(e,t){var n=e.prefixCls,o=void 0===n?"rc-notification":n,c=e.container,u=e.motion,d=e.maxCount,f=e.className,h=e.style,p=e.onAllRemoved,g=e.stack,m=e.renderNotifications,v=a.useState([]),A=(0,i.Z)(v,2),y=A[0],b=A[1],_=function(e){var t,n=y.find((function(t){return t.key===e}));null===n||void 0===n||null===(t=n.onClose)||void 0===t||t.call(n),b((function(t){return t.filter((function(t){return t.key!==e}))}))};a.useImperativeHandle(t,(function(){return{open:function(e){b((function(t){var n,i=(0,r.Z)(t),o=i.findIndex((function(t){return t.key===e.key})),a=(0,s.Z)({},e);o>=0?(a.times=((null===(n=t[o])||void 0===n?void 0:n.times)||0)+1,i[o]=a):(a.times=0,i.push(a));return d>0&&i.length>d&&(i=i.slice(-d)),i}))},close:function(e){_(e)},destroy:function(){b([])}}}));var x=a.useState({}),E=(0,i.Z)(x,2),S=E[0],C=E[1];a.useEffect((function(){var e={};y.forEach((function(t){var n=t.placement,r=void 0===n?"topRight":n;r&&(e[r]=e[r]||[],e[r].push(t))})),Object.keys(S).forEach((function(t){e[t]=e[t]||[]})),C(e)}),[y]);var P=function(e){C((function(t){var n=(0,s.Z)({},t);return(n[e]||[]).length||delete n[e],n}))},T=a.useRef(!1);if(a.useEffect((function(){Object.keys(S).length>0?T.current=!0:T.current&&(null===p||void 0===p||p(),T.current=!1)}),[S]),!c)return null;var k=Object.keys(S);return(0,l.createPortal)(a.createElement(a.Fragment,null,k.map((function(e){var t=S[e],n=a.createElement(w,{key:e,configList:t,placement:e,prefixCls:o,className:null===f||void 0===f?void 0:f(e),style:null===h||void 0===h?void 0:h(e),motion:u,onNoticeClose:_,onAllNoticeRemoved:P,stack:g});return m?m(n,{prefixCls:o,key:e}):n}))),c)}));var E=["getContainer","motion","prefixCls","maxCount","className","style","onAllRemoved","stack","renderNotifications"],S=function(){return document.body},C=0;function P(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.getContainer,n=void 0===t?S:t,s=e.motion,l=e.prefixCls,c=e.maxCount,u=e.className,d=e.style,f=e.onAllRemoved,h=e.stack,p=e.renderNotifications,g=(0,o.Z)(e,E),m=a.useState(),v=(0,i.Z)(m,2),A=v[0],y=v[1],b=a.useRef(),_=a.createElement(x,{container:A,ref:b,prefixCls:l,motion:s,maxCount:c,className:u,style:d,onAllRemoved:f,stack:h,renderNotifications:p}),w=a.useState([]),P=(0,i.Z)(w,2),T=P[0],k=P[1],M=a.useMemo((function(){return{open:function(e){var t=function(){for(var e={},t=arguments.length,n=new Array(t),r=0;r{"use strict";n.d(t,{Z:()=>N});var r=n(91010),i=n(35194),o=n(13747),a=n(99309),s=n(57435),l=n(12356),c=n.n(l),u=n(61236),d=n(12750),f=["prefixCls","invalidate","item","renderItem","responsive","responsiveDisabled","registerSize","itemKey","className","style","children","display","order","component"],h=void 0;function p(e,t){var n=e.prefixCls,o=e.invalidate,l=e.item,d=e.renderItem,p=e.responsive,g=e.responsiveDisabled,m=e.registerSize,v=e.itemKey,A=e.className,y=e.style,b=e.children,_=e.display,w=e.order,x=e.component,E=void 0===x?"div":x,S=(0,a.Z)(e,f),C=p&&!_;function P(e){m(v,e)}s.useEffect((function(){return function(){P(null)}}),[]);var T,k=d&&l!==h?d(l):b;o||(T={opacity:C?0:1,height:C?0:h,overflowY:C?"hidden":h,order:p?w:h,pointerEvents:C?"none":h,position:C?"absolute":h});var M={};C&&(M["aria-hidden"]=!0);var O=s.createElement(E,(0,r.Z)({className:c()(!o&&n,A),style:(0,i.Z)((0,i.Z)({},T),y)},M,S,{ref:t}),k);return p&&(O=s.createElement(u.Z,{onResize:function(e){P(e.offsetWidth)},disabled:g},O)),O}var g=s.forwardRef(p);g.displayName="Item";const m=g;var v=n(73165),A=n(33882),y=n(51882);function b(){var e=s.useRef(null);return function(t){e.current||(e.current=[],function(e){if("undefined"===typeof MessageChannel)(0,y.Z)(e);else{var t=new MessageChannel;t.port1.onmessage=function(){return e()},t.port2.postMessage(void 0)}}((function(){(0,A.unstable_batchedUpdates)((function(){e.current.forEach((function(e){e()})),e.current=null}))}))),e.current.push(t)}}function _(e,t){var n=s.useState(t),r=(0,o.Z)(n,2),i=r[0],a=r[1];return[i,(0,v.Z)((function(t){e((function(){a(t)}))}))]}var w=s.createContext(null),x=["component"],E=["className"],S=["className"],C=function(e,t){var n=s.useContext(w);if(!n){var i=e.component,o=void 0===i?"div":i,l=(0,a.Z)(e,x);return s.createElement(o,(0,r.Z)({},l,{ref:t}))}var u=n.className,d=(0,a.Z)(n,E),f=e.className,h=(0,a.Z)(e,S);return s.createElement(w.Provider,{value:null},s.createElement(m,(0,r.Z)({ref:t,className:c()(u,f)},d,h)))},P=s.forwardRef(C);P.displayName="RawItem";const T=P;var k=["prefixCls","data","renderItem","renderRawItem","itemKey","itemWidth","ssr","style","className","maxCount","renderRest","renderRawRest","suffix","component","itemComponent","onVisibleChange"],M="responsive",O="invalidate";function R(e){return"+ ".concat(e.length," ...")}function I(e,t){var n=e.prefixCls,l=void 0===n?"rc-overflow":n,f=e.data,h=void 0===f?[]:f,p=e.renderItem,g=e.renderRawItem,v=e.itemKey,A=e.itemWidth,y=void 0===A?10:A,x=e.ssr,E=e.style,S=e.className,C=e.maxCount,P=e.renderRest,T=e.renderRawRest,I=e.suffix,L=e.component,N=void 0===L?"div":L,D=e.itemComponent,F=e.onVisibleChange,j=(0,a.Z)(e,k),B="full"===x,Z=b(),z=_(Z,null),U=(0,o.Z)(z,2),H=U[0],V=U[1],W=H||0,G=_(Z,new Map),K=(0,o.Z)(G,2),q=K[0],Y=K[1],X=_(Z,0),$=(0,o.Z)(X,2),Q=$[0],J=$[1],ee=_(Z,0),te=(0,o.Z)(ee,2),ne=te[0],re=te[1],ie=_(Z,0),oe=(0,o.Z)(ie,2),ae=oe[0],se=oe[1],le=(0,s.useState)(null),ce=(0,o.Z)(le,2),ue=ce[0],de=ce[1],fe=(0,s.useState)(null),he=(0,o.Z)(fe,2),pe=he[0],ge=he[1],me=s.useMemo((function(){return null===pe&&B?Number.MAX_SAFE_INTEGER:pe||0}),[pe,H]),ve=(0,s.useState)(!1),Ae=(0,o.Z)(ve,2),ye=Ae[0],be=Ae[1],_e="".concat(l,"-item"),we=Math.max(Q,ne),xe=C===M,Ee=h.length&&xe,Se=C===O,Ce=Ee||"number"===typeof C&&h.length>C,Pe=(0,s.useMemo)((function(){var e=h;return Ee?e=null===H&&B?h:h.slice(0,Math.min(h.length,W/y)):"number"===typeof C&&(e=h.slice(0,C)),e}),[h,y,H,C,Ee]),Te=(0,s.useMemo)((function(){return Ee?h.slice(me+1):h.slice(Pe.length)}),[h,Pe,Ee,me]),ke=(0,s.useCallback)((function(e,t){var n;return"function"===typeof v?v(e):null!==(n=v&&(null===e||void 0===e?void 0:e[v]))&&void 0!==n?n:t}),[v]),Me=(0,s.useCallback)(p||function(e){return e},[p]);function Oe(e,t,n){(pe!==e||void 0!==t&&t!==ue)&&(ge(e),n||(be(eW){Oe(r-1,e-i-ae+ne);break}}I&&Ie(0)+ae>W&&de(null)}}),[W,q,ne,ae,ke,Pe]);var Le=ye&&!!Te.length,Ne={};null!==ue&&Ee&&(Ne={position:"absolute",left:ue,top:0});var De,Fe={prefixCls:_e,responsive:Ee,component:D,invalidate:Se},je=g?function(e,t){var n=ke(e,t);return s.createElement(w.Provider,{key:n,value:(0,i.Z)((0,i.Z)({},Fe),{},{order:t,item:e,itemKey:n,registerSize:Re,display:t<=me})},g(e,t))}:function(e,t){var n=ke(e,t);return s.createElement(m,(0,r.Z)({},Fe,{order:t,key:n,item:e,renderItem:Me,itemKey:n,registerSize:Re,display:t<=me}))},Be={order:Le?me:Number.MAX_SAFE_INTEGER,className:"".concat(_e,"-rest"),registerSize:function(e,t){re(t),J(ne)},display:Le};if(T)T&&(De=s.createElement(w.Provider,{value:(0,i.Z)((0,i.Z)({},Fe),Be)},T(Te)));else{var Ze=P||R;De=s.createElement(m,(0,r.Z)({},Fe,Be),"function"===typeof Ze?Ze(Te):Ze)}var ze=s.createElement(N,(0,r.Z)({className:c()(!Se&&l,S),style:E,ref:t},j),Pe.map(je),Ce?De:null,I&&s.createElement(m,(0,r.Z)({},Fe,{responsive:xe,responsiveDisabled:!Ee,order:me,className:"".concat(_e,"-suffix"),registerSize:function(e,t){se(t)},display:!0,style:Ne}),I));return xe&&(ze=s.createElement(u.Z,{onResize:function(e,t){V(t.clientWidth)},disabled:!Ee},ze)),ze}var L=s.forwardRef(I);L.displayName="Overflow",L.Item=T,L.RESPONSIVE=M,L.INVALIDATE=O;const N=L},98385:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r={items_per_page:"/ page",jump_to:"Go to",jump_to_confirm:"confirm",page:"Page",prev_page:"Previous Page",next_page:"Next Page",prev_5:"Previous 5 Pages",next_5:"Next 5 Pages",prev_3:"Previous 3 Pages",next_3:"Next 3 Pages",page_size:"Page Size"}},77514:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default={items_per_page:"/ page",jump_to:"Go to",jump_to_confirm:"confirm",page:"Page",prev_page:"Previous Page",next_page:"Next Page",prev_5:"Previous 5 Pages",next_5:"Next 5 Pages",prev_3:"Previous 3 Pages",next_3:"Next 3 Pages",page_size:"Page Size"}},68374:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default={items_per_page:"\u6761/\u9875",jump_to:"\u8df3\u81f3",jump_to_confirm:"\u786e\u5b9a",page:"\u9875",prev_page:"\u4e0a\u4e00\u9875",next_page:"\u4e0b\u4e00\u9875",prev_5:"\u5411\u524d 5 \u9875",next_5:"\u5411\u540e 5 \u9875",prev_3:"\u5411\u524d 3 \u9875",next_3:"\u5411\u540e 3 \u9875",page_size:"\u9875\u7801"}},41260:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r={locale:"en_US",today:"Today",now:"Now",backToToday:"Back to today",ok:"OK",clear:"Clear",month:"Month",year:"Year",timeSelect:"select time",dateSelect:"select date",weekSelect:"Choose a week",monthSelect:"Choose a month",yearSelect:"Choose a year",decadeSelect:"Choose a decade",yearFormat:"YYYY",dateFormat:"M/D/YYYY",dayFormat:"D",dateTimeFormat:"M/D/YYYY HH:mm:ss",monthBeforeYear:!0,previousMonth:"Previous month (PageUp)",nextMonth:"Next month (PageDown)",previousYear:"Last year (Control + left)",nextYear:"Next year (Control + right)",previousDecade:"Last decade",nextDecade:"Next decade",previousCentury:"Last century",nextCentury:"Next century"}},52789:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default={locale:"en_US",today:"Today",now:"Now",backToToday:"Back to today",ok:"OK",clear:"Clear",month:"Month",year:"Year",timeSelect:"select time",dateSelect:"select date",weekSelect:"Choose a week",monthSelect:"Choose a month",yearSelect:"Choose a year",decadeSelect:"Choose a decade",yearFormat:"YYYY",dateFormat:"M/D/YYYY",dayFormat:"D",dateTimeFormat:"M/D/YYYY HH:mm:ss",monthBeforeYear:!0,previousMonth:"Previous month (PageUp)",nextMonth:"Next month (PageDown)",previousYear:"Last year (Control + left)",nextYear:"Next year (Control + right)",previousDecade:"Last decade",nextDecade:"Next decade",previousCentury:"Last century",nextCentury:"Next century"}},55861:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default={locale:"zh_CN",yearFormat:"YYYY\u5e74",cellDateFormat:"D",cellMeridiemFormat:"A",today:"\u4eca\u5929",now:"\u6b64\u523b",backToToday:"\u8fd4\u56de\u4eca\u5929",ok:"\u786e\u5b9a",timeSelect:"\u9009\u62e9\u65f6\u95f4",dateSelect:"\u9009\u62e9\u65e5\u671f",weekSelect:"\u9009\u62e9\u5468",clear:"\u6e05\u9664",month:"\u6708",year:"\u5e74",previousMonth:"\u4e0a\u4e2a\u6708 (\u7ffb\u9875\u4e0a\u952e)",nextMonth:"\u4e0b\u4e2a\u6708 (\u7ffb\u9875\u4e0b\u952e)",monthSelect:"\u9009\u62e9\u6708\u4efd",yearSelect:"\u9009\u62e9\u5e74\u4efd",decadeSelect:"\u9009\u62e9\u5e74\u4ee3",previousYear:"\u4e0a\u4e00\u5e74 (Control\u952e\u52a0\u5de6\u65b9\u5411\u952e)",nextYear:"\u4e0b\u4e00\u5e74 (Control\u952e\u52a0\u53f3\u65b9\u5411\u952e)",previousDecade:"\u4e0a\u4e00\u5e74\u4ee3",nextDecade:"\u4e0b\u4e00\u5e74\u4ee3",previousCentury:"\u4e0a\u4e00\u4e16\u7eaa",nextCentury:"\u4e0b\u4e00\u4e16\u7eaa"}},61835:(e,t,n)=>{"use strict";n.d(t,{Cd:()=>E});var r=n(91010),i=n(35194),o=n(99309),a=n(57435),s=n(12356),l=n.n(s),c={percent:0,prefixCls:"rc-progress",strokeColor:"#2db7f5",strokeLinecap:"round",strokeWidth:1,trailColor:"#D9D9D9",trailWidth:1,gapPosition:"bottom"},u=function(){var e=(0,a.useRef)([]),t=(0,a.useRef)(null);return(0,a.useEffect)((function(){var n=Date.now(),r=!1;e.current.forEach((function(e){if(e){r=!0;var i=e.style;i.transitionDuration=".3s, .3s, .3s, .06s",t.current&&n-t.current<100&&(i.transitionDuration="0s, 0s")}})),r&&(t.current=Date.now())})),e.current};var d=n(69223),f=n(13747),h=n(20749),p=0,g=(0,h.Z)();const m=function(e){var t=a.useState(),n=(0,f.Z)(t,2),r=n[0],i=n[1];return a.useEffect((function(){i("rc_progress_".concat(function(){var e;return g?(e=p,p+=1):e="TEST_OR_SSR",e}()))}),[]),e||r};var v=function(e){var t=e.bg,n=e.children;return a.createElement("div",{style:{width:"100%",height:"100%",background:t}},n)};function A(e,t){return Object.keys(e).map((function(n){var r=parseFloat(n),i="".concat(Math.floor(r*t),"%");return"".concat(e[n]," ").concat(i)}))}const y=a.forwardRef((function(e,t){var n=e.prefixCls,r=e.color,i=e.gradientId,o=e.radius,s=e.style,l=e.ptg,c=e.strokeLinecap,u=e.strokeWidth,f=e.size,h=e.gapDegree,p=r&&"object"===(0,d.Z)(r),g=p?"#FFF":void 0,m=f/2,y=a.createElement("circle",{className:"".concat(n,"-circle-path"),r:o,cx:m,cy:m,stroke:g,strokeLinecap:c,strokeWidth:u,opacity:0===l?0:1,style:s,ref:t});if(!p)return y;var b="".concat(i,"-conic"),_=h?"".concat(180+h/2,"deg"):"0deg",w=A(r,(360-h)/360),x=A(r,1),E="conic-gradient(from ".concat(_,", ").concat(w.join(", "),")"),S="linear-gradient(to ".concat(h?"bottom":"top",", ").concat(x.join(", "),")");return a.createElement(a.Fragment,null,a.createElement("mask",{id:b},y),a.createElement("foreignObject",{x:0,y:0,width:f,height:f,mask:"url(#".concat(b,")")},a.createElement(v,{bg:S},a.createElement(v,{bg:E}))))}));var b=100,_=function(e,t,n,r,i,o,a,s,l,c){var u=arguments.length>10&&void 0!==arguments[10]?arguments[10]:0,d=n/100*360*((360-o)/360),f=0===o?0:{bottom:0,top:180,left:90,right:-90}[a],h=(100-r)/100*t;"round"===l&&100!==r&&(h+=c/2)>=t&&(h=t-.01);return{stroke:"string"===typeof s?s:void 0,strokeDasharray:"".concat(t,"px ").concat(e),strokeDashoffset:h+u,transform:"rotate(".concat(i+d+f,"deg)"),transformOrigin:"".concat(50,"px ").concat(50,"px"),transition:"stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s, opacity .3s ease 0s",fillOpacity:0}},w=["id","prefixCls","steps","strokeWidth","trailWidth","gapDegree","gapPosition","trailColor","strokeLinecap","style","className","strokeColor","percent"];function x(e){var t=null!==e&&void 0!==e?e:[];return Array.isArray(t)?t:[t]}const E=function(e){var t=(0,i.Z)((0,i.Z)({},c),e),n=t.id,s=t.prefixCls,f=t.steps,h=t.strokeWidth,p=t.trailWidth,g=t.gapDegree,v=void 0===g?0:g,A=t.gapPosition,E=t.trailColor,S=t.strokeLinecap,C=t.style,P=t.className,T=t.strokeColor,k=t.percent,M=(0,o.Z)(t,w),O=m(n),R="".concat(O,"-gradient"),I=50-h/2,L=2*Math.PI*I,N=v>0?90+v/2:-90,D=L*((360-v)/360),F="object"===(0,d.Z)(f)?f:{count:f,gap:2},j=F.count,B=F.gap,Z=x(k),z=x(T),U=z.find((function(e){return e&&"object"===(0,d.Z)(e)})),H=U&&"object"===(0,d.Z)(U)?"butt":S,V=_(L,D,0,100,N,v,A,E,H,h),W=u();return a.createElement("svg",(0,r.Z)({className:l()("".concat(s,"-circle"),P),viewBox:"0 0 ".concat(b," ").concat(b),style:C,id:n,role:"presentation"},M),!j&&a.createElement("circle",{className:"".concat(s,"-circle-trail"),r:I,cx:50,cy:50,stroke:E,strokeLinecap:H,strokeWidth:p||h,style:V}),j?function(){var e=Math.round(j*(Z[0]/100)),t=100/j,n=0;return new Array(j).fill(null).map((function(r,i){var o=i<=e-1?z[0]:E,l=o&&"object"===(0,d.Z)(o)?"url(#".concat(R,")"):void 0,c=_(L,D,n,t,N,v,A,o,"butt",h,B);return n+=100*(D-c.strokeDashoffset+B)/D,a.createElement("circle",{key:i,className:"".concat(s,"-circle-path"),r:I,cx:50,cy:50,stroke:l,strokeWidth:h,opacity:1,style:c,ref:function(e){W[i]=e}})}))}():function(){var e=0;return Z.map((function(t,n){var r=z[n]||z[z.length-1],i=_(L,D,e,t,N,v,A,r,H,h);return e+=t,a.createElement(y,{key:n,color:r,ptg:t,radius:I,prefixCls:s,gradientId:R,style:i,strokeLinecap:H,strokeWidth:h,gapDegree:v,ref:function(e){W[n]=e},size:b})})).reverse()}())}},61236:(e,t,n)=>{"use strict";n.d(t,{Z:()=>x});var r=n(91010),i=n(57435),o=n(52353),a=(n(98162),n(35194)),s=n(69223),l=n(48541),c=n(43903),u=i.createContext(null);var d=n(46890),f=new Map;var h=new d.Z((function(e){e.forEach((function(e){var t,n=e.target;null===(t=f.get(n))||void 0===t||t.forEach((function(e){return e(n)}))}))}));var p=n(66375),g=n(1959),m=n(64648),v=n(13004),A=function(e){(0,m.Z)(n,e);var t=(0,v.Z)(n);function n(){return(0,p.Z)(this,n),t.apply(this,arguments)}return(0,g.Z)(n,[{key:"render",value:function(){return this.props.children}}]),n}(i.Component);function y(e,t){var n=e.children,r=e.disabled,o=i.useRef(null),d=i.useRef(null),p=i.useContext(u),g="function"===typeof n,m=g?n(o):n,v=i.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),y=!g&&i.isValidElement(m)&&(0,c.Yr)(m),b=y?m.ref:null,_=(0,c.x1)(b,o),w=function(){var e;return(0,l.Z)(o.current)||(o.current&&"object"===(0,s.Z)(o.current)?(0,l.Z)(null===(e=o.current)||void 0===e?void 0:e.nativeElement):null)||(0,l.Z)(d.current)};i.useImperativeHandle(t,(function(){return w()}));var x=i.useRef(e);x.current=e;var E=i.useCallback((function(e){var t=x.current,n=t.onResize,r=t.data,i=e.getBoundingClientRect(),o=i.width,s=i.height,l=e.offsetWidth,c=e.offsetHeight,u=Math.floor(o),d=Math.floor(s);if(v.current.width!==u||v.current.height!==d||v.current.offsetWidth!==l||v.current.offsetHeight!==c){var f={width:u,height:d,offsetWidth:l,offsetHeight:c};v.current=f;var h=l===Math.round(o)?o:l,g=c===Math.round(s)?s:c,m=(0,a.Z)((0,a.Z)({},f),{},{offsetWidth:h,offsetHeight:g});null===p||void 0===p||p(m,e,r),n&&Promise.resolve().then((function(){n(m,e)}))}}),[]);return i.useEffect((function(){var e,t,n=w();return n&&!r&&(e=n,t=E,f.has(e)||(f.set(e,new Set),h.observe(e)),f.get(e).add(t)),function(){return function(e,t){f.has(e)&&(f.get(e).delete(t),f.get(e).size||(h.unobserve(e),f.delete(e)))}(n,E)}}),[o.current,r]),i.createElement(A,{ref:d},y?i.cloneElement(m,{ref:_}):m)}const b=i.forwardRef(y);function _(e,t){var n=e.children;return("function"===typeof n?[n]:(0,o.Z)(n)).map((function(n,o){var a=(null===n||void 0===n?void 0:n.key)||"".concat("rc-observer-key","-").concat(o);return i.createElement(b,(0,r.Z)({},e,{key:a,ref:0===o?t:void 0}),n)}))}var w=i.forwardRef(_);w.Collection=function(e){var t=e.children,n=e.onBatchResize,r=i.useRef(0),o=i.useRef([]),a=i.useContext(u),s=i.useCallback((function(e,t,i){r.current+=1;var s=r.current;o.current.push({size:e,element:t,data:i}),Promise.resolve().then((function(){s===r.current&&(null===n||void 0===n||n(o.current),o.current=[])})),null===a||void 0===a||a(e,t,i)}),[n,a]);return i.createElement(u.Provider,{value:s},t)};const x=w},62018:(e,t,n)=>{"use strict";n.d(t,{ZP:()=>l});var r=n(13747),i=n(57435),o=n(20749),a=0,s=(0,o.Z)();function l(e){var t=i.useState(),n=(0,r.Z)(t,2),o=n[0],l=n[1];return i.useEffect((function(){l("rc_select_".concat(function(){var e;return s?(e=a,a+=1):e="TEST_OR_SSR",e}()))}),[]),e||o}},97814:(e,t,n)=>{"use strict";n.d(t,{Ac:()=>$,Xo:()=>J,Wx:()=>te,ZP:()=>be,lk:()=>_});var r=n(91010),i=n(22368),o=n(68185),a=n(35194),s=n(13747),l=n(99309),c=n(69223),u=n(88258),d=n(98162),f=n(57435),h=n(12356),p=n.n(h),g=n(12750),m=n(90479),v=n(98475),A=n(43903);const y=function(e){var t=e.className,n=e.customizeIcon,r=e.customizeIconProps,i=e.children,o=e.onMouseDown,a=e.onClick,s="function"===typeof n?n(r):n;return f.createElement("span",{className:t,onMouseDown:function(e){e.preventDefault(),null===o||void 0===o||o(e)},style:{userSelect:"none",WebkitUserSelect:"none"},unselectable:"on",onClick:a,"aria-hidden":!0},void 0!==s?s:f.createElement("span",{className:p()(t.split(/\s+/).map((function(e){return"".concat(e,"-icon")})))},i))};var b=f.createContext(null);function _(){return f.useContext(b)}function w(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:250,t=f.useRef(null),n=f.useRef(null);return f.useEffect((function(){return function(){window.clearTimeout(n.current)}}),[]),[function(){return t.current},function(r){(r||null===t.current)&&(t.current=r),window.clearTimeout(n.current),n.current=window.setTimeout((function(){t.current=null}),e)}]}var x=n(37461),E=n(55752),S=function(e,t){var n,r=e.prefixCls,i=e.id,o=e.inputElement,s=e.disabled,l=e.tabIndex,c=e.autoFocus,u=e.autoComplete,h=e.editable,g=e.activeDescendantId,m=e.value,v=e.maxLength,y=e.onKeyDown,b=e.onMouseDown,_=e.onChange,w=e.onPaste,x=e.onCompositionStart,E=e.onCompositionEnd,S=e.open,C=e.attrs,P=o||f.createElement("input",null),T=P,k=T.ref,M=T.props,O=M.onKeyDown,R=M.onChange,I=M.onMouseDown,L=M.onCompositionStart,N=M.onCompositionEnd,D=M.style;return(0,d.Kp)(!("maxLength"in P.props),"Passing 'maxLength' to input element directly may not work because input in BaseSelect is controlled."),P=f.cloneElement(P,(0,a.Z)((0,a.Z)((0,a.Z)({type:"search"},M),{},{id:i,ref:(0,A.sQ)(t,k),disabled:s,tabIndex:l,autoComplete:u||"off",autoFocus:c,className:p()("".concat(r,"-selection-search-input"),null===(n=P)||void 0===n||null===(n=n.props)||void 0===n?void 0:n.className),role:"combobox","aria-expanded":S||!1,"aria-haspopup":"listbox","aria-owns":"".concat(i,"_list"),"aria-autocomplete":"list","aria-controls":"".concat(i,"_list"),"aria-activedescendant":S?g:void 0},C),{},{value:h?m:"",maxLength:v,readOnly:!h,unselectable:h?null:"on",style:(0,a.Z)((0,a.Z)({},D),{},{opacity:h?null:0}),onKeyDown:function(e){y(e),O&&O(e)},onMouseDown:function(e){b(e),I&&I(e)},onChange:function(e){_(e),R&&R(e)},onCompositionStart:function(e){x(e),L&&L(e)},onCompositionEnd:function(e){E(e),N&&N(e)},onPaste:w}))};const C=f.forwardRef(S);function P(e){return Array.isArray(e)?e:void 0!==e?[e]:[]}var T="undefined"!==typeof window&&window.document&&window.document.documentElement;function k(e){return["string","number"].includes((0,c.Z)(e))}function M(e){var t=void 0;return e&&(k(e.title)?t=e.title.toString():k(e.label)&&(t=e.label.toString())),t}function O(e){var t;return null!==(t=e.key)&&void 0!==t?t:e.value}var R=function(e){e.preventDefault(),e.stopPropagation()};const I=function(e){var t,n,r=e.id,i=e.prefixCls,a=e.values,l=e.open,c=e.searchValue,u=e.autoClearSearchValue,d=e.inputRef,h=e.placeholder,g=e.disabled,m=e.mode,v=e.showSearch,A=e.autoFocus,b=e.autoComplete,_=e.activeDescendantId,w=e.tabIndex,S=e.removeIcon,P=e.maxTagCount,k=e.maxTagTextLength,I=e.maxTagPlaceholder,L=void 0===I?function(e){return"+ ".concat(e.length," ...")}:I,N=e.tagRender,D=e.onToggleOpen,F=e.onRemove,j=e.onInputChange,B=e.onInputPaste,Z=e.onInputKeyDown,z=e.onInputMouseDown,U=e.onInputCompositionStart,H=e.onInputCompositionEnd,V=f.useRef(null),W=(0,f.useState)(0),G=(0,s.Z)(W,2),K=G[0],q=G[1],Y=(0,f.useState)(!1),X=(0,s.Z)(Y,2),$=X[0],Q=X[1],J="".concat(i,"-selection"),ee=l||"multiple"===m&&!1===u||"tags"===m?c:"",te="tags"===m||"multiple"===m&&!1===u||v&&(l||$);t=function(){q(V.current.scrollWidth)},n=[ee],T?f.useLayoutEffect(t,n):f.useEffect(t,n);var ne=function(e,t,n,r,i){return f.createElement("span",{title:M(e),className:p()("".concat(J,"-item"),(0,o.Z)({},"".concat(J,"-item-disabled"),n))},f.createElement("span",{className:"".concat(J,"-item-content")},t),r&&f.createElement(y,{className:"".concat(J,"-item-remove"),onMouseDown:R,onClick:i,customizeIcon:S},"\xd7"))},re=f.createElement("div",{className:"".concat(J,"-search"),style:{width:K},onFocus:function(){Q(!0)},onBlur:function(){Q(!1)}},f.createElement(C,{ref:d,open:l,prefixCls:i,id:r,inputElement:null,disabled:g,autoFocus:A,autoComplete:b,editable:te,activeDescendantId:_,value:ee,onKeyDown:Z,onMouseDown:z,onChange:j,onPaste:B,onCompositionStart:U,onCompositionEnd:H,tabIndex:w,attrs:(0,x.Z)(e,!0)}),f.createElement("span",{ref:V,className:"".concat(J,"-search-mirror"),"aria-hidden":!0},ee,"\xa0")),ie=f.createElement(E.Z,{prefixCls:"".concat(J,"-overflow"),data:a,renderItem:function(e){var t=e.disabled,n=e.label,r=e.value,i=!g&&!t,o=n;if("number"===typeof k&&("string"===typeof n||"number"===typeof n)){var a=String(o);a.length>k&&(o="".concat(a.slice(0,k),"..."))}var s=function(t){t&&t.stopPropagation(),F(e)};return"function"===typeof N?function(e,t,n,r,i){return f.createElement("span",{onMouseDown:function(e){R(e),D(!l)}},N({label:t,value:e,disabled:n,closable:r,onClose:i}))}(r,o,t,i,s):ne(e,o,t,i,s)},renderRest:function(e){var t="function"===typeof L?L(e):L;return ne({title:t},t,!1)},suffix:re,itemKey:O,maxCount:P});return f.createElement(f.Fragment,null,ie,!a.length&&!ee&&f.createElement("span",{className:"".concat(J,"-placeholder")},h))};const L=function(e){var t=e.inputElement,n=e.prefixCls,r=e.id,i=e.inputRef,o=e.disabled,a=e.autoFocus,l=e.autoComplete,c=e.activeDescendantId,u=e.mode,d=e.open,h=e.values,p=e.placeholder,g=e.tabIndex,m=e.showSearch,v=e.searchValue,A=e.activeValue,y=e.maxLength,b=e.onInputKeyDown,_=e.onInputMouseDown,w=e.onInputChange,E=e.onInputPaste,S=e.onInputCompositionStart,P=e.onInputCompositionEnd,T=e.title,k=f.useState(!1),O=(0,s.Z)(k,2),R=O[0],I=O[1],L="combobox"===u,N=L||m,D=h[0],F=v||"";L&&A&&!R&&(F=A),f.useEffect((function(){L&&I(!1)}),[L,A]);var j=!("combobox"!==u&&!d&&!m)&&!!F,B=void 0===T?M(D):T,Z=f.useMemo((function(){return D?null:f.createElement("span",{className:"".concat(n,"-selection-placeholder"),style:j?{visibility:"hidden"}:void 0},p)}),[D,j,p,n]);return f.createElement(f.Fragment,null,f.createElement("span",{className:"".concat(n,"-selection-search")},f.createElement(C,{ref:i,prefixCls:n,id:r,open:d,inputElement:t,disabled:o,autoFocus:a,autoComplete:l,editable:N,activeDescendantId:c,value:F,onKeyDown:b,onMouseDown:_,onChange:function(e){I(!0),w(e)},onPaste:E,onCompositionStart:S,onCompositionEnd:P,tabIndex:g,attrs:(0,x.Z)(e,!0),maxLength:L?y:void 0})),!L&&D?f.createElement("span",{className:"".concat(n,"-selection-item"),title:B,style:j?{visibility:"hidden"}:void 0},D.label):null,Z)};var N=function(e,t){var n=(0,f.useRef)(null),i=(0,f.useRef)(!1),o=e.prefixCls,a=e.open,l=e.mode,c=e.showSearch,u=e.tokenWithEnter,d=e.autoClearSearchValue,h=e.onSearch,p=e.onSearchSubmit,g=e.onToggleOpen,m=e.onInputKeyDown,A=e.domRef;f.useImperativeHandle(t,(function(){return{focus:function(e){n.current.focus(e)},blur:function(){n.current.blur()}}}));var y=w(0),b=(0,s.Z)(y,2),_=b[0],x=b[1],E=(0,f.useRef)(null),S=function(e){!1!==h(e,!0,i.current)&&g(!0)},C={inputRef:n,onInputKeyDown:function(e){var t,n=e.which;n!==v.Z.UP&&n!==v.Z.DOWN||e.preventDefault(),m&&m(e),n!==v.Z.ENTER||"tags"!==l||i.current||a||null===p||void 0===p||p(e.target.value),t=n,[v.Z.ESC,v.Z.SHIFT,v.Z.BACKSPACE,v.Z.TAB,v.Z.WIN_KEY,v.Z.ALT,v.Z.META,v.Z.WIN_KEY_RIGHT,v.Z.CTRL,v.Z.SEMICOLON,v.Z.EQUALS,v.Z.CAPS_LOCK,v.Z.CONTEXT_MENU,v.Z.F1,v.Z.F2,v.Z.F3,v.Z.F4,v.Z.F5,v.Z.F6,v.Z.F7,v.Z.F8,v.Z.F9,v.Z.F10,v.Z.F11,v.Z.F12].includes(t)||g(!0)},onInputMouseDown:function(){x(!0)},onInputChange:function(e){var t=e.target.value;if(u&&E.current&&/[\r\n]/.test(E.current)){var n=E.current.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");t=t.replace(n,E.current)}E.current=null,S(t)},onInputPaste:function(e){var t=e.clipboardData,n=null===t||void 0===t?void 0:t.getData("text");E.current=n||""},onInputCompositionStart:function(){i.current=!0},onInputCompositionEnd:function(e){i.current=!1,"combobox"!==l&&S(e.target.value)}},P="multiple"===l||"tags"===l?f.createElement(I,(0,r.Z)({},e,C)):f.createElement(L,(0,r.Z)({},e,C));return f.createElement("div",{ref:A,className:"".concat(o,"-selector"),onClick:function(e){e.target!==n.current&&(void 0!==document.body.style.msTouchAction?setTimeout((function(){n.current.focus()})):n.current.focus())},onMouseDown:function(e){var t=_();e.target===n.current||t||"combobox"===l||e.preventDefault(),("combobox"===l||c&&t)&&a||(a&&!1!==d&&h("",!0,!1),g())}},P)};const D=f.forwardRef(N);var F=n(91084),j=["prefixCls","disabled","visible","children","popupElement","animation","transitionName","dropdownStyle","dropdownClassName","direction","placement","builtinPlacements","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","getPopupContainer","empty","getTriggerDOMNode","onPopupVisibleChange","onPopupMouseEnter"],B=function(e,t){var n=e.prefixCls,i=(e.disabled,e.visible),s=e.children,c=e.popupElement,u=e.animation,d=e.transitionName,h=e.dropdownStyle,g=e.dropdownClassName,m=e.direction,v=void 0===m?"ltr":m,A=e.placement,y=e.builtinPlacements,b=e.dropdownMatchSelectWidth,_=e.dropdownRender,w=e.dropdownAlign,x=e.getPopupContainer,E=e.empty,S=e.getTriggerDOMNode,C=e.onPopupVisibleChange,P=e.onPopupMouseEnter,T=(0,l.Z)(e,j),k="".concat(n,"-dropdown"),M=c;_&&(M=_(c));var O=f.useMemo((function(){return y||function(e){var t=!0===e?0:1;return{bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:t,adjustY:1},htmlRegion:"scroll"},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:t,adjustY:1},htmlRegion:"scroll"},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:t,adjustY:1},htmlRegion:"scroll"},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:t,adjustY:1},htmlRegion:"scroll"}}}(b)}),[y,b]),R=u?"".concat(k,"-").concat(u):d,I="number"===typeof b,L=f.useMemo((function(){return I?null:!1===b?"minWidth":"width"}),[b,I]),N=h;I&&(N=(0,a.Z)((0,a.Z)({},N),{},{width:b}));var D=f.useRef(null);return f.useImperativeHandle(t,(function(){return{getPopupElement:function(){return D.current}}})),f.createElement(F.Z,(0,r.Z)({},T,{showAction:C?["click"]:[],hideAction:C?["click"]:[],popupPlacement:A||("rtl"===v?"bottomRight":"bottomLeft"),builtinPlacements:O,prefixCls:k,popupTransitionName:R,popup:f.createElement("div",{ref:D,onMouseEnter:P},M),stretch:L,popupAlign:w,popupVisible:i,getPopupContainer:x,popupClassName:p()(g,(0,o.Z)({},"".concat(k,"-empty"),E)),popupStyle:N,getTriggerDOMNode:S,onPopupVisibleChange:C}),s)};const Z=f.forwardRef(B);var z=n(6827);function U(e,t){var n,r=e.key;return"value"in e&&(n=e.value),null!==r&&void 0!==r?r:void 0!==n?n:"rc-index-key-".concat(t)}function H(e){return"undefined"!==typeof e&&!Number.isNaN(e)}function V(e,t){var n=e||{},r=n.label||(t?"children":"label");return{label:r,value:n.value||"value",options:n.options||"options",groupLabel:n.groupLabel||r}}function W(e){var t=(0,a.Z)({},e);return"props"in t||Object.defineProperty(t,"props",{get:function(){return(0,d.ZP)(!1,"Return type is option instead of Option instance. Please read value directly instead of reading from `props`."),t}}),t}const G=f.createContext(null);var K=["id","prefixCls","className","showSearch","tagRender","direction","omitDomProps","displayValues","onDisplayValuesChange","emptyOptions","notFoundContent","onClear","mode","disabled","loading","getInputElement","getRawInputElement","open","defaultOpen","onDropdownVisibleChange","activeValue","onActiveValueChange","activeDescendantId","searchValue","autoClearSearchValue","onSearch","onSearchSplit","tokenSeparators","allowClear","suffixIcon","clearIcon","OptionList","animation","transitionName","dropdownStyle","dropdownClassName","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","placement","builtinPlacements","getPopupContainer","showAction","onFocus","onBlur","onKeyUp","onKeyDown","onMouseDown"],q=["value","onChange","removeIcon","placeholder","autoFocus","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown","onPopupScroll","tabIndex"],Y=function(e){return"tags"===e||"multiple"===e},X=f.forwardRef((function(e,t){var n,d=e.id,h=e.prefixCls,_=e.className,x=e.showSearch,E=e.tagRender,S=e.direction,C=e.omitDomProps,P=e.displayValues,T=e.onDisplayValuesChange,k=e.emptyOptions,M=e.notFoundContent,O=void 0===M?"Not Found":M,R=e.onClear,I=e.mode,L=e.disabled,N=e.loading,F=e.getInputElement,j=e.getRawInputElement,B=e.open,U=e.defaultOpen,V=e.onDropdownVisibleChange,W=e.activeValue,X=e.onActiveValueChange,$=e.activeDescendantId,Q=e.searchValue,J=e.autoClearSearchValue,ee=e.onSearch,te=e.onSearchSplit,ne=e.tokenSeparators,re=e.allowClear,ie=e.suffixIcon,oe=e.clearIcon,ae=e.OptionList,se=e.animation,le=e.transitionName,ce=e.dropdownStyle,ue=e.dropdownClassName,de=e.dropdownMatchSelectWidth,fe=e.dropdownRender,he=e.dropdownAlign,pe=e.placement,ge=e.builtinPlacements,me=e.getPopupContainer,ve=e.showAction,Ae=void 0===ve?[]:ve,ye=e.onFocus,be=e.onBlur,_e=e.onKeyUp,we=e.onKeyDown,xe=e.onMouseDown,Ee=(0,l.Z)(e,K),Se=Y(I),Ce=(void 0!==x?x:Se)||"combobox"===I,Pe=(0,a.Z)({},Ee);q.forEach((function(e){delete Pe[e]})),null===C||void 0===C||C.forEach((function(e){delete Pe[e]}));var Te=f.useState(!1),ke=(0,s.Z)(Te,2),Me=ke[0],Oe=ke[1];f.useEffect((function(){Oe((0,m.Z)())}),[]);var Re=f.useRef(null),Ie=f.useRef(null),Le=f.useRef(null),Ne=f.useRef(null),De=f.useRef(null),Fe=f.useRef(!1),je=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:10,t=f.useState(!1),n=(0,s.Z)(t,2),r=n[0],i=n[1],o=f.useRef(null),a=function(){window.clearTimeout(o.current)};return f.useEffect((function(){return a}),[]),[r,function(t,n){a(),o.current=window.setTimeout((function(){i(t),n&&n()}),e)},a]}(),Be=(0,s.Z)(je,3),Ze=Be[0],ze=Be[1],Ue=Be[2];f.useImperativeHandle(t,(function(){var e,t;return{focus:null===(e=Ne.current)||void 0===e?void 0:e.focus,blur:null===(t=Ne.current)||void 0===t?void 0:t.blur,scrollTo:function(e){var t;return null===(t=De.current)||void 0===t?void 0:t.scrollTo(e)}}}));var He=f.useMemo((function(){var e;if("combobox"!==I)return Q;var t=null===(e=P[0])||void 0===e?void 0:e.value;return"string"===typeof t||"number"===typeof t?String(t):""}),[Q,I,P]),Ve="combobox"===I&&"function"===typeof F&&F()||null,We="function"===typeof j&&j(),Ge=(0,A.x1)(Ie,null===We||void 0===We||null===(n=We.props)||void 0===n?void 0:n.ref),Ke=f.useState(!1),qe=(0,s.Z)(Ke,2),Ye=qe[0],Xe=qe[1];(0,g.Z)((function(){Xe(!0)}),[]);var $e=(0,u.Z)(!1,{defaultValue:U,value:B}),Qe=(0,s.Z)($e,2),Je=Qe[0],et=Qe[1],tt=!!Ye&&Je,nt=!O&&k;(L||nt&&tt&&"combobox"===I)&&(tt=!1);var rt=!nt&&tt,it=f.useCallback((function(e){var t=void 0!==e?e:!tt;L||(et(t),tt!==t&&(null===V||void 0===V||V(t)))}),[L,tt,et,V]),ot=f.useMemo((function(){return(ne||[]).some((function(e){return["\n","\r\n"].includes(e)}))}),[ne]),at=f.useContext(G)||{},st=at.maxCount,lt=at.rawValues,ct=function(e,t,n){if(!(Se&&H(st)&&(null===lt||void 0===lt?void 0:lt.size)>=st)){var r=!0,o=e;null===X||void 0===X||X(null);var a=function(e,t,n){if(!t||!t.length)return null;var r=!1,o=function e(t,n){var o=(0,z.Z)(n),a=o[0],s=o.slice(1);if(!a)return[t];var l=t.split(a);return r=r||l.length>1,l.reduce((function(t,n){return[].concat((0,i.Z)(t),(0,i.Z)(e(n,s)))}),[]).filter(Boolean)}(e,t);return r?"undefined"!==typeof n?o.slice(0,n):o:null}(e,ne,H(st)?st-lt.size:void 0),s=n?null:a;return"combobox"!==I&&s&&(o="",null===te||void 0===te||te(s),it(!1),r=!1),ee&&He!==o&&ee(o,{source:t?"typing":"effect"}),r}};f.useEffect((function(){tt||Se||"combobox"===I||ct("",!1,!1)}),[tt]),f.useEffect((function(){Je&&L&&et(!1),L&&!Fe.current&&ze(!1)}),[L]);var ut=w(),dt=(0,s.Z)(ut,2),ft=dt[0],ht=dt[1],pt=f.useRef(!1),gt=[];f.useEffect((function(){return function(){gt.forEach((function(e){return clearTimeout(e)})),gt.splice(0,gt.length)}}),[]);var mt,vt=f.useState({}),At=(0,s.Z)(vt,2)[1];We&&(mt=function(e){it(e)}),function(e,t,n,r){var i=f.useRef(null);i.current={open:t,triggerOpen:n,customizedTrigger:r},f.useEffect((function(){function t(t){var n;if(null===(n=i.current)||void 0===n||!n.customizedTrigger){var r=t.target;r.shadowRoot&&t.composed&&(r=t.composedPath()[0]||r),i.current.open&&e().filter((function(e){return e})).every((function(e){return!e.contains(r)&&e!==r}))&&i.current.triggerOpen(!1)}}return window.addEventListener("mousedown",t),function(){return window.removeEventListener("mousedown",t)}}),[])}((function(){var e;return[Re.current,null===(e=Le.current)||void 0===e?void 0:e.getPopupElement()]}),rt,it,!!We);var yt,bt=f.useMemo((function(){return(0,a.Z)((0,a.Z)({},e),{},{notFoundContent:O,open:tt,triggerOpen:rt,id:d,showSearch:Ce,multiple:Se,toggleOpen:it})}),[e,O,rt,tt,d,Ce,Se,it]),_t=!!ie||N;_t&&(yt=f.createElement(y,{className:p()("".concat(h,"-arrow"),(0,o.Z)({},"".concat(h,"-arrow-loading"),N)),customizeIcon:ie,customizeIconProps:{loading:N,searchValue:He,open:tt,focused:Ze,showSearch:Ce}}));var wt,xt=function(e,t,n,r,i){var o=arguments.length>5&&void 0!==arguments[5]&&arguments[5],a=arguments.length>6?arguments[6]:void 0,s=arguments.length>7?arguments[7]:void 0,l=f.useMemo((function(){return"object"===(0,c.Z)(r)?r.clearIcon:i||void 0}),[r,i]);return{allowClear:f.useMemo((function(){return!(o||!r||!n.length&&!a||"combobox"===s&&""===a)}),[r,o,n.length,a,s]),clearIcon:f.createElement(y,{className:"".concat(e,"-clear"),onMouseDown:t,customizeIcon:l},"\xd7")}}(h,(function(){var e;null===R||void 0===R||R(),null===(e=Ne.current)||void 0===e||e.focus(),T([],{type:"clear",values:P}),ct("",!1,!1)}),P,re,oe,L,He,I),Et=xt.allowClear,St=xt.clearIcon,Ct=f.createElement(ae,{ref:De}),Pt=p()(h,_,(0,o.Z)((0,o.Z)((0,o.Z)((0,o.Z)((0,o.Z)((0,o.Z)((0,o.Z)((0,o.Z)((0,o.Z)((0,o.Z)({},"".concat(h,"-focused"),Ze),"".concat(h,"-multiple"),Se),"".concat(h,"-single"),!Se),"".concat(h,"-allow-clear"),re),"".concat(h,"-show-arrow"),_t),"".concat(h,"-disabled"),L),"".concat(h,"-loading"),N),"".concat(h,"-open"),tt),"".concat(h,"-customize-input"),Ve),"".concat(h,"-show-search"),Ce)),Tt=f.createElement(Z,{ref:Le,disabled:L,prefixCls:h,visible:rt,popupElement:Ct,animation:se,transitionName:le,dropdownStyle:ce,dropdownClassName:ue,direction:S,dropdownMatchSelectWidth:de,dropdownRender:fe,dropdownAlign:he,placement:pe,builtinPlacements:ge,getPopupContainer:me,empty:k,getTriggerDOMNode:function(){return Ie.current},onPopupVisibleChange:mt,onPopupMouseEnter:function(){At({})}},We?f.cloneElement(We,{ref:Ge}):f.createElement(D,(0,r.Z)({},e,{domRef:Ie,prefixCls:h,inputElement:Ve,ref:Ne,id:d,showSearch:Ce,autoClearSearchValue:J,mode:I,activeDescendantId:$,tagRender:E,values:P,open:tt,onToggleOpen:it,activeValue:W,searchValue:He,onSearch:ct,onSearchSubmit:function(e){e&&e.trim()&&ee(e,{source:"submit"})},onRemove:function(e){var t=P.filter((function(t){return t!==e}));T(t,{type:"remove",values:[e]})},tokenWithEnter:ot})));return wt=We?Tt:f.createElement("div",(0,r.Z)({className:Pt},Pe,{ref:Re,onMouseDown:function(e){var t,n=e.target,r=null===(t=Le.current)||void 0===t?void 0:t.getPopupElement();if(r&&r.contains(n)){var i=setTimeout((function(){var e,t=gt.indexOf(i);-1!==t&>.splice(t,1),Ue(),Me||r.contains(document.activeElement)||null===(e=Ne.current)||void 0===e||e.focus()}));gt.push(i)}for(var o=arguments.length,a=new Array(o>1?o-1:0),s=1;s=0;s-=1){var l=o[s];if(!l.disabled){o.splice(s,1),a=l;break}}a&&T(o,{type:"remove",values:[a]})}for(var c=arguments.length,u=new Array(c>1?c-1:0),d=1;d1?t-1:0),r=1;r=E}),[d,E,null===M||void 0===M?void 0:M.size]),z=function(e){e.preventDefault()},U=function(e){var t;null===(t=B.current)||void 0===t||t.scrollTo("number"===typeof e?{index:e}:e)},V=function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=j.length,r=0;r1&&void 0!==arguments[1]&&arguments[1];Y(e);var n={source:t?"keyboard":"mouse"},r=j[e];r?C(r.value,e,n):C(null,-1,n)};(0,f.useEffect)((function(){X(!1!==P?V(0):-1)}),[j.length,g]);var $=f.useCallback((function(e){return M.has(e)&&"combobox"!==h}),[h,(0,i.Z)(M).toString(),M.size]);(0,f.useEffect)((function(){var e,t=setTimeout((function(){if(!d&&u&&1===M.size){var e=Array.from(M)[0],t=j.findIndex((function(t){return t.data.value===e}));-1!==t&&(X(t),U(t))}}));u&&(null===(e=B.current)||void 0===e||e.scrollTo(void 0));return function(){return clearTimeout(t)}}),[u,g]);var Q=function(e){void 0!==e&&T(e,{selected:!M.has(e)}),d||m(!1)};if(f.useImperativeHandle(t,(function(){return{onKeyDown:function(e){var t=e.which,n=e.ctrlKey;switch(t){case v.Z.N:case v.Z.P:case v.Z.UP:case v.Z.DOWN:var r=0;if(t===v.Z.UP?r=-1:t===v.Z.DOWN?r=1:/(mac\sos|macintosh)/i.test(navigator.appVersion)&&n&&(t===v.Z.N?r=1:t===v.Z.P&&(r=-1)),0!==r){var i=V(q+r,r);U(i),X(i,!0)}break;case v.Z.ENTER:var o,a=j[q];!a||null!==a&&void 0!==a&&null!==(o=a.data)&&void 0!==o&&o.disabled||Z?Q(void 0):Q(a.value),u&&e.preventDefault();break;case v.Z.ESC:m(!1),u&&e.stopPropagation()}},onKeyUp:function(){},scrollTo:function(e){U(e)}}})),0===j.length)return f.createElement("div",{role:"listbox",id:"".concat(c,"_list"),className:"".concat(F,"-empty"),onMouseDown:z},A);var J=Object.keys(O).map((function(e){return O[e]})),ee=function(e){return e.label};function te(e,t){return{role:e.group?"presentation":"option",id:"".concat(c,"_list_").concat(t)}}var se=function(e){var t=j[e];if(!t)return null;var n=t.data||{},i=n.value,o=t.group,a=(0,x.Z)(n,!0),s=ee(t);return t?f.createElement("div",(0,r.Z)({"aria-label":"string"!==typeof s||o?null:s},a,{key:e},te(t,e),{"aria-selected":$(i)}),i):null},le={role:"listbox",id:"".concat(c,"_list")};return f.createElement(f.Fragment,null,R&&f.createElement("div",(0,r.Z)({},le,{style:{height:0,width:0,overflow:"hidden"}}),se(q-1),se(q),se(q+1)),f.createElement(ie.Z,{itemKey:"key",ref:B,data:j,height:L,itemHeight:N,fullHeight:!1,onMouseDown:z,onScroll:b,virtual:R,direction:I,innerProps:R?null:le},(function(e,t){var n=e.group,i=e.groupOption,a=e.data,s=e.label,c=e.value,u=a.key;if(n){var d,h=null!==(d=a.title)&&void 0!==d?d:ae(s)?s.toString():void 0;return f.createElement("div",{className:p()(F,"".concat(F,"-group"),a.className),title:h},void 0!==s?s:u)}var g=a.disabled,m=a.title,v=(a.children,a.style),A=a.className,b=(0,l.Z)(a,oe),_=(0,re.Z)(b,J),w=$(c),E=g||!w&&Z,S="".concat(F,"-option"),C=p()(F,S,A,(0,o.Z)((0,o.Z)((0,o.Z)((0,o.Z)({},"".concat(S,"-grouped"),i),"".concat(S,"-active"),q===t&&!E),"".concat(S,"-disabled"),E),"".concat(S,"-selected"),w)),P=ee(e),T=!k||"function"===typeof k||w,M="number"===typeof P?P:P||c,O=ae(M)?M.toString():void 0;return void 0!==m&&(O=m),f.createElement("div",(0,r.Z)({},(0,x.Z)(_),R?{}:te(e,t),{"aria-selected":w,className:C,title:O,onMouseMove:function(){q===t||E||X(t)},onClick:function(){E||Q(c)},style:v}),f.createElement("div",{className:"".concat(S,"-content")},"function"===typeof D?D(e,{index:t}):M),f.isValidElement(k)||w,T&&f.createElement(y,{className:"".concat(F,"-option-state"),customizeIcon:k,customizeIconProps:{value:c,disabled:E,isSelected:w}},w?"\u2713":null))})))};const le=f.forwardRef(se);function ce(e,t){return P(e).join("").toUpperCase().includes(t)}var ue=n(62018),de=n(52353),fe=["children","value"],he=["children"];function pe(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return(0,de.Z)(e).map((function(e,n){if(!f.isValidElement(e)||!e.type)return null;var r=e,i=r.type.isSelectOptGroup,o=r.key,s=r.props,c=s.children,u=(0,l.Z)(s,he);return t||!i?function(e){var t=e,n=t.key,r=t.props,i=r.children,o=r.value,s=(0,l.Z)(r,fe);return(0,a.Z)({key:n,value:void 0!==o?o:n,children:i},s)}(e):(0,a.Z)((0,a.Z)({key:"__RC_SELECT_GRP__".concat(null===o?n:o,"__"),label:o},u),{},{options:pe(c)})})).filter((function(e){return e}))}const ge=function(e,t,n,r,i){return f.useMemo((function(){var o=e;!e&&(o=pe(t));var a=new Map,s=new Map,l=function(e,t,n){n&&"string"===typeof n&&e.set(t[n],t)};return function e(t){for(var o=arguments.length>1&&void 0!==arguments[1]&&arguments[1],c=0;c1&&void 0!==arguments[1]?arguments[1]:{},n=t.fieldNames,r=t.childrenAsData,i=[],o=V(n,!1),a=o.label,s=o.value,l=o.options,c=o.groupLabel;return function e(t,n){Array.isArray(t)&&t.forEach((function(t){if(n||!(l in t)){var o=t[s];i.push({key:U(t,i.length),groupOption:n,data:t,label:t[a],value:o})}else{var u=t[c];void 0===u&&r&&(u=t.label),i.push({key:U(t,i.length),group:!0,data:t,label:u}),e(t[l],!0)}}))}(e,!1),i}(De,{fieldNames:oe,childrenAsData:re})}),[De,oe,re]),je=function(e){var t=_e(e);if(Se(t),Q&&(t.length!==ke.length||t.some((function(e,t){var n;return(null===(n=ke[t])||void 0===n?void 0:n.value)!==(null===e||void 0===e?void 0:e.value)})))){var n=X?t:t.map((function(e){return e.value})),r=t.map((function(e){return W(Me(e.value))}));Q(ne?n:n[0],ne?r:r[0])}},Be=f.useState(null),Ze=(0,s.Z)(Be,2),ze=Ze[0],Ue=Ze[1],He=f.useState(0),Ve=(0,s.Z)(He,2),We=Ve[0],Ge=Ve[1],Ke=void 0!==L?L:"combobox"!==d,qe=f.useCallback((function(e,t){var n=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).source,r=void 0===n?"keyboard":n;Ge(t),g&&"combobox"===d&&null!==e&&"keyboard"===r&&Ue(String(e))}),[g,d]),Ye=function(e,t,n){var r=function(){var t,n=Me(e);return[X?{label:null===n||void 0===n?void 0:n[oe.label],value:e,key:null!==(t=null===n||void 0===n?void 0:n.key)&&void 0!==t?t:e}:e,W(n)]};if(t&&w){var i=r(),o=(0,s.Z)(i,2),a=o[0],l=o[1];w(a,l)}else if(!t&&x&&"clear"!==n){var c=r(),u=(0,s.Z)(c,2),d=u[0],f=u[1];x(d,f)}},Xe=me((function(e,t){var n,r=!ne||t.selected;n=r?ne?[].concat((0,i.Z)(ke),[e]):[e]:ke.filter((function(t){return t.value!==e})),je(n),Ye(e,r),"combobox"===d?Ue(""):Y&&!_||(fe(""),Ue(""))})),$e=f.useMemo((function(){var e=!1!==D&&!1!==S;return(0,a.Z)((0,a.Z)({},he),{},{flattenOptions:Fe,onActiveValue:qe,defaultActiveFirstOption:Ke,onSelect:Xe,menuItemSelectedIcon:N,rawValues:Re,fieldNames:oe,virtual:e,direction:F,listHeight:B,listItemHeight:z,childrenAsData:re,maxCount:J,optionRender:R})}),[J,he,Fe,qe,Ke,Xe,N,Re,oe,D,S,F,B,z,re,R]);return f.createElement(G.Provider,{value:$e},f.createElement($,(0,r.Z)({},ee,{id:te,prefixCls:p,ref:t,omitDomProps:Ae,mode:d,displayValues:Oe,onDisplayValuesChange:function(e,t){je(e);var n=t.type,r=t.values;"remove"!==n&&"clear"!==n||r.forEach((function(e){Ye(e.value,!1,n)}))},direction:F,searchValue:de,onSearch:function(e,t){if(fe(e),Ue(null),"submit"!==t.source)"blur"!==t.source&&("combobox"===d&&je(e),null===y||void 0===y||y(e));else{var n=(e||"").trim();if(n){var r=Array.from(new Set([].concat((0,i.Z)(Re),[n])));je(r),Ye(n,!0),fe("")}}},autoClearSearchValue:_,onSearchSplit:function(e){var t=e;"tags"!==d&&(t=e.map((function(e){var t=ye.get(e);return null===t||void 0===t?void 0:t.value})).filter((function(e){return void 0!==e})));var n=Array.from(new Set([].concat((0,i.Z)(Re),(0,i.Z)(t))));je(n),n.forEach((function(e){Ye(e,!0)}))},dropdownMatchSelectWidth:S,OptionList:le,emptyOptions:!Fe.length,activeValue:ze,activeDescendantId:"".concat(te,"_list_").concat(We)})))}));ye.Option=te,ye.OptGroup=J;const be=ye},36809:(e,t,n)=>{"use strict";n.d(t,{Z:()=>R});var r=n(35194),i=n(68185),o=n(22368),a=n(13747),s=n(69223),l=n(12356),c=n.n(l),u=n(88258),d=n(46032),f=n(98162),h=n(57435);const p=h.createContext({min:0,max:0,direction:"ltr",step:1,includedStart:0,includedEnd:0,tabIndex:0,keyboard:!0,styles:{},classNames:{}});var g=n(91010),m=n(99309),v=n(98475);function A(e,t,n){return(e-t)/(n-t)}function y(e,t,n,r){var i=A(t,n,r),o={};switch(e){case"rtl":o.right="".concat(100*i,"%"),o.transform="translateX(50%)";break;case"btt":o.bottom="".concat(100*i,"%"),o.transform="translateY(50%)";break;case"ttb":o.top="".concat(100*i,"%"),o.transform="translateY(-50%)";break;default:o.left="".concat(100*i,"%"),o.transform="translateX(-50%)"}return o}function b(e,t){return Array.isArray(e)?e[t]:e}var _=["prefixCls","value","valueIndex","onStartMove","style","render","dragging","onOffsetChange","onChangeComplete"];const w=h.forwardRef((function(e,t){var n,o,a=e.prefixCls,s=e.value,l=e.valueIndex,u=e.onStartMove,d=e.style,f=e.render,A=e.dragging,w=e.onOffsetChange,x=e.onChangeComplete,E=(0,m.Z)(e,_),S=h.useContext(p),C=S.min,P=S.max,T=S.direction,k=S.disabled,M=S.keyboard,O=S.range,R=S.tabIndex,I=S.ariaLabelForHandle,L=S.ariaLabelledByForHandle,N=S.ariaValueTextFormatterForHandle,D=S.styles,F=S.classNames,j="".concat(a,"-handle"),B=function(e){k||u(e,l)},Z=y(T,s,C,P),z=h.createElement("div",(0,g.Z)({ref:t,className:c()(j,(n={},(0,i.Z)(n,"".concat(j,"-").concat(l+1),O),(0,i.Z)(n,"".concat(j,"-dragging"),A),n),F.handle),style:(0,r.Z)((0,r.Z)((0,r.Z)({},Z),d),D.handle),onMouseDown:B,onTouchStart:B,onKeyDown:function(e){if(!k&&M){var t=null;switch(e.which||e.keyCode){case v.Z.LEFT:t="ltr"===T||"btt"===T?-1:1;break;case v.Z.RIGHT:t="ltr"===T||"btt"===T?1:-1;break;case v.Z.UP:t="ttb"!==T?1:-1;break;case v.Z.DOWN:t="ttb"!==T?-1:1;break;case v.Z.HOME:t="min";break;case v.Z.END:t="max";break;case v.Z.PAGE_UP:t=2;break;case v.Z.PAGE_DOWN:t=-2}null!==t&&(e.preventDefault(),w(t,l))}},onKeyUp:function(e){switch(e.which||e.keyCode){case v.Z.LEFT:case v.Z.RIGHT:case v.Z.UP:case v.Z.DOWN:case v.Z.HOME:case v.Z.END:case v.Z.PAGE_UP:case v.Z.PAGE_DOWN:null===x||void 0===x||x()}},tabIndex:k?null:b(R,l),role:"slider","aria-valuemin":C,"aria-valuemax":P,"aria-valuenow":s,"aria-disabled":k,"aria-label":b(I,l),"aria-labelledby":b(L,l),"aria-valuetext":null===(o=b(N,l))||void 0===o?void 0:o(s),"aria-orientation":"ltr"===T||"rtl"===T?"horizontal":"vertical"},E));return f&&(z=f(z,{index:l,prefixCls:a,value:s,dragging:A})),z}));var x=["prefixCls","style","onStartMove","onOffsetChange","values","handleRender","draggingIndex"];const E=h.forwardRef((function(e,t){var n=e.prefixCls,r=e.style,i=e.onStartMove,o=e.onOffsetChange,a=e.values,s=e.handleRender,l=e.draggingIndex,c=(0,m.Z)(e,x),u=h.useRef({});return h.useImperativeHandle(t,(function(){return{focus:function(e){var t;null===(t=u.current[e])||void 0===t||t.focus()}}})),h.createElement(h.Fragment,null,a.map((function(e,t){return h.createElement(w,(0,g.Z)({ref:function(e){e?u.current[t]=e:delete u.current[t]},dragging:l===t,prefixCls:n,style:b(r,t),key:t,value:e,valueIndex:t,onStartMove:i,onOffsetChange:o,render:s},c))})))}));function S(e){var t="touches"in e?e.touches[0]:e;return{pageX:t.pageX,pageY:t.pageY}}function C(e){var t=e.prefixCls,n=e.style,o=e.children,a=e.value,s=e.onClick,l=h.useContext(p),u=l.min,d=l.max,f=l.direction,g=l.includedStart,m=l.includedEnd,v=l.included,A="".concat(t,"-text"),b=y(f,a,u,d);return h.createElement("span",{className:c()(A,(0,i.Z)({},"".concat(A,"-active"),v&&g<=a&&a<=m)),style:(0,r.Z)((0,r.Z)({},b),n),onMouseDown:function(e){e.stopPropagation()},onClick:function(){s(a)}},o)}function P(e){var t=e.prefixCls,n=e.marks,r=e.onClick,i="".concat(t,"-mark");return n.length?h.createElement("div",{className:i},n.map((function(e){var t=e.value,n=e.style,o=e.label;return h.createElement(C,{key:t,prefixCls:i,style:n,value:t,onClick:r},o)}))):null}function T(e){var t=e.prefixCls,n=e.value,o=e.style,a=e.activeStyle,s=h.useContext(p),l=s.min,u=s.max,d=s.direction,f=s.included,g=s.includedStart,m=s.includedEnd,v="".concat(t,"-dot"),A=f&&g<=n&&n<=m,b=(0,r.Z)((0,r.Z)({},y(d,n,l,u)),"function"===typeof o?o(n):o);return A&&(b=(0,r.Z)((0,r.Z)({},b),"function"===typeof a?a(n):a)),h.createElement("span",{className:c()(v,(0,i.Z)({},"".concat(v,"-active"),A)),style:b})}function k(e){var t=e.prefixCls,n=e.marks,r=e.dots,i=e.style,o=e.activeStyle,a=h.useContext(p),s=a.min,l=a.max,c=a.step,u=h.useMemo((function(){var e=new Set;if(n.forEach((function(t){e.add(t.value)})),r&&null!==c)for(var t=s;t<=l;)e.add(t),t+=c;return Array.from(e)}),[s,l,c,r,n]);return h.createElement("div",{className:"".concat(t,"-step")},u.map((function(e){return h.createElement(T,{prefixCls:t,key:e,value:e,style:i,activeStyle:o})})))}function M(e){var t,n=e.prefixCls,o=e.style,a=e.start,s=e.end,l=e.index,u=e.onStartMove,d=e.replaceCls,f=h.useContext(p),g=f.direction,m=f.min,v=f.max,y=f.disabled,b=f.range,_=f.classNames,w="".concat(n,"-track"),x=A(a,m,v),E=A(s,m,v),S=function(e){!y&&u&&u(e,-1)},C={};switch(g){case"rtl":C.right="".concat(100*x,"%"),C.width="".concat(100*E-100*x,"%");break;case"btt":C.bottom="".concat(100*x,"%"),C.height="".concat(100*E-100*x,"%");break;case"ttb":C.top="".concat(100*x,"%"),C.height="".concat(100*E-100*x,"%");break;default:C.left="".concat(100*x,"%"),C.width="".concat(100*E-100*x,"%")}var P=d||c()(w,(t={},(0,i.Z)(t,"".concat(w,"-").concat(l+1),null!==l&&b),(0,i.Z)(t,"".concat(n,"-track-draggable"),u),t),_.track);return h.createElement("div",{className:P,style:(0,r.Z)((0,r.Z)({},C),o),onMouseDown:S,onTouchStart:S})}function O(e){var t=e.prefixCls,n=e.style,i=e.values,o=e.startPoint,a=e.onStartMove,s=h.useContext(p),l=s.included,u=s.range,d=s.min,f=s.styles,g=s.classNames,m=h.useMemo((function(){if(!u){if(0===i.length)return[];var e=null!==o&&void 0!==o?o:d,t=i[0];return[{start:Math.min(e,t),end:Math.max(e,t)}]}for(var n=[],r=0;r=0&&Y}),[Y,be]),we=h.useMemo((function(){return Object.keys(se||{}).map((function(e){var t=se[e],n={value:Number(e)};return t&&"object"===(0,s.Z)(t)&&!h.isValidElement(t)&&("label"in t||"style"in t)?(n.style=t.style,n.label=t.label):n.label=t,n})).filter((function(e){var t=e.label;return t||"number"===typeof t})).sort((function(e,t){return e.value-t.value}))}),[se]),xe=function(e,t,n,r,i,a){var s=h.useCallback((function(n){var r=isFinite(n)?n:e;return r=Math.min(t,n),Math.max(e,r)}),[e,t]),l=h.useCallback((function(r){if(null!==n){var i=e+Math.round((s(r)-e)/n)*n,o=function(e){return(String(e).split(".")[1]||"").length},a=Math.max(o(n),o(t),o(e)),l=Number(i.toFixed(a));return e<=l&&l<=t?l:null}return null}),[n,e,t,s]),c=h.useCallback((function(i){var o=s(i),a=r.map((function(e){return e.value}));null!==n&&a.push(l(i)),a.push(e,t);var c=a[0],u=t-e;return a.forEach((function(e){var t=Math.abs(o-e);t<=u&&(c=e,u=t)})),c}),[e,t,r,n,s,l]),u=function i(a,s,c){var u=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"unit";if("number"===typeof s){var d,f=a[c],h=f+s,p=[];r.forEach((function(e){p.push(e.value)})),p.push(e,t),p.push(l(f));var g=s>0?1:-1;"unit"===u?p.push(l(f+g*n)):p.push(l(h)),p=p.filter((function(e){return null!==e})).filter((function(e){return s<0?e<=f:e>=f})),"unit"===u&&(p=p.filter((function(e){return e!==f})));var m="unit"===u?f:h;d=p[0];var v=Math.abs(d-m);if(p.forEach((function(e){var t=Math.abs(e-m);t1){var A=(0,o.Z)(a);return A[c]=d,i(A,s-g,c,u)}return d}return"min"===s?e:"max"===s?t:void 0},d=function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"unit",i=e[n],o=u(e,t,n,r);return{value:o,changed:o!==i}},f=function(e){return null===a&&0===e||"number"===typeof a&&e3&&void 0!==arguments[3]?arguments[3]:"unit",o=e.map(c),s=o[n],l=u(o,t,n,r);if(o[n]=l,!1===i){var h=a||0;n>0&&o[n-1]!==s&&(o[n]=Math.max(o[n],o[n-1]+h)),n0;v-=1)for(var A=!0;f(o[v]-o[v-1])&&A;){var y=d(o,-1,v-1);o[v-1]=y.value,A=y.changed}for(var b=o.length-1;b>0;b-=1)for(var _=!0;f(o[b]-o[b-1])&&_;){var w=d(o,-1,b-1);o[b-1]=w.value,_=w.changed}for(var x=0;x=0?z+1:2;for(n=n.slice(0,r);n.length=0&&ge.current.focus(e)}Ge(null)}),[We]);var Ke=h.useMemo((function(){return(!X||null!==be)&&X}),[X,be]),qe=function(e,t){ze(e,t),null===H||void 0===H||H(Ie(Re.current))},Ye=-1!==je;h.useEffect((function(){if(!Ye){var e=Oe.lastIndexOf(Be);ge.current.focus(e)}}),[Ye]);var Xe=h.useMemo((function(){return(0,o.Z)(Ze).sort((function(e,t){return e-t}))}),[Ze]),$e=h.useMemo((function(){return Z?[Xe[0],Xe[Xe.length-1]]:[Ae,Xe[0]]}),[Xe,Z,Ae]),Qe=(0,a.Z)($e,2),Je=Qe[0],et=Qe[1];h.useImperativeHandle(t,(function(){return{focus:function(){ge.current.focus(0)},blur:function(){var e=document.activeElement;me.current.contains(e)&&(null===e||void 0===e||e.blur())}}})),h.useEffect((function(){C&&ge.current.focus(0)}),[]);var tt=h.useMemo((function(){return{min:Ae,max:ye,direction:ve,disabled:_,keyboard:x,step:be,included:ee,includedStart:Je,includedEnd:et,range:Z,tabIndex:de,ariaLabelForHandle:fe,ariaLabelledByForHandle:he,ariaValueTextFormatterForHandle:pe,styles:y||{},classNames:A||{}}}),[Ae,ye,ve,_,x,be,ee,Je,et,Z,de,fe,he,pe,y,A]);return h.createElement(p.Provider,{value:tt},h.createElement("div",{ref:me,className:c()(g,m,(n={},(0,i.Z)(n,"".concat(g,"-disabled"),_),(0,i.Z)(n,"".concat(g,"-vertical"),Q),(0,i.Z)(n,"".concat(g,"-horizontal"),!Q),(0,i.Z)(n,"".concat(g,"-with-marks"),we.length),n)),style:v,onMouseDown:function(e){e.preventDefault();var t,n=me.current.getBoundingClientRect(),r=n.width,i=n.height,o=n.left,a=n.top,s=n.bottom,l=n.right,c=e.clientX,u=e.clientY;switch(ve){case"btt":t=(s-u)/i;break;case"ttb":t=(u-a)/i;break;case"rtl":t=(l-c)/r;break;default:t=(c-o)/r}Ue(Se(Ae+t*(ye-Ae)),e)}},h.createElement("div",{className:c()("".concat(g,"-rail"),null===A||void 0===A?void 0:A.rail),style:(0,r.Z)((0,r.Z)({},ie),null===y||void 0===y?void 0:y.rail)}),h.createElement(O,{prefixCls:g,style:ne,values:Xe,startPoint:te,onStartMove:Ke?qe:null}),h.createElement(k,{prefixCls:g,marks:we,dots:le,style:oe,activeStyle:ae}),h.createElement(E,{ref:ge,prefixCls:g,style:re,values:Ze,draggingIndex:je,onStartMove:qe,onOffsetChange:function(e,t){if(!_){var n=Ce(Oe,e,t);null===H||void 0===H||H(Ie(Oe)),Le(n.values),Ge(n.value)}},onFocus:T,onBlur:M,handleRender:ce,onChangeComplete:Ne}),h.createElement(P,{prefixCls:g,marks:we,onClick:Ue})))}))},52388:(e,t,n)=>{"use strict";n.d(t,{Z:()=>p});var r=n(91010),i=n(68185),o=n(13747),a=n(99309),s=n(57435),l=n(12356),c=n.n(l),u=n(88258),d=n(98475),f=["prefixCls","className","checked","defaultChecked","disabled","loadingIcon","checkedChildren","unCheckedChildren","onClick","onChange","onKeyDown"],h=s.forwardRef((function(e,t){var n,l=e.prefixCls,h=void 0===l?"rc-switch":l,p=e.className,g=e.checked,m=e.defaultChecked,v=e.disabled,A=e.loadingIcon,y=e.checkedChildren,b=e.unCheckedChildren,_=e.onClick,w=e.onChange,x=e.onKeyDown,E=(0,a.Z)(e,f),S=(0,u.Z)(!1,{value:g,defaultValue:m}),C=(0,o.Z)(S,2),P=C[0],T=C[1];function k(e,t){var n=P;return v||(T(n=e),null===w||void 0===w||w(n,t)),n}var M=c()(h,p,(n={},(0,i.Z)(n,"".concat(h,"-checked"),P),(0,i.Z)(n,"".concat(h,"-disabled"),v),n));return s.createElement("button",(0,r.Z)({},E,{type:"button",role:"switch","aria-checked":P,disabled:v,className:M,ref:t,onKeyDown:function(e){e.which===d.Z.LEFT?k(!1,e):e.which===d.Z.RIGHT&&k(!0,e),null===x||void 0===x||x(e)},onClick:function(e){var t=k(!P,e);null===_||void 0===_||_(t,e)}}),A,s.createElement("span",{className:"".concat(h,"-inner")},s.createElement("span",{className:"".concat(h,"-inner-checked")},y),s.createElement("span",{className:"".concat(h,"-inner-unchecked")},b)))}));h.displayName="Switch";const p=h},47972:(e,t,n)=>{"use strict";n.d(t,{Z:()=>X});var r=n(91010),i=n(68185),o=n(35194),a=n(13747),s=n(69223),l=n(99309),c=n(12356),u=n.n(c),d=n(88258),f=n(90479),h=n(57435);const p=(0,h.createContext)(null);var g=n(22368),m=n(61236),v=n(73165),A=n(43903),y=n(51882);const b=function(e){var t=e.activeTabOffset,n=e.horizontal,r=e.rtl,i=e.indicator,o=void 0===i?{}:i,s=o.size,l=o.align,c=void 0===l?"center":l,u=(0,h.useState)(),d=(0,a.Z)(u,2),f=d[0],p=d[1],g=(0,h.useRef)(),m=h.useCallback((function(e){return"function"===typeof s?s(e):"number"===typeof s?s:e}),[s]);function v(){y.Z.cancel(g.current)}return(0,h.useEffect)((function(){var e={};if(t)if(n){e.width=m(t.width);var i=r?"right":"left";"start"===c&&(e[i]=t[i]),"center"===c&&(e[i]=t[i]+t.width/2,e.transform=r?"translateX(50%)":"translateX(-50%)"),"end"===c&&(e[i]=t[i]+t.width,e.transform="translateX(-100%)")}else e.height=m(t.height),"start"===c&&(e.top=t.top),"center"===c&&(e.top=t.top+t.height/2,e.transform="translateY(-50%)"),"end"===c&&(e.top=t.top+t.height,e.transform="translateY(-100%)");return v(),g.current=(0,y.Z)((function(){p(e)})),v}),[t,n,r,c,m]),{style:f}};var _={width:0,height:0,left:0,top:0};function w(e,t){var n=h.useRef(e),r=h.useState({}),i=(0,a.Z)(r,2)[1];return[n.current,function(e){var r="function"===typeof e?e(n.current):e;r!==n.current&&t(r,n.current),n.current=r,i({})}]}var x=Math.pow(.995,20);var E=n(12750);function S(e){var t=(0,h.useState)(0),n=(0,a.Z)(t,2),r=n[0],i=n[1],o=(0,h.useRef)(0),s=(0,h.useRef)();return s.current=e,(0,E.o)((function(){var e;null===(e=s.current)||void 0===e||e.call(s)}),[r]),function(){o.current===r&&(o.current+=1,i(o.current))}}var C={width:0,height:0,left:0,top:0,right:0};function P(e){var t;return e instanceof Map?(t={},e.forEach((function(e,n){t[n]=e}))):t=e,JSON.stringify(t)}function T(e){return String(e).replace(/"/g,"TABS_DQ")}function k(e,t,n,r){return!(!n||r||!1===e||void 0===e&&(!1===t||null===t))}const M=h.forwardRef((function(e,t){var n=e.prefixCls,r=e.editable,i=e.locale,o=e.style;return r&&!1!==r.showAdd?h.createElement("button",{ref:t,type:"button",className:"".concat(n,"-nav-add"),style:o,"aria-label":(null===i||void 0===i?void 0:i.addAriaLabel)||"Add tab",onClick:function(e){r.onEdit("add",{event:e})}},r.addIcon||"+"):null}));const O=h.forwardRef((function(e,t){var n,r=e.position,i=e.prefixCls,o=e.extra;if(!o)return null;var a={};return"object"!==(0,s.Z)(o)||h.isValidElement(o)?a.right=o:a=o,"right"===r&&(n=a.right),"left"===r&&(n=a.left),n?h.createElement("div",{className:"".concat(i,"-extra-content"),ref:t},n):null}));var R=n(36408),I=n(99158),L=n(98475),N=h.forwardRef((function(e,t){var n=e.prefixCls,r=e.id,o=e.tabs,s=e.locale,l=e.mobile,c=e.moreIcon,d=void 0===c?"More":c,f=e.moreTransitionName,p=e.style,g=e.className,m=e.editable,v=e.tabBarGutter,A=e.rtl,y=e.removeAriaLabel,b=e.onTabClick,_=e.getPopupContainer,w=e.popupClassName,x=(0,h.useState)(!1),E=(0,a.Z)(x,2),S=E[0],C=E[1],P=(0,h.useState)(null),T=(0,a.Z)(P,2),O=T[0],N=T[1],D="".concat(r,"-more-popup"),F="".concat(n,"-dropdown"),j=null!==O?"".concat(D,"-").concat(O):null,B=null===s||void 0===s?void 0:s.dropdownAriaLabel;var Z=h.createElement(I.ZP,{onClick:function(e){var t=e.key,n=e.domEvent;b(t,n),C(!1)},prefixCls:"".concat(F,"-menu"),id:D,tabIndex:-1,role:"listbox","aria-activedescendant":j,selectedKeys:[O],"aria-label":void 0!==B?B:"expanded dropdown"},o.map((function(e){var t=e.closable,n=e.disabled,i=e.closeIcon,o=e.key,a=e.label,s=k(t,i,m,n);return h.createElement(I.sN,{key:o,id:"".concat(D,"-").concat(o),role:"option","aria-controls":r&&"".concat(r,"-panel-").concat(o),disabled:n},h.createElement("span",null,a),s&&h.createElement("button",{type:"button","aria-label":y||"remove",tabIndex:0,className:"".concat(F,"-menu-item-remove"),onClick:function(e){e.stopPropagation(),function(e,t){e.preventDefault(),e.stopPropagation(),m.onEdit("remove",{key:t,event:e})}(e,o)}},i||m.removeIcon||"\xd7"))})));function z(e){for(var t=o.filter((function(e){return!e.disabled})),n=t.findIndex((function(e){return e.key===O}))||0,r=t.length,i=0;it?"left":"right"})})),ee=(0,a.Z)(J,2),te=ee[0],ne=ee[1],re=w(0,(function(e,t){!Q&&Z&&Z({direction:e>t?"top":"bottom"})})),ie=(0,a.Z)(re,2),oe=ie[0],ae=ie[1],se=(0,h.useState)([0,0]),le=(0,a.Z)(se,2),ce=le[0],ue=le[1],de=(0,h.useState)([0,0]),fe=(0,a.Z)(de,2),he=fe[0],pe=fe[1],ge=(0,h.useState)([0,0]),me=(0,a.Z)(ge,2),ve=me[0],Ae=me[1],ye=(0,h.useState)([0,0]),be=(0,a.Z)(ye,2),_e=be[0],we=be[1],xe=function(e){var t=(0,h.useRef)([]),n=(0,h.useState)({}),r=(0,a.Z)(n,2)[1],i=(0,h.useRef)("function"===typeof e?e():e),o=S((function(){var e=i.current;t.current.forEach((function(t){e=t(e)})),t.current=[],i.current=e,r({})}));return[i.current,function(e){t.current.push(e),o()}]}(new Map),Ee=(0,a.Z)(xe,2),Se=Ee[0],Ce=Ee[1],Pe=function(e,t,n){return(0,h.useMemo)((function(){for(var n,r=new Map,i=t.get(null===(n=e[0])||void 0===n?void 0:n.key)||_,a=i.left+i.width,s=0;sDe?De:e}Q&&f?(Ne=0,De=Math.max(0,ke-Ie)):(Ne=Math.min(0,Ie-ke),De=0);var je=(0,h.useRef)(null),Be=(0,h.useState)(),Ze=(0,a.Z)(Be,2),ze=Ze[0],Ue=Ze[1];function He(){Ue(Date.now())}function Ve(){je.current&&clearTimeout(je.current)}!function(e,t){var n=(0,h.useState)(),r=(0,a.Z)(n,2),i=r[0],o=r[1],s=(0,h.useState)(0),l=(0,a.Z)(s,2),c=l[0],u=l[1],d=(0,h.useState)(0),f=(0,a.Z)(d,2),p=f[0],g=f[1],m=(0,h.useState)(),v=(0,a.Z)(m,2),A=v[0],y=v[1],b=(0,h.useRef)(),_=(0,h.useRef)(),w=(0,h.useRef)(null);w.current={onTouchStart:function(e){var t=e.touches[0],n=t.screenX,r=t.screenY;o({x:n,y:r}),window.clearInterval(b.current)},onTouchMove:function(e){if(i){e.preventDefault();var n=e.touches[0],r=n.screenX,a=n.screenY;o({x:r,y:a});var s=r-i.x,l=a-i.y;t(s,l);var d=Date.now();u(d),g(d-c),y({x:s,y:l})}},onTouchEnd:function(){if(i&&(o(null),y(null),A)){var e=A.x/p,n=A.y/p,r=Math.abs(e),a=Math.abs(n);if(Math.max(r,a)<.1)return;var s=e,l=n;b.current=window.setInterval((function(){Math.abs(s)<.01&&Math.abs(l)<.01?window.clearInterval(b.current):t(20*(s*=x),20*(l*=x))}),20)}},onWheel:function(e){var n=e.deltaX,r=e.deltaY,i=0,o=Math.abs(n),a=Math.abs(r);o===a?i="x"===_.current?n:r:o>a?(i=n,_.current="x"):(i=r,_.current="y"),t(-i,-i)&&e.preventDefault()}},h.useEffect((function(){function t(e){w.current.onTouchMove(e)}function n(e){w.current.onTouchEnd(e)}return document.addEventListener("touchmove",t,{passive:!1}),document.addEventListener("touchend",n,{passive:!1}),e.current.addEventListener("touchstart",(function(e){w.current.onTouchStart(e)}),{passive:!1}),e.current.addEventListener("wheel",(function(e){w.current.onWheel(e)})),function(){document.removeEventListener("touchmove",t),document.removeEventListener("touchend",n)}}),[])}(q,(function(e,t){function n(e,t){e((function(e){return Fe(e+t)}))}return!!Re&&(Q?n(ne,e):n(ae,t),Ve(),He(),!0)})),(0,h.useEffect)((function(){return Ve(),ze&&(je.current=setTimeout((function(){Ue(0)}),100)),Ve}),[ze]);var We=function(e,t,n,r,i,o,a){var s,l,c,u=a.tabs,d=a.tabPosition,f=a.rtl;return["top","bottom"].includes(d)?(s="width",l=f?"right":"left",c=Math.abs(n)):(s="height",l="top",c=-n),(0,h.useMemo)((function(){if(!u.length)return[0,0];for(var n=u.length,r=n,i=0;ic+t){r=i-1;break}}for(var a=0,d=n-1;d>=0;d-=1)if((e.get(u[d].key)||C)[l]=r?[0,0]:[a,r]}),[e,t,r,i,o,c,d,u.map((function(e){return e.key})).join("_"),f])}(Pe,Ie,Q?te:oe,ke,Me,Oe,(0,o.Z)((0,o.Z)({},e),{},{tabs:V})),Ge=(0,a.Z)(We,2),Ke=Ge[0],qe=Ge[1],Ye=(0,v.Z)((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:d,t=Pe.get(e)||{width:0,height:0,left:0,right:0,top:0};if(Q){var n=te;f?t.rightte+Ie&&(n=t.right+t.width-Ie):t.left<-te?n=-t.left:t.left+t.width>-te+Ie&&(n=-(t.left+t.width-Ie)),ae(0),ne(Fe(n))}else{var r=oe;t.top<-oe?r=-t.top:t.top+t.height>-oe+Ie&&(r=-(t.top+t.height-Ie)),ne(0),ae(Fe(r))}})),Xe={};"top"===R||"bottom"===R?Xe[f?"marginRight":"marginLeft"]=I:Xe.marginTop=I;var $e=V.map((function(e,t){var n=e.key;return h.createElement(F,{id:l,prefixCls:H,key:n,tab:e,style:0===t?void 0:Xe,closable:e.closable,editable:E,active:n===d,renderWrapper:L,removeAriaLabel:null===k||void 0===k?void 0:k.removeAriaLabel,onClick:function(e){N(n,e)},onFocus:function(){Ye(n),He(),q.current&&(f||(q.current.scrollLeft=0),q.current.scrollTop=0)}})})),Qe=function(){return Ce((function(){var e,t=new Map,n=null===(e=Y.current)||void 0===e?void 0:e.getBoundingClientRect();return V.forEach((function(e){var r,i=e.key,o=null===(r=Y.current)||void 0===r?void 0:r.querySelector('[data-node-key="'.concat(T(i),'"]'));if(o){var s=function(e,t){var n=e.offsetWidth,r=e.offsetHeight,i=e.offsetTop,o=e.offsetLeft,a=e.getBoundingClientRect(),s=a.width,l=a.height,c=a.x,u=a.y;return Math.abs(s-n)<1?[s,l,c-t.x,u-t.y]:[n,r,o,i]}(o,n),l=(0,a.Z)(s,4),c=l[0],u=l[1],d=l[2],f=l[3];t.set(i,{width:c,height:u,left:d,top:f})}})),t}))};(0,h.useEffect)((function(){Qe()}),[V.map((function(e){return e.key})).join("_")]);var Je=S((function(){var e=j(W),t=j(G),n=j(K);ue([e[0]-t[0]-n[0],e[1]-t[1]-n[1]]);var r=j($);Ae(r);var i=j(X);we(i);var o=j(Y);pe([o[0]-r[0],o[1]-r[1]]),Qe()})),et=V.slice(0,Ke),tt=V.slice(qe+1),nt=[].concat((0,g.Z)(et),(0,g.Z)(tt)),rt=Pe.get(d),it=b({activeTabOffset:rt,horizontal:Q,indicator:z,rtl:f}).style;(0,h.useEffect)((function(){Ye()}),[d,Ne,De,P(rt),P(Pe),Q]),(0,h.useEffect)((function(){Je()}),[f]);var ot,at,st,lt,ct=!!nt.length,ut="".concat(H,"-nav-wrap");return Q?f?(at=te>0,ot=te!==De):(ot=te<0,at=te!==Ne):(st=oe<0,lt=oe!==Ne),h.createElement(m.Z,{onResize:Je},h.createElement("div",{ref:(0,A.x1)(t,W),role:"tablist",className:u()("".concat(H,"-nav"),n),style:s,onKeyDown:function(){He()}},h.createElement(O,{ref:G,position:"left",extra:y,prefixCls:H}),h.createElement(m.Z,{onResize:Je},h.createElement("div",{className:u()(ut,(0,i.Z)((0,i.Z)((0,i.Z)((0,i.Z)({},"".concat(ut,"-ping-left"),ot),"".concat(ut,"-ping-right"),at),"".concat(ut,"-ping-top"),st),"".concat(ut,"-ping-bottom"),lt)),ref:q},h.createElement(m.Z,{onResize:Je},h.createElement("div",{ref:Y,className:"".concat(H,"-nav-list"),style:{transform:"translate(".concat(te,"px, ").concat(oe,"px)"),transition:ze?"none":void 0}},$e,h.createElement(M,{ref:$,prefixCls:H,locale:k,editable:E,style:(0,o.Z)((0,o.Z)({},0===$e.length?void 0:Xe),{},{visibility:ct?"hidden":null})}),h.createElement("div",{className:u()("".concat(H,"-ink-bar"),(0,i.Z)({},"".concat(H,"-ink-bar-animated"),c.inkBar)),style:it}))))),h.createElement(D,(0,r.Z)({},e,{removeAriaLabel:null===k||void 0===k?void 0:k.removeAriaLabel,ref:X,prefixCls:H,tabs:nt,className:!ct&&Le,tabMoving:!!ze})),h.createElement(O,{ref:K,position:"right",extra:y,prefixCls:H})))}));const z=h.forwardRef((function(e,t){var n=e.prefixCls,r=e.className,i=e.style,o=e.id,a=e.active,s=e.tabKey,l=e.children;return h.createElement("div",{id:o&&"".concat(o,"-panel-").concat(s),role:"tabpanel",tabIndex:a?0:-1,"aria-labelledby":o&&"".concat(o,"-tab-").concat(s),"aria-hidden":!a,style:i,className:u()(n,a&&"".concat(n,"-active"),r),ref:t},l)}));var U=["renderTabBar"],H=["label","key"];const V=function(e){var t=e.renderTabBar,n=(0,l.Z)(e,U),i=h.useContext(p).tabs;return t?t((0,o.Z)((0,o.Z)({},n),{},{panes:i.map((function(e){var t=e.label,n=e.key,i=(0,l.Z)(e,H);return h.createElement(z,(0,r.Z)({tab:t,key:n,tabKey:n},i))}))}),Z):h.createElement(Z,n)};var W=n(9817),G=["key","forceRender","style","className","destroyInactiveTabPane"];const K=function(e){var t=e.id,n=e.activeKey,a=e.animated,s=e.tabPosition,c=e.destroyInactiveTabPane,d=h.useContext(p),f=d.prefixCls,g=d.tabs,m=a.tabPane,v="".concat(f,"-tabpane");return h.createElement("div",{className:u()("".concat(f,"-content-holder"))},h.createElement("div",{className:u()("".concat(f,"-content"),"".concat(f,"-content-").concat(s),(0,i.Z)({},"".concat(f,"-content-animated"),m))},g.map((function(e){var i=e.key,s=e.forceRender,d=e.style,f=e.className,p=e.destroyInactiveTabPane,g=(0,l.Z)(e,G),A=i===n;return h.createElement(W.ZP,(0,r.Z)({key:i,visible:A,forceRender:s,removeOnLeave:!(!c&&!p),leavedClassName:"".concat(v,"-hidden")},a.tabPaneMotion),(function(e,n){var a=e.style,s=e.className;return h.createElement(z,(0,r.Z)({},g,{prefixCls:v,id:t,tabKey:i,animated:m,active:A,style:(0,o.Z)((0,o.Z)({},d),a),className:u()(f,s),ref:n}))}))}))))};n(98162);var q=["id","prefixCls","className","items","direction","activeKey","defaultActiveKey","editable","animated","tabPosition","tabBarGutter","tabBarStyle","tabBarExtraContent","locale","moreIcon","moreTransitionName","destroyInactiveTabPane","renderTabBar","onChange","onTabClick","onTabScroll","getPopupContainer","popupClassName","indicator"],Y=0;const X=h.forwardRef((function(e,t){var n=e.id,c=e.prefixCls,g=void 0===c?"rc-tabs":c,m=e.className,v=e.items,A=e.direction,y=e.activeKey,b=e.defaultActiveKey,_=e.editable,w=e.animated,x=e.tabPosition,E=void 0===x?"top":x,S=e.tabBarGutter,C=e.tabBarStyle,P=e.tabBarExtraContent,T=e.locale,k=e.moreIcon,M=e.moreTransitionName,O=e.destroyInactiveTabPane,R=e.renderTabBar,I=e.onChange,L=e.onTabClick,N=e.onTabScroll,D=e.getPopupContainer,F=e.popupClassName,j=e.indicator,B=(0,l.Z)(e,q),Z=h.useMemo((function(){return(v||[]).filter((function(e){return e&&"object"===(0,s.Z)(e)&&"key"in e}))}),[v]),z="rtl"===A,U=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{inkBar:!0,tabPane:!1};return(e=!1===t?{inkBar:!1,tabPane:!1}:!0===t?{inkBar:!0,tabPane:!1}:(0,o.Z)({inkBar:!0},"object"===(0,s.Z)(t)?t:{})).tabPaneMotion&&void 0===e.tabPane&&(e.tabPane=!0),!e.tabPaneMotion&&e.tabPane&&(e.tabPane=!1),e}(w),H=(0,h.useState)(!1),W=(0,a.Z)(H,2),G=W[0],X=W[1];(0,h.useEffect)((function(){X((0,f.Z)())}),[]);var $=(0,d.Z)((function(){var e;return null===(e=Z[0])||void 0===e?void 0:e.key}),{value:y,defaultValue:b}),Q=(0,a.Z)($,2),J=Q[0],ee=Q[1],te=(0,h.useState)((function(){return Z.findIndex((function(e){return e.key===J}))})),ne=(0,a.Z)(te,2),re=ne[0],ie=ne[1];(0,h.useEffect)((function(){var e,t=Z.findIndex((function(e){return e.key===J}));-1===t&&(t=Math.max(0,Math.min(re,Z.length-1)),ee(null===(e=Z[t])||void 0===e?void 0:e.key));ie(t)}),[Z.map((function(e){return e.key})).join("_"),J,re]);var oe=(0,d.Z)(null,{value:n}),ae=(0,a.Z)(oe,2),se=ae[0],le=ae[1];(0,h.useEffect)((function(){n||(le("rc-tabs-".concat(Y)),Y+=1)}),[]);var ce={id:se,activeKey:J,animated:U,tabPosition:E,rtl:z,mobile:G},ue=(0,o.Z)((0,o.Z)({},ce),{},{editable:_,locale:T,moreIcon:k,moreTransitionName:M,tabBarGutter:S,onTabClick:function(e,t){null===L||void 0===L||L(e,t);var n=e!==J;ee(e),n&&(null===I||void 0===I||I(e))},onTabScroll:N,extra:P,style:C,panes:null,getPopupContainer:D,popupClassName:F,indicator:j});return h.createElement(p.Provider,{value:{tabs:Z,prefixCls:g}},h.createElement("div",(0,r.Z)({ref:t,id:n,className:u()(g,"".concat(g,"-").concat(E),(0,i.Z)((0,i.Z)((0,i.Z)({},"".concat(g,"-mobile"),G),"".concat(g,"-editable"),_),"".concat(g,"-rtl"),z),m)},B),h.createElement(V,(0,r.Z)({},ue,{renderTabBar:R})),h.createElement(K,(0,r.Z)({destroyInactiveTabPane:O},ce,{animated:U}))))}))},66665:(e,t,n)=>{"use strict";n.d(t,{Z:()=>P});var r,i=n(91010),o=n(68185),a=n(35194),s=n(22368),l=n(13747),c=n(99309),u=n(12356),d=n.n(u),f=n(10099),h=n(36426),p=n(83146),g=n(88258),m=n(57435),v=n(69223),A=n(61236),y=n(12750),b=n(51882),_=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","font-variant","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing","word-break","white-space"],w={};function x(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;r||((r=document.createElement("textarea")).setAttribute("tab-index","-1"),r.setAttribute("aria-hidden","true"),document.body.appendChild(r)),e.getAttribute("wrap")?r.setAttribute("wrap",e.getAttribute("wrap")):r.removeAttribute("wrap");var o=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=e.getAttribute("id")||e.getAttribute("data-reactid")||e.getAttribute("name");if(t&&w[n])return w[n];var r=window.getComputedStyle(e),i=r.getPropertyValue("box-sizing")||r.getPropertyValue("-moz-box-sizing")||r.getPropertyValue("-webkit-box-sizing"),o=parseFloat(r.getPropertyValue("padding-bottom"))+parseFloat(r.getPropertyValue("padding-top")),a=parseFloat(r.getPropertyValue("border-bottom-width"))+parseFloat(r.getPropertyValue("border-top-width")),s={sizingStyle:_.map((function(e){return"".concat(e,":").concat(r.getPropertyValue(e))})).join(";"),paddingSize:o,borderSize:a,boxSizing:i};return t&&n&&(w[n]=s),s}(e,t),a=o.paddingSize,s=o.borderSize,l=o.boxSizing,c=o.sizingStyle;r.setAttribute("style","".concat(c,";").concat("\n min-height:0 !important;\n max-height:none !important;\n height:0 !important;\n visibility:hidden !important;\n overflow:hidden !important;\n position:absolute !important;\n z-index:-1000 !important;\n top:0 !important;\n right:0 !important;\n pointer-events: none !important;\n")),r.value=e.value||e.placeholder||"";var u,d=void 0,f=void 0,h=r.scrollHeight;if("border-box"===l?h+=s:"content-box"===l&&(h-=a),null!==n||null!==i){r.value=" ";var p=r.scrollHeight-a;null!==n&&(d=p*n,"border-box"===l&&(d=d+a+s),h=Math.max(d,h)),null!==i&&(f=p*i,"border-box"===l&&(f=f+a+s),u=h>f?"":"hidden",h=Math.min(f,h))}var g={height:h,overflowY:u,resize:"none"};return d&&(g.minHeight=d),f&&(g.maxHeight=f),g}var E=["prefixCls","onPressEnter","defaultValue","value","autoSize","onResize","className","style","disabled","onChange","onInternalAutoSize"];const S=m.forwardRef((function(e,t){var n=e,r=n.prefixCls,s=(n.onPressEnter,n.defaultValue),u=n.value,f=n.autoSize,h=n.onResize,p=n.className,_=n.style,w=n.disabled,S=n.onChange,C=(n.onInternalAutoSize,(0,c.Z)(n,E)),P=(0,g.Z)(s,{value:u,postState:function(e){return null!==e&&void 0!==e?e:""}}),T=(0,l.Z)(P,2),k=T[0],M=T[1],O=m.useRef();m.useImperativeHandle(t,(function(){return{textArea:O.current}}));var R=m.useMemo((function(){return f&&"object"===(0,v.Z)(f)?[f.minRows,f.maxRows]:[]}),[f]),I=(0,l.Z)(R,2),L=I[0],N=I[1],D=!!f,F=m.useState(2),j=(0,l.Z)(F,2),B=j[0],Z=j[1],z=m.useState(),U=(0,l.Z)(z,2),H=U[0],V=U[1],W=function(){Z(0)};(0,y.Z)((function(){D&&W()}),[u,L,N,D]),(0,y.Z)((function(){if(0===B)Z(1);else if(1===B){var e=x(O.current,!1,L,N);Z(2),V(e)}else!function(){try{if(document.activeElement===O.current){var e=O.current,t=e.selectionStart,n=e.selectionEnd,r=e.scrollTop;O.current.setSelectionRange(t,n),O.current.scrollTop=r}}catch(i){}}()}),[B]);var G=m.useRef(),K=function(){b.Z.cancel(G.current)};m.useEffect((function(){return K}),[]);var q=D?H:null,Y=(0,a.Z)((0,a.Z)({},_),q);return 0!==B&&1!==B||(Y.overflowY="hidden",Y.overflowX="hidden"),m.createElement(A.Z,{onResize:function(e){2===B&&(null===h||void 0===h||h(e),f&&(K(),G.current=(0,b.Z)((function(){W()}))))},disabled:!(f||h)},m.createElement("textarea",(0,i.Z)({},C,{ref:O,style:Y,className:d()(r,p,(0,o.Z)({},"".concat(r,"-disabled"),w)),disabled:w,value:k,onChange:function(e){M(e.target.value),null===S||void 0===S||S(e)}})))}));var C=["defaultValue","value","onFocus","onBlur","onChange","allowClear","maxLength","onCompositionStart","onCompositionEnd","suffix","prefixCls","showCount","count","className","style","disabled","hidden","classNames","styles","onResize"];const P=m.forwardRef((function(e,t){var n,r,u=e.defaultValue,v=e.value,A=e.onFocus,y=e.onBlur,b=e.onChange,_=e.allowClear,w=e.maxLength,x=e.onCompositionStart,E=e.onCompositionEnd,P=e.suffix,T=e.prefixCls,k=void 0===T?"rc-textarea":T,M=e.showCount,O=e.count,R=e.className,I=e.style,L=e.disabled,N=e.hidden,D=e.classNames,F=e.styles,j=e.onResize,B=(0,c.Z)(e,C),Z=(0,g.Z)(u,{value:v,defaultValue:u}),z=(0,l.Z)(Z,2),U=z[0],H=z[1],V=void 0===U||null===U?"":String(U),W=m.useState(!1),G=(0,l.Z)(W,2),K=G[0],q=G[1],Y=m.useRef(!1),X=m.useState(null),$=(0,l.Z)(X,2),Q=$[0],J=$[1],ee=(0,m.useRef)(null),te=function(){var e;return null===(e=ee.current)||void 0===e?void 0:e.textArea},ne=function(){te().focus()};(0,m.useImperativeHandle)(t,(function(){return{resizableTextArea:ee.current,focus:ne,blur:function(){te().blur()}}})),(0,m.useEffect)((function(){q((function(e){return!L&&e}))}),[L]);var re=m.useState(null),ie=(0,l.Z)(re,2),oe=ie[0],ae=ie[1];m.useEffect((function(){var e;oe&&(e=te()).setSelectionRange.apply(e,(0,s.Z)(oe))}),[oe]);var se,le=(0,h.Z)(O,M),ce=null!==(n=le.max)&&void 0!==n?n:w,ue=Number(ce)>0,de=le.strategy(V),fe=!!ce&&de>ce,he=function(e,t){var n=t;!Y.current&&le.exceedFormatter&&le.max&&le.strategy(t)>le.max&&t!==(n=le.exceedFormatter(t,{max:le.max}))&&ae([te().selectionStart||0,te().selectionEnd||0]),H(n),(0,p.rJ)(e.currentTarget,e,b,n)},pe=P;le.show&&(se=le.showFormatter?le.showFormatter({value:V,count:de,maxLength:ce}):"".concat(de).concat(ue?" / ".concat(ce):""),pe=m.createElement(m.Fragment,null,pe,m.createElement("span",{className:d()("".concat(k,"-data-count"),null===D||void 0===D?void 0:D.count),style:null===F||void 0===F?void 0:F.count},se)));var ge=!B.autoSize&&!M&&!_;return m.createElement(f.Q,{value:V,allowClear:_,handleReset:function(e){H(""),ne(),(0,p.rJ)(te(),e,b)},suffix:pe,prefixCls:k,classNames:(0,a.Z)((0,a.Z)({},D),{},{affixWrapper:d()(null===D||void 0===D?void 0:D.affixWrapper,(r={},(0,o.Z)(r,"".concat(k,"-show-count"),M),(0,o.Z)(r,"".concat(k,"-textarea-allow-clear"),_),r))}),disabled:L,focused:K,className:d()(R,fe&&"".concat(k,"-out-of-range")),style:(0,a.Z)((0,a.Z)({},I),Q&&!ge?{height:"auto"}:{}),dataAttrs:{affixWrapper:{"data-count":"string"===typeof se?se:void 0}},hidden:N},m.createElement(S,(0,i.Z)({},B,{maxLength:w,onKeyDown:function(e){var t=B.onPressEnter,n=B.onKeyDown;"Enter"===e.key&&t&&t(e),null===n||void 0===n||n(e)},onChange:function(e){he(e,e.target.value)},onFocus:function(e){q(!0),null===A||void 0===A||A(e)},onBlur:function(e){q(!1),null===y||void 0===y||y(e)},onCompositionStart:function(e){Y.current=!0,null===x||void 0===x||x(e)},onCompositionEnd:function(e){Y.current=!1,he(e,e.currentTarget.value),null===E||void 0===E||E(e)},className:d()(null===D||void 0===D?void 0:D.textarea),style:(0,a.Z)((0,a.Z)({},null===F||void 0===F?void 0:F.textarea),{},{resize:null===I||void 0===I?void 0:I.resize}),disabled:L,prefixCls:k,onResize:function(e){var t;null===j||void 0===j||j(e),null!==(t=te())&&void 0!==t&&t.style.height&&J(!0)},ref:ee})))}))},57346:(e,t,n)=>{"use strict";n.d(t,{G:()=>a,Z:()=>v});var r=n(12356),i=n.n(r),o=n(57435);function a(e){var t=e.children,n=e.prefixCls,r=e.id,a=e.overlayInnerStyle,s=e.className,l=e.style;return o.createElement("div",{className:i()("".concat(n,"-content"),s),style:l},o.createElement("div",{className:"".concat(n,"-inner"),id:r,role:"tooltip",style:a},"function"===typeof t?t():t))}var s=n(91010),l=n(35194),c=n(99309),u=n(91084),d={shiftX:64,adjustY:1},f={adjustX:1,shiftY:!0},h=[0,0],p={left:{points:["cr","cl"],overflow:f,offset:[-4,0],targetOffset:h},right:{points:["cl","cr"],overflow:f,offset:[4,0],targetOffset:h},top:{points:["bc","tc"],overflow:d,offset:[0,-4],targetOffset:h},bottom:{points:["tc","bc"],overflow:d,offset:[0,4],targetOffset:h},topLeft:{points:["bl","tl"],overflow:d,offset:[0,-4],targetOffset:h},leftTop:{points:["tr","tl"],overflow:f,offset:[-4,0],targetOffset:h},topRight:{points:["br","tr"],overflow:d,offset:[0,-4],targetOffset:h},rightTop:{points:["tl","tr"],overflow:f,offset:[4,0],targetOffset:h},bottomRight:{points:["tr","br"],overflow:d,offset:[0,4],targetOffset:h},rightBottom:{points:["bl","br"],overflow:f,offset:[4,0],targetOffset:h},bottomLeft:{points:["tl","bl"],overflow:d,offset:[0,4],targetOffset:h},leftBottom:{points:["br","bl"],overflow:f,offset:[-4,0],targetOffset:h}};var g=["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","children","onVisibleChange","afterVisibleChange","transitionName","animation","motion","placement","align","destroyTooltipOnHide","defaultVisible","getTooltipContainer","overlayInnerStyle","arrowContent","overlay","id","showArrow"],m=function(e,t){var n=e.overlayClassName,r=e.trigger,i=void 0===r?["hover"]:r,d=e.mouseEnterDelay,f=void 0===d?0:d,h=e.mouseLeaveDelay,m=void 0===h?.1:h,v=e.overlayStyle,A=e.prefixCls,y=void 0===A?"rc-tooltip":A,b=e.children,_=e.onVisibleChange,w=e.afterVisibleChange,x=e.transitionName,E=e.animation,S=e.motion,C=e.placement,P=void 0===C?"right":C,T=e.align,k=void 0===T?{}:T,M=e.destroyTooltipOnHide,O=void 0!==M&&M,R=e.defaultVisible,I=e.getTooltipContainer,L=e.overlayInnerStyle,N=(e.arrowContent,e.overlay),D=e.id,F=e.showArrow,j=void 0===F||F,B=(0,c.Z)(e,g),Z=(0,o.useRef)(null);(0,o.useImperativeHandle)(t,(function(){return Z.current}));var z=(0,l.Z)({},B);"visible"in e&&(z.popupVisible=e.visible);return o.createElement(u.Z,(0,s.Z)({popupClassName:n,prefixCls:y,popup:function(){return o.createElement(a,{key:"content",prefixCls:y,id:D,overlayInnerStyle:L},N)},action:i,builtinPlacements:p,popupPlacement:P,ref:Z,popupAlign:k,getPopupContainer:I,onPopupVisibleChange:_,afterPopupVisibleChange:w,popupTransitionName:x,popupAnimation:E,popupMotion:S,defaultPopupVisible:R,autoDestroy:O,mouseLeaveDelay:m,popupStyle:v,mouseEnterDelay:f,arrow:j},z),b)};const v=(0,o.forwardRef)(m)},66456:(e,t,n)=>{"use strict";n.d(t,{Qw:()=>L,FJ:()=>D,hT:()=>N,OF:()=>A,ZP:()=>Z});var r=n(91010),i=n(22368),o=n(35194),a=n(13747),s=n(99309),l=n(69223),c=n(97814),u=n(62018),d=n(84548),f=n(88258),h=n(98162),p=n(57435);var g=n(24389);var m=n(68185),v=n(52353);const A=function(){return null};var y=["children","value"];function b(e){return(0,v.Z)(e).map((function(e){if(!p.isValidElement(e)||!e.type)return null;var t=e,n=t.key,r=t.props,i=r.children,a=r.value,l=(0,s.Z)(r,y),c=(0,o.Z)({key:n,value:a},l),u=b(i);return u.length&&(c.children=u),c})).filter((function(e){return e}))}function _(e){if(!e)return e;var t=(0,o.Z)({},e);return"props"in t||Object.defineProperty(t,"props",{get:function(){return(0,h.ZP)(!1,"New `rc-tree-select` not support return node instance as argument anymore. Please consider to remove `props` access."),t}}),t}function w(e){var t=p.useRef();t.current=e;var n=p.useCallback((function(){return t.current.apply(t,arguments)}),[]);return n}function x(e,t,n){return p.useMemo((function(){return e?n?function(e,t){var n=t.id,r=t.pId,i=t.rootPId,a={},s=[];return e.map((function(e){var t=(0,o.Z)({},e),r=t[n];return a[r]=t,t.key=t.key||r,t})).forEach((function(e){var t=e[r],n=a[t];n&&(n.children=n.children||[],n.children.push(e)),(t===i||!n&&null===i)&&s.push(e)})),s}(e,(0,o.Z)({id:"id",pId:"pId",rootPId:null},!0!==n?n:{})):e:b(t)}),[t,n,e])}const E=p.createContext(null);var S=n(16055),C=n(98475),P=n(22121);const T=p.createContext(null);function k(e){return!e||e.disabled||e.disableCheckbox||!1===e.checkable}function M(e){return null===e||void 0===e}var O={width:0,height:0,display:"flex",overflow:"hidden",opacity:0,border:0,padding:0,margin:0},R=function(e,t){var n=(0,c.lk)(),o=n.prefixCls,s=n.multiple,l=n.searchValue,u=n.toggleOpen,d=n.open,f=n.notFoundContent,h=p.useContext(T),g=h.virtual,m=h.listHeight,v=h.listItemHeight,A=h.listItemScrollOffset,y=h.treeData,b=h.fieldNames,_=h.onSelect,w=h.dropdownMatchSelectWidth,x=h.treeExpandAction,M=h.treeTitleRender,R=p.useContext(E),I=R.checkable,L=R.checkedKeys,N=R.halfCheckedKeys,D=R.treeExpandedKeys,F=R.treeDefaultExpandAll,j=R.treeDefaultExpandedKeys,B=R.onTreeExpand,Z=R.treeIcon,z=R.showTreeIcon,U=R.switcherIcon,H=R.treeLine,V=R.treeNodeFilterProp,W=R.loadData,G=R.treeLoadedKeys,K=R.treeMotion,q=R.onTreeLoad,Y=R.keyEntities,X=p.useRef(),$=(0,P.Z)((function(){return y}),[d,y],(function(e,t){return t[0]&&e[1]!==t[1]})),Q=p.useState(null),J=(0,a.Z)(Q,2),ee=J[0],te=J[1],ne=Y[ee],re=p.useMemo((function(){return I?{checked:L,halfChecked:N}:null}),[I,L,N]);p.useEffect((function(){var e;d&&!s&&L.length&&(null===(e=X.current)||void 0===e||e.scrollTo({key:L[0]}),te(L[0]))}),[d]);var ie=String(l).toLowerCase(),oe=p.useState(j),ae=(0,a.Z)(oe,2),se=ae[0],le=ae[1],ce=p.useState(null),ue=(0,a.Z)(ce,2),de=ue[0],fe=ue[1],he=p.useMemo((function(){return D?(0,i.Z)(D):l?de:se}),[se,de,D,l]);p.useEffect((function(){l&&fe(function(e,t){var n=[];return function e(r){r.forEach((function(r){var i=r[t.children];i&&(n.push(r[t.value]),e(i))}))}(e),n}(y,b))}),[l]);var pe=function(e){e.preventDefault()},ge=function(e,t){var n=t.node;I&&k(n)||(_(n.key,{selected:!L.includes(n.key)}),s||u(!1))};if(p.useImperativeHandle(t,(function(){var e;return{scrollTo:null===(e=X.current)||void 0===e?void 0:e.scrollTo,onKeyDown:function(e){var t;switch(e.which){case C.Z.UP:case C.Z.DOWN:case C.Z.LEFT:case C.Z.RIGHT:null===(t=X.current)||void 0===t||t.onKeyDown(e);break;case C.Z.ENTER:if(ne){var n=(null===ne||void 0===ne?void 0:ne.node)||{},r=n.selectable,i=n.value;!1!==r&&ge(0,{node:{key:ee},selected:!L.includes(i)})}break;case C.Z.ESC:u(!1)}},onKeyUp:function(){}}})),0===$.length)return p.createElement("div",{role:"listbox",className:"".concat(o,"-empty"),onMouseDown:pe},f);var me={fieldNames:b};return G&&(me.loadedKeys=G),he&&(me.expandedKeys=he),p.createElement("div",{onMouseDown:pe},ne&&d&&p.createElement("span",{style:O,"aria-live":"assertive"},ne.node.value),p.createElement(S.Z,(0,r.Z)({ref:X,focusable:!1,prefixCls:"".concat(o,"-tree"),treeData:$,height:m,itemHeight:v,itemScrollOffset:A,virtual:!1!==g&&!1!==w,multiple:s,icon:Z,showIcon:z,switcherIcon:U,showLine:H,loadData:l?null:W,motion:K,activeKey:ee,checkable:I,checkStrictly:!0,checkedKeys:re,selectedKeys:I?[]:L,defaultExpandAll:F,titleRender:M},me,{onActiveChange:te,onSelect:ge,onCheck:ge,onExpand:function(e){le(e),fe(e),B&&B(e)},onLoad:q,filterTreeNode:function(e){return!!ie&&String(e[V]).toLowerCase().includes(ie)},expandAction:x})))};const I=p.forwardRef(R);var L="SHOW_ALL",N="SHOW_PARENT",D="SHOW_CHILD";function F(e,t,n,r){var i=new Set(e);return t===D?e.filter((function(e){var t=n[e];return!(t&&t.children&&t.children.some((function(e){var t=e.node;return i.has(t[r.value])}))&&t.children.every((function(e){var t=e.node;return k(t)||i.has(t[r.value])})))})):t===N?e.filter((function(e){var t=n[e],r=t?t.parent:null;return!(r&&!k(r.node)&&i.has(r.key))})):e}var j=["id","prefixCls","value","defaultValue","onChange","onSelect","onDeselect","searchValue","inputValue","onSearch","autoClearSearchValue","filterTreeNode","treeNodeFilterProp","showCheckedStrategy","treeNodeLabelProp","multiple","treeCheckable","treeCheckStrictly","labelInValue","fieldNames","treeDataSimpleMode","treeData","children","loadData","treeLoadedKeys","onTreeLoad","treeDefaultExpandAll","treeExpandedKeys","treeDefaultExpandedKeys","onTreeExpand","treeExpandAction","virtual","listHeight","listItemHeight","listItemScrollOffset","onDropdownVisibleChange","dropdownMatchSelectWidth","treeLine","treeIcon","showTreeIcon","switcherIcon","treeMotion","treeTitleRender"];var B=p.forwardRef((function(e,t){var n=e.id,v=e.prefixCls,y=void 0===v?"rc-tree-select":v,b=e.value,S=e.defaultValue,C=e.onChange,P=e.onSelect,k=e.onDeselect,O=e.searchValue,R=e.inputValue,N=e.onSearch,B=e.autoClearSearchValue,Z=void 0===B||B,z=e.filterTreeNode,U=e.treeNodeFilterProp,H=void 0===U?"value":U,V=e.showCheckedStrategy,W=e.treeNodeLabelProp,G=e.multiple,K=e.treeCheckable,q=e.treeCheckStrictly,Y=e.labelInValue,X=e.fieldNames,$=e.treeDataSimpleMode,Q=e.treeData,J=e.children,ee=e.loadData,te=e.treeLoadedKeys,ne=e.onTreeLoad,re=e.treeDefaultExpandAll,ie=e.treeExpandedKeys,oe=e.treeDefaultExpandedKeys,ae=e.onTreeExpand,se=e.treeExpandAction,le=e.virtual,ce=e.listHeight,ue=void 0===ce?200:ce,de=e.listItemHeight,fe=void 0===de?20:de,he=e.listItemScrollOffset,pe=void 0===he?0:he,ge=e.onDropdownVisibleChange,me=e.dropdownMatchSelectWidth,ve=void 0===me||me,Ae=e.treeLine,ye=e.treeIcon,be=e.showTreeIcon,_e=e.switcherIcon,we=e.treeMotion,xe=e.treeTitleRender,Ee=(0,s.Z)(e,j),Se=(0,u.ZP)(n),Ce=K&&!q,Pe=K||q,Te=q||Y,ke=Pe||G,Me=(0,f.Z)(S,{value:b}),Oe=(0,a.Z)(Me,2),Re=Oe[0],Ie=Oe[1],Le=p.useMemo((function(){return K?V||D:L}),[V,K]);var Ne=p.useMemo((function(){return function(e){var t=e||{},n=t.label,r=t.value||"value";return{_title:n?[n]:["title","label"],value:r,key:r,children:t.children||"children"}}(X)}),[JSON.stringify(X)]),De=(0,f.Z)("",{value:void 0!==O?O:R,postState:function(e){return e||""}}),Fe=(0,a.Z)(De,2),je=Fe[0],Be=Fe[1],Ze=x(Q,J,$),ze=function(e,t){return p.useMemo((function(){return(0,g.I8)(e,{fieldNames:t,initWrapper:function(e){return(0,o.Z)((0,o.Z)({},e),{},{valueEntities:new Map})},processEntity:function(e,n){var r=e.node[t.value];n.valueEntities.set(r,e)}})}),[e,t])}(Ze,Ne),Ue=ze.keyEntities,He=ze.valueEntities,Ve=p.useCallback((function(e){var t=[],n=[];return e.forEach((function(e){He.has(e)?n.push(e):t.push(e)})),{missingRawValues:t,existRawValues:n}}),[He]),We=function(e,t,n){var r=n.treeNodeFilterProp,i=n.filterTreeNode,a=n.fieldNames.children;return p.useMemo((function(){if(!t||!1===i)return e;var n;if("function"===typeof i)n=i;else{var s=t.toUpperCase();n=function(e,t){var n=t[r];return String(n).toUpperCase().includes(s)}}return function e(r){var i=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return r.reduce((function(r,s){var l=s[a],c=i||n(t,_(s)),u=e(l||[],c);return(c||u.length)&&r.push((0,o.Z)((0,o.Z)({},s),{},(0,m.Z)({isLeaf:void 0},a,u))),r}),[])}(e)}),[e,t,a,r,i])}(Ze,je,{fieldNames:Ne,treeNodeFilterProp:H,filterTreeNode:z}),Ge=p.useCallback((function(e){if(e){if(W)return e[W];for(var t=Ne._title,n=0;n1&&void 0!==arguments[1]?arguments[1]:"0",l=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return r.map((function(r,c){var u="".concat(i,"-").concat(c),d=r[o.value],f=n.includes(d),h=e(r[o.children]||[],u,f),g=p.createElement(A,r,h.map((function(e){return e.node})));if(t===d&&(a=g),f){var m={pos:u,node:g,children:h};return l||s.push(m),m}return null})).filter((function(e){return e}))}(r),s.sort((function(e,t){var r=e.node.props.value,i=t.node.props.value;return n.indexOf(r)-n.indexOf(i)})))}Object.defineProperty(e,"triggerNode",{get:function(){return(0,h.ZP)(!1,"`triggerNode` is deprecated. Please consider decoupling data with node."),l(),a}}),Object.defineProperty(e,"allCheckedNodes",{get:function(){return(0,h.ZP)(!1,"`allCheckedNodes` is deprecated. Please consider decoupling data with node."),l(),i?s:s.map((function(e){return e.node}))}})}(g,l,e,Ze,m,Ne),Pe?g.checked=c:g.selected=c;var v=Te?f:f.map((function(e){return e.value}));C(ke?v:v[0],Te?null:f.map((function(e){return e.label})),g)}})),lt=p.useCallback((function(e,t){var n,r=t.selected,o=t.source,a=Ue[e],s=null===a||void 0===a?void 0:a.node,l=null!==(n=null===s||void 0===s?void 0:s[Ne.value])&&void 0!==n?n:e;if(ke){var c=r?[].concat((0,i.Z)(et),[l]):rt.filter((function(e){return e!==l}));if(Ce){var u,f=Ve(c),h=f.missingRawValues,p=f.existRawValues.map((function(e){return He.get(e).key}));if(r)u=(0,d.S)(p,!0,Ue).checkedKeys;else u=(0,d.S)(p,{checked:!1,halfCheckedKeys:it},Ue).checkedKeys;c=[].concat((0,i.Z)(h),(0,i.Z)(u.map((function(e){return Ue[e].node[Ne.value]}))))}st(c,{selected:r,triggerValue:l},o||"option")}else st([l],{selected:!0,triggerValue:l},"option");r||!ke?null===P||void 0===P||P(l,_(s)):null===k||void 0===k||k(l,_(s))}),[Ve,He,Ue,Ne,ke,et,st,Ce,P,k,rt,it]),ct=p.useCallback((function(e){if(ge){var t={};Object.defineProperty(t,"documentClickClose",{get:function(){return(0,h.ZP)(!1,"Second param of `onDropdownVisibleChange` has been removed."),!1}}),ge(e,t)}}),[ge]),ut=w((function(e,t){var n=e.map((function(e){return e.value}));"clear"!==t.type?t.values.length&<(t.values[0].value,{selected:!1,source:"selection"}):st(n,{},"selection")})),dt=p.useMemo((function(){return{virtual:le,dropdownMatchSelectWidth:ve,listHeight:ue,listItemHeight:fe,listItemScrollOffset:pe,treeData:We,fieldNames:Ne,onSelect:lt,treeExpandAction:se,treeTitleRender:xe}}),[le,ve,ue,fe,pe,We,Ne,lt,se,xe]),ft=p.useMemo((function(){return{checkable:Pe,loadData:ee,treeLoadedKeys:te,onTreeLoad:ne,checkedKeys:rt,halfCheckedKeys:it,treeDefaultExpandAll:re,treeExpandedKeys:ie,treeDefaultExpandedKeys:oe,onTreeExpand:ae,treeIcon:ye,treeMotion:we,showTreeIcon:be,switcherIcon:_e,treeLine:Ae,treeNodeFilterProp:H,keyEntities:Ue}}),[Pe,ee,te,ne,rt,it,re,ie,oe,ae,ye,we,be,_e,Ae,H,Ue]);return p.createElement(T.Provider,{value:dt},p.createElement(E.Provider,{value:ft},p.createElement(c.Ac,(0,r.Z)({ref:t},Ee,{id:Se,prefixCls:y,mode:ke?"multiple":void 0,displayValues:at,onDisplayValuesChange:ut,searchValue:je,onSearch:function(e){Be(e),null===N||void 0===N||N(e)},OptionList:I,emptyOptions:!Ze.length,onDropdownVisibleChange:ct,dropdownMatchSelectWidth:ve}))))}));B.TreeNode=A,B.SHOW_ALL=L,B.SHOW_PARENT=N,B.SHOW_CHILD=D;const Z=B},67066:(e,t,n)=>{"use strict";n.d(t,{Z:()=>C});var r=n(91010),i=n(99309),o=n(35194),a=n(66375),s=n(1959),l=n(50269),c=n(64648),u=n(13004),d=n(68185),f=n(12356),h=n.n(f),p=n(37461),g=n(57435),m=n(90835),v=function(e){for(var t=e.prefixCls,n=e.level,r=e.isStart,i=e.isEnd,o="".concat(t,"-indent-unit"),a=[],s=0;s{"use strict";n.d(t,{k:()=>r});var r=n(57435).createContext(null)},16055:(e,t,n)=>{"use strict";n.d(t,{O:()=>C.Z,Z:()=>K});var r=n(91010),i=n(69223),o=n(35194),a=n(22368),s=n(66375),l=n(1959),c=n(50269),u=n(64648),d=n(13004),f=n(68185),h=n(12356),p=n.n(h),g=n(98475),m=n(37461),v=n(98162),A=n(57435),y=n(90835);function b(e){if(null==e)throw new TypeError("Cannot destructure "+e)}var _=n(13747),w=n(99309),x=n(12750),E=n(49642),S=n(9817),C=n(67066);var P=n(24389),T=["className","style","motion","motionNodes","motionType","onMotionStart","onMotionEnd","active","treeNodeRequiredProps"],k=function(e,t){var n=e.className,i=e.style,o=e.motion,a=e.motionNodes,s=e.motionType,l=e.onMotionStart,c=e.onMotionEnd,u=e.active,d=e.treeNodeRequiredProps,f=(0,w.Z)(e,T),h=A.useState(!0),g=(0,_.Z)(h,2),m=g[0],v=g[1],E=A.useContext(y.k).prefixCls,k=a&&"hide"!==s;(0,x.Z)((function(){a&&k!==m&&v(k)}),[a]);var M=A.useRef(!1),O=function(){a&&!M.current&&(M.current=!0,c())};!function(e,t){var n=A.useState(!1),r=(0,_.Z)(n,2),i=r[0],o=r[1];(0,x.Z)((function(){if(i)return e(),function(){t()}}),[i]),(0,x.Z)((function(){return o(!0),function(){o(!1)}}),[])}((function(){a&&l()}),O);return a?A.createElement(S.ZP,(0,r.Z)({ref:t,visible:m},o,{motionAppear:"show"===s,onVisibleChanged:function(e){k===e&&O()}}),(function(e,t){var n=e.className,i=e.style;return A.createElement("div",{ref:t,className:p()("".concat(E,"-treenode-motion"),n),style:i},a.map((function(e){var t=Object.assign({},(b(e.data),e.data)),n=e.title,i=e.key,o=e.isStart,a=e.isEnd;delete t.children;var s=(0,P.H8)(i,d);return A.createElement(C.Z,(0,r.Z)({},t,s,{title:n,active:u,data:e.data,key:i,isStart:o,isEnd:a}))})))})):A.createElement(C.Z,(0,r.Z)({domRef:t,className:n,style:i},f,{active:u}))};k.displayName="MotionTreeNode";const M=A.forwardRef(k);function O(e,t,n){var r=e.findIndex((function(e){return e.key===n})),i=e[r+1],o=t.findIndex((function(e){return e.key===n}));if(i){var a=t.findIndex((function(e){return e.key===i.key}));return t.slice(o+1,a)}return t.slice(o+1)}var R=["prefixCls","data","selectable","checkable","expandedKeys","selectedKeys","checkedKeys","loadedKeys","loadingKeys","halfCheckedKeys","keyEntities","disabled","dragging","dragOverNodeKey","dropPosition","motion","height","itemHeight","virtual","focusable","activeItem","focused","tabIndex","onKeyDown","onFocus","onBlur","onActiveChange","onListChangeStart","onListChangeEnd"],I={width:0,height:0,display:"flex",overflow:"hidden",opacity:0,border:0,padding:0,margin:0},L=function(){},N="RC_TREE_MOTION_".concat(Math.random()),D={key:N},F={key:N,level:0,index:0,pos:"0",node:D,nodes:[D]},j={parent:null,children:[],pos:F.pos,data:D,title:null,key:N,isStart:[],isEnd:[]};function B(e,t,n,r){return!1!==t&&n?e.slice(0,Math.ceil(n/r)+1):e}function Z(e){var t=e.key,n=e.pos;return(0,P.km)(t,n)}var z=A.forwardRef((function(e,t){var n=e.prefixCls,i=e.data,o=(e.selectable,e.checkable,e.expandedKeys),a=e.selectedKeys,s=e.checkedKeys,l=e.loadedKeys,c=e.loadingKeys,u=e.halfCheckedKeys,d=e.keyEntities,f=e.disabled,h=e.dragging,p=e.dragOverNodeKey,g=e.dropPosition,m=e.motion,v=e.height,y=e.itemHeight,S=e.virtual,C=e.focusable,T=e.activeItem,k=e.focused,D=e.tabIndex,F=e.onKeyDown,z=e.onFocus,U=e.onBlur,H=e.onActiveChange,V=e.onListChangeStart,W=e.onListChangeEnd,G=(0,w.Z)(e,R),K=A.useRef(null),q=A.useRef(null);A.useImperativeHandle(t,(function(){return{scrollTo:function(e){K.current.scrollTo(e)},getIndentWidth:function(){return q.current.offsetWidth}}}));var Y=A.useState(o),X=(0,_.Z)(Y,2),$=X[0],Q=X[1],J=A.useState(i),ee=(0,_.Z)(J,2),te=ee[0],ne=ee[1],re=A.useState(i),ie=(0,_.Z)(re,2),oe=ie[0],ae=ie[1],se=A.useState([]),le=(0,_.Z)(se,2),ce=le[0],ue=le[1],de=A.useState(null),fe=(0,_.Z)(de,2),he=fe[0],pe=fe[1],ge=A.useRef(i);function me(){var e=ge.current;ne(e),ae(e),ue([]),pe(null),W()}ge.current=i,(0,x.Z)((function(){Q(o);var e=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=e.length,r=t.length;if(1!==Math.abs(n-r))return{add:!1,key:null};function i(e,t){var n=new Map;e.forEach((function(e){n.set(e,!0)}));var r=t.filter((function(e){return!n.has(e)}));return 1===r.length?r[0]:null}return n ").concat(t);return t}(T)),A.createElement("div",null,A.createElement("input",{style:I,disabled:!1===C||f,tabIndex:!1!==C?D:null,onKeyDown:F,onFocus:z,onBlur:U,value:"",onChange:L,"aria-label":"for screen reader"})),A.createElement("div",{className:"".concat(n,"-treenode"),"aria-hidden":!0,style:{position:"absolute",pointerEvents:"none",visibility:"hidden",height:0,overflow:"hidden",border:0,padding:0}},A.createElement("div",{className:"".concat(n,"-indent")},A.createElement("div",{ref:q,className:"".concat(n,"-indent-unit")}))),A.createElement(E.Z,(0,r.Z)({},G,{data:ve,itemKey:Z,height:v,fullHeight:!1,virtual:S,itemHeight:y,prefixCls:"".concat(n,"-list"),ref:K,onVisibleChange:function(e,t){var n=new Set(e);t.filter((function(e){return!n.has(e)})).some((function(e){return Z(e)===N}))&&me()}}),(function(e){var t=e.pos,n=Object.assign({},(b(e.data),e.data)),i=e.title,o=e.key,a=e.isStart,s=e.isEnd,l=(0,P.km)(o,t);delete n.key,delete n.children;var c=(0,P.H8)(l,Ae);return A.createElement(M,(0,r.Z)({},n,c,{title:i,active:!!T&&o===T.key,pos:t,data:e.data,isStart:a,isEnd:s,motion:m,motionNodes:o===N?ce:null,motionType:he,onMotionStart:V,onMotionEnd:me,treeNodeRequiredProps:Ae,onMouseMove:function(){H(null)}}))})))}));z.displayName="NodeList";const U=z;var H=n(88817),V=n(84548),W=n(6483),G=function(e){(0,u.Z)(n,e);var t=(0,d.Z)(n);function n(){var e;(0,s.Z)(this,n);for(var r=arguments.length,i=new Array(r),l=0;l2&&void 0!==arguments[2]&&arguments[2],a=e.state,s=a.dragChildrenKeys,l=a.dropPosition,c=a.dropTargetKey,u=a.dropTargetPos;if(a.dropAllowed){var d=e.props.onDrop;if(e.setState({dragOverNodeKey:null}),e.cleanDragState(),null!==c){var f=(0,o.Z)((0,o.Z)({},(0,P.H8)(c,e.getTreeNodeRequiredProps())),{},{active:(null===(r=e.getActiveItem())||void 0===r?void 0:r.key)===c,data:(0,W.Z)(e.state.keyEntities,c).node}),h=-1!==s.indexOf(c);(0,v.ZP)(!h,"Can not drop to dragNode's children node. This is a bug of rc-tree. Please report an issue.");var p=(0,H.yx)(u),g={event:t,node:(0,P.F)(f),dragNode:e.dragNode?(0,P.F)(e.dragNode.props):null,dragNodesKeys:[e.dragNode.props.eventKey].concat(s),dropToGap:0!==l,dropPosition:l+Number(p[p.length-1])};i||null===d||void 0===d||d(g),e.dragNode=null}}})),(0,f.Z)((0,c.Z)(e),"cleanDragState",(function(){null!==e.state.draggingNodeKey&&e.setState({draggingNodeKey:null,dropPosition:null,dropContainerKey:null,dropTargetKey:null,dropLevelOffset:null,dropAllowed:!0,dragOverNodeKey:null}),e.dragStartMousePosition=null,e.currentMouseOverDroppableNodeKey=null})),(0,f.Z)((0,c.Z)(e),"triggerExpandActionExpand",(function(t,n){var r=e.state,i=r.expandedKeys,a=r.flattenNodes,s=n.expanded,l=n.key;if(!(n.isLeaf||t.shiftKey||t.metaKey||t.ctrlKey)){var c=a.filter((function(e){return e.key===l}))[0],u=(0,P.F)((0,o.Z)((0,o.Z)({},(0,P.H8)(l,e.getTreeNodeRequiredProps())),{},{data:c.data}));e.setExpandedKeys(s?(0,H._5)(i,l):(0,H.L0)(i,l)),e.onNodeExpand(t,u)}})),(0,f.Z)((0,c.Z)(e),"onNodeClick",(function(t,n){var r=e.props,i=r.onClick;"click"===r.expandAction&&e.triggerExpandActionExpand(t,n),null===i||void 0===i||i(t,n)})),(0,f.Z)((0,c.Z)(e),"onNodeDoubleClick",(function(t,n){var r=e.props,i=r.onDoubleClick;"doubleClick"===r.expandAction&&e.triggerExpandActionExpand(t,n),null===i||void 0===i||i(t,n)})),(0,f.Z)((0,c.Z)(e),"onNodeSelect",(function(t,n){var r=e.state.selectedKeys,i=e.state,o=i.keyEntities,a=i.fieldNames,s=e.props,l=s.onSelect,c=s.multiple,u=n.selected,d=n[a.key],f=!u,h=(r=f?c?(0,H.L0)(r,d):[d]:(0,H._5)(r,d)).map((function(e){var t=(0,W.Z)(o,e);return t?t.node:null})).filter((function(e){return e}));e.setUncontrolledState({selectedKeys:r}),null===l||void 0===l||l(r,{event:"select",selected:f,node:n,selectedNodes:h,nativeEvent:t.nativeEvent})})),(0,f.Z)((0,c.Z)(e),"onNodeCheck",(function(t,n,r){var i,o=e.state,s=o.keyEntities,l=o.checkedKeys,c=o.halfCheckedKeys,u=e.props,d=u.checkStrictly,f=u.onCheck,h=n.key,p={event:"check",node:n,checked:r,nativeEvent:t.nativeEvent};if(d){var g=r?(0,H.L0)(l,h):(0,H._5)(l,h);i={checked:g,halfChecked:(0,H._5)(c,h)},p.checkedNodes=g.map((function(e){return(0,W.Z)(s,e)})).filter((function(e){return e})).map((function(e){return e.node})),e.setUncontrolledState({checkedKeys:g})}else{var m=(0,V.S)([].concat((0,a.Z)(l),[h]),!0,s),v=m.checkedKeys,A=m.halfCheckedKeys;if(!r){var y=new Set(v);y.delete(h);var b=(0,V.S)(Array.from(y),{checked:!1,halfCheckedKeys:A},s);v=b.checkedKeys,A=b.halfCheckedKeys}i=v,p.checkedNodes=[],p.checkedNodesPositions=[],p.halfCheckedKeys=A,v.forEach((function(e){var t=(0,W.Z)(s,e);if(t){var n=t.node,r=t.pos;p.checkedNodes.push(n),p.checkedNodesPositions.push({node:n,pos:r})}})),e.setUncontrolledState({checkedKeys:v},!1,{halfCheckedKeys:A})}null===f||void 0===f||f(i,p)})),(0,f.Z)((0,c.Z)(e),"onNodeLoad",(function(t){var n=t.key,r=new Promise((function(r,i){e.setState((function(o){var a=o.loadedKeys,s=void 0===a?[]:a,l=o.loadingKeys,c=void 0===l?[]:l,u=e.props,d=u.loadData,f=u.onLoad;return d&&-1===s.indexOf(n)&&-1===c.indexOf(n)?(d(t).then((function(){var i=e.state.loadedKeys,o=(0,H.L0)(i,n);null===f||void 0===f||f(o,{event:"load",node:t}),e.setUncontrolledState({loadedKeys:o}),e.setState((function(e){return{loadingKeys:(0,H._5)(e.loadingKeys,n)}})),r()})).catch((function(t){if(e.setState((function(e){return{loadingKeys:(0,H._5)(e.loadingKeys,n)}})),e.loadingRetryTimes[n]=(e.loadingRetryTimes[n]||0)+1,e.loadingRetryTimes[n]>=10){var o=e.state.loadedKeys;(0,v.ZP)(!1,"Retry for `loadData` many times but still failed. No more retry."),e.setUncontrolledState({loadedKeys:(0,H.L0)(o,n)}),r()}i(t)})),{loadingKeys:(0,H.L0)(c,n)}):null}))}));return r.catch((function(){})),r})),(0,f.Z)((0,c.Z)(e),"onNodeMouseEnter",(function(t,n){var r=e.props.onMouseEnter;null===r||void 0===r||r({event:t,node:n})})),(0,f.Z)((0,c.Z)(e),"onNodeMouseLeave",(function(t,n){var r=e.props.onMouseLeave;null===r||void 0===r||r({event:t,node:n})})),(0,f.Z)((0,c.Z)(e),"onNodeContextMenu",(function(t,n){var r=e.props.onRightClick;r&&(t.preventDefault(),r({event:t,node:n}))})),(0,f.Z)((0,c.Z)(e),"onFocus",(function(){var t=e.props.onFocus;e.setState({focused:!0});for(var n=arguments.length,r=new Array(n),i=0;i1&&void 0!==arguments[1]&&arguments[1],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(!e.destroyed){var i=!1,a=!0,s={};Object.keys(t).forEach((function(n){n in e.props?a=!1:(i=!0,s[n]=t[n])})),!i||n&&!a||e.setState((0,o.Z)((0,o.Z)({},s),r))}})),(0,f.Z)((0,c.Z)(e),"scrollTo",(function(t){e.listRef.current.scrollTo(t)})),e}return(0,l.Z)(n,[{key:"componentDidMount",value:function(){this.destroyed=!1,this.onUpdated()}},{key:"componentDidUpdate",value:function(){this.onUpdated()}},{key:"onUpdated",value:function(){var e=this.props,t=e.activeKey,n=e.itemScrollOffset,r=void 0===n?0:n;void 0!==t&&t!==this.state.activeKey&&(this.setState({activeKey:t}),null!==t&&this.scrollTo({key:t,offset:r}))}},{key:"componentWillUnmount",value:function(){window.removeEventListener("dragend",this.onWindowDragEnd),this.destroyed=!0}},{key:"resetDragState",value:function(){this.setState({dragOverNodeKey:null,dropPosition:null,dropLevelOffset:null,dropTargetKey:null,dropContainerKey:null,dropTargetPos:null,dropAllowed:!1})}},{key:"render",value:function(){var e,t=this.state,n=t.focused,o=t.flattenNodes,a=t.keyEntities,s=t.draggingNodeKey,l=t.activeKey,c=t.dropLevelOffset,u=t.dropContainerKey,d=t.dropTargetKey,h=t.dropPosition,g=t.dragOverNodeKey,v=t.indent,b=this.props,_=b.prefixCls,w=b.className,x=b.style,E=b.showLine,S=b.focusable,C=b.tabIndex,P=void 0===C?0:C,T=b.selectable,k=b.showIcon,M=b.icon,O=b.switcherIcon,R=b.draggable,I=b.checkable,L=b.checkStrictly,N=b.disabled,D=b.motion,F=b.loadData,j=b.filterTreeNode,B=b.height,Z=b.itemHeight,z=b.virtual,H=b.titleRender,V=b.dropIndicatorRender,W=b.onContextMenu,G=b.onScroll,K=b.direction,q=b.rootClassName,Y=b.rootStyle,X=(0,m.Z)(this.props,{aria:!0,data:!0});return R&&(e="object"===(0,i.Z)(R)?R:"function"===typeof R?{nodeDraggable:R}:{}),A.createElement(y.k.Provider,{value:{prefixCls:_,selectable:T,showIcon:k,icon:M,switcherIcon:O,draggable:e,draggingNodeKey:s,checkable:I,checkStrictly:L,disabled:N,keyEntities:a,dropLevelOffset:c,dropContainerKey:u,dropTargetKey:d,dropPosition:h,dragOverNodeKey:g,indent:v,direction:K,dropIndicatorRender:V,loadData:F,filterTreeNode:j,titleRender:H,onNodeClick:this.onNodeClick,onNodeDoubleClick:this.onNodeDoubleClick,onNodeExpand:this.onNodeExpand,onNodeSelect:this.onNodeSelect,onNodeCheck:this.onNodeCheck,onNodeLoad:this.onNodeLoad,onNodeMouseEnter:this.onNodeMouseEnter,onNodeMouseLeave:this.onNodeMouseLeave,onNodeContextMenu:this.onNodeContextMenu,onNodeDragStart:this.onNodeDragStart,onNodeDragEnter:this.onNodeDragEnter,onNodeDragOver:this.onNodeDragOver,onNodeDragLeave:this.onNodeDragLeave,onNodeDragEnd:this.onNodeDragEnd,onNodeDrop:this.onNodeDrop}},A.createElement("div",{role:"tree",className:p()(_,w,q,(0,f.Z)((0,f.Z)((0,f.Z)({},"".concat(_,"-show-line"),E),"".concat(_,"-focused"),n),"".concat(_,"-active-focused"),null!==l)),style:Y},A.createElement(U,(0,r.Z)({ref:this.listRef,prefixCls:_,style:x,data:o,disabled:N,selectable:T,checkable:!!I,motion:D,dragging:null!==s,height:B,itemHeight:Z,virtual:z,focusable:S,focused:n,tabIndex:P,activeItem:this.getActiveItem(),onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.onKeyDown,onActiveChange:this.onActiveChange,onListChangeStart:this.onListChangeStart,onListChangeEnd:this.onListChangeEnd,onContextMenu:W,onScroll:G},this.getTreeNodeRequiredProps(),X))))}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n,r=t.prevProps,i={prevProps:e};function a(t){return!r&&t in e||r&&r[t]!==e[t]}var s=t.fieldNames;if(a("fieldNames")&&(s=(0,P.w$)(e.fieldNames),i.fieldNames=s),a("treeData")?n=e.treeData:a("children")&&((0,v.ZP)(!1,"`children` of Tree is deprecated. Please use `treeData` instead."),n=(0,P.zn)(e.children)),n){i.treeData=n;var l=(0,P.I8)(n,{fieldNames:s});i.keyEntities=(0,o.Z)((0,f.Z)({},N,F),l.keyEntities)}var c,u=i.keyEntities||t.keyEntities;if(a("expandedKeys")||r&&a("autoExpandParent"))i.expandedKeys=e.autoExpandParent||!r&&e.defaultExpandParent?(0,H.r7)(e.expandedKeys,u):e.expandedKeys;else if(!r&&e.defaultExpandAll){var d=(0,o.Z)({},u);delete d[N],i.expandedKeys=Object.keys(d).map((function(e){return d[e].key}))}else!r&&e.defaultExpandedKeys&&(i.expandedKeys=e.autoExpandParent||e.defaultExpandParent?(0,H.r7)(e.defaultExpandedKeys,u):e.defaultExpandedKeys);if(i.expandedKeys||delete i.expandedKeys,n||i.expandedKeys){var h=(0,P.oH)(n||t.treeData,i.expandedKeys||t.expandedKeys,s);i.flattenNodes=h}if((e.selectable&&(a("selectedKeys")?i.selectedKeys=(0,H.BT)(e.selectedKeys,e):!r&&e.defaultSelectedKeys&&(i.selectedKeys=(0,H.BT)(e.defaultSelectedKeys,e))),e.checkable)&&(a("checkedKeys")?c=(0,H.E6)(e.checkedKeys)||{}:!r&&e.defaultCheckedKeys?c=(0,H.E6)(e.defaultCheckedKeys)||{}:n&&(c=(0,H.E6)(e.checkedKeys)||{checkedKeys:t.checkedKeys,halfCheckedKeys:t.halfCheckedKeys}),c)){var p=c,g=p.checkedKeys,m=void 0===g?[]:g,A=p.halfCheckedKeys,y=void 0===A?[]:A;if(!e.checkStrictly){var b=(0,V.S)(m,!0,u);m=b.checkedKeys,y=b.halfCheckedKeys}i.checkedKeys=m,i.halfCheckedKeys=y}return a("loadedKeys")&&(i.loadedKeys=e.loadedKeys),i}}]),n}(A.Component);(0,f.Z)(G,"defaultProps",{prefixCls:"rc-tree",showLine:!1,showIcon:!0,selectable:!0,multiple:!1,checkable:!1,disabled:!1,checkStrictly:!1,draggable:!1,defaultExpandParent:!0,autoExpandParent:!1,defaultExpandAll:!1,defaultExpandedKeys:[],defaultCheckedKeys:[],defaultSelectedKeys:[],dropIndicatorRender:function(e){var t=e.dropPosition,n=e.dropLevelOffset,r=e.indent,i={pointerEvents:"none",position:"absolute",right:0,backgroundColor:"red",height:2};switch(t){case-1:i.top=0,i.left=-n*r;break;case 1:i.bottom=0,i.left=-n*r;break;case 0:i.bottom=0,i.left=r}return A.createElement("div",{style:i})},allowDrop:function(){return!0},expandAction:!1}),(0,f.Z)(G,"TreeNode",C.Z);const K=G},88817:(e,t,n)=>{"use strict";n.d(t,{BT:()=>h,E6:()=>p,L0:()=>l,OM:()=>f,_5:()=>s,r7:()=>g,wA:()=>u,yx:()=>c});var r=n(22368),i=n(69223),o=n(98162),a=(n(57435),n(67066),n(6483));n(24389);function s(e,t){if(!e)return[];var n=e.slice(),r=n.indexOf(t);return r>=0&&n.splice(r,1),n}function l(e,t){var n=(e||[]).slice();return-1===n.indexOf(t)&&n.push(t),n}function c(e){return e.split("-")}function u(e,t){var n=[];return function e(){(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).forEach((function(t){var r=t.key,i=t.children;n.push(r),e(i)}))}((0,a.Z)(t,e).children),n}function d(e){if(e.parent){var t=c(e.pos);return Number(t[t.length-1])===e.parent.children.length-1}return!1}function f(e,t,n,r,i,o,s,l,u,f){var h,p=e.clientX,g=e.clientY,m=e.target.getBoundingClientRect(),v=m.top,A=m.height,y=(("rtl"===f?-1:1)*(((null===i||void 0===i?void 0:i.x)||0)-p)-12)/r,b=u.filter((function(e){var t;return null===(t=l[e])||void 0===t||null===(t=t.children)||void 0===t?void 0:t.length})),_=(0,a.Z)(l,n.props.eventKey);if(g-1.5?o({dragNode:M,dropNode:O,dropPosition:1})?P=1:R=!1:o({dragNode:M,dropNode:O,dropPosition:0})?P=0:o({dragNode:M,dropNode:O,dropPosition:1})?P=1:R=!1:o({dragNode:M,dropNode:O,dropPosition:1})?P=1:R=!1,{dropPosition:P,dropLevelOffset:T,dropTargetKey:_.key,dropTargetPos:_.pos,dragOverNodeKey:C,dropContainerKey:0===P?null:(null===(h=_.parent)||void 0===h?void 0:h.key)||null,dropAllowed:R}}function h(e,t){if(e)return t.multiple?e.slice():e.length?[e[0]]:e}function p(e){if(!e)return null;var t;if(Array.isArray(e))t={checkedKeys:e,halfCheckedKeys:void 0};else{if("object"!==(0,i.Z)(e))return(0,o.ZP)(!1,"`checkedKeys` is not an array or an object"),null;t={checkedKeys:e.checked||void 0,halfCheckedKeys:e.halfChecked||void 0}}return t}function g(e,t){var n=new Set;function i(e){if(!n.has(e)){var r=(0,a.Z)(t,e);if(r){n.add(e);var o=r.parent;r.node.disabled||o&&i(o.key)}}}return(e||[]).forEach((function(e){i(e)})),(0,r.Z)(n)}},84548:(e,t,n)=>{"use strict";n.d(t,{S:()=>s});var r=n(98162),i=n(6483);function o(e,t){var n=new Set;return e.forEach((function(e){t.has(e)||n.add(e)})),n}function a(e){var t=e||{},n=t.disabled,r=t.disableCheckbox,i=t.checkable;return!(!n&&!r)||!1===i}function s(e,t,n,s){var l,c=[];l=s||a;var u,d=new Set(e.filter((function(e){var t=!!(0,i.Z)(n,e);return t||c.push(e),t}))),f=new Map,h=0;return Object.keys(n).forEach((function(e){var t=n[e],r=t.level,i=f.get(r);i||(i=new Set,f.set(r,i)),i.add(t),h=Math.max(h,r)})),(0,r.ZP)(!c.length,"Tree missing follow keys: ".concat(c.slice(0,100).map((function(e){return"'".concat(e,"'")})).join(", "))),u=!0===t?function(e,t,n,r){for(var i=new Set(e),a=new Set,s=0;s<=n;s+=1)(t.get(s)||new Set).forEach((function(e){var t=e.key,n=e.node,o=e.children,a=void 0===o?[]:o;i.has(t)&&!r(n)&&a.filter((function(e){return!r(e.node)})).forEach((function(e){i.add(e.key)}))}));for(var l=new Set,c=n;c>=0;c-=1)(t.get(c)||new Set).forEach((function(e){var t=e.parent,n=e.node;if(!r(n)&&e.parent&&!l.has(e.parent.key))if(r(e.parent.node))l.add(t.key);else{var o=!0,s=!1;(t.children||[]).filter((function(e){return!r(e.node)})).forEach((function(e){var t=e.key,n=i.has(t);o&&!n&&(o=!1),s||!n&&!a.has(t)||(s=!0)})),o&&i.add(t.key),s&&a.add(t.key),l.add(t.key)}}));return{checkedKeys:Array.from(i),halfCheckedKeys:Array.from(o(a,i))}}(d,f,h,l):function(e,t,n,r,i){for(var a=new Set(e),s=new Set(t),l=0;l<=r;l+=1)(n.get(l)||new Set).forEach((function(e){var t=e.key,n=e.node,r=e.children,o=void 0===r?[]:r;a.has(t)||s.has(t)||i(n)||o.filter((function(e){return!i(e.node)})).forEach((function(e){a.delete(e.key)}))}));s=new Set;for(var c=new Set,u=r;u>=0;u-=1)(n.get(u)||new Set).forEach((function(e){var t=e.parent,n=e.node;if(!i(n)&&e.parent&&!c.has(e.parent.key))if(i(e.parent.node))c.add(t.key);else{var r=!0,o=!1;(t.children||[]).filter((function(e){return!i(e.node)})).forEach((function(e){var t=e.key,n=a.has(t);r&&!n&&(r=!1),o||!n&&!s.has(t)||(o=!0)})),r||a.delete(t.key),o&&s.add(t.key),c.add(t.key)}}));return{checkedKeys:Array.from(a),halfCheckedKeys:Array.from(o(s,a))}}(d,t.halfCheckedKeys,f,h,l),u}},6483:(e,t,n)=>{"use strict";function r(e,t){return e[t]}n.d(t,{Z:()=>r})},24389:(e,t,n)=>{"use strict";n.d(t,{F:()=>y,H8:()=>A,I8:()=>v,km:()=>h,oH:()=>m,w$:()=>p,zn:()=>g});var r=n(69223),i=n(22368),o=n(35194),a=n(99309),s=n(52353),l=n(43488),c=n(98162),u=n(6483),d=["children"];function f(e,t){return"".concat(e,"-").concat(t)}function h(e,t){return null!==e&&void 0!==e?e:t}function p(e){var t=e||{},n=t.title||"title";return{title:n,_title:t._title||[n],key:t.key||"key",children:t.children||"children"}}function g(e){return function e(t){return(0,s.Z)(t).map((function(t){if(!function(e){return e&&e.type&&e.type.isTreeNode}(t))return(0,c.ZP)(!t,"Tree/TreeNode can only accept TreeNode as children."),null;var n=t.key,r=t.props,i=r.children,s=(0,a.Z)(r,d),l=(0,o.Z)({key:n},s),u=e(i);return u.length&&(l.children=u),l})).filter((function(e){return e}))}(e)}function m(e,t,n){var r=p(n),a=r._title,s=r.key,c=r.children,u=new Set(!0===t?[]:t),d=[];return function e(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return n.map((function(p,g){for(var m,v=f(r?r.pos:"0",g),A=h(p[s],v),y=0;y1&&void 0!==arguments[1]?arguments[1]:{},n=t.initWrapper,o=t.processEntity,a=t.onProcessFinished,s=t.externalGetKey,l=t.childrenPropName,c=t.fieldNames,u=s||(arguments.length>2?arguments[2]:void 0),d={},g={},m={posEntities:d,keyEntities:g};return n&&(m=n(m)||m),function(e,t,n){var o,a=("object"===(0,r.Z)(n)?n:{externalGetKey:n})||{},s=a.childrenPropName,l=a.externalGetKey,c=p(a.fieldNames),u=c.key,d=c.children,g=s||d;l?"string"===typeof l?o=function(e){return e[l]}:"function"===typeof l&&(o=function(e){return l(e)}):o=function(e,t){return h(e[u],t)},function n(r,a,s,l){var c=r?r[g]:e,u=r?f(s.pos,a):"0",d=r?[].concat((0,i.Z)(l),[r]):[];if(r){var h=o(r,u),p={node:r,index:a,pos:u,key:h,parentPos:s.node?s.pos:null,level:s.level+1,nodes:d};t(p)}c&&c.forEach((function(e,t){n(e,t,{node:r,pos:u,level:s?s.level+1:-1},d)}))}(null)}(e,(function(e){var t=e.node,n=e.index,r=e.pos,i=e.key,a=e.parentPos,s=e.level,l={node:t,nodes:e.nodes,index:n,key:i,pos:r,level:s},c=h(i,r);d[r]=l,g[c]=l,l.parent=d[a],l.parent&&(l.parent.children=l.parent.children||[],l.parent.children.push(l)),o&&o(l,m)}),{externalGetKey:u,childrenPropName:l,fieldNames:c}),a&&a(m),m}function A(e,t){var n=t.expandedKeys,r=t.selectedKeys,i=t.loadedKeys,o=t.loadingKeys,a=t.checkedKeys,s=t.halfCheckedKeys,l=t.dragOverNodeKey,c=t.dropPosition,d=t.keyEntities,f=(0,u.Z)(d,e);return{eventKey:e,expanded:-1!==n.indexOf(e),selected:-1!==r.indexOf(e),loaded:-1!==i.indexOf(e),loading:-1!==o.indexOf(e),checked:-1!==a.indexOf(e),halfChecked:-1!==s.indexOf(e),pos:String(f?f.pos:""),dragOver:l===e&&0===c,dragOverGapTop:l===e&&-1===c,dragOverGapBottom:l===e&&1===c}}function y(e){var t=e.data,n=e.expanded,r=e.selected,i=e.checked,a=e.loaded,s=e.loading,l=e.halfChecked,u=e.dragOver,d=e.dragOverGapTop,f=e.dragOverGapBottom,h=e.pos,p=e.active,g=e.eventKey,m=(0,o.Z)((0,o.Z)({},t),{},{expanded:n,selected:r,checked:i,loaded:a,loading:s,halfChecked:l,dragOver:u,dragOverGapTop:d,dragOverGapBottom:f,pos:h,active:p,key:g});return"props"in m||Object.defineProperty(m,"props",{get:function(){return(0,c.ZP)(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),e}}),m}},65151:(e,t,n)=>{"use strict";n.d(t,{Z:()=>R});var r=n(91010),i=n(66375),o=n(1959),a=n(50269),s=n(64648),l=n(13004),c=n(68185),u=n(57435),d=n(35194),f=n(99309),h=n(98106),p=n(69223),g=n(2292),m=n(22368),v=n(12356),A=n.n(v),y=n(37461),b=n(98162);const _=function(e,t){if(e&&t){var n=Array.isArray(t)?t:t.split(","),r=e.name||"",i=e.type||"",o=i.replace(/\/.*$/,"");return n.some((function(e){var t=e.trim();if(/^\*(\/\*)?$/.test(e))return!0;if("."===t.charAt(0)){var n=r.toLowerCase(),a=t.toLowerCase(),s=[a];return".jpg"!==a&&".jpeg"!==a||(s=[".jpg",".jpeg"]),s.some((function(e){return n.endsWith(e)}))}return/\/\*$/.test(t)?o===t.replace(/\/.*$/,""):i===t||!!/^\w+$/.test(t)&&((0,b.ZP)(!1,"Upload takes an invalidate 'accept' type '".concat(t,"'.Skip for check.")),!0)}))}return!0};function w(e){var t=e.responseText||e.response;if(!t)return t;try{return JSON.parse(t)}catch(n){return t}}function x(e){var t=new XMLHttpRequest;e.onProgress&&t.upload&&(t.upload.onprogress=function(t){t.total>0&&(t.percent=t.loaded/t.total*100),e.onProgress(t)});var n=new FormData;e.data&&Object.keys(e.data).forEach((function(t){var r=e.data[t];Array.isArray(r)?r.forEach((function(e){n.append("".concat(t,"[]"),e)})):n.append(t,r)})),e.file instanceof Blob?n.append(e.filename,e.file,e.file.name):n.append(e.filename,e.file),t.onerror=function(t){e.onError(t)},t.onload=function(){return t.status<200||t.status>=300?e.onError(function(e,t){var n="cannot ".concat(e.method," ").concat(e.action," ").concat(t.status,"'"),r=new Error(n);return r.status=t.status,r.method=e.method,r.url=e.action,r}(e,t),w(t)):e.onSuccess(w(t),t)},t.open(e.method,e.action,!0),e.withCredentials&&"withCredentials"in t&&(t.withCredentials=!0);var r=e.headers||{};return null!==r["X-Requested-With"]&&t.setRequestHeader("X-Requested-With","XMLHttpRequest"),Object.keys(r).forEach((function(e){null!==r[e]&&t.setRequestHeader(e,r[e])})),t.send(n),{abort:function(){t.abort()}}}const E=function(e,t,n){var r=function e(r,i){r&&(r.path=i||"",r.isFile?r.file((function(e){n(e)&&(r.fullPath&&!e.webkitRelativePath&&(Object.defineProperties(e,{webkitRelativePath:{writable:!0}}),e.webkitRelativePath=r.fullPath.replace(/^\//,""),Object.defineProperties(e,{webkitRelativePath:{writable:!1}})),t([e]))})):r.isDirectory&&function(e,t){var n=e.createReader(),r=[];!function e(){n.readEntries((function(n){var i=Array.prototype.slice.apply(n);r=r.concat(i),i.length?e():t(r)}))}()}(r,(function(t){t.forEach((function(t){e(t,"".concat(i).concat(r.name,"/"))}))})))};e.forEach((function(e){r(e.webkitGetAsEntry())}))};var S=+new Date,C=0;function P(){return"rc-upload-".concat(S,"-").concat(++C)}var T=["component","prefixCls","className","classNames","disabled","id","style","styles","multiple","accept","capture","children","directory","openFileDialogOnClick","onMouseEnter","onMouseLeave","hasControlInside"];const k=function(e){(0,s.Z)(n,e);var t=(0,l.Z)(n);function n(){var e;(0,i.Z)(this,n);for(var r=arguments.length,o=new Array(r),s=0;s{"use strict";n.d(t,{Z:()=>o});var r=n(57435),i=n(40758);function o(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=[];return r.Children.forEach(e,(function(e){(void 0!==e&&null!==e||t.keepEmpty)&&(Array.isArray(e)?n=n.concat(o(e)):(0,i.isFragment)(e)&&e.props?n=n.concat(o(e.props.children,t)):n.push(e))})),n}},20749:(e,t,n)=>{"use strict";function r(){return!("undefined"===typeof window||!window.document||!window.document.createElement)}n.d(t,{Z:()=>r})},28143:(e,t,n)=>{"use strict";function r(e,t){if(!e)return!1;if(e.contains)return e.contains(t);for(var n=t;n;){if(n===e)return!0;n=n.parentNode}return!1}n.d(t,{Z:()=>r})},86263:(e,t,n)=>{"use strict";n.d(t,{hq:()=>m,jL:()=>g});var r=n(35194),i=n(20749),o=n(28143),a="data-rc-order",s="data-rc-priority",l="rc-util-key",c=new Map;function u(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).mark;return e?e.startsWith("data-")?e:"data-".concat(e):l}function d(e){return e.attachTo?e.attachTo:document.querySelector("head")||document.body}function f(e){return Array.from((c.get(e)||e).children).filter((function(e){return"STYLE"===e.tagName}))}function h(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!(0,i.Z)())return null;var n=t.csp,r=t.prepend,o=t.priority,l=void 0===o?0:o,c=function(e){return"queue"===e?"prependQueue":e?"prepend":"append"}(r),u="prependQueue"===c,h=document.createElement("style");h.setAttribute(a,c),u&&l&&h.setAttribute(s,"".concat(l)),null!==n&&void 0!==n&&n.nonce&&(h.nonce=null===n||void 0===n?void 0:n.nonce),h.innerHTML=e;var p=d(t),g=p.firstChild;if(r){if(u){var m=(t.styles||f(p)).filter((function(e){if(!["prepend","prependQueue"].includes(e.getAttribute(a)))return!1;var t=Number(e.getAttribute(s)||0);return l>=t}));if(m.length)return p.insertBefore(h,m[m.length-1].nextSibling),h}p.insertBefore(h,g)}else p.appendChild(h);return h}function p(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=d(t);return(t.styles||f(n)).find((function(n){return n.getAttribute(u(t))===e}))}function g(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=p(e,t);n&&d(t).removeChild(n)}function m(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=d(n),a=f(i),s=(0,r.Z)((0,r.Z)({},n),{},{styles:a});!function(e,t){var n=c.get(e);if(!n||!(0,o.Z)(document,n)){var r=h("",t),i=r.parentNode;c.set(e,i),e.removeChild(r)}}(i,s);var l=p(t,s);if(l){var g,m,v;if(null!==(g=s.csp)&&void 0!==g&&g.nonce&&l.nonce!==(null===(m=s.csp)||void 0===m?void 0:m.nonce))l.nonce=null===(v=s.csp)||void 0===v?void 0:v.nonce;return l.innerHTML!==e&&(l.innerHTML=e),l}var A=h(e,s);return A.setAttribute(u(s),t),A}},48541:(e,t,n)=>{"use strict";n.d(t,{S:()=>o,Z:()=>a});var r=n(57435),i=n(33882);function o(e){return e instanceof HTMLElement||e instanceof SVGElement}function a(e){return o(e)?e:e instanceof r.Component?i.findDOMNode(e):null}},26842:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=function(e){if(!e)return!1;if(e instanceof Element){if(e.offsetParent)return!0;if(e.getBBox){var t=e.getBBox(),n=t.width,r=t.height;if(n||r)return!0}if(e.getBoundingClientRect){var i=e.getBoundingClientRect(),o=i.width,a=i.height;if(o||a)return!0}}return!1}},13834:(e,t,n)=>{"use strict";function r(e){var t;return null===e||void 0===e||null===(t=e.getRootNode)||void 0===t?void 0:t.call(e)}function i(e){return function(e){return r(e)instanceof ShadowRoot}(e)?r(e):null}n.d(t,{A:()=>i})},1744:(e,t,n)=>{"use strict";n.d(t,{G:()=>a});var r=n(20749),i=function(e){if((0,r.Z)()&&window.document.documentElement){var t=Array.isArray(e)?e:[e],n=window.document.documentElement;return t.some((function(e){return e in n.style}))}return!1},o=function(e,t){if(!i(e))return!1;var n=document.createElement("div"),r=n.style[e];return n.style[e]=t,n.style[e]!==r};function a(e,t){return Array.isArray(e)||void 0===t?i(e):o(e,t)}},98475:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r={MAC_ENTER:3,BACKSPACE:8,TAB:9,NUM_CENTER:12,ENTER:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PRINT_SCREEN:44,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,QUESTION_MARK:63,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,META:91,WIN_KEY_RIGHT:92,CONTEXT_MENU:93,NUM_ZERO:96,NUM_ONE:97,NUM_TWO:98,NUM_THREE:99,NUM_FOUR:100,NUM_FIVE:101,NUM_SIX:102,NUM_SEVEN:103,NUM_EIGHT:104,NUM_NINE:105,NUM_MULTIPLY:106,NUM_PLUS:107,NUM_MINUS:109,NUM_PERIOD:110,NUM_DIVISION:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,NUMLOCK:144,SEMICOLON:186,DASH:189,EQUALS:187,COMMA:188,PERIOD:190,SLASH:191,APOSTROPHE:192,SINGLE_QUOTE:222,OPEN_SQUARE_BRACKET:219,BACKSLASH:220,CLOSE_SQUARE_BRACKET:221,WIN_KEY:224,MAC_FF_META:224,WIN_IME:229,isTextModifyingKeyEvent:function(e){var t=e.keyCode;if(e.altKey&&!e.ctrlKey||e.metaKey||t>=r.F1&&t<=r.F12)return!1;switch(t){case r.ALT:case r.CAPS_LOCK:case r.CONTEXT_MENU:case r.CTRL:case r.DOWN:case r.END:case r.ESC:case r.HOME:case r.INSERT:case r.LEFT:case r.MAC_FF_META:case r.META:case r.NUMLOCK:case r.NUM_CENTER:case r.PAGE_DOWN:case r.PAGE_UP:case r.PAUSE:case r.PRINT_SCREEN:case r.RIGHT:case r.SHIFT:case r.UP:case r.WIN_KEY:case r.WIN_KEY_RIGHT:return!1;default:return!0}},isCharacterKey:function(e){if(e>=r.ZERO&&e<=r.NINE)return!0;if(e>=r.NUM_ZERO&&e<=r.NUM_MULTIPLY)return!0;if(e>=r.A&&e<=r.Z)return!0;if(-1!==window.navigator.userAgent.indexOf("WebKit")&&0===e)return!0;switch(e){case r.SPACE:case r.QUESTION_MARK:case r.NUM_PLUS:case r.NUM_MINUS:case r.NUM_PERIOD:case r.NUM_DIVISION:case r.SEMICOLON:case r.DASH:case r.EQUALS:case r.COMMA:case r.PERIOD:case r.SLASH:case r.APOSTROPHE:case r.SINGLE_QUOTE:case r.OPEN_SQUARE_BRACKET:case r.BACKSLASH:case r.CLOSE_SQUARE_BRACKET:return!0;default:return!1}}};const i=r},24390:(e,t,n)=>{"use strict";var r;n.d(t,{s:()=>m,v:()=>b});var i,o=n(98106),a=n(2292),s=n(69223),l=n(35194),c=n(33882),u=(0,l.Z)({},r||(r=n.t(c,2))),d=u.version,f=u.render,h=u.unmountComponentAtNode;try{Number((d||"").split(".")[0])>=18&&(i=u.createRoot)}catch(w){}function p(e){var t=u.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;t&&"object"===(0,s.Z)(t)&&(t.usingClientEntryPoint=e)}var g="__rc_react_root__";function m(e,t){i?function(e,t){p(!0);var n=t[g]||i(t);p(!1),n.render(e),t[g]=n}(e,t):function(e,t){f(e,t)}(e,t)}function v(e){return A.apply(this,arguments)}function A(){return(A=(0,a.Z)((0,o.Z)().mark((function e(t){return(0,o.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Promise.resolve().then((function(){var e;null===(e=t[g])||void 0===e||e.unmount(),delete t[g]})));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function y(e){h(e)}function b(e){return _.apply(this,arguments)}function _(){return(_=(0,a.Z)((0,o.Z)().mark((function e(t){return(0,o.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(void 0===i){e.next=2;break}return e.abrupt("return",v(t));case 2:y(t);case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}},53047:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a,o:()=>s});var r,i=n(86263);function o(e){var t="rc-scrollbar-measure-".concat(Math.random().toString(36).substring(7)),n=document.createElement("div");n.id=t;var r,o,a=n.style;if(a.position="absolute",a.left="0",a.top="0",a.width="100px",a.height="100px",a.overflow="scroll",e){var s=getComputedStyle(e);a.scrollbarColor=s.scrollbarColor,a.scrollbarWidth=s.scrollbarWidth;var l=getComputedStyle(e,"::-webkit-scrollbar"),c=parseInt(l.width,10),u=parseInt(l.height,10);try{var d=c?"width: ".concat(l.width,";"):"",f=u?"height: ".concat(l.height,";"):"";(0,i.hq)("\n#".concat(t,"::-webkit-scrollbar {\n").concat(d,"\n").concat(f,"\n}"),t)}catch(g){console.error(g),r=c,o=u}}document.body.appendChild(n);var h=e&&r&&!isNaN(r)?r:n.offsetWidth-n.clientWidth,p=e&&o&&!isNaN(o)?o:n.offsetHeight-n.clientHeight;return document.body.removeChild(n),(0,i.jL)(t),{width:h,height:p}}function a(e){return"undefined"===typeof document?0:((e||void 0===r)&&(r=o()),r.width)}function s(e){return"undefined"!==typeof document&&e&&e instanceof Element?o(e):{width:0,height:0}}},73165:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=n(57435);function i(e){var t=r.useRef();t.current=e;var n=r.useCallback((function(){for(var e,n=arguments.length,r=new Array(n),i=0;i{"use strict";var r;n.d(t,{Z:()=>c});var i=n(13747),o=n(35194),a=n(57435);var s=0;var l=(0,o.Z)({},r||(r=n.t(a,2))).useId;const c=l?function(e){var t=l();return e||t}:function(e){var t=a.useState("ssr-id"),n=(0,i.Z)(t,2),r=n[0],o=n[1];return a.useEffect((function(){var e=s;s+=1,o("rc_unique_".concat(e))}),[]),e||r}},12750:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s,o:()=>a});var r=n(57435),i=(0,n(20749).Z)()?r.useLayoutEffect:r.useEffect,o=function(e,t){var n=r.useRef(!0);i((function(){return e(n.current)}),t),i((function(){return n.current=!1,function(){n.current=!0}}),[])},a=function(e,t){o((function(t){if(!t)return e()}),t)};const s=o},22121:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=n(57435);function i(e,t,n){var i=r.useRef({});return"value"in i.current&&!n(i.current.condition,t)||(i.current.value=e(),i.current.condition=t),i.current.value}},88258:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(13747),i=n(73165),o=n(12750),a=n(42088);function s(e){return void 0!==e}function l(e,t){var n=t||{},l=n.defaultValue,c=n.value,u=n.onChange,d=n.postState,f=(0,a.Z)((function(){return s(c)?c:s(l)?"function"===typeof l?l():l:"function"===typeof e?e():e})),h=(0,r.Z)(f,2),p=h[0],g=h[1],m=void 0!==c?c:p,v=d?d(m):m,A=(0,i.Z)(u),y=(0,a.Z)([m]),b=(0,r.Z)(y,2),_=b[0],w=b[1];return(0,o.o)((function(){var e=_[0];p!==e&&A(p,e)}),[_]),(0,o.o)((function(){s(c)||g(c)}),[c]),[v,(0,i.Z)((function(e,t){g(e,t),w([m],t)}))]}},42088:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(13747),i=n(57435);function o(e){var t=i.useRef(!1),n=i.useState(e),o=(0,r.Z)(n,2),a=o[0],s=o[1];return i.useEffect((function(){return t.current=!1,function(){t.current=!0}}),[]),[a,function(e,n){n&&t.current||s(e)}]}},51355:(e,t,n)=>{"use strict";n.d(t,{t4:()=>i.t4,x1:()=>i.x1,zX:()=>r.Z});var r=n(73165),i=(n(88258),n(43903));n(91647),n(98162)},46032:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(69223),i=n(98162);const o=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=new Set;return function e(t,a){var s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,l=o.has(t);if((0,i.ZP)(!l,"Warning: There may be circular references"),l)return!1;if(t===a)return!0;if(n&&s>1)return!1;o.add(t);var c=s+1;if(Array.isArray(t)){if(!Array.isArray(a)||t.length!==a.length)return!1;for(var u=0;u{"use strict";n.d(t,{Z:()=>r});const r=function(){if("undefined"===typeof navigator||"undefined"===typeof window)return!1;var e=navigator.userAgent||navigator.vendor||window.opera;return/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(e)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(null===e||void 0===e?void 0:e.substr(0,4))}},43488:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=n(35194);function i(e,t){var n=(0,r.Z)({},e);return Array.isArray(t)&&t.forEach((function(e){delete n[e]})),n}},37461:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(35194),i="".concat("accept acceptCharset accessKey action allowFullScreen allowTransparency\n alt async autoComplete autoFocus autoPlay capture cellPadding cellSpacing challenge\n charSet checked classID className colSpan cols content contentEditable contextMenu\n controls coords crossOrigin data dateTime default defer dir disabled download draggable\n encType form formAction formEncType formMethod formNoValidate formTarget frameBorder\n headers height hidden high href hrefLang htmlFor httpEquiv icon id inputMode integrity\n is keyParams keyType kind label lang list loop low manifest marginHeight marginWidth max maxLength media\n mediaGroup method min minLength multiple muted name noValidate nonce open\n optimum pattern placeholder poster preload radioGroup readOnly rel required\n reversed role rowSpan rows sandbox scope scoped scrolling seamless selected\n shape size sizes span spellCheck src srcDoc srcLang srcSet start step style\n summary tabIndex target title type useMap value width wmode wrap"," ").concat("onCopy onCut onPaste onCompositionEnd onCompositionStart onCompositionUpdate onKeyDown\n onKeyPress onKeyUp onFocus onBlur onChange onInput onSubmit onClick onContextMenu onDoubleClick\n onDrag onDragEnd onDragEnter onDragExit onDragLeave onDragOver onDragStart onDrop onMouseDown\n onMouseEnter onMouseLeave onMouseMove onMouseOut onMouseOver onMouseUp onSelect onTouchCancel\n onTouchEnd onTouchMove onTouchStart onScroll onWheel onAbort onCanPlay onCanPlayThrough\n onDurationChange onEmptied onEncrypted onEnded onError onLoadedData onLoadedMetadata\n onLoadStart onPause onPlay onPlaying onProgress onRateChange onSeeked onSeeking onStalled onSuspend onTimeUpdate onVolumeChange onWaiting onLoad onError").split(/[\s\n]+/),o="aria-",a="data-";function s(e,t){return 0===e.indexOf(t)}function l(e){var t,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];t=!1===n?{aria:!0,data:!0,attr:!0}:!0===n?{aria:!0}:(0,r.Z)({},n);var l={};return Object.keys(e).forEach((function(n){(t.aria&&("role"===n||s(n,o))||t.data&&s(n,a)||t.attr&&i.includes(n))&&(l[n]=e[n])})),l}},51882:(e,t,n)=>{"use strict";n.d(t,{Z:()=>c});var r=function(e){return+setTimeout(e,16)},i=function(e){return clearTimeout(e)};"undefined"!==typeof window&&"requestAnimationFrame"in window&&(r=function(e){return window.requestAnimationFrame(e)},i=function(e){return window.cancelAnimationFrame(e)});var o=0,a=new Map;function s(e){a.delete(e)}var l=function(e){var t=o+=1;return function n(i){if(0===i)s(t),e();else{var o=r((function(){n(i-1)}));a.set(t,o)}}(arguments.length>1&&void 0!==arguments[1]?arguments[1]:1),t};l.cancel=function(e){var t=a.get(e);return s(e),i(t)};const c=l},43903:(e,t,n)=>{"use strict";n.d(t,{Yr:()=>u,mH:()=>s,sQ:()=>l,t4:()=>d,x1:()=>c});var r=n(69223),i=n(57435),o=n(40758),a=n(22121);function s(e,t){"function"===typeof e?e(t):"object"===(0,r.Z)(e)&&e&&"current"in e&&(e.current=t)}function l(){for(var e=arguments.length,t=new Array(e),n=0;n{"use strict";function r(e,t){for(var n=e,r=0;rr})},91647:(e,t,n)=>{"use strict";n.d(t,{T:()=>f,Z:()=>c});var r=n(69223),i=n(35194),o=n(22368),a=n(6827),s=n(6512);function l(e,t,n,r){if(!t.length)return n;var s,c=(0,a.Z)(t),u=c[0],d=c.slice(1);return s=e||"number"!==typeof u?Array.isArray(e)?(0,o.Z)(e):(0,i.Z)({},e):[],r&&void 0===n&&1===d.length?delete s[u][d[0]]:s[u]=l(s[u],d,n,r),s}function c(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return t.length&&r&&void 0===n&&!(0,s.Z)(e,t.slice(0,-1))?e:l(e,t,n,r)}function u(e){return Array.isArray(e)?[]:{}}var d="undefined"===typeof Reflect?Object.keys:Reflect.ownKeys;function f(){for(var e=arguments.length,t=new Array(e),n=0;n{"use strict";n.d(t,{Kp:()=>o,ZP:()=>c});var r={},i=[];function o(e,t){}function a(e,t){}function s(e,t,n){t||r[n]||(e(!1,n),r[n]=!0)}function l(e,t){s(o,e,t)}l.preMessage=function(e){i.push(e)},l.resetWarned=function(){r={}},l.noteOnce=function(e,t){s(a,e,t)};const c=l},49642:(e,t,n)=>{"use strict";n.d(t,{Z:()=>B});var r=n(91010),i=n(35194),o=n(69223),a=n(13747),s=n(68185),l=n(99309),c=n(57435),u=n(33882),d=n(12356),f=n.n(d),h=n(61236),p=c.forwardRef((function(e,t){var n,o=e.height,a=e.offsetY,l=e.offsetX,u=e.children,d=e.prefixCls,p=e.onInnerResize,g=e.innerProps,m=e.rtl,v=e.extra,A={},y={display:"flex",flexDirection:"column"};void 0!==a&&(A={height:o,position:"relative",overflow:"hidden"},y=(0,i.Z)((0,i.Z)({},y),{},(n={transform:"translateY(".concat(a,"px)")},(0,s.Z)(n,m?"marginRight":"marginLeft",-l),(0,s.Z)(n,"position","absolute"),(0,s.Z)(n,"left",0),(0,s.Z)(n,"right",0),(0,s.Z)(n,"top",0),n)));return c.createElement("div",{style:A},c.createElement(h.Z,{onResize:function(e){e.offsetHeight&&p&&p()}},c.createElement("div",(0,r.Z)({style:y,className:f()((0,s.Z)({},"".concat(d,"-holder-inner"),d)),ref:t},g),u,v)))}));p.displayName="Filler";const g=p;var m=n(51882);function v(e,t){return("touches"in e?e.touches[0]:e)[t?"pageX":"pageY"]}const A=c.forwardRef((function(e,t){var n,r=e.prefixCls,o=e.rtl,l=e.scrollOffset,u=e.scrollRange,d=e.onStartMove,h=e.onStopMove,p=e.onScroll,g=e.horizontal,A=e.spinSize,y=e.containerSize,b=e.style,_=e.thumbStyle,w=c.useState(!1),x=(0,a.Z)(w,2),E=x[0],S=x[1],C=c.useState(null),P=(0,a.Z)(C,2),T=P[0],k=P[1],M=c.useState(null),O=(0,a.Z)(M,2),R=O[0],I=O[1],L=!o,N=c.useRef(),D=c.useRef(),F=c.useState(!1),j=(0,a.Z)(F,2),B=j[0],Z=j[1],z=c.useRef(),U=function(){clearTimeout(z.current),Z(!0),z.current=setTimeout((function(){Z(!1)}),3e3)},H=u-y||0,V=y-A||0,W=H>0,G=c.useMemo((function(){return 0===l||0===H?0:l/H*V}),[l,H,V]),K=c.useRef({top:G,dragging:E,pageY:T,startTop:R});K.current={top:G,dragging:E,pageY:T,startTop:R};var q=function(e){S(!0),k(v(e,g)),I(K.current.top),d(),e.stopPropagation(),e.preventDefault()};c.useEffect((function(){var e=function(e){e.preventDefault()},t=N.current,n=D.current;return t.addEventListener("touchstart",e),n.addEventListener("touchstart",q),function(){t.removeEventListener("touchstart",e),n.removeEventListener("touchstart",q)}}),[]);var Y=c.useRef();Y.current=H;var X=c.useRef();X.current=V,c.useEffect((function(){if(E){var e,t=function(t){var n=K.current,r=n.dragging,i=n.pageY,o=n.startTop;if(m.Z.cancel(e),r){var a=v(t,g)-i,s=o;!L&&g?s-=a:s+=a;var l=Y.current,c=X.current,u=c?s/c:0,d=Math.ceil(u*l);d=Math.max(d,0),d=Math.min(d,l),e=(0,m.Z)((function(){p(d,g)}))}},n=function(){S(!1),h()};return window.addEventListener("mousemove",t),window.addEventListener("touchmove",t),window.addEventListener("mouseup",n),window.addEventListener("touchend",n),function(){window.removeEventListener("mousemove",t),window.removeEventListener("touchmove",t),window.removeEventListener("mouseup",n),window.removeEventListener("touchend",n),m.Z.cancel(e)}}}),[E]),c.useEffect((function(){U()}),[l]),c.useImperativeHandle(t,(function(){return{delayHidden:U}}));var $="".concat(r,"-scrollbar"),Q={position:"absolute",visibility:B&&W?null:"hidden"},J={position:"absolute",background:"rgba(0, 0, 0, 0.5)",borderRadius:99,cursor:"pointer",userSelect:"none"};return g?(Q.height=8,Q.left=0,Q.right=0,Q.bottom=0,J.height="100%",J.width=A,L?J.left=G:J.right=G):(Q.width=8,Q.top=0,Q.bottom=0,L?Q.right=0:Q.left=0,J.width="100%",J.height=A,J.top=G),c.createElement("div",{ref:N,className:f()($,(n={},(0,s.Z)(n,"".concat($,"-horizontal"),g),(0,s.Z)(n,"".concat($,"-vertical"),!g),(0,s.Z)(n,"".concat($,"-visible"),B),n)),style:(0,i.Z)((0,i.Z)({},Q),b),onMouseDown:function(e){e.stopPropagation(),e.preventDefault()},onMouseMove:U},c.createElement("div",{ref:D,className:f()("".concat($,"-thumb"),(0,s.Z)({},"".concat($,"-thumb-moving"),E)),style:(0,i.Z)((0,i.Z)({},J),_),onMouseDown:q}))}));function y(e){var t=e.children,n=e.setRef,r=c.useCallback((function(e){n(e)}),[]);return c.cloneElement(t,{ref:r})}var b=n(48541),_=n(66375),w=n(1959);const x=function(){function e(){(0,_.Z)(this,e),this.maps=void 0,this.id=0,this.maps=Object.create(null)}return(0,w.Z)(e,[{key:"set",value:function(e,t){this.maps[e]=t,this.id+=1}},{key:"get",value:function(e){return this.maps[e]}}]),e}();var E=n(12750),S=n(51355),C=10;function P(e,t,n){var r=c.useState(e),i=(0,a.Z)(r,2),o=i[0],s=i[1],l=c.useState(null),u=(0,a.Z)(l,2),d=u[0],f=u[1];return c.useEffect((function(){var r=function(e,t,n){var r,i,o=e.length,a=t.length;if(0===o&&0===a)return null;o1&&void 0!==arguments[1]&&arguments[1],o=e<0&&i.current.top||e>0&&i.current.bottom;return t&&o?(clearTimeout(r.current),n.current=!1):o&&!n.current||(clearTimeout(r.current),n.current=!0,r.current=setTimeout((function(){n.current=!1}),50)),!n.current&&o}};function M(e,t,n,r,i){var o=(0,c.useRef)(0),a=(0,c.useRef)(null),s=(0,c.useRef)(null),l=(0,c.useRef)(!1),u=k(t,n);var d=(0,c.useRef)(null),f=(0,c.useRef)(null);return[function(t){if(e){m.Z.cancel(f.current),f.current=(0,m.Z)((function(){d.current=null}),2);var n=t.deltaX,c=t.deltaY,h=t.shiftKey,p=n,g=c;("sx"===d.current||!d.current&&h&&c&&!n)&&(p=c,g=0,d.current="sx");var v=Math.abs(p),A=Math.abs(g);null===d.current&&(d.current=r&&v>A?"x":"y"),"y"===d.current?function(e,t){m.Z.cancel(a.current),o.current+=t,s.current=t,u(t)||(T||e.preventDefault(),a.current=(0,m.Z)((function(){var e=l.current?10:1;i(o.current*e),o.current=0})))}(t,g):function(e,t){i(t,!0),T||e.preventDefault()}(t,p)}},function(t){e&&(l.current=t.detail===s.current)}]}var O=14/15;var R=20;function I(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=e/(arguments.length>1&&void 0!==arguments[1]?arguments[1]:0)*100;return isNaN(t)&&(t=0),t=Math.max(t,R),t=Math.min(t,e/2),Math.floor(t)}var L=["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","direction","scrollWidth","component","onScroll","onVirtualScroll","onVisibleChange","innerProps","extraRender","styles"],N=[],D={overflowY:"auto",overflowAnchor:"none"};function F(e,t){var n=e.prefixCls,d=void 0===n?"rc-virtual-list":n,p=e.className,v=e.height,_=e.itemHeight,w=e.fullHeight,T=void 0===w||w,R=e.style,F=e.data,j=e.children,B=e.itemKey,Z=e.virtual,z=e.direction,U=e.scrollWidth,H=e.component,V=void 0===H?"div":H,W=e.onScroll,G=e.onVirtualScroll,K=e.onVisibleChange,q=e.innerProps,Y=e.extraRender,X=e.styles,$=(0,l.Z)(e,L),Q=!(!1===Z||!v||!_),J=Q&&F&&(_*F.length>v||!!U),ee="rtl"===z,te=f()(d,(0,s.Z)({},"".concat(d,"-rtl"),ee),p),ne=F||N,re=(0,c.useRef)(),ie=(0,c.useRef)(),oe=(0,c.useState)(0),ae=(0,a.Z)(oe,2),se=ae[0],le=ae[1],ce=(0,c.useState)(0),ue=(0,a.Z)(ce,2),de=ue[0],fe=ue[1],he=(0,c.useState)(!1),pe=(0,a.Z)(he,2),ge=pe[0],me=pe[1],ve=function(){me(!0)},Ae=function(){me(!1)},ye=c.useCallback((function(e){return"function"===typeof B?B(e):null===e||void 0===e?void 0:e[B]}),[B]),be={getKey:ye};function _e(e){le((function(t){var n=function(e){var t=e;Number.isNaN(Ge.current)||(t=Math.min(t,Ge.current));return t=Math.max(t,0),t}("function"===typeof e?e(t):e);return re.current.scrollTop=n,n}))}var we=(0,c.useRef)({start:0,end:ne.length}),xe=(0,c.useRef)(),Ee=P(ne,ye),Se=(0,a.Z)(Ee,1)[0];xe.current=Se;var Ce=function(e,t,n){var r=c.useState(0),i=(0,a.Z)(r,2),o=i[0],s=i[1],l=(0,c.useRef)(new Map),u=(0,c.useRef)(new x),d=(0,c.useRef)();function f(){m.Z.cancel(d.current)}function h(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];f();var t=function(){l.current.forEach((function(e,t){if(e&&e.offsetParent){var n=(0,b.Z)(e),r=n.offsetHeight;u.current.get(t)!==r&&u.current.set(t,n.offsetHeight)}})),s((function(e){return e+1}))};e?t():d.current=(0,m.Z)(t)}return(0,c.useEffect)((function(){return f}),[]),[function(r,i){var o=e(r),a=l.current.get(o);i?(l.current.set(o,i),h()):l.current.delete(o),!a!==!i&&(i?null===t||void 0===t||t(r):null===n||void 0===n||n(r))},h,u.current,o]}(ye,null,null),Pe=(0,a.Z)(Ce,4),Te=Pe[0],ke=Pe[1],Me=Pe[2],Oe=Pe[3],Re=c.useMemo((function(){if(!Q)return{scrollHeight:void 0,start:0,end:ne.length-1,offset:void 0};var e;if(!J)return{scrollHeight:(null===(e=ie.current)||void 0===e?void 0:e.offsetHeight)||0,start:0,end:ne.length-1,offset:void 0};for(var t,n,r,i=0,o=ne.length,a=0;a=se&&void 0===t&&(t=a,n=i),u>se+v&&void 0===r&&(r=a),i=u}return void 0===t&&(t=0,n=0,r=Math.ceil(v/_)),void 0===r&&(r=ne.length-1),{scrollHeight:i,start:t,end:r=Math.min(r+1,ne.length-1),offset:n}}),[J,Q,se,ne,Oe,v]),Ie=Re.scrollHeight,Le=Re.start,Ne=Re.end,De=Re.offset;we.current.start=Le,we.current.end=Ne;var Fe=c.useState({width:0,height:v}),je=(0,a.Z)(Fe,2),Be=je[0],Ze=je[1],ze=(0,c.useRef)(),Ue=(0,c.useRef)(),He=c.useMemo((function(){return I(Be.width,U)}),[Be.width,U]),Ve=c.useMemo((function(){return I(Be.height,Ie)}),[Be.height,Ie]),We=Ie-v,Ge=(0,c.useRef)(We);Ge.current=We;var Ke=se<=0,qe=se>=We,Ye=k(Ke,qe),Xe=function(){return{x:ee?-de:de,y:se}},$e=(0,c.useRef)(Xe()),Qe=(0,S.zX)((function(){if(G){var e=Xe();$e.current.x===e.x&&$e.current.y===e.y||(G(e),$e.current=e)}}));function Je(e,t){var n=e;t?((0,u.flushSync)((function(){fe(n)})),Qe()):_e(n)}var et=function(e){var t=e,n=U-Be.width;return t=Math.max(t,0),t=Math.min(t,n)},tt=(0,S.zX)((function(e,t){t?((0,u.flushSync)((function(){fe((function(t){return et(t+(ee?-e:e))}))})),Qe()):_e((function(t){return t+e}))})),nt=M(Q,Ke,qe,!!U,tt),rt=(0,a.Z)(nt,2),it=rt[0],ot=rt[1];!function(e,t,n){var r,i=(0,c.useRef)(!1),o=(0,c.useRef)(0),a=(0,c.useRef)(null),s=(0,c.useRef)(null),l=function(e){if(i.current){var t=Math.ceil(e.touches[0].pageY),r=o.current-t;o.current=t,n(r)&&e.preventDefault(),clearInterval(s.current),s.current=setInterval((function(){(!n(r*=O,!0)||Math.abs(r)<=.1)&&clearInterval(s.current)}),16)}},u=function(){i.current=!1,r()},d=function(e){r(),1!==e.touches.length||i.current||(i.current=!0,o.current=Math.ceil(e.touches[0].pageY),a.current=e.target,a.current.addEventListener("touchmove",l),a.current.addEventListener("touchend",u))};r=function(){a.current&&(a.current.removeEventListener("touchmove",l),a.current.removeEventListener("touchend",u))},(0,E.Z)((function(){return e&&t.current.addEventListener("touchstart",d),function(){var e;null===(e=t.current)||void 0===e||e.removeEventListener("touchstart",d),r(),clearInterval(s.current)}}),[e])}(Q,re,(function(e,t){return!Ye(e,t)&&(it({preventDefault:function(){},deltaY:e}),!0)})),(0,E.Z)((function(){function e(e){Q&&e.preventDefault()}var t=re.current;return t.addEventListener("wheel",it),t.addEventListener("DOMMouseScroll",ot),t.addEventListener("MozMousePixelScroll",e),function(){t.removeEventListener("wheel",it),t.removeEventListener("DOMMouseScroll",ot),t.removeEventListener("MozMousePixelScroll",e)}}),[Q]),(0,E.Z)((function(){U&&fe((function(e){return et(e)}))}),[Be.width,U]);var at=function(){var e,t;null===(e=ze.current)||void 0===e||e.delayHidden(),null===(t=Ue.current)||void 0===t||t.delayHidden()},st=function(e,t,n,r,s,l,u,d){var f=c.useRef(),h=c.useState(null),p=(0,a.Z)(h,2),g=p[0],v=p[1];return(0,E.Z)((function(){if(g&&g.times=0;T-=1){var k=s(t[T]),M=n.get(k);if(void 0===M){h=!0;break}if((P-=M)<=0)break}switch(A){case"top":m=b-d;break;case"bottom":m=_-f+d;break;default:var O=e.current.scrollTop;bO+f&&(p="bottom")}null!==m&&u(m),m!==g.lastTop&&(h=!0)}h&&v((function(e){return(0,i.Z)((0,i.Z)({},e),{},{times:e.times+1,targetAlign:p,lastTop:m})}))}}),[g,e.current]),function(e){if(null!==e&&void 0!==e){if(m.Z.cancel(f.current),"number"===typeof e)u(e);else if(e&&"object"===(0,o.Z)(e)){var n,r=e.align;n="index"in e?e.index:t.findIndex((function(t){return s(t)===e.key}));var i=e.offset;v({times:0,index:n,offset:void 0===i?0:i,originAlign:r})}}else d()}}(re,ne,Me,_,ye,(function(){return ke(!0)}),_e,at);c.useImperativeHandle(t,(function(){return{getScrollInfo:Xe,scrollTo:function(e){var t;(t=e)&&"object"===(0,o.Z)(t)&&("left"in t||"top"in t)?(void 0!==e.left&&fe(et(e.left)),st(e.top)):st(e)}}})),(0,E.Z)((function(){if(K){var e=ne.slice(Le,Ne+1);K(e,ne)}}),[Le,Ne,ne]);var lt=function(e,t,n,r){var i=c.useMemo((function(){return[new Map,[]]}),[e,n.id,r]),o=(0,a.Z)(i,2),s=o[0],l=o[1];return function(i){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i,a=s.get(i),c=s.get(o);if(void 0===a||void 0===c)for(var u=e.length,d=l.length;dv&&c.createElement(A,{ref:ze,prefixCls:d,scrollOffset:se,scrollRange:Ie,rtl:ee,onScroll:Je,onStartMove:ve,onStopMove:Ae,spinSize:Ve,containerSize:Be.height,style:null===X||void 0===X?void 0:X.verticalScrollBar,thumbStyle:null===X||void 0===X?void 0:X.verticalScrollBarThumb}),J&&U&&c.createElement(A,{ref:Ue,prefixCls:d,scrollOffset:de,scrollRange:U,rtl:ee,onScroll:Je,onStartMove:ve,onStopMove:Ae,spinSize:He,containerSize:Be.width,horizontal:!0,style:null===X||void 0===X?void 0:X.horizontalScrollBar,thumbStyle:null===X||void 0===X?void 0:X.horizontalScrollBarThumb}))}var j=c.forwardRef(F);j.displayName="List";const B=j},82863:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(e){var t=e.confetti,n=e.decorateOptions,r=this;this.interval=null,this.shoot=function(){return r.tickAnimation()},this.run=function(e){var t=e.speed,n=e.delay,i=void 0===n?0:n,o=e.duration;r.interval||setTimeout((function(){r.shoot(),r.interval=setInterval(r.shoot,1e3/Math.min(t,1e3)),o&&setTimeout(r.pause,o)}),i)},this.pause=function(){clearInterval(r.interval),r.interval=null},this.stop=function(){r.pause(),r.confetti.reset()},this.confetti=t,this.decorateOptions=n};t.default=n},92134:function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return e=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,n)};return function(t,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=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),i=this&&this.__read||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(s){i={error:s}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},o=this&&this.__spreadArray||function(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i0)&&!(r=o.next()).done;)a.push(r.value)}catch(s){i={error:s}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},c=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var u=a(n(57435)),d=c(n(18631)),f=function(e){return e};t.default=function(e){var t=e.decorateOptions,n=void 0===t?f:t,i=e.Conductor,o=e.autorun,a=e.onInit,c=s(e,["decorateOptions","Conductor","autorun","onInit"]),h=l((0,u.useState)(),2),p=h[0],g=h[1],m=(0,u.useCallback)((function(e){var t=e.confetti;g((function(){return t}))}),[]);return(0,u.useEffect)((function(){if(p){var e=new i({confetti:p,decorateOptions:n});return o&&e.run(o),null===a||void 0===a||a({confetti:p,conductor:e}),e.stop}}),[p]),u.default.createElement(d.default,r({onInit:m},c))}},86115:function(e,t,n){"use strict";var r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n{"use strict";n.d(t,{AI:()=>Xi});var r=n(57435),i=n(72286),o={},a=function(e,t,n,r){var i=e+"-"+t+"-"+n+(r?"-server":"");if(o[i])return o[i];var a=function(e,t,n,r){if("undefined"===typeof document&&!r)return null;var i=r?new r:document.createElement("canvas");i.width=2*n,i.height=2*n;var o=i.getContext("2d");return o?(o.fillStyle=e,o.fillRect(0,0,i.width,i.height),o.fillStyle=t,o.fillRect(0,0,n,n),o.translate(n,n),o.fillRect(0,0,n,n),i.toDataURL()):null}(e,t,n,r);return o[i]=a,a},s=Object.assign||function(e){for(var t=1;ta?1:Math.round(100*u/a)/100,t.a!==d)return{h:t.h,s:t.s,l:t.l,a:d,source:"rgb"}}else{var f=void 0;if(r!==(f=c<0?0:c>o?1:Math.round(100*c/o)/100))return{h:t.h,s:t.s,l:t.l,a:f,source:"rgb"}}return null}(e,r.props.hsl,r.props.direction,r.props.a,r.container);t&&"function"===typeof r.props.onChange&&r.props.onChange(t,e)},r.handleMouseDown=function(e){r.handleChange(e),window.addEventListener("mousemove",r.handleChange),window.addEventListener("mouseup",r.handleMouseUp)},r.handleMouseUp=function(){r.unbindEventListeners()},r.unbindEventListeners=function(){window.removeEventListener("mousemove",r.handleChange),window.removeEventListener("mouseup",r.handleMouseUp)},f(r,n)}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),d(t,[{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"render",value:function(){var e=this,t=this.props.rgb,n=(0,i.ZP)({default:{alpha:{absolute:"0px 0px 0px 0px",borderRadius:this.props.radius},checkboard:{absolute:"0px 0px 0px 0px",overflow:"hidden",borderRadius:this.props.radius},gradient:{absolute:"0px 0px 0px 0px",background:"linear-gradient(to right, rgba("+t.r+","+t.g+","+t.b+", 0) 0%,\n rgba("+t.r+","+t.g+","+t.b+", 1) 100%)",boxShadow:this.props.shadow,borderRadius:this.props.radius},container:{position:"relative",height:"100%",margin:"0 3px"},pointer:{position:"absolute",left:100*t.a+"%"},slider:{width:"4px",borderRadius:"1px",height:"8px",boxShadow:"0 0 2px rgba(0, 0, 0, .6)",background:"#fff",marginTop:"1px",transform:"translateX(-2px)"}},vertical:{gradient:{background:"linear-gradient(to bottom, rgba("+t.r+","+t.g+","+t.b+", 0) 0%,\n rgba("+t.r+","+t.g+","+t.b+", 1) 100%)"},pointer:{left:0,top:100*t.a+"%"}},overwrite:u({},this.props.style)},{vertical:"vertical"===this.props.direction,overwrite:!0});return r.createElement("div",{style:n.alpha},r.createElement("div",{style:n.checkboard},r.createElement(c,{renderers:this.props.renderers})),r.createElement("div",{style:n.gradient}),r.createElement("div",{style:n.container,ref:function(t){return e.container=t},onMouseDown:this.handleMouseDown,onTouchMove:this.handleChange,onTouchStart:this.handleChange},r.createElement("div",{style:n.pointer},this.props.pointer?r.createElement(this.props.pointer,this.props):r.createElement("div",{style:n.slider}))))}}]),t}(r.PureComponent||r.Component);var p=function(){function e(e,t){for(var n=0;n-1)){var i=n.getArrowOffset(),o=38===e.keyCode?r+i:r-i;n.setUpdatedValue(o,e)}},n.handleDrag=function(e){if(n.props.dragLabel){var t=Math.round(n.props.value+e.movementX);t>=0&&t<=n.props.dragMax&&n.props.onChange&&n.props.onChange(n.getValueObjectWithLabel(t),e)}},n.handleMouseDown=function(e){n.props.dragLabel&&(e.preventDefault(),n.handleDrag(e),window.addEventListener("mousemove",n.handleDrag),window.addEventListener("mouseup",n.handleMouseUp))},n.handleMouseUp=function(){n.unbindEventListeners()},n.unbindEventListeners=function(){window.removeEventListener("mousemove",n.handleDrag),window.removeEventListener("mouseup",n.handleMouseUp)},n.state={value:String(e.value).toUpperCase(),blurValue:String(e.value).toUpperCase()},n.inputId="rc-editable-input-"+m++,n}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),p(t,[{key:"componentDidUpdate",value:function(e,t){this.props.value===this.state.value||e.value===this.props.value&&t.value===this.state.value||(this.input===document.activeElement?this.setState({blurValue:String(this.props.value).toUpperCase()}):this.setState({value:String(this.props.value).toUpperCase(),blurValue:!this.state.blurValue&&String(this.props.value).toUpperCase()}))}},{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"getValueObjectWithLabel",value:function(e){return function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}({},this.props.label,e)}},{key:"getArrowOffset",value:function(){return this.props.arrowOffset||1}},{key:"setUpdatedValue",value:function(e,t){var n=this.props.label?this.getValueObjectWithLabel(e):e;this.props.onChange&&this.props.onChange(n,t),this.setState({value:e})}},{key:"render",value:function(){var e=this,t=(0,i.ZP)({default:{wrap:{position:"relative"}},"user-override":{wrap:this.props.style&&this.props.style.wrap?this.props.style.wrap:{},input:this.props.style&&this.props.style.input?this.props.style.input:{},label:this.props.style&&this.props.style.label?this.props.style.label:{}},"dragLabel-true":{label:{cursor:"ew-resize"}}},{"user-override":!0},this.props);return r.createElement("div",{style:t.wrap},r.createElement("input",{id:this.inputId,style:t.input,ref:function(t){return e.input=t},value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,onBlur:this.handleBlur,placeholder:this.props.placeholder,spellCheck:"false"}),this.props.label&&!this.props.hideLabel?r.createElement("label",{htmlFor:this.inputId,style:t.label,onMouseDown:this.handleMouseDown},this.props.label):null)}}]),t}(r.PureComponent||r.Component);var A=function(){function e(e,t){for(var n=0;no?0:360*(-100*c/o+100)/100,n.h!==u)return{h:u,s:n.s,l:n.l,a:n.a,source:"hsl"}}else{var d=void 0;if(d=l<0?0:l>i?359:100*l/i*360/100,n.h!==d)return{h:d,s:n.s,l:n.l,a:n.a,source:"hsl"}}return null}(e,r.props.direction,r.props.hsl,r.container);t&&"function"===typeof r.props.onChange&&r.props.onChange(t,e)},r.handleMouseDown=function(e){r.handleChange(e),window.addEventListener("mousemove",r.handleChange),window.addEventListener("mouseup",r.handleMouseUp)},r.handleMouseUp=function(){r.unbindEventListeners()},y(r,n)}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),A(t,[{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"unbindEventListeners",value:function(){window.removeEventListener("mousemove",this.handleChange),window.removeEventListener("mouseup",this.handleMouseUp)}},{key:"render",value:function(){var e=this,t=this.props.direction,n=void 0===t?"horizontal":t,o=(0,i.ZP)({default:{hue:{absolute:"0px 0px 0px 0px",borderRadius:this.props.radius,boxShadow:this.props.shadow},container:{padding:"0 2px",position:"relative",height:"100%",borderRadius:this.props.radius},pointer:{position:"absolute",left:100*this.props.hsl.h/360+"%"},slider:{marginTop:"1px",width:"4px",borderRadius:"1px",height:"8px",boxShadow:"0 0 2px rgba(0, 0, 0, .6)",background:"#fff",transform:"translateX(-2px)"}},vertical:{pointer:{left:"0px",top:-100*this.props.hsl.h/360+100+"%"}}},{vertical:"vertical"===n});return r.createElement("div",{style:o.hue},r.createElement("div",{className:"hue-"+n,style:o.container,ref:function(t){return e.container=t},onMouseDown:this.handleMouseDown,onTouchMove:this.handleChange,onTouchStart:this.handleChange},r.createElement("style",null,"\n .hue-horizontal {\n background: linear-gradient(to right, #f00 0%, #ff0 17%, #0f0\n 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);\n background: -webkit-linear-gradient(to right, #f00 0%, #ff0\n 17%, #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);\n }\n\n .hue-vertical {\n background: linear-gradient(to top, #f00 0%, #ff0 17%, #0f0 33%,\n #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);\n background: -webkit-linear-gradient(to top, #f00 0%, #ff0 17%,\n #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);\n }\n "),r.createElement("div",{style:o.pointer},this.props.pointer?r.createElement(this.props.pointer,this.props):r.createElement("div",{style:o.slider}))))}}]),t}(r.PureComponent||r.Component);var _=n(2831),w=n.n(_);const x=function(){this.__data__=[],this.size=0};const E=function(e,t){return e===t||e!==e&&t!==t};const S=function(e,t){for(var n=e.length;n--;)if(E(e[n][0],t))return n;return-1};var C=Array.prototype.splice;const P=function(e){var t=this.__data__,n=S(t,e);return!(n<0)&&(n==t.length-1?t.pop():C.call(t,n,1),--this.size,!0)};const T=function(e){var t=this.__data__,n=S(t,e);return n<0?void 0:t[n][1]};const k=function(e){return S(this.__data__,e)>-1};const M=function(e,t){var n=this.__data__,r=S(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};function O(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t-1&&e%1==0&&e<=9007199254740991};const ct=function(e){return null!=e&<(e.length)&&!$(e)};const ut=function(e){return tt(e)&&ct(e)};const dt=function(){return!1};var ft="object"==typeof exports&&exports&&!exports.nodeType&&exports,ht=ft&&"object"==typeof module&&module&&!module.nodeType&&module,pt=ht&&ht.exports===ft?B.Buffer:void 0;const gt=(pt?pt.isBuffer:void 0)||dt;var mt=Function.prototype,vt=Object.prototype,At=mt.toString,yt=vt.hasOwnProperty,bt=At.call(Object);const _t=function(e){if(!tt(e)||"[object Object]"!=Y(e))return!1;var t=$e(e);if(null===t)return!0;var n=yt.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&At.call(n)==bt};var wt={};wt["[object Float32Array]"]=wt["[object Float64Array]"]=wt["[object Int8Array]"]=wt["[object Int16Array]"]=wt["[object Int32Array]"]=wt["[object Uint8Array]"]=wt["[object Uint8ClampedArray]"]=wt["[object Uint16Array]"]=wt["[object Uint32Array]"]=!0,wt["[object Arguments]"]=wt["[object Array]"]=wt["[object ArrayBuffer]"]=wt["[object Boolean]"]=wt["[object DataView]"]=wt["[object Date]"]=wt["[object Error]"]=wt["[object Function]"]=wt["[object Map]"]=wt["[object Number]"]=wt["[object Object]"]=wt["[object RegExp]"]=wt["[object Set]"]=wt["[object String]"]=wt["[object WeakMap]"]=!1;const xt=function(e){return tt(e)&<(e.length)&&!!wt[Y(e)]};const Et=function(e){return function(t){return e(t)}};var St="object"==typeof exports&&exports&&!exports.nodeType&&exports,Ct=St&&"object"==typeof module&&module&&!module.nodeType&&module,Pt=Ct&&Ct.exports===St&&F.process,Tt=function(){try{var e=Ct&&Ct.require&&Ct.require("util").types;return e||Pt&&Pt.binding&&Pt.binding("util")}catch(t){}}();var kt=Tt&&Tt.isTypedArray;const Mt=kt?Et(kt):xt;const Ot=function(e,t){if(("constructor"!==t||"function"!==typeof e[t])&&"__proto__"!=t)return e[t]};var Rt=Object.prototype.hasOwnProperty;const It=function(e,t,n){var r=e[t];Rt.call(e,t)&&E(r,n)&&(void 0!==n||t in e)||De(e,t,n)};const Lt=function(e,t,n,r){var i=!n;n||(n={});for(var o=-1,a=t.length;++o-1&&e%1==0&&e0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}(Qt);const tn=function(e,t){return en(Xt(e,t,Kt),e+"")};const nn=function(e,t,n){if(!X(n))return!1;var r=typeof t;return!!("number"==r?ct(n)&&Ft(t,n.length):"string"==r&&t in n)&&E(n[t],e)};const rn=function(e){return tn((function(t,n){var r=-1,i=n.length,o=i>1?n[i-1]:void 0,a=i>2?n[2]:void 0;for(o=e.length>3&&"function"==typeof o?(i--,o):void 0,a&&nn(n[0],n[1],a)&&(o=i<3?void 0:o,i=1),t=Object(t);++r=t||n<0||d&&e-c>=o}function g(){var e=sn();if(p(e))return m(e);s=setTimeout(g,function(e){var n=t-(e-l);return d?yn(n,o-(e-c)):n}(e))}function m(e){return s=void 0,f&&r?h(e):(r=i=void 0,a)}function v(){var e=sn(),n=p(e);if(r=arguments,i=this,l=e,n){if(void 0===s)return function(e){return c=e,s=setTimeout(g,t),u?h(e):a}(l);if(d)return clearTimeout(s),s=setTimeout(g,t),h(l)}return void 0===s&&(s=setTimeout(g,t)),a}return t=vn(t)||0,X(n)&&(u=!!n.leading,o=(d="maxWait"in n)?An(vn(n.maxWait)||0,t):o,f="trailing"in n?!!n.trailing:f),v.cancel=function(){void 0!==s&&clearTimeout(s),c=0,r=l=i=s=void 0},v.flush=function(){return void 0===s?a:m(sn())},v};const _n=function(e,t,n){var r=!0,i=!0;if("function"!=typeof e)throw new TypeError("Expected a function");return X(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),bn(e,t,{leading:r,maxWait:t,trailing:i})};var wn=function(){function e(e,t){for(var n=0;ni&&(l=i),c<0?c=0:c>o&&(c=o);var u=l/i,d=1-c/o;return{h:t.h,s:u,v:d,a:t.a,source:"hsv"}}(e,n.props.hsl,n.container),e)},n.handleMouseDown=function(e){n.handleChange(e);var t=n.getContainerRenderWindow();t.addEventListener("mousemove",n.handleChange),t.addEventListener("mouseup",n.handleMouseUp)},n.handleMouseUp=function(){n.unbindEventListeners()},n.throttle=_n((function(e,t,n){e(t,n)}),50),n}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),wn(t,[{key:"componentWillUnmount",value:function(){this.throttle.cancel(),this.unbindEventListeners()}},{key:"getContainerRenderWindow",value:function(){var e=this.container,t=window,n=window;try{for(;!t.document.contains(e)&&t.parent!==t;)n=t,t=t.parent}catch{}return n}},{key:"unbindEventListeners",value:function(){var e=this.getContainerRenderWindow();e.removeEventListener("mousemove",this.handleChange),e.removeEventListener("mouseup",this.handleMouseUp)}},{key:"render",value:function(){var e=this,t=this.props.style||{},n=t.color,o=t.white,a=t.black,s=t.pointer,l=t.circle,c=(0,i.ZP)({default:{color:{absolute:"0px 0px 0px 0px",background:"hsl("+this.props.hsl.h+",100%, 50%)",borderRadius:this.props.radius},white:{absolute:"0px 0px 0px 0px",borderRadius:this.props.radius},black:{absolute:"0px 0px 0px 0px",boxShadow:this.props.shadow,borderRadius:this.props.radius},pointer:{position:"absolute",top:-100*this.props.hsv.v+100+"%",left:100*this.props.hsv.s+"%",cursor:"default"},circle:{width:"4px",height:"4px",boxShadow:"0 0 0 1.5px #fff, inset 0 0 1px 1px rgba(0,0,0,.3),\n 0 0 1px 2px rgba(0,0,0,.4)",borderRadius:"50%",cursor:"hand",transform:"translate(-2px, -2px)"}},custom:{color:n,white:o,black:a,pointer:s,circle:l}},{custom:!!this.props.style});return r.createElement("div",{style:c.color,ref:function(t){return e.container=t},onMouseDown:this.handleMouseDown,onTouchMove:this.handleChange,onTouchStart:this.handleChange},r.createElement("style",null,"\n .saturation-white {\n background: -webkit-linear-gradient(to right, #fff, rgba(255,255,255,0));\n background: linear-gradient(to right, #fff, rgba(255,255,255,0));\n }\n .saturation-black {\n background: -webkit-linear-gradient(to top, #000, rgba(0,0,0,0));\n background: linear-gradient(to top, #000, rgba(0,0,0,0));\n }\n "),r.createElement("div",{style:c.white,className:"saturation-white"},r.createElement("div",{style:c.black,className:"saturation-black"}),r.createElement("div",{style:c.pointer},this.props.pointer?r.createElement(this.props.pointer,this.props):r.createElement("div",{style:c.circle}))))}}]),t}(r.PureComponent||r.Component);const En=xn;const Sn=function(e,t){for(var n=-1,r=null==e?0:e.length;++n=128?"#000":"#fff"},Bn=function(e,t){var n=e.replace("\xb0","");return Ln()(t+" ("+n+")")._ok},Zn=Object.assign||function(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:"span";return function(n){function i(){var e,t,n;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i);for(var r=arguments.length,o=Array(r),a=0;as))return!1;var c=o.get(e),u=o.get(t);if(c&&u)return c==t&&u==e;var d=-1,f=!0,h=2&n?new tr:void 0;for(o.set(e,t),o.set(t,e);++d1&&(e.a=1),n.props.onChange({h:n.props.hsl.h,s:n.props.hsl.s,l:n.props.hsl.l,a:Math.round(100*e.a)/100,source:"rgb"},t)):(e.h||e.s||e.l)&&("string"===typeof e.s&&e.s.includes("%")&&(e.s=e.s.replace("%","")),"string"===typeof e.l&&e.l.includes("%")&&(e.l=e.l.replace("%","")),1==e.s?e.s=.01:1==e.l&&(e.l=.01),n.props.onChange({h:e.h||n.props.hsl.h,s:Number(Ui(e.s)?n.props.hsl.s:e.s),l:Number(Ui(e.l)?n.props.hsl.l:e.l),source:"hsl"},t))},n.showHighlight=function(e){e.currentTarget.style.background="#eee"},n.hideHighlight=function(e){e.currentTarget.style.background="transparent"},1!==e.hsl.a&&"hex"===e.view?n.state={view:"rgb"}:n.state={view:e.view},n}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),Vi(t,[{key:"render",value:function(){var e=this,t=(0,i.ZP)({default:{wrap:{paddingTop:"16px",display:"flex"},fields:{flex:"1",display:"flex",marginLeft:"-6px"},field:{paddingLeft:"6px",width:"100%"},alpha:{paddingLeft:"6px",width:"100%"},toggle:{width:"32px",textAlign:"right",position:"relative"},icon:{marginRight:"-4px",marginTop:"12px",cursor:"pointer",position:"relative"},iconHighlight:{position:"absolute",width:"24px",height:"28px",background:"#eee",borderRadius:"4px",top:"10px",left:"12px",display:"none"},input:{fontSize:"11px",color:"#333",width:"100%",borderRadius:"2px",border:"none",boxShadow:"inset 0 0 0 1px #dadada",height:"21px",textAlign:"center"},label:{textTransform:"uppercase",fontSize:"11px",lineHeight:"11px",color:"#969696",textAlign:"center",display:"block",marginTop:"12px"},svg:{fill:"#333",width:"24px",height:"24px",border:"1px transparent solid",borderRadius:"5px"}},disableAlpha:{alpha:{display:"none"}}},this.props,this.state),n=void 0;return"hex"===this.state.view?n=r.createElement("div",{style:t.fields,className:"flexbox-fix"},r.createElement("div",{style:t.field},r.createElement(v,{style:{input:t.input,label:t.label},label:"hex",value:this.props.hex,onChange:this.handleChange}))):"rgb"===this.state.view?n=r.createElement("div",{style:t.fields,className:"flexbox-fix"},r.createElement("div",{style:t.field},r.createElement(v,{style:{input:t.input,label:t.label},label:"r",value:this.props.rgb.r,onChange:this.handleChange})),r.createElement("div",{style:t.field},r.createElement(v,{style:{input:t.input,label:t.label},label:"g",value:this.props.rgb.g,onChange:this.handleChange})),r.createElement("div",{style:t.field},r.createElement(v,{style:{input:t.input,label:t.label},label:"b",value:this.props.rgb.b,onChange:this.handleChange})),r.createElement("div",{style:t.alpha},r.createElement(v,{style:{input:t.input,label:t.label},label:"a",value:this.props.rgb.a,arrowOffset:.01,onChange:this.handleChange}))):"hsl"===this.state.view&&(n=r.createElement("div",{style:t.fields,className:"flexbox-fix"},r.createElement("div",{style:t.field},r.createElement(v,{style:{input:t.input,label:t.label},label:"h",value:Math.round(this.props.hsl.h),onChange:this.handleChange})),r.createElement("div",{style:t.field},r.createElement(v,{style:{input:t.input,label:t.label},label:"s",value:Math.round(100*this.props.hsl.s)+"%",onChange:this.handleChange})),r.createElement("div",{style:t.field},r.createElement(v,{style:{input:t.input,label:t.label},label:"l",value:Math.round(100*this.props.hsl.l)+"%",onChange:this.handleChange})),r.createElement("div",{style:t.alpha},r.createElement(v,{style:{input:t.input,label:t.label},label:"a",value:this.props.hsl.a,arrowOffset:.01,onChange:this.handleChange})))),r.createElement("div",{style:t.wrap,className:"flexbox-fix"},n,r.createElement("div",{style:t.toggle},r.createElement("div",{style:t.icon,onClick:this.toggleViews,ref:function(t){return e.icon=t}},r.createElement(Hi.Z,{style:t.svg,onMouseOver:this.showHighlight,onMouseEnter:this.showHighlight,onMouseOut:this.hideHighlight}))))}}],[{key:"getDerivedStateFromProps",value:function(e,t){return 1!==e.hsl.a&&"hex"===t.view?{view:"rgb"}:null}}]),t}(r.Component);Wi.defaultProps={view:"hex"};const Gi=Wi;const Ki=function(){var e=(0,i.ZP)({default:{picker:{width:"12px",height:"12px",borderRadius:"6px",transform:"translate(-6px, -1px)",backgroundColor:"rgb(248, 248, 248)",boxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.37)"}}});return r.createElement("div",{style:e.picker})};const qi=function(){var e=(0,i.ZP)({default:{picker:{width:"12px",height:"12px",borderRadius:"6px",boxShadow:"inset 0 0 0 1px #fff",transform:"translate(-6px, -6px)"}}});return r.createElement("div",{style:e.picker})};var Yi=function(e){var t=e.width,n=e.onChange,o=e.disableAlpha,a=e.rgb,s=e.hsl,l=e.hsv,u=e.hex,d=e.renderers,f=e.styles,p=void 0===f?{}:f,g=e.className,m=void 0===g?"":g,v=e.defaultView,A=(0,i.ZP)(rn({default:{picker:{width:t,background:"#fff",borderRadius:"2px",boxShadow:"0 0 2px rgba(0,0,0,.3), 0 4px 8px rgba(0,0,0,.3)",boxSizing:"initial",fontFamily:"Menlo"},saturation:{width:"100%",paddingBottom:"55%",position:"relative",borderRadius:"2px 2px 0 0",overflow:"hidden"},Saturation:{radius:"2px 2px 0 0"},body:{padding:"16px 16px 12px"},controls:{display:"flex"},color:{width:"32px"},swatch:{marginTop:"6px",width:"16px",height:"16px",borderRadius:"8px",position:"relative",overflow:"hidden"},active:{absolute:"0px 0px 0px 0px",borderRadius:"8px",boxShadow:"inset 0 0 0 1px rgba(0,0,0,.1)",background:"rgba("+a.r+", "+a.g+", "+a.b+", "+a.a+")",zIndex:"2"},toggles:{flex:"1"},hue:{height:"10px",position:"relative",marginBottom:"8px"},Hue:{radius:"2px"},alpha:{height:"10px",position:"relative"},Alpha:{radius:"2px"}},disableAlpha:{color:{width:"22px"},alpha:{display:"none"},hue:{marginBottom:"0px"},swatch:{width:"10px",height:"10px",marginTop:"0px"}}},p),{disableAlpha:o});return r.createElement("div",{style:A.picker,className:"chrome-picker "+m},r.createElement("div",{style:A.saturation},r.createElement(En,{style:A.Saturation,hsl:s,hsv:l,pointer:qi,onChange:n})),r.createElement("div",{style:A.body},r.createElement("div",{style:A.controls,className:"flexbox-fix"},r.createElement("div",{style:A.color},r.createElement("div",{style:A.swatch},r.createElement("div",{style:A.active}),r.createElement(c,{renderers:d}))),r.createElement("div",{style:A.toggles},r.createElement("div",{style:A.hue},r.createElement(b,{style:A.Hue,hsl:s,pointer:Ki,onChange:n})),r.createElement("div",{style:A.alpha},r.createElement(h,{style:A.Alpha,rgb:a,hsl:s,pointer:Ki,renderers:d,onChange:n})))),r.createElement(Gi,{rgb:a,hsl:s,hex:u,view:v,onChange:n,disableAlpha:o})))};Yi.propTypes={width:w().oneOfType([w().string,w().number]),disableAlpha:w().bool,styles:w().object,defaultView:w().oneOf(["hex","rgb","hsl"])},Yi.defaultProps={width:225,disableAlpha:!1,styles:{}};const Xi=Un(Yi);const $i=function(e){var t=e.color,n=e.onClick,o=void 0===n?function(){}:n,a=e.onSwatchHover,s=e.active,l=(0,i.ZP)({default:{color:{background:t,width:"15px",height:"15px",float:"left",marginRight:"5px",marginBottom:"5px",position:"relative",cursor:"pointer"},dot:{absolute:"5px 5px 5px 5px",background:jn(t),borderRadius:"50%",opacity:"0"}},active:{dot:{opacity:"1"}},"color-#FFFFFF":{color:{boxShadow:"inset 0 0 0 1px #ddd"},dot:{background:"#000"}},transparent:{dot:{background:"#000"}}},{active:s,"color-#FFFFFF":"#FFFFFF"===t,transparent:"transparent"===t});return r.createElement(Kn,{style:l.color,color:t,onClick:o,onHover:a,focusStyle:{boxShadow:"0 0 4px "+t}},r.createElement("div",{style:l.dot}))};const Qi=function(e){var t=e.hex,n=e.rgb,o=e.onChange,a=(0,i.ZP)({default:{fields:{display:"flex",paddingBottom:"6px",paddingRight:"5px",position:"relative"},active:{position:"absolute",top:"6px",left:"5px",height:"9px",width:"9px",background:t},HEXwrap:{flex:"6",position:"relative"},HEXinput:{width:"80%",padding:"0px",paddingLeft:"20%",border:"none",outline:"none",background:"none",fontSize:"12px",color:"#333",height:"16px"},HEXlabel:{display:"none"},RGBwrap:{flex:"3",position:"relative"},RGBinput:{width:"70%",padding:"0px",paddingLeft:"30%",border:"none",outline:"none",background:"none",fontSize:"12px",color:"#333",height:"16px"},RGBlabel:{position:"absolute",top:"3px",left:"0px",lineHeight:"16px",textTransform:"uppercase",fontSize:"12px",color:"#999"}}}),s=function(e,t){e.r||e.g||e.b?o({r:e.r||n.r,g:e.g||n.g,b:e.b||n.b,source:"rgb"},t):o({hex:e.hex,source:"hex"},t)};return r.createElement("div",{style:a.fields,className:"flexbox-fix"},r.createElement("div",{style:a.active}),r.createElement(v,{style:{wrap:a.HEXwrap,input:a.HEXinput,label:a.HEXlabel},label:"hex",value:t,onChange:s}),r.createElement(v,{style:{wrap:a.RGBwrap,input:a.RGBinput,label:a.RGBlabel},label:"r",value:n.r,onChange:s}),r.createElement(v,{style:{wrap:a.RGBwrap,input:a.RGBinput,label:a.RGBlabel},label:"g",value:n.g,onChange:s}),r.createElement(v,{style:{wrap:a.RGBwrap,input:a.RGBinput,label:a.RGBlabel},label:"b",value:n.b,onChange:s}))};var Ji=function(e){var t=e.onChange,n=e.onSwatchHover,o=e.colors,a=e.hex,s=e.rgb,l=e.styles,c=void 0===l?{}:l,u=e.className,d=void 0===u?"":u,f=(0,i.ZP)(rn({default:{Compact:{background:"#f6f6f6",radius:"4px"},compact:{paddingTop:"5px",paddingLeft:"5px",boxSizing:"initial",width:"240px"},clear:{clear:"both"}}},c)),h=function(e,n){e.hex?Fn(e.hex)&&t({hex:e.hex,source:"hex"},n):t(e,n)};return r.createElement(an,{style:f.Compact,styles:c},r.createElement("div",{style:f.compact,className:"compact-picker "+d},r.createElement("div",null,Ai(o,(function(e){return r.createElement($i,{key:e,color:e,active:e.toLowerCase()===a,onClick:h,onSwatchHover:n})})),r.createElement("div",{style:f.clear})),r.createElement(Qi,{hex:a,rgb:s,onChange:h})))};Ji.propTypes={colors:w().arrayOf(w().string),styles:w().object},Ji.defaultProps={colors:["#4D4D4D","#999999","#FFFFFF","#F44E3B","#FE9200","#FCDC00","#DBDF00","#A4DD00","#68CCCA","#73D8FF","#AEA1FF","#FDA1FF","#333333","#808080","#cccccc","#D33115","#E27300","#FCC400","#B0BC00","#68BC00","#16A5A5","#009CE0","#7B64FF","#FA28FF","#000000","#666666","#B3B3B3","#9F0500","#C45100","#FB9E00","#808900","#194D33","#0C797D","#0062B1","#653294","#AB149E"],styles:{}};Un(Ji);const eo=(0,i.tz)((function(e){var t=e.hover,n=e.color,o=e.onClick,a=e.onSwatchHover,s={position:"relative",zIndex:"2",outline:"2px solid #fff",boxShadow:"0 0 5px 2px rgba(0,0,0,0.25)"},l=(0,i.ZP)({default:{swatch:{width:"25px",height:"25px",fontSize:"0"}},hover:{swatch:s}},{hover:t});return r.createElement("div",{style:l.swatch},r.createElement(Kn,{color:n,onClick:o,onHover:a,focusStyle:s}))}));var to=function(e){var t=e.width,n=e.colors,o=e.onChange,a=e.onSwatchHover,s=e.triangle,l=e.styles,c=void 0===l?{}:l,u=e.className,d=void 0===u?"":u,f=(0,i.ZP)(rn({default:{card:{width:t,background:"#fff",border:"1px solid rgba(0,0,0,0.2)",boxShadow:"0 3px 12px rgba(0,0,0,0.15)",borderRadius:"4px",position:"relative",padding:"5px",display:"flex",flexWrap:"wrap"},triangle:{position:"absolute",border:"7px solid transparent",borderBottomColor:"#fff"},triangleShadow:{position:"absolute",border:"8px solid transparent",borderBottomColor:"rgba(0,0,0,0.15)"}},"hide-triangle":{triangle:{display:"none"},triangleShadow:{display:"none"}},"top-left-triangle":{triangle:{top:"-14px",left:"10px"},triangleShadow:{top:"-16px",left:"9px"}},"top-right-triangle":{triangle:{top:"-14px",right:"10px"},triangleShadow:{top:"-16px",right:"9px"}},"bottom-left-triangle":{triangle:{top:"35px",left:"10px",transform:"rotate(180deg)"},triangleShadow:{top:"37px",left:"9px",transform:"rotate(180deg)"}},"bottom-right-triangle":{triangle:{top:"35px",right:"10px",transform:"rotate(180deg)"},triangleShadow:{top:"37px",right:"9px",transform:"rotate(180deg)"}}},c),{"hide-triangle":"hide"===s,"top-left-triangle":"top-left"===s,"top-right-triangle":"top-right"===s,"bottom-left-triangle":"bottom-left"===s,"bottom-right-triangle":"bottom-right"===s}),h=function(e,t){return o({hex:e,source:"hex"},t)};return r.createElement("div",{style:f.card,className:"github-picker "+d},r.createElement("div",{style:f.triangleShadow}),r.createElement("div",{style:f.triangle}),Ai(n,(function(e){return r.createElement(eo,{color:e,key:e,onClick:h,onSwatchHover:a})})))};to.propTypes={width:w().oneOfType([w().string,w().number]),colors:w().arrayOf(w().string),triangle:w().oneOf(["hide","top-left","top-right","bottom-left","bottom-right"]),styles:w().object},to.defaultProps={width:200,colors:["#B80000","#DB3E00","#FCCB00","#008B02","#006B76","#1273DE","#004DCF","#5300EB","#EB9694","#FAD0C3","#FEF3BD","#C1E1C5","#BEDADC","#C4DEF6","#BED3F3","#D4C4FB"],triangle:"top-left",styles:{}};Un(to);const no=function(e){var t=e.direction,n=(0,i.ZP)({default:{picker:{width:"18px",height:"18px",borderRadius:"50%",transform:"translate(-9px, -1px)",backgroundColor:"rgb(248, 248, 248)",boxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.37)"}},vertical:{picker:{transform:"translate(-3px, -9px)"}}},{vertical:"vertical"===t});return r.createElement("div",{style:n.picker})};var ro=Object.assign||function(e){for(var t=1;t.5});return r.createElement("div",{style:n.picker})};const so=function(){var e=(0,i.ZP)({default:{triangle:{width:0,height:0,borderStyle:"solid",borderWidth:"4px 0 4px 6px",borderColor:"transparent transparent transparent #fff",position:"absolute",top:"1px",left:"1px"},triangleBorder:{width:0,height:0,borderStyle:"solid",borderWidth:"5px 0 5px 8px",borderColor:"transparent transparent transparent #555"},left:{Extend:"triangleBorder",transform:"translate(-13px, -4px)"},leftInside:{Extend:"triangle",transform:"translate(-8px, -5px)"},right:{Extend:"triangleBorder",transform:"translate(20px, -14px) rotate(180deg)"},rightInside:{Extend:"triangle",transform:"translate(-8px, -5px)"}}});return r.createElement("div",{style:e.pointer},r.createElement("div",{style:e.left},r.createElement("div",{style:e.leftInside})),r.createElement("div",{style:e.right},r.createElement("div",{style:e.rightInside})))};const lo=function(e){var t=e.onClick,n=e.label,o=e.children,a=e.active,s=(0,i.ZP)({default:{button:{backgroundImage:"linear-gradient(-180deg, #FFFFFF 0%, #E6E6E6 100%)",border:"1px solid #878787",borderRadius:"2px",height:"20px",boxShadow:"0 1px 0 0 #EAEAEA",fontSize:"14px",color:"#000",lineHeight:"20px",textAlign:"center",marginBottom:"10px",cursor:"pointer"}},active:{button:{boxShadow:"0 0 0 1px #878787"}}},{active:a});return r.createElement("div",{style:s.button,onClick:t},n||o)};const co=function(e){var t=e.rgb,n=e.currentColor,o=(0,i.ZP)({default:{swatches:{border:"1px solid #B3B3B3",borderBottom:"1px solid #F0F0F0",marginBottom:"2px",marginTop:"1px"},new:{height:"34px",background:"rgb("+t.r+","+t.g+", "+t.b+")",boxShadow:"inset 1px 0 0 #000, inset -1px 0 0 #000, inset 0 1px 0 #000"},current:{height:"34px",background:n,boxShadow:"inset 1px 0 0 #000, inset -1px 0 0 #000, inset 0 -1px 0 #000"},label:{fontSize:"14px",color:"#000",textAlign:"center"}}});return r.createElement("div",null,r.createElement("div",{style:o.label},"new"),r.createElement("div",{style:o.swatches},r.createElement("div",{style:o.new}),r.createElement("div",{style:o.current})),r.createElement("div",{style:o.label},"current"))};var uo=function(){function e(e,t){for(var n=0;n100&&(e.a=100),e.a/=100,t({h:o.h,s:o.s,l:o.l,a:e.a,source:"rgb"},r))};return r.createElement("div",{style:l.fields,className:"flexbox-fix"},r.createElement("div",{style:l.double},r.createElement(v,{style:{input:l.input,label:l.label},label:"hex",value:a.replace("#",""),onChange:c})),r.createElement("div",{style:l.single},r.createElement(v,{style:{input:l.input,label:l.label},label:"r",value:n.r,onChange:c,dragLabel:"true",dragMax:"255"})),r.createElement("div",{style:l.single},r.createElement(v,{style:{input:l.input,label:l.label},label:"g",value:n.g,onChange:c,dragLabel:"true",dragMax:"255"})),r.createElement("div",{style:l.single},r.createElement(v,{style:{input:l.input,label:l.label},label:"b",value:n.b,onChange:c,dragLabel:"true",dragMax:"255"})),r.createElement("div",{style:l.alpha},r.createElement(v,{style:{input:l.input,label:l.label},label:"a",value:Math.round(100*n.a),onChange:c,dragLabel:"true",dragMax:"100"})))};var po=Object.assign||function(e){for(var t=1;t{"use strict";var r=n(57435),i=n(5696);function o(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n